package b.f.g;

import android.annotation.SuppressLint;
import android.graphics.Typeface;
import com.cvte.vman.instance.InvokeCmd;
import java.util.ArrayList;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.LinkedBlockingDeque;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/* JADX INFO: loaded from: classes.dex */
public class j {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public static final b.d.f<String, Typeface> f956a = new b.d.f<>(16);

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public static final ExecutorService f957b;

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

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public static final b.d.h<String, ArrayList<b.f.i.a<a>>> f959d;

    public static final class a {

        /* JADX INFO: renamed from: a, reason: collision with root package name */
        public final Typeface f960a;

        /* JADX INFO: renamed from: b, reason: collision with root package name */
        public final int f961b;

        public a(int i) {
            this.f960a = null;
            this.f961b = i;
        }

        @SuppressLint({"WrongConstant"})
        public a(Typeface typeface) {
            this.f960a = typeface;
            this.f961b = 0;
        }
    }

    static {
        ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(0, 1, InvokeCmd.CMD_PMSCTRL_SET_PMS_WAKEUP_SOURCES, TimeUnit.MILLISECONDS, new LinkedBlockingDeque(), new n("fonts-androidx", 10));
        threadPoolExecutor.allowCoreThreadTimeOut(true);
        f957b = threadPoolExecutor;
        f958c = new Object();
        f959d = new b.d.h<>();
    }

    /* JADX WARN: Removed duplicated region for block: B:23:0x0035  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public static b.f.g.j.a a(java.lang.String r7, android.content.Context r8, b.f.g.e r9, int r10) {
        /*
            b.d.f<java.lang.String, android.graphics.Typeface> r0 = b.f.g.j.f956a
            java.lang.Object r0 = r0.a(r7)
            android.graphics.Typeface r0 = (android.graphics.Typeface) r0
            if (r0 == 0) goto L10
            b.f.g.j$a r7 = new b.f.g.j$a
            r7.<init>(r0)
            return r7
        L10:
            r0 = 0
            b.f.g.k r9 = b.f.g.d.a(r8, r9, r0)     // Catch: android.content.pm.PackageManager.NameNotFoundException -> L61
            int r1 = r9.f962a
            r2 = -3
            r3 = 1
            if (r1 == 0) goto L20
            if (r1 == r3) goto L1e
            goto L35
        L1e:
            r1 = -2
            goto L3e
        L20:
            b.f.g.l[] r1 = r9.f963b
            if (r1 == 0) goto L3d
            int r4 = r1.length
            if (r4 != 0) goto L28
            goto L3d
        L28:
            int r3 = r1.length
            r4 = 0
            r5 = r4
        L2b:
            if (r5 >= r3) goto L3c
            r6 = r1[r5]
            int r6 = r6.f968e
            if (r6 == 0) goto L39
            if (r6 >= 0) goto L37
        L35:
            r1 = r2
            goto L3e
        L37:
            r1 = r6
            goto L3e
        L39:
            int r5 = r5 + 1
            goto L2b
        L3c:
            r3 = r4
        L3d:
            r1 = r3
        L3e:
            if (r1 == 0) goto L46
            b.f.g.j$a r7 = new b.f.g.j$a
            r7.<init>(r1)
            return r7
        L46:
            b.f.g.l[] r9 = r9.f963b
            b.f.d.e r1 = b.f.d.c.f927a
            android.graphics.Typeface r8 = r1.b(r8, r0, r9, r10)
            if (r8 == 0) goto L5b
            b.d.f<java.lang.String, android.graphics.Typeface> r9 = b.f.g.j.f956a
            r9.b(r7, r8)
            b.f.g.j$a r7 = new b.f.g.j$a
            r7.<init>(r8)
            return r7
        L5b:
            b.f.g.j$a r7 = new b.f.g.j$a
            r7.<init>(r2)
            return r7
        L61:
            b.f.g.j$a r7 = new b.f.g.j$a
            r8 = -1
            r7.<init>(r8)
            return r7
        */
        throw new UnsupportedOperationException("Method not decompiled: b.f.g.j.a(java.lang.String, android.content.Context, b.f.g.e, int):b.f.g.j$a");
    }
}
