package hp;

/* loaded from: classes3.dex */
public abstract class l implements d1 {

    /* renamed from: a, reason: collision with root package name */
    private int f21979a;

    private final boolean b(tn.h hVar) {
        return (kotlin.reflect.jvm.internal.impl.types.error.k.m(hVar) || to.f.E(hVar)) ? false : true;
    }

    /* JADX INFO: Access modifiers changed from: protected */
    public final boolean a(tn.h first, tn.h second) {
        kotlin.jvm.internal.t.g(first, "first");
        kotlin.jvm.internal.t.g(second, "second");
        if (!kotlin.jvm.internal.t.b(first.getName(), second.getName())) {
            return false;
        }
        tn.m b10 = first.b();
        for (tn.m b11 = second.b(); b10 != null && b11 != null; b11 = b11.b()) {
            if (b10 instanceof tn.g0) {
                return b11 instanceof tn.g0;
            }
            if (b11 instanceof tn.g0) {
                return false;
            }
            if (b10 instanceof tn.k0) {
                return (b11 instanceof tn.k0) && kotlin.jvm.internal.t.b(((tn.k0) b10).d(), ((tn.k0) b11).d());
            }
            if ((b11 instanceof tn.k0) || !kotlin.jvm.internal.t.b(b10.getName(), b11.getName())) {
                return false;
            }
            b10 = b10.b();
        }
        return true;
    }

    protected abstract boolean c(tn.h hVar);

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof d1) || obj.hashCode() != hashCode()) {
            return false;
        }
        d1 d1Var = (d1) obj;
        if (d1Var.getParameters().size() != getParameters().size()) {
            return false;
        }
        tn.h p10 = p();
        tn.h p11 = d1Var.p();
        if (p11 != null && b(p10) && b(p11)) {
            return c(p11);
        }
        return false;
    }

    public int hashCode() {
        int i10 = this.f21979a;
        if (i10 != 0) {
            return i10;
        }
        tn.h p10 = p();
        int hashCode = b(p10) ? to.f.m(p10).hashCode() : System.identityHashCode(this);
        this.f21979a = hashCode;
        return hashCode;
    }

    @Override // hp.d1
    public abstract tn.h p();
}
