package o;

import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.hs, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C1428hs extends AbstractC1618js implements InterfaceC0117En, InterfaceC0220Im {
    public static final /* synthetic */ AtomicReferenceFieldUpdater s = AtomicReferenceFieldUpdater.newUpdater(C1428hs.class, Object.class, "_reusableCancellableContinuation$volatile");
    private volatile /* synthetic */ Object _reusableCancellableContinuation$volatile;

    /* renamed from: o, reason: collision with root package name */
    public final AbstractC2842wn f571o;
    public final AbstractC0298Lm p;
    public Object q;
    public final Object r;

    public C1428hs(AbstractC2842wn abstractC2842wn, AbstractC0298Lm abstractC0298Lm) {
        super(-1);
        this.f571o = abstractC2842wn;
        this.p = abstractC0298Lm;
        this.q = C1884mi0.d;
        this.r = abstractC0298Lm.h().R(0, AbstractC1155f00.h);
    }

    @Override // o.InterfaceC0117En
    public final InterfaceC0117En e() {
        return this.p;
    }

    @Override // o.InterfaceC0220Im
    public final InterfaceC2747vn h() {
        return this.p.h();
    }

    @Override // o.AbstractC1618js
    public final Object i() {
        Object obj = this.q;
        this.q = C1884mi0.d;
        return obj;
    }

    @Override // o.InterfaceC0220Im
    public final void resumeWith(Object obj) {
        Throwable thA = I20.a(obj);
        Object c2075oj = thA == null ? obj : new C2075oj(thA, false);
        AbstractC0298Lm abstractC0298Lm = this.p;
        InterfaceC2747vn interfaceC2747vnH = abstractC0298Lm.h();
        AbstractC2842wn abstractC2842wn = this.f571o;
        if (abstractC2842wn.V(interfaceC2747vnH)) {
            this.q = c2075oj;
            this.n = 0;
            abstractC2842wn.T(abstractC0298Lm.h(), this);
            return;
        }
        AbstractC0437Qw abstractC0437QwA = AbstractC1688kf0.a();
        if (abstractC0437QwA.m >= 4294967296L) {
            this.q = c2075oj;
            this.n = 0;
            abstractC0437QwA.Y(this);
            return;
        }
        abstractC0437QwA.a0(true);
        try {
            InterfaceC2747vn interfaceC2747vnH2 = abstractC0298Lm.h();
            Object objI = AbstractC1155f00.I(interfaceC2747vnH2, this.r);
            try {
                abstractC0298Lm.resumeWith(obj);
                while (abstractC0437QwA.c0()) {
                }
            } finally {
                AbstractC1155f00.C(interfaceC2747vnH2, objI);
            }
        } finally {
            try {
            } finally {
            }
        }
    }

    public final String toString() {
        return "DispatchedContinuation[" + this.f571o + ", " + AbstractC0249Jp.f0(this.p) + ']';
    }

    @Override // o.AbstractC1618js
    public final InterfaceC0220Im c() {
        return this;
    }
}
