package vn;

import hp.d1;
import hp.k1;
import hp.m1;
import hp.p1;
import hp.t1;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import tn.e1;
import tn.g1;
import tn.w0;
import tn.z0;

/* loaded from: classes3.dex */
public class s extends t {

    /* renamed from: q, reason: collision with root package name */
    private final t f40346q;

    /* renamed from: r, reason: collision with root package name */
    private final m1 f40347r;

    /* renamed from: s, reason: collision with root package name */
    private m1 f40348s;

    /* renamed from: t, reason: collision with root package name */
    private List f40349t;

    /* renamed from: u, reason: collision with root package name */
    private List f40350u;

    /* renamed from: v, reason: collision with root package name */
    private d1 f40351v;

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes3.dex */
    public class a implements dn.l {
        a() {
        }

        @Override // dn.l
        /* renamed from: a, reason: merged with bridge method [inline-methods] */
        public Boolean invoke(e1 e1Var) {
            return Boolean.valueOf(!e1Var.i0());
        }
    }

    /* loaded from: classes3.dex */
    class b implements dn.l {
        b() {
        }

        @Override // dn.l
        /* renamed from: a, reason: merged with bridge method [inline-methods] */
        public hp.m0 invoke(hp.m0 m0Var) {
            return s.this.J0(m0Var);
        }
    }

    public s(t tVar, m1 m1Var) {
        this.f40346q = tVar;
        this.f40347r = m1Var;
    }

    private m1 H0() {
        List Y;
        if (this.f40348s == null) {
            if (this.f40347r.k()) {
                this.f40348s = this.f40347r;
            } else {
                List parameters = this.f40346q.j().getParameters();
                this.f40349t = new ArrayList(parameters.size());
                this.f40348s = hp.s.b(parameters, this.f40347r.j(), this, this.f40349t);
                Y = sm.c0.Y(this.f40349t, new a());
                this.f40350u = Y;
            }
        }
        return this.f40348s;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public hp.m0 J0(hp.m0 m0Var) {
        return (m0Var == null || this.f40347r.k()) ? m0Var : (hp.m0) H0().p(m0Var, t1.INVARIANT);
    }

    /* JADX WARN: Removed duplicated region for block: B:32:0x0069  */
    /* JADX WARN: Removed duplicated region for block: B:34:0x00c6 A[ADDED_TO_REGION] */
    /* JADX WARN: Removed duplicated region for block: B:44:0x00e3 A[ADDED_TO_REGION] */
    /* JADX WARN: Removed duplicated region for block: B:58:0x006e  */
    /* JADX WARN: Removed duplicated region for block: B:59:0x0073  */
    /* JADX WARN: Removed duplicated region for block: B:60:0x0078  */
    /* JADX WARN: Removed duplicated region for block: B:61:0x007d  */
    /* JADX WARN: Removed duplicated region for block: B:62:0x0082  */
    /* JADX WARN: Removed duplicated region for block: B:63:0x0087  */
    /* JADX WARN: Removed duplicated region for block: B:64:0x008c  */
    /* JADX WARN: Removed duplicated region for block: B:65:0x0091  */
    /* JADX WARN: Removed duplicated region for block: B:66:0x0094  */
    /* JADX WARN: Removed duplicated region for block: B:67:0x0099  */
    /* JADX WARN: Removed duplicated region for block: B:68:0x009e  */
    /* JADX WARN: Removed duplicated region for block: B:69:0x00a3  */
    /* JADX WARN: Removed duplicated region for block: B:70:0x00a8  */
    /* JADX WARN: Removed duplicated region for block: B:71:0x00ad  */
    /* JADX WARN: Removed duplicated region for block: B:72:0x00b2  */
    /* JADX WARN: Removed duplicated region for block: B:73:0x00b7  */
    /* JADX WARN: Removed duplicated region for block: B:74:0x00bc  */
    /* JADX WARN: Removed duplicated region for block: B:75:0x00bf  */
    /* JADX WARN: Removed duplicated region for block: B:76:0x00c2  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    private static /* synthetic */ void x0(int i10) {
        String format;
        String str = (i10 == 2 || i10 == 3 || i10 == 5 || i10 == 6 || i10 == 8 || i10 == 10 || i10 == 13 || i10 == 23) ? "Argument for @NotNull parameter '%s' of %s.%s must not be null" : "@NotNull method %s.%s must not return null";
        Object[] objArr = new Object[(i10 == 2 || i10 == 3 || i10 == 5 || i10 == 6 || i10 == 8 || i10 == 10 || i10 == 13 || i10 == 23) ? 3 : 2];
        if (i10 != 2) {
            if (i10 != 3) {
                if (i10 != 5) {
                    if (i10 != 6) {
                        if (i10 != 8) {
                            if (i10 != 10) {
                                if (i10 != 13) {
                                    if (i10 != 23) {
                                        objArr[0] = "kotlin/reflect/jvm/internal/impl/descriptors/impl/LazySubstitutingClassDescriptor";
                                    } else {
                                        objArr[0] = "substitutor";
                                    }
                                    switch (i10) {
                                        case 2:
                                        case 3:
                                        case 5:
                                        case 6:
                                        case 8:
                                        case 10:
                                        case 13:
                                        case 23:
                                            objArr[1] = "kotlin/reflect/jvm/internal/impl/descriptors/impl/LazySubstitutingClassDescriptor";
                                            break;
                                        case 4:
                                        case 7:
                                        case 9:
                                        case 11:
                                            objArr[1] = "getMemberScope";
                                            break;
                                        case 12:
                                        case 14:
                                            objArr[1] = "getUnsubstitutedMemberScope";
                                            break;
                                        case 15:
                                            objArr[1] = "getStaticScope";
                                            break;
                                        case 16:
                                            objArr[1] = "getDefaultType";
                                            break;
                                        case 17:
                                            objArr[1] = "getContextReceivers";
                                            break;
                                        case 18:
                                            objArr[1] = "getConstructors";
                                            break;
                                        case 19:
                                            objArr[1] = "getAnnotations";
                                            break;
                                        case 20:
                                            objArr[1] = "getName";
                                            break;
                                        case 21:
                                            objArr[1] = "getOriginal";
                                            break;
                                        case 22:
                                            objArr[1] = "getContainingDeclaration";
                                            break;
                                        case 24:
                                            objArr[1] = "substitute";
                                            break;
                                        case 25:
                                            objArr[1] = "getKind";
                                            break;
                                        case 26:
                                            objArr[1] = "getModality";
                                            break;
                                        case 27:
                                            objArr[1] = "getVisibility";
                                            break;
                                        case 28:
                                            objArr[1] = "getUnsubstitutedInnerClassesScope";
                                            break;
                                        case 29:
                                            objArr[1] = "getSource";
                                            break;
                                        case 30:
                                            objArr[1] = "getDeclaredTypeParameters";
                                            break;
                                        case 31:
                                            objArr[1] = "getSealedSubclasses";
                                            break;
                                        default:
                                            objArr[1] = "getTypeConstructor";
                                            break;
                                    }
                                    if (i10 != 2 || i10 == 3 || i10 == 5 || i10 == 6 || i10 == 8 || i10 == 10) {
                                        objArr[2] = "getMemberScope";
                                    } else if (i10 == 13) {
                                        objArr[2] = "getUnsubstitutedMemberScope";
                                    } else if (i10 == 23) {
                                        objArr[2] = "substitute";
                                    }
                                    format = String.format(str, objArr);
                                    if (i10 == 2 && i10 != 3 && i10 != 5 && i10 != 6 && i10 != 8 && i10 != 10 && i10 != 13 && i10 != 23) {
                                        throw new IllegalStateException(format);
                                    }
                                    throw new IllegalArgumentException(format);
                                }
                            }
                        }
                    }
                }
                objArr[0] = "typeSubstitution";
                switch (i10) {
                }
                if (i10 != 2) {
                }
                objArr[2] = "getMemberScope";
                format = String.format(str, objArr);
                if (i10 == 2) {
                }
                throw new IllegalArgumentException(format);
            }
            objArr[0] = "kotlinTypeRefiner";
            switch (i10) {
            }
            if (i10 != 2) {
            }
            objArr[2] = "getMemberScope";
            format = String.format(str, objArr);
            if (i10 == 2) {
            }
            throw new IllegalArgumentException(format);
        }
        objArr[0] = "typeArguments";
        switch (i10) {
        }
        if (i10 != 2) {
        }
        objArr[2] = "getMemberScope";
        format = String.format(str, objArr);
        if (i10 == 2) {
        }
        throw new IllegalArgumentException(format);
    }

    @Override // tn.m
    public Object A0(tn.o oVar, Object obj) {
        return oVar.a(this, obj);
    }

    @Override // tn.e
    public ap.h B0() {
        ap.h q02 = q0(xo.c.o(to.f.g(this.f40346q)));
        if (q02 == null) {
            x0(12);
        }
        return q02;
    }

    @Override // tn.c0
    public boolean C0() {
        return this.f40346q.C0();
    }

    @Override // vn.t
    public ap.h D(k1 k1Var, kotlin.reflect.jvm.internal.impl.types.checker.g gVar) {
        if (k1Var == null) {
            x0(5);
        }
        if (gVar == null) {
            x0(6);
        }
        ap.h D = this.f40346q.D(k1Var, gVar);
        if (!this.f40347r.k()) {
            return new ap.m(D, H0());
        }
        if (D == null) {
            x0(7);
        }
        return D;
    }

    @Override // tn.e
    public List E0() {
        List emptyList = Collections.emptyList();
        if (emptyList == null) {
            x0(17);
        }
        return emptyList;
    }

    @Override // tn.e
    public Collection F() {
        Collection F = this.f40346q.F();
        if (F == null) {
            x0(31);
        }
        return F;
    }

    @Override // tn.e
    public boolean F0() {
        return this.f40346q.F0();
    }

    @Override // tn.e
    public boolean G() {
        return this.f40346q.G();
    }

    @Override // tn.e
    public w0 G0() {
        throw new UnsupportedOperationException();
    }

    @Override // tn.c0
    public boolean H() {
        return this.f40346q.H();
    }

    @Override // tn.i
    public boolean I() {
        return this.f40346q.I();
    }

    @Override // tn.b1
    /* renamed from: I0, reason: merged with bridge method [inline-methods] */
    public tn.e c(m1 m1Var) {
        if (m1Var == null) {
            x0(23);
        }
        return m1Var.k() ? this : new s(this, m1.h(m1Var.j(), H0().j()));
    }

    @Override // tn.e
    public tn.d N() {
        return this.f40346q.N();
    }

    @Override // tn.e
    public ap.h O() {
        ap.h O = this.f40346q.O();
        if (O == null) {
            x0(15);
        }
        return O;
    }

    @Override // tn.e
    public tn.e Q() {
        return this.f40346q.Q();
    }

    @Override // tn.e, tn.n, tn.m
    public tn.m b() {
        tn.m b10 = this.f40346q.b();
        if (b10 == null) {
            x0(22);
        }
        return b10;
    }

    @Override // tn.e
    public tn.f g() {
        tn.f g10 = this.f40346q.g();
        if (g10 == null) {
            x0(25);
        }
        return g10;
    }

    @Override // kotlin.reflect.jvm.internal.impl.descriptors.annotations.a
    public kotlin.reflect.jvm.internal.impl.descriptors.annotations.g getAnnotations() {
        kotlin.reflect.jvm.internal.impl.descriptors.annotations.g annotations = this.f40346q.getAnnotations();
        if (annotations == null) {
            x0(19);
        }
        return annotations;
    }

    @Override // tn.i0
    public ro.f getName() {
        ro.f name = this.f40346q.getName();
        if (name == null) {
            x0(20);
        }
        return name;
    }

    @Override // tn.p
    public z0 getSource() {
        z0 z0Var = z0.f36441a;
        if (z0Var == null) {
            x0(29);
        }
        return z0Var;
    }

    @Override // tn.e, tn.q, tn.c0
    public tn.u getVisibility() {
        tn.u visibility = this.f40346q.getVisibility();
        if (visibility == null) {
            x0(27);
        }
        return visibility;
    }

    @Override // tn.e
    public Collection h() {
        Collection<tn.d> h10 = this.f40346q.h();
        ArrayList arrayList = new ArrayList(h10.size());
        for (tn.d dVar : h10) {
            arrayList.add(((tn.d) dVar.r().m(dVar.a()).r(dVar.k()).k(dVar.getVisibility()).c(dVar.g()).g(false).build()).c(H0()));
        }
        return arrayList;
    }

    @Override // tn.c0
    public boolean isExternal() {
        return this.f40346q.isExternal();
    }

    @Override // tn.e
    public boolean isInline() {
        return this.f40346q.isInline();
    }

    @Override // tn.h
    public d1 j() {
        d1 j10 = this.f40346q.j();
        if (this.f40347r.k()) {
            if (j10 == null) {
                x0(0);
            }
            return j10;
        }
        if (this.f40351v == null) {
            m1 H0 = H0();
            Collection n10 = j10.n();
            ArrayList arrayList = new ArrayList(n10.size());
            Iterator it = n10.iterator();
            while (it.hasNext()) {
                arrayList.add(H0.p((hp.e0) it.next(), t1.INVARIANT));
            }
            this.f40351v = new hp.k(this, this.f40349t, arrayList, gp.f.f20113e);
        }
        d1 d1Var = this.f40351v;
        if (d1Var == null) {
            x0(1);
        }
        return d1Var;
    }

    @Override // tn.e, tn.c0
    public tn.d0 k() {
        tn.d0 k10 = this.f40346q.k();
        if (k10 == null) {
            x0(26);
        }
        return k10;
    }

    @Override // tn.e
    public ap.h k0(k1 k1Var) {
        if (k1Var == null) {
            x0(10);
        }
        ap.h D = D(k1Var, xo.c.o(to.f.g(this)));
        if (D == null) {
            x0(11);
        }
        return D;
    }

    @Override // tn.e, tn.h
    public hp.m0 q() {
        hp.m0 k10 = hp.f0.k(hp.n.f21983a.a(getAnnotations(), null, null), j(), p1.g(j().getParameters()), false, B0());
        if (k10 == null) {
            x0(16);
        }
        return k10;
    }

    @Override // vn.t
    public ap.h q0(kotlin.reflect.jvm.internal.impl.types.checker.g gVar) {
        if (gVar == null) {
            x0(13);
        }
        ap.h q02 = this.f40346q.q0(gVar);
        if (!this.f40347r.k()) {
            return new ap.m(q02, H0());
        }
        if (q02 == null) {
            x0(14);
        }
        return q02;
    }

    @Override // tn.e, tn.i
    public List s() {
        H0();
        List list = this.f40350u;
        if (list == null) {
            x0(30);
        }
        return list;
    }

    @Override // tn.e
    public boolean v() {
        return this.f40346q.v();
    }

    @Override // tn.e
    public ap.h v0() {
        ap.h v02 = this.f40346q.v0();
        if (v02 == null) {
            x0(28);
        }
        return v02;
    }

    @Override // tn.e
    public g1 w0() {
        g1 w02 = this.f40346q.w0();
        if (w02 == null) {
            return null;
        }
        return w02.c(new b());
    }

    @Override // tn.e
    public boolean y() {
        return this.f40346q.y();
    }

    @Override // tn.m
    public tn.e a() {
        tn.e a10 = this.f40346q.a();
        if (a10 == null) {
            x0(21);
        }
        return a10;
    }
}
