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

import androidx.compose.runtime.Composable

@Composable
inline fun Test1(block: @Composable (@Composable () -> Unit) -> Unit) {
    val x: @Composable () -> Unit = @Composable { }
    val y: @Composable () -> String = @Composable { "hello" }
    val z = @Composable { x }
    block(x)
    block { "Hello" }
}

@Composable
private inline fun Test2(block: @Composable (@Composable () -> Unit) -> Unit) {
    val x: @Composable () -> Unit = @Composable { }
    val y: @Composable () -> String = @Composable { "hello" }
    val z = @Composable { x }
    block(x)
    block { "Hello" }
}

@Composable
internal inline fun Test3(block: @Composable (@Composable () -> Unit) -> Unit) {
    val x: @Composable () -> Unit = @Composable { }
    val y: @Composable () -> String = @Composable { "hello" }
    val z = @Composable { x }
    block(x)
    block { "Hello" }
}

@Composable
@PublishedApi
internal inline fun Test4(block: @Composable (@Composable () -> Unit) -> Unit) {
    val x: @Composable () -> Unit = @Composable { }
    val y: @Composable () -> String = @Composable { "hello" }
    val z = @Composable { x }
    block(x)
    block { "Hello" }
}

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

@Composable
@ComposableInferredTarget(scheme = "[0[0[0]]]")
@FunctionKeyMeta(key = 1059425758, startOffset = 100, endOffset = 417)
fun Test1(block: Function3<Function2<Composer, Int, Unit>, Composer, Int, Unit>, %composer: Composer?, %changed: Int) {
  sourceInformationMarkerStart(%composer, <>, "CC(Test1)<{>,<block(...>,<{>,<block>:Test.kt")
  val x = rememberComposableLambda(<>, false, { %composer: Composer?, %changed: Int ->
    sourceInformation(%composer, "C:Test.kt")
    if (%composer.shouldExecute(%changed and 0b0011 != 0b0010, %changed and 0b0001)) {
      if (isTraceInProgress()) {
        traceEventStart(<>, %changed, -1, <>)
      }
      Unit
      if (isTraceInProgress()) {
        traceEventEnd()
      }
    } else {
      %composer.skipToGroupEnd()
    }
  }, %composer, 0b00110110)
  val y = { %composer: Composer?, %changed: Int ->
    %composer.startReplaceGroup(<>)
    if (isTraceInProgress()) {
      traceEventStart(<>, %changed, -1, <>)
    }
    val tmp0 = "hello"
    if (isTraceInProgress()) {
      traceEventEnd()
    }
    %composer.endReplaceGroup()
    tmp0
  }
  val z = { %composer: Composer?, %changed: Int ->
    %composer.startReplaceGroup(<>)
    if (isTraceInProgress()) {
      traceEventStart(<>, %changed, -1, <>)
    }
    val tmp0 = x
    if (isTraceInProgress()) {
      traceEventEnd()
    }
    %composer.endReplaceGroup()
    tmp0
  }
  block(x, %composer, 0b0110 or 0b01110000 and %changed shl 0b0011)
  block(rememberComposableLambda(<>, false, { %composer: Composer?, %changed: Int ->
    sourceInformation(%composer, "C:Test.kt")
    if (%composer.shouldExecute(%changed and 0b0011 != 0b0010, %changed and 0b0001)) {
      if (isTraceInProgress()) {
        traceEventStart(<>, %changed, -1, <>)
      }
      "Hello"
      if (isTraceInProgress()) {
        traceEventEnd()
      }
    } else {
      %composer.skipToGroupEnd()
    }
  }, %composer, 0b00110110), %composer, 0b0110 or 0b01110000 and %changed shl 0b0011)
  sourceInformationMarkerEnd(%composer)
}
@Composable
@ComposableInferredTarget(scheme = "[0[0[0]]]")
@FunctionKeyMeta(key = -1773961539, startOffset = 470, endOffset = 787)
private fun Test2(block: Function3<Function2<Composer, Int, Unit>, Composer, Int, Unit>, %composer: Composer?, %changed: Int) {
  sourceInformationMarkerStart(%composer, <>, "CC(Test2)<block(...>,<block>:Test.kt")
  val x = ComposableSingletons%TestKt.lambda%397688509
  val y = { %composer: Composer?, %changed: Int ->
    %composer.startReplaceGroup(<>)
    if (isTraceInProgress()) {
      traceEventStart(<>, %changed, -1, <>)
    }
    val tmp0 = "hello"
    if (isTraceInProgress()) {
      traceEventEnd()
    }
    %composer.endReplaceGroup()
    tmp0
  }
  val z = { %composer: Composer?, %changed: Int ->
    %composer.startReplaceGroup(<>)
    if (isTraceInProgress()) {
      traceEventStart(<>, %changed, -1, <>)
    }
    val tmp0 = x
    if (isTraceInProgress()) {
      traceEventEnd()
    }
    %composer.endReplaceGroup()
    tmp0
  }
  block(x, %composer, 0b0110 or 0b01110000 and %changed shl 0b0011)
  block(ComposableSingletons%TestKt.lambda%-1010195167, %composer, 0b0110 or 0b01110000 and %changed shl 0b0011)
  sourceInformationMarkerEnd(%composer)
}
@Composable
@ComposableInferredTarget(scheme = "[0[0[0]]]")
@FunctionKeyMeta(key = -312381540, startOffset = 841, endOffset = 1158)
internal fun Test3(block: Function3<Function2<Composer, Int, Unit>, Composer, Int, Unit>, %composer: Composer?, %changed: Int) {
  sourceInformationMarkerStart(%composer, <>, "CC(Test3)<{>,<block(...>,<{>,<block>:Test.kt")
  val x = rememberComposableLambda(<>, false, { %composer: Composer?, %changed: Int ->
    sourceInformation(%composer, "C:Test.kt")
    if (%composer.shouldExecute(%changed and 0b0011 != 0b0010, %changed and 0b0001)) {
      if (isTraceInProgress()) {
        traceEventStart(<>, %changed, -1, <>)
      }
      Unit
      if (isTraceInProgress()) {
        traceEventEnd()
      }
    } else {
      %composer.skipToGroupEnd()
    }
  }, %composer, 0b00110110)
  val y = { %composer: Composer?, %changed: Int ->
    %composer.startReplaceGroup(<>)
    if (isTraceInProgress()) {
      traceEventStart(<>, %changed, -1, <>)
    }
    val tmp0 = "hello"
    if (isTraceInProgress()) {
      traceEventEnd()
    }
    %composer.endReplaceGroup()
    tmp0
  }
  val z = { %composer: Composer?, %changed: Int ->
    %composer.startReplaceGroup(<>)
    if (isTraceInProgress()) {
      traceEventStart(<>, %changed, -1, <>)
    }
    val tmp0 = x
    if (isTraceInProgress()) {
      traceEventEnd()
    }
    %composer.endReplaceGroup()
    tmp0
  }
  block(x, %composer, 0b0110 or 0b01110000 and %changed shl 0b0011)
  block(rememberComposableLambda(<>, false, { %composer: Composer?, %changed: Int ->
    sourceInformation(%composer, "C:Test.kt")
    if (%composer.shouldExecute(%changed and 0b0011 != 0b0010, %changed and 0b0001)) {
      if (isTraceInProgress()) {
        traceEventStart(<>, %changed, -1, <>)
      }
      "Hello"
      if (isTraceInProgress()) {
        traceEventEnd()
      }
    } else {
      %composer.skipToGroupEnd()
    }
  }, %composer, 0b00110110), %composer, 0b0110 or 0b01110000 and %changed shl 0b0011)
  sourceInformationMarkerEnd(%composer)
}
@Composable
@PublishedApi
@ComposableInferredTarget(scheme = "[0[0[0]]]")
@FunctionKeyMeta(key = 1149198459, startOffset = 1238, endOffset = 1555)
internal fun Test4(block: Function3<Function2<Composer, Int, Unit>, Composer, Int, Unit>, %composer: Composer?, %changed: Int) {
  sourceInformationMarkerStart(%composer, <>, "CC(Test4)<{>,<block(...>,<{>,<block>:Test.kt")
  val x = rememberComposableLambda(<>, false, { %composer: Composer?, %changed: Int ->
    sourceInformation(%composer, "C:Test.kt")
    if (%composer.shouldExecute(%changed and 0b0011 != 0b0010, %changed and 0b0001)) {
      if (isTraceInProgress()) {
        traceEventStart(<>, %changed, -1, <>)
      }
      Unit
      if (isTraceInProgress()) {
        traceEventEnd()
      }
    } else {
      %composer.skipToGroupEnd()
    }
  }, %composer, 0b00110110)
  val y = { %composer: Composer?, %changed: Int ->
    %composer.startReplaceGroup(<>)
    if (isTraceInProgress()) {
      traceEventStart(<>, %changed, -1, <>)
    }
    val tmp0 = "hello"
    if (isTraceInProgress()) {
      traceEventEnd()
    }
    %composer.endReplaceGroup()
    tmp0
  }
  val z = { %composer: Composer?, %changed: Int ->
    %composer.startReplaceGroup(<>)
    if (isTraceInProgress()) {
      traceEventStart(<>, %changed, -1, <>)
    }
    val tmp0 = x
    if (isTraceInProgress()) {
      traceEventEnd()
    }
    %composer.endReplaceGroup()
    tmp0
  }
  block(x, %composer, 0b0110 or 0b01110000 and %changed shl 0b0011)
  block(rememberComposableLambda(<>, false, { %composer: Composer?, %changed: Int ->
    sourceInformation(%composer, "C:Test.kt")
    if (%composer.shouldExecute(%changed and 0b0011 != 0b0010, %changed and 0b0001)) {
      if (isTraceInProgress()) {
        traceEventStart(<>, %changed, -1, <>)
      }
      "Hello"
      if (isTraceInProgress()) {
        traceEventEnd()
      }
    } else {
      %composer.skipToGroupEnd()
    }
  }, %composer, 0b00110110), %composer, 0b0110 or 0b01110000 and %changed shl 0b0011)
  sourceInformationMarkerEnd(%composer)
}
internal object ComposableSingletons%TestKt {
  val lambda%-1063891490: Function2<Composer, Int, Unit> = composableLambdaInstance(<>, false) { %composer: Composer?, %changed: Int ->
    sourceInformation(%composer, "C:Test.kt")
    if (%composer.shouldExecute(%changed and 0b0011 != 0b0010, %changed and 0b0001)) {
      if (isTraceInProgress()) {
        traceEventStart(<>, %changed, -1, <>)
      }
      Unit
      if (isTraceInProgress()) {
        traceEventEnd()
      }
    } else {
      %composer.skipToGroupEnd()
    }
  }
  val lambda-1: Function2<Composer, Int, Unit>
    get() {
      return lambda%-1063891490
    }
  val lambda%1823192130: Function2<Composer, Int, Unit> = composableLambdaInstance(<>, false) { %composer: Composer?, %changed: Int ->
    sourceInformation(%composer, "C:Test.kt")
    if (%composer.shouldExecute(%changed and 0b0011 != 0b0010, %changed and 0b0001)) {
      if (isTraceInProgress()) {
        traceEventStart(<>, %changed, -1, <>)
      }
      "Hello"
      if (isTraceInProgress()) {
        traceEventEnd()
      }
    } else {
      %composer.skipToGroupEnd()
    }
  }
  val lambda-2: Function2<Composer, Int, Unit>
    get() {
      return lambda%1823192130
    }
  val lambda%397688509: Function2<Composer, Int, Unit> = composableLambdaInstance(<>, false) { %composer: Composer?, %changed: Int ->
    sourceInformation(%composer, "C:Test.kt")
    if (%composer.shouldExecute(%changed and 0b0011 != 0b0010, %changed and 0b0001)) {
      if (isTraceInProgress()) {
        traceEventStart(<>, %changed, -1, <>)
      }
      Unit
      if (isTraceInProgress()) {
        traceEventEnd()
      }
    } else {
      %composer.skipToGroupEnd()
    }
  }
  val lambda%-1010195167: Function2<Composer, Int, Unit> = composableLambdaInstance(<>, false) { %composer: Composer?, %changed: Int ->
    sourceInformation(%composer, "C:Test.kt")
    if (%composer.shouldExecute(%changed and 0b0011 != 0b0010, %changed and 0b0001)) {
      if (isTraceInProgress()) {
        traceEventStart(<>, %changed, -1, <>)
      }
      "Hello"
      if (isTraceInProgress()) {
        traceEventEnd()
      }
    } else {
      %composer.skipToGroupEnd()
    }
  }
  val lambda%1859268508: Function2<Composer, Int, Unit> = composableLambdaInstance(<>, false) { %composer: Composer?, %changed: Int ->
    sourceInformation(%composer, "C:Test.kt")
    if (%composer.shouldExecute(%changed and 0b0011 != 0b0010, %changed and 0b0001)) {
      if (isTraceInProgress()) {
        traceEventStart(<>, %changed, -1, <>)
      }
      Unit
      if (isTraceInProgress()) {
        traceEventEnd()
      }
    } else {
      %composer.skipToGroupEnd()
    }
  }
  val lambda-5: Function2<Composer, Int, Unit>
    get() {
      return lambda%1859268508
    }
  val lambda%451384832: Function2<Composer, Int, Unit> = composableLambdaInstance(<>, false) { %composer: Composer?, %changed: Int ->
    sourceInformation(%composer, "C:Test.kt")
    if (%composer.shouldExecute(%changed and 0b0011 != 0b0010, %changed and 0b0001)) {
      if (isTraceInProgress()) {
        traceEventStart(<>, %changed, -1, <>)
      }
      "Hello"
      if (isTraceInProgress()) {
        traceEventEnd()
      }
    } else {
      %composer.skipToGroupEnd()
    }
  }
  val lambda-6: Function2<Composer, Int, Unit>
    get() {
      return lambda%451384832
    }
  val lambda%-974118789: Function2<Composer, Int, Unit> = composableLambdaInstance(<>, false) { %composer: Composer?, %changed: Int ->
    sourceInformation(%composer, "C:Test.kt")
    if (%composer.shouldExecute(%changed and 0b0011 != 0b0010, %changed and 0b0001)) {
      if (isTraceInProgress()) {
        traceEventStart(<>, %changed, -1, <>)
      }
      Unit
      if (isTraceInProgress()) {
        traceEventEnd()
      }
    } else {
      %composer.skipToGroupEnd()
    }
  }
  val lambda-7: Function2<Composer, Int, Unit>
    get() {
      return lambda%-974118789
    }
  val lambda%1912964831: Function2<Composer, Int, Unit> = composableLambdaInstance(<>, false) { %composer: Composer?, %changed: Int ->
    sourceInformation(%composer, "C:Test.kt")
    if (%composer.shouldExecute(%changed and 0b0011 != 0b0010, %changed and 0b0001)) {
      if (isTraceInProgress()) {
        traceEventStart(<>, %changed, -1, <>)
      }
      "Hello"
      if (isTraceInProgress()) {
        traceEventEnd()
      }
    } else {
      %composer.skipToGroupEnd()
    }
  }
  val lambda-8: Function2<Composer, Int, Unit>
    get() {
      return lambda%1912964831
    }
}
