package com.google.android.gms.internal.ads;

import java.util.NoSuchElementException;

/* JADX INFO: loaded from: classes2.dex */
public abstract class zq1 extends ct1 {

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public Object f19370b;

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

    public zq1() {
        super(0);
        this.f19371c = 2;
    }

    public abstract Object a();

    @Override // java.util.Iterator
    public final boolean hasNext() {
        ih1.b1(this.f19371c != 4);
        int i10 = this.f19371c;
        int i11 = i10 - 1;
        if (i10 == 0) {
            throw null;
        }
        if (i11 == 0) {
            return true;
        }
        if (i11 != 2) {
            this.f19371c = 4;
            this.f19370b = a();
            if (this.f19371c != 3) {
                this.f19371c = 1;
                return true;
            }
        }
        return false;
    }

    @Override // com.google.android.gms.internal.ads.ct1, java.util.Iterator
    public final Object next() {
        if (!hasNext()) {
            throw new NoSuchElementException();
        }
        this.f19371c = 2;
        Object obj = this.f19370b;
        this.f19370b = null;
        return obj;
    }
}
