package o;

import android.graphics.Canvas;
import android.graphics.Paint;
import android.os.Build;
import android.view.ViewParent;
import com.google.android.gms.common.api.Api;
import java.lang.ref.Reference;
import java.lang.ref.ReferenceQueue;
import java.lang.ref.WeakReference;
import java.util.Map;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.qS, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public abstract class AbstractC2239qS extends YM implements InterfaceC1760lO, InterfaceC1184fK, InterfaceC1672kV {
    public static final L20 U;
    public static final C0897cK V;
    public static final float[] W;
    public static final C2616uQ X;
    public static final BP Y;
    public AbstractC2239qS A;
    public AbstractC2239qS B;
    public boolean C;
    public boolean D;
    public OC E;
    public InterfaceC2281qr F;
    public EnumC1280gK G;
    public InterfaceC2329rO I;
    public QQ J;
    public float L;
    public YQ M;
    public C0897cK N;
    public C1082eE O;
    public InterfaceC2923xg P;
    public I3 Q;
    public boolean S;
    public InterfaceC1483iV T;
    public final C2420sK z;
    public float H = 0.8f;
    public long K = 0;
    public final C2144pS R = new C2144pS(this, 1);

    static {
        L20 l20 = new L20();
        l20.m = 1.0f;
        l20.n = 1.0f;
        l20.f203o = 1.0f;
        long j = AbstractC1370hE.a;
        l20.q = j;
        l20.r = j;
        l20.s = 8.0f;
        l20.t = C1690kg0.b;
        l20.u = AbstractC2841wm0.j;
        l20.w = 9205357640488583168L;
        l20.x = AbstractC0752ap.e();
        l20.y = EnumC1280gK.l;
        l20.z = 3;
        U = l20;
        V = new C0897cK();
        W = C1570jO.a();
        X = new C2616uQ(1);
        Y = new BP(2);
    }

    public AbstractC2239qS(C2420sK c2420sK) {
        this.z = c2420sK;
        this.F = c2420sK.I;
        this.G = c2420sK.J;
    }

    public static AbstractC2239qS j1(InterfaceC1184fK interfaceC1184fK) {
        AbstractC2239qS abstractC2239qS;
        C0805bN c0805bN = interfaceC1184fK instanceof C0805bN ? (C0805bN) interfaceC1184fK : null;
        return (c0805bN == null || (abstractC2239qS = c0805bN.l.z) == null) ? (AbstractC2239qS) interfaceC1184fK : abstractC2239qS;
    }

    @Override // o.InterfaceC1184fK
    public final boolean A() {
        return P0().y;
    }

    @Override // o.InterfaceC1672kV
    public final boolean C() {
        return (this.T == null || this.C || !this.z.G()) ? false : true;
    }

    @Override // o.InterfaceC1184fK
    public final void D(float[] fArr) {
        InterfaceC1577jV interfaceC1577jVA = AbstractC2705vK.a(this.z);
        AbstractC2239qS abstractC2239qSJ1 = j1(AbstractC2841wm0.s(this));
        n1(abstractC2239qSJ1, fArr);
        if (interfaceC1577jVA instanceof InterfaceC1665kO) {
            ((C2207q3) ((InterfaceC1665kO) interfaceC1577jVA)).t(fArr);
            return;
        }
        long jB = abstractC2239qSJ1.b(0L);
        if ((9223372034707292159L & jB) != 9205357640488583168L) {
            C1570jO.f(fArr, Float.intBitsToFloat((int) (jB >> 32)), Float.intBitsToFloat((int) (jB & 4294967295L)));
        }
    }

    @Override // o.YM
    public final void D0() {
        a0(this.K, this.L, this.E);
    }

    public final void E0(AbstractC2239qS abstractC2239qS, YQ yq, boolean z) {
        if (abstractC2239qS == this) {
            return;
        }
        AbstractC2239qS abstractC2239qS2 = this.B;
        if (abstractC2239qS2 != null) {
            abstractC2239qS2.E0(abstractC2239qS, yq, z);
        }
        long j = this.K;
        float f = (int) (j >> 32);
        yq.a -= f;
        yq.c -= f;
        float f2 = (int) (j & 4294967295L);
        yq.b -= f2;
        yq.d -= f2;
        InterfaceC1483iV interfaceC1483iV = this.T;
        if (interfaceC1483iV != null) {
            ((C1274gE) interfaceC1483iV).c(yq, true);
            if (this.D && z) {
                long j2 = this.n;
                yq.a(0.0f, 0.0f, (int) (j2 >> 32), (int) (j2 & 4294967295L));
            }
        }
    }

    public final long F0(AbstractC2239qS abstractC2239qS, long j) {
        if (abstractC2239qS == this) {
            return j;
        }
        AbstractC2239qS abstractC2239qS2 = this.B;
        return (abstractC2239qS2 == null || F3.c(abstractC2239qS, abstractC2239qS2)) ? M0(j) : M0(abstractC2239qS2.F0(abstractC2239qS, j));
    }

    public final long G0(long j) {
        float fIntBitsToFloat = Float.intBitsToFloat((int) (j >> 32)) - Y();
        float fIntBitsToFloat2 = Float.intBitsToFloat((int) (j & 4294967295L)) - W();
        float fMax = Math.max(0.0f, fIntBitsToFloat / 2.0f);
        float fMax2 = Math.max(0.0f, fIntBitsToFloat2 / 2.0f);
        return (Float.floatToRawIntBits(fMax2) & 4294967295L) | (Float.floatToRawIntBits(fMax) << 32);
    }

    public final float H0(long j, long j2) {
        if (Y() >= Float.intBitsToFloat((int) (j2 >> 32)) && W() >= Float.intBitsToFloat((int) (j2 & 4294967295L))) {
            return Float.POSITIVE_INFINITY;
        }
        long jG0 = G0(j2);
        float fIntBitsToFloat = Float.intBitsToFloat((int) (jG0 >> 32));
        float fIntBitsToFloat2 = Float.intBitsToFloat((int) (jG0 & 4294967295L));
        float fIntBitsToFloat3 = Float.intBitsToFloat((int) (j >> 32));
        float fMax = Math.max(0.0f, fIntBitsToFloat3 < 0.0f ? -fIntBitsToFloat3 : fIntBitsToFloat3 - Y());
        long jFloatToRawIntBits = (Float.floatToRawIntBits(Math.max(0.0f, Float.intBitsToFloat((int) (j & 4294967295L)) < 0.0f ? -r9 : r9 - W())) & 4294967295L) | (Float.floatToRawIntBits(fMax) << 32);
        if (fIntBitsToFloat > 0.0f || fIntBitsToFloat2 > 0.0f) {
            int i = (int) (jFloatToRawIntBits >> 32);
            if (Float.intBitsToFloat(i) <= fIntBitsToFloat) {
                int i2 = (int) (jFloatToRawIntBits & 4294967295L);
                if (Float.intBitsToFloat(i2) <= fIntBitsToFloat2) {
                    float fIntBitsToFloat4 = Float.intBitsToFloat(i);
                    float fIntBitsToFloat5 = Float.intBitsToFloat(i2);
                    return (fIntBitsToFloat5 * fIntBitsToFloat5) + (fIntBitsToFloat4 * fIntBitsToFloat4);
                }
            }
        }
        return Float.POSITIVE_INFINITY;
    }

    public final void I0(InterfaceC2923xg interfaceC2923xg, C1082eE c1082eE) {
        C1082eE c1082eE2;
        boolean z;
        Canvas canvas;
        boolean z2;
        boolean z3;
        float f;
        InterfaceC1483iV interfaceC1483iV = this.T;
        if (interfaceC1483iV == null) {
            long j = this.K;
            float f2 = (int) (j >> 32);
            float f3 = (int) (j & 4294967295L);
            interfaceC2923xg.j(f2, f3);
            J0(interfaceC2923xg, c1082eE);
            interfaceC2923xg.j(-f2, -f3);
            return;
        }
        C1274gE c1274gE = (C1274gE) interfaceC1483iV;
        C3113zg c3113zg = c1274gE.x;
        c1274gE.g();
        c1274gE.E = c1274gE.l.a.G() > 0.0f;
        C3126zm0 c3126zm0 = c3113zg.m;
        C3126zm0 c3126zm02 = c3113zg.m;
        c3126zm0.Q(interfaceC2923xg);
        c3126zm0.n = c1082eE;
        C1082eE c1082eE3 = c1274gE.l;
        InterfaceC2923xg interfaceC2923xgX = c3126zm02.x();
        C1082eE c1082eE4 = (C1082eE) c3126zm02.n;
        InterfaceC1178fE interfaceC1178fE = c1082eE3.a;
        if (c1082eE3.s) {
            return;
        }
        c1082eE3.a();
        if (!interfaceC1178fE.H()) {
            try {
                c1082eE3.a.d(c1082eE3.b, c1082eE3.c, c1082eE3, c1082eE3.e);
            } catch (Throwable unused) {
            }
        }
        boolean z4 = interfaceC1178fE.G() > 0.0f;
        if (z4) {
            interfaceC2923xgX.t();
        }
        Canvas canvas2 = U2.a;
        T2 t2 = (T2) interfaceC2923xgX;
        Canvas canvas3 = t2.a;
        boolean zIsHardwareAccelerated = canvas3.isHardwareAccelerated();
        if (zIsHardwareAccelerated) {
            c1082eE2 = c1082eE4;
        } else {
            long j2 = c1082eE3.t;
            float f4 = (int) (j2 >> 32);
            float f5 = (int) (j2 & 4294967295L);
            c1082eE2 = c1082eE4;
            long j3 = c1082eE3.u;
            float f6 = ((int) (j3 >> 32)) + f4;
            float f7 = f5 + ((int) (j3 & 4294967295L));
            float fA = interfaceC1178fE.a();
            C0444Rd c0444RdW = interfaceC1178fE.w();
            int iK = interfaceC1178fE.K();
            if (fA < 1.0f || iK != 3 || c0444RdW != null || interfaceC1178fE.u() == 1) {
                Ew0 ew0B = c1082eE3.p;
                if (ew0B == null) {
                    ew0B = AbstractC0662Zn.b();
                    c1082eE3.p = ew0B;
                }
                ew0B.d(fA);
                ew0B.e(iK);
                ew0B.g(c0444RdW);
                f = f4;
                canvas3.saveLayer(f, f5, f6, f7, (Paint) ew0B.b);
            } else {
                canvas3.save();
                f = f4;
            }
            canvas3.translate(f, f5);
            canvas3.concat(interfaceC1178fE.C());
        }
        boolean z5 = !zIsHardwareAccelerated && c1082eE3.w;
        if (z5) {
            interfaceC2923xgX.n();
            F3 f3D = c1082eE3.d();
            if (f3D instanceof SU) {
                InterfaceC2923xg.f(interfaceC2923xgX, ((SU) f3D).l);
            } else if (f3D instanceof TU) {
                O4 o4A = c1082eE3.m;
                if (o4A != null) {
                    o4A.a.rewind();
                } else {
                    o4A = Q4.a();
                    c1082eE3.m = o4A;
                }
                O4.b(o4A, ((TU) f3D).l);
                interfaceC2923xgX.o(o4A);
            } else {
                if (!(f3D instanceof RU)) {
                    throw new C2170pj();
                }
                interfaceC2923xgX.o(((RU) f3D).l);
            }
        }
        if (c1082eE2 != null) {
            C2398s4 c2398s4 = c1082eE2.r;
            if (!c2398s4.a) {
                AbstractC2038oH.a("Only add dependencies during a tracking");
            }
            C0713aR c0713aR = (C0713aR) c2398s4.d;
            if (c0713aR != null) {
                c0713aR.a(c1082eE3);
            } else if (((C1082eE) c2398s4.b) != null) {
                int i = A40.a;
                C0713aR c0713aR2 = new C0713aR();
                c0713aR2.a((C1082eE) c2398s4.b);
                c0713aR2.a(c1082eE3);
                c2398s4.d = c0713aR2;
                c2398s4.b = null;
            } else {
                c2398s4.b = c1082eE3;
            }
            C0713aR c0713aR3 = (C0713aR) c2398s4.e;
            if (c0713aR3 != null) {
                z3 = !c0713aR3.k(c1082eE3);
            } else if (((C1082eE) c2398s4.c) != c1082eE3) {
                z3 = true;
            } else {
                c2398s4.c = null;
                z3 = false;
            }
            if (z3) {
                c1082eE3.q++;
            }
        }
        if (t2.a.isHardwareAccelerated()) {
            z = z4;
            canvas = canvas3;
            z2 = z5;
            interfaceC1178fE.B(interfaceC2923xgX);
        } else {
            C3113zg c3113zg2 = c1082eE3.f506o;
            if (c3113zg2 == null) {
                c3113zg2 = new C3113zg();
                c1082eE3.f506o = c3113zg2;
            }
            C3126zm0 c3126zm03 = c3113zg2.m;
            InterfaceC2281qr interfaceC2281qr = c1082eE3.b;
            EnumC1280gK enumC1280gK = c1082eE3.c;
            long jO = C1884mi0.O(c1082eE3.u);
            C3018yg c3018yg = ((C3113zg) c3126zm03.f831o).l;
            InterfaceC2281qr interfaceC2281qr2 = c3018yg.a;
            EnumC1280gK enumC1280gK2 = c3018yg.b;
            InterfaceC2923xg interfaceC2923xgX2 = c3126zm03.x();
            canvas = canvas3;
            z2 = z5;
            long jD = c3126zm03.D();
            z = z4;
            C1082eE c1082eE5 = (C1082eE) c3126zm03.n;
            c3126zm03.R(interfaceC2281qr);
            c3126zm03.S(enumC1280gK);
            c3126zm03.Q(interfaceC2923xgX);
            c3126zm03.T(jO);
            c3126zm03.n = c1082eE3;
            interfaceC2923xgX.n();
            try {
                c1082eE3.c(c3113zg2);
            } finally {
                interfaceC2923xgX.k();
                c3126zm03.R(interfaceC2281qr2);
                c3126zm03.S(enumC1280gK2);
                c3126zm03.Q(interfaceC2923xgX2);
                c3126zm03.T(jD);
                c3126zm03.n = c1082eE5;
            }
        }
        if (z2) {
            interfaceC2923xgX.k();
        }
        if (z) {
            interfaceC2923xgX.p();
        }
        if (zIsHardwareAccelerated) {
            return;
        }
        canvas.restore();
    }

    public final void J0(InterfaceC2923xg interfaceC2923xg, C1082eE c1082eE) {
        InterfaceC2923xg interfaceC2923xg2;
        C1082eE c1082eE2;
        LP lpQ0 = Q0(4);
        if (lpQ0 == null) {
            e1(interfaceC2923xg, c1082eE);
            return;
        }
        C2420sK c2420sK = this.z;
        c2420sK.getClass();
        C2610uK sharedDrawScope = ((C2207q3) AbstractC2705vK.a(c2420sK)).getSharedDrawScope();
        long jO = C1884mi0.O(this.n);
        sharedDrawScope.getClass();
        C1479iR c1479iR = null;
        while (lpQ0 != null) {
            if (lpQ0 instanceof InterfaceC1905mt) {
                interfaceC2923xg2 = interfaceC2923xg;
                c1082eE2 = c1082eE;
                sharedDrawScope.b(interfaceC2923xg2, jO, this, (InterfaceC1905mt) lpQ0, c1082eE2);
            } else {
                interfaceC2923xg2 = interfaceC2923xg;
                c1082eE2 = c1082eE;
                if ((lpQ0.n & 4) != 0 && (lpQ0 instanceof AbstractC0561Vq)) {
                    int i = 0;
                    for (LP lp = ((AbstractC0561Vq) lpQ0).A; lp != null; lp = lp.q) {
                        if ((lp.n & 4) != 0) {
                            i++;
                            if (i == 1) {
                                lpQ0 = lp;
                            } else {
                                if (c1479iR == null) {
                                    c1479iR = new C1479iR(new LP[16]);
                                }
                                if (lpQ0 != null) {
                                    c1479iR.b(lpQ0);
                                    lpQ0 = null;
                                }
                                c1479iR.b(lp);
                            }
                        }
                    }
                    if (i == 1) {
                    }
                }
                interfaceC2923xg = interfaceC2923xg2;
                c1082eE = c1082eE2;
            }
            lpQ0 = AbstractC2539te.i(c1479iR);
            interfaceC2923xg = interfaceC2923xg2;
            c1082eE = c1082eE2;
        }
    }

    @Override // o.InterfaceC1184fK
    public final long K() {
        return this.n;
    }

    public abstract void K0();

    @Override // o.InterfaceC1184fK
    public final long L(long j) {
        if (!P0().y) {
            AbstractC2133pH.b("LayoutCoordinate operations are only valid when isAttached is true");
        }
        Z0();
        for (AbstractC2239qS abstractC2239qS = this; abstractC2239qS != null; abstractC2239qS = abstractC2239qS.B) {
            j = abstractC2239qS.k1(j);
        }
        return j;
    }

    public final AbstractC2239qS L0(AbstractC2239qS abstractC2239qS) {
        C2420sK c2420sKS = abstractC2239qS.z;
        C2420sK c2420sK = this.z;
        if (c2420sKS == c2420sK) {
            LP lpP0 = abstractC2239qS.P0();
            LP lpP02 = P0();
            if (!lpP02.l.y) {
                AbstractC2133pH.b("visitLocalAncestors called on an unattached node");
            }
            for (LP lp = lpP02.l.p; lp != null; lp = lp.p) {
                if ((lp.n & 2) != 0 && lp == lpP0) {
                    return abstractC2239qS;
                }
            }
            return this;
        }
        while (c2420sKS.z > c2420sK.z) {
            c2420sKS = c2420sKS.s();
        }
        C2420sK c2420sKS2 = c2420sK;
        while (c2420sKS2.z > c2420sKS.z) {
            c2420sKS2 = c2420sKS2.s();
        }
        while (c2420sKS != c2420sKS2) {
            c2420sKS = c2420sKS.s();
            c2420sKS2 = c2420sKS2.s();
            if (c2420sKS == null || c2420sKS2 == null) {
                throw new IllegalArgumentException("layouts are not part of the same hierarchy");
            }
        }
        if (c2420sKS2 != c2420sK) {
            if (c2420sKS != abstractC2239qS.z) {
                return (C2702vH) c2420sKS.N.d;
            }
            return abstractC2239qS;
        }
        return this;
    }

    public final long M0(long j) {
        long j2 = this.K;
        float fIntBitsToFloat = Float.intBitsToFloat((int) (j >> 32)) - ((int) (j2 >> 32));
        long jFloatToRawIntBits = (Float.floatToRawIntBits(Float.intBitsToFloat((int) (j & 4294967295L)) - ((int) (j2 & 4294967295L))) & 4294967295L) | (Float.floatToRawIntBits(fIntBitsToFloat) << 32);
        InterfaceC1483iV interfaceC1483iV = this.T;
        return interfaceC1483iV != null ? ((C1274gE) interfaceC1483iV).d(true, jFloatToRawIntBits) : jFloatToRawIntBits;
    }

    public abstract AbstractC0709aN N0();

    public final long O0() {
        return this.F.T(this.z.K.g());
    }

    public abstract LP P0();

    public final LP Q0(int i) {
        boolean zG = AbstractC2333rS.g(i);
        LP lpP0 = P0();
        if (!zG && (lpP0 = lpP0.p) == null) {
            return null;
        }
        for (LP lpR0 = R0(zG); lpR0 != null && (lpR0.f209o & i) != 0; lpR0 = lpR0.q) {
            if ((lpR0.n & i) != 0) {
                return lpR0;
            }
            if (lpR0 == lpP0) {
                return null;
            }
        }
        return null;
    }

    public final LP R0(boolean z) {
        LP lpP0;
        C0312Mb c0312Mb = this.z.N;
        if (((AbstractC2239qS) c0312Mb.e) == this) {
            return (LP) c0312Mb.g;
        }
        if (!z) {
            AbstractC2239qS abstractC2239qS = this.B;
            if (abstractC2239qS != null) {
                return abstractC2239qS.P0();
            }
            return null;
        }
        AbstractC2239qS abstractC2239qS2 = this.B;
        if (abstractC2239qS2 == null || (lpP0 = abstractC2239qS2.P0()) == null) {
            return null;
        }
        return lpP0.q;
    }

    @Override // o.InterfaceC1184fK
    public final void S(InterfaceC1184fK interfaceC1184fK, float[] fArr) {
        AbstractC2239qS abstractC2239qSJ1 = j1(interfaceC1184fK);
        abstractC2239qSJ1.Z0();
        AbstractC2239qS abstractC2239qSL0 = L0(abstractC2239qSJ1);
        C1570jO.d(fArr);
        abstractC2239qSJ1.n1(abstractC2239qSL0, fArr);
        m1(abstractC2239qSL0, fArr);
    }

    public final void S0(LP lp, InterfaceC2049oS interfaceC2049oS, long j, C1275gF c1275gF, int i, boolean z) {
        if (lp == null) {
            V0(interfaceC2049oS, j, c1275gF, i, z);
            return;
        }
        int i2 = c1275gF.n;
        UQ uq = c1275gF.l;
        c1275gF.b(i2 + 1, uq.b);
        c1275gF.n++;
        uq.a(lp);
        c1275gF.m.a(F3.a(-1.0f, z, false));
        S0(AbstractC1692kh0.f(lp, interfaceC2049oS.b()), interfaceC2049oS, j, c1275gF, i, z);
        c1275gF.n = i2;
    }

    public final void T0(LP lp, InterfaceC2049oS interfaceC2049oS, long j, C1275gF c1275gF, int i, boolean z, float f) throws Throwable {
        if (lp == null) {
            V0(interfaceC2049oS, j, c1275gF, i, z);
            return;
        }
        int i2 = c1275gF.n;
        UQ uq = c1275gF.l;
        c1275gF.b(i2 + 1, uq.b);
        c1275gF.n++;
        uq.a(lp);
        c1275gF.m.a(F3.a(f, z, false));
        d1(AbstractC1692kh0.f(lp, interfaceC2049oS.b()), interfaceC2049oS, j, c1275gF, i, z, f, true);
        c1275gF.n = i2;
    }

    public final void U0(InterfaceC2049oS interfaceC2049oS, long j, C1275gF c1275gF, int i, boolean z) {
        boolean z2;
        boolean z3;
        LP lpQ0 = Q0(interfaceC2049oS.b());
        if (!q1(j)) {
            if (i == 1) {
                float fH0 = H0(j, O0());
                if ((Float.floatToRawIntBits(fH0) & Api.BaseClientBuilder.API_PRIORITY_OTHER) < 2139095040) {
                    if (c1275gF.n != AbstractC0008Ai.R(c1275gF)) {
                        if (YT.r(c1275gF.a(), F3.a(fH0, false, false)) <= 0) {
                            return;
                        }
                    }
                    T0(lpQ0, interfaceC2049oS, j, c1275gF, i, false, fH0);
                    return;
                }
                return;
            }
            return;
        }
        if (lpQ0 == null) {
            V0(interfaceC2049oS, j, c1275gF, i, z);
            return;
        }
        float fIntBitsToFloat = Float.intBitsToFloat((int) (j >> 32));
        float fIntBitsToFloat2 = Float.intBitsToFloat((int) (j & 4294967295L));
        if (fIntBitsToFloat >= 0.0f && fIntBitsToFloat2 >= 0.0f && fIntBitsToFloat < Y() && fIntBitsToFloat2 < W()) {
            S0(lpQ0, interfaceC2049oS, j, c1275gF, i, z);
            return;
        }
        float fH02 = i == 1 ? H0(j, O0()) : Float.POSITIVE_INFINITY;
        if ((Float.floatToRawIntBits(fH02) & Api.BaseClientBuilder.API_PRIORITY_OTHER) < 2139095040) {
            if (c1275gF.n != AbstractC0008Ai.R(c1275gF)) {
                z2 = z;
                if (YT.r(c1275gF.a(), F3.a(fH02, z2, false)) > 0) {
                }
                d1(lpQ0, interfaceC2049oS, j, c1275gF, i, z2, fH02, z3);
            }
            z2 = z;
            z3 = true;
            d1(lpQ0, interfaceC2049oS, j, c1275gF, i, z2, fH02, z3);
        }
        z2 = z;
        z3 = false;
        d1(lpQ0, interfaceC2049oS, j, c1275gF, i, z2, fH02, z3);
    }

    public void V0(InterfaceC2049oS interfaceC2049oS, long j, C1275gF c1275gF, int i, boolean z) {
        AbstractC2239qS abstractC2239qS = this.A;
        if (abstractC2239qS != null) {
            abstractC2239qS.U0(interfaceC2049oS, abstractC2239qS.M0(j), c1275gF, i, z);
        }
    }

    public final void W0() {
        InterfaceC1483iV interfaceC1483iV = this.T;
        if (interfaceC1483iV != null) {
            interfaceC1483iV.invalidate();
            return;
        }
        AbstractC2239qS abstractC2239qS = this.B;
        if (abstractC2239qS != null) {
            abstractC2239qS.W0();
        }
    }

    public final boolean X0() {
        if (this.T != null && this.H <= 0.0f) {
            return true;
        }
        AbstractC2239qS abstractC2239qS = this.B;
        if (abstractC2239qS != null) {
            return abstractC2239qS.X0();
        }
        return false;
    }

    public final long Y0(InterfaceC1184fK interfaceC1184fK, long j) {
        if (interfaceC1184fK instanceof C0805bN) {
            C0805bN c0805bN = (C0805bN) interfaceC1184fK;
            c0805bN.l.z.Z0();
            return c0805bN.c(this, j ^ (-9223372034707292160L)) ^ (-9223372034707292160L);
        }
        AbstractC2239qS abstractC2239qSJ1 = j1(interfaceC1184fK);
        abstractC2239qSJ1.Z0();
        AbstractC2239qS abstractC2239qSL0 = L0(abstractC2239qSJ1);
        while (abstractC2239qSJ1 != abstractC2239qSL0) {
            j = abstractC2239qSJ1.k1(j);
            abstractC2239qSJ1 = abstractC2239qSJ1.B;
        }
        return F0(abstractC2239qSL0, j);
    }

    public final void Z0() {
        this.z.O.b();
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Type inference failed for: r7v10 */
    /* JADX WARN: Type inference failed for: r7v11 */
    /* 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: r7v4 */
    /* JADX WARN: Type inference failed for: r7v5, types: [o.LP] */
    /* JADX WARN: Type inference failed for: r7v7, types: [o.LP] */
    /* JADX WARN: Type inference failed for: r7v8 */
    /* JADX WARN: Type inference failed for: r7v9, types: [java.lang.Object] */
    /* 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, types: [o.iR] */
    /* JADX WARN: Type inference failed for: r8v3 */
    /* 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 void a1() {
        LP lpP0;
        boolean zG = AbstractC2333rS.g(128);
        LP lpR0 = R0(zG);
        if (lpR0 == null || (lpR0.l.f209o & 128) == 0) {
            return;
        }
        AbstractC2220q90 abstractC2220q90O = BP.o();
        OC ocE = abstractC2220q90O != null ? abstractC2220q90O.e() : null;
        AbstractC2220q90 abstractC2220q90Q = BP.q(abstractC2220q90O);
        try {
            if (!zG) {
                lpP0 = P0().p;
                if (lpP0 == null) {
                }
            }
            lpP0 = P0();
            for (LP lpR02 = R0(zG); lpR02 != null; lpR02 = lpR02.q) {
                if ((lpR02.f209o & 128) == 0) {
                    break;
                }
                if ((lpR02.n & 128) != 0) {
                    AbstractC0561Vq abstractC0561VqI = lpR02;
                    ?? c1479iR = 0;
                    while (abstractC0561VqI != 0) {
                        if (abstractC0561VqI instanceof InterfaceC0993dK) {
                            ((InterfaceC0993dK) abstractC0561VqI).v(this.n);
                        } else if ((abstractC0561VqI.n & 128) != 0 && (abstractC0561VqI instanceof AbstractC0561Vq)) {
                            LP lp = abstractC0561VqI.A;
                            int i = 0;
                            abstractC0561VqI = abstractC0561VqI;
                            c1479iR = c1479iR;
                            while (lp != null) {
                                if ((lp.n & 128) != 0) {
                                    i++;
                                    c1479iR = c1479iR;
                                    if (i == 1) {
                                        abstractC0561VqI = lp;
                                    } else {
                                        if (c1479iR == 0) {
                                            c1479iR = new C1479iR(new LP[16]);
                                        }
                                        if (abstractC0561VqI != 0) {
                                            c1479iR.b(abstractC0561VqI);
                                            abstractC0561VqI = 0;
                                        }
                                        c1479iR.b(lp);
                                    }
                                }
                                lp = lp.q;
                                abstractC0561VqI = abstractC0561VqI;
                                c1479iR = c1479iR;
                            }
                            if (i == 1) {
                            }
                        }
                        abstractC0561VqI = AbstractC2539te.i(c1479iR);
                    }
                }
                if (lpR02 == lpP0) {
                    break;
                }
            }
        } finally {
            BP.t(abstractC2220q90O, abstractC2220q90Q, ocE);
        }
    }

    @Override // o.InterfaceC1184fK
    public final long b(long j) {
        if (!P0().y) {
            AbstractC2133pH.b("LayoutCoordinate operations are only valid when isAttached is true");
        }
        return ((C2207q3) AbstractC2705vK.a(this.z)).u(L(j));
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Type inference failed for: r4v0 */
    /* JADX WARN: Type inference failed for: r4v1, types: [o.LP] */
    /* JADX WARN: Type inference failed for: r4v10 */
    /* JADX WARN: Type inference failed for: r4v11 */
    /* JADX WARN: Type inference failed for: r4v3 */
    /* JADX WARN: Type inference failed for: r4v4, types: [o.LP] */
    /* JADX WARN: Type inference failed for: r4v5, types: [java.lang.Object] */
    /* JADX WARN: Type inference failed for: r4v6 */
    /* JADX WARN: Type inference failed for: r4v7 */
    /* JADX WARN: Type inference failed for: r4v8 */
    /* JADX WARN: Type inference failed for: r4v9 */
    /* JADX WARN: Type inference failed for: r5v0 */
    /* JADX WARN: Type inference failed for: r5v1 */
    /* JADX WARN: Type inference failed for: r5v10 */
    /* JADX WARN: Type inference failed for: r5v11 */
    /* JADX WARN: Type inference failed for: r5v2 */
    /* JADX WARN: Type inference failed for: r5v3, types: [o.iR] */
    /* JADX WARN: Type inference failed for: r5v4 */
    /* JADX WARN: Type inference failed for: r5v5 */
    /* JADX WARN: Type inference failed for: r5v6, types: [o.iR] */
    /* JADX WARN: Type inference failed for: r5v8 */
    /* JADX WARN: Type inference failed for: r5v9 */
    public final void b1() {
        boolean zG = AbstractC2333rS.g(128);
        LP lpP0 = P0();
        if (!zG && (lpP0 = lpP0.p) == null) {
            return;
        }
        for (LP lpR0 = R0(zG); lpR0 != null && (lpR0.f209o & 128) != 0; lpR0 = lpR0.q) {
            if ((lpR0.n & 128) != 0) {
                AbstractC0561Vq abstractC0561VqI = lpR0;
                ?? c1479iR = 0;
                while (abstractC0561VqI != 0) {
                    if (abstractC0561VqI instanceof InterfaceC0993dK) {
                        ((InterfaceC0993dK) abstractC0561VqI).p(this);
                    } else if ((abstractC0561VqI.n & 128) != 0 && (abstractC0561VqI instanceof AbstractC0561Vq)) {
                        LP lp = abstractC0561VqI.A;
                        int i = 0;
                        abstractC0561VqI = abstractC0561VqI;
                        c1479iR = c1479iR;
                        while (lp != null) {
                            if ((lp.n & 128) != 0) {
                                i++;
                                c1479iR = c1479iR;
                                if (i == 1) {
                                    abstractC0561VqI = lp;
                                } else {
                                    if (c1479iR == 0) {
                                        c1479iR = new C1479iR(new LP[16]);
                                    }
                                    if (abstractC0561VqI != 0) {
                                        c1479iR.b(abstractC0561VqI);
                                        abstractC0561VqI = 0;
                                    }
                                    c1479iR.b(lp);
                                }
                            }
                            lp = lp.q;
                            abstractC0561VqI = abstractC0561VqI;
                            c1479iR = c1479iR;
                        }
                        if (i == 1) {
                        }
                    }
                    abstractC0561VqI = AbstractC2539te.i(c1479iR);
                }
            }
            if (lpR0 == lpP0) {
                return;
            }
        }
    }

    public final void c1() {
        this.C = true;
        this.R.a();
        h1();
        if (C0704aI.a(this.K, 0L)) {
            return;
        }
        this.z.K();
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Removed duplicated region for block: B:70:0x01b8 A[PHI: r4
      0x01b8: PHI (r4v6 o.iR) = (r4v1 o.iR), (r4v1 o.iR), (r4v8 o.iR) binds: [B:52:0x0183, B:54:0x0187, B:68:0x01b2] A[DONT_GENERATE, DONT_INLINE]] */
    /* JADX WARN: Type inference failed for: r3v0 */
    /* JADX WARN: Type inference failed for: r3v1, types: [o.LP] */
    /* JADX WARN: Type inference failed for: r3v39 */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final void d1(o.LP r21, o.InterfaceC2049oS r22, long r23, o.C1275gF r25, int r26, boolean r27, float r28, boolean r29) throws java.lang.Throwable {
        /*
            Method dump skipped, instructions count: 716
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: o.AbstractC2239qS.d1(o.LP, o.oS, long, o.gF, int, boolean, float, boolean):void");
    }

    @Override // o.InterfaceC2281qr
    public final float e() {
        return this.z.I.e();
    }

    public abstract void e1(InterfaceC2923xg interfaceC2923xg, C1082eE c1082eE);

    public final void f1(long j, float f, OC oc) {
        o1(oc, false);
        boolean zA = C0704aI.a(this.K, j);
        C2420sK c2420sK = this.z;
        if (!zA) {
            ((C2207q3) AbstractC2705vK.a(c2420sK)).L(-4.0f);
            this.K = j;
            c2420sK.O.f773o.g0();
            InterfaceC1483iV interfaceC1483iV = this.T;
            if (interfaceC1483iV != null) {
                ((C1274gE) interfaceC1483iV).e(j);
            } else {
                AbstractC2239qS abstractC2239qS = this.B;
                if (abstractC2239qS != null) {
                    abstractC2239qS.W0();
                }
            }
            c2420sK.K();
            YM.B0(this);
            InterfaceC1577jV interfaceC1577jV = c2420sK.x;
            if (interfaceC1577jV != null) {
                ((C2207q3) interfaceC1577jV).y(c2420sK);
            }
        }
        this.L = f;
        if (!this.v) {
            h0(x0());
        }
        if (this == ((AbstractC2239qS) c2420sK.N.e)) {
            ((C2207q3) AbstractC2705vK.a(c2420sK)).getRectManager().g(c2420sK, !c2420sK.O.f773o.v);
        }
    }

    @Override // o.InterfaceC1184fK
    public final long g(long j) {
        if (!P0().y) {
            AbstractC2133pH.b("LayoutCoordinate operations are only valid when isAttached is true");
        }
        InterfaceC1184fK interfaceC1184fKS = AbstractC2841wm0.s(this);
        C2207q3 c2207q3 = (C2207q3) AbstractC2705vK.a(this.z);
        c2207q3.C();
        return Y0(interfaceC1184fKS, C1765lT.d(C1570jO.b(j, c2207q3.h0), interfaceC1184fKS.L(0L)));
    }

    public final void g1(YQ yq, boolean z, boolean z2) {
        InterfaceC1483iV interfaceC1483iV = this.T;
        if (interfaceC1483iV != null) {
            if (this.D) {
                if (z2) {
                    long jO0 = O0();
                    float fIntBitsToFloat = Float.intBitsToFloat((int) (jO0 >> 32)) / 2.0f;
                    float fIntBitsToFloat2 = Float.intBitsToFloat((int) (jO0 & 4294967295L)) / 2.0f;
                    long j = this.n;
                    yq.a(-fIntBitsToFloat, -fIntBitsToFloat2, ((int) (j >> 32)) + fIntBitsToFloat, ((int) (j & 4294967295L)) + fIntBitsToFloat2);
                } else if (z) {
                    long j2 = this.n;
                    yq.a(0.0f, 0.0f, (int) (j2 >> 32), (int) (j2 & 4294967295L));
                }
                if (yq.b()) {
                    return;
                }
            }
            ((C1274gE) interfaceC1483iV).c(yq, false);
        }
        long j3 = this.K;
        float f = (int) (j3 >> 32);
        yq.a += f;
        yq.c += f;
        float f2 = (int) (j3 & 4294967295L);
        yq.b += f2;
        yq.d += f2;
    }

    @Override // o.InterfaceC2608uI
    public final EnumC1280gK getLayoutDirection() {
        return this.z.J;
    }

    @Override // o.InterfaceC1184fK
    public final T00 h(InterfaceC1184fK interfaceC1184fK, boolean z) {
        if (!P0().y) {
            AbstractC2133pH.b("LayoutCoordinate operations are only valid when isAttached is true");
        }
        if (!interfaceC1184fK.A()) {
            AbstractC2133pH.b("LayoutCoordinates " + interfaceC1184fK + " is not attached!");
        }
        AbstractC2239qS abstractC2239qSJ1 = j1(interfaceC1184fK);
        abstractC2239qSJ1.Z0();
        AbstractC2239qS abstractC2239qSL0 = L0(abstractC2239qSJ1);
        YQ yq = this.M;
        if (yq == null) {
            yq = new YQ();
            this.M = yq;
        }
        yq.a = 0.0f;
        yq.b = 0.0f;
        yq.c = (int) (interfaceC1184fK.K() >> 32);
        yq.d = (int) (interfaceC1184fK.K() & 4294967295L);
        while (abstractC2239qSJ1 != abstractC2239qSL0) {
            abstractC2239qSJ1.g1(yq, z, false);
            if (yq.b()) {
                return T00.e;
            }
            abstractC2239qSJ1 = abstractC2239qSJ1.B;
        }
        E0(abstractC2239qSL0, yq, z);
        return new T00(yq.a, yq.b, yq.c, yq.d);
    }

    public final void h1() {
        if (this.T != null) {
            o1(null, false);
            this.z.P(false);
        }
    }

    @Override // o.InterfaceC1184fK
    public final long i(long j) {
        long jL = L(j);
        C2207q3 c2207q3 = (C2207q3) AbstractC2705vK.a(this.z);
        c2207q3.C();
        return C1570jO.b(jL, c2207q3.g0);
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Type inference failed for: r8v0 */
    /* JADX WARN: Type inference failed for: r8v1, types: [o.LP] */
    /* JADX WARN: Type inference failed for: r8v12 */
    /* JADX WARN: Type inference failed for: r8v13 */
    /* JADX WARN: Type inference failed for: r8v3 */
    /* JADX WARN: Type inference failed for: r8v4, types: [o.LP] */
    /* JADX WARN: Type inference failed for: r8v5, types: [java.lang.Object] */
    /* JADX WARN: Type inference failed for: r8v6 */
    /* JADX WARN: Type inference failed for: r8v7 */
    /* JADX WARN: Type inference failed for: r8v8 */
    /* JADX WARN: Type inference failed for: r8v9 */
    /* JADX WARN: Type inference failed for: r9v13 */
    /* JADX WARN: Type inference failed for: r9v14 */
    /* JADX WARN: Type inference failed for: r9v15 */
    /* JADX WARN: Type inference failed for: r9v16 */
    /* JADX WARN: Type inference failed for: r9v2 */
    /* JADX WARN: Type inference failed for: r9v3 */
    /* JADX WARN: Type inference failed for: r9v4 */
    /* JADX WARN: Type inference failed for: r9v5, types: [o.iR] */
    /* JADX WARN: Type inference failed for: r9v6 */
    /* JADX WARN: Type inference failed for: r9v7 */
    /* JADX WARN: Type inference failed for: r9v8, types: [o.iR] */
    public final void i1(InterfaceC2329rO interfaceC2329rO) {
        AbstractC2239qS abstractC2239qS;
        InterfaceC2329rO interfaceC2329rO2 = this.I;
        if (interfaceC2329rO != interfaceC2329rO2) {
            this.I = interfaceC2329rO;
            C2420sK c2420sK = this.z;
            int i = 0;
            if (interfaceC2329rO2 == null || interfaceC2329rO.e() != interfaceC2329rO2.e() || interfaceC2329rO.c() != interfaceC2329rO2.c()) {
                int iE = interfaceC2329rO.e();
                int iC = interfaceC2329rO.c();
                InterfaceC1483iV interfaceC1483iV = this.T;
                if (interfaceC1483iV != null) {
                    ((C1274gE) interfaceC1483iV).f((iE << 32) | (iC & 4294967295L));
                } else if (c2420sK.H() && (abstractC2239qS = this.B) != null) {
                    abstractC2239qS.W0();
                }
                b0((iC & 4294967295L) | (iE << 32));
                if (this.E != null) {
                    p1(false);
                }
                boolean zG = AbstractC2333rS.g(4);
                LP lpP0 = P0();
                if (zG || (lpP0 = lpP0.p) != null) {
                    for (LP lpR0 = R0(zG); lpR0 != null && (lpR0.f209o & 4) != 0; lpR0 = lpR0.q) {
                        if ((lpR0.n & 4) != 0) {
                            AbstractC0561Vq abstractC0561VqI = lpR0;
                            ?? c1479iR = 0;
                            while (abstractC0561VqI != 0) {
                                if (abstractC0561VqI instanceof InterfaceC1905mt) {
                                    ((InterfaceC1905mt) abstractC0561VqI).h0();
                                } else if ((abstractC0561VqI.n & 4) != 0 && (abstractC0561VqI instanceof AbstractC0561Vq)) {
                                    LP lp = abstractC0561VqI.A;
                                    int i2 = 0;
                                    abstractC0561VqI = abstractC0561VqI;
                                    c1479iR = c1479iR;
                                    while (lp != null) {
                                        if ((lp.n & 4) != 0) {
                                            i2++;
                                            c1479iR = c1479iR;
                                            if (i2 == 1) {
                                                abstractC0561VqI = lp;
                                            } else {
                                                if (c1479iR == 0) {
                                                    c1479iR = new C1479iR(new LP[16]);
                                                }
                                                if (abstractC0561VqI != 0) {
                                                    c1479iR.b(abstractC0561VqI);
                                                    abstractC0561VqI = 0;
                                                }
                                                c1479iR.b(lp);
                                            }
                                        }
                                        lp = lp.q;
                                        abstractC0561VqI = abstractC0561VqI;
                                        c1479iR = c1479iR;
                                    }
                                    if (i2 == 1) {
                                    }
                                }
                                abstractC0561VqI = AbstractC2539te.i(c1479iR);
                            }
                        }
                        if (lpR0 == lpP0) {
                            break;
                        }
                    }
                }
                InterfaceC1577jV interfaceC1577jV = c2420sK.x;
                if (interfaceC1577jV != null) {
                    ((C2207q3) interfaceC1577jV).y(c2420sK);
                }
            }
            QQ qq = this.J;
            if ((qq == null || qq.e == 0) && interfaceC2329rO.a().isEmpty()) {
                return;
            }
            QQ qq2 = this.J;
            Map mapA = interfaceC2329rO.a();
            if (qq2 != null && qq2.e == mapA.size()) {
                Object[] objArr = qq2.b;
                int[] iArr = qq2.c;
                long[] jArr = qq2.a;
                int length = jArr.length - 2;
                if (length < 0) {
                    return;
                }
                int i3 = 0;
                loop0: while (true) {
                    long j = jArr[i3];
                    if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
                        int i4 = 8 - ((~(i3 - length)) >>> 31);
                        for (int i5 = i; i5 < i4; i5++) {
                            if ((255 & j) < 128) {
                                int i6 = (i3 << 3) + i5;
                                Object obj = objArr[i6];
                                int i7 = iArr[i6];
                                Integer num = (Integer) mapA.get((AbstractC2679v2) obj);
                                if (num == null || num.intValue() != i7) {
                                    break loop0;
                                }
                            }
                            j >>= 8;
                        }
                        if (i4 != 8) {
                            return;
                        }
                    }
                    if (i3 == length) {
                        return;
                    }
                    i3++;
                    i = 0;
                }
            }
            c2420sK.O.f773o.G.f();
            QQ qq3 = this.J;
            if (qq3 == null) {
                QQ qq4 = AbstractC1097eT.a;
                qq3 = new QQ();
                this.J = qq3;
            }
            qq3.a();
            for (Map.Entry entry : interfaceC2329rO.a().entrySet()) {
                qq3.h(((Number) entry.getValue()).intValue(), entry.getKey());
            }
        }
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Type inference failed for: r4v10 */
    /* JADX WARN: Type inference failed for: r4v11 */
    /* JADX WARN: Type inference failed for: r4v12 */
    /* JADX WARN: Type inference failed for: r4v13 */
    /* JADX WARN: Type inference failed for: r4v2 */
    /* JADX WARN: Type inference failed for: r4v3, types: [o.LP] */
    /* JADX WARN: Type inference failed for: r4v5 */
    /* JADX WARN: Type inference failed for: r4v6, types: [o.LP] */
    /* JADX WARN: Type inference failed for: r4v7, types: [java.lang.Object] */
    /* JADX WARN: Type inference failed for: r4v8 */
    /* JADX WARN: Type inference failed for: r4v9 */
    /* JADX WARN: Type inference failed for: r5v0 */
    /* JADX WARN: Type inference failed for: r5v1 */
    /* JADX WARN: Type inference failed for: r5v10 */
    /* JADX WARN: Type inference failed for: r5v11 */
    /* JADX WARN: Type inference failed for: r5v2 */
    /* JADX WARN: Type inference failed for: r5v3, types: [o.iR] */
    /* JADX WARN: Type inference failed for: r5v4 */
    /* JADX WARN: Type inference failed for: r5v5 */
    /* JADX WARN: Type inference failed for: r5v6, types: [o.iR] */
    /* JADX WARN: Type inference failed for: r5v8 */
    /* JADX WARN: Type inference failed for: r5v9 */
    @Override // o.VW, o.InterfaceC1760lO
    public final Object k() {
        C2420sK c2420sK = this.z;
        if (!c2420sK.N.j(64)) {
            return null;
        }
        P0();
        Object objG0 = null;
        for (LP lp = (Bc0) c2420sK.N.f; lp != null; lp = lp.p) {
            if ((lp.n & 64) != 0) {
                AbstractC0561Vq abstractC0561VqI = lp;
                ?? c1479iR = 0;
                while (abstractC0561VqI != 0) {
                    if (abstractC0561VqI instanceof NV) {
                        objG0 = ((NV) abstractC0561VqI).g0(objG0);
                    } else if ((abstractC0561VqI.n & 64) != 0 && (abstractC0561VqI instanceof AbstractC0561Vq)) {
                        LP lp2 = abstractC0561VqI.A;
                        int i = 0;
                        abstractC0561VqI = abstractC0561VqI;
                        c1479iR = c1479iR;
                        while (lp2 != null) {
                            if ((lp2.n & 64) != 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);
                }
            }
        }
        return objG0;
    }

    public final long k1(long j) {
        InterfaceC1483iV interfaceC1483iV = this.T;
        if (interfaceC1483iV != null) {
            j = ((C1274gE) interfaceC1483iV).d(false, j);
        }
        long j2 = this.K;
        float fIntBitsToFloat = Float.intBitsToFloat((int) (j >> 32)) + ((int) (j2 >> 32));
        float fIntBitsToFloat2 = Float.intBitsToFloat((int) (j & 4294967295L)) + ((int) (j2 & 4294967295L));
        return (Float.floatToRawIntBits(fIntBitsToFloat2) & 4294967295L) | (Float.floatToRawIntBits(fIntBitsToFloat) << 32);
    }

    @Override // o.InterfaceC1184fK
    public final InterfaceC1184fK l() {
        if (!P0().y) {
            AbstractC2133pH.b("LayoutCoordinate operations are only valid when isAttached is true");
        }
        Z0();
        return ((AbstractC2239qS) this.z.N.e).B;
    }

    public final T00 l1() {
        if (P0().y) {
            InterfaceC1184fK interfaceC1184fKS = AbstractC2841wm0.s(this);
            YQ yq = this.M;
            if (yq == null) {
                yq = new YQ();
                this.M = yq;
            }
            long jG0 = G0(O0());
            int i = (int) (jG0 >> 32);
            yq.a = -Float.intBitsToFloat(i);
            int i2 = (int) (jG0 & 4294967295L);
            yq.b = -Float.intBitsToFloat(i2);
            yq.c = Float.intBitsToFloat(i) + Y();
            yq.d = Float.intBitsToFloat(i2) + W();
            for (AbstractC2239qS abstractC2239qS = this; abstractC2239qS != interfaceC1184fKS; abstractC2239qS = abstractC2239qS.B) {
                abstractC2239qS.g1(yq, false, true);
                if (!yq.b()) {
                }
            }
            return new T00(yq.a, yq.b, yq.c, yq.d);
        }
        return T00.e;
    }

    public final void m1(AbstractC2239qS abstractC2239qS, float[] fArr) {
        float[] fArrA;
        if (F3.c(abstractC2239qS, this)) {
            return;
        }
        this.B.m1(abstractC2239qS, fArr);
        if (!C0704aI.a(this.K, 0L)) {
            float[] fArr2 = W;
            C1570jO.d(fArr2);
            long j = this.K;
            C1570jO.f(fArr2, -((int) (j >> 32)), -((int) (j & 4294967295L)));
            C1570jO.e(fArr, fArr2);
        }
        InterfaceC1483iV interfaceC1483iV = this.T;
        if (interfaceC1483iV == null || (fArrA = ((C1274gE) interfaceC1483iV).a()) == null) {
            return;
        }
        C1570jO.e(fArr, fArrA);
    }

    public final void n1(AbstractC2239qS abstractC2239qS, float[] fArr) {
        for (AbstractC2239qS abstractC2239qS2 = this; !F3.c(abstractC2239qS2, abstractC2239qS); abstractC2239qS2 = abstractC2239qS2.B) {
            InterfaceC1483iV interfaceC1483iV = abstractC2239qS2.T;
            if (interfaceC1483iV != null) {
                C1570jO.e(fArr, ((C1274gE) interfaceC1483iV).b());
            }
            if (!C0704aI.a(abstractC2239qS2.K, 0L)) {
                float[] fArr2 = W;
                C1570jO.d(fArr2);
                C1570jO.f(fArr2, (int) (r1 >> 32), (int) (r1 & 4294967295L));
                C1570jO.e(fArr, fArr2);
            }
        }
    }

    @Override // o.YM
    public final YM o0() {
        return this.A;
    }

    public final void o1(OC oc, boolean z) {
        InterfaceC1577jV interfaceC1577jV;
        C1479iR c1479iR;
        Reference referencePoll;
        I3 i3;
        C1479iR c1479iR2;
        Reference referencePoll2;
        Object obj;
        C2420sK c2420sK = this.z;
        boolean z2 = (!z && this.E == oc && F3.c(this.F, c2420sK.I) && this.G == c2420sK.J) ? false : true;
        this.F = c2420sK.I;
        this.G = c2420sK.J;
        boolean zG = c2420sK.G();
        C2144pS c2144pS = this.R;
        if (!zG || oc == null) {
            this.E = null;
            InterfaceC1483iV interfaceC1483iV = this.T;
            if (interfaceC1483iV != null) {
                C1274gE c1274gE = (C1274gE) interfaceC1483iV;
                C2207q3 c2207q3 = c1274gE.n;
                if (!AbstractC1904ms0.o(c1274gE.b())) {
                    c2420sK.K();
                }
                c1274gE.f539o = null;
                c1274gE.p = null;
                c1274gE.r = true;
                if (c1274gE.u) {
                    c1274gE.u = false;
                    c2207q3.w(c1274gE, false);
                }
                InterfaceC0987dE interfaceC0987dE = c1274gE.m;
                if (interfaceC0987dE != null) {
                    interfaceC0987dE.a(c1274gE.l);
                    Gm0 gm0 = c2207q3.F0;
                    do {
                        ReferenceQueue referenceQueue = (ReferenceQueue) gm0.n;
                        c1479iR = (C1479iR) gm0.m;
                        referencePoll = referenceQueue.poll();
                        if (referencePoll != null) {
                            c1479iR.j(referencePoll);
                        }
                    } while (referencePoll != null);
                    c1479iR.b(new WeakReference(c1274gE, (ReferenceQueue) gm0.n));
                    c2207q3.I.remove(c1274gE);
                }
                c2420sK.Q = true;
                c2144pS.a();
                if (P0().y && c2420sK.H() && (interfaceC1577jV = c2420sK.x) != null) {
                    ((C2207q3) interfaceC1577jV).y(c2420sK);
                }
            }
            this.T = null;
            this.S = false;
            return;
        }
        this.E = oc;
        if (this.T != null) {
            if (z2 && p1(true)) {
                c2420sK.K();
                ((C2207q3) AbstractC2705vK.a(c2420sK)).getRectManager().f(c2420sK);
                return;
            }
            return;
        }
        InterfaceC1577jV interfaceC1577jVA = AbstractC2705vK.a(c2420sK);
        I3 i32 = this.Q;
        if (i32 == null) {
            I3 i33 = new I3(4, this, new C2144pS(this, 0));
            this.Q = i33;
            i3 = i33;
        } else {
            i3 = i32;
        }
        C2207q3 c2207q32 = (C2207q3) interfaceC1577jVA;
        Gm0 gm02 = c2207q32.F0;
        do {
            ReferenceQueue referenceQueue2 = (ReferenceQueue) gm02.n;
            c1479iR2 = (C1479iR) gm02.m;
            referencePoll2 = referenceQueue2.poll();
            if (referencePoll2 != null) {
                c1479iR2.j(referencePoll2);
            }
        } while (referencePoll2 != null);
        while (true) {
            int i = c1479iR2.n;
            if (i == 0) {
                obj = null;
                break;
            } else {
                obj = ((Reference) c1479iR2.k(i - 1)).get();
                if (obj != null) {
                    break;
                }
            }
        }
        InterfaceC1483iV c1274gE2 = (InterfaceC1483iV) obj;
        if (c1274gE2 != null) {
            C1274gE c1274gE3 = (C1274gE) c1274gE2;
            InterfaceC0987dE interfaceC0987dE2 = c1274gE3.m;
            if (interfaceC0987dE2 == null) {
                throw AbstractC2462sn.q("currently reuse is only supported when we manage the layer lifecycle");
            }
            if (!c1274gE3.l.s) {
                AbstractC2133pH.a("layer should have been released before reuse");
            }
            c1274gE3.l = interfaceC0987dE2.b();
            c1274gE3.r = false;
            c1274gE3.f539o = i3;
            c1274gE3.p = c2144pS;
            c1274gE3.B = false;
            c1274gE3.C = false;
            c1274gE3.D = true;
            C1570jO.d(c1274gE3.s);
            float[] fArr = c1274gE3.t;
            if (fArr != null) {
                C1570jO.d(fArr);
            }
            c1274gE3.z = C1690kg0.b;
            c1274gE3.E = false;
            long j = Api.BaseClientBuilder.API_PRIORITY_OTHER;
            c1274gE3.q = (j & 4294967295L) | (j << 32);
            c1274gE3.A = null;
            c1274gE3.y = 0;
        } else {
            c1274gE2 = new C1274gE(c2207q32.getGraphicsContext().b(), c2207q32.getGraphicsContext(), c2207q32, i3, c2144pS);
        }
        C1274gE c1274gE4 = (C1274gE) c1274gE2;
        c1274gE4.f(this.n);
        c1274gE4.e(this.K);
        this.T = c1274gE2;
        p1(true);
        c2420sK.Q = true;
        c2144pS.a();
    }

    @Override // o.InterfaceC1184fK
    public final long p(InterfaceC1184fK interfaceC1184fK, long j) {
        return Y0(interfaceC1184fK, j);
    }

    public final boolean p1(boolean z) {
        C2420sK c2420sK;
        boolean z2;
        InterfaceC1577jV interfaceC1577jV;
        NC nc;
        NC nc2;
        InterfaceC1483iV interfaceC1483iV = this.T;
        if (interfaceC1483iV == null) {
            if (this.E == null) {
                return false;
            }
            AbstractC2133pH.b("null layer with a non-null layerBlock");
            return false;
        }
        OC oc = this.E;
        if (oc == null) {
            throw AbstractC2462sn.q("updateLayerParameters requires a non-null layerBlock");
        }
        L20 l20 = U;
        l20.d(1.0f);
        l20.g(1.0f);
        l20.a(1.0f);
        l20.h(0.0f);
        long j = AbstractC1370hE.a;
        l20.b(j);
        l20.j(j);
        if (l20.s != 8.0f) {
            l20.l |= 2048;
            l20.s = 8.0f;
        }
        long j2 = C1690kg0.b;
        l20.k(j2);
        l20.i(AbstractC2841wm0.j);
        l20.c(false);
        if (l20.z != 3) {
            l20.l |= 524288;
            l20.z = 3;
        }
        l20.w = 9205357640488583168L;
        l20.A = null;
        l20.l = 0;
        C2420sK c2420sK2 = this.z;
        l20.x = c2420sK2.I;
        l20.y = c2420sK2.J;
        l20.w = C1884mi0.O(this.n);
        ((C2207q3) AbstractC2705vK.a(c2420sK2)).getSnapshotObserver().a(this, C2291qw.y, new U4(18, oc));
        C0897cK c0897cK = this.N;
        if (c0897cK == null) {
            c0897cK = new C0897cK();
            this.N = c0897cK;
        }
        C0897cK c0897cK2 = V;
        c0897cK2.getClass();
        c0897cK2.a = c0897cK.a;
        c0897cK2.b = c0897cK.b;
        c0897cK2.c = c0897cK.c;
        c0897cK2.d = c0897cK.d;
        float f = l20.m;
        c0897cK.a = f;
        c0897cK.b = l20.n;
        c0897cK.c = l20.s;
        long j3 = l20.t;
        c0897cK.d = j3;
        C1274gE c1274gE = (C1274gE) interfaceC1483iV;
        C2207q3 c2207q3 = c1274gE.n;
        int i = l20.l | c1274gE.y;
        c1274gE.w = l20.y;
        c1274gE.v = l20.x;
        int i2 = i & 4096;
        if (i2 != 0) {
            c1274gE.z = j3;
        }
        if ((i & 1) != 0) {
            InterfaceC1178fE interfaceC1178fE = c1274gE.l.a;
            if (interfaceC1178fE.e() != f) {
                interfaceC1178fE.n(f);
            }
        }
        if ((i & 2) != 0) {
            C1082eE c1082eE = c1274gE.l;
            float f2 = l20.n;
            InterfaceC1178fE interfaceC1178fE2 = c1082eE.a;
            if (interfaceC1178fE2.I() != f2) {
                interfaceC1178fE2.A(f2);
            }
        }
        if ((i & 4) != 0) {
            C1082eE c1082eE2 = c1274gE.l;
            float f3 = l20.f203o;
            InterfaceC1178fE interfaceC1178fE3 = c1082eE2.a;
            if (interfaceC1178fE3.a() != f3) {
                interfaceC1178fE3.c(f3);
            }
        }
        if ((i & 8) != 0) {
            InterfaceC1178fE interfaceC1178fE4 = c1274gE.l.a;
            if (interfaceC1178fE4.r() != 0.0f) {
                interfaceC1178fE4.s();
            }
        }
        if ((i & 16) != 0) {
            InterfaceC1178fE interfaceC1178fE5 = c1274gE.l.a;
            if (interfaceC1178fE5.g() != 0.0f) {
                interfaceC1178fE5.h();
            }
        }
        if ((i & 32) != 0) {
            C1082eE c1082eE3 = c1274gE.l;
            float f4 = l20.p;
            InterfaceC1178fE interfaceC1178fE6 = c1082eE3.a;
            if (interfaceC1178fE6.G() != f4) {
                interfaceC1178fE6.f(f4);
                c1082eE3.g = true;
                c1082eE3.a();
            }
            if (l20.p > 0.0f && !c1274gE.E && (nc2 = c1274gE.p) != null) {
                nc2.a();
            }
        }
        if ((i & 64) != 0) {
            C1082eE c1082eE4 = c1274gE.l;
            long j4 = l20.q;
            InterfaceC1178fE interfaceC1178fE7 = c1082eE4.a;
            c2420sK = c2420sK2;
            if (!C0190Hi.c(j4, interfaceC1178fE7.M())) {
                interfaceC1178fE7.k(j4);
            }
        } else {
            c2420sK = c2420sK2;
        }
        if ((i & 128) != 0) {
            C1082eE c1082eE5 = c1274gE.l;
            long j5 = l20.r;
            InterfaceC1178fE interfaceC1178fE8 = c1082eE5.a;
            if (!C0190Hi.c(j5, interfaceC1178fE8.j())) {
                interfaceC1178fE8.z(j5);
            }
        }
        if ((i & 1024) != 0) {
            InterfaceC1178fE interfaceC1178fE9 = c1274gE.l.a;
            if (interfaceC1178fE9.J() != 0.0f) {
                interfaceC1178fE9.y();
            }
        }
        if ((i & 256) != 0) {
            InterfaceC1178fE interfaceC1178fE10 = c1274gE.l.a;
            if (interfaceC1178fE10.v() != 0.0f) {
                interfaceC1178fE10.b();
            }
        }
        if ((i & 512) != 0) {
            InterfaceC1178fE interfaceC1178fE11 = c1274gE.l.a;
            if (interfaceC1178fE11.E() != 0.0f) {
                interfaceC1178fE11.i();
            }
        }
        if ((i & 2048) != 0) {
            C1082eE c1082eE6 = c1274gE.l;
            float f5 = l20.s;
            InterfaceC1178fE interfaceC1178fE12 = c1082eE6.a;
            if (interfaceC1178fE12.p() != f5) {
                interfaceC1178fE12.F(f5);
            }
        }
        if (i2 != 0) {
            if (C1690kg0.a(c1274gE.z, j2)) {
                C1082eE c1082eE7 = c1274gE.l;
                if (!C1765lT.b(c1082eE7.v, 9205357640488583168L)) {
                    c1082eE7.v = 9205357640488583168L;
                    c1082eE7.a.L(9205357640488583168L);
                }
            } else {
                C1082eE c1082eE8 = c1274gE.l;
                long jFloatToRawIntBits = (Float.floatToRawIntBits(C1690kg0.c(c1274gE.z) * ((int) (c1274gE.q & 4294967295L))) & 4294967295L) | (Float.floatToRawIntBits(C1690kg0.b(c1274gE.z) * ((int) (c1274gE.q >> 32))) << 32);
                if (!C1765lT.b(c1082eE8.v, jFloatToRawIntBits)) {
                    c1082eE8.v = jFloatToRawIntBits;
                    c1082eE8.a.L(jFloatToRawIntBits);
                }
            }
        }
        if ((i & 16384) != 0) {
            C1082eE c1082eE9 = c1274gE.l;
            boolean z3 = l20.v;
            if (c1082eE9.w != z3) {
                c1082eE9.w = z3;
                c1082eE9.g = true;
                c1082eE9.a();
            }
        }
        if ((131072 & i) != 0) {
            InterfaceC1178fE interfaceC1178fE13 = c1274gE.l.a;
        }
        if ((262144 & i) != 0) {
            InterfaceC1178fE interfaceC1178fE14 = c1274gE.l.a;
            if (!F3.c(interfaceC1178fE14.w(), null)) {
                interfaceC1178fE14.m();
            }
        }
        if ((i & 524288) != 0) {
            C1082eE c1082eE10 = c1274gE.l;
            int i3 = l20.z;
            InterfaceC1178fE interfaceC1178fE15 = c1082eE10.a;
            if (interfaceC1178fE15.K() != i3) {
                interfaceC1178fE15.o(i3);
            }
        }
        if ((32768 & i) != 0) {
            InterfaceC1178fE interfaceC1178fE16 = c1274gE.l.a;
            if (interfaceC1178fE16.u() != 0) {
                interfaceC1178fE16.x(0);
            }
        }
        if ((i & 7963) != 0) {
            c1274gE.B = true;
            c1274gE.C = true;
        }
        if (F3.c(c1274gE.A, l20.A)) {
            z2 = false;
        } else {
            F3 f32 = l20.A;
            c1274gE.A = f32;
            if (f32 != null) {
                C1082eE c1082eE11 = c1274gE.l;
                if (f32 instanceof SU) {
                    T00 t00 = ((SU) f32).l;
                    float f6 = t00.a;
                    float f7 = t00.b;
                    c1082eE11.e(0.0f, (Float.floatToRawIntBits(f6) << 32) | (Float.floatToRawIntBits(f7) & 4294967295L), (Float.floatToRawIntBits(t00.c - f6) << 32) | (Float.floatToRawIntBits(t00.d - f7) & 4294967295L));
                } else if (f32 instanceof RU) {
                    O4 o4 = ((RU) f32).l;
                    c1082eE11.k = null;
                    c1082eE11.i = 9205357640488583168L;
                    c1082eE11.h = 0L;
                    c1082eE11.j = 0.0f;
                    c1082eE11.g = true;
                    c1082eE11.n = false;
                    c1082eE11.l = o4;
                    c1082eE11.a();
                } else {
                    if (!(f32 instanceof TU)) {
                        throw new C2170pj();
                    }
                    TU tu = (TU) f32;
                    O4 o42 = tu.m;
                    if (o42 != null) {
                        c1082eE11.k = null;
                        c1082eE11.i = 9205357640488583168L;
                        c1082eE11.h = 0L;
                        c1082eE11.j = 0.0f;
                        c1082eE11.g = true;
                        c1082eE11.n = false;
                        c1082eE11.l = o42;
                        c1082eE11.a();
                    } else {
                        c1082eE11.e(Float.intBitsToFloat((int) (tu.l.h >> 32)), (Float.floatToRawIntBits(r8.a) << 32) | (Float.floatToRawIntBits(r8.b) & 4294967295L), (Float.floatToRawIntBits(r8.b()) << 32) | (Float.floatToRawIntBits(r8.a()) & 4294967295L));
                    }
                }
                if ((f32 instanceof RU) && Build.VERSION.SDK_INT < 33 && (nc = c1274gE.p) != null) {
                    nc.a();
                }
            }
            z2 = true;
        }
        c1274gE.y = l20.l;
        if (i != 0 || z2) {
            if (Build.VERSION.SDK_INT >= 26) {
                ViewParent parent = c2207q3.getParent();
                if (parent != null) {
                    parent.onDescendantInvalidated(c2207q3, c2207q3);
                }
            } else {
                c2207q3.invalidate();
            }
            if (c2207q3.q) {
                c2207q3.L(0.0f);
            }
        }
        boolean z4 = this.D;
        this.D = l20.v;
        this.H = l20.f203o;
        boolean z5 = c0897cK2.a == c0897cK.a && c0897cK2.b == c0897cK.b && c0897cK2.c == c0897cK.c && C1690kg0.a(c0897cK2.d, c0897cK.d);
        boolean z6 = !z5;
        if (z && ((!z5 || z4 != this.D) && (interfaceC1577jV = c2420sK.x) != null)) {
            ((C2207q3) interfaceC1577jV).y(c2420sK);
        }
        return z6;
    }

    @Override // o.InterfaceC2281qr
    public final float q() {
        return this.z.I.q();
    }

    /* JADX WARN: Removed duplicated region for block: B:61:0x0180  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final boolean q1(long r26) {
        /*
            Method dump skipped, instructions count: 439
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: o.AbstractC2239qS.q1(long):boolean");
    }

    @Override // o.InterfaceC1184fK
    public final long v(long j) {
        if (!P0().y) {
            AbstractC2133pH.b("LayoutCoordinate operations are only valid when isAttached is true");
        }
        return Y0(AbstractC2841wm0.s(this), ((C2207q3) AbstractC2705vK.a(this.z)).G(j));
    }

    @Override // o.YM
    public final boolean v0() {
        return this.I != null;
    }

    @Override // o.YM
    public final C2420sK w0() {
        return this.z;
    }

    @Override // o.YM
    public final InterfaceC2329rO x0() {
        InterfaceC2329rO interfaceC2329rO = this.I;
        if (interfaceC2329rO != null) {
            return interfaceC2329rO;
        }
        throw new IllegalStateException("Asking for measurement result of unmeasured layout modifier");
    }

    @Override // o.YM
    public final YM y0() {
        return this.B;
    }

    @Override // o.YM
    public final long z0() {
        return this.K;
    }

    @Override // o.YM
    public final InterfaceC1184fK p0() {
        return this;
    }
}
