package o;

import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.Eh, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C0111Eh extends AbstractC0992dJ {
    public final /* synthetic */ int p;
    public final C2448sg q;

    public /* synthetic */ C0111Eh(C2448sg c2448sg, int i) {
        this.p = i;
        this.q = c2448sg;
    }

    @Override // o.AbstractC0992dJ
    public final boolean j() {
        switch (this.p) {
            case 0:
                return true;
            default:
                return false;
        }
    }

    @Override // o.AbstractC0992dJ
    public final void k(Throwable th) {
        switch (this.p) {
            case 0:
                C1375hJ c1375hJ = this.f489o;
                if (c1375hJ == null) {
                    c1375hJ = null;
                }
                C2448sg c2448sg = this.q;
                Throwable thP = c2448sg.p(c1375hJ);
                if (c2448sg.y()) {
                    C1428hs c1428hs = (C1428hs) c2448sg.f718o;
                    AtomicReferenceFieldUpdater atomicReferenceFieldUpdater = C1428hs.s;
                    while (true) {
                        Object obj = atomicReferenceFieldUpdater.get(c1428hs);
                        C2943xq c2943xq = C1884mi0.e;
                        if (F3.c(obj, c2943xq)) {
                            while (!atomicReferenceFieldUpdater.compareAndSet(c1428hs, c2943xq, thP)) {
                                if (atomicReferenceFieldUpdater.get(c1428hs) != c2943xq) {
                                    break;
                                }
                            }
                            break;
                        } else if (obj instanceof Throwable) {
                            break;
                        } else {
                            while (!atomicReferenceFieldUpdater.compareAndSet(c1428hs, obj, null)) {
                                if (atomicReferenceFieldUpdater.get(c1428hs) != obj) {
                                    break;
                                }
                            }
                        }
                    }
                }
                c2448sg.k(thP);
                if (!c2448sg.y()) {
                    c2448sg.n();
                    break;
                }
                break;
            default:
                this.q.resumeWith(Oh0.a);
                break;
        }
    }
}
