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

import androidx.compose.runtime.Composable

@Composable
fun Test(z: Int, x: Int, y: Result<Int>) {
    Wrapper { Test(z, x, y) }
}

@Composable
fun Wrapper(content: @Composable () -> Unit) { content() }

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

@Composable
@FunctionKeyMeta(key = -1718744799, startOffset = 93, endOffset = 191)
fun Test(z: Int, x: Int, y: Result<Int>, %composer: Composer?, %changed: Int) {
  %composer = %composer.startRestartGroup(<>)
  sourceInformation(%composer, "C(Test)P(2!,1:kotlin.Result)<{>,<Wrappe...>:Test.kt")
  val %dirty = %changed
  if (%changed and 0b0110 == 0) {
    %dirty = %dirty or if (%composer.changed(z)) 0b0100 else 0b0010
  }
  if (%changed and 0b00110000 == 0) {
    %dirty = %dirty or if (%composer.changed(x)) 0b00100000 else 0b00010000
  }
  if (%changed and 0b000110000000 == 0) {
    %dirty = %dirty or if (%composer.changedInstance(<unsafe-coerce>(y))) 0b000100000000 else 0b10000000
  }
  if (%composer.shouldExecute(%dirty and 0b10010011 != 0b10010010, %dirty and 0b0001)) {
    if (isTraceInProgress()) {
      traceEventStart(<>, %dirty, -1, <>)
    }
    Wrapper(rememberComposableLambda(<>, true, { %composer: Composer?, %changed: Int ->
      sourceInformation(%composer, "C<Test(z...>:Test.kt")
      if (%composer.shouldExecute(%changed and 0b0011 != 0b0010, %changed and 0b0001)) {
        if (isTraceInProgress()) {
          traceEventStart(<>, %changed, -1, <>)
        }
        Test(z, x, y, %composer, 0)
        if (isTraceInProgress()) {
          traceEventEnd()
        }
      } else {
        %composer.skipToGroupEnd()
      }
    }, %composer, 0b00110110), %composer, 0b0110)
    if (isTraceInProgress()) {
      traceEventEnd()
    }
  } else {
    %composer.skipToGroupEnd()
  }
  %composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
    Test(z, x, y, %composer, updateChangedFlags(%changed or 0b0001))
  }
}
@Composable
@ComposableInferredTarget(scheme = "[0[0]]")
@FunctionKeyMeta(key = -283819720, startOffset = 229, endOffset = 287)
fun Wrapper(content: Function2<Composer, Int, Unit>, %composer: Composer?, %changed: Int) {
  %composer = %composer.startRestartGroup(<>)
  sourceInformation(%composer, "C(Wrapper)<conten...>:Test.kt")
  val %dirty = %changed
  if (%changed and 0b0110 == 0) {
    %dirty = %dirty or if (%composer.changedInstance(content)) 0b0100 else 0b0010
  }
  if (%composer.shouldExecute(%dirty and 0b0011 != 0b0010, %dirty and 0b0001)) {
    if (isTraceInProgress()) {
      traceEventStart(<>, %dirty, -1, <>)
    }
    content(%composer, 0b1110 and %dirty)
    if (isTraceInProgress()) {
      traceEventEnd()
    }
  } else {
    %composer.skipToGroupEnd()
  }
  %composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
    Wrapper(content, %composer, updateChangedFlags(%changed or 0b0001))
  }
}
