package x4;

import java.util.Iterator;
import s4.InterfaceC1015a;
import y1.AbstractC1111a;

/* JADX INFO: renamed from: x4.a, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public class C1103a implements Iterable, InterfaceC1015a {

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

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

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

    public C1103a(int i, int i5, int i6) {
        if (i6 == 0) {
            throw new IllegalArgumentException("Step must be non-zero.");
        }
        if (i6 == Integer.MIN_VALUE) {
            throw new IllegalArgumentException("Step must be greater than Int.MIN_VALUE to avoid overflow on negation.");
        }
        this.f10702k = i;
        this.f10703l = AbstractC1111a.g(i, i5, i6);
        this.f10704m = i6;
    }

    public boolean equals(Object obj) {
        if (!(obj instanceof C1103a)) {
            return false;
        }
        if (isEmpty() && ((C1103a) obj).isEmpty()) {
            return true;
        }
        C1103a c1103a = (C1103a) obj;
        return this.f10702k == c1103a.f10702k && this.f10703l == c1103a.f10703l && this.f10704m == c1103a.f10704m;
    }

    public int hashCode() {
        if (isEmpty()) {
            return -1;
        }
        return (((this.f10702k * 31) + this.f10703l) * 31) + this.f10704m;
    }

    public boolean isEmpty() {
        int i = this.f10704m;
        int i5 = this.f10703l;
        int i6 = this.f10702k;
        return i > 0 ? i6 > i5 : i6 < i5;
    }

    @Override // java.lang.Iterable
    public final Iterator iterator() {
        return new C1104b(this.f10702k, this.f10703l, this.f10704m);
    }

    public String toString() {
        StringBuilder sb;
        int i = this.f10703l;
        int i5 = this.f10702k;
        int i6 = this.f10704m;
        if (i6 > 0) {
            sb = new StringBuilder();
            sb.append(i5);
            sb.append("..");
            sb.append(i);
            sb.append(" step ");
            sb.append(i6);
        } else {
            sb = new StringBuilder();
            sb.append(i5);
            sb.append(" downTo ");
            sb.append(i);
            sb.append(" step ");
            sb.append(-i6);
        }
        return sb.toString();
    }
}
