package w4;

import java.util.NoSuchElementException;

/* JADX INFO: loaded from: classes.dex */
public final class b extends v4.b {

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final v4.b f34181b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final u4.b f34182c;

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

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

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

    public b(v4.b bVar, u4.b bVar2) {
        super(1);
        this.f34181b = bVar;
        this.f34182c = bVar2;
    }

    @Override // v4.b
    public final int a() {
        if (!this.f34184e) {
            this.f34183d = hasNext();
        }
        if (!this.f34183d) {
            throw new NoSuchElementException();
        }
        this.f34184e = false;
        return this.f34185f;
    }

    @Override // java.util.Iterator
    public final boolean hasNext() {
        if (!this.f34184e) {
            while (true) {
                v4.b bVar = this.f34181b;
                if (!bVar.hasNext()) {
                    this.f34183d = false;
                    break;
                }
                int iA = bVar.a();
                this.f34185f = iA;
                if (this.f34182c.c(iA)) {
                    this.f34183d = true;
                    break;
                }
            }
            this.f34184e = true;
        }
        return this.f34183d;
    }
}
