package o;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.k50, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C1642k50 extends AbstractC0561Vq implements InterfaceC0581Wk, InterfaceC1575jT {
    public InterfaceC1547j50 B;
    public OU C;
    public boolean D;
    public KQ E;
    public boolean F;
    public C1734l4 G;
    public C1453i50 H;
    public InterfaceC0535Uq I;
    public C1829m4 J;
    public C1734l4 K;
    public boolean L;

    @Override // o.LP
    public final void A0() {
        InterfaceC0535Uq interfaceC0535Uq = this.I;
        if (interfaceC0535Uq != null) {
            I0(interfaceC0535Uq);
        }
    }

    @Override // o.InterfaceC1575jT
    public final void K() {
        C1829m4 c1829m4 = (C1829m4) AbstractC2461sm0.j(this, AbstractC1387hV.a);
        if (F3.c(c1829m4, this.J)) {
            return;
        }
        this.J = c1829m4;
        this.K = null;
        InterfaceC0535Uq interfaceC0535Uq = this.I;
        if (interfaceC0535Uq != null) {
            I0(interfaceC0535Uq);
        }
        this.I = null;
        K0();
        C1453i50 c1453i50 = this.H;
        if (c1453i50 != null) {
            InterfaceC1547j50 interfaceC1547j50 = this.B;
            OU ou = this.C;
            c1453i50.O0(this.F ? this.K : this.G, this.E, ou, interfaceC1547j50, this.D, this.L);
        }
    }

    public final void K0() {
        InterfaceC0535Uq interfaceC0535Uq = this.I;
        if (interfaceC0535Uq != null) {
            if (((LP) interfaceC0535Uq).l.y) {
                return;
            }
            H0(interfaceC0535Uq);
            return;
        }
        if (this.F) {
            AbstractC2841wm0.A(this, new C1164f5(17, this));
        }
        C1734l4 c1734l4 = this.F ? this.K : this.G;
        if (c1734l4 != null) {
            AbstractC0561Vq abstractC0561Vq = c1734l4.i;
            if (abstractC0561Vq.l.y) {
                return;
            }
            H0(abstractC0561Vq);
            this.I = abstractC0561Vq;
        }
    }

    public final boolean L0() {
        return (this.y ? AbstractC2539te.S(this).J : EnumC1280gK.l) != EnumC1280gK.m || this.C == OU.l;
    }

    public final void M0(C1734l4 c1734l4, KQ kq, OU ou, InterfaceC1547j50 interfaceC1547j50, boolean z, boolean z2) {
        boolean z3;
        this.B = interfaceC1547j50;
        this.C = ou;
        boolean z4 = true;
        if (this.F != z) {
            this.F = z;
            z3 = true;
        } else {
            z3 = false;
        }
        if (F3.c(this.G, c1734l4)) {
            z4 = false;
        } else {
            this.G = c1734l4;
        }
        if (z3 || (z4 && !z)) {
            InterfaceC0535Uq interfaceC0535Uq = this.I;
            if (interfaceC0535Uq != null) {
                I0(interfaceC0535Uq);
            }
            this.I = null;
            K0();
        }
        this.D = z2;
        this.E = kq;
        boolean zL0 = L0();
        this.L = zL0;
        C1453i50 c1453i50 = this.H;
        if (c1453i50 != null) {
            c1453i50.O0(this.F ? this.K : this.G, kq, ou, interfaceC1547j50, z2, zL0);
        }
    }

    @Override // o.InterfaceC0535Uq
    public final void p0() {
        boolean zL0 = L0();
        if (this.L != zL0) {
            this.L = zL0;
            InterfaceC1547j50 interfaceC1547j50 = this.B;
            OU ou = this.C;
            boolean z = this.F;
            M0(z ? this.K : this.G, this.E, ou, interfaceC1547j50, z, this.D);
        }
    }

    @Override // o.LP
    public final boolean w0() {
        return false;
    }

    @Override // o.LP
    public final void z0() {
        this.L = L0();
        K0();
        if (this.H == null) {
            InterfaceC1547j50 interfaceC1547j50 = this.B;
            C1453i50 c1453i50 = new C1453i50(this.F ? this.K : this.G, this.E, this.C, interfaceC1547j50, this.D, this.L);
            H0(c1453i50);
            this.H = c1453i50;
        }
    }
}
