package g;

import d.AbstractC0421a;
import d.C0422b;
import d.C0424d;
import d.C0425e;
import d.C0427g;
import d.C0435h;
import h.l;
import h.m;
import h.o;
import h.t;
import h.y;
import i.C0511D;
import i.O;
import i.g0;
import java.io.Closeable;
import java.lang.reflect.Type;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeSet;
import l.C0611c;

/* JADX INFO: renamed from: g.a, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public class C0474a implements Closeable {

    /* JADX INFO: renamed from: e0, reason: collision with root package name */
    private static final Set f3943e0 = new HashSet();

    /* JADX INFO: renamed from: H, reason: collision with root package name */
    public final InterfaceC0476c f3944H;

    /* JADX INFO: renamed from: I, reason: collision with root package name */
    protected h f3945I;

    /* JADX INFO: renamed from: L, reason: collision with root package name */
    private h[] f3946L;

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

    /* JADX INFO: renamed from: Q, reason: collision with root package name */
    private List f3948Q;

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

    /* JADX INFO: renamed from: a0, reason: collision with root package name */
    private List f3950a0;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final Object f3951b;

    /* JADX INFO: renamed from: b0, reason: collision with root package name */
    private List f3952b0;

    /* JADX INFO: renamed from: c0, reason: collision with root package name */
    private int f3953c0;

    /* JADX INFO: renamed from: d0, reason: collision with root package name */
    private String[] f3954d0;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public final j f3955g;

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

    /* JADX INFO: renamed from: x, reason: collision with root package name */
    private String f3957x;

    /* JADX INFO: renamed from: y, reason: collision with root package name */
    private DateFormat f3958y;

    /* JADX INFO: renamed from: g.a$a, reason: collision with other inner class name */
    public static class C0072a {

        /* JADX INFO: renamed from: a, reason: collision with root package name */
        public final h f3959a;

        /* JADX INFO: renamed from: b, reason: collision with root package name */
        public final String f3960b;

        /* JADX INFO: renamed from: c, reason: collision with root package name */
        public l f3961c;

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

        public C0072a(h hVar, String str) {
            this.f3959a = hVar;
            this.f3960b = str;
        }
    }

    static {
        Class[] clsArr = {Boolean.TYPE, Byte.TYPE, Short.TYPE, Integer.TYPE, Long.TYPE, Float.TYPE, Double.TYPE, Boolean.class, Byte.class, Short.class, Integer.class, Long.class, Float.class, Double.class, BigInteger.class, BigDecimal.class, String.class};
        for (int i2 = 0; i2 < 17; i2++) {
            f3943e0.add(clsArr[i2]);
        }
    }

    public C0474a(String str) {
        this(str, i.r(), AbstractC0421a.f3668H);
    }

    private void d(h hVar) {
        int i2 = this.f3947M;
        this.f3947M = i2 + 1;
        h[] hVarArr = this.f3946L;
        if (hVarArr == null) {
            this.f3946L = new h[8];
        } else if (i2 >= hVarArr.length) {
            h[] hVarArr2 = new h[(hVarArr.length * 3) / 2];
            System.arraycopy(hVarArr, 0, hVarArr2, 0, hVarArr.length);
            this.f3946L = hVarArr2;
        }
        this.f3946L[i2] = hVar;
    }

    public Object A() {
        return D(null);
    }

    /* JADX WARN: Code restructure failed: missing block: B:88:0x023b, code lost:
    
        return r11;
     */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public java.lang.Object C(h.w r11, java.lang.Object r12) {
        /*
            Method dump skipped, instruction units count: 617
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: g.C0474a.C(h.w, java.lang.Object):java.lang.Object");
    }

    public Object D(Object obj) {
        InterfaceC0476c interfaceC0476c = this.f3944H;
        int iF = interfaceC0476c.F();
        if (iF == 2) {
            Number numberC = interfaceC0476c.C();
            interfaceC0476c.i();
            return numberC;
        }
        if (iF == 3) {
            Number numberV = interfaceC0476c.V(interfaceC0476c.j(EnumC0475b.UseBigDecimal));
            interfaceC0476c.i();
            return numberV;
        }
        if (iF == 4) {
            String strA = interfaceC0476c.A();
            interfaceC0476c.s(16);
            if (interfaceC0476c.j(EnumC0475b.AllowISO8601DateFormat)) {
                f fVar = new f(strA);
                try {
                    if (fVar.X0()) {
                        return fVar.k0().getTime();
                    }
                } finally {
                    fVar.close();
                }
            }
            return strA;
        }
        if (iF == 12) {
            return R(new C0425e(interfaceC0476c.j(EnumC0475b.OrderedField)), obj);
        }
        if (iF == 14) {
            C0422b c0422b = new C0422b();
            I(c0422b, obj);
            return interfaceC0476c.j(EnumC0475b.UseObjectArray) ? c0422b.toArray() : c0422b;
        }
        if (iF == 18) {
            if ("NaN".equals(interfaceC0476c.A())) {
                interfaceC0476c.i();
                return null;
            }
            throw new C0424d("syntax error, " + interfaceC0476c.b());
        }
        if (iF == 26) {
            byte[] bArrW = interfaceC0476c.w();
            interfaceC0476c.i();
            return bArrW;
        }
        switch (iF) {
            case 6:
                interfaceC0476c.i();
                return Boolean.TRUE;
            case 7:
                interfaceC0476c.i();
                return Boolean.FALSE;
            case 8:
                interfaceC0476c.i();
                return null;
            case 9:
                interfaceC0476c.s(18);
                if (interfaceC0476c.F() != 18) {
                    throw new C0424d("syntax error");
                }
                interfaceC0476c.s(10);
                a(10);
                long jLongValue = interfaceC0476c.C().longValue();
                a(2);
                a(11);
                return new Date(jLongValue);
            default:
                switch (iF) {
                    case 20:
                        if (interfaceC0476c.e()) {
                            return null;
                        }
                        throw new C0424d("unterminated json string, " + interfaceC0476c.b());
                    case 21:
                        interfaceC0476c.i();
                        HashSet hashSet = new HashSet();
                        I(hashSet, obj);
                        return hashSet;
                    case 22:
                        interfaceC0476c.i();
                        TreeSet treeSet = new TreeSet();
                        I(treeSet, obj);
                        return treeSet;
                    case 23:
                        interfaceC0476c.i();
                        return null;
                    default:
                        throw new C0424d("syntax error, " + interfaceC0476c.b());
                }
        }
    }

    public void F(Type type, Collection collection) {
        G(type, collection, null);
    }

    public void G(Type type, Collection collection, Object obj) {
        t tVarN;
        int iF = this.f3944H.F();
        if (iF == 21 || iF == 22) {
            this.f3944H.i();
            iF = this.f3944H.F();
        }
        if (iF != 14) {
            throw new C0424d("expect '[', but " + g.a(iF) + ", " + this.f3944H.b());
        }
        if (Integer.TYPE == type) {
            tVarN = C0511D.f4218a;
            this.f3944H.s(2);
        } else if (String.class == type) {
            tVarN = g0.f4362a;
            this.f3944H.s(4);
        } else {
            tVarN = this.f3956r.n(type);
            this.f3944H.s(tVarN.d());
        }
        h hVar = this.f3945I;
        Y(collection, obj);
        int i2 = 0;
        while (true) {
            try {
                if (this.f3944H.j(EnumC0475b.AllowArbitraryCommas)) {
                    while (this.f3944H.F() == 16) {
                        this.f3944H.i();
                    }
                }
                if (this.f3944H.F() == 15) {
                    a0(hVar);
                    this.f3944H.s(16);
                    return;
                }
                Object objB = null;
                if (Integer.TYPE == type) {
                    collection.add(C0511D.f4218a.b(this, null, null));
                } else if (String.class == type) {
                    if (this.f3944H.F() == 4) {
                        objB = this.f3944H.A();
                        this.f3944H.s(16);
                    } else {
                        Object objA = A();
                        if (objA != null) {
                            objB = objA.toString();
                        }
                    }
                    collection.add(objB);
                } else {
                    if (this.f3944H.F() == 8) {
                        this.f3944H.i();
                    } else {
                        objB = tVarN.b(this, type, Integer.valueOf(i2));
                    }
                    collection.add(objB);
                    f(collection);
                }
                if (this.f3944H.F() == 16) {
                    this.f3944H.s(tVarN.d());
                }
                i2++;
            } catch (Throwable th) {
                a0(hVar);
                throw th;
            }
        }
    }

    public final void H(Collection collection) {
        I(collection, null);
    }

    public final void I(Collection collection, Object obj) {
        Object objV;
        InterfaceC0476c interfaceC0476c = this.f3944H;
        if (interfaceC0476c.F() == 21 || interfaceC0476c.F() == 22) {
            interfaceC0476c.i();
        }
        if (interfaceC0476c.F() != 14) {
            throw new C0424d("syntax error, expect [, actual " + g.a(interfaceC0476c.F()) + ", pos " + interfaceC0476c.a() + ", fieldName " + obj);
        }
        interfaceC0476c.s(4);
        h hVar = this.f3945I;
        if (hVar != null && hVar.f3987d > 512) {
            throw new C0424d("array level > 512");
        }
        Y(collection, obj);
        int i2 = 0;
        while (true) {
            try {
                if (interfaceC0476c.j(EnumC0475b.AllowArbitraryCommas)) {
                    while (interfaceC0476c.F() == 16) {
                        interfaceC0476c.i();
                    }
                }
                int iF = interfaceC0476c.F();
                if (iF == 2) {
                    Number numberC = interfaceC0476c.C();
                    interfaceC0476c.s(16);
                    objV = numberC;
                } else if (iF == 3) {
                    objV = interfaceC0476c.j(EnumC0475b.UseBigDecimal) ? interfaceC0476c.V(true) : interfaceC0476c.V(false);
                    interfaceC0476c.s(16);
                } else if (iF == 4) {
                    String strA = interfaceC0476c.A();
                    interfaceC0476c.s(16);
                    objV = strA;
                    if (interfaceC0476c.j(EnumC0475b.AllowISO8601DateFormat)) {
                        f fVar = new f(strA);
                        Object time = strA;
                        if (fVar.X0()) {
                            time = fVar.k0().getTime();
                        }
                        fVar.close();
                        objV = time;
                    }
                } else if (iF == 6) {
                    Boolean bool = Boolean.TRUE;
                    interfaceC0476c.s(16);
                    objV = bool;
                } else if (iF != 7) {
                    objV = null;
                    objV = null;
                    if (iF == 8) {
                        interfaceC0476c.s(4);
                    } else if (iF == 12) {
                        objV = R(new C0425e(interfaceC0476c.j(EnumC0475b.OrderedField)), Integer.valueOf(i2));
                    } else {
                        if (iF == 20) {
                            throw new C0424d("unclosed jsonArray");
                        }
                        if (iF == 23) {
                            interfaceC0476c.s(4);
                        } else if (iF == 14) {
                            C0422b c0422b = new C0422b();
                            I(c0422b, Integer.valueOf(i2));
                            objV = c0422b;
                            if (interfaceC0476c.j(EnumC0475b.UseObjectArray)) {
                                objV = c0422b.toArray();
                            }
                        } else {
                            if (iF == 15) {
                                interfaceC0476c.s(16);
                                a0(hVar);
                                return;
                            }
                            objV = A();
                        }
                    }
                } else {
                    Boolean bool2 = Boolean.FALSE;
                    interfaceC0476c.s(16);
                    objV = bool2;
                }
                collection.add(objV);
                f(collection);
                if (interfaceC0476c.F() == 16) {
                    interfaceC0476c.s(4);
                }
                i2++;
            } catch (Throwable th) {
                a0(hVar);
                throw th;
            }
        }
    }

    public void K(Object obj, String str) {
        this.f3944H.S();
        List list = this.f3950a0;
        if (list != null) {
            Iterator it = list.iterator();
            if (it.hasNext()) {
                android.support.v4.media.a.a(it.next());
                throw null;
            }
        }
        A();
        List list2 = this.f3952b0;
        if (list2 != null) {
            Iterator it2 = list2.iterator();
            if (it2.hasNext()) {
                android.support.v4.media.a.a(it2.next());
                throw null;
            }
        }
        if (this.f3949Z == 1) {
            this.f3949Z = 0;
        }
    }

    public C0425e L() {
        Object objQ = Q(new C0425e(this.f3944H.j(EnumC0475b.OrderedField)));
        if (objQ instanceof C0425e) {
            return (C0425e) objQ;
        }
        if (objQ == null) {
            return null;
        }
        return new C0425e((Map) objQ);
    }

    public Object N(Class cls) {
        return P(cls, null);
    }

    public Object O(Type type) {
        return P(type, null);
    }

    public Object P(Type type, Object obj) {
        int iF = this.f3944H.F();
        if (iF == 8) {
            this.f3944H.i();
            return null;
        }
        if (iF == 4) {
            if (type == byte[].class) {
                byte[] bArrW = this.f3944H.w();
                this.f3944H.i();
                return bArrW;
            }
            if (type == char[].class) {
                String strA = this.f3944H.A();
                this.f3944H.i();
                return strA.toCharArray();
            }
        }
        t tVarN = this.f3956r.n(type);
        try {
            if (tVarN.getClass() != o.class) {
                return tVarN.b(this, type, obj);
            }
            if (this.f3944H.F() != 12 && this.f3944H.F() != 14) {
                throw new C0424d("syntax error,except start with { or [,but actually start with " + this.f3944H.U());
            }
            return ((o) tVarN).g(this, type, obj, 0);
        } catch (C0424d e2) {
            throw e2;
        } catch (Throwable th) {
            throw new C0424d(th.getMessage(), th);
        }
    }

    public Object Q(Map map) {
        return R(map, null);
    }

    /* JADX WARN: Code restructure failed: missing block: B:142:0x0292, code lost:
    
        r5.s(16);
     */
    /* JADX WARN: Code restructure failed: missing block: B:143:0x029d, code lost:
    
        if (r5.F() != 13) goto L165;
     */
    /* JADX WARN: Code restructure failed: missing block: B:144:0x029f, code lost:
    
        r5.s(16);
     */
    /* JADX WARN: Code restructure failed: missing block: B:146:0x02aa, code lost:
    
        if ((r17.f3956r.n(r8) instanceof h.o) == false) goto L150;
     */
    /* JADX WARN: Code restructure failed: missing block: B:147:0x02ac, code lost:
    
        r13 = l.l.f(r18, r8, r17.f3956r);
     */
    /* JADX WARN: Code restructure failed: missing block: B:148:0x02b4, code lost:
    
        r0 = move-exception;
     */
    /* JADX WARN: Code restructure failed: missing block: B:150:0x02b6, code lost:
    
        if (r13 != null) goto L161;
     */
    /* JADX WARN: Code restructure failed: missing block: B:152:0x02ba, code lost:
    
        if (r8 != java.lang.Cloneable.class) goto L154;
     */
    /* JADX WARN: Code restructure failed: missing block: B:153:0x02bc, code lost:
    
        r13 = new java.util.HashMap();
     */
    /* JADX WARN: Code restructure failed: missing block: B:155:0x02c8, code lost:
    
        if ("java.util.Collections$EmptyMap".equals(r7) == false) goto L157;
     */
    /* JADX WARN: Code restructure failed: missing block: B:156:0x02ca, code lost:
    
        r13 = java.util.Collections.emptyMap();
     */
    /* JADX WARN: Code restructure failed: missing block: B:158:0x02d5, code lost:
    
        if ("java.util.Collections$UnmodifiableMap".equals(r7) == false) goto L160;
     */
    /* JADX WARN: Code restructure failed: missing block: B:159:0x02d7, code lost:
    
        r13 = java.util.Collections.unmodifiableMap(new java.util.HashMap());
     */
    /* JADX WARN: Code restructure failed: missing block: B:160:0x02e1, code lost:
    
        r13 = r8.newInstance();
     */
    /* JADX WARN: Code restructure failed: missing block: B:161:0x02e5, code lost:
    
        a0(r6);
     */
    /* JADX WARN: Code restructure failed: missing block: B:162:0x02e8, code lost:
    
        return r13;
     */
    /* JADX WARN: Code restructure failed: missing block: B:164:0x02f0, code lost:
    
        throw new d.C0424d("create instance error", r0);
     */
    /* JADX WARN: Code restructure failed: missing block: B:165:0x02f1, code lost:
    
        e0(2);
        r3 = r17.f3945I;
     */
    /* JADX WARN: Code restructure failed: missing block: B:166:0x02f7, code lost:
    
        if (r3 == null) goto L173;
     */
    /* JADX WARN: Code restructure failed: missing block: B:167:0x02f9, code lost:
    
        if (r19 == null) goto L173;
     */
    /* JADX WARN: Code restructure failed: missing block: B:169:0x02fd, code lost:
    
        if ((r19 instanceof java.lang.Integer) != false) goto L173;
     */
    /* JADX WARN: Code restructure failed: missing block: B:171:0x0303, code lost:
    
        if ((r3.f3986c instanceof java.lang.Integer) != false) goto L173;
     */
    /* JADX WARN: Code restructure failed: missing block: B:172:0x0305, code lost:
    
        U();
     */
    /* JADX WARN: Code restructure failed: missing block: B:174:0x030c, code lost:
    
        if (r18.size() <= 0) goto L178;
     */
    /* JADX WARN: Code restructure failed: missing block: B:175:0x030e, code lost:
    
        r0 = l.l.f(r18, r8, r17.f3956r);
        e0(0);
        S(r0);
     */
    /* JADX WARN: Code restructure failed: missing block: B:176:0x031b, code lost:
    
        a0(r6);
     */
    /* JADX WARN: Code restructure failed: missing block: B:177:0x031e, code lost:
    
        return r0;
     */
    /* JADX WARN: Code restructure failed: missing block: B:178:0x031f, code lost:
    
        r0 = r17.f3956r.n(r8);
        r3 = r0.getClass();
     */
    /* JADX WARN: Code restructure failed: missing block: B:179:0x032f, code lost:
    
        if (h.o.class.isAssignableFrom(r3) == false) goto L185;
     */
    /* JADX WARN: Code restructure failed: missing block: B:181:0x0333, code lost:
    
        if (r3 == h.o.class) goto L185;
     */
    /* JADX WARN: Code restructure failed: missing block: B:183:0x0337, code lost:
    
        if (r3 == h.C0497B.class) goto L185;
     */
    /* JADX WARN: Code restructure failed: missing block: B:184:0x0339, code lost:
    
        e0(0);
     */
    /* JADX WARN: Code restructure failed: missing block: B:186:0x0340, code lost:
    
        if ((r0 instanceof h.r) == false) goto L188;
     */
    /* JADX WARN: Code restructure failed: missing block: B:187:0x0342, code lost:
    
        e0(0);
     */
    /* JADX WARN: Code restructure failed: missing block: B:188:0x0346, code lost:
    
        r0 = r0.b(r17, r8, r19);
     */
    /* JADX WARN: Code restructure failed: missing block: B:189:0x034a, code lost:
    
        a0(r6);
     */
    /* JADX WARN: Code restructure failed: missing block: B:190:0x034d, code lost:
    
        return r0;
     */
    /* JADX WARN: Removed duplicated region for block: B:117:0x0220 A[Catch: all -> 0x0081, TryCatch #0 {all -> 0x0081, blocks: (B:24:0x0075, B:26:0x0079, B:31:0x0086, B:34:0x0099, B:38:0x00af, B:117:0x0220, B:118:0x0226, B:120:0x0231, B:122:0x0239, B:126:0x024f, B:128:0x025d, B:141:0x028a, B:142:0x0292, B:144:0x029f, B:145:0x02a2, B:147:0x02ac, B:153:0x02bc, B:154:0x02c2, B:156:0x02ca, B:157:0x02cf, B:159:0x02d7, B:160:0x02e1, B:163:0x02e9, B:164:0x02f0, B:165:0x02f1, B:168:0x02fb, B:170:0x02ff, B:172:0x0305, B:173:0x0308, B:175:0x030e, B:178:0x031f, B:184:0x0339, B:188:0x0346, B:185:0x033e, B:187:0x0342, B:130:0x0264, B:132:0x026a, B:137:0x0277, B:138:0x027a, B:196:0x0357, B:200:0x0363, B:202:0x036b, B:204:0x0375, B:206:0x0386, B:208:0x0390, B:210:0x0398, B:212:0x039c, B:214:0x03a2, B:217:0x03a7, B:219:0x03ab, B:239:0x03f9, B:241:0x0401, B:244:0x040a, B:245:0x0425, B:221:0x03b0, B:223:0x03b8, B:226:0x03be, B:227:0x03cb, B:230:0x03d4, B:233:0x03da, B:236:0x03df, B:237:0x03ec, B:246:0x0426, B:247:0x0444, B:249:0x0447, B:251:0x044b, B:253:0x044f, B:256:0x0455, B:260:0x045e, B:266:0x046e, B:268:0x047d, B:270:0x0488, B:271:0x0490, B:272:0x0493, B:284:0x04bf, B:286:0x04ca, B:290:0x04d7, B:293:0x04e7, B:294:0x0508, B:279:0x04a3, B:281:0x04ad, B:283:0x04bc, B:282:0x04b2, B:297:0x050d, B:299:0x0517, B:301:0x051f, B:302:0x0522, B:304:0x052d, B:305:0x0531, B:307:0x053c, B:310:0x0543, B:313:0x054f, B:314:0x0554, B:317:0x0559, B:319:0x055e, B:323:0x056a, B:325:0x0572, B:327:0x0585, B:331:0x05a0, B:333:0x05a6, B:336:0x05ae, B:338:0x05b2, B:339:0x05b9, B:341:0x05be, B:342:0x05c1, B:344:0x05c9, B:347:0x05d3, B:350:0x05dd, B:351:0x05e2, B:352:0x05e7, B:353:0x0602, B:328:0x058e, B:329:0x0593, B:354:0x0603, B:356:0x0615, B:359:0x061c, B:362:0x062a, B:363:0x064b, B:41:0x00c3, B:42:0x00e1, B:45:0x00e6, B:47:0x00f1, B:49:0x00f5, B:51:0x00f9, B:54:0x00ff, B:61:0x010e, B:63:0x0116, B:66:0x0128, B:67:0x0140, B:68:0x0141, B:69:0x0146, B:80:0x015b, B:81:0x0161, B:83:0x0168, B:85:0x0173, B:92:0x0185, B:95:0x018f, B:96:0x01a7, B:90:0x0180, B:84:0x016d, B:97:0x01a8, B:98:0x01c0, B:104:0x01ca, B:106:0x01d2, B:109:0x01e5, B:110:0x0205, B:111:0x0206, B:112:0x020b, B:113:0x020c, B:115:0x0216, B:364:0x064c, B:365:0x0653, B:366:0x0654, B:367:0x0659, B:368:0x065a, B:369:0x065f), top: B:372:0x0075, inners: #1, #2 }] */
    /* JADX WARN: Removed duplicated region for block: B:191:0x034e  */
    /* JADX WARN: Removed duplicated region for block: B:238:0x03f8  */
    /* JADX WARN: Removed duplicated region for block: B:249:0x0447 A[Catch: all -> 0x0081, TryCatch #0 {all -> 0x0081, blocks: (B:24:0x0075, B:26:0x0079, B:31:0x0086, B:34:0x0099, B:38:0x00af, B:117:0x0220, B:118:0x0226, B:120:0x0231, B:122:0x0239, B:126:0x024f, B:128:0x025d, B:141:0x028a, B:142:0x0292, B:144:0x029f, B:145:0x02a2, B:147:0x02ac, B:153:0x02bc, B:154:0x02c2, B:156:0x02ca, B:157:0x02cf, B:159:0x02d7, B:160:0x02e1, B:163:0x02e9, B:164:0x02f0, B:165:0x02f1, B:168:0x02fb, B:170:0x02ff, B:172:0x0305, B:173:0x0308, B:175:0x030e, B:178:0x031f, B:184:0x0339, B:188:0x0346, B:185:0x033e, B:187:0x0342, B:130:0x0264, B:132:0x026a, B:137:0x0277, B:138:0x027a, B:196:0x0357, B:200:0x0363, B:202:0x036b, B:204:0x0375, B:206:0x0386, B:208:0x0390, B:210:0x0398, B:212:0x039c, B:214:0x03a2, B:217:0x03a7, B:219:0x03ab, B:239:0x03f9, B:241:0x0401, B:244:0x040a, B:245:0x0425, B:221:0x03b0, B:223:0x03b8, B:226:0x03be, B:227:0x03cb, B:230:0x03d4, B:233:0x03da, B:236:0x03df, B:237:0x03ec, B:246:0x0426, B:247:0x0444, B:249:0x0447, B:251:0x044b, B:253:0x044f, B:256:0x0455, B:260:0x045e, B:266:0x046e, B:268:0x047d, B:270:0x0488, B:271:0x0490, B:272:0x0493, B:284:0x04bf, B:286:0x04ca, B:290:0x04d7, B:293:0x04e7, B:294:0x0508, B:279:0x04a3, B:281:0x04ad, B:283:0x04bc, B:282:0x04b2, B:297:0x050d, B:299:0x0517, B:301:0x051f, B:302:0x0522, B:304:0x052d, B:305:0x0531, B:307:0x053c, B:310:0x0543, B:313:0x054f, B:314:0x0554, B:317:0x0559, B:319:0x055e, B:323:0x056a, B:325:0x0572, B:327:0x0585, B:331:0x05a0, B:333:0x05a6, B:336:0x05ae, B:338:0x05b2, B:339:0x05b9, B:341:0x05be, B:342:0x05c1, B:344:0x05c9, B:347:0x05d3, B:350:0x05dd, B:351:0x05e2, B:352:0x05e7, B:353:0x0602, B:328:0x058e, B:329:0x0593, B:354:0x0603, B:356:0x0615, B:359:0x061c, B:362:0x062a, B:363:0x064b, B:41:0x00c3, B:42:0x00e1, B:45:0x00e6, B:47:0x00f1, B:49:0x00f5, B:51:0x00f9, B:54:0x00ff, B:61:0x010e, B:63:0x0116, B:66:0x0128, B:67:0x0140, B:68:0x0141, B:69:0x0146, B:80:0x015b, B:81:0x0161, B:83:0x0168, B:85:0x0173, B:92:0x0185, B:95:0x018f, B:96:0x01a7, B:90:0x0180, B:84:0x016d, B:97:0x01a8, B:98:0x01c0, B:104:0x01ca, B:106:0x01d2, B:109:0x01e5, B:110:0x0205, B:111:0x0206, B:112:0x020b, B:113:0x020c, B:115:0x0216, B:364:0x064c, B:365:0x0653, B:366:0x0654, B:367:0x0659, B:368:0x065a, B:369:0x065f), top: B:372:0x0075, inners: #1, #2 }] */
    /* JADX WARN: Removed duplicated region for block: B:266:0x046e A[Catch: all -> 0x0081, TryCatch #0 {all -> 0x0081, blocks: (B:24:0x0075, B:26:0x0079, B:31:0x0086, B:34:0x0099, B:38:0x00af, B:117:0x0220, B:118:0x0226, B:120:0x0231, B:122:0x0239, B:126:0x024f, B:128:0x025d, B:141:0x028a, B:142:0x0292, B:144:0x029f, B:145:0x02a2, B:147:0x02ac, B:153:0x02bc, B:154:0x02c2, B:156:0x02ca, B:157:0x02cf, B:159:0x02d7, B:160:0x02e1, B:163:0x02e9, B:164:0x02f0, B:165:0x02f1, B:168:0x02fb, B:170:0x02ff, B:172:0x0305, B:173:0x0308, B:175:0x030e, B:178:0x031f, B:184:0x0339, B:188:0x0346, B:185:0x033e, B:187:0x0342, B:130:0x0264, B:132:0x026a, B:137:0x0277, B:138:0x027a, B:196:0x0357, B:200:0x0363, B:202:0x036b, B:204:0x0375, B:206:0x0386, B:208:0x0390, B:210:0x0398, B:212:0x039c, B:214:0x03a2, B:217:0x03a7, B:219:0x03ab, B:239:0x03f9, B:241:0x0401, B:244:0x040a, B:245:0x0425, B:221:0x03b0, B:223:0x03b8, B:226:0x03be, B:227:0x03cb, B:230:0x03d4, B:233:0x03da, B:236:0x03df, B:237:0x03ec, B:246:0x0426, B:247:0x0444, B:249:0x0447, B:251:0x044b, B:253:0x044f, B:256:0x0455, B:260:0x045e, B:266:0x046e, B:268:0x047d, B:270:0x0488, B:271:0x0490, B:272:0x0493, B:284:0x04bf, B:286:0x04ca, B:290:0x04d7, B:293:0x04e7, B:294:0x0508, B:279:0x04a3, B:281:0x04ad, B:283:0x04bc, B:282:0x04b2, B:297:0x050d, B:299:0x0517, B:301:0x051f, B:302:0x0522, B:304:0x052d, B:305:0x0531, B:307:0x053c, B:310:0x0543, B:313:0x054f, B:314:0x0554, B:317:0x0559, B:319:0x055e, B:323:0x056a, B:325:0x0572, B:327:0x0585, B:331:0x05a0, B:333:0x05a6, B:336:0x05ae, B:338:0x05b2, B:339:0x05b9, B:341:0x05be, B:342:0x05c1, B:344:0x05c9, B:347:0x05d3, B:350:0x05dd, B:351:0x05e2, B:352:0x05e7, B:353:0x0602, B:328:0x058e, B:329:0x0593, B:354:0x0603, B:356:0x0615, B:359:0x061c, B:362:0x062a, B:363:0x064b, B:41:0x00c3, B:42:0x00e1, B:45:0x00e6, B:47:0x00f1, B:49:0x00f5, B:51:0x00f9, B:54:0x00ff, B:61:0x010e, B:63:0x0116, B:66:0x0128, B:67:0x0140, B:68:0x0141, B:69:0x0146, B:80:0x015b, B:81:0x0161, B:83:0x0168, B:85:0x0173, B:92:0x0185, B:95:0x018f, B:96:0x01a7, B:90:0x0180, B:84:0x016d, B:97:0x01a8, B:98:0x01c0, B:104:0x01ca, B:106:0x01d2, B:109:0x01e5, B:110:0x0205, B:111:0x0206, B:112:0x020b, B:113:0x020c, B:115:0x0216, B:364:0x064c, B:365:0x0653, B:366:0x0654, B:367:0x0659, B:368:0x065a, B:369:0x065f), top: B:372:0x0075, inners: #1, #2 }] */
    /* JADX WARN: Removed duplicated region for block: B:273:0x0497  */
    /* JADX WARN: Removed duplicated region for block: B:286:0x04ca A[Catch: all -> 0x0081, TryCatch #0 {all -> 0x0081, blocks: (B:24:0x0075, B:26:0x0079, B:31:0x0086, B:34:0x0099, B:38:0x00af, B:117:0x0220, B:118:0x0226, B:120:0x0231, B:122:0x0239, B:126:0x024f, B:128:0x025d, B:141:0x028a, B:142:0x0292, B:144:0x029f, B:145:0x02a2, B:147:0x02ac, B:153:0x02bc, B:154:0x02c2, B:156:0x02ca, B:157:0x02cf, B:159:0x02d7, B:160:0x02e1, B:163:0x02e9, B:164:0x02f0, B:165:0x02f1, B:168:0x02fb, B:170:0x02ff, B:172:0x0305, B:173:0x0308, B:175:0x030e, B:178:0x031f, B:184:0x0339, B:188:0x0346, B:185:0x033e, B:187:0x0342, B:130:0x0264, B:132:0x026a, B:137:0x0277, B:138:0x027a, B:196:0x0357, B:200:0x0363, B:202:0x036b, B:204:0x0375, B:206:0x0386, B:208:0x0390, B:210:0x0398, B:212:0x039c, B:214:0x03a2, B:217:0x03a7, B:219:0x03ab, B:239:0x03f9, B:241:0x0401, B:244:0x040a, B:245:0x0425, B:221:0x03b0, B:223:0x03b8, B:226:0x03be, B:227:0x03cb, B:230:0x03d4, B:233:0x03da, B:236:0x03df, B:237:0x03ec, B:246:0x0426, B:247:0x0444, B:249:0x0447, B:251:0x044b, B:253:0x044f, B:256:0x0455, B:260:0x045e, B:266:0x046e, B:268:0x047d, B:270:0x0488, B:271:0x0490, B:272:0x0493, B:284:0x04bf, B:286:0x04ca, B:290:0x04d7, B:293:0x04e7, B:294:0x0508, B:279:0x04a3, B:281:0x04ad, B:283:0x04bc, B:282:0x04b2, B:297:0x050d, B:299:0x0517, B:301:0x051f, B:302:0x0522, B:304:0x052d, B:305:0x0531, B:307:0x053c, B:310:0x0543, B:313:0x054f, B:314:0x0554, B:317:0x0559, B:319:0x055e, B:323:0x056a, B:325:0x0572, B:327:0x0585, B:331:0x05a0, B:333:0x05a6, B:336:0x05ae, B:338:0x05b2, B:339:0x05b9, B:341:0x05be, B:342:0x05c1, B:344:0x05c9, B:347:0x05d3, B:350:0x05dd, B:351:0x05e2, B:352:0x05e7, B:353:0x0602, B:328:0x058e, B:329:0x0593, B:354:0x0603, B:356:0x0615, B:359:0x061c, B:362:0x062a, B:363:0x064b, B:41:0x00c3, B:42:0x00e1, B:45:0x00e6, B:47:0x00f1, B:49:0x00f5, B:51:0x00f9, B:54:0x00ff, B:61:0x010e, B:63:0x0116, B:66:0x0128, B:67:0x0140, B:68:0x0141, B:69:0x0146, B:80:0x015b, B:81:0x0161, B:83:0x0168, B:85:0x0173, B:92:0x0185, B:95:0x018f, B:96:0x01a7, B:90:0x0180, B:84:0x016d, B:97:0x01a8, B:98:0x01c0, B:104:0x01ca, B:106:0x01d2, B:109:0x01e5, B:110:0x0205, B:111:0x0206, B:112:0x020b, B:113:0x020c, B:115:0x0216, B:364:0x064c, B:365:0x0653, B:366:0x0654, B:367:0x0659, B:368:0x065a, B:369:0x065f), top: B:372:0x0075, inners: #1, #2 }] */
    /* JADX WARN: Removed duplicated region for block: B:393:0x04d3 A[SYNTHETIC] */
    /* JADX WARN: Type inference fix 'apply assigned field type' failed
    java.lang.UnsupportedOperationException: ArgType.getObject(), call class: class jadx.core.dex.instructions.args.ArgType$PrimitiveArg
    	at jadx.core.dex.instructions.args.ArgType.getObject(ArgType.java:593)
    	at jadx.core.dex.attributes.nodes.ClassTypeVarsAttr.getTypeVarsMapFor(ClassTypeVarsAttr.java:35)
    	at jadx.core.dex.nodes.utils.TypeUtils.replaceClassGenerics(TypeUtils.java:177)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.insertExplicitUseCast(FixTypesVisitor.java:397)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.tryFieldTypeWithNewCasts(FixTypesVisitor.java:359)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.applyFieldType(FixTypesVisitor.java:309)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.visit(FixTypesVisitor.java:94)
     */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final java.lang.Object R(java.util.Map r18, java.lang.Object r19) {
        /*
            Method dump skipped, instruction units count: 1636
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: g.C0474a.R(java.util.Map, java.lang.Object):java.lang.Object");
    }

    public void S(Object obj) {
        Object objB;
        Class<?> cls = obj.getClass();
        t tVarN = this.f3956r.n(cls);
        o oVar = tVarN instanceof o ? (o) tVarN : null;
        if (this.f3944H.F() != 12 && this.f3944H.F() != 16) {
            throw new C0424d("syntax error, expect {, actual " + this.f3944H.U());
        }
        while (true) {
            String strV = this.f3944H.v(this.f3955g);
            if (strV == null) {
                if (this.f3944H.F() == 13) {
                    this.f3944H.s(16);
                    return;
                } else if (this.f3944H.F() != 16 || !this.f3944H.j(EnumC0475b.AllowArbitraryCommas)) {
                }
            }
            l lVarJ = oVar != null ? oVar.j(strV) : null;
            if (lVarJ != null) {
                C0611c c0611c = lVarJ.f4139a;
                Class cls2 = c0611c.f5264y;
                Type type = c0611c.f5243H;
                if (cls2 == Integer.TYPE) {
                    this.f3944H.z(2);
                    objB = C0511D.f4218a.b(this, type, null);
                } else if (cls2 == String.class) {
                    this.f3944H.z(4);
                    objB = g0.e(this);
                } else if (cls2 == Long.TYPE) {
                    this.f3944H.z(2);
                    objB = O.f4259a.b(this, type, null);
                } else {
                    t tVarM = this.f3956r.m(cls2, type);
                    this.f3944H.z(tVarM.d());
                    objB = tVarM.b(this, type, null);
                }
                lVarJ.g(obj, objB);
                if (this.f3944H.F() != 16 && this.f3944H.F() == 13) {
                    this.f3944H.s(16);
                    return;
                }
            } else {
                if (!this.f3944H.j(EnumC0475b.IgnoreNotMatch)) {
                    throw new C0424d("setter not found, class " + cls.getName() + ", property " + strV);
                }
                this.f3944H.S();
                A();
                if (this.f3944H.F() == 13) {
                    this.f3944H.i();
                    return;
                }
            }
        }
    }

    public void U() {
        if (this.f3944H.j(EnumC0475b.DisableCircularReferenceDetect)) {
            return;
        }
        this.f3945I = this.f3945I.f3985b;
        int i2 = this.f3947M;
        if (i2 <= 0) {
            return;
        }
        int i3 = i2 - 1;
        this.f3947M = i3;
        this.f3946L[i3] = null;
    }

    /* JADX WARN: Code restructure failed: missing block: B:15:0x0022, code lost:
    
        return null;
     */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public java.lang.Object V(java.lang.String r5) {
        /*
            r4 = this;
            g.h[] r0 = r4.f3946L
            r1 = 0
            if (r0 != 0) goto L6
            return r1
        L6:
            r0 = 0
        L7:
            g.h[] r2 = r4.f3946L
            int r3 = r2.length
            if (r0 >= r3) goto L22
            int r3 = r4.f3947M
            if (r0 >= r3) goto L22
            r2 = r2[r0]
            java.lang.String r3 = r2.toString()
            boolean r3 = r3.equals(r5)
            if (r3 == 0) goto L1f
            java.lang.Object r5 = r2.f3984a
            return r5
        L1f:
            int r0 = r0 + 1
            goto L7
        L22:
            return r1
        */
        throw new UnsupportedOperationException("Method not decompiled: g.C0474a.V(java.lang.String):java.lang.Object");
    }

    public h X(h hVar, Object obj, Object obj2) {
        if (this.f3944H.j(EnumC0475b.DisableCircularReferenceDetect)) {
            return null;
        }
        h hVar2 = new h(hVar, obj, obj2);
        this.f3945I = hVar2;
        d(hVar2);
        return this.f3945I;
    }

    public h Y(Object obj, Object obj2) {
        if (this.f3944H.j(EnumC0475b.DisableCircularReferenceDetect)) {
            return null;
        }
        return X(this.f3945I, obj, obj2);
    }

    public final void a(int i2) {
        InterfaceC0476c interfaceC0476c = this.f3944H;
        if (interfaceC0476c.F() == i2) {
            interfaceC0476c.i();
            return;
        }
        throw new C0424d("syntax error, expect " + g.a(i2) + ", actual " + g.a(interfaceC0476c.F()));
    }

    public void a0(h hVar) {
        if (this.f3944H.j(EnumC0475b.DisableCircularReferenceDetect)) {
            return;
        }
        this.f3945I = hVar;
    }

    public void b(String str) {
        InterfaceC0476c interfaceC0476c = this.f3944H;
        interfaceC0476c.S();
        if (interfaceC0476c.F() != 4) {
            throw new C0424d("type not match error");
        }
        if (!str.equals(interfaceC0476c.A())) {
            throw new C0424d("type not match error");
        }
        interfaceC0476c.i();
        if (interfaceC0476c.F() == 16) {
            interfaceC0476c.i();
        }
    }

    public void c0(String str) {
        this.f3957x = str;
        this.f3958y = null;
    }

    @Override // java.io.Closeable, java.lang.AutoCloseable
    public void close() {
        InterfaceC0476c interfaceC0476c = this.f3944H;
        try {
            if (interfaceC0476c.j(EnumC0475b.AutoCloseSource) && interfaceC0476c.F() != 20) {
                throw new C0424d("not close json text, token : " + g.a(interfaceC0476c.F()));
            }
        } finally {
            interfaceC0476c.close();
        }
    }

    public void e(C0072a c0072a) {
        if (this.f3948Q == null) {
            this.f3948Q = new ArrayList(2);
        }
        this.f3948Q.add(c0072a);
    }

    public void e0(int i2) {
        this.f3949Z = i2;
    }

    public void f(Collection collection) {
        if (this.f3949Z == 1) {
            if (!(collection instanceof List)) {
                C0072a c0072aQ = q();
                c0072aQ.f3961c = new y(collection);
                c0072aQ.f3962d = this.f3945I;
                e0(0);
                return;
            }
            int size = collection.size() - 1;
            C0072a c0072aQ2 = q();
            c0072aQ2.f3961c = new y(this, (List) collection, size);
            c0072aQ2.f3962d = this.f3945I;
            e0(0);
        }
    }

    public void h(Map map, Object obj) {
        if (this.f3949Z == 1) {
            y yVar = new y(map, obj);
            C0072a c0072aQ = q();
            c0072aQ.f3961c = yVar;
            c0072aQ.f3962d = this.f3945I;
            e0(0);
        }
    }

    public i i() {
        return this.f3956r;
    }

    public h j() {
        return this.f3945I;
    }

    public String l() {
        return this.f3957x;
    }

    public DateFormat m() {
        if (this.f3958y == null) {
            SimpleDateFormat simpleDateFormat = new SimpleDateFormat(this.f3957x, this.f3944H.X());
            this.f3958y = simpleDateFormat;
            simpleDateFormat.setTimeZone(this.f3944H.getTimeZone());
        }
        return this.f3958y;
    }

    public m n() {
        return null;
    }

    public C0072a q() {
        return (C0072a) this.f3948Q.get(r0.size() - 1);
    }

    public InterfaceC0476c s() {
        return this.f3944H;
    }

    public Object t(String str) {
        for (int i2 = 0; i2 < this.f3947M; i2++) {
            if (str.equals(this.f3946L[i2].toString())) {
                return this.f3946L[i2].f3984a;
            }
        }
        return null;
    }

    public int u() {
        return this.f3949Z;
    }

    public j v() {
        return this.f3955g;
    }

    public void w(Object obj) {
        Object objF;
        C0611c c0611c;
        List list = this.f3948Q;
        if (list == null) {
            return;
        }
        int size = list.size();
        for (int i2 = 0; i2 < size; i2++) {
            C0072a c0072a = (C0072a) this.f3948Q.get(i2);
            String str = c0072a.f3960b;
            h hVar = c0072a.f3962d;
            Object obj2 = hVar != null ? hVar.f3984a : null;
            if (str.startsWith("$")) {
                objF = t(str);
                if (objF == null) {
                    try {
                        C0427g c0427gC = C0427g.c(str);
                        if (c0427gC.o()) {
                            objF = c0427gC.f(obj);
                        }
                    } catch (C0435h unused) {
                    }
                }
            } else {
                objF = c0072a.f3959a.f3984a;
            }
            l lVar = c0072a.f3961c;
            if (lVar != null) {
                if (objF != null && objF.getClass() == C0425e.class && (c0611c = lVar.f4139a) != null && !Map.class.isAssignableFrom(c0611c.f5264y)) {
                    Object obj3 = this.f3946L[0].f3984a;
                    C0427g c0427gC2 = C0427g.c(str);
                    if (c0427gC2.o()) {
                        objF = c0427gC2.f(obj3);
                    }
                }
                lVar.g(obj2, objF);
            }
        }
    }

    public boolean z(EnumC0475b enumC0475b) {
        return this.f3944H.j(enumC0475b);
    }

    public C0474a(String str, i iVar) {
        this(str, new f(str, AbstractC0421a.f3668H), iVar);
    }

    public C0474a(String str, i iVar, int i2) {
        this(str, new f(str, i2), iVar);
    }

    public C0474a(Object obj, InterfaceC0476c interfaceC0476c, i iVar) {
        this.f3957x = AbstractC0421a.f3677y;
        this.f3947M = 0;
        this.f3949Z = 0;
        this.f3950a0 = null;
        this.f3952b0 = null;
        this.f3953c0 = 0;
        this.f3954d0 = null;
        this.f3944H = interfaceC0476c;
        this.f3951b = obj;
        this.f3956r = iVar;
        this.f3955g = iVar.f4005e;
        char cL = interfaceC0476c.L();
        if (cL == '{') {
            interfaceC0476c.next();
            ((d) interfaceC0476c).f3973b = 12;
        } else if (cL == '[') {
            interfaceC0476c.next();
            ((d) interfaceC0476c).f3973b = 14;
        } else {
            interfaceC0476c.i();
        }
    }
}
