package o;

import android.content.Context;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.vo, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C2749vo {
    public static final HashMap f;
    public static final String g;
    public final Context a;
    public final C2227qG b;
    public final N8 c;
    public final C3031ym0 d;
    public final C0598Xb e;

    static {
        HashMap map = new HashMap();
        f = map;
        map.put("armeabi", 5);
        map.put("armeabi-v7a", 6);
        map.put("arm64-v8a", 9);
        map.put("x86", 0);
        map.put("x86_64", 1);
        Locale locale = Locale.US;
        g = "Crashlytics Android SDK/20.0.3";
    }

    public C2749vo(Context context, C2227qG c2227qG, N8 n8, C3031ym0 c3031ym0, C0598Xb c0598Xb) {
        this.a = context;
        this.b = c2227qG;
        this.c = n8;
        this.d = c3031ym0;
        this.e = c0598Xb;
    }

    public static C2533tb c(C2062oc0 c2062oc0, int i) {
        String str = (String) c2062oc0.b;
        String str2 = (String) c2062oc0.a;
        StackTraceElement[] stackTraceElementArr = (StackTraceElement[]) c2062oc0.c;
        int i2 = 0;
        if (stackTraceElementArr == null) {
            stackTraceElementArr = new StackTraceElement[0];
        }
        C2062oc0 c2062oc02 = (C2062oc0) c2062oc0.d;
        if (i >= 8) {
            C2062oc0 c2062oc03 = c2062oc02;
            while (c2062oc03 != null) {
                c2062oc03 = (C2062oc0) c2062oc03.d;
                i2++;
            }
        }
        int i3 = i2;
        List listD = d(stackTraceElementArr, 4);
        if (listD == null) {
            throw new NullPointerException("Null frames");
        }
        byte b = (byte) (0 | 1);
        C2533tb c2533tbC = null;
        if (c2062oc02 != null && i3 == 0) {
            c2533tbC = c(c2062oc02, i + 1);
        }
        if (b == 1) {
            return new C2533tb(str, str2, listD, c2533tbC, i3);
        }
        StringBuilder sb = new StringBuilder();
        if ((b & 1) == 0) {
            sb.append(" overflowCount");
        }
        throw new IllegalStateException(AbstractC2462sn.k("Missing required properties:", sb));
    }

    public static List d(StackTraceElement[] stackTraceElementArr, int i) {
        ArrayList arrayList = new ArrayList();
        for (StackTraceElement stackTraceElement : stackTraceElementArr) {
            C2818wb c2818wb = new C2818wb();
            c2818wb.e = i;
            c2818wb.f = (byte) (c2818wb.f | 4);
            long lineNumber = 0;
            long jMax = stackTraceElement.isNativeMethod() ? Math.max(stackTraceElement.getLineNumber(), 0L) : 0L;
            String str = stackTraceElement.getClassName() + "." + stackTraceElement.getMethodName();
            String fileName = stackTraceElement.getFileName();
            if (!stackTraceElement.isNativeMethod() && stackTraceElement.getLineNumber() > 0) {
                lineNumber = stackTraceElement.getLineNumber();
            }
            c2818wb.a = jMax;
            byte b = (byte) (c2818wb.f | 1);
            c2818wb.f = b;
            if (str == null) {
                throw new NullPointerException("Null symbol");
            }
            c2818wb.b = str;
            c2818wb.c = fileName;
            c2818wb.d = lineNumber;
            c2818wb.f = (byte) (b | 2);
            arrayList.add(c2818wb.a());
        }
        return Collections.unmodifiableList(arrayList);
    }

    public static C2628ub e() {
        byte b = (byte) 1;
        if (b == 1) {
            return new C2628ub("0", "0", 0L);
        }
        StringBuilder sb = new StringBuilder();
        if (b == 0) {
            sb.append(" address");
        }
        throw new IllegalStateException(AbstractC2462sn.k("Missing required properties:", sb));
    }

    public final List a() {
        byte b = (byte) (((byte) (0 | 1)) | 2);
        N8 n8 = this.c;
        String str = n8.e;
        if (str == null) {
            throw new NullPointerException("Null name");
        }
        String str2 = n8.b;
        if (b == 3) {
            return Collections.singletonList(new C2438sb(0L, 0L, str, str2));
        }
        StringBuilder sb = new StringBuilder();
        if ((b & 1) == 0) {
            sb.append(" baseAddress");
        }
        if ((b & 2) == 0) {
            sb.append(" size");
        }
        throw new IllegalStateException(AbstractC2462sn.k("Missing required properties:", sb));
    }

    /* JADX WARN: Removed duplicated region for block: B:21:0x0042  */
    /* JADX WARN: Removed duplicated region for block: B:29:0x0061  */
    /* JADX WARN: Removed duplicated region for block: B:39:0x0098  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final o.C0027Bb b(int r17) {
        /*
            Method dump skipped, instructions count: 226
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: o.C2749vo.b(int):o.Bb");
    }
}
