package l3;

import i3.C0639g;
import java.io.IOException;
import java.util.Iterator;
import java.util.LinkedHashMap;
import n3.AbstractC0916c;
import q3.C0957b;

/* JADX INFO: loaded from: classes.dex */
public abstract class o extends i3.k {

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

    public o(LinkedHashMap linkedHashMap) {
        this.f8945a = linkedHashMap;
    }

    @Override // i3.k
    public final Object a(C0957b c0957b) throws IOException {
        if (c0957b.G() == 9) {
            c0957b.C();
            return null;
        }
        Object objC = c();
        try {
            c0957b.e();
            while (c0957b.t()) {
                n nVar = (n) this.f8945a.get(c0957b.A());
                if (nVar == null || !nVar.f8938e) {
                    c0957b.M();
                } else {
                    e(objC, c0957b, nVar);
                }
            }
            c0957b.l();
            return d(objC);
        } catch (IllegalAccessException e2) {
            b5.a aVar = AbstractC0916c.f9360a;
            throw new RuntimeException("Unexpected IllegalAccessException occurred (Gson 2.10.1). Certain ReflectionAccessFilter features require Java >= 9 to work correctly. If you are not using ReflectionAccessFilter, report this to the Gson maintainers.", e2);
        } catch (IllegalStateException e6) {
            throw new C0639g(e6);
        }
    }

    @Override // i3.k
    public final void b(q3.c cVar, Object obj) throws IOException {
        if (obj == null) {
            cVar.o();
            return;
        }
        cVar.f();
        try {
            Iterator it = this.f8945a.values().iterator();
            while (it.hasNext()) {
                ((n) it.next()).a(cVar, obj);
            }
            cVar.l();
        } catch (IllegalAccessException e2) {
            b5.a aVar = AbstractC0916c.f9360a;
            throw new RuntimeException("Unexpected IllegalAccessException occurred (Gson 2.10.1). Certain ReflectionAccessFilter features require Java >= 9 to work correctly. If you are not using ReflectionAccessFilter, report this to the Gson maintainers.", e2);
        }
    }

    public abstract Object c();

    public abstract Object d(Object obj);

    public abstract void e(Object obj, C0957b c0957b, n nVar);
}
