package com.bytedance.sysoptimizer;

import com.bytedance.covode.number.Covode;

public class NougatJitCompileOptimizer {
    public static boolean sOptimized;

    static {
        Covode.recordClassIndex(38420);
    }

    public static native void optimize();

    /* JADX WARNING: Code restructure failed: missing block: B:25:?, code lost:
        com.bytedance.frameworks.apm.trace.MethodCollector.o(14303);
     */
    /* JADX WARNING: Code restructure failed: missing block: B:27:0x0031, code lost:
        return;
     */
    /* JADX WARNING: Exception block dominator not found, dom blocks: [B:24:0x002d, B:28:0x0032] */
    /* JADX WARNING: Missing exception handler attribute for start block: B:24:0x002d */
    /* JADX WARNING: Missing exception handler attribute for start block: B:28:0x0032 */
    /* JADX WARNING: Unknown top exception splitter block from list: {B:28:0x0032=Splitter:B:28:0x0032, B:24:0x002d=Splitter:B:24:0x002d} */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public static synchronized void fix(android.content.Context r4) {
        /*
            java.lang.Class<com.bytedance.sysoptimizer.NougatJitCompileOptimizer> r3 = com.bytedance.sysoptimizer.NougatJitCompileOptimizer.class
            monitor-enter(r3)
            r2 = 14303(0x37df, float:2.0043E-41)
            com.bytedance.frameworks.apm.trace.MethodCollector.i(r2)     // Catch:{ all -> 0x0037 }
            boolean r0 = sOptimized     // Catch:{ all -> 0x0037 }
            if (r0 == 0) goto L_0x0011
            com.bytedance.frameworks.apm.trace.MethodCollector.o(r2)     // Catch:{ all -> 0x0037 }
            monitor-exit(r3)
            return
        L_0x0011:
            int r1 = android.os.Build.VERSION.SDK_INT     // Catch:{ all -> 0x0037 }
            r0 = 24
            if (r1 == r0) goto L_0x001c
            com.bytedance.frameworks.apm.trace.MethodCollector.o(r2)     // Catch:{ all -> 0x0037 }
            monitor-exit(r3)
            return
        L_0x001c:
            boolean r0 = com.bytedance.sysoptimizer.SysOptimizer.loadOptimizerLibrary(r4)     // Catch:{ all -> 0x0037 }
            if (r0 == 0) goto L_0x0032
            optimize()     // Catch:{ UnsatisfiedLinkError -> 0x002d, NoSuchMethodError -> 0x0032 }
            r0 = 1
            sOptimized = r0     // Catch:{ UnsatisfiedLinkError -> 0x002d, NoSuchMethodError -> 0x0032 }
            com.bytedance.frameworks.apm.trace.MethodCollector.o(r2)     // Catch:{ all -> 0x0037 }
            monitor-exit(r3)
            return
        L_0x002d:
            com.bytedance.frameworks.apm.trace.MethodCollector.o(r2)     // Catch:{ all -> 0x0037 }
            monitor-exit(r3)
            return
        L_0x0032:
            com.bytedance.frameworks.apm.trace.MethodCollector.o(r2)     // Catch:{ all -> 0x0037 }
            monitor-exit(r3)
            return
        L_0x0037:
            r0 = move-exception
            monitor-exit(r3)
            throw r0
        */
        throw new UnsupportedOperationException("Method not decompiled: com.bytedance.sysoptimizer.NougatJitCompileOptimizer.fix(android.content.Context):void");
    }
}
