package n;

import java.util.Iterator;
import java.util.NoSuchElementException;

/* JADX INFO: renamed from: n.a, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C2574a implements Iterator, K4.a {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public int f21392a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public int f21393b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public boolean f21394c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final /* synthetic */ int f21395d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final /* synthetic */ Object f21396e;

    public C2574a(int i6) {
        this.f21392a = i6;
    }

    @Override // java.util.Iterator
    public final boolean hasNext() {
        return this.f21393b < this.f21392a;
    }

    @Override // java.util.Iterator
    public final Object next() {
        Object objG;
        if (!hasNext()) {
            throw new NoSuchElementException();
        }
        int i6 = this.f21393b;
        switch (this.f21395d) {
            case 0:
                objG = ((C2578e) this.f21396e).g(i6);
                break;
            case 1:
                objG = ((C2578e) this.f21396e).j(i6);
                break;
            default:
                objG = ((C2579f) this.f21396e).f21425b[i6];
                break;
        }
        this.f21393b++;
        this.f21394c = true;
        return objG;
    }

    @Override // java.util.Iterator
    public final void remove() {
        if (!this.f21394c) {
            throw new IllegalStateException("Call next() before removing an element.");
        }
        int i6 = this.f21393b - 1;
        this.f21393b = i6;
        switch (this.f21395d) {
            case 0:
                ((C2578e) this.f21396e).h(i6);
                break;
            case 1:
                ((C2578e) this.f21396e).h(i6);
                break;
            default:
                ((C2579f) this.f21396e).g(i6);
                break;
        }
        this.f21392a--;
        this.f21394c = false;
    }

    /* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
    public C2574a(C2579f c2579f) {
        this(c2579f.f21426c);
        this.f21395d = 2;
        this.f21396e = c2579f;
    }

    /* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
    public C2574a(C2578e c2578e, int i6) {
        this(c2578e.f21416c);
        this.f21395d = i6;
        switch (i6) {
            case 1:
                this.f21396e = c2578e;
                this(c2578e.f21416c);
                break;
            default:
                this.f21396e = c2578e;
                break;
        }
    }
}
