//
// Source
// ------------------------------------------

import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.runtime.key
import androidx.compose.runtime.NonRestartableComposable


@NonRestartableComposable @Composable
fun Example(a: Iterator<Int>, b: Iterator<Int>) {
    while (a.hasNext()) {
        val x = a.next()
        if (x > 100) {
            return
        }
        A()
    }
}

//
// Transformed IR
// ------------------------------------------

@NonRestartableComposable
@Composable
@FunctionKeyMeta(key = -808818528, startOffset = 227, endOffset = 399)
fun Example(a: Iterator<Int>, b: Iterator<Int>, %composer: Composer?, %changed: Int) {
  %composer.startReplaceGroup(<>)
  sourceInformation(%composer, "C(Example)*<A()>:Test.kt")
  if (isTraceInProgress()) {
    traceEventStart(<>, %changed, -1, <>)
  }
  while (a.hasNext()) {
    val x = a.next()
    if (x > 100) {
      if (isTraceInProgress()) {
        traceEventEnd()
      }
      %composer.endReplaceGroup()
      return
    }
    A(%composer, 0)
  }
  if (isTraceInProgress()) {
    traceEventEnd()
  }
  %composer.endReplaceGroup()
}
