package d0.f0; import d0.z.d.m; import java.util.Iterator; import java.util.NoSuchElementException; import kotlin.jvm.functions.Function1; import kotlin.sequences.Sequence; /* compiled from: Sequences.kt */ public final class t implements Sequence { public final Sequence a; public final Function1 b; /* compiled from: Sequences.kt */ public static final class a implements Iterator, d0.z.d.g0.a { public final Iterator i; public int j = -1; public T k; public final /* synthetic */ t l; public a(t tVar) { this.l = tVar; this.i = t.access$getSequence$p(tVar).iterator(); } public final void a() { if (this.i.hasNext()) { T next = this.i.next(); if (((Boolean) t.access$getPredicate$p(this.l).invoke(next)).booleanValue()) { this.j = 1; this.k = next; return; } } this.j = 0; } @Override // java.util.Iterator public boolean hasNext() { if (this.j == -1) { a(); } return this.j == 1; } @Override // java.util.Iterator public T next() { if (this.j == -1) { a(); } if (this.j != 0) { T t = this.k; this.k = null; this.j = -1; return t; } throw new NoSuchElementException(); } @Override // java.util.Iterator public void remove() { throw new UnsupportedOperationException("Operation is not supported for read-only collection"); } } /* JADX DEBUG: Multi-variable search result rejected for r2v0, resolved type: kotlin.sequences.Sequence */ /* JADX DEBUG: Multi-variable search result rejected for r3v0, resolved type: kotlin.jvm.functions.Function1 */ /* JADX WARN: Multi-variable type inference failed */ public t(Sequence sequence, Function1 function1) { m.checkNotNullParameter(sequence, "sequence"); m.checkNotNullParameter(function1, "predicate"); this.a = sequence; this.b = function1; } public static final /* synthetic */ Function1 access$getPredicate$p(t tVar) { return tVar.b; } public static final /* synthetic */ Sequence access$getSequence$p(t tVar) { return tVar.a; } @Override // kotlin.sequences.Sequence public Iterator iterator() { return new a(this); } }