package g;

import com.jsyn.unitgen.u;
import d.AbstractC0421a;
import d.C0424d;
import java.math.BigDecimal;
import java.math.MathContext;
import java.util.Calendar;
import java.util.Date;
import java.util.SimpleTimeZone;
import java.util.TimeZone;
import l.AbstractC0610b;
import l.AbstractC0613e;

/* JADX INFO: loaded from: classes.dex */
public final class f extends d {

    /* JADX INFO: renamed from: i0, reason: collision with root package name */
    private final String f3982i0;

    /* JADX INFO: renamed from: j0, reason: collision with root package name */
    private final int f3983j0;

    public f(String str) {
        this(str, AbstractC0421a.f3668H);
    }

    static boolean U0(String str, int i2, char[] cArr) {
        int length = cArr.length;
        if (length + i2 > str.length()) {
            return false;
        }
        for (int i3 = 0; i3 < length; i3++) {
            if (cArr[i3] != str.charAt(i2 + i3)) {
                return false;
            }
        }
        return true;
    }

    static boolean V0(char c2, char c3, char c4, char c5, char c6, char c7, int i2, int i3) {
        if (c2 >= '0' && c2 <= '9' && c3 >= '0' && c3 <= '9' && c4 >= '0' && c4 <= '9' && c5 >= '0' && c5 <= '9') {
            if (c6 == '0') {
                if (c7 < '1' || c7 > '9') {
                    return false;
                }
            } else if (c6 != '1' || (c7 != '0' && c7 != '1' && c7 != '2')) {
                return false;
            }
            if (i2 == 48) {
                return i3 >= 49 && i3 <= 57;
            }
            if (i2 != 49 && i2 != 50) {
                return i2 == 51 && (i3 == 48 || i3 == 49);
            }
            if (i3 >= 48 && i3 <= 57) {
                return true;
            }
        }
        return false;
    }

    private boolean W0(char c2, char c3, char c4, char c5, char c6, char c7) {
        if (c2 == '0') {
            if (c3 < '0' || c3 > '9') {
                return false;
            }
        } else {
            if (c2 != '1') {
                if (c2 == '2' && c3 >= '0' && c3 <= '4') {
                }
                return false;
            }
            if (c3 < '0' || c3 > '9') {
                return false;
            }
        }
        if (c4 < '0' || c4 > '5') {
            if (c4 != '6' || c5 != '0') {
                return false;
            }
        } else if (c5 < '0' || c5 > '9') {
            return false;
        }
        return (c6 < '0' || c6 > '5') ? c6 == '6' && c7 == '0' : c7 >= '0' && c7 <= '9';
    }

    private boolean Z0(boolean z2, int i2) {
        int i3;
        boolean z3;
        char c2;
        char cH0;
        char c3;
        char c4;
        char c5;
        int i4;
        int i5;
        int i6;
        int i7;
        char c6;
        char c7;
        char cH02;
        char c8;
        char c9;
        char c10;
        int i8;
        char c11;
        char c12;
        char c13;
        char c14;
        int i9;
        char c15;
        char c16;
        char c17;
        int i10;
        int i11;
        char cH03;
        char cH04;
        char cH05;
        char cH06;
        char cH07;
        char cH08;
        if (i2 < 8) {
            return false;
        }
        char cH09 = h0(this.f3981y);
        char cH010 = h0(this.f3981y + 1);
        char cH011 = h0(this.f3981y + 2);
        int i12 = 3;
        char cH012 = h0(this.f3981y + 3);
        char cH013 = h0(this.f3981y + 4);
        int i13 = 5;
        char cH014 = h0(this.f3981y + 5);
        char cH015 = h0(this.f3981y + 6);
        char cH016 = h0(this.f3981y + 7);
        if (!z2) {
            if (i2 > 13) {
                char cH017 = h0((this.f3981y + i2) - 1);
                char cH018 = h0((this.f3981y + i2) - 2);
                if (cH09 == '/' && cH010 == 'D' && cH011 == 'a' && cH012 == 't' && cH013 == 'e' && cH014 == '(' && cH017 == '/' && cH018 == ')') {
                    int i14 = -1;
                    for (int i15 = 6; i15 < i2; i15++) {
                        char cH019 = h0(this.f3981y + i15);
                        if (cH019 != '+') {
                            if (cH019 < '0' || cH019 > '9') {
                                break;
                            }
                        } else {
                            i14 = i15;
                        }
                    }
                    if (i14 == -1) {
                        return false;
                    }
                    int i16 = this.f3981y;
                    int i17 = i16 + 6;
                    long j2 = Long.parseLong(S0(i17, (i16 + i14) - i17));
                    Calendar calendar = Calendar.getInstance(this.f3972a0, this.f3974b0);
                    this.f3971Z = calendar;
                    calendar.setTimeInMillis(j2);
                    this.f3973b = 5;
                    return true;
                }
            }
            i13 = 5;
        }
        if (i2 == 8 || i2 == 14) {
            i3 = i13;
            z3 = false;
            c2 = ':';
        } else {
            if (!(i2 == 16 && ((cH08 = h0(this.f3981y + 10)) == 'T' || cH08 == ' ')) && (i2 != 17 || h0(this.f3981y + 6) == '-')) {
                if (i2 < 9) {
                    return false;
                }
                char cH020 = h0(this.f3981y + 8);
                char cH021 = h0(this.f3981y + 9);
                if ((cH013 == '-' && cH016 == '-') || (cH013 == '/' && cH016 == '/')) {
                    if (cH021 == ' ') {
                        c11 = cH014;
                        c12 = cH012;
                        c13 = cH09;
                        c14 = cH010;
                        c15 = '0';
                        i9 = 9;
                        cH010 = cH020;
                        c17 = cH015;
                        c16 = cH011;
                    } else {
                        c12 = cH012;
                        c13 = cH09;
                        i9 = 10;
                        c15 = cH020;
                        c17 = cH015;
                        c16 = cH011;
                        c11 = cH014;
                        c14 = cH010;
                        cH010 = cH021;
                    }
                } else if (cH013 == '-' && cH015 == '-') {
                    if (cH020 == ' ') {
                        c16 = cH011;
                        c17 = cH014;
                        c13 = cH09;
                        c14 = cH010;
                        c11 = '0';
                        i9 = 8;
                        cH010 = cH016;
                        c12 = cH012;
                        c15 = '0';
                    } else {
                        c16 = cH011;
                        c13 = cH09;
                        c11 = '0';
                        i9 = 9;
                        c17 = cH014;
                        c14 = cH010;
                        cH010 = cH020;
                        c15 = cH016;
                        c12 = cH012;
                    }
                } else if ((cH011 == '.' && cH014 == '.') || (cH011 == '-' && cH014 == '-')) {
                    c14 = cH016;
                    c12 = cH021;
                    c11 = cH012;
                    c15 = cH09;
                    i9 = 10;
                    c17 = cH013;
                    c13 = cH015;
                    c16 = cH020;
                } else if (cH020 == 'T') {
                    c11 = cH013;
                    c17 = cH014;
                    c13 = cH09;
                    c14 = cH010;
                    i9 = 8;
                    cH010 = cH016;
                    c12 = cH012;
                    c15 = cH015;
                    c16 = cH011;
                } else {
                    if (cH013 != 24180 && cH013 != 45380) {
                        return false;
                    }
                    if (cH016 != 26376 && cH016 != 50900) {
                        if (cH015 != 26376 && cH015 != 50900) {
                            return false;
                        }
                        if (cH020 == 26085 || cH020 == 51068) {
                            c16 = cH011;
                            c17 = cH014;
                            c13 = cH09;
                            c14 = cH010;
                            i9 = 10;
                            c11 = '0';
                            cH010 = cH016;
                            c12 = cH012;
                            c15 = '0';
                        } else {
                            if (cH021 != 26085 && cH021 != 51068) {
                                return false;
                            }
                            c16 = cH011;
                            c13 = cH09;
                            i9 = 10;
                            c11 = '0';
                            c17 = cH014;
                            c14 = cH010;
                            cH010 = cH020;
                            c15 = cH016;
                            c12 = cH012;
                        }
                    } else if (cH021 == 26085 || cH021 == 51068) {
                        c11 = cH014;
                        c12 = cH012;
                        c13 = cH09;
                        c14 = cH010;
                        i9 = 10;
                        c15 = '0';
                        cH010 = cH020;
                        c17 = cH015;
                        c16 = cH011;
                    } else {
                        if (h0(this.f3981y + 10) != 26085 && h0(this.f3981y + 10) != 51068) {
                            return false;
                        }
                        c12 = cH012;
                        c13 = cH09;
                        i9 = 11;
                        c15 = cH020;
                        c17 = cH015;
                        c16 = cH011;
                        c11 = cH014;
                        c14 = cH010;
                        cH010 = cH021;
                    }
                }
                if (!V0(c13, c14, c16, c12, c11, c17, c15, cH010)) {
                    return false;
                }
                a1(c13, c14, c16, c12, c11, c17, c15, cH010);
                char cH022 = h0(this.f3981y + i9);
                char c18 = 'T';
                if (cH022 == 'T') {
                    if (i2 == 16 && i9 == 8 && h0(this.f3981y + 15) == 'Z') {
                        char cH023 = h0(this.f3981y + i9 + 1);
                        char cH024 = h0(this.f3981y + i9 + 2);
                        char cH025 = h0(this.f3981y + i9 + 3);
                        char cH026 = h0(this.f3981y + i9 + 4);
                        char cH027 = h0(this.f3981y + i9 + 5);
                        char cH028 = h0(this.f3981y + i9 + 6);
                        if (!W0(cH023, cH024, cH025, cH026, cH027, cH028)) {
                            return false;
                        }
                        b1(cH023, cH024, cH025, cH026, cH027, cH028);
                        this.f3971Z.set(14, 0);
                        if (this.f3971Z.getTimeZone().getRawOffset() != 0) {
                            String[] availableIDs = TimeZone.getAvailableIDs(0);
                            if (availableIDs.length > 0) {
                                this.f3971Z.setTimeZone(TimeZone.getTimeZone(availableIDs[0]));
                            }
                        }
                        this.f3973b = 5;
                        return true;
                    }
                    c18 = 'T';
                }
                if (cH022 != c18 && (cH022 != ' ' || z2)) {
                    if (cH022 == '\"' || cH022 == 26 || cH022 == 26085 || cH022 == 51068) {
                        this.f3971Z.set(11, 0);
                        this.f3971Z.set(12, 0);
                        this.f3971Z.set(13, 0);
                        this.f3971Z.set(14, 0);
                        int i18 = this.f3981y + i9;
                        this.f3981y = i18;
                        this.f3980x = h0(i18);
                        this.f3973b = 5;
                        return true;
                    }
                    if ((cH022 != '+' && cH022 != '-') || this.f3983j0 != i9 + 6 || h0(this.f3981y + i9 + 3) != ':' || h0(this.f3981y + i9 + 4) != '0' || h0(this.f3981y + i9 + 5) != '0') {
                        return false;
                    }
                    b1('0', '0', '0', '0', '0', '0');
                    this.f3971Z.set(14, 0);
                    c1(cH022, h0(this.f3981y + i9 + 1), h0(this.f3981y + i9 + 2));
                    return true;
                }
                if (i2 < i9 + 9 || h0(this.f3981y + i9 + 3) != ':' || h0(this.f3981y + i9 + 6) != ':') {
                    return false;
                }
                char cH029 = h0(this.f3981y + i9 + 1);
                char cH030 = h0(this.f3981y + i9 + 2);
                char cH031 = h0(this.f3981y + i9 + 4);
                char cH032 = h0(this.f3981y + i9 + 5);
                char cH033 = h0(this.f3981y + i9 + 7);
                char cH034 = h0(this.f3981y + i9 + 8);
                if (!W0(cH029, cH030, cH031, cH032, cH033, cH034)) {
                    return false;
                }
                b1(cH029, cH030, cH031, cH032, cH033, cH034);
                if (h0(this.f3981y + i9 + 9) == '.') {
                    int i19 = i9 + 11;
                    if (i2 < i19 || (cH05 = h0(this.f3981y + i9 + 10)) < '0' || cH05 > '9') {
                        return false;
                    }
                    int i20 = cH05 - '0';
                    if (i2 <= i19 || (cH07 = h0(this.f3981y + i9 + 11)) < '0' || cH07 > '9') {
                        i10 = 1;
                    } else {
                        i20 = (i20 * 10) + (cH07 - '0');
                        i10 = 2;
                    }
                    if (i10 != 2 || (cH06 = h0(this.f3981y + i9 + 12)) < '0' || cH06 > '9') {
                        i11 = i20;
                    } else {
                        i11 = (cH06 - '0') + (i20 * 10);
                        i10 = 3;
                    }
                } else {
                    i10 = -1;
                    i11 = 0;
                }
                this.f3971Z.set(14, i11);
                char cH035 = h0(this.f3981y + i9 + 10 + i10);
                if (cH035 == ' ') {
                    i10++;
                    cH035 = h0(this.f3981y + i9 + 10 + i10);
                }
                char c19 = cH035;
                if (c19 == '+' || c19 == '-') {
                    char cH036 = h0(this.f3981y + i9 + 10 + i10 + 1);
                    if (cH036 < '0' || cH036 > '1' || (cH03 = h0(this.f3981y + i9 + 10 + i10 + 2)) < '0' || cH03 > '9') {
                        return false;
                    }
                    char cH037 = h0(this.f3981y + i9 + 10 + i10 + 3);
                    char c20 = '3';
                    if (cH037 == ':') {
                        char cH038 = h0(this.f3981y + i9 + 10 + i10 + 4);
                        cH04 = h0(this.f3981y + i9 + 10 + i10 + 5);
                        if (cH038 == '4' && cH04 == '5') {
                            if (cH036 != '1' || (cH03 != '2' && cH03 != '3')) {
                                if (cH036 != '0') {
                                    return false;
                                }
                                if (cH03 != '5' && cH03 != '8') {
                                    return false;
                                }
                            }
                        } else if ((cH038 != '0' && cH038 != '3') || cH04 != '0') {
                            return false;
                        }
                        c20 = cH038;
                        i12 = 6;
                    } else {
                        if (cH037 == '0') {
                            char cH039 = h0(this.f3981y + i9 + 10 + i10 + 4);
                            if (cH039 != '0' && cH039 != '3') {
                                return false;
                            }
                            c20 = cH039;
                        } else {
                            if (cH037 != '3' || h0(this.f3981y + i9 + 10 + i10 + 4) != '0') {
                                if (cH037 == '4' && h0(this.f3981y + i9 + 10 + i10 + 4) == '5') {
                                    cH04 = '5';
                                    i12 = 5;
                                    c20 = '4';
                                } else {
                                    c20 = '0';
                                }
                            }
                            cH04 = '0';
                        }
                        i12 = 5;
                        cH04 = '0';
                    }
                    d1(c19, cH036, cH03, c20, cH04);
                } else if (c19 == 'Z') {
                    if (this.f3971Z.getTimeZone().getRawOffset() != 0) {
                        String[] availableIDs2 = TimeZone.getAvailableIDs(0);
                        if (availableIDs2.length > 0) {
                            this.f3971Z.setTimeZone(TimeZone.getTimeZone(availableIDs2[0]));
                        }
                    }
                    i12 = 1;
                } else {
                    i12 = 0;
                }
                int i21 = i9 + 10 + i10 + i12;
                char cH040 = h0(this.f3981y + i21);
                if (cH040 != 26 && cH040 != '\"') {
                    return false;
                }
                int i22 = this.f3981y + i21;
                this.f3981y = i22;
                this.f3980x = h0(i22);
                this.f3973b = 5;
                return true;
            }
            z3 = false;
            c2 = ':';
            i3 = 5;
        }
        if (z2) {
            return z3;
        }
        char cH041 = h0(this.f3981y + 8);
        boolean z4 = cH013 == '-' && cH016 == '-';
        boolean z5 = z4 && i2 == 16;
        boolean z6 = z4 && i2 == 17;
        if (z6 || z5) {
            cH0 = h0(this.f3981y + 9);
            c3 = cH014;
            c4 = cH015;
            c5 = cH041;
        } else if (cH013 == '-' && cH015 == '-') {
            c4 = cH014;
            cH0 = cH016;
            c3 = '0';
            c5 = '0';
        } else {
            c3 = cH013;
            c4 = cH014;
            c5 = cH015;
            cH0 = cH016;
        }
        if (!V0(cH09, cH010, cH011, cH012, c3, c4, c5, cH0)) {
            return false;
        }
        a1(cH09, cH010, cH011, cH012, c3, c4, c5, cH0);
        if (i2 != 8) {
            char cH042 = h0(this.f3981y + 9);
            char cH043 = h0(this.f3981y + 10);
            char cH044 = h0(this.f3981y + 11);
            char cH045 = h0(this.f3981y + 12);
            char cH046 = h0(this.f3981y + 13);
            if ((z6 && cH043 == 'T' && cH046 == c2 && h0(this.f3981y + 16) == 'Z') || (z5 && ((cH043 == ' ' || cH043 == 'T') && cH046 == c2))) {
                char cH047 = h0(this.f3981y + 14);
                cH02 = h0(this.f3981y + 15);
                c7 = cH047;
                c9 = cH044;
                c6 = cH045;
                c10 = '0';
                c8 = '0';
            } else {
                c6 = cH042;
                c7 = cH043;
                cH02 = cH044;
                c8 = cH046;
                c9 = cH041;
                c10 = cH045;
            }
            if (!W0(c9, c6, c7, cH02, c10, c8)) {
                return false;
            }
            if (i2 != 17 || z6) {
                i8 = 0;
            } else {
                char cH048 = h0(this.f3981y + 14);
                char cH049 = h0(this.f3981y + 15);
                char cH050 = h0(this.f3981y + 16);
                if (cH048 < '0' || cH048 > '9' || cH049 < '0' || cH049 > '9' || cH050 < '0' || cH050 > '9') {
                    return false;
                }
                i8 = ((cH048 - '0') * 100) + ((cH049 - '0') * 10) + (cH050 - '0');
            }
            i5 = ((c10 - '0') * 10) + (c8 - '0');
            i7 = ((c9 - '0') * 10) + (c6 - '0');
            i6 = i8;
            i4 = ((c7 - '0') * 10) + (cH02 - '0');
        } else {
            i4 = 0;
            i5 = 0;
            i6 = 0;
            i7 = 0;
        }
        this.f3971Z.set(11, i7);
        this.f3971Z.set(12, i4);
        this.f3971Z.set(13, i5);
        this.f3971Z.set(14, i6);
        this.f3973b = i3;
        return true;
    }

    private void a1(char c2, char c3, char c4, char c5, char c6, char c7, char c8, char c9) {
        Calendar calendar = Calendar.getInstance(this.f3972a0, this.f3974b0);
        this.f3971Z = calendar;
        calendar.set(1, ((c2 - '0') * 1000) + ((c3 - '0') * 100) + ((c4 - '0') * 10) + (c5 - '0'));
        this.f3971Z.set(2, (((c6 - '0') * 10) + (c7 - '0')) - 1);
        this.f3971Z.set(5, ((c8 - '0') * 10) + (c9 - '0'));
    }

    @Override // g.d, g.InterfaceC0476c
    public final String A() {
        return !this.f3970Q ? S0(this.f3969M + 1, this.f3968L) : new String(this.f3967I, 0, this.f3968L);
    }

    /* JADX WARN: Code restructure failed: missing block: B:32:0x0063, code lost:
    
        if (r12 != '.') goto L35;
     */
    /* JADX WARN: Code restructure failed: missing block: B:33:0x0065, code lost:
    
        r14.f3975c0 = -1;
     */
    /* JADX WARN: Code restructure failed: missing block: B:34:0x0067, code lost:
    
        return 0;
     */
    /* JADX WARN: Code restructure failed: missing block: B:35:0x0068, code lost:
    
        if (r4 >= 0) goto L38;
     */
    /* JADX WARN: Code restructure failed: missing block: B:36:0x006a, code lost:
    
        r14.f3975c0 = -1;
     */
    /* JADX WARN: Code restructure failed: missing block: B:37:0x006c, code lost:
    
        return 0;
     */
    /* JADX WARN: Code restructure failed: missing block: B:38:0x006d, code lost:
    
        if (r7 == false) goto L89;
     */
    /* JADX WARN: Code restructure failed: missing block: B:39:0x006f, code lost:
    
        if (r12 == '\"') goto L42;
     */
    /* JADX WARN: Code restructure failed: missing block: B:40:0x0071, code lost:
    
        r14.f3975c0 = -1;
     */
    /* JADX WARN: Code restructure failed: missing block: B:41:0x0073, code lost:
    
        return 0;
     */
    /* JADX WARN: Code restructure failed: missing block: B:42:0x0074, code lost:
    
        r15 = r15 + 2;
        r12 = h0(r11);
     */
    /* JADX WARN: Code restructure failed: missing block: B:43:0x007a, code lost:
    
        r11 = r15;
     */
    /* JADX WARN: Code restructure failed: missing block: B:45:0x007f, code lost:
    
        if (r12 == ',') goto L87;
     */
    /* JADX WARN: Code restructure failed: missing block: B:46:0x0081, code lost:
    
        if (r12 != '}') goto L48;
     */
    /* JADX WARN: Code restructure failed: missing block: B:49:0x0088, code lost:
    
        if (g.d.n0(r12) == false) goto L86;
     */
    /* JADX WARN: Code restructure failed: missing block: B:50:0x008a, code lost:
    
        r15 = r11 + 1;
        r12 = h0(r11);
     */
    /* JADX WARN: Code restructure failed: missing block: B:51:0x0091, code lost:
    
        r14.f3975c0 = -1;
     */
    /* JADX WARN: Code restructure failed: missing block: B:52:0x0093, code lost:
    
        return 0;
     */
    /* JADX WARN: Code restructure failed: missing block: B:53:0x0094, code lost:
    
        r14.f3981y = r11 - 1;
     */
    /* JADX WARN: Code restructure failed: missing block: B:54:0x009a, code lost:
    
        if (r12 != ',') goto L59;
     */
    /* JADX WARN: Code restructure failed: missing block: B:55:0x009c, code lost:
    
        r14.f3981y = r11;
        r14.f3980x = h0(r11);
        r14.f3975c0 = 3;
        r14.f3973b = 16;
     */
    /* JADX WARN: Code restructure failed: missing block: B:56:0x00a9, code lost:
    
        if (r3 == false) goto L95;
     */
    /* JADX WARN: Code restructure failed: missing block: B:58:0x00ac, code lost:
    
        return -r4;
     */
    /* JADX WARN: Code restructure failed: missing block: B:59:0x00ad, code lost:
    
        if (r12 != '}') goto L77;
     */
    /* JADX WARN: Code restructure failed: missing block: B:60:0x00af, code lost:
    
        r14.f3981y = r11;
        r8 = h0(r11);
     */
    /* JADX WARN: Code restructure failed: missing block: B:61:0x00b5, code lost:
    
        if (r8 != ',') goto L63;
     */
    /* JADX WARN: Code restructure failed: missing block: B:62:0x00b7, code lost:
    
        r14.f3973b = 16;
        r15 = r14.f3981y + 1;
        r14.f3981y = r15;
        r14.f3980x = h0(r15);
     */
    /* JADX WARN: Code restructure failed: missing block: B:64:0x00c7, code lost:
    
        if (r8 != ']') goto L66;
     */
    /* JADX WARN: Code restructure failed: missing block: B:65:0x00c9, code lost:
    
        r14.f3973b = 15;
        r15 = r14.f3981y + 1;
        r14.f3981y = r15;
        r14.f3980x = h0(r15);
     */
    /* JADX WARN: Code restructure failed: missing block: B:66:0x00d9, code lost:
    
        if (r8 != '}') goto L68;
     */
    /* JADX WARN: Code restructure failed: missing block: B:67:0x00db, code lost:
    
        r14.f3973b = 13;
        r15 = r14.f3981y + 1;
        r14.f3981y = r15;
        r14.f3980x = h0(r15);
     */
    /* JADX WARN: Code restructure failed: missing block: B:69:0x00ed, code lost:
    
        if (r8 != 26) goto L72;
     */
    /* JADX WARN: Code restructure failed: missing block: B:70:0x00ef, code lost:
    
        r14.f3973b = 20;
     */
    /* JADX WARN: Code restructure failed: missing block: B:71:0x00f3, code lost:
    
        r14.f3975c0 = 4;
     */
    /* JADX WARN: Code restructure failed: missing block: B:73:0x00fb, code lost:
    
        if (g.d.n0(r8) == false) goto L93;
     */
    /* JADX WARN: Code restructure failed: missing block: B:74:0x00fd, code lost:
    
        r8 = r14.f3981y + 1;
        r14.f3981y = r8;
        r8 = h0(r8);
     */
    /* JADX WARN: Code restructure failed: missing block: B:75:0x0107, code lost:
    
        r14.f3981y = r1;
        r14.f3980x = r2;
        r14.f3975c0 = -1;
     */
    /* JADX WARN: Code restructure failed: missing block: B:76:0x010d, code lost:
    
        return 0;
     */
    /* JADX WARN: Code restructure failed: missing block: B:77:0x010e, code lost:
    
        if (r3 == false) goto L96;
     */
    /* JADX WARN: Code restructure failed: missing block: B:79:0x0111, code lost:
    
        return -r4;
     */
    /* JADX WARN: Code restructure failed: missing block: B:82:0x007a, code lost:
    
        r11 = r15;
     */
    /* JADX WARN: Code restructure failed: missing block: B:95:?, code lost:
    
        return r4;
     */
    /* JADX WARN: Code restructure failed: missing block: B:96:?, code lost:
    
        return r4;
     */
    @Override // g.d
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public int E0(char[] r15) {
        /*
            Method dump skipped, instruction units count: 277
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: g.f.E0(char[]):int");
    }

    @Override // g.d
    public long G0(char[] cArr) {
        int i2;
        char cH0;
        boolean z2 = false;
        this.f3975c0 = 0;
        int i3 = this.f3981y;
        char c2 = this.f3980x;
        if (!U0(this.f3982i0, i3, cArr)) {
            this.f3975c0 = -2;
            return 0L;
        }
        int length = this.f3981y + cArr.length;
        int i4 = length + 1;
        char cH02 = h0(length);
        boolean z3 = cH02 == '\"';
        if (z3) {
            cH02 = h0(i4);
            i4 = length + 2;
        }
        if (cH02 == '-') {
            cH02 = h0(i4);
            i4++;
            z2 = true;
        }
        if (cH02 < '0' || cH02 > '9') {
            this.f3981y = i3;
            this.f3980x = c2;
            this.f3975c0 = -1;
            return 0L;
        }
        long j2 = cH02 - '0';
        while (true) {
            i2 = i4 + 1;
            cH0 = h0(i4);
            if (cH0 < '0' || cH0 > '9') {
                break;
            }
            j2 = (j2 * 10) + ((long) (cH0 - '0'));
            i4 = i2;
        }
        if (cH0 == '.') {
            this.f3975c0 = -1;
            return 0L;
        }
        if (z3) {
            if (cH0 != '\"') {
                this.f3975c0 = -1;
                return 0L;
            }
            cH0 = h0(i2);
            i2 = i4 + 2;
        }
        if (cH0 == ',' || cH0 == '}') {
            this.f3981y = i2 - 1;
        }
        if (j2 < 0 && (j2 != Long.MIN_VALUE || !z2)) {
            this.f3981y = i3;
            this.f3980x = c2;
            this.f3975c0 = -1;
            return 0L;
        }
        while (cH0 != ',') {
            if (cH0 == '}') {
                int i5 = 1;
                int i6 = this.f3981y + 1;
                this.f3981y = i6;
                char cH03 = h0(i6);
                while (true) {
                    if (cH03 == ',') {
                        this.f3973b = 16;
                        int i7 = this.f3981y + i5;
                        this.f3981y = i7;
                        this.f3980x = h0(i7);
                        break;
                    }
                    if (cH03 == ']') {
                        this.f3973b = 15;
                        int i8 = this.f3981y + i5;
                        this.f3981y = i8;
                        this.f3980x = h0(i8);
                        break;
                    }
                    if (cH03 == '}') {
                        this.f3973b = 13;
                        int i9 = this.f3981y + i5;
                        this.f3981y = i9;
                        this.f3980x = h0(i9);
                        break;
                    }
                    if (cH03 == 26) {
                        this.f3973b = 20;
                        break;
                    }
                    if (!d.n0(cH03)) {
                        this.f3981y = i3;
                        this.f3980x = c2;
                        this.f3975c0 = -1;
                        return 0L;
                    }
                    int i10 = this.f3981y + 1;
                    this.f3981y = i10;
                    cH03 = h0(i10);
                    i5 = 1;
                }
                this.f3975c0 = 4;
                return z2 ? -j2 : j2;
            }
            if (!d.n0(cH0)) {
                this.f3975c0 = -1;
                return 0L;
            }
            this.f3981y = i2;
            cH0 = h0(i2);
            i2++;
        }
        int i11 = this.f3981y + 1;
        this.f3981y = i11;
        this.f3980x = h0(i11);
        this.f3975c0 = 3;
        this.f3973b = 16;
        return z2 ? -j2 : j2;
    }

    @Override // g.d
    public String H0(char[] cArr) {
        this.f3975c0 = 0;
        int i2 = this.f3981y;
        char c2 = this.f3980x;
        while (!U0(this.f3982i0, this.f3981y, cArr)) {
            if (!d.n0(this.f3980x)) {
                this.f3975c0 = -2;
                return R0();
            }
            next();
            while (d.n0(this.f3980x)) {
                next();
            }
        }
        int length = this.f3981y + cArr.length;
        int i3 = length + 1;
        char cH0 = h0(length);
        int i4 = 0;
        if (cH0 != '\"') {
            while (d.n0(cH0)) {
                i4++;
                int i5 = i3 + 1;
                char cH02 = h0(i3);
                i3 = i5;
                cH0 = cH02;
            }
            if (cH0 != '\"') {
                this.f3975c0 = -1;
                return R0();
            }
        }
        int iL0 = l0('\"', i3);
        if (iL0 == -1) {
            throw new C0424d("unclosed str");
        }
        String strS0 = S0(i3, iL0 - i3);
        if (strS0.indexOf(92) != -1) {
            while (true) {
                int i6 = 0;
                for (int i7 = iL0 - 1; i7 >= 0 && h0(i7) == '\\'; i7--) {
                    i6++;
                }
                if (i6 % 2 == 0) {
                    break;
                }
                iL0 = l0('\"', iL0 + 1);
            }
            int i8 = this.f3981y;
            int length2 = iL0 - (((cArr.length + i8) + 1) + i4);
            strS0 = d.t0(T0(i8 + cArr.length + 1 + i4, length2), length2);
        }
        char cH03 = h0(iL0 + 1);
        while (cH03 != ',' && cH03 != '}') {
            if (!d.n0(cH03)) {
                this.f3975c0 = -1;
                return R0();
            }
            char cH04 = h0(iL0 + 2);
            iL0++;
            cH03 = cH04;
        }
        this.f3981y = iL0 + 1;
        this.f3980x = cH03;
        if (cH03 == ',') {
            int i9 = iL0 + 2;
            this.f3981y = i9;
            this.f3980x = h0(i9);
            this.f3975c0 = 3;
            return strS0;
        }
        int i10 = iL0 + 2;
        this.f3981y = i10;
        char cH05 = h0(i10);
        if (cH05 == ',') {
            this.f3973b = 16;
            int i11 = this.f3981y + 1;
            this.f3981y = i11;
            this.f3980x = h0(i11);
        } else if (cH05 == ']') {
            this.f3973b = 15;
            int i12 = this.f3981y + 1;
            this.f3981y = i12;
            this.f3980x = h0(i12);
        } else if (cH05 == '}') {
            this.f3973b = 13;
            int i13 = this.f3981y + 1;
            this.f3981y = i13;
            this.f3980x = h0(i13);
        } else {
            if (cH05 != 26) {
                this.f3981y = i2;
                this.f3980x = c2;
                this.f3975c0 = -1;
                return R0();
            }
            this.f3973b = 20;
        }
        this.f3975c0 = 4;
        return strS0;
    }

    @Override // g.InterfaceC0476c
    public double K(char c2) {
        int i2;
        char cH0;
        long j2;
        int i3;
        int i4;
        double d2;
        char cH02;
        this.f3975c0 = 0;
        int i5 = this.f3981y;
        int i6 = i5 + 1;
        char cH03 = h0(i5);
        boolean z2 = cH03 == '\"';
        if (z2) {
            cH03 = h0(i6);
            i6 = i5 + 2;
        }
        boolean z3 = cH03 == '-';
        if (z3) {
            cH03 = h0(i6);
            i6++;
        }
        if (cH03 >= '0') {
            char c3 = '9';
            if (cH03 <= '9') {
                long j3 = cH03 - '0';
                while (true) {
                    i2 = i6 + 1;
                    cH0 = h0(i6);
                    if (cH0 < '0' || cH0 > '9') {
                        break;
                    }
                    j3 = (j3 * 10) + ((long) (cH0 - '0'));
                    i6 = i2;
                }
                if (cH0 == '.') {
                    int i7 = i6 + 2;
                    char cH04 = h0(i2);
                    if (cH04 < '0' || cH04 > '9') {
                        this.f3975c0 = -1;
                        return u.FALSE;
                    }
                    j3 = (j3 * 10) + ((long) (cH04 - '0'));
                    long j4 = 10;
                    while (true) {
                        i2 = i7 + 1;
                        cH02 = h0(i7);
                        if (cH02 < '0' || cH02 > c3) {
                            break;
                        }
                        j3 = (j3 * 10) + ((long) (cH02 - '0'));
                        j4 *= 10;
                        i7 = i2;
                        c3 = '9';
                    }
                    long j5 = j4;
                    cH0 = cH02;
                    j2 = j5;
                } else {
                    j2 = 1;
                }
                boolean z4 = cH0 == 'e' || cH0 == 'E';
                if (z4) {
                    int i8 = i2 + 1;
                    char cH05 = h0(i2);
                    if (cH05 == '+' || cH05 == '-') {
                        i2 += 2;
                        cH0 = h0(i8);
                    } else {
                        i2 = i8;
                        cH0 = cH05;
                    }
                    while (cH0 >= '0' && cH0 <= '9') {
                        int i9 = i2 + 1;
                        char cH06 = h0(i2);
                        i2 = i9;
                        cH0 = cH06;
                    }
                }
                if (!z2) {
                    i3 = this.f3981y;
                    i4 = (i2 - i3) - 1;
                } else {
                    if (cH0 != '\"') {
                        this.f3975c0 = -1;
                        return u.FALSE;
                    }
                    int i10 = i2 + 1;
                    char cH07 = h0(i2);
                    i3 = this.f3981y + 1;
                    i4 = (i10 - i3) - 2;
                    i2 = i10;
                    cH0 = cH07;
                }
                if (z4 || i4 >= 18) {
                    d2 = Double.parseDouble(S0(i3, i4));
                } else {
                    d2 = j3 / j2;
                    if (z3) {
                        d2 = -d2;
                    }
                }
                if (cH0 != c2) {
                    this.f3975c0 = -1;
                    return d2;
                }
                this.f3981y = i2;
                this.f3980x = h0(i2);
                this.f3975c0 = 3;
                this.f3973b = 16;
                return d2;
            }
        }
        if (cH03 == 'n') {
            int i11 = i6 + 1;
            if (h0(i6) == 'u') {
                int i12 = i6 + 2;
                if (h0(i11) == 'l') {
                    int i13 = i6 + 3;
                    if (h0(i12) == 'l') {
                        this.f3975c0 = 5;
                        int i14 = i6 + 4;
                        char cH08 = h0(i13);
                        if (z2 && cH08 == '\"') {
                            cH08 = h0(i14);
                            i14 = i6 + 5;
                        }
                        while (cH08 != ',') {
                            if (cH08 == ']') {
                                this.f3981y = i14;
                                this.f3980x = h0(i14);
                                this.f3975c0 = 5;
                                this.f3973b = 15;
                                return u.FALSE;
                            }
                            if (!d.n0(cH08)) {
                                this.f3975c0 = -1;
                                return u.FALSE;
                            }
                            char cH09 = h0(i14);
                            i14++;
                            cH08 = cH09;
                        }
                        this.f3981y = i14;
                        this.f3980x = h0(i14);
                        this.f3975c0 = 5;
                        this.f3973b = 16;
                        return u.FALSE;
                    }
                }
            }
        }
        this.f3975c0 = -1;
        return u.FALSE;
    }

    @Override // g.InterfaceC0476c
    public long R(char c2) {
        int i2;
        char cH0;
        this.f3975c0 = 0;
        int i3 = this.f3981y;
        int i4 = i3 + 1;
        char cH02 = h0(i3);
        boolean z2 = cH02 == '\"';
        if (z2) {
            cH02 = h0(i4);
            i4 = i3 + 2;
        }
        boolean z3 = cH02 == '-';
        if (z3) {
            cH02 = h0(i4);
            i4++;
        }
        if (cH02 >= '0' && cH02 <= '9') {
            long j2 = cH02 - '0';
            while (true) {
                i2 = i4 + 1;
                cH0 = h0(i4);
                if (cH0 < '0' || cH0 > '9') {
                    break;
                }
                j2 = (j2 * 10) + ((long) (cH0 - '0'));
                i4 = i2;
            }
            if (cH0 == '.') {
                this.f3975c0 = -1;
                return 0L;
            }
            if (z2) {
                if (cH0 != '\"') {
                    this.f3975c0 = -1;
                    return 0L;
                }
                cH0 = h0(i2);
                i2 = i4 + 2;
            }
            if (j2 < 0 && (j2 != Long.MIN_VALUE || !z3)) {
                this.f3975c0 = -1;
                return 0L;
            }
            while (cH0 != c2) {
                if (!d.n0(cH0)) {
                    this.f3975c0 = -1;
                    return j2;
                }
                cH0 = h0(i2);
                i2++;
            }
            this.f3981y = i2;
            this.f3980x = h0(i2);
            this.f3975c0 = 3;
            this.f3973b = 16;
            return z3 ? -j2 : j2;
        }
        if (cH02 == 'n') {
            int i5 = i4 + 1;
            if (h0(i4) == 'u') {
                int i6 = i4 + 2;
                if (h0(i5) == 'l') {
                    int i7 = i4 + 3;
                    if (h0(i6) == 'l') {
                        this.f3975c0 = 5;
                        int i8 = i4 + 4;
                        char cH03 = h0(i7);
                        if (z2 && cH03 == '\"') {
                            cH03 = h0(i8);
                            i8 = i4 + 5;
                        }
                        while (cH03 != ',') {
                            if (cH03 == ']') {
                                this.f3981y = i8;
                                this.f3980x = h0(i8);
                                this.f3975c0 = 5;
                                this.f3973b = 15;
                                return 0L;
                            }
                            if (!d.n0(cH03)) {
                                this.f3975c0 = -1;
                                return 0L;
                            }
                            char cH04 = h0(i8);
                            i8++;
                            cH03 = cH04;
                        }
                        this.f3981y = i8;
                        this.f3980x = h0(i8);
                        this.f3975c0 = 5;
                        this.f3973b = 16;
                        return 0L;
                    }
                }
            }
        }
        this.f3975c0 = -1;
        return 0L;
    }

    @Override // g.d
    public final String S0(int i2, int i3) {
        if (!AbstractC0610b.f5242b) {
            return this.f3982i0.substring(i2, i3 + i2);
        }
        char[] cArr = this.f3967I;
        if (i3 < cArr.length) {
            this.f3982i0.getChars(i2, i2 + i3, cArr, 0);
            return new String(this.f3967I, 0, i3);
        }
        char[] cArr2 = new char[i3];
        this.f3982i0.getChars(i2, i3 + i2, cArr2, 0);
        return new String(cArr2);
    }

    @Override // g.d
    public final char[] T0(int i2, int i3) {
        if (AbstractC0610b.f5242b) {
            char[] cArr = this.f3967I;
            if (i3 < cArr.length) {
                this.f3982i0.getChars(i2, i3 + i2, cArr, 0);
                return this.f3967I;
            }
        }
        char[] cArr2 = new char[i3];
        this.f3982i0.getChars(i2, i3 + i2, cArr2, 0);
        return cArr2;
    }

    public boolean X0() {
        return Y0(true);
    }

    public boolean Y0(boolean z2) {
        return Z0(z2, this.f3983j0 - this.f3981y);
    }

    @Override // g.d, g.InterfaceC0476c
    public final String a0() {
        char cH0 = h0((this.f3969M + this.f3968L) - 1);
        int i2 = this.f3968L;
        if (cH0 == 'L' || cH0 == 'S' || cH0 == 'B' || cH0 == 'F' || cH0 == 'D') {
            i2--;
        }
        return S0(this.f3969M, i2);
    }

    @Override // g.d, g.InterfaceC0476c
    public String b() {
        StringBuilder sb = new StringBuilder();
        int i2 = 1;
        int i3 = 1;
        int i4 = 0;
        while (i4 < this.f3981y) {
            if (this.f3982i0.charAt(i4) == '\n') {
                i2++;
                i3 = 1;
            }
            i4++;
            i3++;
        }
        sb.append("pos ");
        sb.append(this.f3981y);
        sb.append(", line ");
        sb.append(i2);
        sb.append(", column ");
        sb.append(i3);
        if (this.f3982i0.length() < 65535) {
            sb.append(this.f3982i0);
        } else {
            sb.append(this.f3982i0.substring(0, 65535));
        }
        return sb.toString();
    }

    protected void b1(char c2, char c3, char c4, char c5, char c6, char c7) {
        this.f3971Z.set(11, ((c2 - '0') * 10) + (c3 - '0'));
        this.f3971Z.set(12, ((c4 - '0') * 10) + (c5 - '0'));
        this.f3971Z.set(13, ((c6 - '0') * 10) + (c7 - '0'));
    }

    @Override // g.InterfaceC0476c
    public String c0(j jVar) {
        int iIndexOf;
        if (!this.f3982i0.startsWith("\"@type\":\"", this.f3981y) || (iIndexOf = this.f3982i0.indexOf(34, this.f3981y + 9)) == -1) {
            return null;
        }
        int i2 = this.f3981y + 9;
        this.f3981y = i2;
        int iCharAt = 0;
        while (i2 < iIndexOf) {
            iCharAt = (iCharAt * 31) + this.f3982i0.charAt(i2);
            i2++;
        }
        int i3 = this.f3981y;
        String strE0 = e0(i3, iIndexOf - i3, iCharAt, jVar);
        char cCharAt = this.f3982i0.charAt(iIndexOf + 1);
        if (cCharAt != ',' && cCharAt != ']') {
            return null;
        }
        int i4 = iIndexOf + 2;
        this.f3981y = i4;
        this.f3980x = this.f3982i0.charAt(i4);
        return strE0;
    }

    protected void c1(char c2, char c3, char c4) {
        d1(c2, c3, c4, '0', '0');
    }

    protected void d1(char c2, char c3, char c4, char c5, char c6) {
        int i2 = ((((c3 - '0') * 10) + (c4 - '0')) * 3600000) + ((((c5 - '0') * 10) + (c6 - '0')) * 60000);
        if (c2 == '-') {
            i2 = -i2;
        }
        if (this.f3971Z.getTimeZone().getRawOffset() != i2) {
            this.f3971Z.setTimeZone(new SimpleTimeZone(i2, Integer.toString(i2)));
        }
    }

    @Override // g.d
    public final String e0(int i2, int i3, int i4, j jVar) {
        return jVar.a(this.f3982i0, i2, i3, i4);
    }

    @Override // g.d
    protected final void f0(int i2, char[] cArr, int i3, int i4) {
        this.f3982i0.getChars(i2, i4 + i2, cArr, i3);
    }

    @Override // g.d
    public final boolean g0(char[] cArr) {
        return U0(this.f3982i0, this.f3981y, cArr);
    }

    @Override // g.d
    public final char h0(int i2) {
        if (i2 >= this.f3983j0) {
            return (char) 26;
        }
        return this.f3982i0.charAt(i2);
    }

    @Override // g.d
    protected final void i0(int i2, int i3, char[] cArr) {
        this.f3982i0.getChars(i2, i3 + i2, cArr, 0);
    }

    @Override // g.d
    public final int l0(char c2, int i2) {
        return this.f3982i0.indexOf(c2, i2);
    }

    @Override // g.d
    public boolean m0() {
        int i2 = this.f3981y;
        int i3 = this.f3983j0;
        if (i2 != i3) {
            return this.f3980x == 26 && i2 + 1 >= i3;
        }
        return true;
    }

    @Override // g.d, g.InterfaceC0476c
    public final char next() {
        int i2 = this.f3981y + 1;
        this.f3981y = i2;
        char cCharAt = i2 >= this.f3983j0 ? (char) 26 : this.f3982i0.charAt(i2);
        this.f3980x = cCharAt;
        return cCharAt;
    }

    @Override // g.d, g.InterfaceC0476c
    public final BigDecimal t() {
        char cH0 = h0((this.f3969M + this.f3968L) - 1);
        int i2 = this.f3968L;
        if (cH0 == 'L' || cH0 == 'S' || cH0 == 'B' || cH0 == 'F' || cH0 == 'D') {
            i2--;
        }
        if (i2 > 65535) {
            throw new C0424d("decimal overflow");
        }
        int i3 = this.f3969M;
        char[] cArr = this.f3967I;
        if (i2 < cArr.length) {
            this.f3982i0.getChars(i3, i3 + i2, cArr, 0);
            return new BigDecimal(this.f3967I, 0, i2, MathContext.UNLIMITED);
        }
        char[] cArr2 = new char[i2];
        this.f3982i0.getChars(i3, i3 + i2, cArr2, 0);
        return new BigDecimal(cArr2, 0, i2, MathContext.UNLIMITED);
    }

    /* JADX WARN: Code restructure failed: missing block: B:32:0x007e, code lost:
    
        if (r13 != '.') goto L35;
     */
    /* JADX WARN: Code restructure failed: missing block: B:33:0x0080, code lost:
    
        r16.f3975c0 = -1;
     */
    /* JADX WARN: Code restructure failed: missing block: B:34:0x0082, code lost:
    
        return 0;
     */
    /* JADX WARN: Code restructure failed: missing block: B:35:0x0083, code lost:
    
        if (r7 == false) goto L40;
     */
    /* JADX WARN: Code restructure failed: missing block: B:36:0x0085, code lost:
    
        if (r13 == '\"') goto L39;
     */
    /* JADX WARN: Code restructure failed: missing block: B:37:0x0087, code lost:
    
        r16.f3975c0 = -1;
     */
    /* JADX WARN: Code restructure failed: missing block: B:38:0x0089, code lost:
    
        return 0;
     */
    /* JADX WARN: Code restructure failed: missing block: B:39:0x008a, code lost:
    
        r13 = h0(r12);
        r12 = r3 + 2;
     */
    /* JADX WARN: Code restructure failed: missing block: B:40:0x0091, code lost:
    
        if (r4 >= 0) goto L43;
     */
    /* JADX WARN: Code restructure failed: missing block: B:41:0x0093, code lost:
    
        r16.f3975c0 = -1;
     */
    /* JADX WARN: Code restructure failed: missing block: B:42:0x0095, code lost:
    
        return 0;
     */
    /* JADX WARN: Code restructure failed: missing block: B:44:0x0098, code lost:
    
        if (r13 != r17) goto L49;
     */
    /* JADX WARN: Code restructure failed: missing block: B:45:0x009a, code lost:
    
        r16.f3981y = r12;
        r16.f3980x = h0(r12);
        r16.f3975c0 = 3;
        r16.f3973b = 16;
     */
    /* JADX WARN: Code restructure failed: missing block: B:46:0x00a7, code lost:
    
        if (r6 == false) goto L93;
     */
    /* JADX WARN: Code restructure failed: missing block: B:48:0x00aa, code lost:
    
        return -r4;
     */
    /* JADX WARN: Code restructure failed: missing block: B:50:0x00af, code lost:
    
        if (g.d.n0(r13) == false) goto L87;
     */
    /* JADX WARN: Code restructure failed: missing block: B:51:0x00b1, code lost:
    
        r13 = h0(r12);
        r12 = r12 + 1;
     */
    /* JADX WARN: Code restructure failed: missing block: B:52:0x00b9, code lost:
    
        r16.f3975c0 = -1;
     */
    /* JADX WARN: Code restructure failed: missing block: B:53:0x00bb, code lost:
    
        if (r6 == false) goto L94;
     */
    /* JADX WARN: Code restructure failed: missing block: B:55:0x00be, code lost:
    
        return -r4;
     */
    /* JADX WARN: Code restructure failed: missing block: B:93:?, code lost:
    
        return r4;
     */
    /* JADX WARN: Code restructure failed: missing block: B:94:?, code lost:
    
        return r4;
     */
    @Override // g.InterfaceC0476c
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final int u(char r17) {
        /*
            Method dump skipped, instruction units count: 299
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: g.f.u(char):int");
    }

    @Override // g.InterfaceC0476c
    public byte[] w() {
        if (this.f3973b != 26) {
            return !this.f3970Q ? AbstractC0613e.c(this.f3982i0, this.f3969M + 1, this.f3968L) : AbstractC0613e.b(new String(this.f3967I, 0, this.f3968L));
        }
        int i2 = this.f3969M + 1;
        int i3 = this.f3968L;
        if (i3 % 2 != 0) {
            throw new C0424d("illegal state. " + i3);
        }
        int i4 = i3 / 2;
        byte[] bArr = new byte[i4];
        for (int i5 = 0; i5 < i4; i5++) {
            int i6 = (i5 * 2) + i2;
            char cCharAt = this.f3982i0.charAt(i6);
            char cCharAt2 = this.f3982i0.charAt(i6 + 1);
            char c2 = '7';
            int i7 = cCharAt - (cCharAt <= '9' ? '0' : '7');
            if (cCharAt2 <= '9') {
                c2 = '0';
            }
            bArr[i5] = (byte) ((i7 << 4) | (cCharAt2 - c2));
        }
        return bArr;
    }

    /* JADX WARN: Removed duplicated region for block: B:110:0x00f3 A[SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:81:0x0104  */
    @Override // g.d
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public boolean x0(char[] r12) {
        /*
            Method dump skipped, instruction units count: 385
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: g.f.x0(char[]):boolean");
    }

    @Override // g.d
    public Date y0(char[] cArr) {
        long j2;
        Date date;
        char cH0;
        char cH02;
        boolean z2 = false;
        this.f3975c0 = 0;
        int i2 = this.f3981y;
        char c2 = this.f3980x;
        if (!U0(this.f3982i0, i2, cArr)) {
            this.f3975c0 = -2;
            return null;
        }
        int length = this.f3981y + cArr.length;
        int i3 = length + 1;
        char cH03 = h0(length);
        if (cH03 == '\"') {
            int iL0 = l0('\"', i3);
            if (iL0 == -1) {
                throw new C0424d("unclosed str");
            }
            this.f3981y = i3;
            if (!Z0(false, iL0 - i3)) {
                this.f3981y = i2;
                this.f3975c0 = -1;
                return null;
            }
            date = this.f3971Z.getTime();
            cH0 = h0(iL0 + 1);
            this.f3981y = i2;
            while (cH0 != ',' && cH0 != '}') {
                if (!d.n0(cH0)) {
                    this.f3975c0 = -1;
                    return null;
                }
                int i4 = iL0 + 1;
                char cH04 = h0(iL0 + 2);
                iL0 = i4;
                cH0 = cH04;
            }
            this.f3981y = iL0 + 1;
            this.f3980x = cH0;
        } else {
            char c3 = '9';
            char c4 = '0';
            if (cH03 != '-' && (cH03 < '0' || cH03 > '9')) {
                this.f3975c0 = -1;
                return null;
            }
            if (cH03 == '-') {
                cH03 = h0(i3);
                i3 = length + 2;
                z2 = true;
            }
            if (cH03 < '0' || cH03 > '9') {
                j2 = 0;
            } else {
                long j3 = cH03 - '0';
                while (true) {
                    int i5 = i3 + 1;
                    cH02 = h0(i3);
                    if (cH02 < c4 || cH02 > c3) {
                        break;
                    }
                    j3 = (j3 * 10) + ((long) (cH02 - '0'));
                    i3 = i5;
                    c3 = '9';
                    c4 = '0';
                }
                if (cH02 == ',' || cH02 == '}') {
                    this.f3981y = i3;
                }
                long j4 = j3;
                cH03 = cH02;
                j2 = j4;
            }
            if (j2 < 0) {
                this.f3975c0 = -1;
                return null;
            }
            if (z2) {
                j2 = -j2;
            }
            date = new Date(j2);
            cH0 = cH03;
        }
        if (cH0 == ',') {
            int i6 = this.f3981y + 1;
            this.f3981y = i6;
            this.f3980x = h0(i6);
            this.f3975c0 = 3;
            this.f3973b = 16;
            return date;
        }
        int i7 = this.f3981y + 1;
        this.f3981y = i7;
        char cH05 = h0(i7);
        if (cH05 == ',') {
            this.f3973b = 16;
            int i8 = this.f3981y + 1;
            this.f3981y = i8;
            this.f3980x = h0(i8);
        } else if (cH05 == ']') {
            this.f3973b = 15;
            int i9 = this.f3981y + 1;
            this.f3981y = i9;
            this.f3980x = h0(i9);
        } else if (cH05 == '}') {
            this.f3973b = 13;
            int i10 = this.f3981y + 1;
            this.f3981y = i10;
            this.f3980x = h0(i10);
        } else {
            if (cH05 != 26) {
                this.f3981y = i2;
                this.f3980x = c2;
                this.f3975c0 = -1;
                return null;
            }
            this.f3973b = 20;
        }
        this.f3975c0 = 4;
        return date;
    }

    public f(String str, int i2) {
        super(i2);
        this.f3982i0 = str;
        this.f3983j0 = str.length();
        this.f3981y = -1;
        next();
        if (this.f3980x == 65279) {
            next();
        }
    }
}
