package o;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.mp, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C1897mp extends Sb0 implements SC {
    public final /* synthetic */ int p;
    public int q;
    public final /* synthetic */ C0041Bp r;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public /* synthetic */ C1897mp(C0041Bp c0041Bp, InterfaceC0220Im interfaceC0220Im, int i) {
        super(2, interfaceC0220Im);
        this.p = i;
        this.r = c0041Bp;
    }

    @Override // o.SC
    public final Object f(Object obj, Object obj2) {
        switch (this.p) {
        }
        return ((C1897mp) l((InterfaceC0065Cn) obj, (InterfaceC0220Im) obj2)).n(Oh0.a);
    }

    @Override // o.AbstractC0728ad
    public final InterfaceC0220Im l(Object obj, InterfaceC0220Im interfaceC0220Im) {
        switch (this.p) {
            case 0:
                return new C1897mp(this.r, interfaceC0220Im, 0);
            case 1:
                return new C1897mp(this.r, interfaceC0220Im, 1);
            default:
                return new C1897mp(this.r, interfaceC0220Im, 2);
        }
    }

    @Override // o.AbstractC0728ad
    public final Object n(Object obj) throws Throwable {
        switch (this.p) {
            case 0:
                int i = this.q;
                if (i == 0) {
                    IJ.H(obj);
                    this.q = 1;
                    Object objE = C0041Bp.e(this.r, this);
                    EnumC0091Dn enumC0091Dn = EnumC0091Dn.l;
                    if (objE == enumC0091Dn) {
                        return enumC0091Dn;
                    }
                } else {
                    if (i != 1) {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                    IJ.H(obj);
                }
                return Oh0.a;
            case 1:
                int i2 = this.q;
                Oh0 oh0 = Oh0.a;
                C0041Bp c0041Bp = this.r;
                EnumC0091Dn enumC0091Dn2 = EnumC0091Dn.l;
                if (i2 == 0) {
                    IJ.H(obj);
                    C2062oc0 c2062oc0 = c0041Bp.i;
                    this.q = 1;
                    Object objA = ((C1790lj) c2062oc0.b).A(this);
                    if (objA != enumC0091Dn2) {
                        objA = oh0;
                    }
                    if (objA != enumC0091Dn2) {
                    }
                    return enumC0091Dn2;
                }
                if (i2 != 1) {
                    if (i2 != 2) {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                    IJ.H(obj);
                    return oh0;
                }
                IJ.H(obj);
                InterfaceC2104oz interfaceC2104ozJ = Co0.j(c0041Bp.h().c(), -1);
                C2778w4 c2778w4 = new C2778w4(2, c0041Bp);
                this.q = 2;
                if (interfaceC2104ozJ.a(c2778w4, this) != enumC0091Dn2) {
                    return oh0;
                }
                return enumC0091Dn2;
            default:
                C0041Bp c0041Bp2 = this.r;
                C0247Jn c0247Jn = c0041Bp2.h;
                int i3 = this.q;
                EnumC0091Dn enumC0091Dn3 = EnumC0091Dn.l;
                try {
                    if (i3 == 0) {
                        IJ.H(obj);
                        if (c0247Jn.i() instanceof C2577ty) {
                            return c0247Jn.i();
                        }
                        this.q = 1;
                        if (c0041Bp2.i(this) == enumC0091Dn3) {
                            return enumC0091Dn3;
                        }
                    } else {
                        if (i3 != 1) {
                            if (i3 != 2) {
                                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                            }
                            IJ.H(obj);
                            return (AbstractC2912xa0) obj;
                        }
                        IJ.H(obj);
                    }
                    this.q = 2;
                    obj = C0041Bp.f(c0041Bp2, false, this);
                    if (obj == enumC0091Dn3) {
                        return enumC0091Dn3;
                    }
                    return (AbstractC2912xa0) obj;
                } catch (Throwable th) {
                    return new C1251g00(-1, th);
                }
        }
    }
}
