package o;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.ke0, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C1686ke0 implements Bd0 {
    public final /* synthetic */ int a;
    public boolean b;
    public final /* synthetic */ C2066oe0 c;

    public C1686ke0(C2066oe0 c2066oe0) {
        this.a = 1;
        this.c = c2066oe0;
        this.b = true;
    }

    @Override // o.Bd0
    public final void a() {
        switch (this.a) {
            case 0:
                C2066oe0 c2066oe0 = this.c;
                c2066oe0.r.setValue(null);
                c2066oe0.s.setValue(null);
                c2066oe0.s(true);
                break;
            default:
                h();
                break;
        }
    }

    @Override // o.Bd0
    public final void b() {
        switch (this.a) {
            case 0:
                C2066oe0 c2066oe0 = this.c;
                c2066oe0.r.setValue(null);
                c2066oe0.s.setValue(null);
                c2066oe0.s(true);
                break;
        }
    }

    @Override // o.Bd0
    public final void c(long j) {
        C2066oe0 c2066oe0;
        long j2;
        Oe0 oe0D;
        Oe0 oe0D2;
        switch (this.a) {
            case 0:
                break;
            default:
                C2066oe0 c2066oe02 = this.c;
                MV mv = c2066oe02.r;
                if (c2066oe02.j() && ((EnumC2889xE) mv.getValue()) == null) {
                    mv.setValue(EnumC2889xE.n);
                    c2066oe02.t = -1;
                    this.b = true;
                    c2066oe02.n();
                    MK mk = c2066oe02.d;
                    if (mk == null || (oe0D2 = mk.d()) == null || !oe0D2.c(j)) {
                        c2066oe0 = c2066oe02;
                        j2 = j;
                        MK mk2 = c2066oe0.d;
                        if (mk2 != null && (oe0D = mk2.d()) != null) {
                            int iN = c2066oe0.b.n(oe0D.b(true, j2));
                            C2730ve0 c2730ve0E = C2066oe0.e(c2066oe0.m().a, AbstractC2378rs0.u(iN, iN));
                            c2066oe0.h(false);
                            GE ge = c2066oe0.k;
                            if (ge != null) {
                                ge.a();
                            }
                            c2066oe0.c.g(c2730ve0E);
                            c2066oe0.w = new Ue0(c2730ve0E.b);
                        }
                        this.b = false;
                    } else if (c2066oe02.m().a.m.length() != 0) {
                        c2066oe02.h(false);
                        long jC = C2066oe0.c(c2066oe02, C2730ve0.a(c2066oe02.m(), null, Ue0.b, 5), j, true, false, C0669Zu.V, true);
                        c2066oe0 = c2066oe02;
                        j2 = j;
                        c2066oe0.p = new Ue0(jC);
                    }
                    c2066oe0.p(EnumC3079zE.l);
                    c2066oe0.f663o = j2;
                    c2066oe0.s.setValue(new C1765lT(j2));
                    c2066oe0.q = 0L;
                    break;
                }
                break;
        }
    }

    @Override // o.Bd0
    public final void d() {
        Oe0 oe0D;
        switch (this.a) {
            case 0:
                boolean z = this.b;
                EnumC2889xE enumC2889xE = z ? EnumC2889xE.m : EnumC2889xE.n;
                C2066oe0 c2066oe0 = this.c;
                c2066oe0.r.setValue(enumC2889xE);
                long jA = I50.a(c2066oe0.k(z));
                MK mk = c2066oe0.d;
                if (mk != null && (oe0D = mk.d()) != null) {
                    long jE = oe0D.e(jA);
                    c2066oe0.f663o = jE;
                    c2066oe0.s.setValue(new C1765lT(jE));
                    c2066oe0.q = 0L;
                    c2066oe0.t = -1;
                    MK mk2 = c2066oe0.d;
                    if (mk2 != null) {
                        mk2.q.setValue(Boolean.TRUE);
                    }
                    c2066oe0.s(false);
                    break;
                }
                break;
        }
    }

    @Override // o.Bd0
    public final void e(long j) {
        C2066oe0 c2066oe0;
        Oe0 oe0D;
        long jC;
        switch (this.a) {
            case 0:
                C2066oe0 c2066oe02 = this.c;
                long jE = C1765lT.e(c2066oe02.q, j);
                c2066oe02.q = jE;
                c2066oe02.s.setValue(new C1765lT(C1765lT.e(c2066oe02.f663o, jE)));
                C2066oe0.c(c2066oe02, c2066oe02.m(), c2066oe02.i().a, false, this.b, C0669Zu.X, true);
                c2066oe02.s(false);
                break;
            default:
                C0387Oy c0387Oy = C0669Zu.V;
                C2066oe0 c2066oe03 = this.c;
                if (c2066oe03.j() && c2066oe03.m().a.m.length() != 0) {
                    c2066oe03.q = C1765lT.e(c2066oe03.q, j);
                    MK mk = c2066oe03.d;
                    if (mk == null || (oe0D = mk.d()) == null) {
                        c2066oe0 = c2066oe03;
                    } else {
                        c2066oe03.s.setValue(new C1765lT(C1765lT.e(c2066oe03.f663o, c2066oe03.q)));
                        if (c2066oe03.p != null || oe0D.c(c2066oe03.i().a)) {
                            Ue0 ue0 = c2066oe03.p;
                            int iB = ue0 != null ? (int) (ue0.a >> 32) : oe0D.b(false, c2066oe03.f663o);
                            int iB2 = oe0D.b(false, c2066oe03.i().a);
                            if (c2066oe03.p != null || iB != iB2) {
                                jC = C2066oe0.c(c2066oe03, c2066oe03.m(), c2066oe03.i().a, false, false, c0387Oy, true);
                                c2066oe0 = c2066oe03;
                            }
                        } else {
                            if (c2066oe03.b.n(oe0D.b(true, c2066oe03.f663o)) == c2066oe03.b.n(oe0D.b(true, c2066oe03.i().a))) {
                                c0387Oy = C0669Zu.U;
                            }
                            c2066oe0 = c2066oe03;
                            jC = C2066oe0.c(c2066oe0, c2066oe03.m(), c2066oe03.i().a, false, false, c0387Oy, true);
                        }
                        if (!Ue0.a(jC, c2066oe0.p)) {
                            this.b = false;
                        }
                    }
                    c2066oe0.s(false);
                    break;
                }
                break;
        }
    }

    public void h() {
        C2066oe0 c2066oe0 = this.c;
        c2066oe0.r.setValue(null);
        c2066oe0.s.setValue(null);
        c2066oe0.s(true);
        boolean zC = Ue0.c(c2066oe0.m().b);
        c2066oe0.p(zC ? EnumC3079zE.n : EnumC3079zE.m);
        MK mk = c2066oe0.d;
        if (mk != null) {
            mk.m.setValue(Boolean.valueOf(!zC && AbstractC2841wm0.y(c2066oe0, true)));
        }
        MK mk2 = c2066oe0.d;
        if (mk2 != null) {
            mk2.n.setValue(Boolean.valueOf(!zC && AbstractC2841wm0.y(c2066oe0, false)));
        }
        MK mk3 = c2066oe0.d;
        if (mk3 != null) {
            mk3.f231o.setValue(Boolean.valueOf(zC && AbstractC2841wm0.y(c2066oe0, true)));
        }
        if (this.b) {
            C2066oe0.a(c2066oe0, c2066oe0.p);
        }
        c2066oe0.p = null;
    }

    @Override // o.Bd0
    public final void onCancel() {
        switch (this.a) {
            case 0:
                break;
            default:
                h();
                break;
        }
    }

    public C1686ke0(C2066oe0 c2066oe0, boolean z) {
        this.a = 0;
        this.c = c2066oe0;
        this.b = z;
    }

    private final void f() {
    }

    private final void g() {
    }

    private final void j() {
    }

    private final void i(long j) {
    }
}
