package m4;

import java.util.concurrent.Executor;
import k4.AbstractC2383B;
import k4.AbstractC2396i;
import k4.AbstractC2397j;
import k4.C2393f;
import k4.C2394g;
import k4.C2407u;

/* JADX INFO: loaded from: classes3.dex */
public final class I0 extends AbstractC2383B {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final k4.H f20642a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final M0 f20643b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final Executor f20644c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final k4.i0 f20645d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final C2407u f20646e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public C2394g f20647f;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public AbstractC2397j f20648g;

    public I0(k4.H h5, M0 m02, Executor executor, k4.i0 i0Var, C2394g c2394g) {
        this.f20642a = h5;
        this.f20643b = m02;
        this.f20645d = i0Var;
        Executor executor2 = c2394g.f19859b;
        executor = executor2 != null ? executor2 : executor;
        this.f20644c = executor;
        C2393f c2393fB = C2394g.b(c2394g);
        c2393fB.f19850b = executor;
        this.f20647f = new C2394g(c2393fB);
        this.f20646e = C2407u.b();
    }

    @Override // k4.AbstractC2383B, k4.AbstractC2397j
    public final void cancel(String str, Throwable th) {
        AbstractC2397j abstractC2397j = this.f20648g;
        if (abstractC2397j != null) {
            abstractC2397j.cancel(str, th);
        }
    }

    @Override // k4.AbstractC2383B
    public final AbstractC2397j delegate() {
        return this.f20648g;
    }

    @Override // k4.AbstractC2383B, k4.AbstractC2397j
    public final void start(AbstractC2396i abstractC2396i, k4.g0 g0Var) {
        C2394g c2394g = this.f20647f;
        k4.i0 i0Var = this.f20645d;
        A4.g.o(i0Var, "method");
        A4.g.o(g0Var, "headers");
        A4.g.o(c2394g, "callOptions");
        androidx.recyclerview.widget.i0 i0VarA = this.f20642a.a();
        k4.r0 r0Var = (k4.r0) i0VarA.f13105b;
        if (!r0Var.e()) {
            this.f20644c.execute(new I(this, abstractC2396i, AbstractC2504f0.h(r0Var)));
            this.f20648g = S0.f20761k0;
            return;
        }
        Y0 y02 = (Y0) i0VarA.f13106c;
        y02.getClass();
        W0 w02 = (W0) y02.f20915b.get(i0Var.f19879b);
        if (w02 == null) {
            w02 = (W0) y02.f20916c.get(i0Var.f19880c);
        }
        if (w02 == null) {
            w02 = y02.f20914a;
        }
        if (w02 != null) {
            this.f20647f = this.f20647f.c(W0.f20895g, w02);
        }
        AbstractC2397j abstractC2397jL = this.f20643b.l(i0Var, this.f20647f);
        this.f20648g = abstractC2397jL;
        abstractC2397jL.start(abstractC2396i, g0Var);
    }
}
