package x;

import V4.InterfaceC0765i0;
import m3.AbstractC2467b;
import w4.C3137A;

/* JADX INFO: renamed from: x.q0, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C3190q0 extends C4.j implements J4.e {

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

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

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final /* synthetic */ X4.e f25904c;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public C3190q0(X4.e eVar, A4.d dVar) {
        super(2, dVar);
        this.f25904c = eVar;
    }

    @Override // C4.a
    public final A4.d create(Object obj, A4.d dVar) {
        C3190q0 c3190q0 = new C3190q0(this.f25904c, dVar);
        c3190q0.f25903b = obj;
        return c3190q0;
    }

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

    @Override // C4.a
    public final Object invokeSuspend(Object obj) throws Throwable {
        InterfaceC0765i0 interfaceC0765i0;
        Throwable th;
        B4.a aVar = B4.a.f492a;
        int i6 = this.f25902a;
        if (i6 == 0) {
            AbstractC2467b.l(obj);
            V4.B0 b0Y = V4.E.y((V4.C) this.f25903b, null, null, new C3188p0(2, null), 3);
            try {
                X4.e eVar = this.f25904c;
                this.f25903b = b0Y;
                this.f25902a = 1;
                Object objE = eVar.e(this);
                if (objE == aVar) {
                    return aVar;
                }
                interfaceC0765i0 = b0Y;
                obj = objE;
            } catch (Throwable th2) {
                interfaceC0765i0 = b0Y;
                th = th2;
                interfaceC0765i0.cancel(null);
                throw th;
            }
        } else {
            if (i6 != 1) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            interfaceC0765i0 = (InterfaceC0765i0) this.f25903b;
            try {
                AbstractC2467b.l(obj);
            } catch (Throwable th3) {
                th = th3;
                interfaceC0765i0.cancel(null);
                throw th;
            }
        }
        C3186o0 c3186o0 = (C3186o0) obj;
        interfaceC0765i0.cancel(null);
        return c3186o0;
    }
}
