data object Asserter {
  private constructor() /* primary */ {
    super/*Any*/()
    /* <init>() */

  }

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

  override fun hashCode(): Int {
    return -308598125
  }

  override fun toString(): String {
    return "Asserter"
  }

}

fun box(): String {
  return runAll(tests = [to<String, Function0<Unit>>(/* <this> = "test1", */ that = local fun <anonymous>() {
    test1()
  }
), to<String, Function0<Unit>>(/* <this> = "test2", */ that = local fun <anonymous>() {
    test2()
  }
)])
}

context(<unused var>: Asserter)
fun context1Assert(condition: Boolean, msg: Any? = null) {
  when {
    condition.not() -> throw AssertionError(p0 = toString(/* <this> = msg */))
  }
}

context(<unused var>: Asserter, <unused var>: Asserter)
fun context2Assert(condition: Boolean, msg: Any? = null) {
  when {
    condition.not() -> throw AssertionError(p0 = toString(/* <this> = msg */))
  }
}

fun test1() {
  with<Asserter, Unit>(receiver = Asserter, block = local fun Asserter.<anonymous>() {
    { // BLOCK
      val tmp_1: Asserter = $this$with
      { // BLOCK
        val tmp_2: Int = "test".<get-length>()
        val tmp_3: Boolean = EQEQ(arg0 = tmp_2, arg1 = 5)
        context1Assert(/* <unused var> = tmp_1, */ condition = tmp_3, msg = "\ncontext1Assert(\"test\".length == 5)" + "\n                      |      |" + "\n                      |      " + tmp_3 + "\n                      " + tmp_2 + "\n")
      }
    }
  }
)
}

fun test2() {
  with<Asserter, Unit>(receiver = Asserter, block = local fun Asserter.<anonymous>() {
    { // BLOCK
      val tmp_4: Asserter = $this$with
      { // BLOCK
        val tmp_5: Asserter = $this$with
        { // BLOCK
          val tmp_6: Int = "test".<get-length>()
          val tmp_7: Boolean = EQEQ(arg0 = tmp_6, arg1 = 5)
          context2Assert(/* <unused var> = tmp_4, <unused var> = tmp_5, */ condition = tmp_7, msg = "\ncontext2Assert(\"test\".length == 5)" + "\n                      |      |" + "\n                      |      " + tmp_7 + "\n                      " + tmp_6 + "\n")
        }
      }
    }
  }
)
}

