package d.p0;

import d.j0.f0;
import java.util.NoSuchElementException;

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

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

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

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

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

    public g(int i, int i2, int i3) {
        this.f2673c = i3;
        this.f2674d = i2;
        boolean z = true;
        if (i3 <= 0 ? i < i2 : i > i2) {
            z = false;
        }
        this.f2675e = z;
        this.f2676f = z ? i : i2;
    }

    @Override // d.j0.f0
    public int a() {
        int i = this.f2676f;
        if (i != this.f2674d) {
            this.f2676f = this.f2673c + i;
        } else {
            if (!this.f2675e) {
                throw new NoSuchElementException();
            }
            this.f2675e = false;
        }
        return i;
    }

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