package P4;

import java.util.NoSuchElementException;
import x4.AbstractC3227D;

/* JADX INFO: loaded from: classes3.dex */
public final class h extends AbstractC3227D {

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

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

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

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

    public h(long j4, long j6, long j7) {
        this.f5684a = j7;
        this.f5685b = j6;
        boolean z6 = false;
        if (j7 <= 0 ? j4 >= j6 : j4 <= j6) {
            z6 = true;
        }
        this.f5686c = z6;
        this.f5687d = z6 ? j4 : j6;
    }

    @Override // x4.AbstractC3227D
    public final long a() {
        long j4 = this.f5687d;
        if (j4 != this.f5685b) {
            this.f5687d = this.f5684a + j4;
            return j4;
        }
        if (!this.f5686c) {
            throw new NoSuchElementException();
        }
        this.f5686c = false;
        return j4;
    }

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