From 6f971382be7337ae2f4fcc6a1968a31dca59adb9 Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Fri, 3 May 2019 19:01:17 -0700 Subject: [PATCH] chore(stage0): update --- src/stage0/CMakeLists.txt | 2 +- src/stage0/init/control/state.cpp | 80 + src/stage0/init/io.cpp | 40 +- src/stage0/init/lean/compiler/default.cpp | 382 ++- src/stage0/init/lean/compiler/elimdead.cpp | 106 +- src/stage0/init/lean/compiler/ir.cpp | 2194 +++++++++++++----- src/stage0/init/lean/compiler/pushproj.cpp | 195 +- src/stage0/init/lean/compiler/resetreuse.cpp | 1526 ++++++++++++ src/stage0/init/lean/compiler/simpcase.cpp | 5 +- 9 files changed, 3687 insertions(+), 843 deletions(-) create mode 100644 src/stage0/init/lean/compiler/resetreuse.cpp diff --git a/src/stage0/CMakeLists.txt b/src/stage0/CMakeLists.txt index a1aa913e49..037a803819 100644 --- a/src/stage0/CMakeLists.txt +++ b/src/stage0/CMakeLists.txt @@ -1 +1 @@ -add_library (stage0 OBJECT ./init/coe.cpp ./init/control/alternative.cpp ./init/control/applicative.cpp ./init/control/combinators.cpp ./init/control/default.cpp ./init/control/estate.cpp ./init/control/except.cpp ./init/control/functor.cpp ./init/control/id.cpp ./init/control/lift.cpp ./init/control/monad.cpp ./init/control/monadfail.cpp ./init/control/option.cpp ./init/control/reader.cpp ./init/control/state.cpp ./init/core.cpp ./init/data/array/basic.cpp ./init/data/array/default.cpp ./init/data/assoclist.cpp ./init/data/basic.cpp ./init/data/char/basic.cpp ./init/data/char/default.cpp ./init/data/default.cpp ./init/data/dlist.cpp ./init/data/fin/basic.cpp ./init/data/fin/default.cpp ./init/data/hashable.cpp ./init/data/hashmap/basic.cpp ./init/data/hashmap/default.cpp ./init/data/int/basic.cpp ./init/data/int/default.cpp ./init/data/list/basic.cpp ./init/data/list/default.cpp ./init/data/list/instances.cpp ./init/data/nat/basic.cpp ./init/data/nat/bitwise.cpp ./init/data/nat/default.cpp ./init/data/nat/div.cpp ./init/data/option/basic.cpp ./init/data/option/instances.cpp ./init/data/ordering/basic.cpp ./init/data/ordering/default.cpp ./init/data/rbmap/basic.cpp ./init/data/rbmap/default.cpp ./init/data/rbtree/basic.cpp ./init/data/rbtree/default.cpp ./init/data/repr.cpp ./init/data/string/basic.cpp ./init/data/string/default.cpp ./init/data/tostring.cpp ./init/data/uint.cpp ./init/default.cpp ./init/env_ext.cpp ./init/fix.cpp ./init/io.cpp ./init/lean/compiler/constfolding.cpp ./init/lean/compiler/default.cpp ./init/lean/compiler/elimdead.cpp ./init/lean/compiler/ir.cpp ./init/lean/compiler/pushproj.cpp ./init/lean/compiler/simpcase.cpp ./init/lean/compiler/util.cpp ./init/lean/config.cpp ./init/lean/declaration.cpp ./init/lean/default.cpp ./init/lean/disjoint_set.cpp ./init/lean/elaborator.cpp ./init/lean/expander.cpp ./init/lean/expr.cpp ./init/lean/extern.cpp ./init/lean/format.cpp ./init/lean/frontend.cpp ./init/lean/kvmap.cpp ./init/lean/level.cpp ./init/lean/message.cpp ./init/lean/name.cpp ./init/lean/name_mangling.cpp ./init/lean/options.cpp ./init/lean/parser/basic.cpp ./init/lean/parser/combinators.cpp ./init/lean/parser/command.cpp ./init/lean/parser/declaration.cpp ./init/lean/parser/identifier.cpp ./init/lean/parser/level.cpp ./init/lean/parser/module.cpp ./init/lean/parser/notation.cpp ./init/lean/parser/parsec.cpp ./init/lean/parser/pratt.cpp ./init/lean/parser/rec.cpp ./init/lean/parser/stringliteral.cpp ./init/lean/parser/syntax.cpp ./init/lean/parser/term.cpp ./init/lean/parser/token.cpp ./init/lean/parser/trie.cpp ./init/lean/position.cpp ./init/lean/trace.cpp ./init/lean/util.cpp ./init/platform.cpp ./init/util.cpp ./init/wf.cpp) +add_library (stage0 OBJECT ./init/coe.cpp ./init/control/alternative.cpp ./init/control/applicative.cpp ./init/control/combinators.cpp ./init/control/default.cpp ./init/control/estate.cpp ./init/control/except.cpp ./init/control/functor.cpp ./init/control/id.cpp ./init/control/lift.cpp ./init/control/monad.cpp ./init/control/monadfail.cpp ./init/control/option.cpp ./init/control/reader.cpp ./init/control/state.cpp ./init/core.cpp ./init/data/array/basic.cpp ./init/data/array/default.cpp ./init/data/assoclist.cpp ./init/data/basic.cpp ./init/data/char/basic.cpp ./init/data/char/default.cpp ./init/data/default.cpp ./init/data/dlist.cpp ./init/data/fin/basic.cpp ./init/data/fin/default.cpp ./init/data/hashable.cpp ./init/data/hashmap/basic.cpp ./init/data/hashmap/default.cpp ./init/data/int/basic.cpp ./init/data/int/default.cpp ./init/data/list/basic.cpp ./init/data/list/default.cpp ./init/data/list/instances.cpp ./init/data/nat/basic.cpp ./init/data/nat/bitwise.cpp ./init/data/nat/default.cpp ./init/data/nat/div.cpp ./init/data/option/basic.cpp ./init/data/option/instances.cpp ./init/data/ordering/basic.cpp ./init/data/ordering/default.cpp ./init/data/rbmap/basic.cpp ./init/data/rbmap/default.cpp ./init/data/rbtree/basic.cpp ./init/data/rbtree/default.cpp ./init/data/repr.cpp ./init/data/string/basic.cpp ./init/data/string/default.cpp ./init/data/tostring.cpp ./init/data/uint.cpp ./init/default.cpp ./init/env_ext.cpp ./init/fix.cpp ./init/io.cpp ./init/lean/compiler/constfolding.cpp ./init/lean/compiler/default.cpp ./init/lean/compiler/elimdead.cpp ./init/lean/compiler/ir.cpp ./init/lean/compiler/pushproj.cpp ./init/lean/compiler/resetreuse.cpp ./init/lean/compiler/simpcase.cpp ./init/lean/compiler/util.cpp ./init/lean/config.cpp ./init/lean/declaration.cpp ./init/lean/default.cpp ./init/lean/disjoint_set.cpp ./init/lean/elaborator.cpp ./init/lean/expander.cpp ./init/lean/expr.cpp ./init/lean/extern.cpp ./init/lean/format.cpp ./init/lean/frontend.cpp ./init/lean/kvmap.cpp ./init/lean/level.cpp ./init/lean/message.cpp ./init/lean/name.cpp ./init/lean/name_mangling.cpp ./init/lean/options.cpp ./init/lean/parser/basic.cpp ./init/lean/parser/combinators.cpp ./init/lean/parser/command.cpp ./init/lean/parser/declaration.cpp ./init/lean/parser/identifier.cpp ./init/lean/parser/level.cpp ./init/lean/parser/module.cpp ./init/lean/parser/notation.cpp ./init/lean/parser/parsec.cpp ./init/lean/parser/pratt.cpp ./init/lean/parser/rec.cpp ./init/lean/parser/stringliteral.cpp ./init/lean/parser/syntax.cpp ./init/lean/parser/term.cpp ./init/lean/parser/token.cpp ./init/lean/parser/trie.cpp ./init/lean/position.cpp ./init/lean/trace.cpp ./init/lean/util.cpp ./init/platform.cpp ./init/util.cpp ./init/wf.cpp) diff --git a/src/stage0/init/control/state.cpp b/src/stage0/init/control/state.cpp index 67c4809c2c..f9a2af4749 100644 --- a/src/stage0/init/control/state.cpp +++ b/src/stage0/init/control/state.cpp @@ -14,9 +14,12 @@ typedef lean::uint32 uint32; typedef lean::uint64 uint64; #pragma GCC diagnostic ignored "-Wunused-label" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif +obj* l_getModify___rarg___lambda__1(obj*, obj*, obj*); +obj* l_getModify___boxed(obj*, obj*); obj* l_StateT_adapt(obj*, obj*, obj*, obj*, obj*); obj* l_StateT_adapt___boxed(obj*, obj*, obj*, obj*, obj*); obj* l_MonadStateAdapter_adaptState_x_27___rarg(obj*, obj*, obj*, obj*, obj*); +obj* l_getModify___rarg___lambda__1___boxed(obj*, obj*, obj*); obj* l_StateT_bind___rarg___lambda__1(obj*, obj*); obj* l_monadStateAdapterTrans___rarg___lambda__1___boxed(obj*, obj*, obj*, obj*, obj*); obj* l_monadStateRunnerTrans___rarg___lambda__1(obj*, obj*, obj*, obj*); @@ -68,6 +71,7 @@ obj* l_StateT_failure___rarg(obj*, obj*, obj*); obj* l_StateT_Monad___rarg___lambda__1(obj*, obj*, obj*); obj* l_StateT_set___rarg(obj*, obj*, obj*); obj* l_StateT_failure(obj*, obj*, obj*); +obj* l_getModify(obj*, obj*); obj* l_monadStateRunnerTrans___rarg(obj*, obj*, obj*, obj*, obj*); obj* l_MonadStateAdapter_adaptState_x_27___boxed(obj*, obj*, obj*, obj*); obj* l_StateT_MonadExcept___rarg___lambda__2(obj*, obj*, obj*); @@ -79,6 +83,7 @@ obj* l_StateT_MonadExcept(obj*, obj*); obj* l_monadStateRunnerTrans(obj*, obj*, obj*, obj*, obj*); obj* l_StateT_HasMonadLift___rarg(obj*); obj* l_StateT_set___rarg___boxed(obj*, obj*, obj*); +obj* l_getModify___rarg(obj*, obj*, obj*); obj* l_monadStateAdapterTrans(obj*, obj*, obj*, obj*, obj*, obj*); obj* l_monadStateTrans___rarg___lambda__2(obj*, obj*, obj*); obj* l_StateT_MonadStateAdapter___rarg___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*); @@ -107,6 +112,7 @@ obj* l_StateT_set___boxed(obj*, obj*); obj* l_StateT_run(obj*, obj*, obj*); obj* l_StateT_MonadRun(obj*, obj*, obj*); obj* l_StateT_map___boxed(obj*, obj*); +obj* l_getModify___rarg___lambda__2(obj*, obj*, obj*, obj*, obj*); obj* l_StateT_MonadStateAdapter(obj*, obj*, obj*); obj* l_StateT_bind(obj*, obj*); obj* l_StateT_HasMonadLift(obj*, obj*); @@ -1164,6 +1170,80 @@ lean::dec(x_1); return x_2; } } +obj* l_getModify___rarg___lambda__1(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +obj* x_3; obj* x_6; obj* x_9; +x_3 = lean::cnstr_get(x_0, 0); +lean::inc(x_3); +lean::dec(x_0); +x_6 = lean::cnstr_get(x_3, 1); +lean::inc(x_6); +lean::dec(x_3); +x_9 = lean::apply_2(x_6, lean::box(0), x_1); +return x_9; +} +} +obj* l_getModify___rarg___lambda__2(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { +_start: +{ +obj* x_5; obj* x_8; obj* x_9; obj* x_10; +x_5 = lean::cnstr_get(x_0, 2); +lean::inc(x_5); +lean::dec(x_0); +x_8 = lean::apply_1(x_5, x_1); +x_9 = lean::alloc_closure(reinterpret_cast(l_getModify___rarg___lambda__1___boxed), 3, 2); +lean::closure_set(x_9, 0, x_2); +lean::closure_set(x_9, 1, x_4); +x_10 = lean::apply_4(x_3, lean::box(0), lean::box(0), x_8, x_9); +return x_10; +} +} +obj* l_getModify___rarg(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +obj* x_3; obj* x_5; obj* x_8; obj* x_9; +x_3 = lean::cnstr_get(x_1, 1); +lean::inc(x_3); +x_5 = lean::cnstr_get(x_0, 0); +lean::inc(x_5); +lean::inc(x_3); +x_8 = lean::alloc_closure(reinterpret_cast(l_getModify___rarg___lambda__2), 5, 4); +lean::closure_set(x_8, 0, x_0); +lean::closure_set(x_8, 1, x_2); +lean::closure_set(x_8, 2, x_1); +lean::closure_set(x_8, 3, x_3); +x_9 = lean::apply_4(x_3, lean::box(0), lean::box(0), x_5, x_8); +return x_9; +} +} +obj* l_getModify(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; +x_2 = lean::alloc_closure(reinterpret_cast(l_getModify___rarg), 3, 0); +return x_2; +} +} +obj* l_getModify___rarg___lambda__1___boxed(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +obj* x_3; +x_3 = l_getModify___rarg___lambda__1(x_0, x_1, x_2); +lean::dec(x_2); +return x_3; +} +} +obj* l_getModify___boxed(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; +x_2 = l_getModify(x_0, x_1); +lean::dec(x_0); +lean::dec(x_1); +return x_2; +} +} obj* l_monadStateTrans___rarg___lambda__1(obj* x_0, obj* x_1, obj* x_2) { _start: { diff --git a/src/stage0/init/io.cpp b/src/stage0/init/io.cpp index 67c219d604..7e4fd3e0bd 100644 --- a/src/stage0/init/io.cpp +++ b/src/stage0/init/io.cpp @@ -26,6 +26,7 @@ obj* l_IO_Ref_swap___boxed(obj*, obj*); obj* l_IO_HasEval(obj*); obj* l_IO_Ref_modify(obj*); obj* l_IO_Fs_handle_isEof___rarg(obj*, obj*); +obj* l_getModify___rarg___lambda__1___boxed(obj*, obj*, obj*); obj* l_IO_Fs_handle_close___rarg(obj*, obj*); obj* l_IO_Ref_swap(obj*, obj*); obj* l_EIO_Inhabited___rarg(obj*); @@ -66,7 +67,6 @@ extern "C" obj* lean_io_prim_get_line(obj*); extern "C" obj* lean_io_allocprof(obj*, obj*, obj*, obj*); obj* l_IO_Prim_iterate___boxed(obj*, obj*); obj* l_IO_Ref_set___rarg(obj*, obj*, obj*, obj*); -obj* l_IO_Fs_readFile___rarg___lambda__3(obj*, obj*, obj*, obj*); obj* l_IO_print___rarg(obj*, obj*, obj*, obj*); obj* l_IO_userError___boxed(obj*); obj* l_IO_Prim_getLine___boxed(obj*); @@ -84,7 +84,7 @@ obj* l_IO_mkRef___rarg___boxed(obj*, obj*, obj*); obj* l_IO_mkRef___rarg(obj*, obj*, obj*); obj* l_IO_Fs_handle_mk___rarg___boxed(obj*, obj*, obj*, obj*); obj* l_IO_Prim_iterate(obj*, obj*); -obj* l_IO_Fs_readFile___rarg___lambda__2(obj*, obj*, obj*, obj*, obj*); +obj* l_IO_Fs_readFile___rarg___lambda__2(obj*, obj*, obj*, obj*); obj* l_unsafeIO___boxed(obj*, obj*); obj* l_String_HasToString___boxed(obj*); obj* l_IO_Prim_liftIO(obj*, obj*); @@ -103,9 +103,8 @@ extern "C" obj* lean_io_prim_handle_close(obj*, obj*); obj* l_IO_Ref_modify___rarg___lambda__1(obj*, obj*, obj*, obj*, obj*); obj* l_IO_Inhabited___boxed(obj*); obj* l_IO_mkRef(obj*, obj*); -obj* l_IO_Fs_readFile___rarg___lambda__1(obj*, obj*, obj*); +obj* l_IO_Fs_readFile___rarg___lambda__1(obj*, obj*, obj*, obj*, obj*); obj* l_IO_Fs_readFile___rarg(obj*, obj*, obj*, uint8); -obj* l_IO_Fs_readFile___rarg___lambda__1___boxed(obj*, obj*, obj*); obj* l_IO_Fs_handle_mk___boxed(obj*, obj*); obj* l_IO_mkRef___boxed(obj*, obj*); obj* l_EIO_Inhabited___boxed(obj*, obj*); @@ -1129,33 +1128,19 @@ lean::dec(x_1); return x_2; } } -obj* l_IO_Fs_readFile___rarg___lambda__1(obj* x_0, obj* x_1, obj* x_2) { -_start: -{ -obj* x_3; obj* x_6; obj* x_9; -x_3 = lean::cnstr_get(x_0, 0); -lean::inc(x_3); -lean::dec(x_0); -x_6 = lean::cnstr_get(x_3, 1); -lean::inc(x_6); -lean::dec(x_3); -x_9 = lean::apply_2(x_6, lean::box(0), x_1); -return x_9; -} -} -obj* l_IO_Fs_readFile___rarg___lambda__2(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { +obj* l_IO_Fs_readFile___rarg___lambda__1(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { obj* x_5; obj* x_6; obj* x_7; x_5 = l_IO_Fs_handle_close___rarg(x_0, x_1); -x_6 = lean::alloc_closure(reinterpret_cast(l_IO_Fs_readFile___rarg___lambda__1___boxed), 3, 2); +x_6 = lean::alloc_closure(reinterpret_cast(l_getModify___rarg___lambda__1___boxed), 3, 2); lean::closure_set(x_6, 0, x_2); lean::closure_set(x_6, 1, x_4); x_7 = lean::apply_4(x_3, lean::box(0), lean::box(0), x_5, x_6); return x_7; } } -obj* l_IO_Fs_readFile___rarg___lambda__3(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { +obj* l_IO_Fs_readFile___rarg___lambda__2(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { obj* x_6; obj* x_8; obj* x_9; @@ -1163,7 +1148,7 @@ lean::inc(x_3); lean::inc(x_0); x_6 = l_IO_Fs_handle_readToEnd___rarg(x_0, x_3); lean::inc(x_2); -x_8 = lean::alloc_closure(reinterpret_cast(l_IO_Fs_readFile___rarg___lambda__2), 5, 4); +x_8 = lean::alloc_closure(reinterpret_cast(l_IO_Fs_readFile___rarg___lambda__1), 5, 4); lean::closure_set(x_8, 0, x_0); lean::closure_set(x_8, 1, x_3); lean::closure_set(x_8, 2, x_1); @@ -1182,7 +1167,7 @@ x_6 = 0; lean::inc(x_1); x_8 = l_IO_Fs_handle_mk___rarg(x_1, x_2, x_6, x_3); lean::inc(x_4); -x_10 = lean::alloc_closure(reinterpret_cast(l_IO_Fs_readFile___rarg___lambda__3), 4, 3); +x_10 = lean::alloc_closure(reinterpret_cast(l_IO_Fs_readFile___rarg___lambda__2), 4, 3); lean::closure_set(x_10, 0, x_1); lean::closure_set(x_10, 1, x_0); lean::closure_set(x_10, 2, x_4); @@ -1198,15 +1183,6 @@ x_1 = lean::alloc_closure(reinterpret_cast(l_IO_Fs_readFile___rarg___boxe return x_1; } } -obj* l_IO_Fs_readFile___rarg___lambda__1___boxed(obj* x_0, obj* x_1, obj* x_2) { -_start: -{ -obj* x_3; -x_3 = l_IO_Fs_readFile___rarg___lambda__1(x_0, x_1, x_2); -lean::dec(x_2); -return x_3; -} -} obj* l_IO_Fs_readFile___rarg___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { diff --git a/src/stage0/init/lean/compiler/default.cpp b/src/stage0/init/lean/compiler/default.cpp index af3b9de933..9188d98e3c 100644 --- a/src/stage0/init/lean/compiler/default.cpp +++ b/src/stage0/init/lean/compiler/default.cpp @@ -1,6 +1,6 @@ // Lean compiler output // Module: init.lean.compiler.default -// Imports: init.lean.compiler.constfolding init.lean.compiler.ir init.lean.compiler.pushproj init.lean.compiler.elimdead init.lean.compiler.simpcase +// Imports: init.lean.compiler.constfolding init.lean.compiler.ir init.lean.compiler.pushproj init.lean.compiler.elimdead init.lean.compiler.simpcase init.lean.compiler.resetreuse #include "runtime/object.h" #include "runtime/apply.h" typedef lean::object obj; typedef lean::usize usize; @@ -15,6 +15,7 @@ typedef lean::uint32 uint32; typedef lean::uint64 uint64; #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif obj* l_Lean_IR_test___closed__2; +obj* l_Lean_IR_test___closed__5; namespace lean { namespace ir { obj* test_core(obj*, obj*); @@ -35,6 +36,7 @@ obj* l_Lean_IR_test___closed__1; obj* l_Lean_IR_Decl_elimDead___main(obj*); obj* l_Lean_IR_test___closed__4; obj* l_IO_println___at_HasRepr_HasEval___spec__1(obj*, obj*); +obj* l_Lean_IR_Decl_insertResetReuse___main(obj*); obj* l_IO_print___at_Lean_IR_test___spec__2(obj*, obj*); obj* l_Lean_IR_Decl_simpCase___main(obj*); extern obj* l_IO_println___rarg___closed__1; @@ -122,7 +124,7 @@ obj* _init_l_Lean_IR_test___closed__3() { _start: { obj* x_0; -x_0 = lean::mk_string("=== After elim dead locals ==="); +x_0 = lean::mk_string("=== After insert reset reuse ==="); return x_0; } } @@ -130,6 +132,14 @@ obj* _init_l_Lean_IR_test___closed__4() { _start: { obj* x_0; +x_0 = lean::mk_string("=== After elim dead locals ==="); +return x_0; +} +} +obj* _init_l_Lean_IR_test___closed__5() { +_start: +{ +obj* x_0; x_0 = lean::mk_string("=== After simplify case ==="); return x_0; } @@ -233,7 +243,7 @@ if (lean::is_scalar(x_33)) { } lean::cnstr_set(x_34, 0, x_7); lean::cnstr_set(x_34, 1, x_31); -x_35 = l_Lean_IR_Decl_elimDead___main(x_22); +x_35 = l_Lean_IR_Decl_insertResetReuse___main(x_22); x_36 = l_Lean_IR_test___closed__3; x_37 = l_IO_println___at_HasRepr_HasEval___spec__1(x_36, x_34); if (lean::obj_tag(x_37) == 0) @@ -276,12 +286,12 @@ if (lean::is_scalar(x_46)) { } lean::cnstr_set(x_47, 0, x_7); lean::cnstr_set(x_47, 1, x_44); -x_48 = l_Lean_IR_Decl_simpCase___main(x_35); +x_48 = l_Lean_IR_Decl_elimDead___main(x_35); x_49 = l_Lean_IR_test___closed__4; x_50 = l_IO_println___at_HasRepr_HasEval___spec__1(x_49, x_47); if (lean::obj_tag(x_50) == 0) { -obj* x_51; obj* x_53; obj* x_54; obj* x_55; +obj* x_51; obj* x_53; obj* x_54; obj* x_56; x_51 = lean::cnstr_get(x_50, 1); if (lean::is_exclusive(x_50)) { lean::cnstr_release(x_50, 0); @@ -298,175 +308,308 @@ if (lean::is_scalar(x_53)) { } lean::cnstr_set(x_54, 0, x_7); lean::cnstr_set(x_54, 1, x_51); -x_55 = l_IO_println___at_Lean_IR_test___spec__1(x_48, x_54); -return x_55; -} -else +lean::inc(x_48); +x_56 = l_IO_println___at_Lean_IR_test___spec__1(x_48, x_54); +if (lean::obj_tag(x_56) == 0) { -obj* x_57; obj* x_59; obj* x_61; obj* x_62; -lean::dec(x_48); -x_57 = lean::cnstr_get(x_50, 0); -x_59 = lean::cnstr_get(x_50, 1); -if (lean::is_exclusive(x_50)) { - x_61 = x_50; +obj* x_57; obj* x_59; obj* x_60; obj* x_61; obj* x_62; obj* x_63; +x_57 = lean::cnstr_get(x_56, 1); +if (lean::is_exclusive(x_56)) { + lean::cnstr_release(x_56, 0); + x_59 = x_56; } else { lean::inc(x_57); - lean::inc(x_59); - lean::dec(x_50); - x_61 = lean::box(0); + lean::dec(x_56); + x_59 = lean::box(0); } -if (lean::is_scalar(x_61)) { - x_62 = lean::alloc_cnstr(1, 2, 0); +if (lean::is_scalar(x_59)) { + x_60 = lean::alloc_cnstr(0, 2, 0); } else { - x_62 = x_61; + x_60 = x_59; } -lean::cnstr_set(x_62, 0, x_57); -lean::cnstr_set(x_62, 1, x_59); -return x_62; -} -} -else +lean::cnstr_set(x_60, 0, x_7); +lean::cnstr_set(x_60, 1, x_57); +x_61 = l_Lean_IR_Decl_simpCase___main(x_48); +x_62 = l_Lean_IR_test___closed__5; +x_63 = l_IO_println___at_HasRepr_HasEval___spec__1(x_62, x_60); +if (lean::obj_tag(x_63) == 0) { -obj* x_64; obj* x_66; obj* x_68; obj* x_69; -lean::dec(x_35); -x_64 = lean::cnstr_get(x_43, 0); -x_66 = lean::cnstr_get(x_43, 1); -if (lean::is_exclusive(x_43)) { - x_68 = x_43; +obj* x_64; obj* x_66; obj* x_67; obj* x_68; +x_64 = lean::cnstr_get(x_63, 1); +if (lean::is_exclusive(x_63)) { + lean::cnstr_release(x_63, 0); + x_66 = x_63; } else { lean::inc(x_64); - lean::inc(x_66); - lean::dec(x_43); - x_68 = lean::box(0); + lean::dec(x_63); + x_66 = lean::box(0); } -if (lean::is_scalar(x_68)) { - x_69 = lean::alloc_cnstr(1, 2, 0); +if (lean::is_scalar(x_66)) { + x_67 = lean::alloc_cnstr(0, 2, 0); } else { - x_69 = x_68; + x_67 = x_66; } -lean::cnstr_set(x_69, 0, x_64); -lean::cnstr_set(x_69, 1, x_66); -return x_69; +lean::cnstr_set(x_67, 0, x_7); +lean::cnstr_set(x_67, 1, x_64); +x_68 = l_IO_println___at_Lean_IR_test___spec__1(x_61, x_67); +if (lean::obj_tag(x_68) == 0) +{ +obj* x_69; obj* x_71; obj* x_72; +x_69 = lean::cnstr_get(x_68, 1); +if (lean::is_exclusive(x_68)) { + lean::cnstr_release(x_68, 0); + x_71 = x_68; +} else { + lean::inc(x_69); + lean::dec(x_68); + x_71 = lean::box(0); } +if (lean::is_scalar(x_71)) { + x_72 = lean::alloc_cnstr(0, 2, 0); +} else { + x_72 = x_71; +} +lean::cnstr_set(x_72, 0, x_7); +lean::cnstr_set(x_72, 1, x_69); +return x_72; } else { -obj* x_71; obj* x_73; obj* x_75; obj* x_76; -lean::dec(x_35); -x_71 = lean::cnstr_get(x_37, 0); -x_73 = lean::cnstr_get(x_37, 1); -if (lean::is_exclusive(x_37)) { - x_75 = x_37; +obj* x_73; obj* x_75; obj* x_77; obj* x_78; +x_73 = lean::cnstr_get(x_68, 0); +x_75 = lean::cnstr_get(x_68, 1); +if (lean::is_exclusive(x_68)) { + x_77 = x_68; } else { - lean::inc(x_71); lean::inc(x_73); - lean::dec(x_37); - x_75 = lean::box(0); + lean::inc(x_75); + lean::dec(x_68); + x_77 = lean::box(0); } -if (lean::is_scalar(x_75)) { - x_76 = lean::alloc_cnstr(1, 2, 0); +if (lean::is_scalar(x_77)) { + x_78 = lean::alloc_cnstr(1, 2, 0); } else { - x_76 = x_75; + x_78 = x_77; } -lean::cnstr_set(x_76, 0, x_71); -lean::cnstr_set(x_76, 1, x_73); -return x_76; +lean::cnstr_set(x_78, 0, x_73); +lean::cnstr_set(x_78, 1, x_75); +return x_78; } } else { -obj* x_78; obj* x_80; obj* x_82; obj* x_83; -lean::dec(x_22); -x_78 = lean::cnstr_get(x_30, 0); -x_80 = lean::cnstr_get(x_30, 1); -if (lean::is_exclusive(x_30)) { - x_82 = x_30; +obj* x_80; obj* x_82; obj* x_84; obj* x_85; +lean::dec(x_61); +x_80 = lean::cnstr_get(x_63, 0); +x_82 = lean::cnstr_get(x_63, 1); +if (lean::is_exclusive(x_63)) { + x_84 = x_63; } else { - lean::inc(x_78); lean::inc(x_80); - lean::dec(x_30); - x_82 = lean::box(0); + lean::inc(x_82); + lean::dec(x_63); + x_84 = lean::box(0); } -if (lean::is_scalar(x_82)) { - x_83 = lean::alloc_cnstr(1, 2, 0); +if (lean::is_scalar(x_84)) { + x_85 = lean::alloc_cnstr(1, 2, 0); } else { - x_83 = x_82; + x_85 = x_84; } -lean::cnstr_set(x_83, 0, x_78); -lean::cnstr_set(x_83, 1, x_80); -return x_83; +lean::cnstr_set(x_85, 0, x_80); +lean::cnstr_set(x_85, 1, x_82); +return x_85; } } else { -obj* x_85; obj* x_87; obj* x_89; obj* x_90; -lean::dec(x_22); -x_85 = lean::cnstr_get(x_24, 0); -x_87 = lean::cnstr_get(x_24, 1); -if (lean::is_exclusive(x_24)) { - x_89 = x_24; +obj* x_87; obj* x_89; obj* x_91; obj* x_92; +lean::dec(x_48); +x_87 = lean::cnstr_get(x_56, 0); +x_89 = lean::cnstr_get(x_56, 1); +if (lean::is_exclusive(x_56)) { + x_91 = x_56; } else { - lean::inc(x_85); lean::inc(x_87); - lean::dec(x_24); - x_89 = lean::box(0); + lean::inc(x_89); + lean::dec(x_56); + x_91 = lean::box(0); } -if (lean::is_scalar(x_89)) { - x_90 = lean::alloc_cnstr(1, 2, 0); +if (lean::is_scalar(x_91)) { + x_92 = lean::alloc_cnstr(1, 2, 0); } else { - x_90 = x_89; + x_92 = x_91; } -lean::cnstr_set(x_90, 0, x_85); -lean::cnstr_set(x_90, 1, x_87); -return x_90; +lean::cnstr_set(x_92, 0, x_87); +lean::cnstr_set(x_92, 1, x_89); +return x_92; } } else { -obj* x_92; obj* x_94; obj* x_96; obj* x_97; -lean::dec(x_0); -x_92 = lean::cnstr_get(x_16, 0); -x_94 = lean::cnstr_get(x_16, 1); -if (lean::is_exclusive(x_16)) { - x_96 = x_16; +obj* x_94; obj* x_96; obj* x_98; obj* x_99; +lean::dec(x_48); +x_94 = lean::cnstr_get(x_50, 0); +x_96 = lean::cnstr_get(x_50, 1); +if (lean::is_exclusive(x_50)) { + x_98 = x_50; } else { - lean::inc(x_92); lean::inc(x_94); - lean::dec(x_16); - x_96 = lean::box(0); + lean::inc(x_96); + lean::dec(x_50); + x_98 = lean::box(0); } -if (lean::is_scalar(x_96)) { - x_97 = lean::alloc_cnstr(1, 2, 0); +if (lean::is_scalar(x_98)) { + x_99 = lean::alloc_cnstr(1, 2, 0); } else { - x_97 = x_96; + x_99 = x_98; } -lean::cnstr_set(x_97, 0, x_92); -lean::cnstr_set(x_97, 1, x_94); -return x_97; +lean::cnstr_set(x_99, 0, x_94); +lean::cnstr_set(x_99, 1, x_96); +return x_99; } } else { -obj* x_99; obj* x_101; obj* x_103; obj* x_104; -lean::dec(x_0); -x_99 = lean::cnstr_get(x_3, 0); -x_101 = lean::cnstr_get(x_3, 1); -if (lean::is_exclusive(x_3)) { - x_103 = x_3; +obj* x_101; obj* x_103; obj* x_105; obj* x_106; +lean::dec(x_35); +x_101 = lean::cnstr_get(x_43, 0); +x_103 = lean::cnstr_get(x_43, 1); +if (lean::is_exclusive(x_43)) { + x_105 = x_43; } else { - lean::inc(x_99); lean::inc(x_101); - lean::dec(x_3); - x_103 = lean::box(0); + lean::inc(x_103); + lean::dec(x_43); + x_105 = lean::box(0); } -if (lean::is_scalar(x_103)) { - x_104 = lean::alloc_cnstr(1, 2, 0); +if (lean::is_scalar(x_105)) { + x_106 = lean::alloc_cnstr(1, 2, 0); } else { - x_104 = x_103; + x_106 = x_105; } -lean::cnstr_set(x_104, 0, x_99); -lean::cnstr_set(x_104, 1, x_101); -return x_104; +lean::cnstr_set(x_106, 0, x_101); +lean::cnstr_set(x_106, 1, x_103); +return x_106; +} +} +else +{ +obj* x_108; obj* x_110; obj* x_112; obj* x_113; +lean::dec(x_35); +x_108 = lean::cnstr_get(x_37, 0); +x_110 = lean::cnstr_get(x_37, 1); +if (lean::is_exclusive(x_37)) { + x_112 = x_37; +} else { + lean::inc(x_108); + lean::inc(x_110); + lean::dec(x_37); + x_112 = lean::box(0); +} +if (lean::is_scalar(x_112)) { + x_113 = lean::alloc_cnstr(1, 2, 0); +} else { + x_113 = x_112; +} +lean::cnstr_set(x_113, 0, x_108); +lean::cnstr_set(x_113, 1, x_110); +return x_113; +} +} +else +{ +obj* x_115; obj* x_117; obj* x_119; obj* x_120; +lean::dec(x_22); +x_115 = lean::cnstr_get(x_30, 0); +x_117 = lean::cnstr_get(x_30, 1); +if (lean::is_exclusive(x_30)) { + x_119 = x_30; +} else { + lean::inc(x_115); + lean::inc(x_117); + lean::dec(x_30); + x_119 = lean::box(0); +} +if (lean::is_scalar(x_119)) { + x_120 = lean::alloc_cnstr(1, 2, 0); +} else { + x_120 = x_119; +} +lean::cnstr_set(x_120, 0, x_115); +lean::cnstr_set(x_120, 1, x_117); +return x_120; +} +} +else +{ +obj* x_122; obj* x_124; obj* x_126; obj* x_127; +lean::dec(x_22); +x_122 = lean::cnstr_get(x_24, 0); +x_124 = lean::cnstr_get(x_24, 1); +if (lean::is_exclusive(x_24)) { + x_126 = x_24; +} else { + lean::inc(x_122); + lean::inc(x_124); + lean::dec(x_24); + x_126 = lean::box(0); +} +if (lean::is_scalar(x_126)) { + x_127 = lean::alloc_cnstr(1, 2, 0); +} else { + x_127 = x_126; +} +lean::cnstr_set(x_127, 0, x_122); +lean::cnstr_set(x_127, 1, x_124); +return x_127; +} +} +else +{ +obj* x_129; obj* x_131; obj* x_133; obj* x_134; +lean::dec(x_0); +x_129 = lean::cnstr_get(x_16, 0); +x_131 = lean::cnstr_get(x_16, 1); +if (lean::is_exclusive(x_16)) { + x_133 = x_16; +} else { + lean::inc(x_129); + lean::inc(x_131); + lean::dec(x_16); + x_133 = lean::box(0); +} +if (lean::is_scalar(x_133)) { + x_134 = lean::alloc_cnstr(1, 2, 0); +} else { + x_134 = x_133; +} +lean::cnstr_set(x_134, 0, x_129); +lean::cnstr_set(x_134, 1, x_131); +return x_134; +} +} +else +{ +obj* x_136; obj* x_138; obj* x_140; obj* x_141; +lean::dec(x_0); +x_136 = lean::cnstr_get(x_3, 0); +x_138 = lean::cnstr_get(x_3, 1); +if (lean::is_exclusive(x_3)) { + x_140 = x_3; +} else { + lean::inc(x_136); + lean::inc(x_138); + lean::dec(x_3); + x_140 = lean::box(0); +} +if (lean::is_scalar(x_140)) { + x_141 = lean::alloc_cnstr(1, 2, 0); +} else { + x_141 = x_140; +} +lean::cnstr_set(x_141, 0, x_136); +lean::cnstr_set(x_141, 1, x_138); +return x_141; } } } @@ -476,6 +619,7 @@ obj* initialize_init_lean_compiler_ir(obj*); obj* initialize_init_lean_compiler_pushproj(obj*); obj* initialize_init_lean_compiler_elimdead(obj*); obj* initialize_init_lean_compiler_simpcase(obj*); +obj* initialize_init_lean_compiler_resetreuse(obj*); static bool _G_initialized = false; obj* initialize_init_lean_compiler_default(obj* w) { if (_G_initialized) return w; @@ -490,6 +634,8 @@ if (io_result_is_error(w)) return w; w = initialize_init_lean_compiler_elimdead(w); if (io_result_is_error(w)) return w; w = initialize_init_lean_compiler_simpcase(w); +if (io_result_is_error(w)) return w; +w = initialize_init_lean_compiler_resetreuse(w); if (io_result_is_error(w)) return w; l_Lean_IR_test___closed__1 = _init_l_Lean_IR_test___closed__1(); lean::mark_persistent(l_Lean_IR_test___closed__1); @@ -499,5 +645,7 @@ lean::mark_persistent(l_Lean_IR_test___closed__2); lean::mark_persistent(l_Lean_IR_test___closed__3); l_Lean_IR_test___closed__4 = _init_l_Lean_IR_test___closed__4(); lean::mark_persistent(l_Lean_IR_test___closed__4); + l_Lean_IR_test___closed__5 = _init_l_Lean_IR_test___closed__5(); +lean::mark_persistent(l_Lean_IR_test___closed__5); return w; } diff --git a/src/stage0/init/lean/compiler/elimdead.cpp b/src/stage0/init/lean/compiler/elimdead.cpp index 9467876be2..930c21e11b 100644 --- a/src/stage0/init/lean/compiler/elimdead.cpp +++ b/src/stage0/init/lean/compiler/elimdead.cpp @@ -1,6 +1,6 @@ // Lean compiler output // Module: init.lean.compiler.elimdead -// Imports: init.default init.lean.compiler.ir +// Imports: init.lean.compiler.ir #include "runtime/object.h" #include "runtime/apply.h" typedef lean::object obj; typedef lean::usize usize; @@ -63,45 +63,52 @@ uint8 x_3; x_3 = l_Array_isEmpty___rarg(x_0); if (x_3 == 0) { -obj* x_4; obj* x_5; +obj* x_4; obj* x_5; obj* x_6; obj* x_8; x_4 = l_Array_back___at_Lean_IR_reshapeWithoutDeadAux___main___spec__1(x_0); x_5 = lean::array_pop(x_0); switch (lean::obj_tag(x_4)) { case 0: { -obj* x_6; obj* x_9; -x_6 = lean::cnstr_get(x_4, 0); -lean::inc(x_6); -lean::inc(x_2); -x_9 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_2__collectIndex___spec__1(x_2, x_6); -lean::dec(x_6); -if (lean::obj_tag(x_9) == 0) -{ -lean::dec(x_4); -x_0 = x_5; -goto _start; -} -else -{ -obj* x_15; obj* x_16; -lean::dec(x_9); -lean::inc(x_4); -x_15 = l_Lean_IR_FnBody_collectFreeVars(x_4, x_2); -x_16 = l_Lean_IR_FnBody_setBody___main(x_4, x_1); -x_0 = x_5; -x_1 = x_16; -x_2 = x_15; -goto _start; -} +obj* x_10; +x_10 = lean::cnstr_get(x_4, 0); +lean::inc(x_10); +x_8 = x_10; +goto lbl_9; } case 1: { -obj* x_18; obj* x_21; -x_18 = lean::cnstr_get(x_4, 0); -lean::inc(x_18); +obj* x_12; +x_12 = lean::cnstr_get(x_4, 0); +lean::inc(x_12); +x_8 = x_12; +goto lbl_9; +} +default: +{ +obj* x_14; +x_14 = lean::box(0); +x_6 = x_14; +goto lbl_7; +} +} +lbl_7: +{ +obj* x_17; obj* x_18; +lean::dec(x_6); +lean::inc(x_4); +x_17 = l_Lean_IR_FnBody_collectFreeVars(x_4, x_2); +x_18 = l_Lean_IR_FnBody_setBody___main(x_4, x_1); +x_0 = x_5; +x_1 = x_18; +x_2 = x_17; +goto _start; +} +lbl_9: +{ +obj* x_21; lean::inc(x_2); -x_21 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_2__collectIndex___spec__1(x_2, x_18); -lean::dec(x_18); +x_21 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_2__collectIndex___spec__1(x_2, x_8); +lean::dec(x_8); if (lean::obj_tag(x_21) == 0) { lean::dec(x_4); @@ -110,37 +117,11 @@ goto _start; } else { -obj* x_27; obj* x_28; +obj* x_26; lean::dec(x_21); -lean::inc(x_4); -x_27 = l_Lean_IR_FnBody_collectFreeVars(x_4, x_2); -x_28 = l_Lean_IR_FnBody_setBody___main(x_4, x_1); -x_0 = x_5; -x_1 = x_28; -x_2 = x_27; -goto _start; -} -} -case 12: -{ -obj* x_30; obj* x_31; -x_30 = l_Lean_IR_FnBody_collectFreeVars(x_4, x_2); -x_31 = l_Lean_IR_FnBody_setBody___main(x_4, x_1); -x_0 = x_5; -x_1 = x_31; -x_2 = x_30; -goto _start; -} -default: -{ -obj* x_34; obj* x_35; -lean::inc(x_4); -x_34 = l_Lean_IR_FnBody_collectFreeVars(x_4, x_2); -x_35 = l_Lean_IR_FnBody_setBody___main(x_4, x_1); -x_0 = x_5; -x_1 = x_35; -x_2 = x_34; -goto _start; +x_26 = lean::box(0); +x_6 = x_26; +goto lbl_7; } } } @@ -436,15 +417,12 @@ x_1 = l_Lean_IR_Decl_elimDead___main(x_0); return x_1; } } -obj* initialize_init_default(obj*); obj* initialize_init_lean_compiler_ir(obj*); static bool _G_initialized = false; obj* initialize_init_lean_compiler_elimdead(obj* w) { if (_G_initialized) return w; _G_initialized = true; if (io_result_is_error(w)) return w; -w = initialize_init_default(w); -if (io_result_is_error(w)) return w; w = initialize_init_lean_compiler_ir(w); if (io_result_is_error(w)) return w; l_Array_hmmapAux___main___at_Lean_IR_FnBody_elimDead___main___spec__2___closed__1 = _init_l_Array_hmmapAux___main___at_Lean_IR_FnBody_elimDead___main___spec__2___closed__1(); diff --git a/src/stage0/init/lean/compiler/ir.cpp b/src/stage0/init/lean/compiler/ir.cpp index 711d7b7e02..2b36beecf6 100644 --- a/src/stage0/init/lean/compiler/ir.cpp +++ b/src/stage0/init/lean/compiler/ir.cpp @@ -15,6 +15,7 @@ typedef lean::uint32 uint32; typedef lean::uint64 uint64; #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif obj* l_Lean_IR_formatDecl(obj*, obj*); +uint8 l_Lean_IR_Arg_hasFreeVar(obj*, obj*); obj* l_RBNode_setBlack___main___rarg(obj*); obj* l_Lean_IR_FnBody_beq___boxed(obj*, obj*); obj* l_Lean_IR_mkJDecl___boxed(obj*, obj*, obj*, obj*, obj*); @@ -23,6 +24,7 @@ obj* l___private_init_lean_compiler_ir_15__formatArg___main___closed__1; obj* l_Lean_IR_formatAlt(obj*, obj*, obj*); obj* l___private_init_lean_compiler_ir_11__collectArray___at___private_init_lean_compiler_ir_12__collectArgs___spec__1___boxed(obj*, obj*, obj*); obj* l_Lean_IR_FnBody_setBody(obj*, obj*); +obj* l_Lean_IR_AltCore_mmodifyBody___boxed(obj*); obj* l_Lean_IR_formatFnBody___main___closed__1; obj* l_Array_miterateAux___main___at_Lean_IR_FreeVariables_insertParams___spec__1___boxed(obj*, obj*, obj*, obj*); namespace lean { @@ -52,6 +54,8 @@ obj* l___private_init_lean_compiler_ir_20__formatIRType___main(uint8); uint8 l_Lean_IR_IRType_beq(uint8, uint8); obj* l___private_init_lean_compiler_ir_28__collectArray(obj*); uint8 l_Lean_IR_Arg_alphaEqv(obj*, obj*, obj*); +obj* l_Lean_IR_AltCore_mmodifyBody___main___rarg___closed__1; +obj* l_Lean_IR_AltCore_mmodifyBody___main(obj*); extern obj* l_Lean_Format_paren___closed__2; namespace lean { namespace ir { @@ -62,13 +66,17 @@ namespace ir { obj* mk_var_arg_core(obj*); }} obj* l_Lean_IR_JoinPointId_HasToString___closed__1; +obj* l_Lean_IR_mmodifyJPs(obj*); obj* l_Lean_IR_formatDecl___main(obj*, obj*); +uint8 l_Lean_IR_HasIndex_visitParams(obj*, obj*); obj* l_Lean_IR_FnBody_isTerminal___boxed(obj*); uint8 l_Lean_IR_IRType_beq___main(uint8, uint8); +obj* l_Lean_IR_AltCore_mmodifyBody(obj*); obj* l___private_init_lean_compiler_ir_20__formatIRType___main___closed__5; obj* l___private_init_lean_compiler_ir_20__formatIRType___main___closed__2; obj* l___private_init_lean_compiler_ir_27__collectArg(obj*, obj*); obj* l_Array_miterateAux___main___at_Lean_IR_formatFnBody___main___spec__3(obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_IR_Arg_hasFreeVar___boxed(obj*, obj*); obj* l___private_init_lean_compiler_ir_20__formatIRType___main___closed__4; obj* l_Lean_IR_addParamsRename___boxed(obj*, obj*, obj*); namespace lean { @@ -79,6 +87,7 @@ obj* l_Lean_IR_AltCore_modifyBody___main(obj*, obj*); obj* l_RBNode_ins___main___at___private_init_lean_compiler_ir_2__collectIndex___spec__2(obj*, obj*, obj*); obj* l___private_init_lean_compiler_ir_23__collect(obj*, obj*); obj* l___private_init_lean_compiler_ir_20__formatIRType___main___closed__7; +uint8 l_Lean_IR_HasIndex_visitExpr___main(obj*, obj*); obj* l_Lean_IR_addParamRename(obj*, obj*, obj*); obj* l___private_init_lean_compiler_ir_17__formatLitVal___main(obj*); obj* l_Array_miterateAux___main___at_Lean_IR_FreeVariables_insertParams___spec__1(obj*, obj*, obj*, obj*); @@ -90,6 +99,7 @@ obj* l_Lean_IR_modifyJPs(obj*, obj*); obj* l___private_init_lean_compiler_ir_28__collectArray___rarg(obj*, obj*, obj*); uint8 l_Lean_IR_LitVal_beq___main(obj*, obj*); obj* l_Lean_IR_AltCore_body___main___boxed(obj*); +obj* l_Lean_IR_mmodifyJPs___boxed(obj*); obj* l_Lean_IR_mkParam___boxed(obj*, obj*, obj*); obj* l_Lean_IR_formatFnBody___main___closed__6; obj* l_Lean_IR_CtorInfo_HasBeq; @@ -98,6 +108,7 @@ obj* l___private_init_lean_compiler_ir_28__collectArray___at___private_init_lean obj* l___private_init_lean_compiler_ir_20__formatIRType___main___closed__1; obj* l___private_init_lean_compiler_ir_20__formatIRType___main___closed__3; obj* l___private_init_lean_compiler_ir_20__formatIRType___main___closed__6; +uint8 l_Array_anyAux___main___at_Lean_IR_HasIndex_visitParams___spec__1(obj*, obj*, obj*); obj* l___private_init_lean_compiler_ir_32__collectExpr___main(obj*, obj*); uint8 l_Lean_IR_VarId_HasBeq(obj*, obj*); obj* l_Lean_IR_FnBody_body(obj*); @@ -105,6 +116,7 @@ obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_12__collect obj* l_Array_miterate_u_2082Aux___main___at_Lean_IR_addParamsRename___spec__1___boxed(obj*, obj*, obj*, obj*, obj*); obj* l___private_init_lean_compiler_ir_28__collectArray___boxed(obj*); obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_11__collectArray___spec__1___rarg(obj*, obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_IR_HasIndex_visitArg___main___boxed(obj*, obj*); obj* l___private_init_lean_compiler_ir_31__collectParams___boxed(obj*, obj*); obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_14__collectAlts___spec__2___boxed(obj*, obj*, obj*, obj*, obj*, obj*); obj* l_Lean_IR_FnBody_alphaEqv___boxed(obj*, obj*, obj*); @@ -123,6 +135,7 @@ obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_28__collect obj* l_Lean_Name_toStringWithSep___main(obj*, obj*); obj* l_Lean_IR_formatFnBody___main___closed__17; obj* l_Lean_IR_JoinPointId_HasBeq___boxed(obj*, obj*); +obj* l_Lean_IR_FnBody_nil; uint8 l_Lean_IR_FnBody_alphaEqv(obj*, obj*, obj*); extern obj* l_Lean_Format_sbracket___closed__1; namespace lean { @@ -134,6 +147,7 @@ namespace lean { namespace ir { obj* mk_proj_expr_core(obj*, obj*); }} +obj* l_Array_anyAux___main___at_Lean_IR_HasIndex_visitParams___spec__1___boxed(obj*, obj*, obj*); obj* l_Lean_IR_formatAlt___main___closed__1; obj* l___private_init_lean_compiler_ir_32__collectExpr(obj*, obj*); uint8 l_Lean_IR_CtorInfo_beq(obj*, obj*); @@ -144,6 +158,7 @@ obj* l___private_init_lean_compiler_ir_11__collectArray___at___private_init_lean obj* l___private_init_lean_compiler_ir_28__collectArray___at___private_init_lean_compiler_ir_29__collectArgs___spec__1(obj*, obj*); obj* l___private_init_lean_compiler_ir_19__formatExpr(obj*); obj* l___private_init_lean_compiler_ir_24__collectVar___boxed(obj*, obj*); +obj* l_Array_hmmapAux___main___at_Lean_IR_mmodifyJPs___spec__1___rarg___lambda__1(obj*, obj*, obj*, obj*, obj*); obj* l_Lean_IR_formatFnBody___main___closed__13; obj* l___private_init_lean_compiler_ir_19__formatExpr___main___closed__4; obj* l_Lean_IR_declHasFormat; @@ -170,6 +185,7 @@ obj* mk_sproj_expr_core(obj*, obj*, obj*); }} obj* l___private_init_lean_compiler_ir_27__collectArg___boxed(obj*, obj*); uint8 l_Lean_IR_LitVal_beq(obj*, obj*); +obj* l_Array_hmmapAux___main___at_Lean_IR_mmodifyJPs___spec__1___rarg___lambda__1___boxed(obj*, obj*, obj*, obj*, obj*); obj* l_Lean_IR_mkSSet___boxed(obj*, obj*, obj*, obj*, obj*, obj*); obj* l___private_init_lean_compiler_ir_25__collectJP___boxed(obj*, obj*); obj* l___private_init_lean_compiler_ir_16__formatArray___at_Lean_IR_formatFnBody___main___spec__1___boxed(obj*); @@ -193,35 +209,43 @@ obj* l_Lean_IR_argHasFormat; uint8 l_Array_anyAux___main___at_Lean_IR_FnBody_isPure___main___spec__1(obj*, obj*); obj* l_Array_miterate_u_2082Aux___main___at_Lean_IR_addParamsRename___spec__1(obj*, obj*, obj*, obj*, obj*); obj* l___private_init_lean_compiler_ir_1__skip(obj*); +obj* l_Lean_IR_AltCore_mmodifyBody___main___boxed(obj*); +obj* l_Lean_IR_HasIndex_visitVar___boxed(obj*, obj*); obj* l___private_init_lean_compiler_ir_17__formatLitVal(obj*); obj* l___private_init_lean_compiler_ir_18__formatCtorInfo___main___closed__2; obj* l_Lean_IR_FnBody_freeVars(obj*); obj* l_Lean_IR_MaxVar_collectDecl___main(obj*, obj*); obj* l_Lean_IR_typeHasFormat; obj* l_Array_miterateAux___main___at_Lean_IR_formatFnBody___main___spec__2(obj*, obj*, obj*, obj*); +uint8 l_Array_anyAux___main___at_Lean_IR_HasIndex_visitArgs___spec__1(obj*, obj*, obj*); obj* l_Lean_IR_AltCore_body(obj*); obj* l_Lean_IR_MaxVar_collectFnBody___main___closed__1; obj* l___private_init_lean_compiler_ir_10__collectArg(obj*, obj*, obj*); obj* l___private_init_lean_compiler_ir_15__formatArg(obj*); +obj* l_Lean_IR_AltCore_mmodifyBody___rarg(obj*, obj*, obj*); uint8 l_Array_isEqv___at_Lean_IR_FnBody_alphaEqv___main___spec__1(obj*, obj*, obj*); obj* l_Lean_IR_flattenAux___main(obj*, obj*); obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_28__collectArray___spec__1___rarg(obj*, obj*, obj*, obj*, obj*); obj* l_Lean_IR_reshape(obj*, obj*); obj* l_Lean_IR_JoinPointId_Lean_HasFormat(obj*); +obj* l_Array_hmmapAux___main___at_Lean_IR_mmodifyJPs___spec__1___rarg___lambda__2(obj*, obj*, obj*, uint8, obj*, obj*); uint8 l_Array_isEqv___at_Lean_IR_args_alphaEqv___spec__1(obj*, obj*, obj*); namespace lean { namespace ir { obj* mk_case_core(obj*, obj*, obj*); }} +uint8 l_Lean_IR_Expr_hasFreeVar(obj*, obj*); namespace lean { obj* string_append(obj*, obj*); } obj* l_Lean_IR_addParamsRename(obj*, obj*, obj*); obj* l_Lean_IR_Expr_alphaEqv___boxed(obj*, obj*, obj*); +obj* l_Lean_IR_Expr_hasFreeVar___boxed(obj*, obj*); obj* l_RBNode_ins___main___at_Lean_IR_addVarRename___spec__1(obj*, obj*, obj*); obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_29__collectArgs___spec__2___boxed(obj*, obj*, obj*, obj*); obj* l_Lean_IR_formatFnBody___main___closed__8; obj* l_Lean_IR_MaxVar_collectDecl(obj*, obj*); +uint8 l_Lean_IR_HasIndex_visitArgs(obj*, obj*); obj* l_Lean_IR_fnBodyHasFormat; obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_16__formatArray___spec__1___rarg___boxed(obj*, obj*, obj*, obj*, obj*); extern obj* l_Lean_Format_paren___closed__1; @@ -240,6 +264,7 @@ obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_31__collect obj* l___private_init_lean_compiler_ir_19__formatExpr___main___closed__8; uint8 l_Lean_IR_Expr_alphaEqv(obj*, obj*, obj*); uint8 l_Lean_IR_FnBody_isTerminal___main(obj*); +obj* l_Array_hmmapAux___main___at_Lean_IR_mmodifyJPs___spec__1___rarg___lambda__2___boxed(obj*, obj*, obj*, obj*, obj*, obj*); obj* l_Lean_IR_formatFnBody___main___closed__9; obj* l___private_init_lean_compiler_ir_5__withIndex(obj*, obj*, obj*, obj*); obj* l_Lean_IR_LitVal_beq___boxed(obj*, obj*); @@ -289,6 +314,7 @@ obj* mk_uset_core(obj*, obj*, obj*, obj*); obj* l_Lean_IR_FnBody_body___boxed(obj*); extern obj* l_Lean_Format_flatten___main___closed__1; obj* l_Lean_IR_IRType_HasBeq; +obj* l_Array_anyAux___main___at_Lean_IR_HasIndex_visitFnBody___main___spec__1___boxed(obj*, obj*, obj*); obj* l_Lean_IR_altInh; obj* l_Lean_IR_FreeVariables_insertParams___boxed(obj*, obj*); obj* l_Lean_IR_FnBody_body___main___boxed(obj*); @@ -300,10 +326,12 @@ obj* l___private_init_lean_compiler_ir_13__collectExpr(obj*, obj*, obj*); obj* l_Array_miterateAux___main___at_Lean_IR_formatFnBody___main___spec__3___boxed(obj*, obj*, obj*, obj*, obj*); obj* l_Lean_IR_Expr_isPure___boxed(obj*); obj* l_Array_anyAux___main___at_Lean_IR_FnBody_isPure___main___spec__1___boxed(obj*, obj*); -obj* l_Lean_IR_formatFnBody___main___closed__19; +obj* l_Lean_IR_FnBody_split(obj*); +obj* l_Array_anyAux___main___at_Lean_IR_HasIndex_visitArgs___spec__1___boxed(obj*, obj*, obj*); namespace lean { uint8 string_dec_eq(obj*, obj*); } +obj* l_Array_hmmapAux___main___at_Lean_IR_mmodifyJPs___spec__1___boxed(obj*); namespace lean { namespace ir { obj* mk_irrelevant_arg_core; @@ -324,6 +352,7 @@ obj* mk_app_expr_core(obj*, obj*); obj* l_Lean_IR_Expr_isPure___main___boxed(obj*); obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_11__collectArray___spec__1___rarg___boxed(obj*, obj*, obj*, obj*, obj*, obj*); obj* l_Lean_IR_VarId_HasToString(obj*); +obj* l_Lean_IR_HasIndex_visitParams___boxed(obj*, obj*); namespace lean { namespace ir { obj* mk_unreachable_core; @@ -331,10 +360,18 @@ obj* mk_unreachable_core; obj* l___private_init_lean_compiler_ir_21__formatParam___main___closed__1; uint8 l_Lean_IR_FnBody_isTerminal(obj*); obj* l_Lean_IR_addVarRename(obj*, obj*, obj*); +obj* l_Lean_IR_FnBody_hasFreeVar___boxed(obj*, obj*); obj* l_Array_hmmapAux___main___at_Lean_IR_modifyJPs___spec__1(obj*, obj*, obj*); obj* l___private_init_lean_compiler_ir_19__formatExpr___main___closed__6; +obj* l_Array_hmmapAux___main___at_Lean_IR_mmodifyJPs___spec__1___rarg(obj*, obj*, obj*, obj*); +uint8 l_Lean_IR_HasIndex_visitFnBody___main(obj*, obj*); +obj* l_Lean_IR_HasIndex_visitJP___boxed(obj*, obj*); +uint8 l_Lean_IR_HasIndex_visitVar(obj*, obj*); +obj* l_Lean_IR_AltCore_mmodifyBody___main___rarg(obj*, obj*, obj*); +uint8 l_Lean_IR_FnBody_hasFreeVar(obj*, obj*); obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_33__collectAlts___spec__2(obj*, obj*, obj*, obj*, obj*); obj* l_Lean_IR_formatFnBody___main___closed__10; +obj* l_Lean_IR_HasIndex_visitExpr___boxed(obj*, obj*); uint8 l_Lean_IR_FnBody_isPure___main(obj*); obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_16__formatArray___spec__1___rarg(obj*, obj*, obj*, obj*, obj*); obj* l___private_init_lean_compiler_ir_18__formatCtorInfo___main(obj*); @@ -349,11 +386,13 @@ obj* l_Lean_IR_AltCore_body___main(obj*); obj* l_Lean_IR_formatDecl___main___closed__2; obj* l___private_init_lean_compiler_ir_8__withParams___boxed(obj*, obj*, obj*, obj*); obj* l_Lean_IR_VarId_lt___boxed(obj*, obj*); +uint8 l_Lean_IR_HasIndex_visitFnBody(obj*, obj*); obj* l_Lean_IR_mkDecl___boxed(obj*, obj*, obj*, obj*); obj* l_Lean_IR_formatFnBody___main___closed__16; obj* l_Lean_IR_FnBody_maxVar(obj*); uint8 l_Lean_IR_CtorInfo_beq___main(obj*, obj*); uint8 l_Lean_IR_FnBody_beq(obj*, obj*); +obj* l_Lean_IR_HasIndex_visitArgs___boxed(obj*, obj*); obj* l___private_init_lean_compiler_ir_14__collectAlts___boxed(obj*, obj*, obj*, obj*); uint8 l_Lean_IR_args_alphaEqv(obj*, obj*, obj*); obj* l_Lean_IR_CtorInfo_beq___main___boxed(obj*, obj*); @@ -367,6 +406,7 @@ namespace lean { namespace ir { obj* mk_decl_core(obj*, obj*, uint8, obj*); }} +uint8 l_Lean_IR_HasIndex_visitExpr(obj*, obj*); obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_29__collectArgs___spec__2(obj*, obj*, obj*, obj*); uint8 l_Lean_IR_JoinPointId_HasBeq(obj*, obj*); obj* l___private_init_lean_compiler_ir_25__collectJP(obj*, obj*); @@ -389,6 +429,7 @@ uint8 l_Array_isEqvAux___main___rarg(obj*, obj*, obj*, obj*, obj*); obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_31__collectParams___spec__2(obj*, obj*, obj*, obj*); obj* l___private_init_lean_compiler_ir_11__collectArray___rarg(obj*, obj*, obj*, obj*); obj* l___private_init_lean_compiler_ir_11__collectArray___at___private_init_lean_compiler_ir_12__collectArgs___spec__1(obj*, obj*, obj*); +obj* l_Lean_IR_HasIndex_visitFnBody___main___boxed(obj*, obj*); obj* l___private_init_lean_compiler_ir_11__collectArray___rarg___boxed(obj*, obj*, obj*, obj*); obj* l___private_init_lean_compiler_ir_27__collectArg___main(obj*, obj*); obj* l_Lean_IR_FnBody_isPure___main___boxed(obj*); @@ -402,18 +443,21 @@ obj* l_Lean_IR_MaxVar_collectFnBody___main(obj*, obj*); obj* l___private_init_lean_compiler_ir_21__formatParam___main(obj*); obj* l___private_init_lean_compiler_ir_19__formatExpr___main(obj*); obj* l___private_init_lean_compiler_ir_16__formatArray___rarg___boxed(obj*, obj*); +uint8 l_Array_anyAux___main___at_Lean_IR_HasIndex_visitFnBody___main___spec__1(obj*, obj*, obj*); obj* l_Lean_IR_push(obj*, obj*); namespace lean { namespace ir { obj* mk_papp_expr_core(obj*, obj*); }} obj* l___private_init_lean_compiler_ir_30__collectParam___boxed(obj*, obj*); +obj* l_Lean_IR_HasIndex_visitExpr___main___boxed(obj*, obj*); obj* l___private_init_lean_compiler_ir_11__collectArray___boxed(obj*); obj* l___private_init_lean_compiler_ir_11__collectArray(obj*); namespace lean { namespace ir { obj* mk_ctor_expr_core(obj*, obj*, obj*, obj*, obj*, obj*); }} +obj* l_Lean_IR_mmodifyJPs___rarg(obj*, obj*, obj*); namespace lean { namespace ir { obj* mk_vdecl_core(obj*, uint8, obj*, obj*); @@ -426,6 +470,7 @@ obj* l___private_init_lean_compiler_ir_27__collectArg___main___boxed(obj*, obj*) obj* l___private_init_lean_compiler_ir_16__formatArray___at___private_init_lean_compiler_ir_19__formatExpr___main___spec__1___boxed(obj*); obj* l___private_init_lean_compiler_ir_4__collectJP(obj*, obj*, obj*); obj* l___private_init_lean_compiler_ir_31__collectParams(obj*, obj*); +uint8 l_Lean_IR_HasIndex_visitJP(obj*, obj*); obj* l_String_quote(obj*); obj* l_Lean_IR_IRType_beq___boxed(obj*, obj*); obj* l___private_init_lean_compiler_ir_19__formatExpr___main___closed__7; @@ -440,15 +485,20 @@ obj* l___private_init_lean_compiler_ir_16__formatArray___rarg(obj*, obj*); obj* l_Lean_IR_Expr_alphaEqv___main___boxed(obj*, obj*, obj*); obj* l___private_init_lean_compiler_ir_20__formatIRType___main___boxed(obj*); obj* l___private_init_lean_compiler_ir_1__skip___rarg___boxed(obj*); +uint8 l_Lean_IR_HasIndex_visitArg(obj*, obj*); obj* l___private_init_lean_compiler_ir_28__collectArray___at___private_init_lean_compiler_ir_33__collectAlts___spec__1(obj*, obj*, obj*); +obj* l_Array_hmmapAux___main___at_Lean_IR_mmodifyJPs___spec__1(obj*); obj* l___private_init_lean_compiler_ir_15__formatArg___main(obj*); obj* l___private_init_lean_compiler_ir_16__formatArray___at_Lean_IR_formatFnBody___main___spec__1(obj*); obj* l_Lean_IR_formatFnBody___main___closed__7; +uint8 l_Lean_IR_HasIndex_visitArg___main(obj*, obj*); obj* l_Lean_IR_CtorInfo_beq___boxed(obj*, obj*); +obj* l_Lean_IR_HasIndex_visitArg___boxed(obj*, obj*); obj* l___private_init_lean_compiler_ir_28__collectArray___at___private_init_lean_compiler_ir_33__collectAlts___spec__1___boxed(obj*, obj*, obj*); obj* l___private_init_lean_compiler_ir_19__formatExpr___main___closed__10; obj* l_Lean_IR_formatFnBody___main___closed__4; obj* l_Lean_IR_reshapeAux(obj*, obj*, obj*); +obj* l_Lean_IR_FnBody_resetBody(obj*); obj* l_Array_isEqv___at_Lean_IR_FnBody_alphaEqv___main___spec__1___boxed(obj*, obj*, obj*); obj* l_Lean_IR_MData_empty; obj* l___private_init_lean_compiler_ir_11__collectArray___at___private_init_lean_compiler_ir_14__collectAlts___spec__1___boxed(obj*, obj*, obj*, obj*); @@ -460,6 +510,7 @@ obj* l_Lean_IR_FreeVariables_collectFnBody___main(obj*, obj*, obj*); obj* l___private_init_lean_compiler_ir_1__skip___rarg(obj*); obj* l_RBNode_find___main___at_Lean_IR_VarId_alphaEqv___spec__1(obj*, obj*); obj* l_Lean_IR_MaxVar_HasAndthen; +obj* l_Lean_IR_HasIndex_visitFnBody___boxed(obj*, obj*); obj* l_Lean_IR_formatFnBody___main(obj*, obj*); obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_14__collectAlts___spec__2(obj*, obj*, obj*, obj*, obj*, obj*); uint8 l_Lean_IR_VarId_HasBeq(obj* x_0, obj* x_1) { @@ -555,7 +606,7 @@ obj* _init_l_Lean_IR_JoinPointId_HasToString___closed__1() { _start: { obj* x_0; -x_0 = lean::mk_string("jp_"); +x_0 = lean::mk_string("block_"); return x_0; } } @@ -1157,6 +1208,14 @@ x_0 = lean::box(12); return x_0; } } +obj* _init_l_Lean_IR_FnBody_nil() { +_start: +{ +obj* x_0; +x_0 = lean::box(12); +return x_0; +} +} namespace lean { namespace ir { obj* mk_vdecl_core(obj* x_0, uint8 x_1, obj* x_2, obj* x_3) { @@ -1751,6 +1810,28 @@ x_2 = l_Lean_IR_FnBody_setBody___main(x_0, x_1); return x_2; } } +obj* l_Lean_IR_FnBody_resetBody(obj* x_0) { +_start: +{ +obj* x_1; obj* x_2; +x_1 = lean::box(12); +x_2 = l_Lean_IR_FnBody_setBody___main(x_0, x_1); +return x_2; +} +} +obj* l_Lean_IR_FnBody_split(obj* x_0) { +_start: +{ +obj* x_1; obj* x_2; obj* x_3; obj* x_4; +x_1 = l_Lean_IR_FnBody_body___main(x_0); +x_2 = lean::box(12); +x_3 = l_Lean_IR_FnBody_setBody___main(x_0, x_2); +x_4 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_4, 0, x_3); +lean::cnstr_set(x_4, 1, x_1); +return x_4; +} +} obj* l_Lean_IR_AltCore_body___main(obj* x_0) { _start: { @@ -1944,6 +2025,144 @@ return x_13; } } } +obj* _init_l_Lean_IR_AltCore_mmodifyBody___main___rarg___closed__1() { +_start: +{ +obj* x_0; +x_0 = lean::alloc_closure(reinterpret_cast(l_Lean_IR_Alt_default), 1, 0); +return x_0; +} +} +obj* l_Lean_IR_AltCore_mmodifyBody___main___rarg(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +if (lean::obj_tag(x_2) == 0) +{ +obj* x_3; obj* x_5; obj* x_8; obj* x_11; obj* x_14; obj* x_17; obj* x_18; obj* x_19; +x_3 = lean::cnstr_get(x_2, 0); +lean::inc(x_3); +x_5 = lean::cnstr_get(x_2, 1); +lean::inc(x_5); +lean::dec(x_2); +x_8 = lean::cnstr_get(x_0, 0); +lean::inc(x_8); +lean::dec(x_0); +x_11 = lean::cnstr_get(x_8, 0); +lean::inc(x_11); +lean::dec(x_8); +x_14 = lean::cnstr_get(x_11, 0); +lean::inc(x_14); +lean::dec(x_11); +x_17 = lean::alloc_closure(reinterpret_cast(l_Lean_IR_Alt_ctor), 2, 1); +lean::closure_set(x_17, 0, x_3); +x_18 = lean::apply_1(x_1, x_5); +x_19 = lean::apply_4(x_14, lean::box(0), lean::box(0), x_17, x_18); +return x_19; +} +else +{ +obj* x_20; obj* x_23; obj* x_26; obj* x_29; obj* x_32; obj* x_33; obj* x_34; +x_20 = lean::cnstr_get(x_2, 0); +lean::inc(x_20); +lean::dec(x_2); +x_23 = lean::cnstr_get(x_0, 0); +lean::inc(x_23); +lean::dec(x_0); +x_26 = lean::cnstr_get(x_23, 0); +lean::inc(x_26); +lean::dec(x_23); +x_29 = lean::cnstr_get(x_26, 0); +lean::inc(x_29); +lean::dec(x_26); +x_32 = lean::apply_1(x_1, x_20); +x_33 = l_Lean_IR_AltCore_mmodifyBody___main___rarg___closed__1; +x_34 = lean::apply_4(x_29, lean::box(0), lean::box(0), x_33, x_32); +return x_34; +} +} +} +obj* l_Lean_IR_AltCore_mmodifyBody___main(obj* x_0) { +_start: +{ +obj* x_1; +x_1 = lean::alloc_closure(reinterpret_cast(l_Lean_IR_AltCore_mmodifyBody___main___rarg), 3, 0); +return x_1; +} +} +obj* l_Lean_IR_AltCore_mmodifyBody___main___boxed(obj* x_0) { +_start: +{ +obj* x_1; +x_1 = l_Lean_IR_AltCore_mmodifyBody___main(x_0); +lean::dec(x_0); +return x_1; +} +} +obj* l_Lean_IR_AltCore_mmodifyBody___rarg(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +if (lean::obj_tag(x_2) == 0) +{ +obj* x_3; obj* x_5; obj* x_8; obj* x_11; obj* x_14; obj* x_17; obj* x_18; obj* x_19; +x_3 = lean::cnstr_get(x_2, 0); +lean::inc(x_3); +x_5 = lean::cnstr_get(x_2, 1); +lean::inc(x_5); +lean::dec(x_2); +x_8 = lean::cnstr_get(x_0, 0); +lean::inc(x_8); +lean::dec(x_0); +x_11 = lean::cnstr_get(x_8, 0); +lean::inc(x_11); +lean::dec(x_8); +x_14 = lean::cnstr_get(x_11, 0); +lean::inc(x_14); +lean::dec(x_11); +x_17 = lean::alloc_closure(reinterpret_cast(l_Lean_IR_Alt_ctor), 2, 1); +lean::closure_set(x_17, 0, x_3); +x_18 = lean::apply_1(x_1, x_5); +x_19 = lean::apply_4(x_14, lean::box(0), lean::box(0), x_17, x_18); +return x_19; +} +else +{ +obj* x_20; obj* x_23; obj* x_26; obj* x_29; obj* x_32; obj* x_33; obj* x_34; +x_20 = lean::cnstr_get(x_2, 0); +lean::inc(x_20); +lean::dec(x_2); +x_23 = lean::cnstr_get(x_0, 0); +lean::inc(x_23); +lean::dec(x_0); +x_26 = lean::cnstr_get(x_23, 0); +lean::inc(x_26); +lean::dec(x_23); +x_29 = lean::cnstr_get(x_26, 0); +lean::inc(x_29); +lean::dec(x_26); +x_32 = lean::apply_1(x_1, x_20); +x_33 = l_Lean_IR_AltCore_mmodifyBody___main___rarg___closed__1; +x_34 = lean::apply_4(x_29, lean::box(0), lean::box(0), x_33, x_32); +return x_34; +} +} +} +obj* l_Lean_IR_AltCore_mmodifyBody(obj* x_0) { +_start: +{ +obj* x_1; +x_1 = lean::alloc_closure(reinterpret_cast(l_Lean_IR_AltCore_mmodifyBody___rarg), 3, 0); +return x_1; +} +} +obj* l_Lean_IR_AltCore_mmodifyBody___boxed(obj* x_0) { +_start: +{ +obj* x_1; +x_1 = l_Lean_IR_AltCore_mmodifyBody(x_0); +lean::dec(x_0); +return x_1; +} +} uint8 l_Lean_IR_Alt_isDefault___main(obj* x_0) { _start: { @@ -2183,6 +2402,188 @@ x_3 = l_Array_hmmapAux___main___at_Lean_IR_modifyJPs___spec__1(x_1, x_2, x_0); return x_3; } } +obj* l_Array_hmmapAux___main___at_Lean_IR_mmodifyJPs___spec__1___rarg___lambda__1(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { +_start: +{ +obj* x_5; obj* x_6; obj* x_7; obj* x_8; +x_5 = lean::mk_nat_obj(1ul); +x_6 = lean::nat_add(x_0, x_5); +x_7 = lean::array_fset(x_1, x_0, x_4); +x_8 = l_Array_hmmapAux___main___at_Lean_IR_mmodifyJPs___spec__1___rarg(x_2, x_3, x_6, x_7); +return x_8; +} +} +obj* l_Array_hmmapAux___main___at_Lean_IR_mmodifyJPs___spec__1___rarg___lambda__2(obj* x_0, obj* x_1, obj* x_2, uint8 x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; obj* x_9; obj* x_12; obj* x_13; obj* x_14; +x_6 = lean::cnstr_get(x_0, 0); +lean::inc(x_6); +lean::dec(x_0); +x_9 = lean::cnstr_get(x_6, 1); +lean::inc(x_9); +lean::dec(x_6); +x_12 = lean::alloc_cnstr(1, 4, 1); +lean::cnstr_set(x_12, 0, x_1); +lean::cnstr_set(x_12, 1, x_2); +lean::cnstr_set(x_12, 2, x_5); +lean::cnstr_set(x_12, 3, x_4); +lean::cnstr_set_scalar(x_12, sizeof(void*)*4, x_3); +x_13 = x_12; +x_14 = lean::apply_2(x_9, lean::box(0), x_13); +return x_14; +} +} +obj* l_Array_hmmapAux___main___at_Lean_IR_mmodifyJPs___spec__1___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { +_start: +{ +obj* x_4; uint8 x_5; +x_4 = lean::array_get_size(x_3); +x_5 = lean::nat_dec_lt(x_2, x_4); +lean::dec(x_4); +if (x_5 == 0) +{ +obj* x_9; obj* x_12; obj* x_15; +lean::dec(x_1); +lean::dec(x_2); +x_9 = lean::cnstr_get(x_0, 0); +lean::inc(x_9); +lean::dec(x_0); +x_12 = lean::cnstr_get(x_9, 1); +lean::inc(x_12); +lean::dec(x_9); +x_15 = lean::apply_2(x_12, lean::box(0), x_3); +return x_15; +} +else +{ +obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_23; obj* x_24; +x_16 = lean::array_fget(x_3, x_2); +x_17 = lean::box(12); +x_18 = lean::array_fset(x_3, x_2, x_17); +x_19 = lean::cnstr_get(x_0, 1); +lean::inc(x_19); +lean::inc(x_1); +lean::inc(x_0); +x_23 = lean::alloc_closure(reinterpret_cast(l_Array_hmmapAux___main___at_Lean_IR_mmodifyJPs___spec__1___rarg___lambda__1___boxed), 5, 4); +lean::closure_set(x_23, 0, x_2); +lean::closure_set(x_23, 1, x_18); +lean::closure_set(x_23, 2, x_0); +lean::closure_set(x_23, 3, x_1); +switch (lean::obj_tag(x_16)) { +case 1: +{ +obj* x_26; obj* x_28; uint8 x_30; obj* x_31; obj* x_33; obj* x_36; obj* x_37; obj* x_38; obj* x_40; obj* x_41; +x_26 = lean::cnstr_get(x_16, 0); +lean::inc(x_26); +x_28 = lean::cnstr_get(x_16, 1); +lean::inc(x_28); +x_30 = lean::cnstr_get_scalar(x_16, sizeof(void*)*4); +x_31 = lean::cnstr_get(x_16, 2); +lean::inc(x_31); +x_33 = lean::cnstr_get(x_16, 3); +lean::inc(x_33); +lean::dec(x_16); +x_36 = lean::apply_1(x_1, x_31); +x_37 = lean::box(x_30); +x_38 = lean::alloc_closure(reinterpret_cast(l_Array_hmmapAux___main___at_Lean_IR_mmodifyJPs___spec__1___rarg___lambda__2___boxed), 6, 5); +lean::closure_set(x_38, 0, x_0); +lean::closure_set(x_38, 1, x_26); +lean::closure_set(x_38, 2, x_28); +lean::closure_set(x_38, 3, x_37); +lean::closure_set(x_38, 4, x_33); +lean::inc(x_19); +x_40 = lean::apply_4(x_19, lean::box(0), lean::box(0), x_36, x_38); +x_41 = lean::apply_4(x_19, lean::box(0), lean::box(0), x_40, x_23); +return x_41; +} +default: +{ +obj* x_43; +lean::dec(x_1); +x_43 = lean::box(0); +x_24 = x_43; +goto lbl_25; +} +} +lbl_25: +{ +obj* x_45; obj* x_48; obj* x_51; obj* x_52; +lean::dec(x_24); +x_45 = lean::cnstr_get(x_0, 0); +lean::inc(x_45); +lean::dec(x_0); +x_48 = lean::cnstr_get(x_45, 1); +lean::inc(x_48); +lean::dec(x_45); +x_51 = lean::apply_2(x_48, lean::box(0), x_16); +x_52 = lean::apply_4(x_19, lean::box(0), lean::box(0), x_51, x_23); +return x_52; +} +} +} +} +obj* l_Array_hmmapAux___main___at_Lean_IR_mmodifyJPs___spec__1(obj* x_0) { +_start: +{ +obj* x_1; +x_1 = lean::alloc_closure(reinterpret_cast(l_Array_hmmapAux___main___at_Lean_IR_mmodifyJPs___spec__1___rarg), 4, 0); +return x_1; +} +} +obj* l_Lean_IR_mmodifyJPs___rarg(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +obj* x_3; obj* x_4; +x_3 = lean::mk_nat_obj(0ul); +x_4 = l_Array_hmmapAux___main___at_Lean_IR_mmodifyJPs___spec__1___rarg(x_0, x_2, x_3, x_1); +return x_4; +} +} +obj* l_Lean_IR_mmodifyJPs(obj* x_0) { +_start: +{ +obj* x_1; +x_1 = lean::alloc_closure(reinterpret_cast(l_Lean_IR_mmodifyJPs___rarg), 3, 0); +return x_1; +} +} +obj* l_Array_hmmapAux___main___at_Lean_IR_mmodifyJPs___spec__1___rarg___lambda__1___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { +_start: +{ +obj* x_5; +x_5 = l_Array_hmmapAux___main___at_Lean_IR_mmodifyJPs___spec__1___rarg___lambda__1(x_0, x_1, x_2, x_3, x_4); +lean::dec(x_0); +return x_5; +} +} +obj* l_Array_hmmapAux___main___at_Lean_IR_mmodifyJPs___spec__1___rarg___lambda__2___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +uint8 x_6; obj* x_7; +x_6 = lean::unbox(x_3); +x_7 = l_Array_hmmapAux___main___at_Lean_IR_mmodifyJPs___spec__1___rarg___lambda__2(x_0, x_1, x_2, x_6, x_4, x_5); +return x_7; +} +} +obj* l_Array_hmmapAux___main___at_Lean_IR_mmodifyJPs___spec__1___boxed(obj* x_0) { +_start: +{ +obj* x_1; +x_1 = l_Array_hmmapAux___main___at_Lean_IR_mmodifyJPs___spec__1(x_0); +lean::dec(x_0); +return x_1; +} +} +obj* l_Lean_IR_mmodifyJPs___boxed(obj* x_0) { +_start: +{ +obj* x_1; +x_1 = l_Lean_IR_mmodifyJPs(x_0); +lean::dec(x_0); +return x_1; +} +} namespace lean { namespace ir { obj* mk_alt_core(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { @@ -10035,7 +10436,7 @@ obj* _init_l_Lean_IR_formatFnBody___main___closed__3() { _start: { obj* x_0; obj* x_1; -x_0 = lean::mk_string("let* "); +x_0 = lean::mk_string(" :="); x_1 = lean::alloc_cnstr(2, 1, 0); lean::cnstr_set(x_1, 0, x_0); return x_1; @@ -10045,7 +10446,7 @@ obj* _init_l_Lean_IR_formatFnBody___main___closed__4() { _start: { obj* x_0; obj* x_1; -x_0 = lean::mk_string(" :="); +x_0 = lean::mk_string("set "); x_1 = lean::alloc_cnstr(2, 1, 0); lean::cnstr_set(x_1, 0, x_0); return x_1; @@ -10055,7 +10456,7 @@ obj* _init_l_Lean_IR_formatFnBody___main___closed__5() { _start: { obj* x_0; obj* x_1; -x_0 = lean::mk_string("set "); +x_0 = lean::mk_string("] := "); x_1 = lean::alloc_cnstr(2, 1, 0); lean::cnstr_set(x_1, 0, x_0); return x_1; @@ -10065,7 +10466,7 @@ obj* _init_l_Lean_IR_formatFnBody___main___closed__6() { _start: { obj* x_0; obj* x_1; -x_0 = lean::mk_string("] := "); +x_0 = lean::mk_string("uset "); x_1 = lean::alloc_cnstr(2, 1, 0); lean::cnstr_set(x_1, 0, x_0); return x_1; @@ -10075,7 +10476,7 @@ obj* _init_l_Lean_IR_formatFnBody___main___closed__7() { _start: { obj* x_0; obj* x_1; -x_0 = lean::mk_string("uset "); +x_0 = lean::mk_string("sset "); x_1 = lean::alloc_cnstr(2, 1, 0); lean::cnstr_set(x_1, 0, x_0); return x_1; @@ -10085,7 +10486,7 @@ obj* _init_l_Lean_IR_formatFnBody___main___closed__8() { _start: { obj* x_0; obj* x_1; -x_0 = lean::mk_string("sset "); +x_0 = lean::mk_string("] : "); x_1 = lean::alloc_cnstr(2, 1, 0); lean::cnstr_set(x_1, 0, x_0); return x_1; @@ -10095,7 +10496,7 @@ obj* _init_l_Lean_IR_formatFnBody___main___closed__9() { _start: { obj* x_0; obj* x_1; -x_0 = lean::mk_string("] : "); +x_0 = lean::mk_string("release "); x_1 = lean::alloc_cnstr(2, 1, 0); lean::cnstr_set(x_1, 0, x_0); return x_1; @@ -10105,7 +10506,7 @@ obj* _init_l_Lean_IR_formatFnBody___main___closed__10() { _start: { obj* x_0; obj* x_1; -x_0 = lean::mk_string("release "); +x_0 = lean::mk_string("];"); x_1 = lean::alloc_cnstr(2, 1, 0); lean::cnstr_set(x_1, 0, x_0); return x_1; @@ -10115,7 +10516,7 @@ obj* _init_l_Lean_IR_formatFnBody___main___closed__11() { _start: { obj* x_0; obj* x_1; -x_0 = lean::mk_string("];"); +x_0 = lean::mk_string("inc "); x_1 = lean::alloc_cnstr(2, 1, 0); lean::cnstr_set(x_1, 0, x_0); return x_1; @@ -10125,7 +10526,7 @@ obj* _init_l_Lean_IR_formatFnBody___main___closed__12() { _start: { obj* x_0; obj* x_1; -x_0 = lean::mk_string("inc "); +x_0 = lean::mk_string("dec "); x_1 = lean::alloc_cnstr(2, 1, 0); lean::cnstr_set(x_1, 0, x_0); return x_1; @@ -10135,7 +10536,7 @@ obj* _init_l_Lean_IR_formatFnBody___main___closed__13() { _start: { obj* x_0; obj* x_1; -x_0 = lean::mk_string("dec "); +x_0 = lean::mk_string("mdata "); x_1 = lean::alloc_cnstr(2, 1, 0); lean::cnstr_set(x_1, 0, x_0); return x_1; @@ -10145,7 +10546,7 @@ obj* _init_l_Lean_IR_formatFnBody___main___closed__14() { _start: { obj* x_0; obj* x_1; -x_0 = lean::mk_string("mdata "); +x_0 = lean::mk_string("case "); x_1 = lean::alloc_cnstr(2, 1, 0); lean::cnstr_set(x_1, 0, x_0); return x_1; @@ -10155,7 +10556,7 @@ obj* _init_l_Lean_IR_formatFnBody___main___closed__15() { _start: { obj* x_0; obj* x_1; -x_0 = lean::mk_string("case "); +x_0 = lean::mk_string(" of"); x_1 = lean::alloc_cnstr(2, 1, 0); lean::cnstr_set(x_1, 0, x_0); return x_1; @@ -10165,7 +10566,7 @@ obj* _init_l_Lean_IR_formatFnBody___main___closed__16() { _start: { obj* x_0; obj* x_1; -x_0 = lean::mk_string(" of"); +x_0 = lean::mk_string("ret "); x_1 = lean::alloc_cnstr(2, 1, 0); lean::cnstr_set(x_1, 0, x_0); return x_1; @@ -10175,23 +10576,13 @@ obj* _init_l_Lean_IR_formatFnBody___main___closed__17() { _start: { obj* x_0; obj* x_1; -x_0 = lean::mk_string("ret "); -x_1 = lean::alloc_cnstr(2, 1, 0); -lean::cnstr_set(x_1, 0, x_0); -return x_1; -} -} -obj* _init_l_Lean_IR_formatFnBody___main___closed__18() { -_start: -{ -obj* x_0; obj* x_1; x_0 = lean::mk_string("jmp "); x_1 = lean::alloc_cnstr(2, 1, 0); lean::cnstr_set(x_1, 0, x_0); return x_1; } } -obj* _init_l_Lean_IR_formatFnBody___main___closed__19() { +obj* _init_l_Lean_IR_formatFnBody___main___closed__18() { _start: { obj* x_0; obj* x_1; @@ -10275,7 +10666,7 @@ return x_39; } case 1: { -obj* x_40; obj* x_42; uint8 x_44; obj* x_45; obj* x_47; obj* x_50; obj* x_51; obj* x_52; obj* x_54; uint8 x_55; obj* x_56; obj* x_57; obj* x_58; obj* x_59; obj* x_60; obj* x_61; obj* x_63; obj* x_64; obj* x_65; obj* x_66; obj* x_67; obj* x_68; obj* x_69; obj* x_70; obj* x_71; obj* x_72; obj* x_73; obj* x_75; obj* x_76; obj* x_77; obj* x_78; obj* x_80; obj* x_81; obj* x_82; obj* x_83; obj* x_84; obj* x_85; obj* x_86; obj* x_87; obj* x_88; obj* x_89; obj* x_90; +obj* x_40; obj* x_42; uint8 x_44; obj* x_45; obj* x_47; obj* x_50; obj* x_51; obj* x_52; obj* x_54; obj* x_55; obj* x_56; obj* x_57; uint8 x_59; obj* x_60; obj* x_61; obj* x_62; obj* x_63; obj* x_64; obj* x_65; obj* x_66; obj* x_67; obj* x_68; obj* x_69; obj* x_70; obj* x_72; obj* x_73; obj* x_74; obj* x_75; obj* x_77; obj* x_78; obj* x_79; obj* x_80; obj* x_81; obj* x_82; obj* x_83; obj* x_84; obj* x_85; obj* x_86; obj* x_87; x_40 = lean::cnstr_get(x_1, 0); lean::inc(x_40); x_42 = lean::cnstr_get(x_1, 1); @@ -10292,689 +10683,683 @@ x_52 = lean::string_append(x_51, x_50); lean::dec(x_50); x_54 = lean::alloc_cnstr(2, 1, 0); lean::cnstr_set(x_54, 0, x_52); -x_55 = 0; -x_56 = l_Lean_IR_formatFnBody___main___closed__3; -x_57 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_57, 0, x_56); -lean::cnstr_set(x_57, 1, x_54); -lean::cnstr_set_scalar(x_57, sizeof(void*)*2, x_55); -x_58 = x_57; -x_59 = lean::mk_nat_obj(0ul); -x_60 = lean::box(0); -x_61 = l_Array_miterateAux___main___at_Lean_IR_formatFnBody___main___spec__2(x_42, x_42, x_59, x_60); +x_55 = lean::mk_nat_obj(0ul); +x_56 = lean::box(0); +x_57 = l_Array_miterateAux___main___at_Lean_IR_formatFnBody___main___spec__2(x_42, x_42, x_55, x_56); lean::dec(x_42); +x_59 = 0; +x_60 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_60, 0, x_54); +lean::cnstr_set(x_60, 1, x_57); +lean::cnstr_set_scalar(x_60, sizeof(void*)*2, x_59); +x_61 = x_60; +x_62 = l___private_init_lean_compiler_ir_21__formatParam___main___closed__1; x_63 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_63, 0, x_58); -lean::cnstr_set(x_63, 1, x_61); -lean::cnstr_set_scalar(x_63, sizeof(void*)*2, x_55); +lean::cnstr_set(x_63, 0, x_61); +lean::cnstr_set(x_63, 1, x_62); +lean::cnstr_set_scalar(x_63, sizeof(void*)*2, x_59); x_64 = x_63; -x_65 = l___private_init_lean_compiler_ir_21__formatParam___main___closed__1; +x_65 = l___private_init_lean_compiler_ir_20__formatIRType___main(x_44); x_66 = lean::alloc_cnstr(4, 2, 1); lean::cnstr_set(x_66, 0, x_64); lean::cnstr_set(x_66, 1, x_65); -lean::cnstr_set_scalar(x_66, sizeof(void*)*2, x_55); +lean::cnstr_set_scalar(x_66, sizeof(void*)*2, x_59); x_67 = x_66; -x_68 = l___private_init_lean_compiler_ir_20__formatIRType___main(x_44); +x_68 = l_Lean_IR_formatFnBody___main___closed__3; x_69 = lean::alloc_cnstr(4, 2, 1); lean::cnstr_set(x_69, 0, x_67); lean::cnstr_set(x_69, 1, x_68); -lean::cnstr_set_scalar(x_69, sizeof(void*)*2, x_55); +lean::cnstr_set_scalar(x_69, sizeof(void*)*2, x_59); x_70 = x_69; -x_71 = l_Lean_IR_formatFnBody___main___closed__4; -x_72 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_72, 0, x_70); -lean::cnstr_set(x_72, 1, x_71); -lean::cnstr_set_scalar(x_72, sizeof(void*)*2, x_55); -x_73 = x_72; lean::inc(x_0); -x_75 = l_Lean_IR_formatFnBody___main(x_0, x_45); -x_76 = lean::box(1); -x_77 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_77, 0, x_76); +x_72 = l_Lean_IR_formatFnBody___main(x_0, x_45); +x_73 = lean::box(1); +x_74 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_74, 0, x_73); +lean::cnstr_set(x_74, 1, x_72); +lean::cnstr_set_scalar(x_74, sizeof(void*)*2, x_59); +x_75 = x_74; +lean::inc(x_0); +x_77 = lean::alloc_cnstr(3, 2, 0); +lean::cnstr_set(x_77, 0, x_0); lean::cnstr_set(x_77, 1, x_75); -lean::cnstr_set_scalar(x_77, sizeof(void*)*2, x_55); -x_78 = x_77; -lean::inc(x_0); -x_80 = lean::alloc_cnstr(3, 2, 0); -lean::cnstr_set(x_80, 0, x_0); -lean::cnstr_set(x_80, 1, x_78); +x_78 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_78, 0, x_70); +lean::cnstr_set(x_78, 1, x_77); +lean::cnstr_set_scalar(x_78, sizeof(void*)*2, x_59); +x_79 = x_78; +x_80 = l_Lean_IR_formatFnBody___main___closed__2; x_81 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_81, 0, x_73); +lean::cnstr_set(x_81, 0, x_79); lean::cnstr_set(x_81, 1, x_80); -lean::cnstr_set_scalar(x_81, sizeof(void*)*2, x_55); +lean::cnstr_set_scalar(x_81, sizeof(void*)*2, x_59); x_82 = x_81; -x_83 = l_Lean_IR_formatFnBody___main___closed__2; -x_84 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_84, 0, x_82); -lean::cnstr_set(x_84, 1, x_83); -lean::cnstr_set_scalar(x_84, sizeof(void*)*2, x_55); -x_85 = x_84; +x_83 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_83, 0, x_82); +lean::cnstr_set(x_83, 1, x_73); +lean::cnstr_set_scalar(x_83, sizeof(void*)*2, x_59); +x_84 = x_83; +x_85 = l_Lean_IR_formatFnBody___main(x_0, x_47); x_86 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_86, 0, x_85); -lean::cnstr_set(x_86, 1, x_76); -lean::cnstr_set_scalar(x_86, sizeof(void*)*2, x_55); +lean::cnstr_set(x_86, 0, x_84); +lean::cnstr_set(x_86, 1, x_85); +lean::cnstr_set_scalar(x_86, sizeof(void*)*2, x_59); x_87 = x_86; -x_88 = l_Lean_IR_formatFnBody___main(x_0, x_47); -x_89 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_89, 0, x_87); -lean::cnstr_set(x_89, 1, x_88); -lean::cnstr_set_scalar(x_89, sizeof(void*)*2, x_55); -x_90 = x_89; -return x_90; +return x_87; } case 2: { -obj* x_91; obj* x_93; obj* x_95; obj* x_97; obj* x_100; obj* x_101; obj* x_102; obj* x_104; uint8 x_105; obj* x_106; obj* x_107; obj* x_108; obj* x_109; obj* x_110; obj* x_111; obj* x_112; obj* x_113; obj* x_114; obj* x_115; obj* x_116; obj* x_117; obj* x_118; obj* x_119; obj* x_120; obj* x_122; obj* x_123; obj* x_124; obj* x_125; obj* x_126; obj* x_127; obj* x_128; obj* x_129; obj* x_130; obj* x_131; obj* x_132; obj* x_133; -x_91 = lean::cnstr_get(x_1, 0); -lean::inc(x_91); -x_93 = lean::cnstr_get(x_1, 1); -lean::inc(x_93); -x_95 = lean::cnstr_get(x_1, 2); -lean::inc(x_95); -x_97 = lean::cnstr_get(x_1, 3); -lean::inc(x_97); +obj* x_88; obj* x_90; obj* x_92; obj* x_94; obj* x_97; obj* x_98; obj* x_99; obj* x_101; uint8 x_102; obj* x_103; obj* x_104; obj* x_105; obj* x_106; obj* x_107; obj* x_108; obj* x_109; obj* x_110; obj* x_111; obj* x_112; obj* x_113; obj* x_114; obj* x_115; obj* x_116; obj* x_117; obj* x_119; obj* x_120; obj* x_121; obj* x_122; obj* x_123; obj* x_124; obj* x_125; obj* x_126; obj* x_127; obj* x_128; obj* x_129; obj* x_130; +x_88 = lean::cnstr_get(x_1, 0); +lean::inc(x_88); +x_90 = lean::cnstr_get(x_1, 1); +lean::inc(x_90); +x_92 = lean::cnstr_get(x_1, 2); +lean::inc(x_92); +x_94 = lean::cnstr_get(x_1, 3); +lean::inc(x_94); lean::dec(x_1); -x_100 = l_Nat_repr(x_91); -x_101 = l_Lean_IR_VarId_HasToString___closed__1; -x_102 = lean::string_append(x_101, x_100); -lean::dec(x_100); -x_104 = lean::alloc_cnstr(2, 1, 0); -lean::cnstr_set(x_104, 0, x_102); -x_105 = 0; -x_106 = l_Lean_IR_formatFnBody___main___closed__5; +x_97 = l_Nat_repr(x_88); +x_98 = l_Lean_IR_VarId_HasToString___closed__1; +x_99 = lean::string_append(x_98, x_97); +lean::dec(x_97); +x_101 = lean::alloc_cnstr(2, 1, 0); +lean::cnstr_set(x_101, 0, x_99); +x_102 = 0; +x_103 = l_Lean_IR_formatFnBody___main___closed__4; +x_104 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_104, 0, x_103); +lean::cnstr_set(x_104, 1, x_101); +lean::cnstr_set_scalar(x_104, sizeof(void*)*2, x_102); +x_105 = x_104; +x_106 = l_Lean_Format_sbracket___closed__1; x_107 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_107, 0, x_106); -lean::cnstr_set(x_107, 1, x_104); -lean::cnstr_set_scalar(x_107, sizeof(void*)*2, x_105); +lean::cnstr_set(x_107, 0, x_105); +lean::cnstr_set(x_107, 1, x_106); +lean::cnstr_set_scalar(x_107, sizeof(void*)*2, x_102); x_108 = x_107; -x_109 = l_Lean_Format_sbracket___closed__1; -x_110 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_110, 0, x_108); -lean::cnstr_set(x_110, 1, x_109); -lean::cnstr_set_scalar(x_110, sizeof(void*)*2, x_105); -x_111 = x_110; -x_112 = l_Nat_repr(x_93); -x_113 = lean::alloc_cnstr(2, 1, 0); -lean::cnstr_set(x_113, 0, x_112); +x_109 = l_Nat_repr(x_90); +x_110 = lean::alloc_cnstr(2, 1, 0); +lean::cnstr_set(x_110, 0, x_109); +x_111 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_111, 0, x_108); +lean::cnstr_set(x_111, 1, x_110); +lean::cnstr_set_scalar(x_111, sizeof(void*)*2, x_102); +x_112 = x_111; +x_113 = l_Lean_IR_formatFnBody___main___closed__5; x_114 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_114, 0, x_111); +lean::cnstr_set(x_114, 0, x_112); lean::cnstr_set(x_114, 1, x_113); -lean::cnstr_set_scalar(x_114, sizeof(void*)*2, x_105); +lean::cnstr_set_scalar(x_114, sizeof(void*)*2, x_102); x_115 = x_114; -x_116 = l_Lean_IR_formatFnBody___main___closed__6; -x_117 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_117, 0, x_115); -lean::cnstr_set(x_117, 1, x_116); -lean::cnstr_set_scalar(x_117, sizeof(void*)*2, x_105); -x_118 = x_117; -x_119 = l_Nat_repr(x_95); -x_120 = lean::string_append(x_101, x_119); -lean::dec(x_119); -x_122 = lean::alloc_cnstr(2, 1, 0); -lean::cnstr_set(x_122, 0, x_120); +x_116 = l_Nat_repr(x_92); +x_117 = lean::string_append(x_98, x_116); +lean::dec(x_116); +x_119 = lean::alloc_cnstr(2, 1, 0); +lean::cnstr_set(x_119, 0, x_117); +x_120 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_120, 0, x_115); +lean::cnstr_set(x_120, 1, x_119); +lean::cnstr_set_scalar(x_120, sizeof(void*)*2, x_102); +x_121 = x_120; +x_122 = l_Lean_IR_formatFnBody___main___closed__2; x_123 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_123, 0, x_118); +lean::cnstr_set(x_123, 0, x_121); lean::cnstr_set(x_123, 1, x_122); -lean::cnstr_set_scalar(x_123, sizeof(void*)*2, x_105); +lean::cnstr_set_scalar(x_123, sizeof(void*)*2, x_102); x_124 = x_123; -x_125 = l_Lean_IR_formatFnBody___main___closed__2; +x_125 = lean::box(1); x_126 = lean::alloc_cnstr(4, 2, 1); lean::cnstr_set(x_126, 0, x_124); lean::cnstr_set(x_126, 1, x_125); -lean::cnstr_set_scalar(x_126, sizeof(void*)*2, x_105); +lean::cnstr_set_scalar(x_126, sizeof(void*)*2, x_102); x_127 = x_126; -x_128 = lean::box(1); +x_128 = l_Lean_IR_formatFnBody___main(x_0, x_94); x_129 = lean::alloc_cnstr(4, 2, 1); lean::cnstr_set(x_129, 0, x_127); lean::cnstr_set(x_129, 1, x_128); -lean::cnstr_set_scalar(x_129, sizeof(void*)*2, x_105); +lean::cnstr_set_scalar(x_129, sizeof(void*)*2, x_102); x_130 = x_129; -x_131 = l_Lean_IR_formatFnBody___main(x_0, x_97); -x_132 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_132, 0, x_130); -lean::cnstr_set(x_132, 1, x_131); -lean::cnstr_set_scalar(x_132, sizeof(void*)*2, x_105); -x_133 = x_132; -return x_133; +return x_130; } case 3: { -obj* x_134; obj* x_136; obj* x_138; obj* x_140; obj* x_143; obj* x_144; obj* x_145; obj* x_147; uint8 x_148; obj* x_149; obj* x_150; obj* x_151; obj* x_152; obj* x_153; obj* x_154; obj* x_155; obj* x_156; obj* x_157; obj* x_158; obj* x_159; obj* x_160; obj* x_161; obj* x_162; obj* x_163; obj* x_165; obj* x_166; obj* x_167; obj* x_168; obj* x_169; obj* x_170; obj* x_171; obj* x_172; obj* x_173; obj* x_174; obj* x_175; obj* x_176; -x_134 = lean::cnstr_get(x_1, 0); -lean::inc(x_134); -x_136 = lean::cnstr_get(x_1, 1); -lean::inc(x_136); -x_138 = lean::cnstr_get(x_1, 2); -lean::inc(x_138); -x_140 = lean::cnstr_get(x_1, 3); -lean::inc(x_140); +obj* x_131; obj* x_133; obj* x_135; obj* x_137; obj* x_140; obj* x_141; obj* x_142; obj* x_144; uint8 x_145; obj* x_146; obj* x_147; obj* x_148; obj* x_149; obj* x_150; obj* x_151; obj* x_152; obj* x_153; obj* x_154; obj* x_155; obj* x_156; obj* x_157; obj* x_158; obj* x_159; obj* x_160; obj* x_162; obj* x_163; obj* x_164; obj* x_165; obj* x_166; obj* x_167; obj* x_168; obj* x_169; obj* x_170; obj* x_171; obj* x_172; obj* x_173; +x_131 = lean::cnstr_get(x_1, 0); +lean::inc(x_131); +x_133 = lean::cnstr_get(x_1, 1); +lean::inc(x_133); +x_135 = lean::cnstr_get(x_1, 2); +lean::inc(x_135); +x_137 = lean::cnstr_get(x_1, 3); +lean::inc(x_137); lean::dec(x_1); -x_143 = l_Nat_repr(x_134); -x_144 = l_Lean_IR_VarId_HasToString___closed__1; -x_145 = lean::string_append(x_144, x_143); -lean::dec(x_143); -x_147 = lean::alloc_cnstr(2, 1, 0); -lean::cnstr_set(x_147, 0, x_145); -x_148 = 0; -x_149 = l_Lean_IR_formatFnBody___main___closed__7; +x_140 = l_Nat_repr(x_131); +x_141 = l_Lean_IR_VarId_HasToString___closed__1; +x_142 = lean::string_append(x_141, x_140); +lean::dec(x_140); +x_144 = lean::alloc_cnstr(2, 1, 0); +lean::cnstr_set(x_144, 0, x_142); +x_145 = 0; +x_146 = l_Lean_IR_formatFnBody___main___closed__6; +x_147 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_147, 0, x_146); +lean::cnstr_set(x_147, 1, x_144); +lean::cnstr_set_scalar(x_147, sizeof(void*)*2, x_145); +x_148 = x_147; +x_149 = l_Lean_Format_sbracket___closed__1; x_150 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_150, 0, x_149); -lean::cnstr_set(x_150, 1, x_147); -lean::cnstr_set_scalar(x_150, sizeof(void*)*2, x_148); +lean::cnstr_set(x_150, 0, x_148); +lean::cnstr_set(x_150, 1, x_149); +lean::cnstr_set_scalar(x_150, sizeof(void*)*2, x_145); x_151 = x_150; -x_152 = l_Lean_Format_sbracket___closed__1; -x_153 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_153, 0, x_151); -lean::cnstr_set(x_153, 1, x_152); -lean::cnstr_set_scalar(x_153, sizeof(void*)*2, x_148); -x_154 = x_153; -x_155 = l_Nat_repr(x_136); -x_156 = lean::alloc_cnstr(2, 1, 0); -lean::cnstr_set(x_156, 0, x_155); +x_152 = l_Nat_repr(x_133); +x_153 = lean::alloc_cnstr(2, 1, 0); +lean::cnstr_set(x_153, 0, x_152); +x_154 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_154, 0, x_151); +lean::cnstr_set(x_154, 1, x_153); +lean::cnstr_set_scalar(x_154, sizeof(void*)*2, x_145); +x_155 = x_154; +x_156 = l_Lean_IR_formatFnBody___main___closed__5; x_157 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_157, 0, x_154); +lean::cnstr_set(x_157, 0, x_155); lean::cnstr_set(x_157, 1, x_156); -lean::cnstr_set_scalar(x_157, sizeof(void*)*2, x_148); +lean::cnstr_set_scalar(x_157, sizeof(void*)*2, x_145); x_158 = x_157; -x_159 = l_Lean_IR_formatFnBody___main___closed__6; -x_160 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_160, 0, x_158); -lean::cnstr_set(x_160, 1, x_159); -lean::cnstr_set_scalar(x_160, sizeof(void*)*2, x_148); -x_161 = x_160; -x_162 = l_Nat_repr(x_138); -x_163 = lean::string_append(x_144, x_162); -lean::dec(x_162); -x_165 = lean::alloc_cnstr(2, 1, 0); -lean::cnstr_set(x_165, 0, x_163); +x_159 = l_Nat_repr(x_135); +x_160 = lean::string_append(x_141, x_159); +lean::dec(x_159); +x_162 = lean::alloc_cnstr(2, 1, 0); +lean::cnstr_set(x_162, 0, x_160); +x_163 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_163, 0, x_158); +lean::cnstr_set(x_163, 1, x_162); +lean::cnstr_set_scalar(x_163, sizeof(void*)*2, x_145); +x_164 = x_163; +x_165 = l_Lean_IR_formatFnBody___main___closed__2; x_166 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_166, 0, x_161); +lean::cnstr_set(x_166, 0, x_164); lean::cnstr_set(x_166, 1, x_165); -lean::cnstr_set_scalar(x_166, sizeof(void*)*2, x_148); +lean::cnstr_set_scalar(x_166, sizeof(void*)*2, x_145); x_167 = x_166; -x_168 = l_Lean_IR_formatFnBody___main___closed__2; +x_168 = lean::box(1); x_169 = lean::alloc_cnstr(4, 2, 1); lean::cnstr_set(x_169, 0, x_167); lean::cnstr_set(x_169, 1, x_168); -lean::cnstr_set_scalar(x_169, sizeof(void*)*2, x_148); +lean::cnstr_set_scalar(x_169, sizeof(void*)*2, x_145); x_170 = x_169; -x_171 = lean::box(1); +x_171 = l_Lean_IR_formatFnBody___main(x_0, x_137); x_172 = lean::alloc_cnstr(4, 2, 1); lean::cnstr_set(x_172, 0, x_170); lean::cnstr_set(x_172, 1, x_171); -lean::cnstr_set_scalar(x_172, sizeof(void*)*2, x_148); +lean::cnstr_set_scalar(x_172, sizeof(void*)*2, x_145); x_173 = x_172; -x_174 = l_Lean_IR_formatFnBody___main(x_0, x_140); -x_175 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_175, 0, x_173); -lean::cnstr_set(x_175, 1, x_174); -lean::cnstr_set_scalar(x_175, sizeof(void*)*2, x_148); -x_176 = x_175; -return x_176; +return x_173; } case 4: { -obj* x_177; obj* x_179; obj* x_181; obj* x_183; uint8 x_185; obj* x_186; obj* x_189; obj* x_190; obj* x_191; obj* x_193; uint8 x_194; obj* x_195; obj* x_196; obj* x_197; obj* x_198; obj* x_199; obj* x_200; obj* x_201; obj* x_202; obj* x_203; obj* x_204; obj* x_205; obj* x_206; obj* x_207; obj* x_208; obj* x_209; obj* x_210; obj* x_211; obj* x_212; obj* x_213; obj* x_214; obj* x_215; obj* x_216; obj* x_217; obj* x_218; obj* x_219; obj* x_220; obj* x_221; obj* x_222; obj* x_224; obj* x_225; obj* x_226; obj* x_227; obj* x_228; obj* x_229; obj* x_230; obj* x_231; obj* x_232; obj* x_233; obj* x_234; obj* x_235; -x_177 = lean::cnstr_get(x_1, 0); -lean::inc(x_177); -x_179 = lean::cnstr_get(x_1, 1); -lean::inc(x_179); -x_181 = lean::cnstr_get(x_1, 2); -lean::inc(x_181); -x_183 = lean::cnstr_get(x_1, 3); +obj* x_174; obj* x_176; obj* x_178; obj* x_180; uint8 x_182; obj* x_183; obj* x_186; obj* x_187; obj* x_188; obj* x_190; uint8 x_191; obj* x_192; obj* x_193; obj* x_194; obj* x_195; obj* x_196; obj* x_197; obj* x_198; obj* x_199; obj* x_200; obj* x_201; obj* x_202; obj* x_203; obj* x_204; obj* x_205; obj* x_206; obj* x_207; obj* x_208; obj* x_209; obj* x_210; obj* x_211; obj* x_212; obj* x_213; obj* x_214; obj* x_215; obj* x_216; obj* x_217; obj* x_218; obj* x_219; obj* x_221; obj* x_222; obj* x_223; obj* x_224; obj* x_225; obj* x_226; obj* x_227; obj* x_228; obj* x_229; obj* x_230; obj* x_231; obj* x_232; +x_174 = lean::cnstr_get(x_1, 0); +lean::inc(x_174); +x_176 = lean::cnstr_get(x_1, 1); +lean::inc(x_176); +x_178 = lean::cnstr_get(x_1, 2); +lean::inc(x_178); +x_180 = lean::cnstr_get(x_1, 3); +lean::inc(x_180); +x_182 = lean::cnstr_get_scalar(x_1, sizeof(void*)*5); +x_183 = lean::cnstr_get(x_1, 4); lean::inc(x_183); -x_185 = lean::cnstr_get_scalar(x_1, sizeof(void*)*5); -x_186 = lean::cnstr_get(x_1, 4); -lean::inc(x_186); lean::dec(x_1); -x_189 = l_Nat_repr(x_177); -x_190 = l_Lean_IR_VarId_HasToString___closed__1; -x_191 = lean::string_append(x_190, x_189); -lean::dec(x_189); -x_193 = lean::alloc_cnstr(2, 1, 0); -lean::cnstr_set(x_193, 0, x_191); -x_194 = 0; -x_195 = l_Lean_IR_formatFnBody___main___closed__8; +x_186 = l_Nat_repr(x_174); +x_187 = l_Lean_IR_VarId_HasToString___closed__1; +x_188 = lean::string_append(x_187, x_186); +lean::dec(x_186); +x_190 = lean::alloc_cnstr(2, 1, 0); +lean::cnstr_set(x_190, 0, x_188); +x_191 = 0; +x_192 = l_Lean_IR_formatFnBody___main___closed__7; +x_193 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_193, 0, x_192); +lean::cnstr_set(x_193, 1, x_190); +lean::cnstr_set_scalar(x_193, sizeof(void*)*2, x_191); +x_194 = x_193; +x_195 = l_Lean_Format_sbracket___closed__1; x_196 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_196, 0, x_195); -lean::cnstr_set(x_196, 1, x_193); -lean::cnstr_set_scalar(x_196, sizeof(void*)*2, x_194); +lean::cnstr_set(x_196, 0, x_194); +lean::cnstr_set(x_196, 1, x_195); +lean::cnstr_set_scalar(x_196, sizeof(void*)*2, x_191); x_197 = x_196; -x_198 = l_Lean_Format_sbracket___closed__1; -x_199 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_199, 0, x_197); -lean::cnstr_set(x_199, 1, x_198); -lean::cnstr_set_scalar(x_199, sizeof(void*)*2, x_194); -x_200 = x_199; -x_201 = l_Nat_repr(x_179); -x_202 = lean::alloc_cnstr(2, 1, 0); -lean::cnstr_set(x_202, 0, x_201); +x_198 = l_Nat_repr(x_176); +x_199 = lean::alloc_cnstr(2, 1, 0); +lean::cnstr_set(x_199, 0, x_198); +x_200 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_200, 0, x_197); +lean::cnstr_set(x_200, 1, x_199); +lean::cnstr_set_scalar(x_200, sizeof(void*)*2, x_191); +x_201 = x_200; +x_202 = l_Lean_formatKVMap___closed__1; x_203 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_203, 0, x_200); +lean::cnstr_set(x_203, 0, x_201); lean::cnstr_set(x_203, 1, x_202); -lean::cnstr_set_scalar(x_203, sizeof(void*)*2, x_194); +lean::cnstr_set_scalar(x_203, sizeof(void*)*2, x_191); x_204 = x_203; -x_205 = l_Lean_formatKVMap___closed__1; -x_206 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_206, 0, x_204); -lean::cnstr_set(x_206, 1, x_205); -lean::cnstr_set_scalar(x_206, sizeof(void*)*2, x_194); -x_207 = x_206; -x_208 = l_Nat_repr(x_181); -x_209 = lean::alloc_cnstr(2, 1, 0); -lean::cnstr_set(x_209, 0, x_208); +x_205 = l_Nat_repr(x_178); +x_206 = lean::alloc_cnstr(2, 1, 0); +lean::cnstr_set(x_206, 0, x_205); +x_207 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_207, 0, x_204); +lean::cnstr_set(x_207, 1, x_206); +lean::cnstr_set_scalar(x_207, sizeof(void*)*2, x_191); +x_208 = x_207; +x_209 = l_Lean_IR_formatFnBody___main___closed__8; x_210 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_210, 0, x_207); +lean::cnstr_set(x_210, 0, x_208); lean::cnstr_set(x_210, 1, x_209); -lean::cnstr_set_scalar(x_210, sizeof(void*)*2, x_194); +lean::cnstr_set_scalar(x_210, sizeof(void*)*2, x_191); x_211 = x_210; -x_212 = l_Lean_IR_formatFnBody___main___closed__9; +x_212 = l___private_init_lean_compiler_ir_20__formatIRType___main(x_182); x_213 = lean::alloc_cnstr(4, 2, 1); lean::cnstr_set(x_213, 0, x_211); lean::cnstr_set(x_213, 1, x_212); -lean::cnstr_set_scalar(x_213, sizeof(void*)*2, x_194); +lean::cnstr_set_scalar(x_213, sizeof(void*)*2, x_191); x_214 = x_213; -x_215 = l___private_init_lean_compiler_ir_20__formatIRType___main(x_185); +x_215 = l_Lean_formatEntry___main___closed__1; x_216 = lean::alloc_cnstr(4, 2, 1); lean::cnstr_set(x_216, 0, x_214); lean::cnstr_set(x_216, 1, x_215); -lean::cnstr_set_scalar(x_216, sizeof(void*)*2, x_194); +lean::cnstr_set_scalar(x_216, sizeof(void*)*2, x_191); x_217 = x_216; -x_218 = l_Lean_formatEntry___main___closed__1; -x_219 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_219, 0, x_217); -lean::cnstr_set(x_219, 1, x_218); -lean::cnstr_set_scalar(x_219, sizeof(void*)*2, x_194); -x_220 = x_219; -x_221 = l_Nat_repr(x_183); -x_222 = lean::string_append(x_190, x_221); -lean::dec(x_221); -x_224 = lean::alloc_cnstr(2, 1, 0); -lean::cnstr_set(x_224, 0, x_222); +x_218 = l_Nat_repr(x_180); +x_219 = lean::string_append(x_187, x_218); +lean::dec(x_218); +x_221 = lean::alloc_cnstr(2, 1, 0); +lean::cnstr_set(x_221, 0, x_219); +x_222 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_222, 0, x_217); +lean::cnstr_set(x_222, 1, x_221); +lean::cnstr_set_scalar(x_222, sizeof(void*)*2, x_191); +x_223 = x_222; +x_224 = l_Lean_IR_formatFnBody___main___closed__2; x_225 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_225, 0, x_220); +lean::cnstr_set(x_225, 0, x_223); lean::cnstr_set(x_225, 1, x_224); -lean::cnstr_set_scalar(x_225, sizeof(void*)*2, x_194); +lean::cnstr_set_scalar(x_225, sizeof(void*)*2, x_191); x_226 = x_225; -x_227 = l_Lean_IR_formatFnBody___main___closed__2; +x_227 = lean::box(1); x_228 = lean::alloc_cnstr(4, 2, 1); lean::cnstr_set(x_228, 0, x_226); lean::cnstr_set(x_228, 1, x_227); -lean::cnstr_set_scalar(x_228, sizeof(void*)*2, x_194); +lean::cnstr_set_scalar(x_228, sizeof(void*)*2, x_191); x_229 = x_228; -x_230 = lean::box(1); +x_230 = l_Lean_IR_formatFnBody___main(x_0, x_183); x_231 = lean::alloc_cnstr(4, 2, 1); lean::cnstr_set(x_231, 0, x_229); lean::cnstr_set(x_231, 1, x_230); -lean::cnstr_set_scalar(x_231, sizeof(void*)*2, x_194); +lean::cnstr_set_scalar(x_231, sizeof(void*)*2, x_191); x_232 = x_231; -x_233 = l_Lean_IR_formatFnBody___main(x_0, x_186); -x_234 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_234, 0, x_232); -lean::cnstr_set(x_234, 1, x_233); -lean::cnstr_set_scalar(x_234, sizeof(void*)*2, x_194); -x_235 = x_234; -return x_235; +return x_232; } case 5: { -obj* x_236; obj* x_238; obj* x_240; obj* x_243; obj* x_244; obj* x_245; obj* x_247; uint8 x_248; obj* x_249; obj* x_250; obj* x_251; obj* x_252; obj* x_253; obj* x_254; obj* x_255; obj* x_256; obj* x_257; obj* x_258; obj* x_259; obj* x_260; obj* x_261; obj* x_262; obj* x_263; obj* x_264; obj* x_265; obj* x_266; obj* x_267; -x_236 = lean::cnstr_get(x_1, 0); -lean::inc(x_236); -x_238 = lean::cnstr_get(x_1, 1); -lean::inc(x_238); -x_240 = lean::cnstr_get(x_1, 2); -lean::inc(x_240); +obj* x_233; obj* x_235; obj* x_237; obj* x_240; obj* x_241; obj* x_242; obj* x_244; uint8 x_245; obj* x_246; obj* x_247; obj* x_248; obj* x_249; obj* x_250; obj* x_251; obj* x_252; obj* x_253; obj* x_254; obj* x_255; obj* x_256; obj* x_257; obj* x_258; obj* x_259; obj* x_260; obj* x_261; obj* x_262; obj* x_263; obj* x_264; +x_233 = lean::cnstr_get(x_1, 0); +lean::inc(x_233); +x_235 = lean::cnstr_get(x_1, 1); +lean::inc(x_235); +x_237 = lean::cnstr_get(x_1, 2); +lean::inc(x_237); lean::dec(x_1); -x_243 = l_Nat_repr(x_236); -x_244 = l_Lean_IR_VarId_HasToString___closed__1; -x_245 = lean::string_append(x_244, x_243); -lean::dec(x_243); -x_247 = lean::alloc_cnstr(2, 1, 0); -lean::cnstr_set(x_247, 0, x_245); -x_248 = 0; -x_249 = l_Lean_IR_formatFnBody___main___closed__10; +x_240 = l_Nat_repr(x_233); +x_241 = l_Lean_IR_VarId_HasToString___closed__1; +x_242 = lean::string_append(x_241, x_240); +lean::dec(x_240); +x_244 = lean::alloc_cnstr(2, 1, 0); +lean::cnstr_set(x_244, 0, x_242); +x_245 = 0; +x_246 = l_Lean_IR_formatFnBody___main___closed__9; +x_247 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_247, 0, x_246); +lean::cnstr_set(x_247, 1, x_244); +lean::cnstr_set_scalar(x_247, sizeof(void*)*2, x_245); +x_248 = x_247; +x_249 = l_Lean_Format_sbracket___closed__1; x_250 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_250, 0, x_249); -lean::cnstr_set(x_250, 1, x_247); -lean::cnstr_set_scalar(x_250, sizeof(void*)*2, x_248); +lean::cnstr_set(x_250, 0, x_248); +lean::cnstr_set(x_250, 1, x_249); +lean::cnstr_set_scalar(x_250, sizeof(void*)*2, x_245); x_251 = x_250; -x_252 = l_Lean_Format_sbracket___closed__1; -x_253 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_253, 0, x_251); -lean::cnstr_set(x_253, 1, x_252); -lean::cnstr_set_scalar(x_253, sizeof(void*)*2, x_248); -x_254 = x_253; -x_255 = l_Nat_repr(x_238); -x_256 = lean::alloc_cnstr(2, 1, 0); -lean::cnstr_set(x_256, 0, x_255); +x_252 = l_Nat_repr(x_235); +x_253 = lean::alloc_cnstr(2, 1, 0); +lean::cnstr_set(x_253, 0, x_252); +x_254 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_254, 0, x_251); +lean::cnstr_set(x_254, 1, x_253); +lean::cnstr_set_scalar(x_254, sizeof(void*)*2, x_245); +x_255 = x_254; +x_256 = l_Lean_IR_formatFnBody___main___closed__10; x_257 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_257, 0, x_254); +lean::cnstr_set(x_257, 0, x_255); lean::cnstr_set(x_257, 1, x_256); -lean::cnstr_set_scalar(x_257, sizeof(void*)*2, x_248); +lean::cnstr_set_scalar(x_257, sizeof(void*)*2, x_245); x_258 = x_257; -x_259 = l_Lean_IR_formatFnBody___main___closed__11; +x_259 = lean::box(1); x_260 = lean::alloc_cnstr(4, 2, 1); lean::cnstr_set(x_260, 0, x_258); lean::cnstr_set(x_260, 1, x_259); -lean::cnstr_set_scalar(x_260, sizeof(void*)*2, x_248); +lean::cnstr_set_scalar(x_260, sizeof(void*)*2, x_245); x_261 = x_260; -x_262 = lean::box(1); +x_262 = l_Lean_IR_formatFnBody___main(x_0, x_237); x_263 = lean::alloc_cnstr(4, 2, 1); lean::cnstr_set(x_263, 0, x_261); lean::cnstr_set(x_263, 1, x_262); -lean::cnstr_set_scalar(x_263, sizeof(void*)*2, x_248); +lean::cnstr_set_scalar(x_263, sizeof(void*)*2, x_245); x_264 = x_263; -x_265 = l_Lean_IR_formatFnBody___main(x_0, x_240); -x_266 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_266, 0, x_264); -lean::cnstr_set(x_266, 1, x_265); -lean::cnstr_set_scalar(x_266, sizeof(void*)*2, x_248); -x_267 = x_266; -return x_267; +return x_264; } case 6: { -obj* x_268; obj* x_270; obj* x_272; obj* x_275; obj* x_276; obj* x_277; obj* x_279; uint8 x_280; obj* x_281; obj* x_282; obj* x_283; obj* x_284; uint8 x_285; obj* x_286; -x_268 = lean::cnstr_get(x_1, 0); -lean::inc(x_268); -x_270 = lean::cnstr_get(x_1, 1); -lean::inc(x_270); -x_272 = lean::cnstr_get(x_1, 2); -lean::inc(x_272); +obj* x_265; obj* x_267; obj* x_269; obj* x_272; obj* x_273; obj* x_274; obj* x_276; uint8 x_277; obj* x_278; obj* x_279; obj* x_280; obj* x_281; uint8 x_282; obj* x_283; +x_265 = lean::cnstr_get(x_1, 0); +lean::inc(x_265); +x_267 = lean::cnstr_get(x_1, 1); +lean::inc(x_267); +x_269 = lean::cnstr_get(x_1, 2); +lean::inc(x_269); lean::dec(x_1); -x_275 = l_Nat_repr(x_268); -x_276 = l_Lean_IR_VarId_HasToString___closed__1; -x_277 = lean::string_append(x_276, x_275); -lean::dec(x_275); -x_279 = lean::alloc_cnstr(2, 1, 0); -lean::cnstr_set(x_279, 0, x_277); -x_280 = 0; -x_281 = l_Lean_IR_formatFnBody___main___closed__12; -x_282 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_282, 0, x_281); -lean::cnstr_set(x_282, 1, x_279); -lean::cnstr_set_scalar(x_282, sizeof(void*)*2, x_280); -x_283 = x_282; -x_284 = lean::mk_nat_obj(1ul); -x_285 = lean::nat_dec_eq(x_270, x_284); -x_286 = l_Lean_IR_formatFnBody___main(x_0, x_272); -if (x_285 == 0) +x_272 = l_Nat_repr(x_265); +x_273 = l_Lean_IR_VarId_HasToString___closed__1; +x_274 = lean::string_append(x_273, x_272); +lean::dec(x_272); +x_276 = lean::alloc_cnstr(2, 1, 0); +lean::cnstr_set(x_276, 0, x_274); +x_277 = 0; +x_278 = l_Lean_IR_formatFnBody___main___closed__11; +x_279 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_279, 0, x_278); +lean::cnstr_set(x_279, 1, x_276); +lean::cnstr_set_scalar(x_279, sizeof(void*)*2, x_277); +x_280 = x_279; +x_281 = lean::mk_nat_obj(1ul); +x_282 = lean::nat_dec_eq(x_267, x_281); +x_283 = l_Lean_IR_formatFnBody___main(x_0, x_269); +if (x_282 == 0) { -obj* x_287; obj* x_288; obj* x_289; obj* x_290; obj* x_291; obj* x_292; obj* x_293; obj* x_294; obj* x_295; obj* x_296; obj* x_297; obj* x_298; -x_287 = l_Nat_repr(x_270); -x_288 = lean::alloc_cnstr(2, 1, 0); -lean::cnstr_set(x_288, 0, x_287); +obj* x_284; obj* x_285; obj* x_286; obj* x_287; obj* x_288; obj* x_289; obj* x_290; obj* x_291; obj* x_292; obj* x_293; obj* x_294; obj* x_295; +x_284 = l_Nat_repr(x_267); +x_285 = lean::alloc_cnstr(2, 1, 0); +lean::cnstr_set(x_285, 0, x_284); +x_286 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_286, 0, x_280); +lean::cnstr_set(x_286, 1, x_285); +lean::cnstr_set_scalar(x_286, sizeof(void*)*2, x_277); +x_287 = x_286; +x_288 = l_Lean_IR_formatFnBody___main___closed__2; x_289 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_289, 0, x_283); +lean::cnstr_set(x_289, 0, x_287); lean::cnstr_set(x_289, 1, x_288); -lean::cnstr_set_scalar(x_289, sizeof(void*)*2, x_280); +lean::cnstr_set_scalar(x_289, sizeof(void*)*2, x_277); x_290 = x_289; -x_291 = l_Lean_IR_formatFnBody___main___closed__2; +x_291 = lean::box(1); x_292 = lean::alloc_cnstr(4, 2, 1); lean::cnstr_set(x_292, 0, x_290); lean::cnstr_set(x_292, 1, x_291); -lean::cnstr_set_scalar(x_292, sizeof(void*)*2, x_280); +lean::cnstr_set_scalar(x_292, sizeof(void*)*2, x_277); x_293 = x_292; -x_294 = lean::box(1); -x_295 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_295, 0, x_293); -lean::cnstr_set(x_295, 1, x_294); -lean::cnstr_set_scalar(x_295, sizeof(void*)*2, x_280); -x_296 = x_295; -x_297 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_297, 0, x_296); -lean::cnstr_set(x_297, 1, x_286); -lean::cnstr_set_scalar(x_297, sizeof(void*)*2, x_280); -x_298 = x_297; -return x_298; +x_294 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_294, 0, x_293); +lean::cnstr_set(x_294, 1, x_283); +lean::cnstr_set_scalar(x_294, sizeof(void*)*2, x_277); +x_295 = x_294; +return x_295; } else { -obj* x_300; obj* x_301; obj* x_302; obj* x_303; obj* x_304; obj* x_305; obj* x_306; obj* x_307; obj* x_308; obj* x_309; obj* x_310; -lean::dec(x_270); -x_300 = l_Lean_Format_join___closed__1; +obj* x_297; obj* x_298; obj* x_299; obj* x_300; obj* x_301; obj* x_302; obj* x_303; obj* x_304; obj* x_305; obj* x_306; obj* x_307; +lean::dec(x_267); +x_297 = l_Lean_Format_join___closed__1; +x_298 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_298, 0, x_280); +lean::cnstr_set(x_298, 1, x_297); +lean::cnstr_set_scalar(x_298, sizeof(void*)*2, x_277); +x_299 = x_298; +x_300 = l_Lean_IR_formatFnBody___main___closed__2; x_301 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_301, 0, x_283); +lean::cnstr_set(x_301, 0, x_299); lean::cnstr_set(x_301, 1, x_300); -lean::cnstr_set_scalar(x_301, sizeof(void*)*2, x_280); +lean::cnstr_set_scalar(x_301, sizeof(void*)*2, x_277); x_302 = x_301; -x_303 = l_Lean_IR_formatFnBody___main___closed__2; +x_303 = lean::box(1); x_304 = lean::alloc_cnstr(4, 2, 1); lean::cnstr_set(x_304, 0, x_302); lean::cnstr_set(x_304, 1, x_303); -lean::cnstr_set_scalar(x_304, sizeof(void*)*2, x_280); +lean::cnstr_set_scalar(x_304, sizeof(void*)*2, x_277); x_305 = x_304; -x_306 = lean::box(1); -x_307 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_307, 0, x_305); -lean::cnstr_set(x_307, 1, x_306); -lean::cnstr_set_scalar(x_307, sizeof(void*)*2, x_280); -x_308 = x_307; -x_309 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_309, 0, x_308); -lean::cnstr_set(x_309, 1, x_286); -lean::cnstr_set_scalar(x_309, sizeof(void*)*2, x_280); -x_310 = x_309; -return x_310; +x_306 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_306, 0, x_305); +lean::cnstr_set(x_306, 1, x_283); +lean::cnstr_set_scalar(x_306, sizeof(void*)*2, x_277); +x_307 = x_306; +return x_307; } } case 7: { -obj* x_311; obj* x_313; obj* x_315; obj* x_318; obj* x_319; obj* x_320; obj* x_322; uint8 x_323; obj* x_324; obj* x_325; obj* x_326; obj* x_327; uint8 x_328; obj* x_329; -x_311 = lean::cnstr_get(x_1, 0); -lean::inc(x_311); -x_313 = lean::cnstr_get(x_1, 1); -lean::inc(x_313); -x_315 = lean::cnstr_get(x_1, 2); -lean::inc(x_315); +obj* x_308; obj* x_310; obj* x_312; obj* x_315; obj* x_316; obj* x_317; obj* x_319; uint8 x_320; obj* x_321; obj* x_322; obj* x_323; obj* x_324; uint8 x_325; obj* x_326; +x_308 = lean::cnstr_get(x_1, 0); +lean::inc(x_308); +x_310 = lean::cnstr_get(x_1, 1); +lean::inc(x_310); +x_312 = lean::cnstr_get(x_1, 2); +lean::inc(x_312); lean::dec(x_1); -x_318 = l_Nat_repr(x_311); -x_319 = l_Lean_IR_VarId_HasToString___closed__1; -x_320 = lean::string_append(x_319, x_318); -lean::dec(x_318); -x_322 = lean::alloc_cnstr(2, 1, 0); -lean::cnstr_set(x_322, 0, x_320); -x_323 = 0; -x_324 = l_Lean_IR_formatFnBody___main___closed__13; -x_325 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_325, 0, x_324); -lean::cnstr_set(x_325, 1, x_322); -lean::cnstr_set_scalar(x_325, sizeof(void*)*2, x_323); -x_326 = x_325; -x_327 = lean::mk_nat_obj(1ul); -x_328 = lean::nat_dec_eq(x_313, x_327); -x_329 = l_Lean_IR_formatFnBody___main(x_0, x_315); -if (x_328 == 0) +x_315 = l_Nat_repr(x_308); +x_316 = l_Lean_IR_VarId_HasToString___closed__1; +x_317 = lean::string_append(x_316, x_315); +lean::dec(x_315); +x_319 = lean::alloc_cnstr(2, 1, 0); +lean::cnstr_set(x_319, 0, x_317); +x_320 = 0; +x_321 = l_Lean_IR_formatFnBody___main___closed__12; +x_322 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_322, 0, x_321); +lean::cnstr_set(x_322, 1, x_319); +lean::cnstr_set_scalar(x_322, sizeof(void*)*2, x_320); +x_323 = x_322; +x_324 = lean::mk_nat_obj(1ul); +x_325 = lean::nat_dec_eq(x_310, x_324); +x_326 = l_Lean_IR_formatFnBody___main(x_0, x_312); +if (x_325 == 0) { -obj* x_330; obj* x_331; obj* x_332; obj* x_333; obj* x_334; obj* x_335; obj* x_336; obj* x_337; obj* x_338; obj* x_339; obj* x_340; obj* x_341; -x_330 = l_Nat_repr(x_313); -x_331 = lean::alloc_cnstr(2, 1, 0); -lean::cnstr_set(x_331, 0, x_330); +obj* x_327; obj* x_328; obj* x_329; obj* x_330; obj* x_331; obj* x_332; obj* x_333; obj* x_334; obj* x_335; obj* x_336; obj* x_337; obj* x_338; +x_327 = l_Nat_repr(x_310); +x_328 = lean::alloc_cnstr(2, 1, 0); +lean::cnstr_set(x_328, 0, x_327); +x_329 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_329, 0, x_323); +lean::cnstr_set(x_329, 1, x_328); +lean::cnstr_set_scalar(x_329, sizeof(void*)*2, x_320); +x_330 = x_329; +x_331 = l_Lean_IR_formatFnBody___main___closed__2; x_332 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_332, 0, x_326); +lean::cnstr_set(x_332, 0, x_330); lean::cnstr_set(x_332, 1, x_331); -lean::cnstr_set_scalar(x_332, sizeof(void*)*2, x_323); +lean::cnstr_set_scalar(x_332, sizeof(void*)*2, x_320); x_333 = x_332; -x_334 = l_Lean_IR_formatFnBody___main___closed__2; +x_334 = lean::box(1); x_335 = lean::alloc_cnstr(4, 2, 1); lean::cnstr_set(x_335, 0, x_333); lean::cnstr_set(x_335, 1, x_334); -lean::cnstr_set_scalar(x_335, sizeof(void*)*2, x_323); +lean::cnstr_set_scalar(x_335, sizeof(void*)*2, x_320); x_336 = x_335; -x_337 = lean::box(1); -x_338 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_338, 0, x_336); -lean::cnstr_set(x_338, 1, x_337); -lean::cnstr_set_scalar(x_338, sizeof(void*)*2, x_323); -x_339 = x_338; -x_340 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_340, 0, x_339); -lean::cnstr_set(x_340, 1, x_329); -lean::cnstr_set_scalar(x_340, sizeof(void*)*2, x_323); -x_341 = x_340; -return x_341; +x_337 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_337, 0, x_336); +lean::cnstr_set(x_337, 1, x_326); +lean::cnstr_set_scalar(x_337, sizeof(void*)*2, x_320); +x_338 = x_337; +return x_338; } else { -obj* x_343; obj* x_344; obj* x_345; obj* x_346; obj* x_347; obj* x_348; obj* x_349; obj* x_350; obj* x_351; obj* x_352; obj* x_353; -lean::dec(x_313); -x_343 = l_Lean_Format_join___closed__1; +obj* x_340; obj* x_341; obj* x_342; obj* x_343; obj* x_344; obj* x_345; obj* x_346; obj* x_347; obj* x_348; obj* x_349; obj* x_350; +lean::dec(x_310); +x_340 = l_Lean_Format_join___closed__1; +x_341 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_341, 0, x_323); +lean::cnstr_set(x_341, 1, x_340); +lean::cnstr_set_scalar(x_341, sizeof(void*)*2, x_320); +x_342 = x_341; +x_343 = l_Lean_IR_formatFnBody___main___closed__2; x_344 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_344, 0, x_326); +lean::cnstr_set(x_344, 0, x_342); lean::cnstr_set(x_344, 1, x_343); -lean::cnstr_set_scalar(x_344, sizeof(void*)*2, x_323); +lean::cnstr_set_scalar(x_344, sizeof(void*)*2, x_320); x_345 = x_344; -x_346 = l_Lean_IR_formatFnBody___main___closed__2; +x_346 = lean::box(1); x_347 = lean::alloc_cnstr(4, 2, 1); lean::cnstr_set(x_347, 0, x_345); lean::cnstr_set(x_347, 1, x_346); -lean::cnstr_set_scalar(x_347, sizeof(void*)*2, x_323); +lean::cnstr_set_scalar(x_347, sizeof(void*)*2, x_320); x_348 = x_347; -x_349 = lean::box(1); -x_350 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_350, 0, x_348); -lean::cnstr_set(x_350, 1, x_349); -lean::cnstr_set_scalar(x_350, sizeof(void*)*2, x_323); -x_351 = x_350; -x_352 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_352, 0, x_351); -lean::cnstr_set(x_352, 1, x_329); -lean::cnstr_set_scalar(x_352, sizeof(void*)*2, x_323); -x_353 = x_352; -return x_353; +x_349 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_349, 0, x_348); +lean::cnstr_set(x_349, 1, x_326); +lean::cnstr_set_scalar(x_349, sizeof(void*)*2, x_320); +x_350 = x_349; +return x_350; } } case 8: { -obj* x_354; obj* x_356; obj* x_359; uint8 x_360; obj* x_361; obj* x_362; obj* x_363; obj* x_364; obj* x_365; obj* x_366; obj* x_367; obj* x_368; obj* x_369; obj* x_370; obj* x_371; obj* x_372; -x_354 = lean::cnstr_get(x_1, 0); -lean::inc(x_354); -x_356 = lean::cnstr_get(x_1, 1); -lean::inc(x_356); +obj* x_351; obj* x_353; obj* x_356; uint8 x_357; obj* x_358; obj* x_359; obj* x_360; obj* x_361; obj* x_362; obj* x_363; obj* x_364; obj* x_365; obj* x_366; obj* x_367; obj* x_368; obj* x_369; +x_351 = lean::cnstr_get(x_1, 0); +lean::inc(x_351); +x_353 = lean::cnstr_get(x_1, 1); +lean::inc(x_353); lean::dec(x_1); -x_359 = l_Lean_formatKVMap(x_354); -x_360 = 0; -x_361 = l_Lean_IR_formatFnBody___main___closed__14; +x_356 = l_Lean_formatKVMap(x_351); +x_357 = 0; +x_358 = l_Lean_IR_formatFnBody___main___closed__13; +x_359 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_359, 0, x_358); +lean::cnstr_set(x_359, 1, x_356); +lean::cnstr_set_scalar(x_359, sizeof(void*)*2, x_357); +x_360 = x_359; +x_361 = l_Lean_IR_formatFnBody___main___closed__2; x_362 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_362, 0, x_361); -lean::cnstr_set(x_362, 1, x_359); -lean::cnstr_set_scalar(x_362, sizeof(void*)*2, x_360); +lean::cnstr_set(x_362, 0, x_360); +lean::cnstr_set(x_362, 1, x_361); +lean::cnstr_set_scalar(x_362, sizeof(void*)*2, x_357); x_363 = x_362; -x_364 = l_Lean_IR_formatFnBody___main___closed__2; +x_364 = lean::box(1); x_365 = lean::alloc_cnstr(4, 2, 1); lean::cnstr_set(x_365, 0, x_363); lean::cnstr_set(x_365, 1, x_364); -lean::cnstr_set_scalar(x_365, sizeof(void*)*2, x_360); +lean::cnstr_set_scalar(x_365, sizeof(void*)*2, x_357); x_366 = x_365; -x_367 = lean::box(1); +x_367 = l_Lean_IR_formatFnBody___main(x_0, x_353); x_368 = lean::alloc_cnstr(4, 2, 1); lean::cnstr_set(x_368, 0, x_366); lean::cnstr_set(x_368, 1, x_367); -lean::cnstr_set_scalar(x_368, sizeof(void*)*2, x_360); +lean::cnstr_set_scalar(x_368, sizeof(void*)*2, x_357); x_369 = x_368; -x_370 = l_Lean_IR_formatFnBody___main(x_0, x_356); -x_371 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_371, 0, x_369); -lean::cnstr_set(x_371, 1, x_370); -lean::cnstr_set_scalar(x_371, sizeof(void*)*2, x_360); -x_372 = x_371; -return x_372; +return x_369; } case 9: { -obj* x_373; obj* x_375; obj* x_378; obj* x_379; obj* x_380; obj* x_382; uint8 x_383; obj* x_384; obj* x_385; obj* x_386; obj* x_387; obj* x_388; obj* x_389; obj* x_390; obj* x_391; obj* x_392; obj* x_394; obj* x_395; -x_373 = lean::cnstr_get(x_1, 1); -lean::inc(x_373); -x_375 = lean::cnstr_get(x_1, 2); -lean::inc(x_375); +obj* x_370; obj* x_372; obj* x_375; obj* x_376; obj* x_377; obj* x_379; uint8 x_380; obj* x_381; obj* x_382; obj* x_383; obj* x_384; obj* x_385; obj* x_386; obj* x_387; obj* x_388; obj* x_389; obj* x_391; obj* x_392; +x_370 = lean::cnstr_get(x_1, 1); +lean::inc(x_370); +x_372 = lean::cnstr_get(x_1, 2); +lean::inc(x_372); lean::dec(x_1); -x_378 = l_Nat_repr(x_373); -x_379 = l_Lean_IR_VarId_HasToString___closed__1; -x_380 = lean::string_append(x_379, x_378); -lean::dec(x_378); -x_382 = lean::alloc_cnstr(2, 1, 0); -lean::cnstr_set(x_382, 0, x_380); -x_383 = 0; +x_375 = l_Nat_repr(x_370); +x_376 = l_Lean_IR_VarId_HasToString___closed__1; +x_377 = lean::string_append(x_376, x_375); +lean::dec(x_375); +x_379 = lean::alloc_cnstr(2, 1, 0); +lean::cnstr_set(x_379, 0, x_377); +x_380 = 0; +x_381 = l_Lean_IR_formatFnBody___main___closed__14; +x_382 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_382, 0, x_381); +lean::cnstr_set(x_382, 1, x_379); +lean::cnstr_set_scalar(x_382, sizeof(void*)*2, x_380); +x_383 = x_382; x_384 = l_Lean_IR_formatFnBody___main___closed__15; x_385 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_385, 0, x_384); -lean::cnstr_set(x_385, 1, x_382); -lean::cnstr_set_scalar(x_385, sizeof(void*)*2, x_383); +lean::cnstr_set(x_385, 0, x_383); +lean::cnstr_set(x_385, 1, x_384); +lean::cnstr_set_scalar(x_385, sizeof(void*)*2, x_380); x_386 = x_385; -x_387 = l_Lean_IR_formatFnBody___main___closed__16; -x_388 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_388, 0, x_386); -lean::cnstr_set(x_388, 1, x_387); -lean::cnstr_set_scalar(x_388, sizeof(void*)*2, x_383); -x_389 = x_388; -x_390 = lean::mk_nat_obj(0ul); -x_391 = lean::box(0); -x_392 = l_Array_miterateAux___main___at_Lean_IR_formatFnBody___main___spec__3(x_0, x_375, x_375, x_390, x_391); -lean::dec(x_375); -x_394 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_394, 0, x_389); -lean::cnstr_set(x_394, 1, x_392); -lean::cnstr_set_scalar(x_394, sizeof(void*)*2, x_383); -x_395 = x_394; -return x_395; +x_387 = lean::mk_nat_obj(0ul); +x_388 = lean::box(0); +x_389 = l_Array_miterateAux___main___at_Lean_IR_formatFnBody___main___spec__3(x_0, x_372, x_372, x_387, x_388); +lean::dec(x_372); +x_391 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_391, 0, x_386); +lean::cnstr_set(x_391, 1, x_389); +lean::cnstr_set_scalar(x_391, sizeof(void*)*2, x_380); +x_392 = x_391; +return x_392; } case 10: { -obj* x_397; obj* x_400; uint8 x_401; obj* x_402; obj* x_403; obj* x_404; +obj* x_394; obj* x_397; uint8 x_398; obj* x_399; obj* x_400; obj* x_401; lean::dec(x_0); -x_397 = lean::cnstr_get(x_1, 0); -lean::inc(x_397); +x_394 = lean::cnstr_get(x_1, 0); +lean::inc(x_394); lean::dec(x_1); -x_400 = l___private_init_lean_compiler_ir_15__formatArg___main(x_397); -x_401 = 0; -x_402 = l_Lean_IR_formatFnBody___main___closed__17; -x_403 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_403, 0, x_402); -lean::cnstr_set(x_403, 1, x_400); -lean::cnstr_set_scalar(x_403, sizeof(void*)*2, x_401); -x_404 = x_403; -return x_404; +x_397 = l___private_init_lean_compiler_ir_15__formatArg___main(x_394); +x_398 = 0; +x_399 = l_Lean_IR_formatFnBody___main___closed__16; +x_400 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_400, 0, x_399); +lean::cnstr_set(x_400, 1, x_397); +lean::cnstr_set_scalar(x_400, sizeof(void*)*2, x_398); +x_401 = x_400; +return x_401; } case 11: { -obj* x_406; obj* x_408; obj* x_411; obj* x_412; obj* x_413; obj* x_415; uint8 x_416; obj* x_417; obj* x_418; obj* x_419; obj* x_420; obj* x_421; obj* x_422; obj* x_424; obj* x_425; +obj* x_403; obj* x_405; obj* x_408; obj* x_409; obj* x_410; obj* x_412; uint8 x_413; obj* x_414; obj* x_415; obj* x_416; obj* x_417; obj* x_418; obj* x_419; obj* x_421; obj* x_422; lean::dec(x_0); -x_406 = lean::cnstr_get(x_1, 0); -lean::inc(x_406); -x_408 = lean::cnstr_get(x_1, 1); -lean::inc(x_408); +x_403 = lean::cnstr_get(x_1, 0); +lean::inc(x_403); +x_405 = lean::cnstr_get(x_1, 1); +lean::inc(x_405); lean::dec(x_1); -x_411 = l_Nat_repr(x_406); -x_412 = l_Lean_IR_JoinPointId_HasToString___closed__1; -x_413 = lean::string_append(x_412, x_411); -lean::dec(x_411); -x_415 = lean::alloc_cnstr(2, 1, 0); -lean::cnstr_set(x_415, 0, x_413); -x_416 = 0; -x_417 = l_Lean_IR_formatFnBody___main___closed__18; -x_418 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_418, 0, x_417); -lean::cnstr_set(x_418, 1, x_415); -lean::cnstr_set_scalar(x_418, sizeof(void*)*2, x_416); -x_419 = x_418; -x_420 = lean::mk_nat_obj(0ul); -x_421 = lean::box(0); -x_422 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_19__formatExpr___main___spec__2(x_408, x_408, x_420, x_421); +x_408 = l_Nat_repr(x_403); +x_409 = l_Lean_IR_JoinPointId_HasToString___closed__1; +x_410 = lean::string_append(x_409, x_408); lean::dec(x_408); -x_424 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_424, 0, x_419); -lean::cnstr_set(x_424, 1, x_422); -lean::cnstr_set_scalar(x_424, sizeof(void*)*2, x_416); -x_425 = x_424; -return x_425; +x_412 = lean::alloc_cnstr(2, 1, 0); +lean::cnstr_set(x_412, 0, x_410); +x_413 = 0; +x_414 = l_Lean_IR_formatFnBody___main___closed__17; +x_415 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_415, 0, x_414); +lean::cnstr_set(x_415, 1, x_412); +lean::cnstr_set_scalar(x_415, sizeof(void*)*2, x_413); +x_416 = x_415; +x_417 = lean::mk_nat_obj(0ul); +x_418 = lean::box(0); +x_419 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_19__formatExpr___main___spec__2(x_405, x_405, x_417, x_418); +lean::dec(x_405); +x_421 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_421, 0, x_416); +lean::cnstr_set(x_421, 1, x_419); +lean::cnstr_set_scalar(x_421, sizeof(void*)*2, x_413); +x_422 = x_421; +return x_422; } default: { -obj* x_427; +obj* x_424; lean::dec(x_0); -x_427 = l_Lean_IR_formatFnBody___main___closed__19; -return x_427; +x_424 = l_Lean_IR_formatFnBody___main___closed__18; +return x_424; } } } @@ -11103,7 +11488,7 @@ lean::cnstr_set(x_27, 0, x_25); lean::cnstr_set(x_27, 1, x_26); lean::cnstr_set_scalar(x_27, sizeof(void*)*2, x_13); x_28 = x_27; -x_29 = l_Lean_IR_formatFnBody___main___closed__4; +x_29 = l_Lean_IR_formatFnBody___main___closed__3; x_30 = lean::alloc_cnstr(4, 2, 1); lean::cnstr_set(x_30, 0, x_28); lean::cnstr_set(x_30, 1, x_29); @@ -12272,6 +12657,763 @@ x_2 = l_Lean_IR_MaxVar_collectDecl___main(x_0, x_1); return x_2; } } +uint8 l_Lean_IR_HasIndex_visitVar(obj* x_0, obj* x_1) { +_start: +{ +uint8 x_2; +x_2 = lean::nat_dec_eq(x_0, x_1); +return x_2; +} +} +obj* l_Lean_IR_HasIndex_visitVar___boxed(obj* x_0, obj* x_1) { +_start: +{ +uint8 x_2; obj* x_3; +x_2 = l_Lean_IR_HasIndex_visitVar(x_0, x_1); +x_3 = lean::box(x_2); +lean::dec(x_0); +lean::dec(x_1); +return x_3; +} +} +uint8 l_Lean_IR_HasIndex_visitJP(obj* x_0, obj* x_1) { +_start: +{ +uint8 x_2; +x_2 = lean::nat_dec_eq(x_0, x_1); +return x_2; +} +} +obj* l_Lean_IR_HasIndex_visitJP___boxed(obj* x_0, obj* x_1) { +_start: +{ +uint8 x_2; obj* x_3; +x_2 = l_Lean_IR_HasIndex_visitJP(x_0, x_1); +x_3 = lean::box(x_2); +lean::dec(x_0); +lean::dec(x_1); +return x_3; +} +} +uint8 l_Lean_IR_HasIndex_visitArg___main(obj* x_0, obj* x_1) { +_start: +{ +if (lean::obj_tag(x_1) == 0) +{ +obj* x_2; uint8 x_3; +x_2 = lean::cnstr_get(x_1, 0); +x_3 = lean::nat_dec_eq(x_0, x_2); +return x_3; +} +else +{ +uint8 x_4; +x_4 = 0; +return x_4; +} +} +} +obj* l_Lean_IR_HasIndex_visitArg___main___boxed(obj* x_0, obj* x_1) { +_start: +{ +uint8 x_2; obj* x_3; +x_2 = l_Lean_IR_HasIndex_visitArg___main(x_0, x_1); +x_3 = lean::box(x_2); +lean::dec(x_0); +lean::dec(x_1); +return x_3; +} +} +uint8 l_Lean_IR_HasIndex_visitArg(obj* x_0, obj* x_1) { +_start: +{ +uint8 x_2; +x_2 = l_Lean_IR_HasIndex_visitArg___main(x_0, x_1); +return x_2; +} +} +obj* l_Lean_IR_HasIndex_visitArg___boxed(obj* x_0, obj* x_1) { +_start: +{ +uint8 x_2; obj* x_3; +x_2 = l_Lean_IR_HasIndex_visitArg(x_0, x_1); +x_3 = lean::box(x_2); +lean::dec(x_0); +lean::dec(x_1); +return x_3; +} +} +uint8 l_Array_anyAux___main___at_Lean_IR_HasIndex_visitArgs___spec__1(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +obj* x_3; uint8 x_4; +x_3 = lean::array_get_size(x_1); +x_4 = lean::nat_dec_lt(x_2, x_3); +lean::dec(x_3); +if (x_4 == 0) +{ +uint8 x_7; +lean::dec(x_2); +x_7 = 0; +return x_7; +} +else +{ +obj* x_8; uint8 x_9; +x_8 = lean::array_fget(x_1, x_2); +x_9 = l_Lean_IR_HasIndex_visitArg___main(x_0, x_8); +lean::dec(x_8); +if (x_9 == 0) +{ +obj* x_11; obj* x_12; +x_11 = lean::mk_nat_obj(1ul); +x_12 = lean::nat_add(x_2, x_11); +lean::dec(x_2); +x_2 = x_12; +goto _start; +} +else +{ +uint8 x_16; +lean::dec(x_2); +x_16 = 1; +return x_16; +} +} +} +} +uint8 l_Lean_IR_HasIndex_visitArgs(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; uint8 x_3; +x_2 = lean::mk_nat_obj(0ul); +x_3 = l_Array_anyAux___main___at_Lean_IR_HasIndex_visitArgs___spec__1(x_0, x_1, x_2); +return x_3; +} +} +obj* l_Array_anyAux___main___at_Lean_IR_HasIndex_visitArgs___spec__1___boxed(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +uint8 x_3; obj* x_4; +x_3 = l_Array_anyAux___main___at_Lean_IR_HasIndex_visitArgs___spec__1(x_0, x_1, x_2); +x_4 = lean::box(x_3); +lean::dec(x_0); +lean::dec(x_1); +return x_4; +} +} +obj* l_Lean_IR_HasIndex_visitArgs___boxed(obj* x_0, obj* x_1) { +_start: +{ +uint8 x_2; obj* x_3; +x_2 = l_Lean_IR_HasIndex_visitArgs(x_0, x_1); +x_3 = lean::box(x_2); +lean::dec(x_0); +lean::dec(x_1); +return x_3; +} +} +uint8 l_Array_anyAux___main___at_Lean_IR_HasIndex_visitParams___spec__1(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +obj* x_3; uint8 x_4; +x_3 = lean::array_get_size(x_1); +x_4 = lean::nat_dec_lt(x_2, x_3); +lean::dec(x_3); +if (x_4 == 0) +{ +uint8 x_7; +lean::dec(x_2); +x_7 = 0; +return x_7; +} +else +{ +obj* x_8; obj* x_9; uint8 x_12; +x_8 = lean::array_fget(x_1, x_2); +x_9 = lean::cnstr_get(x_8, 0); +lean::inc(x_9); +lean::dec(x_8); +x_12 = lean::nat_dec_eq(x_0, x_9); +lean::dec(x_9); +if (x_12 == 0) +{ +obj* x_14; obj* x_15; +x_14 = lean::mk_nat_obj(1ul); +x_15 = lean::nat_add(x_2, x_14); +lean::dec(x_2); +x_2 = x_15; +goto _start; +} +else +{ +uint8 x_19; +lean::dec(x_2); +x_19 = 1; +return x_19; +} +} +} +} +uint8 l_Lean_IR_HasIndex_visitParams(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; uint8 x_3; +x_2 = lean::mk_nat_obj(0ul); +x_3 = l_Array_anyAux___main___at_Lean_IR_HasIndex_visitParams___spec__1(x_0, x_1, x_2); +return x_3; +} +} +obj* l_Array_anyAux___main___at_Lean_IR_HasIndex_visitParams___spec__1___boxed(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +uint8 x_3; obj* x_4; +x_3 = l_Array_anyAux___main___at_Lean_IR_HasIndex_visitParams___spec__1(x_0, x_1, x_2); +x_4 = lean::box(x_3); +lean::dec(x_0); +lean::dec(x_1); +return x_4; +} +} +obj* l_Lean_IR_HasIndex_visitParams___boxed(obj* x_0, obj* x_1) { +_start: +{ +uint8 x_2; obj* x_3; +x_2 = l_Lean_IR_HasIndex_visitParams(x_0, x_1); +x_3 = lean::box(x_2); +lean::dec(x_0); +lean::dec(x_1); +return x_3; +} +} +uint8 l_Lean_IR_HasIndex_visitExpr___main(obj* x_0, obj* x_1) { +_start: +{ +switch (lean::obj_tag(x_1)) { +case 0: +{ +obj* x_2; obj* x_3; uint8 x_4; +x_2 = lean::cnstr_get(x_1, 1); +x_3 = lean::mk_nat_obj(0ul); +x_4 = l_Array_anyAux___main___at_Lean_IR_HasIndex_visitArgs___spec__1(x_0, x_2, x_3); +return x_4; +} +case 2: +{ +obj* x_5; obj* x_6; uint8 x_7; +x_5 = lean::cnstr_get(x_1, 0); +x_6 = lean::cnstr_get(x_1, 2); +x_7 = lean::nat_dec_eq(x_0, x_5); +if (x_7 == 0) +{ +obj* x_8; uint8 x_9; +x_8 = lean::mk_nat_obj(0ul); +x_9 = l_Array_anyAux___main___at_Lean_IR_HasIndex_visitArgs___spec__1(x_0, x_6, x_8); +return x_9; +} +else +{ +uint8 x_10; +x_10 = 1; +return x_10; +} +} +case 3: +{ +obj* x_11; uint8 x_12; +x_11 = lean::cnstr_get(x_1, 1); +x_12 = lean::nat_dec_eq(x_0, x_11); +return x_12; +} +case 4: +{ +obj* x_13; uint8 x_14; +x_13 = lean::cnstr_get(x_1, 1); +x_14 = lean::nat_dec_eq(x_0, x_13); +return x_14; +} +case 5: +{ +obj* x_15; uint8 x_16; +x_15 = lean::cnstr_get(x_1, 2); +x_16 = lean::nat_dec_eq(x_0, x_15); +return x_16; +} +case 6: +{ +obj* x_17; obj* x_18; uint8 x_19; +x_17 = lean::cnstr_get(x_1, 1); +x_18 = lean::mk_nat_obj(0ul); +x_19 = l_Array_anyAux___main___at_Lean_IR_HasIndex_visitArgs___spec__1(x_0, x_17, x_18); +return x_19; +} +case 7: +{ +obj* x_20; obj* x_21; uint8 x_22; +x_20 = lean::cnstr_get(x_1, 1); +x_21 = lean::mk_nat_obj(0ul); +x_22 = l_Array_anyAux___main___at_Lean_IR_HasIndex_visitArgs___spec__1(x_0, x_20, x_21); +return x_22; +} +case 8: +{ +obj* x_23; obj* x_24; uint8 x_25; +x_23 = lean::cnstr_get(x_1, 0); +x_24 = lean::cnstr_get(x_1, 1); +x_25 = lean::nat_dec_eq(x_0, x_23); +if (x_25 == 0) +{ +obj* x_26; uint8 x_27; +x_26 = lean::mk_nat_obj(0ul); +x_27 = l_Array_anyAux___main___at_Lean_IR_HasIndex_visitArgs___spec__1(x_0, x_24, x_26); +return x_27; +} +else +{ +uint8 x_28; +x_28 = 1; +return x_28; +} +} +case 11: +{ +uint8 x_29; +x_29 = 0; +return x_29; +} +default: +{ +obj* x_30; uint8 x_31; +x_30 = lean::cnstr_get(x_1, 0); +x_31 = lean::nat_dec_eq(x_0, x_30); +return x_31; +} +} +} +} +obj* l_Lean_IR_HasIndex_visitExpr___main___boxed(obj* x_0, obj* x_1) { +_start: +{ +uint8 x_2; obj* x_3; +x_2 = l_Lean_IR_HasIndex_visitExpr___main(x_0, x_1); +x_3 = lean::box(x_2); +lean::dec(x_0); +lean::dec(x_1); +return x_3; +} +} +uint8 l_Lean_IR_HasIndex_visitExpr(obj* x_0, obj* x_1) { +_start: +{ +uint8 x_2; +x_2 = l_Lean_IR_HasIndex_visitExpr___main(x_0, x_1); +return x_2; +} +} +obj* l_Lean_IR_HasIndex_visitExpr___boxed(obj* x_0, obj* x_1) { +_start: +{ +uint8 x_2; obj* x_3; +x_2 = l_Lean_IR_HasIndex_visitExpr(x_0, x_1); +x_3 = lean::box(x_2); +lean::dec(x_0); +lean::dec(x_1); +return x_3; +} +} +uint8 l_Array_anyAux___main___at_Lean_IR_HasIndex_visitFnBody___main___spec__1(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +obj* x_3; uint8 x_4; +x_3 = lean::array_get_size(x_1); +x_4 = lean::nat_dec_lt(x_2, x_3); +lean::dec(x_3); +if (x_4 == 0) +{ +uint8 x_7; +lean::dec(x_2); +x_7 = 0; +return x_7; +} +else +{ +obj* x_8; obj* x_9; uint8 x_11; +x_8 = lean::array_fget(x_1, x_2); +x_9 = l_Lean_IR_AltCore_body___main(x_8); +lean::dec(x_8); +x_11 = l_Lean_IR_HasIndex_visitFnBody___main(x_0, x_9); +lean::dec(x_9); +if (x_11 == 0) +{ +obj* x_13; obj* x_14; +x_13 = lean::mk_nat_obj(1ul); +x_14 = lean::nat_add(x_2, x_13); +lean::dec(x_2); +x_2 = x_14; +goto _start; +} +else +{ +uint8 x_18; +lean::dec(x_2); +x_18 = 1; +return x_18; +} +} +} +} +uint8 l_Lean_IR_HasIndex_visitFnBody___main(obj* x_0, obj* x_1) { +_start: +{ +switch (lean::obj_tag(x_1)) { +case 0: +{ +obj* x_2; obj* x_3; obj* x_4; uint8 x_5; +x_2 = lean::cnstr_get(x_1, 0); +x_3 = lean::cnstr_get(x_1, 1); +x_4 = lean::cnstr_get(x_1, 2); +x_5 = l_Lean_IR_HasIndex_visitExpr___main(x_0, x_3); +if (x_5 == 0) +{ +uint8 x_6; +x_6 = lean::nat_dec_eq(x_0, x_2); +if (x_6 == 0) +{ +x_1 = x_4; +goto _start; +} +else +{ +return x_5; +} +} +else +{ +uint8 x_8; +x_8 = 1; +return x_8; +} +} +case 1: +{ +obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; uint8 x_14; +x_9 = lean::cnstr_get(x_1, 0); +x_10 = lean::cnstr_get(x_1, 1); +x_11 = lean::cnstr_get(x_1, 2); +x_12 = lean::cnstr_get(x_1, 3); +x_13 = lean::mk_nat_obj(0ul); +x_14 = l_Array_anyAux___main___at_Lean_IR_HasIndex_visitParams___spec__1(x_0, x_10, x_13); +if (x_14 == 0) +{ +uint8 x_15; +x_15 = l_Lean_IR_HasIndex_visitFnBody___main(x_0, x_11); +if (x_15 == 0) +{ +uint8 x_16; +x_16 = lean::nat_dec_eq(x_0, x_9); +if (x_16 == 0) +{ +x_1 = x_12; +goto _start; +} +else +{ +return x_15; +} +} +else +{ +uint8 x_18; +x_18 = 1; +return x_18; +} +} +else +{ +uint8 x_19; +x_19 = lean::nat_dec_eq(x_0, x_9); +if (x_19 == 0) +{ +x_1 = x_12; +goto _start; +} +else +{ +uint8 x_21; +x_21 = 0; +return x_21; +} +} +} +case 2: +{ +obj* x_22; obj* x_23; obj* x_24; uint8 x_25; +x_22 = lean::cnstr_get(x_1, 0); +x_23 = lean::cnstr_get(x_1, 2); +x_24 = lean::cnstr_get(x_1, 3); +x_25 = lean::nat_dec_eq(x_0, x_22); +if (x_25 == 0) +{ +uint8 x_26; +x_26 = lean::nat_dec_eq(x_0, x_23); +if (x_26 == 0) +{ +x_1 = x_24; +goto _start; +} +else +{ +uint8 x_28; +x_28 = 1; +return x_28; +} +} +else +{ +uint8 x_29; +x_29 = 1; +return x_29; +} +} +case 3: +{ +obj* x_30; obj* x_31; obj* x_32; uint8 x_33; +x_30 = lean::cnstr_get(x_1, 0); +x_31 = lean::cnstr_get(x_1, 2); +x_32 = lean::cnstr_get(x_1, 3); +x_33 = lean::nat_dec_eq(x_0, x_30); +if (x_33 == 0) +{ +uint8 x_34; +x_34 = lean::nat_dec_eq(x_0, x_31); +if (x_34 == 0) +{ +x_1 = x_32; +goto _start; +} +else +{ +uint8 x_36; +x_36 = 1; +return x_36; +} +} +else +{ +uint8 x_37; +x_37 = 1; +return x_37; +} +} +case 4: +{ +obj* x_38; obj* x_39; obj* x_40; uint8 x_41; +x_38 = lean::cnstr_get(x_1, 0); +x_39 = lean::cnstr_get(x_1, 3); +x_40 = lean::cnstr_get(x_1, 4); +x_41 = lean::nat_dec_eq(x_0, x_38); +if (x_41 == 0) +{ +uint8 x_42; +x_42 = lean::nat_dec_eq(x_0, x_39); +if (x_42 == 0) +{ +x_1 = x_40; +goto _start; +} +else +{ +uint8 x_44; +x_44 = 1; +return x_44; +} +} +else +{ +uint8 x_45; +x_45 = 1; +return x_45; +} +} +case 8: +{ +obj* x_46; +x_46 = lean::cnstr_get(x_1, 1); +x_1 = x_46; +goto _start; +} +case 9: +{ +obj* x_48; obj* x_49; uint8 x_50; +x_48 = lean::cnstr_get(x_1, 1); +x_49 = lean::cnstr_get(x_1, 2); +x_50 = lean::nat_dec_eq(x_0, x_48); +if (x_50 == 0) +{ +obj* x_51; uint8 x_52; +x_51 = lean::mk_nat_obj(0ul); +x_52 = l_Array_anyAux___main___at_Lean_IR_HasIndex_visitFnBody___main___spec__1(x_0, x_49, x_51); +return x_52; +} +else +{ +uint8 x_53; +x_53 = 1; +return x_53; +} +} +case 10: +{ +obj* x_54; uint8 x_55; +x_54 = lean::cnstr_get(x_1, 0); +x_55 = l_Lean_IR_HasIndex_visitArg___main(x_0, x_54); +return x_55; +} +case 11: +{ +obj* x_56; obj* x_57; uint8 x_58; +x_56 = lean::cnstr_get(x_1, 0); +x_57 = lean::cnstr_get(x_1, 1); +x_58 = lean::nat_dec_eq(x_0, x_56); +if (x_58 == 0) +{ +obj* x_59; uint8 x_60; +x_59 = lean::mk_nat_obj(0ul); +x_60 = l_Array_anyAux___main___at_Lean_IR_HasIndex_visitArgs___spec__1(x_0, x_57, x_59); +return x_60; +} +else +{ +uint8 x_61; +x_61 = 1; +return x_61; +} +} +case 12: +{ +uint8 x_62; +x_62 = 0; +return x_62; +} +default: +{ +obj* x_63; obj* x_64; uint8 x_65; +x_63 = lean::cnstr_get(x_1, 0); +x_64 = lean::cnstr_get(x_1, 2); +x_65 = lean::nat_dec_eq(x_0, x_63); +if (x_65 == 0) +{ +x_1 = x_64; +goto _start; +} +else +{ +uint8 x_67; +x_67 = 1; +return x_67; +} +} +} +} +} +obj* l_Array_anyAux___main___at_Lean_IR_HasIndex_visitFnBody___main___spec__1___boxed(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +uint8 x_3; obj* x_4; +x_3 = l_Array_anyAux___main___at_Lean_IR_HasIndex_visitFnBody___main___spec__1(x_0, x_1, x_2); +x_4 = lean::box(x_3); +lean::dec(x_0); +lean::dec(x_1); +return x_4; +} +} +obj* l_Lean_IR_HasIndex_visitFnBody___main___boxed(obj* x_0, obj* x_1) { +_start: +{ +uint8 x_2; obj* x_3; +x_2 = l_Lean_IR_HasIndex_visitFnBody___main(x_0, x_1); +x_3 = lean::box(x_2); +lean::dec(x_0); +lean::dec(x_1); +return x_3; +} +} +uint8 l_Lean_IR_HasIndex_visitFnBody(obj* x_0, obj* x_1) { +_start: +{ +uint8 x_2; +x_2 = l_Lean_IR_HasIndex_visitFnBody___main(x_0, x_1); +return x_2; +} +} +obj* l_Lean_IR_HasIndex_visitFnBody___boxed(obj* x_0, obj* x_1) { +_start: +{ +uint8 x_2; obj* x_3; +x_2 = l_Lean_IR_HasIndex_visitFnBody(x_0, x_1); +x_3 = lean::box(x_2); +lean::dec(x_0); +lean::dec(x_1); +return x_3; +} +} +uint8 l_Lean_IR_Arg_hasFreeVar(obj* x_0, obj* x_1) { +_start: +{ +uint8 x_2; +x_2 = l_Lean_IR_HasIndex_visitArg___main(x_1, x_0); +return x_2; +} +} +obj* l_Lean_IR_Arg_hasFreeVar___boxed(obj* x_0, obj* x_1) { +_start: +{ +uint8 x_2; obj* x_3; +x_2 = l_Lean_IR_Arg_hasFreeVar(x_0, x_1); +x_3 = lean::box(x_2); +lean::dec(x_0); +lean::dec(x_1); +return x_3; +} +} +uint8 l_Lean_IR_Expr_hasFreeVar(obj* x_0, obj* x_1) { +_start: +{ +uint8 x_2; +x_2 = l_Lean_IR_HasIndex_visitExpr___main(x_1, x_0); +return x_2; +} +} +obj* l_Lean_IR_Expr_hasFreeVar___boxed(obj* x_0, obj* x_1) { +_start: +{ +uint8 x_2; obj* x_3; +x_2 = l_Lean_IR_Expr_hasFreeVar(x_0, x_1); +x_3 = lean::box(x_2); +lean::dec(x_0); +lean::dec(x_1); +return x_3; +} +} +uint8 l_Lean_IR_FnBody_hasFreeVar(obj* x_0, obj* x_1) { +_start: +{ +uint8 x_2; +x_2 = l_Lean_IR_HasIndex_visitFnBody___main(x_1, x_0); +return x_2; +} +} +obj* l_Lean_IR_FnBody_hasFreeVar___boxed(obj* x_0, obj* x_1) { +_start: +{ +uint8 x_2; obj* x_3; +x_2 = l_Lean_IR_FnBody_hasFreeVar(x_0, x_1); +x_3 = lean::box(x_2); +lean::dec(x_0); +lean::dec(x_1); +return x_3; +} +} obj* initialize_init_lean_name(obj*); obj* initialize_init_lean_kvmap(obj*); obj* initialize_init_lean_format(obj*); @@ -12307,10 +13449,14 @@ lean::mark_persistent(l_Lean_IR_LitVal_HasBeq); lean::mark_persistent(l_Lean_IR_CtorInfo_HasBeq); l_Lean_IR_Inhabited = _init_l_Lean_IR_Inhabited(); lean::mark_persistent(l_Lean_IR_Inhabited); + l_Lean_IR_FnBody_nil = _init_l_Lean_IR_FnBody_nil(); +lean::mark_persistent(l_Lean_IR_FnBody_nil); lean::ir::mk_unreachable_core = lean::ir::_init_mk_unreachable_core(); lean::mark_persistent(lean::ir::mk_unreachable_core); l_Lean_IR_altInh = _init_l_Lean_IR_altInh(); lean::mark_persistent(l_Lean_IR_altInh); + l_Lean_IR_AltCore_mmodifyBody___main___rarg___closed__1 = _init_l_Lean_IR_AltCore_mmodifyBody___main___rarg___closed__1(); +lean::mark_persistent(l_Lean_IR_AltCore_mmodifyBody___main___rarg___closed__1); l_Lean_IR_VarId_hasAeqv = _init_l_Lean_IR_VarId_hasAeqv(); lean::mark_persistent(l_Lean_IR_VarId_hasAeqv); l_Lean_IR_Arg_hasAeqv = _init_l_Lean_IR_Arg_hasAeqv(); @@ -12433,8 +13579,6 @@ lean::mark_persistent(l_Lean_IR_formatFnBody___main___closed__16); lean::mark_persistent(l_Lean_IR_formatFnBody___main___closed__17); l_Lean_IR_formatFnBody___main___closed__18 = _init_l_Lean_IR_formatFnBody___main___closed__18(); lean::mark_persistent(l_Lean_IR_formatFnBody___main___closed__18); - l_Lean_IR_formatFnBody___main___closed__19 = _init_l_Lean_IR_formatFnBody___main___closed__19(); -lean::mark_persistent(l_Lean_IR_formatFnBody___main___closed__19); l_Lean_IR_fnBodyHasFormat = _init_l_Lean_IR_fnBodyHasFormat(); lean::mark_persistent(l_Lean_IR_fnBodyHasFormat); l_Lean_IR_formatDecl___main___closed__1 = _init_l_Lean_IR_formatDecl___main___closed__1(); diff --git a/src/stage0/init/lean/compiler/pushproj.cpp b/src/stage0/init/lean/compiler/pushproj.cpp index 26d61099a3..a8547a12aa 100644 --- a/src/stage0/init/lean/compiler/pushproj.cpp +++ b/src/stage0/init/lean/compiler/pushproj.cpp @@ -1,6 +1,6 @@ // Lean compiler output // Module: init.lean.compiler.pushproj -// Imports: init.default init.lean.compiler.ir +// Imports: init.lean.compiler.ir #include "runtime/object.h" #include "runtime/apply.h" typedef lean::object obj; typedef lean::usize usize; @@ -312,140 +312,138 @@ uint8 x_5; x_5 = l_Array_isEmpty___rarg(x_0); if (x_5 == 0) { -obj* x_6; obj* x_7; +obj* x_6; obj* x_7; obj* x_8; obj* x_10; x_6 = l_Array_back___at_Lean_IR_pushProjs___main___spec__1(x_0); x_7 = lean::array_pop(x_0); switch (lean::obj_tag(x_6)) { case 0: { -obj* x_8; -x_8 = lean::cnstr_get(x_6, 1); -lean::inc(x_8); -switch (lean::obj_tag(x_8)) { +obj* x_12; +x_12 = lean::cnstr_get(x_6, 1); +lean::inc(x_12); +switch (lean::obj_tag(x_12)) { case 3: { -obj* x_11; obj* x_14; -lean::dec(x_8); -x_11 = lean::cnstr_get(x_6, 0); -lean::inc(x_11); +obj* x_15; obj* x_18; +lean::dec(x_12); +x_15 = lean::cnstr_get(x_6, 0); +lean::inc(x_15); lean::inc(x_4); -x_14 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_2__collectIndex___spec__1(x_4, x_11); -if (lean::obj_tag(x_14) == 0) +x_18 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_2__collectIndex___spec__1(x_4, x_15); +if (lean::obj_tag(x_18) == 0) { -obj* x_15; obj* x_16; uint8 x_17; -x_15 = l_Lean_IR_pushProjs___main___closed__1; -x_16 = lean::mk_nat_obj(0ul); -x_17 = l_Array_anyAux___main___at_Lean_IR_pushProjs___main___spec__2(x_15, x_11, x_2, x_16); -if (x_17 == 0) +obj* x_19; obj* x_20; uint8 x_21; +x_19 = l_Lean_IR_pushProjs___main___closed__1; +x_20 = lean::mk_nat_obj(0ul); +x_21 = l_Array_anyAux___main___at_Lean_IR_pushProjs___main___spec__2(x_19, x_15, x_2, x_20); +if (x_21 == 0) { -obj* x_20; obj* x_21; -lean::dec(x_11); -lean::inc(x_6); -x_20 = lean::array_push(x_3, x_6); -x_21 = l_Lean_IR_FnBody_collectFreeVars(x_6, x_4); -x_0 = x_7; -x_3 = x_20; -x_4 = x_21; -goto _start; +obj* x_23; +lean::dec(x_15); +x_23 = lean::box(0); +x_10 = x_23; +goto lbl_11; } else { -obj* x_24; obj* x_25; +obj* x_25; obj* x_26; lean::inc(x_6); -x_24 = l_Array_hmmapAux___main___at_Lean_IR_pushProjs___main___spec__3(x_2, x_6, x_15, x_11, x_16, x_1); -x_25 = l_Array_hmmapAux___main___at_Lean_IR_pushProjs___main___spec__4(x_6, x_15, x_11, x_16, x_2); -lean::dec(x_11); +x_25 = l_Array_hmmapAux___main___at_Lean_IR_pushProjs___main___spec__3(x_2, x_6, x_19, x_15, x_20, x_1); +x_26 = l_Array_hmmapAux___main___at_Lean_IR_pushProjs___main___spec__4(x_6, x_19, x_15, x_20, x_2); +lean::dec(x_15); x_0 = x_7; -x_1 = x_24; -x_2 = x_25; +x_1 = x_25; +x_2 = x_26; goto _start; } } else { -obj* x_31; obj* x_32; -lean::dec(x_11); -lean::dec(x_14); -lean::inc(x_6); -x_31 = lean::array_push(x_3, x_6); -x_32 = l_Lean_IR_FnBody_collectFreeVars(x_6, x_4); -x_0 = x_7; -x_3 = x_31; -x_4 = x_32; -goto _start; +obj* x_31; +lean::dec(x_15); +lean::dec(x_18); +x_31 = lean::box(0); +x_10 = x_31; +goto lbl_11; } } case 4: { -obj* x_36; obj* x_37; -lean::dec(x_8); -lean::inc(x_6); -x_36 = lean::array_push(x_3, x_6); -x_37 = l_Lean_IR_FnBody_collectFreeVars(x_6, x_4); -x_0 = x_7; -x_3 = x_36; -x_4 = x_37; -goto _start; +obj* x_33; +lean::dec(x_12); +x_33 = lean::box(0); +x_10 = x_33; +goto lbl_11; } case 5: { -obj* x_41; obj* x_42; +obj* x_35; +lean::dec(x_12); +x_35 = lean::box(0); +x_10 = x_35; +goto lbl_11; +} +default: +{ +obj* x_39; +lean::dec(x_12); +lean::dec(x_4); +lean::dec(x_2); +x_39 = lean::box(0); +x_8 = x_39; +goto lbl_9; +} +} +} +default: +{ +obj* x_42; +lean::dec(x_4); +lean::dec(x_2); +x_42 = lean::box(0); +x_8 = x_42; +goto lbl_9; +} +} +lbl_9: +{ +obj* x_44; obj* x_45; obj* x_46; obj* x_47; obj* x_49; lean::dec(x_8); +x_44 = lean::array_push(x_7, x_6); +x_45 = lean::mk_nat_obj(0ul); +x_46 = l_Array_reverseAux___main___rarg(x_3, x_45); +x_47 = l_Array_miterateAux___main___at_Array_append___spec__1___rarg(x_46, x_46, x_45, x_44); +lean::dec(x_46); +x_49 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_49, 0, x_47); +lean::cnstr_set(x_49, 1, x_1); +return x_49; +} +lbl_11: +{ +obj* x_52; obj* x_53; +lean::dec(x_10); lean::inc(x_6); -x_41 = lean::array_push(x_3, x_6); -x_42 = l_Lean_IR_FnBody_collectFreeVars(x_6, x_4); +x_52 = lean::array_push(x_3, x_6); +x_53 = l_Lean_IR_FnBody_collectFreeVars(x_6, x_4); x_0 = x_7; -x_3 = x_41; -x_4 = x_42; +x_3 = x_52; +x_4 = x_53; goto _start; } -default: -{ -obj* x_47; obj* x_48; obj* x_49; obj* x_50; obj* x_52; -lean::dec(x_4); -lean::dec(x_8); -lean::dec(x_2); -x_47 = lean::array_push(x_7, x_6); -x_48 = lean::mk_nat_obj(0ul); -x_49 = l_Array_reverseAux___main___rarg(x_3, x_48); -x_50 = l_Array_miterateAux___main___at_Array_append___spec__1___rarg(x_49, x_49, x_48, x_47); -lean::dec(x_49); -x_52 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_52, 0, x_50); -lean::cnstr_set(x_52, 1, x_1); -return x_52; -} -} -} -default: -{ -obj* x_55; obj* x_56; obj* x_57; obj* x_58; obj* x_60; -lean::dec(x_4); -lean::dec(x_2); -x_55 = lean::array_push(x_7, x_6); -x_56 = lean::mk_nat_obj(0ul); -x_57 = l_Array_reverseAux___main___rarg(x_3, x_56); -x_58 = l_Array_miterateAux___main___at_Array_append___spec__1___rarg(x_57, x_57, x_56, x_55); -lean::dec(x_57); -x_60 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_60, 0, x_58); -lean::cnstr_set(x_60, 1, x_1); -return x_60; -} -} } else { -obj* x_64; obj* x_65; obj* x_66; +obj* x_58; obj* x_59; obj* x_60; lean::dec(x_4); lean::dec(x_0); lean::dec(x_2); -x_64 = lean::mk_nat_obj(0ul); -x_65 = l_Array_reverseAux___main___rarg(x_3, x_64); -x_66 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_66, 0, x_65); -lean::cnstr_set(x_66, 1, x_1); -return x_66; +x_58 = lean::mk_nat_obj(0ul); +x_59 = l_Array_reverseAux___main___rarg(x_3, x_58); +x_60 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_60, 0, x_59); +lean::cnstr_set(x_60, 1, x_1); +return x_60; } } } @@ -834,15 +832,12 @@ x_1 = l_Lean_IR_Decl_pushProj___main(x_0); return x_1; } } -obj* initialize_init_default(obj*); obj* initialize_init_lean_compiler_ir(obj*); static bool _G_initialized = false; obj* initialize_init_lean_compiler_pushproj(obj* w) { if (_G_initialized) return w; _G_initialized = true; if (io_result_is_error(w)) return w; -w = initialize_init_default(w); -if (io_result_is_error(w)) return w; w = initialize_init_lean_compiler_ir(w); if (io_result_is_error(w)) return w; l_Array_hmmapAux___main___at_Lean_IR_pushProjs___main___spec__3___closed__1 = _init_l_Array_hmmapAux___main___at_Lean_IR_pushProjs___main___spec__3___closed__1(); diff --git a/src/stage0/init/lean/compiler/resetreuse.cpp b/src/stage0/init/lean/compiler/resetreuse.cpp new file mode 100644 index 0000000000..09ca6d6f2b --- /dev/null +++ b/src/stage0/init/lean/compiler/resetreuse.cpp @@ -0,0 +1,1526 @@ +// Lean compiler output +// Module: init.lean.compiler.resetreuse +// Imports: init.default init.lean.compiler.ir init.control.state +#include "runtime/object.h" +#include "runtime/apply.h" +typedef lean::object obj; typedef lean::usize usize; +typedef lean::uint8 uint8; typedef lean::uint16 uint16; +typedef lean::uint32 uint32; typedef lean::uint64 uint64; +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +extern "C" uint8 lean_name_dec_eq(obj*, obj*); +obj* l___private_init_lean_compiler_resetreuse_2__S(obj*, obj*, obj*); +obj* l___private_init_lean_compiler_resetreuse_1__mayReuse___boxed(obj*, obj*); +obj* l___private_init_lean_compiler_resetreuse_3__mkFresh(obj*); +obj* l___private_init_lean_compiler_resetreuse_6__Dmain___main(obj*, obj*, obj*, obj*); +obj* l___private_init_lean_compiler_resetreuse_6__Dmain(obj*, obj*, obj*, obj*); +obj* l___private_init_lean_compiler_resetreuse_4__tryS(obj*, obj*, obj*, obj*); +obj* l_Array_anyAux___main___at___private_init_lean_compiler_resetreuse_7__hasCtorUsing___main___spec__1___boxed(obj*, obj*, obj*); +obj* l___private_init_lean_compiler_resetreuse_9__R(obj*, obj*); +obj* l___private_init_lean_compiler_resetreuse_7__hasCtorUsing___main___boxed(obj*); +obj* l_Lean_IR_MaxVar_collectDecl___main(obj*, obj*); +obj* l___private_init_lean_compiler_resetreuse_7__hasCtorUsing___rarg___boxed(obj*); +obj* l_Lean_IR_reshape(obj*, obj*); +uint8 l_Array_anyAux___main___at___private_init_lean_compiler_resetreuse_7__hasCtorUsing___main___spec__1(obj*, obj*, obj*); +namespace lean { +uint8 nat_dec_lt(obj*, obj*); +} +uint8 l_Lean_IR_FnBody_isTerminal___main(obj*); +obj* l___private_init_lean_compiler_resetreuse_8__D(obj*, obj*, obj*, obj*); +obj* l_Array_hmmapAux___main___at___private_init_lean_compiler_resetreuse_6__Dmain___main___spec__1(obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_IR_FnBody_flatten(obj*); +namespace lean { +obj* nat_add(obj*, obj*); +} +obj* l_Array_hmmapAux___main___at___private_init_lean_compiler_resetreuse_9__R___main___spec__1(obj*, obj*, obj*); +namespace lean { +uint8 nat_dec_eq(obj*, obj*); +} +obj* l___private_init_lean_compiler_resetreuse_9__R___main(obj*, obj*); +uint8 l___private_init_lean_compiler_resetreuse_7__hasCtorUsing___rarg(obj*); +obj* l___private_init_lean_compiler_resetreuse_7__hasCtorUsing(obj*); +obj* l_Lean_IR_Decl_insertResetReuse(obj*); +uint8 l_Lean_IR_HasIndex_visitFnBody___main(obj*, obj*); +obj* l_Lean_IR_Decl_insertResetReuse___main(obj*); +obj* l___private_init_lean_compiler_resetreuse_5__Dfinalize(obj*, obj*, obj*, obj*); +uint8 l_Lean_IR_FnBody_beq(obj*, obj*); +uint8 l___private_init_lean_compiler_resetreuse_1__mayReuse(obj*, obj*); +obj* l___private_init_lean_compiler_resetreuse_2__S___main(obj*, obj*, obj*); +uint8 l___private_init_lean_compiler_resetreuse_7__hasCtorUsing___main(obj*); +obj* l_Lean_Name_getPrefix___main(obj*); +obj* l_Lean_IR_FnBody_setBody___main(obj*, obj*); +obj* l___private_init_lean_compiler_resetreuse_7__hasCtorUsing___boxed(obj*); +obj* l_Lean_IR_FnBody_body___main(obj*); +obj* l___private_init_lean_compiler_resetreuse_5__Dfinalize___main(obj*, obj*, obj*, obj*); +obj* l_Array_hmmapAux___main___at___private_init_lean_compiler_resetreuse_2__S___main___spec__1___closed__1; +obj* l_Array_hmmapAux___main___at___private_init_lean_compiler_resetreuse_9__R___main___spec__2(obj*, obj*, obj*, obj*); +obj* l_Array_hmmapAux___main___at___private_init_lean_compiler_resetreuse_2__S___main___spec__1(obj*, obj*, obj*, obj*); +uint8 l_Lean_IR_HasIndex_visitArg___main(obj*, obj*); +uint8 l___private_init_lean_compiler_resetreuse_1__mayReuse(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; obj* x_3; uint8 x_4; +x_2 = lean::cnstr_get(x_0, 2); +x_3 = lean::cnstr_get(x_1, 2); +x_4 = lean::nat_dec_eq(x_2, x_3); +if (x_4 == 0) +{ +uint8 x_5; +x_5 = 0; +return x_5; +} +else +{ +obj* x_6; obj* x_7; uint8 x_8; +x_6 = lean::cnstr_get(x_0, 3); +x_7 = lean::cnstr_get(x_1, 3); +x_8 = lean::nat_dec_eq(x_6, x_7); +if (x_8 == 0) +{ +uint8 x_9; +x_9 = 0; +return x_9; +} +else +{ +obj* x_10; obj* x_11; uint8 x_12; +x_10 = lean::cnstr_get(x_0, 4); +x_11 = lean::cnstr_get(x_1, 4); +x_12 = lean::nat_dec_eq(x_10, x_11); +if (x_12 == 0) +{ +uint8 x_13; +x_13 = 0; +return x_13; +} +else +{ +obj* x_14; obj* x_15; obj* x_16; obj* x_17; uint8 x_18; +x_14 = lean::cnstr_get(x_0, 0); +x_15 = l_Lean_Name_getPrefix___main(x_14); +x_16 = lean::cnstr_get(x_1, 0); +x_17 = l_Lean_Name_getPrefix___main(x_16); +x_18 = lean_name_dec_eq(x_15, x_17); +lean::dec(x_17); +lean::dec(x_15); +return x_18; +} +} +} +} +} +obj* l___private_init_lean_compiler_resetreuse_1__mayReuse___boxed(obj* x_0, obj* x_1) { +_start: +{ +uint8 x_2; obj* x_3; +x_2 = l___private_init_lean_compiler_resetreuse_1__mayReuse(x_0, x_1); +x_3 = lean::box(x_2); +lean::dec(x_0); +lean::dec(x_1); +return x_3; +} +} +obj* _init_l_Array_hmmapAux___main___at___private_init_lean_compiler_resetreuse_2__S___main___spec__1___closed__1() { +_start: +{ +obj* x_0; obj* x_1; +x_0 = lean::box(12); +x_1 = lean::alloc_cnstr(1, 1, 0); +lean::cnstr_set(x_1, 0, x_0); +return x_1; +} +} +obj* l_Array_hmmapAux___main___at___private_init_lean_compiler_resetreuse_2__S___main___spec__1(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { +_start: +{ +obj* x_4; uint8 x_5; +x_4 = lean::array_get_size(x_3); +x_5 = lean::nat_dec_lt(x_2, x_4); +lean::dec(x_4); +if (x_5 == 0) +{ +lean::dec(x_1); +lean::dec(x_0); +lean::dec(x_2); +return x_3; +} +else +{ +obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; +x_10 = lean::array_fget(x_3, x_2); +x_11 = l_Array_hmmapAux___main___at___private_init_lean_compiler_resetreuse_2__S___main___spec__1___closed__1; +x_12 = lean::array_fset(x_3, x_2, x_11); +x_13 = lean::mk_nat_obj(1ul); +x_14 = lean::nat_add(x_2, x_13); +if (lean::obj_tag(x_10) == 0) +{ +obj* x_15; obj* x_17; obj* x_19; obj* x_22; obj* x_23; obj* x_24; +x_15 = lean::cnstr_get(x_10, 0); +x_17 = lean::cnstr_get(x_10, 1); +if (lean::is_exclusive(x_10)) { + x_19 = x_10; +} else { + lean::inc(x_15); + lean::inc(x_17); + lean::dec(x_10); + x_19 = lean::box(0); +} +lean::inc(x_1); +lean::inc(x_0); +x_22 = l___private_init_lean_compiler_resetreuse_2__S___main(x_0, x_1, x_17); +if (lean::is_scalar(x_19)) { + x_23 = lean::alloc_cnstr(0, 2, 0); +} else { + x_23 = x_19; +} +lean::cnstr_set(x_23, 0, x_15); +lean::cnstr_set(x_23, 1, x_22); +x_24 = lean::array_fset(x_12, x_2, x_23); +lean::dec(x_2); +x_2 = x_14; +x_3 = x_24; +goto _start; +} +else +{ +obj* x_27; obj* x_29; obj* x_32; obj* x_33; obj* x_34; +x_27 = lean::cnstr_get(x_10, 0); +if (lean::is_exclusive(x_10)) { + x_29 = x_10; +} else { + lean::inc(x_27); + lean::dec(x_10); + x_29 = lean::box(0); +} +lean::inc(x_1); +lean::inc(x_0); +x_32 = l___private_init_lean_compiler_resetreuse_2__S___main(x_0, x_1, x_27); +if (lean::is_scalar(x_29)) { + x_33 = lean::alloc_cnstr(1, 1, 0); +} else { + x_33 = x_29; +} +lean::cnstr_set(x_33, 0, x_32); +x_34 = lean::array_fset(x_12, x_2, x_33); +lean::dec(x_2); +x_2 = x_14; +x_3 = x_34; +goto _start; +} +} +} +} +obj* l___private_init_lean_compiler_resetreuse_2__S___main(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +obj* x_3; +switch (lean::obj_tag(x_2)) { +case 0: +{ +uint8 x_5; obj* x_6; +x_5 = lean::cnstr_get_scalar(x_2, sizeof(void*)*3); +x_6 = lean::cnstr_get(x_2, 1); +lean::inc(x_6); +switch (lean::obj_tag(x_6)) { +case 0: +{ +obj* x_8; obj* x_10; obj* x_12; obj* x_13; obj* x_15; uint8 x_17; +x_8 = lean::cnstr_get(x_2, 0); +x_10 = lean::cnstr_get(x_2, 2); +if (lean::is_exclusive(x_2)) { + lean::cnstr_set(x_2, 0, lean::box(0)); + lean::cnstr_release(x_2, 1); + lean::cnstr_set(x_2, 2, lean::box(0)); + x_12 = x_2; +} else { + lean::inc(x_8); + lean::inc(x_10); + lean::dec(x_2); + x_12 = lean::box(0); +} +x_13 = lean::cnstr_get(x_6, 0); +lean::inc(x_13); +x_15 = lean::cnstr_get(x_6, 1); +lean::inc(x_15); +x_17 = l___private_init_lean_compiler_resetreuse_1__mayReuse(x_1, x_13); +if (x_17 == 0) +{ +obj* x_20; obj* x_21; obj* x_22; +lean::dec(x_13); +lean::dec(x_15); +x_20 = l___private_init_lean_compiler_resetreuse_2__S___main(x_0, x_1, x_10); +if (lean::is_scalar(x_12)) { + x_21 = lean::alloc_cnstr(0, 3, 1); +} else { + x_21 = x_12; +} +lean::cnstr_set(x_21, 0, x_8); +lean::cnstr_set(x_21, 1, x_6); +lean::cnstr_set(x_21, 2, x_20); +lean::cnstr_set_scalar(x_21, sizeof(void*)*3, x_5); +x_22 = x_21; +return x_22; +} +else +{ +obj* x_24; obj* x_26; uint8 x_29; +lean::dec(x_6); +x_24 = lean::cnstr_get(x_1, 1); +lean::inc(x_24); +x_26 = lean::cnstr_get(x_13, 1); +lean::inc(x_26); +lean::dec(x_13); +x_29 = lean::nat_dec_eq(x_24, x_26); +lean::dec(x_26); +lean::dec(x_24); +if (x_29 == 0) +{ +uint8 x_32; obj* x_33; obj* x_34; obj* x_35; obj* x_36; +x_32 = 1; +x_33 = lean::alloc_cnstr(2, 3, 1); +lean::cnstr_set(x_33, 0, x_0); +lean::cnstr_set(x_33, 1, x_1); +lean::cnstr_set(x_33, 2, x_15); +lean::cnstr_set_scalar(x_33, sizeof(void*)*3, x_32); +x_34 = x_33; +if (lean::is_scalar(x_12)) { + x_35 = lean::alloc_cnstr(0, 3, 1); +} else { + x_35 = x_12; +} +lean::cnstr_set(x_35, 0, x_8); +lean::cnstr_set(x_35, 1, x_34); +lean::cnstr_set(x_35, 2, x_10); +lean::cnstr_set_scalar(x_35, sizeof(void*)*3, x_5); +x_36 = x_35; +return x_36; +} +else +{ +uint8 x_37; obj* x_38; obj* x_39; obj* x_40; obj* x_41; +x_37 = 0; +x_38 = lean::alloc_cnstr(2, 3, 1); +lean::cnstr_set(x_38, 0, x_0); +lean::cnstr_set(x_38, 1, x_1); +lean::cnstr_set(x_38, 2, x_15); +lean::cnstr_set_scalar(x_38, sizeof(void*)*3, x_37); +x_39 = x_38; +if (lean::is_scalar(x_12)) { + x_40 = lean::alloc_cnstr(0, 3, 1); +} else { + x_40 = x_12; +} +lean::cnstr_set(x_40, 0, x_8); +lean::cnstr_set(x_40, 1, x_39); +lean::cnstr_set(x_40, 2, x_10); +lean::cnstr_set_scalar(x_40, sizeof(void*)*3, x_5); +x_41 = x_40; +return x_41; +} +} +} +default: +{ +obj* x_43; +lean::dec(x_6); +x_43 = lean::box(0); +x_3 = x_43; +goto lbl_4; +} +} +} +case 1: +{ +obj* x_44; obj* x_46; uint8 x_48; obj* x_49; obj* x_51; obj* x_53; obj* x_57; uint8 x_60; +x_44 = lean::cnstr_get(x_2, 0); +x_46 = lean::cnstr_get(x_2, 1); +x_48 = lean::cnstr_get_scalar(x_2, sizeof(void*)*4); +x_49 = lean::cnstr_get(x_2, 2); +x_51 = lean::cnstr_get(x_2, 3); +if (lean::is_exclusive(x_2)) { + lean::cnstr_set(x_2, 0, lean::box(0)); + lean::cnstr_set(x_2, 1, lean::box(0)); + lean::cnstr_set(x_2, 2, lean::box(0)); + lean::cnstr_set(x_2, 3, lean::box(0)); + x_53 = x_2; +} else { + lean::inc(x_44); + lean::inc(x_46); + lean::inc(x_49); + lean::inc(x_51); + lean::dec(x_2); + x_53 = lean::box(0); +} +lean::inc(x_49); +lean::inc(x_1); +lean::inc(x_0); +x_57 = l___private_init_lean_compiler_resetreuse_2__S___main(x_0, x_1, x_49); +lean::inc(x_57); +lean::inc(x_49); +x_60 = l_Lean_IR_FnBody_beq(x_49, x_57); +if (x_60 == 0) +{ +obj* x_64; obj* x_65; +lean::dec(x_1); +lean::dec(x_0); +lean::dec(x_49); +if (lean::is_scalar(x_53)) { + x_64 = lean::alloc_cnstr(1, 4, 1); +} else { + x_64 = x_53; +} +lean::cnstr_set(x_64, 0, x_44); +lean::cnstr_set(x_64, 1, x_46); +lean::cnstr_set(x_64, 2, x_57); +lean::cnstr_set(x_64, 3, x_51); +lean::cnstr_set_scalar(x_64, sizeof(void*)*4, x_48); +x_65 = x_64; +return x_65; +} +else +{ +obj* x_67; obj* x_68; obj* x_69; +lean::dec(x_57); +x_67 = l___private_init_lean_compiler_resetreuse_2__S___main(x_0, x_1, x_51); +if (lean::is_scalar(x_53)) { + x_68 = lean::alloc_cnstr(1, 4, 1); +} else { + x_68 = x_53; +} +lean::cnstr_set(x_68, 0, x_44); +lean::cnstr_set(x_68, 1, x_46); +lean::cnstr_set(x_68, 2, x_49); +lean::cnstr_set(x_68, 3, x_67); +lean::cnstr_set_scalar(x_68, sizeof(void*)*4, x_48); +x_69 = x_68; +return x_69; +} +} +case 9: +{ +obj* x_70; obj* x_72; obj* x_74; obj* x_76; obj* x_77; obj* x_78; obj* x_79; +x_70 = lean::cnstr_get(x_2, 0); +x_72 = lean::cnstr_get(x_2, 1); +x_74 = lean::cnstr_get(x_2, 2); +if (lean::is_exclusive(x_2)) { + x_76 = x_2; +} else { + lean::inc(x_70); + lean::inc(x_72); + lean::inc(x_74); + lean::dec(x_2); + x_76 = lean::box(0); +} +x_77 = lean::mk_nat_obj(0ul); +x_78 = l_Array_hmmapAux___main___at___private_init_lean_compiler_resetreuse_2__S___main___spec__1(x_0, x_1, x_77, x_74); +if (lean::is_scalar(x_76)) { + x_79 = lean::alloc_cnstr(9, 3, 0); +} else { + x_79 = x_76; +} +lean::cnstr_set(x_79, 0, x_70); +lean::cnstr_set(x_79, 1, x_72); +lean::cnstr_set(x_79, 2, x_78); +return x_79; +} +default: +{ +obj* x_80; +x_80 = lean::box(0); +x_3 = x_80; +goto lbl_4; +} +} +lbl_4: +{ +uint8 x_82; +lean::dec(x_3); +x_82 = l_Lean_IR_FnBody_isTerminal___main(x_2); +if (x_82 == 0) +{ +obj* x_83; obj* x_84; obj* x_85; obj* x_86; obj* x_87; +x_83 = l_Lean_IR_FnBody_body___main(x_2); +x_84 = lean::box(12); +x_85 = l_Lean_IR_FnBody_setBody___main(x_2, x_84); +x_86 = l___private_init_lean_compiler_resetreuse_2__S___main(x_0, x_1, x_83); +x_87 = l_Lean_IR_FnBody_setBody___main(x_85, x_86); +return x_87; +} +else +{ +lean::dec(x_1); +lean::dec(x_0); +return x_2; +} +} +} +} +obj* l___private_init_lean_compiler_resetreuse_2__S(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +obj* x_3; +x_3 = l___private_init_lean_compiler_resetreuse_2__S___main(x_0, x_1, x_2); +return x_3; +} +} +obj* l___private_init_lean_compiler_resetreuse_3__mkFresh(obj* x_0) { +_start: +{ +obj* x_1; obj* x_2; obj* x_3; +x_1 = lean::mk_nat_obj(1ul); +x_2 = lean::nat_add(x_0, x_1); +x_3 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_3, 0, x_0); +lean::cnstr_set(x_3, 1, x_2); +return x_3; +} +} +obj* l___private_init_lean_compiler_resetreuse_4__tryS(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { +_start: +{ +obj* x_4; obj* x_5; obj* x_7; obj* x_9; obj* x_12; uint8 x_15; +x_4 = l___private_init_lean_compiler_resetreuse_3__mkFresh(x_3); +x_5 = lean::cnstr_get(x_4, 0); +x_7 = lean::cnstr_get(x_4, 1); +if (lean::is_exclusive(x_4)) { + lean::cnstr_set(x_4, 0, lean::box(0)); + lean::cnstr_set(x_4, 1, lean::box(0)); + x_9 = x_4; +} else { + lean::inc(x_5); + lean::inc(x_7); + lean::dec(x_4); + x_9 = lean::box(0); +} +lean::inc(x_2); +lean::inc(x_5); +x_12 = l___private_init_lean_compiler_resetreuse_2__S___main(x_5, x_1, x_2); +lean::inc(x_12); +lean::inc(x_2); +x_15 = l_Lean_IR_FnBody_beq(x_2, x_12); +if (x_15 == 0) +{ +obj* x_17; uint8 x_18; obj* x_19; obj* x_20; obj* x_21; +lean::dec(x_2); +x_17 = lean::alloc_cnstr(1, 1, 0); +lean::cnstr_set(x_17, 0, x_0); +x_18 = 7; +x_19 = lean::alloc_cnstr(0, 3, 1); +lean::cnstr_set(x_19, 0, x_5); +lean::cnstr_set(x_19, 1, x_17); +lean::cnstr_set(x_19, 2, x_12); +lean::cnstr_set_scalar(x_19, sizeof(void*)*3, x_18); +x_20 = x_19; +if (lean::is_scalar(x_9)) { + x_21 = lean::alloc_cnstr(0, 2, 0); +} else { + x_21 = x_9; +} +lean::cnstr_set(x_21, 0, x_20); +lean::cnstr_set(x_21, 1, x_7); +return x_21; +} +else +{ +obj* x_25; +lean::dec(x_5); +lean::dec(x_12); +lean::dec(x_0); +if (lean::is_scalar(x_9)) { + x_25 = lean::alloc_cnstr(0, 2, 0); +} else { + x_25 = x_9; +} +lean::cnstr_set(x_25, 0, x_2); +lean::cnstr_set(x_25, 1, x_7); +return x_25; +} +} +} +obj* l___private_init_lean_compiler_resetreuse_5__Dfinalize___main(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { +_start: +{ +obj* x_4; uint8 x_6; +x_4 = lean::cnstr_get(x_2, 1); +lean::inc(x_4); +x_6 = lean::unbox(x_4); +if (x_6 == 0) +{ +obj* x_7; obj* x_10; +x_7 = lean::cnstr_get(x_2, 0); +lean::inc(x_7); +lean::dec(x_2); +x_10 = l___private_init_lean_compiler_resetreuse_4__tryS(x_0, x_1, x_7, x_3); +return x_10; +} +else +{ +obj* x_13; obj* x_15; obj* x_16; +lean::dec(x_1); +lean::dec(x_0); +x_13 = lean::cnstr_get(x_2, 0); +if (lean::is_exclusive(x_2)) { + lean::cnstr_release(x_2, 1); + x_15 = x_2; +} else { + lean::inc(x_13); + lean::dec(x_2); + x_15 = lean::box(0); +} +if (lean::is_scalar(x_15)) { + x_16 = lean::alloc_cnstr(0, 2, 0); +} else { + x_16 = x_15; +} +lean::cnstr_set(x_16, 0, x_13); +lean::cnstr_set(x_16, 1, x_3); +return x_16; +} +} +} +obj* l___private_init_lean_compiler_resetreuse_5__Dfinalize(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { +_start: +{ +obj* x_4; +x_4 = l___private_init_lean_compiler_resetreuse_5__Dfinalize___main(x_0, x_1, x_2, x_3); +return x_4; +} +} +obj* l_Array_hmmapAux___main___at___private_init_lean_compiler_resetreuse_6__Dmain___main___spec__1(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { +_start: +{ +obj* x_5; uint8 x_6; +x_5 = lean::array_get_size(x_3); +x_6 = lean::nat_dec_lt(x_2, x_5); +lean::dec(x_5); +if (x_6 == 0) +{ +obj* x_11; +lean::dec(x_1); +lean::dec(x_0); +lean::dec(x_2); +x_11 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_11, 0, x_3); +lean::cnstr_set(x_11, 1, x_4); +return x_11; +} +else +{ +obj* x_12; obj* x_13; obj* x_14; +x_12 = lean::array_fget(x_3, x_2); +x_13 = l_Array_hmmapAux___main___at___private_init_lean_compiler_resetreuse_2__S___main___spec__1___closed__1; +x_14 = lean::array_fset(x_3, x_2, x_13); +if (lean::obj_tag(x_12) == 0) +{ +obj* x_15; obj* x_17; obj* x_19; obj* x_22; obj* x_23; obj* x_25; obj* x_30; obj* x_31; obj* x_33; obj* x_36; obj* x_37; obj* x_38; obj* x_39; +x_15 = lean::cnstr_get(x_12, 0); +x_17 = lean::cnstr_get(x_12, 1); +if (lean::is_exclusive(x_12)) { + x_19 = x_12; +} else { + lean::inc(x_15); + lean::inc(x_17); + lean::dec(x_12); + x_19 = lean::box(0); +} +lean::inc(x_1); +lean::inc(x_0); +x_22 = l___private_init_lean_compiler_resetreuse_6__Dmain___main(x_0, x_1, x_17, x_4); +x_23 = lean::cnstr_get(x_22, 0); +lean::inc(x_23); +x_25 = lean::cnstr_get(x_22, 1); +lean::inc(x_25); +lean::dec(x_22); +lean::inc(x_1); +lean::inc(x_0); +x_30 = l___private_init_lean_compiler_resetreuse_5__Dfinalize___main(x_0, x_1, x_23, x_25); +x_31 = lean::cnstr_get(x_30, 0); +lean::inc(x_31); +x_33 = lean::cnstr_get(x_30, 1); +lean::inc(x_33); +lean::dec(x_30); +if (lean::is_scalar(x_19)) { + x_36 = lean::alloc_cnstr(0, 2, 0); +} else { + x_36 = x_19; +} +lean::cnstr_set(x_36, 0, x_15); +lean::cnstr_set(x_36, 1, x_31); +x_37 = lean::mk_nat_obj(1ul); +x_38 = lean::nat_add(x_2, x_37); +x_39 = lean::array_fset(x_14, x_2, x_36); +lean::dec(x_2); +x_2 = x_38; +x_3 = x_39; +x_4 = x_33; +goto _start; +} +else +{ +obj* x_42; obj* x_44; obj* x_47; obj* x_48; obj* x_50; obj* x_55; obj* x_56; obj* x_58; obj* x_61; obj* x_62; obj* x_63; obj* x_64; +x_42 = lean::cnstr_get(x_12, 0); +if (lean::is_exclusive(x_12)) { + x_44 = x_12; +} else { + lean::inc(x_42); + lean::dec(x_12); + x_44 = lean::box(0); +} +lean::inc(x_1); +lean::inc(x_0); +x_47 = l___private_init_lean_compiler_resetreuse_6__Dmain___main(x_0, x_1, x_42, x_4); +x_48 = lean::cnstr_get(x_47, 0); +lean::inc(x_48); +x_50 = lean::cnstr_get(x_47, 1); +lean::inc(x_50); +lean::dec(x_47); +lean::inc(x_1); +lean::inc(x_0); +x_55 = l___private_init_lean_compiler_resetreuse_5__Dfinalize___main(x_0, x_1, x_48, x_50); +x_56 = lean::cnstr_get(x_55, 0); +lean::inc(x_56); +x_58 = lean::cnstr_get(x_55, 1); +lean::inc(x_58); +lean::dec(x_55); +if (lean::is_scalar(x_44)) { + x_61 = lean::alloc_cnstr(1, 1, 0); +} else { + x_61 = x_44; +} +lean::cnstr_set(x_61, 0, x_56); +x_62 = lean::mk_nat_obj(1ul); +x_63 = lean::nat_add(x_2, x_62); +x_64 = lean::array_fset(x_14, x_2, x_61); +lean::dec(x_2); +x_2 = x_63; +x_3 = x_64; +x_4 = x_58; +goto _start; +} +} +} +} +obj* l___private_init_lean_compiler_resetreuse_6__Dmain___main(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { +_start: +{ +obj* x_4; +switch (lean::obj_tag(x_2)) { +case 9: +{ +obj* x_6; obj* x_8; obj* x_10; uint8 x_12; +x_6 = lean::cnstr_get(x_2, 0); +lean::inc(x_6); +x_8 = lean::cnstr_get(x_2, 1); +lean::inc(x_8); +x_10 = lean::cnstr_get(x_2, 2); +lean::inc(x_10); +x_12 = l_Lean_IR_HasIndex_visitFnBody___main(x_0, x_2); +if (x_12 == 0) +{ +uint8 x_18; obj* x_19; obj* x_20; obj* x_21; +lean::dec(x_1); +lean::dec(x_0); +lean::dec(x_10); +lean::dec(x_6); +lean::dec(x_8); +x_18 = 0; +x_19 = lean::box(x_18); +x_20 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_20, 0, x_2); +lean::cnstr_set(x_20, 1, x_19); +x_21 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_21, 0, x_20); +lean::cnstr_set(x_21, 1, x_3); +return x_21; +} +else +{ +obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_27; obj* x_29; obj* x_30; uint8 x_31; obj* x_32; obj* x_33; obj* x_34; +if (lean::is_exclusive(x_2)) { + lean::cnstr_release(x_2, 0); + lean::cnstr_release(x_2, 1); + lean::cnstr_release(x_2, 2); + x_22 = x_2; +} else { + lean::dec(x_2); + x_22 = lean::box(0); +} +x_23 = lean::mk_nat_obj(0ul); +x_24 = l_Array_hmmapAux___main___at___private_init_lean_compiler_resetreuse_6__Dmain___main___spec__1(x_0, x_1, x_23, x_10, x_3); +x_25 = lean::cnstr_get(x_24, 0); +x_27 = lean::cnstr_get(x_24, 1); +if (lean::is_exclusive(x_24)) { + x_29 = x_24; +} else { + lean::inc(x_25); + lean::inc(x_27); + lean::dec(x_24); + x_29 = lean::box(0); +} +if (lean::is_scalar(x_22)) { + x_30 = lean::alloc_cnstr(9, 3, 0); +} else { + x_30 = x_22; +} +lean::cnstr_set(x_30, 0, x_6); +lean::cnstr_set(x_30, 1, x_8); +lean::cnstr_set(x_30, 2, x_25); +x_31 = 1; +x_32 = lean::box(x_31); +if (lean::is_scalar(x_29)) { + x_33 = lean::alloc_cnstr(0, 2, 0); +} else { + x_33 = x_29; +} +lean::cnstr_set(x_33, 0, x_30); +lean::cnstr_set(x_33, 1, x_32); +x_34 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_34, 0, x_33); +lean::cnstr_set(x_34, 1, x_27); +return x_34; +} +} +default: +{ +obj* x_35; +x_35 = lean::box(0); +x_4 = x_35; +goto lbl_5; +} +} +lbl_5: +{ +uint8 x_37; +lean::dec(x_4); +x_37 = l_Lean_IR_FnBody_isTerminal___main(x_2); +if (x_37 == 0) +{ +obj* x_38; obj* x_39; obj* x_40; obj* x_43; obj* x_44; obj* x_46; uint8 x_48; +x_38 = l_Lean_IR_FnBody_body___main(x_2); +x_39 = lean::box(12); +x_40 = l_Lean_IR_FnBody_setBody___main(x_2, x_39); +lean::inc(x_1); +lean::inc(x_0); +x_43 = l___private_init_lean_compiler_resetreuse_6__Dmain___main(x_0, x_1, x_38, x_3); +x_44 = lean::cnstr_get(x_43, 0); +lean::inc(x_44); +x_46 = lean::cnstr_get(x_44, 1); +lean::inc(x_46); +x_48 = lean::unbox(x_46); +if (x_48 == 0) +{ +obj* x_49; obj* x_51; obj* x_52; obj* x_54; uint8 x_55; +x_49 = lean::cnstr_get(x_43, 1); +if (lean::is_exclusive(x_43)) { + lean::cnstr_release(x_43, 0); + lean::cnstr_set(x_43, 1, lean::box(0)); + x_51 = x_43; +} else { + lean::inc(x_49); + lean::dec(x_43); + x_51 = lean::box(0); +} +x_52 = lean::cnstr_get(x_44, 0); +if (lean::is_exclusive(x_44)) { + lean::cnstr_set(x_44, 0, lean::box(0)); + lean::cnstr_release(x_44, 1); + x_54 = x_44; +} else { + lean::inc(x_52); + lean::dec(x_44); + x_54 = lean::box(0); +} +x_55 = l_Lean_IR_HasIndex_visitFnBody___main(x_0, x_40); +if (x_55 == 0) +{ +obj* x_58; obj* x_59; obj* x_60; +lean::dec(x_1); +lean::dec(x_0); +x_58 = l_Lean_IR_FnBody_setBody___main(x_40, x_52); +if (lean::is_scalar(x_54)) { + x_59 = lean::alloc_cnstr(0, 2, 0); +} else { + x_59 = x_54; +} +lean::cnstr_set(x_59, 0, x_58); +lean::cnstr_set(x_59, 1, x_46); +if (lean::is_scalar(x_51)) { + x_60 = lean::alloc_cnstr(0, 2, 0); +} else { + x_60 = x_51; +} +lean::cnstr_set(x_60, 0, x_59); +lean::cnstr_set(x_60, 1, x_49); +return x_60; +} +else +{ +obj* x_62; obj* x_63; obj* x_65; obj* x_67; obj* x_68; uint8 x_69; obj* x_70; obj* x_71; obj* x_72; +lean::dec(x_51); +x_62 = l___private_init_lean_compiler_resetreuse_4__tryS(x_0, x_1, x_52, x_49); +x_63 = lean::cnstr_get(x_62, 0); +x_65 = lean::cnstr_get(x_62, 1); +if (lean::is_exclusive(x_62)) { + x_67 = x_62; +} else { + lean::inc(x_63); + lean::inc(x_65); + lean::dec(x_62); + x_67 = lean::box(0); +} +x_68 = l_Lean_IR_FnBody_setBody___main(x_40, x_63); +x_69 = 1; +x_70 = lean::box(x_69); +if (lean::is_scalar(x_67)) { + x_71 = lean::alloc_cnstr(0, 2, 0); +} else { + x_71 = x_67; +} +lean::cnstr_set(x_71, 0, x_68); +lean::cnstr_set(x_71, 1, x_70); +if (lean::is_scalar(x_54)) { + x_72 = lean::alloc_cnstr(0, 2, 0); +} else { + x_72 = x_54; +} +lean::cnstr_set(x_72, 0, x_71); +lean::cnstr_set(x_72, 1, x_65); +return x_72; +} +} +else +{ +obj* x_75; obj* x_77; obj* x_78; obj* x_80; obj* x_81; obj* x_82; obj* x_83; +lean::dec(x_1); +lean::dec(x_0); +x_75 = lean::cnstr_get(x_43, 1); +if (lean::is_exclusive(x_43)) { + lean::cnstr_release(x_43, 0); + x_77 = x_43; +} else { + lean::inc(x_75); + lean::dec(x_43); + x_77 = lean::box(0); +} +x_78 = lean::cnstr_get(x_44, 0); +if (lean::is_exclusive(x_44)) { + lean::cnstr_release(x_44, 1); + x_80 = x_44; +} else { + lean::inc(x_78); + lean::dec(x_44); + x_80 = lean::box(0); +} +x_81 = l_Lean_IR_FnBody_setBody___main(x_40, x_78); +if (lean::is_scalar(x_80)) { + x_82 = lean::alloc_cnstr(0, 2, 0); +} else { + x_82 = x_80; +} +lean::cnstr_set(x_82, 0, x_81); +lean::cnstr_set(x_82, 1, x_46); +if (lean::is_scalar(x_77)) { + x_83 = lean::alloc_cnstr(0, 2, 0); +} else { + x_83 = x_77; +} +lean::cnstr_set(x_83, 0, x_82); +lean::cnstr_set(x_83, 1, x_75); +return x_83; +} +} +else +{ +uint8 x_85; obj* x_87; obj* x_88; obj* x_89; +lean::dec(x_1); +x_85 = l_Lean_IR_HasIndex_visitFnBody___main(x_0, x_2); +lean::dec(x_0); +x_87 = lean::box(x_85); +x_88 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_88, 0, x_2); +lean::cnstr_set(x_88, 1, x_87); +x_89 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_89, 0, x_88); +lean::cnstr_set(x_89, 1, x_3); +return x_89; +} +} +} +} +obj* l___private_init_lean_compiler_resetreuse_6__Dmain(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { +_start: +{ +obj* x_4; +x_4 = l___private_init_lean_compiler_resetreuse_6__Dmain___main(x_0, x_1, x_2, x_3); +return x_4; +} +} +uint8 l_Array_anyAux___main___at___private_init_lean_compiler_resetreuse_7__hasCtorUsing___main___spec__1(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +obj* x_3; uint8 x_4; +x_3 = lean::array_get_size(x_1); +x_4 = lean::nat_dec_lt(x_2, x_3); +lean::dec(x_3); +if (x_4 == 0) +{ +uint8 x_7; +lean::dec(x_2); +x_7 = 0; +return x_7; +} +else +{ +obj* x_8; uint8 x_9; +x_8 = lean::array_fget(x_1, x_2); +x_9 = l_Lean_IR_HasIndex_visitArg___main(x_0, x_8); +lean::dec(x_8); +if (x_9 == 0) +{ +obj* x_11; obj* x_12; +x_11 = lean::mk_nat_obj(1ul); +x_12 = lean::nat_add(x_2, x_11); +lean::dec(x_2); +x_2 = x_12; +goto _start; +} +else +{ +uint8 x_16; +lean::dec(x_2); +x_16 = 1; +return x_16; +} +} +} +} +uint8 l___private_init_lean_compiler_resetreuse_7__hasCtorUsing___main(obj* x_0) { +_start: +{ +obj* x_1; +switch (lean::obj_tag(x_0)) { +case 0: +{ +obj* x_3; +x_3 = lean::cnstr_get(x_0, 1); +lean::inc(x_3); +switch (lean::obj_tag(x_3)) { +case 0: +{ +obj* x_5; obj* x_7; obj* x_10; obj* x_13; uint8 x_14; +x_5 = lean::cnstr_get(x_0, 0); +lean::inc(x_5); +x_7 = lean::cnstr_get(x_0, 2); +lean::inc(x_7); +lean::dec(x_0); +x_10 = lean::cnstr_get(x_3, 1); +lean::inc(x_10); +lean::dec(x_3); +x_13 = lean::mk_nat_obj(0ul); +x_14 = l_Array_anyAux___main___at___private_init_lean_compiler_resetreuse_7__hasCtorUsing___main___spec__1(x_5, x_10, x_13); +lean::dec(x_10); +lean::dec(x_5); +if (x_14 == 0) +{ +x_0 = x_7; +goto _start; +} +else +{ +uint8 x_19; +lean::dec(x_7); +x_19 = 1; +return x_19; +} +} +default: +{ +obj* x_21; +lean::dec(x_3); +x_21 = lean::box(0); +x_1 = x_21; +goto lbl_2; +} +} +} +default: +{ +obj* x_22; +x_22 = lean::box(0); +x_1 = x_22; +goto lbl_2; +} +} +lbl_2: +{ +uint8 x_24; +lean::dec(x_1); +x_24 = l_Lean_IR_FnBody_isTerminal___main(x_0); +if (x_24 == 0) +{ +obj* x_25; +x_25 = l_Lean_IR_FnBody_body___main(x_0); +lean::dec(x_0); +x_0 = x_25; +goto _start; +} +else +{ +uint8 x_29; +lean::dec(x_0); +x_29 = 0; +return x_29; +} +} +} +} +obj* l_Array_anyAux___main___at___private_init_lean_compiler_resetreuse_7__hasCtorUsing___main___spec__1___boxed(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +uint8 x_3; obj* x_4; +x_3 = l_Array_anyAux___main___at___private_init_lean_compiler_resetreuse_7__hasCtorUsing___main___spec__1(x_0, x_1, x_2); +x_4 = lean::box(x_3); +lean::dec(x_0); +lean::dec(x_1); +return x_4; +} +} +obj* l___private_init_lean_compiler_resetreuse_7__hasCtorUsing___main___boxed(obj* x_0) { +_start: +{ +uint8 x_1; obj* x_2; +x_1 = l___private_init_lean_compiler_resetreuse_7__hasCtorUsing___main(x_0); +x_2 = lean::box(x_1); +return x_2; +} +} +uint8 l___private_init_lean_compiler_resetreuse_7__hasCtorUsing___rarg(obj* x_0) { +_start: +{ +uint8 x_1; +x_1 = l___private_init_lean_compiler_resetreuse_7__hasCtorUsing___main(x_0); +return x_1; +} +} +obj* l___private_init_lean_compiler_resetreuse_7__hasCtorUsing(obj* x_0) { +_start: +{ +obj* x_1; +x_1 = lean::alloc_closure(reinterpret_cast(l___private_init_lean_compiler_resetreuse_7__hasCtorUsing___rarg___boxed), 1, 0); +return x_1; +} +} +obj* l___private_init_lean_compiler_resetreuse_7__hasCtorUsing___rarg___boxed(obj* x_0) { +_start: +{ +uint8 x_1; obj* x_2; +x_1 = l___private_init_lean_compiler_resetreuse_7__hasCtorUsing___rarg(x_0); +x_2 = lean::box(x_1); +return x_2; +} +} +obj* l___private_init_lean_compiler_resetreuse_7__hasCtorUsing___boxed(obj* x_0) { +_start: +{ +obj* x_1; +x_1 = l___private_init_lean_compiler_resetreuse_7__hasCtorUsing(x_0); +lean::dec(x_0); +return x_1; +} +} +obj* l___private_init_lean_compiler_resetreuse_8__D(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { +_start: +{ +uint8 x_5; +lean::inc(x_2); +x_5 = l___private_init_lean_compiler_resetreuse_7__hasCtorUsing___main(x_2); +if (x_5 == 0) +{ +obj* x_8; obj* x_9; obj* x_11; obj* x_14; +lean::inc(x_1); +lean::inc(x_0); +x_8 = l___private_init_lean_compiler_resetreuse_6__Dmain___main(x_0, x_1, x_2, x_3); +x_9 = lean::cnstr_get(x_8, 0); +lean::inc(x_9); +x_11 = lean::cnstr_get(x_8, 1); +lean::inc(x_11); +lean::dec(x_8); +x_14 = l___private_init_lean_compiler_resetreuse_5__Dfinalize___main(x_0, x_1, x_9, x_11); +return x_14; +} +else +{ +obj* x_17; +lean::dec(x_1); +lean::dec(x_0); +x_17 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_17, 0, x_2); +lean::cnstr_set(x_17, 1, x_3); +return x_17; +} +} +} +obj* l_Array_hmmapAux___main___at___private_init_lean_compiler_resetreuse_9__R___main___spec__1(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +obj* x_3; uint8 x_4; +x_3 = lean::array_get_size(x_1); +x_4 = lean::nat_dec_lt(x_0, x_3); +lean::dec(x_3); +if (x_4 == 0) +{ +obj* x_7; +lean::dec(x_0); +x_7 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_7, 0, x_1); +lean::cnstr_set(x_7, 1, x_2); +return x_7; +} +else +{ +obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; +x_8 = lean::array_fget(x_1, x_0); +x_9 = lean::box(12); +x_10 = lean::array_fset(x_1, x_0, x_9); +switch (lean::obj_tag(x_8)) { +case 1: +{ +obj* x_14; obj* x_16; uint8 x_18; obj* x_19; obj* x_21; obj* x_23; obj* x_24; obj* x_25; obj* x_27; obj* x_30; obj* x_31; +x_14 = lean::cnstr_get(x_8, 0); +x_16 = lean::cnstr_get(x_8, 1); +x_18 = lean::cnstr_get_scalar(x_8, sizeof(void*)*4); +x_19 = lean::cnstr_get(x_8, 2); +x_21 = lean::cnstr_get(x_8, 3); +if (lean::is_exclusive(x_8)) { + x_23 = x_8; +} else { + lean::inc(x_14); + lean::inc(x_16); + lean::inc(x_19); + lean::inc(x_21); + lean::dec(x_8); + x_23 = lean::box(0); +} +x_24 = l___private_init_lean_compiler_resetreuse_9__R___main(x_19, x_2); +x_25 = lean::cnstr_get(x_24, 0); +lean::inc(x_25); +x_27 = lean::cnstr_get(x_24, 1); +lean::inc(x_27); +lean::dec(x_24); +if (lean::is_scalar(x_23)) { + x_30 = lean::alloc_cnstr(1, 4, 1); +} else { + x_30 = x_23; +} +lean::cnstr_set(x_30, 0, x_14); +lean::cnstr_set(x_30, 1, x_16); +lean::cnstr_set(x_30, 2, x_25); +lean::cnstr_set(x_30, 3, x_21); +lean::cnstr_set_scalar(x_30, sizeof(void*)*4, x_18); +x_31 = x_30; +x_11 = x_31; +x_12 = x_27; +goto lbl_13; +} +default: +{ +x_11 = x_8; +x_12 = x_2; +goto lbl_13; +} +} +lbl_13: +{ +obj* x_32; obj* x_33; obj* x_34; +x_32 = lean::mk_nat_obj(1ul); +x_33 = lean::nat_add(x_0, x_32); +x_34 = lean::array_fset(x_10, x_0, x_11); +lean::dec(x_0); +x_0 = x_33; +x_1 = x_34; +x_2 = x_12; +goto _start; +} +} +} +} +obj* l_Array_hmmapAux___main___at___private_init_lean_compiler_resetreuse_9__R___main___spec__2(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { +_start: +{ +obj* x_4; uint8 x_5; +x_4 = lean::array_get_size(x_2); +x_5 = lean::nat_dec_lt(x_1, x_4); +lean::dec(x_4); +if (x_5 == 0) +{ +obj* x_9; +lean::dec(x_1); +lean::dec(x_0); +x_9 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_9, 0, x_2); +lean::cnstr_set(x_9, 1, x_3); +return x_9; +} +else +{ +obj* x_10; obj* x_11; obj* x_12; +x_10 = lean::array_fget(x_2, x_1); +x_11 = l_Array_hmmapAux___main___at___private_init_lean_compiler_resetreuse_2__S___main___spec__1___closed__1; +x_12 = lean::array_fset(x_2, x_1, x_11); +if (lean::obj_tag(x_10) == 0) +{ +obj* x_13; obj* x_15; obj* x_17; obj* x_18; obj* x_19; obj* x_21; obj* x_26; obj* x_27; obj* x_29; obj* x_32; obj* x_33; obj* x_34; obj* x_35; +x_13 = lean::cnstr_get(x_10, 0); +x_15 = lean::cnstr_get(x_10, 1); +if (lean::is_exclusive(x_10)) { + x_17 = x_10; +} else { + lean::inc(x_13); + lean::inc(x_15); + lean::dec(x_10); + x_17 = lean::box(0); +} +x_18 = l___private_init_lean_compiler_resetreuse_9__R___main(x_15, x_3); +x_19 = lean::cnstr_get(x_18, 0); +lean::inc(x_19); +x_21 = lean::cnstr_get(x_18, 1); +lean::inc(x_21); +lean::dec(x_18); +lean::inc(x_13); +lean::inc(x_0); +x_26 = l___private_init_lean_compiler_resetreuse_8__D(x_0, x_13, x_19, x_21); +x_27 = lean::cnstr_get(x_26, 0); +lean::inc(x_27); +x_29 = lean::cnstr_get(x_26, 1); +lean::inc(x_29); +lean::dec(x_26); +if (lean::is_scalar(x_17)) { + x_32 = lean::alloc_cnstr(0, 2, 0); +} else { + x_32 = x_17; +} +lean::cnstr_set(x_32, 0, x_13); +lean::cnstr_set(x_32, 1, x_27); +x_33 = lean::mk_nat_obj(1ul); +x_34 = lean::nat_add(x_1, x_33); +x_35 = lean::array_fset(x_12, x_1, x_32); +lean::dec(x_1); +x_1 = x_34; +x_2 = x_35; +x_3 = x_29; +goto _start; +} +else +{ +obj* x_38; obj* x_40; obj* x_41; obj* x_42; obj* x_44; obj* x_47; obj* x_48; obj* x_49; obj* x_50; +x_38 = lean::cnstr_get(x_10, 0); +if (lean::is_exclusive(x_10)) { + x_40 = x_10; +} else { + lean::inc(x_38); + lean::dec(x_10); + x_40 = lean::box(0); +} +x_41 = l___private_init_lean_compiler_resetreuse_9__R___main(x_38, x_3); +x_42 = lean::cnstr_get(x_41, 0); +lean::inc(x_42); +x_44 = lean::cnstr_get(x_41, 1); +lean::inc(x_44); +lean::dec(x_41); +if (lean::is_scalar(x_40)) { + x_47 = lean::alloc_cnstr(1, 1, 0); +} else { + x_47 = x_40; +} +lean::cnstr_set(x_47, 0, x_42); +x_48 = lean::mk_nat_obj(1ul); +x_49 = lean::nat_add(x_1, x_48); +x_50 = lean::array_fset(x_12, x_1, x_47); +lean::dec(x_1); +x_1 = x_49; +x_2 = x_50; +x_3 = x_44; +goto _start; +} +} +} +} +obj* l___private_init_lean_compiler_resetreuse_9__R___main(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; obj* x_3; obj* x_5; obj* x_8; obj* x_9; +x_2 = l_Lean_IR_FnBody_flatten(x_0); +x_3 = lean::cnstr_get(x_2, 0); +lean::inc(x_3); +x_5 = lean::cnstr_get(x_2, 1); +lean::inc(x_5); +lean::dec(x_2); +x_8 = lean::mk_nat_obj(0ul); +x_9 = l_Array_hmmapAux___main___at___private_init_lean_compiler_resetreuse_9__R___main___spec__1(x_8, x_3, x_1); +switch (lean::obj_tag(x_5)) { +case 9: +{ +obj* x_10; obj* x_12; obj* x_15; obj* x_17; obj* x_19; obj* x_21; obj* x_23; obj* x_24; obj* x_26; obj* x_28; obj* x_29; obj* x_30; obj* x_31; +x_10 = lean::cnstr_get(x_9, 0); +lean::inc(x_10); +x_12 = lean::cnstr_get(x_9, 1); +lean::inc(x_12); +lean::dec(x_9); +x_15 = lean::cnstr_get(x_5, 0); +x_17 = lean::cnstr_get(x_5, 1); +x_19 = lean::cnstr_get(x_5, 2); +if (lean::is_exclusive(x_5)) { + x_21 = x_5; +} else { + lean::inc(x_15); + lean::inc(x_17); + lean::inc(x_19); + lean::dec(x_5); + x_21 = lean::box(0); +} +lean::inc(x_17); +x_23 = l_Array_hmmapAux___main___at___private_init_lean_compiler_resetreuse_9__R___main___spec__2(x_17, x_8, x_19, x_12); +x_24 = lean::cnstr_get(x_23, 0); +x_26 = lean::cnstr_get(x_23, 1); +if (lean::is_exclusive(x_23)) { + x_28 = x_23; +} else { + lean::inc(x_24); + lean::inc(x_26); + lean::dec(x_23); + x_28 = lean::box(0); +} +if (lean::is_scalar(x_21)) { + x_29 = lean::alloc_cnstr(9, 3, 0); +} else { + x_29 = x_21; +} +lean::cnstr_set(x_29, 0, x_15); +lean::cnstr_set(x_29, 1, x_17); +lean::cnstr_set(x_29, 2, x_24); +x_30 = l_Lean_IR_reshape(x_10, x_29); +if (lean::is_scalar(x_28)) { + x_31 = lean::alloc_cnstr(0, 2, 0); +} else { + x_31 = x_28; +} +lean::cnstr_set(x_31, 0, x_30); +lean::cnstr_set(x_31, 1, x_26); +return x_31; +} +default: +{ +obj* x_32; obj* x_34; obj* x_36; obj* x_37; obj* x_38; +x_32 = lean::cnstr_get(x_9, 0); +x_34 = lean::cnstr_get(x_9, 1); +if (lean::is_exclusive(x_9)) { + x_36 = x_9; +} else { + lean::inc(x_32); + lean::inc(x_34); + lean::dec(x_9); + x_36 = lean::box(0); +} +x_37 = l_Lean_IR_reshape(x_32, x_5); +if (lean::is_scalar(x_36)) { + x_38 = lean::alloc_cnstr(0, 2, 0); +} else { + x_38 = x_36; +} +lean::cnstr_set(x_38, 0, x_37); +lean::cnstr_set(x_38, 1, x_34); +return x_38; +} +} +} +} +obj* l___private_init_lean_compiler_resetreuse_9__R(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; +x_2 = l___private_init_lean_compiler_resetreuse_9__R___main(x_0, x_1); +return x_2; +} +} +obj* l_Lean_IR_Decl_insertResetReuse___main(obj* x_0) { +_start: +{ +if (lean::obj_tag(x_0) == 0) +{ +obj* x_1; obj* x_3; uint8 x_5; obj* x_6; obj* x_8; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_15; obj* x_16; obj* x_19; obj* x_20; +x_1 = lean::cnstr_get(x_0, 0); +lean::inc(x_1); +x_3 = lean::cnstr_get(x_0, 1); +lean::inc(x_3); +x_5 = lean::cnstr_get_scalar(x_0, sizeof(void*)*3); +x_6 = lean::cnstr_get(x_0, 2); +lean::inc(x_6); +x_8 = lean::mk_nat_obj(0ul); +lean::inc(x_0); +x_10 = l_Lean_IR_MaxVar_collectDecl___main(x_0, x_8); +if (lean::is_exclusive(x_0)) { + lean::cnstr_release(x_0, 0); + lean::cnstr_release(x_0, 1); + lean::cnstr_release(x_0, 2); + x_11 = x_0; +} else { + lean::dec(x_0); + x_11 = lean::box(0); +} +x_12 = lean::mk_nat_obj(1ul); +x_13 = lean::nat_add(x_10, x_12); +lean::dec(x_10); +x_15 = l___private_init_lean_compiler_resetreuse_9__R___main(x_6, x_13); +x_16 = lean::cnstr_get(x_15, 0); +lean::inc(x_16); +lean::dec(x_15); +if (lean::is_scalar(x_11)) { + x_19 = lean::alloc_cnstr(0, 3, 1); +} else { + x_19 = x_11; +} +lean::cnstr_set(x_19, 0, x_1); +lean::cnstr_set(x_19, 1, x_3); +lean::cnstr_set(x_19, 2, x_16); +lean::cnstr_set_scalar(x_19, sizeof(void*)*3, x_5); +x_20 = x_19; +return x_20; +} +else +{ +return x_0; +} +} +} +obj* l_Lean_IR_Decl_insertResetReuse(obj* x_0) { +_start: +{ +obj* x_1; +x_1 = l_Lean_IR_Decl_insertResetReuse___main(x_0); +return x_1; +} +} +obj* initialize_init_default(obj*); +obj* initialize_init_lean_compiler_ir(obj*); +obj* initialize_init_control_state(obj*); +static bool _G_initialized = false; +obj* initialize_init_lean_compiler_resetreuse(obj* w) { + if (_G_initialized) return w; + _G_initialized = true; +if (io_result_is_error(w)) return w; +w = initialize_init_default(w); +if (io_result_is_error(w)) return w; +w = initialize_init_lean_compiler_ir(w); +if (io_result_is_error(w)) return w; +w = initialize_init_control_state(w); +if (io_result_is_error(w)) return w; + l_Array_hmmapAux___main___at___private_init_lean_compiler_resetreuse_2__S___main___spec__1___closed__1 = _init_l_Array_hmmapAux___main___at___private_init_lean_compiler_resetreuse_2__S___main___spec__1___closed__1(); +lean::mark_persistent(l_Array_hmmapAux___main___at___private_init_lean_compiler_resetreuse_2__S___main___spec__1___closed__1); +return w; +} diff --git a/src/stage0/init/lean/compiler/simpcase.cpp b/src/stage0/init/lean/compiler/simpcase.cpp index ee55dc856d..72d2bd5402 100644 --- a/src/stage0/init/lean/compiler/simpcase.cpp +++ b/src/stage0/init/lean/compiler/simpcase.cpp @@ -1,6 +1,6 @@ // Lean compiler output // Module: init.lean.compiler.simpcase -// Imports: init.default init.lean.compiler.ir +// Imports: init.lean.compiler.ir #include "runtime/object.h" #include "runtime/apply.h" typedef lean::object obj; typedef lean::usize usize; @@ -708,15 +708,12 @@ x_1 = l_Lean_IR_Decl_simpCase___main(x_0); return x_1; } } -obj* initialize_init_default(obj*); obj* initialize_init_lean_compiler_ir(obj*); static bool _G_initialized = false; obj* initialize_init_lean_compiler_simpcase(obj* w) { if (_G_initialized) return w; _G_initialized = true; if (io_result_is_error(w)) return w; -w = initialize_init_default(w); -if (io_result_is_error(w)) return w; w = initialize_init_lean_compiler_ir(w); if (io_result_is_error(w)) return w; l_Array_hmmapAux___main___at_Lean_IR_FnBody_simpCase___main___spec__2___closed__1 = _init_l_Array_hmmapAux___main___at_Lean_IR_FnBody_simpCase___main___spec__2___closed__1();