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

import a.*
import androidx.compose.runtime.Composable

@Composable fun <V> B(value: V) {
    A(Wrapper(value))
}
@Composable fun <T> X(items: List<T>, itemContent: @Composable (T) -> Unit) {
    for (item in items) itemContent(item)
}
@Composable fun C(items: List<String>) {
    X(items) { item ->
        A(item)
        A(Wrapper(item))
    }
}

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

@Composable
@FunctionKeyMeta(key = -1541238530, startOffset = 104, endOffset = 173)
fun <V> B(value: V, %composer: Composer?, %changed: Int) {
  %composer = %composer.startRestartGroup(<>)
  sourceInformation(%composer, "C(B)<A(Wrap...>:Test.kt")
  val %dirty = %changed
  if (%changed and 0b0110 == 0) {
    %dirty = %dirty or if (if (%changed and 0b1000 == 0) {
      %composer.changed(value)
    } else {
      %composer.changedInstance(value)
    }
    ) 0b0100 else 0b0010
  }
  if (%composer.shouldExecute(%dirty and 0b0011 != 0b0010, %dirty and 0b0001)) {
    if (isTraceInProgress()) {
      traceEventStart(<>, %dirty, -1, <>)
    }
    A(Wrapper(value), %composer, Wrapper.%stable or 0b1000 and %dirty)
    if (isTraceInProgress()) {
      traceEventEnd()
    }
  } else {
    %composer.skipToGroupEnd()
  }
  %composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
    B(value, %composer, updateChangedFlags(%changed or 0b0001))
  }
}
@Composable
@ComposableInferredTarget(scheme = "[0[0]]")
@FunctionKeyMeta(key = 1416023255, startOffset = 198, endOffset = 331)
fun <T> X(items: List<T>, itemContent: Function3<T, Composer, Int, Unit>, %composer: Composer?, %changed: Int) {
  %composer = %composer.startRestartGroup(<>)
  sourceInformation(%composer, "C(X)P(1)*<itemCo...>:Test.kt")
  val %dirty = %changed
  if (%changed and 0b0110 == 0) {
    %dirty = %dirty or if (%composer.changedInstance(items)) 0b0100 else 0b0010
  }
  if (%changed and 0b00110000 == 0) {
    %dirty = %dirty or if (%composer.changedInstance(itemContent)) 0b00100000 else 0b00010000
  }
  if (%composer.shouldExecute(%dirty and 0b00010011 != 0b00010010, %dirty and 0b0001)) {
    if (isTraceInProgress()) {
      traceEventStart(<>, %dirty, -1, <>)
    }
    val <iterator> = items.iterator()
    while (<iterator>.hasNext()) {
      val item = <iterator>.next()
      itemContent(item, %composer, 0b01110000 and %dirty)
    }
    if (isTraceInProgress()) {
      traceEventEnd()
    }
  } else {
    %composer.skipToGroupEnd()
  }
  %composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
    X(items, itemContent, %composer, updateChangedFlags(%changed or 0b0001))
  }
}
@Composable
@FunctionKeyMeta(key = 691220591, startOffset = 356, endOffset = 516)
fun C(items: List<String>, %composer: Composer?, %changed: Int) {
  %composer = %composer.startRestartGroup(<>)
  sourceInformation(%composer, "C(C)<X(item...>:Test.kt")
  val %dirty = %changed
  if (%changed and 0b0110 == 0) {
    %dirty = %dirty or if (%composer.changedInstance(items)) 0b0100 else 0b0010
  }
  if (%composer.shouldExecute(%dirty and 0b0011 != 0b0010, %dirty and 0b0001)) {
    if (isTraceInProgress()) {
      traceEventStart(<>, %dirty, -1, <>)
    }
    X(items, ComposableSingletons%TestKt.lambda%1463567948, %composer, 0b00110000 or 0b1110 and %dirty)
    if (isTraceInProgress()) {
      traceEventEnd()
    }
  } else {
    %composer.skipToGroupEnd()
  }
  %composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
    C(items, %composer, updateChangedFlags(%changed or 0b0001))
  }
}
internal object ComposableSingletons%TestKt {
  val lambda%1463567948: Function3<String, Composer, Int, Unit> = composableLambdaInstance(<>, false) { item: String, %composer: Composer?, %changed: Int ->
    sourceInformation(%composer, "C<A(item...>,<A(Wrap...>:Test.kt")
    val %dirty = %changed
    if (%changed and 0b0110 == 0) {
      %dirty = %dirty or if (%composer.changed(item)) 0b0100 else 0b0010
    }
    if (%composer.shouldExecute(%dirty and 0b00010011 != 0b00010010, %dirty and 0b0001)) {
      if (isTraceInProgress()) {
        traceEventStart(<>, %dirty, -1, <>)
      }
      A(item, %composer, 0b1110 and %dirty)
      A(Wrapper(item), %composer, Wrapper.%stable)
      if (isTraceInProgress()) {
        traceEventEnd()
      }
    } else {
      %composer.skipToGroupEnd()
    }
  }
}
