package dp;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import tn.z0;

/* loaded from: classes3.dex */
public abstract class p extends o {
    private mo.m A;
    private ap.h B;

    /* renamed from: w, reason: collision with root package name */
    private final oo.a f16487w;

    /* renamed from: x, reason: collision with root package name */
    private final fp.f f16488x;

    /* renamed from: y, reason: collision with root package name */
    private final oo.d f16489y;

    /* renamed from: z, reason: collision with root package name */
    private final z f16490z;

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

        @Override // dn.l
        /* renamed from: a, reason: merged with bridge method [inline-methods] */
        public final z0 invoke(ro.b it) {
            kotlin.jvm.internal.t.g(it, "it");
            fp.f fVar = p.this.f16488x;
            if (fVar != null) {
                return fVar;
            }
            z0 NO_SOURCE = z0.f36441a;
            kotlin.jvm.internal.t.f(NO_SOURCE, "NO_SOURCE");
            return NO_SOURCE;
        }
    }

    /* 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 Collection invoke() {
            int v10;
            Collection b10 = p.this.D0().b();
            ArrayList arrayList = new ArrayList();
            for (Object obj : b10) {
                ro.b bVar = (ro.b) obj;
                if ((bVar.l() || i.f16444c.a().contains(bVar)) ? false : true) {
                    arrayList.add(obj);
                }
            }
            v10 = sm.v.v(arrayList, 10);
            ArrayList arrayList2 = new ArrayList(v10);
            Iterator it = arrayList.iterator();
            while (it.hasNext()) {
                arrayList2.add(((ro.b) it.next()).j());
            }
            return arrayList2;
        }
    }

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public p(ro.c fqName, gp.n storageManager, tn.g0 module, mo.m proto, oo.a metadataVersion, fp.f fVar) {
        super(fqName, storageManager, module);
        kotlin.jvm.internal.t.g(fqName, "fqName");
        kotlin.jvm.internal.t.g(storageManager, "storageManager");
        kotlin.jvm.internal.t.g(module, "module");
        kotlin.jvm.internal.t.g(proto, "proto");
        kotlin.jvm.internal.t.g(metadataVersion, "metadataVersion");
        this.f16487w = metadataVersion;
        this.f16488x = fVar;
        mo.p J = proto.J();
        kotlin.jvm.internal.t.f(J, "getStrings(...)");
        mo.o H = proto.H();
        kotlin.jvm.internal.t.f(H, "getQualifiedNames(...)");
        oo.d dVar = new oo.d(J, H);
        this.f16489y = dVar;
        this.f16490z = new z(proto, dVar, metadataVersion, new a());
        this.A = proto;
    }

    @Override // dp.o
    public void I0(k components) {
        kotlin.jvm.internal.t.g(components, "components");
        mo.m mVar = this.A;
        if (mVar == null) {
            throw new IllegalStateException("Repeated call to DeserializedPackageFragmentImpl::initialize".toString());
        }
        this.A = null;
        mo.l G = mVar.G();
        kotlin.jvm.internal.t.f(G, "getPackage(...)");
        this.B = new fp.i(this, G, this.f16489y, this.f16487w, this.f16488x, components, "scope of " + this, new b());
    }

    @Override // dp.o
    /* renamed from: K0, reason: merged with bridge method [inline-methods] */
    public z D0() {
        return this.f16490z;
    }

    @Override // tn.k0
    public ap.h o() {
        ap.h hVar = this.B;
        if (hVar != null) {
            return hVar;
        }
        kotlin.jvm.internal.t.y("_memberScope");
        return null;
    }
}
