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

import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable


@Composable
fun B(vararg values: Foo) {
    print(values)
}

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

@Composable
@FunctionKeyMeta(key = -1434999813, startOffset = 165, endOffset = 212)
fun B(values: Array<out Foo>, %composer: Composer?, %changed: Int) {
  %composer = %composer.startRestartGroup(<>)
  sourceInformation(%composer, "C(B):Test.kt")
  val %dirty = %changed
  %composer.startMovableGroup(<>, values.size)
  %dirty = %dirty or if (%composer.changed(values.size)) 0b0100 else 0
  val <iterator> = values.iterator()
  while (<iterator>.hasNext()) {
    val value = <iterator>.next()
    %dirty = %dirty or if (%composer.changedInstance(value)) 0b0100 else 0
  }
  %composer.endMovableGroup()
  if (%dirty and 0b1110 == 0) {
    %dirty = %dirty or 0b0010
  }
  if (%composer.shouldExecute(%dirty and 0b0011 != 0b0010, %dirty and 0b0001)) {
    if (isTraceInProgress()) {
      traceEventStart(<>, %dirty, -1, <>)
    }
    print(values)
    if (isTraceInProgress()) {
      traceEventEnd()
    }
  } else {
    %composer.skipToGroupEnd()
  }
  %composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
    B(values, %composer, updateChangedFlags(%changed or 0b0001))
  }
}
