package o;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.lS, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C1764lS extends C2523tS {
    public final LP c;
    public final C1254g2 d;
    public final UM e;
    public AbstractC2239qS f;
    public CX g;
    public boolean h;
    public boolean i;
    public boolean j;

    public C1764lS(LP lp) {
        this.c = lp;
        C1254g2 c1254g2 = new C1254g2(5, false);
        c1254g2.n = new long[2];
        this.d = c1254g2;
        this.e = new UM(2);
        this.i = true;
        this.j = true;
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Removed duplicated region for block: B:159:0x02d2  */
    /* JADX WARN: Type inference failed for: r1v4, types: [java.lang.Object, java.util.List] */
    /* JADX WARN: Type inference failed for: r5v0, types: [o.LP] */
    /* JADX WARN: Type inference failed for: r5v1, types: [o.LP] */
    /* JADX WARN: Type inference failed for: r5v38 */
    /* JADX WARN: Type inference failed for: r5v39, types: [o.LP] */
    /* JADX WARN: Type inference failed for: r5v40, types: [java.lang.Object] */
    /* JADX WARN: Type inference failed for: r5v41 */
    /* JADX WARN: Type inference failed for: r5v42 */
    /* JADX WARN: Type inference failed for: r5v43 */
    /* JADX WARN: Type inference failed for: r5v44 */
    /* JADX WARN: Type inference failed for: r5v45 */
    /* JADX WARN: Type inference failed for: r5v46 */
    /* JADX WARN: Type inference failed for: r5v7, types: [java.lang.Object, java.util.List] */
    /* JADX WARN: Type inference failed for: r6v22 */
    /* JADX WARN: Type inference failed for: r6v6 */
    /* JADX WARN: Type inference failed for: r6v7, types: [int] */
    /* JADX WARN: Type inference failed for: r8v0 */
    /* JADX WARN: Type inference failed for: r8v1 */
    /* JADX WARN: Type inference failed for: r8v15 */
    /* JADX WARN: Type inference failed for: r8v16, types: [o.iR] */
    /* JADX WARN: Type inference failed for: r8v17 */
    /* JADX WARN: Type inference failed for: r8v18 */
    /* JADX WARN: Type inference failed for: r8v19, types: [o.iR] */
    /* JADX WARN: Type inference failed for: r8v21 */
    /* JADX WARN: Type inference failed for: r8v22 */
    /* JADX WARN: Type inference failed for: r8v23 */
    /* JADX WARN: Type inference failed for: r8v24 */
    @Override // o.C2523tS
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final boolean a(o.UM r52, o.InterfaceC1184fK r53, o.C2513tI r54, boolean r55) {
        /*
            Method dump skipped, instructions count: 727
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: o.C1764lS.a(o.UM, o.fK, o.tI, boolean):boolean");
    }

    /* JADX WARN: Type inference failed for: r1v1, types: [java.lang.Object, java.util.Collection, java.util.List] */
    @Override // o.C2523tS
    public final void b(C2513tI c2513tI) {
        super.b(c2513tI);
        CX cx = this.g;
        if (cx == null) {
            return;
        }
        this.h = this.i;
        ?? r1 = cx.a;
        int size = r1.size();
        for (int i = 0; i < size; i++) {
            IX ix = (IX) r1.get(i);
            boolean z = ix.d;
            long j = ix.a;
            boolean zA = c2513tI.a(j);
            boolean z2 = this.i;
            if ((!z && !zA) || (!z && !z2)) {
                this.d.h(j);
            }
        }
        this.i = false;
        this.j = cx.e == 5;
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Type inference failed for: r1v1, types: [o.LP] */
    /* JADX WARN: Type inference failed for: r1v10 */
    /* JADX WARN: Type inference failed for: r1v11 */
    /* JADX WARN: Type inference failed for: r1v12 */
    /* JADX WARN: Type inference failed for: r1v2, types: [o.LP] */
    /* JADX WARN: Type inference failed for: r1v4 */
    /* JADX WARN: Type inference failed for: r1v5, types: [o.LP] */
    /* JADX WARN: Type inference failed for: r1v6, types: [java.lang.Object] */
    /* JADX WARN: Type inference failed for: r1v7 */
    /* JADX WARN: Type inference failed for: r1v8 */
    /* JADX WARN: Type inference failed for: r1v9 */
    /* JADX WARN: Type inference failed for: r3v11 */
    /* JADX WARN: Type inference failed for: r3v12 */
    /* JADX WARN: Type inference failed for: r3v13 */
    /* JADX WARN: Type inference failed for: r3v14 */
    /* JADX WARN: Type inference failed for: r3v2 */
    /* JADX WARN: Type inference failed for: r3v3 */
    /* JADX WARN: Type inference failed for: r3v4 */
    /* JADX WARN: Type inference failed for: r3v5, types: [o.iR] */
    /* JADX WARN: Type inference failed for: r3v6 */
    /* JADX WARN: Type inference failed for: r3v7 */
    /* JADX WARN: Type inference failed for: r3v8, types: [o.iR] */
    public final void c() {
        C1479iR c1479iR = this.a;
        Object[] objArr = c1479iR.l;
        int i = c1479iR.n;
        for (int i2 = 0; i2 < i; i2++) {
            ((C1764lS) objArr[i2]).c();
        }
        AbstractC0561Vq abstractC0561VqI = this.c;
        ?? c1479iR2 = 0;
        while (abstractC0561VqI != 0) {
            if (abstractC0561VqI instanceof LX) {
                ((LX) abstractC0561VqI).a0();
            } else if ((abstractC0561VqI.n & 16) != 0 && (abstractC0561VqI instanceof AbstractC0561Vq)) {
                LP lp = abstractC0561VqI.A;
                int i3 = 0;
                abstractC0561VqI = abstractC0561VqI;
                c1479iR2 = c1479iR2;
                while (lp != null) {
                    if ((lp.n & 16) != 0) {
                        i3++;
                        c1479iR2 = c1479iR2;
                        if (i3 == 1) {
                            abstractC0561VqI = lp;
                        } else {
                            if (c1479iR2 == 0) {
                                c1479iR2 = new C1479iR(new LP[16]);
                            }
                            if (abstractC0561VqI != 0) {
                                c1479iR2.b(abstractC0561VqI);
                                abstractC0561VqI = 0;
                            }
                            c1479iR2.b(lp);
                        }
                    }
                    lp = lp.q;
                    abstractC0561VqI = abstractC0561VqI;
                    c1479iR2 = c1479iR2;
                }
                if (i3 == 1) {
                }
            }
            abstractC0561VqI = AbstractC2539te.i(c1479iR2);
        }
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Type inference failed for: r7v0 */
    /* JADX WARN: Type inference failed for: r7v1, types: [o.LP] */
    /* JADX WARN: Type inference failed for: r7v10 */
    /* JADX WARN: Type inference failed for: r7v11 */
    /* JADX WARN: Type inference failed for: r7v3 */
    /* JADX WARN: Type inference failed for: r7v4, types: [o.LP] */
    /* JADX WARN: Type inference failed for: r7v5, types: [java.lang.Object] */
    /* JADX WARN: Type inference failed for: r7v6 */
    /* JADX WARN: Type inference failed for: r7v7 */
    /* JADX WARN: Type inference failed for: r7v8 */
    /* JADX WARN: Type inference failed for: r7v9 */
    /* JADX WARN: Type inference failed for: r8v0 */
    /* JADX WARN: Type inference failed for: r8v1 */
    /* JADX WARN: Type inference failed for: r8v10 */
    /* JADX WARN: Type inference failed for: r8v11 */
    /* JADX WARN: Type inference failed for: r8v2 */
    /* JADX WARN: Type inference failed for: r8v3, types: [o.iR] */
    /* JADX WARN: Type inference failed for: r8v4 */
    /* JADX WARN: Type inference failed for: r8v5 */
    /* JADX WARN: Type inference failed for: r8v6, types: [o.iR] */
    /* JADX WARN: Type inference failed for: r8v8 */
    /* JADX WARN: Type inference failed for: r8v9 */
    public final boolean d(C2513tI c2513tI) {
        UM um = this.e;
        boolean z = false;
        z = false;
        if (um.g() != 0) {
            LP lp = this.c;
            if (lp.y) {
                CX cx = this.g;
                long j = this.f.n;
                AbstractC0561Vq abstractC0561VqI = lp;
                ?? c1479iR = 0;
                while (abstractC0561VqI != 0) {
                    if (abstractC0561VqI instanceof LX) {
                        ((LX) abstractC0561VqI).Z(cx, DX.n, j);
                    } else if ((abstractC0561VqI.n & 16) != 0 && (abstractC0561VqI instanceof AbstractC0561Vq)) {
                        LP lp2 = abstractC0561VqI.A;
                        int i = 0;
                        abstractC0561VqI = abstractC0561VqI;
                        c1479iR = c1479iR;
                        while (lp2 != null) {
                            if ((lp2.n & 16) != 0) {
                                i++;
                                c1479iR = c1479iR;
                                if (i == 1) {
                                    abstractC0561VqI = lp2;
                                } else {
                                    if (c1479iR == 0) {
                                        c1479iR = new C1479iR(new LP[16]);
                                    }
                                    if (abstractC0561VqI != 0) {
                                        c1479iR.b(abstractC0561VqI);
                                        abstractC0561VqI = 0;
                                    }
                                    c1479iR.b(lp2);
                                }
                            }
                            lp2 = lp2.q;
                            abstractC0561VqI = abstractC0561VqI;
                            c1479iR = c1479iR;
                        }
                        if (i == 1) {
                        }
                    }
                    abstractC0561VqI = AbstractC2539te.i(c1479iR);
                }
                if (lp.y) {
                    C1479iR c1479iR2 = this.a;
                    Object[] objArr = c1479iR2.l;
                    int i2 = c1479iR2.n;
                    for (int i3 = 0; i3 < i2; i3++) {
                        ((C1764lS) objArr[i3]).d(c2513tI);
                    }
                }
                z = true;
            }
        }
        b(c2513tI);
        um.a();
        this.f = null;
        return z;
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Type inference failed for: r0v10 */
    /* JADX WARN: Type inference failed for: r0v11 */
    /* JADX WARN: Type inference failed for: r0v12 */
    /* JADX WARN: Type inference failed for: r0v13 */
    /* JADX WARN: Type inference failed for: r0v2, types: [o.LP] */
    /* JADX WARN: Type inference failed for: r0v3, types: [o.LP] */
    /* JADX WARN: Type inference failed for: r0v5 */
    /* JADX WARN: Type inference failed for: r0v6, types: [o.LP] */
    /* JADX WARN: Type inference failed for: r0v7, types: [java.lang.Object] */
    /* JADX WARN: Type inference failed for: r0v8 */
    /* JADX WARN: Type inference failed for: r0v9 */
    /* JADX WARN: Type inference failed for: r14v10 */
    /* JADX WARN: Type inference failed for: r14v11 */
    /* JADX WARN: Type inference failed for: r14v12 */
    /* JADX WARN: Type inference failed for: r14v13 */
    /* JADX WARN: Type inference failed for: r14v2 */
    /* JADX WARN: Type inference failed for: r14v3 */
    /* JADX WARN: Type inference failed for: r14v4 */
    /* JADX WARN: Type inference failed for: r14v5, types: [o.iR] */
    /* JADX WARN: Type inference failed for: r14v6 */
    /* JADX WARN: Type inference failed for: r14v7 */
    /* JADX WARN: Type inference failed for: r14v8, types: [o.iR] */
    /* JADX WARN: Type inference failed for: r6v0 */
    /* JADX WARN: Type inference failed for: r6v1, types: [o.LP] */
    /* JADX WARN: Type inference failed for: r6v10 */
    /* JADX WARN: Type inference failed for: r6v11, types: [o.LP] */
    /* JADX WARN: Type inference failed for: r6v12, types: [java.lang.Object] */
    /* JADX WARN: Type inference failed for: r6v13 */
    /* JADX WARN: Type inference failed for: r6v14 */
    /* JADX WARN: Type inference failed for: r6v15 */
    /* JADX WARN: Type inference failed for: r6v16 */
    /* JADX WARN: Type inference failed for: r6v17 */
    /* JADX WARN: Type inference failed for: r6v18 */
    /* JADX WARN: Type inference failed for: r7v0 */
    /* JADX WARN: Type inference failed for: r7v1 */
    /* JADX WARN: Type inference failed for: r7v10, types: [o.iR] */
    /* JADX WARN: Type inference failed for: r7v12 */
    /* JADX WARN: Type inference failed for: r7v13 */
    /* JADX WARN: Type inference failed for: r7v14 */
    /* JADX WARN: Type inference failed for: r7v15 */
    /* JADX WARN: Type inference failed for: r7v6 */
    /* JADX WARN: Type inference failed for: r7v7, types: [o.iR] */
    /* JADX WARN: Type inference failed for: r7v8 */
    /* JADX WARN: Type inference failed for: r7v9 */
    public final boolean e(C2513tI c2513tI, boolean z) {
        if (this.e.g() == 0) {
            return false;
        }
        AbstractC0561Vq abstractC0561VqI = this.c;
        if (!abstractC0561VqI.y) {
            return false;
        }
        CX cx = this.g;
        long j = this.f.n;
        AbstractC0561Vq abstractC0561VqI2 = abstractC0561VqI;
        ?? c1479iR = 0;
        while (abstractC0561VqI2 != 0) {
            if (abstractC0561VqI2 instanceof LX) {
                ((LX) abstractC0561VqI2).Z(cx, DX.l, j);
            } else if ((abstractC0561VqI2.n & 16) != 0 && (abstractC0561VqI2 instanceof AbstractC0561Vq)) {
                LP lp = abstractC0561VqI2.A;
                int i = 0;
                abstractC0561VqI2 = abstractC0561VqI2;
                c1479iR = c1479iR;
                while (lp != null) {
                    if ((lp.n & 16) != 0) {
                        i++;
                        c1479iR = c1479iR;
                        if (i == 1) {
                            abstractC0561VqI2 = lp;
                        } else {
                            if (c1479iR == 0) {
                                c1479iR = new C1479iR(new LP[16]);
                            }
                            if (abstractC0561VqI2 != 0) {
                                c1479iR.b(abstractC0561VqI2);
                                abstractC0561VqI2 = 0;
                            }
                            c1479iR.b(lp);
                        }
                    }
                    lp = lp.q;
                    abstractC0561VqI2 = abstractC0561VqI2;
                    c1479iR = c1479iR;
                }
                if (i == 1) {
                }
            }
            abstractC0561VqI2 = AbstractC2539te.i(c1479iR);
        }
        if (abstractC0561VqI.y) {
            C1479iR c1479iR2 = this.a;
            Object[] objArr = c1479iR2.l;
            int i2 = c1479iR2.n;
            for (int i3 = 0; i3 < i2; i3++) {
                ((C1764lS) objArr[i3]).e(c2513tI, z);
            }
        }
        if (abstractC0561VqI.y) {
            ?? c1479iR3 = 0;
            while (abstractC0561VqI != 0) {
                if (abstractC0561VqI instanceof LX) {
                    ((LX) abstractC0561VqI).Z(cx, DX.m, j);
                } else if ((abstractC0561VqI.n & 16) != 0 && (abstractC0561VqI instanceof AbstractC0561Vq)) {
                    LP lp2 = abstractC0561VqI.A;
                    int i4 = 0;
                    abstractC0561VqI = abstractC0561VqI;
                    c1479iR3 = c1479iR3;
                    while (lp2 != null) {
                        if ((lp2.n & 16) != 0) {
                            i4++;
                            c1479iR3 = c1479iR3;
                            if (i4 == 1) {
                                abstractC0561VqI = lp2;
                            } else {
                                if (c1479iR3 == 0) {
                                    c1479iR3 = new C1479iR(new LP[16]);
                                }
                                if (abstractC0561VqI != 0) {
                                    c1479iR3.b(abstractC0561VqI);
                                    abstractC0561VqI = 0;
                                }
                                c1479iR3.b(lp2);
                            }
                        }
                        lp2 = lp2.q;
                        abstractC0561VqI = abstractC0561VqI;
                        c1479iR3 = c1479iR3;
                    }
                    if (i4 == 1) {
                    }
                }
                abstractC0561VqI = AbstractC2539te.i(c1479iR3);
            }
        }
        return true;
    }

    public final void f(long j, UQ uq) {
        C1254g2 c1254g2 = this.d;
        if (c1254g2.d(j) && uq.f(this) < 0) {
            c1254g2.h(j);
            this.e.f(j);
        }
        C1479iR c1479iR = this.a;
        Object[] objArr = c1479iR.l;
        int i = c1479iR.n;
        for (int i2 = 0; i2 < i; i2++) {
            ((C1764lS) objArr[i2]).f(j, uq);
        }
    }

    public final String toString() {
        return "Node(modifierNode=" + this.c + ", children=" + this.a + ", pointerIds=" + this.d + ')';
    }
}
