package L;

import java.util.concurrent.LinkedBlockingDeque;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/* loaded from: classes.dex */
public abstract class g {

    /* renamed from: a, reason: collision with root package name */
    public static final s.i f1032a = new s.i(16);

    /* renamed from: b, reason: collision with root package name */
    public static final ThreadPoolExecutor f1033b;

    /* renamed from: c, reason: collision with root package name */
    public static final Object f1034c;

    /* renamed from: d, reason: collision with root package name */
    public static final s.j f1035d;

    /* JADX WARN: Type inference failed for: r9v0, types: [java.lang.Object, java.util.concurrent.ThreadFactory] */
    static {
        ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(0, 1, 10000, TimeUnit.MILLISECONDS, new LinkedBlockingDeque(), (ThreadFactory) new Object());
        threadPoolExecutor.allowCoreThreadTimeOut(true);
        f1033b = threadPoolExecutor;
        f1034c = new Object();
        f1035d = new s.j(0);
    }

    /* JADX WARN: Removed duplicated region for block: B:13:0x003f  */
    /* JADX WARN: Removed duplicated region for block: B:15:0x0045  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public static L.f a(java.lang.String r6, android.content.Context r7, I0.b r8, int r9) {
        /*
            s.i r0 = L.g.f1032a
            java.lang.Object r1 = r0.get(r6)
            android.graphics.Typeface r1 = (android.graphics.Typeface) r1
            if (r1 == 0) goto L10
            L.f r6 = new L.f
            r6.<init>(r1)
            return r6
        L10:
            L.h r8 = L.c.a(r7, r8)     // Catch: android.content.pm.PackageManager.NameNotFoundException -> L5a
            r1 = 1
            r2 = -3
            java.lang.Object r3 = r8.f1037b
            L.i[] r3 = (L.i[]) r3
            int r8 = r8.f1036a
            if (r8 == 0) goto L24
            if (r8 == r1) goto L22
        L20:
            r1 = r2
            goto L3d
        L22:
            r1 = -2
            goto L3d
        L24:
            if (r3 == 0) goto L3d
            int r8 = r3.length
            if (r8 != 0) goto L2a
            goto L3d
        L2a:
            int r8 = r3.length
            r1 = 0
            r4 = r1
        L2d:
            if (r4 >= r8) goto L3d
            r5 = r3[r4]
            int r5 = r5.f1042e
            if (r5 == 0) goto L3a
            if (r5 >= 0) goto L38
            goto L20
        L38:
            r1 = r5
            goto L3d
        L3a:
            int r4 = r4 + 1
            goto L2d
        L3d:
            if (r1 == 0) goto L45
            L.f r6 = new L.f
            r6.<init>(r1)
            return r6
        L45:
            android.graphics.Typeface r7 = G.g.a(r7, r3, r9)
            if (r7 == 0) goto L54
            r0.put(r6, r7)
            L.f r6 = new L.f
            r6.<init>(r7)
            return r6
        L54:
            L.f r6 = new L.f
            r6.<init>(r2)
            return r6
        L5a:
            L.f r6 = new L.f
            r7 = -1
            r6.<init>(r7)
            return r6
        */
        throw new UnsupportedOperationException("Method not decompiled: L.g.a(java.lang.String, android.content.Context, I0.b, int):L.f");
    }
}
