package nn;

import ap.h;
import com.fasterxml.jackson.core.JsonPointer;
import java.util.Collection;
import java.util.List;
import kotlin.reflect.jvm.internal.impl.protobuf.i;
import nn.j0;
import nn.r;
import tn.t0;

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

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

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

    /* JADX INFO: Access modifiers changed from: private */
    /* loaded from: classes3.dex */
    public final class a extends r.b {

        /* renamed from: j, reason: collision with root package name */
        static final /* synthetic */ kn.l[] f30322j = {kotlin.jvm.internal.p0.h(new kotlin.jvm.internal.g0(kotlin.jvm.internal.p0.b(a.class), "kotlinClass", "getKotlinClass()Lorg/jetbrains/kotlin/descriptors/runtime/components/ReflectKotlinClass;")), kotlin.jvm.internal.p0.h(new kotlin.jvm.internal.g0(kotlin.jvm.internal.p0.b(a.class), "scope", "getScope()Lorg/jetbrains/kotlin/resolve/scopes/MemberScope;")), kotlin.jvm.internal.p0.h(new kotlin.jvm.internal.g0(kotlin.jvm.internal.p0.b(a.class), "members", "getMembers()Ljava/util/Collection;"))};

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

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

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

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

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

        /* renamed from: nn.x$a$a, reason: collision with other inner class name */
        /* loaded from: classes3.dex */
        static final class C0698a extends kotlin.jvm.internal.v implements dn.a {

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

            /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
            C0698a(x xVar) {
                super(0);
                this.f30329p = xVar;
            }

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

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

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

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

            /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
            b(x xVar, a aVar) {
                super(0);
                this.f30330p = xVar;
                this.f30331q = aVar;
            }

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

        /* 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 rm.b0 invoke() {
                lo.a a10;
                xn.f c10 = a.this.c();
                if (c10 == null || (a10 = c10.a()) == null) {
                    return null;
                }
                String[] a11 = a10.a();
                String[] g10 = a10.g();
                if (a11 == null || g10 == null) {
                    return null;
                }
                rm.v m10 = qo.i.m(a11, g10);
                return new rm.b0((qo.f) m10.a(), (mo.l) m10.b(), a10.d());
            }
        }

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

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

            /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
            d(x xVar) {
                super(0);
                this.f30334q = xVar;
            }

            @Override // dn.a
            /* renamed from: a, reason: merged with bridge method [inline-methods] */
            public final Class invoke() {
                String I;
                lo.a a10;
                xn.f c10 = a.this.c();
                String e10 = (c10 == null || (a10 = c10.a()) == null) ? null : a10.e();
                if (e10 == null) {
                    return null;
                }
                if (!(e10.length() > 0)) {
                    return null;
                }
                ClassLoader classLoader = this.f30334q.e().getClassLoader();
                I = kotlin.text.y.I(e10, JsonPointer.SEPARATOR, '.', false, 4, null);
                return classLoader.loadClass(I);
            }
        }

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

            @Override // dn.a
            /* renamed from: a, reason: merged with bridge method [inline-methods] */
            public final ap.h invoke() {
                xn.f c10 = a.this.c();
                return c10 != null ? a.this.a().c().a(c10) : h.b.f6148b;
            }
        }

        public a() {
            super();
            rm.o b10;
            rm.o b11;
            this.f30323d = j0.b(new C0698a(x.this));
            this.f30324e = j0.b(new e());
            rm.s sVar = rm.s.PUBLICATION;
            b10 = rm.q.b(sVar, new d(x.this));
            this.f30325f = b10;
            b11 = rm.q.b(sVar, new c());
            this.f30326g = b11;
            this.f30327h = j0.b(new b(x.this, this));
        }

        /* JADX INFO: Access modifiers changed from: private */
        public final xn.f c() {
            return (xn.f) this.f30323d.b(this, f30322j[0]);
        }

        public final rm.b0 d() {
            return (rm.b0) this.f30326g.getValue();
        }

        public final Class e() {
            return (Class) this.f30325f.getValue();
        }

        public final ap.h f() {
            Object b10 = this.f30324e.b(this, f30322j[1]);
            kotlin.jvm.internal.t.f(b10, "getValue(...)");
            return (ap.h) b10;
        }
    }

    /* 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 a invoke() {
            return new a();
        }
    }

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

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

        c() {
            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 x(Class jClass) {
        rm.o b10;
        kotlin.jvm.internal.t.g(jClass, "jClass");
        this.f30320s = jClass;
        b10 = rm.q.b(rm.s.PUBLICATION, new b());
        this.f30321t = b10;
    }

    private final ap.h K() {
        return ((a) this.f30321t.getValue()).f();
    }

    @Override // nn.r
    public t0 A(int i10) {
        rm.b0 d10 = ((a) this.f30321t.getValue()).d();
        if (d10 == null) {
            return null;
        }
        qo.f fVar = (qo.f) d10.a();
        mo.l lVar = (mo.l) d10.b();
        qo.e eVar = (qo.e) d10.c();
        i.f packageLocalVariable = po.a.f32951n;
        kotlin.jvm.internal.t.f(packageLocalVariable, "packageLocalVariable");
        mo.n nVar = (mo.n) oo.e.b(lVar, packageLocalVariable, i10);
        if (nVar == null) {
            return null;
        }
        Class e10 = e();
        mo.t Q = lVar.Q();
        kotlin.jvm.internal.t.f(Q, "getTypeTable(...)");
        return (t0) p0.h(e10, nVar, fVar, new oo.g(Q), eVar, c.f30337p);
    }

    @Override // nn.r
    protected Class C() {
        Class e10 = ((a) this.f30321t.getValue()).e();
        return e10 == null ? e() : e10;
    }

    @Override // nn.r
    public Collection D(ro.f name) {
        kotlin.jvm.internal.t.g(name, "name");
        return K().c(name, ao.d.FROM_REFLECTION);
    }

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

    public boolean equals(Object obj) {
        return (obj instanceof x) && kotlin.jvm.internal.t.b(e(), ((x) obj).e());
    }

    public int hashCode() {
        return e().hashCode();
    }

    public String toString() {
        return "file class " + yn.d.a(e()).b();
    }

    @Override // nn.r
    public Collection y() {
        List k10;
        k10 = sm.u.k();
        return k10;
    }

    @Override // nn.r
    public Collection z(ro.f name) {
        kotlin.jvm.internal.t.g(name, "name");
        return K().b(name, ao.d.FROM_REFLECTION);
    }
}
