200 lines
5.9 KiB
Java
200 lines
5.9 KiB
Java
|
package ie;
|
||
|
|
||
|
import cg.a1;
|
||
|
import cg.e0;
|
||
|
import cg.f0;
|
||
|
import cg.l0;
|
||
|
import ie.k;
|
||
|
import java.util.ArrayList;
|
||
|
import java.util.List;
|
||
|
import je.c;
|
||
|
import kd.a0;
|
||
|
import kf.d;
|
||
|
import kf.f;
|
||
|
import kotlin.jvm.internal.s;
|
||
|
import ld.q;
|
||
|
import le.e;
|
||
|
import le.h;
|
||
|
import le.m;
|
||
|
import lg.a;
|
||
|
import me.c;
|
||
|
import me.j;
|
||
|
import qf.v;
|
||
|
/* compiled from: functionTypes.kt */
|
||
|
/* loaded from: classes5.dex */
|
||
|
public final class g {
|
||
|
public static final l0 a(h builtIns, me.g annotations, e0 e0Var, List<? extends e0> parameterTypes, List<f> list, e0 returnType, boolean z10) {
|
||
|
s.e(builtIns, "builtIns");
|
||
|
s.e(annotations, "annotations");
|
||
|
s.e(parameterTypes, "parameterTypes");
|
||
|
s.e(returnType, "returnType");
|
||
|
List<a1> e10 = e(e0Var, parameterTypes, list, returnType, builtIns);
|
||
|
int size = parameterTypes.size();
|
||
|
if (e0Var != null) {
|
||
|
size++;
|
||
|
}
|
||
|
e d10 = d(builtIns, size, z10);
|
||
|
if (e0Var != null) {
|
||
|
annotations = q(annotations, builtIns);
|
||
|
}
|
||
|
return f0.g(annotations, d10, e10);
|
||
|
}
|
||
|
|
||
|
public static /* synthetic */ l0 b(h hVar, me.g gVar, e0 e0Var, List list, List list2, e0 e0Var2, boolean z10, int i10, Object obj) {
|
||
|
return a(hVar, gVar, e0Var, list, list2, e0Var2, (i10 & 64) != 0 ? false : z10);
|
||
|
}
|
||
|
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:12:0x0035, code lost:
|
||
|
if (kf.f.i(r2) != false) goto L_0x0037;
|
||
|
*/
|
||
|
/*
|
||
|
Code decompiled incorrectly, please refer to instructions dump.
|
||
|
*/
|
||
|
public static final f c(e0 e0Var) {
|
||
|
String str;
|
||
|
s.e(e0Var, "<this>");
|
||
|
c b10 = e0Var.getAnnotations().b(k.a.D);
|
||
|
if (b10 == null) {
|
||
|
return null;
|
||
|
}
|
||
|
Object n02 = q.n0(b10.a().values());
|
||
|
v vVar = n02 instanceof v ? (v) n02 : null;
|
||
|
if (vVar != null) {
|
||
|
str = (String) vVar.b();
|
||
|
}
|
||
|
str = null;
|
||
|
if (str == null) {
|
||
|
return null;
|
||
|
}
|
||
|
return f.g(str);
|
||
|
}
|
||
|
|
||
|
public static final e d(h builtIns, int i10, boolean z10) {
|
||
|
s.e(builtIns, "builtIns");
|
||
|
e X = z10 ? builtIns.X(i10) : builtIns.C(i10);
|
||
|
s.d(X, "if (isSuspendFunction) b…tFunction(parameterCount)");
|
||
|
return X;
|
||
|
}
|
||
|
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:20:0x0052, code lost:
|
||
|
if (r2.h() == false) goto L_0x0054;
|
||
|
*/
|
||
|
/*
|
||
|
Code decompiled incorrectly, please refer to instructions dump.
|
||
|
*/
|
||
|
public static final List<a1> e(e0 e0Var, List<? extends e0> parameterTypes, List<f> list, e0 returnType, h builtIns) {
|
||
|
f fVar;
|
||
|
s.e(parameterTypes, "parameterTypes");
|
||
|
s.e(returnType, "returnType");
|
||
|
s.e(builtIns, "builtIns");
|
||
|
int i10 = 0;
|
||
|
ArrayList arrayList = new ArrayList(parameterTypes.size() + (e0Var != null ? 1 : 0) + 1);
|
||
|
a.a(arrayList, e0Var == null ? null : gg.a.a(e0Var));
|
||
|
for (Object obj : parameterTypes) {
|
||
|
i10++;
|
||
|
if (i10 < 0) {
|
||
|
q.r();
|
||
|
}
|
||
|
e0 e0Var2 = (e0) obj;
|
||
|
if (list != null) {
|
||
|
fVar = list.get(i10);
|
||
|
}
|
||
|
fVar = null;
|
||
|
if (fVar != null) {
|
||
|
kf.c cVar = k.a.D;
|
||
|
f g10 = f.g("name");
|
||
|
String b10 = fVar.b();
|
||
|
s.d(b10, "name.asString()");
|
||
|
e0Var2 = gg.a.r(e0Var2, me.g.f17521f.a(q.i0(e0Var2.getAnnotations(), new j(builtIns, cVar, ld.l0.e(a0.a(g10, new v(b10)))))));
|
||
|
}
|
||
|
arrayList.add(gg.a.a(e0Var2));
|
||
|
}
|
||
|
arrayList.add(gg.a.a(returnType));
|
||
|
return arrayList;
|
||
|
}
|
||
|
|
||
|
private static final je.c f(d dVar) {
|
||
|
if (!dVar.f() || dVar.e()) {
|
||
|
return null;
|
||
|
}
|
||
|
c.a aVar = je.c.f15479n;
|
||
|
String b10 = dVar.i().b();
|
||
|
s.d(b10, "shortName().asString()");
|
||
|
kf.c e10 = dVar.l().e();
|
||
|
s.d(e10, "toSafe().parent()");
|
||
|
return aVar.b(b10, e10);
|
||
|
}
|
||
|
|
||
|
public static final je.c g(m mVar) {
|
||
|
s.e(mVar, "<this>");
|
||
|
if ((mVar instanceof e) && h.z0(mVar)) {
|
||
|
return f(sf.a.j(mVar));
|
||
|
}
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
public static final e0 h(e0 e0Var) {
|
||
|
s.e(e0Var, "<this>");
|
||
|
m(e0Var);
|
||
|
if (p(e0Var)) {
|
||
|
return ((a1) q.Q(e0Var.K0())).getType();
|
||
|
}
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
public static final e0 i(e0 e0Var) {
|
||
|
s.e(e0Var, "<this>");
|
||
|
m(e0Var);
|
||
|
e0 type = ((a1) q.b0(e0Var.K0())).getType();
|
||
|
s.d(type, "arguments.last().type");
|
||
|
return type;
|
||
|
}
|
||
|
|
||
|
public static final List<a1> j(e0 e0Var) {
|
||
|
s.e(e0Var, "<this>");
|
||
|
m(e0Var);
|
||
|
List<a1> K0 = e0Var.K0();
|
||
|
return K0.subList(k(e0Var) ? 1 : 0, K0.size() - 1);
|
||
|
}
|
||
|
|
||
|
public static final boolean k(e0 e0Var) {
|
||
|
s.e(e0Var, "<this>");
|
||
|
return m(e0Var) && p(e0Var);
|
||
|
}
|
||
|
|
||
|
public static final boolean l(m mVar) {
|
||
|
s.e(mVar, "<this>");
|
||
|
je.c g10 = g(mVar);
|
||
|
return g10 == je.c.Function || g10 == je.c.SuspendFunction;
|
||
|
}
|
||
|
|
||
|
public static final boolean m(e0 e0Var) {
|
||
|
s.e(e0Var, "<this>");
|
||
|
h p10 = e0Var.L0().p();
|
||
|
return p10 != null && l(p10);
|
||
|
}
|
||
|
|
||
|
public static final boolean n(e0 e0Var) {
|
||
|
s.e(e0Var, "<this>");
|
||
|
h p10 = e0Var.L0().p();
|
||
|
return (p10 == null ? null : g(p10)) == je.c.Function;
|
||
|
}
|
||
|
|
||
|
public static final boolean o(e0 e0Var) {
|
||
|
s.e(e0Var, "<this>");
|
||
|
h p10 = e0Var.L0().p();
|
||
|
return (p10 == null ? null : g(p10)) == je.c.SuspendFunction;
|
||
|
}
|
||
|
|
||
|
private static final boolean p(e0 e0Var) {
|
||
|
return e0Var.getAnnotations().b(k.a.C) != null;
|
||
|
}
|
||
|
|
||
|
public static final me.g q(me.g gVar, h builtIns) {
|
||
|
s.e(gVar, "<this>");
|
||
|
s.e(builtIns, "builtIns");
|
||
|
kf.c cVar = k.a.C;
|
||
|
return gVar.e(cVar) ? gVar : me.g.f17521f.a(q.i0(gVar, new j(builtIns, cVar, ld.l0.h())));
|
||
|
}
|
||
|
}
|