package androidx.compose.animation;

import java.util.ListIterator;
import o.A6;
import o.AW;
import o.AbstractC0752ap;
import o.AbstractC1692kh0;
import o.AbstractC2219q9;
import o.AbstractC2378rs0;
import o.AbstractC2462sn;
import o.AbstractC3064z40;
import o.B6;
import o.C0036Bk;
import o.C0140Fk;
import o.C0159Gd;
import o.C0321Mk;
import o.C0554Vj;
import o.C0669Zu;
import o.C0744al;
import o.C0975d6;
import o.C1083eF;
import o.C1160f3;
import o.C2023o6;
import o.C2402s6;
import o.C2449sg0;
import o.C2497t6;
import o.C2650um;
import o.C2687v6;
import o.C2887xC;
import o.C3114zg0;
import o.Eg0;
import o.F3;
import o.H90;
import o.InterfaceC0062Ck;
import o.InterfaceC1191fR;
import o.InterfaceC2584u2;
import o.JP;
import o.L00;
import o.LP;
import o.MP;
import o.MV;
import o.OC;
import o.RP;
import o.SC;
import o.ZQ;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public abstract class a {
    public static final long a;
    public static final /* synthetic */ int b = 0;

    static {
        long j = Integer.MIN_VALUE;
        a = (j & 4294967295L) | (j << 32);
    }

    public static final void a(Integer num, MP mp, OC oc, InterfaceC2584u2 interfaceC2584u2, String str, OC oc2, C0554Vj c0554Vj, C0321Mk c0321Mk, int i) {
        MP mp2;
        InterfaceC2584u2 interfaceC2584u22;
        OC oc3;
        c0321Mk.X(1501828832);
        int i2 = i | (c0321Mk.f(num) ? 4 : 2) | 199728;
        if (c0321Mk.N(i2 & 1, (599187 & i2) != 599186)) {
            C0159Gd c0159Gd = C0669Zu.m;
            Object objK = c0321Mk.K();
            if (objK == C0140Fk.a) {
                objK = C1160f3.A;
                c0321Mk.f0(objK);
            }
            OC oc4 = (OC) objK;
            C3114zg0 c3114zg0D = Eg0.d(num, str, c0321Mk, (i2 & 14) | 48, 0);
            JP jp = JP.a;
            b(c3114zg0D, jp, oc, oc4, c0554Vj, c0321Mk, 224688);
            mp2 = jp;
            oc3 = oc4;
            interfaceC2584u22 = c0159Gd;
        } else {
            c0321Mk.Q();
            mp2 = mp;
            interfaceC2584u22 = interfaceC2584u2;
            oc3 = oc2;
        }
        L00 l00S = c0321Mk.s();
        if (l00S != null) {
            l00S.d = new C2023o6(num, mp2, oc, interfaceC2584u22, str, oc3, c0554Vj, i);
        }
    }

    public static final void b(C3114zg0 c3114zg0, MP mp, OC oc, OC oc2, C0554Vj c0554Vj, C0321Mk c0321Mk, int i) {
        int i2;
        OC oc3;
        C0321Mk c0321Mk2;
        H90 h90;
        final B6 b6;
        H90 h902;
        AW aw;
        final C2449sg0 c2449sg0B;
        C3114zg0 c3114zg02 = c3114zg0;
        C0159Gd c0159Gd = C0669Zu.m;
        c0321Mk.X(511725103);
        if ((i & 6) == 0) {
            i2 = (c0321Mk.f(c3114zg02) ? 4 : 2) | i;
        } else {
            i2 = i;
        }
        if ((i & 48) == 0) {
            i2 |= c0321Mk.f(mp) ? 32 : 16;
        }
        if ((i & 384) == 0) {
            i2 |= c0321Mk.h(oc) ? 256 : 128;
        }
        if ((i & 3072) == 0) {
            i2 |= c0321Mk.f(c0159Gd) ? 2048 : 1024;
        }
        if ((i & 24576) == 0) {
            i2 |= c0321Mk.h(oc2) ? 16384 : 8192;
        }
        C0554Vj c0554Vj2 = c0554Vj;
        if ((196608 & i) == 0) {
            i2 |= c0321Mk.h(c0554Vj2) ? 131072 : 65536;
        }
        if (c0321Mk.N(i2 & 1, (74899 & i2) != 74898)) {
            int i3 = i2 & 14;
            boolean z = i3 == 4;
            Object objK = c0321Mk.K();
            Object obj = C0140Fk.a;
            if (z || objK == obj) {
                objK = new B6(c3114zg02);
                c0321Mk.f0(objK);
            }
            B6 b62 = (B6) objK;
            boolean z2 = i3 == 4;
            Object objK2 = c0321Mk.K();
            Object obj2 = objK2;
            if (z2 || objK2 == obj) {
                Object[] objArr = {c3114zg02.c()};
                H90 h903 = new H90();
                h903.addAll(AbstractC2219q9.V(objArr));
                c0321Mk.f0(h903);
                obj2 = h903;
            }
            H90 h904 = (H90) obj2;
            boolean z3 = i3 == 4;
            Object objK3 = c0321Mk.K();
            if (z3 || objK3 == obj) {
                long[] jArr = AbstractC3064z40.a;
                objK3 = new ZQ();
                c0321Mk.f0(objK3);
            }
            ZQ zq = (ZQ) objK3;
            Object objC = c3114zg02.c();
            MV mv = c3114zg02.d;
            if (!h904.contains(objC)) {
                h904.clear();
                h904.add(c3114zg02.c());
            }
            if (F3.c(c3114zg02.c(), mv.getValue())) {
                if (h904.size() != 1 || !F3.c(h904.get(0), c3114zg02.c())) {
                    h904.clear();
                    h904.add(c3114zg02.c());
                }
                if (zq.e != 1 || zq.c(c3114zg02.c())) {
                    zq.a();
                }
                b62.getClass();
            }
            if (!F3.c(c3114zg02.c(), mv.getValue()) && !h904.contains(mv.getValue())) {
                ListIterator listIterator = h904.listIterator();
                int i4 = 0;
                while (true) {
                    C1083eF c1083eF = (C1083eF) listIterator;
                    if (!c1083eF.hasNext()) {
                        i4 = -1;
                        break;
                    } else if (F3.c(oc2.g(c1083eF.next()), oc2.g(mv.getValue()))) {
                        break;
                    } else {
                        i4++;
                    }
                }
                if (i4 == -1) {
                    h904.add(mv.getValue());
                } else {
                    h904.set(i4, mv.getValue());
                }
            }
            if (zq.c(mv.getValue()) && zq.c(c3114zg02.c())) {
                c0321Mk.V(1969054067);
                c0321Mk.q(false);
                h90 = h904;
                b6 = b62;
                oc3 = oc;
            } else {
                c0321Mk.V(1966468977);
                zq.a();
                int size = h904.size();
                int i5 = 0;
                while (i5 < size) {
                    Object obj3 = h904.get(i5);
                    B6 b63 = b62;
                    C0554Vj c0554Vj3 = c0554Vj2;
                    H90 h905 = h904;
                    zq.m(obj3, C2887xC.y(-23915175, new C2402s6(c3114zg02, obj3, oc, b63, h905, c0554Vj3), c0321Mk));
                    i5++;
                    c3114zg02 = c3114zg0;
                    b62 = b63;
                    h904 = h905;
                    c0554Vj2 = c0554Vj;
                }
                h90 = h904;
                b6 = b62;
                oc3 = oc;
                c0321Mk.q(false);
            }
            boolean zF = c0321Mk.f(c3114zg0.f()) | c0321Mk.f(b6);
            Object objK4 = c0321Mk.K();
            if (zF || objK4 == obj) {
                objK4 = (C2650um) oc3.g(b6);
                c0321Mk.f0(objK4);
            }
            C2650um c2650um = (C2650um) objK4;
            C3114zg0 c3114zg03 = b6.a;
            boolean zF2 = c0321Mk.f(b6);
            Object objK5 = c0321Mk.K();
            if (zF2 || objK5 == obj) {
                objK5 = AbstractC0752ap.X(Boolean.FALSE);
                c0321Mk.f0(objK5);
            }
            InterfaceC1191fR interfaceC1191fR = (InterfaceC1191fR) objK5;
            final InterfaceC1191fR interfaceC1191fRZ = AbstractC0752ap.Z(c2650um.d, c0321Mk);
            if (F3.c(c3114zg03.c(), c3114zg03.d.getValue())) {
                interfaceC1191fR.setValue(Boolean.FALSE);
            } else if (interfaceC1191fRZ.getValue() != null) {
                interfaceC1191fR.setValue(Boolean.TRUE);
            }
            boolean zBooleanValue = ((Boolean) interfaceC1191fR.getValue()).booleanValue();
            MP mp2 = JP.a;
            if (zBooleanValue) {
                c0321Mk.V(1353180665);
                h902 = h90;
                c0321Mk2 = c0321Mk;
                aw = null;
                c2449sg0B = Eg0.b(b6.a, AbstractC1692kh0.B, null, c0321Mk2, 0, 2);
                boolean zF3 = c0321Mk2.f(c2449sg0B);
                Object objK6 = c0321Mk2.K();
                if (zF3 || objK6 == obj) {
                    objK6 = AbstractC2378rs0.G(mp2);
                    c0321Mk2.f0(objK6);
                }
                mp2 = (MP) objK6;
                c0321Mk2.q(false);
            } else {
                h902 = h90;
                c0321Mk2 = c0321Mk;
                aw = null;
                c0321Mk2.V(1353446707);
                c0321Mk2.q(false);
                c2449sg0B = null;
            }
            MP mpG = mp.g(mp2.g(new RP(c2449sg0B, interfaceC1191fRZ, b6) { // from class: androidx.compose.animation.AnimatedContentTransitionScopeImpl$SizeModifierElement
                public final C2449sg0 a;
                public final InterfaceC1191fR b;
                public final B6 c;

                {
                    this.a = c2449sg0B;
                    this.b = interfaceC1191fRZ;
                    this.c = b6;
                }

                public final boolean equals(Object obj4) {
                    if (!(obj4 instanceof AnimatedContentTransitionScopeImpl$SizeModifierElement)) {
                        return false;
                    }
                    AnimatedContentTransitionScopeImpl$SizeModifierElement animatedContentTransitionScopeImpl$SizeModifierElement = (AnimatedContentTransitionScopeImpl$SizeModifierElement) obj4;
                    return F3.c(animatedContentTransitionScopeImpl$SizeModifierElement.a, this.a) && animatedContentTransitionScopeImpl$SizeModifierElement.b.equals(this.b);
                }

                @Override // o.RP
                public final LP f() {
                    A6 a6 = new A6();
                    a6.z = this.a;
                    a6.A = this.b;
                    a6.B = this.c;
                    a6.C = a.a;
                    return a6;
                }

                public final int hashCode() {
                    int iHashCode = this.c.hashCode() * 31;
                    C2449sg0 c2449sg0 = this.a;
                    return this.b.hashCode() + ((iHashCode + (c2449sg0 != null ? c2449sg0.hashCode() : 0)) * 31);
                }

                @Override // o.RP
                public final void j(LP lp) {
                    A6 a6 = (A6) lp;
                    a6.z = this.a;
                    a6.A = this.b;
                    a6.B = this.c;
                }
            }));
            Object objK7 = c0321Mk2.K();
            if (objK7 == obj) {
                objK7 = new C2687v6(b6);
                c0321Mk2.f0(objK7);
            }
            C2687v6 c2687v6 = (C2687v6) objK7;
            int iHashCode = Long.hashCode(c0321Mk2.R);
            AW awL = c0321Mk2.l();
            MP mpF = AbstractC1692kh0.F(c0321Mk2, mpG);
            InterfaceC0062Ck.b.getClass();
            C0744al c0744al = C0036Bk.b;
            c0321Mk2.Y();
            if (c0321Mk2.Q) {
                c0321Mk2.k(c0744al);
            } else {
                c0321Mk2.i0();
            }
            AbstractC2378rs0.f0(c2687v6, c0321Mk2, C0036Bk.f);
            AbstractC2378rs0.f0(awL, c0321Mk2, C0036Bk.e);
            C0975d6 c0975d6 = C0036Bk.i;
            if (c0321Mk2.Q || !F3.c(c0321Mk2.K(), Integer.valueOf(iHashCode))) {
                AbstractC2462sn.r(iHashCode, c0321Mk2, iHashCode, c0975d6);
            }
            AbstractC2378rs0.f0(mpF, c0321Mk2, C0036Bk.c);
            c0321Mk2.V(-860173498);
            int size2 = h902.size();
            int i6 = 0;
            while (i6 < size2) {
                H90 h906 = h902;
                Object obj4 = h906.get(i6);
                c0321Mk2.R(-2026002954, oc2.g(obj4), 0, aw);
                SC sc = (SC) zq.g(obj4);
                if (sc == null) {
                    c0321Mk2.V(1618454323);
                } else {
                    c0321Mk2.V(-2026001778);
                    sc.f(c0321Mk2, 0);
                }
                c0321Mk2.q(false);
                c0321Mk2.q(false);
                i6++;
                h902 = h906;
            }
            c0321Mk2.q(false);
            c0321Mk2.q(true);
        } else {
            oc3 = oc;
            c0321Mk2 = c0321Mk;
            c0321Mk2.Q();
        }
        L00 l00S = c0321Mk2.s();
        if (l00S != null) {
            l00S.d = new C2497t6(c3114zg0, mp, oc3, oc2, c0554Vj, i);
        }
    }
}
