lean4-htt/stage0/stdlib/LeanChecker.c
Lean stage0 autoupdater e766839345 chore: update stage0
2026-01-09 09:33:31 +00:00

3300 lines
84 KiB
C
Generated

// Lean compiler output
// Module: LeanChecker
// Imports: public import Init public import Lean.CoreM public import Lean.Replay public import LeanChecker.Replay public import Lake.Load.Manifest
#include <lean/lean.h>
#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
#ifdef __cplusplus
extern "C" {
#endif
static lean_object* l_replayFromImports___closed__6;
LEAN_EXPORT lean_object* l_replayFromImports___boxed(lean_object*, lean_object*);
lean_object* l_List_lengthTR___redArg(lean_object*);
LEAN_EXPORT lean_object* l_List_mapM_loop___at___00main_spec__6___boxed(lean_object*, lean_object*, lean_object*);
lean_object* lean_mk_empty_array_with_capacity(lean_object*);
LEAN_EXPORT lean_object* _lean_main(lean_object*);
static lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00main_spec__1___closed__0;
lean_object* l_IO_println___at___00__private_Lean_Language_Basic_0__Lean_Language_reportMessages_spec__3(lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00replayFromImports_spec__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Environment_constants(lean_object*);
lean_object* l_Lean_finalizeImport(lean_object*, lean_object*, lean_object*, uint32_t, uint8_t, uint8_t, uint8_t, uint8_t);
lean_object* l_instBEqOfDecidableEq___redArg___lam__0___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_getCurrentModule();
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00main_spec__3(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* lean_io_as_task(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_main___boxed__const__1;
lean_object* lean_array_push(lean_object*, lean_object*);
lean_object* l_Lean_importModulesCore(lean_object*, uint8_t, lean_object*, uint8_t, lean_object*);
uint8_t l_Lean_Name_isAnonymous(lean_object*);
LEAN_EXPORT lean_object* l_replayFromImports(lean_object*);
static lean_object* l_List_mapM_loop___at___00main_spec__6___closed__0;
lean_object* lean_mk_array(lean_object*, lean_object*);
uint8_t l_List_elem___at___00Lean_addAliasEntry_spec__2(lean_object*, lean_object*);
static lean_object* l_main___closed__3;
lean_object* lean_array_fget_borrowed(lean_object*, lean_object*);
lean_object* l_List_toString___at___00Lean_Environment_AddConstAsyncResult_commitConst_spec__1(lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00main_spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*);
LEAN_EXPORT lean_object* l_main___boxed(lean_object*, lean_object*);
uint8_t l_System_FilePath_pathExists(lean_object*);
lean_object* l_Lake_Manifest_load_x3f(lean_object*);
uint8_t l_Lean_Name_isPrefixOf(lean_object*, lean_object*);
lean_object* lean_read_module_data_parts(lean_object*);
lean_object* lean_string_utf8_byte_size(lean_object*);
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00main_spec__3___redArg___lam__0___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00main_spec__2___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Std_DHashMap_Internal_Raw_u2080_insert___at___00Lean_SMap_insert___at___00Lean_initFn_00___x40_Lean_ReducibilityAttrs_3557922905____hygCtx___hyg_2__spec__1_spec__2___redArg(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_initSearchPath(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00main_spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00main_spec__4(lean_object*, uint8_t, lean_object*, size_t, size_t, lean_object*);
lean_object* l_Lean_findSysroot(lean_object*);
static lean_object* l_main___closed__0;
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00main_spec__3___redArg___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_List_mapM_loop___at___00main_spec__6(lean_object*, lean_object*);
static lean_object* l_List_forIn_x27_loop___at___00main_spec__5___redArg___closed__0;
extern lean_object* l_Lean_instInhabitedImportState_default;
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00main_spec__5___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_main___closed__1;
LEAN_EXPORT lean_object* l_replayFromFresh___boxed(lean_object*, lean_object*);
static lean_object* l_replayFromImports___closed__3;
LEAN_EXPORT lean_object* l_getCurrentModule___boxed(lean_object*);
lean_object* lean_st_ref_get(lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00replayFromImports_spec__0___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_main___closed__5;
lean_object* lean_st_mk_ref(lean_object*);
LEAN_EXPORT lean_object* l_replayFromFresh(lean_object*);
static lean_object* l_main___closed__4;
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00replayFromImports_spec__0(lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*);
uint8_t lean_name_eq(lean_object*, lean_object*);
static lean_object* l_main___closed__6;
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00main_spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Name_capitalize(lean_object*);
static lean_object* l_List_forIn_x27_loop___at___00main_spec__5___redArg___closed__1;
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00main_spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00main_spec__3___redArg(lean_object*, lean_object*);
lean_object* lean_task_get_own(lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00replayFromImports_spec__0___redArg(lean_object*, size_t, size_t, lean_object*);
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00main_spec__3___redArg___lam__0(lean_object*);
static lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00main_spec__4___closed__0;
lean_object* l_Lean_Name_toStringWithToken___at___00Lean_Name_toString_spec__0(lean_object*, uint8_t);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00main_spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_replayFromImports___closed__7;
static lean_object* l_List_forIn_x27_loop___at___00main_spec__2___redArg___closed__0;
static lean_object* l_List_forIn_x27_loop___at___00main_spec__2___redArg___closed__1;
lean_object* lean_array_fget(lean_object*, lean_object*);
lean_object* l_Lean_searchModuleNameOfFileName(lean_object*, lean_object*);
uint8_t lean_nat_dec_eq(lean_object*, lean_object*);
static lean_object* l_replayFromImports___closed__4;
uint8_t lean_nat_dec_lt(lean_object*, lean_object*);
extern lean_object* l_Lean_searchPathRef;
lean_object* l_Lean_findOLean(lean_object*);
static lean_object* l_replayFromImports___closed__0;
lean_object* l_Lean_Environment_replay_x27(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00main_spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_String_toName(lean_object*);
LEAN_EXPORT lean_object* l_List_partition_loop___at___00main_spec__0(lean_object*, lean_object*);
lean_object* l_Array_toSubarray___redArg(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00main_spec__2___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
uint8_t l_Lean_instOrdOLeanLevel_ord(uint8_t, uint8_t);
lean_object* l_List_reverse___redArg(lean_object*);
lean_object* lean_nat_sub(lean_object*, lean_object*);
static lean_object* l_main___closed__7;
uint8_t l_List_elem___redArg(lean_object*, lean_object*, lean_object*);
uint8_t lean_string_memcmp(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_replayFromFresh___closed__0;
LEAN_EXPORT lean_object* l_replayFromFresh___lam__0___boxed(lean_object*, lean_object*);
lean_object* l_Lean_withImportModules___redArg(lean_object*, lean_object*, lean_object*, uint32_t);
size_t lean_usize_add(size_t, size_t);
static uint8_t l_replayFromImports___closed__1;
static lean_object* l_replayFromImports___closed__5;
lean_object* lean_array_uget(lean_object*, size_t);
size_t lean_array_size(lean_object*);
static lean_object* l_getCurrentModule___closed__0;
static lean_object* l_List_partition_loop___at___00main_spec__0___closed__1;
static lean_object* l_main___closed__2;
lean_object* lean_string_append(lean_object*, lean_object*);
lean_object* lean_array_get_size(lean_object*);
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00main_spec__5(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*);
uint8_t lean_nat_dec_le(lean_object*, lean_object*);
uint8_t lean_usize_dec_lt(size_t, size_t);
lean_object* l_IO_eprintln___at___00__private_Init_System_IO_0__IO_eprintlnAux_spec__0(lean_object*);
lean_object* lean_mk_empty_environment(uint32_t);
lean_object* lean_nat_add(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00main_spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_replayFromImports___closed__2;
static lean_object* l_List_partition_loop___at___00main_spec__0___closed__0;
lean_object* lean_environment_free_regions(lean_object*);
lean_object* l_Lean_SearchPath_findAllWithExt(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_replayFromFresh___lam__0(lean_object*);
lean_object* l_Lean_OLeanLevel_adjustFileName(lean_object*, uint8_t);
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00main_spec__5___redArg(lean_object*, uint8_t, lean_object*, lean_object*);
lean_object* l_instDecidableEqString___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00replayFromImports_spec__0___redArg(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4) {
_start:
{
uint8_t x_6;
x_6 = lean_usize_dec_lt(x_3, x_2);
if (x_6 == 0)
{
lean_object* x_7;
x_7 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_7, 0, x_4);
return x_7;
}
else
{
uint8_t x_8;
x_8 = !lean_is_exclusive(x_4);
if (x_8 == 0)
{
lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14;
x_9 = lean_ctor_get(x_4, 0);
x_10 = lean_ctor_get(x_4, 1);
x_11 = lean_ctor_get(x_9, 0);
x_12 = lean_ctor_get(x_9, 1);
x_13 = lean_ctor_get(x_9, 2);
x_14 = lean_nat_dec_lt(x_12, x_13);
if (x_14 == 0)
{
lean_object* x_15;
x_15 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_15, 0, x_4);
return x_15;
}
else
{
uint8_t x_16;
lean_inc(x_13);
lean_inc(x_12);
lean_inc_ref(x_11);
x_16 = !lean_is_exclusive(x_9);
if (x_16 == 0)
{
lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; size_t x_25; size_t x_26;
x_17 = lean_ctor_get(x_9, 2);
lean_dec(x_17);
x_18 = lean_ctor_get(x_9, 1);
lean_dec(x_18);
x_19 = lean_ctor_get(x_9, 0);
lean_dec(x_19);
x_20 = lean_array_uget(x_1, x_3);
x_21 = lean_array_fget(x_11, x_12);
x_22 = lean_unsigned_to_nat(1u);
x_23 = lean_nat_add(x_12, x_22);
lean_dec(x_12);
lean_ctor_set(x_9, 1, x_23);
x_24 = l_Std_DHashMap_Internal_Raw_u2080_insert___at___00Lean_SMap_insert___at___00Lean_initFn_00___x40_Lean_ReducibilityAttrs_3557922905____hygCtx___hyg_2__spec__1_spec__2___redArg(x_10, x_20, x_21);
lean_ctor_set(x_4, 1, x_24);
x_25 = 1;
x_26 = lean_usize_add(x_3, x_25);
x_3 = x_26;
goto _start;
}
else
{
lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; size_t x_34; size_t x_35;
lean_dec(x_9);
x_28 = lean_array_uget(x_1, x_3);
x_29 = lean_array_fget(x_11, x_12);
x_30 = lean_unsigned_to_nat(1u);
x_31 = lean_nat_add(x_12, x_30);
lean_dec(x_12);
x_32 = lean_alloc_ctor(0, 3, 0);
lean_ctor_set(x_32, 0, x_11);
lean_ctor_set(x_32, 1, x_31);
lean_ctor_set(x_32, 2, x_13);
x_33 = l_Std_DHashMap_Internal_Raw_u2080_insert___at___00Lean_SMap_insert___at___00Lean_initFn_00___x40_Lean_ReducibilityAttrs_3557922905____hygCtx___hyg_2__spec__1_spec__2___redArg(x_10, x_28, x_29);
lean_ctor_set(x_4, 1, x_33);
lean_ctor_set(x_4, 0, x_32);
x_34 = 1;
x_35 = lean_usize_add(x_3, x_34);
x_3 = x_35;
goto _start;
}
}
}
else
{
lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; uint8_t x_42;
x_37 = lean_ctor_get(x_4, 0);
x_38 = lean_ctor_get(x_4, 1);
lean_inc(x_38);
lean_inc(x_37);
lean_dec(x_4);
x_39 = lean_ctor_get(x_37, 0);
x_40 = lean_ctor_get(x_37, 1);
x_41 = lean_ctor_get(x_37, 2);
x_42 = lean_nat_dec_lt(x_40, x_41);
if (x_42 == 0)
{
lean_object* x_43; lean_object* x_44;
x_43 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_43, 0, x_37);
lean_ctor_set(x_43, 1, x_38);
x_44 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_44, 0, x_43);
return x_44;
}
else
{
lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; size_t x_53; size_t x_54;
lean_inc(x_41);
lean_inc(x_40);
lean_inc_ref(x_39);
if (lean_is_exclusive(x_37)) {
lean_ctor_release(x_37, 0);
lean_ctor_release(x_37, 1);
lean_ctor_release(x_37, 2);
x_45 = x_37;
} else {
lean_dec_ref(x_37);
x_45 = lean_box(0);
}
x_46 = lean_array_uget(x_1, x_3);
x_47 = lean_array_fget(x_39, x_40);
x_48 = lean_unsigned_to_nat(1u);
x_49 = lean_nat_add(x_40, x_48);
lean_dec(x_40);
if (lean_is_scalar(x_45)) {
x_50 = lean_alloc_ctor(0, 3, 0);
} else {
x_50 = x_45;
}
lean_ctor_set(x_50, 0, x_39);
lean_ctor_set(x_50, 1, x_49);
lean_ctor_set(x_50, 2, x_41);
x_51 = l_Std_DHashMap_Internal_Raw_u2080_insert___at___00Lean_SMap_insert___at___00Lean_initFn_00___x40_Lean_ReducibilityAttrs_3557922905____hygCtx___hyg_2__spec__1_spec__2___redArg(x_38, x_46, x_47);
x_52 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_52, 0, x_50);
lean_ctor_set(x_52, 1, x_51);
x_53 = 1;
x_54 = lean_usize_add(x_3, x_53);
x_3 = x_54;
x_4 = x_52;
goto _start;
}
}
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00replayFromImports_spec__0(lean_object* x_1, lean_object* x_2, lean_object* x_3, size_t x_4, size_t x_5, lean_object* x_6) {
_start:
{
lean_object* x_8;
x_8 = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00replayFromImports_spec__0___redArg(x_3, x_4, x_5, x_6);
return x_8;
}
}
static lean_object* _init_l_replayFromImports___closed__0() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = lean_box(0);
x_2 = lean_unsigned_to_nat(16u);
x_3 = lean_mk_array(x_2, x_1);
return x_3;
}
}
static uint8_t _init_l_replayFromImports___closed__1() {
_start:
{
uint8_t x_1; uint8_t x_2;
x_1 = 2;
x_2 = l_Lean_instOrdOLeanLevel_ord(x_1, x_1);
return x_2;
}
}
static lean_object* _init_l_replayFromImports___closed__2() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string_unchecked("failed to read module data", 26, 26);
return x_1;
}
}
static lean_object* _init_l_replayFromImports___closed__3() {
_start:
{
lean_object* x_1; lean_object* x_2;
x_1 = l_replayFromImports___closed__2;
x_2 = lean_alloc_ctor(18, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
static lean_object* _init_l_replayFromImports___closed__4() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string_unchecked("object file '", 13, 13);
return x_1;
}
}
static lean_object* _init_l_replayFromImports___closed__5() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string_unchecked("' of module ", 12, 12);
return x_1;
}
}
static lean_object* _init_l_replayFromImports___closed__6() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string_unchecked(" does not exist", 15, 15);
return x_1;
}
}
static lean_object* _init_l_replayFromImports___closed__7() {
_start:
{
lean_object* x_1; lean_object* x_2;
x_1 = lean_unsigned_to_nat(1u);
x_2 = lean_mk_empty_array_with_capacity(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_replayFromImports(lean_object* x_1) {
_start:
{
lean_object* x_3;
lean_inc(x_1);
x_3 = l_Lean_findOLean(x_1);
if (lean_obj_tag(x_3) == 0)
{
uint8_t x_4;
x_4 = !lean_is_exclusive(x_3);
if (x_4 == 0)
{
lean_object* x_5; uint8_t x_6; lean_object* x_7; uint8_t x_8; lean_object* x_9; uint8_t x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; lean_object* x_77; lean_object* x_78;
x_5 = lean_ctor_get(x_3, 0);
x_6 = l_System_FilePath_pathExists(x_5);
if (x_6 == 0)
{
lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; uint8_t x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113;
x_104 = l_replayFromImports___closed__4;
x_105 = lean_string_append(x_104, x_5);
lean_dec(x_5);
x_106 = l_replayFromImports___closed__5;
x_107 = lean_string_append(x_105, x_106);
x_108 = 1;
x_109 = l_Lean_Name_toStringWithToken___at___00Lean_Name_toString_spec__0(x_1, x_108);
x_110 = lean_string_append(x_107, x_109);
lean_dec_ref(x_109);
x_111 = l_replayFromImports___closed__6;
x_112 = lean_string_append(x_110, x_111);
x_113 = lean_alloc_ctor(18, 1, 0);
lean_ctor_set(x_113, 0, x_112);
lean_ctor_set_tag(x_3, 1);
lean_ctor_set(x_3, 0, x_113);
return x_3;
}
else
{
uint8_t x_114; lean_object* x_115; uint8_t x_116; lean_object* x_117; lean_object* x_118;
lean_free_object(x_3);
lean_dec(x_1);
x_114 = 1;
lean_inc(x_5);
x_115 = l_Lean_OLeanLevel_adjustFileName(x_5, x_114);
x_116 = l_System_FilePath_pathExists(x_115);
x_117 = l_replayFromImports___closed__7;
lean_inc(x_5);
x_118 = lean_array_push(x_117, x_5);
if (x_116 == 0)
{
lean_dec_ref(x_115);
lean_dec(x_5);
x_77 = x_118;
x_78 = lean_box(0);
goto block_103;
}
else
{
uint8_t x_119; lean_object* x_120; uint8_t x_121; lean_object* x_122;
x_119 = 2;
x_120 = l_Lean_OLeanLevel_adjustFileName(x_5, x_119);
x_121 = l_System_FilePath_pathExists(x_120);
x_122 = lean_array_push(x_118, x_115);
if (x_121 == 0)
{
lean_dec_ref(x_120);
x_77 = x_122;
x_78 = lean_box(0);
goto block_103;
}
else
{
lean_object* x_123;
x_123 = lean_array_push(x_122, x_120);
x_77 = x_123;
x_78 = lean_box(0);
goto block_103;
}
}
}
block_76:
{
lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19;
x_15 = l_Lean_instInhabitedImportState_default;
x_16 = lean_st_mk_ref(x_15);
x_17 = lean_ctor_get(x_11, 0);
lean_inc_ref(x_17);
lean_dec_ref(x_11);
x_18 = lean_box(1);
lean_inc(x_16);
x_19 = l_Lean_importModulesCore(x_17, x_8, x_18, x_14, x_16);
if (lean_obj_tag(x_19) == 0)
{
lean_object* x_20; lean_object* x_21; uint32_t x_22; lean_object* x_23;
lean_dec_ref(x_19);
x_20 = lean_st_ref_get(x_16);
lean_dec(x_16);
x_21 = lean_box(0);
x_22 = 0;
x_23 = l_Lean_finalizeImport(x_20, x_17, x_21, x_22, x_10, x_10, x_8, x_6);
lean_dec(x_20);
if (lean_obj_tag(x_23) == 0)
{
lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; uint8_t x_28;
x_24 = lean_ctor_get(x_23, 0);
lean_inc(x_24);
lean_dec_ref(x_23);
x_25 = lean_unsigned_to_nat(1u);
x_26 = lean_nat_sub(x_13, x_25);
lean_dec(x_13);
x_27 = lean_array_fget(x_7, x_26);
lean_dec(x_26);
lean_dec_ref(x_7);
x_28 = !lean_is_exclusive(x_27);
if (x_28 == 0)
{
lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; size_t x_37; size_t x_38; lean_object* x_39;
x_29 = lean_ctor_get(x_27, 0);
x_30 = lean_ctor_get(x_27, 1);
lean_dec(x_30);
x_31 = lean_ctor_get(x_29, 1);
lean_inc_ref(x_31);
x_32 = lean_ctor_get(x_29, 2);
lean_inc_ref(x_32);
lean_dec(x_29);
x_33 = l_replayFromImports___closed__0;
lean_inc(x_9);
lean_ctor_set(x_27, 1, x_33);
lean_ctor_set(x_27, 0, x_9);
x_34 = lean_array_get_size(x_32);
x_35 = l_Array_toSubarray___redArg(x_32, x_9, x_34);
x_36 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_36, 0, x_35);
lean_ctor_set(x_36, 1, x_27);
x_37 = lean_array_size(x_31);
x_38 = 0;
x_39 = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00replayFromImports_spec__0___redArg(x_31, x_37, x_38, x_36);
lean_dec_ref(x_31);
if (lean_obj_tag(x_39) == 0)
{
lean_object* x_40; lean_object* x_41; lean_object* x_42;
x_40 = lean_ctor_get(x_39, 0);
lean_inc(x_40);
lean_dec_ref(x_39);
x_41 = lean_ctor_get(x_40, 1);
lean_inc(x_41);
lean_dec(x_40);
x_42 = l_Lean_Environment_replay_x27(x_41, x_24);
if (lean_obj_tag(x_42) == 0)
{
lean_object* x_43; lean_object* x_44;
x_43 = lean_ctor_get(x_42, 0);
lean_inc(x_43);
lean_dec_ref(x_42);
x_44 = lean_environment_free_regions(x_43);
return x_44;
}
else
{
uint8_t x_45;
x_45 = !lean_is_exclusive(x_42);
if (x_45 == 0)
{
return x_42;
}
else
{
lean_object* x_46; lean_object* x_47;
x_46 = lean_ctor_get(x_42, 0);
lean_inc(x_46);
lean_dec(x_42);
x_47 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_47, 0, x_46);
return x_47;
}
}
}
else
{
uint8_t x_48;
lean_dec(x_24);
x_48 = !lean_is_exclusive(x_39);
if (x_48 == 0)
{
return x_39;
}
else
{
lean_object* x_49; lean_object* x_50;
x_49 = lean_ctor_get(x_39, 0);
lean_inc(x_49);
lean_dec(x_39);
x_50 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_50, 0, x_49);
return x_50;
}
}
}
else
{
lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; size_t x_59; size_t x_60; lean_object* x_61;
x_51 = lean_ctor_get(x_27, 0);
lean_inc(x_51);
lean_dec(x_27);
x_52 = lean_ctor_get(x_51, 1);
lean_inc_ref(x_52);
x_53 = lean_ctor_get(x_51, 2);
lean_inc_ref(x_53);
lean_dec(x_51);
x_54 = l_replayFromImports___closed__0;
lean_inc(x_9);
x_55 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_55, 0, x_9);
lean_ctor_set(x_55, 1, x_54);
x_56 = lean_array_get_size(x_53);
x_57 = l_Array_toSubarray___redArg(x_53, x_9, x_56);
x_58 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_58, 0, x_57);
lean_ctor_set(x_58, 1, x_55);
x_59 = lean_array_size(x_52);
x_60 = 0;
x_61 = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00replayFromImports_spec__0___redArg(x_52, x_59, x_60, x_58);
lean_dec_ref(x_52);
if (lean_obj_tag(x_61) == 0)
{
lean_object* x_62; lean_object* x_63; lean_object* x_64;
x_62 = lean_ctor_get(x_61, 0);
lean_inc(x_62);
lean_dec_ref(x_61);
x_63 = lean_ctor_get(x_62, 1);
lean_inc(x_63);
lean_dec(x_62);
x_64 = l_Lean_Environment_replay_x27(x_63, x_24);
if (lean_obj_tag(x_64) == 0)
{
lean_object* x_65; lean_object* x_66;
x_65 = lean_ctor_get(x_64, 0);
lean_inc(x_65);
lean_dec_ref(x_64);
x_66 = lean_environment_free_regions(x_65);
return x_66;
}
else
{
lean_object* x_67; lean_object* x_68; lean_object* x_69;
x_67 = lean_ctor_get(x_64, 0);
lean_inc(x_67);
if (lean_is_exclusive(x_64)) {
lean_ctor_release(x_64, 0);
x_68 = x_64;
} else {
lean_dec_ref(x_64);
x_68 = lean_box(0);
}
if (lean_is_scalar(x_68)) {
x_69 = lean_alloc_ctor(1, 1, 0);
} else {
x_69 = x_68;
}
lean_ctor_set(x_69, 0, x_67);
return x_69;
}
}
else
{
lean_object* x_70; lean_object* x_71; lean_object* x_72;
lean_dec(x_24);
x_70 = lean_ctor_get(x_61, 0);
lean_inc(x_70);
if (lean_is_exclusive(x_61)) {
lean_ctor_release(x_61, 0);
x_71 = x_61;
} else {
lean_dec_ref(x_61);
x_71 = lean_box(0);
}
if (lean_is_scalar(x_71)) {
x_72 = lean_alloc_ctor(1, 1, 0);
} else {
x_72 = x_71;
}
lean_ctor_set(x_72, 0, x_70);
return x_72;
}
}
}
else
{
uint8_t x_73;
lean_dec(x_13);
lean_dec(x_9);
lean_dec_ref(x_7);
x_73 = !lean_is_exclusive(x_23);
if (x_73 == 0)
{
return x_23;
}
else
{
lean_object* x_74; lean_object* x_75;
x_74 = lean_ctor_get(x_23, 0);
lean_inc(x_74);
lean_dec(x_23);
x_75 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_75, 0, x_74);
return x_75;
}
}
}
else
{
lean_dec_ref(x_17);
lean_dec(x_16);
lean_dec(x_13);
lean_dec(x_9);
lean_dec_ref(x_7);
return x_19;
}
}
block_103:
{
lean_object* x_79;
x_79 = lean_read_module_data_parts(x_77);
lean_dec_ref(x_77);
if (lean_obj_tag(x_79) == 0)
{
uint8_t x_80;
x_80 = !lean_is_exclusive(x_79);
if (x_80 == 0)
{
lean_object* x_81; lean_object* x_82; lean_object* x_83; uint8_t x_84;
x_81 = lean_ctor_get(x_79, 0);
x_82 = lean_array_get_size(x_81);
x_83 = lean_unsigned_to_nat(0u);
x_84 = lean_nat_dec_eq(x_82, x_83);
if (x_84 == 0)
{
lean_object* x_85; lean_object* x_86; uint8_t x_87; uint8_t x_88;
lean_free_object(x_79);
x_85 = lean_array_fget_borrowed(x_81, x_83);
x_86 = lean_ctor_get(x_85, 0);
lean_inc(x_86);
x_87 = 2;
x_88 = l_replayFromImports___closed__1;
if (x_88 == 0)
{
x_7 = x_81;
x_8 = x_87;
x_9 = x_83;
x_10 = x_84;
x_11 = x_86;
x_12 = lean_box(0);
x_13 = x_82;
x_14 = x_6;
goto block_76;
}
else
{
x_7 = x_81;
x_8 = x_87;
x_9 = x_83;
x_10 = x_84;
x_11 = x_86;
x_12 = lean_box(0);
x_13 = x_82;
x_14 = x_84;
goto block_76;
}
}
else
{
lean_object* x_89;
lean_dec(x_81);
x_89 = l_replayFromImports___closed__3;
lean_ctor_set_tag(x_79, 1);
lean_ctor_set(x_79, 0, x_89);
return x_79;
}
}
else
{
lean_object* x_90; lean_object* x_91; lean_object* x_92; uint8_t x_93;
x_90 = lean_ctor_get(x_79, 0);
lean_inc(x_90);
lean_dec(x_79);
x_91 = lean_array_get_size(x_90);
x_92 = lean_unsigned_to_nat(0u);
x_93 = lean_nat_dec_eq(x_91, x_92);
if (x_93 == 0)
{
lean_object* x_94; lean_object* x_95; uint8_t x_96; uint8_t x_97;
x_94 = lean_array_fget_borrowed(x_90, x_92);
x_95 = lean_ctor_get(x_94, 0);
lean_inc(x_95);
x_96 = 2;
x_97 = l_replayFromImports___closed__1;
if (x_97 == 0)
{
x_7 = x_90;
x_8 = x_96;
x_9 = x_92;
x_10 = x_93;
x_11 = x_95;
x_12 = lean_box(0);
x_13 = x_91;
x_14 = x_6;
goto block_76;
}
else
{
x_7 = x_90;
x_8 = x_96;
x_9 = x_92;
x_10 = x_93;
x_11 = x_95;
x_12 = lean_box(0);
x_13 = x_91;
x_14 = x_93;
goto block_76;
}
}
else
{
lean_object* x_98; lean_object* x_99;
lean_dec(x_90);
x_98 = l_replayFromImports___closed__3;
x_99 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_99, 0, x_98);
return x_99;
}
}
}
else
{
uint8_t x_100;
x_100 = !lean_is_exclusive(x_79);
if (x_100 == 0)
{
return x_79;
}
else
{
lean_object* x_101; lean_object* x_102;
x_101 = lean_ctor_get(x_79, 0);
lean_inc(x_101);
lean_dec(x_79);
x_102 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_102, 0, x_101);
return x_102;
}
}
}
}
else
{
lean_object* x_124; uint8_t x_125; lean_object* x_126; uint8_t x_127; lean_object* x_128; uint8_t x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; uint8_t x_133; lean_object* x_174; lean_object* x_175;
x_124 = lean_ctor_get(x_3, 0);
lean_inc(x_124);
lean_dec(x_3);
x_125 = l_System_FilePath_pathExists(x_124);
if (x_125 == 0)
{
lean_object* x_192; lean_object* x_193; lean_object* x_194; lean_object* x_195; uint8_t x_196; lean_object* x_197; lean_object* x_198; lean_object* x_199; lean_object* x_200; lean_object* x_201; lean_object* x_202;
x_192 = l_replayFromImports___closed__4;
x_193 = lean_string_append(x_192, x_124);
lean_dec(x_124);
x_194 = l_replayFromImports___closed__5;
x_195 = lean_string_append(x_193, x_194);
x_196 = 1;
x_197 = l_Lean_Name_toStringWithToken___at___00Lean_Name_toString_spec__0(x_1, x_196);
x_198 = lean_string_append(x_195, x_197);
lean_dec_ref(x_197);
x_199 = l_replayFromImports___closed__6;
x_200 = lean_string_append(x_198, x_199);
x_201 = lean_alloc_ctor(18, 1, 0);
lean_ctor_set(x_201, 0, x_200);
x_202 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_202, 0, x_201);
return x_202;
}
else
{
uint8_t x_203; lean_object* x_204; uint8_t x_205; lean_object* x_206; lean_object* x_207;
lean_dec(x_1);
x_203 = 1;
lean_inc(x_124);
x_204 = l_Lean_OLeanLevel_adjustFileName(x_124, x_203);
x_205 = l_System_FilePath_pathExists(x_204);
x_206 = l_replayFromImports___closed__7;
lean_inc(x_124);
x_207 = lean_array_push(x_206, x_124);
if (x_205 == 0)
{
lean_dec_ref(x_204);
lean_dec(x_124);
x_174 = x_207;
x_175 = lean_box(0);
goto block_191;
}
else
{
uint8_t x_208; lean_object* x_209; uint8_t x_210; lean_object* x_211;
x_208 = 2;
x_209 = l_Lean_OLeanLevel_adjustFileName(x_124, x_208);
x_210 = l_System_FilePath_pathExists(x_209);
x_211 = lean_array_push(x_207, x_204);
if (x_210 == 0)
{
lean_dec_ref(x_209);
x_174 = x_211;
x_175 = lean_box(0);
goto block_191;
}
else
{
lean_object* x_212;
x_212 = lean_array_push(x_211, x_209);
x_174 = x_212;
x_175 = lean_box(0);
goto block_191;
}
}
}
block_173:
{
lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138;
x_134 = l_Lean_instInhabitedImportState_default;
x_135 = lean_st_mk_ref(x_134);
x_136 = lean_ctor_get(x_130, 0);
lean_inc_ref(x_136);
lean_dec_ref(x_130);
x_137 = lean_box(1);
lean_inc(x_135);
x_138 = l_Lean_importModulesCore(x_136, x_127, x_137, x_133, x_135);
if (lean_obj_tag(x_138) == 0)
{
lean_object* x_139; lean_object* x_140; uint32_t x_141; lean_object* x_142;
lean_dec_ref(x_138);
x_139 = lean_st_ref_get(x_135);
lean_dec(x_135);
x_140 = lean_box(0);
x_141 = 0;
x_142 = l_Lean_finalizeImport(x_139, x_136, x_140, x_141, x_129, x_129, x_127, x_125);
lean_dec(x_139);
if (lean_obj_tag(x_142) == 0)
{
lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; lean_object* x_149; lean_object* x_150; lean_object* x_151; lean_object* x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155; size_t x_156; size_t x_157; lean_object* x_158;
x_143 = lean_ctor_get(x_142, 0);
lean_inc(x_143);
lean_dec_ref(x_142);
x_144 = lean_unsigned_to_nat(1u);
x_145 = lean_nat_sub(x_132, x_144);
lean_dec(x_132);
x_146 = lean_array_fget(x_126, x_145);
lean_dec(x_145);
lean_dec_ref(x_126);
x_147 = lean_ctor_get(x_146, 0);
lean_inc(x_147);
if (lean_is_exclusive(x_146)) {
lean_ctor_release(x_146, 0);
lean_ctor_release(x_146, 1);
x_148 = x_146;
} else {
lean_dec_ref(x_146);
x_148 = lean_box(0);
}
x_149 = lean_ctor_get(x_147, 1);
lean_inc_ref(x_149);
x_150 = lean_ctor_get(x_147, 2);
lean_inc_ref(x_150);
lean_dec(x_147);
x_151 = l_replayFromImports___closed__0;
lean_inc(x_128);
if (lean_is_scalar(x_148)) {
x_152 = lean_alloc_ctor(0, 2, 0);
} else {
x_152 = x_148;
}
lean_ctor_set(x_152, 0, x_128);
lean_ctor_set(x_152, 1, x_151);
x_153 = lean_array_get_size(x_150);
x_154 = l_Array_toSubarray___redArg(x_150, x_128, x_153);
x_155 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_155, 0, x_154);
lean_ctor_set(x_155, 1, x_152);
x_156 = lean_array_size(x_149);
x_157 = 0;
x_158 = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00replayFromImports_spec__0___redArg(x_149, x_156, x_157, x_155);
lean_dec_ref(x_149);
if (lean_obj_tag(x_158) == 0)
{
lean_object* x_159; lean_object* x_160; lean_object* x_161;
x_159 = lean_ctor_get(x_158, 0);
lean_inc(x_159);
lean_dec_ref(x_158);
x_160 = lean_ctor_get(x_159, 1);
lean_inc(x_160);
lean_dec(x_159);
x_161 = l_Lean_Environment_replay_x27(x_160, x_143);
if (lean_obj_tag(x_161) == 0)
{
lean_object* x_162; lean_object* x_163;
x_162 = lean_ctor_get(x_161, 0);
lean_inc(x_162);
lean_dec_ref(x_161);
x_163 = lean_environment_free_regions(x_162);
return x_163;
}
else
{
lean_object* x_164; lean_object* x_165; lean_object* x_166;
x_164 = lean_ctor_get(x_161, 0);
lean_inc(x_164);
if (lean_is_exclusive(x_161)) {
lean_ctor_release(x_161, 0);
x_165 = x_161;
} else {
lean_dec_ref(x_161);
x_165 = lean_box(0);
}
if (lean_is_scalar(x_165)) {
x_166 = lean_alloc_ctor(1, 1, 0);
} else {
x_166 = x_165;
}
lean_ctor_set(x_166, 0, x_164);
return x_166;
}
}
else
{
lean_object* x_167; lean_object* x_168; lean_object* x_169;
lean_dec(x_143);
x_167 = lean_ctor_get(x_158, 0);
lean_inc(x_167);
if (lean_is_exclusive(x_158)) {
lean_ctor_release(x_158, 0);
x_168 = x_158;
} else {
lean_dec_ref(x_158);
x_168 = lean_box(0);
}
if (lean_is_scalar(x_168)) {
x_169 = lean_alloc_ctor(1, 1, 0);
} else {
x_169 = x_168;
}
lean_ctor_set(x_169, 0, x_167);
return x_169;
}
}
else
{
lean_object* x_170; lean_object* x_171; lean_object* x_172;
lean_dec(x_132);
lean_dec(x_128);
lean_dec_ref(x_126);
x_170 = lean_ctor_get(x_142, 0);
lean_inc(x_170);
if (lean_is_exclusive(x_142)) {
lean_ctor_release(x_142, 0);
x_171 = x_142;
} else {
lean_dec_ref(x_142);
x_171 = lean_box(0);
}
if (lean_is_scalar(x_171)) {
x_172 = lean_alloc_ctor(1, 1, 0);
} else {
x_172 = x_171;
}
lean_ctor_set(x_172, 0, x_170);
return x_172;
}
}
else
{
lean_dec_ref(x_136);
lean_dec(x_135);
lean_dec(x_132);
lean_dec(x_128);
lean_dec_ref(x_126);
return x_138;
}
}
block_191:
{
lean_object* x_176;
x_176 = lean_read_module_data_parts(x_174);
lean_dec_ref(x_174);
if (lean_obj_tag(x_176) == 0)
{
lean_object* x_177; lean_object* x_178; lean_object* x_179; lean_object* x_180; uint8_t x_181;
x_177 = lean_ctor_get(x_176, 0);
lean_inc(x_177);
if (lean_is_exclusive(x_176)) {
lean_ctor_release(x_176, 0);
x_178 = x_176;
} else {
lean_dec_ref(x_176);
x_178 = lean_box(0);
}
x_179 = lean_array_get_size(x_177);
x_180 = lean_unsigned_to_nat(0u);
x_181 = lean_nat_dec_eq(x_179, x_180);
if (x_181 == 0)
{
lean_object* x_182; lean_object* x_183; uint8_t x_184; uint8_t x_185;
lean_dec(x_178);
x_182 = lean_array_fget_borrowed(x_177, x_180);
x_183 = lean_ctor_get(x_182, 0);
lean_inc(x_183);
x_184 = 2;
x_185 = l_replayFromImports___closed__1;
if (x_185 == 0)
{
x_126 = x_177;
x_127 = x_184;
x_128 = x_180;
x_129 = x_181;
x_130 = x_183;
x_131 = lean_box(0);
x_132 = x_179;
x_133 = x_125;
goto block_173;
}
else
{
x_126 = x_177;
x_127 = x_184;
x_128 = x_180;
x_129 = x_181;
x_130 = x_183;
x_131 = lean_box(0);
x_132 = x_179;
x_133 = x_181;
goto block_173;
}
}
else
{
lean_object* x_186; lean_object* x_187;
lean_dec(x_177);
x_186 = l_replayFromImports___closed__3;
if (lean_is_scalar(x_178)) {
x_187 = lean_alloc_ctor(1, 1, 0);
} else {
x_187 = x_178;
lean_ctor_set_tag(x_187, 1);
}
lean_ctor_set(x_187, 0, x_186);
return x_187;
}
}
else
{
lean_object* x_188; lean_object* x_189; lean_object* x_190;
x_188 = lean_ctor_get(x_176, 0);
lean_inc(x_188);
if (lean_is_exclusive(x_176)) {
lean_ctor_release(x_176, 0);
x_189 = x_176;
} else {
lean_dec_ref(x_176);
x_189 = lean_box(0);
}
if (lean_is_scalar(x_189)) {
x_190 = lean_alloc_ctor(1, 1, 0);
} else {
x_190 = x_189;
}
lean_ctor_set(x_190, 0, x_188);
return x_190;
}
}
}
}
else
{
uint8_t x_213;
lean_dec(x_1);
x_213 = !lean_is_exclusive(x_3);
if (x_213 == 0)
{
return x_3;
}
else
{
lean_object* x_214; lean_object* x_215;
x_214 = lean_ctor_get(x_3, 0);
lean_inc(x_214);
lean_dec(x_3);
x_215 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_215, 0, x_214);
return x_215;
}
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00replayFromImports_spec__0___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
_start:
{
size_t x_8; size_t x_9; lean_object* x_10;
x_8 = lean_unbox_usize(x_4);
lean_dec(x_4);
x_9 = lean_unbox_usize(x_5);
lean_dec(x_5);
x_10 = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00replayFromImports_spec__0(x_1, x_2, x_3, x_8, x_9, x_6);
lean_dec_ref(x_3);
lean_dec_ref(x_2);
lean_dec_ref(x_1);
return x_10;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00replayFromImports_spec__0___redArg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
size_t x_6; size_t x_7; lean_object* x_8;
x_6 = lean_unbox_usize(x_2);
lean_dec(x_2);
x_7 = lean_unbox_usize(x_3);
lean_dec(x_3);
x_8 = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00replayFromImports_spec__0___redArg(x_1, x_6, x_7, x_4);
lean_dec_ref(x_1);
return x_8;
}
}
LEAN_EXPORT lean_object* l_replayFromImports___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3;
x_3 = l_replayFromImports(x_1);
return x_3;
}
}
static lean_object* _init_l_replayFromFresh___closed__0() {
_start:
{
lean_object* x_1; lean_object* x_2;
x_1 = lean_unsigned_to_nat(1u);
x_2 = lean_mk_empty_array_with_capacity(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_replayFromFresh___lam__0(lean_object* x_1) {
_start:
{
uint32_t x_3; lean_object* x_4;
x_3 = 0;
x_4 = lean_mk_empty_environment(x_3);
if (lean_obj_tag(x_4) == 0)
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8;
x_5 = lean_ctor_get(x_4, 0);
lean_inc(x_5);
lean_dec_ref(x_4);
x_6 = l_Lean_Environment_constants(x_1);
x_7 = lean_ctor_get(x_6, 0);
lean_inc_ref(x_7);
lean_dec_ref(x_6);
x_8 = l_Lean_Environment_replay_x27(x_7, x_5);
if (lean_obj_tag(x_8) == 0)
{
uint8_t x_9;
x_9 = !lean_is_exclusive(x_8);
if (x_9 == 0)
{
lean_object* x_10; lean_object* x_11;
x_10 = lean_ctor_get(x_8, 0);
lean_dec(x_10);
x_11 = lean_box(0);
lean_ctor_set(x_8, 0, x_11);
return x_8;
}
else
{
lean_object* x_12; lean_object* x_13;
lean_dec(x_8);
x_12 = lean_box(0);
x_13 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_13, 0, x_12);
return x_13;
}
}
else
{
uint8_t x_14;
x_14 = !lean_is_exclusive(x_8);
if (x_14 == 0)
{
return x_8;
}
else
{
lean_object* x_15; lean_object* x_16;
x_15 = lean_ctor_get(x_8, 0);
lean_inc(x_15);
lean_dec(x_8);
x_16 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_16, 0, x_15);
return x_16;
}
}
}
else
{
uint8_t x_17;
lean_dec_ref(x_1);
x_17 = !lean_is_exclusive(x_4);
if (x_17 == 0)
{
return x_4;
}
else
{
lean_object* x_18; lean_object* x_19;
x_18 = lean_ctor_get(x_4, 0);
lean_inc(x_18);
lean_dec(x_4);
x_19 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_19, 0, x_18);
return x_19;
}
}
}
}
LEAN_EXPORT lean_object* l_replayFromFresh___lam__0___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3;
x_3 = l_replayFromFresh___lam__0(x_1);
return x_3;
}
}
LEAN_EXPORT lean_object* l_replayFromFresh(lean_object* x_1) {
_start:
{
lean_object* x_3; uint8_t x_4; uint8_t x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; uint32_t x_10; lean_object* x_11;
x_3 = lean_alloc_closure((void*)(l_replayFromFresh___lam__0___boxed), 2, 0);
x_4 = 0;
x_5 = 1;
x_6 = lean_alloc_ctor(0, 1, 3);
lean_ctor_set(x_6, 0, x_1);
lean_ctor_set_uint8(x_6, sizeof(void*)*1, x_4);
lean_ctor_set_uint8(x_6, sizeof(void*)*1 + 1, x_5);
lean_ctor_set_uint8(x_6, sizeof(void*)*1 + 2, x_4);
x_7 = l_replayFromFresh___closed__0;
x_8 = lean_array_push(x_7, x_6);
x_9 = lean_box(0);
x_10 = 0;
x_11 = l_Lean_withImportModules___redArg(x_8, x_9, x_3, x_10);
return x_11;
}
}
LEAN_EXPORT lean_object* l_replayFromFresh___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3;
x_3 = l_replayFromFresh(x_1);
return x_3;
}
}
static lean_object* _init_l_getCurrentModule___closed__0() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string_unchecked("lake-manifest.json", 18, 18);
return x_1;
}
}
LEAN_EXPORT lean_object* l_getCurrentModule() {
_start:
{
lean_object* x_2; lean_object* x_3;
x_2 = l_getCurrentModule___closed__0;
x_3 = l_Lake_Manifest_load_x3f(x_2);
if (lean_obj_tag(x_3) == 0)
{
uint8_t x_4;
x_4 = !lean_is_exclusive(x_3);
if (x_4 == 0)
{
lean_object* x_5;
x_5 = lean_ctor_get(x_3, 0);
if (lean_obj_tag(x_5) == 0)
{
lean_object* x_6;
x_6 = lean_box(0);
lean_ctor_set(x_3, 0, x_6);
return x_3;
}
else
{
lean_object* x_7; lean_object* x_8; lean_object* x_9;
x_7 = lean_ctor_get(x_5, 0);
lean_inc(x_7);
lean_dec_ref(x_5);
x_8 = lean_ctor_get(x_7, 0);
lean_inc(x_8);
lean_dec(x_7);
x_9 = l_Lean_Name_capitalize(x_8);
lean_ctor_set(x_3, 0, x_9);
return x_3;
}
}
else
{
lean_object* x_10;
x_10 = lean_ctor_get(x_3, 0);
lean_inc(x_10);
lean_dec(x_3);
if (lean_obj_tag(x_10) == 0)
{
lean_object* x_11; lean_object* x_12;
x_11 = lean_box(0);
x_12 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_12, 0, x_11);
return x_12;
}
else
{
lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16;
x_13 = lean_ctor_get(x_10, 0);
lean_inc(x_13);
lean_dec_ref(x_10);
x_14 = lean_ctor_get(x_13, 0);
lean_inc(x_14);
lean_dec(x_13);
x_15 = l_Lean_Name_capitalize(x_14);
x_16 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_16, 0, x_15);
return x_16;
}
}
}
else
{
uint8_t x_17;
x_17 = !lean_is_exclusive(x_3);
if (x_17 == 0)
{
return x_3;
}
else
{
lean_object* x_18; lean_object* x_19;
x_18 = lean_ctor_get(x_3, 0);
lean_inc(x_18);
lean_dec(x_3);
x_19 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_19, 0, x_18);
return x_19;
}
}
}
}
LEAN_EXPORT lean_object* l_getCurrentModule___boxed(lean_object* x_1) {
_start:
{
lean_object* x_2;
x_2 = l_getCurrentModule();
return x_2;
}
}
static lean_object* _init_l_List_forIn_x27_loop___at___00main_spec__2___redArg___closed__0() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string_unchecked("olean", 5, 5);
return x_1;
}
}
static lean_object* _init_l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00main_spec__1___closed__0() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string_unchecked("--fresh", 7, 7);
return x_1;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00main_spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, size_t x_6, size_t x_7, lean_object* x_8) {
_start:
{
lean_object* x_10; lean_object* x_11; uint8_t x_16;
x_16 = lean_usize_dec_lt(x_7, x_6);
if (x_16 == 0)
{
lean_object* x_17;
lean_dec(x_4);
lean_dec_ref(x_3);
lean_dec(x_1);
x_17 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_17, 0, x_8);
return x_17;
}
else
{
lean_object* x_18; lean_object* x_19;
x_18 = lean_array_uget(x_5, x_7);
lean_inc(x_1);
x_19 = l_Lean_searchModuleNameOfFileName(x_18, x_1);
if (lean_obj_tag(x_19) == 0)
{
lean_object* x_20; lean_object* x_21;
x_20 = lean_ctor_get(x_19, 0);
lean_inc(x_20);
lean_dec_ref(x_19);
if (lean_obj_tag(x_20) == 1)
{
lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_35; uint8_t x_36;
x_25 = lean_ctor_get(x_8, 0);
lean_inc(x_25);
x_26 = lean_ctor_get(x_8, 1);
lean_inc(x_26);
if (lean_is_exclusive(x_8)) {
lean_ctor_release(x_8, 0);
lean_ctor_release(x_8, 1);
x_27 = x_8;
} else {
lean_dec_ref(x_8);
x_27 = lean_box(0);
}
x_28 = lean_ctor_get(x_20, 0);
lean_inc(x_28);
lean_dec_ref(x_20);
x_35 = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00main_spec__1___closed__0;
lean_inc(x_4);
lean_inc_ref(x_3);
x_36 = l_List_elem___redArg(x_3, x_35, x_4);
if (x_36 == 0)
{
uint8_t x_37;
x_37 = l_Lean_Name_isPrefixOf(x_2, x_28);
if (x_37 == 0)
{
goto block_34;
}
else
{
lean_dec(x_27);
lean_dec(x_25);
goto block_31;
}
}
else
{
goto block_34;
}
block_31:
{
uint8_t x_29;
x_29 = l_List_elem___at___00Lean_addAliasEntry_spec__2(x_28, x_26);
if (x_29 == 0)
{
lean_object* x_30;
x_30 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_30, 0, x_28);
lean_ctor_set(x_30, 1, x_26);
x_21 = x_30;
goto block_24;
}
else
{
lean_dec(x_28);
x_21 = x_26;
goto block_24;
}
}
block_34:
{
uint8_t x_32;
x_32 = lean_name_eq(x_2, x_28);
if (x_32 == 0)
{
lean_object* x_33;
lean_dec(x_28);
if (lean_is_scalar(x_27)) {
x_33 = lean_alloc_ctor(0, 2, 0);
} else {
x_33 = x_27;
}
lean_ctor_set(x_33, 0, x_25);
lean_ctor_set(x_33, 1, x_26);
x_10 = x_33;
x_11 = lean_box(0);
goto block_15;
}
else
{
lean_dec(x_27);
lean_dec(x_25);
goto block_31;
}
}
}
else
{
uint8_t x_38;
lean_dec(x_20);
x_38 = !lean_is_exclusive(x_8);
if (x_38 == 0)
{
x_10 = x_8;
x_11 = lean_box(0);
goto block_15;
}
else
{
lean_object* x_39; lean_object* x_40; lean_object* x_41;
x_39 = lean_ctor_get(x_8, 0);
x_40 = lean_ctor_get(x_8, 1);
lean_inc(x_40);
lean_inc(x_39);
lean_dec(x_8);
x_41 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_41, 0, x_39);
lean_ctor_set(x_41, 1, x_40);
x_10 = x_41;
x_11 = lean_box(0);
goto block_15;
}
}
block_24:
{
lean_object* x_22; lean_object* x_23;
x_22 = lean_box(x_16);
x_23 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_23, 0, x_22);
lean_ctor_set(x_23, 1, x_21);
x_10 = x_23;
x_11 = lean_box(0);
goto block_15;
}
}
else
{
uint8_t x_42;
lean_dec_ref(x_8);
lean_dec(x_4);
lean_dec_ref(x_3);
lean_dec(x_1);
x_42 = !lean_is_exclusive(x_19);
if (x_42 == 0)
{
return x_19;
}
else
{
lean_object* x_43; lean_object* x_44;
x_43 = lean_ctor_get(x_19, 0);
lean_inc(x_43);
lean_dec(x_19);
x_44 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_44, 0, x_43);
return x_44;
}
}
}
block_15:
{
size_t x_12; size_t x_13;
x_12 = 1;
x_13 = lean_usize_add(x_7, x_12);
x_7 = x_13;
x_8 = x_10;
goto _start;
}
}
}
static lean_object* _init_l_List_forIn_x27_loop___at___00main_spec__2___redArg___closed__1() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string_unchecked("Could not find any oleans for: ", 31, 31);
return x_1;
}
}
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00main_spec__2___redArg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
if (lean_obj_tag(x_4) == 0)
{
lean_object* x_7;
lean_dec(x_3);
lean_dec_ref(x_2);
lean_dec(x_1);
x_7 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_7, 0, x_5);
return x_7;
}
else
{
uint8_t x_8;
x_8 = !lean_is_exclusive(x_4);
if (x_8 == 0)
{
lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12;
x_9 = lean_ctor_get(x_4, 0);
x_10 = lean_ctor_get(x_4, 1);
x_11 = l_List_forIn_x27_loop___at___00main_spec__2___redArg___closed__0;
lean_inc(x_1);
x_12 = l_Lean_SearchPath_findAllWithExt(x_1, x_11);
if (lean_obj_tag(x_12) == 0)
{
lean_object* x_13; uint8_t x_14; lean_object* x_15; size_t x_16; size_t x_17; lean_object* x_18;
x_13 = lean_ctor_get(x_12, 0);
lean_inc(x_13);
lean_dec_ref(x_12);
x_14 = 0;
x_15 = lean_box(x_14);
lean_ctor_set_tag(x_4, 0);
lean_ctor_set(x_4, 1, x_5);
lean_ctor_set(x_4, 0, x_15);
x_16 = lean_array_size(x_13);
x_17 = 0;
lean_inc(x_3);
lean_inc_ref(x_2);
lean_inc(x_1);
x_18 = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00main_spec__1(x_1, x_9, x_2, x_3, x_13, x_16, x_17, x_4);
lean_dec(x_13);
if (lean_obj_tag(x_18) == 0)
{
uint8_t x_19;
x_19 = !lean_is_exclusive(x_18);
if (x_19 == 0)
{
lean_object* x_20; lean_object* x_21; uint8_t x_22;
x_20 = lean_ctor_get(x_18, 0);
x_21 = lean_ctor_get(x_20, 0);
x_22 = lean_unbox(x_21);
if (x_22 == 0)
{
uint8_t x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27;
lean_dec(x_20);
lean_dec(x_10);
lean_dec(x_3);
lean_dec_ref(x_2);
lean_dec(x_1);
x_23 = 1;
x_24 = l_List_forIn_x27_loop___at___00main_spec__2___redArg___closed__1;
x_25 = l_Lean_Name_toStringWithToken___at___00Lean_Name_toString_spec__0(x_9, x_23);
x_26 = lean_string_append(x_24, x_25);
lean_dec_ref(x_25);
x_27 = lean_alloc_ctor(18, 1, 0);
lean_ctor_set(x_27, 0, x_26);
lean_ctor_set_tag(x_18, 1);
lean_ctor_set(x_18, 0, x_27);
return x_18;
}
else
{
lean_object* x_28;
lean_free_object(x_18);
lean_dec(x_9);
x_28 = lean_ctor_get(x_20, 1);
lean_inc(x_28);
lean_dec(x_20);
x_4 = x_10;
x_5 = x_28;
goto _start;
}
}
else
{
lean_object* x_30; lean_object* x_31; uint8_t x_32;
x_30 = lean_ctor_get(x_18, 0);
lean_inc(x_30);
lean_dec(x_18);
x_31 = lean_ctor_get(x_30, 0);
x_32 = lean_unbox(x_31);
if (x_32 == 0)
{
uint8_t x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38;
lean_dec(x_30);
lean_dec(x_10);
lean_dec(x_3);
lean_dec_ref(x_2);
lean_dec(x_1);
x_33 = 1;
x_34 = l_List_forIn_x27_loop___at___00main_spec__2___redArg___closed__1;
x_35 = l_Lean_Name_toStringWithToken___at___00Lean_Name_toString_spec__0(x_9, x_33);
x_36 = lean_string_append(x_34, x_35);
lean_dec_ref(x_35);
x_37 = lean_alloc_ctor(18, 1, 0);
lean_ctor_set(x_37, 0, x_36);
x_38 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_38, 0, x_37);
return x_38;
}
else
{
lean_object* x_39;
lean_dec(x_9);
x_39 = lean_ctor_get(x_30, 1);
lean_inc(x_39);
lean_dec(x_30);
x_4 = x_10;
x_5 = x_39;
goto _start;
}
}
}
else
{
uint8_t x_41;
lean_dec(x_10);
lean_dec(x_9);
lean_dec(x_3);
lean_dec_ref(x_2);
lean_dec(x_1);
x_41 = !lean_is_exclusive(x_18);
if (x_41 == 0)
{
return x_18;
}
else
{
lean_object* x_42; lean_object* x_43;
x_42 = lean_ctor_get(x_18, 0);
lean_inc(x_42);
lean_dec(x_18);
x_43 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_43, 0, x_42);
return x_43;
}
}
}
else
{
uint8_t x_44;
lean_free_object(x_4);
lean_dec(x_10);
lean_dec(x_9);
lean_dec(x_5);
lean_dec(x_3);
lean_dec_ref(x_2);
lean_dec(x_1);
x_44 = !lean_is_exclusive(x_12);
if (x_44 == 0)
{
return x_12;
}
else
{
lean_object* x_45; lean_object* x_46;
x_45 = lean_ctor_get(x_12, 0);
lean_inc(x_45);
lean_dec(x_12);
x_46 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_46, 0, x_45);
return x_46;
}
}
}
else
{
lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50;
x_47 = lean_ctor_get(x_4, 0);
x_48 = lean_ctor_get(x_4, 1);
lean_inc(x_48);
lean_inc(x_47);
lean_dec(x_4);
x_49 = l_List_forIn_x27_loop___at___00main_spec__2___redArg___closed__0;
lean_inc(x_1);
x_50 = l_Lean_SearchPath_findAllWithExt(x_1, x_49);
if (lean_obj_tag(x_50) == 0)
{
lean_object* x_51; uint8_t x_52; lean_object* x_53; lean_object* x_54; size_t x_55; size_t x_56; lean_object* x_57;
x_51 = lean_ctor_get(x_50, 0);
lean_inc(x_51);
lean_dec_ref(x_50);
x_52 = 0;
x_53 = lean_box(x_52);
x_54 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_54, 0, x_53);
lean_ctor_set(x_54, 1, x_5);
x_55 = lean_array_size(x_51);
x_56 = 0;
lean_inc(x_3);
lean_inc_ref(x_2);
lean_inc(x_1);
x_57 = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00main_spec__1(x_1, x_47, x_2, x_3, x_51, x_55, x_56, x_54);
lean_dec(x_51);
if (lean_obj_tag(x_57) == 0)
{
lean_object* x_58; lean_object* x_59; lean_object* x_60; uint8_t x_61;
x_58 = lean_ctor_get(x_57, 0);
lean_inc(x_58);
if (lean_is_exclusive(x_57)) {
lean_ctor_release(x_57, 0);
x_59 = x_57;
} else {
lean_dec_ref(x_57);
x_59 = lean_box(0);
}
x_60 = lean_ctor_get(x_58, 0);
x_61 = lean_unbox(x_60);
if (x_61 == 0)
{
uint8_t x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67;
lean_dec(x_58);
lean_dec(x_48);
lean_dec(x_3);
lean_dec_ref(x_2);
lean_dec(x_1);
x_62 = 1;
x_63 = l_List_forIn_x27_loop___at___00main_spec__2___redArg___closed__1;
x_64 = l_Lean_Name_toStringWithToken___at___00Lean_Name_toString_spec__0(x_47, x_62);
x_65 = lean_string_append(x_63, x_64);
lean_dec_ref(x_64);
x_66 = lean_alloc_ctor(18, 1, 0);
lean_ctor_set(x_66, 0, x_65);
if (lean_is_scalar(x_59)) {
x_67 = lean_alloc_ctor(1, 1, 0);
} else {
x_67 = x_59;
lean_ctor_set_tag(x_67, 1);
}
lean_ctor_set(x_67, 0, x_66);
return x_67;
}
else
{
lean_object* x_68;
lean_dec(x_59);
lean_dec(x_47);
x_68 = lean_ctor_get(x_58, 1);
lean_inc(x_68);
lean_dec(x_58);
x_4 = x_48;
x_5 = x_68;
goto _start;
}
}
else
{
lean_object* x_70; lean_object* x_71; lean_object* x_72;
lean_dec(x_48);
lean_dec(x_47);
lean_dec(x_3);
lean_dec_ref(x_2);
lean_dec(x_1);
x_70 = lean_ctor_get(x_57, 0);
lean_inc(x_70);
if (lean_is_exclusive(x_57)) {
lean_ctor_release(x_57, 0);
x_71 = x_57;
} else {
lean_dec_ref(x_57);
x_71 = lean_box(0);
}
if (lean_is_scalar(x_71)) {
x_72 = lean_alloc_ctor(1, 1, 0);
} else {
x_72 = x_71;
}
lean_ctor_set(x_72, 0, x_70);
return x_72;
}
}
else
{
lean_object* x_73; lean_object* x_74; lean_object* x_75;
lean_dec(x_48);
lean_dec(x_47);
lean_dec(x_5);
lean_dec(x_3);
lean_dec_ref(x_2);
lean_dec(x_1);
x_73 = lean_ctor_get(x_50, 0);
lean_inc(x_73);
if (lean_is_exclusive(x_50)) {
lean_ctor_release(x_50, 0);
x_74 = x_50;
} else {
lean_dec_ref(x_50);
x_74 = lean_box(0);
}
if (lean_is_scalar(x_74)) {
x_75 = lean_alloc_ctor(1, 1, 0);
} else {
x_75 = x_74;
}
lean_ctor_set(x_75, 0, x_73);
return x_75;
}
}
}
}
}
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00main_spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
_start:
{
lean_object* x_9;
x_9 = l_List_forIn_x27_loop___at___00main_spec__2___redArg(x_1, x_2, x_3, x_5, x_6);
return x_9;
}
}
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00main_spec__3___redArg___lam__0(lean_object* x_1) {
_start:
{
lean_object* x_3;
x_3 = l_replayFromImports(x_1);
if (lean_obj_tag(x_3) == 0)
{
uint8_t x_4;
x_4 = !lean_is_exclusive(x_3);
if (x_4 == 0)
{
lean_ctor_set_tag(x_3, 1);
return x_3;
}
else
{
lean_object* x_5; lean_object* x_6;
x_5 = lean_ctor_get(x_3, 0);
lean_inc(x_5);
lean_dec(x_3);
x_6 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_6, 0, x_5);
return x_6;
}
}
else
{
uint8_t x_7;
x_7 = !lean_is_exclusive(x_3);
if (x_7 == 0)
{
lean_ctor_set_tag(x_3, 0);
return x_3;
}
else
{
lean_object* x_8; lean_object* x_9;
x_8 = lean_ctor_get(x_3, 0);
lean_inc(x_8);
lean_dec(x_3);
x_9 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_9, 0, x_8);
return x_9;
}
}
}
}
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00main_spec__3___redArg___lam__0___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3;
x_3 = l_List_forIn_x27_loop___at___00main_spec__3___redArg___lam__0(x_1);
return x_3;
}
}
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00main_spec__3___redArg(lean_object* x_1, lean_object* x_2) {
_start:
{
if (lean_obj_tag(x_1) == 0)
{
lean_object* x_4;
x_4 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_4, 0, x_2);
return x_4;
}
else
{
uint8_t x_5;
x_5 = !lean_is_exclusive(x_1);
if (x_5 == 0)
{
lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11;
x_6 = lean_ctor_get(x_1, 0);
x_7 = lean_ctor_get(x_1, 1);
lean_inc(x_6);
x_8 = lean_alloc_closure((void*)(l_List_forIn_x27_loop___at___00main_spec__3___redArg___lam__0___boxed), 2, 1);
lean_closure_set(x_8, 0, x_6);
x_9 = lean_unsigned_to_nat(0u);
x_10 = lean_io_as_task(x_8, x_9);
lean_ctor_set_tag(x_1, 0);
lean_ctor_set(x_1, 1, x_10);
x_11 = lean_array_push(x_2, x_1);
x_1 = x_7;
x_2 = x_11;
goto _start;
}
else
{
lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19;
x_13 = lean_ctor_get(x_1, 0);
x_14 = lean_ctor_get(x_1, 1);
lean_inc(x_14);
lean_inc(x_13);
lean_dec(x_1);
lean_inc(x_13);
x_15 = lean_alloc_closure((void*)(l_List_forIn_x27_loop___at___00main_spec__3___redArg___lam__0___boxed), 2, 1);
lean_closure_set(x_15, 0, x_13);
x_16 = lean_unsigned_to_nat(0u);
x_17 = lean_io_as_task(x_15, x_16);
x_18 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_18, 0, x_13);
lean_ctor_set(x_18, 1, x_17);
x_19 = lean_array_push(x_2, x_18);
x_1 = x_14;
x_2 = x_19;
goto _start;
}
}
}
}
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00main_spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_6;
x_6 = l_List_forIn_x27_loop___at___00main_spec__3___redArg(x_2, x_3);
return x_6;
}
}
static lean_object* _init_l_List_forIn_x27_loop___at___00main_spec__5___redArg___closed__0() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string_unchecked("replaying ", 10, 10);
return x_1;
}
}
static lean_object* _init_l_List_forIn_x27_loop___at___00main_spec__5___redArg___closed__1() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string_unchecked(" with --fresh", 13, 13);
return x_1;
}
}
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00main_spec__5___redArg(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
if (lean_obj_tag(x_3) == 0)
{
lean_object* x_6;
x_6 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_6, 0, x_4);
return x_6;
}
else
{
lean_object* x_7; lean_object* x_8; lean_object* x_9;
x_7 = lean_ctor_get(x_3, 0);
lean_inc(x_7);
x_8 = lean_ctor_get(x_3, 1);
lean_inc(x_8);
lean_dec_ref(x_3);
if (x_2 == 0)
{
x_9 = lean_box(0);
goto block_12;
}
else
{
lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18;
x_13 = l_List_forIn_x27_loop___at___00main_spec__5___redArg___closed__0;
lean_inc(x_7);
x_14 = l_Lean_Name_toStringWithToken___at___00Lean_Name_toString_spec__0(x_7, x_2);
x_15 = lean_string_append(x_13, x_14);
lean_dec_ref(x_14);
x_16 = l_List_forIn_x27_loop___at___00main_spec__5___redArg___closed__1;
x_17 = lean_string_append(x_15, x_16);
x_18 = l_IO_println___at___00__private_Lean_Language_Basic_0__Lean_Language_reportMessages_spec__3(x_17);
if (lean_obj_tag(x_18) == 0)
{
lean_dec_ref(x_18);
x_9 = lean_box(0);
goto block_12;
}
else
{
lean_dec(x_8);
lean_dec(x_7);
return x_18;
}
}
block_12:
{
lean_object* x_10;
x_10 = l_replayFromFresh(x_7);
if (lean_obj_tag(x_10) == 0)
{
lean_dec_ref(x_10);
{
lean_object* _tmp_2 = x_8;
lean_object* _tmp_3 = x_1;
x_3 = _tmp_2;
x_4 = _tmp_3;
}
goto _start;
}
else
{
lean_dec(x_8);
return x_10;
}
}
}
}
}
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00main_spec__5(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_8;
x_8 = l_List_forIn_x27_loop___at___00main_spec__5___redArg(x_1, x_2, x_4, x_5);
return x_8;
}
}
static lean_object* _init_l_List_mapM_loop___at___00main_spec__6___closed__0() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string_unchecked("Could not resolve module: ", 26, 26);
return x_1;
}
}
LEAN_EXPORT lean_object* l_List_mapM_loop___at___00main_spec__6(lean_object* x_1, lean_object* x_2) {
_start:
{
if (lean_obj_tag(x_1) == 0)
{
lean_object* x_4; lean_object* x_5;
x_4 = l_List_reverse___redArg(x_2);
x_5 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_5, 0, x_4);
return x_5;
}
else
{
uint8_t x_6;
x_6 = !lean_is_exclusive(x_1);
if (x_6 == 0)
{
lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10;
x_7 = lean_ctor_get(x_1, 0);
x_8 = lean_ctor_get(x_1, 1);
lean_inc(x_7);
x_9 = l_String_toName(x_7);
x_10 = l_Lean_Name_isAnonymous(x_9);
if (x_10 == 0)
{
lean_dec(x_7);
lean_ctor_set(x_1, 1, x_2);
lean_ctor_set(x_1, 0, x_9);
{
lean_object* _tmp_0 = x_8;
lean_object* _tmp_1 = x_1;
x_1 = _tmp_0;
x_2 = _tmp_1;
}
goto _start;
}
else
{
lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15;
lean_dec(x_9);
lean_free_object(x_1);
lean_dec(x_8);
lean_dec(x_2);
x_12 = l_List_mapM_loop___at___00main_spec__6___closed__0;
x_13 = lean_string_append(x_12, x_7);
lean_dec(x_7);
x_14 = lean_alloc_ctor(18, 1, 0);
lean_ctor_set(x_14, 0, x_13);
x_15 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_15, 0, x_14);
return x_15;
}
}
else
{
lean_object* x_16; lean_object* x_17; lean_object* x_18; uint8_t x_19;
x_16 = lean_ctor_get(x_1, 0);
x_17 = lean_ctor_get(x_1, 1);
lean_inc(x_17);
lean_inc(x_16);
lean_dec(x_1);
lean_inc(x_16);
x_18 = l_String_toName(x_16);
x_19 = l_Lean_Name_isAnonymous(x_18);
if (x_19 == 0)
{
lean_object* x_20;
lean_dec(x_16);
x_20 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_20, 0, x_18);
lean_ctor_set(x_20, 1, x_2);
x_1 = x_17;
x_2 = x_20;
goto _start;
}
else
{
lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25;
lean_dec(x_18);
lean_dec(x_17);
lean_dec(x_2);
x_22 = l_List_mapM_loop___at___00main_spec__6___closed__0;
x_23 = lean_string_append(x_22, x_16);
lean_dec(x_16);
x_24 = lean_alloc_ctor(18, 1, 0);
lean_ctor_set(x_24, 0, x_23);
x_25 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_25, 0, x_24);
return x_25;
}
}
}
}
}
static lean_object* _init_l_List_partition_loop___at___00main_spec__0___closed__0() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string_unchecked("-", 1, 1);
return x_1;
}
}
static lean_object* _init_l_List_partition_loop___at___00main_spec__0___closed__1() {
_start:
{
lean_object* x_1; lean_object* x_2;
x_1 = l_List_partition_loop___at___00main_spec__0___closed__0;
x_2 = lean_string_utf8_byte_size(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_List_partition_loop___at___00main_spec__0(lean_object* x_1, lean_object* x_2) {
_start:
{
if (lean_obj_tag(x_1) == 0)
{
uint8_t x_3;
x_3 = !lean_is_exclusive(x_2);
if (x_3 == 0)
{
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7;
x_4 = lean_ctor_get(x_2, 0);
x_5 = lean_ctor_get(x_2, 1);
x_6 = l_List_reverse___redArg(x_4);
x_7 = l_List_reverse___redArg(x_5);
lean_ctor_set(x_2, 1, x_7);
lean_ctor_set(x_2, 0, x_6);
return x_2;
}
else
{
lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12;
x_8 = lean_ctor_get(x_2, 0);
x_9 = lean_ctor_get(x_2, 1);
lean_inc(x_9);
lean_inc(x_8);
lean_dec(x_2);
x_10 = l_List_reverse___redArg(x_8);
x_11 = l_List_reverse___redArg(x_9);
x_12 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_12, 0, x_10);
lean_ctor_set(x_12, 1, x_11);
return x_12;
}
}
else
{
lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_23; lean_object* x_24; lean_object* x_25; uint8_t x_26;
x_13 = lean_ctor_get(x_1, 0);
lean_inc(x_13);
x_14 = lean_ctor_get(x_1, 1);
lean_inc(x_14);
if (lean_is_exclusive(x_1)) {
lean_ctor_release(x_1, 0);
lean_ctor_release(x_1, 1);
x_15 = x_1;
} else {
lean_dec_ref(x_1);
x_15 = lean_box(0);
}
x_16 = lean_ctor_get(x_2, 0);
lean_inc(x_16);
x_17 = lean_ctor_get(x_2, 1);
lean_inc(x_17);
if (lean_is_exclusive(x_2)) {
lean_ctor_release(x_2, 0);
lean_ctor_release(x_2, 1);
x_18 = x_2;
} else {
lean_dec_ref(x_2);
x_18 = lean_box(0);
}
x_23 = l_List_partition_loop___at___00main_spec__0___closed__0;
x_24 = lean_string_utf8_byte_size(x_13);
x_25 = l_List_partition_loop___at___00main_spec__0___closed__1;
x_26 = lean_nat_dec_le(x_25, x_24);
if (x_26 == 0)
{
goto block_22;
}
else
{
lean_object* x_27; uint8_t x_28;
x_27 = lean_unsigned_to_nat(0u);
x_28 = lean_string_memcmp(x_13, x_23, x_27, x_27, x_25);
if (x_28 == 0)
{
goto block_22;
}
else
{
lean_object* x_29; lean_object* x_30;
lean_dec(x_18);
lean_dec(x_15);
x_29 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_29, 0, x_13);
lean_ctor_set(x_29, 1, x_16);
x_30 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_30, 0, x_29);
lean_ctor_set(x_30, 1, x_17);
x_1 = x_14;
x_2 = x_30;
goto _start;
}
}
block_22:
{
lean_object* x_19; lean_object* x_20;
if (lean_is_scalar(x_15)) {
x_19 = lean_alloc_ctor(1, 2, 0);
} else {
x_19 = x_15;
}
lean_ctor_set(x_19, 0, x_13);
lean_ctor_set(x_19, 1, x_17);
if (lean_is_scalar(x_18)) {
x_20 = lean_alloc_ctor(0, 2, 0);
} else {
x_20 = x_18;
}
lean_ctor_set(x_20, 0, x_16);
lean_ctor_set(x_20, 1, x_19);
x_1 = x_14;
x_2 = x_20;
goto _start;
}
}
}
}
static lean_object* _init_l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00main_spec__4___closed__0() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string_unchecked("leanchecker found a problem in ", 31, 31);
return x_1;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00main_spec__4(lean_object* x_1, uint8_t x_2, lean_object* x_3, size_t x_4, size_t x_5, lean_object* x_6) {
_start:
{
uint8_t x_8;
x_8 = lean_usize_dec_lt(x_5, x_4);
if (x_8 == 0)
{
lean_object* x_9;
x_9 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_9, 0, x_6);
return x_9;
}
else
{
lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13;
x_10 = lean_array_uget(x_3, x_5);
x_11 = lean_ctor_get(x_10, 0);
lean_inc(x_11);
x_12 = lean_ctor_get(x_10, 1);
lean_inc(x_12);
lean_dec(x_10);
if (x_2 == 0)
{
x_13 = lean_box(0);
goto block_26;
}
else
{
lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30;
x_27 = l_List_forIn_x27_loop___at___00main_spec__5___redArg___closed__0;
lean_inc(x_11);
x_28 = l_Lean_Name_toStringWithToken___at___00Lean_Name_toString_spec__0(x_11, x_2);
x_29 = lean_string_append(x_27, x_28);
lean_dec_ref(x_28);
x_30 = l_IO_println___at___00__private_Lean_Language_Basic_0__Lean_Language_reportMessages_spec__3(x_29);
if (lean_obj_tag(x_30) == 0)
{
lean_dec_ref(x_30);
x_13 = lean_box(0);
goto block_26;
}
else
{
lean_dec(x_12);
lean_dec(x_11);
return x_30;
}
}
block_26:
{
lean_object* x_14;
x_14 = lean_task_get_own(x_12);
if (lean_obj_tag(x_14) == 0)
{
lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19;
x_15 = lean_ctor_get(x_14, 0);
lean_inc(x_15);
lean_dec_ref(x_14);
x_16 = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00main_spec__4___closed__0;
x_17 = l_Lean_Name_toStringWithToken___at___00Lean_Name_toString_spec__0(x_11, x_8);
x_18 = lean_string_append(x_16, x_17);
lean_dec_ref(x_17);
x_19 = l_IO_eprintln___at___00__private_Init_System_IO_0__IO_eprintlnAux_spec__0(x_18);
if (lean_obj_tag(x_19) == 0)
{
uint8_t x_20;
x_20 = !lean_is_exclusive(x_19);
if (x_20 == 0)
{
lean_object* x_21;
x_21 = lean_ctor_get(x_19, 0);
lean_dec(x_21);
lean_ctor_set_tag(x_19, 1);
lean_ctor_set(x_19, 0, x_15);
return x_19;
}
else
{
lean_object* x_22;
lean_dec(x_19);
x_22 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_22, 0, x_15);
return x_22;
}
}
else
{
lean_dec(x_15);
return x_19;
}
}
else
{
size_t x_23; size_t x_24;
lean_dec(x_14);
lean_dec(x_11);
x_23 = 1;
x_24 = lean_usize_add(x_5, x_23);
{
size_t _tmp_4 = x_24;
lean_object* _tmp_5 = x_1;
x_5 = _tmp_4;
x_6 = _tmp_5;
}
goto _start;
}
}
}
}
}
static lean_object* _init_l_main___closed__0() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string_unchecked("lean", 4, 4);
return x_1;
}
}
static lean_object* _init_l_main___closed__1() {
_start:
{
lean_object* x_1; lean_object* x_2;
x_1 = lean_box(0);
x_2 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_2, 0, x_1);
lean_ctor_set(x_2, 1, x_1);
return x_2;
}
}
static lean_object* _init_l_main___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2;
x_1 = lean_alloc_closure((void*)(l_instDecidableEqString___boxed), 2, 0);
x_2 = lean_alloc_closure((void*)(l_instBEqOfDecidableEq___redArg___lam__0___boxed), 3, 1);
lean_closure_set(x_2, 0, x_1);
return x_2;
}
}
static lean_object* _init_l_main___closed__3() {
_start:
{
lean_object* x_1;
x_1 = l_Lean_searchPathRef;
return x_1;
}
}
static lean_object* _init_l_main___closed__4() {
_start:
{
lean_object* x_1; lean_object* x_2;
x_1 = lean_unsigned_to_nat(0u);
x_2 = lean_mk_empty_array_with_capacity(x_1);
return x_2;
}
}
static lean_object* _init_l_main___closed__5() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string_unchecked("--fresh flag is only valid when specifying a single module:\n", 60, 60);
return x_1;
}
}
static lean_object* _init_l_main___closed__6() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string_unchecked("-v", 2, 2);
return x_1;
}
}
static lean_object* _init_l_main___closed__7() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string_unchecked("--verbose", 9, 9);
return x_1;
}
}
static lean_object* _init_l_main___boxed__const__1() {
_start:
{
uint32_t x_1; lean_object* x_2;
x_1 = 0;
x_2 = lean_box_uint32(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* _lean_main(lean_object* x_1) {
_start:
{
lean_object* x_3; lean_object* x_7; lean_object* x_8;
x_7 = l_main___closed__0;
x_8 = l_Lean_findSysroot(x_7);
if (lean_obj_tag(x_8) == 0)
{
lean_object* x_9; lean_object* x_10; lean_object* x_11;
x_9 = lean_ctor_get(x_8, 0);
lean_inc(x_9);
lean_dec_ref(x_8);
x_10 = lean_box(0);
x_11 = l_Lean_initSearchPath(x_9, x_10);
if (lean_obj_tag(x_11) == 0)
{
lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18; lean_object* x_19; lean_object* x_20; uint8_t x_86; lean_object* x_99; uint8_t x_100;
lean_dec_ref(x_11);
x_12 = l_main___closed__1;
x_13 = l_List_partition_loop___at___00main_spec__0(x_1, x_12);
x_14 = lean_ctor_get(x_13, 0);
lean_inc(x_14);
x_15 = lean_ctor_get(x_13, 1);
lean_inc(x_15);
if (lean_is_exclusive(x_13)) {
lean_ctor_release(x_13, 0);
lean_ctor_release(x_13, 1);
x_16 = x_13;
} else {
lean_dec_ref(x_13);
x_16 = lean_box(0);
}
x_17 = l_main___closed__2;
x_99 = l_main___closed__6;
lean_inc(x_14);
x_100 = l_List_elem___redArg(x_17, x_99, x_14);
if (x_100 == 0)
{
lean_object* x_101; uint8_t x_102;
x_101 = l_main___closed__7;
lean_inc(x_14);
x_102 = l_List_elem___redArg(x_17, x_101, x_14);
x_86 = x_102;
goto block_98;
}
else
{
x_86 = x_100;
goto block_98;
}
block_85:
{
lean_object* x_21; lean_object* x_22; lean_object* x_23;
x_21 = l_main___closed__3;
x_22 = lean_st_ref_get(x_21);
lean_inc(x_14);
x_23 = l_List_forIn_x27_loop___at___00main_spec__2___redArg(x_22, x_17, x_14, x_19, x_10);
if (lean_obj_tag(x_23) == 0)
{
uint8_t x_24;
x_24 = !lean_is_exclusive(x_23);
if (x_24 == 0)
{
lean_object* x_25; lean_object* x_26; uint8_t x_27;
x_25 = lean_ctor_get(x_23, 0);
x_26 = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00main_spec__1___closed__0;
x_27 = l_List_elem___redArg(x_17, x_26, x_14);
if (x_27 == 0)
{
lean_object* x_28; lean_object* x_29;
lean_free_object(x_23);
x_28 = l_main___closed__4;
x_29 = l_List_forIn_x27_loop___at___00main_spec__3___redArg(x_25, x_28);
if (lean_obj_tag(x_29) == 0)
{
lean_object* x_30; lean_object* x_31; size_t x_32; size_t x_33; lean_object* x_34;
x_30 = lean_ctor_get(x_29, 0);
lean_inc(x_30);
lean_dec_ref(x_29);
x_31 = lean_box(0);
x_32 = lean_array_size(x_30);
x_33 = 0;
x_34 = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00main_spec__4(x_31, x_18, x_30, x_32, x_33, x_31);
lean_dec(x_30);
if (lean_obj_tag(x_34) == 0)
{
lean_dec_ref(x_34);
x_3 = lean_box(0);
goto block_6;
}
else
{
uint8_t x_35;
x_35 = !lean_is_exclusive(x_34);
if (x_35 == 0)
{
return x_34;
}
else
{
lean_object* x_36; lean_object* x_37;
x_36 = lean_ctor_get(x_34, 0);
lean_inc(x_36);
lean_dec(x_34);
x_37 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_37, 0, x_36);
return x_37;
}
}
}
else
{
uint8_t x_38;
x_38 = !lean_is_exclusive(x_29);
if (x_38 == 0)
{
return x_29;
}
else
{
lean_object* x_39; lean_object* x_40;
x_39 = lean_ctor_get(x_29, 0);
lean_inc(x_39);
lean_dec(x_29);
x_40 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_40, 0, x_39);
return x_40;
}
}
}
else
{
lean_object* x_41; lean_object* x_42; uint8_t x_43;
x_41 = l_List_lengthTR___redArg(x_25);
x_42 = lean_unsigned_to_nat(1u);
x_43 = lean_nat_dec_eq(x_41, x_42);
lean_dec(x_41);
if (x_43 == 0)
{
lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47;
x_44 = l_main___closed__5;
x_45 = l_List_toString___at___00Lean_Environment_AddConstAsyncResult_commitConst_spec__1(x_25);
x_46 = lean_string_append(x_44, x_45);
lean_dec_ref(x_45);
x_47 = lean_alloc_ctor(18, 1, 0);
lean_ctor_set(x_47, 0, x_46);
lean_ctor_set_tag(x_23, 1);
lean_ctor_set(x_23, 0, x_47);
return x_23;
}
else
{
lean_object* x_48; lean_object* x_49;
lean_free_object(x_23);
x_48 = lean_box(0);
x_49 = l_List_forIn_x27_loop___at___00main_spec__5___redArg(x_48, x_18, x_25, x_48);
if (lean_obj_tag(x_49) == 0)
{
lean_dec_ref(x_49);
x_3 = lean_box(0);
goto block_6;
}
else
{
uint8_t x_50;
x_50 = !lean_is_exclusive(x_49);
if (x_50 == 0)
{
return x_49;
}
else
{
lean_object* x_51; lean_object* x_52;
x_51 = lean_ctor_get(x_49, 0);
lean_inc(x_51);
lean_dec(x_49);
x_52 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_52, 0, x_51);
return x_52;
}
}
}
}
}
else
{
lean_object* x_53; lean_object* x_54; uint8_t x_55;
x_53 = lean_ctor_get(x_23, 0);
lean_inc(x_53);
lean_dec(x_23);
x_54 = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00main_spec__1___closed__0;
x_55 = l_List_elem___redArg(x_17, x_54, x_14);
if (x_55 == 0)
{
lean_object* x_56; lean_object* x_57;
x_56 = l_main___closed__4;
x_57 = l_List_forIn_x27_loop___at___00main_spec__3___redArg(x_53, x_56);
if (lean_obj_tag(x_57) == 0)
{
lean_object* x_58; lean_object* x_59; size_t x_60; size_t x_61; lean_object* x_62;
x_58 = lean_ctor_get(x_57, 0);
lean_inc(x_58);
lean_dec_ref(x_57);
x_59 = lean_box(0);
x_60 = lean_array_size(x_58);
x_61 = 0;
x_62 = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00main_spec__4(x_59, x_18, x_58, x_60, x_61, x_59);
lean_dec(x_58);
if (lean_obj_tag(x_62) == 0)
{
lean_dec_ref(x_62);
x_3 = lean_box(0);
goto block_6;
}
else
{
lean_object* x_63; lean_object* x_64; lean_object* x_65;
x_63 = lean_ctor_get(x_62, 0);
lean_inc(x_63);
if (lean_is_exclusive(x_62)) {
lean_ctor_release(x_62, 0);
x_64 = x_62;
} else {
lean_dec_ref(x_62);
x_64 = lean_box(0);
}
if (lean_is_scalar(x_64)) {
x_65 = lean_alloc_ctor(1, 1, 0);
} else {
x_65 = x_64;
}
lean_ctor_set(x_65, 0, x_63);
return x_65;
}
}
else
{
lean_object* x_66; lean_object* x_67; lean_object* x_68;
x_66 = lean_ctor_get(x_57, 0);
lean_inc(x_66);
if (lean_is_exclusive(x_57)) {
lean_ctor_release(x_57, 0);
x_67 = x_57;
} else {
lean_dec_ref(x_57);
x_67 = lean_box(0);
}
if (lean_is_scalar(x_67)) {
x_68 = lean_alloc_ctor(1, 1, 0);
} else {
x_68 = x_67;
}
lean_ctor_set(x_68, 0, x_66);
return x_68;
}
}
else
{
lean_object* x_69; lean_object* x_70; uint8_t x_71;
x_69 = l_List_lengthTR___redArg(x_53);
x_70 = lean_unsigned_to_nat(1u);
x_71 = lean_nat_dec_eq(x_69, x_70);
lean_dec(x_69);
if (x_71 == 0)
{
lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76;
x_72 = l_main___closed__5;
x_73 = l_List_toString___at___00Lean_Environment_AddConstAsyncResult_commitConst_spec__1(x_53);
x_74 = lean_string_append(x_72, x_73);
lean_dec_ref(x_73);
x_75 = lean_alloc_ctor(18, 1, 0);
lean_ctor_set(x_75, 0, x_74);
x_76 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_76, 0, x_75);
return x_76;
}
else
{
lean_object* x_77; lean_object* x_78;
x_77 = lean_box(0);
x_78 = l_List_forIn_x27_loop___at___00main_spec__5___redArg(x_77, x_18, x_53, x_77);
if (lean_obj_tag(x_78) == 0)
{
lean_dec_ref(x_78);
x_3 = lean_box(0);
goto block_6;
}
else
{
lean_object* x_79; lean_object* x_80; lean_object* x_81;
x_79 = lean_ctor_get(x_78, 0);
lean_inc(x_79);
if (lean_is_exclusive(x_78)) {
lean_ctor_release(x_78, 0);
x_80 = x_78;
} else {
lean_dec_ref(x_78);
x_80 = lean_box(0);
}
if (lean_is_scalar(x_80)) {
x_81 = lean_alloc_ctor(1, 1, 0);
} else {
x_81 = x_80;
}
lean_ctor_set(x_81, 0, x_79);
return x_81;
}
}
}
}
}
else
{
uint8_t x_82;
lean_dec(x_14);
x_82 = !lean_is_exclusive(x_23);
if (x_82 == 0)
{
return x_23;
}
else
{
lean_object* x_83; lean_object* x_84;
x_83 = lean_ctor_get(x_23, 0);
lean_inc(x_83);
lean_dec(x_23);
x_84 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_84, 0, x_83);
return x_84;
}
}
}
block_98:
{
if (lean_obj_tag(x_15) == 0)
{
lean_object* x_87;
x_87 = l_getCurrentModule();
if (lean_obj_tag(x_87) == 0)
{
lean_object* x_88; lean_object* x_89;
x_88 = lean_ctor_get(x_87, 0);
lean_inc(x_88);
lean_dec_ref(x_87);
if (lean_is_scalar(x_16)) {
x_89 = lean_alloc_ctor(1, 2, 0);
} else {
x_89 = x_16;
lean_ctor_set_tag(x_89, 1);
}
lean_ctor_set(x_89, 0, x_88);
lean_ctor_set(x_89, 1, x_10);
x_18 = x_86;
x_19 = x_89;
x_20 = lean_box(0);
goto block_85;
}
else
{
uint8_t x_90;
lean_dec(x_16);
lean_dec(x_14);
x_90 = !lean_is_exclusive(x_87);
if (x_90 == 0)
{
return x_87;
}
else
{
lean_object* x_91; lean_object* x_92;
x_91 = lean_ctor_get(x_87, 0);
lean_inc(x_91);
lean_dec(x_87);
x_92 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_92, 0, x_91);
return x_92;
}
}
}
else
{
lean_object* x_93;
lean_dec(x_16);
x_93 = l_List_mapM_loop___at___00main_spec__6(x_15, x_10);
if (lean_obj_tag(x_93) == 0)
{
lean_object* x_94;
x_94 = lean_ctor_get(x_93, 0);
lean_inc(x_94);
lean_dec_ref(x_93);
x_18 = x_86;
x_19 = x_94;
x_20 = lean_box(0);
goto block_85;
}
else
{
uint8_t x_95;
lean_dec(x_14);
x_95 = !lean_is_exclusive(x_93);
if (x_95 == 0)
{
return x_93;
}
else
{
lean_object* x_96; lean_object* x_97;
x_96 = lean_ctor_get(x_93, 0);
lean_inc(x_96);
lean_dec(x_93);
x_97 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_97, 0, x_96);
return x_97;
}
}
}
}
}
else
{
uint8_t x_103;
lean_dec(x_1);
x_103 = !lean_is_exclusive(x_11);
if (x_103 == 0)
{
return x_11;
}
else
{
lean_object* x_104; lean_object* x_105;
x_104 = lean_ctor_get(x_11, 0);
lean_inc(x_104);
lean_dec(x_11);
x_105 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_105, 0, x_104);
return x_105;
}
}
}
else
{
uint8_t x_106;
lean_dec(x_1);
x_106 = !lean_is_exclusive(x_8);
if (x_106 == 0)
{
return x_8;
}
else
{
lean_object* x_107; lean_object* x_108;
x_107 = lean_ctor_get(x_8, 0);
lean_inc(x_107);
lean_dec(x_8);
x_108 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_108, 0, x_107);
return x_108;
}
}
block_6:
{
lean_object* x_4; lean_object* x_5;
x_4 = l_main___boxed__const__1;
x_5 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_5, 0, x_4);
return x_5;
}
}
}
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00main_spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
_start:
{
lean_object* x_9;
x_9 = l_List_forIn_x27_loop___at___00main_spec__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7);
lean_dec(x_4);
return x_9;
}
}
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00main_spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6;
x_6 = l_List_forIn_x27_loop___at___00main_spec__3(x_1, x_2, x_3, x_4);
lean_dec(x_1);
return x_6;
}
}
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00main_spec__5___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
_start:
{
uint8_t x_8; lean_object* x_9;
x_8 = lean_unbox(x_2);
x_9 = l_List_forIn_x27_loop___at___00main_spec__5(x_1, x_8, x_3, x_4, x_5, x_6);
lean_dec(x_3);
return x_9;
}
}
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00main_spec__3___redArg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4;
x_4 = l_List_forIn_x27_loop___at___00main_spec__3___redArg(x_1, x_2);
return x_4;
}
}
LEAN_EXPORT lean_object* l_List_mapM_loop___at___00main_spec__6___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4;
x_4 = l_List_mapM_loop___at___00main_spec__6(x_1, x_2);
return x_4;
}
}
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00main_spec__5___redArg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
uint8_t x_6; lean_object* x_7;
x_6 = lean_unbox(x_2);
x_7 = l_List_forIn_x27_loop___at___00main_spec__5___redArg(x_1, x_6, x_3, x_4);
return x_7;
}
}
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00main_spec__2___redArg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7;
x_7 = l_List_forIn_x27_loop___at___00main_spec__2___redArg(x_1, x_2, x_3, x_4, x_5);
return x_7;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00main_spec__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
_start:
{
uint8_t x_8; size_t x_9; size_t x_10; lean_object* x_11;
x_8 = lean_unbox(x_2);
x_9 = lean_unbox_usize(x_4);
lean_dec(x_4);
x_10 = lean_unbox_usize(x_5);
lean_dec(x_5);
x_11 = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00main_spec__4(x_1, x_8, x_3, x_9, x_10, x_6);
lean_dec_ref(x_3);
return x_11;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00main_spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) {
_start:
{
size_t x_10; size_t x_11; lean_object* x_12;
x_10 = lean_unbox_usize(x_6);
lean_dec(x_6);
x_11 = lean_unbox_usize(x_7);
lean_dec(x_7);
x_12 = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00main_spec__1(x_1, x_2, x_3, x_4, x_5, x_10, x_11, x_8);
lean_dec_ref(x_5);
lean_dec(x_2);
return x_12;
}
}
LEAN_EXPORT lean_object* l_main___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3;
x_3 = _lean_main(x_1);
return x_3;
}
}
lean_object* initialize_Init(uint8_t builtin);
lean_object* initialize_Lean_CoreM(uint8_t builtin);
lean_object* initialize_Lean_Replay(uint8_t builtin);
lean_object* initialize_LeanChecker_Replay(uint8_t builtin);
lean_object* initialize_Lake_Load_Manifest(uint8_t builtin);
static bool _G_initialized = false;
LEAN_EXPORT lean_object* initialize_LeanChecker(uint8_t builtin) {
lean_object * res;
if (_G_initialized) return lean_io_result_mk_ok(lean_box(0));
_G_initialized = true;
res = initialize_Init(builtin);
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
res = initialize_Lean_CoreM(builtin);
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
res = initialize_Lean_Replay(builtin);
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
res = initialize_LeanChecker_Replay(builtin);
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
res = initialize_Lake_Load_Manifest(builtin);
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
l_replayFromImports___closed__0 = _init_l_replayFromImports___closed__0();
lean_mark_persistent(l_replayFromImports___closed__0);
l_replayFromImports___closed__1 = _init_l_replayFromImports___closed__1();
l_replayFromImports___closed__2 = _init_l_replayFromImports___closed__2();
lean_mark_persistent(l_replayFromImports___closed__2);
l_replayFromImports___closed__3 = _init_l_replayFromImports___closed__3();
lean_mark_persistent(l_replayFromImports___closed__3);
l_replayFromImports___closed__4 = _init_l_replayFromImports___closed__4();
lean_mark_persistent(l_replayFromImports___closed__4);
l_replayFromImports___closed__5 = _init_l_replayFromImports___closed__5();
lean_mark_persistent(l_replayFromImports___closed__5);
l_replayFromImports___closed__6 = _init_l_replayFromImports___closed__6();
lean_mark_persistent(l_replayFromImports___closed__6);
l_replayFromImports___closed__7 = _init_l_replayFromImports___closed__7();
lean_mark_persistent(l_replayFromImports___closed__7);
l_replayFromFresh___closed__0 = _init_l_replayFromFresh___closed__0();
lean_mark_persistent(l_replayFromFresh___closed__0);
l_getCurrentModule___closed__0 = _init_l_getCurrentModule___closed__0();
lean_mark_persistent(l_getCurrentModule___closed__0);
l_List_forIn_x27_loop___at___00main_spec__2___redArg___closed__0 = _init_l_List_forIn_x27_loop___at___00main_spec__2___redArg___closed__0();
lean_mark_persistent(l_List_forIn_x27_loop___at___00main_spec__2___redArg___closed__0);
l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00main_spec__1___closed__0 = _init_l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00main_spec__1___closed__0();
lean_mark_persistent(l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00main_spec__1___closed__0);
l_List_forIn_x27_loop___at___00main_spec__2___redArg___closed__1 = _init_l_List_forIn_x27_loop___at___00main_spec__2___redArg___closed__1();
lean_mark_persistent(l_List_forIn_x27_loop___at___00main_spec__2___redArg___closed__1);
l_List_forIn_x27_loop___at___00main_spec__5___redArg___closed__0 = _init_l_List_forIn_x27_loop___at___00main_spec__5___redArg___closed__0();
lean_mark_persistent(l_List_forIn_x27_loop___at___00main_spec__5___redArg___closed__0);
l_List_forIn_x27_loop___at___00main_spec__5___redArg___closed__1 = _init_l_List_forIn_x27_loop___at___00main_spec__5___redArg___closed__1();
lean_mark_persistent(l_List_forIn_x27_loop___at___00main_spec__5___redArg___closed__1);
l_List_mapM_loop___at___00main_spec__6___closed__0 = _init_l_List_mapM_loop___at___00main_spec__6___closed__0();
lean_mark_persistent(l_List_mapM_loop___at___00main_spec__6___closed__0);
l_List_partition_loop___at___00main_spec__0___closed__0 = _init_l_List_partition_loop___at___00main_spec__0___closed__0();
lean_mark_persistent(l_List_partition_loop___at___00main_spec__0___closed__0);
l_List_partition_loop___at___00main_spec__0___closed__1 = _init_l_List_partition_loop___at___00main_spec__0___closed__1();
lean_mark_persistent(l_List_partition_loop___at___00main_spec__0___closed__1);
l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00main_spec__4___closed__0 = _init_l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00main_spec__4___closed__0();
lean_mark_persistent(l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00main_spec__4___closed__0);
l_main___closed__0 = _init_l_main___closed__0();
lean_mark_persistent(l_main___closed__0);
l_main___closed__1 = _init_l_main___closed__1();
lean_mark_persistent(l_main___closed__1);
l_main___closed__2 = _init_l_main___closed__2();
lean_mark_persistent(l_main___closed__2);
l_main___closed__3 = _init_l_main___closed__3();
lean_mark_persistent(l_main___closed__3);
l_main___closed__4 = _init_l_main___closed__4();
lean_mark_persistent(l_main___closed__4);
l_main___closed__5 = _init_l_main___closed__5();
lean_mark_persistent(l_main___closed__5);
l_main___closed__6 = _init_l_main___closed__6();
lean_mark_persistent(l_main___closed__6);
l_main___closed__7 = _init_l_main___closed__7();
lean_mark_persistent(l_main___closed__7);
l_main___boxed__const__1 = _init_l_main___boxed__const__1();
lean_mark_persistent(l_main___boxed__const__1);
return lean_io_result_mk_ok(lean_box(0));
}
char ** lean_setup_args(int argc, char ** argv);
void lean_initialize();
#if defined(WIN32) || defined(_WIN32)
#include <windows.h>
#endif
int main(int argc, char ** argv) {
#if defined(WIN32) || defined(_WIN32)
SetErrorMode(SEM_FAILCRITICALERRORS);
SetConsoleOutputCP(CP_UTF8);
#endif
lean_object* in; lean_object* res;
argv = lean_setup_args(argc, argv);
lean_initialize();
lean_set_panic_messages(false);
res = initialize_LeanChecker(1 /* builtin */);
lean_set_panic_messages(true);
lean_io_mark_end_initialization();
if (lean_io_result_is_ok(res)) {
lean_dec_ref(res);
lean_init_task_manager();
in = lean_box(0);
int i = argc;
while (i > 1) {
lean_object* n;
i--;
n = lean_alloc_ctor(1,2,0); lean_ctor_set(n, 0, lean_mk_string(argv[i])); lean_ctor_set(n, 1, in);
in = n;
}
res = _lean_main(in);
}
lean_finalize_task_manager();
if (lean_io_result_is_ok(res)) {
int ret = lean_unbox_uint32(lean_io_result_get_value(res));
lean_dec_ref(res);
return ret;
} else {
lean_io_result_show_error(res);
lean_dec_ref(res);
return 1;
}
}
#ifdef __cplusplus
}
#endif