package P4;

import java.util.Iterator;
import java.util.NoSuchElementException;
import kotlin.jvm.internal.o;

/* JADX INFO: loaded from: classes3.dex */
public final class b implements Iterator, K4.a {

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

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

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

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

    public b(char c6, char c7, int i6) {
        this.f5670a = i6;
        this.f5671b = c7;
        boolean z6 = false;
        if (i6 <= 0 ? o.i(c6, c7) >= 0 : o.i(c6, c7) <= 0) {
            z6 = true;
        }
        this.f5672c = z6;
        this.f5673d = z6 ? c6 : c7;
    }

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

    @Override // java.util.Iterator
    public final Object next() {
        int i6 = this.f5673d;
        if (i6 != this.f5671b) {
            this.f5673d = this.f5670a + i6;
        } else {
            if (!this.f5672c) {
                throw new NoSuchElementException();
            }
            this.f5672c = false;
        }
        return Character.valueOf((char) i6);
    }

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