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

import androidx.compose.runtime.Composable

@Composable
fun Test() {
  W {
    IW {
        T(2)
        repeat(3) {
            T(3)
        }
        T(4)
    }
  }
}

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

@Composable
@FunctionKeyMeta(key = -1794342280, startOffset = 93, endOffset = 325)
fun Test(%composer: Composer?, %changed: Int) {
  %composer = %composer.startRestartGroup(<>)
  sourceInformation(%composer, "C(Test)<W>:Test.kt")
  if (%composer.shouldExecute(%changed != 0, %changed and 0b0001)) {
    if (isTraceInProgress()) {
      traceEventStart(<>, %changed, -1, "Test (Test.kt:4)")
    }
    W(ComposableSingletons%TestKt.lambda%1773251756, %composer, 0b0110)
    if (isTraceInProgress()) {
      traceEventEnd()
    }
  } else {
    %composer.skipToGroupEnd()
  }
  %composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
    Test(%composer, updateChangedFlags(%changed or 0b0001))
  }
}
internal object ComposableSingletons%TestKt {
  val lambda%1773251756: Function2<Composer, Int, Unit> = composableLambdaInstance(<>, false) { %composer: Composer?, %changed: Int ->
    sourceInformation(%composer, "C<IW>:Test.kt")
    if (%composer.shouldExecute(%changed and 0b0011 != 0b0010, %changed and 0b0001)) {
      if (isTraceInProgress()) {
        traceEventStart(<>, %changed, -1, "ComposableSingletons%TestKt.lambda%1773251756.<anonymous> (Test.kt:6)")
      }
      IW({ %composer: Composer?, %changed: Int ->
        sourceInformationMarkerStart(%composer, <>, "C<T(2)>,<T(4)>:Test.kt")
        T(2, %composer, 0b0110)
        %composer.startReplaceGroup(<>)
        sourceInformation(%composer, "*<T(3)>")
        repeat(3) { it: Int ->
          T(3, %composer, 0b0110)
        }
        %composer.endReplaceGroup()
        T(4, %composer, 0b0110)
        sourceInformationMarkerEnd(%composer)
      }, %composer, 0)
      if (isTraceInProgress()) {
        traceEventEnd()
      }
    } else {
      %composer.skipToGroupEnd()
    }
  }
}
