package o;

import android.R;
import android.animation.TimeInterpolator;
import android.content.Context;
import android.graphics.Path;
import android.os.Build;
import android.os.Bundle;
import android.text.SpannableStringBuilder;
import android.text.TextUtils;
import android.util.TypedValue;
import android.view.animation.AnimationUtils;
import android.view.animation.PathInterpolator;
import android.view.inputmethod.EditorInfo;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.internal.Preconditions;
import java.io.File;
import java.io.IOException;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.CancellationException;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Executor;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.ap, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public abstract class AbstractC0752ap {
    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};
    public static final String[] e = new String[0];
    public static final StackTraceElement[] f = new StackTraceElement[0];
    public static final C2943xq g;
    public static final C2943xq h;

    static {
        int i = 4;
        g = new C2943xq("NONE", i);
        h = new C2943xq("PENDING", i);
    }

    /* JADX WARN: Removed duplicated region for block: B:11:0x0029  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public static final o.C2493t4 B(o.C0291Lf r21, float r22) {
        /*
            Method dump skipped, instructions count: 216
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: o.AbstractC0752ap.B(o.Lf, float):o.t4");
    }

    public static boolean C(File file) {
        if (!file.isDirectory()) {
            file.delete();
            return true;
        }
        File[] fileArrListFiles = file.listFiles();
        if (fileArrListFiles == null) {
            return false;
        }
        boolean z = true;
        for (File file2 : fileArrListFiles) {
            z = C(file2) && z;
        }
        return z;
    }

    public static final C1479iR D() {
        C70 c70 = E90.b;
        C1479iR c1479iR = (C1479iR) c70.get();
        if (c1479iR != null) {
            return c1479iR;
        }
        C1479iR c1479iR2 = new C1479iR(new C0270Kk[0]);
        c70.u(c1479iR2);
        return c1479iR2;
    }

    public static final C0095Dr E(NC nc) {
        C70 c70 = E90.a;
        return new C0095Dr(nc, null);
    }

    public static final void F(InterfaceC2747vn interfaceC2747vn) {
        TI ti = (TI) interfaceC2747vn.m(C0669Zu.K);
        if (ti != null && !ti.b()) {
            throw ti.z();
        }
    }

    public static final C1556jA G(C1556jA c1556jA) {
        C1556jA c1556jA2 = ((C0674Zz) ((C2207q3) AbstractC2539te.T(c1556jA)).getFocusOwner()).h;
        if (c1556jA2 == null || !c1556jA2.y) {
            return null;
        }
        return c1556jA2;
    }

    public static final T00 H(C1556jA c1556jA) {
        AbstractC2239qS abstractC2239qS = c1556jA.s;
        return abstractC2239qS != null ? AbstractC2841wm0.s(abstractC2239qS).h(abstractC2239qS, false) : T00.e;
    }

    public static Hw0 I(Exception exc) {
        Hw0 hw0 = new Hw0();
        hw0.l(exc);
        return hw0;
    }

    /* JADX WARN: Failed to restore switch over string. Please report as a decompilation issue */
    public static Jf0 J(String str) {
        int iHashCode = str.hashCode();
        if (iHashCode != 79201641) {
            if (iHashCode != 79923350) {
                switch (iHashCode) {
                    case -503070503:
                        if (str.equals("TLSv1.1")) {
                            return Jf0.f175o;
                        }
                        break;
                    case -503070502:
                        if (str.equals("TLSv1.2")) {
                            return Jf0.n;
                        }
                        break;
                    case -503070501:
                        if (str.equals("TLSv1.3")) {
                            return Jf0.m;
                        }
                        break;
                }
            } else if (str.equals("TLSv1")) {
                return Jf0.p;
            }
        } else if (str.equals("SSLv3")) {
            return Jf0.q;
        }
        throw new IllegalArgumentException("Unexpected TLS version: ".concat(str));
    }

    public static Hw0 K(Object obj) {
        Hw0 hw0 = new Hw0();
        hw0.m(obj);
        return hw0;
    }

    /* JADX WARN: Code restructure failed: missing block: B:35:0x006d, code lost:
    
        return r8;
     */
    /* JADX WARN: Code restructure failed: missing block: B:67:0x0026, code lost:
    
        continue;
     */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public static final o.C1556jA L(o.C1556jA r8) {
        /*
            o.LP r0 = r8.l
            boolean r0 = r0.y
            r1 = 0
            if (r0 != 0) goto L9
            goto Lac
        L9:
            if (r0 != 0) goto L10
            java.lang.String r0 = "visitChildren called on an unattached node"
            o.AbstractC2133pH.b(r0)
        L10:
            o.iR r0 = new o.iR
            r2 = 16
            o.LP[] r3 = new o.LP[r2]
            r0.<init>(r3)
            o.LP r8 = r8.l
            o.LP r3 = r8.q
            if (r3 != 0) goto L23
            o.AbstractC2539te.g(r0, r8)
            goto L26
        L23:
            r0.b(r3)
        L26:
            int r8 = r0.n
            if (r8 == 0) goto Lac
            int r8 = r8 + (-1)
            java.lang.Object r8 = r0.k(r8)
            o.LP r8 = (o.LP) r8
            int r3 = r8.f209o
            r3 = r3 & 1024(0x400, float:1.435E-42)
            if (r3 != 0) goto L3c
            o.AbstractC2539te.g(r0, r8)
            goto L26
        L3c:
            if (r8 == 0) goto L26
            int r3 = r8.n
            r3 = r3 & 1024(0x400, float:1.435E-42)
            if (r3 == 0) goto La9
            r3 = r1
        L45:
            if (r8 == 0) goto L26
            boolean r4 = r8 instanceof o.C1556jA
            r5 = 1
            if (r4 == 0) goto L6e
            o.jA r8 = (o.C1556jA) r8
            o.LP r4 = r8.l
            boolean r4 = r4.y
            if (r4 == 0) goto La4
            o.hA r4 = r8.J0()
            int r4 = r4.ordinal()
            if (r4 == 0) goto L6d
            if (r4 == r5) goto L6d
            r5 = 2
            if (r4 == r5) goto L6d
            r8 = 3
            if (r4 != r8) goto L67
            goto La4
        L67:
            o.pj r8 = new o.pj
            r8.<init>()
            throw r8
        L6d:
            return r8
        L6e:
            int r4 = r8.n
            r4 = r4 & 1024(0x400, float:1.435E-42)
            if (r4 == 0) goto La4
            boolean r4 = r8 instanceof o.AbstractC0561Vq
            if (r4 == 0) goto La4
            r4 = r8
            o.Vq r4 = (o.AbstractC0561Vq) r4
            o.LP r4 = r4.A
            r6 = 0
        L7e:
            if (r4 == 0) goto La1
            int r7 = r4.n
            r7 = r7 & 1024(0x400, float:1.435E-42)
            if (r7 == 0) goto L9e
            int r6 = r6 + 1
            if (r6 != r5) goto L8c
            r8 = r4
            goto L9e
        L8c:
            if (r3 != 0) goto L95
            o.iR r3 = new o.iR
            o.LP[] r7 = new o.LP[r2]
            r3.<init>(r7)
        L95:
            if (r8 == 0) goto L9b
            r3.b(r8)
            r8 = r1
        L9b:
            r3.b(r4)
        L9e:
            o.LP r4 = r4.q
            goto L7e
        La1:
            if (r6 != r5) goto La4
            goto L45
        La4:
            o.LP r8 = o.AbstractC2539te.i(r3)
            goto L45
        La9:
            o.LP r8 = r8.q
            goto L3c
        Lac:
            return r1
        */
        throw new UnsupportedOperationException("Method not decompiled: o.AbstractC0752ap.L(o.jA):o.jA");
    }

    public static final TI N(InterfaceC2747vn interfaceC2747vn) {
        TI ti = (TI) interfaceC2747vn.m(C0669Zu.K);
        if (ti != null) {
            return ti;
        }
        throw new IllegalStateException(("Current context doesn't contain Job in it: " + interfaceC2747vn).toString());
    }

    public static float O(String[] strArr, int i) throws NumberFormatException {
        float f2 = Float.parseFloat(strArr[i]);
        if (f2 >= 0.0f && f2 <= 1.0f) {
            return f2;
        }
        throw new IllegalArgumentException("Motion easing control point value must be between 0 and 1; instead got: " + f2);
    }

    public static final C2448sg P(InterfaceC0220Im interfaceC0220Im) {
        C2448sg c2448sg;
        C2448sg c2448sg2;
        if (!(interfaceC0220Im instanceof C1428hs)) {
            return new C2448sg(1, interfaceC0220Im);
        }
        C1428hs c1428hs = (C1428hs) interfaceC0220Im;
        C2943xq c2943xq = C1884mi0.e;
        AtomicReferenceFieldUpdater atomicReferenceFieldUpdater = C1428hs.s;
        loop0: while (true) {
            Object obj = atomicReferenceFieldUpdater.get(c1428hs);
            c2448sg = null;
            if (obj == null) {
                atomicReferenceFieldUpdater.set(c1428hs, c2943xq);
                c2448sg2 = null;
                break;
            }
            if (obj instanceof C2448sg) {
                while (!atomicReferenceFieldUpdater.compareAndSet(c1428hs, obj, c2943xq)) {
                    if (atomicReferenceFieldUpdater.get(c1428hs) != obj) {
                        break;
                    }
                }
                c2448sg2 = (C2448sg) obj;
                break loop0;
            }
            if (obj != c2943xq && !(obj instanceof Throwable)) {
                throw new IllegalStateException(("Inconsistent state " + obj).toString());
            }
        }
        if (c2448sg2 != null) {
            AtomicReferenceFieldUpdater atomicReferenceFieldUpdater2 = C2448sg.r;
            Object obj2 = atomicReferenceFieldUpdater2.get(c2448sg2);
            if (!(obj2 instanceof C1885mj) || ((C1885mj) obj2).d == null) {
                C2448sg.q.set(c2448sg2, 536870911);
                atomicReferenceFieldUpdater2.set(c2448sg2, C2013o1.a);
                c2448sg = c2448sg2;
            } else {
                c2448sg2.n();
            }
            if (c2448sg != null) {
                return c2448sg;
            }
        }
        return new C2448sg(2, interfaceC0220Im);
    }

    public static final InterfaceC2567ts Q(TI ti, boolean z, AbstractC0992dJ abstractC0992dJ) {
        if (ti instanceof C1375hJ) {
            return ((C1375hJ) ti).V(z, abstractC0992dJ);
        }
        return ti.j(abstractC0992dJ.j(), z, new C2200q(1, abstractC0992dJ, AbstractC0992dJ.class, "invoke", "invoke(Ljava/lang/Throwable;)V", 0, 0, 1));
    }

    public static final boolean R(InterfaceC2747vn interfaceC2747vn) {
        TI ti = (TI) interfaceC2747vn.m(C0669Zu.K);
        if (ti != null) {
            return ti.b();
        }
        return true;
    }

    public static final boolean S(C1556jA c1556jA) {
        C2420sK c2420sK;
        AbstractC2239qS abstractC2239qS;
        C2420sK c2420sK2;
        AbstractC2239qS abstractC2239qS2 = c1556jA.s;
        return (abstractC2239qS2 == null || (c2420sK = abstractC2239qS2.z) == null || !c2420sK.H() || (abstractC2239qS = c1556jA.s) == null || (c2420sK2 = abstractC2239qS.z) == null || !c2420sK2.G()) ? false : true;
    }

    public static boolean T(String str, String str2) {
        return str.startsWith(str2.concat("(")) && str.endsWith(")");
    }

    /* JADX WARN: Type inference failed for: r5v1, types: [java.lang.Object, java.util.Collection, java.util.List] */
    public static final boolean U(CX cx) {
        ?? r5 = cx.a;
        int size = r5.size();
        for (int i = 0; i < size; i++) {
            if (((IX) r5.get(i)).i != 2) {
                return false;
            }
        }
        return true;
    }

    public static int V(int i, int i2, int i3) throws IOException {
        if ((i2 & 8) != 0) {
            i--;
        }
        if (i3 <= i) {
            return i - i3;
        }
        throw new IOException(AbstractC0126Ew.i(i3, i, "PROTOCOL_ERROR padding ", " > remaining length "));
    }

    public static final long W(float f2, long j, long j2) {
        C2809wT c2809wT = C0423Qi.x;
        long jA = C0190Hi.a(j, c2809wT);
        long jA2 = C0190Hi.a(j2, c2809wT);
        float fD = C0190Hi.d(jA);
        float fH = C0190Hi.h(jA);
        float fG = C0190Hi.g(jA);
        float fE = C0190Hi.e(jA);
        float fD2 = C0190Hi.d(jA2);
        float fH2 = C0190Hi.h(jA2);
        float fG2 = C0190Hi.g(jA2);
        float fE2 = C0190Hi.e(jA2);
        if (f2 < 0.0f) {
            f2 = 0.0f;
        }
        if (f2 > 1.0f) {
            f2 = 1.0f;
        }
        return C0190Hi.a(k(AbstractC0940cn0.A(fH, fH2, f2), AbstractC0940cn0.A(fG, fG2, f2), AbstractC0940cn0.A(fE, fE2, f2), AbstractC0940cn0.A(fD, fD2, f2), c2809wT), C0190Hi.f(j2));
    }

    public static MV X(Object obj) {
        return new MV(obj, ME.G);
    }

    /*  JADX ERROR: JadxRuntimeException in pass: RegionMakerVisitor
        jadx.core.utils.exceptions.JadxRuntimeException: Not found exit edge by exit block: B:61:0x0181
        	at jadx.core.dex.visitors.regions.maker.LoopRegionMaker.checkLoopExits(LoopRegionMaker.java:225)
        	at jadx.core.dex.visitors.regions.maker.LoopRegionMaker.makeLoopRegion(LoopRegionMaker.java:195)
        	at jadx.core.dex.visitors.regions.maker.LoopRegionMaker.process(LoopRegionMaker.java:62)
        	at jadx.core.dex.visitors.regions.maker.RegionMaker.traverse(RegionMaker.java:89)
        	at jadx.core.dex.visitors.regions.maker.RegionMaker.makeRegion(RegionMaker.java:66)
        	at jadx.core.dex.visitors.regions.maker.IfRegionMaker.process(IfRegionMaker.java:101)
        	at jadx.core.dex.visitors.regions.maker.RegionMaker.traverse(RegionMaker.java:106)
        	at jadx.core.dex.visitors.regions.maker.RegionMaker.makeRegion(RegionMaker.java:66)
        	at jadx.core.dex.visitors.regions.maker.IfRegionMaker.process(IfRegionMaker.java:95)
        	at jadx.core.dex.visitors.regions.maker.RegionMaker.traverse(RegionMaker.java:106)
        	at jadx.core.dex.visitors.regions.maker.RegionMaker.makeRegion(RegionMaker.java:66)
        	at jadx.core.dex.visitors.regions.maker.IfRegionMaker.process(IfRegionMaker.java:95)
        	at jadx.core.dex.visitors.regions.maker.RegionMaker.traverse(RegionMaker.java:106)
        	at jadx.core.dex.visitors.regions.maker.RegionMaker.makeRegion(RegionMaker.java:66)
        	at jadx.core.dex.visitors.regions.maker.IfRegionMaker.process(IfRegionMaker.java:95)
        	at jadx.core.dex.visitors.regions.maker.RegionMaker.traverse(RegionMaker.java:106)
        	at jadx.core.dex.visitors.regions.maker.RegionMaker.makeRegion(RegionMaker.java:66)
        	at jadx.core.dex.visitors.regions.maker.IfRegionMaker.process(IfRegionMaker.java:95)
        	at jadx.core.dex.visitors.regions.maker.RegionMaker.traverse(RegionMaker.java:106)
        	at jadx.core.dex.visitors.regions.maker.RegionMaker.makeRegion(RegionMaker.java:66)
        	at jadx.core.dex.visitors.regions.maker.IfRegionMaker.process(IfRegionMaker.java:95)
        	at jadx.core.dex.visitors.regions.maker.RegionMaker.traverse(RegionMaker.java:106)
        	at jadx.core.dex.visitors.regions.maker.RegionMaker.makeRegion(RegionMaker.java:66)
        	at jadx.core.dex.visitors.regions.maker.IfRegionMaker.process(IfRegionMaker.java:101)
        	at jadx.core.dex.visitors.regions.maker.RegionMaker.traverse(RegionMaker.java:106)
        	at jadx.core.dex.visitors.regions.maker.RegionMaker.makeRegion(RegionMaker.java:66)
        	at jadx.core.dex.visitors.regions.maker.RegionMaker.makeMthRegion(RegionMaker.java:48)
        	at jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:25)
        */
    /* JADX WARN: Removed duplicated region for block: B:134:0x036d  */
    /* JADX WARN: Removed duplicated region for block: B:135:0x0370  */
    /* JADX WARN: Removed duplicated region for block: B:138:0x0382  */
    /* JADX WARN: Removed duplicated region for block: B:142:0x038b  */
    /* JADX WARN: Removed duplicated region for block: B:145:0x03d4  */
    /* JADX WARN: Removed duplicated region for block: B:146:0x03d9  */
    /* JADX WARN: Removed duplicated region for block: B:152:0x03f5  */
    /* JADX WARN: Removed duplicated region for block: B:161:0x041a  */
    /* JADX WARN: Removed duplicated region for block: B:167:0x0434  */
    /* JADX WARN: Removed duplicated region for block: B:168:0x0437  */
    /* JADX WARN: Removed duplicated region for block: B:171:0x043d  */
    /* JADX WARN: Removed duplicated region for block: B:53:0x014a  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public static final o.AbstractC2811wV Y(int r54, o.C0321Mk r55) throws org.xmlpull.v1.XmlPullParserException, android.content.res.Resources.NotFoundException, java.io.IOException {
        /*
            Method dump skipped, instructions count: 1492
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: o.AbstractC0752ap.Y(int, o.Mk):o.wV");
    }

    public static final InterfaceC1191fR Z(Object obj, C0321Mk c0321Mk) {
        Object objK = c0321Mk.K();
        if (objK == C0140Fk.a) {
            objK = X(obj);
            c0321Mk.f0(objK);
        }
        InterfaceC1191fR interfaceC1191fR = (InterfaceC1191fR) objK;
        interfaceC1191fR.setValue(obj);
        return interfaceC1191fR;
    }

    /* JADX WARN: Removed duplicated region for block: B:106:0x015e  */
    /* JADX WARN: Removed duplicated region for block: B:110:0x0165  */
    /* JADX WARN: Removed duplicated region for block: B:113:0x0172  */
    /* JADX WARN: Removed duplicated region for block: B:116:0x0179  */
    /* JADX WARN: Removed duplicated region for block: B:135:0x01b2  */
    /* JADX WARN: Removed duplicated region for block: B:139:0x01b9  */
    /* JADX WARN: Removed duplicated region for block: B:76:0x00fc  */
    /* JADX WARN: Removed duplicated region for block: B:80:0x0103  */
    /* JADX WARN: Removed duplicated region for block: B:83:0x0111  */
    /* JADX WARN: Removed duplicated region for block: B:87:0x0119  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public static final long a(float r21, float r22, float r23, float r24, o.AbstractC0345Ni r25) {
        /*
            Method dump skipped, instructions count: 482
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: o.AbstractC0752ap.a(float, float, float, float, o.Ni):long");
    }

    public static int a0(Context context, int i, int i2) {
        TypedValue typedValueT = C80.T(context, i);
        return (typedValueT == null || typedValueT.type != 16) ? i2 : typedValueT.data;
    }

    public static final long b(int i) {
        long j = i << 32;
        int i2 = C0190Hi.h;
        return j;
    }

    public static TimeInterpolator b0(Context context, int i, TimeInterpolator timeInterpolator) {
        TypedValue typedValue = new TypedValue();
        if (!context.getTheme().resolveAttribute(i, typedValue, true)) {
            return timeInterpolator;
        }
        if (typedValue.type != 3) {
            throw new IllegalArgumentException("Motion easing theme attribute must be an @interpolator resource for ?attr/motionEasing*Interpolator attributes or a string for ?attr/motionEasing* attributes.");
        }
        String strValueOf = String.valueOf(typedValue.string);
        if (!T(strValueOf, "cubic-bezier") && !T(strValueOf, "path")) {
            return AnimationUtils.loadInterpolator(context, typedValue.resourceId);
        }
        if (T(strValueOf, "cubic-bezier")) {
            String[] strArrSplit = strValueOf.substring(13, strValueOf.length() - 1).split(",");
            if (strArrSplit.length == 4) {
                return new PathInterpolator(O(strArrSplit, 0), O(strArrSplit, 1), O(strArrSplit, 2), O(strArrSplit, 3));
            }
            throw new IllegalArgumentException("Motion easing theme attribute must have 4 control points if using bezier curve format; instead got: " + strArrSplit.length);
        }
        if (!T(strValueOf, "path")) {
            throw new IllegalArgumentException("Invalid motion easing type: ".concat(strValueOf));
        }
        String strSubstring = strValueOf.substring(5, strValueOf.length() - 1);
        Path path = new Path();
        try {
            C2053oW.b(AbstractC2798wI.m(strSubstring), path);
            return new PathInterpolator(path);
        } catch (RuntimeException e2) {
            throw new RuntimeException("Error in parsing ".concat(strSubstring), e2);
        }
    }

    public static final long c(long j) {
        long j2 = j << 32;
        int i = C0190Hi.h;
        return j2;
    }

    public static void c0(EditorInfo editorInfo, CharSequence charSequence) {
        int i = Build.VERSION.SDK_INT;
        if (i >= 30) {
            D0.h(editorInfo, charSequence);
            return;
        }
        charSequence.getClass();
        if (i >= 30) {
            D0.h(editorInfo, charSequence);
            return;
        }
        int i2 = editorInfo.initialSelStart;
        int i3 = editorInfo.initialSelEnd;
        int i4 = i2 > i3 ? i3 : i2;
        if (i2 <= i3) {
            i2 = i3;
        }
        int length = charSequence.length();
        if (i4 < 0 || i2 > length) {
            e0(editorInfo, null, 0, 0);
            return;
        }
        int i5 = editorInfo.inputType & 4095;
        if (i5 == 129 || i5 == 225 || i5 == 18) {
            e0(editorInfo, null, 0, 0);
            return;
        }
        if (length <= 2048) {
            e0(editorInfo, charSequence, i4, i2);
            return;
        }
        int i6 = i2 - i4;
        int i7 = i6 > 1024 ? 0 : i6;
        int i8 = 2048 - i7;
        int iMin = Math.min(charSequence.length() - i2, i8 - Math.min(i4, (int) (i8 * 0.8d)));
        int iMin2 = Math.min(i4, i8 - iMin);
        int i9 = i4 - iMin2;
        if (Character.isLowSurrogate(charSequence.charAt(i9))) {
            i9++;
            iMin2--;
        }
        if (Character.isHighSurrogate(charSequence.charAt((i2 + iMin) - 1))) {
            iMin--;
        }
        int i10 = iMin2 + i7;
        e0(editorInfo, i7 != i6 ? TextUtils.concat(charSequence.subSequence(i9, i9 + iMin2), charSequence.subSequence(i2, iMin + i2)) : charSequence.subSequence(i9, i10 + iMin + i9), iMin2, i10);
    }

    public static long d(int i, int i2, int i3) {
        return b(((i & 255) << 16) | (-16777216) | ((i2 & 255) << 8) | (i3 & 255));
    }

    public static void d0(EditorInfo editorInfo, boolean z) {
        if (Build.VERSION.SDK_INT >= 35) {
            AbstractC1050dv.b(editorInfo, z);
        }
        if (editorInfo.extras == null) {
            editorInfo.extras = new Bundle();
        }
        editorInfo.extras.putBoolean("androidx.core.view.inputmethod.EditorInfoCompat.STYLUS_HANDWRITING_ENABLED", z);
    }

    public static C2375rr e() {
        return new C2375rr(1.0f, 1.0f);
    }

    public static void e0(EditorInfo editorInfo, CharSequence charSequence, int i, int i2) {
        if (editorInfo.extras == null) {
            editorInfo.extras = new Bundle();
        }
        editorInfo.extras.putCharSequence("androidx.core.view.inputmethod.EditorInfoCompat.CONTENT_SURROUNDING_TEXT", charSequence != null ? new SpannableStringBuilder(charSequence) : null);
        editorInfo.extras.putInt("androidx.core.view.inputmethod.EditorInfoCompat.CONTENT_SELECTION_HEAD", i);
        editorInfo.extras.putInt("androidx.core.view.inputmethod.EditorInfoCompat.CONTENT_SELECTION_END", i2);
    }

    public static final void f(InterfaceC2145pT interfaceC2145pT, InterfaceC2584u2 interfaceC2584u2, C0554Vj c0554Vj, C0321Mk c0321Mk, int i) {
        int i2;
        c0321Mk.X(-1090171650);
        if ((i & 6) == 0) {
            i2 = ((i & 8) == 0 ? c0321Mk.f(interfaceC2145pT) : c0321Mk.h(interfaceC2145pT) ? 4 : 2) | i;
        } else {
            i2 = i;
        }
        if ((i & 48) == 0) {
            i2 |= c0321Mk.f(interfaceC2584u2) ? 32 : 16;
        }
        if ((i & 384) == 0) {
            i2 |= c0321Mk.h(c0554Vj) ? 256 : 128;
        }
        if (c0321Mk.N(i2 & 1, (i2 & 147) != 146)) {
            boolean z = ((i2 & 14) == 4 || ((i2 & 8) != 0 && c0321Mk.f(interfaceC2145pT))) | ((i2 & 112) == 32);
            Object objK = c0321Mk.K();
            if (z || objK == C0140Fk.a) {
                objK = new C2984yE(interfaceC2584u2, interfaceC2145pT);
                c0321Mk.f0(objK);
            }
            AbstractC1068e5.a((C2984yE) objK, null, new XX(1, false, false), c0554Vj, c0321Mk, ((i2 << 3) & 7168) | 384, 2);
        } else {
            c0321Mk.Q();
        }
        L00 l00S = c0321Mk.s();
        if (l00S != null) {
            l00S.d = new C1452i5(interfaceC2145pT, interfaceC2584u2, c0554Vj, i, 0);
        }
    }

    public static final C2277qp f0(NC nc) {
        return new C2277qp(new C0573Wc(nc, null));
    }

    public static VI g() {
        return new VI(null);
    }

    public static final int g0(long j) {
        float[] fArr = C0423Qi.a;
        return (int) (C0190Hi.a(j, C0423Qi.e) >>> 32);
    }

    public static final Ba0 h(Object obj) {
        if (obj == null) {
            obj = F3.f;
        }
        return new Ba0(obj);
    }

    public static final RH h0(LH lh) {
        return new RH(lh.a, lh.b, lh.c, lh.d);
    }

    /* JADX WARN: Removed duplicated region for block: B:73:0x00ce  */
    /* JADX WARN: Removed duplicated region for block: B:74:0x00d0  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public static final void i(final o.InterfaceC2145pT r17, final boolean r18, final int r19, final boolean r20, long r21, final float r23, final o.MP r24, o.C0321Mk r25, final int r26) {
        /*
            Method dump skipped, instructions count: 331
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: o.AbstractC0752ap.i(o.pT, boolean, int, boolean, long, float, o.MP, o.Mk, int):void");
    }

    public static final long i0(long j, long j2) {
        int iD;
        int iF = Ue0.f(j);
        int iE = Ue0.e(j);
        if ((Ue0.f(j2) < Ue0.e(j)) && (Ue0.f(j) < Ue0.e(j2))) {
            if ((Ue0.f(j2) <= Ue0.f(j)) && (Ue0.e(j) <= Ue0.e(j2))) {
                iF = Ue0.f(j2);
                iE = iF;
            } else {
                if ((Ue0.f(j) <= Ue0.f(j2)) && (Ue0.e(j2) <= Ue0.e(j))) {
                    iD = Ue0.d(j2);
                } else {
                    int iF2 = Ue0.f(j2);
                    if (iF >= Ue0.e(j2) || iF2 > iF) {
                        iE = Ue0.f(j2);
                    } else {
                        iF = Ue0.f(j2);
                        iD = Ue0.d(j2);
                    }
                }
                iE -= iD;
            }
        } else if (iE > Ue0.f(j2)) {
            iF -= Ue0.d(j2);
            iD = Ue0.d(j2);
            iE -= iD;
        }
        return AbstractC2378rs0.u(iF, iE);
    }

    public static final void j(final MP mp, final NC nc, final boolean z, C0321Mk c0321Mk, final int i) {
        int i2;
        c0321Mk.X(2111672474);
        if ((i & 6) == 0) {
            i2 = (c0321Mk.f(mp) ? 4 : 2) | i;
        } else {
            i2 = i;
        }
        int i3 = i2 | (c0321Mk.h(nc) ? 32 : 16) | (c0321Mk.g(z) ? 256 : 128);
        if (c0321Mk.N(i3 & 1, (i3 & 147) != 146)) {
            C2887xC.e(c0321Mk, AbstractC1692kh0.o(androidx.compose.foundation.layout.c.i(mp, I50.a, I50.b), new C2211q5(nc, z)));
        } else {
            c0321Mk.Q();
        }
        L00 l00S = c0321Mk.s();
        if (l00S != null) {
            l00S.d = new SC() { // from class: o.h5
                @Override // o.SC
                public final Object f(Object obj, Object obj2) {
                    ((Integer) obj2).getClass();
                    int iD = AbstractC1904ms0.D(i | 1);
                    AbstractC0752ap.j(mp, nc, z, (C0321Mk) obj, iD);
                    return Oh0.a;
                }
            };
        }
    }

    public static Hw0 j0(List list) {
        if (list == null || list.isEmpty()) {
            return K(null);
        }
        Iterator it = list.iterator();
        while (it.hasNext()) {
            if (((Pc0) it.next()) == null) {
                throw new NullPointerException("null tasks are not accepted");
            }
        }
        Hw0 hw0 = new Hw0();
        Tn0 tn0 = new Tn0(list.size(), hw0);
        Iterator it2 = list.iterator();
        while (it2.hasNext()) {
            Pc0 pc0 = (Pc0) it2.next();
            ExecutorC0614Xr executorC0614Xr = Rc0.b;
            pc0.c(executorC0614Xr, tn0);
            pc0.b(executorC0614Xr, tn0);
            Hw0 hw02 = (Hw0) pc0;
            hw02.b.e(new Yq0((Executor) executorC0614Xr, (GT) tn0));
            hw02.q();
        }
        return hw0;
    }

    /* JADX WARN: Removed duplicated region for block: B:30:0x0093  */
    /* JADX WARN: Removed duplicated region for block: B:34:0x009a  */
    /* JADX WARN: Removed duplicated region for block: B:52:0x00df  */
    /* JADX WARN: Removed duplicated region for block: B:56:0x00e6  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public static final long k(float r17, float r18, float r19, float r20, o.AbstractC0345Ni r21) {
        /*
            Method dump skipped, instructions count: 337
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: o.AbstractC0752ap.k(float, float, float, float, o.Ni):long");
    }

    public static final long l(float f2, float f3) {
        return (Float.floatToRawIntBits(f3) & 4294967295L) | (Float.floatToRawIntBits(f2) << 32);
    }

    public static Object l0(Pc0 pc0) throws ExecutionException {
        if (pc0.h()) {
            return pc0.f();
        }
        if (((Hw0) pc0).d) {
            throw new CancellationException("Task is already canceled");
        }
        throw new ExecutionException(pc0.e());
    }

    /* JADX WARN: Removed duplicated region for block: B:17:0x0040 A[RETURN] */
    /* JADX WARN: Removed duplicated region for block: B:20:0x004c  */
    /* JADX WARN: Removed duplicated region for block: B:7:0x0013  */
    /* JADX WARN: Type inference failed for: r1v2, types: [java.lang.Object, java.util.Collection, java.util.List] */
    /* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:16:0x003e -> B:18:0x0041). Please report as a decompilation issue!!! */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public static final java.lang.Object m(o.Vb0 r6, o.AbstractC0728ad r7) {
        /*
            boolean r0 = r7 instanceof o.D50
            if (r0 == 0) goto L13
            r0 = r7
            o.D50 r0 = (o.D50) 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.D50 r0 = new o.D50
            r0.<init>(r7)
        L18:
            java.lang.Object r7 = r0.p
            int r1 = r0.q
            r2 = 1
            if (r1 == 0) goto L2f
            if (r1 != r2) goto L27
            o.Vb0 r6 = r0.f75o
            o.IJ.H(r7)
            goto L41
        L27:
            java.lang.IllegalStateException r6 = new java.lang.IllegalStateException
            java.lang.String r7 = "call to 'resume' before 'invoke' with coroutine"
            r6.<init>(r7)
            throw r6
        L2f:
            o.IJ.H(r7)
        L32:
            r0.f75o = r6
            r0.q = r2
            o.DX r7 = o.DX.m
            java.lang.Object r7 = r6.a(r7, r0)
            o.Dn r1 = o.EnumC0091Dn.l
            if (r7 != r1) goto L41
            return r1
        L41:
            o.CX r7 = (o.CX) r7
            java.lang.Object r1 = r7.a
            int r3 = r1.size()
            r4 = 0
        L4a:
            if (r4 >= r3) goto L5c
            java.lang.Object r5 = r1.get(r4)
            o.IX r5 = (o.IX) r5
            boolean r5 = o.As0.p(r5)
            if (r5 != 0) goto L59
            goto L32
        L59:
            int r4 = r4 + 1
            goto L4a
        L5c:
            return r7
        */
        throw new UnsupportedOperationException("Method not decompiled: o.AbstractC0752ap.m(o.Vb0, o.ad):java.lang.Object");
    }

    public static String m0(Ws0 ws0) {
        StringBuilder sb = new StringBuilder(ws0.c());
        for (int i = 0; i < ws0.c(); i++) {
            byte bA = ws0.a(i);
            if (bA == 34) {
                sb.append("\\\"");
            } else if (bA == 39) {
                sb.append("\\'");
            } else if (bA != 92) {
                switch (bA) {
                    case 7:
                        sb.append("\\a");
                        break;
                    case 8:
                        sb.append("\\b");
                        break;
                    case ConnectionResult.SERVICE_INVALID /* 9 */:
                        sb.append("\\t");
                        break;
                    case 10:
                        sb.append("\\n");
                        break;
                    case ConnectionResult.LICENSE_CHECK_FAILED /* 11 */:
                        sb.append("\\v");
                        break;
                    case 12:
                        sb.append("\\f");
                        break;
                    case 13:
                        sb.append("\\r");
                        break;
                    default:
                        if (bA < 32 || bA > 126) {
                            sb.append('\\');
                            sb.append((char) (((bA >>> 6) & 3) + 48));
                            sb.append((char) (((bA >>> 3) & 7) + 48));
                            sb.append((char) ((bA & 7) + 48));
                            break;
                        } else {
                            sb.append((char) bA);
                            break;
                        }
                }
            } else {
                sb.append("\\\\");
            }
        }
        return sb.toString();
    }

    /* JADX WARN: Removed duplicated region for block: B:36:0x00c7  */
    /* JADX WARN: Removed duplicated region for block: B:39:0x00d8  */
    /* JADX WARN: Removed duplicated region for block: B:43:0x00e1  */
    /* JADX WARN: Removed duplicated region for block: B:61:0x012f  */
    /* JADX WARN: Removed duplicated region for block: B:63:0x0132  */
    /* JADX WARN: Removed duplicated region for block: B:72:0x016f  */
    /* JADX WARN: Removed duplicated region for block: B:8:0x0020  */
    /* JADX WARN: Type inference failed for: r0v5, types: [java.lang.Object, java.util.Collection, java.util.List] */
    /* JADX WARN: Type inference failed for: r1v5, types: [java.lang.Object, java.util.Collection, java.util.List] */
    /* JADX WARN: Type inference failed for: r3v1, types: [java.lang.Object, java.util.List] */
    /* JADX WARN: Type inference failed for: r6v0, types: [java.lang.Object, java.util.List] */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public static final java.lang.Object n(o.Vb0 r17, o.C2513tI r18, o.C0692a8 r19, o.CX r20, o.AbstractC0728ad r21) {
        /*
            Method dump skipped, instructions count: 391
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: o.AbstractC0752ap.n(o.Vb0, o.tI, o.a8, o.CX, o.ad):java.lang.Object");
    }

    /* JADX WARN: Code restructure failed: missing block: B:38:0x00aa, code lost:
    
        if (r14 == r5) goto L39;
     */
    /* JADX WARN: Removed duplicated region for block: B:7:0x0013  */
    /* JADX WARN: Type inference failed for: r11v7, types: [java.lang.Object, java.util.Collection, java.util.List] */
    /* JADX WARN: Type inference failed for: r13v1, types: [java.lang.Object, java.util.List] */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public static final java.lang.Object o(o.Vb0 r11, o.Bd0 r12, o.CX r13, o.AbstractC0728ad r14) {
        /*
            Method dump skipped, instructions count: 225
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: o.AbstractC0752ap.o(o.Vb0, o.Bd0, o.CX, o.ad):java.lang.Object");
    }

    public static Object p(Pc0 pc0) throws InterruptedException {
        Preconditions.checkNotMainThread();
        Preconditions.checkNotGoogleApiHandlerThread();
        Preconditions.checkNotNull(pc0, "Task must not be null");
        if (pc0.g()) {
            return l0(pc0);
        }
        On0 on0 = new On0();
        Executor executor = Rc0.b;
        pc0.c(executor, on0);
        pc0.b(executor, on0);
        Hw0 hw0 = (Hw0) pc0;
        hw0.b.e(new Yq0(executor, (GT) on0));
        hw0.q();
        on0.l.await();
        return l0(pc0);
    }

    public static Object q(Pc0 pc0, long j, TimeUnit timeUnit) throws TimeoutException {
        Preconditions.checkNotMainThread();
        Preconditions.checkNotGoogleApiHandlerThread();
        Preconditions.checkNotNull(pc0, "Task must not be null");
        Preconditions.checkNotNull(timeUnit, "TimeUnit must not be null");
        if (pc0.g()) {
            return l0(pc0);
        }
        On0 on0 = new On0();
        Executor executor = Rc0.b;
        pc0.c(executor, on0);
        pc0.b(executor, on0);
        Hw0 hw0 = (Hw0) pc0;
        hw0.b.e(new Yq0(executor, (GT) on0));
        hw0.q();
        if (on0.l.await(j, timeUnit)) {
            return l0(pc0);
        }
        throw new TimeoutException("Timed out waiting for Task");
    }

    public static Hw0 r(Executor executor, Callable callable) {
        Preconditions.checkNotNull(executor, "Executor must not be null");
        Preconditions.checkNotNull(callable, "Callback must not be null");
        Hw0 hw0 = new Hw0();
        executor.execute(new Js0(14, hw0, callable, false));
        return hw0;
    }

    public static final void s(InterfaceC2747vn interfaceC2747vn, CancellationException cancellationException) {
        TI ti = (TI) interfaceC2747vn.m(C0669Zu.K);
        if (ti != null) {
            ti.c(cancellationException);
        }
    }

    public static final Object t(TI ti, Sb0 sb0) {
        ti.c(null);
        Object objY = ti.y(sb0);
        return objY == EnumC0091Dn.l ? objY : Oh0.a;
    }

    public static void u(int i, int i2, int i3) {
        if (i >= 0 && i2 <= i3) {
            if (i > i2) {
                throw new IllegalArgumentException(AbstractC0126Ew.i(i, i2, "startIndex: ", " > endIndex: "));
            }
            return;
        }
        throw new IndexOutOfBoundsException("startIndex: " + i + ", endIndex: " + i2 + ", size: " + i3);
    }

    public static void v(Object obj, String str) {
        if (obj == null) {
            throw new NullPointerException(str);
        }
    }

    public static final void w(int i) {
        if (i < 1) {
            throw new IllegalArgumentException(AbstractC0126Ew.j(i, "Expected positive parallelism level, but got ").toString());
        }
    }

    public static void x(int i, int i2, int i3) {
        if (i >= 0 && i2 <= i3) {
            if (i > i2) {
                throw new IllegalArgumentException(AbstractC0126Ew.i(i, i2, "fromIndex: ", " > toIndex: "));
            }
            return;
        }
        throw new IndexOutOfBoundsException("fromIndex: " + i + ", toIndex: " + i2 + ", size: " + i3);
    }

    public static final long y(long j, long j2) {
        float f2;
        float f3;
        long jA = C0190Hi.a(j, C0190Hi.f(j2));
        float fD = C0190Hi.d(j2);
        float fD2 = C0190Hi.d(jA);
        float f4 = 1.0f - fD2;
        float f5 = (fD * f4) + fD2;
        float fH = C0190Hi.h(jA);
        float fH2 = C0190Hi.h(j2);
        float f6 = 0.0f;
        if (f5 == 0.0f) {
            f2 = 0.0f;
        } else {
            f2 = (((fH2 * fD) * f4) + (fH * fD2)) / f5;
        }
        float fG = C0190Hi.g(jA);
        float fG2 = C0190Hi.g(j2);
        if (f5 == 0.0f) {
            f3 = 0.0f;
        } else {
            f3 = (((fG2 * fD) * f4) + (fG * fD2)) / f5;
        }
        float fE = C0190Hi.e(jA);
        float fE2 = C0190Hi.e(j2);
        if (f5 != 0.0f) {
            f6 = (((fE2 * fD) * f4) + (fE * fD2)) / f5;
        }
        return k(f2, f3, f6, f5, C0190Hi.f(j2));
    }

    public abstract C2804wO A();

    public abstract void M(Y70 y70, float f2, float f3);

    public abstract void k0(InterfaceC1592jf interfaceC1592jf);

    public abstract long z();
}
