var operationScore: Int
  field = 0
  get
  set

data class Result {
  val i: Int
    field = i
    get

  constructor(i: Int) /* primary */ {
    super/*Any*/()
    /* <init>() */

  }

  operator fun component1(): Int {
    return <this>.#i
  }

  fun copy(i: Int = <this>.#i): Result {
    return Result(i = i)
  }

  override operator fun equals(other: Any?): Boolean {
    when {
      EQEQEQ(arg0 = <this>, arg1 = other) -> return true
    }
    when {
      other !is Result -> return false
    }
    val tmp_0: Result = other /*as Result */
    when {
      EQEQ(arg0 = <this>.#i, arg1 = tmp_0.#i).not() -> return false
    }
    return true
  }

  override fun hashCode(): Int {
    return <this>.#i.hashCode()
  }

  override fun toString(): String {
    return "Result(" + "i=" + <this>.#i + ")"
  }

}

fun box(): String {
  var result: Result = Result(i = 0)
  with<Int, Result>(receiver = 1, block = local fun Int.<anonymous>(): Result {
    { // BLOCK
      val tmp_1: Result = result
      result = inc(/* $context_receiver_0 = $this$with, <this> = tmp_1 */)
      tmp_1
    } /*~> Unit */
    { // BLOCK
      val tmp_2: Result = result
      result = inc(/* $context_receiver_0 = $this$with, <this> = tmp_2 */)
      tmp_2
    } /*~> Unit */
    unaryMinus(/* $context_receiver_0 = $this$with, <this> = result */) /*~> Unit */
    unaryPlus(/* $context_receiver_0 = $this$with, <this> = result */) /*~> Unit */
    return { // BLOCK
      val tmp_3: Result = result
      result = dec(/* $context_receiver_0 = $this$with, <this> = tmp_3 */)
      tmp_3
    }
  }
) /*~> Unit */
  return when {
    when {
      EQEQ(arg0 = result.<get-i>(), arg1 = 1) -> EQEQ(arg0 = <get-operationScore>(), arg1 = 5)
      else -> false
    } -> "OK"
    else -> "fail"
  }
}

context($context_receiver_0: Int)
operator fun Result.dec(): Result {
  <set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
  return Result(i = <this>.<get-i>().minus(other = 1))
}

context($context_receiver_0: Int)
operator fun Result.inc(): Result {
  <set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
  return Result(i = <this>.<get-i>().plus(other = 1))
}

context($context_receiver_0: Int)
operator fun Result.unaryMinus(): Result {
  <set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
  return Result(i = <this>.<get-i>().unaryMinus())
}

context($context_receiver_0: Int)
operator fun Result.unaryPlus(): Result {
  <set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
  return Result(i = when {
    less(arg0 = <this>.<get-i>(), arg1 = 0) -> <this>.<get-i>().unaryMinus()
    else -> <this>.<get-i>()
  })
}
