package o;

import java.util.concurrent.CancellationException;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.i6, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C1454i6 extends Sb0 implements OC {
    public S6 p;
    public C2773w10 q;
    public int r;
    public final /* synthetic */ C1738l6 s;
    public final /* synthetic */ Object t;
    public final /* synthetic */ Mc0 u;
    public final /* synthetic */ long v;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public C1454i6(C1738l6 c1738l6, Object obj, Mc0 mc0, long j, InterfaceC0220Im interfaceC0220Im) {
        super(1, interfaceC0220Im);
        this.s = c1738l6;
        this.t = obj;
        this.u = mc0;
        this.v = j;
    }

    @Override // o.OC
    public final Object g(Object obj) {
        Mc0 mc0 = this.u;
        long j = this.v;
        return new C1454i6(this.s, this.t, mc0, j, (InterfaceC0220Im) obj).n(Oh0.a);
    }

    @Override // o.AbstractC0728ad
    public final Object n(Object obj) {
        S6 s6;
        C2773w10 c2773w10;
        Mc0 mc0 = this.u;
        int i = this.r;
        int i2 = 1;
        C1738l6 c1738l6 = this.s;
        try {
            if (i == 0) {
                IJ.H(obj);
                c1738l6.c.n = (Y6) c1738l6.a.a.g(this.t);
                c1738l6.e.setValue(mc0.c);
                c1738l6.d.setValue(Boolean.TRUE);
                S6 s62 = c1738l6.c;
                S6 s63 = new S6(s62.l, s62.m.getValue(), YT.s(s62.n), s62.f324o, Long.MIN_VALUE, s62.q);
                C2773w10 c2773w102 = new C2773w10();
                long j = this.v;
                C1358h6 c1358h6 = new C1358h6(c1738l6, s63, c2773w102, 0);
                this.p = s63;
                this.q = c2773w102;
                this.r = 1;
                Object objM = As0.m(s63, mc0, j, c1358h6, this);
                EnumC0091Dn enumC0091Dn = EnumC0091Dn.l;
                if (objM == enumC0091Dn) {
                    return enumC0091Dn;
                }
                s6 = s63;
                c2773w10 = c2773w102;
            } else {
                if (i != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                c2773w10 = this.q;
                s6 = this.p;
                IJ.H(obj);
            }
            if (!c2773w10.l) {
                i2 = 2;
            }
            S6 s64 = c1738l6.c;
            s64.n.d();
            s64.f324o = Long.MIN_VALUE;
            c1738l6.d.setValue(Boolean.FALSE);
            return new P6(s6, i2);
        } catch (CancellationException e) {
            S6 s65 = c1738l6.c;
            s65.n.d();
            s65.f324o = Long.MIN_VALUE;
            c1738l6.d.setValue(Boolean.FALSE);
            throw e;
        }
    }
}
