package com.google.android.gms.internal.clearcut; import java.util.Iterator; import java.util.List; import java.util.Map; /* JADX INFO: Add missing generic type declarations: [V, K] */ /* loaded from: classes2.dex */ final class zzek implements Iterator> { private int pos; private Iterator> zzor; private final zzei zzos; @Override // java.util.Iterator public final void remove() { throw new UnsupportedOperationException(); } @Override // java.util.Iterator public final /* synthetic */ Object next() { List list; Map.Entry entry; if (zzdw().hasNext()) { entry = zzdw().next(); } else { list = this.zzos.zzom; int i = this.pos - 1; this.pos = i; entry = (Map.Entry) list.get(i); } return entry; } @Override // java.util.Iterator public final boolean hasNext() { List list; int i = this.pos; if (i > 0) { list = this.zzos.zzom; if (i <= list.size()) { return true; } } return zzdw().hasNext(); } private final Iterator> zzdw() { Map map; if (this.zzor == null) { map = this.zzos.zzop; this.zzor = map.entrySet().iterator(); } return this.zzor; } /* JADX INFO: Access modifiers changed from: package-private */ public /* synthetic */ zzek(zzei zzeiVar, zzej zzejVar) { this(zzeiVar); } private zzek(zzei zzeiVar) { List list; this.zzos = zzeiVar; list = zzeiVar.zzom; this.pos = list.size(); } }