package P4;

import java.util.NoSuchElementException;
import x4.AbstractC3226C;

/* JADX INFO: loaded from: classes3.dex */
public final class f extends AbstractC3226C {

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

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

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

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

    public f(int i6, int i7, int i8) {
        this.f5679a = i8;
        this.f5680b = i7;
        boolean z6 = false;
        if (i8 <= 0 ? i6 >= i7 : i6 <= i7) {
            z6 = true;
        }
        this.f5681c = z6;
        this.f5682d = z6 ? i6 : i7;
    }

    @Override // x4.AbstractC3226C
    public final int a() {
        int i6 = this.f5682d;
        if (i6 != this.f5680b) {
            this.f5682d = this.f5679a + i6;
            return i6;
        }
        if (!this.f5681c) {
            throw new NoSuchElementException();
        }
        this.f5681c = false;
        return i6;
    }

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