package com.bytedance.crash;

import X.AnonymousClass7lW;
import X.C04097fm;
import X.C23518bO;
import X.C23818bs;
import X.C27288hT;
import X.C27458hk;
import X.C27468hl;
import X.C27498ho;
import X.C27508hp;
import X.C27518hq;
import X.C27548ht;
import X.C27698i8;
import X.C27708i9;
import X.C27728iB;
import X.C27758iE;
import X.C27798iI;
import X.C27828iL;
import X.C27838iM;
import X.C27908iT;
import X.C27918iU;
import X.C27968iZ;
import X.C28068ij;
import X.C28138iq;
import X.C28288j5;
import X.C28318j8;
import X.C28378jE;
import X.C28458jM;
import X.C28558jW;
import X.C28638je;
import X.C28848jz;
import X.C28928k7;
import X.C29178kW;
import X.C29218ka;
import X.C29378kq;
import X.C29398ks;
import X.C29408kt;
import X.C29418ku;
import X.C29538l6;
import X.C29548l7;
import X.C30088lz;
import X.C30158m6;
import android.app.Application;
import android.content.Context;
import android.os.Build;
import android.os.SystemClock;
import android.text.TextUtils;
import com.bytedance.covode.number.Covode;
import com.bytedance.crash.MonitorCrash;
import com.bytedance.crash.gwpasan.GwpAsan;
import com.bytedance.crash.nativecrash.NativeCrashCollector;
import com.bytedance.crash.nativecrash.NativeImpl;
import com.bytedance.crash.runtime.ConfigManager;
import com.bytedance.crash.util.NativeTools;
import com.bytedance.frameworks.apm.trace.MethodCollector;
import java.io.File;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public final class Npth {
    public static boolean sInit;

    static {
        Covode.recordClassIndex(25005);
    }

    public static void setAlogFlushAddr(long j) {
    }

    public static void setAlogLogDirAddr(long j) {
    }

    public static void setAlogWriteAddr(long j) {
    }

    public static void stopEnsure() {
        C27918iU.LJIIIIZZ = true;
    }

    public static void stopUpload() {
        C27918iU.LJII = true;
    }

    public static ConfigManager getConfigManager() {
        return C27798iI.LJI;
    }

    public static boolean hasCrashWhenNativeCrash() {
        return C27498ho.LIZLLL;
    }

    public static boolean isANREnable() {
        return C27918iU.LIZJ;
    }

    public static boolean isInit() {
        return sInit;
    }

    public static boolean isJavaCrashEnable() {
        return C27918iU.LIZIZ;
    }

    public static boolean isNativeCrashEnable() {
        return C27918iU.LIZLLL;
    }

    public static boolean isStopUpload() {
        return C27918iU.LJII;
    }

    public static boolean hasCrash() {
        return C27918iU.LIZ();
    }

    public static boolean hasCrashWhenJavaCrash() {
        return C27918iU.LIZIZ();
    }

    public static boolean isRunning() {
        if (SystemClock.uptimeMillis() - C28458jM.LIZIZ <= 15000) {
            return true;
        }
        return false;
    }

    public static void openANRMonitor() {
        if (C27918iU.LIZ) {
            C28848jz.LIZ(C27798iI.LIZ).LIZ.LIZ();
            C27918iU.LIZJ = true;
        }
    }

    public static void openJavaCrashMonitor() {
        if (C27918iU.LIZ && !C27918iU.LIZIZ) {
            Context context = C27798iI.LIZ;
            C27498ho LIZ = C27498ho.LIZ();
            LIZ.LIZ = new C27548ht(context, true);
            LIZ.LIZIZ = new C27548ht(context, false);
        }
    }

    public static boolean openNativeCrashMonitor() {
        if (C27918iU.LIZ && !C27918iU.LIZLLL) {
            boolean LIZ = NativeImpl.LIZ(C27798iI.LIZ);
            C27918iU.LIZLLL = LIZ;
            if (!LIZ) {
                C27918iU.LJ = true;
            }
        }
        return C27918iU.LIZLLL;
    }

    public static void stopAnr() {
        if (C27918iU.LIZ) {
            C27758iE r3 = C28848jz.LIZ(C27798iI.LIZ).LIZ;
            if (r3.LIZIZ) {
                r3.LIZIZ = false;
                if (r3.LIZ != null) {
                    r3.LIZ.LIZJ = true;
                }
                if (C28378jE.LIZ) {
                    C28378jE.LIZ = false;
                }
                r3.LIZ = null;
            }
            C27918iU.LIZJ = false;
        }
    }

    public static void setCurProcessName(String str) {
        C28068ij.LIZ = str;
    }

    public static void setLogcatImpl(C29418ku r0) {
        C27508hp.LIZ = r0;
    }

    public static void setNpthStartEventDelayTime(long j) {
        C27798iI.LJIIL = j;
    }

    public static void setRequestIntercept(C29548l7 r0) {
        C30088lz.LIZIZ = r0;
    }

    public static void setScriptStackCallback(C29408kt r0) {
        NativeCrashCollector.LIZIZ = r0;
    }

    public static void customActivityName(C23518bO r1) {
        C27828iL.LIZ().LJJIFFI = r1;
    }

    public static void dumpHprof(String str) {
        NativeTools.LIZ().LIZLLL(str);
    }

    public static void registerHprofCallback(IOOMCallback iOOMCallback) {
        C27918iU.LJFF.LIZLLL.add(iOOMCallback);
    }

    public static void registerOOMCallback(IOOMCallback iOOMCallback) {
        C27918iU.LJFF.LIZJ.add(iOOMCallback);
    }

    public static void removeTag(String str) {
        C27798iI.LJII.LIZ(str, (String) null);
    }

    public static void setApplication(Application application) {
        if (application != null) {
            C27798iI.LIZIZ = application;
        }
    }

    public static void setBusiness(String str) {
        if (str != null) {
            C27798iI.LJ = str;
        }
    }

    public static void setCrashFilter(ICrashFilter iCrashFilter) {
        C27798iI.LJII.mFilter = iCrashFilter;
    }

    public static void setEncryptImpl(C30158m6 r1) {
        C27798iI.LJI.setEncryptImpl(r1);
    }

    public static Context INVOKEVIRTUAL_com_bytedance_crash_Npth_com_ss_android_ugc_aweme_lancet_launch_ApplicationContextLancet_getApplicationContext(Context context) {
        Context applicationContext = context.getApplicationContext();
        if (AnonymousClass7lW.LIZJ && applicationContext == null) {
            return AnonymousClass7lW.LIZ;
        }
        return applicationContext;
    }

    public static void addTags(Map<? extends String, ? extends String> map) {
        if (map != null && !map.isEmpty()) {
            C27798iI.LJII.mTagMap.putAll(map);
        }
    }

    public static void reportDartError(String str) {
        if (!TextUtils.isEmpty(str)) {
            C28318j8.LIZ(str, (Map<? extends String, ? extends String>) null, (Map<String, String>) null, (C29538l6) null);
        }
    }

    public static long getFileSize(String str) {
        MethodCollector.i(718);
        NativeTools.LIZ();
        long nativeGetPathSize = NativeTools.nativeGetPathSize(str, 0);
        MethodCollector.o(718);
        return nativeGetPathSize;
    }

    public static long getFolderSize(String str) {
        MethodCollector.i(714);
        NativeTools.LIZ();
        long nativeGetPathSize = NativeTools.nativeGetPathSize(str, 1);
        MethodCollector.o(714);
        return nativeGetPathSize;
    }

    public static void reportError(String str) {
        if (C27798iI.LJI.isReportErrorEnable() && str != null) {
            C04097fm.LIZIZ().LIZ(new C28288j5(str));
        }
    }

    public static void setAlogFlushV2Addr(long j) {
        MethodCollector.i(2430);
        if (NativeImpl.LIZ) {
            try {
                NativeImpl.doSetAlogFlushAddr(j);
                MethodCollector.o(2430);
                return;
            } catch (Throwable unused) {
            }
        }
        MethodCollector.o(2430);
    }

    public static void enableGwpAsan(boolean z) {
        if (!NativeTools.LIZ().LIZJ()) {
            C27798iI.LJI.isDebugMode();
        } else if (Build.VERSION.SDK_INT > 29) {
        } else {
            if ((z || C27798iI.LIZJ() || C27288hT.LIZIZ()) && !C27908iT.LJFF()) {
                startGwpAsan(true);
            }
        }
    }

    public static void reportError(Throwable th) {
        if (C27798iI.LJI.isReportErrorEnable() && th != null) {
            C04097fm.LIZIZ().LIZ(new C28138iq(th));
        }
    }

    public static void startGwpAsan(boolean z) {
        Context context = C27798iI.LIZ;
        GwpAsan gwpAsan = new GwpAsan(z, context, C27468hl.LIZIZ(context), C27908iT.LJ());
        if (GwpAsan.LJFF) {
            C27798iI.LJI.isDebugMode();
            return;
        }
        File LIZLLL = C27468hl.LIZLLL(C27798iI.LIZ);
        if (!LIZLLL.exists() || !LIZLLL.isDirectory() || !GwpAsan.LIZ(LIZLLL, "cfgclose")) {
            GwpAsan.LJI = false;
            if (C27798iI.LIZJ() || C27288hT.LIZIZ()) {
                C27798iI.LJI.isDebugMode();
                GwpAsan.LJI = true;
            } else if (!GwpAsan.LIZIZ()) {
                C27798iI.LJI.isDebugMode();
                return;
            }
            new Thread("XAsanTracker") {
                static {
                    /*
                        r0 = 25079(0x61f7, float:3.5143E-41)
                        com.bytedance.covode.number.Covode.recordClassIndex(r0)
                        return
                    */
                    throw new UnsupportedOperationException("Method not decompiled: com.bytedance.crash.gwpasan.GwpAsan.AnonymousClass1.<clinit>():void");
                }

                public final void run(
/*
Method generation error in method: com.bytedance.crash.gwpasan.GwpAsan.1.run():void, dex: classes4.dex
                jadx.core.utils.exceptions.JadxRuntimeException: Method args not loaded: com.bytedance.crash.gwpasan.GwpAsan.1.run():void, class status: UNLOADED
                	at jadx.core.dex.nodes.MethodNode.getArgRegs(MethodNode.java:278)
                	at jadx.core.codegen.MethodGen.addDefinition(MethodGen.java:116)
                	at jadx.core.codegen.ClassGen.addMethodCode(ClassGen.java:313)
                	at jadx.core.codegen.ClassGen.addMethod(ClassGen.java:271)
                	at jadx.core.codegen.ClassGen.lambda$addInnerClsAndMethods$2(ClassGen.java:240)
                	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
                	at java.util.ArrayList.forEach(ArrayList.java:1259)
                	at java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:395)
                	at java.util.stream.Sink$ChainedReference.end(Sink.java:258)
                	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:483)
                	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
                	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
                	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
                	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
                	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485)
                	at jadx.core.codegen.ClassGen.addInnerClsAndMethods(ClassGen.java:236)
                	at jadx.core.codegen.ClassGen.addClassBody(ClassGen.java:227)
                	at jadx.core.codegen.InsnGen.inlineAnonymousConstructor(InsnGen.java:676)
                	at jadx.core.codegen.InsnGen.makeConstructor(InsnGen.java:607)
                	at jadx.core.codegen.InsnGen.makeInsnBody(InsnGen.java:364)
                	at jadx.core.codegen.InsnGen.makeInsn(InsnGen.java:231)
                	at jadx.core.codegen.InsnGen.addWrappedArg(InsnGen.java:123)
                	at jadx.core.codegen.InsnGen.addArg(InsnGen.java:107)
                	at jadx.core.codegen.InsnGen.addArgDot(InsnGen.java:91)
                	at jadx.core.codegen.InsnGen.makeInvoke(InsnGen.java:697)
                	at jadx.core.codegen.InsnGen.makeInsnBody(InsnGen.java:368)
                	at jadx.core.codegen.InsnGen.makeInsn(InsnGen.java:250)
                	at jadx.core.codegen.InsnGen.makeInsn(InsnGen.java:221)
                	at jadx.core.codegen.RegionGen.makeSimpleBlock(RegionGen.java:109)
                	at jadx.core.codegen.RegionGen.makeRegion(RegionGen.java:55)
                	at jadx.core.codegen.RegionGen.makeSimpleRegion(RegionGen.java:92)
                	at jadx.core.codegen.RegionGen.makeRegion(RegionGen.java:58)
                	at jadx.core.codegen.RegionGen.makeRegionIndent(RegionGen.java:98)
                	at jadx.core.codegen.RegionGen.makeIf(RegionGen.java:142)
                	at jadx.core.codegen.RegionGen.makeRegion(RegionGen.java:62)
                	at jadx.core.codegen.RegionGen.makeSimpleRegion(RegionGen.java:92)
                	at jadx.core.codegen.RegionGen.makeRegion(RegionGen.java:58)
                	at jadx.core.codegen.RegionGen.makeSimpleRegion(RegionGen.java:92)
                	at jadx.core.codegen.RegionGen.makeRegion(RegionGen.java:58)
                	at jadx.core.codegen.RegionGen.makeSimpleRegion(RegionGen.java:92)
                	at jadx.core.codegen.RegionGen.makeRegion(RegionGen.java:58)
                	at jadx.core.codegen.RegionGen.makeSimpleRegion(RegionGen.java:92)
                	at jadx.core.codegen.RegionGen.makeRegion(RegionGen.java:58)
                	at jadx.core.codegen.MethodGen.addRegionInsns(MethodGen.java:211)
                	at jadx.core.codegen.MethodGen.addInstructions(MethodGen.java:204)
                	at jadx.core.codegen.ClassGen.addMethodCode(ClassGen.java:318)
                	at jadx.core.codegen.ClassGen.addMethod(ClassGen.java:271)
                	at jadx.core.codegen.ClassGen.lambda$addInnerClsAndMethods$2(ClassGen.java:240)
                	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
                	at java.util.ArrayList.forEach(ArrayList.java:1259)
                	at java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:395)
                	at java.util.stream.Sink$ChainedReference.end(Sink.java:258)
                	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:483)
                	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
                	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
                	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
                	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
                	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485)
                	at jadx.core.codegen.ClassGen.addInnerClsAndMethods(ClassGen.java:236)
                	at jadx.core.codegen.ClassGen.addClassBody(ClassGen.java:227)
                	at jadx.core.codegen.ClassGen.addClassCode(ClassGen.java:112)
                	at jadx.core.codegen.ClassGen.makeClass(ClassGen.java:78)
                	at jadx.core.codegen.CodeGen.wrapCodeGen(CodeGen.java:44)
                	at jadx.core.codegen.CodeGen.generateJavaCode(CodeGen.java:33)
                	at jadx.core.codegen.CodeGen.generate(CodeGen.java:21)
                	at jadx.core.ProcessClass.generateCode(ProcessClass.java:61)
                	at jadx.core.dex.nodes.ClassNode.decompile(ClassNode.java:273)
                
*/
            }.start();
        }
    }

    public static void registerSdk(String str, String str2) {
        C27798iI.LIZ(str, str2);
    }

    public static void addAttachLongUserData(AttachUserData attachUserData, CrashType crashType) {
        if (attachUserData != null) {
            C27798iI.LJII.LIZ(attachUserData, crashType);
        }
    }

    public static void addAttachUserData(AttachUserData attachUserData, CrashType crashType) {
        if (attachUserData != null) {
            C27798iI.LJII.LIZ(attachUserData, crashType);
        }
    }

    public static void addTag(String str, String str2) {
        C27798iI.LJII.LIZ(str, str2);
    }

    public static void removeAttachLongUserData(AttachUserData attachUserData, CrashType crashType) {
        if (attachUserData != null) {
            C27798iI.LJII.LIZ(crashType, attachUserData);
        }
    }

    public static void removeAttachUserData(AttachUserData attachUserData, CrashType crashType) {
        if (attachUserData != null) {
            C27798iI.LJII.LIZ(crashType, attachUserData);
        }
    }

    public static void setAttachUserData(AttachUserData attachUserData, CrashType crashType) {
        if (attachUserData != null) {
            C27798iI.LJII.LIZ(attachUserData, crashType);
        }
    }

    public static void unregisterHprofCallback(IOOMCallback iOOMCallback, CrashType crashType) {
        C27918iU.LJFF.LIZLLL.remove(iOOMCallback);
    }

    public static void unregisterOOMCallback(IOOMCallback iOOMCallback, CrashType crashType) {
        C27918iU.LJFF.LIZJ.remove(iOOMCallback);
    }

    public static void setAnrInfoFileObserver(String str, C29398ks r3) {
        C04097fm.LIZIZ().LIZ(new C28638je(str, r3));
    }

    public static synchronized void init(Context context, ICommonParams iCommonParams) {
        synchronized (Npth.class) {
            MethodCollector.i(926);
            init(context, iCommonParams, true, false, false);
            MethodCollector.o(926);
        }
    }

    public static synchronized void initMiniApp(Context context, ICommonParams iCommonParams) {
        synchronized (Npth.class) {
            MethodCollector.i(917);
            C27798iI.LJFF = true;
            init(context, iCommonParams, true, false, true, true);
            MethodCollector.o(917);
        }
    }

    public static void unregisterCrashCallback(ICrashCallback iCrashCallback, CrashType crashType) {
        C27708i9 r1 = C27918iU.LJFF;
        if (crashType == CrashType.ALL) {
            r1.LIZ.removeAll(iCrashCallback);
        } else {
            r1.LIZ.removeInList(crashType, iCrashCallback);
        }
    }

    public static void registerCrashCallback(ICrashCallback iCrashCallback, CrashType crashType) {
        C27708i9 r1 = C27918iU.LJFF;
        if (crashType == CrashType.ALL) {
            r1.LIZ.addMulti(iCrashCallback, CrashType.NATIVE, CrashType.ANR, CrashType.JAVA, CrashType.LAUNCH);
            return;
        }
        r1.LIZ.add(crashType, iCrashCallback);
    }

    public static void registerCrashInfoCallback(C27728iB r4, CrashType crashType) {
        C27708i9 r1 = C27918iU.LJFF;
        if (crashType == CrashType.ALL) {
            r1.LIZIZ.addMulti(r4, CrashType.NATIVE, CrashType.ANR, CrashType.JAVA, CrashType.LAUNCH);
            return;
        }
        r1.LIZIZ.add(crashType, r4);
    }

    public static void registerSdk(int i, String str) {
        MethodCollector.i(2417);
        if (C27798iI.LJIIIIZZ == null) {
            synchronized (C27798iI.class) {
                try {
                    if (C27798iI.LJIIIIZZ == null) {
                        C27798iI.LJIIIIZZ = new ConcurrentHashMap<>();
                    }
                } catch (Throwable th) {
                    MethodCollector.o(2417);
                    throw th;
                }
            }
        }
        C27798iI.LJIIIIZZ.put(Integer.valueOf(i), str);
        MethodCollector.o(2417);
    }

    public static void reportGameException(String str, String str2, String str3) {
        if (!TextUtils.isEmpty(str3) || !TextUtils.isEmpty(str) || !TextUtils.isEmpty(str2)) {
            C04097fm.LIZIZ().LIZ(new C27968iZ(str, str2, str3));
        }
    }

    public static void enableALogCollector(String str, C29378kq r3, C29178kW r4) {
        if (!TextUtils.isEmpty(str) && new File(str).exists()) {
            C27838iM LIZ = C27838iM.LIZ();
            LIZ.LIZ = str;
            LIZ.LIZIZ = r3;
            LIZ.LIZJ = r4;
            if (!LIZ.LIZLLL) {
                LIZ.LIZLLL = true;
            }
        }
    }

    public static void reportDartError(String str, Map<? extends String, ? extends String> map, Map<String, String> map2, C29538l6 r4) {
        if (!TextUtils.isEmpty(str)) {
            C28318j8.LIZ(str, map, map2, r4);
        }
    }

    public static void startNativeHeapTracker(int i, int i2, int i3, boolean z) {
        Context context = C27798iI.LIZ;
        C28068ij.LIZJ(context);
        new File(C27468hl.LJIIIZ(context), "NativeHeapTracker");
    }

    public static synchronized void initMiniApp(Context context, ICommonParams iCommonParams, int i, String str) {
        synchronized (Npth.class) {
            MethodCollector.i(924);
            C27798iI.LJFF = true;
            C27798iI.LJIIJ = i;
            C27798iI.LJIIJJI = str;
            init(context, iCommonParams, true, true, true, true);
            MethodCollector.o(924);
        }
    }

    public static synchronized void init(Context context, ICommonParams iCommonParams, boolean z, boolean z2, boolean z3) {
        synchronized (Npth.class) {
            MethodCollector.i(1071);
            boolean z4 = z;
            Context context2 = context;
            init(context2, iCommonParams, z4, z4, z2, z3);
            MethodCollector.o(1071);
        }
    }

    public static synchronized void init(Context context, ICommonParams iCommonParams, boolean z, boolean z2, boolean z3, boolean z4) {
        synchronized (Npth.class) {
            MethodCollector.i(1148);
            init(context, iCommonParams, z, z2, z3, z4, 0);
            MethodCollector.o(1148);
        }
    }

    public static synchronized void init(Context context, ICommonParams iCommonParams, boolean z, boolean z2, boolean z3, boolean z4, long j) {
        String str;
        Application application;
        synchronized (Npth.class) {
            MethodCollector.i(1159);
            if (C27798iI.LIZIZ != null) {
                application = C27798iI.LIZIZ;
            } else if (context instanceof Application) {
                application = (Application) context;
                if (application.getBaseContext() == null) {
                    IllegalArgumentException illegalArgumentException = new IllegalArgumentException("Param 'application' have not called 'super.attachBaseContext()', please using 'baseContext' param and invoking 'Npth.setApplication(Application)' before init");
                    MethodCollector.o(1159);
                    throw illegalArgumentException;
                }
            } else {
                try {
                    application = (Application) INVOKEVIRTUAL_com_bytedance_crash_Npth_com_ss_android_ugc_aweme_lancet_launch_ApplicationContextLancet_getApplicationContext(context);
                    if (application == null) {
                        throw new IllegalArgumentException(str);
                    } else if (application.getBaseContext() != null) {
                        context = application.getBaseContext();
                    }
                } finally {
                    str = "Couldn't obtain Application instance before 'super.attachBaseContext()', please invoking 'Npth.setApplication(Application)' before init.";
                    IllegalArgumentException illegalArgumentException2 = new IllegalArgumentException(str);
                    MethodCollector.o(1159);
                }
            }
            init(application, context, iCommonParams, z, z2, z3, z4, j);
            MethodCollector.o(1159);
        }
    }

    public static synchronized void init(Application application, Context context, ICommonParams iCommonParams, boolean z, boolean z2, boolean z3, boolean z4, long j) {
        synchronized (Npth.class) {
            MethodCollector.i(1224);
            SystemClock.uptimeMillis();
            if (sInit) {
                MethodCollector.o(1224);
                return;
            }
            sInit = true;
            final Context context2 = context;
            Application application2 = application;
            C27798iI.LIZ(application2, context2, iCommonParams);
            new C28558jW() {
                static {
                    Covode.recordClassIndex(25006);
                }

                public final String LIZIZ() {
                    return C27798iI.LJI();
                }

                public final void LIZ() {
                    if (C28068ij.LIZIZ(C27798iI.LIZ)) {
                        C04097fm.LIZIZ().LIZ(new C27518hq());
                    }
                }

                public final void LIZ(Map<String, String> map) {
                    Npth.addTags(map);
                }

                public final void LIZ(final C28928k7 r3) {
                    Npth.addAttachUserData(new AttachUserData() {
                        static {
                            Covode.recordClassIndex(25007);
                        }

                        public final Map<? extends String, ? extends String> getUserData(CrashType crashType) {
                            return r3.LIZ();
                        }
                    }, CrashType.ALL);
                }

                public final void LIZ(String str, String str2) {
                    Npth.registerSdk(str, str2);
                }

                public final void LIZIZ(String str, String str2) {
                    C27798iI.LIZ(str + ".so", str2);
                    if (NativeImpl.LIZJ) {
                        C23818bs.LIZ(str, str2);
                    }
                }
            };
            C27918iU.LIZ(application2, context2, z, z2, z3, z4);
            C04097fm.LIZIZ().LIZ(new Runnable() {
                static {
                    Covode.recordClassIndex(25008);
                }

                public final void run() {
                    Map<String, Object> LIZ2 = C27798iI.LIZ().LIZ();
                    int LIZ3 = C27458hk.LIZ(LIZ2.get("update_version_code"), 0);
                    int LIZ4 = C27458hk.LIZ(LIZ2.get("aid"), 4444);
                    MonitorCrash init = MonitorCrash.init(context2, String.valueOf(LIZ4), (long) LIZ3, String.valueOf(LIZ2.get("app_version")));
                    if (init != null) {
                        MonitorCrash.Config config = init.config();
                        config.setDeviceId(C27798iI.LIZ().LIZJ());
                        config.setChannel(String.valueOf(LIZ2.get("channel")));
                    }
                }
            });
            C27918iU.LJIIIZ = new C29218ka() {
                static {
                    Covode.recordClassIndex(25009);
                }

                public final void LIZ(int i, int i2, int i3, boolean z) {
                    Npth.startNativeHeapTracker(i, i2, i3, z);
                }
            };
            C27918iU.LJIIJ = new C27698i8() {
                static {
                    Covode.recordClassIndex(25010);
                }

                public final void LIZ() {
                    Npth.startGwpAsan(false);
                }

                /* JADX WARNING: Can't wrap try/catch for region: R(2:225|226) */
                /* JADX WARNING: Code restructure failed: missing block: B:100:0x0182, code lost:
                    r8 = "    #00";
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:102:?, code lost:
                    r7 = r0 + 1;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:105:0x0194, code lost:
                    if (r7 >= r4.length()) goto L_0x026c;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:108:?, code lost:
                    r14 = r4.optString(r7, (java.lang.String) null);
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:109:0x01a1, code lost:
                    if (r14.startsWith("    #") == false) goto L_0x026c;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:110:0x01a3, code lost:
                    r5.append(r14.trim());
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:112:?, code lost:
                    r5.append(10);
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:113:0x01b5, code lost:
                    if ("Double Free".equals(com.bytedance.crash.gwpasan.GwpAsan.LIZ) == false) goto L_0x01b9;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:114:0x01b7, code lost:
                    r8 = "    #03";
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:116:0x01bf, code lost:
                    if (r14.endsWith("libc.so") != false) goto L_0x0201;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:118:0x01c5, code lost:
                    if (r14.endsWith("libc++_shared.so") != false) goto L_0x0201;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:120:0x01cb, code lost:
                    if (r14.startsWith(r8) == false) goto L_0x0232;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:121:0x01cd, code lost:
                    r0 = com.bytedance.crash.gwpasan.GwpAsan.LIZ(r14, "==/lib/", ".so").trim().split("/");
                    r0 = r0[1].substring(r0[1].lastIndexOf(47) + 1);
                    com.bytedance.crash.gwpasan.GwpAsan.LIZIZ = r0;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:122:0x01ef, code lost:
                    if (r0.length() <= 0) goto L_0x0232;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:124:0x01f7, code lost:
                    if (com.bytedance.crash.gwpasan.GwpAsan.LIZIZ.isEmpty() != false) goto L_0x0232;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:125:0x01f9, code lost:
                    r3.LIZ("gwp_asan_fatal_lib", com.bytedance.crash.gwpasan.GwpAsan.LIZIZ);
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:127:0x0205, code lost:
                    if (r14.startsWith("    #01") == false) goto L_0x0232;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:128:0x0207, code lost:
                    r0 = com.bytedance.crash.gwpasan.GwpAsan.LIZ(r14, "==/lib/", ".so").trim().split("/");
                    r0 = r0[1].substring(r0[1].lastIndexOf(47) + 1);
                    com.bytedance.crash.gwpasan.GwpAsan.LIZIZ = r0;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:129:0x0229, code lost:
                    if (r0.isEmpty() != false) goto L_0x0232;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:130:0x022b, code lost:
                    r3.LIZ("gwp_asan_fatal_lib", com.bytedance.crash.gwpasan.GwpAsan.LIZIZ);
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:131:0x0232, code lost:
                    r15 = r28;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:132:0x0234, code lost:
                    if (r15 == null) goto L_0x0249;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:136:0x023b, code lost:
                    if (r14.contains(r15) != false) goto L_0x0246;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:138:0x0244, code lost:
                    if ("all".equals(r15) == false) goto L_0x0253;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:139:0x0246, code lost:
                    com.bytedance.crash.gwpasan.GwpAsan.LJIIIIZZ = true;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:141:0x024f, code lost:
                    if (r14.contains("data") == false) goto L_0x0253;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:142:0x0251, code lost:
                    com.bytedance.crash.gwpasan.GwpAsan.LJIIIIZZ = true;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:143:0x0253, code lost:
                    r7 = r7 + 1;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:144:0x025a, code lost:
                    r4 = th;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:145:0x025b, code lost:
                    r15 = r28;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:146:0x025f, code lost:
                    r15 = r28;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:148:0x0263, code lost:
                    r4 = th;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:149:0x0264, code lost:
                    r15 = r28;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:150:0x0268, code lost:
                    r15 = r28;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:152:0x026c, code lost:
                    r15 = r28;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:154:?, code lost:
                    r14 = com.bytedance.crash.gwpasan.GwpAsan.LIZ(r4, r7, "deallocated by thread") + 1;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:157:0x027e, code lost:
                    if (r14 >= r4.length()) goto L_0x02d4;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:160:?, code lost:
                    r7 = r4.optString(r14, (java.lang.String) null);
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:161:0x0289, code lost:
                    if (r7.startsWith("    #01") != false) goto L_0x0291;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:163:0x028f, code lost:
                    if (r7.startsWith("    #02") == false) goto L_0x02d1;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:165:0x0295, code lost:
                    if (r7.endsWith("libnpth_xasan.so") != false) goto L_0x02d1;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:167:0x029b, code lost:
                    if (r7.endsWith("libc++_shared.so") != false) goto L_0x02d1;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:168:0x029d, code lost:
                    r0 = com.bytedance.crash.gwpasan.GwpAsan.LIZ(r7, "==/lib/", ".so").trim().split("/");
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:170:?, code lost:
                    r0 = r0[1].substring(r0[1].lastIndexOf(47) + 1);
                    com.bytedance.crash.gwpasan.GwpAsan.LIZJ = r0;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:171:0x02bf, code lost:
                    if (r0.length() <= 0) goto L_0x02d1;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:173:0x02c7, code lost:
                    if (com.bytedance.crash.gwpasan.GwpAsan.LIZJ.isEmpty() != false) goto L_0x02d1;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:174:0x02c9, code lost:
                    r3.LIZ("gwp_asan_deallocated_lib", com.bytedance.crash.gwpasan.GwpAsan.LIZJ);
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:175:0x02d1, code lost:
                    r14 = r14 + 1;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:178:?, code lost:
                    r7 = com.bytedance.crash.gwpasan.GwpAsan.LIZ(r4, r14, "allocated by thread") + 1;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:180:0x02e0, code lost:
                    if (r7 >= r4.length()) goto L_0x0336;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:183:?, code lost:
                    r14 = r4.optString(r7, (java.lang.String) null);
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:184:0x02eb, code lost:
                    if (r14.startsWith("    #01") != false) goto L_0x02f3;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:186:0x02f1, code lost:
                    if (r14.startsWith("    #02") == false) goto L_0x0333;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:188:0x02f7, code lost:
                    if (r14.endsWith("libnpth_xasan.so") != false) goto L_0x0333;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:190:0x02fd, code lost:
                    if (r14.endsWith("libc++_shared.so") != false) goto L_0x0333;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:191:0x02ff, code lost:
                    r0 = com.bytedance.crash.gwpasan.GwpAsan.LIZ(r14, "==/lib/", ".so").trim().split("/");
                    r0 = r0[1].substring(r0[1].lastIndexOf(47) + 1);
                    com.bytedance.crash.gwpasan.GwpAsan.LIZLLL = r0;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:192:0x0321, code lost:
                    if (r0.length() <= 0) goto L_0x0333;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:194:0x0329, code lost:
                    if (com.bytedance.crash.gwpasan.GwpAsan.LIZLLL.isEmpty() != false) goto L_0x0333;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:195:0x032b, code lost:
                    r3.LIZ("gwp_asan_allocated_lib", com.bytedance.crash.gwpasan.GwpAsan.LIZLLL);
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:196:0x0333, code lost:
                    r7 = r7 + 1;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:199:?, code lost:
                    r0 = com.bytedance.crash.gwpasan.GwpAsan.LIZ(r4, r7, "build id:");
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:200:0x033c, code lost:
                    if (r0 <= 0) goto L_0x03ac;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:202:?, code lost:
                    r9 = new org.json.JSONArray();
                    r10 = r0 + 1;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:204:0x0349, code lost:
                    if (r10 >= r4.length()) goto L_0x03a7;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:205:0x034b, code lost:
                    r6 = r4.optString(r10, (java.lang.String) null);
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:206:0x0356, code lost:
                    if (r6.startsWith("    /") == false) goto L_0x03a4;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:210:?, code lost:
                    r6 = r6.trim().split("\\s");
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:211:0x0364, code lost:
                    if (r6.length < 3) goto L_0x03a4;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:212:0x0366, code lost:
                    r9.put(new org.json.JSONObject().put("lib_name", r6[0].substring(r6[0].lastIndexOf(47) + 1)).put("lib_uuid", com.bytedance.crash.gwpasan.GwpAsan.LIZ(r6[r6.length - 1].substring(0, r6[r6.length - 1].length() - 1))));
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:213:0x03a4, code lost:
                    r10 = r10 + 1;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:214:0x03a7, code lost:
                    r3.LIZ("crash_lib_uuid", (java.lang.Object) r9);
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:217:?, code lost:
                    r3.LIZ("data", (java.lang.Object) r5.toString());
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:220:0x03b7, code lost:
                    if (com.bytedance.crash.gwpasan.GwpAsan.LJIIJ != null) goto L_0x03bd;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:221:0x03b9, code lost:
                    com.bytedance.crash.gwpasan.GwpAsan.LJIIJ = X.C27798iI.LIZ;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:222:0x03bd, code lost:
                    r6 = com.bytedance.crash.entity.Header.LIZIZ(com.bytedance.crash.gwpasan.GwpAsan.LJIIJ);
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:224:?, code lost:
                    r6.LIZ.put("aid", 1314);
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:226:?, code lost:
                    X.C27798iI.LJI.isDebugMode();
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:245:?, code lost:
                    X.C27798iI.LJI.isDebugMode();
                    X.C27338hY.LIZ(r2);
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:251:?, code lost:
                    X.C27798iI.LJI.isDebugMode();
                    X.C27338hY.LIZ(r2);
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:252:0x0444, code lost:
                    r4 = th;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:253:0x0446, code lost:
                    r4 = th;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:254:0x0448, code lost:
                    r4 = th;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:259:0x044e, code lost:
                    r4 = th;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:260:0x044f, code lost:
                    r15 = r28;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:261:0x0452, code lost:
                    r15 = r28;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:283:0x0479, code lost:
                    r4 = th;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:293:0x0490, code lost:
                    r3 = th;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:295:0x0499, code lost:
                    r15 = r28;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:53:?, code lost:
                    r3.LIZ("process_name", (java.lang.Object) r9[r9.length - 2]);
                    r5 = new java.lang.StringBuilder();
                    r0 = com.bytedance.crash.gwpasan.GwpAsan.LIZ(r4, r7 + 1, "Signal ");
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:54:0x00fb, code lost:
                    if (r0 >= 0) goto L_0x0102;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:56:?, code lost:
                    X.C27338hY.LIZ(r2);
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:59:?, code lost:
                    r5.append(r4.optString(r0, (java.lang.String) null));
                    r5.append(10);
                    r8 = com.bytedance.crash.gwpasan.GwpAsan.LIZ(r4, r0 + 1, "GWP-ASan message:");
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:60:0x0117, code lost:
                    if (r8 >= 0) goto L_0x011e;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:62:?, code lost:
                    X.C27338hY.LIZ(r2);
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:65:?, code lost:
                    r7 = r4.optString(r8, (java.lang.String) null).replace("GWP-ASan message:", "abort message:");
                    r5.append(r7);
                    r5.append(10);
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:67:0x0139, code lost:
                    if (r7.contains("Use After Free") == false) goto L_0x013e;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:69:?, code lost:
                    com.bytedance.crash.gwpasan.GwpAsan.LIZ = "Use After Free";
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:72:0x0142, code lost:
                    if (r7.contains("Double Free") == false) goto L_0x0147;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:74:?, code lost:
                    com.bytedance.crash.gwpasan.GwpAsan.LIZ = "Double Free";
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:78:0x014d, code lost:
                    if (r7.contains("Buffer Overflow") == false) goto L_0x0152;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:80:?, code lost:
                    com.bytedance.crash.gwpasan.GwpAsan.LIZ = "Buffer Overflow";
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:84:0x0158, code lost:
                    if (r7.contains("Buffer Underflow") == false) goto L_0x015d;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:86:?, code lost:
                    com.bytedance.crash.gwpasan.GwpAsan.LIZ = "Buffer Underflow";
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:90:0x0163, code lost:
                    if (r7.contains("Invalid Free") == false) goto L_0x0168;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:92:?, code lost:
                    com.bytedance.crash.gwpasan.GwpAsan.LIZ = "Invalid Free";
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:95:?, code lost:
                    com.bytedance.crash.gwpasan.GwpAsan.LIZ = "Unknown";
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:96:0x016c, code lost:
                    r3.LIZ("gwp_asan_type", com.bytedance.crash.gwpasan.GwpAsan.LIZ);
                    r0 = com.bytedance.crash.gwpasan.GwpAsan.LIZ(r4, r8 + 1, "backtrace:");
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:97:0x017b, code lost:
                    if (r0 >= 0) goto L_0x0182;
                 */
                /* JADX WARNING: Code restructure failed: missing block: B:99:?, code lost:
                    X.C27338hY.LIZ(r2);
                 */
                /* JADX WARNING: Exception block dominator not found, dom blocks: [] */
                /* JADX WARNING: Failed to process nested try/catch */
                /* JADX WARNING: Missing exception handler attribute for start block: B:225:0x03cd */
                /* JADX WARNING: Missing exception handler attribute for start block: B:244:0x042e */
                /* JADX WARNING: Missing exception handler attribute for start block: B:281:0x0470 */
                /* JADX WARNING: Removed duplicated region for block: B:254:0x0448 A[ExcHandler: all (th java.lang.Throwable), Splitter:B:134:0x0237] */
                /* JADX WARNING: Removed duplicated region for block: B:259:0x044e A[ExcHandler: all (th java.lang.Throwable), Splitter:B:32:0x0078] */
                /* JADX WARNING: Removed duplicated region for block: B:278:? A[ExcHandler: IOException (unused java.io.IOException), SYNTHETIC, Splitter:B:11:0x0041] */
                /* JADX WARNING: Removed duplicated region for block: B:281:0x0470 A[EDGE_INSN: B:281:0x0470->B:282:? ?: BREAK  , SYNTHETIC, Splitter:B:281:0x0470] */
                /* JADX WARNING: Removed duplicated region for block: B:283:0x0479 A[ExcHandler: all (th java.lang.Throwable), Splitter:B:9:0x003d] */
                /* Code decompiled incorrectly, please refer to instructions dump. */
                public final void LIZ(java.lang.String r28) {
                    /*
                        r27 = this;
                        r15 = r28
                        java.lang.String r23 = "Invalid Free"
                        java.lang.String r22 = "Buffer Underflow"
                        java.lang.String r21 = "Buffer Overflow"
                        java.lang.String r20 = "Use After Free"
                        java.lang.String r24 = "GWP-ASan message:"
                        java.lang.String r19 = "\\s"
                        java.lang.String r18 = "pid:"
                        java.lang.String r17 = "NPTH_CATCH"
                        android.content.Context r0 = com.bytedance.crash.gwpasan.GwpAsan.LJIIJ
                        java.io.File r0 = X.C27468hl.LIZIZ((android.content.Context) r0)
                        java.io.File[] r16 = r0.listFiles()
                        if (r16 == 0) goto L_0x04a1
                        r0 = r16
                        int r0 = r0.length
                        r26 = r0
                        r5 = 0
                        r1 = 0
                    L_0x0025:
                        r0 = r26
                        if (r1 >= r0) goto L_0x04a1
                        r2 = r16[r1]
                        boolean r0 = r2.isFile()
                        if (r0 != 0) goto L_0x046b
                        java.io.File r4 = new java.io.File     // Catch:{ all -> 0x048d }
                        java.lang.String r0 = "tombstone.txt"
                        r4.<init>(r2, r0)     // Catch:{ all -> 0x048d }
                        X.8hU r3 = new X.8hU     // Catch:{ all -> 0x048d }
                        r3.<init>()     // Catch:{ all -> 0x048d }
                        java.lang.String r0 = r4.getAbsolutePath()     // Catch:{ IOException -> 0x046f, all -> 0x0479 }
                        org.json.JSONArray r4 = X.C27338hY.LIZ((java.lang.String) r0)     // Catch:{ IOException -> 0x046d, all -> 0x0479 }
                        if (r4 != 0) goto L_0x0049
                        goto L_0x0468
                    L_0x0049:
                        r0 = r18
                        int r7 = com.bytedance.crash.gwpasan.GwpAsan.LIZ((org.json.JSONArray) r4, (int) r5, (java.lang.String) r0)     // Catch:{ IOException -> 0x046d, all -> 0x0466 }
                        if (r7 >= 0) goto L_0x0056
                        X.C27338hY.LIZ((java.io.File) r2)     // Catch:{ IOException -> 0x046f, all -> 0x0466 }
                        goto L_0x046b
                    L_0x0056:
                        r0 = 0
                        java.lang.String r0 = r4.optString(r7, r0)     // Catch:{ IOException -> 0x046d, all -> 0x0466 }
                        java.lang.String r5 = r0.trim()     // Catch:{ IOException -> 0x046d, all -> 0x0466 }
                        r0 = r19
                        java.lang.String[] r9 = r5.split(r0)     // Catch:{ IOException -> 0x046d, all -> 0x0466 }
                        r10 = 0
                    L_0x0066:
                        int r0 = r9.length     // Catch:{ IOException -> 0x0464, all -> 0x0462 }
                        r25 = 1
                        if (r10 >= r0) goto L_0x00e4
                        r5 = r9[r10]     // Catch:{ IOException -> 0x045f, all -> 0x045b }
                        r0 = r18
                        boolean r0 = r0.equals(r5)     // Catch:{ IOException -> 0x045f, all -> 0x045b }
                        if (r0 == 0) goto L_0x0076
                        goto L_0x00c5
                    L_0x0076:
                        java.lang.String r0 = "tid:"
                        boolean r0 = r0.equals(r5)     // Catch:{ IOException -> 0x0452, all -> 0x044e }
                        if (r0 == 0) goto L_0x0099
                        java.lang.String r8 = "tid"
                        int r0 = r10 + 1
                        r6 = r9[r0]     // Catch:{ IOException -> 0x0470, all -> 0x0455 }
                        r0 = r9[r0]     // Catch:{ IOException -> 0x0470, all -> 0x0455 }
                        int r0 = r0.length()     // Catch:{ IOException -> 0x0470, all -> 0x0455 }
                        int r5 = r0 + -1
                        r0 = 0
                        java.lang.String r0 = r6.substring(r0, r5)     // Catch:{ IOException -> 0x0470, all -> 0x0455 }
                        java.lang.Long r0 = java.lang.Long.decode(r0)     // Catch:{ IOException -> 0x0470, all -> 0x0455 }
                        r3.LIZ((java.lang.String) r8, (java.lang.Object) r0)     // Catch:{ IOException -> 0x0470, all -> 0x0455 }
                        goto L_0x00df
                    L_0x0099:
                        java.lang.String r0 = "name:"
                        boolean r0 = r0.equals(r5)     // Catch:{ IOException -> 0x0452, all -> 0x044e }
                        if (r0 == 0) goto L_0x00df
                        java.lang.String r8 = "crash_thread_name"
                        int r11 = r10 + 1
                        r5 = r9[r11]     // Catch:{ IOException -> 0x0452, all -> 0x044e }
                        r0 = r9[r11]     // Catch:{ IOException -> 0x0452, all -> 0x044e }
                        int r0 = r0.length()     // Catch:{ IOException -> 0x0452, all -> 0x044e }
                        int r0 = r0 + -1
                        r6 = 0
                        java.lang.String r0 = r5.substring(r6, r0)     // Catch:{ IOException -> 0x0452, all -> 0x044e }
                        r3.LIZ((java.lang.String) r8, (java.lang.Object) r0)     // Catch:{ IOException -> 0x0452, all -> 0x044e }
                        r5 = r9[r11]     // Catch:{ IOException -> 0x0452, all -> 0x044e }
                        r0 = r9[r11]     // Catch:{ IOException -> 0x0452, all -> 0x044e }
                        int r0 = r0.length()     // Catch:{ IOException -> 0x0452, all -> 0x044e }
                        int r0 = r0 + -1
                        r5.substring(r6, r0)     // Catch:{ IOException -> 0x0452, all -> 0x044e }
                        goto L_0x00df
                    L_0x00c5:
                        java.lang.String r8 = "pid"
                        int r0 = r10 + 1
                        r6 = r9[r0]     // Catch:{ IOException -> 0x0470, all -> 0x0457 }
                        r0 = r9[r0]     // Catch:{ IOException -> 0x0470, all -> 0x0457 }
                        int r0 = r0.length()     // Catch:{ IOException -> 0x0470, all -> 0x0457 }
                        int r5 = r0 + -1
                        r0 = 0
                        java.lang.String r0 = r6.substring(r0, r5)     // Catch:{ IOException -> 0x0470, all -> 0x0455 }
                        java.lang.Long r0 = java.lang.Long.decode(r0)     // Catch:{ IOException -> 0x0470, all -> 0x0455 }
                        r3.LIZ((java.lang.String) r8, (java.lang.Object) r0)     // Catch:{ IOException -> 0x0470, all -> 0x0455 }
                    L_0x00df:
                        int r10 = r10 + 1
                        r15 = r28
                        goto L_0x0066
                    L_0x00e4:
                        java.lang.String r5 = "process_name"
                        int r0 = r9.length     // Catch:{ IOException -> 0x044a, all -> 0x044e }
                        r6 = 2
                        int r0 = r0 - r6
                        r0 = r9[r0]     // Catch:{ IOException -> 0x044a, all -> 0x044e }
                        r3.LIZ((java.lang.String) r5, (java.lang.Object) r0)     // Catch:{ IOException -> 0x044a, all -> 0x044e }
                        java.lang.StringBuilder r5 = new java.lang.StringBuilder     // Catch:{ IOException -> 0x044a, all -> 0x044e }
                        r5.<init>()     // Catch:{ IOException -> 0x044a, all -> 0x044e }
                        int r6 = r7 + 1
                        java.lang.String r0 = "Signal "
                        int r0 = com.bytedance.crash.gwpasan.GwpAsan.LIZ((org.json.JSONArray) r4, (int) r6, (java.lang.String) r0)     // Catch:{ IOException -> 0x044a, all -> 0x044e }
                        if (r0 >= 0) goto L_0x0102
                        X.C27338hY.LIZ((java.io.File) r2)     // Catch:{ IOException -> 0x0452, all -> 0x044e }
                        goto L_0x0499
                    L_0x0102:
                        r6 = 0
                        java.lang.String r6 = r4.optString(r0, r6)     // Catch:{ IOException -> 0x044a, all -> 0x044e }
                        r5.append(r6)     // Catch:{ IOException -> 0x044a, all -> 0x044e }
                        r9 = 10
                        r5.append(r9)     // Catch:{ IOException -> 0x044a, all -> 0x044e }
                        int r6 = r0 + 1
                        r0 = r24
                        int r8 = com.bytedance.crash.gwpasan.GwpAsan.LIZ((org.json.JSONArray) r4, (int) r6, (java.lang.String) r0)     // Catch:{ IOException -> 0x044a, all -> 0x044e }
                        if (r8 >= 0) goto L_0x011e
                        X.C27338hY.LIZ((java.io.File) r2)     // Catch:{ IOException -> 0x0452, all -> 0x044e }
                        goto L_0x0499
                    L_0x011e:
                        r0 = 0
                        java.lang.String r7 = r4.optString(r8, r0)     // Catch:{ IOException -> 0x044a, all -> 0x044e }
                        java.lang.String r6 = "abort message:"
                        r0 = r24
                        java.lang.String r7 = r7.replace(r0, r6)     // Catch:{ IOException -> 0x044a, all -> 0x044e }
                        r5.append(r7)     // Catch:{ IOException -> 0x044a, all -> 0x044e }
                        r5.append(r9)     // Catch:{ IOException -> 0x044a, all -> 0x044e }
                        r0 = r20
                        boolean r0 = r7.contains(r0)     // Catch:{ IOException -> 0x044a, all -> 0x044e }
                        java.lang.String r6 = "Double Free"
                        if (r0 == 0) goto L_0x013e
                        com.bytedance.crash.gwpasan.GwpAsan.LIZ = r20     // Catch:{ IOException -> 0x0452, all -> 0x044e }
                        goto L_0x016c
                    L_0x013e:
                        boolean r0 = r7.contains(r6)     // Catch:{ IOException -> 0x044a, all -> 0x044e }
                        if (r0 == 0) goto L_0x0147
                        com.bytedance.crash.gwpasan.GwpAsan.LIZ = r6     // Catch:{ IOException -> 0x0452, all -> 0x044e }
                        goto L_0x016c
                    L_0x0147:
                        r0 = r21
                        boolean r0 = r7.contains(r0)     // Catch:{ IOException -> 0x044a, all -> 0x044e }
                        if (r0 == 0) goto L_0x0152
                        com.bytedance.crash.gwpasan.GwpAsan.LIZ = r21     // Catch:{ IOException -> 0x0452, all -> 0x044e }
                        goto L_0x016c
                    L_0x0152:
                        r0 = r22
                        boolean r0 = r7.contains(r0)     // Catch:{ IOException -> 0x044a, all -> 0x044e }
                        if (r0 == 0) goto L_0x015d
                        com.bytedance.crash.gwpasan.GwpAsan.LIZ = r22     // Catch:{ IOException -> 0x0452, all -> 0x044e }
                        goto L_0x016c
                    L_0x015d:
                        r0 = r23
                        boolean r0 = r7.contains(r0)     // Catch:{ IOException -> 0x044a, all -> 0x044e }
                        if (r0 == 0) goto L_0x0168
                        com.bytedance.crash.gwpasan.GwpAsan.LIZ = r23     // Catch:{ IOException -> 0x0452, all -> 0x044e }
                        goto L_0x016c
                    L_0x0168:
                        java.lang.String r0 = "Unknown"
                        com.bytedance.crash.gwpasan.GwpAsan.LIZ = r0     // Catch:{ IOException -> 0x044a, all -> 0x044e }
                    L_0x016c:
                        java.lang.String r7 = "gwp_asan_type"
                        java.lang.String r0 = com.bytedance.crash.gwpasan.GwpAsan.LIZ     // Catch:{ IOException -> 0x044a, all -> 0x044e }
                        r3.LIZ((java.lang.String) r7, (java.lang.String) r0)     // Catch:{ IOException -> 0x044a, all -> 0x044e }
                        int r7 = r8 + 1
                        java.lang.String r0 = "backtrace:"
                        int r0 = com.bytedance.crash.gwpasan.GwpAsan.LIZ((org.json.JSONArray) r4, (int) r7, (java.lang.String) r0)     // Catch:{ IOException -> 0x044a, all -> 0x044e }
                        if (r0 >= 0) goto L_0x0182
                        X.C27338hY.LIZ((java.io.File) r2)     // Catch:{ IOException -> 0x0452, all -> 0x044e }
                        goto L_0x0499
                    L_0x0182:
                        java.lang.String r8 = "    #00"
                        int r7 = r0 + 1
                    L_0x0186:
                        int r0 = r4.length()     // Catch:{ IOException -> 0x044a, all -> 0x044e }
                        java.lang.String r13 = "libc++_shared.so"
                        java.lang.String r12 = "    #01"
                        java.lang.String r11 = "/"
                        java.lang.String r10 = ".so"
                        java.lang.String r9 = "==/lib/"
                        if (r7 >= r0) goto L_0x026c
                        r0 = 0
                        java.lang.String r14 = r4.optString(r7, r0)     // Catch:{ IOException -> 0x0268, all -> 0x0263 }
                        java.lang.String r0 = "    #"
                        boolean r0 = r14.startsWith(r0)     // Catch:{ IOException -> 0x0268, all -> 0x0263 }
                        if (r0 == 0) goto L_0x026c
                        java.lang.String r0 = r14.trim()     // Catch:{ IOException -> 0x0268, all -> 0x0263 }
                        r5.append(r0)     // Catch:{ IOException -> 0x0268, all -> 0x0263 }
                        r0 = 10
                        r5.append(r0)     // Catch:{ IOException -> 0x025f, all -> 0x025a }
                        java.lang.String r0 = com.bytedance.crash.gwpasan.GwpAsan.LIZ     // Catch:{ IOException -> 0x025f, all -> 0x025a }
                        boolean r0 = r6.equals(r0)     // Catch:{ IOException -> 0x025f, all -> 0x025a }
                        if (r0 == 0) goto L_0x01b9
                        java.lang.String r8 = "    #03"
                    L_0x01b9:
                        java.lang.String r0 = "libc.so"
                        boolean r0 = r14.endsWith(r0)     // Catch:{ IOException -> 0x025f, all -> 0x025a }
                        if (r0 != 0) goto L_0x0201
                        boolean r0 = r14.endsWith(r13)     // Catch:{ IOException -> 0x025f, all -> 0x025a }
                        if (r0 != 0) goto L_0x0201
                        boolean r0 = r14.startsWith(r8)     // Catch:{ IOException -> 0x025f, all -> 0x025a }
                        if (r0 == 0) goto L_0x0232
                        java.lang.String r0 = com.bytedance.crash.gwpasan.GwpAsan.LIZ((java.lang.String) r14, (java.lang.String) r9, (java.lang.String) r10)     // Catch:{ IOException -> 0x025f, all -> 0x025a }
                        java.lang.String r0 = r0.trim()     // Catch:{ IOException -> 0x025f, all -> 0x025a }
                        java.lang.String[] r0 = r0.split(r11)     // Catch:{ IOException -> 0x025f, all -> 0x025a }
                        r10 = r0[r25]     // Catch:{ IOException -> 0x025f, all -> 0x025a }
                        r9 = r0[r25]     // Catch:{ IOException -> 0x025f, all -> 0x025a }
                        r0 = 47
                        int r0 = r9.lastIndexOf(r0)     // Catch:{ IOException -> 0x025f, all -> 0x025a }
                        int r0 = r0 + 1
                        java.lang.String r0 = r10.substring(r0)     // Catch:{ IOException -> 0x025f, all -> 0x025a }
                        com.bytedance.crash.gwpasan.GwpAsan.LIZIZ = r0     // Catch:{ IOException -> 0x025f, all -> 0x025a }
                        int r0 = r0.length()     // Catch:{ IOException -> 0x025f, all -> 0x025a }
                        if (r0 <= 0) goto L_0x0232
                        java.lang.String r0 = com.bytedance.crash.gwpasan.GwpAsan.LIZIZ     // Catch:{ IOException -> 0x025f, all -> 0x025a }
                        boolean r0 = r0.isEmpty()     // Catch:{ IOException -> 0x025f, all -> 0x025a }
                        if (r0 != 0) goto L_0x0232
                        java.lang.String r9 = "gwp_asan_fatal_lib"
                        java.lang.String r0 = com.bytedance.crash.gwpasan.GwpAsan.LIZIZ     // Catch:{ IOException -> 0x025f, all -> 0x025a }
                        r3.LIZ((java.lang.String) r9, (java.lang.String) r0)     // Catch:{ IOException -> 0x025f, all -> 0x025a }
                        goto L_0x0232
                    L_0x0201:
                        boolean r0 = r14.startsWith(r12)     // Catch:{ IOException -> 0x025f, all -> 0x025a }
                        if (r0 == 0) goto L_0x0232
                        java.lang.String r0 = com.bytedance.crash.gwpasan.GwpAsan.LIZ((java.lang.String) r14, (java.lang.String) r9, (java.lang.String) r10)     // Catch:{ IOException -> 0x025f, all -> 0x025a }
                        java.lang.String r0 = r0.trim()     // Catch:{ IOException -> 0x025f, all -> 0x025a }
                        java.lang.String[] r0 = r0.split(r11)     // Catch:{ IOException -> 0x025f, all -> 0x025a }
                        r10 = r0[r25]     // Catch:{ IOException -> 0x025f, all -> 0x025a }
                        r9 = r0[r25]     // Catch:{ IOException -> 0x025f, all -> 0x025a }
                        r0 = 47
                        int r0 = r9.lastIndexOf(r0)     // Catch:{ IOException -> 0x025f, all -> 0x025a }
                        int r0 = r0 + 1
                        java.lang.String r0 = r10.substring(r0)     // Catch:{ IOException -> 0x025f, all -> 0x025a }
                        com.bytedance.crash.gwpasan.GwpAsan.LIZIZ = r0     // Catch:{ IOException -> 0x025f, all -> 0x025a }
                        boolean r0 = r0.isEmpty()     // Catch:{ IOException -> 0x025f, all -> 0x025a }
                        if (r0 != 0) goto L_0x0232
                        java.lang.String r9 = "gwp_asan_fatal_lib"
                        java.lang.String r0 = com.bytedance.crash.gwpasan.GwpAsan.LIZIZ     // Catch:{ IOException -> 0x025f, all -> 0x025a }
                        r3.LIZ((java.lang.String) r9, (java.lang.String) r0)     // Catch:{ IOException -> 0x025f, all -> 0x025a }
                    L_0x0232:
                        r15 = r28
                        if (r15 == 0) goto L_0x0249
                        r0 = r15
                        boolean r0 = r14.contains(r0)     // Catch:{ IOException -> 0x0470, all -> 0x0448 }
                        if (r0 != 0) goto L_0x0246
                        java.lang.String r9 = "all"
                        r0 = r15
                        boolean r0 = r9.equals(r0)     // Catch:{ IOException -> 0x0470, all -> 0x0448 }
                        if (r0 == 0) goto L_0x0253
                    L_0x0246:
                        com.bytedance.crash.gwpasan.GwpAsan.LJIIIIZZ = r25     // Catch:{ IOException -> 0x0470, all -> 0x0448 }
                        goto L_0x0253
                    L_0x0249:
                        java.lang.String r0 = "data"
                        boolean r0 = r14.contains(r0)     // Catch:{ IOException -> 0x0470, all -> 0x0448 }
                        if (r0 == 0) goto L_0x0253
                        com.bytedance.crash.gwpasan.GwpAsan.LJIIIIZZ = r25     // Catch:{ IOException -> 0x0470, all -> 0x0448 }
                    L_0x0253:
                        int r7 = r7 + 1
                        r0 = 2
                        r0 = 10
                        goto L_0x0186
                    L_0x025a:
                        r4 = move-exception
                        r15 = r28
                        goto L_0x047b
                    L_0x025f:
                        r15 = r28
                        goto L_0x0470
                    L_0x0263:
                        r4 = move-exception
                        r15 = r28
                        goto L_0x047b
                    L_0x0268:
                        r15 = r28
                        goto L_0x0470
                    L_0x026c:
                        r15 = r28
                        java.lang.String r0 = "deallocated by thread"
                        int r0 = com.bytedance.crash.gwpasan.GwpAsan.LIZ((org.json.JSONArray) r4, (int) r7, (java.lang.String) r0)     // Catch:{ IOException -> 0x044c, all -> 0x0448 }
                        int r14 = r0 + 1
                    L_0x0276:
                        int r0 = r4.length()     // Catch:{ IOException -> 0x044c, all -> 0x0448 }
                        java.lang.String r8 = "    #02"
                        java.lang.String r6 = "libnpth_xasan.so"
                        if (r14 >= r0) goto L_0x02d4
                        r0 = 0
                        java.lang.String r7 = r4.optString(r14, r0)     // Catch:{ IOException -> 0x0470, all -> 0x0448 }
                        boolean r0 = r7.startsWith(r12)     // Catch:{ IOException -> 0x0470, all -> 0x0448 }
                        if (r0 != 0) goto L_0x0291
                        boolean r0 = r7.startsWith(r8)     // Catch:{ IOException -> 0x0470, all -> 0x0448 }
                        if (r0 == 0) goto L_0x02d1
                    L_0x0291:
                        boolean r0 = r7.endsWith(r6)     // Catch:{ IOException -> 0x0470, all -> 0x0448 }
                        if (r0 != 0) goto L_0x02d1
                        boolean r0 = r7.endsWith(r13)     // Catch:{ IOException -> 0x0470, all -> 0x0448 }
                        if (r0 != 0) goto L_0x02d1
                        java.lang.String r0 = com.bytedance.crash.gwpasan.GwpAsan.LIZ((java.lang.String) r7, (java.lang.String) r9, (java.lang.String) r10)     // Catch:{ IOException -> 0x0470, all -> 0x0448 }
                        java.lang.String r0 = r0.trim()     // Catch:{ IOException -> 0x0470, all -> 0x0448 }
                        java.lang.String[] r0 = r0.split(r11)     // Catch:{ IOException -> 0x0470, all -> 0x0448 }
                        r7 = r0[r25]     // Catch:{ IOException -> 0x0470, all -> 0x0448 }
                        r15 = r0[r25]     // Catch:{ IOException -> 0x0470, all -> 0x0448 }
                        r0 = 47
                        int r0 = r15.lastIndexOf(r0)     // Catch:{ IOException -> 0x0470, all -> 0x0446 }
                        int r0 = r0 + 1
                        java.lang.String r0 = r7.substring(r0)     // Catch:{ IOException -> 0x0470, all -> 0x0446 }
                        com.bytedance.crash.gwpasan.GwpAsan.LIZJ = r0     // Catch:{ IOException -> 0x0470, all -> 0x0446 }
                        int r0 = r0.length()     // Catch:{ IOException -> 0x0470, all -> 0x0446 }
                        if (r0 <= 0) goto L_0x02d1
                        java.lang.String r0 = com.bytedance.crash.gwpasan.GwpAsan.LIZJ     // Catch:{ IOException -> 0x0470, all -> 0x0446 }
                        boolean r0 = r0.isEmpty()     // Catch:{ IOException -> 0x0470, all -> 0x0446 }
                        if (r0 != 0) goto L_0x02d1
                        java.lang.String r7 = "gwp_asan_deallocated_lib"
                        java.lang.String r0 = com.bytedance.crash.gwpasan.GwpAsan.LIZJ     // Catch:{ IOException -> 0x0470, all -> 0x0446 }
                        r3.LIZ((java.lang.String) r7, (java.lang.String) r0)     // Catch:{ IOException -> 0x0470, all -> 0x0446 }
                        goto L_0x02d4
                    L_0x02d1:
                        int r14 = r14 + 1
                        goto L_0x0276
                    L_0x02d4:
                        java.lang.String r0 = "allocated by thread"
                        int r0 = com.bytedance.crash.gwpasan.GwpAsan.LIZ((org.json.JSONArray) r4, (int) r14, (java.lang.String) r0)     // Catch:{ IOException -> 0x044c, all -> 0x0446 }
                        int r7 = r0 + 1
                    L_0x02dc:
                        int r0 = r4.length()     // Catch:{ IOException -> 0x044c, all -> 0x0446 }
                        if (r7 >= r0) goto L_0x0336
                        r0 = 0
                        java.lang.String r14 = r4.optString(r7, r0)     // Catch:{ IOException -> 0x0470, all -> 0x0446 }
                        boolean r0 = r14.startsWith(r12)     // Catch:{ IOException -> 0x0470, all -> 0x0446 }
                        if (r0 != 0) goto L_0x02f3
                        boolean r0 = r14.startsWith(r8)     // Catch:{ IOException -> 0x0470, all -> 0x0446 }
                        if (r0 == 0) goto L_0x0333
                    L_0x02f3:
                        boolean r0 = r14.endsWith(r6)     // Catch:{ IOException -> 0x0470, all -> 0x0446 }
                        if (r0 != 0) goto L_0x0333
                        boolean r0 = r14.endsWith(r13)     // Catch:{ IOException -> 0x0470, all -> 0x0446 }
                        if (r0 != 0) goto L_0x0333
                        java.lang.String r0 = com.bytedance.crash.gwpasan.GwpAsan.LIZ((java.lang.String) r14, (java.lang.String) r9, (java.lang.String) r10)     // Catch:{ IOException -> 0x0470, all -> 0x0446 }
                        java.lang.String r0 = r0.trim()     // Catch:{ IOException -> 0x0470, all -> 0x0446 }
                        java.lang.String[] r0 = r0.split(r11)     // Catch:{ IOException -> 0x0470, all -> 0x0446 }
                        r14 = r0[r25]     // Catch:{ IOException -> 0x0470, all -> 0x0446 }
                        r15 = r0[r25]     // Catch:{ IOException -> 0x0470, all -> 0x0446 }
                        r0 = 47
                        int r0 = r15.lastIndexOf(r0)     // Catch:{ IOException -> 0x0470, all -> 0x0446 }
                        int r0 = r0 + 1
                        java.lang.String r0 = r14.substring(r0)     // Catch:{ IOException -> 0x0470, all -> 0x0446 }
                        com.bytedance.crash.gwpasan.GwpAsan.LIZLLL = r0     // Catch:{ IOException -> 0x0470, all -> 0x0446 }
                        int r0 = r0.length()     // Catch:{ IOException -> 0x0470, all -> 0x0446 }
                        if (r0 <= 0) goto L_0x0333
                        java.lang.String r0 = com.bytedance.crash.gwpasan.GwpAsan.LIZLLL     // Catch:{ IOException -> 0x0470, all -> 0x0446 }
                        boolean r0 = r0.isEmpty()     // Catch:{ IOException -> 0x0470, all -> 0x0446 }
                        if (r0 != 0) goto L_0x0333
                        java.lang.String r6 = "gwp_asan_allocated_lib"
                        java.lang.String r0 = com.bytedance.crash.gwpasan.GwpAsan.LIZLLL     // Catch:{ IOException -> 0x0470, all -> 0x0446 }
                        r3.LIZ((java.lang.String) r6, (java.lang.String) r0)     // Catch:{ IOException -> 0x0470, all -> 0x0446 }
                        goto L_0x0336
                    L_0x0333:
                        int r7 = r7 + 1
                        goto L_0x02dc
                    L_0x0336:
                        java.lang.String r0 = "build id:"
                        int r0 = com.bytedance.crash.gwpasan.GwpAsan.LIZ((org.json.JSONArray) r4, (int) r7, (java.lang.String) r0)     // Catch:{ IOException -> 0x044c, all -> 0x0446 }
                        if (r0 <= 0) goto L_0x03ac
                        org.json.JSONArray r9 = new org.json.JSONArray     // Catch:{ IOException -> 0x0470, all -> 0x0446 }
                        r9.<init>()     // Catch:{ IOException -> 0x0470, all -> 0x0446 }
                        int r10 = r0 + 1
                    L_0x0345:
                        int r0 = r4.length()     // Catch:{ IOException -> 0x0470, all -> 0x0446 }
                        if (r10 >= r0) goto L_0x03a7
                        r0 = 0
                        java.lang.String r6 = r4.optString(r10, r0)     // Catch:{ IOException -> 0x0470, all -> 0x0446 }
                        java.lang.String r0 = "    /"
                        boolean r0 = r6.startsWith(r0)     // Catch:{ IOException -> 0x0470, all -> 0x0446 }
                        if (r0 == 0) goto L_0x03a4
                        java.lang.String r6 = r6.trim()     // Catch:{ IOException -> 0x0470, all -> 0x0446 }
                        r0 = r19
                        java.lang.String[] r6 = r6.split(r0)     // Catch:{ IOException -> 0x0470, all -> 0x0444 }
                        int r7 = r6.length     // Catch:{ IOException -> 0x0470, all -> 0x0444 }
                        r0 = 3
                        if (r7 < r0) goto L_0x03a4
                        r0 = 0
                        r8 = r6[r0]     // Catch:{ IOException -> 0x0470, all -> 0x0444 }
                        r7 = r6[r0]     // Catch:{ IOException -> 0x0470, all -> 0x0444 }
                        r0 = 47
                        int r0 = r7.lastIndexOf(r0)     // Catch:{ IOException -> 0x0470, all -> 0x0444 }
                        int r0 = r0 + 1
                        java.lang.String r7 = r8.substring(r0)     // Catch:{ IOException -> 0x0470, all -> 0x0444 }
                        int r0 = r6.length     // Catch:{ IOException -> 0x0470, all -> 0x0444 }
                        int r0 = r0 + -1
                        r8 = r6[r0]     // Catch:{ IOException -> 0x0470, all -> 0x0444 }
                        int r0 = r6.length     // Catch:{ IOException -> 0x0470, all -> 0x0444 }
                        int r0 = r0 + -1
                        r0 = r6[r0]     // Catch:{ IOException -> 0x0470, all -> 0x0444 }
                        int r0 = r0.length()     // Catch:{ IOException -> 0x0470, all -> 0x0444 }
                        int r6 = r0 + -1
                        r0 = 0
                        java.lang.String r8 = r8.substring(r0, r6)     // Catch:{ IOException -> 0x0470, all -> 0x0444 }
                        org.json.JSONObject r6 = new org.json.JSONObject     // Catch:{ IOException -> 0x0470, all -> 0x0444 }
                        r6.<init>()     // Catch:{ IOException -> 0x0470, all -> 0x0444 }
                        java.lang.String r0 = "lib_name"
                        org.json.JSONObject r7 = r6.put(r0, r7)     // Catch:{ IOException -> 0x0470, all -> 0x0444 }
                        java.lang.String r6 = "lib_uuid"
                        java.lang.String r0 = com.bytedance.crash.gwpasan.GwpAsan.LIZ((java.lang.String) r8)     // Catch:{ IOException -> 0x0470, all -> 0x0444 }
                        org.json.JSONObject r0 = r7.put(r6, r0)     // Catch:{ IOException -> 0x0470, all -> 0x0444 }
                        r9.put(r0)     // Catch:{ IOException -> 0x0470, all -> 0x0444 }
                    L_0x03a4:
                        int r10 = r10 + 1
                        goto L_0x0345
                    L_0x03a7:
                        java.lang.String r0 = "crash_lib_uuid"
                        r3.LIZ((java.lang.String) r0, (java.lang.Object) r9)     // Catch:{ IOException -> 0x0470, all -> 0x0444 }
                    L_0x03ac:
                        java.lang.String r4 = "data"
                        java.lang.String r0 = r5.toString()     // Catch:{ IOException -> 0x044c, all -> 0x0444 }
                        r3.LIZ((java.lang.String) r4, (java.lang.Object) r0)     // Catch:{ IOException -> 0x044c, all -> 0x0444 }
                        android.content.Context r0 = com.bytedance.crash.gwpasan.GwpAsan.LJIIJ     // Catch:{ all -> 0x043a }
                        if (r0 != 0) goto L_0x03bd
                        android.content.Context r0 = X.C27798iI.LIZ     // Catch:{ all -> 0x043a }
                        com.bytedance.crash.gwpasan.GwpAsan.LJIIJ = r0     // Catch:{ all -> 0x043a }
                    L_0x03bd:
                        android.content.Context r0 = com.bytedance.crash.gwpasan.GwpAsan.LJIIJ     // Catch:{ all -> 0x043a }
                        com.bytedance.crash.entity.Header r6 = com.bytedance.crash.entity.Header.LIZIZ((android.content.Context) r0)     // Catch:{ all -> 0x043a }
                        org.json.JSONObject r5 = r6.LIZ     // Catch:{ JSONException -> 0x03cd }
                        java.lang.String r4 = "aid"
                        r0 = 1314(0x522, float:1.841E-42)
                        r5.put(r4, r0)     // Catch:{ JSONException -> 0x03cd }
                        goto L_0x03d2
                    L_0x03cd:
                        com.bytedance.crash.runtime.ConfigManager r0 = X.C27798iI.LJI     // Catch:{ all -> 0x043a }
                        r0.isDebugMode()     // Catch:{ all -> 0x043a }
                    L_0x03d2:
                        r3.LIZ((com.bytedance.crash.entity.Header) r6)     // Catch:{ all -> 0x043a }
                        java.lang.String r4 = "is_native_crash"
                        java.lang.Integer r0 = java.lang.Integer.valueOf(r25)     // Catch:{ all -> 0x043a }
                        r3.LIZ((java.lang.String) r4, (java.lang.Object) r0)     // Catch:{ all -> 0x043a }
                        java.lang.String r6 = "crash_time"
                        long r4 = java.lang.System.currentTimeMillis()     // Catch:{ all -> 0x043a }
                        java.lang.Long r0 = java.lang.Long.valueOf(r4)     // Catch:{ all -> 0x043a }
                        r3.LIZ((java.lang.String) r6, (java.lang.Object) r0)     // Catch:{ all -> 0x043a }
                        android.content.Context r0 = com.bytedance.crash.gwpasan.GwpAsan.LJIIJ     // Catch:{ all -> 0x043a }
                        java.lang.String r4 = r0.getPackageName()     // Catch:{ all -> 0x043a }
                        java.lang.String r0 = "gwp_asan_app"
                        r3.LIZ((java.lang.String) r0, (java.lang.String) r4)     // Catch:{ all -> 0x043a }
                        boolean r0 = com.bytedance.crash.gwpasan.GwpAsan.LJIIIIZZ     // Catch:{ all -> 0x0437 }
                        if (r0 == 0) goto L_0x049c
                        com.bytedance.crash.gwpasan.GwpAsan.LJII = r25     // Catch:{ all -> 0x0437 }
                        com.bytedance.crash.runtime.ConfigManager r0 = X.C27798iI.LJI     // Catch:{ all -> 0x042d }
                        java.lang.String r6 = r0.getNativeCrashUploadUrl()     // Catch:{ all -> 0x042d }
                        org.json.JSONObject r0 = r3.LIZ     // Catch:{ all -> 0x042d }
                        java.lang.String r5 = r0.toString()     // Catch:{ all -> 0x042d }
                        r0 = 2
                        java.io.File[] r4 = new java.io.File[r0]     // Catch:{ all -> 0x042d }
                        r0 = 0
                        r4[r0] = r2     // Catch:{ all -> 0x042e }
                        r0 = 0
                        r4[r25] = r0     // Catch:{ all -> 0x042e }
                        X.8m4 r0 = X.C30088lz.LIZ((java.lang.String) r6, (java.lang.String) r5, (java.io.File[]) r4)     // Catch:{ all -> 0x042e }
                        boolean r0 = r0.LIZ()     // Catch:{ all -> 0x042e }
                        if (r0 == 0) goto L_0x049c
                        java.lang.String r4 = "has_gwp_asan"
                        boolean r0 = com.bytedance.crash.gwpasan.GwpAsan.LJII     // Catch:{ all -> 0x042e }
                        if (r0 == 0) goto L_0x042a
                        java.lang.String r0 = "true"
                    L_0x0423:
                        r3.LIZ((java.lang.String) r4, (java.lang.String) r0)     // Catch:{ all -> 0x042e }
                        X.C27338hY.LIZ((java.io.File) r2)     // Catch:{ all -> 0x042e }
                        goto L_0x049c
                    L_0x042a:
                        java.lang.String r0 = "false"
                        goto L_0x0423
                    L_0x042d:
                        r0 = 0
                    L_0x042e:
                        com.bytedance.crash.runtime.ConfigManager r0 = X.C27798iI.LJI     // Catch:{ all -> 0x0490 }
                        r0.isDebugMode()     // Catch:{ all -> 0x0490 }
                        X.C27338hY.LIZ((java.io.File) r2)     // Catch:{ all -> 0x0490 }
                        goto L_0x049c
                    L_0x0437:
                        r3 = move-exception
                        r0 = 0
                        goto L_0x0491
                    L_0x043a:
                        r0 = 0
                        com.bytedance.crash.runtime.ConfigManager r0 = X.C27798iI.LJI     // Catch:{ all -> 0x0490 }
                        r0.isDebugMode()     // Catch:{ all -> 0x0490 }
                        X.C27338hY.LIZ((java.io.File) r2)     // Catch:{ all -> 0x0490 }
                        goto L_0x049c
                    L_0x0444:
                        r4 = move-exception
                        goto L_0x047b
                    L_0x0446:
                        r4 = move-exception
                        goto L_0x047b
                    L_0x0448:
                        r4 = move-exception
                        goto L_0x047b
                    L_0x044a:
                        r15 = r28
                    L_0x044c:
                        r0 = 0
                        goto L_0x0470
                    L_0x044e:
                        r4 = move-exception
                        r15 = r28
                        goto L_0x047b
                    L_0x0452:
                        r15 = r28
                        goto L_0x0470
                    L_0x0455:
                        r4 = move-exception
                        goto L_0x047b
                    L_0x0457:
                        r4 = move-exception
                        goto L_0x047b
                    L_0x0459:
                        r4 = move-exception
                        goto L_0x047b
                    L_0x045b:
                        r4 = move-exception
                        r15 = r28
                        goto L_0x047b
                    L_0x045f:
                        r15 = r28
                        goto L_0x0470
                    L_0x0462:
                        r4 = move-exception
                        goto L_0x047b
                    L_0x0464:
                        r0 = 0
                        goto L_0x0470
                    L_0x0466:
                        r4 = move-exception
                        goto L_0x047a
                    L_0x0468:
                        X.C27338hY.LIZ((java.io.File) r2)     // Catch:{ IOException -> 0x046f, all -> 0x0479 }
                    L_0x046b:
                        r0 = 0
                        goto L_0x049c
                    L_0x046d:
                        r0 = 0
                        goto L_0x0470
                    L_0x046f:
                        r0 = 0
                    L_0x0470:
                        com.bytedance.crash.runtime.ConfigManager r0 = X.C27798iI.LJI     // Catch:{ all -> 0x048b }
                        r0.isDebugMode()     // Catch:{ all -> 0x048b }
                        X.C27338hY.LIZ((java.io.File) r2)     // Catch:{ all -> 0x048b }
                        goto L_0x049c
                    L_0x0479:
                        r4 = move-exception
                    L_0x047a:
                        r0 = 0
                    L_0x047b:
                        X.8in r3 = X.C28338jA.LIZ     // Catch:{ all -> 0x0490 }
                        r0 = r17
                        r3.LIZ((java.lang.String) r0, (java.lang.Throwable) r4)     // Catch:{ all -> 0x048b }
                        com.bytedance.crash.runtime.ConfigManager r0 = X.C27798iI.LJI     // Catch:{ all -> 0x048b }
                        r0.isDebugMode()     // Catch:{ all -> 0x048b }
                        X.C27338hY.LIZ((java.io.File) r2)     // Catch:{ all -> 0x048b }
                        goto L_0x049c
                    L_0x048b:
                        r3 = move-exception
                        goto L_0x0491
                    L_0x048d:
                        r3 = move-exception
                        r0 = 0
                        goto L_0x0491
                    L_0x0490:
                        r3 = move-exception
                    L_0x0491:
                        X.8in r2 = X.C28338jA.LIZ
                        r0 = r17
                        r2.LIZ((java.lang.String) r0, (java.lang.Throwable) r3)
                        goto L_0x049c
                    L_0x0499:
                        r15 = r28
                        r0 = 0
                    L_0x049c:
                        int r1 = r1 + 1
                        r5 = 0
                        goto L_0x0025
                    L_0x04a1:
                        return
                    */
                    throw new UnsupportedOperationException("Method not decompiled: com.bytedance.crash.Npth.AnonymousClass4.LIZ(java.lang.String):void");
                }
            };
            MethodCollector.o(1224);
        }
    }
}
