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

import a.*
import androidx.compose.runtime.Composable

@Composable fun A(y: Any? = null) {
    used(y)
    A()
    A(EmptyClass())
    A(SingleStableValInt(123))
    A(SingleStableVal(StableClass()))
    A(SingleParamProp(StableClass()))
    A(SingleParamProp(UnstableClass()))
    A(SingleParamNonProp(StableClass()))
    A(SingleParamNonProp(UnstableClass()))
    A(DoubleParamSingleProp(StableClass(), StableClass()))
    A(DoubleParamSingleProp(UnstableClass(), StableClass()))
    A(DoubleParamSingleProp(StableClass(), UnstableClass()))
    A(DoubleParamSingleProp(UnstableClass(), UnstableClass()))
    A(X(listOf(StableClass())))
    A(X(listOf(StableClass())))
    A(NonBackingFieldUnstableVal())
    A(NonBackingFieldUnstableVar())
    A(StableDelegateProp())
    A(UnstableDelegateProp())
}

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

@Composable
@FunctionKeyMeta(key = 789203497, startOffset = 104, endOffset = 1078)
fun A(y: Any?, %composer: Composer?, %changed: Int, %default: Int) {
  %composer = %composer.startRestartGroup(<>)
  sourceInformation(%composer, "C(A)N(y)<A()>,<A(Empt...>,<A(Sing...>,<A(Sing...>,<A(Sing...>,<A(Sing...>,<A(Sing...>,<A(Sing...>,<A(Doub...>,<A(Doub...>,<A(Doub...>,<A(Doub...>,<A(X(li...>,<A(X(li...>,<A(NonB...>,<A(NonB...>,<A(Stab...>,<A(Unst...>:Test.kt")
  val %dirty = %changed
  if (%default and 0b0001 != 0) {
    %dirty = %dirty or 0b0110
  } else if (%changed and 0b0110 == 0) {
    %dirty = %dirty or if (%composer.changedInstance(y)) 0b0100 else 0b0010
  }
  if (%composer.shouldExecute(%dirty and 0b0011 != 0b0010, %dirty and 0b0001)) {
    if (%default and 0b0001 != 0) {
      y = null
    }
    if (isTraceInProgress()) {
      traceEventStart(<>, %dirty, -1, <>)
    }
    used(y)
    A(null, %composer, 0, 0b0001)
    A(EmptyClass(), %composer, EmptyClass.%stable, 0)
    A(SingleStableValInt(123), %composer, SingleStableValInt.%stable, 0)
    A(SingleStableVal(StableClass()), %composer, SingleStableVal.%stable, 0)
    A(SingleParamProp(StableClass()), %composer, SingleParamProp.%stable or StableClass.%stable, 0)
    A(SingleParamProp(UnstableClass()), %composer, SingleParamProp.%stable or UnstableClass.%stable, 0)
    A(SingleParamNonProp(StableClass()), %composer, SingleParamNonProp.%stable, 0)
    A(SingleParamNonProp(UnstableClass()), %composer, SingleParamNonProp.%stable, 0)
    A(DoubleParamSingleProp(StableClass(), StableClass()), %composer, DoubleParamSingleProp.%stable or StableClass.%stable, 0)
    A(DoubleParamSingleProp(UnstableClass(), StableClass()), %composer, DoubleParamSingleProp.%stable or UnstableClass.%stable, 0)
    A(DoubleParamSingleProp(StableClass(), UnstableClass()), %composer, DoubleParamSingleProp.%stable or StableClass.%stable, 0)
    A(DoubleParamSingleProp(UnstableClass(), UnstableClass()), %composer, DoubleParamSingleProp.%stable or UnstableClass.%stable, 0)
    A(X(listOf(StableClass())), %composer, X.%stable, 0)
    A(X(listOf(StableClass())), %composer, X.%stable, 0)
    A(NonBackingFieldUnstableVal(), %composer, NonBackingFieldUnstableVal.%stable, 0)
    A(NonBackingFieldUnstableVar(), %composer, NonBackingFieldUnstableVar.%stable, 0)
    A(StableDelegateProp(), %composer, StableDelegateProp.%stable, 0)
    A(UnstableDelegateProp(), %composer, UnstableDelegateProp.%stable, 0)
    if (isTraceInProgress()) {
      traceEventEnd()
    }
  } else {
    %composer.skipToGroupEnd()
  }
  %composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
    A(y, %composer, updateChangedFlags(%changed or 0b0001), %default)
  }
}
