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 dispatchAssert(condition: Boolean, msg: Any? = null) {
    when {
      condition.not() -> throw AssertionError(p0 = toString(/* <this> = msg */))
    }
  }

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

}

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()
  }
), to<String, Function0<Unit>>(/* <this> = "test3", */ that = local fun <anonymous>() {
    test3()
  }
), to<String, Function0<Unit>>(/* <this> = "test4", */ that = local fun <anonymous>() {
    test4()
  }
), to<String, Function0<Unit>>(/* <this> = "test5", */ that = local fun <anonymous>() {
    test5()
  }
), to<String, Function0<Unit>>(/* <this> = "test6", */ that = local fun <anonymous>() {
    test6()
  }
)])
}

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

fun test1() {
  { // BLOCK
    val tmp_1: Asserter = Asserter
    { // BLOCK
      val tmp_2: Int = "test".<get-length>()
      val tmp_3: Boolean = EQEQ(arg0 = tmp_2, arg1 = 5)
      tmp_1.dispatchAssert(condition = tmp_3, msg = "\nAsserter.dispatchAssert(\"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: Int = "test".<get-length>()
        val tmp_6: Boolean = EQEQ(arg0 = tmp_5, arg1 = 5)
        tmp_4.dispatchAssert(condition = tmp_6, msg = "\ndispatchAssert(\"test\".length == 5)" + "\n                      |      |" + "\n                      |      " + tmp_6 + "\n                      " + tmp_5 + "\n")
      }
    }
  }
)
}

fun test3() {
  { // BLOCK
    val tmp_7: Asserter = Asserter
    { // BLOCK
      val tmp_8: Int = "test".<get-length>()
      val tmp_9: Boolean = EQEQ(arg0 = tmp_8, arg1 = 5)
      extensionAssert(/* <this> = tmp_7, */ condition = tmp_9, msg = "\nAsserter.extensionAssert(\"test\".length == 5)" + "\n                                |      |" + "\n                                |      " + tmp_9 + "\n                                " + tmp_8 + "\n")
    }
  }
}

fun test4() {
  with<Asserter, Unit>(receiver = Asserter, block = local fun Asserter.<anonymous>() {
    { // BLOCK
      val tmp_10: Asserter = $this$with
      { // BLOCK
        val tmp_11: Int = "test".<get-length>()
        val tmp_12: Boolean = EQEQ(arg0 = tmp_11, arg1 = 5)
        extensionAssert(/* <this> = tmp_10, */ condition = tmp_12, msg = "\nextensionAssert(\"test\".length == 5)" + "\n                       |      |" + "\n                       |      " + tmp_12 + "\n                       " + tmp_11 + "\n")
      }
    }
  }
)
}

fun test5() {
  with<Asserter, Unit>(receiver = Asserter, block = local fun Asserter.<anonymous>() {
    { // BLOCK
      val tmp_13: Asserter = $this$with
      { // BLOCK
        val tmp_14: Asserter = Asserter
        { // BLOCK
          val tmp_15: Int = "test".<get-length>()
          val tmp_16: Boolean = EQEQ(arg0 = tmp_15, arg1 = 5)
          tmp_13.memberExtensionAssert(/* <this> = tmp_14, */ condition = tmp_16, msg = "\nAsserter.memberExtensionAssert(\"test\".length == 5)" + "\n                                      |      |" + "\n                                      |      " + tmp_16 + "\n                                      " + tmp_15 + "\n")
        }
      }
    }
  }
)
}

fun test6() {
  with<Asserter, Unit>(receiver = Asserter, block = local fun Asserter.<anonymous>() {
    { // BLOCK
      val tmp_17: Asserter = $this$with
      { // BLOCK
        val tmp_18: Asserter = $this$with
        { // BLOCK
          val tmp_19: Int = "test".<get-length>()
          val tmp_20: Boolean = EQEQ(arg0 = tmp_19, arg1 = 5)
          tmp_17.memberExtensionAssert(/* <this> = tmp_18, */ condition = tmp_20, msg = "\nmemberExtensionAssert(\"test\".length == 5)" + "\n                             |      |" + "\n                             |      " + tmp_20 + "\n                             " + tmp_19 + "\n")
        }
      }
    }
  }
)
}

