package com.google.android.gms.internal.p002firebaseauthapi; import java.util.Iterator; import java.util.NoSuchElementException; /* loaded from: classes.dex */ abstract class zzd implements Iterator { private Object zza; private int zzb = 2; protected zzd() { } @Override // java.util.Iterator public final boolean hasNext() { int i10 = this.zzb; if (i10 == 4) { throw new IllegalStateException(); } int i11 = i10 - 1; if (i10 == 0) { throw null; } if (i11 == 0) { return true; } if (i11 != 2) { this.zzb = 4; this.zza = zza(); if (this.zzb != 3) { this.zzb = 1; return true; } } return false; } @Override // java.util.Iterator public final Object next() { if (!hasNext()) { throw new NoSuchElementException(); } this.zzb = 2; Object obj = this.zza; this.zza = null; return obj; } @Override // java.util.Iterator public final void remove() { throw new UnsupportedOperationException(); } protected abstract Object zza(); protected final Object zzb() { this.zzb = 3; return null; } }