package h.b.m;

import g.c0.o;
import g.c0.p;
import g.c0.q;
import g.h0.c.m;
import h.b.o.l;
import h.b.o.y0;
import java.lang.annotation.Annotation;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;

/* JADX INFO: compiled from: SerialDescriptors.kt */
/* JADX INFO: loaded from: classes.dex */
@g.i
public final class f implements e, l {
    public final String a;

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

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final int f4362c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final List<Annotation> f4363d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final Set<String> f4364e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public final String[] f4365f;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public final e[] f4366g;

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public final List<Annotation>[] f4367h;

    /* JADX INFO: renamed from: i, reason: collision with root package name */
    public final boolean[] f4368i;

    /* JADX INFO: renamed from: j, reason: collision with root package name */
    public final Map<String, Integer> f4369j;

    /* JADX INFO: renamed from: k, reason: collision with root package name */
    public final e[] f4370k;

    /* JADX INFO: renamed from: l, reason: collision with root package name */
    public final g.g f4371l;

    /* JADX INFO: compiled from: SerialDescriptors.kt */
    @g.i
    public static final class a extends m implements g.h0.b.a<Integer> {
        public a() {
            super(0);
        }

        @Override // g.h0.b.a
        public Integer invoke() {
            f fVar = f.this;
            return Integer.valueOf(f.a.y.a.k0(fVar, fVar.f4370k));
        }
    }

    /* JADX INFO: compiled from: SerialDescriptors.kt */
    @g.i
    public static final class b extends m implements g.h0.b.l<Integer, CharSequence> {
        public b() {
            super(1);
        }

        @Override // g.h0.b.l
        public CharSequence invoke(Integer num) {
            int iIntValue = num.intValue();
            return f.this.f4365f[iIntValue] + ": " + f.this.f4366g[iIntValue].a();
        }
    }

    public f(String str, j jVar, int i2, List<? extends e> list, h.b.m.a aVar) {
        g.h0.c.l.f(str, "serialName");
        g.h0.c.l.f(jVar, "kind");
        g.h0.c.l.f(list, "typeParameters");
        g.h0.c.l.f(aVar, "builder");
        this.a = str;
        this.f4361b = jVar;
        this.f4362c = i2;
        this.f4363d = aVar.a;
        List<String> list2 = aVar.f4354b;
        g.h0.c.l.f(list2, "<this>");
        HashSet hashSet = new HashSet(f.a.y.a.x0(f.a.y.a.C(list2, 12)));
        g.c0.g.E(list2, hashSet);
        this.f4364e = hashSet;
        int i3 = 0;
        Object[] array = aVar.f4354b.toArray(new String[0]);
        g.h0.c.l.d(array, "null cannot be cast to non-null type kotlin.Array<T of kotlin.collections.ArraysKt__ArraysJVMKt.toTypedArray>");
        this.f4365f = (String[]) array;
        this.f4366g = y0.b(aVar.f4356d);
        Object[] array2 = aVar.f4357e.toArray(new List[0]);
        g.h0.c.l.d(array2, "null cannot be cast to non-null type kotlin.Array<T of kotlin.collections.ArraysKt__ArraysJVMKt.toTypedArray>");
        this.f4367h = (List[]) array2;
        List<Boolean> list3 = aVar.f4358f;
        g.h0.c.l.f(list3, "<this>");
        boolean[] zArr = new boolean[list3.size()];
        Iterator<Boolean> it = list3.iterator();
        while (it.hasNext()) {
            zArr[i3] = it.next().booleanValue();
            i3++;
        }
        this.f4368i = zArr;
        String[] strArr = this.f4365f;
        g.h0.c.l.f(strArr, "<this>");
        p pVar = new p(new g.c0.h(strArr));
        ArrayList arrayList = new ArrayList(f.a.y.a.C(pVar, 10));
        Iterator it2 = pVar.iterator();
        while (true) {
            q qVar = (q) it2;
            if (!qVar.hasNext()) {
                this.f4369j = g.c0.g.G(arrayList);
                this.f4370k = y0.b(list);
                this.f4371l = f.a.y.a.v0(new a());
                return;
            }
            o oVar = (o) qVar.next();
            arrayList.add(new g.k(oVar.f4070b, Integer.valueOf(oVar.a)));
        }
    }

    @Override // h.b.m.e
    public String a() {
        return this.a;
    }

    @Override // h.b.o.l
    public Set<String> b() {
        return this.f4364e;
    }

    @Override // h.b.m.e
    public boolean c() {
        return false;
    }

    @Override // h.b.m.e
    public int d(String str) {
        g.h0.c.l.f(str, "name");
        Integer num = this.f4369j.get(str);
        if (num != null) {
            return num.intValue();
        }
        return -3;
    }

    @Override // h.b.m.e
    public j e() {
        return this.f4361b;
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj instanceof f) {
            e eVar = (e) obj;
            if (g.h0.c.l.a(a(), eVar.a()) && Arrays.equals(this.f4370k, ((f) obj).f4370k) && f() == eVar.f()) {
                int iF = f();
                for (int i2 = 0; i2 < iF; i2++) {
                    if (g.h0.c.l.a(i(i2).a(), eVar.i(i2).a()) && g.h0.c.l.a(i(i2).e(), eVar.i(i2).e())) {
                    }
                }
                return true;
            }
        }
        return false;
    }

    @Override // h.b.m.e
    public int f() {
        return this.f4362c;
    }

    @Override // h.b.m.e
    public String g(int i2) {
        return this.f4365f[i2];
    }

    @Override // h.b.m.e
    public List<Annotation> getAnnotations() {
        return this.f4363d;
    }

    @Override // h.b.m.e
    public List<Annotation> h(int i2) {
        return this.f4367h[i2];
    }

    public int hashCode() {
        return ((Number) this.f4371l.getValue()).intValue();
    }

    @Override // h.b.m.e
    public e i(int i2) {
        return this.f4366g[i2];
    }

    @Override // h.b.m.e
    public boolean isInline() {
        return false;
    }

    @Override // h.b.m.e
    public boolean j(int i2) {
        return this.f4368i[i2];
    }

    public String toString() {
        return g.c0.g.r(g.j0.l.d(0, this.f4362c), ", ", d.b.a.a.a.u(new StringBuilder(), this.a, '('), ")", 0, null, new b(), 24);
    }
}
