package o;

import java.util.Collections;
import java.util.List;
import java.util.NoSuchElementException;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.Ke, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final /* synthetic */ class C0264Ke implements NC {
    public final /* synthetic */ int l;
    public final /* synthetic */ Object m;
    public final /* synthetic */ Object n;

    /* renamed from: o, reason: collision with root package name */
    public final /* synthetic */ Object f193o;

    public /* synthetic */ C0264Ke(Object obj, Object obj2, Object obj3, int i) {
        this.l = i;
        this.m = obj;
        this.n = obj2;
        this.f193o = obj3;
    }

    @Override // o.NC
    public final Object a() {
        Oh0 oh0;
        switch (this.l) {
            case 0:
                C0341Ne c0341Ne = (C0341Ne) this.m;
                T00 t00H0 = C0341Ne.H0(c0341Ne, (AbstractC2239qS) this.n, (C1352h3) this.f193o);
                if (t00H0 == null) {
                    return null;
                }
                C1891mm c1891mm = c0341Ne.z;
                if (C1470iI.a(c1891mm.G, 0L)) {
                    AbstractC2417sH.c("Expected BringIntoViewRequester to not be used before parents are placed.");
                }
                return t00H0.h(c1891mm.L0(t00H0, c1891mm.G) ^ (-9223372034707292160L));
            case 1:
                C0321Mk c0321Mk = (C0321Mk) this.m;
                C0603Xg c0603Xg = (C0603Xg) this.n;
                C0982d90 c0982d90 = (C0982d90) this.f193o;
                C0166Gk c0166Gk = c0321Mk.L;
                C0603Xg c0603Xg2 = c0166Gk.b;
                try {
                    c0166Gk.b = c0603Xg;
                    C0982d90 c0982d902 = c0321Mk.F;
                    int[] iArr = c0321Mk.n;
                    IQ iq = c0321Mk.u;
                    c0321Mk.n = null;
                    c0321Mk.u = null;
                    try {
                        c0321Mk.F = c0982d90;
                        boolean z = c0166Gk.e;
                        try {
                            c0166Gk.e = false;
                            throw null;
                        } catch (Throwable th) {
                            c0166Gk.e = z;
                            throw th;
                        }
                    } catch (Throwable th2) {
                        c0321Mk.F = c0982d902;
                        c0321Mk.n = iArr;
                        c0321Mk.u = iq;
                        throw th2;
                    }
                } catch (Throwable th3) {
                    c0166Gk.b = c0603Xg2;
                    throw th3;
                }
            case 2:
                C1891mm c1891mm2 = (C1891mm) this.m;
                C1217fi0 c1217fi0 = (C1217fi0) this.n;
                InterfaceC0419Qe interfaceC0419Qe = (InterfaceC0419Qe) this.f193o;
                OD od = c1891mm2.C;
                while (true) {
                    C1479iR c1479iR = (C1479iR) od.m;
                    int i = c1479iR.n;
                    oh0 = Oh0.a;
                    if (i != 0) {
                        if (i == 0) {
                            throw new NoSuchElementException("MutableVector is empty.");
                        }
                        T00 t00 = (T00) ((C1796lm) c1479iR.l[i - 1]).a.a();
                        if (t00 == null ? true : c1891mm2.J0(t00, c1891mm2.G)) {
                            C1479iR c1479iR2 = (C1479iR) od.m;
                            ((C1796lm) c1479iR2.k(c1479iR2.n - 1)).b.resumeWith(oh0);
                        }
                    }
                }
                if (c1891mm2.E) {
                    T00 t00I0 = c1891mm2.I0();
                    if (t00I0 != null && c1891mm2.J0(t00I0, c1891mm2.G)) {
                        c1891mm2.E = false;
                    }
                }
                c1217fi0.e = C1891mm.H0(c1891mm2, interfaceC0419Qe);
                return oh0;
            case 3:
                G2 g2 = (G2) this.m;
                C1365h90 c1365h90 = (C1365h90) this.n;
                IU iu = (IU) this.f193o;
                if (g2 != null) {
                    c1365h90.a(c1365h90.c(g2) - c1365h90.t);
                }
                List listK = AbstractC1155f00.k(c1365h90, null, c1365h90.t, null);
                C0010Ak c0010Ak = (C0010Ak) AbstractC3117zi.k0(listK);
                Integer num = c0010Ak != null ? c0010Ak.a : null;
                List listE = iu.e(num);
                if (num != null && !listE.isEmpty()) {
                    C0010Ak c0010Ak2 = (C0010Ak) AbstractC3117zi.e0(listE);
                    List listC0 = AbstractC3117zi.c0(1, listE);
                    c0010Ak2.getClass();
                    listE = AbstractC3117zi.l0(Collections.singletonList(new C0010Ak(null, num)), listC0);
                }
                return AbstractC3117zi.l0(listK, listE);
            default:
                AbstractC1692kh0.C((InterfaceC0065Cn) this.m, null, new P8((InterfaceC1191fR) this.n, (InterfaceC1191fR) this.f193o, null, 10), 3);
                return Oh0.a;
        }
    }

    public /* synthetic */ C0264Ke(C0321Mk c0321Mk, C0603Xg c0603Xg, C0982d90 c0982d90, AbstractC2047oQ abstractC2047oQ) {
        this.l = 1;
        this.m = c0321Mk;
        this.n = c0603Xg;
        this.f193o = c0982d90;
    }
}
