package j.p0.d;

import java.util.Arrays;

/* JADX INFO: compiled from: Intrinsics.java */
/* JADX INFO: loaded from: classes.dex */
public class r {
    private r() {
    }

    public static boolean a(Object obj, Object obj2) {
        return obj == null ? obj2 == null : obj.equals(obj2);
    }

    public static void b(Object obj, String str) {
        if (obj != null) {
            return;
        }
        IllegalStateException illegalStateException = new IllegalStateException(str + " must not be null");
        k(illegalStateException);
        throw illegalStateException;
    }

    public static void c(Object obj) {
        if (obj != null) {
            return;
        }
        n();
        throw null;
    }

    public static void d(Object obj, String str) {
        if (obj != null) {
            return;
        }
        o(str);
        throw null;
    }

    public static void e(Object obj, String str) {
        if (obj != null) {
            return;
        }
        NullPointerException nullPointerException = new NullPointerException(str + " must not be null");
        k(nullPointerException);
        throw nullPointerException;
    }

    public static void f(Object obj, String str) {
        if (obj != null) {
            return;
        }
        r(str);
        throw null;
    }

    public static void g(Object obj, String str) {
        if (obj != null) {
            return;
        }
        q(str);
        throw null;
    }

    public static int h(int i2, int i3) {
        if (i2 < i3) {
            return -1;
        }
        return i2 == i3 ? 0 : 1;
    }

    public static int i(long j2, long j3) {
        if (j2 < j3) {
            return -1;
        }
        return j2 == j3 ? 0 : 1;
    }

    private static String j(String str) {
        StackTraceElement stackTraceElement = Thread.currentThread().getStackTrace()[4];
        return "Parameter specified as non-null is null: method " + stackTraceElement.getClassName() + "." + stackTraceElement.getMethodName() + ", parameter " + str;
    }

    private static <T extends Throwable> T k(T t) {
        l(t, r.class.getName());
        return t;
    }

    static <T extends Throwable> T l(T t, String str) {
        StackTraceElement[] stackTrace = t.getStackTrace();
        int length = stackTrace.length;
        int i2 = -1;
        for (int i3 = 0; i3 < length; i3++) {
            if (str.equals(stackTrace[i3].getClassName())) {
                i2 = i3;
            }
        }
        t.setStackTrace((StackTraceElement[]) Arrays.copyOfRange(stackTrace, i2 + 1, length));
        return t;
    }

    public static String m(String str, Object obj) {
        return str + obj;
    }

    public static void n() {
        NullPointerException nullPointerException = new NullPointerException();
        k(nullPointerException);
        throw nullPointerException;
    }

    public static void o(String str) {
        NullPointerException nullPointerException = new NullPointerException(str);
        k(nullPointerException);
        throw nullPointerException;
    }

    public static void p() {
        j.h hVar = new j.h();
        k(hVar);
        throw hVar;
    }

    private static void q(String str) {
        IllegalArgumentException illegalArgumentException = new IllegalArgumentException(j(str));
        k(illegalArgumentException);
        throw illegalArgumentException;
    }

    private static void r(String str) {
        NullPointerException nullPointerException = new NullPointerException(j(str));
        k(nullPointerException);
        throw nullPointerException;
    }

    public static void s(String str) {
        j.g0 g0Var = new j.g0(str);
        k(g0Var);
        throw g0Var;
    }

    public static void t(String str) {
        s("lateinit property " + str + " has not been initialized");
        throw null;
    }
}
