package j9; import java.util.Iterator; import java.util.NoSuchElementException; /* loaded from: classes2.dex */ final class d implements i9.b { /* renamed from: a, reason: collision with root package name */ private final CharSequence f11122a; /* renamed from: b, reason: collision with root package name */ private final int f11123b; /* renamed from: c, reason: collision with root package name */ private final int f11124c; /* renamed from: d, reason: collision with root package name */ private final c9.p f11125d; public static final class a implements Iterator { /* renamed from: a, reason: collision with root package name */ private int f11126a = -1; /* renamed from: b, reason: collision with root package name */ private int f11127b; /* renamed from: c, reason: collision with root package name */ private int f11128c; /* renamed from: d, reason: collision with root package name */ private g9.c f11129d; /* renamed from: e, reason: collision with root package name */ private int f11130e; a() { int e10; e10 = g9.f.e(d.this.f11123b, 0, d.this.f11122a.length()); this.f11127b = e10; this.f11128c = e10; } /* JADX WARN: Code restructure failed: missing block: B:9:0x0021, code lost: if (r0 < r6.f11131f.f11124c) goto L9; */ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct code enable 'Show inconsistent code' option in preferences */ private final void a() { /* r6 = this; int r0 = r6.f11128c r1 = 0 if (r0 >= 0) goto Lc r6.f11126a = r1 r0 = 0 r6.f11129d = r0 goto L9e Lc: j9.d r0 = j9.d.this int r0 = j9.d.c(r0) r2 = -1 r3 = 1 if (r0 <= 0) goto L23 int r0 = r6.f11130e int r0 = r0 + r3 r6.f11130e = r0 j9.d r4 = j9.d.this int r4 = j9.d.c(r4) if (r0 >= r4) goto L31 L23: int r0 = r6.f11128c j9.d r4 = j9.d.this java.lang.CharSequence r4 = j9.d.b(r4) int r4 = r4.length() if (r0 <= r4) goto L47 L31: g9.c r0 = new g9.c int r1 = r6.f11127b j9.d r4 = j9.d.this java.lang.CharSequence r4 = j9.d.b(r4) int r4 = j9.o.g(r4) r0.(r1, r4) r6.f11129d = r0 r6.f11128c = r2 goto L9c L47: j9.d r0 = j9.d.this c9.p r0 = j9.d.a(r0) j9.d r4 = j9.d.this java.lang.CharSequence r4 = j9.d.b(r4) int r5 = r6.f11128c java.lang.Integer r5 = java.lang.Integer.valueOf(r5) java.lang.Object r0 = r0.invoke(r4, r5) s8.m r0 = (s8.m) r0 if (r0 != 0) goto L77 g9.c r0 = new g9.c int r1 = r6.f11127b j9.d r4 = j9.d.this java.lang.CharSequence r4 = j9.d.b(r4) int r4 = j9.o.g(r4) r0.(r1, r4) r6.f11129d = r0 r6.f11128c = r2 goto L9c L77: java.lang.Object r2 = r0.a() java.lang.Number r2 = (java.lang.Number) r2 int r2 = r2.intValue() java.lang.Object r0 = r0.b() java.lang.Number r0 = (java.lang.Number) r0 int r0 = r0.intValue() int r4 = r6.f11127b g9.c r4 = g9.d.h(r4, r2) r6.f11129d = r4 int r2 = r2 + r0 r6.f11127b = r2 if (r0 != 0) goto L99 r1 = 1 L99: int r2 = r2 + r1 r6.f11128c = r2 L9c: r6.f11126a = r3 L9e: return */ throw new UnsupportedOperationException("Method not decompiled: j9.d.a.a():void"); } @Override // java.util.Iterator /* renamed from: b, reason: merged with bridge method [inline-methods] */ public g9.c next() { if (this.f11126a == -1) { a(); } if (this.f11126a == 0) { throw new NoSuchElementException(); } g9.c cVar = this.f11129d; d9.j.c(cVar, "null cannot be cast to non-null type kotlin.ranges.IntRange"); this.f11129d = null; this.f11126a = -1; return cVar; } @Override // java.util.Iterator public boolean hasNext() { if (this.f11126a == -1) { a(); } return this.f11126a == 1; } @Override // java.util.Iterator public void remove() { throw new UnsupportedOperationException("Operation is not supported for read-only collection"); } } public d(CharSequence charSequence, int i10, int i11, c9.p pVar) { d9.j.e(charSequence, "input"); d9.j.e(pVar, "getNextMatch"); this.f11122a = charSequence; this.f11123b = i10; this.f11124c = i11; this.f11125d = pVar; } @Override // i9.b public Iterator iterator() { return new a(); } }