package I0;

import C0.C0104e;
import G0.InterfaceC0245a0;
import J0.j1;
import androidx.compose.runtime.ComposeNodeLifecycleCallback;
import androidx.compose.runtime.CompositionLocalMap;
import androidx.compose.runtime.MutableState;
import androidx.compose.runtime.collection.MutableVector;
import androidx.compose.runtime.tooling.CompositionErrorContext;
import androidx.compose.runtime.tooling.CompositionErrorContextKt;
import h1.C2069a;
import i0.AbstractC2254r;
import i0.C2249m;
import i0.C2252p;
import i0.InterfaceC2253q;
import i0.InterfaceC2255s;
import j0.C2306c;
import java.util.List;
import k1.C2373c;
import n.C2567B;
import p0.InterfaceC2712s;
import q.AbstractC2761L;

/* JADX INFO: loaded from: classes.dex */
public final class H implements ComposeNodeLifecycleCallback, G0.s0, u0, Q0.o, InterfaceC0295h, s0 {

    /* JADX INFO: renamed from: V, reason: collision with root package name */
    public static final C f2151V = new C("Undefined intrinsics block and it is required");

    /* JADX INFO: renamed from: W, reason: collision with root package name */
    public static final B f2152W = new B();
    public static final C1.c X = new C1.c(3);

    /* JADX INFO: renamed from: A, reason: collision with root package name */
    public InterfaceC0245a0 f2153A;

    /* JADX INFO: renamed from: B, reason: collision with root package name */
    public T.p f2154B;

    /* JADX INFO: renamed from: C, reason: collision with root package name */
    public h1.c f2155C;

    /* JADX INFO: renamed from: D, reason: collision with root package name */
    public h1.m f2156D;

    /* JADX INFO: renamed from: E, reason: collision with root package name */
    public j1 f2157E;

    /* JADX INFO: renamed from: F, reason: collision with root package name */
    public CompositionLocalMap f2158F;

    /* JADX INFO: renamed from: G, reason: collision with root package name */
    public F f2159G;

    /* JADX INFO: renamed from: H, reason: collision with root package name */
    public F f2160H;

    /* JADX INFO: renamed from: I, reason: collision with root package name */
    public boolean f2161I;

    /* JADX INFO: renamed from: J, reason: collision with root package name */
    public final C0290e0 f2162J;

    /* JADX INFO: renamed from: K, reason: collision with root package name */
    public final L f2163K;

    /* JADX INFO: renamed from: L, reason: collision with root package name */
    public G0.W f2164L;

    /* JADX INFO: renamed from: M, reason: collision with root package name */
    public AbstractC0300j0 f2165M;

    /* JADX INFO: renamed from: N, reason: collision with root package name */
    public boolean f2166N;

    /* JADX INFO: renamed from: O, reason: collision with root package name */
    public InterfaceC2255s f2167O;

    /* JADX INFO: renamed from: P, reason: collision with root package name */
    public InterfaceC2255s f2168P;

    /* JADX INFO: renamed from: Q, reason: collision with root package name */
    public C2373c f2169Q;

    /* JADX INFO: renamed from: R, reason: collision with root package name */
    public C0.L f2170R;

    /* JADX INFO: renamed from: S, reason: collision with root package name */
    public boolean f2171S;

    /* JADX INFO: renamed from: T, reason: collision with root package name */
    public int f2172T;

    /* JADX INFO: renamed from: U, reason: collision with root package name */
    public boolean f2173U;

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final boolean f2174a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public int f2175b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public boolean f2176c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public long f2177d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public long f2178e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public long f2179f;

    /* JADX INFO: renamed from: j, reason: collision with root package name */
    public boolean f2180j;

    /* JADX INFO: renamed from: k, reason: collision with root package name */
    public boolean f2181k;
    public H l;

    /* JADX INFO: renamed from: m, reason: collision with root package name */
    public int f2182m;

    /* JADX INFO: renamed from: n, reason: collision with root package name */
    public final C0284b0 f2183n;

    /* JADX INFO: renamed from: o, reason: collision with root package name */
    public MutableVector f2184o;

    /* JADX INFO: renamed from: p, reason: collision with root package name */
    public boolean f2185p;

    /* JADX INFO: renamed from: q, reason: collision with root package name */
    public H f2186q;

    /* JADX INFO: renamed from: r, reason: collision with root package name */
    public J0.A f2187r;

    /* JADX INFO: renamed from: s, reason: collision with root package name */
    public k1.y f2188s;

    /* JADX INFO: renamed from: t, reason: collision with root package name */
    public int f2189t;

    /* JADX INFO: renamed from: u, reason: collision with root package name */
    public boolean f2190u;

    /* JADX INFO: renamed from: v, reason: collision with root package name */
    public boolean f2191v;

    /* JADX INFO: renamed from: w, reason: collision with root package name */
    public Q0.n f2192w;

    /* JADX INFO: renamed from: x, reason: collision with root package name */
    public boolean f2193x;

    /* JADX INFO: renamed from: y, reason: collision with root package name */
    public final MutableVector f2194y;

    /* JADX INFO: renamed from: z, reason: collision with root package name */
    public boolean f2195z;

    public H(int i6) {
        this((i6 & 1) == 0, Q0.q.f5803a.addAndGet(1));
    }

    public static boolean O(H h5) {
        Y y6 = h5.f2163K.f2227p;
        return h5.N(y6.f2316m ? new C2069a(y6.f2001d) : null);
    }

    public static void T(H h5, boolean z6, int i6) {
        H hT;
        if ((i6 & 1) != 0) {
            z6 = false;
        }
        boolean z7 = (i6 & 2) != 0;
        boolean z8 = (i6 & 4) != 0;
        if (h5.l == null) {
            F0.a.b("Lookahead measure cannot be requested on a node that is not a part of the LookaheadScope");
        }
        J0.A a6 = h5.f2187r;
        if (a6 == null || h5.f2190u || h5.f2174a) {
            return;
        }
        a6.z(h5, true, z6, z7);
        if (z8) {
            U u6 = h5.f2163K.f2228q;
            kotlin.jvm.internal.o.e(u6);
            L l = u6.f2268f;
            H hT2 = l.f2213a.t();
            F f6 = l.f2213a.f2159G;
            if (hT2 == null || f6 == F.f2145c) {
                return;
            }
            while (hT2.f2159G == f6 && (hT = hT2.t()) != null) {
                hT2 = hT;
            }
            int iOrdinal = f6.ordinal();
            if (iOrdinal == 0) {
                if (hT2.l != null) {
                    T(hT2, z6, 6);
                    return;
                } else {
                    V(hT2, z6, 6);
                    return;
                }
            }
            if (iOrdinal != 1) {
                throw new IllegalStateException("Intrinsics isn't used by the parent");
            }
            if (hT2.l != null) {
                hT2.S(z6);
            } else {
                hT2.U(z6);
            }
        }
    }

    public static void V(H h5, boolean z6, int i6) {
        J0.A a6;
        H hT;
        if ((i6 & 1) != 0) {
            z6 = false;
        }
        boolean z7 = (i6 & 2) != 0;
        boolean z8 = (i6 & 4) != 0;
        if (h5.f2190u || h5.f2174a || (a6 = h5.f2187r) == null) {
            return;
        }
        a6.z(h5, false, z6, z7);
        if (z8) {
            L l = h5.f2163K.f2227p.f2313f;
            H hT2 = l.f2213a.t();
            F f6 = l.f2213a.f2159G;
            if (hT2 == null || f6 == F.f2145c) {
                return;
            }
            while (hT2.f2159G == f6 && (hT = hT2.t()) != null) {
                hT2 = hT;
            }
            int iOrdinal = f6.ordinal();
            if (iOrdinal == 0) {
                V(hT2, z6, 6);
            } else {
                if (iOrdinal != 1) {
                    throw new IllegalStateException("Intrinsics isn't used by the parent");
                }
                hT2.U(z6);
            }
        }
    }

    public static void W(H h5) {
        L l = h5.f2163K;
        if (G.f2148a[l.f2216d.ordinal()] != 1) {
            throw new IllegalStateException("Unexpected state " + l.f2216d);
        }
        if (l.f2217e) {
            T(h5, true, 6);
            return;
        }
        if (l.f2218f) {
            h5.S(true);
        }
        if (h5.o()) {
            V(h5, true, 6);
        } else if (h5.n()) {
            h5.U(true);
        }
    }

    private final String h(H h5) {
        StringBuilder sb = new StringBuilder("Cannot insert ");
        sb.append(h5);
        sb.append(" because it already has a parent or an owner. This tree: ");
        sb.append(e(0));
        sb.append(" Other tree: ");
        H h6 = h5.f2186q;
        sb.append(h6 != null ? h6.e(0) : null);
        return sb.toString();
    }

    public final void A() {
        if (this.f2166N) {
            C0290e0 c0290e0 = this.f2162J;
            AbstractC0300j0 abstractC0300j0 = (C0310t) c0290e0.f2362d;
            AbstractC0300j0 abstractC0300j02 = ((AbstractC0300j0) c0290e0.f2363e).f2423t;
            this.f2165M = null;
            while (true) {
                if (kotlin.jvm.internal.o.c(abstractC0300j0, abstractC0300j02)) {
                    break;
                }
                if ((abstractC0300j0 != null ? abstractC0300j0.f2420O : null) != null) {
                    this.f2165M = abstractC0300j0;
                    break;
                }
                abstractC0300j0 = abstractC0300j0 != null ? abstractC0300j0.f2423t : null;
            }
        }
        AbstractC0300j0 abstractC0300j03 = this.f2165M;
        if (abstractC0300j03 != null && abstractC0300j03.f2420O == null) {
            throw com.google.android.recaptcha.internal.a.g("layer was not set");
        }
        if (abstractC0300j03 != null) {
            abstractC0300j03.c1();
            return;
        }
        H hT = t();
        if (hT != null) {
            hT.A();
        }
    }

    public final void B() {
        C0290e0 c0290e0 = this.f2162J;
        AbstractC0300j0 abstractC0300j0 = (AbstractC0300j0) c0290e0.f2363e;
        C0310t c0310t = (C0310t) c0290e0.f2362d;
        while (abstractC0300j0 != c0310t) {
            kotlin.jvm.internal.o.f(abstractC0300j0, "null cannot be cast to non-null type androidx.compose.ui.node.LayoutModifierNodeCoordinator");
            A a6 = (A) abstractC0300j0;
            r0 r0Var = a6.f2420O;
            if (r0Var != null) {
                r0Var.invalidate();
            }
            abstractC0300j0 = a6.f2422s;
        }
        r0 r0Var2 = ((C0310t) c0290e0.f2362d).f2420O;
        if (r0Var2 != null) {
            r0Var2.invalidate();
        }
    }

    public final void C() {
        if (this.f2174a) {
            H hT = t();
            if (hT != null) {
                hT.C();
                return;
            }
            return;
        }
        if (this.l != null) {
            T(this, false, 7);
        } else {
            V(this, false, 7);
        }
    }

    public final void D() {
        if (this.f2193x) {
            return;
        }
        if (((C0288d0) this.f2162J.f2361c).getChild$ui() != null || this.f2168P != null) {
            this.f2191v = true;
            return;
        }
        Q0.n nVar = this.f2192w;
        this.f2193x = true;
        kotlin.jvm.internal.C c6 = new kotlin.jvm.internal.C();
        c6.f20115a = new Q0.n();
        v0 snapshotObserver = ((J0.A) K.a(this)).getSnapshotObserver();
        C0104e c0104e = new C0104e(1, this, c6);
        snapshotObserver.f2468a.observeReads(this, snapshotObserver.f2471d, c0104e);
        this.f2193x = false;
        this.f2192w = (Q0.n) c6.f20115a;
        this.f2191v = false;
        J0.A a6 = (J0.A) K.a(this);
        a6.getSemanticsOwner().b(this, nVar);
        a6.B();
    }

    public final void E() {
        H h5;
        if (this.f2182m > 0) {
            this.f2185p = true;
        }
        if (!this.f2174a || (h5 = this.f2186q) == null) {
            return;
        }
        h5.E();
    }

    public final boolean F() {
        return this.f2187r != null;
    }

    public final boolean G() {
        return this.f2163K.f2227p.f2325v;
    }

    public final Boolean H() {
        U u6 = this.f2163K.f2228q;
        if (u6 != null) {
            return Boolean.valueOf(u6.f2278t != S.f2259c);
        }
        return null;
    }

    public final void I() {
        H hT;
        if (this.f2159G == F.f2145c) {
            d();
        }
        U u6 = this.f2163K.f2228q;
        kotlin.jvm.internal.o.e(u6);
        boolean z6 = true;
        try {
            u6.f2269j = true;
            if (!u6.f2273o) {
                F0.a.b("replace() called on item that was not placed");
            }
            u6.f2267E = false;
            if (u6.f2278t == S.f2259c) {
                z6 = false;
            }
            u6.B0(u6.f2276r, u6.f2277s);
            if (z6 && !u6.f2267E && (hT = u6.f2268f.f2213a.t()) != null) {
                hT.S(false);
            }
            u6.f2269j = false;
        } catch (Throwable th) {
            u6.f2269j = false;
            throw th;
        }
    }

    public final void J(int i6, int i7, int i8) {
        if (i6 == i7) {
            return;
        }
        for (int i9 = 0; i9 < i8; i9++) {
            int i10 = i6 > i7 ? i6 + i9 : i6;
            int i11 = i6 > i7 ? i7 + i9 : (i7 + i8) - 2;
            C0284b0 c0284b0 = this.f2183n;
            Object objRemoveAt = c0284b0.f2331a.removeAt(i10);
            B0.b bVar = c0284b0.f2332b;
            bVar.invoke();
            c0284b0.f2331a.add(i11, (H) objRemoveAt);
            bVar.invoke();
        }
        M();
        E();
        C();
    }

    public final void K(H h5) {
        if (h5.f2163K.l > 0) {
            this.f2163K.d(r0.l - 1);
        }
        if (this.f2187r != null) {
            h5.f();
        }
        h5.f2186q = null;
        if (h5.f2172T > 0) {
            a0(this.f2172T - 1);
        }
        ((AbstractC0300j0) h5.f2162J.f2363e).f2423t = null;
        if (h5.f2174a) {
            this.f2182m--;
            MutableVector mutableVector = h5.f2183n.f2331a;
            Object[] objArr = mutableVector.content;
            int size = mutableVector.getSize();
            for (int i6 = 0; i6 < size; i6++) {
                ((AbstractC0300j0) ((H) objArr[i6]).f2162J.f2363e).f2423t = null;
            }
        }
        E();
        M();
    }

    public final void L() {
        R0.b rectManager;
        this.f2180j = true;
        J0.A a6 = this.f2187r;
        if (a6 == null || (rectManager = a6.getRectManager()) == null) {
            return;
        }
        rectManager.d(this);
    }

    public final void M() {
        if (!this.f2174a) {
            this.f2195z = true;
            return;
        }
        H hT = t();
        if (hT != null) {
            hT.M();
        }
    }

    public final boolean N(C2069a c2069a) {
        if (c2069a == null) {
            return false;
        }
        if (this.f2159G == F.f2145c) {
            c();
        }
        return this.f2163K.f2227p.C0(c2069a.f16612a);
    }

    public final void P() {
        C0284b0 c0284b0 = this.f2183n;
        int size = c0284b0.f2331a.getSize();
        while (true) {
            size--;
            MutableVector mutableVector = c0284b0.f2331a;
            if (-1 >= size) {
                mutableVector.clear();
                c0284b0.f2332b.invoke();
                return;
            }
            K((H) mutableVector.content[size]);
        }
    }

    public final void Q(int i6, int i7) {
        if (i7 < 0) {
            F0.a.a("count (" + i7 + ") must be greater than 0");
        }
        int i8 = (i7 + i6) - 1;
        if (i6 > i8) {
            return;
        }
        while (true) {
            C0284b0 c0284b0 = this.f2183n;
            K((H) c0284b0.f2331a.content[i8]);
            Object objRemoveAt = c0284b0.f2331a.removeAt(i8);
            c0284b0.f2332b.invoke();
            if (i8 == i6) {
                return;
            } else {
                i8--;
            }
        }
    }

    public final void R() {
        H hT;
        if (this.f2159G == F.f2145c) {
            d();
        }
        Y y6 = this.f2163K.f2227p;
        L l = y6.f2313f;
        try {
            y6.f2314j = true;
            if (!y6.f2317n) {
                F0.a.b("replace called on unplaced item");
            }
            boolean z6 = y6.f2325v;
            y6.B0(y6.f2320q, y6.f2322s, y6.f2321r);
            if (z6 && !y6.f2307I && (hT = l.f2213a.t()) != null) {
                hT.U(false);
            }
        } finally {
        }
    }

    public final void S(boolean z6) {
        J0.A a6;
        if (this.f2174a || (a6 = this.f2187r) == null) {
            return;
        }
        a6.A(this, true, z6);
    }

    public final void U(boolean z6) {
        J0.A a6;
        if (this.f2174a || (a6 = this.f2187r) == null) {
            return;
        }
        a6.A(this, false, z6);
    }

    public final void X() {
        MutableVector mutableVectorX = x();
        Object[] objArr = mutableVectorX.content;
        int size = mutableVectorX.getSize();
        for (int i6 = 0; i6 < size; i6++) {
            H h5 = (H) objArr[i6];
            F f6 = h5.f2160H;
            h5.f2159G = f6;
            if (f6 != F.f2145c) {
                h5.X();
            }
        }
    }

    public final void Y(Throwable th) {
        CompositionErrorContext compositionErrorContext = (CompositionErrorContext) this.f2158F.get(CompositionErrorContextKt.getLocalCompositionErrorContext());
        if (compositionErrorContext == null) {
            throw th;
        }
        compositionErrorContext.attachComposeStackTrace(th, this);
        throw th;
    }

    public final void Z(h1.c cVar) {
        if (kotlin.jvm.internal.o.c(this.f2155C, cVar)) {
            return;
        }
        this.f2155C = cVar;
        C();
        H hT = t();
        if (hT != null) {
            hT.A();
        }
        B();
        for (AbstractC2254r child$ui = (AbstractC2254r) this.f2162J.f2365g; child$ui != null; child$ui = child$ui.getChild$ui()) {
            child$ui.onDensityChange();
        }
    }

    /* JADX WARN: Code restructure failed: missing block: B:46:0x00e6, code lost:
    
        if (r2 >= r4) goto L59;
     */
    /* JADX WARN: Code restructure failed: missing block: B:47:0x00e8, code lost:
    
        if (r3 == null) goto L57;
     */
    /* JADX WARN: Code restructure failed: missing block: B:48:0x00ea, code lost:
    
        if (r1 == null) goto L55;
     */
    /* JADX WARN: Code restructure failed: missing block: B:50:0x00ee, code lost:
    
        if (r14.f2168P == null) goto L52;
     */
    /* JADX WARN: Code restructure failed: missing block: B:51:0x00f0, code lost:
    
        r4 = true;
     */
    /* JADX WARN: Code restructure failed: missing block: B:52:0x00f2, code lost:
    
        r4 = false;
     */
    /* JADX WARN: Code restructure failed: missing block: B:53:0x00f3, code lost:
    
        r6 = !r4;
        r4 = r5;
        r5 = r1;
        r1 = r2;
        r1.h(r2, r3, r4, r5, r6);
     */
    /* JADX WARN: Code restructure failed: missing block: B:56:0x0106, code lost:
    
        throw com.google.android.recaptcha.internal.a.g("structuralUpdate requires a non-null tail");
     */
    /* JADX WARN: Code restructure failed: missing block: B:58:0x010b, code lost:
    
        throw com.google.android.recaptcha.internal.a.g("expected prior modifier list to be non-empty");
     */
    /* JADX WARN: Code restructure failed: missing block: B:59:0x010c, code lost:
    
        r1 = r2;
     */
    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Type inference failed for: r12v1 */
    /* JADX WARN: Type inference failed for: r12v2, types: [int] */
    /* JADX WARN: Type inference failed for: r12v5 */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void a(InterfaceC2255s interfaceC2255s) {
        boolean z6;
        C0290e0 c0290e0;
        boolean z7;
        MutableVector mutableVector;
        C0288d0 c0288d0;
        C0290e0 c0290e02 = this.f2162J;
        boolean zF = c0290e02.f(16);
        boolean zF2 = c0290e02.f(1024);
        this.f2167O = interfaceC2255s;
        AbstractC2254r abstractC2254r = (AbstractC2254r) c0290e02.f2365g;
        C0288d0 c0288d02 = (C0288d0) c0290e02.f2361c;
        if (abstractC2254r == c0288d02) {
            F0.a.b("padChain called on already padded chain");
        }
        AbstractC2254r abstractC2254r2 = (AbstractC2254r) c0290e02.f2365g;
        abstractC2254r2.setParent$ui(c0288d02);
        c0288d02.setChild$ui(abstractC2254r2);
        MutableVector mutableVector2 = (MutableVector) c0290e02.f2366h;
        int size = mutableVector2 != null ? mutableVector2.getSize() : 0;
        MutableVector mutableVector3 = (MutableVector) c0290e02.f2367i;
        if (mutableVector3 == null) {
            mutableVector3 = new MutableVector(new InterfaceC2253q[16], 0);
        }
        MutableVector mutableVector4 = (MutableVector) c0290e02.f2368j;
        mutableVector4.add(interfaceC2255s);
        C0.Z z8 = null;
        while (true) {
            z6 = true;
            if (mutableVector4.getSize() == 0) {
                break;
            }
            InterfaceC2255s interfaceC2255s2 = (InterfaceC2255s) AbstractC2761L.e(1, mutableVector4);
            if (interfaceC2255s2 instanceof C2249m) {
                C2249m c2249m = (C2249m) interfaceC2255s2;
                mutableVector4.add(c2249m.f18817b);
                mutableVector4.add(c2249m.f18816a);
            } else if (interfaceC2255s2 instanceof InterfaceC2253q) {
                mutableVector3.add(interfaceC2255s2);
            } else {
                if (z8 == null) {
                    z8 = new C0.Z(mutableVector3, 2);
                }
                interfaceC2255s2.all(z8);
                z8 = z8;
            }
        }
        int size2 = mutableVector3.getSize();
        F0 f0 = (F0) c0290e02.f2364f;
        H h5 = (H) c0290e02.f2360b;
        if (size2 == size) {
            AbstractC2254r child$ui = c0288d02.getChild$ui();
            int i6 = 0;
            while (true) {
                if (child$ui == null || i6 >= size) {
                    break;
                }
                if (mutableVector2 == null) {
                    throw com.google.android.recaptcha.internal.a.g("expected prior modifier list to be non-empty");
                }
                InterfaceC2253q interfaceC2253q = (InterfaceC2253q) mutableVector2.content[i6];
                InterfaceC2253q interfaceC2253q2 = (InterfaceC2253q) mutableVector3.content[i6];
                char c6 = kotlin.jvm.internal.o.c(interfaceC2253q, interfaceC2253q2) ? (char) 2 : interfaceC2253q.getClass() == interfaceC2253q2.getClass() ? (char) 1 : (char) 0;
                if (c6 == 0) {
                    child$ui = child$ui.getParent$ui();
                    break;
                }
                if (c6 == 1) {
                    C0290e0.j(interfaceC2253q, interfaceC2253q2, child$ui);
                }
                child$ui = child$ui.getChild$ui();
                i6++;
            }
        } else {
            c0290e0 = c0290e02;
            if (h5.f2168P != null && size == 0) {
                AbstractC2254r abstractC2254rD = c0288d02;
                for (int i7 = 0; i7 < mutableVector3.getSize(); i7++) {
                    abstractC2254rD = C0290e0.d((InterfaceC2253q) mutableVector3.content[i7], abstractC2254rD);
                }
                int kindSet$ui = 0;
                for (AbstractC2254r parent$ui = f0.getParent$ui(); parent$ui != null && parent$ui != c0288d02; parent$ui = parent$ui.getParent$ui()) {
                    kindSet$ui |= parent$ui.getKindSet$ui();
                    parent$ui.setAggregateChildKindSet$ui(kindSet$ui);
                }
                mutableVector = mutableVector3;
                c0288d0 = c0288d02;
                z7 = false;
            } else if (mutableVector3.getSize() != 0) {
                if (mutableVector2 == null) {
                    z7 = false;
                    mutableVector2 = new MutableVector(new InterfaceC2253q[16], 0);
                } else {
                    z7 = false;
                }
                mutableVector = mutableVector3;
                c0288d0 = c0288d02;
                c0290e0.h(0, mutableVector2, mutableVector, c0288d0, !(h5.f2168P != null ? true : z7));
            } else {
                if (mutableVector2 == null) {
                    throw com.google.android.recaptcha.internal.a.g("expected prior modifier list to be non-empty");
                }
                AbstractC2254r child$ui2 = c0288d02.getChild$ui();
                for (int i8 = 0; child$ui2 != null && i8 < mutableVector2.getSize(); i8++) {
                    child$ui2 = C0290e0.e(child$ui2).getChild$ui();
                }
                H hT = h5.t();
                C0310t c0310t = hT != null ? (C0310t) hT.f2162J.f2362d : null;
                C0310t c0310t2 = (C0310t) c0290e0.f2362d;
                c0310t2.f2423t = c0310t;
                c0290e0.f2363e = c0310t2;
                mutableVector = mutableVector3;
                c0288d0 = c0288d02;
                z7 = false;
                z6 = false;
            }
        }
        c0290e0.f2366h = mutableVector;
        if (mutableVector2 != null) {
            mutableVector2.clear();
        } else {
            mutableVector2 = null;
        }
        c0290e0.f2367i = mutableVector2;
        AbstractC2254r child$ui3 = c0288d0.getChild$ui();
        if (child$ui3 == null) {
            child$ui3 = f0;
        }
        child$ui3.setParent$ui(null);
        c0288d0.setChild$ui(null);
        c0288d0.setAggregateChildKindSet$ui(-1);
        c0288d0.updateCoordinator$ui(null);
        if (child$ui3 == c0288d0) {
            F0.a.b("trimChain did not update the head");
        }
        c0290e0.f2365g = child$ui3;
        if (z6) {
            c0290e0.i();
        }
        boolean zF3 = c0290e0.f(16);
        boolean zF4 = c0290e0.f(1024);
        this.f2163K.j();
        if (this.l == null && c0290e0.f(512)) {
            b0(this);
        }
        if (zF == zF3 && zF2 == zF4) {
            return;
        }
        R0.b rectManager = ((J0.A) K.a(this)).getRectManager();
        rectManager.getClass();
        if (F()) {
            int i9 = this.f2175b & 33554431;
            F.f0 f0Var = rectManager.f6005a;
            long[] jArr = (long[]) f0Var.f1280c;
            int i10 = f0Var.f1279b;
            for (?? r12 = z7; r12 < jArr.length - 2 && r12 < i10; r12 += 3) {
                int i11 = r12 + 2;
                long j4 = jArr[i11];
                if ((((int) j4) & 33554431) == i9) {
                    jArr[i11] = ((zF3 ? 1L : 0L) * 4611686018427387904L) | ((-6917529027641081857L) & j4) | ((zF4 ? 1L : 0L) * 2305843009213693952L);
                    return;
                }
            }
        }
    }

    public final void a0(int i6) {
        H hT;
        H hT2;
        int i7 = this.f2172T;
        if (i7 != i6) {
            if (i6 > 0 && i7 == 0 && (hT2 = t()) != null) {
                hT2.a0(hT2.f2172T + 1);
            }
            if (i6 == 0 && this.f2172T > 0 && (hT = t()) != null) {
                hT.a0(hT.f2172T - 1);
            }
            this.f2172T = i6;
        }
    }

    public final void b(J0.A a6) {
        H h5;
        C2306c c2306c;
        Q0.n nVarV;
        if (!(this.f2187r == null)) {
            F0.a.b("Cannot attach " + this + " as it already is attached.  Tree: " + e(0));
        }
        H h6 = this.f2186q;
        if (h6 != null && !kotlin.jvm.internal.o.c(h6.f2187r, a6)) {
            StringBuilder sb = new StringBuilder("Attaching to a different owner(");
            sb.append(a6);
            sb.append(") than the parent's owner(");
            H hT = t();
            sb.append(hT != null ? hT.f2187r : null);
            sb.append("). This tree: ");
            sb.append(e(0));
            sb.append(" Parent tree: ");
            H h7 = this.f2186q;
            sb.append(h7 != null ? h7.e(0) : null);
            F0.a.b(sb.toString());
        }
        H hT2 = t();
        L l = this.f2163K;
        if (hT2 == null) {
            l.f2227p.f2325v = true;
            a6.getRectManager().e(this, false);
            U u6 = l.f2228q;
            if (u6 != null) {
                u6.f2278t = S.f2257a;
            }
        }
        C0290e0 c0290e0 = this.f2162J;
        ((AbstractC0300j0) c0290e0.f2363e).f2423t = hT2 != null ? (C0310t) hT2.f2162J.f2362d : null;
        this.f2187r = a6;
        this.f2189t = (hT2 != null ? hT2.f2189t : -1) + 1;
        InterfaceC2255s interfaceC2255s = this.f2168P;
        if (interfaceC2255s != null) {
            a(interfaceC2255s);
        }
        this.f2168P = null;
        a6.m11getLayoutNodes().i(this.f2175b, this);
        H h8 = this.f2186q;
        if (h8 == null || (h5 = h8.l) == null) {
            h5 = this.l;
        }
        b0(h5);
        if (this.l == null && c0290e0.f(512)) {
            b0(this);
        }
        if (!this.f2173U) {
            for (AbstractC2254r child$ui = (AbstractC2254r) c0290e0.f2365g; child$ui != null; child$ui = child$ui.getChild$ui()) {
                child$ui.markAsAttached$ui();
            }
        }
        MutableVector mutableVector = this.f2183n.f2331a;
        Object[] objArr = mutableVector.content;
        int size = mutableVector.getSize();
        for (int i6 = 0; i6 < size; i6++) {
            ((H) objArr[i6]).b(a6);
        }
        if (!this.f2173U) {
            c0290e0.g();
        }
        C();
        if (hT2 != null) {
            hT2.C();
        }
        C2373c c2373c = this.f2169Q;
        if (c2373c != null) {
            c2373c.invoke(a6);
        }
        l.j();
        if (!this.f2173U && c0290e0.f(8)) {
            D();
        }
        a6.getClass();
        if (!J0.A.g() || (c2306c = a6.f2725O) == null || (nVarV = v()) == null) {
            return;
        }
        if (nVarV.f5799a.a(Q0.w.f5850q)) {
            c2306c.f19441k.a(this.f2175b);
            c2306c.f19434a.q(c2306c.f19436c, this.f2175b, true);
        }
    }

    public final void b0(H h5) {
        if (kotlin.jvm.internal.o.c(h5, this.l)) {
            return;
        }
        this.l = h5;
        L l = this.f2163K;
        if (h5 != null) {
            if (l.f2228q == null) {
                l.f2228q = new U(l);
            }
            C0290e0 c0290e0 = this.f2162J;
            AbstractC0300j0 abstractC0300j0 = ((C0310t) c0290e0.f2362d).f2422s;
            for (AbstractC0300j0 abstractC0300j02 = (AbstractC0300j0) c0290e0.f2363e; !kotlin.jvm.internal.o.c(abstractC0300j02, abstractC0300j0) && abstractC0300j02 != null; abstractC0300j02 = abstractC0300j02.f2422s) {
                abstractC0300j02.Q0();
            }
        } else {
            l.f2228q = null;
            l.f2218f = false;
            l.f2217e = false;
        }
        C();
    }

    public final void c() {
        this.f2160H = this.f2159G;
        this.f2159G = F.f2145c;
        MutableVector mutableVectorX = x();
        Object[] objArr = mutableVectorX.content;
        int size = mutableVectorX.getSize();
        for (int i6 = 0; i6 < size; i6++) {
            H h5 = (H) objArr[i6];
            if (h5.f2159G != F.f2145c) {
                h5.c();
            }
        }
    }

    public final void c0(InterfaceC0245a0 interfaceC0245a0) {
        if (kotlin.jvm.internal.o.c(this.f2153A, interfaceC0245a0)) {
            return;
        }
        this.f2153A = interfaceC0245a0;
        T.p pVar = this.f2154B;
        if (pVar != null) {
            ((MutableState) pVar.f6346c).setValue(interfaceC0245a0);
        }
        C();
    }

    public final void d() {
        this.f2160H = this.f2159G;
        this.f2159G = F.f2145c;
        MutableVector mutableVectorX = x();
        Object[] objArr = mutableVectorX.content;
        int size = mutableVectorX.getSize();
        for (int i6 = 0; i6 < size; i6++) {
            H h5 = (H) objArr[i6];
            if (h5.f2159G == F.f2144b) {
                h5.d();
            }
        }
    }

    public final void d0(InterfaceC2255s interfaceC2255s) {
        if (this.f2174a && this.f2167O != C2252p.f18820a) {
            F0.a.a("Modifiers are not supported on virtual LayoutNodes");
        }
        if (this.f2173U) {
            F0.a.a("modifier is updated when deactivated");
        }
        if (!F()) {
            this.f2168P = interfaceC2255s;
            return;
        }
        a(interfaceC2255s);
        if (this.f2191v) {
            D();
        }
    }

    public final String e(int i6) {
        StringBuilder sb = new StringBuilder();
        for (int i7 = 0; i7 < i6; i7++) {
            sb.append("  ");
        }
        sb.append("|-");
        sb.append(toString());
        sb.append('\n');
        MutableVector mutableVectorX = x();
        Object[] objArr = mutableVectorX.content;
        int size = mutableVectorX.getSize();
        for (int i8 = 0; i8 < size; i8++) {
            sb.append(((H) objArr[i8]).e(i6 + 1));
        }
        String string = sb.toString();
        if (i6 != 0) {
            return string;
        }
        String strSubstring = string.substring(0, string.length() - 1);
        kotlin.jvm.internal.o.g(strSubstring, "substring(...)");
        return strSubstring;
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Type inference failed for: r2v6 */
    public final void e0(j1 j1Var) {
        if (kotlin.jvm.internal.o.c(this.f2157E, j1Var)) {
            return;
        }
        this.f2157E = j1Var;
        C0290e0 c0290e0 = this.f2162J;
        if ((((AbstractC2254r) c0290e0.f2365g).getAggregateChildKindSet$ui() & 16) != 0) {
            for (AbstractC2254r child$ui = (AbstractC2254r) c0290e0.f2365g; child$ui != null; child$ui = child$ui.getChild$ui()) {
                if ((child$ui.getKindSet$ui() & 16) != 0) {
                    AbstractC2254r abstractC2254rE = child$ui;
                    MutableVector mutableVector = null;
                    while (abstractC2254rE != 0) {
                        if (abstractC2254rE instanceof y0) {
                            ((y0) abstractC2254rE).n0();
                        } else if ((abstractC2254rE.getKindSet$ui() & 16) != 0 && (abstractC2254rE instanceof AbstractC0301k)) {
                            AbstractC2254r child$ui2 = ((AbstractC0301k) abstractC2254rE).f2431b;
                            int i6 = 0;
                            abstractC2254rE = abstractC2254rE;
                            while (child$ui2 != null) {
                                if ((child$ui2.getKindSet$ui() & 16) != 0) {
                                    i6++;
                                    if (i6 == 1) {
                                        abstractC2254rE = child$ui2;
                                    } else {
                                        if (mutableVector == null) {
                                            mutableVector = new MutableVector(new AbstractC2254r[16], 0);
                                        }
                                        if (abstractC2254rE != 0) {
                                            mutableVector.add(abstractC2254rE);
                                            abstractC2254rE = 0;
                                        }
                                        mutableVector.add(child$ui2);
                                    }
                                }
                                child$ui2 = child$ui2.getChild$ui();
                                abstractC2254rE = abstractC2254rE;
                            }
                            if (i6 == 1) {
                            }
                        }
                        abstractC2254rE = AbstractC0303l.e(mutableVector);
                    }
                }
                if ((child$ui.getAggregateChildKindSet$ui() & 16) == 0) {
                    return;
                }
            }
        }
    }

    public final void f() {
        C2306c c2306c;
        I i6;
        J0.A a6 = this.f2187r;
        if (a6 == null) {
            StringBuilder sb = new StringBuilder("Cannot detach node that is already detached!  Tree: ");
            H hT = t();
            sb.append(hT != null ? hT.e(0) : null);
            F0.a.c(sb.toString());
            throw new E3.v();
        }
        H hT2 = t();
        L l = this.f2163K;
        if (hT2 != null) {
            hT2.A();
            hT2.C();
            Y y6 = l.f2227p;
            F f6 = F.f2145c;
            y6.f2318o = f6;
            U u6 = l.f2228q;
            if (u6 != null) {
                u6.f2271m = f6;
            }
        }
        I i7 = l.f2227p.f2299A;
        i7.f2201b = true;
        i7.f2202c = false;
        i7.f2204e = false;
        i7.f2203d = false;
        i7.f2205f = false;
        i7.f2206g = false;
        i7.f2207h = null;
        U u7 = l.f2228q;
        if (u7 != null && (i6 = u7.f2279u) != null) {
            i6.f2201b = true;
            i6.f2202c = false;
            i6.f2204e = false;
            i6.f2203d = false;
            i6.f2205f = false;
            i6.f2206g = false;
            i6.f2207h = null;
        }
        C0290e0 c0290e0 = this.f2162J;
        AbstractC0300j0 abstractC0300j0 = ((C0310t) c0290e0.f2362d).f2422s;
        for (AbstractC0300j0 abstractC0300j02 = (AbstractC0300j0) c0290e0.f2363e; !kotlin.jvm.internal.o.c(abstractC0300j02, abstractC0300j0) && abstractC0300j02 != null; abstractC0300j02 = abstractC0300j02.f2422s) {
            abstractC0300j02.n1();
            if (abstractC0300j02.f2421r.G()) {
                abstractC0300j02.i1();
            }
        }
        C0.L l6 = this.f2170R;
        if (l6 != null) {
            l6.invoke(a6);
        }
        AbstractC2254r parent$ui = (F0) c0290e0.f2364f;
        for (AbstractC2254r parent$ui2 = parent$ui; parent$ui2 != null; parent$ui2 = parent$ui2.getParent$ui()) {
            if (parent$ui2.isAttached()) {
                parent$ui2.runDetachLifecycle$ui();
            }
        }
        this.f2190u = true;
        MutableVector mutableVector = this.f2183n.f2331a;
        Object[] objArr = mutableVector.content;
        int size = mutableVector.getSize();
        for (int i8 = 0; i8 < size; i8++) {
            ((H) objArr[i8]).f();
        }
        this.f2190u = false;
        while (parent$ui != null) {
            if (parent$ui.isAttached()) {
                parent$ui.markAsDetached$ui();
            }
            parent$ui = parent$ui.getParent$ui();
        }
        a6.m11getLayoutNodes().g(this.f2175b);
        W w6 = a6.f2735a0;
        C4.f fVar = w6.f2289b;
        ((C0.B) fVar.f741b).t(this);
        ((C0.B) fVar.f742c).t(this);
        ((C0.B) fVar.f743d).t(this);
        ((MutableVector) w6.f2292e.f6345b).remove(this);
        a6.f2726P = true;
        if (J0.A.g() && (c2306c = a6.f2725O) != null) {
            if (c2306c.f19441k.f(this.f2175b)) {
                c2306c.f19434a.q(c2306c.f19436c, this.f2175b, false);
            }
        }
        a6.getRectManager().g(this);
        this.f2187r = null;
        b0(null);
        this.f2189t = 0;
        Y y7 = l.f2227p;
        y7.l = Integer.MAX_VALUE;
        y7.f2315k = Integer.MAX_VALUE;
        y7.f2325v = false;
        U u8 = l.f2228q;
        if (u8 != null) {
            u8.l = Integer.MAX_VALUE;
            u8.f2270k = Integer.MAX_VALUE;
            u8.f2278t = S.f2259c;
        }
        if (c0290e0.f(8)) {
            Q0.n nVar = this.f2192w;
            this.f2192w = null;
            this.f2191v = false;
            a6.getSemanticsOwner().b(this, nVar);
            a6.B();
        }
    }

    public final void f0() {
        if (this.f2182m <= 0 || !this.f2185p) {
            return;
        }
        this.f2185p = false;
        MutableVector mutableVector = this.f2184o;
        if (mutableVector == null) {
            mutableVector = new MutableVector(new H[16], 0);
            this.f2184o = mutableVector;
        }
        mutableVector.clear();
        MutableVector mutableVector2 = this.f2183n.f2331a;
        Object[] objArr = mutableVector2.content;
        int size = mutableVector2.getSize();
        for (int i6 = 0; i6 < size; i6++) {
            H h5 = (H) objArr[i6];
            if (h5.f2174a) {
                mutableVector.addAll(mutableVector.getSize(), h5.x());
            } else {
                mutableVector.add(h5);
            }
        }
        L l = this.f2163K;
        l.f2227p.f2301C = true;
        U u6 = l.f2228q;
        if (u6 != null) {
            u6.f2281w = true;
        }
    }

    public final void g(InterfaceC2712s interfaceC2712s, s0.b bVar) {
        try {
            ((AbstractC0300j0) this.f2162J.f2363e).O0(interfaceC2712s, bVar);
        } catch (Throwable th) {
            Y(th);
            throw null;
        }
    }

    public final void i() {
        if (this.l != null) {
            T(this, false, 5);
        } else {
            V(this, false, 5);
        }
        Y y6 = this.f2163K.f2227p;
        C2069a c2069a = y6.f2316m ? new C2069a(y6.f2001d) : null;
        if (c2069a != null) {
            J0.A a6 = this.f2187r;
            if (a6 != null) {
                a6.u(this, c2069a.f16612a);
                return;
            }
            return;
        }
        J0.A a7 = this.f2187r;
        if (a7 != null) {
            a7.t(true);
        }
    }

    public final List j() {
        U u6 = this.f2163K.f2228q;
        kotlin.jvm.internal.o.e(u6);
        L l = u6.f2268f;
        l.f2213a.l();
        boolean z6 = u6.f2281w;
        MutableVector mutableVector = u6.f2280v;
        if (!z6) {
            return mutableVector.asMutableList();
        }
        H h5 = l.f2213a;
        MutableVector mutableVectorX = h5.x();
        Object[] objArr = mutableVectorX.content;
        int size = mutableVectorX.getSize();
        for (int i6 = 0; i6 < size; i6++) {
            H h6 = (H) objArr[i6];
            if (mutableVector.getSize() <= i6) {
                U u7 = h6.f2163K.f2228q;
                kotlin.jvm.internal.o.e(u7);
                mutableVector.add(u7);
            } else {
                U u8 = h6.f2163K.f2228q;
                kotlin.jvm.internal.o.e(u8);
                mutableVector.set(i6, u8);
            }
        }
        mutableVector.removeRange(h5.l().size(), mutableVector.getSize());
        u6.f2281w = false;
        return mutableVector.asMutableList();
    }

    public final List k() {
        return this.f2163K.f2227p.v0();
    }

    public final List l() {
        return x().asMutableList();
    }

    public final List m() {
        return this.f2183n.f2331a.asMutableList();
    }

    public final boolean n() {
        return this.f2163K.f2227p.f2328y;
    }

    public final boolean o() {
        return this.f2163K.f2227p.f2327x;
    }

    @Override // androidx.compose.runtime.ComposeNodeLifecycleCallback
    public final void onDeactivate() {
        C2306c c2306c;
        k1.y yVar = this.f2188s;
        if (yVar != null) {
            yVar.onDeactivate();
        }
        G0.W w6 = this.f2164L;
        if (w6 != null) {
            w6.g(true);
        }
        this.f2173U = true;
        C0290e0 c0290e0 = this.f2162J;
        for (AbstractC2254r parent$ui = (F0) c0290e0.f2364f; parent$ui != null; parent$ui = parent$ui.getParent$ui()) {
            if (parent$ui.isAttached()) {
                parent$ui.reset$ui();
            }
        }
        AbstractC2254r parent$ui2 = (F0) c0290e0.f2364f;
        for (AbstractC2254r parent$ui3 = parent$ui2; parent$ui3 != null; parent$ui3 = parent$ui3.getParent$ui()) {
            if (parent$ui3.isAttached()) {
                parent$ui3.runDetachLifecycle$ui();
            }
        }
        while (parent$ui2 != null) {
            if (parent$ui2.isAttached()) {
                parent$ui2.markAsDetached$ui();
            }
            parent$ui2 = parent$ui2.getParent$ui();
        }
        if (F()) {
            this.f2192w = null;
            this.f2191v = false;
        }
        J0.A a6 = this.f2187r;
        if (a6 == null || !J0.A.g() || (c2306c = a6.f2725O) == null) {
            return;
        }
        if (c2306c.f19441k.f(this.f2175b)) {
            c2306c.f19434a.q(c2306c.f19436c, this.f2175b, false);
        }
    }

    @Override // androidx.compose.runtime.ComposeNodeLifecycleCallback
    public final void onRelease() {
        k1.y yVar = this.f2188s;
        if (yVar != null) {
            yVar.onRelease();
        }
        G0.W w6 = this.f2164L;
        if (w6 != null) {
            w6.onRelease();
        }
        C0290e0 c0290e0 = this.f2162J;
        AbstractC0300j0 abstractC0300j0 = ((C0310t) c0290e0.f2362d).f2422s;
        for (AbstractC0300j0 abstractC0300j02 = (AbstractC0300j0) c0290e0.f2363e; !kotlin.jvm.internal.o.c(abstractC0300j02, abstractC0300j0) && abstractC0300j02 != null; abstractC0300j02 = abstractC0300j02.f2422s) {
            abstractC0300j02.h1();
        }
    }

    @Override // androidx.compose.runtime.ComposeNodeLifecycleCallback
    public final void onReuse() {
        R0.b rectManager;
        C2306c c2306c;
        R0.b rectManager2;
        if (!F()) {
            F0.a.a("onReuse is only expected on attached node");
        }
        k1.y yVar = this.f2188s;
        if (yVar != null) {
            yVar.onReuse();
        }
        G0.W w6 = this.f2164L;
        if (w6 != null) {
            w6.g(false);
        }
        this.f2193x = false;
        boolean z6 = this.f2173U;
        C0290e0 c0290e0 = this.f2162J;
        if (z6) {
            this.f2173U = false;
        } else {
            for (AbstractC2254r parent$ui = (F0) c0290e0.f2364f; parent$ui != null; parent$ui = parent$ui.getParent$ui()) {
                if (parent$ui.isAttached()) {
                    parent$ui.reset$ui();
                }
            }
            AbstractC2254r parent$ui2 = (F0) c0290e0.f2364f;
            for (AbstractC2254r parent$ui3 = parent$ui2; parent$ui3 != null; parent$ui3 = parent$ui3.getParent$ui()) {
                if (parent$ui3.isAttached()) {
                    parent$ui3.runDetachLifecycle$ui();
                }
            }
            while (parent$ui2 != null) {
                if (parent$ui2.isAttached()) {
                    parent$ui2.markAsDetached$ui();
                }
                parent$ui2 = parent$ui2.getParent$ui();
            }
        }
        int i6 = this.f2175b;
        J0.A a6 = this.f2187r;
        if (a6 != null && (rectManager2 = a6.getRectManager()) != null) {
            rectManager2.g(this);
        }
        this.f2175b = Q0.q.f5803a.addAndGet(1);
        J0.A a7 = this.f2187r;
        if (a7 != null) {
            a7.m11getLayoutNodes().g(i6);
            a7.m11getLayoutNodes().i(this.f2175b, this);
        }
        for (AbstractC2254r child$ui = (AbstractC2254r) c0290e0.f2365g; child$ui != null; child$ui = child$ui.getChild$ui()) {
            child$ui.markAsAttached$ui();
        }
        c0290e0.g();
        if (c0290e0.f(8)) {
            D();
        }
        W(this);
        J0.A a8 = this.f2187r;
        if (a8 != null && J0.A.g() && (c2306c = a8.f2725O) != null) {
            C2567B c2567b = c2306c.f19441k;
            boolean zF = c2567b.f(i6);
            J0.A a9 = c2306c.f19436c;
            C0.B b5 = c2306c.f19434a;
            if (zF) {
                b5.q(a9, i6, false);
            }
            Q0.n nVarV = v();
            if (nVarV != null) {
                if (nVarV.f5799a.a(Q0.w.f5850q)) {
                    c2567b.a(this.f2175b);
                    b5.q(a9, this.f2175b, true);
                }
            }
        }
        J0.A a10 = this.f2187r;
        if (a10 == null || (rectManager = a10.getRectManager()) == null) {
            return;
        }
        rectManager.e(this, true);
    }

    public final F p() {
        return this.f2163K.f2227p.f2318o;
    }

    public final F q() {
        F f6;
        U u6 = this.f2163K.f2228q;
        return (u6 == null || (f6 = u6.f2271m) == null) ? F.f2145c : f6;
    }

    @Override // I0.u0
    public final boolean r() {
        return F();
    }

    public final T.p s() {
        T.p pVar = this.f2154B;
        if (pVar != null) {
            return pVar;
        }
        T.p pVar2 = new T.p(this, this.f2153A);
        this.f2154B = pVar2;
        return pVar2;
    }

    public final H t() {
        H h5 = this.f2186q;
        while (h5 != null && h5.f2174a) {
            h5 = h5.f2186q;
        }
        return h5;
    }

    public final String toString() {
        return J0.O.u(this) + " children: " + l().size() + " measurePolicy: " + this.f2153A + " deactivated: " + this.f2173U;
    }

    public final int u() {
        return this.f2163K.f2227p.l;
    }

    public final Q0.n v() {
        if (F() && !this.f2173U && this.f2162J.f(8)) {
            return this.f2192w;
        }
        return null;
    }

    public final MutableVector w() {
        boolean z6 = this.f2195z;
        MutableVector mutableVector = this.f2194y;
        if (z6) {
            mutableVector.clear();
            mutableVector.addAll(mutableVector.getSize(), x());
            mutableVector.sortWith(X);
            this.f2195z = false;
        }
        return mutableVector;
    }

    public final MutableVector x() {
        f0();
        if (this.f2182m == 0) {
            return this.f2183n.f2331a;
        }
        MutableVector mutableVector = this.f2184o;
        kotlin.jvm.internal.o.e(mutableVector);
        return mutableVector;
    }

    public final void y(long j4, r rVar, int i6, boolean z6) {
        C0290e0 c0290e0 = this.f2162J;
        AbstractC0300j0 abstractC0300j0 = (AbstractC0300j0) c0290e0.f2363e;
        p0.U u6 = AbstractC0300j0.f2401P;
        ((AbstractC0300j0) c0290e0.f2363e).a1(AbstractC0300j0.f2404S, abstractC0300j0.S0(j4), rVar, i6, z6);
    }

    public final void z(int i6, H h5) {
        if (h5.f2186q != null && h5.f2187r != null) {
            F0.a.b(h(h5));
        }
        h5.f2186q = this;
        C0284b0 c0284b0 = this.f2183n;
        c0284b0.f2331a.add(i6, h5);
        c0284b0.f2332b.invoke();
        M();
        if (h5.f2174a) {
            this.f2182m++;
        }
        E();
        J0.A a6 = this.f2187r;
        if (a6 != null) {
            h5.b(a6);
        }
        if (h5.f2163K.l > 0) {
            L l = this.f2163K;
            l.d(l.l + 1);
        }
        if (h5.f2172T > 0) {
            a0(this.f2172T + 1);
        }
    }

    public H(boolean z6, int i6) {
        this.f2174a = z6;
        this.f2175b = i6;
        this.f2177d = 9223372034707292159L;
        this.f2178e = 0L;
        this.f2179f = 9223372034707292159L;
        this.f2180j = true;
        this.f2183n = new C0284b0(new MutableVector(new H[16], 0), new B0.b(this, 4));
        this.f2194y = new MutableVector(new H[16], 0);
        this.f2195z = true;
        this.f2153A = f2151V;
        this.f2155C = K.f2212a;
        this.f2156D = h1.m.f16628a;
        this.f2157E = f2152W;
        this.f2158F = CompositionLocalMap.Companion.getEmpty();
        F f6 = F.f2145c;
        this.f2159G = f6;
        this.f2160H = f6;
        this.f2162J = new C0290e0(this);
        this.f2163K = new L(this);
        this.f2166N = true;
        this.f2167O = C2252p.f18820a;
    }
}
