package g.j0;

import g.c0.r;
import java.util.NoSuchElementException;

/* JADX INFO: compiled from: ProgressionIterators.kt */
/* JADX INFO: loaded from: classes.dex */
@g.i
public final class g extends r {

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

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

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public boolean f4128f;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public int f4129g;

    public g(int i2, int i3, int i4) {
        this.f4126b = i4;
        this.f4127e = i3;
        boolean z = true;
        if (i4 <= 0 ? i2 < i3 : i2 > i3) {
            z = false;
        }
        this.f4128f = z;
        this.f4129g = z ? i2 : i3;
    }

    @Override // g.c0.r
    public int b() {
        int i2 = this.f4129g;
        if (i2 != this.f4127e) {
            this.f4129g = this.f4126b + i2;
        } else {
            if (!this.f4128f) {
                throw new NoSuchElementException();
            }
            this.f4128f = false;
        }
        return i2;
    }

    @Override // java.util.Iterator
    public boolean hasNext() {
        return this.f4128f;
    }
}
