fun one(): Int {
  return 1
}

fun two(): Int {
  return 2
}

fun test1(): Int {
  while (true) { // BLOCK
    val tmp0_subject: Int = one()
    when {
      EQEQ(arg0 = tmp0_subject, arg1 = 1) -> { // BLOCK
        val tmp1_subject: Int = two()
        when {
          EQEQ(arg0 = tmp1_subject, arg1 = 2) -> return 2
        }
      }
      else -> return 3
    }
  }
}

fun test2(): Int {
  while (true) { // BLOCK
    val tmp2_subject: Int = one()
    when {
      EQEQ(arg0 = tmp2_subject, arg1 = 1) -> { // BLOCK
        val tmp3_subject: Int = two()
        when {
          EQEQ(arg0 = tmp3_subject, arg1 = 2) -> return 2
        }
      }
      else -> return 3
    }
  }
}
