//
// 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(x: Int) {
    while (x > 0) {
        A(a)
        key(x) {
            A(b)
        }
        A(c)
    }
}

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

@NonRestartableComposable
@Composable
@FunctionKeyMeta(key = -1008580451, startOffset = 227, endOffset = 346)
fun Example(x: Int, %composer: Composer?, %changed: Int) {
  sourceInformationMarkerStart(%composer, <>, "C(Example)N(x):Test.kt")
  if (isTraceInProgress()) {
    traceEventStart(<>, %changed, -1, <>)
  }
  %composer.startReplaceGroup(<>)
  sourceInformation(%composer, "*<A(a)>,<A(c)>")
  while (x > 0) {
    A(a, %composer, 0)
    %composer.startMovableGroup(<>, x)
    sourceInformation(%composer, "<A(b)>")
    A(b, %composer, 0)
    %composer.endMovableGroup()
    A(c, %composer, 0)
  }
  %composer.endReplaceGroup()
  if (isTraceInProgress()) {
    traceEventEnd()
  }
  sourceInformationMarkerEnd(%composer)
}
