package mn;

import dp.x;
import kn.f;
import kn.g;
import kotlin.Metadata;
import kotlin.jvm.internal.p;
import kotlin.jvm.internal.p0;
import kotlin.jvm.internal.t;
import mo.i;
import nn.j;
import nn.s;
import qo.e;
import rm.v;
import tn.y0;

/* loaded from: classes3.dex */
public abstract class d {

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes3.dex */
    public /* synthetic */ class a extends p implements dn.p {

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

        a() {
            super(2);
        }

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

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

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

        @Override // dn.p
        /* renamed from: l, reason: merged with bridge method [inline-methods] */
        public final y0 invoke(x p02, i p12) {
            t.g(p02, "p0");
            t.g(p12, "p1");
            return p02.j(p12);
        }
    }

    public static final g a(rm.i iVar) {
        t.g(iVar, "<this>");
        Metadata metadata = (Metadata) iVar.getClass().getAnnotation(Metadata.class);
        if (metadata == null) {
            return null;
        }
        String[] d12 = metadata.d1();
        if (d12.length == 0) {
            d12 = null;
        }
        if (d12 == null) {
            return null;
        }
        v j10 = qo.i.j(d12, metadata.d2());
        qo.f fVar = (qo.f) j10.a();
        i iVar2 = (i) j10.b();
        e eVar = new e(metadata.mv(), (metadata.xi() & 8) != 0);
        Class<?> cls = iVar.getClass();
        mo.t h02 = iVar2.h0();
        t.f(h02, "getTypeTable(...)");
        return new s(j.f30188s, (y0) nn.p0.h(cls, iVar2, fVar, new oo.g(h02), eVar, a.f29238p));
    }
}
