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

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

    
@Composable
fun Test(a: Boolean, visible: Boolean, onDismiss: () -> Unit) {
    if (a) {
        val a = someComposableValue()
        used(a)
        val m = Modifier()
        val dismissModifier = if (visible) {
            m.pointerInput(Unit) { detectTapGestures { onDismiss() } }
        } else {
            m
        }
        used(dismissModifier)
    }
}

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

@Composable
@FunctionKeyMeta(key = -537737384, startOffset = 110, endOffset = 462)
fun Test(a: Boolean, visible: Boolean, onDismiss: Function0<Unit>, %composer: Composer?, %changed: Int) {
  %composer = %composer.startRestartGroup(<>)
  sourceInformation(%composer, "C(Test)P(!1,2):Test.kt")
  val %dirty = %changed
  if (%changed and 0b0110 == 0) {
    %dirty = %dirty or if (%composer.changed(a)) 0b0100 else 0b0010
  }
  if (%changed and 0b00110000 == 0) {
    %dirty = %dirty or if (%composer.changed(visible)) 0b00100000 else 0b00010000
  }
  if (%changed and 0b000110000000 == 0) {
    %dirty = %dirty or if (%composer.changedInstance(onDismiss)) 0b000100000000 else 0b10000000
  }
  if (%composer.shouldExecute(%dirty and 0b10010011 != 0b10010010, %dirty and 0b0001)) {
    if (isTraceInProgress()) {
      traceEventStart(<>, %dirty, -1, <>)
    }
    if (a) {
      %composer.startReplaceGroup(<>)
      sourceInformation(%composer, "<someCo...>")
      val a = someComposableValue(%composer, 0)
      used(a)
      val m = Modifier()
      val dismissModifier = if (visible) {
        %composer.startReplaceGroup(<>)
        sourceInformation(%composer, "<{>")
        val tmp1_group = <block>{
          m.pointerInput(Unit, <block>{
            sourceInformationMarkerStart(%composer, <>, "CC(remember):Test.kt#9igjgp")
            val tmp0_group = %composer.cache(%dirty and 0b001110000000 == 0b000100000000) {
              {
                detectTapGestures {
                  onDismiss()
                }
              }
            }
            sourceInformationMarkerEnd(%composer)
            tmp0_group
          })
        }
        %composer.endReplaceGroup()
        tmp1_group
      } else {
        %composer.startReplaceGroup(<>)
        %composer.endReplaceGroup()
        m
      }
      used(dismissModifier)
      %composer.endReplaceGroup()
    } else {
      %composer.startReplaceGroup(<>)
      %composer.endReplaceGroup()
    }
    if (isTraceInProgress()) {
      traceEventEnd()
    }
  } else {
    %composer.skipToGroupEnd()
  }
  %composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
    Test(a, visible, onDismiss, %composer, updateChangedFlags(%changed or 0b0001))
  }
}
