package F0;

import java.util.List;
import java.util.NoSuchElementException;

/* JADX INFO: loaded from: classes.dex */
public final class f implements M0.c {

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

    /* JADX INFO: renamed from: r, reason: collision with root package name */
    public long f2269r = -1;

    /* JADX INFO: renamed from: s, reason: collision with root package name */
    public final List f2270s;

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

    public f(long j8, List list) {
        this.f2268q = list.size() - 1;
        this.f2271t = j8;
        this.f2270s = list;
    }

    @Override // M0.c
    public final long b() {
        long j8 = this.f2269r;
        if (j8 < 0 || j8 > this.f2268q) {
            throw new NoSuchElementException();
        }
        G0.i iVar = (G0.i) this.f2270s.get((int) j8);
        return this.f2271t + iVar.f2797u + iVar.f2795s;
    }

    @Override // M0.c
    public final long j() {
        long j8 = this.f2269r;
        if (j8 < 0 || j8 > this.f2268q) {
            throw new NoSuchElementException();
        }
        return this.f2271t + ((G0.i) this.f2270s.get((int) j8)).f2797u;
    }

    @Override // M0.c
    public final boolean next() {
        long j8 = this.f2269r + 1;
        this.f2269r = j8;
        return !(j8 > this.f2268q);
    }
}
