package o;

import android.content.pm.PackageManager;
import android.content.pm.Signature;
import android.os.SystemClock;
import com.google.android.gms.common.api.Api;
import java.util.LinkedHashMap;
import java.util.List;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public class J7 implements W0, Z8, InterfaceC2652un, InterfaceC2555tm, InterfaceC0810bS, InterfaceC2956xx, HE, InterfaceC0646Yx {
    public final /* synthetic */ int l;

    public /* synthetic */ J7(int i) {
        this.l = i;
    }

    public static final C0396Ph j(String str, J7 j7) {
        C0396Ph c0396Ph = new C0396Ph(str);
        C0396Ph.d.put(str, c0396Ph);
        return c0396Ph;
    }

    public static final C20 k(C20 c20) {
        if ((c20 != null ? c20.r : null) == null) {
            return c20;
        }
        B20 b20C = c20.c();
        b20C.g = null;
        return b20C.a();
    }

    public static C0135Ff m(String str) {
        if (str.length() % 2 != 0) {
            throw new IllegalArgumentException("Unexpected hex string: ".concat(str).toString());
        }
        int length = str.length() / 2;
        byte[] bArr = new byte[length];
        for (int i = 0; i < length; i++) {
            int i2 = i * 2;
            bArr[i] = (byte) (C1884mi0.g(str.charAt(i2 + 1)) + (C1884mi0.g(str.charAt(i2)) << 4));
        }
        return new C0135Ff(bArr);
    }

    public static C0135Ff n(String str) {
        C0135Ff c0135Ff = new C0135Ff(str.getBytes(AbstractC2355rh.a));
        c0135Ff.n = str;
        return c0135Ff;
    }

    /* JADX WARN: Code restructure failed: missing block: B:31:0x0045, code lost:
    
        if (java.lang.Character.isHighSurrogate(r5) != false) goto L33;
     */
    /* JADX WARN: Code restructure failed: missing block: B:56:0x0082, code lost:
    
        if (java.lang.Character.isLowSurrogate(r5) != false) goto L58;
     */
    /* JADX WARN: Removed duplicated region for block: B:46:0x006c A[EDGE_INSN: B:92:0x006c->B:46:0x006c BREAK  A[LOOP:2: B:47:0x006e->B:58:0x0085], EDGE_INSN: B:93:0x006c->B:46:0x006c BREAK  A[LOOP:2: B:47:0x006e->B:58:0x0085, LOOP_LABEL: LOOP:2: B:47:0x006e->B:58:0x0085]] */
    /* JADX WARN: Removed duplicated region for block: B:67:0x00a2 A[ADDED_TO_REGION] */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public static boolean q(o.C2668uv r7, android.text.Editable r8, int r9, int r10, boolean r11) {
        /*
            Method dump skipped, instructions count: 240
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: o.J7.q(o.uv, android.text.Editable, int, int, boolean):boolean");
    }

    public static C2232qL r(List list) {
        return new C2232qL(list, (Float.floatToRawIntBits(0.0f) << 32) | (Float.floatToRawIntBits(0.0f) & 4294967295L), (Float.floatToRawIntBits(Float.POSITIVE_INFINITY) << 32) | (Float.floatToRawIntBits(0.0f) & 4294967295L));
    }

    public static boolean s(String str) {
        return ("Connection".equalsIgnoreCase(str) || "Keep-Alive".equalsIgnoreCase(str) || "Proxy-Authenticate".equalsIgnoreCase(str) || "Proxy-Authorization".equalsIgnoreCase(str) || "TE".equalsIgnoreCase(str) || "Trailers".equalsIgnoreCase(str) || "Transfer-Encoding".equalsIgnoreCase(str) || "Upgrade".equalsIgnoreCase(str)) ? false : true;
    }

    public static C2232qL t(List list) {
        return new C2232qL(list, (Float.floatToRawIntBits(0.0f) << 32) | (Float.floatToRawIntBits(0.0f) & 4294967295L), (Float.floatToRawIntBits(0.0f) << 32) | (Float.floatToRawIntBits(Float.POSITIVE_INFINITY) & 4294967295L));
    }

    @Override // o.InterfaceC2555tm
    public long c(long j, long j2) {
        float fA = AbstractC1904ms0.a(j, j2);
        long jFloatToRawIntBits = (Float.floatToRawIntBits(fA) << 32) | (4294967295L & Float.floatToRawIntBits(fA));
        int i = AbstractC2969y40.a;
        return jFloatToRawIntBits;
    }

    @Override // o.InterfaceC0646Yx
    public String d() {
        return null;
    }

    @Override // o.HE
    public boolean e() {
        boolean z;
        synchronized (C0516Tx.a) {
            try {
                int i = C0516Tx.c;
                C0516Tx.c = i + 1;
                if (i >= 30 || SystemClock.uptimeMillis() > C0516Tx.d + 30000) {
                    C0516Tx.c = 0;
                    C0516Tx.d = SystemClock.uptimeMillis();
                    String[] list = C0516Tx.b.list();
                    if (list == null) {
                        list = new String[0];
                    }
                    C0516Tx.e = list.length < 800;
                }
                z = C0516Tx.e;
            } catch (Throwable th) {
                throw th;
            }
        }
        return z;
    }

    @Override // o.InterfaceC0810bS
    public boolean f() {
        return true;
    }

    @Override // o.Z8
    public void g(InterfaceC2281qr interfaceC2281qr, int i, int[] iArr, EnumC1280gK enumC1280gK, int[] iArr2) {
        switch (this.l) {
            case 1:
                AbstractC0981d9.c(i, iArr, iArr2, false);
                break;
            default:
                if (enumC1280gK != EnumC1280gK.l) {
                    AbstractC0981d9.c(i, iArr, iArr2, true);
                    break;
                } else {
                    AbstractC0981d9.b(iArr, iArr2, false);
                    break;
                }
        }
    }

    @Override // o.CZ
    public Object get() {
        return C3017yf0.a;
    }

    @Override // o.HE
    public boolean h(S80 s80) {
        IJ ij = s80.a;
        boolean z = ij instanceof C0536Ur;
        int i = Api.BaseClientBuilder.API_PRIORITY_OTHER;
        if ((z ? ((C0536Ur) ij).m : Integer.MAX_VALUE) <= 100) {
            return false;
        }
        IJ ij2 = s80.b;
        if (ij2 instanceof C0536Ur) {
            i = ((C0536Ur) ij2).m;
        }
        return i > 100;
    }

    /* JADX WARN: Code restructure failed: missing block: B:31:0x0071, code lost:
    
        if (r9 == r5) goto L32;
     */
    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Removed duplicated region for block: B:7:0x0013  */
    /* JADX WARN: Type inference failed for: r8v0, types: [o.Jy] */
    /* JADX WARN: Type inference failed for: r8v1 */
    /* JADX WARN: Type inference failed for: r8v11 */
    /* JADX WARN: Type inference failed for: r8v12 */
    /* JADX WARN: Type inference failed for: r8v19 */
    /* JADX WARN: Type inference failed for: r8v2 */
    /* JADX WARN: Type inference failed for: r8v20 */
    /* JADX WARN: Type inference failed for: r8v21 */
    /* JADX WARN: Type inference failed for: r8v3 */
    /* JADX WARN: Type inference failed for: r8v6, types: [java.lang.String] */
    /* JADX WARN: Type inference failed for: r8v7 */
    /* JADX WARN: Type inference failed for: r8v9 */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public java.lang.Object l(o.InterfaceC0258Jy r8, o.AbstractC0298Lm r9) {
        /*
            r7 = this;
            boolean r0 = r9 instanceof o.UH
            if (r0 == 0) goto L13
            r0 = r9
            o.UH r0 = (o.UH) r0
            int r1 = r0.r
            r2 = -2147483648(0xffffffff80000000, float:-0.0)
            r3 = r1 & r2
            if (r3 == 0) goto L13
            int r1 = r1 - r2
            r0.r = r1
            goto L18
        L13:
            o.UH r0 = new o.UH
            r0.<init>(r7, r9)
        L18:
            java.lang.Object r9 = r0.p
            int r1 = r0.r
            r2 = 2
            r3 = 1
            java.lang.String r4 = ""
            o.Dn r5 = o.EnumC0091Dn.l
            if (r1 == 0) goto L40
            if (r1 == r3) goto L38
            if (r1 != r2) goto L30
            java.lang.Object r8 = r0.f354o
            java.lang.String r8 = (java.lang.String) r8
            o.IJ.H(r9)     // Catch: java.lang.Exception -> L7a
            goto L74
        L30:
            java.lang.IllegalStateException r8 = new java.lang.IllegalStateException
            java.lang.String r9 = "call to 'resume' before 'invoke' with coroutine"
            r8.<init>(r9)
            throw r8
        L38:
            java.lang.Object r8 = r0.f354o
            o.Jy r8 = (o.InterfaceC0258Jy) r8
            o.IJ.H(r9)     // Catch: java.lang.Exception -> L61
            goto L58
        L40:
            o.IJ.H(r9)
            r9 = r8
            o.Iy r9 = (o.C0232Iy) r9     // Catch: java.lang.Exception -> L61
            o.Hw0 r8 = r9.d()     // Catch: java.lang.Exception -> L61
            r0.f354o = r9     // Catch: java.lang.Exception -> L60
            r0.r = r3     // Catch: java.lang.Exception -> L60
            java.lang.Object r8 = o.AbstractC0249Jp.q(r8, r0)     // Catch: java.lang.Exception -> L60
            if (r8 != r5) goto L55
            goto L73
        L55:
            r6 = r9
            r9 = r8
            r8 = r6
        L58:
            o.Vb r9 = (o.C0546Vb) r9     // Catch: java.lang.Exception -> L61
            java.lang.String r9 = r9.a     // Catch: java.lang.Exception -> L61
            r6 = r9
            r9 = r8
            r8 = r6
            goto L63
        L60:
            r8 = r9
        L61:
            r9 = r8
            r8 = r4
        L63:
            o.Iy r9 = (o.C0232Iy) r9     // Catch: java.lang.Exception -> L7a
            o.Hw0 r9 = r9.c()     // Catch: java.lang.Exception -> L7a
            r0.f354o = r8     // Catch: java.lang.Exception -> L7a
            r0.r = r2     // Catch: java.lang.Exception -> L7a
            java.lang.Object r9 = o.AbstractC0249Jp.q(r9, r0)     // Catch: java.lang.Exception -> L7a
            if (r9 != r5) goto L74
        L73:
            return r5
        L74:
            java.lang.String r9 = (java.lang.String) r9     // Catch: java.lang.Exception -> L7a
            if (r9 != 0) goto L79
            goto L7a
        L79:
            r4 = r9
        L7a:
            o.VH r9 = new o.VH
            r9.<init>(r4, r8)
            return r9
        */
        throw new UnsupportedOperationException("Method not decompiled: o.J7.l(o.Jy, o.Lm):java.lang.Object");
    }

    public synchronized C0396Ph o(String str) {
        C0396Ph c0396Ph;
        try {
            LinkedHashMap linkedHashMap = C0396Ph.d;
            c0396Ph = (C0396Ph) linkedHashMap.get(str);
            if (c0396Ph == null) {
                c0396Ph = (C0396Ph) linkedHashMap.get(AbstractC1299gb0.L(str, "TLS_", false) ? "SSL_".concat(str.substring(4)) : AbstractC1299gb0.L(str, "SSL_", false) ? "TLS_".concat(str.substring(4)) : str);
                if (c0396Ph == null) {
                    c0396Ph = new C0396Ph(str);
                }
                linkedHashMap.put(str, c0396Ph);
            }
        } catch (Throwable th) {
            throw th;
        }
        return c0396Ph;
    }

    public Signature[] p(PackageManager packageManager, String str) {
        return packageManager.getPackageInfo(str, 64).signatures;
    }

    public String toString() {
        switch (this.l) {
            case 1:
                return "AbsoluteArrangement#Right";
            case 2:
                return "Arrangement#Start";
            case 10:
                return "Empty";
            default:
                return super.toString();
        }
    }

    public J7() {
        this.l = 3;
        new C1283gN(16);
        long[] jArr = AbstractC3064z40.a;
        new ZQ();
    }

    public J7(AbstractC0425Qk abstractC0425Qk) {
        this.l = 11;
    }

    @Override // o.InterfaceC0646Yx
    public void b() {
    }

    @Override // o.InterfaceC0810bS
    public void shutdown() {
    }

    @Override // o.InterfaceC0646Yx
    public void i(String str, long j) {
    }
}
