package f.b0;

import f.u.x;
import java.util.NoSuchElementException;

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

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

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

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    private boolean f3912g;

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    private int f3913h;

    public g(int i2, int i3, int i4) {
        this.f3910b = i4;
        this.f3911f = i3;
        boolean z = true;
        if (i4 <= 0 ? i2 < i3 : i2 > i3) {
            z = false;
        }
        this.f3912g = z;
        this.f3913h = z ? i2 : this.f3911f;
    }

    @Override // f.u.x
    public int a() {
        int i2 = this.f3913h;
        if (i2 != this.f3911f) {
            this.f3913h = this.f3910b + i2;
        } else {
            if (!this.f3912g) {
                throw new NoSuchElementException();
            }
            this.f3912g = false;
        }
        return i2;
    }

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