package g;

import com.jsyn.unitgen.u;
import d.AbstractC0421a;
import d.C0424d;
import java.io.Closeable;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.MathContext;
import java.util.Calendar;
import java.util.Date;
import java.util.Locale;
import java.util.TimeZone;
import l.AbstractC0613e;
import okhttp3.HttpUrl;

/* JADX INFO: loaded from: classes.dex */
public abstract class d implements InterfaceC0476c, Closeable {

    /* JADX INFO: renamed from: f0, reason: collision with root package name */
    private static final ThreadLocal f3963f0 = new ThreadLocal();

    /* JADX INFO: renamed from: g0, reason: collision with root package name */
    protected static final char[] f3964g0 = ("\"" + AbstractC0421a.f3675r + "\":\"").toCharArray();

    /* JADX INFO: renamed from: h0, reason: collision with root package name */
    protected static final int[] f3965h0 = new int[103];

    /* JADX INFO: renamed from: H, reason: collision with root package name */
    protected int f3966H;

    /* JADX INFO: renamed from: I, reason: collision with root package name */
    protected char[] f3967I;

    /* JADX INFO: renamed from: L, reason: collision with root package name */
    protected int f3968L;

    /* JADX INFO: renamed from: M, reason: collision with root package name */
    protected int f3969M;

    /* JADX INFO: renamed from: Q, reason: collision with root package name */
    protected boolean f3970Q;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    protected int f3973b;

    /* JADX INFO: renamed from: d0, reason: collision with root package name */
    protected String f3976d0;

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

    /* JADX INFO: renamed from: r, reason: collision with root package name */
    protected int f3979r;

    /* JADX INFO: renamed from: x, reason: collision with root package name */
    protected char f3980x;

    /* JADX INFO: renamed from: y, reason: collision with root package name */
    protected int f3981y;

    /* JADX INFO: renamed from: Z, reason: collision with root package name */
    protected Calendar f3971Z = null;

    /* JADX INFO: renamed from: a0, reason: collision with root package name */
    protected TimeZone f3972a0 = AbstractC0421a.f3673b;

    /* JADX INFO: renamed from: b0, reason: collision with root package name */
    protected Locale f3974b0 = AbstractC0421a.f3674g;

    /* JADX INFO: renamed from: c0, reason: collision with root package name */
    public int f3975c0 = 0;

    /* JADX INFO: renamed from: e0, reason: collision with root package name */
    protected int f3977e0 = 0;

    static {
        for (int i2 = 48; i2 <= 57; i2++) {
            f3965h0[i2] = i2 - 48;
        }
        for (int i3 = 97; i3 <= 102; i3++) {
            f3965h0[i3] = i3 - 87;
        }
        for (int i4 = 65; i4 <= 70; i4++) {
            f3965h0[i4] = i4 - 55;
        }
    }

    public d(int i2) {
        this.f3976d0 = null;
        this.f3979r = i2;
        if ((i2 & EnumC0475b.InitStringFieldAsEmpty.mask) != 0) {
            this.f3976d0 = HttpUrl.FRAGMENT_ENCODE_SET;
        }
        char[] cArr = (char[]) f3963f0.get();
        this.f3967I = cArr;
        if (cArr == null) {
            this.f3967I = new char[512];
        }
    }

    private void M0() {
        char next;
        char next2;
        this.f3969M = this.f3981y;
        this.f3970Q = false;
        while (true) {
            char next3 = next();
            if (next3 == '\'') {
                this.f3973b = 4;
                next();
                return;
            }
            if (next3 == 26) {
                if (m0()) {
                    throw new C0424d("unclosed single-quote string");
                }
                s0((char) 26);
            } else if (next3 == '\\') {
                if (!this.f3970Q) {
                    this.f3970Q = true;
                    int i2 = this.f3968L;
                    char[] cArr = this.f3967I;
                    if (i2 > cArr.length) {
                        char[] cArr2 = new char[i2 * 2];
                        System.arraycopy(cArr, 0, cArr2, 0, cArr.length);
                        this.f3967I = cArr2;
                    }
                    i0(this.f3969M + 1, this.f3968L, this.f3967I);
                }
                char next4 = next();
                if (next4 == '\"') {
                    s0('\"');
                } else if (next4 != '\'') {
                    if (next4 != 'F') {
                        if (next4 == '\\') {
                            s0('\\');
                        } else if (next4 == 'b') {
                            s0('\b');
                        } else if (next4 != 'f') {
                            if (next4 == 'n') {
                                s0('\n');
                            } else if (next4 == 'r') {
                                s0('\r');
                            } else if (next4 != 'x') {
                                switch (next4) {
                                    case '/':
                                        s0('/');
                                        break;
                                    case '0':
                                        s0((char) 0);
                                        break;
                                    case '1':
                                        s0((char) 1);
                                        break;
                                    case '2':
                                        s0((char) 2);
                                        break;
                                    case '3':
                                        s0((char) 3);
                                        break;
                                    case '4':
                                        s0((char) 4);
                                        break;
                                    case '5':
                                        s0((char) 5);
                                        break;
                                    case '6':
                                        s0((char) 6);
                                        break;
                                    case '7':
                                        s0((char) 7);
                                        break;
                                    default:
                                        switch (next4) {
                                            case 't':
                                                s0('\t');
                                                break;
                                            case 'u':
                                                s0((char) Integer.parseInt(new String(new char[]{next(), next(), next(), next()}), 16));
                                                break;
                                            case 'v':
                                                s0((char) 11);
                                                break;
                                            default:
                                                this.f3980x = next4;
                                                throw new C0424d("unclosed single-quote string");
                                        }
                                        break;
                                }
                            } else {
                                next = next();
                                next2 = next();
                                boolean z2 = (next >= '0' && next <= '9') || (next >= 'a' && next <= 'f') || (next >= 'A' && next <= 'F');
                                boolean z3 = (next2 >= '0' && next2 <= '9') || (next2 >= 'a' && next2 <= 'f') || (next2 >= 'A' && next2 <= 'F');
                                if (z2 && z3) {
                                    int[] iArr = f3965h0;
                                    s0((char) ((iArr[next] * 16) + iArr[next2]));
                                }
                            }
                        }
                    }
                    s0('\f');
                } else {
                    s0('\'');
                }
            } else if (this.f3970Q) {
                int i3 = this.f3968L;
                char[] cArr3 = this.f3967I;
                if (i3 == cArr3.length) {
                    s0(next3);
                } else {
                    this.f3968L = i3 + 1;
                    cArr3[i3] = next3;
                }
            } else {
                this.f3968L++;
            }
        }
        throw new C0424d("invalid escape character \\x" + next + next2);
    }

    public static boolean n0(char c2) {
        return c2 <= ' ' && (c2 == ' ' || c2 == '\n' || c2 == '\r' || c2 == '\t' || c2 == '\f' || c2 == '\b');
    }

    /* JADX WARN: Removed duplicated region for block: B:47:0x00f2  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public static java.lang.String t0(char[] r17, int r18) {
        /*
            Method dump skipped, instruction units count: 320
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: g.d.t0(char[], int):java.lang.String");
    }

    @Override // g.InterfaceC0476c
    public abstract String A();

    public final double A0(char[] cArr) {
        int i2;
        char cH0;
        long j2;
        int length;
        int i3;
        double d2;
        this.f3975c0 = 0;
        if (!g0(cArr)) {
            this.f3975c0 = -2;
            return u.FALSE;
        }
        int length2 = cArr.length;
        int i4 = length2 + 1;
        char cH02 = h0(this.f3981y + length2);
        boolean z2 = cH02 == '\"';
        if (z2) {
            cH02 = h0(this.f3981y + i4);
            i4 = length2 + 2;
        }
        boolean z3 = cH02 == '-';
        if (z3) {
            cH02 = h0(this.f3981y + i4);
            i4++;
        }
        if (cH02 < '0' || cH02 > '9') {
            if (cH02 != 'n' || h0(this.f3981y + i4) != 'u' || h0(this.f3981y + i4 + 1) != 'l' || h0(this.f3981y + i4 + 2) != 'l') {
                this.f3975c0 = -1;
                return u.FALSE;
            }
            this.f3975c0 = 5;
            int i5 = i4 + 4;
            char cH03 = h0(this.f3981y + i4 + 3);
            if (z2 && cH03 == '\"') {
                cH03 = h0(this.f3981y + i5);
                i5 = i4 + 5;
            }
            while (cH03 != ',') {
                if (cH03 == '}') {
                    int i6 = this.f3981y + i5;
                    this.f3981y = i6;
                    this.f3980x = h0(i6);
                    this.f3975c0 = 5;
                    this.f3973b = 13;
                    return u.FALSE;
                }
                if (!n0(cH03)) {
                    this.f3975c0 = -1;
                    return u.FALSE;
                }
                cH03 = h0(this.f3981y + i5);
                i5++;
            }
            int i7 = this.f3981y + i5;
            this.f3981y = i7;
            this.f3980x = h0(i7);
            this.f3975c0 = 5;
            this.f3973b = 16;
            return u.FALSE;
        }
        long j3 = cH02 - '0';
        while (true) {
            i2 = i4 + 1;
            cH0 = h0(this.f3981y + i4);
            if (cH0 < '0' || cH0 > '9') {
                break;
            }
            j3 = (j3 * 10) + ((long) (cH0 - '0'));
            i4 = i2;
        }
        if (cH0 == '.') {
            int i8 = i4 + 2;
            char cH04 = h0(this.f3981y + i2);
            if (cH04 < '0' || cH04 > '9') {
                this.f3975c0 = -1;
                return u.FALSE;
            }
            j3 = (j3 * 10) + ((long) (cH04 - '0'));
            j2 = 10;
            while (true) {
                i2 = i8 + 1;
                cH0 = h0(this.f3981y + i8);
                if (cH0 < '0' || cH0 > '9') {
                    break;
                }
                j3 = (j3 * 10) + ((long) (cH0 - '0'));
                j2 *= 10;
                i8 = i2;
            }
        } else {
            j2 = 1;
        }
        boolean z4 = cH0 == 'e' || cH0 == 'E';
        if (z4) {
            int i9 = i2 + 1;
            cH0 = h0(this.f3981y + i2);
            if (cH0 == '+' || cH0 == '-') {
                i2 += 2;
                cH0 = h0(this.f3981y + i9);
            } else {
                i2 = i9;
            }
            while (cH0 >= '0' && cH0 <= '9') {
                cH0 = h0(this.f3981y + i2);
                i2++;
            }
        }
        if (!z2) {
            int i10 = this.f3981y;
            length = cArr.length + i10;
            i3 = ((i10 + i2) - length) - 1;
        } else {
            if (cH0 != '\"') {
                this.f3975c0 = -1;
                return u.FALSE;
            }
            int i11 = i2 + 1;
            cH0 = h0(this.f3981y + i2);
            int i12 = this.f3981y;
            length = cArr.length + i12 + 1;
            i3 = ((i12 + i11) - length) - 2;
            i2 = i11;
        }
        if (z4 || i3 >= 17) {
            d2 = Double.parseDouble(S0(length, i3));
        } else {
            d2 = j3 / j2;
            if (z3) {
                d2 = -d2;
            }
        }
        if (cH0 == ',') {
            int i13 = this.f3981y + i2;
            this.f3981y = i13;
            this.f3980x = h0(i13);
            this.f3975c0 = 3;
            this.f3973b = 16;
            return d2;
        }
        if (cH0 != '}') {
            this.f3975c0 = -1;
            return u.FALSE;
        }
        int i14 = i2 + 1;
        char cH05 = h0(this.f3981y + i2);
        if (cH05 == ',') {
            this.f3973b = 16;
            int i15 = this.f3981y + i14;
            this.f3981y = i15;
            this.f3980x = h0(i15);
        } else if (cH05 == ']') {
            this.f3973b = 15;
            int i16 = this.f3981y + i14;
            this.f3981y = i16;
            this.f3980x = h0(i16);
        } else if (cH05 == '}') {
            this.f3973b = 13;
            int i17 = this.f3981y + i14;
            this.f3981y = i17;
            this.f3980x = h0(i17);
        } else {
            if (cH05 != 26) {
                this.f3975c0 = -1;
                return u.FALSE;
            }
            this.f3973b = 20;
            this.f3981y += i2;
            this.f3980x = (char) 26;
        }
        this.f3975c0 = 4;
        return d2;
    }

    public final float B0(char[] cArr) {
        int i2;
        char cH0;
        long j2;
        int length;
        int i3;
        float f2;
        this.f3975c0 = 0;
        if (!g0(cArr)) {
            this.f3975c0 = -2;
            return 0.0f;
        }
        int length2 = cArr.length;
        int i4 = length2 + 1;
        char cH02 = h0(this.f3981y + length2);
        boolean z2 = cH02 == '\"';
        if (z2) {
            cH02 = h0(this.f3981y + i4);
            i4 = length2 + 2;
        }
        boolean z3 = cH02 == '-';
        if (z3) {
            cH02 = h0(this.f3981y + i4);
            i4++;
        }
        if (cH02 < '0' || cH02 > '9') {
            if (cH02 != 'n' || h0(this.f3981y + i4) != 'u' || h0(this.f3981y + i4 + 1) != 'l' || h0(this.f3981y + i4 + 2) != 'l') {
                this.f3975c0 = -1;
                return 0.0f;
            }
            this.f3975c0 = 5;
            int i5 = i4 + 4;
            char cH03 = h0(this.f3981y + i4 + 3);
            if (z2 && cH03 == '\"') {
                cH03 = h0(this.f3981y + i5);
                i5 = i4 + 5;
            }
            while (cH03 != ',') {
                if (cH03 == '}') {
                    int i6 = this.f3981y + i5;
                    this.f3981y = i6;
                    this.f3980x = h0(i6);
                    this.f3975c0 = 5;
                    this.f3973b = 13;
                    return 0.0f;
                }
                if (!n0(cH03)) {
                    this.f3975c0 = -1;
                    return 0.0f;
                }
                cH03 = h0(this.f3981y + i5);
                i5++;
            }
            int i7 = this.f3981y + i5;
            this.f3981y = i7;
            this.f3980x = h0(i7);
            this.f3975c0 = 5;
            this.f3973b = 16;
            return 0.0f;
        }
        long j3 = cH02 - '0';
        while (true) {
            i2 = i4 + 1;
            cH0 = h0(this.f3981y + i4);
            if (cH0 < '0' || cH0 > '9') {
                break;
            }
            j3 = (j3 * 10) + ((long) (cH0 - '0'));
            i4 = i2;
        }
        if (cH0 == '.') {
            int i8 = i4 + 2;
            char cH04 = h0(this.f3981y + i2);
            if (cH04 < '0' || cH04 > '9') {
                this.f3975c0 = -1;
                return 0.0f;
            }
            j3 = (j3 * 10) + ((long) (cH04 - '0'));
            j2 = 10;
            while (true) {
                i2 = i8 + 1;
                cH0 = h0(this.f3981y + i8);
                if (cH0 < '0' || cH0 > '9') {
                    break;
                }
                j3 = (j3 * 10) + ((long) (cH0 - '0'));
                j2 *= 10;
                i8 = i2;
            }
        } else {
            j2 = 1;
        }
        boolean z4 = cH0 == 'e' || cH0 == 'E';
        if (z4) {
            int i9 = i2 + 1;
            cH0 = h0(this.f3981y + i2);
            if (cH0 == '+' || cH0 == '-') {
                i2 += 2;
                cH0 = h0(this.f3981y + i9);
            } else {
                i2 = i9;
            }
            while (cH0 >= '0' && cH0 <= '9') {
                char cH05 = h0(this.f3981y + i2);
                i2++;
                cH0 = cH05;
            }
        }
        if (!z2) {
            int i10 = this.f3981y;
            length = cArr.length + i10;
            i3 = ((i10 + i2) - length) - 1;
        } else {
            if (cH0 != '\"') {
                this.f3975c0 = -1;
                return 0.0f;
            }
            int i11 = i2 + 1;
            cH0 = h0(this.f3981y + i2);
            int i12 = this.f3981y;
            length = cArr.length + i12 + 1;
            i3 = ((i12 + i11) - length) - 2;
            i2 = i11;
        }
        if (z4 || i3 >= 17) {
            f2 = Float.parseFloat(S0(length, i3));
        } else {
            f2 = (float) (j3 / j2);
            if (z3) {
                f2 = -f2;
            }
        }
        if (cH0 == ',') {
            int i13 = this.f3981y + i2;
            this.f3981y = i13;
            this.f3980x = h0(i13);
            this.f3975c0 = 3;
            this.f3973b = 16;
            return f2;
        }
        if (cH0 != '}') {
            this.f3975c0 = -1;
            return 0.0f;
        }
        int i14 = i2 + 1;
        char cH06 = h0(this.f3981y + i2);
        if (cH06 == ',') {
            this.f3973b = 16;
            int i15 = this.f3981y + i14;
            this.f3981y = i15;
            this.f3980x = h0(i15);
        } else if (cH06 == ']') {
            this.f3973b = 15;
            int i16 = this.f3981y + i14;
            this.f3981y = i16;
            this.f3980x = h0(i16);
        } else if (cH06 == '}') {
            this.f3973b = 13;
            int i17 = this.f3981y + i14;
            this.f3981y = i17;
            this.f3980x = h0(i17);
        } else {
            if (cH06 != 26) {
                this.f3975c0 = -1;
                return 0.0f;
            }
            this.f3981y += i2;
            this.f3973b = 20;
            this.f3980x = (char) 26;
        }
        this.f3975c0 = 4;
        return f2;
    }

    @Override // g.InterfaceC0476c
    public final Number C() {
        char c2;
        long j2;
        long j3;
        boolean z2 = false;
        if (this.f3969M == -1) {
            this.f3969M = 0;
        }
        int i2 = this.f3969M;
        int i3 = this.f3968L + i2;
        char cH0 = h0(i3 - 1);
        if (cH0 == 'B') {
            i3--;
            c2 = 'B';
        } else if (cH0 == 'L') {
            i3--;
            c2 = 'L';
        } else if (cH0 != 'S') {
            c2 = ' ';
        } else {
            i3--;
            c2 = 'S';
        }
        if (h0(this.f3969M) == '-') {
            i2++;
            j2 = Long.MIN_VALUE;
            z2 = true;
        } else {
            j2 = -9223372036854775807L;
        }
        if (i2 < i3) {
            j3 = -(h0(i2) - '0');
            i2++;
        } else {
            j3 = 0;
        }
        while (i2 < i3) {
            int i4 = i2 + 1;
            int iH0 = h0(i2) - '0';
            if (j3 < -922337203685477580L) {
                return new BigInteger(a0(), 10);
            }
            long j4 = j3 * 10;
            long j5 = iH0;
            if (j4 < j2 + j5) {
                return new BigInteger(a0(), 10);
            }
            j3 = j4 - j5;
            i2 = i4;
        }
        if (!z2) {
            long j6 = -j3;
            return (j6 > 2147483647L || c2 == 'L') ? Long.valueOf(j6) : c2 == 'S' ? Short.valueOf((short) j6) : c2 == 'B' ? Byte.valueOf((byte) j6) : Integer.valueOf((int) j6);
        }
        if (i2 > this.f3969M + 1) {
            return (j3 < -2147483648L || c2 == 'L') ? Long.valueOf(j3) : c2 == 'S' ? Short.valueOf((short) j3) : c2 == 'B' ? Byte.valueOf((byte) j3) : Integer.valueOf((int) j3);
        }
        throw new NumberFormatException(a0());
    }

    /* JADX WARN: Code restructure failed: missing block: B:36:0x009d, code lost:
    
        r19.f3975c0 = -1;
     */
    /* JADX WARN: Code restructure failed: missing block: B:37:0x009f, code lost:
    
        return r4;
     */
    /* JADX WARN: Code restructure failed: missing block: B:97:0x01b6, code lost:
    
        r1 = r4;
        r19.f3975c0 = -1;
     */
    /* JADX WARN: Code restructure failed: missing block: B:98:0x01b9, code lost:
    
        return r1;
     */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final float[] C0(char[] r20) {
        /*
            Method dump skipped, instruction units count: 442
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: g.d.C0(char[]):float[]");
    }

    @Override // g.InterfaceC0476c
    public float D() {
        char cCharAt;
        String strA0 = a0();
        float f2 = Float.parseFloat(strA0);
        if ((f2 != 0.0f && f2 != Float.POSITIVE_INFINITY) || (cCharAt = strA0.charAt(0)) <= '0' || cCharAt > '9') {
            return f2;
        }
        throw new C0424d("float overflow : " + strA0);
    }

    /* JADX WARN: Code restructure failed: missing block: B:40:0x00b2, code lost:
    
        r21.f3975c0 = -1;
     */
    /* JADX WARN: Code restructure failed: missing block: B:41:0x00b4, code lost:
    
        return r4;
     */
    /* JADX WARN: Code restructure failed: missing block: B:75:0x0135, code lost:
    
        r4 = r18 + 1;
        r1 = h0(r21.f3981y + r18);
     */
    /* JADX WARN: Code restructure failed: missing block: B:76:0x0140, code lost:
    
        if (r2 == r3.length) goto L78;
     */
    /* JADX WARN: Code restructure failed: missing block: B:77:0x0142, code lost:
    
        r5 = new float[r2];
        r7 = 0;
        java.lang.System.arraycopy(r3, 0, r5, 0, r2);
        r3 = r5;
     */
    /* JADX WARN: Code restructure failed: missing block: B:78:0x014a, code lost:
    
        r7 = 0;
     */
    /* JADX WARN: Code restructure failed: missing block: B:80:0x014c, code lost:
    
        if (r8 < r6.length) goto L82;
     */
    /* JADX WARN: Code restructure failed: missing block: B:81:0x014e, code lost:
    
        r5 = new float[(r6.length * 3) / 2][];
        java.lang.System.arraycopy(r3, r7, r5, r7, r2);
        r6 = r5;
     */
    /* JADX WARN: Code restructure failed: missing block: B:82:0x0159, code lost:
    
        r5 = r8 + 1;
        r6[r8] = r3;
     */
    /* JADX WARN: Code restructure failed: missing block: B:83:0x015f, code lost:
    
        if (r1 != ',') goto L85;
     */
    /* JADX WARN: Code restructure failed: missing block: B:84:0x0161, code lost:
    
        r3 = h0(r21.f3981y + r4);
        r2 = r18 + 2;
     */
    /* JADX WARN: Code restructure failed: missing block: B:86:0x0170, code lost:
    
        if (r1 != ']') goto L88;
     */
    /* JADX WARN: Code restructure failed: missing block: B:87:0x0172, code lost:
    
        r2 = r18 + 2;
        r3 = h0(r21.f3981y + r4);
        r8 = r5;
     */
    /* JADX WARN: Code restructure failed: missing block: B:88:0x017d, code lost:
    
        r3 = r1;
        r2 = r4;
     */
    /* JADX WARN: Code restructure failed: missing block: B:92:0x0193, code lost:
    
        r21.f3975c0 = -1;
     */
    /* JADX WARN: Code restructure failed: missing block: B:93:0x0196, code lost:
    
        return null;
     */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final float[][] D0(char[] r22) {
        /*
            Method dump skipped, instruction units count: 526
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: g.d.D0(char[]):float[][]");
    }

    public abstract int E0(char[] cArr);

    @Override // g.InterfaceC0476c
    public final int F() {
        return this.f3973b;
    }

    /* JADX WARN: Code restructure failed: missing block: B:64:0x011c, code lost:
    
        r2 = r4;
        r18.f3975c0 = -1;
     */
    /* JADX WARN: Code restructure failed: missing block: B:65:0x011f, code lost:
    
        return r2;
     */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final int[] F0(char[] r19) {
        /*
            Method dump skipped, instruction units count: 288
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: g.d.F0(char[]):int[]");
    }

    @Override // g.InterfaceC0476c
    public Enum G(Class cls, j jVar, char c2) {
        String strN0 = N0(jVar, c2);
        if (strN0 == null) {
            return null;
        }
        return Enum.valueOf(cls, strN0);
    }

    public abstract long G0(char[] cArr);

    @Override // g.InterfaceC0476c
    public String H(char c2) {
        this.f3975c0 = 0;
        char cH0 = h0(this.f3981y);
        if (cH0 == 'n') {
            if (h0(this.f3981y + 1) != 'u' || h0(this.f3981y + 2) != 'l' || h0(this.f3981y + 3) != 'l') {
                this.f3975c0 = -1;
                return null;
            }
            if (h0(this.f3981y + 4) != c2) {
                this.f3975c0 = -1;
                return null;
            }
            int i2 = this.f3981y + 5;
            this.f3981y = i2;
            this.f3980x = h0(i2);
            this.f3975c0 = 3;
            return null;
        }
        int i3 = 1;
        while (cH0 != '\"') {
            if (!n0(cH0)) {
                this.f3975c0 = -1;
                return R0();
            }
            cH0 = h0(this.f3981y + i3);
            i3++;
        }
        int i4 = this.f3981y + i3;
        int iL0 = l0('\"', i4);
        if (iL0 == -1) {
            throw new C0424d("unclosed str");
        }
        String strS0 = S0(this.f3981y + i3, iL0 - i4);
        if (strS0.indexOf(92) != -1) {
            while (true) {
                int i5 = 0;
                for (int i6 = iL0 - 1; i6 >= 0 && h0(i6) == '\\'; i6--) {
                    i5++;
                }
                if (i5 % 2 == 0) {
                    break;
                }
                iL0 = l0('\"', iL0 + 1);
            }
            int i7 = iL0 - i4;
            strS0 = t0(T0(this.f3981y + 1, i7), i7);
        }
        int i8 = i3 + (iL0 - i4) + 1;
        int i9 = i8 + 1;
        char cH02 = h0(this.f3981y + i8);
        while (cH02 != c2) {
            if (!n0(cH02)) {
                if (cH02 == ']') {
                    int i10 = this.f3981y + i9;
                    this.f3981y = i10;
                    this.f3980x = h0(i10);
                    this.f3975c0 = -1;
                }
                return strS0;
            }
            cH02 = h0(this.f3981y + i9);
            i9++;
        }
        int i11 = this.f3981y + i9;
        this.f3981y = i11;
        this.f3980x = h0(i11);
        this.f3975c0 = 3;
        this.f3973b = 16;
        return strS0;
    }

    public abstract String H0(char[] cArr);

    @Override // g.InterfaceC0476c
    public int I() {
        return this.f3979r;
    }

    public final void I0() {
        char next;
        if (this.f3980x != 'x') {
            throw new C0424d("illegal state. " + this.f3980x);
        }
        next();
        if (this.f3980x != '\'') {
            throw new C0424d("illegal state. " + this.f3980x);
        }
        this.f3969M = this.f3981y;
        next();
        if (this.f3980x == '\'') {
            next();
            this.f3973b = 26;
            return;
        }
        while (true) {
            next = next();
            if ((next < '0' || next > '9') && (next < 'A' || next > 'F')) {
                break;
            } else {
                this.f3968L++;
            }
        }
        if (next == '\'') {
            this.f3968L++;
            next();
            this.f3973b = 26;
        } else {
            throw new C0424d("illegal state. " + next);
        }
    }

    public final void J0() {
        this.f3969M = this.f3981y - 1;
        this.f3970Q = false;
        do {
            this.f3968L++;
            next();
        } while (Character.isLetterOrDigit(this.f3980x));
        String strA = A();
        if ("null".equalsIgnoreCase(strA)) {
            this.f3973b = 8;
            return;
        }
        if ("new".equals(strA)) {
            this.f3973b = 9;
            return;
        }
        if ("true".equals(strA)) {
            this.f3973b = 6;
            return;
        }
        if ("false".equals(strA)) {
            this.f3973b = 7;
            return;
        }
        if ("undefined".equals(strA)) {
            this.f3973b = 23;
            return;
        }
        if ("Set".equals(strA)) {
            this.f3973b = 21;
        } else if ("TreeSet".equals(strA)) {
            this.f3973b = 22;
        } else {
            this.f3973b = 18;
        }
    }

    public final void K0() {
        L0(true);
    }

    @Override // g.InterfaceC0476c
    public final char L() {
        return this.f3980x;
    }

    public final void L0(boolean z2) {
        if (this.f3980x != 'n') {
            throw new C0424d("error parse null or new");
        }
        next();
        char c2 = this.f3980x;
        if (c2 != 'u') {
            if (c2 != 'e') {
                throw new C0424d("error parse new");
            }
            next();
            if (this.f3980x != 'w') {
                throw new C0424d("error parse new");
            }
            next();
            char c3 = this.f3980x;
            if (c3 != ' ' && c3 != ',' && c3 != '}' && c3 != ']' && c3 != '\n' && c3 != '\r' && c3 != '\t' && c3 != 26 && c3 != '\f' && c3 != '\b') {
                throw new C0424d("scan new error");
            }
            this.f3973b = 9;
            return;
        }
        next();
        if (this.f3980x != 'l') {
            throw new C0424d("error parse null");
        }
        next();
        if (this.f3980x != 'l') {
            throw new C0424d("error parse null");
        }
        next();
        char c4 = this.f3980x;
        if (c4 != ' ' && c4 != ',' && c4 != '}' && c4 != ']' && c4 != '\n' && c4 != '\r' && c4 != '\t' && c4 != 26 && ((c4 != ':' || !z2) && c4 != '\f' && c4 != '\b')) {
            throw new C0424d("scan null error");
        }
        this.f3973b = 8;
    }

    /* JADX WARN: Removed duplicated region for block: B:43:0x0097 A[ADDED_TO_REGION] */
    /* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:44:0x0099 -> B:40:0x0089). Please report as a decompilation issue!!! */
    @Override // g.InterfaceC0476c
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public java.math.BigDecimal N(char r18) {
        /*
            Method dump skipped, instruction units count: 465
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: g.d.N(char):java.math.BigDecimal");
    }

    public String N0(j jVar, char c2) {
        int i2 = 0;
        this.f3975c0 = 0;
        char cH0 = h0(this.f3981y);
        if (cH0 == 'n') {
            if (h0(this.f3981y + 1) != 'u' || h0(this.f3981y + 2) != 'l' || h0(this.f3981y + 3) != 'l') {
                this.f3975c0 = -1;
                return null;
            }
            if (h0(this.f3981y + 4) != c2) {
                this.f3975c0 = -1;
                return null;
            }
            int i3 = this.f3981y + 5;
            this.f3981y = i3;
            this.f3980x = h0(i3);
            this.f3975c0 = 3;
            return null;
        }
        if (cH0 != '\"') {
            this.f3975c0 = -1;
            return null;
        }
        int i4 = 1;
        while (true) {
            int i5 = i4 + 1;
            char cH02 = h0(this.f3981y + i4);
            if (cH02 == '\"') {
                int i6 = this.f3981y;
                int i7 = i6 + 1;
                String strE0 = e0(i7, ((i6 + i5) - i7) - 1, i2, jVar);
                int i8 = i4 + 2;
                char cH03 = h0(this.f3981y + i5);
                while (cH03 != c2) {
                    if (!n0(cH03)) {
                        this.f3975c0 = -1;
                        return strE0;
                    }
                    cH03 = h0(this.f3981y + i8);
                    i8++;
                }
                int i9 = this.f3981y + i8;
                this.f3981y = i9;
                this.f3980x = h0(i9);
                this.f3975c0 = 3;
                return strE0;
            }
            i2 = (i2 * 31) + cH02;
            if (cH02 == '\\') {
                this.f3975c0 = -1;
                return null;
            }
            i4 = i5;
        }
    }

    @Override // g.InterfaceC0476c
    public final void O() {
        while (true) {
            char c2 = this.f3980x;
            if (c2 > '/') {
                return;
            }
            if (c2 == ' ' || c2 == '\r' || c2 == '\n' || c2 == '\t' || c2 == '\f' || c2 == '\b') {
                next();
            } else if (c2 != '/') {
                return;
            } else {
                Q0();
            }
        }
    }

    public final void O0() {
        if (this.f3980x != 't') {
            throw new C0424d("error parse true");
        }
        next();
        if (this.f3980x != 'r') {
            throw new C0424d("error parse true");
        }
        next();
        if (this.f3980x != 'u') {
            throw new C0424d("error parse true");
        }
        next();
        if (this.f3980x != 'e') {
            throw new C0424d("error parse true");
        }
        next();
        char c2 = this.f3980x;
        if (c2 != ' ' && c2 != ',' && c2 != '}' && c2 != ']' && c2 != '\n' && c2 != '\r' && c2 != '\t' && c2 != 26 && c2 != '\f' && c2 != '\b' && c2 != ':' && c2 != '/') {
            throw new C0424d("scan true error");
        }
        this.f3973b = 6;
    }

    @Override // g.InterfaceC0476c
    public final void P() {
        this.f3968L = 0;
    }

    public void P0(TimeZone timeZone) {
        this.f3972a0 = timeZone;
    }

    @Override // g.InterfaceC0476c
    public final String Q(j jVar, char c2) {
        String strC;
        this.f3969M = this.f3981y;
        this.f3968L = 0;
        boolean z2 = false;
        int i2 = 0;
        while (true) {
            char next = next();
            if (next == c2) {
                this.f3973b = 4;
                if (z2) {
                    strC = jVar.c(this.f3967I, 0, this.f3968L, i2);
                } else {
                    int i3 = this.f3969M;
                    strC = e0(i3 == -1 ? 0 : i3 + 1, this.f3968L, i2, jVar);
                }
                this.f3968L = 0;
                next();
                return strC;
            }
            if (next == 26) {
                throw new C0424d("unclosed.str");
            }
            if (next == '\\') {
                if (!z2) {
                    int i4 = this.f3968L;
                    char[] cArr = this.f3967I;
                    if (i4 >= cArr.length) {
                        int length = cArr.length * 2;
                        if (i4 <= length) {
                            i4 = length;
                        }
                        char[] cArr2 = new char[i4];
                        System.arraycopy(cArr, 0, cArr2, 0, cArr.length);
                        this.f3967I = cArr2;
                    }
                    f0(this.f3969M + 1, this.f3967I, 0, this.f3968L);
                    z2 = true;
                }
                char next2 = next();
                if (next2 == '\"') {
                    i2 = (i2 * 31) + 34;
                    s0('\"');
                } else if (next2 != '\'') {
                    if (next2 != 'F') {
                        if (next2 == '\\') {
                            i2 = (i2 * 31) + 92;
                            s0('\\');
                        } else if (next2 == 'b') {
                            i2 = (i2 * 31) + 8;
                            s0('\b');
                        } else if (next2 != 'f') {
                            if (next2 == 'n') {
                                i2 = (i2 * 31) + 10;
                                s0('\n');
                            } else if (next2 == 'r') {
                                i2 = (i2 * 31) + 13;
                                s0('\r');
                            } else if (next2 != 'x') {
                                switch (next2) {
                                    case '/':
                                        i2 = (i2 * 31) + 47;
                                        s0('/');
                                        break;
                                    case '0':
                                        i2 = (i2 * 31) + next2;
                                        s0((char) 0);
                                        break;
                                    case '1':
                                        i2 = (i2 * 31) + next2;
                                        s0((char) 1);
                                        break;
                                    case '2':
                                        i2 = (i2 * 31) + next2;
                                        s0((char) 2);
                                        break;
                                    case '3':
                                        i2 = (i2 * 31) + next2;
                                        s0((char) 3);
                                        break;
                                    case '4':
                                        i2 = (i2 * 31) + next2;
                                        s0((char) 4);
                                        break;
                                    case '5':
                                        i2 = (i2 * 31) + next2;
                                        s0((char) 5);
                                        break;
                                    case '6':
                                        i2 = (i2 * 31) + next2;
                                        s0((char) 6);
                                        break;
                                    case '7':
                                        i2 = (i2 * 31) + next2;
                                        s0((char) 7);
                                        break;
                                    default:
                                        switch (next2) {
                                            case 't':
                                                i2 = (i2 * 31) + 9;
                                                s0('\t');
                                                break;
                                            case 'u':
                                                int i5 = Integer.parseInt(new String(new char[]{next(), next(), next(), next()}), 16);
                                                i2 = (i2 * 31) + i5;
                                                s0((char) i5);
                                                break;
                                            case 'v':
                                                i2 = (i2 * 31) + 11;
                                                s0((char) 11);
                                                break;
                                            default:
                                                this.f3980x = next2;
                                                throw new C0424d("unclosed.str.lit");
                                        }
                                        break;
                                }
                            } else {
                                char next3 = next();
                                this.f3980x = next3;
                                char next4 = next();
                                this.f3980x = next4;
                                int[] iArr = f3965h0;
                                char c3 = (char) ((iArr[next3] * 16) + iArr[next4]);
                                i2 = (i2 * 31) + c3;
                                s0(c3);
                            }
                        }
                    }
                    i2 = (i2 * 31) + 12;
                    s0('\f');
                } else {
                    i2 = (i2 * 31) + 39;
                    s0('\'');
                }
            } else {
                i2 = (i2 * 31) + next;
                if (z2) {
                    int i6 = this.f3968L;
                    char[] cArr3 = this.f3967I;
                    if (i6 == cArr3.length) {
                        s0(next);
                    } else {
                        this.f3968L = i6 + 1;
                        cArr3[i6] = next;
                    }
                } else {
                    this.f3968L++;
                }
            }
        }
    }

    protected void Q0() {
        char c2;
        next();
        char c3 = this.f3980x;
        if (c3 == '/') {
            do {
                next();
                c2 = this.f3980x;
                if (c2 == '\n') {
                    next();
                    return;
                }
            } while (c2 != 26);
            return;
        }
        if (c3 != '*') {
            throw new C0424d("invalid comment");
        }
        next();
        while (true) {
            char c4 = this.f3980x;
            if (c4 == 26) {
                return;
            }
            if (c4 == '*') {
                next();
                if (this.f3980x == '/') {
                    next();
                    return;
                }
            } else {
                next();
            }
        }
    }

    public final String R0() {
        return this.f3976d0;
    }

    @Override // g.InterfaceC0476c
    public final void S() {
        r0(':');
    }

    public abstract String S0(int i2, int i3);

    protected abstract char[] T0(int i2, int i3);

    @Override // g.InterfaceC0476c
    public final String U() {
        return g.a(this.f3973b);
    }

    @Override // g.InterfaceC0476c
    public final Number V(boolean z2) {
        char cH0 = h0((this.f3969M + this.f3968L) - 1);
        try {
            return cH0 == 'F' ? Float.valueOf(Float.parseFloat(a0())) : cH0 == 'D' ? Double.valueOf(Double.parseDouble(a0())) : z2 ? t() : Double.valueOf(j0());
        } catch (NumberFormatException e2) {
            throw new C0424d(e2.getMessage() + ", " + b());
        }
    }

    @Override // g.InterfaceC0476c
    public Locale X() {
        return this.f3974b0;
    }

    @Override // g.InterfaceC0476c
    public final boolean Y() {
        return this.f3968L == 4 && h0(this.f3969M + 1) == '$' && h0(this.f3969M + 2) == 'r' && h0(this.f3969M + 3) == 'e' && h0(this.f3969M + 4) == 'f';
    }

    @Override // g.InterfaceC0476c
    public final int a() {
        return this.f3978g;
    }

    @Override // g.InterfaceC0476c
    public abstract String a0();

    @Override // g.InterfaceC0476c
    public abstract String b();

    @Override // g.InterfaceC0476c, java.io.Closeable, java.lang.AutoCloseable
    public void close() {
        char[] cArr = this.f3967I;
        if (cArr.length <= 8192) {
            f3963f0.set(cArr);
        }
        this.f3967I = null;
    }

    /* JADX WARN: Removed duplicated region for block: B:14:0x0034  */
    /* JADX WARN: Removed duplicated region for block: B:32:0x0075  */
    /* JADX WARN: Removed duplicated region for block: B:37:0x0085  */
    /* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:25:0x005c -> B:11:0x002e). Please report as a decompilation issue!!! */
    @Override // g.InterfaceC0476c
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final long d() {
        /*
            r13 = this;
            int r0 = r13.f3969M
            r1 = -1
            r2 = 0
            if (r0 != r1) goto L8
            r13.f3969M = r2
        L8:
            int r0 = r13.f3969M
            int r1 = r13.f3968L
            int r1 = r1 + r0
            char r3 = r13.h0(r0)
            r4 = 45
            r5 = 1
            if (r3 != r4) goto L1d
            int r0 = r0 + 1
            r2 = -9223372036854775808
            r3 = r2
            r2 = r5
            goto L22
        L1d:
            r3 = -9223372036854775807(0x8000000000000001, double:-4.9E-324)
        L22:
            if (r0 >= r1) goto L30
            int r6 = r0 + 1
            char r0 = r13.h0(r0)
            int r0 = r0 + (-48)
            int r0 = -r0
            long r7 = (long) r0
        L2e:
            r0 = r6
            goto L32
        L30:
            r7 = 0
        L32:
            if (r0 >= r1) goto L73
            int r6 = r0 + 1
            char r0 = r13.h0(r0)
            r9 = 76
            if (r0 == r9) goto L72
            r9 = 83
            if (r0 == r9) goto L72
            r9 = 66
            if (r0 != r9) goto L47
            goto L72
        L47:
            int r0 = r0 + (-48)
            r9 = -922337203685477580(0xf333333333333334, double:-8.390303882365713E246)
            int r9 = (r7 > r9 ? 1 : (r7 == r9 ? 0 : -1))
            if (r9 < 0) goto L68
            r9 = 10
            long r7 = r7 * r9
            long r9 = (long) r0
            long r11 = r3 + r9
            int r0 = (r7 > r11 ? 1 : (r7 == r11 ? 0 : -1))
            if (r0 < 0) goto L5e
            long r7 = r7 - r9
            goto L2e
        L5e:
            java.lang.NumberFormatException r0 = new java.lang.NumberFormatException
            java.lang.String r1 = r13.a0()
            r0.<init>(r1)
            throw r0
        L68:
            java.lang.NumberFormatException r0 = new java.lang.NumberFormatException
            java.lang.String r1 = r13.a0()
            r0.<init>(r1)
            throw r0
        L72:
            r0 = r6
        L73:
            if (r2 == 0) goto L85
            int r1 = r13.f3969M
            int r1 = r1 + r5
            if (r0 <= r1) goto L7b
            return r7
        L7b:
            java.lang.NumberFormatException r0 = new java.lang.NumberFormatException
            java.lang.String r1 = r13.a0()
            r0.<init>(r1)
            throw r0
        L85:
            long r0 = -r7
            return r0
        */
        throw new UnsupportedOperationException("Method not decompiled: g.d.d():long");
    }

    @Override // g.InterfaceC0476c
    public boolean e() {
        int i2 = 0;
        while (true) {
            char cH0 = h0(i2);
            if (cH0 == 26) {
                this.f3973b = 20;
                return true;
            }
            if (!n0(cH0)) {
                return false;
            }
            i2++;
        }
    }

    public abstract String e0(int i2, int i3, int i4, j jVar);

    /* JADX WARN: Removed duplicated region for block: B:37:0x00a6  */
    @Override // g.InterfaceC0476c
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public boolean f(char r10) {
        /*
            r9 = this;
            r0 = 0
            r9.f3975c0 = r0
            int r1 = r9.f3981y
            char r1 = r9.h0(r1)
            r2 = 116(0x74, float:1.63E-43)
            r3 = 5
            r4 = 101(0x65, float:1.42E-43)
            r5 = -1
            r6 = 3
            r7 = 2
            r8 = 1
            if (r1 != r2) goto L40
            int r1 = r9.f3981y
            int r1 = r1 + r8
            char r1 = r9.h0(r1)
            r2 = 114(0x72, float:1.6E-43)
            if (r1 != r2) goto L3d
            int r1 = r9.f3981y
            int r1 = r1 + r7
            char r1 = r9.h0(r1)
            r2 = 117(0x75, float:1.64E-43)
            if (r1 != r2) goto L3d
            int r1 = r9.f3981y
            int r1 = r1 + r6
            char r1 = r9.h0(r1)
            if (r1 != r4) goto L3d
            int r0 = r9.f3981y
            int r0 = r0 + 4
            char r1 = r9.h0(r0)
        L3b:
            r0 = r8
            goto L96
        L3d:
            r9.f3975c0 = r5
            return r0
        L40:
            r2 = 102(0x66, float:1.43E-43)
            if (r1 != r2) goto L7b
            int r1 = r9.f3981y
            int r1 = r1 + r8
            char r1 = r9.h0(r1)
            r2 = 97
            if (r1 != r2) goto L78
            int r1 = r9.f3981y
            int r1 = r1 + r7
            char r1 = r9.h0(r1)
            r2 = 108(0x6c, float:1.51E-43)
            if (r1 != r2) goto L78
            int r1 = r9.f3981y
            int r1 = r1 + r6
            char r1 = r9.h0(r1)
            r2 = 115(0x73, float:1.61E-43)
            if (r1 != r2) goto L78
            int r1 = r9.f3981y
            int r1 = r1 + 4
            char r1 = r9.h0(r1)
            if (r1 != r4) goto L78
            int r1 = r9.f3981y
            int r1 = r1 + r3
            char r1 = r9.h0(r1)
            r3 = 6
            goto L96
        L78:
            r9.f3975c0 = r5
            return r0
        L7b:
            r2 = 49
            if (r1 != r2) goto L88
            int r0 = r9.f3981y
            int r0 = r0 + r8
            char r1 = r9.h0(r0)
            r3 = r7
            goto L3b
        L88:
            r2 = 48
            if (r1 != r2) goto L95
            int r1 = r9.f3981y
            int r1 = r1 + r8
            char r1 = r9.h0(r1)
            r3 = r7
            goto L96
        L95:
            r3 = r8
        L96:
            if (r1 != r10) goto La6
            int r10 = r9.f3981y
            int r10 = r10 + r3
            r9.f3981y = r10
            char r10 = r9.h0(r10)
            r9.f3980x = r10
            r9.f3975c0 = r6
            return r0
        La6:
            boolean r1 = n0(r1)
            if (r1 == 0) goto Lb7
            int r1 = r9.f3981y
            int r2 = r3 + 1
            int r1 = r1 + r3
            char r1 = r9.h0(r1)
            r3 = r2
            goto L96
        Lb7:
            r9.f3975c0 = r5
            return r0
        */
        throw new UnsupportedOperationException("Method not decompiled: g.d.f(char):boolean");
    }

    protected abstract void f0(int i2, char[] cArr, int i3, int i4);

    protected abstract boolean g0(char[] cArr);

    @Override // g.InterfaceC0476c
    public TimeZone getTimeZone() {
        return this.f3972a0;
    }

    /* JADX WARN: Removed duplicated region for block: B:54:0x00c3 A[ADDED_TO_REGION] */
    /* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:55:0x00c5 -> B:51:0x00b4). Please report as a decompilation issue!!! */
    @Override // g.InterfaceC0476c
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final float h(char r21) {
        /*
            Method dump skipped, instruction units count: 426
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: g.d.h(char):float");
    }

    public abstract char h0(int i2);

    @Override // g.InterfaceC0476c
    public final void i() {
        this.f3968L = 0;
        while (true) {
            this.f3978g = this.f3981y;
            char c2 = this.f3980x;
            if (c2 == '/') {
                Q0();
            } else {
                if (c2 == '\"') {
                    m();
                    return;
                }
                if (c2 == ',') {
                    next();
                    this.f3973b = 16;
                    return;
                }
                if (c2 >= '0' && c2 <= '9') {
                    q();
                    return;
                }
                if (c2 == '-') {
                    q();
                    return;
                }
                switch (c2) {
                    case '\b':
                    case '\t':
                    case '\n':
                    case '\f':
                    case '\r':
                    case ' ':
                        next();
                        break;
                    case '\'':
                        if (!j(EnumC0475b.AllowSingleQuotes)) {
                            throw new C0424d("Feature.AllowSingleQuotes is false");
                        }
                        M0();
                        return;
                    case '(':
                        next();
                        this.f3973b = 10;
                        return;
                    case ')':
                        next();
                        this.f3973b = 11;
                        return;
                    case '+':
                        next();
                        q();
                        return;
                    case '.':
                        next();
                        this.f3973b = 25;
                        return;
                    case ':':
                        next();
                        this.f3973b = 17;
                        return;
                    case ';':
                        next();
                        this.f3973b = 24;
                        return;
                    case 'N':
                    case 'S':
                    case 'T':
                    case 'u':
                        J0();
                        return;
                    case '[':
                        next();
                        this.f3973b = 14;
                        return;
                    case ']':
                        next();
                        this.f3973b = 15;
                        return;
                    case 'f':
                        v0();
                        return;
                    case 'n':
                        K0();
                        return;
                    case 't':
                        O0();
                        return;
                    case 'x':
                        I0();
                        return;
                    case '{':
                        next();
                        this.f3973b = 12;
                        return;
                    case '}':
                        next();
                        this.f3973b = 13;
                        return;
                    default:
                        if (m0()) {
                            if (this.f3973b == 20) {
                                throw new C0424d("EOF error");
                            }
                            this.f3973b = 20;
                            int i2 = this.f3981y;
                            this.f3978g = i2;
                            this.f3966H = i2;
                            return;
                        }
                        char c3 = this.f3980x;
                        if (c3 > 31 && c3 != 127) {
                            o0("illegal.char", String.valueOf((int) c3));
                            next();
                            return;
                        }
                        next();
                        break;
                        break;
                }
            }
        }
    }

    protected abstract void i0(int i2, int i3, char[] cArr);

    @Override // g.InterfaceC0476c
    public final boolean isEnabled(int i2) {
        return (i2 & this.f3979r) != 0;
    }

    @Override // g.InterfaceC0476c
    public final boolean j(EnumC0475b enumC0475b) {
        return isEnabled(enumC0475b.mask);
    }

    public double j0() {
        return Double.parseDouble(a0());
    }

    public Calendar k0() {
        return this.f3971Z;
    }

    @Override // g.InterfaceC0476c
    public final String l(j jVar) {
        if (this.f3973b == 1 && this.f3978g == 0 && this.f3981y == 1) {
            this.f3981y = 0;
        }
        boolean[] zArr = AbstractC0613e.f5269d;
        int i2 = this.f3980x;
        if (i2 < zArr.length && !zArr[i2]) {
            throw new C0424d("illegal identifier : " + this.f3980x + b());
        }
        boolean[] zArr2 = AbstractC0613e.f5270e;
        this.f3969M = this.f3981y;
        this.f3968L = 1;
        while (true) {
            char next = next();
            if (next < zArr2.length && !zArr2[next]) {
                break;
            }
            i2 = (i2 * 31) + next;
            this.f3968L++;
        }
        this.f3980x = h0(this.f3981y);
        this.f3973b = 18;
        if (this.f3968L == 4 && i2 == 3392903 && h0(this.f3969M) == 'n' && h0(this.f3969M + 1) == 'u' && h0(this.f3969M + 2) == 'l' && h0(this.f3969M + 3) == 'l') {
            return null;
        }
        return jVar == null ? S0(this.f3969M, this.f3968L) : e0(this.f3969M, this.f3968L, i2, jVar);
    }

    public abstract int l0(char c2, int i2);

    @Override // g.InterfaceC0476c
    public final void m() {
        char next;
        char next2;
        this.f3969M = this.f3981y;
        this.f3970Q = false;
        while (true) {
            char next3 = next();
            if (next3 == '\"') {
                this.f3973b = 4;
                this.f3980x = next();
                return;
            }
            if (next3 == 26) {
                if (m0()) {
                    throw new C0424d("unclosed string : " + next3);
                }
                s0((char) 26);
            } else if (next3 == '\\') {
                if (!this.f3970Q) {
                    this.f3970Q = true;
                    int i2 = this.f3968L;
                    char[] cArr = this.f3967I;
                    if (i2 >= cArr.length) {
                        int length = cArr.length * 2;
                        if (i2 <= length) {
                            i2 = length;
                        }
                        char[] cArr2 = new char[i2];
                        System.arraycopy(cArr, 0, cArr2, 0, cArr.length);
                        this.f3967I = cArr2;
                    }
                    i0(this.f3969M + 1, this.f3968L, this.f3967I);
                }
                char next4 = next();
                if (next4 == '\"') {
                    s0('\"');
                } else if (next4 != '\'') {
                    if (next4 != 'F') {
                        if (next4 == '\\') {
                            s0('\\');
                        } else if (next4 == 'b') {
                            s0('\b');
                        } else if (next4 != 'f') {
                            if (next4 == 'n') {
                                s0('\n');
                            } else if (next4 == 'r') {
                                s0('\r');
                            } else if (next4 != 'x') {
                                switch (next4) {
                                    case '/':
                                        s0('/');
                                        break;
                                    case '0':
                                        s0((char) 0);
                                        break;
                                    case '1':
                                        s0((char) 1);
                                        break;
                                    case '2':
                                        s0((char) 2);
                                        break;
                                    case '3':
                                        s0((char) 3);
                                        break;
                                    case '4':
                                        s0((char) 4);
                                        break;
                                    case '5':
                                        s0((char) 5);
                                        break;
                                    case '6':
                                        s0((char) 6);
                                        break;
                                    case '7':
                                        s0((char) 7);
                                        break;
                                    default:
                                        switch (next4) {
                                            case 't':
                                                s0('\t');
                                                break;
                                            case 'u':
                                                s0((char) Integer.parseInt(new String(new char[]{next(), next(), next(), next()}), 16));
                                                break;
                                            case 'v':
                                                s0((char) 11);
                                                break;
                                            default:
                                                this.f3980x = next4;
                                                throw new C0424d("unclosed string : " + next4);
                                        }
                                        break;
                                }
                            } else {
                                next = next();
                                next2 = next();
                                boolean z2 = (next >= '0' && next <= '9') || (next >= 'a' && next <= 'f') || (next >= 'A' && next <= 'F');
                                boolean z3 = (next2 >= '0' && next2 <= '9') || (next2 >= 'a' && next2 <= 'f') || (next2 >= 'A' && next2 <= 'F');
                                if (z2 && z3) {
                                    int[] iArr = f3965h0;
                                    s0((char) ((iArr[next] * 16) + iArr[next2]));
                                }
                            }
                        }
                    }
                    s0('\f');
                } else {
                    s0('\'');
                }
            } else if (this.f3970Q) {
                int i3 = this.f3968L;
                char[] cArr3 = this.f3967I;
                if (i3 == cArr3.length) {
                    s0(next3);
                } else {
                    this.f3968L = i3 + 1;
                    cArr3[i3] = next3;
                }
            } else {
                this.f3968L++;
            }
        }
        throw new C0424d("invalid escape character \\x" + next + next2);
    }

    public abstract boolean m0();

    @Override // g.InterfaceC0476c
    public final int n() {
        int i2;
        boolean z2;
        int i3 = 0;
        if (this.f3969M == -1) {
            this.f3969M = 0;
        }
        int i4 = this.f3969M;
        int i5 = this.f3968L + i4;
        if (h0(i4) == '-') {
            i4++;
            i2 = Integer.MIN_VALUE;
            z2 = true;
        } else {
            i2 = -2147483647;
            z2 = false;
        }
        if (i4 < i5) {
            i3 = -(h0(i4) - '0');
            i4++;
        }
        while (i4 < i5) {
            int i6 = i4 + 1;
            char cH0 = h0(i4);
            if (cH0 == 'L' || cH0 == 'S' || cH0 == 'B') {
                i4 = i6;
                break;
            }
            int i7 = cH0 - '0';
            if (i3 < -214748364) {
                throw new NumberFormatException(a0());
            }
            int i8 = i3 * 10;
            if (i8 < i2 + i7) {
                throw new NumberFormatException(a0());
            }
            i3 = i8 - i7;
            i4 = i6;
        }
        if (!z2) {
            return -i3;
        }
        if (i4 > this.f3969M + 1) {
            return i3;
        }
        throw new NumberFormatException(a0());
    }

    @Override // g.InterfaceC0476c
    public abstract char next();

    protected void o0(String str, Object... objArr) {
        this.f3973b = 1;
    }

    public final boolean p0(char[] cArr) {
        while (!g0(cArr)) {
            if (!n0(this.f3980x)) {
                return false;
            }
            next();
        }
        int length = this.f3981y + cArr.length;
        this.f3981y = length;
        char cH0 = h0(length);
        this.f3980x = cH0;
        if (cH0 == '{') {
            next();
            this.f3973b = 12;
        } else if (cH0 == '[') {
            next();
            this.f3973b = 14;
        } else if (cH0 == 'S' && h0(this.f3981y + 1) == 'e' && h0(this.f3981y + 2) == 't' && h0(this.f3981y + 3) == '[') {
            int i2 = this.f3981y + 3;
            this.f3981y = i2;
            this.f3980x = h0(i2);
            this.f3973b = 21;
        } else {
            i();
        }
        return true;
    }

    /* JADX WARN: Removed duplicated region for block: B:53:0x00c2  */
    /* JADX WARN: Removed duplicated region for block: B:54:0x00c6  */
    @Override // g.InterfaceC0476c
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final void q() {
        /*
            Method dump skipped, instruction units count: 210
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: g.d.q():void");
    }

    public final void q0() {
        while (n0(this.f3980x)) {
            next();
        }
        char c2 = this.f3980x;
        if (c2 == '_' || c2 == '$' || Character.isLetter(c2)) {
            J0();
        } else {
            i();
        }
    }

    public final void r0(char c2) {
        this.f3968L = 0;
        while (true) {
            char c3 = this.f3980x;
            if (c3 == c2) {
                next();
                i();
                return;
            }
            if (c3 != ' ' && c3 != '\n' && c3 != '\r' && c3 != '\t' && c3 != '\f' && c3 != '\b') {
                throw new C0424d("not match " + c2 + " - " + this.f3980x + ", info : " + b());
            }
            next();
        }
    }

    /* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */
    /* JADX WARN: Removed duplicated region for block: B:108:0x007b A[SYNTHETIC] */
    @Override // g.InterfaceC0476c
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final void s(int r11) {
        /*
            Method dump skipped, instruction units count: 270
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: g.d.s(int):void");
    }

    protected final void s0(char c2) {
        int i2 = this.f3968L;
        char[] cArr = this.f3967I;
        if (i2 == cArr.length) {
            char[] cArr2 = new char[cArr.length * 2];
            System.arraycopy(cArr, 0, cArr2, 0, cArr.length);
            this.f3967I = cArr2;
        }
        char[] cArr3 = this.f3967I;
        int i3 = this.f3968L;
        this.f3968L = i3 + 1;
        cArr3[i3] = c2;
    }

    @Override // g.InterfaceC0476c
    public abstract BigDecimal t();

    public long u0(char[] cArr) {
        this.f3975c0 = 0;
        if (!g0(cArr)) {
            this.f3975c0 = -2;
            return 0L;
        }
        int length = cArr.length;
        int i2 = length + 1;
        if (h0(this.f3981y + length) != '\"') {
            this.f3975c0 = -1;
            return 0L;
        }
        long j2 = -3750763034362895579L;
        while (true) {
            int i3 = i2 + 1;
            char cH0 = h0(this.f3981y + i2);
            if (cH0 == '\"') {
                int i4 = i2 + 2;
                char cH02 = h0(this.f3981y + i3);
                if (cH02 == ',') {
                    int i5 = this.f3981y + i4;
                    this.f3981y = i5;
                    this.f3980x = h0(i5);
                    this.f3975c0 = 3;
                    return j2;
                }
                if (cH02 != '}') {
                    this.f3975c0 = -1;
                    return 0L;
                }
                int i6 = i2 + 3;
                char cH03 = h0(this.f3981y + i4);
                if (cH03 == ',') {
                    this.f3973b = 16;
                    int i7 = this.f3981y + i6;
                    this.f3981y = i7;
                    this.f3980x = h0(i7);
                } else if (cH03 == ']') {
                    this.f3973b = 15;
                    int i8 = this.f3981y + i6;
                    this.f3981y = i8;
                    this.f3980x = h0(i8);
                } else if (cH03 == '}') {
                    this.f3973b = 13;
                    int i9 = this.f3981y + i6;
                    this.f3981y = i9;
                    this.f3980x = h0(i9);
                } else {
                    if (cH03 != 26) {
                        this.f3975c0 = -1;
                        return 0L;
                    }
                    this.f3973b = 20;
                    this.f3981y += i2 + 2;
                    this.f3980x = (char) 26;
                }
                this.f3975c0 = 4;
                return j2;
            }
            j2 = (j2 ^ ((long) ((cH0 < 'A' || cH0 > 'Z') ? cH0 : cH0 + ' '))) * 1099511628211L;
            if (cH0 == '\\') {
                this.f3975c0 = -1;
                return 0L;
            }
            i2 = i3;
        }
    }

    @Override // g.InterfaceC0476c
    public final String v(j jVar) {
        O();
        char c2 = this.f3980x;
        if (c2 == '\"') {
            return Q(jVar, '\"');
        }
        if (c2 == '\'') {
            if (j(EnumC0475b.AllowSingleQuotes)) {
                return Q(jVar, '\'');
            }
            throw new C0424d("syntax error");
        }
        if (c2 == '}') {
            next();
            this.f3973b = 13;
            return null;
        }
        if (c2 == ',') {
            next();
            this.f3973b = 16;
            return null;
        }
        if (c2 == 26) {
            this.f3973b = 20;
            return null;
        }
        if (j(EnumC0475b.AllowUnQuotedFieldNames)) {
            return l(jVar);
        }
        throw new C0424d("syntax error");
    }

    public final void v0() {
        if (this.f3980x != 'f') {
            throw new C0424d("error parse false");
        }
        next();
        if (this.f3980x != 'a') {
            throw new C0424d("error parse false");
        }
        next();
        if (this.f3980x != 'l') {
            throw new C0424d("error parse false");
        }
        next();
        if (this.f3980x != 's') {
            throw new C0424d("error parse false");
        }
        next();
        if (this.f3980x != 'e') {
            throw new C0424d("error parse false");
        }
        next();
        char c2 = this.f3980x;
        if (c2 != ' ' && c2 != ',' && c2 != '}' && c2 != ']' && c2 != '\n' && c2 != '\r' && c2 != '\t' && c2 != 26 && c2 != '\f' && c2 != '\b' && c2 != ':' && c2 != '/') {
            throw new C0424d("scan false error");
        }
        this.f3973b = 7;
    }

    /* JADX WARN: Code restructure failed: missing block: B:30:0x0070, code lost:
    
        r2 = false;
     */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public java.math.BigInteger w0(char[] r20) {
        /*
            Method dump skipped, instruction units count: 455
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: g.d.w0(char[]):java.math.BigInteger");
    }

    public abstract boolean x0(char[] cArr);

    public abstract Date y0(char[] cArr);

    @Override // g.InterfaceC0476c
    public final void z(int i2) {
        r0(':');
    }

    public BigDecimal z0(char[] cArr) {
        int i2;
        char cH0;
        int length;
        int i3;
        this.f3975c0 = 0;
        if (!g0(cArr)) {
            this.f3975c0 = -2;
            return null;
        }
        int length2 = cArr.length;
        int i4 = length2 + 1;
        char cH02 = h0(this.f3981y + length2);
        boolean z2 = cH02 == '\"';
        if (z2) {
            cH02 = h0(this.f3981y + i4);
            i4 = length2 + 2;
        }
        if (cH02 == '-') {
            cH02 = h0(this.f3981y + i4);
            i4++;
        }
        if (cH02 < '0' || cH02 > '9') {
            if (cH02 != 'n' || h0(this.f3981y + i4) != 'u' || h0(this.f3981y + i4 + 1) != 'l' || h0(this.f3981y + i4 + 2) != 'l') {
                this.f3975c0 = -1;
                return null;
            }
            this.f3975c0 = 5;
            int i5 = i4 + 4;
            char cH03 = h0(this.f3981y + i4 + 3);
            if (z2 && cH03 == '\"') {
                cH03 = h0(this.f3981y + i5);
                i5 = i4 + 5;
            }
            while (cH03 != ',') {
                if (cH03 == '}') {
                    int i6 = this.f3981y + i5;
                    this.f3981y = i6;
                    this.f3980x = h0(i6);
                    this.f3975c0 = 5;
                    this.f3973b = 13;
                    return null;
                }
                if (!n0(cH03)) {
                    this.f3975c0 = -1;
                    return null;
                }
                cH03 = h0(this.f3981y + i5);
                i5++;
            }
            int i7 = this.f3981y + i5;
            this.f3981y = i7;
            this.f3980x = h0(i7);
            this.f3975c0 = 5;
            this.f3973b = 16;
            return null;
        }
        while (true) {
            i2 = i4 + 1;
            cH0 = h0(this.f3981y + i4);
            if (cH0 < '0' || cH0 > '9') {
                break;
            }
            i4 = i2;
        }
        if (cH0 == '.') {
            int i8 = i4 + 2;
            char cH04 = h0(this.f3981y + i2);
            if (cH04 < '0' || cH04 > '9') {
                this.f3975c0 = -1;
                return null;
            }
            while (true) {
                i2 = i8 + 1;
                cH0 = h0(this.f3981y + i8);
                if (cH0 < '0' || cH0 > '9') {
                    break;
                }
                i8 = i2;
            }
        }
        if (cH0 == 'e' || cH0 == 'E') {
            int i9 = i2 + 1;
            cH0 = h0(this.f3981y + i2);
            if (cH0 == '+' || cH0 == '-') {
                i2 += 2;
                cH0 = h0(this.f3981y + i9);
            } else {
                i2 = i9;
            }
            while (cH0 >= '0' && cH0 <= '9') {
                char cH05 = h0(this.f3981y + i2);
                i2++;
                cH0 = cH05;
            }
        }
        if (!z2) {
            int i10 = this.f3981y;
            length = cArr.length + i10;
            i3 = ((i10 + i2) - length) - 1;
        } else {
            if (cH0 != '\"') {
                this.f3975c0 = -1;
                return null;
            }
            int i11 = i2 + 1;
            char cH06 = h0(this.f3981y + i2);
            int i12 = this.f3981y;
            length = cArr.length + i12 + 1;
            i3 = ((i12 + i11) - length) - 2;
            i2 = i11;
            cH0 = cH06;
        }
        if (i3 > 65535) {
            throw new C0424d("scan decimal overflow");
        }
        char[] cArrT0 = T0(length, i3);
        BigDecimal bigDecimal = new BigDecimal(cArrT0, 0, cArrT0.length, MathContext.UNLIMITED);
        if (cH0 == ',') {
            int i13 = this.f3981y + i2;
            this.f3981y = i13;
            this.f3980x = h0(i13);
            this.f3975c0 = 3;
            this.f3973b = 16;
            return bigDecimal;
        }
        if (cH0 != '}') {
            this.f3975c0 = -1;
            return null;
        }
        int i14 = i2 + 1;
        char cH07 = h0(this.f3981y + i2);
        if (cH07 == ',') {
            this.f3973b = 16;
            int i15 = this.f3981y + i14;
            this.f3981y = i15;
            this.f3980x = h0(i15);
        } else if (cH07 == ']') {
            this.f3973b = 15;
            int i16 = this.f3981y + i14;
            this.f3981y = i16;
            this.f3980x = h0(i16);
        } else if (cH07 == '}') {
            this.f3973b = 13;
            int i17 = this.f3981y + i14;
            this.f3981y = i17;
            this.f3980x = h0(i17);
        } else {
            if (cH07 != 26) {
                this.f3975c0 = -1;
                return null;
            }
            this.f3973b = 20;
            this.f3981y += i2;
            this.f3980x = (char) 26;
        }
        this.f3975c0 = 4;
        return bigDecimal;
    }
}
