package y0;

import java.util.ConcurrentModificationException;
import java.util.Iterator;

/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes.dex */
public final class b3 implements k1.b, Iterable, en.a {

    /* renamed from: p, reason: collision with root package name */
    private final a3 f51495p;

    /* renamed from: q, reason: collision with root package name */
    private final int f51496q;

    /* renamed from: r, reason: collision with root package name */
    private final int f51497r;

    public b3(a3 a3Var, int i10, int i11) {
        this.f51495p = a3Var;
        this.f51496q = i10;
        this.f51497r = i11;
    }

    private final void e() {
        if (this.f51495p.I() != this.f51497r) {
            throw new ConcurrentModificationException();
        }
    }

    @Override // java.lang.Iterable
    public Iterator iterator() {
        int I;
        e();
        u0 R = this.f51495p.R(this.f51496q);
        if (R != null) {
            a3 a3Var = this.f51495p;
            int i10 = this.f51496q;
            return new u3(a3Var, i10, R, new e(i10));
        }
        a3 a3Var2 = this.f51495p;
        int i11 = this.f51496q;
        I = c3.I(a3Var2.D(), this.f51496q);
        return new s0(a3Var2, i11 + 1, i11 + I);
    }
}
