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

import androidx.compose.runtime.*

@Composable
fun Label(test: Boolean) {
    Layout(
        content = {
            Box()
            if (test) {
                Box()
            }
        }
    )
}

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

@Composable
@FunctionKeyMeta(key = 1339463994, startOffset = 84, endOffset = 346)
fun Label(test: Boolean, %composer: Composer?, %changed: Int) {
  %composer = %composer.startRestartGroup(<>)
  sourceInformation(%composer, "C(Label)N(test)<Layout...>:Test.kt")
  val %dirty = %changed
  if (%changed and 0b0110 == 0) {
    %dirty = %dirty or if (%composer.changed(test)) 0b0100 else 0b0010
  }
  if (%composer.shouldExecute(%dirty and 0b0011 != 0b0010, %dirty and 0b0001)) {
    if (isTraceInProgress()) {
      traceEventStart(<>, %dirty, -1, <>)
    }
    Layout({ %composer: Composer?, %changed: Int ->
      sourceInformationMarkerStart(%composer, <>, "C<Box()>:Test.kt")
      Box(%composer, 0)
      if (test) {
        %composer.startReplaceGroup(<>)
        sourceInformation(%composer, "<Box()>")
        Box(%composer, 0)
        %composer.endReplaceGroup()
      } else {
        %composer.startReplaceGroup(<>)
        %composer.endReplaceGroup()
      }
      sourceInformationMarkerEnd(%composer)
    }, %composer, 0)
    if (isTraceInProgress()) {
      traceEventEnd()
    }
  } else {
    %composer.skipToGroupEnd()
  }
  %composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
    Label(test, %composer, updateChangedFlags(%changed or 0b0001))
  }
}
