package h;

import g.C0474a;
import g.InterfaceC0476c;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.lang.reflect.WildcardType;
import java.util.ArrayList;
import java.util.Map;
import l.C0611c;

/* JADX INFO: renamed from: h.c, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public class C0501c extends l {

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    private final Type f4128c;

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

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    private t f4130e;

    public C0501c(g.i iVar, Class cls, C0611c c0611c) {
        super(cls, c0611c);
        Type type = c0611c.f5243H;
        if (!(type instanceof ParameterizedType)) {
            this.f4128c = Object.class;
            return;
        }
        Type type2 = ((ParameterizedType) type).getActualTypeArguments()[0];
        if (type2 instanceof WildcardType) {
            Type[] upperBounds = ((WildcardType) type2).getUpperBounds();
            if (upperBounds.length == 1) {
                type2 = upperBounds[0];
            }
        }
        this.f4128c = type2;
    }

    @Override // h.l
    public int b() {
        return 14;
    }

    @Override // h.l
    public void c(C0474a c0474a, Object obj, Type type, Map map) {
        InterfaceC0476c interfaceC0476c = c0474a.f3944H;
        int iF = interfaceC0476c.F();
        if (iF == 8 || (iF == 4 && interfaceC0476c.A().length() == 0)) {
            if (obj == null) {
                map.put(this.f4139a.f5250b, null);
                return;
            } else {
                h(obj, null);
                return;
            }
        }
        ArrayList arrayList = new ArrayList();
        g.h hVarJ = c0474a.j();
        c0474a.X(hVarJ, obj, this.f4139a.f5250b);
        j(c0474a, type, arrayList);
        c0474a.a0(hVarJ);
        if (obj == null) {
            map.put(this.f4139a.f5250b, arrayList);
        } else {
            g(obj, arrayList);
        }
    }

    /* JADX WARN: Removed duplicated region for block: B:18:0x0049  */
    /* JADX WARN: Removed duplicated region for block: B:39:0x00ac  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final void j(g.C0474a r13, java.lang.reflect.Type r14, java.util.Collection r15) {
        /*
            Method dump skipped, instruction units count: 372
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: h.C0501c.j(g.a, java.lang.reflect.Type, java.util.Collection):void");
    }
}
