package V4;

import m3.AbstractC2467b;
import w4.C3137A;

/* JADX INFO: loaded from: classes3.dex */
public final class q0 extends C4.i implements J4.e {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public w0 f8329a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public a5.i f8330b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public int f8331c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public /* synthetic */ Object f8332d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final /* synthetic */ u0 f8333e;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public q0(A4.d dVar, u0 u0Var) {
        super(2, dVar);
        this.f8333e = u0Var;
    }

    @Override // C4.a
    public final A4.d create(Object obj, A4.d dVar) {
        q0 q0Var = new q0(dVar, this.f8333e);
        q0Var.f8332d = obj;
        return q0Var;
    }

    @Override // J4.e
    public final Object invoke(Object obj, Object obj2) {
        return ((q0) create((R4.m) obj, (A4.d) obj2)).invokeSuspend(C3137A.f25453a);
    }

    /* JADX WARN: Removed duplicated region for block: B:21:0x0067  */
    /* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:22:0x0069 -> B:25:0x007e). Please report as a decompilation issue!!! */
    @Override // C4.a
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object invokeSuspend(Object obj) {
        w0 w0VarB;
        w0 w0Var;
        a5.i iVarF;
        R4.m mVar;
        B4.a aVar = B4.a.f492a;
        int i6 = this.f8331c;
        if (i6 == 0) {
            AbstractC2467b.l(obj);
            R4.m mVar2 = (R4.m) this.f8332d;
            u0 u0Var = this.f8333e;
            u0Var.getClass();
            Object obj2 = u0.f8337a.get(u0Var);
            if (obj2 instanceof C0779q) {
                r rVar = ((C0779q) obj2).f8328e;
                this.f8331c = 1;
                mVar2.a(this, rVar);
                return aVar;
            }
            if ((obj2 instanceof InterfaceC0755d0) && (w0VarB = ((InterfaceC0755d0) obj2).b()) != null) {
                Object obj3 = a5.i.f10833a.get(w0VarB);
                kotlin.jvm.internal.o.f(obj3, "null cannot be cast to non-null type kotlinx.coroutines.internal.LockFreeLinkedListNode");
                a5.i iVar = (a5.i) obj3;
                w0Var = w0VarB;
                iVarF = iVar;
                mVar = mVar2;
                if (!iVarF.equals(w0Var)) {
                }
            }
        } else if (i6 == 1) {
            AbstractC2467b.l(obj);
        } else {
            if (i6 != 2) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            iVarF = this.f8330b;
            w0Var = this.f8329a;
            mVar = (R4.m) this.f8332d;
            AbstractC2467b.l(obj);
            iVarF = iVarF.f();
            if (!iVarF.equals(w0Var)) {
                if (iVarF instanceof C0779q) {
                    this.f8332d = mVar;
                    this.f8329a = w0Var;
                    this.f8330b = iVarF;
                    this.f8331c = 2;
                    mVar.a(this, ((C0779q) iVarF).f8328e);
                    B4.a aVar2 = B4.a.f492a;
                    return aVar;
                }
                iVarF = iVarF.f();
                if (!iVarF.equals(w0Var)) {
                }
            }
        }
        return C3137A.f25453a;
    }
}
