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

import androidx.compose.runtime.Composable

class Foo
@Composable fun A(y: Int, x: Any) {
    used(y)
    B(x)
}
@Composable fun B(x: Any) {
    used(x)
}

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

@StabilityInferred(parameters = 1)
class Foo {
  static val %stable: Int = 0
}
@Composable
@FunctionKeyMeta(key = -1530438170, startOffset = 103, endOffset = 185)
fun A(y: Int, x: Any, %composer: Composer?, %changed: Int) {
  %composer = %composer.startRestartGroup(<>)
  sourceInformation(%composer, "C(A)N(y,x)<B(x)>:Test.kt")
  val %dirty = %changed
  if (%changed and 0b0110 == 0) {
    %dirty = %dirty or if (%composer.changed(y)) 0b0100 else 0b0010
  }
  if (%changed and 0b00110000 == 0) {
    %dirty = %dirty or if (%composer.changedInstance(x)) 0b00100000 else 0b00010000
  }
  if (%composer.shouldExecute(%dirty and 0b00010011 != 0b00010010, %dirty and 0b0001)) {
    if (isTraceInProgress()) {
      traceEventStart(<>, %dirty, -1, <>)
    }
    used(y)
    B(x, %composer, 0b1110 and %dirty shr 0b0011)
    if (isTraceInProgress()) {
      traceEventEnd()
    }
  } else {
    %composer.skipToGroupEnd()
  }
  %composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
    A(y, x, %composer, updateChangedFlags(%changed or 0b0001))
  }
}
@Composable
@FunctionKeyMeta(key = 1814695496, startOffset = 210, endOffset = 263)
fun B(x: Any, %composer: Composer?, %changed: Int) {
  %composer = %composer.startRestartGroup(<>)
  sourceInformation(%composer, "C(B)N(x):Test.kt")
  val %dirty = %changed
  if (%changed and 0b0110 == 0) {
    %dirty = %dirty or if (%composer.changedInstance(x)) 0b0100 else 0b0010
  }
  if (%composer.shouldExecute(%dirty and 0b0011 != 0b0010, %dirty and 0b0001)) {
    if (isTraceInProgress()) {
      traceEventStart(<>, %dirty, -1, <>)
    }
    used(x)
    if (isTraceInProgress()) {
      traceEventEnd()
    }
  } else {
    %composer.skipToGroupEnd()
  }
  %composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
    B(x, %composer, updateChangedFlags(%changed or 0b0001))
  }
}
