package I0;

import G0.AbstractC0244a;
import G0.InterfaceC0245a0;
import androidx.compose.runtime.collection.MutableVector;
import i0.AbstractC2254r;
import p0.AbstractC2686D;
import p0.C2714u;
import p0.InterfaceC2712s;

/* JADX INFO: renamed from: I0.t, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C0310t extends AbstractC0300j0 {

    /* JADX INFO: renamed from: W, reason: collision with root package name */
    public static final I2.O f2458W;

    /* JADX INFO: renamed from: U, reason: collision with root package name */
    public final F0 f2459U;

    /* JADX INFO: renamed from: V, reason: collision with root package name */
    public C0309s f2460V;

    static {
        I2.O oI = AbstractC2686D.i();
        oI.g(C2714u.f22940g);
        oI.m(1.0f);
        oI.n(1);
        f2458W = oI;
    }

    public C0310t(H h5) {
        super(h5);
        F0 f0 = new F0();
        f0.setAggregateChildKindSet$ui(0);
        this.f2459U = f0;
        f0.updateCoordinator$ui(this);
        this.f2460V = h5.l != null ? new C0309s(this) : null;
    }

    @Override // G0.InterfaceC0273s
    public final int G(int i6) {
        T.p pVarS = this.f2421r.s();
        InterfaceC0245a0 interfaceC0245a0P = pVarS.p();
        H h5 = (H) pVarS.f6345b;
        return interfaceC0245a0P.minIntrinsicWidth((AbstractC0300j0) h5.f2162J.f2363e, h5.k(), i6);
    }

    @Override // G0.InterfaceC0273s
    public final int K(int i6) {
        T.p pVarS = this.f2421r.s();
        InterfaceC0245a0 interfaceC0245a0P = pVarS.p();
        H h5 = (H) pVarS.f6345b;
        return interfaceC0245a0P.maxIntrinsicWidth((AbstractC0300j0) h5.f2162J.f2363e, h5.k(), i6);
    }

    @Override // G0.Z
    public final G0.q0 Q(long j4) throws Throwable {
        u0(j4);
        H h5 = this.f2421r;
        MutableVector mutableVectorX = h5.x();
        Object[] objArr = mutableVectorX.content;
        int size = mutableVectorX.getSize();
        for (int i6 = 0; i6 < size; i6++) {
            ((H) objArr[i6]).f2163K.f2227p.f2318o = F.f2145c;
        }
        o1(h5.f2153A.mo1measure3p2s80s(this, h5.k(), j4));
        f1();
        return this;
    }

    @Override // I0.AbstractC0300j0
    public final void Q0() {
        if (this.f2460V == null) {
            this.f2460V = new C0309s(this);
        }
    }

    @Override // I0.AbstractC0300j0
    public final Q T0() {
        return this.f2460V;
    }

    @Override // I0.AbstractC0300j0
    public final AbstractC2254r V0() {
        return this.f2459U;
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Removed duplicated region for block: B:108:? A[RETURN, SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:25:0x0050  */
    /* JADX WARN: Type inference failed for: r5v19 */
    @Override // I0.AbstractC0300j0
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void b1(C0292f0 c0292f0, long j4, r rVar, int i6, boolean z6) {
        boolean z7;
        int i7;
        boolean z8;
        boolean z9;
        Object[] objArr;
        long j6 = j4;
        r rVar2 = rVar;
        H h5 = this.f2421r;
        switch (c0292f0.f2373a) {
            case 0:
                z7 = true;
                break;
            default:
                Q0.n nVarV = h5.v();
                z7 = !(nVarV != null && nVarV.f5802d);
                break;
        }
        if (z7) {
            if (v1(j6)) {
                i7 = i6;
                z8 = z6;
            } else {
                i7 = i6;
                if (i7 == 1 && (Float.floatToRawIntBits(N0(j6, U0())) & Integer.MAX_VALUE) < 2139095040) {
                    z8 = false;
                }
            }
            z9 = true;
            if (z9) {
                return;
            }
            int i8 = rVar2.f2457c;
            MutableVector mutableVectorW = h5.w();
            Object[] objArr2 = mutableVectorW.content;
            int size = mutableVectorW.getSize() - 1;
            while (size >= 0) {
                H h6 = (H) objArr2[size];
                if (h6.G()) {
                    switch (c0292f0.f2373a) {
                        case 0:
                            objArr = objArr2;
                            h6.y(j6, rVar2, i7, z8);
                            break;
                        default:
                            C0290e0 c0290e0 = h6.f2162J;
                            objArr = objArr2;
                            ((AbstractC0300j0) c0290e0.f2363e).a1(AbstractC0300j0.f2405T, ((AbstractC0300j0) c0290e0.f2363e).S0(j6), rVar2, 1, z8);
                            rVar2 = rVar;
                            break;
                    }
                    long jG = rVar2.g();
                    if (AbstractC0303l.j(jG) < 0.0f && AbstractC0303l.m(jG) && !AbstractC0303l.l(jG)) {
                        AbstractC0300j0 abstractC0300j0 = (AbstractC0300j0) h6.f2162J.f2363e;
                        abstractC0300j0.getClass();
                        AbstractC2254r abstractC2254rX0 = abstractC0300j0.X0(AbstractC0302k0.h(16));
                        if (abstractC2254rX0 != null && abstractC2254rX0.isAttached()) {
                            if (!abstractC2254rX0.getNode().isAttached()) {
                                F0.a.b("visitLocalDescendants called on an unattached node");
                            }
                            AbstractC2254r node = abstractC2254rX0.getNode();
                            if ((node.getAggregateChildKindSet$ui() & 16) != 0) {
                                while (node != null) {
                                    if ((node.getKindSet$ui() & 16) != 0) {
                                        AbstractC2254r abstractC2254rE = node;
                                        MutableVector mutableVector = null;
                                        while (abstractC2254rE != 0) {
                                            if (abstractC2254rE instanceof y0) {
                                                if (((y0) abstractC2254rE).j0()) {
                                                    rVar2.f2457c = rVar2.f2455a.f21377b - 1;
                                                }
                                            } else if ((abstractC2254rE.getKindSet$ui() & 16) != 0 && (abstractC2254rE instanceof AbstractC0301k)) {
                                                AbstractC2254r child$ui = ((AbstractC0301k) abstractC2254rE).f2431b;
                                                int i9 = 0;
                                                abstractC2254rE = abstractC2254rE;
                                                while (child$ui != null) {
                                                    if ((child$ui.getKindSet$ui() & 16) != 0) {
                                                        i9++;
                                                        if (i9 == 1) {
                                                            abstractC2254rE = child$ui;
                                                        } else {
                                                            if (mutableVector == null) {
                                                                mutableVector = new MutableVector(new AbstractC2254r[16], 0);
                                                            }
                                                            if (abstractC2254rE != 0) {
                                                                mutableVector.add(abstractC2254rE);
                                                                abstractC2254rE = 0;
                                                            }
                                                            mutableVector.add(child$ui);
                                                        }
                                                    }
                                                    child$ui = child$ui.getChild$ui();
                                                    abstractC2254rE = abstractC2254rE;
                                                }
                                                if (i9 == 1) {
                                                }
                                            }
                                            abstractC2254rE = AbstractC0303l.e(mutableVector);
                                        }
                                    }
                                    node = node.getChild$ui();
                                }
                            }
                        }
                        rVar2.f2457c = i8;
                        return;
                    }
                } else {
                    objArr = objArr2;
                }
                size--;
                j6 = j4;
                i7 = i6;
                objArr2 = objArr;
            }
            rVar2.f2457c = i8;
            return;
        }
        i7 = i6;
        z8 = z6;
        z9 = false;
        if (z9) {
        }
    }

    @Override // G0.InterfaceC0273s
    public final int d(int i6) {
        T.p pVarS = this.f2421r.s();
        InterfaceC0245a0 interfaceC0245a0P = pVarS.p();
        H h5 = (H) pVarS.f6345b;
        return interfaceC0245a0P.maxIntrinsicHeight((AbstractC0300j0) h5.f2162J.f2363e, h5.k(), i6);
    }

    @Override // G0.InterfaceC0273s
    public final int j0(int i6) {
        T.p pVarS = this.f2421r.s();
        InterfaceC0245a0 interfaceC0245a0P = pVarS.p();
        H h5 = (H) pVarS.f6345b;
        return interfaceC0245a0P.minIntrinsicHeight((AbstractC0300j0) h5.f2162J.f2363e, h5.k(), i6);
    }

    @Override // I0.AbstractC0300j0
    public final void k1(InterfaceC2712s interfaceC2712s, s0.b bVar) {
        H h5 = this.f2421r;
        t0 t0VarA = K.a(h5);
        MutableVector mutableVectorW = h5.w();
        Object[] objArr = mutableVectorW.content;
        int size = mutableVectorW.getSize();
        for (int i6 = 0; i6 < size; i6++) {
            H h6 = (H) objArr[i6];
            if (h6.G()) {
                h6.g(interfaceC2712s, bVar);
            }
        }
        if (((J0.A) t0VarA).getShowLayoutBounds()) {
            long j4 = this.f2000c;
            interfaceC2712s.i(0.5f, 0.5f, ((int) (j4 >> 32)) - 0.5f, ((int) (j4 & 4294967295L)) - 0.5f, f2458W);
        }
    }

    @Override // G0.q0
    public final void s0(long j4, float f6, J4.c cVar) throws Throwable {
        l1(j4, f6, cVar);
        if (this.f2246m) {
            return;
        }
        this.f2421r.f2163K.f2227p.A0();
    }

    @Override // I0.P
    public final int w0(AbstractC0244a abstractC0244a) {
        C0309s c0309s = this.f2460V;
        if (c0309s != null) {
            return c0309s.w0(abstractC0244a);
        }
        Y y6 = this.f2421r.f2163K.f2227p;
        boolean z6 = y6.f2319p;
        I i6 = y6.f2299A;
        if (!z6) {
            if (y6.f2313f.f2216d == D.f2136a) {
                i6.f2205f = true;
                if (i6.f2201b) {
                    y6.f2328y = true;
                    y6.f2329z = true;
                }
            } else {
                i6.f2206g = true;
            }
        }
        C0310t c0310tL = y6.l();
        boolean z7 = c0310tL.f2247n;
        c0310tL.f2247n = true;
        y6.Z();
        c0310tL.f2247n = z7;
        Integer num = (Integer) i6.f2208i.get(abstractC0244a);
        if (num != null) {
            return num.intValue();
        }
        return Integer.MIN_VALUE;
    }
}
