package defpackage;

import java.util.Iterator;

/* renamed from: ˋᐧᵙ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C1488 implements Iterator, InterfaceC3996 {

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

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

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

    public C1488(Iterator it) {
        this.f5991 = it;
    }

    public C1488(C5043 c5043) {
        this.f5991 = c5043.f18843.iterator();
        this.f5993 = c5043.f18844;
    }

    @Override // java.util.Iterator
    public final boolean hasNext() {
        int i = this.f5992;
        Iterator it = this.f5991;
        switch (i) {
            case 0:
                break;
            default:
                return it.hasNext();
        }
        while (this.f5993 > 0 && it.hasNext()) {
            it.next();
            this.f5993--;
        }
        return it.hasNext();
    }

    @Override // java.util.Iterator
    public final Object next() {
        int i = this.f5992;
        Iterator it = this.f5991;
        switch (i) {
            case 0:
                break;
            default:
                int i2 = this.f5993;
                this.f5993 = i2 + 1;
                if (i2 >= 0) {
                    return new C2411(i2, it.next());
                }
                AbstractC2240.m5909();
                throw null;
        }
        while (this.f5993 > 0 && it.hasNext()) {
            it.next();
            this.f5993--;
        }
        return it.next();
    }

    @Override // java.util.Iterator
    public final void remove() {
        switch (this.f5992) {
            case 0:
                throw new UnsupportedOperationException("Operation is not supported for read-only collection");
            default:
                throw new UnsupportedOperationException("Operation is not supported for read-only collection");
        }
    }
}
