package c.r;

import c.q.d.j;
import c.r.a;

/* JADX INFO: Access modifiers changed from: package-private */
/* JADX INFO: compiled from: _Ranges.kt */
/* JADX INFO: loaded from: classes.dex */
public class g extends f {
    public static int b(int i, int i2) {
        return i < i2 ? i2 : i;
    }

    public static int c(int i, int i2) {
        return i > i2 ? i2 : i;
    }

    public static int d(int i, int i2, int i3) {
        if (i2 <= i3) {
            return i < i2 ? i2 : i > i3 ? i3 : i;
        }
        throw new IllegalArgumentException("Cannot coerce value to an empty range: maximum " + i3 + " is less than minimum " + i2 + '.');
    }

    public static a e(int i, int i2) {
        return a.f1452e.a(i, i2, -1);
    }

    public static a f(a aVar, int i) {
        j.c(aVar, "$this$step");
        f.a(i > 0, Integer.valueOf(i));
        a.C0034a c0034a = a.f1452e;
        int iA = aVar.a();
        int iB = aVar.b();
        if (aVar.c() <= 0) {
            i = -i;
        }
        return c0034a.a(iA, iB, i);
    }

    public static c g(int i, int i2) {
        return i2 <= Integer.MIN_VALUE ? c.g.a() : new c(i, i2 - 1);
    }
}
