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

import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember


@Composable
fun Test(a: Int = 1, b: Foo = Foo.B, c: Int = swizzle(1, 2) ) {
    val s = remember(a, b, c) { Any() }
    used(s)
}

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

@Composable
@FunctionKeyMeta(key = -367294500, startOffset = 98, endOffset = 215)
fun Test(a: Int, b: Foo?, c: Int, %composer: Composer?, %changed: Int, %default: Int) {
  %composer = %composer.startRestartGroup(<>)
  sourceInformation(%composer, "C(Test)<rememb...>,<used(s...>: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.changed(a)) 0b0100 else 0b0010
  }
  if (%default and 0b0010 != 0) {
    %dirty = %dirty or 0b00110000
  } else if (%changed and 0b00110000 == 0) {
    %dirty = %dirty or if (%composer.changed(<block>{
      val tmpEnum = b
      if (tmpEnum == null) {
        0b.inv()
      } else {
        tmpEnum.ordinal
      }
    })) 0b00100000 else 0b00010000
  }
  if (%changed and 0b000110000000 == 0) {
    %dirty = %dirty or if (%default and 0b0100 == 0 && %composer.changed(c)) 0b000100000000 else 0b10000000
  }
  if (%composer.shouldExecute(%dirty and 0b10010011 != 0b10010010, %dirty and 0b0001)) {
    %composer.startDefaults()
    if (%changed and 0b0001 == 0 || %composer.defaultsInvalid) {
      if (%default and 0b0001 != 0) {
        a = 1
      }
      if (%default and 0b0010 != 0) {
        b = Foo.B
      }
      if (%default and 0b0100 != 0) {
        c = swizzle(1, 2)
        %dirty = %dirty and 0b001110000000.inv()
      }
    } else {
      %composer.skipToGroupEnd()
      if (%default and 0b0100 != 0) {
        %dirty = %dirty and 0b001110000000.inv()
      }
    }
    %composer.endDefaults()
    if (isTraceInProgress()) {
      traceEventStart(<>, %dirty, -1, <>)
    }
    val s = <block>{
      sourceInformationMarkerStart(%composer, <>, "CC(remember):Test.kt#9igjgp")
      val tmp0_group = %composer.cache(%dirty and 0b1110 == 0b0100 or %dirty and 0b01110000 == 0b00100000 or %dirty and 0b001110000000 xor 0b000110000000 > 256 && %composer.changed(c) || %dirty and 0b000110000000 == 0b000100000000) {
        Any()
      }
      sourceInformationMarkerEnd(%composer)
      tmp0_group
    }
    used(s, %composer, 0)
    if (isTraceInProgress()) {
      traceEventEnd()
    }
  } else {
    %composer.skipToGroupEnd()
  }
  %composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
    Test(a, b, c, %composer, updateChangedFlags(%changed or 0b0001), %default)
  }
}
