package com.google.android.gms.internal.measurement; import java.util.Iterator; import java.util.List; import java.util.Map; /* loaded from: classes.dex */ final class zzlv implements Iterator { final zzlx zza; private int zzb = -1; private boolean zzc; private Iterator zzd; private final Iterator zza() { Map map; if (this.zzd == null) { map = this.zza.zzc; this.zzd = map.entrySet().iterator(); } return this.zzd; } @Override // java.util.Iterator public final boolean hasNext() { List list; Map map; int i = this.zzb + 1; list = this.zza.zzb; if (i < list.size()) { return true; } map = this.zza.zzc; return !map.isEmpty() && zza().hasNext(); } @Override // java.util.Iterator public final /* synthetic */ Map.Entry next() { List list; List list2; this.zzc = true; int i = this.zzb + 1; this.zzb = i; list = this.zza.zzb; if (i >= list.size()) { return zza().next(); } list2 = this.zza.zzb; return (Map.Entry) list2.get(this.zzb); } @Override // java.util.Iterator public final void remove() { List list; if (this.zzc) { this.zzc = false; this.zza.zzn(); int i = this.zzb; list = this.zza.zzb; if (i < list.size()) { zzlx zzlxVar = this.zza; int i2 = this.zzb; this.zzb = i2 - 1; zzlxVar.zzl(i2); return; } zza().remove(); return; } throw new IllegalStateException("remove() was called before next()"); } /* JADX INFO: Access modifiers changed from: package-private */ public /* synthetic */ zzlv(zzlx zzlxVar, zzlq zzlqVar) { this.zza = zzlxVar; } }