package C5;

import Z6.InterfaceC0382w;
import com.google.android.gms.internal.measurement.C1;
import k5.C1104d;

/* JADX INFO: loaded from: classes.dex */
public final class o extends G6.i implements O6.p {

    /* JADX INFO: renamed from: u, reason: collision with root package name */
    public Object f1360u;

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

    /* JADX INFO: renamed from: w, reason: collision with root package name */
    public final /* synthetic */ q f1362w;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public o(q qVar, E6.d dVar) {
        super(2, dVar);
        this.f1362w = qVar;
    }

    @Override // O6.p
    public final Object k(Object obj, Object obj2) {
        return ((o) m((E6.d) obj2, (InterfaceC0382w) obj)).p(A6.n.f457a);
    }

    @Override // G6.a
    public final E6.d m(E6.d dVar, Object obj) {
        return new o(this.f1362w, dVar);
    }

    /* JADX WARN: Code restructure failed: missing block: B:27:0x0070, code lost:
    
        if (r5.f(r1, r6) == r0) goto L28;
     */
    /* JADX WARN: Removed duplicated region for block: B:23:0x0058  */
    /* JADX WARN: Removed duplicated region for block: B:26:0x0068  */
    @Override // G6.a
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object p(Object obj) throws Throwable {
        Object objX;
        Object objX2;
        Throwable thA;
        F6.a aVar = F6.a.f2580q;
        int i = this.f1361v;
        q qVar = this.f1362w;
        if (i == 0) {
            C1.N(obj);
            C2.a aVar2 = qVar.f1366d;
            this.f1361v = 1;
            objX = aVar2.x(true, this);
            if (objX != aVar) {
            }
            return aVar;
        }
        if (i != 1) {
            if (i != 2) {
                if (i != 3) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                C1.N(obj);
                return A6.n.f457a;
            }
            C1.N(obj);
            objX2 = ((A6.j) obj).f449q;
            if (!(objX2 instanceof A6.i)) {
                qVar.f1368f.f(((C1104d) objX2).f13970b);
            }
            thA = A6.j.a(objX2);
            if (thA != null) {
                this.f1360u = objX2;
                this.f1361v = 3;
            }
            return A6.n.f457a;
        }
        C1.N(obj);
        objX = ((A6.j) obj).f449q;
        if (!(objX instanceof A6.i)) {
            qVar.f1368f.f(((C1104d) objX).f13970b);
        }
        C2.a aVar3 = qVar.f1366d;
        this.f1361v = 2;
        objX2 = aVar3.x(false, this);
        if (objX2 != aVar) {
            if (!(objX2 instanceof A6.i)) {
            }
            thA = A6.j.a(objX2);
            if (thA != null) {
            }
            return A6.n.f457a;
        }
        return aVar;
    }
}
