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

import androidx.compose.runtime.Composable

class ScrollState {
    fun test(index: Int, default: Int = 0): Int = 0
    fun testExact(index: Int): Int = 0
}
fun scrollState(): ScrollState = TODO()

@Composable fun rememberFooInline() = fooInline(scrollState()::test)
@Composable fun rememberFoo() = foo(scrollState()::test)
@Composable fun rememberFooExactInline() = fooInline(scrollState()::testExact)
@Composable fun rememberFooExact() = foo(scrollState()::testExact)

@Composable
inline fun fooInline(block: (Int) -> Int) = block(0)

@Composable
fun foo(block: (Int) -> Int) = block(0)

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

@StabilityInferred(parameters = 1)
class ScrollState {
  fun test(index: Int, default: Int = 0): Int {
    return 0
  }
  fun testExact(index: Int): Int {
    return 0
  }
  static val %stable: Int = 0
}
fun scrollState(): ScrollState {
  return TODO()
}
@Composable
@FunctionKeyMeta(key = 1371891869, startOffset = 295, endOffset = 351)
fun rememberFooInline(%composer: Composer?, %changed: Int): Int {
  sourceInformationMarkerStart(%composer, <>, "C(rememberFooInline)<fooInl...>:Test.kt")
  if (isTraceInProgress()) {
    traceEventStart(<>, %changed, -1, <>)
  }
  val tmp0 = fooInline(<block>{
    fun ScrollState.test(p0: Int): Int {
      val tmp0_return = receiver.test(
        index = p0
      )
      tmp0_return
    }
    scrollState()::test
  }, %composer, 0)
  if (isTraceInProgress()) {
    traceEventEnd()
  }
  sourceInformationMarkerEnd(%composer)
  return tmp0
}
@Composable
@FunctionKeyMeta(key = -954340234, startOffset = 376, endOffset = 420)
fun rememberFoo(%composer: Composer?, %changed: Int): Int {
  sourceInformationMarkerStart(%composer, <>, "C(rememberFoo)<scroll...>,<foo(sc...>:Test.kt")
  if (isTraceInProgress()) {
    traceEventStart(<>, %changed, -1, <>)
  }
  val tmp0 = foo(<block>{
    val tmp0 = scrollState()
    sourceInformationMarkerStart(%composer, <>, "CC(remember):Test.kt#9igjgp")
    val tmp1_group = %composer.cache(%composer.changed(tmp0)) {
      fun ScrollState.test(p0: Int): Int {
        receiver.test(
          index = p0
        )
      }
      tmp0::test
    }
    sourceInformationMarkerEnd(%composer)
    tmp1_group
  }, %composer, 0)
  if (isTraceInProgress()) {
    traceEventEnd()
  }
  sourceInformationMarkerEnd(%composer)
  return tmp0
}
@Composable
@FunctionKeyMeta(key = 153360788, startOffset = 445, endOffset = 511)
fun rememberFooExactInline(%composer: Composer?, %changed: Int): Int {
  sourceInformationMarkerStart(%composer, <>, "C(rememberFooExactInline)<fooInl...>:Test.kt")
  if (isTraceInProgress()) {
    traceEventStart(<>, %changed, -1, <>)
  }
  val tmp0 = fooInline(scrollState()::testExact, %composer, 0)
  if (isTraceInProgress()) {
    traceEventEnd()
  }
  sourceInformationMarkerEnd(%composer)
  return tmp0
}
@Composable
@FunctionKeyMeta(key = -743021907, startOffset = 536, endOffset = 590)
fun rememberFooExact(%composer: Composer?, %changed: Int): Int {
  sourceInformationMarkerStart(%composer, <>, "C(rememberFooExact)<scroll...>,<foo(sc...>:Test.kt")
  if (isTraceInProgress()) {
    traceEventStart(<>, %changed, -1, <>)
  }
  val tmp0 = foo(<block>{
    val tmp0 = scrollState()
    sourceInformationMarkerStart(%composer, <>, "CC(remember):Test.kt#9igjgp")
    val tmp1_group = %composer.cache(%composer.changed(tmp0)) {
      tmp0::testExact
    }
    sourceInformationMarkerEnd(%composer)
    tmp1_group
  }, %composer, 0)
  if (isTraceInProgress()) {
    traceEventEnd()
  }
  sourceInformationMarkerEnd(%composer)
  return tmp0
}
@Composable
@FunctionKeyMeta(key = -109693925, startOffset = 635, endOffset = 680)
fun fooInline(block: Function1<Int, Int>, %composer: Composer?, %changed: Int): Int {
  sourceInformationMarkerStart(%composer, <>, "CC(fooInline)N(block):Test.kt")
  val tmp0 = block(0)
  sourceInformationMarkerEnd(%composer)
  return tmp0
}
@Composable
@FunctionKeyMeta(key = 949580322, startOffset = 718, endOffset = 757)
fun foo(block: Function1<Int, Int>, %composer: Composer?, %changed: Int): Int {
  sourceInformationMarkerStart(%composer, <>, "C(foo)N(block):Test.kt")
  if (isTraceInProgress()) {
    traceEventStart(<>, %changed, -1, <>)
  }
  val tmp0 = block(0)
  if (isTraceInProgress()) {
    traceEventEnd()
  }
  sourceInformationMarkerEnd(%composer)
  return tmp0
}
