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

import androidx.compose.runtime.*

@Composable
fun Ref(flag: Boolean) {
    Content(::Fn)
    Content(if (flag) ::Fn else ::Fn2)
}

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

@Composable
@FunctionKeyMeta(key = -757548421, startOffset = 84, endOffset = 203)
fun Ref(flag: Boolean, %composer: Composer?, %changed: Int) {
  %composer = %composer.startRestartGroup(<>)
  sourceInformation(%composer, "C(Ref)N(flag)<Conten...>,<Conten...>:Test.kt")
  val %dirty = %changed
  if (%changed and 0b0110 == 0) {
    %dirty = %dirty or if (%composer.changed(flag)) 0b0100 else 0b0010
  }
  if (%composer.shouldExecute(%dirty and 0b0011 != 0b0010, %dirty and 0b0001)) {
    if (isTraceInProgress()) {
      traceEventStart(<>, %dirty, -1, <>)
    }
    Content(::Fn, %composer, 0)
    Content(if (flag) {
      %composer.startReplaceGroup(<>)
      sourceInformation(%composer, "<::Fn>")
      val tmp2_group = <block>{
        sourceInformationMarkerStart(%composer, <>, "CC(remember):Test.kt#9igjgp")
        val tmp0_group = %composer.cache(false) {
          @Composable
          fun Fn(int: Int, %composer: Composer?, %changed: Int): Int {
            %composer.startReplaceGroup(<>)
            sourceInformation(%composer, "C(Fn)N(int):Test.kt")
            val tmp0 = Fn(int, %composer, 0b1110 and %changed)
            %composer.endReplaceGroup()
            return tmp0
          }
          ::Fn
        }
        sourceInformationMarkerEnd(%composer)
        tmp0_group
      }
      %composer.endReplaceGroup()
      tmp2_group
    } else {
      %composer.startReplaceGroup(<>)
      sourceInformation(%composer, "<::Fn2>")
      val tmp3_group = <block>{
        sourceInformationMarkerStart(%composer, <>, "CC(remember):Test.kt#9igjgp")
        val tmp1_group = %composer.cache(false) {
          @Composable
          fun Fn2(int: Int, %composer: Composer?, %changed: Int): Int {
            %composer.startReplaceGroup(<>)
            sourceInformation(%composer, "C(Fn2)N(int):Test.kt")
            val tmp0 = Fn2(int, %composer, 0b1110 and %changed)
            %composer.endReplaceGroup()
            return tmp0
          }
          ::Fn2
        }
        sourceInformationMarkerEnd(%composer)
        tmp1_group
      }
      %composer.endReplaceGroup()
      tmp3_group
    }, %composer, 0)
    if (isTraceInProgress()) {
      traceEventEnd()
    }
  } else {
    %composer.skipToGroupEnd()
  }
  %composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
    Ref(flag, %composer, updateChangedFlags(%changed or 0b0001))
  }
}
