//
// 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() {
    // Both the condition and the body of the loop get groups because they have
    // composable calls in them. We must generate a group around the while statement
    // overall.
    while (B()) {
        A(a)
    }
    A(b)
}

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

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