package FSaI4_7.Xgtqvk_8.QxJ9d_1;

import java.util.Arrays;
import java.util.List;
/* compiled from: Intrinsics.java */
/* loaded from: classes.dex */
public class IFxWkV_5 {
    public static void KQgRr5e_0() {
        FSaI4_7.KQgRr5e_0 kQgRr5e_0 = new FSaI4_7.KQgRr5e_0();
        KQgRr5e_0(kQgRr5e_0);
        throw kQgRr5e_0;
    }

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

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

    public static void KQgRr5e_0(String str) {
        StackTraceElement stackTraceElement = Thread.currentThread().getStackTrace()[3];
        String className = stackTraceElement.getClassName();
        String methodName = stackTraceElement.getMethodName();
        IllegalArgumentException illegalArgumentException = new IllegalArgumentException("Parameter specified as non-null is null: method " + className + "." + methodName + ", parameter " + str);
        KQgRr5e_0(illegalArgumentException);
        throw illegalArgumentException;
    }

    public static boolean KQgRr5e_0(Object obj, Object obj2) {
        if (obj == null) {
            return obj2 == null;
        }
        return obj.equals(obj2);
    }

    public static <T extends Throwable> T KQgRr5e_0(T t) {
        KQgRr5e_0((Throwable) t, IFxWkV_5.class.getName());
        return t;
    }

    public static <T extends Throwable> T KQgRr5e_0(T t, String str) {
        StackTraceElement[] stackTrace = t.getStackTrace();
        int length = stackTrace.length;
        int i = -1;
        for (int i2 = 0; i2 < length; i2++) {
            if (str.equals(stackTrace[i2].getClassName())) {
                i = i2;
            }
        }
        List subList = Arrays.asList(stackTrace).subList(i + 1, length);
        t.setStackTrace((StackTraceElement[]) subList.toArray(new StackTraceElement[subList.size()]));
        return t;
    }
}
