package o;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public final class Da0 extends Sb0 implements SC {
    public final /* synthetic */ int p = 0;
    public float q;
    public int r;
    public /* synthetic */ Object s;
    public final /* synthetic */ Object t;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public Da0(C2398s4 c2398s4, float f, R6 r6, InterfaceC0220Im interfaceC0220Im) {
        super(2, interfaceC0220Im);
        this.s = c2398s4;
        this.q = f;
        this.t = r6;
    }

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

    @Override // o.AbstractC0728ad
    public final InterfaceC0220Im l(Object obj, InterfaceC0220Im interfaceC0220Im) {
        switch (this.p) {
            case 0:
                return new Da0((C2398s4) this.s, this.q, (R6) this.t, interfaceC0220Im);
            default:
                Da0 da0 = new Da0((C3114zg0) this.t, interfaceC0220Im);
                da0.s = obj;
                return da0;
        }
    }

    @Override // o.AbstractC0728ad
    public final Object n(Object obj) {
        final float fE;
        InterfaceC0065Cn interfaceC0065Cn;
        switch (this.p) {
            case 0:
                int i = this.r;
                if (i == 0) {
                    IJ.H(obj);
                    C1738l6 c1738l6 = (C1738l6) ((C2398s4) this.s).c;
                    Float f = new Float(this.q);
                    R6 r6 = (R6) this.t;
                    this.r = 1;
                    Object objB = C1738l6.b(c1738l6, f, r6, this);
                    EnumC0091Dn enumC0091Dn = EnumC0091Dn.l;
                    if (objB == enumC0091Dn) {
                        return enumC0091Dn;
                    }
                } else {
                    if (i != 1) {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                    IJ.H(obj);
                }
                return Oh0.a;
            default:
                int i2 = this.r;
                if (i2 == 0) {
                    IJ.H(obj);
                    InterfaceC0065Cn interfaceC0065Cn2 = (InterfaceC0065Cn) this.s;
                    fE = As0.E(interfaceC0065Cn2.i());
                    interfaceC0065Cn = interfaceC0065Cn2;
                } else {
                    if (i2 != 1) {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                    fE = this.q;
                    interfaceC0065Cn = (InterfaceC0065Cn) this.s;
                    IJ.H(obj);
                }
                while (C80.D(interfaceC0065Cn)) {
                    final C3114zg0 c3114zg0 = (C3114zg0) this.t;
                    OC oc = new OC() { // from class: o.xg0
                        @Override // o.OC
                        public final Object g(Object obj2) {
                            long jLongValue = ((Long) obj2).longValue();
                            C3114zg0 c3114zg02 = c3114zg0;
                            boolean zG = c3114zg02.g();
                            KV kv = c3114zg02.g;
                            if (!zG) {
                                if (((A90) AbstractC2884x90.t(kv.m, kv)).c == Long.MIN_VALUE) {
                                    kv.g(jLongValue);
                                    c3114zg02.a.a.setValue(Boolean.TRUE);
                                }
                                long jE = jLongValue - ((A90) AbstractC2884x90.t(kv.m, kv)).c;
                                float f2 = fE;
                                if (f2 != 0.0f) {
                                    jE = C2887xC.E(jE / f2);
                                }
                                if (c3114zg02.b == null) {
                                    c3114zg02.f.g(jE);
                                }
                                c3114zg02.h(f2 == 0.0f, jE);
                            }
                            return Oh0.a;
                        }
                    };
                    this.s = interfaceC0065Cn;
                    this.q = fE;
                    this.r = 1;
                    Object objW = AbstractC2539te.D(this.m).w(oc, this);
                    EnumC0091Dn enumC0091Dn2 = EnumC0091Dn.l;
                    if (objW == enumC0091Dn2) {
                        return enumC0091Dn2;
                    }
                }
                return Oh0.a;
        }
    }

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public Da0(C3114zg0 c3114zg0, InterfaceC0220Im interfaceC0220Im) {
        super(2, interfaceC0220Im);
        this.t = c3114zg0;
    }
}
