package hn;

import jn.i;
import kotlin.jvm.internal.t;

/* loaded from: classes3.dex */
public abstract class d {
    public static final String a(Object from, Object until) {
        t.g(from, "from");
        t.g(until, "until");
        return "Random range is empty: [" + from + ", " + until + ").";
    }

    public static final void b(int i10, int i11) {
        if (!(i11 > i10)) {
            throw new IllegalArgumentException(a(Integer.valueOf(i10), Integer.valueOf(i11)).toString());
        }
    }

    public static final int c(int i10) {
        return 31 - Integer.numberOfLeadingZeros(i10);
    }

    public static final int d(c cVar, i range) {
        t.g(cVar, "<this>");
        t.g(range, "range");
        if (!range.isEmpty()) {
            return range.m() < Integer.MAX_VALUE ? cVar.e(range.g(), range.m() + 1) : range.g() > Integer.MIN_VALUE ? cVar.e(range.g() - 1, range.m()) + 1 : cVar.c();
        }
        throw new IllegalArgumentException("Cannot get random in empty range: " + range);
    }

    public static final int e(int i10, int i11) {
        return (i10 >>> (32 - i11)) & ((-i11) >> 31);
    }
}
