package o;

import java.util.LinkedHashMap;
import java.util.concurrent.atomic.AtomicBoolean;

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

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    /* JADX WARN: Multi-variable type inference failed */
    public C1486iY(SC sc, InterfaceC0220Im interfaceC0220Im, int i) {
        super(2, interfaceC0220Im);
        this.p = i;
        switch (i) {
            case 1:
                this.s = (Sb0) sc;
                super(2, interfaceC0220Im);
                break;
            default:
                this.s = (Sb0) sc;
                break;
        }
    }

    @Override // o.SC
    public final Object f(Object obj, Object obj2) {
        VQ vq = (VQ) obj;
        InterfaceC0220Im interfaceC0220Im = (InterfaceC0220Im) obj2;
        switch (this.p) {
        }
        return ((C1486iY) l(vq, interfaceC0220Im)).n(Oh0.a);
    }

    /* JADX WARN: Type inference failed for: r1v0, types: [o.SC, o.Sb0] */
    /* JADX WARN: Type inference failed for: r1v1, types: [o.SC, o.Sb0] */
    @Override // o.AbstractC0728ad
    public final InterfaceC0220Im l(Object obj, InterfaceC0220Im interfaceC0220Im) {
        switch (this.p) {
            case 0:
                C1486iY c1486iY = new C1486iY(this.s, interfaceC0220Im, 0);
                c1486iY.r = obj;
                return c1486iY;
            default:
                C1486iY c1486iY2 = new C1486iY(this.s, interfaceC0220Im, 1);
                c1486iY2.r = obj;
                return c1486iY2;
        }
    }

    /* JADX WARN: Type inference failed for: r0v2, types: [o.SC, o.Sb0] */
    /* JADX WARN: Type inference failed for: r4v13, types: [o.SC, o.Sb0] */
    @Override // o.AbstractC0728ad
    public final Object n(Object obj) {
        switch (this.p) {
            case 0:
                int i = this.q;
                if (i == 0) {
                    IJ.H(obj);
                    VQ vq = (VQ) this.r;
                    this.q = 1;
                    obj = this.s.f(vq, this);
                    EnumC0091Dn enumC0091Dn = EnumC0091Dn.l;
                    if (obj == enumC0091Dn) {
                        return enumC0091Dn;
                    }
                } else {
                    if (i != 1) {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                    IJ.H(obj);
                }
                VQ vq2 = (VQ) obj;
                ((AtomicBoolean) vq2.b.m).set(true);
                return vq2;
            default:
                int i2 = this.q;
                if (i2 != 0) {
                    if (i2 != 1) {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                    VQ vq3 = (VQ) this.r;
                    IJ.H(obj);
                    return vq3;
                }
                IJ.H(obj);
                VQ vq4 = new VQ(new LinkedHashMap(((VQ) this.r).a()), false);
                this.r = vq4;
                this.q = 1;
                Object objF = this.s.f(vq4, this);
                EnumC0091Dn enumC0091Dn2 = EnumC0091Dn.l;
                return objF == enumC0091Dn2 ? enumC0091Dn2 : vq4;
        }
    }
}
