//
// 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(items: List<Int>) {
    // The composable call is made a conditional number of times, so we need to wrap
    // the loop with a dynamic wrapping group. Since there are no other calls, the
    // function body group will suffice.
    for (i in items) {
        P(i)
    }
}

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

@NonRestartableComposable
@Composable
@FunctionKeyMeta(key = -612922826, startOffset = 227, endOffset = 511)
fun Example(items: List<Int>, %composer: Composer?, %changed: Int) {
  sourceInformationMarkerStart(%composer, <>, "C(Example)N(items):Test.kt")
  if (isTraceInProgress()) {
    traceEventStart(<>, %changed, -1, <>)
  }
  %composer.startReplaceGroup(<>)
  sourceInformation(%composer, "*<P(i)>")
  val <iterator> = items.iterator()
  while (<iterator>.hasNext()) {
    val i = <iterator>.next()
    P(i, %composer, 0)
  }
  %composer.endReplaceGroup()
  if (isTraceInProgress()) {
    traceEventEnd()
  }
  sourceInformationMarkerEnd(%composer)
}
