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

import androidx.compose.runtime.Composable

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

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

@StabilityInferred(parameters = 0)
class Foo(var bar: Int = 0) {
  static val %stable: Int = 8
}
@Composable
@FunctionKeyMeta(key = 1541583180, startOffset = 121, endOffset = 203)
fun A(y: Int, x: Foo, %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 = 228, endOffset = 281)
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))
  }
}
