package defpackage;

import j$.util.Objects;
import java.util.AbstractMap;
import java.util.Iterator;
import java.util.Map;

/* JADX INFO: renamed from: ˈᵩ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C1104 implements Iterator {

    /* JADX INFO: renamed from: ˌᴵ, reason: contains not printable characters */
    public final /* synthetic */ int f4731;

    /* JADX INFO: renamed from: ᵔᵖᵹᵫ, reason: contains not printable characters */
    public boolean f4732;

    /* JADX INFO: renamed from: ᵜᵪʾ, reason: contains not printable characters */
    public int f4733;

    /* JADX INFO: renamed from: ᵨᵼⁱ, reason: contains not printable characters */
    public Iterator f4734;

    /* JADX INFO: renamed from: ᵯᵷʽ, reason: contains not printable characters */
    public final /* synthetic */ AbstractMap f4735;

    public /* synthetic */ C1104(C4770 c4770) {
        this.f4731 = 1;
        Objects.requireNonNull(c4770);
        this.f4735 = c4770;
        this.f4733 = -1;
    }

    public C1104(C5489 c5489) {
        this.f4731 = 0;
        this.f4735 = c5489;
        this.f4733 = -1;
    }

    @Override // java.util.Iterator
    public final boolean hasNext() {
        int i = this.f4731;
        AbstractMap abstractMap = this.f4735;
        switch (i) {
            case 0:
                C5489 c5489 = (C5489) abstractMap;
                if (this.f4733 + 1 >= c5489.f20748.size()) {
                    if (c5489.f20750.isEmpty() || !m3583().hasNext()) {
                    }
                }
                break;
            default:
                C4770 c4770 = (C4770) abstractMap;
                if (this.f4733 + 1 >= c4770.f18152) {
                    if (c4770.f18151.isEmpty() || !m3582().hasNext()) {
                    }
                }
                break;
        }
        return false;
    }

    @Override // java.util.Iterator
    public final Object next() {
        int i = this.f4731;
        AbstractMap abstractMap = this.f4735;
        switch (i) {
            case 0:
                this.f4732 = true;
                int i2 = this.f4733 + 1;
                this.f4733 = i2;
                C5489 c5489 = (C5489) abstractMap;
                return i2 < c5489.f20748.size() ? (Map.Entry) c5489.f20748.get(this.f4733) : (Map.Entry) m3583().next();
            default:
                this.f4732 = true;
                int i3 = this.f4733 + 1;
                this.f4733 = i3;
                C4770 c4770 = (C4770) abstractMap;
                return i3 < c4770.f18152 ? (C1552) c4770.f18150[i3] : (Map.Entry) m3582().next();
        }
    }

    @Override // java.util.Iterator
    public final void remove() {
        int i = this.f4731;
        AbstractMap abstractMap = this.f4735;
        switch (i) {
            case 0:
                C5489 c5489 = (C5489) abstractMap;
                if (!this.f4732) {
                    ᵕᵩʽᵲ.ᵪᵹᵥᵻ("remove() was called before next()");
                } else {
                    this.f4732 = false;
                    int i2 = C5489.f20747;
                    c5489.m11115();
                    if (this.f4733 >= c5489.f20748.size()) {
                        m3583().remove();
                    } else {
                        int i3 = this.f4733;
                        this.f4733 = i3 - 1;
                        c5489.m11116(i3);
                    }
                }
                break;
            default:
                if (!this.f4732) {
                    ᵕᵩʽᵲ.ᵪᵹᵥᵻ("remove() was called before next()");
                } else {
                    this.f4732 = false;
                    C4770 c4770 = (C4770) abstractMap;
                    c4770.m9960();
                    int i4 = this.f4733;
                    if (i4 >= c4770.f18152) {
                        m3582().remove();
                    } else {
                        this.f4733 = i4 - 1;
                        c4770.m9959(i4);
                    }
                }
                break;
        }
    }

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public Iterator m3582() {
        if (this.f4734 == null) {
            this.f4734 = ((C4770) this.f4735).f18151.entrySet().iterator();
        }
        return this.f4734;
    }

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public Iterator m3583() {
        if (this.f4734 == null) {
            this.f4734 = ((C5489) this.f4735).f20750.entrySet().iterator();
        }
        return this.f4734;
    }
}
