package h.b.o;

import h.b.m.k;
import java.lang.annotation.Annotation;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;

/* JADX INFO: compiled from: PluginGeneratedSerialDescriptor.kt */
/* JADX INFO: loaded from: classes.dex */
@g.i
public class z0 implements h.b.m.e, l {
    public final String a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final b0<?> f4470b;

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

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

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

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

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

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

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

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

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

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

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

    /* JADX INFO: compiled from: PluginGeneratedSerialDescriptor.kt */
    @g.i
    public static final class b extends g.h0.c.m implements g.h0.b.a<h.b.b<?>[]> {
        public b() {
            super(0);
        }

        @Override // g.h0.b.a
        public h.b.b<?>[] invoke() {
            h.b.b<?>[] bVarArrE;
            b0<?> b0Var = z0.this.f4470b;
            return (b0Var == null || (bVarArrE = b0Var.e()) == null) ? a1.a : bVarArrE;
        }
    }

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

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

    /* JADX INFO: compiled from: PluginGeneratedSerialDescriptor.kt */
    @g.i
    public static final class d extends g.h0.c.m implements g.h0.b.a<h.b.m.e[]> {
        public d() {
            super(0);
        }

        @Override // g.h0.b.a
        public h.b.m.e[] invoke() {
            ArrayList arrayList;
            h.b.b<?>[] bVarArrB;
            b0<?> b0Var = z0.this.f4470b;
            if (b0Var == null || (bVarArrB = b0Var.b()) == null) {
                arrayList = null;
            } else {
                arrayList = new ArrayList(bVarArrB.length);
                for (h.b.b<?> bVar : bVarArrB) {
                    arrayList.add(bVar.a());
                }
            }
            return y0.b(arrayList);
        }
    }

    public z0(String str, b0<?> b0Var, int i2) {
        g.h0.c.l.f(str, "serialName");
        this.a = str;
        this.f4470b = b0Var;
        this.f4471c = i2;
        this.f4472d = -1;
        String[] strArr = new String[i2];
        for (int i3 = 0; i3 < i2; i3++) {
            strArr[i3] = "[UNINITIALIZED]";
        }
        this.f4473e = strArr;
        int i4 = this.f4471c;
        this.f4474f = new List[i4];
        this.f4475g = new boolean[i4];
        g.c0.g.i();
        this.f4476h = g.c0.m.f4068b;
        g.h hVar = g.h.PUBLICATION;
        this.f4477i = f.a.y.a.u0(hVar, new b());
        this.f4478j = f.a.y.a.u0(hVar, new d());
        this.f4479k = f.a.y.a.u0(hVar, new a());
    }

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

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

    @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.f4476h.get(str);
        if (num != null) {
            return num.intValue();
        }
        return -3;
    }

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

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj instanceof z0) {
            h.b.m.e eVar = (h.b.m.e) obj;
            if (g.h0.c.l.a(a(), eVar.a()) && Arrays.equals(l(), ((z0) obj).l()) && 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 final int f() {
        return this.f4471c;
    }

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

    @Override // h.b.m.e
    public List<Annotation> getAnnotations() {
        return g.c0.l.f4067b;
    }

    @Override // h.b.m.e
    public List<Annotation> h(int i2) {
        List<Annotation> list = this.f4474f[i2];
        return list == null ? g.c0.l.f4067b : list;
    }

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

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

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

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

    public final void k(String str, boolean z) {
        g.h0.c.l.f(str, "name");
        String[] strArr = this.f4473e;
        int i2 = this.f4472d + 1;
        this.f4472d = i2;
        strArr[i2] = str;
        this.f4475g[i2] = z;
        this.f4474f[i2] = null;
        if (i2 == this.f4471c - 1) {
            HashMap map = new HashMap();
            int length = this.f4473e.length;
            for (int i3 = 0; i3 < length; i3++) {
                map.put(this.f4473e[i3], Integer.valueOf(i3));
            }
            this.f4476h = map;
        }
    }

    public final h.b.m.e[] l() {
        return (h.b.m.e[]) this.f4478j.getValue();
    }

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