package a.i.b.a.c.l;

import a.a.ad;
import a.f.b.j;
import a.i.b.a.c.b.ar;
import com.tencent.matrix.trace.core.AppMethodBeat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;

public final class ao$a {
    private ao$a() {
    }

    public /* synthetic */ ao$a(byte b) {
        this();
    }

    public static ao bf(Map<an, ? extends ap> map) {
        AppMethodBeat.i(122652);
        j.p(map, "map");
        ao aoVar = (ao) new a(map);
        AppMethodBeat.o(122652);
        return aoVar;
    }

    public static as au(w wVar) {
        AppMethodBeat.i(122653);
        j.p(wVar, "kotlinType");
        as a = a(wVar.ejw(), wVar.ejt());
        AppMethodBeat.o(122653);
        return a;
    }

    public static as a(an anVar, List<? extends ap> list) {
        AppMethodBeat.i(122654);
        j.p(anVar, "typeConstructor");
        j.p(list, "arguments");
        List parameters = anVar.getParameters();
        j.o(parameters, "typeConstructor.parameters");
        ar arVar = (ar) a.a.j.fM(parameters);
        as asVar;
        if (arVar != null ? arVar.dZb() : false) {
            List parameters2 = anVar.getParameters();
            j.o(parameters2, "typeConstructor.parameters");
            Iterable<ar> iterable = parameters2;
            Collection arrayList = new ArrayList(a.a.j.d(iterable));
            for (ar arVar2 : iterable) {
                j.o(arVar2, "it");
                arrayList.add(arVar2.dXY());
            }
            asVar = (as) bf(ad.v(a.a.j.a((List) arrayList, list)));
            AppMethodBeat.o(122654);
            return asVar;
        }
        asVar = (as) new u(parameters, list);
        AppMethodBeat.o(122654);
        return asVar;
    }
}
