package FSaI4_7.KNBe_11;

import java.util.Iterator;
import java.util.NoSuchElementException;
/* compiled from: Strings.kt */
/* loaded from: classes.dex */
public final class Mqv2r_3 implements FSaI4_7.Nm6q_10.KQgRr5e_0<FSaI4_7.XnFJ5_9.PGPF6hQ_2> {
    public final int KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public final FSaI4_7.Xgtqvk_8.KQgRr5e_0.QxJ9d_1<CharSequence, Integer, FSaI4_7.QxJ9d_1<Integer, Integer>> f0KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public final CharSequence f1KQgRr5e_0;
    public final int QxJ9d_1;

    /* JADX WARN: Multi-variable type inference failed */
    public Mqv2r_3(CharSequence charSequence, int i, int i2, FSaI4_7.Xgtqvk_8.KQgRr5e_0.QxJ9d_1<? super CharSequence, ? super Integer, FSaI4_7.QxJ9d_1<Integer, Integer>> qxJ9d_1) {
        FSaI4_7.Xgtqvk_8.QxJ9d_1.IFxWkV_5.QxJ9d_1(charSequence, "input");
        FSaI4_7.Xgtqvk_8.QxJ9d_1.IFxWkV_5.QxJ9d_1(qxJ9d_1, "getNextMatch");
        this.f1KQgRr5e_0 = charSequence;
        this.KQgRr5e_0 = i;
        this.QxJ9d_1 = i2;
        this.f0KQgRr5e_0 = qxJ9d_1;
    }

    @Override // FSaI4_7.Nm6q_10.KQgRr5e_0
    public Iterator<FSaI4_7.XnFJ5_9.PGPF6hQ_2> iterator() {
        return new KQgRr5e_0();
    }

    /* compiled from: Strings.kt */
    /* loaded from: classes.dex */
    public static final class KQgRr5e_0 implements Iterator<FSaI4_7.XnFJ5_9.PGPF6hQ_2> {
        public int KQgRr5e_0 = -1;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public FSaI4_7.XnFJ5_9.PGPF6hQ_2 f3KQgRr5e_0;

        /* renamed from: Mqv2r_3  reason: collision with root package name */
        public int f3035Mqv2r_3;
        public int PGPF6hQ_2;
        public int QxJ9d_1;

        public KQgRr5e_0() {
            int KQgRr5e_0 = FSaI4_7.XnFJ5_9.IFxWkV_5.KQgRr5e_0(Mqv2r_3.this.KQgRr5e_0, 0, Mqv2r_3.this.f1KQgRr5e_0.length());
            this.QxJ9d_1 = KQgRr5e_0;
            this.PGPF6hQ_2 = KQgRr5e_0;
        }

        /* JADX WARN: Code restructure failed: missing block: B:8:0x0021, code lost:
            if (r0 < r6.f2KQgRr5e_0.QxJ9d_1) goto L13;
         */
        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        /*
            Code decompiled incorrectly, please refer to instructions dump.
        */
        public final void m5KQgRr5e_0() {
            if (this.PGPF6hQ_2 < 0) {
                this.KQgRr5e_0 = 0;
                this.f3KQgRr5e_0 = null;
                return;
            }
            if (Mqv2r_3.this.QxJ9d_1 > 0) {
                int i = this.f3035Mqv2r_3 + 1;
                this.f3035Mqv2r_3 = i;
            }
            if (this.PGPF6hQ_2 <= Mqv2r_3.this.f1KQgRr5e_0.length()) {
                FSaI4_7.QxJ9d_1 qxJ9d_1 = (FSaI4_7.QxJ9d_1) Mqv2r_3.this.f0KQgRr5e_0.KQgRr5e_0(Mqv2r_3.this.f1KQgRr5e_0, Integer.valueOf(this.PGPF6hQ_2));
                if (qxJ9d_1 == null) {
                    this.f3KQgRr5e_0 = new FSaI4_7.XnFJ5_9.PGPF6hQ_2(this.QxJ9d_1, EuDEkJe_12.KQgRr5e_0(Mqv2r_3.this.f1KQgRr5e_0));
                    this.PGPF6hQ_2 = -1;
                } else {
                    int intValue = ((Number) qxJ9d_1.KQgRr5e_0()).intValue();
                    int intValue2 = ((Number) qxJ9d_1.QxJ9d_1()).intValue();
                    this.f3KQgRr5e_0 = FSaI4_7.XnFJ5_9.IFxWkV_5.m8KQgRr5e_0(this.QxJ9d_1, intValue);
                    int i2 = intValue + intValue2;
                    this.QxJ9d_1 = i2;
                    this.PGPF6hQ_2 = i2 + (intValue2 == 0 ? 1 : 0);
                }
                this.KQgRr5e_0 = 1;
            }
            this.f3KQgRr5e_0 = new FSaI4_7.XnFJ5_9.PGPF6hQ_2(this.QxJ9d_1, EuDEkJe_12.KQgRr5e_0(Mqv2r_3.this.f1KQgRr5e_0));
            this.PGPF6hQ_2 = -1;
            this.KQgRr5e_0 = 1;
        }

        @Override // java.util.Iterator
        public boolean hasNext() {
            if (this.KQgRr5e_0 == -1) {
                m5KQgRr5e_0();
            }
            return this.KQgRr5e_0 == 1;
        }

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

        @Override // java.util.Iterator
        /* renamed from: KQgRr5e_0 */
        public FSaI4_7.XnFJ5_9.PGPF6hQ_2 next() {
            if (this.KQgRr5e_0 == -1) {
                m5KQgRr5e_0();
            }
            if (this.KQgRr5e_0 != 0) {
                FSaI4_7.XnFJ5_9.PGPF6hQ_2 pGPF6hQ_2 = this.f3KQgRr5e_0;
                if (pGPF6hQ_2 != null) {
                    this.f3KQgRr5e_0 = null;
                    this.KQgRr5e_0 = -1;
                    return pGPF6hQ_2;
                }
                throw new FSaI4_7.Mqv2r_3("null cannot be cast to non-null type kotlin.ranges.IntRange");
            }
            throw new NoSuchElementException();
        }
    }
}
