package o;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.zg0, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C3114zg0 {
    public final C1383hR a;
    public final C3114zg0 b;
    public final String c;
    public final MV d = AbstractC0752ap.X(c());
    public final MV e = AbstractC0752ap.X(new C2639ug0(c(), c()));
    public final KV f = new KV(0);
    public final KV g = new KV(Long.MIN_VALUE);
    public final MV h;
    public final H90 i;
    public final H90 j;
    public final MV k;

    public C3114zg0(C1383hR c1383hR, C3114zg0 c3114zg0, String str) {
        this.a = c1383hR;
        this.b = c3114zg0;
        this.c = str;
        Boolean bool = Boolean.FALSE;
        this.h = AbstractC0752ap.X(bool);
        this.i = new H90();
        this.j = new H90();
        this.k = AbstractC0752ap.X(bool);
        AbstractC0752ap.E(new C2070og0(this, 1));
    }

    public final void a(Object obj, C0321Mk c0321Mk, int i) {
        int i2;
        c0321Mk.X(-1493585151);
        if ((i & 6) == 0) {
            i2 = ((i & 8) == 0 ? c0321Mk.f(obj) : c0321Mk.h(obj) ? 4 : 2) | i;
        } else {
            i2 = i;
        }
        if ((i & 48) == 0) {
            i2 |= c0321Mk.f(this) ? 32 : 16;
        }
        if (!c0321Mk.N(i2 & 1, (i2 & 19) != 18)) {
            c0321Mk.Q();
        } else if (g()) {
            c0321Mk.V(467781377);
            c0321Mk.q(false);
        } else {
            c0321Mk.V(466120769);
            k(obj);
            int i3 = i2 & 112;
            boolean z = i3 == 32;
            Object objK = c0321Mk.K();
            J7 j7 = C0140Fk.a;
            if (z || objK == j7) {
                objK = AbstractC0752ap.E(new C2070og0(this, 0));
                c0321Mk.f0(objK);
            }
            if (((Boolean) ((InterfaceC3007ya0) objK).getValue()).booleanValue()) {
                c0321Mk.V(466528884);
                Object objK2 = c0321Mk.K();
                if (objK2 == j7) {
                    objK2 = AbstractC0249Jp.B(c0321Mk);
                    c0321Mk.f0(objK2);
                }
                InterfaceC0065Cn interfaceC0065Cn = (InterfaceC0065Cn) objK2;
                boolean zH = c0321Mk.h(interfaceC0065Cn) | (i3 == 32);
                Object objK3 = c0321Mk.K();
                if (zH || objK3 == j7) {
                    objK3 = new C1590je(19, interfaceC0065Cn, this);
                    c0321Mk.f0(objK3);
                }
                OC oc = (OC) objK3;
                boolean zF = c0321Mk.f(interfaceC0065Cn) | c0321Mk.f(this);
                Object objK4 = c0321Mk.K();
                if (zF || objK4 == j7) {
                    objK4 = new C2188ps(oc);
                    c0321Mk.f0(objK4);
                }
                c0321Mk.q(false);
            } else {
                c0321Mk.V(467771457);
                c0321Mk.q(false);
            }
            c0321Mk.q(false);
        }
        L00 l00S = c0321Mk.s();
        if (l00S != null) {
            l00S.d = new C0502Tj(i, 6, this, obj);
        }
    }

    public final long b() {
        H90 h90 = this.i;
        int size = h90.size();
        long jMax = 0;
        for (int i = 0; i < size; i++) {
            KV kv = ((C2734vg0) h90.get(i)).u;
            jMax = Math.max(jMax, ((A90) AbstractC2884x90.t(kv.m, kv)).c);
        }
        H90 h902 = this.j;
        int size2 = h902.size();
        for (int i2 = 0; i2 < size2; i2++) {
            jMax = Math.max(jMax, ((C3114zg0) h902.get(i2)).b());
        }
        return jMax;
    }

    public final Object c() {
        return this.a.b.getValue();
    }

    public final boolean d() {
        H90 h90 = this.i;
        int size = h90.size();
        for (int i = 0; i < size; i++) {
            ((C2734vg0) h90.get(i)).getClass();
        }
        H90 h902 = this.j;
        int size2 = h902.size();
        for (int i2 = 0; i2 < size2; i2++) {
            if (((C3114zg0) h902.get(i2)).d()) {
                return true;
            }
        }
        return false;
    }

    public final long e() {
        C3114zg0 c3114zg0 = this.b;
        if (c3114zg0 != null) {
            return c3114zg0.e();
        }
        KV kv = this.f;
        return ((A90) AbstractC2884x90.t(kv.m, kv)).c;
    }

    public final InterfaceC2544tg0 f() {
        return (InterfaceC2544tg0) this.e.getValue();
    }

    public final boolean g() {
        return ((Boolean) this.k.getValue()).booleanValue();
    }

    public final void h(boolean z, long j) {
        C1383hR c1383hR = this.a;
        MV mv = c1383hR.a;
        KV kv = this.g;
        if (((A90) AbstractC2884x90.t(kv.m, kv)).c == Long.MIN_VALUE) {
            kv.g(j);
            c1383hR.a.setValue(Boolean.TRUE);
        } else if (!((Boolean) mv.getValue()).booleanValue()) {
            mv.setValue(Boolean.TRUE);
        }
        this.h.setValue(Boolean.FALSE);
        H90 h90 = this.i;
        int size = h90.size();
        boolean z2 = true;
        for (int i = 0; i < size; i++) {
            C2734vg0 c2734vg0 = (C2734vg0) h90.get(i);
            MV mv2 = c2734vg0.p;
            MV mv3 = c2734vg0.p;
            if (!((Boolean) mv2.getValue()).booleanValue()) {
                long jC = z ? c2734vg0.a().c() : j;
                c2734vg0.s.setValue(c2734vg0.a().b(jC));
                c2734vg0.t = c2734vg0.a().f(jC);
                if (c2734vg0.a().g(jC)) {
                    mv3.setValue(Boolean.TRUE);
                }
            }
            if (!((Boolean) mv3.getValue()).booleanValue()) {
                z2 = false;
            }
        }
        H90 h902 = this.j;
        int size2 = h902.size();
        for (int i2 = 0; i2 < size2; i2++) {
            C3114zg0 c3114zg0 = (C3114zg0) h902.get(i2);
            if (!F3.c(c3114zg0.d.getValue(), c3114zg0.c())) {
                c3114zg0.h(z, j);
            }
            if (!F3.c(c3114zg0.d.getValue(), c3114zg0.c())) {
                z2 = false;
            }
        }
        if (z2) {
            i();
        }
    }

    public final void i() {
        this.g.g(Long.MIN_VALUE);
        Object value = this.d.getValue();
        C1383hR c1383hR = this.a;
        c1383hR.b.setValue(value);
        if (this.b == null) {
            this.f.g(0L);
        }
        c1383hR.a.setValue(Boolean.FALSE);
        H90 h90 = this.j;
        int size = h90.size();
        for (int i = 0; i < size; i++) {
            ((C3114zg0) h90.get(i)).i();
        }
    }

    public final void j(Object obj, Object obj2) {
        this.g.g(Long.MIN_VALUE);
        C1383hR c1383hR = this.a;
        c1383hR.a.setValue(Boolean.FALSE);
        boolean zG = g();
        MV mv = this.d;
        if (!zG || !F3.c(c(), obj) || !F3.c(mv.getValue(), obj2)) {
            if (!F3.c(c(), obj)) {
                c1383hR.b.setValue(obj);
            }
            mv.setValue(obj2);
            this.k.setValue(Boolean.TRUE);
            this.e.setValue(new C2639ug0(obj, obj2));
        }
        H90 h90 = this.j;
        int size = h90.size();
        for (int i = 0; i < size; i++) {
            C3114zg0 c3114zg0 = (C3114zg0) h90.get(i);
            if (c3114zg0.g()) {
                c3114zg0.j(c3114zg0.c(), c3114zg0.d.getValue());
            }
        }
        H90 h902 = this.i;
        int size2 = h902.size();
        for (int i2 = 0; i2 < size2; i2++) {
            ((C2734vg0) h902.get(i2)).c();
        }
    }

    public final void k(Object obj) {
        MV mv = this.d;
        if (F3.c(mv.getValue(), obj)) {
            return;
        }
        this.e.setValue(new C2639ug0(mv.getValue(), obj));
        if (!F3.c(c(), mv.getValue())) {
            this.a.b.setValue(mv.getValue());
        }
        mv.setValue(obj);
        KV kv = this.g;
        if (((A90) AbstractC2884x90.t(kv.m, kv)).c == Long.MIN_VALUE) {
            this.h.setValue(Boolean.TRUE);
        }
        H90 h90 = this.i;
        int size = h90.size();
        for (int i = 0; i < size; i++) {
            ((C2734vg0) h90.get(i)).q.h(-2.0f);
        }
    }

    public final String toString() {
        H90 h90 = this.i;
        int size = h90.size();
        String str = "Transition animation values: ";
        for (int i = 0; i < size; i++) {
            str = str + ((C2734vg0) h90.get(i)) + ", ";
        }
        return str;
    }
}
