package a.i.b.a.c.d.a;

import a.aa;
import a.f.b.j;
import a.i.b.a.c.a.g;
import a.i.b.a.c.b.a;
import a.i.b.a.c.b.al;
import a.i.b.a.c.b.au;
import a.i.b.a.c.b.h;
import a.i.b.a.c.b.l;
import a.i.b.a.c.b.t;
import a.i.b.a.c.d.a.b.e;
import a.i.b.a.c.d.b.j.c;
import a.i.b.a.c.d.b.r;
import a.i.b.a.c.l.w;
import a.o;
import com.tencent.matrix.trace.core.AppMethodBeat;
import java.util.List;

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

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

    public static boolean a(a aVar, a aVar2) {
        AppMethodBeat.i(119696);
        j.p(aVar, "superDescriptor");
        j.p(aVar2, "subDescriptor");
        if ((aVar2 instanceof e) && (aVar instanceof t)) {
            boolean z = ((e) aVar2).BhM.size() == ((t) aVar).dYV().size();
            if (!aa.AUz || z) {
                al eaK = ((e) aVar2).eaK();
                j.o(eaK, "subDescriptor.original");
                List dYV = eaK.dYV();
                j.o(dYV, "subDescriptor.original.valueParameters");
                Iterable iterable = dYV;
                t dZp = ((t) aVar).dZp();
                j.o(dZp, "superDescriptor.original");
                List dYV2 = dZp.dYV();
                j.o(dYV2, "superDescriptor.original.valueParameters");
                for (o oVar : a.a.j.a(iterable, dYV2)) {
                    au auVar = (au) oVar.first;
                    au auVar2 = (au) oVar.second;
                    t tVar = (t) aVar2;
                    j.o(auVar, "subParameter");
                    boolean z2 = a(tVar, auVar) instanceof c;
                    dZp = (t) aVar;
                    j.o(auVar2, "superParameter");
                    if (z2 != (a(dZp, auVar2) instanceof c)) {
                        AppMethodBeat.o(119696);
                        return true;
                    }
                }
                AppMethodBeat.o(119696);
                return false;
            }
            Throwable assertionError = new AssertionError("External overridability condition with CONFLICTS_ONLY should not be run with different value parameters size");
            AppMethodBeat.o(119696);
            throw assertionError;
        }
        AppMethodBeat.o(119696);
        return false;
    }

    private static a.i.b.a.c.d.b.j a(t tVar, au auVar) {
        AppMethodBeat.i(119697);
        w dZS;
        a.i.b.a.c.d.b.j V;
        if (r.b((a) tVar) || f(tVar)) {
            dZS = auVar.dZS();
            j.o(dZS, "valueParameterDescriptor.type");
            V = r.V(a.i.b.a.c.l.c.a.az(dZS));
            AppMethodBeat.o(119697);
            return V;
        }
        dZS = auVar.dZS();
        j.o(dZS, "valueParameterDescriptor.type");
        V = r.V(dZS);
        AppMethodBeat.o(119697);
        return V;
    }

    private static boolean f(t tVar) {
        AppMethodBeat.i(119698);
        if (tVar.dYV().size() != 1) {
            AppMethodBeat.o(119698);
            return false;
        }
        l dXW = tVar.dXW();
        if (!(dXW instanceof a.i.b.a.c.b.e)) {
            dXW = null;
        }
        a.i.b.a.c.b.e eVar = (a.i.b.a.c.b.e) dXW;
        if (eVar == null) {
            AppMethodBeat.o(119698);
            return false;
        }
        List dYV = tVar.dYV();
        j.o(dYV, "f.valueParameters");
        Object fN = a.a.j.fN(dYV);
        j.o(fN, "f.valueParameters.single()");
        h dYs = ((au) fN).dZS().ejw().dYs();
        if (!(dYs instanceof a.i.b.a.c.b.e)) {
            dYs = null;
        }
        a.i.b.a.c.b.e eVar2 = (a.i.b.a.c.b.e) dYs;
        if (eVar2 == null) {
            AppMethodBeat.o(119698);
            return false;
        } else if (g.d(eVar) && j.j(a.i.b.a.c.i.c.a.o((l) eVar), a.i.b.a.c.i.c.a.o((l) eVar2))) {
            AppMethodBeat.o(119698);
            return true;
        } else {
            AppMethodBeat.o(119698);
            return false;
        }
    }
}
