//
// 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 = -952440693, startOffset = 100, endOffset = 417)
fun Test1(block: Function3<Function2<Composer, Int, Unit>, Composer, Int, Unit>, %composer: Composer?, %changed: Int) {
  sourceInformationMarkerStart(%composer, <>, "CC(Test1)N(block)<{>,<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 = -1192980822, startOffset = 470, endOffset = 787)
private fun Test2(block: Function3<Function2<Composer, Int, Unit>, Composer, Int, Unit>, %composer: Composer?, %changed: Int) {
  sourceInformationMarkerStart(%composer, <>, "CC(Test2)N(block)<block(...>,<block>:Test.kt")
  val x = ComposableSingletons%TestKt.lambda%-1268429142
  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%1388906510, %composer, 0b0110 or 0b01110000 and %changed shl 0b0011)
  sourceInformationMarkerEnd(%composer)
}
@Composable
@ComposableInferredTarget(scheme = "[0[0[0]]]")
@FunctionKeyMeta(key = -1433520951, startOffset = 841, endOffset = 1158)
internal fun Test3(block: Function3<Function2<Composer, Int, Unit>, Composer, Int, Unit>, %composer: Composer?, %changed: Int) {
  sourceInformationMarkerStart(%composer, <>, "CC(Test3)N(block)<{>,<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 = -1674061080, startOffset = 1238, endOffset = 1555)
internal fun Test4(block: Function3<Function2<Composer, Int, Unit>, Composer, Int, Unit>, %composer: Composer?, %changed: Int) {
  sourceInformationMarkerStart(%composer, <>, "CC(Test4)N(block)<{>,<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%-1027889013: 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%-1027889013
    }
  val lambda%1629446639: 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%1629446639
    }
  val lambda%-1268429142: 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%1388906510: 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%-1508969271: 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%-1508969271
    }
  val lambda%1148366381: 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%1148366381
    }
  val lambda%-1749509400: 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%-1749509400
    }
  val lambda%907826252: 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%907826252
    }
}
