package o;

import android.R;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.Rect;
import android.os.Build;
import android.text.Spanned;
import android.text.TextPaint;
import android.text.TextUtils;
import android.text.style.MetricAffectingSpan;
import android.view.View;
import com.google.android.gms.common.internal.Preconditions;
import java.util.Arrays;
import java.util.List;
import java.util.NoSuchElementException;
import java.util.concurrent.atomic.AtomicReference;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.Zn, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public abstract class AbstractC0662Zn {
    public static final int[] a = {R.attr.name, R.attr.tint, R.attr.height, R.attr.width, R.attr.alpha, R.attr.autoMirrored, R.attr.tintMode, R.attr.viewportWidth, R.attr.viewportHeight};
    public static final int[] b = {R.attr.name, R.attr.pivotX, R.attr.pivotY, R.attr.scaleX, R.attr.scaleY, R.attr.rotation, R.attr.translateX, R.attr.translateY};
    public static final int[] c = {R.attr.name, R.attr.fillColor, R.attr.pathData, R.attr.strokeColor, R.attr.strokeWidth, R.attr.trimPathStart, R.attr.trimPathEnd, R.attr.trimPathOffset, R.attr.strokeLineCap, R.attr.strokeLineJoin, R.attr.strokeMiterLimit, R.attr.strokeAlpha, R.attr.fillAlpha, R.attr.fillType};
    public static final int[] d = {R.attr.name, R.attr.pathData, R.attr.fillType};
    public static final int[] e = {R.attr.drawable};
    public static final int[] f = {R.attr.name, R.attr.animation};
    public static final String[] g = {"standard", "accelerate", "decelerate", "linear"};
    public static final StackTraceElement[] h = new StackTraceElement[0];
    public static final Object i = new Object();
    public static CG j;
    public static CG k;
    public static CG l;

    public static final int A(C1556jA c1556jA, int i2) {
        LP lp;
        C0312Mb c0312Mb;
        int iOrdinal = c1556jA.J0().ordinal();
        if (iOrdinal != 0) {
            if (iOrdinal == 1) {
                C1556jA c1556jAL = AbstractC0752ap.L(c1556jA);
                if (c1556jAL != null) {
                    return y(c1556jAL, i2);
                }
                throw new IllegalArgumentException("ActiveParent with no focused child");
            }
            if (iOrdinal != 2) {
                if (iOrdinal != 3) {
                    throw new C2170pj();
                }
                if (!c1556jA.l.y) {
                    AbstractC2133pH.b("visitAncestors called on an unattached node");
                }
                LP lp2 = c1556jA.l.p;
                C2420sK c2420sKS = AbstractC2539te.S(c1556jA);
                loop0: while (true) {
                    lp = null;
                    if (c2420sKS == null) {
                        break;
                    }
                    if ((((LP) c2420sKS.N.g).f209o & 1024) != 0) {
                        while (lp2 != null) {
                            if ((lp2.n & 1024) != 0) {
                                LP lpI = lp2;
                                C1479iR c1479iR = null;
                                while (lpI != null) {
                                    if (lpI instanceof C1556jA) {
                                        lp = lpI;
                                        break loop0;
                                    }
                                    if ((lpI.n & 1024) != 0 && (lpI instanceof AbstractC0561Vq)) {
                                        int i3 = 0;
                                        for (LP lp3 = ((AbstractC0561Vq) lpI).A; lp3 != null; lp3 = lp3.q) {
                                            if ((lp3.n & 1024) != 0) {
                                                i3++;
                                                if (i3 == 1) {
                                                    lpI = lp3;
                                                } else {
                                                    if (c1479iR == null) {
                                                        c1479iR = new C1479iR(new LP[16]);
                                                    }
                                                    if (lpI != null) {
                                                        c1479iR.b(lpI);
                                                        lpI = null;
                                                    }
                                                    c1479iR.b(lp3);
                                                }
                                            }
                                        }
                                        if (i3 == 1) {
                                        }
                                    }
                                    lpI = AbstractC2539te.i(c1479iR);
                                }
                            }
                            lp2 = lp2.p;
                        }
                    }
                    c2420sKS = c2420sKS.s();
                    lp2 = (c2420sKS == null || (c0312Mb = c2420sKS.N) == null) ? null : (Bc0) c0312Mb.f;
                }
                C1556jA c1556jA2 = (C1556jA) lp;
                if (c1556jA2 != null) {
                    int iOrdinal2 = c1556jA2.J0().ordinal();
                    if (iOrdinal2 == 0) {
                        return z(c1556jA2, i2);
                    }
                    if (iOrdinal2 == 1) {
                        return A(c1556jA2, i2);
                    }
                    if (iOrdinal2 == 2) {
                        return 2;
                    }
                    if (iOrdinal2 != 3) {
                        throw new C2170pj();
                    }
                    int iA = A(c1556jA2, i2);
                    int i4 = iA != 1 ? iA : 0;
                    return i4 == 0 ? z(c1556jA2, i2) : i4;
                }
            }
        }
        return 1;
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Removed duplicated region for block: B:142:0x01fb  */
    /* JADX WARN: Removed duplicated region for block: B:144:0x0204 A[ADDED_TO_REGION, LOOP:9: B:144:0x0204->B:151:0x0214, LOOP_START, PHI: r12
      0x0204: PHI (r12v3 int) = (r12v2 int), (r12v4 int) binds: [B:143:0x0202, B:151:0x0214] A[DONT_GENERATE, DONT_INLINE]] */
    /* JADX WARN: Removed duplicated region for block: B:152:0x021a  */
    /* JADX WARN: Removed duplicated region for block: B:155:0x021f  */
    /* JADX WARN: Type inference failed for: r4v27, types: [java.lang.Object, java.lang.Object[]] */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public static final boolean B(o.C1556jA r18) {
        /*
            Method dump skipped, instructions count: 556
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: o.AbstractC0662Zn.B(o.jA):boolean");
    }

    public static final Object C(Object[] objArr, NC nc, C0321Mk c0321Mk) {
        return D(Arrays.copyOf(objArr, objArr.length), AbstractC2399s40.a, nc, c0321Mk, 3456);
    }

    public static final Object D(Object[] objArr, InterfaceC2210q40 interfaceC2210q40, NC nc, C0321Mk c0321Mk, int i2) {
        Object[] objArr2;
        InterfaceC2210q40 interfaceC2210q402;
        Object obj;
        Object objC;
        long j2 = c0321Mk.R;
        AbstractC0940cn0.g(36);
        String string = Long.toString(j2, 36);
        Z30 z30 = (Z30) c0321Mk.j(AbstractC0876c40.a);
        Object objK = c0321Mk.K();
        Object obj2 = C0140Fk.a;
        if (objK == obj2) {
            Object objB = (z30 == null || (objC = z30.c(string)) == null) ? null : interfaceC2210q40.b(objC);
            if (objB == null) {
                objB = nc.a();
            }
            objArr2 = objArr;
            interfaceC2210q402 = interfaceC2210q40;
            Object x30 = new X30(interfaceC2210q402, z30, string, objB, objArr2);
            c0321Mk.f0(x30);
            objK = x30;
        } else {
            objArr2 = objArr;
            interfaceC2210q402 = interfaceC2210q40;
        }
        X30 x302 = (X30) objK;
        Object objA = Arrays.equals(objArr2, x302.p) ? x302.f405o : null;
        if (objA == null) {
            objA = nc.a();
        }
        boolean zH = c0321Mk.h(x302) | ((((i2 & 112) ^ 48) > 32 && c0321Mk.h(interfaceC2210q402)) || (i2 & 48) == 32) | c0321Mk.h(z30) | c0321Mk.f(string) | c0321Mk.h(objA) | c0321Mk.h(objArr2);
        Object objK2 = c0321Mk.K();
        if (zH || objK2 == obj2) {
            Object[] objArr3 = objArr2;
            obj = objA;
            Object c2527tW = new C2527tW(x302, interfaceC2210q402, z30, string, obj, objArr3);
            c0321Mk.f0(c2527tW);
            objK2 = c2527tW;
        } else {
            obj = objA;
        }
        AbstractC0249Jp.k((NC) objK2, c0321Mk);
        return obj;
    }

    public static final C0837bj0 E(CG cg, C0321Mk c0321Mk) {
        InterfaceC2281qr interfaceC2281qr = (InterfaceC2281qr) c0321Mk.j(AbstractC0840bl.h);
        float f2 = cg.j;
        boolean zE = c0321Mk.e((Float.floatToRawIntBits(interfaceC2281qr.e()) & 4294967295L) | (Float.floatToRawIntBits(f2) << 32));
        Object objK = c0321Mk.K();
        if (zE || objK == C0140Fk.a) {
            C2130pE c2130pE = new C2130pE();
            p(c2130pE, cg.f);
            float f3 = cg.b;
            float f4 = cg.c;
            long jFloatToRawIntBits = (Float.floatToRawIntBits(interfaceC2281qr.B(f3)) << 32) | (Float.floatToRawIntBits(interfaceC2281qr.B(f4)) & 4294967295L);
            float fIntBitsToFloat = cg.d;
            float fIntBitsToFloat2 = cg.e;
            if (Float.isNaN(fIntBitsToFloat)) {
                fIntBitsToFloat = Float.intBitsToFloat((int) (jFloatToRawIntBits >> 32));
            }
            if (Float.isNaN(fIntBitsToFloat2)) {
                fIntBitsToFloat2 = Float.intBitsToFloat((int) (jFloatToRawIntBits & 4294967295L));
            }
            long jFloatToRawIntBits2 = (Float.floatToRawIntBits(fIntBitsToFloat) << 32) | (4294967295L & Float.floatToRawIntBits(fIntBitsToFloat2));
            C0837bj0 c0837bj0 = new C0837bj0(c2130pE);
            String str = cg.a;
            long j2 = cg.g;
            C0444Rd c0444Rd = j2 != 16 ? new C0444Rd(cg.h, j2) : null;
            boolean z = cg.i;
            c0837bj0.q.setValue(new T80(jFloatToRawIntBits));
            c0837bj0.r.setValue(Boolean.valueOf(z));
            Mi0 mi0 = c0837bj0.s;
            mi0.g.setValue(c0444Rd);
            mi0.i.setValue(new T80(jFloatToRawIntBits2));
            mi0.c = str;
            c0321Mk.f0(c0837bj0);
            objK = c0837bj0;
        }
        return (C0837bj0) objK;
    }

    public static final View F(InterfaceC0535Uq interfaceC0535Uq) {
        if (!((LP) interfaceC0535Uq).l.y) {
            AbstractC2133pH.b("Cannot get View because the Modifier node is not currently attached.");
        }
        return (View) AbstractC2705vK.a(AbstractC2539te.S(interfaceC0535Uq));
    }

    public static final Object I(Ef0 ef0, SC sc) throws Throwable {
        Object c2075oj;
        Object objY;
        AbstractC0752ap.Q(ef0, true, new C2852ws(0, F3.y(ef0.f225o.h()).u(ef0.p, ef0, ef0.n)));
        try {
            if (sc instanceof AbstractC0728ad) {
                AbstractC1692kh0.l(2, sc);
                c2075oj = sc.f(ef0, ef0);
            } else {
                c2075oj = AbstractC2539te.Y(sc, ef0, ef0);
            }
        } catch (Throwable th) {
            c2075oj = new C2075oj(th, false);
        }
        EnumC0091Dn enumC0091Dn = EnumC0091Dn.l;
        if (c2075oj == enumC0091Dn || (objY = ef0.Y(c2075oj)) == AbstractC2841wm0.d) {
            return enumC0091Dn;
        }
        if (objY instanceof C2075oj) {
            Throwable th2 = ((C2075oj) objY).a;
            if (!(th2 instanceof Df0) || ((Df0) th2).l != ef0) {
                throw th2;
            }
            if (c2075oj instanceof C2075oj) {
                throw ((C2075oj) c2075oj).a;
            }
        } else {
            c2075oj = AbstractC2841wm0.K(objY);
        }
        return c2075oj;
    }

    public static String J(long j2) {
        int i2 = (int) (j2 >> 32);
        int i3 = (int) (j2 & 4294967295L);
        if (Float.intBitsToFloat(i2) == Float.intBitsToFloat(i3)) {
            return "CornerRadius.circular(" + C80.X(Float.intBitsToFloat(i2)) + ')';
        }
        return "CornerRadius.elliptical(" + C80.X(Float.intBitsToFloat(i2)) + ", " + C80.X(Float.intBitsToFloat(i3)) + ')';
    }

    public static final String K(byte b2) {
        return b2 == 1 ? "quotation mark '\"'" : b2 == 2 ? "string escape sequence '\\'" : b2 == 4 ? "comma ','" : b2 == 5 ? "colon ':'" : b2 == 6 ? "start of the object '{'" : b2 == 7 ? "end of the object '}'" : b2 == 8 ? "start of the array '['" : b2 == 9 ? "end of the array ']'" : b2 == 10 ? "end of the input" : b2 == Byte.MAX_VALUE ? "invalid token" : "valid token";
    }

    public static final C1201fa0 L(int i2, C0321Mk c0321Mk) {
        InterfaceC0903cQ interfaceC0903cQ = (InterfaceC0903cQ) c0321Mk.j(AbstractC1476iO.a);
        int iW = AbstractC2462sn.w(i2);
        if (iW == 0) {
            ((C0808bQ) interfaceC0903cQ).getClass();
            return C0808bQ.b;
        }
        if (iW == 1) {
            ((C0808bQ) interfaceC0903cQ).getClass();
            return C0808bQ.c;
        }
        if (iW == 2) {
            ((C0808bQ) interfaceC0903cQ).getClass();
            return C0808bQ.d;
        }
        if (iW == 3) {
            ((C0808bQ) interfaceC0903cQ).getClass();
            return C0808bQ.e;
        }
        if (iW == 4) {
            ((C0808bQ) interfaceC0903cQ).getClass();
            return C0808bQ.f;
        }
        if (iW != 5) {
            throw new C2170pj();
        }
        ((C0808bQ) interfaceC0903cQ).getClass();
        return C0808bQ.g;
    }

    /* JADX WARN: Removed duplicated region for block: B:7:0x0013  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public static final java.lang.Object M(long r5, o.SC r7, o.AbstractC0298Lm r8) throws java.lang.Throwable {
        /*
            boolean r0 = r8 instanceof o.Ff0
            if (r0 == 0) goto L13
            r0 = r8
            o.Ff0 r0 = (o.Ff0) r0
            int r1 = r0.q
            r2 = -2147483648(0xffffffff80000000, float:-0.0)
            r3 = r1 & r2
            if (r3 == 0) goto L13
            int r1 = r1 - r2
            r0.q = r1
            goto L18
        L13:
            o.Ff0 r0 = new o.Ff0
            r0.<init>(r8)
        L18:
            java.lang.Object r8 = r0.p
            int r1 = r0.q
            r2 = 1
            if (r1 == 0) goto L31
            if (r1 != r2) goto L29
            o.B10 r5 = r0.f123o
            o.IJ.H(r8)     // Catch: o.Df0 -> L27
            return r8
        L27:
            r6 = move-exception
            goto L57
        L29:
            java.lang.IllegalStateException r5 = new java.lang.IllegalStateException
            java.lang.String r6 = "call to 'resume' before 'invoke' with coroutine"
            r5.<init>(r6)
            throw r5
        L31:
            o.IJ.H(r8)
            r3 = 0
            int r8 = (r5 > r3 ? 1 : (r5 == r3 ? 0 : -1))
            if (r8 > 0) goto L3b
            goto L5d
        L3b:
            o.B10 r8 = new o.B10
            r8.<init>()
            r0.f123o = r8     // Catch: o.Df0 -> L55
            r0.q = r2     // Catch: o.Df0 -> L55
            o.Ef0 r1 = new o.Ef0     // Catch: o.Df0 -> L55
            r1.<init>(r5, r0)     // Catch: o.Df0 -> L55
            r8.l = r1     // Catch: o.Df0 -> L55
            java.lang.Object r5 = I(r1, r7)     // Catch: o.Df0 -> L55
            o.Dn r6 = o.EnumC0091Dn.l
            if (r5 != r6) goto L54
            return r6
        L54:
            return r5
        L55:
            r6 = move-exception
            r5 = r8
        L57:
            o.TI r7 = r6.l
            java.lang.Object r5 = r5.l
            if (r7 != r5) goto L5f
        L5d:
            r5 = 0
            return r5
        L5f:
            throw r6
        */
        throw new UnsupportedOperationException("Method not decompiled: o.AbstractC0662Zn.M(long, o.SC, o.Lm):java.lang.Object");
    }

    public static String N(Context context, String str) {
        Preconditions.checkNotNull(context);
        Resources resources = context.getResources();
        if (TextUtils.isEmpty(str)) {
            str = AbstractC2946xr0.a(context);
        }
        int identifier = resources.getIdentifier("google_app_id", "string", str);
        if (identifier == 0) {
            return null;
        }
        try {
            return resources.getString(identifier);
        } catch (Resources.NotFoundException unused) {
            return null;
        }
    }

    public static String O(String str, String[] strArr, String[] strArr2) {
        Preconditions.checkNotNull(strArr);
        Preconditions.checkNotNull(strArr2);
        int iMin = Math.min(strArr.length, strArr2.length);
        for (int i2 = 0; i2 < iMin; i2++) {
            String str2 = strArr[i2];
            if ((str == null && str2 == null) || (str != null && str.equals(str2))) {
                return strArr2[i2];
            }
        }
        return null;
    }

    /* JADX WARN: Removed duplicated region for block: B:123:0x0193 A[Catch: RejectedExecutionException -> 0x01e6, TryCatch #1 {RejectedExecutionException -> 0x01e6, blocks: (B:121:0x018d, B:127:0x019a, B:129:0x01ac, B:135:0x01b9, B:137:0x01cb, B:144:0x01e1, B:139:0x01cf, B:143:0x01dd, B:131:0x01b2, B:123:0x0193), top: B:169:0x018d }] */
    /* JADX WARN: Removed duplicated region for block: B:125:0x0197  */
    /* JADX WARN: Removed duplicated region for block: B:148:0x01ee  */
    /* JADX WARN: Removed duplicated region for block: B:151:0x022f  */
    /* JADX WARN: Removed duplicated region for block: B:152:0x0233  */
    /* JADX WARN: Removed duplicated region for block: B:157:0x0259  */
    /* JADX WARN: Removed duplicated region for block: B:161:0x0266  */
    /* JADX WARN: Removed duplicated region for block: B:164:0x0272  */
    /* JADX WARN: Removed duplicated region for block: B:171:? A[RETURN, SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:47:0x007d  */
    /* JADX WARN: Removed duplicated region for block: B:49:0x0081  */
    /* JADX WARN: Removed duplicated region for block: B:58:0x0097  */
    /* JADX WARN: Removed duplicated region for block: B:65:0x00a9  */
    /* JADX WARN: Removed duplicated region for block: B:66:0x00ae  */
    /* JADX WARN: Removed duplicated region for block: B:75:0x00c9  */
    /* JADX WARN: Removed duplicated region for block: B:76:0x00ce  */
    /* JADX WARN: Removed duplicated region for block: B:88:0x00f5  */
    /* JADX WARN: Removed duplicated region for block: B:89:0x00f7  */
    /* JADX WARN: Removed duplicated region for block: B:92:0x0100  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public static final void a(final java.lang.String r19, final o.MP r20, final o.C0733af0 r21, int r22, boolean r23, final int r24, int r25, o.C0321Mk r26, final int r27, final int r28) {
        /*
            Method dump skipped, instructions count: 643
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: o.AbstractC0662Zn.a(java.lang.String, o.MP, o.af0, int, boolean, int, int, o.Mk, int, int):void");
    }

    public static final Ew0 b() {
        return new Ew0(new Paint(7));
    }

    public static final A50 c(C2513tI c2513tI, InterfaceC2919xe interfaceC2919xe) {
        int iB = c2513tI.b();
        C2642ui c2642ui = (C2642ui) c2513tI.d;
        boolean z = iB == 1;
        return new A50(f(c2642ui, z, true, interfaceC2919xe), f(c2642ui, z, false, interfaceC2919xe), z);
    }

    public static final void d(Oc0 oc0, Tc0 tc0, String str) {
        Uc0.h.getClass();
        Uc0.j.fine(tc0.b + ' ' + String.format("%-22s", Arrays.copyOf(new Object[]{str}, 1)) + ": " + oc0.a);
    }

    public static final C3066z50 e(final C2513tI c2513tI, final C2642ui c2642ui, C3066z50 c3066z50) {
        int i2 = c2642ui.c;
        int i3 = c2642ui.b;
        boolean z = c2513tI.b;
        final int i4 = z ? i3 : i2;
        Ne0 ne0 = (Ne0) c2642ui.e;
        int i5 = c2642ui.d;
        final InterfaceC3085zK interfaceC3085zKY = AbstractC2001nt0.y(3, new NC() { // from class: o.B50
            @Override // o.NC
            public final Object a() {
                return Integer.valueOf(((Ne0) c2642ui.e).b.d(i4));
            }
        });
        final int i6 = z ? i2 : i3;
        InterfaceC3085zK interfaceC3085zKY2 = AbstractC2001nt0.y(3, new NC() { // from class: o.C50
            /* JADX WARN: Type inference failed for: r3v0, types: [java.lang.Object, o.zK] */
            @Override // o.NC
            public final Object a() {
                C2642ui c2642ui2 = c2642ui;
                Ne0 ne02 = (Ne0) c2642ui2.e;
                int iIntValue = ((Number) interfaceC3085zKY.getValue()).intValue();
                C2513tI c2513tI2 = c2513tI;
                boolean z2 = c2513tI2.b;
                boolean z3 = c2513tI2.b() == 1;
                int i7 = i4;
                long j2 = ne02.j(i7);
                C2331rQ c2331rQ = ne02.b;
                int i8 = Ue0.c;
                int iG = (int) (j2 >> 32);
                int iD = c2331rQ.d(iG);
                int i9 = c2331rQ.f;
                if (iD != iIntValue) {
                    iG = iIntValue >= i9 ? ne02.g(i9 - 1) : ne02.g(iIntValue);
                }
                int iC = (int) (j2 & 4294967295L);
                if (c2331rQ.d(iC) != iIntValue) {
                    iC = iIntValue >= i9 ? c2331rQ.c(i9 - 1, false) : c2331rQ.c(iIntValue, false);
                }
                int i10 = i6;
                if (iG == i10) {
                    return c2642ui2.b(iC);
                }
                if (iC == i10) {
                    return c2642ui2.b(iG);
                }
                if (!(z2 ^ z3) ? i7 >= iG : i7 > iC) {
                    iG = iC;
                }
                return c2642ui2.b(iG);
            }
        });
        if (1 != c3066z50.c) {
            return (C3066z50) interfaceC3085zKY2.getValue();
        }
        if (i4 == i5) {
            return c3066z50;
        }
        if (((Number) interfaceC3085zKY.getValue()).intValue() != ne0.b.d(i5)) {
            return (C3066z50) interfaceC3085zKY2.getValue();
        }
        int i7 = c3066z50.b;
        long j2 = ne0.j(i7);
        if (i5 != -1) {
            if (i4 != i5) {
                if (!((i3 >= i2 && i3 > i2) ^ z)) {
                }
            }
            return c2642ui.b(i4);
        }
        int i8 = Ue0.c;
        return (i7 == ((int) (j2 >> 32)) || i7 == ((int) (4294967295L & j2))) ? (C3066z50) interfaceC3085zKY2.getValue() : c2642ui.b(i4);
    }

    public static final C3066z50 f(C2642ui c2642ui, boolean z, boolean z2, InterfaceC2919xe interfaceC2919xe) {
        long j2;
        long j3 = interfaceC2919xe.j(z2 ? c2642ui.b : c2642ui.c, c2642ui);
        if (z ^ z2) {
            int i2 = Ue0.c;
            j2 = j3 >> 32;
        } else {
            int i3 = Ue0.c;
            j2 = 4294967295L & j3;
        }
        return c2642ui.b((int) j2);
    }

    public static String g(int i2, String str, int i3) {
        if (i2 < 0) {
            return Co0.I("%s (%s) must not be negative", str, Integer.valueOf(i2));
        }
        if (i3 >= 0) {
            return Co0.I("%s (%s) must not be greater than size (%s)", str, Integer.valueOf(i2), Integer.valueOf(i3));
        }
        StringBuilder sb = new StringBuilder(26);
        sb.append("negative size: ");
        sb.append(i3);
        throw new IllegalArgumentException(sb.toString());
    }

    public static final int h(long[] jArr, long j2) {
        int length = jArr.length - 1;
        int i2 = 0;
        while (i2 <= length) {
            int i3 = (i2 + length) >>> 1;
            long j3 = jArr[i3];
            if (j2 > j3) {
                i2 = i3 + 1;
            } else {
                if (j2 >= j3) {
                    return i3;
                }
                length = i3 - 1;
            }
        }
        return -(i2 + 1);
    }

    public static HL i(HL hl) {
        hl.f();
        hl.n = true;
        return hl.m > 0 ? hl : HL.f144o;
    }

    public static final C3066z50 j(C3066z50 c3066z50, C2642ui c2642ui, int i2) {
        return new C3066z50(((Ne0) c2642ui.e).a(i2), i2, c3066z50.c);
    }

    public static final byte k(char c2) {
        if (c2 < '~') {
            return C2166ph.b[c2];
        }
        return (byte) 0;
    }

    public static void l(int i2, int i3) {
        String strI;
        if (i2 < 0 || i2 >= i3) {
            if (i2 < 0) {
                strI = Co0.I("%s (%s) must not be negative", "index", Integer.valueOf(i2));
            } else {
                if (i3 < 0) {
                    StringBuilder sb = new StringBuilder(26);
                    sb.append("negative size: ");
                    sb.append(i3);
                    throw new IllegalArgumentException(sb.toString());
                }
                strI = Co0.I("%s (%s) must be less than size (%s)", "index", Integer.valueOf(i2), Integer.valueOf(i3));
            }
            throw new IndexOutOfBoundsException(strI);
        }
    }

    public static void m(int i2, int i3) {
        if (i2 < 0 || i2 > i3) {
            throw new IndexOutOfBoundsException(g(i2, "index", i3));
        }
    }

    public static void n(int i2, int i3, int i4) {
        if (i2 < 0 || i3 < i2 || i3 > i4) {
            throw new IndexOutOfBoundsException((i2 < 0 || i2 > i4) ? g(i2, "start index", i4) : (i3 < 0 || i3 > i4) ? g(i3, "end index", i4) : Co0.I("end index (%s) must not be less than start index (%s)", Integer.valueOf(i3), Integer.valueOf(i2)));
        }
    }

    public static final boolean o(C1556jA c1556jA, boolean z) {
        int iOrdinal = c1556jA.J0().ordinal();
        EnumC1366hA enumC1366hA = EnumC1366hA.f556o;
        if (iOrdinal == 0) {
            ((C0674Zz) ((C2207q3) AbstractC2539te.T(c1556jA)).getFocusOwner()).g(null);
            c1556jA.H0(EnumC1366hA.l, enumC1366hA);
            return true;
        }
        if (iOrdinal == 1) {
            C1556jA c1556jAL = AbstractC0752ap.L(c1556jA);
            if (!(c1556jAL != null ? o(c1556jAL, z) : true)) {
                return false;
            }
            c1556jA.H0(EnumC1366hA.m, enumC1366hA);
            return true;
        }
        if (iOrdinal != 2) {
            if (iOrdinal == 3) {
                return true;
            }
            throw new C2170pj();
        }
        if (z) {
            ((C0674Zz) ((C2207q3) AbstractC2539te.T(c1556jA)).getFocusOwner()).g(null);
            c1556jA.H0(EnumC1366hA.n, enumC1366hA);
        }
        return z;
    }

    public static final void p(C2130pE c2130pE, Yi0 yi0) {
        List list = yi0.u;
        int size = list.size();
        for (int i2 = 0; i2 < size; i2++) {
            AbstractC0741aj0 abstractC0741aj0 = (AbstractC0741aj0) list.get(i2);
            if (abstractC0741aj0 instanceof C0932cj0) {
                TV tv = new TV();
                C0932cj0 c0932cj0 = (C0932cj0) abstractC0741aj0;
                tv.d = c0932cj0.m;
                tv.n = true;
                tv.c();
                tv.s.a.setFillType(c0932cj0.n == 1 ? Path.FillType.EVEN_ODD : Path.FillType.WINDING);
                tv.c();
                tv.c();
                tv.b = c0932cj0.f477o;
                tv.c();
                tv.c = c0932cj0.p;
                tv.c();
                tv.g = c0932cj0.q;
                tv.c();
                tv.e = c0932cj0.r;
                tv.c();
                tv.f = c0932cj0.s;
                tv.f342o = true;
                tv.c();
                tv.h = c0932cj0.t;
                tv.f342o = true;
                tv.c();
                tv.i = c0932cj0.u;
                tv.f342o = true;
                tv.c();
                tv.j = c0932cj0.v;
                tv.f342o = true;
                tv.c();
                tv.k = c0932cj0.w;
                tv.p = true;
                tv.c();
                tv.l = c0932cj0.x;
                tv.p = true;
                tv.c();
                tv.m = c0932cj0.y;
                tv.p = true;
                tv.c();
                c2130pE.e(i2, tv);
            } else if (abstractC0741aj0 instanceof Yi0) {
                C2130pE c2130pE2 = new C2130pE();
                Yi0 yi02 = (Yi0) abstractC0741aj0;
                c2130pE2.k = yi02.l;
                c2130pE2.c();
                c2130pE2.l = yi02.m;
                c2130pE2.s = true;
                c2130pE2.c();
                c2130pE2.f675o = yi02.p;
                c2130pE2.s = true;
                c2130pE2.c();
                c2130pE2.p = yi02.q;
                c2130pE2.s = true;
                c2130pE2.c();
                c2130pE2.q = yi02.r;
                c2130pE2.s = true;
                c2130pE2.c();
                c2130pE2.r = yi02.s;
                c2130pE2.s = true;
                c2130pE2.c();
                c2130pE2.m = yi02.n;
                c2130pE2.s = true;
                c2130pE2.c();
                c2130pE2.n = yi02.f428o;
                c2130pE2.s = true;
                c2130pE2.c();
                c2130pE2.f = yi02.t;
                c2130pE2.g = true;
                c2130pE2.c();
                p(c2130pE2, yi02);
                c2130pE.e(i2, c2130pE2);
            }
        }
    }

    public static final A50 q(A50 a50, C2513tI c2513tI) {
        C2642ui c2642ui = (C2642ui) c2513tI.d;
        if (a50 != null) {
            C3066z50 c3066z50 = a50.a;
            long j2 = c3066z50.c;
            C3066z50 c3066z502 = a50.b;
            if (j2 != c3066z502.c) {
                boolean z = a50.c;
                if ((z ? c3066z50 : c3066z502).b != 0) {
                    return a50;
                }
                if (z) {
                    c3066z50 = c3066z502;
                }
                if (((Ne0) c2642ui.e).a.a.m.length() != c3066z50.b) {
                    return a50;
                }
            } else if (c3066z50.b != c3066z502.b) {
                return a50;
            }
        }
        String str = ((Ne0) c2642ui.e).a.a.m;
        A50 a502 = (A50) c2513tI.c;
        boolean z2 = c2513tI.b;
        if (a502 == null || str.length() == 0) {
            return a50;
        }
        String str2 = ((Ne0) c2642ui.e).a.a.m;
        int i2 = c2642ui.b;
        int length = str2.length();
        if (i2 == 0) {
            int iQ = AbstractC2841wm0.q(0, str2);
            return z2 ? A50.a(a50, j(a50.a, c2642ui, iQ), null, true, 2) : A50.a(a50, null, j(a50.b, c2642ui, iQ), false, 1);
        }
        if (i2 == length) {
            int iR = AbstractC2841wm0.r(length, str2);
            return z2 ? A50.a(a50, j(a50.a, c2642ui, iR), null, false, 2) : A50.a(a50, null, j(a50.b, c2642ui, iR), true, 1);
        }
        boolean z3 = a502.c;
        int iR2 = z2 ^ z3 ? AbstractC2841wm0.r(i2, str2) : AbstractC2841wm0.q(i2, str2);
        return z2 ? A50.a(a50, j(a50.a, c2642ui, iR2), null, z3, 2) : A50.a(a50, null, j(a50.b, c2642ui, iR2), z3, 1);
    }

    public static final boolean r(long j2, long j3) {
        return j2 == j3;
    }

    public static final String s(long j2) {
        String str;
        if (j2 <= -999500000) {
            str = ((j2 - 500000000) / 1000000000) + " s ";
        } else if (j2 <= -999500) {
            str = ((j2 - 500000) / 1000000) + " ms";
        } else if (j2 <= 0) {
            str = ((j2 - 500) / 1000) + " µs";
        } else if (j2 < 999500) {
            str = ((j2 + 500) / 1000) + " µs";
        } else if (j2 < 999500000) {
            str = ((j2 + 500000) / 1000000) + " ms";
        } else {
            str = ((j2 + 500000000) / 1000000000) + " s ";
        }
        return String.format("%6s", Arrays.copyOf(new Object[]{str}, 1));
    }

    public static final String t(Object obj) {
        return obj + " cannot be saved using the current SaveableStateRegistry. The default implementation only supports types which can be stored inside the Bundle. Please consider implementing a custom Saver for this class and pass it to rememberSaveable().";
    }

    public static final CG u() {
        CG cg = j;
        if (cg != null) {
            return cg;
        }
        BG bg = new BG("Filled.CalendarToday", 24.0f, 24.0f, 24.0f, 24.0f, 0L, 0, false, 96);
        int i2 = Zi0.a;
        Q90 q90 = new Q90(C0190Hi.b);
        KE ke = new KE(1);
        ke.l(20.0f, 3.0f);
        ke.i(-1.0f);
        ke.j(19.0f, 1.0f);
        ke.i(-2.0f);
        ke.r(2.0f);
        ke.j(7.0f, 3.0f);
        ke.j(7.0f, 1.0f);
        ke.j(5.0f, 1.0f);
        ke.r(2.0f);
        ke.j(4.0f, 3.0f);
        ke.g(-1.1f, 0.0f, -2.0f, 0.9f, -2.0f, 2.0f);
        ke.r(16.0f);
        ke.g(0.0f, 1.1f, 0.9f, 2.0f, 2.0f, 2.0f);
        ke.i(16.0f);
        ke.g(1.1f, 0.0f, 2.0f, -0.9f, 2.0f, -2.0f);
        ke.j(22.0f, 5.0f);
        ke.g(0.0f, -1.1f, -0.9f, -2.0f, -2.0f, -2.0f);
        ke.e();
        ke.l(20.0f, 21.0f);
        ke.j(4.0f, 21.0f);
        ke.j(4.0f, 8.0f);
        ke.i(16.0f);
        ke.r(13.0f);
        ke.e();
        BG.a(bg, ke.a, q90);
        CG cgB = bg.b();
        j = cgB;
        return cgB;
    }

    public static final Rect v(TextPaint textPaint, CharSequence charSequence, int i2, int i3) {
        int i4 = i2;
        if (charSequence instanceof Spanned) {
            Spanned spanned = (Spanned) charSequence;
            if (spanned.nextSpanTransition(i4 - 1, i3, MetricAffectingSpan.class) != i3) {
                Rect rect = new Rect();
                Rect rect2 = new Rect();
                TextPaint textPaint2 = new TextPaint();
                while (i4 < i3) {
                    int iNextSpanTransition = spanned.nextSpanTransition(i4, i3, MetricAffectingSpan.class);
                    MetricAffectingSpan[] metricAffectingSpanArr = (MetricAffectingSpan[]) spanned.getSpans(i4, iNextSpanTransition, MetricAffectingSpan.class);
                    textPaint2.set(textPaint);
                    int i5 = 0;
                    while (true) {
                        if (!(i5 < metricAffectingSpanArr.length)) {
                            break;
                        }
                        int i6 = i5 + 1;
                        try {
                            MetricAffectingSpan metricAffectingSpan = metricAffectingSpanArr[i5];
                            if (spanned.getSpanStart(metricAffectingSpan) != spanned.getSpanEnd(metricAffectingSpan)) {
                                metricAffectingSpan.updateMeasureState(textPaint2);
                            }
                            i5 = i6;
                        } catch (ArrayIndexOutOfBoundsException e2) {
                            throw new NoSuchElementException(e2.getMessage());
                        }
                    }
                    if (Build.VERSION.SDK_INT >= 29) {
                        textPaint2.getTextBounds(charSequence, i4, iNextSpanTransition, rect2);
                    } else {
                        textPaint2.getTextBounds(charSequence.toString(), i4, iNextSpanTransition, rect2);
                    }
                    rect.right = rect2.width() + rect.right;
                    rect.top = Math.min(rect.top, rect2.top);
                    rect.bottom = Math.max(rect.bottom, rect2.bottom);
                    i4 = iNextSpanTransition;
                }
                return rect;
            }
        }
        Rect rect3 = new Rect();
        if (Build.VERSION.SDK_INT >= 29) {
            textPaint.getTextBounds(charSequence, i4, i3, rect3);
            return rect3;
        }
        textPaint.getTextBounds(charSequence.toString(), i4, i3, rect3);
        return rect3;
    }

    public static final XK w(InterfaceC0898cL interfaceC0898cL) {
        WK lifecycle = interfaceC0898cL.getLifecycle();
        OD od = lifecycle.a;
        while (true) {
            XK xk = (XK) ((AtomicReference) od.m).get();
            if (xk != null) {
                return xk;
            }
            C2724vb0 c2724vb0T = AbstractC2378rs0.t();
            C2468sq c2468sq = AbstractC1903ms.a;
            XK xk2 = new XK(lifecycle, AbstractC2798wI.t(c2724vb0T, AbstractC2139pN.a.p));
            AtomicReference atomicReference = (AtomicReference) od.m;
            do {
                InterfaceC0220Im interfaceC0220Im = null;
                if (atomicReference.compareAndSet(null, xk2)) {
                    C2468sq c2468sq2 = AbstractC1903ms.a;
                    AbstractC1692kh0.C(xk2, AbstractC2139pN.a.p, new P8(xk2, interfaceC0220Im, 8), 2);
                    return xk2;
                }
            } while (atomicReference.get() == null);
        }
    }

    public static final boolean x(float[] fArr, float[] fArr2) {
        if (fArr.length < 16 || fArr2.length < 16) {
            return false;
        }
        float f2 = fArr[0];
        float f3 = fArr[1];
        float f4 = fArr[2];
        float f5 = fArr[3];
        float f6 = fArr[4];
        float f7 = fArr[5];
        float f8 = fArr[6];
        float f9 = fArr[7];
        float f10 = fArr[8];
        float f11 = fArr[9];
        float f12 = fArr[10];
        float f13 = fArr[11];
        float f14 = fArr[12];
        float f15 = fArr[13];
        float f16 = fArr[14];
        float f17 = fArr[15];
        float f18 = (f2 * f7) - (f3 * f6);
        float f19 = (f2 * f8) - (f4 * f6);
        float f20 = (f2 * f9) - (f5 * f6);
        float f21 = (f3 * f8) - (f4 * f7);
        float f22 = (f3 * f9) - (f5 * f7);
        float f23 = (f4 * f9) - (f5 * f8);
        float f24 = (f10 * f15) - (f11 * f14);
        float f25 = (f10 * f16) - (f12 * f14);
        float f26 = (f10 * f17) - (f13 * f14);
        float f27 = (f11 * f16) - (f12 * f15);
        float f28 = (f11 * f17) - (f13 * f15);
        float f29 = (f12 * f17) - (f13 * f16);
        float f30 = (f23 * f24) + (((f21 * f26) + ((f20 * f27) + ((f18 * f29) - (f19 * f28)))) - (f22 * f25));
        if (f30 != 0.0f) {
            float f31 = 1.0f / f30;
            fArr2[0] = ((f9 * f27) + ((f7 * f29) - (f8 * f28))) * f31;
            fArr2[1] = (((f4 * f28) + ((-f3) * f29)) - (f5 * f27)) * f31;
            fArr2[2] = ((f17 * f21) + ((f15 * f23) - (f16 * f22))) * f31;
            fArr2[3] = (((f12 * f22) + ((-f11) * f23)) - (f13 * f21)) * f31;
            float f32 = -f6;
            fArr2[4] = (((f8 * f26) + (f32 * f29)) - (f9 * f25)) * f31;
            fArr2[5] = ((f5 * f25) + ((f29 * f2) - (f4 * f26))) * f31;
            float f33 = -f14;
            fArr2[6] = (((f16 * f20) + (f33 * f23)) - (f17 * f19)) * f31;
            fArr2[7] = ((f13 * f19) + ((f23 * f10) - (f12 * f20))) * f31;
            fArr2[8] = ((f9 * f24) + ((f6 * f28) - (f7 * f26))) * f31;
            fArr2[9] = (((f26 * f3) + ((-f2) * f28)) - (f5 * f24)) * f31;
            fArr2[10] = ((f17 * f18) + ((f14 * f22) - (f15 * f20))) * f31;
            fArr2[11] = (((f20 * f11) + ((-f10) * f22)) - (f13 * f18)) * f31;
            fArr2[12] = (((f7 * f25) + (f32 * f27)) - (f8 * f24)) * f31;
            fArr2[13] = ((f4 * f24) + ((f2 * f27) - (f3 * f25))) * f31;
            fArr2[14] = (((f15 * f19) + (f33 * f21)) - (f16 * f18)) * f31;
            fArr2[15] = ((f12 * f18) + ((f10 * f21) - (f11 * f19))) * f31;
        }
        return !(f30 == 0.0f);
    }

    /* JADX WARN: Type inference failed for: r0v7, types: [o.OC, o.aK] */
    public static final int y(C1556jA c1556jA, int i2) {
        int iOrdinal = c1556jA.J0().ordinal();
        if (iOrdinal != 0) {
            if (iOrdinal == 1) {
                C1556jA c1556jAL = AbstractC0752ap.L(c1556jA);
                if (c1556jAL == null) {
                    throw new IllegalArgumentException("ActiveParent with no focused child");
                }
                int iY = y(c1556jAL, i2);
                if (iY == 1) {
                    iY = 0;
                }
                if (iY != 0) {
                    return iY;
                }
                if (!c1556jA.A) {
                    c1556jA.A = true;
                    try {
                        C0792bA c0792bAI0 = c1556jA.I0();
                        C1689kg c1689kg = new C1689kg(i2);
                        InterfaceC0622Xz focusOwner = ((C2207q3) AbstractC2539te.T(c1556jA)).getFocusOwner();
                        C1556jA c1556jA2 = ((C0674Zz) focusOwner).h;
                        c0792bAI0.k.g(c1689kg);
                        C1556jA c1556jA3 = ((C0674Zz) focusOwner).h;
                        if (c1689kg.b) {
                            C0983dA c0983dA = C0983dA.b;
                            return 2;
                        }
                        if (c1556jA2 == c1556jA3 || c1556jA3 == null) {
                            return 1;
                        }
                        return C0983dA.d == C0983dA.c ? 2 : 3;
                    } finally {
                        c1556jA.A = false;
                    }
                }
            } else {
                if (iOrdinal == 2) {
                    return 2;
                }
                if (iOrdinal != 3) {
                    throw new C2170pj();
                }
            }
        }
        return 1;
    }

    /* JADX WARN: Type inference failed for: r2v1, types: [o.OC, o.aK] */
    public static final int z(C1556jA c1556jA, int i2) {
        if (!c1556jA.B) {
            c1556jA.B = true;
            try {
                C0792bA c0792bAI0 = c1556jA.I0();
                C1689kg c1689kg = new C1689kg(i2);
                InterfaceC0622Xz focusOwner = ((C2207q3) AbstractC2539te.T(c1556jA)).getFocusOwner();
                C1556jA c1556jA2 = ((C0674Zz) focusOwner).h;
                c0792bAI0.j.g(c1689kg);
                C1556jA c1556jA3 = ((C0674Zz) focusOwner).h;
                if (c1689kg.b) {
                    C0983dA c0983dA = C0983dA.b;
                    return 2;
                }
                if (c1556jA2 != c1556jA3 && c1556jA3 != null) {
                    if (C0983dA.d == C0983dA.c) {
                        return 2;
                    }
                    c1556jA.B = false;
                    return 3;
                }
            } finally {
                c1556jA.B = false;
            }
        }
        return 1;
    }

    public abstract void H(boolean z);

    public void G(boolean z) {
    }
}
