package U6;

import java.util.Iterator;
import java.util.NoSuchElementException;

/* JADX INFO: loaded from: classes.dex */
public final class d implements Iterator, Q6.a {

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

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

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

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

    public d(long j8, long j9) {
        this.f6805q = j9;
        this.f6806r = j8;
        boolean z8 = false;
        if (j9 <= 0 ? 1 >= j8 : 1 <= j8) {
            z8 = true;
        }
        this.f6807s = z8;
        this.f6808t = z8 ? 1L : j8;
    }

    public final long a() {
        long j8 = this.f6808t;
        if (j8 != this.f6806r) {
            this.f6808t = this.f6805q + j8;
            return j8;
        }
        if (!this.f6807s) {
            throw new NoSuchElementException();
        }
        this.f6807s = false;
        return j8;
    }

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

    @Override // java.util.Iterator
    public final /* bridge */ /* synthetic */ Object next() {
        return Long.valueOf(a());
    }

    @Override // java.util.Iterator
    public final void remove() {
        throw new UnsupportedOperationException("Operation is not supported for read-only collection");
    }
}
