package g.i.a.c.l;

import com.cvte.vman.instance.InvokeCmd;
import java.util.ArrayList;
import java.util.Locale;

/* JADX INFO: loaded from: classes.dex */
public class a {
    public static final ArrayList<a> a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public static final ArrayList<a> f5505b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public static final ArrayList<a> f5506c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public static final ArrayList<a> f5507d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public int f5508e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public String f5509f;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public int f5510g;

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public int f5511h;

    /* JADX INFO: renamed from: i, reason: collision with root package name */
    public boolean f5512i;

    /* JADX INFO: renamed from: j, reason: collision with root package name */
    public int f5513j;

    /* JADX INFO: renamed from: k, reason: collision with root package name */
    public boolean f5514k;

    static {
        ArrayList<a> arrayList = new ArrayList<>();
        a = arrayList;
        arrayList.add(new a(0, "Patch image (Both MP and OTA)", null, -1, true, 7));
        arrayList.add(new a(1, "App bank 0 image (Both MP and OTA)", null, -1, true, 7));
        arrayList.add(new a(2, "APP bank 1 image (OTA)", null, -1, true, 7));
        arrayList.add(new a(3, "User data (MP)", null, -1, true, 7));
        arrayList.add(new a(4, "Patch extension image (Both MP and OTA)", null, -1, true, 7));
        arrayList.add(new a(5, "Config file (MP)", null, -1, true, 7));
        arrayList.add(new a(6, "External Flash image (MP)", null, -1, true, 7));
        ArrayList<a> arrayList2 = new ArrayList<>();
        f5505b = arrayList2;
        arrayList2.add(new a(0, "SOCV Config File", null, 257, true, 3));
        arrayList2.add(new a(1, "System Config File", null, 256, true, 3));
        for (int i2 = 0; i2 < 2; i2++) {
            ArrayList<a> arrayList3 = f5505b;
            int i3 = i2 * 16;
            arrayList3.add(new a(i3 + 2, "OTA Header File", null, 2048, true, 2));
            arrayList3.add(new a(i3 + 3, "Secure Boot Loader image", null, 1792, true, 3));
            arrayList3.add(new a(i3 + 4, "ROM Patch Image", null, 512, true, 3));
            arrayList3.add(new a(i3 + 5, "App Image", null, 768, true, 3));
            arrayList3.add(new a(i3 + 6, "APP Data1 File", null, 2305, false, 3));
            arrayList3.add(new a(i3 + 7, "APP Data2 File", null, 2306, false, 3));
            arrayList3.add(new a(i3 + 8, "APP Data3 File", null, 2307, false, 3));
            arrayList3.add(new a(i3 + 9, "APP Data4 File", null, 2308, false, 3));
            arrayList3.add(new a(i3 + 10, "APP Data5 File", null, 2309, false, 3));
            arrayList3.add(new a(i3 + 11, "APP Data6 File", null, 2310, false, 3));
            arrayList3.add(new a(i3 + 12, "Upper Stack", null, 2560, true, 3));
        }
        ArrayList<a> arrayList4 = new ArrayList<>();
        f5506c = arrayList4;
        arrayList4.add(new a(0, "SOCV Config File", null, 257, false, 1));
        arrayList4.add(new a(1, "System Config File", null, 256, true, 1));
        for (int i4 = 0; i4 < 2; i4++) {
            ArrayList<a> arrayList5 = f5506c;
            int i5 = i4 * 16;
            arrayList5.add(new a(i5 + 2, "OTA Header File", null, 10128, 2048, true, 1, false));
            arrayList5.add(new a(i5 + 3, "Secure Boot Loader image", null, 10129, 1792, true, 3, false));
            arrayList5.add(new a(i5 + 4, "ROM Patch Image", null, 10130, 512, true, 3, false));
            arrayList5.add(new a(i5 + 5, "App Image", null, 10131, 768, true, 5, false));
            arrayList5.add(new a(i5 + 6, "DSP System Image", null, 10132, 1280, true, InvokeCmd.CMD_XBUG_SET_XBUG_DUMP_CVTE_LOG, false));
            arrayList5.add(new a(i5 + 7, "DSP APP Image", null, 10133, 1538, true, InvokeCmd.CMD_XBUG_SET_XBUG_DUMP_CVTE_LOG, false));
            arrayList5.add(new a(i5 + 8, "DSP Config", null, 10135, InvokeCmd.CMD_PROJECT_ID_COPY_PIDFILE_TO_BOOTVIDEO, true, InvokeCmd.CMD_XBUG_GET_VMAN_SERVICE_LOG_LEVEL, true));
            arrayList5.add(new a(i5 + 9, "APP UI Parameter File", null, 10134, 1024, true, 2, true));
            arrayList5.add(new a(i5 + 10, "Ext Image 0", null, 10136, 2304, false, 1, true));
            arrayList5.add(new a(i5 + 11, "Ext Image 1", null, 10137, 2305, false, 1, false));
            arrayList5.add(new a(i5 + 12, "Ext Image 2", null, 10138, 2306, false, 1, false));
            arrayList5.add(new a(i5 + 13, "Ext Image 3", null, 10139, 2307, false, 1, false));
            arrayList5.add(new a(i5 + 17, "Platform", null, 10140, InvokeCmd.CMD_XBUG_SET_VMAN_SERVICE_LOG_LEVEL, false, 3, false));
            arrayList5.add(new a(i5 + 18, "Lower Stack", null, 10141, InvokeCmd.CMD_XBUG_GET_VMAN_SERVICE_LOG_LEVEL, false, 3, false));
            arrayList5.add(new a(i5 + 19, "Upper Stack", null, 10142, InvokeCmd.CMD_XBUG_SET_XBUG_DUMP_CVTE_LOG, false, 1, false));
            arrayList5.add(new a(i5 + 20, "Framework", null, 10143, InvokeCmd.CMD_XBUG_VMAN_FUNTION_CHECK_TIMEOUT_BASE_SET, false, 1, false));
        }
        ArrayList<a> arrayList6 = f5506c;
        arrayList6.add(new a(14, "Factory Image", null, 2560, false, 1));
        arrayList6.add(new a(15, "Backup Data 1", null, 2816, false, 1));
        arrayList6.add(new a(16, "Backup Data 2", null, InvokeCmd.CMD_DEVICE_GET_DEVICE_LIST, false, 1));
        arrayList6.add(new a(24, "Voice Prompt Data Image", null, 10148, 520, false, 2, false));
        arrayList6.add(new a(24, "Pre-Sys Patch Image", null, 10145, InvokeCmd.CMD_XBUG_VMAN_FUNTION_CHECK_TIMEOUT_BASE_GET, false, 1, false));
        ArrayList<a> arrayList7 = new ArrayList<>();
        f5507d = arrayList7;
        arrayList7.add(new a(0, "SOCV Config File", null, 257, false, 1));
        arrayList7.add(new a(1, "System Config File", null, 256, true, 1));
        arrayList7.add(new a(2, "OTA Header File", null, 10128, 2048, true, 1, false));
        arrayList7.add(new a(3, "Secure Boot Loader image", null, 10129, 1792, true, 3, false));
        arrayList7.add(new a(4, "ROM Patch Image", null, 10130, 512, true, 3, false));
        arrayList7.add(new a(5, "App Image", null, 10131, 768, true, 5, false));
        arrayList7.add(new a(6, "DSP System Image", null, 10132, 1280, true, InvokeCmd.CMD_XBUG_SET_XBUG_DUMP_CVTE_LOG, false));
        arrayList7.add(new a(7, "DSP APP Image", null, 10133, 1538, true, InvokeCmd.CMD_XBUG_SET_XBUG_DUMP_CVTE_LOG, false));
        arrayList7.add(new a(8, "DSP Config", null, 10135, InvokeCmd.CMD_PROJECT_ID_COPY_PIDFILE_TO_BOOTVIDEO, true, InvokeCmd.CMD_XBUG_GET_VMAN_SERVICE_LOG_LEVEL, true));
        arrayList7.add(new a(9, "APP UI Parameter File", null, 10134, 1024, true, 2, true));
        arrayList7.add(new a(10, "Ext Image 0", null, 10136, 2304, false, 1, true));
        arrayList7.add(new a(11, "Ext Image 1", null, 10137, 2305, false, 1, false));
        arrayList7.add(new a(12, "Ext Image 2", null, 10138, 2306, false, 1, false));
        arrayList7.add(new a(13, "Ext Image 3", null, 10139, 2307, false, 1, false));
        arrayList7.add(new a(17, "Platform", null, 10140, InvokeCmd.CMD_XBUG_SET_VMAN_SERVICE_LOG_LEVEL, false, 3, false));
        arrayList7.add(new a(18, "Lower Stack", null, 10141, InvokeCmd.CMD_XBUG_GET_VMAN_SERVICE_LOG_LEVEL, false, 3, false));
        arrayList7.add(new a(19, "Upper Stack", null, 10142, InvokeCmd.CMD_XBUG_SET_XBUG_DUMP_CVTE_LOG, false, 1, false));
        arrayList7.add(new a(20, "Framework", null, 10143, InvokeCmd.CMD_XBUG_VMAN_FUNTION_CHECK_TIMEOUT_BASE_SET, false, 1, false));
        arrayList7.add(new a(14, "Factory Image", null, 2560, false, 1));
        arrayList7.add(new a(15, "Backup Data 1", null, 2816, false, 1));
        arrayList7.add(new a(16, "Backup Data 2", null, InvokeCmd.CMD_DEVICE_GET_DEVICE_LIST, false, 1));
        arrayList7.add(new a(24, "Pre-Sys Patch Image", null, 10145, InvokeCmd.CMD_XBUG_VMAN_FUNTION_CHECK_TIMEOUT_BASE_GET, false, 3, false));
        arrayList7.add(new a(24, "Pre Low Stack Image", null, 10141, InvokeCmd.CMD_XBUG_GET_VMAN_FUNTION_TIME_OUT_LIST, false, 1, false));
        arrayList7.add(new a(24, "Pre Upper Stack Image", null, 10142, InvokeCmd.CMD_XBUG_GET_LOG_NODE_INFO, false, 3, false));
        arrayList7.add(new a(24, "Voice Prompt Data Image", null, 10148, 520, false, 2, false));
        arrayList7.add(new a(24, "User Data 1 Image", null, 10145, 61441, false, 1, false));
        arrayList7.add(new a(24, "User Data 2 Image", null, 10145, 61442, false, 1, false));
        arrayList7.add(new a(24, "User Data 3 Image", null, 10145, 61443, false, 1, false));
        arrayList7.add(new a(24, "User Data 4 Image", null, 10145, 61444, false, 1, false));
        arrayList7.add(new a(24, "User Data 5 Image", null, 10145, 61445, false, 1, false));
        arrayList7.add(new a(24, "User Data 6 Image", null, 10145, 61446, false, 1, false));
        arrayList7.add(new a(24, "User Data 7 Image", null, 10145, 61447, false, 1, false));
        arrayList7.add(new a(24, "User Data 8 Image", null, 10145, 61448, false, 1, false));
    }

    public a(int i2, String str, String str2, int i3, int i4, boolean z2, int i5, boolean z3) {
        this.f5512i = true;
        this.f5513j = 1;
        this.f5508e = i2;
        this.f5509f = str;
        this.f5510g = i3;
        this.f5511h = i4;
        this.f5512i = z2;
        this.f5513j = i5;
        this.f5514k = z3;
    }

    public a(int i2, String str, String str2, int i3, boolean z2, int i4) {
        this(i2, str, null, 0, i3, z2, i4, false);
    }

    public static a a(ArrayList<a> arrayList, int i2) {
        for (a aVar : arrayList) {
            if (aVar.f5508e == i2) {
                return aVar;
            }
        }
        g.a.a.a.a.b0("undefined indicator, bitNumber=", i2);
        return null;
    }

    public static a b(ArrayList<a> arrayList, int i2, boolean z2) {
        for (a aVar : arrayList) {
            if (aVar.f5508e == i2 && aVar.f5512i == z2) {
                return aVar;
            }
        }
        g.a.a.a.a.b0("undefined indicator, bitNumber=", i2);
        return null;
    }

    public static boolean c(int i2, int i3) {
        return i2 == -1 || ((i2 >> i3) & 1) != 0;
    }

    public static String d(int i2, int i3) {
        if (i2 <= 3) {
            for (a aVar : a) {
                if (aVar.f5508e == i3) {
                    return aVar.f5509f;
                }
            }
            return "NA";
        }
        if (i2 == 5 || i2 == 9 || i2 == 12) {
            for (a aVar2 : f5505b) {
                if (aVar2.f5508e == i3) {
                    return aVar2.f5509f;
                }
            }
            return "NA";
        }
        if (i2 != 4 && i2 != 6 && i2 != 7 && i2 != 8 && i2 != 10 && i2 != 11) {
            return "NA";
        }
        for (a aVar3 : f5506c) {
            if (aVar3.f5508e == i3) {
                return aVar3.f5509f;
            }
        }
        return "NA";
    }

    public static String e(int i2, int i3) {
        if (i2 <= 3) {
            for (a aVar : a) {
                if (aVar.f5510g == i3) {
                    return aVar.f5509f;
                }
            }
            return "NA";
        }
        if (i2 == 5 || i2 == 9 || i2 == 12) {
            for (a aVar2 : f5505b) {
                if (aVar2.f5510g == i3) {
                    return aVar2.f5509f;
                }
            }
            return "NA";
        }
        if (i2 != 4 && i2 != 6 && i2 != 7 && i2 != 8 && i2 != 10 && i2 != 11) {
            return "NA";
        }
        for (a aVar3 : f5506c) {
            if (aVar3.f5510g == i3) {
                return aVar3.f5509f;
            }
        }
        return "NA";
    }

    public String toString() {
        StringBuilder sb = new StringBuilder();
        Locale locale = Locale.US;
        sb.append(String.format(locale, "bitNumber=%d, flashLayoutName=%s, imageId=0x%04X, subBinId=0x%04X", Integer.valueOf(this.f5508e), this.f5509f, Integer.valueOf(this.f5510g), Integer.valueOf(this.f5511h)));
        sb.append(String.format(locale, ", versionCheckEnabled=%b, versionFormat=%d, isConfigEnabled=%b", Boolean.valueOf(this.f5512i), Integer.valueOf(this.f5513j), Boolean.valueOf(this.f5514k)));
        return sb.toString();
    }
}
