package kotlin.ranges;

import g.h.a.i;
import kotlin.Metadata;
import kotlin.collections.IntIterator;
import kotlin.jvm.internal.markers.KMappedMarker;

/* JADX INFO: renamed from: r.h0.d, reason: from Kotlin metadata */
/* JADX INFO: loaded from: classes.dex */
@Metadata(d1 = {"\u0000,\n\u0002\u0018\u0002\n\u0002\u0010\u001c\n\u0002\u0010\b\n\u0002\b\u000b\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0000\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\b\u0016\u0018\u0000 \u00172\b\u0012\u0004\u0012\u00020\u00020\u0001:\u0001\u0017B\u001f\b\u0000\u0012\u0006\u0010\u0003\u001a\u00020\u0002\u0012\u0006\u0010\u0004\u001a\u00020\u0002\u0012\u0006\u0010\u0005\u001a\u00020\u0002¢\u0006\u0002\u0010\u0006J\u0013\u0010\r\u001a\u00020\u000e2\b\u0010\u000f\u001a\u0004\u0018\u00010\u0010H\u0096\u0002J\b\u0010\u0011\u001a\u00020\u0002H\u0016J\b\u0010\u0012\u001a\u00020\u000eH\u0016J\t\u0010\u0013\u001a\u00020\u0014H\u0096\u0002J\b\u0010\u0015\u001a\u00020\u0016H\u0016R\u0011\u0010\u0007\u001a\u00020\u0002¢\u0006\b\n\u0000\u001a\u0004\b\b\u0010\tR\u0011\u0010\n\u001a\u00020\u0002¢\u0006\b\n\u0000\u001a\u0004\b\u000b\u0010\tR\u0011\u0010\u0005\u001a\u00020\u0002¢\u0006\b\n\u0000\u001a\u0004\b\f\u0010\t¨\u0006\u0018"}, d2 = {"Lkotlin/ranges/IntProgression;", "", "", "start", "endInclusive", "step", "(III)V", "first", "getFirst", "()I", "last", "getLast", "getStep", "equals", "", "other", "", "hashCode", "isEmpty", "iterator", "Lkotlin/collections/IntIterator;", "toString", "", "Companion", "kotlin-stdlib"}, k = 1, mv = {1, 7, 1}, xi = 48)
public class IntProgression implements Iterable<Integer>, KMappedMarker {

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public final int f6199f;

    /* JADX INFO: renamed from: m, reason: collision with root package name */
    public final int f6200m;

    /* JADX INFO: renamed from: n, reason: collision with root package name */
    public final int f6201n;

    public IntProgression(int i2, int i3, int i4) {
        if (i4 == 0) {
            throw new IllegalArgumentException("Step must be non-zero.");
        }
        if (i4 == Integer.MIN_VALUE) {
            throw new IllegalArgumentException("Step must be greater than Int.MIN_VALUE to avoid overflow on negation.");
        }
        this.f6199f = i2;
        this.f6200m = i.C1(i2, i3, i4);
        this.f6201n = i4;
    }

    @Override // java.lang.Iterable
    /* JADX INFO: renamed from: a, reason: merged with bridge method [inline-methods] */
    public IntIterator iterator() {
        return new IntProgressionIterator(this.f6199f, this.f6200m, this.f6201n);
    }

    public boolean equals(Object other) {
        if (other instanceof IntProgression) {
            if (!isEmpty() || !((IntProgression) other).isEmpty()) {
                IntProgression intProgression = (IntProgression) other;
                if (this.f6199f != intProgression.f6199f || this.f6200m != intProgression.f6200m || this.f6201n != intProgression.f6201n) {
                }
            }
            return true;
        }
        return false;
    }

    public int hashCode() {
        if (isEmpty()) {
            return -1;
        }
        return (((this.f6199f * 31) + this.f6200m) * 31) + this.f6201n;
    }

    public boolean isEmpty() {
        if (this.f6201n > 0) {
            if (this.f6199f > this.f6200m) {
                return true;
            }
        } else if (this.f6199f < this.f6200m) {
            return true;
        }
        return false;
    }

    public String toString() {
        StringBuilder sb;
        int i2;
        if (this.f6201n > 0) {
            sb = new StringBuilder();
            sb.append(this.f6199f);
            sb.append("..");
            sb.append(this.f6200m);
            sb.append(" step ");
            i2 = this.f6201n;
        } else {
            sb = new StringBuilder();
            sb.append(this.f6199f);
            sb.append(" downTo ");
            sb.append(this.f6200m);
            sb.append(" step ");
            i2 = -this.f6201n;
        }
        sb.append(i2);
        return sb.toString();
    }
}
