package p402.p417;

import java.util.Iterator;
import kotlin.jvm.internal.DefaultConstructorMarker;
import p138.p176.p177.p242.p246.p251.C4303;
import p402.InterfaceC6540;
import p402.p411.p413.p414.InterfaceC6650;

/* JADX INFO: renamed from: ގ.ޑ.֏, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
@InterfaceC6540
public class C6659 implements Iterable<Integer>, InterfaceC6650 {

    /* JADX INFO: renamed from: ކ, reason: contains not printable characters */
    public static final C6660 f19411 = new C6660(null);

    /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
    public final int f19412;

    /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
    public final int f19413;

    /* JADX INFO: renamed from: ޅ, reason: contains not printable characters */
    public final int f19414;

    /* JADX INFO: renamed from: ގ.ޑ.֏$֏, reason: contains not printable characters */
    public static final class C6660 {
        public C6660() {
        }

        public /* synthetic */ C6660(DefaultConstructorMarker defaultConstructorMarker) {
        }
    }

    public C6659(int i, int i2, int i3) {
        if (i3 == 0) {
            throw new IllegalArgumentException("Step must be non-zero.");
        }
        if (i3 == Integer.MIN_VALUE) {
            throw new IllegalArgumentException("Step must be greater than Int.MIN_VALUE to avoid overflow on negation.");
        }
        this.f19412 = i;
        if (i3 > 0) {
            if (i < i2) {
                i2 -= C4303.m6977(C4303.m6977(i2, i3) - C4303.m6977(i, i3), i3);
            }
        } else {
            if (i3 >= 0) {
                throw new IllegalArgumentException("Step is zero.");
            }
            if (i > i2) {
                int i4 = -i3;
                i2 += C4303.m6977(C4303.m6977(i, i4) - C4303.m6977(i2, i4), i4);
            }
        }
        this.f19413 = i2;
        this.f19414 = i3;
    }

    public boolean equals(Object obj) {
        if (obj instanceof C6659) {
            if (!isEmpty() || !((C6659) obj).isEmpty()) {
                C6659 c6659 = (C6659) obj;
                if (this.f19412 != c6659.f19412 || this.f19413 != c6659.f19413 || this.f19414 != c6659.f19414) {
                }
            }
            return true;
        }
        return false;
    }

    public int hashCode() {
        if (isEmpty()) {
            return -1;
        }
        return (((this.f19412 * 31) + this.f19413) * 31) + this.f19414;
    }

    public boolean isEmpty() {
        if (this.f19414 > 0) {
            if (this.f19412 > this.f19413) {
                return true;
            }
        } else if (this.f19412 < this.f19413) {
            return true;
        }
        return false;
    }

    @Override // java.lang.Iterable
    public Iterator<Integer> iterator() {
        return new C6661(this.f19412, this.f19413, this.f19414);
    }

    public String toString() {
        StringBuilder sb;
        int i;
        if (this.f19414 > 0) {
            sb = new StringBuilder();
            sb.append(this.f19412);
            sb.append("..");
            sb.append(this.f19413);
            sb.append(" step ");
            i = this.f19414;
        } else {
            sb = new StringBuilder();
            sb.append(this.f19412);
            sb.append(" downTo ");
            sb.append(this.f19413);
            sb.append(" step ");
            i = -this.f19414;
        }
        sb.append(i);
        return sb.toString();
    }
}
