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

import androidx.compose.runtime.Composable

@Composable fun Example() {
    @Composable fun A() { }
    @Composable fun B(content: @Composable () -> Unit) { content() }
    @Composable fun C() {
        B { A() }
    }
}

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

@Composable
@FunctionKeyMeta(key = 1292064820, startOffset = 81, endOffset = 317)
fun Example(%composer: Composer?, %changed: Int) {
  %composer = %composer.startRestartGroup(<>)
  sourceInformation(%composer, "C(Example):Test.kt")
  if (%composer.shouldExecute(%changed != 0, %changed and 0b0001)) {
    if (isTraceInProgress()) {
      traceEventStart(<>, %changed, -1, <>)
    }
    @Composable
    @FunctionKeyMeta(key = -148970947, startOffset = 125, endOffset = 136)
    fun A(%composer: Composer?, %changed: Int) {
      sourceInformationMarkerStart(%composer, <>, "C(A):Test.kt")
      if (isTraceInProgress()) {
        traceEventStart(<>, %changed, -1, <>)
      }
      if (isTraceInProgress()) {
        traceEventEnd()
      }
      sourceInformationMarkerEnd(%composer)
    }
    @Composable
    @ComposableInferredTarget(scheme = "[0[0]]")
    @FunctionKeyMeta(key = 1238445806, startOffset = 165, endOffset = 217)
    fun B(content: Function2<Composer, Int, Unit>, %composer: Composer?, %changed: Int) {
      sourceInformationMarkerStart(%composer, <>, "C(B)<conten...>:Test.kt")
      if (isTraceInProgress()) {
        traceEventStart(<>, %changed, -1, <>)
      }
      content(%composer, 0b1110 and %changed)
      if (isTraceInProgress()) {
        traceEventEnd()
      }
      sourceInformationMarkerEnd(%composer)
    }
    @Composable
    @FunctionKeyMeta(key = -164489665, startOffset = 246, endOffset = 303)
    fun C(%composer: Composer?, %changed: Int) {
      sourceInformationMarkerStart(%composer, <>, "C(C)<{>,<B>:Test.kt")
      if (isTraceInProgress()) {
        traceEventStart(<>, %changed, -1, <>)
      }
      B(rememberComposableLambda(<>, false, { %composer: Composer?, %changed: Int ->
        sourceInformation(%composer, "C<A()>:Test.kt")
        if (%composer.shouldExecute(%changed and 0b0011 != 0b0010, %changed and 0b0001)) {
          if (isTraceInProgress()) {
            traceEventStart(<>, %changed, -1, <>)
          }
          A(%composer, 0)
          if (isTraceInProgress()) {
            traceEventEnd()
          }
        } else {
          %composer.skipToGroupEnd()
        }
      }, %composer, 0b00110110), %composer, 0b0110)
      if (isTraceInProgress()) {
        traceEventEnd()
      }
      sourceInformationMarkerEnd(%composer)
    }
    if (isTraceInProgress()) {
      traceEventEnd()
    }
  } else {
    %composer.skipToGroupEnd()
  }
  %composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
    Example(%composer, updateChangedFlags(%changed or 0b0001))
  }
}
