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

import androidx.compose.runtime.*

@Composable
private fun KeyContent1(items: List<Int>) {
    items.forEach { item ->
        if (item > -1) {
            key(item) {
                remember {
                    item
                }
            }
        }
    }
}

@Composable
private fun KeyContent2(items: List<Int>) {
    for (item in items) {
        if (item > -1) {
            key(item) {
                remember {
                    item
                }
            }
        }
    }
}

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

@Composable
@FunctionKeyMeta(key = 1265283811, startOffset = 92, endOffset = 426)
private fun KeyContent1(items: List<Int>, %composer: Composer?, %changed: Int) {
  %composer = %composer.startRestartGroup(<>)
  sourceInformation(%composer, "C(KeyContent1):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, <>)
    }
    items.forEach { item: Int ->
      if (item > -1) {
        %composer.startReplaceGroup(<>)
        sourceInformation(%composer, "")
        %composer.startMovableGroup(<>, item)
        sourceInformation(%composer, "<rememb...>")
        val tmp0 = <block>{
          sourceInformationMarkerStart(%composer, <>, "CC(remember):Test.kt#9igjgp")
          val tmp1_group = %composer.cache(false) {
            item
          }
          sourceInformationMarkerEnd(%composer)
          tmp1_group
        }
        %composer.endMovableGroup()
        tmp0
        %composer.endReplaceGroup()
      } else {
        %composer.startReplaceGroup(<>)
        %composer.endReplaceGroup()
      }
    }
    if (isTraceInProgress()) {
      traceEventEnd()
    }
  } else {
    %composer.skipToGroupEnd()
  }
  %composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
    KeyContent1(items, %composer, updateChangedFlags(%changed or 0b0001))
  }
}
@Composable
@FunctionKeyMeta(key = -1304202588, startOffset = 472, endOffset = 804)
private fun KeyContent2(items: List<Int>, %composer: Composer?, %changed: Int) {
  %composer = %composer.startRestartGroup(<>)
  sourceInformation(%composer, "C(KeyContent2):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, <>)
    }
    val <iterator> = items.iterator()
    while (<iterator>.hasNext()) {
      val item = <iterator>.next()
      if (item > -1) {
        %composer.startReplaceGroup(<>)
        sourceInformation(%composer, "")
        %composer.startMovableGroup(<>, item)
        sourceInformation(%composer, "<rememb...>")
        val tmp0 = <block>{
          sourceInformationMarkerStart(%composer, <>, "CC(remember):Test.kt#9igjgp")
          val tmp1_group = %composer.cache(false) {
            item
          }
          sourceInformationMarkerEnd(%composer)
          tmp1_group
        }
        %composer.endMovableGroup()
        tmp0
        %composer.endReplaceGroup()
      } else {
        %composer.startReplaceGroup(<>)
        %composer.endReplaceGroup()
      }
    }
    if (isTraceInProgress()) {
      traceEventEnd()
    }
  } else {
    %composer.skipToGroupEnd()
  }
  %composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
    KeyContent2(items, %composer, updateChangedFlags(%changed or 0b0001))
  }
}
