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

import androidx.compose.runtime.*

@Composable
fun Test(decorator: @Composable (content: @Composable () -> Unit) -> Unit) {
    decorator {
      Text("Some text")
    }
}

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

@Composable
@ComposableInferredTarget(scheme = "[UI[UI[UI]]]")
@FunctionKeyMeta(key = 317320220, startOffset = 72, endOffset = 228)
fun Test(decorator: Function3<@[ParameterName(name = 'content')] Function2<Composer, Int, Unit>, Composer, Int, Unit>, %composer: Composer?, %changed: Int) {
  %composer = %composer.startRestartGroup(<>)
  sourceInformation(%composer, "C(Test)N(decorator)<decora...>:Test.kt")
  val %dirty = %changed
  if (%changed and 0b0110 == 0) {
    %dirty = %dirty or if (%composer.changedInstance(decorator)) 0b0100 else 0b0010
  }
  if (%composer.shouldExecute(%dirty and 0b0011 != 0b0010, %dirty and 0b0001)) {
    if (isTraceInProgress()) {
      traceEventStart(<>, %dirty, -1, <>)
    }
    decorator(ComposableSingletons%TestKt.lambda%1254334145, %composer, 0b0110 or 0b01110000 and %dirty shl 0b0011)
    if (isTraceInProgress()) {
      traceEventEnd()
    }
  } else {
    %composer.skipToGroupEnd()
  }
  %composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
    Test(decorator, %composer, updateChangedFlags(%changed or 0b0001))
  }
}
internal object ComposableSingletons%TestKt {
  val lambda%1254334145: Function2<Composer, Int, Unit> = composableLambdaInstance(<>, false) { %composer: Composer?, %changed: Int ->
    sourceInformation(%composer, "C<Text("...>:Test.kt")
    if (%composer.shouldExecute(%changed and 0b0011 != 0b0010, %changed and 0b0001)) {
      if (isTraceInProgress()) {
        traceEventStart(<>, %changed, -1, <>)
      }
      Text("Some text", %composer, 0b0110)
      if (isTraceInProgress()) {
        traceEventEnd()
      }
    } else {
      %composer.skipToGroupEnd()
    }
  }
}
