package defpackage;

import java.util.Collection;
import java.util.ConcurrentModificationException;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
import java.util.Map;

/* renamed from: ᵰᵷᵹˆ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public class C4369 implements Iterator {

    /* renamed from: ᵢˇᵭ, reason: contains not printable characters */
    public final Iterator f16342;

    /* renamed from: ᵧᵾˀˈ, reason: contains not printable characters */
    public final /* synthetic */ int f16343 = 0;

    /* renamed from: ᵾᵬ, reason: contains not printable characters */
    public final /* synthetic */ Object f16344;

    /* renamed from: ᵿʗᵝʽ, reason: contains not printable characters */
    public Object f16345;

    public C4369(C2243 c2243) {
        this.f16344 = c2243;
        this.f16342 = c2243.f8794.entrySet().iterator();
    }

    public C4369(C3152 c3152) {
        this.f16344 = c3152;
        Collection collection = c3152.f11973;
        this.f16345 = collection;
        this.f16342 = collection instanceof List ? ((List) collection).listIterator() : collection.iterator();
    }

    public C4369(C3152 c3152, ListIterator listIterator) {
        this.f16344 = c3152;
        this.f16345 = c3152.f11973;
        this.f16342 = listIterator;
    }

    public C4369(C3614 c3614, Iterator it) {
        this.f16342 = it;
        this.f16344 = c3614;
    }

    @Override // java.util.Iterator
    public final boolean hasNext() {
        switch (this.f16343) {
            case 0:
                break;
            case 1:
                break;
            default:
                m9356();
                break;
        }
        return this.f16342.hasNext();
    }

    @Override // java.util.Iterator
    public final Object next() {
        int i = this.f16343;
        Iterator it = this.f16342;
        switch (i) {
            case 0:
                Map.Entry entry = (Map.Entry) it.next();
                this.f16345 = (Collection) entry.getValue();
                return ((C2243) this.f16344).m5915(entry);
            case 1:
                Map.Entry entry2 = (Map.Entry) it.next();
                this.f16345 = entry2;
                return entry2.getKey();
            default:
                m9356();
                return it.next();
        }
    }

    @Override // java.util.Iterator
    public final void remove() {
        int i = this.f16343;
        Object obj = this.f16344;
        Iterator it = this.f16342;
        switch (i) {
            case 0:
                ᵛᵾˏ.ᵢˇᵭ("no calls to next() since the last call to remove()", ((Collection) this.f16345) != null);
                it.remove();
                ((C2243) obj).f8793.f14929 -= ((Collection) this.f16345).size();
                ((Collection) this.f16345).clear();
                this.f16345 = null;
                break;
            case 1:
                ᵛᵾˏ.ᵢˇᵭ("no calls to next() since the last call to remove()", ((Map.Entry) this.f16345) != null);
                Collection collection = (Collection) ((Map.Entry) this.f16345).getValue();
                it.remove();
                ((C3614) obj).f13460.f14929 -= collection.size();
                collection.clear();
                this.f16345 = null;
                break;
            default:
                it.remove();
                C3152 c3152 = (C3152) obj;
                c3152.f11974.f14929--;
                c3152.m7510();
                break;
        }
    }

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public void m9356() {
        C3152 c3152 = (C3152) this.f16344;
        c3152.m7508();
        if (c3152.f11973 != ((Collection) this.f16345)) {
            throw new ConcurrentModificationException();
        }
    }
}
