package o;

import android.content.Context;
import android.content.res.Resources;
import android.os.Build;
import java.io.IOException;
import org.xmlpull.v1.XmlPullParserException;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.Hq, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public abstract class AbstractC0198Hq {
    public static final XX a = new XX(14);

    public static final void a(C1968nd c1968nd, C1495id0 c1495id0, C0321Mk c0321Mk, int i) {
        C0321Mk c0321Mk2;
        Context context;
        c0321Mk.X(1904307118);
        int i2 = (c0321Mk.f(c1968nd) ? 4 : 2) | i | (c0321Mk.h(c1495id0) ? 32 : 16);
        if (c0321Mk.N(i2 & 1, (i2 & 19) != 18)) {
            if (Build.VERSION.SDK_INT >= 28) {
                c0321Mk.V(-1009462744);
                context = (Context) c0321Mk.j(N3.b);
                c0321Mk.q(false);
            } else {
                c0321Mk.V(-1009413640);
                c0321Mk.q(false);
                context = null;
            }
            boolean zH = c0321Mk.h(c1495id0) | ((i2 & 14) == 4) | c0321Mk.h(context);
            Object objK = c0321Mk.K();
            if (zH || objK == C0140Fk.a) {
                objK = new C1358h6(c1495id0, context, c1968nd, 4);
                c0321Mk.f0(objK);
            }
            c0321Mk2 = c0321Mk;
            AbstractC0142Fm.b(null, null, (OC) objK, c0321Mk2, 0, 3);
        } else {
            c0321Mk2 = c0321Mk;
            c0321Mk2.Q();
        }
        L00 l00S = c0321Mk2.s();
        if (l00S != null) {
            l00S.d = new C0032Bg(i, 3, c1968nd, c1495id0);
        }
    }

    public static final void b(final int i, final long j, C0321Mk c0321Mk, final int i2) throws XmlPullParserException, Resources.NotFoundException, IOException {
        final int i3;
        int i4;
        L00 l00S;
        SC sc;
        c0321Mk.X(-1240244237);
        if ((i2 & 6) == 0) {
            i3 = i;
            i4 = i2 | (c0321Mk.d(i3) ? 4 : 2);
        } else {
            i3 = i;
            i4 = i2;
        }
        if ((i2 & 48) == 0) {
            i4 |= c0321Mk.e(j) ? 32 : 16;
        }
        if (c0321Mk.N(i4 & 1, (i4 & 19) != 18)) {
            Context context = (Context) c0321Mk.j(N3.b);
            boolean zF = ((i4 & 14) == 4) | c0321Mk.f(context);
            Object objK = c0321Mk.K();
            Object obj = C0140Fk.a;
            if (zF || objK == obj) {
                objK = Integer.valueOf(context.obtainStyledAttributes(new int[]{i3}).getResourceId(0, -1));
                c0321Mk.f0(objK);
            }
            int iIntValue = ((Number) objK).intValue();
            if (iIntValue == -1) {
                l00S = c0321Mk.s();
                if (l00S != null) {
                    final int i5 = 0;
                    sc = new SC() { // from class: o.Fq
                        @Override // o.SC
                        public final Object f(Object obj2, Object obj3) throws XmlPullParserException, Resources.NotFoundException, IOException {
                            int i6 = i5;
                            C0321Mk c0321Mk2 = (C0321Mk) obj2;
                            ((Integer) obj3).getClass();
                            switch (i6) {
                                case 0:
                                    AbstractC0198Hq.b(i3, j, c0321Mk2, AbstractC1904ms0.D(i2 | 1));
                                    break;
                                default:
                                    AbstractC0198Hq.b(i3, j, c0321Mk2, AbstractC1904ms0.D(i2 | 1));
                                    break;
                            }
                            return Oh0.a;
                        }
                    };
                    l00S.d = sc;
                }
                return;
            }
            AbstractC2811wV abstractC2811wVY = AbstractC0752ap.Y(iIntValue, c0321Mk);
            boolean z = (i4 & 112) == 32;
            Object objK2 = c0321Mk.K();
            if (z || objK2 == obj) {
                objK2 = j == 16 ? null : new C0444Rd(5, j);
                c0321Mk.f0(objK2);
            }
            AbstractC3109ze.a(androidx.compose.ui.draw.a.d(androidx.compose.foundation.layout.c.h(JP.a, AbstractC0038Bm.j), abstractC2811wVY, C2460sm.b, 0.0f, (C0444Rd) objK2, 22), c0321Mk, 0);
        } else {
            c0321Mk.Q();
        }
        l00S = c0321Mk.s();
        if (l00S != null) {
            final int i6 = 1;
            sc = new SC() { // from class: o.Fq
                @Override // o.SC
                public final Object f(Object obj2, Object obj3) throws XmlPullParserException, Resources.NotFoundException, IOException {
                    int i62 = i6;
                    C0321Mk c0321Mk2 = (C0321Mk) obj2;
                    ((Integer) obj3).getClass();
                    switch (i62) {
                        case 0:
                            AbstractC0198Hq.b(i, j, c0321Mk2, AbstractC1904ms0.D(i2 | 1));
                            break;
                        default:
                            AbstractC0198Hq.b(i, j, c0321Mk2, AbstractC1904ms0.D(i2 | 1));
                            break;
                    }
                    return Oh0.a;
                }
            };
            l00S.d = sc;
        }
    }

    public static final void c(C1968nd c1968nd, InterfaceC1589jd0 interfaceC1589jd0, NC nc, C0321Mk c0321Mk, int i) {
        int i2;
        c0321Mk.X(-2040393164);
        if ((i & 6) == 0) {
            i2 = ((i & 8) == 0 ? c0321Mk.f(c1968nd) : c0321Mk.h(c1968nd) ? 4 : 2) | i;
        } else {
            i2 = i;
        }
        if ((i & 48) == 0) {
            i2 |= (i & 64) == 0 ? c0321Mk.f(interfaceC1589jd0) : c0321Mk.h(interfaceC1589jd0) ? 32 : 16;
        }
        if ((i & 384) == 0) {
            i2 |= c0321Mk.h(nc) ? 256 : 128;
        }
        boolean z = false;
        if (c0321Mk.N(i2 & 1, (i2 & 147) != 146)) {
            boolean z2 = (i2 & 112) == 32 || ((i2 & 64) != 0 && c0321Mk.f(interfaceC1589jd0));
            Object objK = c0321Mk.K();
            J7 j7 = C0140Fk.a;
            if (z2 || objK == j7) {
                objK = new C2234qN(new OD(27, new C2590u5(6, interfaceC1589jd0, nc)));
                c0321Mk.f0(objK);
            }
            C2234qN c2234qN = (C2234qN) objK;
            if ((i2 & 14) == 4 || ((i2 & 8) != 0 && c0321Mk.h(c1968nd))) {
                z = true;
            }
            Object objK2 = c0321Mk.K();
            if (z || objK2 == j7) {
                objK2 = new C1164f5(5, c1968nd);
                c0321Mk.f0(objK2);
            }
            AbstractC1068e5.a(c2234qN, (NC) objK2, a, C2887xC.y(1315155414, new C2731vf(1, interfaceC1589jd0, c1968nd), c0321Mk), c0321Mk, 3456, 0);
        } else {
            c0321Mk.Q();
        }
        L00 l00S = c0321Mk.s();
        if (l00S != null) {
            l00S.d = new C1452i5(c1968nd, interfaceC1589jd0, nc, i, 5);
        }
    }

    public static final void d(MP mp, C0554Vj c0554Vj, C0321Mk c0321Mk, int i) {
        int i2;
        c0321Mk.X(1392105195);
        int i3 = 2;
        if ((i & 6) == 0) {
            i2 = (c0321Mk.f(mp) ? 4 : 2) | i;
        } else {
            i2 = i;
        }
        if ((i & 48) == 0) {
            i2 |= c0321Mk.h(c0554Vj) ? 32 : 16;
        }
        if (c0321Mk.N(i2 & 1, (i2 & 19) != 18)) {
            C0935cl c0935cl = AbstractC2348rd0.a;
            C0554Vj c0554Vj2 = AbstractC1029dk.a;
            AbstractC2539te.c(mp, c0935cl, c0554Vj, c0321Mk, ((i2 << 6) & 7168) | (i2 & 14) | 432);
        } else {
            c0321Mk.Q();
        }
        L00 l00S = c0321Mk.s();
        if (l00S != null) {
            l00S.d = new B5(mp, c0554Vj, i, i3);
        }
    }
}
