package kotlin.ranges;

import java.util.NoSuchElementException;
import o1.AbstractC0675k;

/* JADX INFO: loaded from: classes.dex */
public final class b extends AbstractC0675k {

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

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    private final int f5112g;

    /* JADX INFO: renamed from: r, reason: collision with root package name */
    private boolean f5113r;

    /* JADX INFO: renamed from: x, reason: collision with root package name */
    private int f5114x;

    public b(char c2, char c3, int i2) {
        this.f5111b = i2;
        this.f5112g = c3;
        boolean z2 = false;
        if (i2 <= 0 ? kotlin.jvm.internal.l.f(c2, c3) >= 0 : kotlin.jvm.internal.l.f(c2, c3) <= 0) {
            z2 = true;
        }
        this.f5113r = z2;
        this.f5114x = z2 ? c2 : c3;
    }

    @Override // o1.AbstractC0675k
    public char a() {
        int i2 = this.f5114x;
        if (i2 != this.f5112g) {
            this.f5114x = this.f5111b + i2;
        } else {
            if (!this.f5113r) {
                throw new NoSuchElementException();
            }
            this.f5113r = false;
        }
        return (char) i2;
    }

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