package nn;

import ap.k;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import kotlin.Metadata;
import kotlin.jvm.internal.v0;
import kotlin.reflect.jvm.internal.impl.protobuf.i;
import lo.a;
import nn.j0;
import nn.r;
import sm.x0;
import tn.e1;
import tn.t0;
import tn.z0;

/* loaded from: classes3.dex */
public final class o extends r implements kn.d, p, g0 {

    /* renamed from: s, reason: collision with root package name */
    private final Class f30238s;

    /* renamed from: t, reason: collision with root package name */
    private final rm.o f30239t;

    /* loaded from: classes3.dex */
    public final class a extends r.b {

        /* renamed from: w, reason: collision with root package name */
        static final /* synthetic */ kn.l[] f30240w = {kotlin.jvm.internal.p0.h(new kotlin.jvm.internal.g0(kotlin.jvm.internal.p0.b(a.class), "descriptor", "getDescriptor()Lorg/jetbrains/kotlin/descriptors/ClassDescriptor;")), kotlin.jvm.internal.p0.h(new kotlin.jvm.internal.g0(kotlin.jvm.internal.p0.b(a.class), "annotations", "getAnnotations()Ljava/util/List;")), kotlin.jvm.internal.p0.h(new kotlin.jvm.internal.g0(kotlin.jvm.internal.p0.b(a.class), "simpleName", "getSimpleName()Ljava/lang/String;")), kotlin.jvm.internal.p0.h(new kotlin.jvm.internal.g0(kotlin.jvm.internal.p0.b(a.class), "qualifiedName", "getQualifiedName()Ljava/lang/String;")), kotlin.jvm.internal.p0.h(new kotlin.jvm.internal.g0(kotlin.jvm.internal.p0.b(a.class), "constructors", "getConstructors()Ljava/util/Collection;")), kotlin.jvm.internal.p0.h(new kotlin.jvm.internal.g0(kotlin.jvm.internal.p0.b(a.class), "nestedClasses", "getNestedClasses()Ljava/util/Collection;")), kotlin.jvm.internal.p0.h(new kotlin.jvm.internal.g0(kotlin.jvm.internal.p0.b(a.class), "typeParameters", "getTypeParameters()Ljava/util/List;")), kotlin.jvm.internal.p0.h(new kotlin.jvm.internal.g0(kotlin.jvm.internal.p0.b(a.class), "supertypes", "getSupertypes()Ljava/util/List;")), kotlin.jvm.internal.p0.h(new kotlin.jvm.internal.g0(kotlin.jvm.internal.p0.b(a.class), "sealedSubclasses", "getSealedSubclasses()Ljava/util/List;")), kotlin.jvm.internal.p0.h(new kotlin.jvm.internal.g0(kotlin.jvm.internal.p0.b(a.class), "declaredNonStaticMembers", "getDeclaredNonStaticMembers()Ljava/util/Collection;")), kotlin.jvm.internal.p0.h(new kotlin.jvm.internal.g0(kotlin.jvm.internal.p0.b(a.class), "declaredStaticMembers", "getDeclaredStaticMembers()Ljava/util/Collection;")), kotlin.jvm.internal.p0.h(new kotlin.jvm.internal.g0(kotlin.jvm.internal.p0.b(a.class), "inheritedNonStaticMembers", "getInheritedNonStaticMembers()Ljava/util/Collection;")), kotlin.jvm.internal.p0.h(new kotlin.jvm.internal.g0(kotlin.jvm.internal.p0.b(a.class), "inheritedStaticMembers", "getInheritedStaticMembers()Ljava/util/Collection;")), kotlin.jvm.internal.p0.h(new kotlin.jvm.internal.g0(kotlin.jvm.internal.p0.b(a.class), "allNonStaticMembers", "getAllNonStaticMembers()Ljava/util/Collection;")), kotlin.jvm.internal.p0.h(new kotlin.jvm.internal.g0(kotlin.jvm.internal.p0.b(a.class), "allStaticMembers", "getAllStaticMembers()Ljava/util/Collection;")), kotlin.jvm.internal.p0.h(new kotlin.jvm.internal.g0(kotlin.jvm.internal.p0.b(a.class), "declaredMembers", "getDeclaredMembers()Ljava/util/Collection;")), kotlin.jvm.internal.p0.h(new kotlin.jvm.internal.g0(kotlin.jvm.internal.p0.b(a.class), "allMembers", "getAllMembers()Ljava/util/Collection;"))};

        /* renamed from: d, reason: collision with root package name */
        private final j0.a f30241d;

        /* renamed from: e, reason: collision with root package name */
        private final j0.a f30242e;

        /* renamed from: f, reason: collision with root package name */
        private final j0.a f30243f;

        /* renamed from: g, reason: collision with root package name */
        private final j0.a f30244g;

        /* renamed from: h, reason: collision with root package name */
        private final j0.a f30245h;

        /* renamed from: i, reason: collision with root package name */
        private final j0.a f30246i;

        /* renamed from: j, reason: collision with root package name */
        private final rm.o f30247j;

        /* renamed from: k, reason: collision with root package name */
        private final j0.a f30248k;

        /* renamed from: l, reason: collision with root package name */
        private final j0.a f30249l;

        /* renamed from: m, reason: collision with root package name */
        private final j0.a f30250m;

        /* renamed from: n, reason: collision with root package name */
        private final j0.a f30251n;

        /* renamed from: o, reason: collision with root package name */
        private final j0.a f30252o;

        /* renamed from: p, reason: collision with root package name */
        private final j0.a f30253p;

        /* renamed from: q, reason: collision with root package name */
        private final j0.a f30254q;

        /* renamed from: r, reason: collision with root package name */
        private final j0.a f30255r;

        /* renamed from: s, reason: collision with root package name */
        private final j0.a f30256s;

        /* renamed from: t, reason: collision with root package name */
        private final j0.a f30257t;

        /* renamed from: u, reason: collision with root package name */
        private final j0.a f30258u;

        /* renamed from: nn.o$a$a, reason: collision with other inner class name */
        /* loaded from: classes3.dex */
        static final class C0695a extends kotlin.jvm.internal.v implements dn.a {
            C0695a() {
                super(0);
            }

            @Override // dn.a
            /* renamed from: a, reason: merged with bridge method [inline-methods] */
            public final List invoke() {
                List z02;
                z02 = sm.c0.z0(a.this.g(), a.this.h());
                return z02;
            }
        }

        /* loaded from: classes3.dex */
        static final class b extends kotlin.jvm.internal.v implements dn.a {
            b() {
                super(0);
            }

            @Override // dn.a
            /* renamed from: a, reason: merged with bridge method [inline-methods] */
            public final List invoke() {
                List z02;
                z02 = sm.c0.z0(a.this.j(), a.this.m());
                return z02;
            }
        }

        /* loaded from: classes3.dex */
        static final class c extends kotlin.jvm.internal.v implements dn.a {
            c() {
                super(0);
            }

            @Override // dn.a
            /* renamed from: a, reason: merged with bridge method [inline-methods] */
            public final List invoke() {
                List z02;
                z02 = sm.c0.z0(a.this.k(), a.this.n());
                return z02;
            }
        }

        /* loaded from: classes3.dex */
        static final class d extends kotlin.jvm.internal.v implements dn.a {
            d() {
                super(0);
            }

            @Override // dn.a
            /* renamed from: a, reason: merged with bridge method [inline-methods] */
            public final List invoke() {
                return p0.e(a.this.l());
            }
        }

        /* loaded from: classes3.dex */
        static final class e extends kotlin.jvm.internal.v implements dn.a {

            /* renamed from: p, reason: collision with root package name */
            final /* synthetic */ o f30264p;

            /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
            e(o oVar) {
                super(0);
                this.f30264p = oVar;
            }

            @Override // dn.a
            /* renamed from: a, reason: merged with bridge method [inline-methods] */
            public final List invoke() {
                int v10;
                Collection y10 = this.f30264p.y();
                o oVar = this.f30264p;
                v10 = sm.v.v(y10, 10);
                ArrayList arrayList = new ArrayList(v10);
                Iterator it = y10.iterator();
                while (it.hasNext()) {
                    arrayList.add(new s(oVar, (tn.l) it.next()));
                }
                return arrayList;
            }
        }

        /* loaded from: classes3.dex */
        static final class f extends kotlin.jvm.internal.v implements dn.a {
            f() {
                super(0);
            }

            @Override // dn.a
            /* renamed from: a, reason: merged with bridge method [inline-methods] */
            public final List invoke() {
                List z02;
                z02 = sm.c0.z0(a.this.j(), a.this.k());
                return z02;
            }
        }

        /* loaded from: classes3.dex */
        static final class g extends kotlin.jvm.internal.v implements dn.a {

            /* renamed from: p, reason: collision with root package name */
            final /* synthetic */ o f30266p;

            /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
            g(o oVar) {
                super(0);
                this.f30266p = oVar;
            }

            @Override // dn.a
            /* renamed from: a, reason: merged with bridge method [inline-methods] */
            public final Collection invoke() {
                o oVar = this.f30266p;
                return oVar.B(oVar.R(), r.c.DECLARED);
            }
        }

        /* loaded from: classes3.dex */
        static final class h extends kotlin.jvm.internal.v implements dn.a {

            /* renamed from: p, reason: collision with root package name */
            final /* synthetic */ o f30267p;

            /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
            h(o oVar) {
                super(0);
                this.f30267p = oVar;
            }

            @Override // dn.a
            /* renamed from: a, reason: merged with bridge method [inline-methods] */
            public final Collection invoke() {
                o oVar = this.f30267p;
                return oVar.B(oVar.S(), r.c.DECLARED);
            }
        }

        /* loaded from: classes3.dex */
        static final class i extends kotlin.jvm.internal.v implements dn.a {

            /* renamed from: p, reason: collision with root package name */
            final /* synthetic */ o f30268p;

            /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
            i(o oVar) {
                super(0);
                this.f30268p = oVar;
            }

            @Override // dn.a
            /* renamed from: a, reason: merged with bridge method [inline-methods] */
            public final tn.e invoke() {
                ro.b O = this.f30268p.O();
                xn.k a10 = ((a) this.f30268p.P().getValue()).a();
                tn.e b10 = (O.k() && this.f30268p.e().isAnnotationPresent(Metadata.class)) ? a10.a().b(O) : tn.x.a(a10.b(), O);
                return b10 == null ? this.f30268p.N(O, a10) : b10;
            }
        }

        /* loaded from: classes3.dex */
        static final class j extends kotlin.jvm.internal.v implements dn.a {

            /* renamed from: p, reason: collision with root package name */
            final /* synthetic */ o f30269p;

            /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
            j(o oVar) {
                super(0);
                this.f30269p = oVar;
            }

            @Override // dn.a
            /* renamed from: a, reason: merged with bridge method [inline-methods] */
            public final Collection invoke() {
                o oVar = this.f30269p;
                return oVar.B(oVar.R(), r.c.INHERITED);
            }
        }

        /* loaded from: classes3.dex */
        static final class k extends kotlin.jvm.internal.v implements dn.a {

            /* renamed from: p, reason: collision with root package name */
            final /* synthetic */ o f30270p;

            /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
            k(o oVar) {
                super(0);
                this.f30270p = oVar;
            }

            @Override // dn.a
            /* renamed from: a, reason: merged with bridge method [inline-methods] */
            public final Collection invoke() {
                o oVar = this.f30270p;
                return oVar.B(oVar.S(), r.c.INHERITED);
            }
        }

        /* loaded from: classes3.dex */
        static final class l extends kotlin.jvm.internal.v implements dn.a {
            l() {
                super(0);
            }

            @Override // dn.a
            /* renamed from: a, reason: merged with bridge method [inline-methods] */
            public final List invoke() {
                ap.h v02 = a.this.l().v0();
                kotlin.jvm.internal.t.f(v02, "getUnsubstitutedInnerClassesScope(...)");
                Collection a10 = k.a.a(v02, null, null, 3, null);
                ArrayList<tn.m> arrayList = new ArrayList();
                for (Object obj : a10) {
                    if (!to.f.B((tn.m) obj)) {
                        arrayList.add(obj);
                    }
                }
                ArrayList arrayList2 = new ArrayList();
                for (tn.m mVar : arrayList) {
                    tn.e eVar = mVar instanceof tn.e ? (tn.e) mVar : null;
                    Class q10 = eVar != null ? p0.q(eVar) : null;
                    o oVar = q10 != null ? new o(q10) : null;
                    if (oVar != null) {
                        arrayList2.add(oVar);
                    }
                }
                return arrayList2;
            }
        }

        /* loaded from: classes3.dex */
        static final class m extends kotlin.jvm.internal.v implements dn.a {

            /* renamed from: q, reason: collision with root package name */
            final /* synthetic */ o f30273q;

            /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
            m(o oVar) {
                super(0);
                this.f30273q = oVar;
            }

            @Override // dn.a
            public final Object invoke() {
                tn.e l10 = a.this.l();
                if (l10.g() != tn.f.OBJECT) {
                    return null;
                }
                Object obj = ((!l10.v() || qn.d.a(qn.c.f33924a, l10)) ? this.f30273q.e().getDeclaredField("INSTANCE") : this.f30273q.e().getEnclosingClass().getDeclaredField(l10.getName().e())).get(null);
                kotlin.jvm.internal.t.e(obj, "null cannot be cast to non-null type T of kotlin.reflect.jvm.internal.KClassImpl");
                return obj;
            }
        }

        /* loaded from: classes3.dex */
        static final class n extends kotlin.jvm.internal.v implements dn.a {

            /* renamed from: p, reason: collision with root package name */
            final /* synthetic */ o f30274p;

            /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
            n(o oVar) {
                super(0);
                this.f30274p = oVar;
            }

            @Override // dn.a
            public final String invoke() {
                if (this.f30274p.e().isAnonymousClass()) {
                    return null;
                }
                ro.b O = this.f30274p.O();
                if (O.k()) {
                    return null;
                }
                return O.b().b();
            }
        }

        /* renamed from: nn.o$a$o, reason: collision with other inner class name */
        /* loaded from: classes3.dex */
        static final class C0696o extends kotlin.jvm.internal.v implements dn.a {
            C0696o() {
                super(0);
            }

            @Override // dn.a
            /* renamed from: a, reason: merged with bridge method [inline-methods] */
            public final List invoke() {
                Collection<tn.e> F = a.this.l().F();
                kotlin.jvm.internal.t.f(F, "getSealedSubclasses(...)");
                ArrayList arrayList = new ArrayList();
                for (tn.e eVar : F) {
                    kotlin.jvm.internal.t.e(eVar, "null cannot be cast to non-null type org.jetbrains.kotlin.descriptors.ClassDescriptor");
                    Class q10 = p0.q(eVar);
                    o oVar = q10 != null ? new o(q10) : null;
                    if (oVar != null) {
                        arrayList.add(oVar);
                    }
                }
                return arrayList;
            }
        }

        /* loaded from: classes3.dex */
        static final class p extends kotlin.jvm.internal.v implements dn.a {

            /* renamed from: p, reason: collision with root package name */
            final /* synthetic */ o f30276p;

            /* renamed from: q, reason: collision with root package name */
            final /* synthetic */ a f30277q;

            /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
            p(o oVar, a aVar) {
                super(0);
                this.f30276p = oVar;
                this.f30277q = aVar;
            }

            @Override // dn.a
            public final String invoke() {
                if (this.f30276p.e().isAnonymousClass()) {
                    return null;
                }
                ro.b O = this.f30276p.O();
                if (O.k()) {
                    return this.f30277q.f(this.f30276p.e());
                }
                String e10 = O.j().e();
                kotlin.jvm.internal.t.f(e10, "asString(...)");
                return e10;
            }
        }

        /* loaded from: classes3.dex */
        static final class q extends kotlin.jvm.internal.v implements dn.a {

            /* renamed from: q, reason: collision with root package name */
            final /* synthetic */ o f30279q;

            /* JADX INFO: Access modifiers changed from: package-private */
            /* renamed from: nn.o$a$q$a, reason: collision with other inner class name */
            /* loaded from: classes3.dex */
            public static final class C0697a extends kotlin.jvm.internal.v implements dn.a {

                /* renamed from: p, reason: collision with root package name */
                final /* synthetic */ hp.e0 f30280p;

                /* renamed from: q, reason: collision with root package name */
                final /* synthetic */ a f30281q;

                /* renamed from: r, reason: collision with root package name */
                final /* synthetic */ o f30282r;

                /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
                C0697a(hp.e0 e0Var, a aVar, o oVar) {
                    super(0);
                    this.f30280p = e0Var;
                    this.f30281q = aVar;
                    this.f30282r = oVar;
                }

                @Override // dn.a
                /* renamed from: a, reason: merged with bridge method [inline-methods] */
                public final Type invoke() {
                    int h02;
                    tn.h p10 = this.f30280p.K0().p();
                    if (!(p10 instanceof tn.e)) {
                        throw new h0("Supertype not a class: " + p10);
                    }
                    Class q10 = p0.q((tn.e) p10);
                    if (q10 == null) {
                        throw new h0("Unsupported superclass of " + this.f30281q + ": " + p10);
                    }
                    if (kotlin.jvm.internal.t.b(this.f30282r.e().getSuperclass(), q10)) {
                        Type genericSuperclass = this.f30282r.e().getGenericSuperclass();
                        kotlin.jvm.internal.t.d(genericSuperclass);
                        return genericSuperclass;
                    }
                    Class<?>[] interfaces = this.f30282r.e().getInterfaces();
                    kotlin.jvm.internal.t.f(interfaces, "getInterfaces(...)");
                    h02 = sm.p.h0(interfaces, q10);
                    if (h02 >= 0) {
                        Type type = this.f30282r.e().getGenericInterfaces()[h02];
                        kotlin.jvm.internal.t.d(type);
                        return type;
                    }
                    throw new h0("No superclass of " + this.f30281q + " in Java reflection for " + p10);
                }
            }

            /* JADX INFO: Access modifiers changed from: package-private */
            /* loaded from: classes3.dex */
            public static final class b extends kotlin.jvm.internal.v implements dn.a {

                /* renamed from: p, reason: collision with root package name */
                public static final b f30283p = new b();

                b() {
                    super(0);
                }

                @Override // dn.a
                /* renamed from: a, reason: merged with bridge method [inline-methods] */
                public final Type invoke() {
                    return Object.class;
                }
            }

            /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
            q(o oVar) {
                super(0);
                this.f30279q = oVar;
            }

            @Override // dn.a
            /* renamed from: a, reason: merged with bridge method [inline-methods] */
            public final List invoke() {
                Collection<hp.e0> n10 = a.this.l().j().n();
                kotlin.jvm.internal.t.f(n10, "getSupertypes(...)");
                ArrayList arrayList = new ArrayList(n10.size());
                a aVar = a.this;
                o oVar = this.f30279q;
                for (hp.e0 e0Var : n10) {
                    kotlin.jvm.internal.t.d(e0Var);
                    arrayList.add(new e0(e0Var, new C0697a(e0Var, aVar, oVar)));
                }
                if (!qn.g.u0(a.this.l())) {
                    boolean z10 = true;
                    if (!arrayList.isEmpty()) {
                        Iterator it = arrayList.iterator();
                        while (true) {
                            if (!it.hasNext()) {
                                break;
                            }
                            tn.f g10 = to.f.e(((e0) it.next()).k()).g();
                            kotlin.jvm.internal.t.f(g10, "getKind(...)");
                            if (!(g10 == tn.f.INTERFACE || g10 == tn.f.ANNOTATION_CLASS)) {
                                z10 = false;
                                break;
                            }
                        }
                    }
                    if (z10) {
                        hp.m0 i10 = xo.c.j(a.this.l()).i();
                        kotlin.jvm.internal.t.f(i10, "getAnyType(...)");
                        arrayList.add(new e0(i10, b.f30283p));
                    }
                }
                return pp.a.c(arrayList);
            }
        }

        /* loaded from: classes3.dex */
        static final class r extends kotlin.jvm.internal.v implements dn.a {

            /* renamed from: q, reason: collision with root package name */
            final /* synthetic */ o f30285q;

            /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
            r(o oVar) {
                super(0);
                this.f30285q = oVar;
            }

            @Override // dn.a
            /* renamed from: a, reason: merged with bridge method [inline-methods] */
            public final List invoke() {
                int v10;
                List s10 = a.this.l().s();
                kotlin.jvm.internal.t.f(s10, "getDeclaredTypeParameters(...)");
                List<e1> list = s10;
                o oVar = this.f30285q;
                v10 = sm.v.v(list, 10);
                ArrayList arrayList = new ArrayList(v10);
                for (e1 e1Var : list) {
                    kotlin.jvm.internal.t.d(e1Var);
                    arrayList.add(new f0(oVar, e1Var));
                }
                return arrayList;
            }
        }

        public a() {
            super();
            rm.o b10;
            this.f30241d = j0.b(new i(o.this));
            this.f30242e = j0.b(new d());
            this.f30243f = j0.b(new p(o.this, this));
            this.f30244g = j0.b(new n(o.this));
            this.f30245h = j0.b(new e(o.this));
            this.f30246i = j0.b(new l());
            b10 = rm.q.b(rm.s.PUBLICATION, new m(o.this));
            this.f30247j = b10;
            this.f30248k = j0.b(new r(o.this));
            this.f30249l = j0.b(new q(o.this));
            this.f30250m = j0.b(new C0696o());
            this.f30251n = j0.b(new g(o.this));
            this.f30252o = j0.b(new h(o.this));
            this.f30253p = j0.b(new j(o.this));
            this.f30254q = j0.b(new k(o.this));
            this.f30255r = j0.b(new b());
            this.f30256s = j0.b(new c());
            this.f30257t = j0.b(new f());
            this.f30258u = j0.b(new C0695a());
        }

        /* JADX INFO: Access modifiers changed from: private */
        public final String f(Class cls) {
            String S0;
            String T0;
            String T02;
            String simpleName = cls.getSimpleName();
            Method enclosingMethod = cls.getEnclosingMethod();
            if (enclosingMethod != null) {
                kotlin.jvm.internal.t.d(simpleName);
                T02 = kotlin.text.z.T0(simpleName, enclosingMethod.getName() + '$', null, 2, null);
                return T02;
            }
            Constructor<?> enclosingConstructor = cls.getEnclosingConstructor();
            if (enclosingConstructor == null) {
                kotlin.jvm.internal.t.d(simpleName);
                S0 = kotlin.text.z.S0(simpleName, '$', null, 2, null);
                return S0;
            }
            kotlin.jvm.internal.t.d(simpleName);
            T0 = kotlin.text.z.T0(simpleName, enclosingConstructor.getName() + '$', null, 2, null);
            return T0;
        }

        /* JADX INFO: Access modifiers changed from: private */
        public final Collection k() {
            Object b10 = this.f30252o.b(this, f30240w[10]);
            kotlin.jvm.internal.t.f(b10, "getValue(...)");
            return (Collection) b10;
        }

        /* JADX INFO: Access modifiers changed from: private */
        public final Collection m() {
            Object b10 = this.f30253p.b(this, f30240w[11]);
            kotlin.jvm.internal.t.f(b10, "getValue(...)");
            return (Collection) b10;
        }

        /* JADX INFO: Access modifiers changed from: private */
        public final Collection n() {
            Object b10 = this.f30254q.b(this, f30240w[12]);
            kotlin.jvm.internal.t.f(b10, "getValue(...)");
            return (Collection) b10;
        }

        public final Collection g() {
            Object b10 = this.f30255r.b(this, f30240w[13]);
            kotlin.jvm.internal.t.f(b10, "getValue(...)");
            return (Collection) b10;
        }

        public final Collection h() {
            Object b10 = this.f30256s.b(this, f30240w[14]);
            kotlin.jvm.internal.t.f(b10, "getValue(...)");
            return (Collection) b10;
        }

        public final Collection i() {
            Object b10 = this.f30245h.b(this, f30240w[4]);
            kotlin.jvm.internal.t.f(b10, "getValue(...)");
            return (Collection) b10;
        }

        public final Collection j() {
            Object b10 = this.f30251n.b(this, f30240w[9]);
            kotlin.jvm.internal.t.f(b10, "getValue(...)");
            return (Collection) b10;
        }

        public final tn.e l() {
            Object b10 = this.f30241d.b(this, f30240w[0]);
            kotlin.jvm.internal.t.f(b10, "getValue(...)");
            return (tn.e) b10;
        }

        public final String o() {
            return (String) this.f30244g.b(this, f30240w[3]);
        }

        public final String p() {
            return (String) this.f30243f.b(this, f30240w[2]);
        }
    }

    /* loaded from: classes3.dex */
    public /* synthetic */ class b {

        /* renamed from: a, reason: collision with root package name */
        public static final /* synthetic */ int[] f30286a;

        static {
            int[] iArr = new int[a.EnumC0634a.values().length];
            try {
                iArr[a.EnumC0634a.FILE_FACADE.ordinal()] = 1;
            } catch (NoSuchFieldError unused) {
            }
            try {
                iArr[a.EnumC0634a.MULTIFILE_CLASS.ordinal()] = 2;
            } catch (NoSuchFieldError unused2) {
            }
            try {
                iArr[a.EnumC0634a.MULTIFILE_CLASS_PART.ordinal()] = 3;
            } catch (NoSuchFieldError unused3) {
            }
            try {
                iArr[a.EnumC0634a.SYNTHETIC_CLASS.ordinal()] = 4;
            } catch (NoSuchFieldError unused4) {
            }
            try {
                iArr[a.EnumC0634a.UNKNOWN.ordinal()] = 5;
            } catch (NoSuchFieldError unused5) {
            }
            try {
                iArr[a.EnumC0634a.CLASS.ordinal()] = 6;
            } catch (NoSuchFieldError unused6) {
            }
            f30286a = iArr;
        }
    }

    /* loaded from: classes3.dex */
    public static final class c extends ap.e {
        c(vn.h hVar, gp.n nVar) {
            super(nVar, hVar);
        }

        @Override // ap.e
        protected List i() {
            List k10;
            k10 = sm.u.k();
            return k10;
        }
    }

    /* loaded from: classes3.dex */
    static final class d extends kotlin.jvm.internal.v implements dn.a {
        d() {
            super(0);
        }

        @Override // dn.a
        /* renamed from: a, reason: merged with bridge method [inline-methods] */
        public final a invoke() {
            return new a();
        }
    }

    /* loaded from: classes3.dex */
    /* synthetic */ class e extends kotlin.jvm.internal.p implements dn.p {

        /* renamed from: p, reason: collision with root package name */
        public static final e f30288p = new e();

        e() {
            super(2);
        }

        @Override // kotlin.jvm.internal.f, kn.c
        public final String getName() {
            return "loadProperty";
        }

        @Override // kotlin.jvm.internal.f
        public final kn.f getOwner() {
            return kotlin.jvm.internal.p0.b(dp.x.class);
        }

        @Override // kotlin.jvm.internal.f
        public final String getSignature() {
            return "loadProperty(Lorg/jetbrains/kotlin/metadata/ProtoBuf$Property;)Lorg/jetbrains/kotlin/descriptors/PropertyDescriptor;";
        }

        @Override // dn.p
        /* renamed from: l, reason: merged with bridge method [inline-methods] */
        public final t0 invoke(dp.x p02, mo.n p12) {
            kotlin.jvm.internal.t.g(p02, "p0");
            kotlin.jvm.internal.t.g(p12, "p1");
            return p02.l(p12);
        }
    }

    public o(Class jClass) {
        rm.o b10;
        kotlin.jvm.internal.t.g(jClass, "jClass");
        this.f30238s = jClass;
        b10 = rm.q.b(rm.s.PUBLICATION, new d());
        this.f30239t = b10;
    }

    private final tn.e M(ro.b bVar, xn.k kVar) {
        List e10;
        Set d10;
        tn.g0 b10 = kVar.b();
        ro.c h10 = bVar.h();
        kotlin.jvm.internal.t.f(h10, "getPackageFqName(...)");
        vn.m mVar = new vn.m(b10, h10);
        ro.f j10 = bVar.j();
        tn.d0 d0Var = tn.d0.FINAL;
        tn.f fVar = tn.f.CLASS;
        e10 = sm.t.e(kVar.b().m().h().q());
        vn.h hVar = new vn.h(mVar, j10, d0Var, fVar, e10, z0.f36441a, false, kVar.a().u());
        c cVar = new c(hVar, kVar.a().u());
        d10 = x0.d();
        hVar.H0(cVar, d10, null);
        return hVar;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public final tn.e N(ro.b bVar, xn.k kVar) {
        lo.a a10;
        if (e().isSynthetic()) {
            return M(bVar, kVar);
        }
        xn.f a11 = xn.f.f50933c.a(e());
        a.EnumC0634a c10 = (a11 == null || (a10 = a11.a()) == null) ? null : a10.c();
        switch (c10 == null ? -1 : b.f30286a[c10.ordinal()]) {
            case -1:
            case 6:
                throw new h0("Unresolved class: " + e() + " (kind = " + c10 + ')');
            case 0:
            default:
                throw new rm.t();
            case 1:
            case 2:
            case 3:
            case 4:
                return M(bVar, kVar);
            case 5:
                throw new h0("Unknown class: " + e() + " (kind = " + c10 + ')');
        }
    }

    /* JADX INFO: Access modifiers changed from: private */
    public final ro.b O() {
        return m0.f30218a.c(e());
    }

    @Override // nn.r
    public t0 A(int i10) {
        Class<?> declaringClass;
        if (kotlin.jvm.internal.t.b(e().getSimpleName(), "DefaultImpls") && (declaringClass = e().getDeclaringClass()) != null && declaringClass.isInterface()) {
            kn.d e10 = cn.a.e(declaringClass);
            kotlin.jvm.internal.t.e(e10, "null cannot be cast to non-null type kotlin.reflect.jvm.internal.KClassImpl<*>");
            return ((o) e10).A(i10);
        }
        tn.e descriptor = getDescriptor();
        fp.d dVar = descriptor instanceof fp.d ? (fp.d) descriptor : null;
        if (dVar == null) {
            return null;
        }
        mo.c X0 = dVar.X0();
        i.f classLocalVariable = po.a.f32947j;
        kotlin.jvm.internal.t.f(classLocalVariable, "classLocalVariable");
        mo.n nVar = (mo.n) oo.e.b(X0, classLocalVariable, i10);
        if (nVar != null) {
            return (t0) p0.h(e(), nVar, dVar.W0().g(), dVar.W0().j(), dVar.Z0(), e.f30288p);
        }
        return null;
    }

    @Override // nn.r
    public Collection D(ro.f name) {
        List z02;
        kotlin.jvm.internal.t.g(name, "name");
        ap.h R = R();
        ao.d dVar = ao.d.FROM_REFLECTION;
        z02 = sm.c0.z0(R.c(name, dVar), S().c(name, dVar));
        return z02;
    }

    public final rm.o P() {
        return this.f30239t;
    }

    @Override // nn.p
    /* renamed from: Q, reason: merged with bridge method [inline-methods] */
    public tn.e getDescriptor() {
        return ((a) this.f30239t.getValue()).l();
    }

    public final ap.h R() {
        return getDescriptor().q().o();
    }

    public final ap.h S() {
        ap.h O = getDescriptor().O();
        kotlin.jvm.internal.t.f(O, "getStaticScope(...)");
        return O;
    }

    @Override // kn.d
    public String d() {
        return ((a) this.f30239t.getValue()).o();
    }

    @Override // kotlin.jvm.internal.h
    public Class e() {
        return this.f30238s;
    }

    public boolean equals(Object obj) {
        return (obj instanceof o) && kotlin.jvm.internal.t.b(cn.a.c(this), cn.a.c((kn.d) obj));
    }

    @Override // kn.d
    public Collection h() {
        return ((a) this.f30239t.getValue()).i();
    }

    public int hashCode() {
        return cn.a.c(this).hashCode();
    }

    @Override // kn.d
    public String i() {
        return ((a) this.f30239t.getValue()).p();
    }

    @Override // kn.d
    public boolean n(Object obj) {
        Integer c10 = yn.d.c(e());
        if (c10 != null) {
            return v0.k(obj, c10.intValue());
        }
        Class g10 = yn.d.g(e());
        if (g10 == null) {
            g10 = e();
        }
        return g10.isInstance(obj);
    }

    public String toString() {
        String str;
        String I;
        StringBuilder sb2 = new StringBuilder();
        sb2.append("class ");
        ro.b O = O();
        ro.c h10 = O.h();
        kotlin.jvm.internal.t.f(h10, "getPackageFqName(...)");
        if (h10.d()) {
            str = "";
        } else {
            str = h10.b() + '.';
        }
        String b10 = O.i().b();
        kotlin.jvm.internal.t.f(b10, "asString(...)");
        I = kotlin.text.y.I(b10, '.', '$', false, 4, null);
        sb2.append(str + I);
        return sb2.toString();
    }

    @Override // nn.r
    public Collection y() {
        List k10;
        tn.e descriptor = getDescriptor();
        if (descriptor.g() == tn.f.INTERFACE || descriptor.g() == tn.f.OBJECT) {
            k10 = sm.u.k();
            return k10;
        }
        Collection h10 = descriptor.h();
        kotlin.jvm.internal.t.f(h10, "getConstructors(...)");
        return h10;
    }

    @Override // nn.r
    public Collection z(ro.f name) {
        List z02;
        kotlin.jvm.internal.t.g(name, "name");
        ap.h R = R();
        ao.d dVar = ao.d.FROM_REFLECTION;
        z02 = sm.c0.z0(R.b(name, dVar), S().b(name, dVar));
        return z02;
    }
}
