package o;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public final class r extends Sb0 implements SC {
    public final /* synthetic */ int p;
    public int q;
    public final /* synthetic */ AY r;
    public final /* synthetic */ KQ s;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public r(KQ kq, AY ay, InterfaceC0220Im interfaceC0220Im) {
        super(2, interfaceC0220Im);
        this.p = 2;
        this.s = kq;
        this.r = ay;
    }

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

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

    @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);
                    C3099zY c3099zY = new C3099zY(this.r);
                    this.q = 1;
                    Object objA = this.s.a(c3099zY, this);
                    EnumC0091Dn enumC0091Dn = EnumC0091Dn.l;
                    if (objA == 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;
                if (i2 == 0) {
                    IJ.H(obj);
                    BY by = new BY(this.r);
                    this.q = 1;
                    Object objA2 = this.s.a(by, this);
                    EnumC0091Dn enumC0091Dn2 = EnumC0091Dn.l;
                    if (objA2 == enumC0091Dn2) {
                        return enumC0091Dn2;
                    }
                } else {
                    if (i2 != 1) {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                    IJ.H(obj);
                }
                return Oh0.a;
            default:
                int i3 = this.q;
                if (i3 == 0) {
                    IJ.H(obj);
                    this.q = 1;
                    Object objA3 = this.s.a(this.r, this);
                    EnumC0091Dn enumC0091Dn3 = EnumC0091Dn.l;
                    if (objA3 == enumC0091Dn3) {
                        return enumC0091Dn3;
                    }
                } else {
                    if (i3 != 1) {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                    IJ.H(obj);
                }
                return Oh0.a;
        }
    }

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