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

import androidx.compose.runtime.*
import androidx.compose.foundation.layout.*

@Composable
fun Test(count: Int) {
    Row {
        repeat(count) {
            Text("A")
        }
    }
}

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

@Composable
@ComposableTarget(applier = "androidx.compose.ui.UiComposable")
@FunctionKeyMeta(key = -1502623783, startOffset = 140, endOffset = 308)
fun Test(count: Int, %composer: Composer?, %changed: Int) {
  %composer = %composer.startRestartGroup(<>)
  val %dirty = %changed
  if (%changed and 0b0110 == 0) {
    %dirty = %dirty or if (%composer.changed(count)) 0b0100 else 0b0010
  }
  if (%composer.shouldExecute(%dirty and 0b0011 != 0b0010, %dirty and 0b0001)) {
    Row(null, null, null, { %composer: Composer?, %changed: Int ->
      %composer.startReplaceGroup(<>)
      repeat(count) { it: Int ->
        Text("A", %composer, 0b0110)
      }
      %composer.endReplaceGroup()
    }, %composer, 0, 0b0111)
  } else {
    %composer.skipToGroupEnd()
  }
  %composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
    Test(count, %composer, updateChangedFlags(%changed or 0b0001))
  }
}
