package defpackage;

import java.util.AbstractList;
import java.util.ConcurrentModificationException;
import java.util.ListIterator;

/* renamed from: ᵵᵬᵧᵫ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C4746 implements ListIterator, InterfaceC3996 {

    /* renamed from: ᵢˇᵭ, reason: contains not printable characters */
    public int f17597;

    /* renamed from: ᵤᵙᵷ, reason: contains not printable characters */
    public final AbstractC4100 f17598;

    /* renamed from: ᵾᵬ, reason: contains not printable characters */
    public int f17600;

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

    /* renamed from: ᵿʗᵝʽ, reason: contains not printable characters */
    public int f17601 = -1;

    public C4746(C0033 c0033, int i) {
        this.f17598 = c0033;
        this.f17597 = i;
        this.f17600 = ((AbstractList) c0033).modCount;
    }

    public C4746(C3947 c3947, int i) {
        this.f17598 = c3947;
        this.f17597 = i;
        this.f17600 = ((AbstractList) c3947).modCount;
    }

    @Override // java.util.ListIterator
    public final void add(Object obj) {
        int i = this.f17599;
        AbstractC4100 abstractC4100 = this.f17598;
        switch (i) {
            case 0:
                m10028();
                C0033 c0033 = (C0033) abstractC4100;
                int i2 = this.f17597;
                this.f17597 = i2 + 1;
                c0033.add(i2, obj);
                this.f17601 = -1;
                this.f17600 = ((AbstractList) c0033).modCount;
                break;
            default:
                m10029();
                C3947 c3947 = (C3947) abstractC4100;
                int i3 = this.f17597;
                this.f17597 = i3 + 1;
                c3947.add(i3, obj);
                this.f17601 = -1;
                this.f17600 = ((AbstractList) c3947).modCount;
                break;
        }
    }

    @Override // java.util.ListIterator, java.util.Iterator
    public final boolean hasNext() {
        int i = this.f17599;
        AbstractC4100 abstractC4100 = this.f17598;
        switch (i) {
            case 0:
                if (this.f17597 < ((C0033) abstractC4100).f1161) {
                    break;
                }
                break;
            default:
                if (this.f17597 < ((C3947) abstractC4100).f14901) {
                    break;
                }
                break;
        }
        return true;
    }

    @Override // java.util.ListIterator
    public final boolean hasPrevious() {
        switch (this.f17599) {
            case 0:
                if (this.f17597 > 0) {
                }
                break;
            default:
                if (this.f17597 > 0) {
                }
                break;
        }
        return false;
    }

    @Override // java.util.ListIterator, java.util.Iterator
    public final Object next() {
        int i = this.f17599;
        AbstractC4100 abstractC4100 = this.f17598;
        switch (i) {
            case 0:
                m10028();
                int i2 = this.f17597;
                C0033 c0033 = (C0033) abstractC4100;
                if (i2 >= c0033.f1161) {
                    C0190.m1427();
                    break;
                } else {
                    this.f17597 = i2 + 1;
                    this.f17601 = i2;
                    break;
                }
            default:
                m10029();
                int i3 = this.f17597;
                C3947 c3947 = (C3947) abstractC4100;
                if (i3 >= c3947.f14901) {
                    C0190.m1427();
                    break;
                } else {
                    this.f17597 = i3 + 1;
                    this.f17601 = i3;
                    break;
                }
        }
        return null;
    }

    @Override // java.util.ListIterator
    public final int nextIndex() {
        switch (this.f17599) {
        }
        return this.f17597;
    }

    @Override // java.util.ListIterator
    public final Object previous() {
        int i = this.f17599;
        AbstractC4100 abstractC4100 = this.f17598;
        switch (i) {
            case 0:
                m10028();
                int i2 = this.f17597;
                if (i2 <= 0) {
                    C0190.m1427();
                    break;
                } else {
                    int i3 = i2 - 1;
                    this.f17597 = i3;
                    this.f17601 = i3;
                    C0033 c0033 = (C0033) abstractC4100;
                    break;
                }
            default:
                m10029();
                int i4 = this.f17597;
                if (i4 <= 0) {
                    C0190.m1427();
                    break;
                } else {
                    int i5 = i4 - 1;
                    this.f17597 = i5;
                    this.f17601 = i5;
                    break;
                }
        }
        return null;
    }

    @Override // java.util.ListIterator
    public final int previousIndex() {
        int i;
        switch (this.f17599) {
            case 0:
                i = this.f17597;
                break;
            default:
                i = this.f17597;
                break;
        }
        return i - 1;
    }

    @Override // java.util.ListIterator, java.util.Iterator
    public final void remove() {
        int i = this.f17599;
        AbstractC4100 abstractC4100 = this.f17598;
        switch (i) {
            case 0:
                C0033 c0033 = (C0033) abstractC4100;
                m10028();
                int i2 = this.f17601;
                if (i2 == -1) {
                    ᵹˉᵞ.ᵳٴᵶ("Call next() or previous() before removing element from the iterator.");
                    break;
                } else {
                    c0033.mo1038(i2);
                    this.f17597 = this.f17601;
                    this.f17601 = -1;
                    this.f17600 = ((AbstractList) c0033).modCount;
                    break;
                }
            default:
                C3947 c3947 = (C3947) abstractC4100;
                m10029();
                int i3 = this.f17601;
                if (i3 == -1) {
                    ᵹˉᵞ.ᵳٴᵶ("Call next() or previous() before removing element from the iterator.");
                    break;
                } else {
                    c3947.mo1038(i3);
                    this.f17597 = this.f17601;
                    this.f17601 = -1;
                    this.f17600 = ((AbstractList) c3947).modCount;
                    break;
                }
        }
    }

    @Override // java.util.ListIterator
    public final void set(Object obj) {
        int i = this.f17599;
        AbstractC4100 abstractC4100 = this.f17598;
        switch (i) {
            case 0:
                m10028();
                int i2 = this.f17601;
                if (i2 == -1) {
                    ᵹˉᵞ.ᵳٴᵶ("Call next() or previous() before replacing element from the iterator.");
                    break;
                } else {
                    ((C0033) abstractC4100).set(i2, obj);
                    break;
                }
            default:
                m10029();
                int i3 = this.f17601;
                if (i3 == -1) {
                    ᵹˉᵞ.ᵳٴᵶ("Call next() or previous() before replacing element from the iterator.");
                    break;
                } else {
                    ((C3947) abstractC4100).set(i3, obj);
                    break;
                }
        }
    }

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public void m10028() {
        if (((AbstractList) ((C0033) this.f17598).f1158).modCount != this.f17600) {
            throw new ConcurrentModificationException();
        }
    }

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public void m10029() {
        if (((AbstractList) ((C3947) this.f17598)).modCount != this.f17600) {
            throw new ConcurrentModificationException();
        }
    }
}
