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

import androidx.compose.runtime.Composable
import androidx.compose.runtime.NonRestartableComposable
import androidx.compose.runtime.ReadOnlyComposable


val unstableUnused: @Composable Foo.() -> Unit = {
}
val unstableUsed: @Composable Foo.() -> Unit = {
    used(x)
}
val stableUnused: @Composable StableFoo.() -> Unit = {
}
val stableUsed: @Composable StableFoo.() -> Unit = {
    used(x)
}

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

val unstableUnused: @[ExtensionFunctionType] Function3<Foo, Composer, Int, Unit> = ComposableSingletons%TestKt.lambda%-1652029138
val unstableUsed: @[ExtensionFunctionType] Function3<Foo, Composer, Int, Unit> = ComposableSingletons%TestKt.lambda%1351038805
val stableUnused: @[ExtensionFunctionType] Function3<StableFoo, Composer, Int, Unit> = ComposableSingletons%TestKt.lambda%-1723802896
val stableUsed: @[ExtensionFunctionType] Function3<StableFoo, Composer, Int, Unit> = ComposableSingletons%TestKt.lambda%-1402105449
internal object ComposableSingletons%TestKt {
  val lambda%-1652029138: @[ExtensionFunctionType] Function3<Foo, Composer, Int, Unit> = composableLambdaInstance(<>, false) { %composer: Composer?, %changed: Int ->
    sourceInformation(%composer, "C:Test.kt")
    if (%composer.shouldExecute(%changed and 0b00010001 != 0b00010000, %changed and 0b0001)) {
      if (isTraceInProgress()) {
        traceEventStart(<>, %changed, -1, <>)
      }
      Unit
      if (isTraceInProgress()) {
        traceEventEnd()
      }
    } else {
      %composer.skipToGroupEnd()
    }
  }
  val lambda%1351038805: @[ExtensionFunctionType] Function3<Foo, Composer, Int, Unit> = composableLambdaInstance(<>, false) { %composer: Composer?, %changed: Int ->
    sourceInformation(%composer, "C:Test.kt")
    val %dirty = %changed
    if (%changed and 0b0110 == 0) {
      %dirty = %dirty or if (if (%changed and 0b1000 == 0) {
        %composer.changed(<this>)
      } else {
        %composer.changedInstance(<this>)
      }
      ) 0b0100 else 0b0010
    }
    if (%composer.shouldExecute(%dirty and 0b00010011 != 0b00010010, %dirty and 0b0001)) {
      if (isTraceInProgress()) {
        traceEventStart(<>, %dirty, -1, <>)
      }
      used(<this>.x)
      if (isTraceInProgress()) {
        traceEventEnd()
      }
    } else {
      %composer.skipToGroupEnd()
    }
  }
  val lambda%-1723802896: @[ExtensionFunctionType] Function3<StableFoo, Composer, Int, Unit> = composableLambdaInstance(<>, false) { %composer: Composer?, %changed: Int ->
    sourceInformation(%composer, "C:Test.kt")
    if (%composer.shouldExecute(%changed and 0b00010001 != 0b00010000, %changed and 0b0001)) {
      if (isTraceInProgress()) {
        traceEventStart(<>, %changed, -1, <>)
      }
      Unit
      if (isTraceInProgress()) {
        traceEventEnd()
      }
    } else {
      %composer.skipToGroupEnd()
    }
  }
  val lambda%-1402105449: @[ExtensionFunctionType] Function3<StableFoo, Composer, Int, Unit> = composableLambdaInstance(<>, false) { %composer: Composer?, %changed: Int ->
    sourceInformation(%composer, "C:Test.kt")
    val %dirty = %changed
    if (%changed and 0b0110 == 0) {
      %dirty = %dirty or if (%composer.changed(<this>)) 0b0100 else 0b0010
    }
    if (%composer.shouldExecute(%dirty and 0b00010011 != 0b00010010, %dirty and 0b0001)) {
      if (isTraceInProgress()) {
        traceEventStart(<>, %dirty, -1, <>)
      }
      used(<this>.x)
      if (isTraceInProgress()) {
        traceEventEnd()
      }
    } else {
      %composer.skipToGroupEnd()
    }
  }
}
