| 1 | // Lean compiler output |
| 2 | // Module: Leanc |
| 3 | // Imports: Init Lean.Compiler.FFI |
| 4 | #include <lean/lean.h> |
| 5 | #if defined(__clang__) |
| 6 | #pragma clang diagnostic ignored "-Wunused-parameter" |
| 7 | #pragma clang diagnostic ignored "-Wunused-label" |
| 8 | #elif defined(__GNUC__) && !defined(__CLANG__) |
| 9 | #pragma GCC diagnostic ignored "-Wunused-parameter" |
| 10 | #pragma GCC diagnostic ignored "-Wunused-label" |
| 11 | #pragma GCC diagnostic ignored "-Wunused-but-set-variable" |
| 12 | #endif |
| 13 | #ifdef __cplusplus |
| 14 | extern "C" { |
| 15 | #endif |
| 16 | LEAN_EXPORT lean_object* l_main___lambda__4(lean_object*, lean_object*, lean_object*); |
| 17 | lean_object* lean_mk_empty_array_with_capacity(lean_object*); |
| 18 | LEAN_EXPORT lean_object* _lean_main(lean_object*, lean_object*); |
| 19 | lean_object* l_Lean_Compiler_FFI_getLinkerFlags(lean_object*, uint8_t); |
| 20 | LEAN_EXPORT lean_object* l_Array_anyMUnsafe_any___at_main___spec__7___boxed(lean_object*, lean_object*, lean_object*, lean_object*); |
| 21 | LEAN_EXPORT lean_object* l_panic___at_main___spec__9(lean_object*); |
| 22 | static lean_object* l_main___lambda__4___closed__3; |
| 23 | LEAN_EXPORT lean_object* l_main___boxed__const__1; |
| 24 | lean_object* lean_array_push(lean_object*, lean_object*); |
| 25 | static lean_object* l_main___lambda__1___closed__1; |
| 26 | uint8_t lean_usize_dec_eq(size_t, size_t); |
| 27 | LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_main___spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*); |
| 28 | LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_main___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); |
| 29 | lean_object* l_String_trim(lean_object*); |
| 30 | static lean_object* l_main___lambda__5___closed__2; |
| 31 | LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_main___spec__5(lean_object*, size_t, size_t, lean_object*); |
| 32 | static lean_object* l_Array_mapMUnsafe_map___at_main___spec__2___closed__1; |
| 33 | static lean_object* l_main___lambda__5___closed__4; |
| 34 | lean_object* lean_io_getenv(lean_object*, lean_object*); |
| 35 | LEAN_EXPORT uint8_t l_Array_contains___at_main___spec__6(lean_object*, lean_object*); |
| 36 | uint8_t lean_string_dec_eq(lean_object*, lean_object*); |
| 37 | static lean_object* l_main___lambda__2___closed__4; |
| 38 | static lean_object* l_main___lambda__5___closed__1; |
| 39 | LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_main___spec__8(lean_object*, size_t, size_t, lean_object*); |
| 40 | lean_object* lean_io_process_child_wait(lean_object*, lean_object*, lean_object*); |
| 41 | LEAN_EXPORT lean_object* l_Array_contains___at_main___spec__6___boxed(lean_object*, lean_object*); |
| 42 | lean_object* l_IO_println___at_Lean_instEval___spec__1(lean_object*, lean_object*); |
| 43 | size_t lean_usize_of_nat(lean_object*); |
| 44 | uint8_t l_String_isEmpty(lean_object*); |
| 45 | LEAN_EXPORT lean_object* l_List_forIn_loop___at_main___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); |
| 46 | LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_main___spec__3(lean_object*, size_t, size_t, lean_object*); |
| 47 | LEAN_EXPORT lean_object* l_main___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); |
| 48 | lean_object* l_IO_eprintln___at___private_Init_System_IO_0__IO_eprintlnAux___spec__1(lean_object*, lean_object*); |
| 49 | static lean_object* l_main___lambda__4___closed__2; |
| 50 | static lean_object* l_List_forIn_loop___at_main___spec__4___closed__3; |
| 51 | LEAN_EXPORT lean_object* l_main___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); |
| 52 | static lean_object* l_main___closed__1; |
| 53 | static lean_object* l_main___lambda__2___closed__1; |
| 54 | uint8_t l_List_isEmpty___rarg(lean_object*); |
| 55 | lean_object* lean_array_to_list(lean_object*, lean_object*); |
| 56 | LEAN_EXPORT lean_object* l_main___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); |
| 57 | lean_object* l_IO_appDir(lean_object*); |
| 58 | lean_object* lean_io_process_spawn(lean_object*, lean_object*); |
| 59 | static lean_object* l_main___lambda__3___closed__2; |
| 60 | static lean_object* l_main___lambda__3___closed__1; |
| 61 | lean_object* l_System_FilePath_parent(lean_object*); |
| 62 | LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_main___spec__2(lean_object*, size_t, size_t, lean_object*); |
| 63 | LEAN_EXPORT lean_object* l_main___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); |
| 64 | LEAN_EXPORT lean_object* l_List_forIn_loop___at_main___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); |
| 65 | lean_object* l___private_Init_Util_0__mkPanicMessageWithDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); |
| 66 | LEAN_EXPORT uint8_t l_Array_anyMUnsafe_any___at_main___spec__7(lean_object*, lean_object*, size_t, size_t); |
| 67 | LEAN_EXPORT lean_object* l_List_forIn_loop___at_main___spec__4___closed__4___boxed__const__1; |
| 68 | static lean_object* l_main___lambda__4___closed__4; |
| 69 | lean_object* l_String_replace_loop(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); |
| 70 | LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_main___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*); |
| 71 | lean_object* l_Array_append___rarg(lean_object*, lean_object*); |
| 72 | LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_main___spec__8___boxed(lean_object*, lean_object*, lean_object*, lean_object*); |
| 73 | LEAN_EXPORT lean_object* l_List_elem___at_main___spec__1___boxed(lean_object*, lean_object*); |
| 74 | static lean_object* l_Array_mapMUnsafe_map___at_main___spec__2___closed__2; |
| 75 | static lean_object* l_main___lambda__5___closed__5; |
| 76 | static lean_object* l_main___lambda__2___closed__2; |
| 77 | static lean_object* l_List_forIn_loop___at_main___spec__4___closed__4; |
| 78 | static lean_object* l_List_forIn_loop___at_main___spec__4___closed__1; |
| 79 | uint8_t lean_nat_dec_lt(lean_object*, lean_object*); |
| 80 | static lean_object* l_main___lambda__4___closed__1; |
| 81 | LEAN_EXPORT uint8_t l_List_elem___at_main___spec__1(lean_object*, lean_object*); |
| 82 | extern lean_object* l_System_instInhabitedFilePath; |
| 83 | lean_object* lean_panic_fn(lean_object*, lean_object*); |
| 84 | LEAN_EXPORT lean_object* l_main___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); |
| 85 | static lean_object* l_main___lambda__2___closed__3; |
| 86 | LEAN_EXPORT lean_object* l_main___lambda__5(lean_object*, lean_object*, lean_object*); |
| 87 | lean_object* l_List_foldl___at_Array_appendList___spec__1___rarg(lean_object*, lean_object*); |
| 88 | lean_object* l_Lean_Compiler_FFI_getCFlags(lean_object*); |
| 89 | lean_object* l_String_intercalate(lean_object*, lean_object*); |
| 90 | size_t lean_usize_add(size_t, size_t); |
| 91 | lean_object* lean_array_uget(lean_object*, size_t); |
| 92 | static lean_object* l_List_forIn_loop___at_main___spec__4___closed__2; |
| 93 | lean_object* lean_string_append(lean_object*, lean_object*); |
| 94 | lean_object* lean_array_get_size(lean_object*); |
| 95 | static lean_object* l_List_forIn_loop___at_main___spec__4___closed__5; |
| 96 | uint8_t lean_nat_dec_le(lean_object*, lean_object*); |
| 97 | static lean_object* l_main___lambda__5___closed__3; |
| 98 | uint8_t lean_usize_dec_lt(size_t, size_t); |
| 99 | lean_object* lean_array_uset(lean_object*, size_t, lean_object*); |
| 100 | lean_object* l_String_splitOn(lean_object*, lean_object*); |
| 101 | LEAN_EXPORT uint8_t l_List_elem___at_main___spec__1(lean_object* x_1, lean_object* x_2) { |
| 102 | _start: |
| 103 | { |
| 104 | if (lean_obj_tag(x_2) == 0) |
| 105 | { |
| 106 | uint8_t x_3; |
| 107 | x_3 = 0; |
| 108 | return x_3; |
| 109 | } |
| 110 | else |
| 111 | { |
| 112 | lean_object* x_4; lean_object* x_5; uint8_t x_6; |
| 113 | x_4 = lean_ctor_get(x_2, 0); |
| 114 | x_5 = lean_ctor_get(x_2, 1); |
| 115 | x_6 = lean_string_dec_eq(x_1, x_4); |
| 116 | if (x_6 == 0) |
| 117 | { |
| 118 | x_2 = x_5; |
| 119 | goto _start; |
| 120 | } |
| 121 | else |
| 122 | { |
| 123 | uint8_t x_8; |
| 124 | x_8 = 1; |
| 125 | return x_8; |
| 126 | } |
| 127 | } |
| 128 | } |
| 129 | } |
| 130 | static lean_object* _init_l_Array_mapMUnsafe_map___at_main___spec__2___closed__1() { |
| 131 | _start: |
| 132 | { |
| 133 | lean_object* x_1; |
| 134 | x_1 = lean_mk_string_from_bytes("ROOT" , 4); |
| 135 | return x_1; |
| 136 | } |
| 137 | } |
| 138 | static lean_object* _init_l_Array_mapMUnsafe_map___at_main___spec__2___closed__2() { |
| 139 | _start: |
| 140 | { |
| 141 | lean_object* x_1; |
| 142 | x_1 = lean_mk_string_from_bytes("" , 0); |
| 143 | return x_1; |
| 144 | } |
| 145 | } |
| 146 | LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_main___spec__2(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4) { |
| 147 | _start: |
| 148 | { |
| 149 | uint8_t x_5; |
| 150 | x_5 = lean_usize_dec_lt(x_3, x_2); |
| 151 | if (x_5 == 0) |
| 152 | { |
| 153 | return x_4; |
| 154 | } |
| 155 | else |
| 156 | { |
| 157 | lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; size_t x_12; size_t x_13; lean_object* x_14; |
| 158 | x_6 = lean_array_uget(x_4, x_3); |
| 159 | x_7 = lean_unsigned_to_nat(0u); |
| 160 | x_8 = lean_array_uset(x_4, x_3, x_7); |
| 161 | x_9 = l_Array_mapMUnsafe_map___at_main___spec__2___closed__1; |
| 162 | x_10 = l_Array_mapMUnsafe_map___at_main___spec__2___closed__2; |
| 163 | x_11 = l_String_replace_loop(x_6, x_9, x_1, x_10, x_7, x_7); |
| 164 | lean_dec(x_6); |
| 165 | x_12 = 1; |
| 166 | x_13 = lean_usize_add(x_3, x_12); |
| 167 | x_14 = lean_array_uset(x_8, x_3, x_11); |
| 168 | x_3 = x_13; |
| 169 | x_4 = x_14; |
| 170 | goto _start; |
| 171 | } |
| 172 | } |
| 173 | } |
| 174 | LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_main___spec__3(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4) { |
| 175 | _start: |
| 176 | { |
| 177 | uint8_t x_5; |
| 178 | x_5 = lean_usize_dec_lt(x_3, x_2); |
| 179 | if (x_5 == 0) |
| 180 | { |
| 181 | return x_4; |
| 182 | } |
| 183 | else |
| 184 | { |
| 185 | lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; size_t x_12; size_t x_13; lean_object* x_14; |
| 186 | x_6 = lean_array_uget(x_4, x_3); |
| 187 | x_7 = lean_unsigned_to_nat(0u); |
| 188 | x_8 = lean_array_uset(x_4, x_3, x_7); |
| 189 | x_9 = l_Array_mapMUnsafe_map___at_main___spec__2___closed__1; |
| 190 | x_10 = l_Array_mapMUnsafe_map___at_main___spec__2___closed__2; |
| 191 | x_11 = l_String_replace_loop(x_6, x_9, x_1, x_10, x_7, x_7); |
| 192 | lean_dec(x_6); |
| 193 | x_12 = 1; |
| 194 | x_13 = lean_usize_add(x_3, x_12); |
| 195 | x_14 = lean_array_uset(x_8, x_3, x_11); |
| 196 | x_3 = x_13; |
| 197 | x_4 = x_14; |
| 198 | goto _start; |
| 199 | } |
| 200 | } |
| 201 | } |
| 202 | static lean_object* _init_l_List_forIn_loop___at_main___spec__4___closed__1() { |
| 203 | _start: |
| 204 | { |
| 205 | lean_object* x_1; |
| 206 | x_1 = lean_mk_string_from_bytes("--print-cflags" , 14); |
| 207 | return x_1; |
| 208 | } |
| 209 | } |
| 210 | static lean_object* _init_l_List_forIn_loop___at_main___spec__4___closed__2() { |
| 211 | _start: |
| 212 | { |
| 213 | lean_object* x_1; |
| 214 | x_1 = lean_mk_string_from_bytes("--print-ldflags" , 15); |
| 215 | return x_1; |
| 216 | } |
| 217 | } |
| 218 | static lean_object* _init_l_List_forIn_loop___at_main___spec__4___closed__3() { |
| 219 | _start: |
| 220 | { |
| 221 | lean_object* x_1; |
| 222 | x_1 = lean_mk_string_from_bytes(" " , 1); |
| 223 | return x_1; |
| 224 | } |
| 225 | } |
| 226 | static lean_object* _init_l_List_forIn_loop___at_main___spec__4___closed__4___boxed__const__1() { |
| 227 | _start: |
| 228 | { |
| 229 | uint32_t x_1; lean_object* x_2; |
| 230 | x_1 = 0; |
| 231 | x_2 = lean_box_uint32(x_1); |
| 232 | return x_2; |
| 233 | } |
| 234 | } |
| 235 | static lean_object* _init_l_List_forIn_loop___at_main___spec__4___closed__4() { |
| 236 | _start: |
| 237 | { |
| 238 | lean_object* x_1; lean_object* x_2; |
| 239 | x_1 = l_List_forIn_loop___at_main___spec__4___closed__4___boxed__const__1; |
| 240 | x_2 = lean_alloc_ctor(1, 1, 0); |
| 241 | lean_ctor_set(x_2, 0, x_1); |
| 242 | return x_2; |
| 243 | } |
| 244 | } |
| 245 | static lean_object* _init_l_List_forIn_loop___at_main___spec__4___closed__5() { |
| 246 | _start: |
| 247 | { |
| 248 | lean_object* x_1; lean_object* x_2; lean_object* x_3; |
| 249 | x_1 = l_List_forIn_loop___at_main___spec__4___closed__4; |
| 250 | x_2 = lean_box(0); |
| 251 | x_3 = lean_alloc_ctor(0, 2, 0); |
| 252 | lean_ctor_set(x_3, 0, x_1); |
| 253 | lean_ctor_set(x_3, 1, x_2); |
| 254 | return x_3; |
| 255 | } |
| 256 | } |
| 257 | LEAN_EXPORT lean_object* l_List_forIn_loop___at_main___spec__4(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) { |
| 258 | _start: |
| 259 | { |
| 260 | if (lean_obj_tag(x_5) == 0) |
| 261 | { |
| 262 | lean_object* x_8; |
| 263 | lean_dec(x_4); |
| 264 | lean_dec(x_3); |
| 265 | lean_dec(x_2); |
| 266 | x_8 = lean_alloc_ctor(0, 2, 0); |
| 267 | lean_ctor_set(x_8, 0, x_6); |
| 268 | lean_ctor_set(x_8, 1, x_7); |
| 269 | return x_8; |
| 270 | } |
| 271 | else |
| 272 | { |
| 273 | lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12; |
| 274 | lean_dec(x_6); |
| 275 | x_9 = lean_ctor_get(x_5, 0); |
| 276 | x_10 = lean_ctor_get(x_5, 1); |
| 277 | x_11 = l_List_forIn_loop___at_main___spec__4___closed__1; |
| 278 | x_12 = lean_string_dec_eq(x_9, x_11); |
| 279 | if (x_12 == 0) |
| 280 | { |
| 281 | lean_object* x_13; uint8_t x_14; |
| 282 | x_13 = l_List_forIn_loop___at_main___spec__4___closed__2; |
| 283 | x_14 = lean_string_dec_eq(x_9, x_13); |
| 284 | if (x_14 == 0) |
| 285 | { |
| 286 | lean_inc(x_3); |
| 287 | { |
| 288 | lean_object* _tmp_4 = x_10; |
| 289 | lean_object* _tmp_5 = x_3; |
| 290 | x_5 = _tmp_4; |
| 291 | x_6 = _tmp_5; |
| 292 | } |
| 293 | goto _start; |
| 294 | } |
| 295 | else |
| 296 | { |
| 297 | lean_object* x_16; lean_object* x_17; size_t x_18; size_t x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; |
| 298 | lean_dec(x_3); |
| 299 | x_16 = l_Array_append___rarg(x_2, x_4); |
| 300 | x_17 = lean_array_get_size(x_16); |
| 301 | x_18 = lean_usize_of_nat(x_17); |
| 302 | lean_dec(x_17); |
| 303 | x_19 = 0; |
| 304 | x_20 = l_Array_mapMUnsafe_map___at_main___spec__2(x_1, x_18, x_19, x_16); |
| 305 | x_21 = lean_array_to_list(lean_box(0), x_20); |
| 306 | x_22 = l_List_forIn_loop___at_main___spec__4___closed__3; |
| 307 | x_23 = l_String_intercalate(x_22, x_21); |
| 308 | x_24 = l_IO_println___at_Lean_instEval___spec__1(x_23, x_7); |
| 309 | if (lean_obj_tag(x_24) == 0) |
| 310 | { |
| 311 | uint8_t x_25; |
| 312 | x_25 = !lean_is_exclusive(x_24); |
| 313 | if (x_25 == 0) |
| 314 | { |
| 315 | lean_object* x_26; lean_object* x_27; |
| 316 | x_26 = lean_ctor_get(x_24, 0); |
| 317 | lean_dec(x_26); |
| 318 | x_27 = l_List_forIn_loop___at_main___spec__4___closed__5; |
| 319 | lean_ctor_set(x_24, 0, x_27); |
| 320 | return x_24; |
| 321 | } |
| 322 | else |
| 323 | { |
| 324 | lean_object* x_28; lean_object* x_29; lean_object* x_30; |
| 325 | x_28 = lean_ctor_get(x_24, 1); |
| 326 | lean_inc(x_28); |
| 327 | lean_dec(x_24); |
| 328 | x_29 = l_List_forIn_loop___at_main___spec__4___closed__5; |
| 329 | x_30 = lean_alloc_ctor(0, 2, 0); |
| 330 | lean_ctor_set(x_30, 0, x_29); |
| 331 | lean_ctor_set(x_30, 1, x_28); |
| 332 | return x_30; |
| 333 | } |
| 334 | } |
| 335 | else |
| 336 | { |
| 337 | uint8_t x_31; |
| 338 | x_31 = !lean_is_exclusive(x_24); |
| 339 | if (x_31 == 0) |
| 340 | { |
| 341 | return x_24; |
| 342 | } |
| 343 | else |
| 344 | { |
| 345 | lean_object* x_32; lean_object* x_33; lean_object* x_34; |
| 346 | x_32 = lean_ctor_get(x_24, 0); |
| 347 | x_33 = lean_ctor_get(x_24, 1); |
| 348 | lean_inc(x_33); |
| 349 | lean_inc(x_32); |
| 350 | lean_dec(x_24); |
| 351 | x_34 = lean_alloc_ctor(1, 2, 0); |
| 352 | lean_ctor_set(x_34, 0, x_32); |
| 353 | lean_ctor_set(x_34, 1, x_33); |
| 354 | return x_34; |
| 355 | } |
| 356 | } |
| 357 | } |
| 358 | } |
| 359 | else |
| 360 | { |
| 361 | lean_object* x_35; size_t x_36; size_t x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; |
| 362 | lean_dec(x_4); |
| 363 | lean_dec(x_3); |
| 364 | x_35 = lean_array_get_size(x_2); |
| 365 | x_36 = lean_usize_of_nat(x_35); |
| 366 | lean_dec(x_35); |
| 367 | x_37 = 0; |
| 368 | x_38 = l_Array_mapMUnsafe_map___at_main___spec__3(x_1, x_36, x_37, x_2); |
| 369 | x_39 = lean_array_to_list(lean_box(0), x_38); |
| 370 | x_40 = l_List_forIn_loop___at_main___spec__4___closed__3; |
| 371 | x_41 = l_String_intercalate(x_40, x_39); |
| 372 | x_42 = l_IO_println___at_Lean_instEval___spec__1(x_41, x_7); |
| 373 | if (lean_obj_tag(x_42) == 0) |
| 374 | { |
| 375 | uint8_t x_43; |
| 376 | x_43 = !lean_is_exclusive(x_42); |
| 377 | if (x_43 == 0) |
| 378 | { |
| 379 | lean_object* x_44; lean_object* x_45; |
| 380 | x_44 = lean_ctor_get(x_42, 0); |
| 381 | lean_dec(x_44); |
| 382 | x_45 = l_List_forIn_loop___at_main___spec__4___closed__5; |
| 383 | lean_ctor_set(x_42, 0, x_45); |
| 384 | return x_42; |
| 385 | } |
| 386 | else |
| 387 | { |
| 388 | lean_object* x_46; lean_object* x_47; lean_object* x_48; |
| 389 | x_46 = lean_ctor_get(x_42, 1); |
| 390 | lean_inc(x_46); |
| 391 | lean_dec(x_42); |
| 392 | x_47 = l_List_forIn_loop___at_main___spec__4___closed__5; |
| 393 | x_48 = lean_alloc_ctor(0, 2, 0); |
| 394 | lean_ctor_set(x_48, 0, x_47); |
| 395 | lean_ctor_set(x_48, 1, x_46); |
| 396 | return x_48; |
| 397 | } |
| 398 | } |
| 399 | else |
| 400 | { |
| 401 | uint8_t x_49; |
| 402 | x_49 = !lean_is_exclusive(x_42); |
| 403 | if (x_49 == 0) |
| 404 | { |
| 405 | return x_42; |
| 406 | } |
| 407 | else |
| 408 | { |
| 409 | lean_object* x_50; lean_object* x_51; lean_object* x_52; |
| 410 | x_50 = lean_ctor_get(x_42, 0); |
| 411 | x_51 = lean_ctor_get(x_42, 1); |
| 412 | lean_inc(x_51); |
| 413 | lean_inc(x_50); |
| 414 | lean_dec(x_42); |
| 415 | x_52 = lean_alloc_ctor(1, 2, 0); |
| 416 | lean_ctor_set(x_52, 0, x_50); |
| 417 | lean_ctor_set(x_52, 1, x_51); |
| 418 | return x_52; |
| 419 | } |
| 420 | } |
| 421 | } |
| 422 | } |
| 423 | } |
| 424 | } |
| 425 | LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_main___spec__5(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4) { |
| 426 | _start: |
| 427 | { |
| 428 | uint8_t x_5; |
| 429 | x_5 = lean_usize_dec_lt(x_3, x_2); |
| 430 | if (x_5 == 0) |
| 431 | { |
| 432 | return x_4; |
| 433 | } |
| 434 | else |
| 435 | { |
| 436 | lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; size_t x_12; size_t x_13; lean_object* x_14; |
| 437 | x_6 = lean_array_uget(x_4, x_3); |
| 438 | x_7 = lean_unsigned_to_nat(0u); |
| 439 | x_8 = lean_array_uset(x_4, x_3, x_7); |
| 440 | x_9 = l_Array_mapMUnsafe_map___at_main___spec__2___closed__1; |
| 441 | x_10 = l_Array_mapMUnsafe_map___at_main___spec__2___closed__2; |
| 442 | x_11 = l_String_replace_loop(x_6, x_9, x_1, x_10, x_7, x_7); |
| 443 | lean_dec(x_6); |
| 444 | x_12 = 1; |
| 445 | x_13 = lean_usize_add(x_3, x_12); |
| 446 | x_14 = lean_array_uset(x_8, x_3, x_11); |
| 447 | x_3 = x_13; |
| 448 | x_4 = x_14; |
| 449 | goto _start; |
| 450 | } |
| 451 | } |
| 452 | } |
| 453 | LEAN_EXPORT uint8_t l_Array_anyMUnsafe_any___at_main___spec__7(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4) { |
| 454 | _start: |
| 455 | { |
| 456 | uint8_t x_5; |
| 457 | x_5 = lean_usize_dec_eq(x_3, x_4); |
| 458 | if (x_5 == 0) |
| 459 | { |
| 460 | lean_object* x_6; uint8_t x_7; |
| 461 | x_6 = lean_array_uget(x_2, x_3); |
| 462 | x_7 = lean_string_dec_eq(x_1, x_6); |
| 463 | lean_dec(x_6); |
| 464 | if (x_7 == 0) |
| 465 | { |
| 466 | size_t x_8; size_t x_9; |
| 467 | x_8 = 1; |
| 468 | x_9 = lean_usize_add(x_3, x_8); |
| 469 | x_3 = x_9; |
| 470 | goto _start; |
| 471 | } |
| 472 | else |
| 473 | { |
| 474 | uint8_t x_11; |
| 475 | x_11 = 1; |
| 476 | return x_11; |
| 477 | } |
| 478 | } |
| 479 | else |
| 480 | { |
| 481 | uint8_t x_12; |
| 482 | x_12 = 0; |
| 483 | return x_12; |
| 484 | } |
| 485 | } |
| 486 | } |
| 487 | LEAN_EXPORT uint8_t l_Array_contains___at_main___spec__6(lean_object* x_1, lean_object* x_2) { |
| 488 | _start: |
| 489 | { |
| 490 | lean_object* x_3; lean_object* x_4; uint8_t x_5; |
| 491 | x_3 = lean_array_get_size(x_1); |
| 492 | x_4 = lean_unsigned_to_nat(0u); |
| 493 | x_5 = lean_nat_dec_lt(x_4, x_3); |
| 494 | if (x_5 == 0) |
| 495 | { |
| 496 | uint8_t x_6; |
| 497 | lean_dec(x_3); |
| 498 | x_6 = 0; |
| 499 | return x_6; |
| 500 | } |
| 501 | else |
| 502 | { |
| 503 | uint8_t x_7; |
| 504 | x_7 = lean_nat_dec_le(x_3, x_3); |
| 505 | if (x_7 == 0) |
| 506 | { |
| 507 | uint8_t x_8; |
| 508 | lean_dec(x_3); |
| 509 | x_8 = 0; |
| 510 | return x_8; |
| 511 | } |
| 512 | else |
| 513 | { |
| 514 | size_t x_9; size_t x_10; uint8_t x_11; |
| 515 | x_9 = 0; |
| 516 | x_10 = lean_usize_of_nat(x_3); |
| 517 | lean_dec(x_3); |
| 518 | x_11 = l_Array_anyMUnsafe_any___at_main___spec__7(x_2, x_1, x_9, x_10); |
| 519 | return x_11; |
| 520 | } |
| 521 | } |
| 522 | } |
| 523 | } |
| 524 | LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_main___spec__8(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4) { |
| 525 | _start: |
| 526 | { |
| 527 | uint8_t x_5; |
| 528 | x_5 = lean_usize_dec_eq(x_2, x_3); |
| 529 | if (x_5 == 0) |
| 530 | { |
| 531 | lean_object* x_6; uint8_t x_7; size_t x_8; size_t x_9; |
| 532 | x_6 = lean_array_uget(x_1, x_2); |
| 533 | x_7 = l_String_isEmpty(x_6); |
| 534 | x_8 = 1; |
| 535 | x_9 = lean_usize_add(x_2, x_8); |
| 536 | if (x_7 == 0) |
| 537 | { |
| 538 | lean_object* x_10; |
| 539 | x_10 = lean_array_push(x_4, x_6); |
| 540 | x_2 = x_9; |
| 541 | x_4 = x_10; |
| 542 | goto _start; |
| 543 | } |
| 544 | else |
| 545 | { |
| 546 | lean_dec(x_6); |
| 547 | x_2 = x_9; |
| 548 | goto _start; |
| 549 | } |
| 550 | } |
| 551 | else |
| 552 | { |
| 553 | return x_4; |
| 554 | } |
| 555 | } |
| 556 | } |
| 557 | LEAN_EXPORT lean_object* l_panic___at_main___spec__9(lean_object* x_1) { |
| 558 | _start: |
| 559 | { |
| 560 | lean_object* x_2; lean_object* x_3; |
| 561 | x_2 = l_System_instInhabitedFilePath; |
| 562 | x_3 = lean_panic_fn(x_2, x_1); |
| 563 | return x_3; |
| 564 | } |
| 565 | } |
| 566 | static lean_object* _init_l_main___lambda__1___closed__1() { |
| 567 | _start: |
| 568 | { |
| 569 | uint8_t x_1; lean_object* x_2; |
| 570 | x_1 = 1; |
| 571 | x_2 = lean_alloc_ctor(0, 0, 3); |
| 572 | lean_ctor_set_uint8(x_2, 0, x_1); |
| 573 | lean_ctor_set_uint8(x_2, 1, x_1); |
| 574 | lean_ctor_set_uint8(x_2, 2, x_1); |
| 575 | return x_2; |
| 576 | } |
| 577 | } |
| 578 | LEAN_EXPORT lean_object* l_main___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { |
| 579 | _start: |
| 580 | { |
| 581 | lean_object* x_7; lean_object* x_8; lean_object* x_9; |
| 582 | x_7 = l_main___lambda__1___closed__1; |
| 583 | x_8 = lean_alloc_ctor(0, 5, 0); |
| 584 | lean_ctor_set(x_8, 0, x_7); |
| 585 | lean_ctor_set(x_8, 1, x_1); |
| 586 | lean_ctor_set(x_8, 2, x_2); |
| 587 | lean_ctor_set(x_8, 3, x_3); |
| 588 | lean_ctor_set(x_8, 4, x_4); |
| 589 | x_9 = lean_io_process_spawn(x_8, x_6); |
| 590 | if (lean_obj_tag(x_9) == 0) |
| 591 | { |
| 592 | lean_object* x_10; lean_object* x_11; lean_object* x_12; |
| 593 | x_10 = lean_ctor_get(x_9, 0); |
| 594 | lean_inc(x_10); |
| 595 | x_11 = lean_ctor_get(x_9, 1); |
| 596 | lean_inc(x_11); |
| 597 | lean_dec(x_9); |
| 598 | x_12 = lean_io_process_child_wait(x_7, x_10, x_11); |
| 599 | lean_dec(x_10); |
| 600 | return x_12; |
| 601 | } |
| 602 | else |
| 603 | { |
| 604 | uint8_t x_13; |
| 605 | x_13 = !lean_is_exclusive(x_9); |
| 606 | if (x_13 == 0) |
| 607 | { |
| 608 | return x_9; |
| 609 | } |
| 610 | else |
| 611 | { |
| 612 | lean_object* x_14; lean_object* x_15; lean_object* x_16; |
| 613 | x_14 = lean_ctor_get(x_9, 0); |
| 614 | x_15 = lean_ctor_get(x_9, 1); |
| 615 | lean_inc(x_15); |
| 616 | lean_inc(x_14); |
| 617 | lean_dec(x_9); |
| 618 | x_16 = lean_alloc_ctor(1, 2, 0); |
| 619 | lean_ctor_set(x_16, 0, x_14); |
| 620 | lean_ctor_set(x_16, 1, x_15); |
| 621 | return x_16; |
| 622 | } |
| 623 | } |
| 624 | } |
| 625 | } |
| 626 | static lean_object* _init_l_main___lambda__2___closed__1() { |
| 627 | _start: |
| 628 | { |
| 629 | lean_object* x_1; |
| 630 | x_1 = lean_mk_string_from_bytes("-Wno-unused-command-line-argument" , 33); |
| 631 | return x_1; |
| 632 | } |
| 633 | } |
| 634 | static lean_object* _init_l_main___lambda__2___closed__2() { |
| 635 | _start: |
| 636 | { |
| 637 | lean_object* x_1; lean_object* x_2; lean_object* x_3; |
| 638 | x_1 = lean_box(0); |
| 639 | x_2 = l_main___lambda__2___closed__1; |
| 640 | x_3 = lean_alloc_ctor(1, 2, 0); |
| 641 | lean_ctor_set(x_3, 0, x_2); |
| 642 | lean_ctor_set(x_3, 1, x_1); |
| 643 | return x_3; |
| 644 | } |
| 645 | } |
| 646 | static lean_object* _init_l_main___lambda__2___closed__3() { |
| 647 | _start: |
| 648 | { |
| 649 | lean_object* x_1; lean_object* x_2; |
| 650 | x_1 = lean_unsigned_to_nat(0u); |
| 651 | x_2 = lean_mk_empty_array_with_capacity(x_1); |
| 652 | return x_2; |
| 653 | } |
| 654 | } |
| 655 | static lean_object* _init_l_main___lambda__2___closed__4() { |
| 656 | _start: |
| 657 | { |
| 658 | lean_object* x_1; |
| 659 | x_1 = lean_mk_string_from_bytes("-v" , 2); |
| 660 | return x_1; |
| 661 | } |
| 662 | } |
| 663 | LEAN_EXPORT lean_object* l_main___lambda__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, lean_object* x_8, lean_object* x_9, lean_object* x_10) { |
| 664 | _start: |
| 665 | { |
| 666 | lean_object* x_11; lean_object* x_12; 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; lean_object* x_20; lean_object* x_21; uint8_t x_22; size_t x_23; lean_object* x_24; |
| 667 | x_11 = l_Array_mapMUnsafe_map___at_main___spec__2___closed__1; |
| 668 | x_12 = l_Array_mapMUnsafe_map___at_main___spec__2___closed__2; |
| 669 | x_13 = lean_unsigned_to_nat(0u); |
| 670 | x_14 = l_String_replace_loop(x_6, x_11, x_1, x_12, x_13, x_13); |
| 671 | lean_dec(x_6); |
| 672 | x_15 = l_List_foldl___at_Array_appendList___spec__1___rarg(x_2, x_7); |
| 673 | x_16 = l_List_foldl___at_Array_appendList___spec__1___rarg(x_15, x_3); |
| 674 | x_17 = l_List_foldl___at_Array_appendList___spec__1___rarg(x_16, x_8); |
| 675 | x_18 = l_Array_append___rarg(x_17, x_4); |
| 676 | x_19 = l_main___lambda__2___closed__2; |
| 677 | x_20 = l_List_foldl___at_Array_appendList___spec__1___rarg(x_18, x_19); |
| 678 | x_21 = lean_array_get_size(x_20); |
| 679 | x_22 = lean_nat_dec_lt(x_13, x_21); |
| 680 | x_23 = 0; |
| 681 | if (x_22 == 0) |
| 682 | { |
| 683 | lean_object* x_50; |
| 684 | lean_dec(x_21); |
| 685 | lean_dec(x_20); |
| 686 | x_50 = l_main___lambda__2___closed__3; |
| 687 | x_24 = x_50; |
| 688 | goto block_49; |
| 689 | } |
| 690 | else |
| 691 | { |
| 692 | uint8_t x_51; |
| 693 | x_51 = lean_nat_dec_le(x_21, x_21); |
| 694 | if (x_51 == 0) |
| 695 | { |
| 696 | lean_object* x_52; |
| 697 | lean_dec(x_21); |
| 698 | lean_dec(x_20); |
| 699 | x_52 = l_main___lambda__2___closed__3; |
| 700 | x_24 = x_52; |
| 701 | goto block_49; |
| 702 | } |
| 703 | else |
| 704 | { |
| 705 | size_t x_53; lean_object* x_54; lean_object* x_55; |
| 706 | x_53 = lean_usize_of_nat(x_21); |
| 707 | lean_dec(x_21); |
| 708 | x_54 = l_main___lambda__2___closed__3; |
| 709 | x_55 = l_Array_foldlMUnsafe_fold___at_main___spec__8(x_20, x_23, x_53, x_54); |
| 710 | lean_dec(x_20); |
| 711 | x_24 = x_55; |
| 712 | goto block_49; |
| 713 | } |
| 714 | } |
| 715 | block_49: |
| 716 | { |
| 717 | lean_object* x_25; size_t x_26; lean_object* x_27; lean_object* x_28; uint8_t x_29; |
| 718 | x_25 = lean_array_get_size(x_24); |
| 719 | x_26 = lean_usize_of_nat(x_25); |
| 720 | lean_dec(x_25); |
| 721 | x_27 = l_Array_mapMUnsafe_map___at_main___spec__5(x_1, x_26, x_23, x_24); |
| 722 | lean_dec(x_1); |
| 723 | x_28 = l_main___lambda__2___closed__4; |
| 724 | x_29 = l_Array_contains___at_main___spec__6(x_27, x_28); |
| 725 | if (x_29 == 0) |
| 726 | { |
| 727 | lean_object* x_30; lean_object* x_31; lean_object* x_32; |
| 728 | x_30 = l_main___lambda__2___closed__3; |
| 729 | x_31 = lean_box(0); |
| 730 | x_32 = l_main___lambda__1(x_14, x_27, x_5, x_30, x_31, x_10); |
| 731 | return x_32; |
| 732 | } |
| 733 | else |
| 734 | { |
| 735 | lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; |
| 736 | x_33 = lean_string_append(x_12, x_14); |
| 737 | x_34 = l_List_forIn_loop___at_main___spec__4___closed__3; |
| 738 | x_35 = lean_string_append(x_33, x_34); |
| 739 | lean_inc(x_27); |
| 740 | x_36 = lean_array_to_list(lean_box(0), x_27); |
| 741 | x_37 = l_String_intercalate(x_34, x_36); |
| 742 | x_38 = lean_string_append(x_35, x_37); |
| 743 | lean_dec(x_37); |
| 744 | x_39 = lean_string_append(x_38, x_12); |
| 745 | x_40 = l_IO_eprintln___at___private_Init_System_IO_0__IO_eprintlnAux___spec__1(x_39, x_10); |
| 746 | if (lean_obj_tag(x_40) == 0) |
| 747 | { |
| 748 | lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; |
| 749 | x_41 = lean_ctor_get(x_40, 0); |
| 750 | lean_inc(x_41); |
| 751 | x_42 = lean_ctor_get(x_40, 1); |
| 752 | lean_inc(x_42); |
| 753 | lean_dec(x_40); |
| 754 | x_43 = l_main___lambda__2___closed__3; |
| 755 | x_44 = l_main___lambda__1(x_14, x_27, x_5, x_43, x_41, x_42); |
| 756 | lean_dec(x_41); |
| 757 | return x_44; |
| 758 | } |
| 759 | else |
| 760 | { |
| 761 | uint8_t x_45; |
| 762 | lean_dec(x_27); |
| 763 | lean_dec(x_14); |
| 764 | lean_dec(x_5); |
| 765 | x_45 = !lean_is_exclusive(x_40); |
| 766 | if (x_45 == 0) |
| 767 | { |
| 768 | return x_40; |
| 769 | } |
| 770 | else |
| 771 | { |
| 772 | lean_object* x_46; lean_object* x_47; lean_object* x_48; |
| 773 | x_46 = lean_ctor_get(x_40, 0); |
| 774 | x_47 = lean_ctor_get(x_40, 1); |
| 775 | lean_inc(x_47); |
| 776 | lean_inc(x_46); |
| 777 | lean_dec(x_40); |
| 778 | x_48 = lean_alloc_ctor(1, 2, 0); |
| 779 | lean_ctor_set(x_48, 0, x_46); |
| 780 | lean_ctor_set(x_48, 1, x_47); |
| 781 | return x_48; |
| 782 | } |
| 783 | } |
| 784 | } |
| 785 | } |
| 786 | } |
| 787 | } |
| 788 | static lean_object* _init_l_main___lambda__3___closed__1() { |
| 789 | _start: |
| 790 | { |
| 791 | lean_object* x_1; |
| 792 | x_1 = lean_mk_string_from_bytes("LEAN_CC" , 7); |
| 793 | return x_1; |
| 794 | } |
| 795 | } |
| 796 | static lean_object* _init_l_main___lambda__3___closed__2() { |
| 797 | _start: |
| 798 | { |
| 799 | lean_object* x_1; |
| 800 | x_1 = lean_mk_string_from_bytes("cc" , 2); |
| 801 | return x_1; |
| 802 | } |
| 803 | } |
| 804 | LEAN_EXPORT lean_object* l_main___lambda__3(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) { |
| 805 | _start: |
| 806 | { |
| 807 | lean_object* x_10; lean_object* x_11; lean_object* x_12; |
| 808 | lean_dec(x_8); |
| 809 | x_10 = l_main___lambda__3___closed__1; |
| 810 | x_11 = lean_io_getenv(x_10, x_9); |
| 811 | x_12 = lean_ctor_get(x_11, 0); |
| 812 | lean_inc(x_12); |
| 813 | if (lean_obj_tag(x_12) == 0) |
| 814 | { |
| 815 | lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; |
| 816 | x_13 = lean_ctor_get(x_11, 1); |
| 817 | lean_inc(x_13); |
| 818 | lean_dec(x_11); |
| 819 | x_14 = l_main___lambda__3___closed__2; |
| 820 | x_15 = lean_box(0); |
| 821 | x_16 = l_main___lambda__2(x_1, x_2, x_3, x_4, x_5, x_14, x_6, x_7, x_15, x_13); |
| 822 | return x_16; |
| 823 | } |
| 824 | else |
| 825 | { |
| 826 | lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; |
| 827 | lean_dec(x_7); |
| 828 | lean_dec(x_6); |
| 829 | x_17 = lean_ctor_get(x_11, 1); |
| 830 | lean_inc(x_17); |
| 831 | lean_dec(x_11); |
| 832 | x_18 = lean_ctor_get(x_12, 0); |
| 833 | lean_inc(x_18); |
| 834 | lean_dec(x_12); |
| 835 | x_19 = lean_box(0); |
| 836 | x_20 = lean_box(0); |
| 837 | x_21 = l_main___lambda__2(x_1, x_2, x_3, x_4, x_5, x_18, x_19, x_19, x_20, x_17); |
| 838 | return x_21; |
| 839 | } |
| 840 | } |
| 841 | } |
| 842 | static lean_object* _init_l_main___lambda__4___closed__1() { |
| 843 | _start: |
| 844 | { |
| 845 | lean_object* x_1; |
| 846 | x_1 = lean_mk_string_from_bytes("-shared" , 7); |
| 847 | return x_1; |
| 848 | } |
| 849 | } |
| 850 | static lean_object* _init_l_main___lambda__4___closed__2() { |
| 851 | _start: |
| 852 | { |
| 853 | lean_object* x_1; lean_object* x_2; |
| 854 | x_1 = l_Array_mapMUnsafe_map___at_main___spec__2___closed__2; |
| 855 | x_2 = l_String_trim(x_1); |
| 856 | return x_2; |
| 857 | } |
| 858 | } |
| 859 | static lean_object* _init_l_main___lambda__4___closed__3() { |
| 860 | _start: |
| 861 | { |
| 862 | lean_object* x_1; lean_object* x_2; lean_object* x_3; |
| 863 | x_1 = l_main___lambda__4___closed__2; |
| 864 | x_2 = l_List_forIn_loop___at_main___spec__4___closed__3; |
| 865 | x_3 = l_String_splitOn(x_1, x_2); |
| 866 | return x_3; |
| 867 | } |
| 868 | } |
| 869 | static lean_object* _init_l_main___lambda__4___closed__4() { |
| 870 | _start: |
| 871 | { |
| 872 | lean_object* x_1; lean_object* x_2; lean_object* x_3; |
| 873 | x_1 = lean_box(0); |
| 874 | x_2 = lean_box(0); |
| 875 | x_3 = lean_alloc_ctor(0, 2, 0); |
| 876 | lean_ctor_set(x_3, 0, x_1); |
| 877 | lean_ctor_set(x_3, 1, x_2); |
| 878 | return x_3; |
| 879 | } |
| 880 | } |
| 881 | LEAN_EXPORT lean_object* l_main___lambda__4(lean_object* x_1, lean_object* x_2, lean_object* x_3) { |
| 882 | _start: |
| 883 | { |
| 884 | lean_object* x_4; uint8_t x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8; |
| 885 | x_4 = l_main___lambda__4___closed__1; |
| 886 | x_5 = l_List_elem___at_main___spec__1(x_4, x_1); |
| 887 | lean_inc(x_2); |
| 888 | x_6 = l_Lean_Compiler_FFI_getCFlags(x_2); |
| 889 | x_7 = lean_box(0); |
| 890 | if (x_5 == 0) |
| 891 | { |
| 892 | uint8_t x_29; |
| 893 | x_29 = 1; |
| 894 | x_8 = x_29; |
| 895 | goto block_28; |
| 896 | } |
| 897 | else |
| 898 | { |
| 899 | uint8_t x_30; |
| 900 | x_30 = 0; |
| 901 | x_8 = x_30; |
| 902 | goto block_28; |
| 903 | } |
| 904 | block_28: |
| 905 | { |
| 906 | lean_object* x_9; lean_object* x_10; lean_object* x_11; |
| 907 | lean_inc(x_2); |
| 908 | x_9 = l_Lean_Compiler_FFI_getLinkerFlags(x_2, x_8); |
| 909 | x_10 = l_main___lambda__4___closed__4; |
| 910 | lean_inc(x_9); |
| 911 | lean_inc(x_6); |
| 912 | x_11 = l_List_forIn_loop___at_main___spec__4(x_2, x_6, x_10, x_9, x_1, x_10, x_3); |
| 913 | if (lean_obj_tag(x_11) == 0) |
| 914 | { |
| 915 | lean_object* x_12; lean_object* x_13; |
| 916 | x_12 = lean_ctor_get(x_11, 0); |
| 917 | lean_inc(x_12); |
| 918 | x_13 = lean_ctor_get(x_12, 0); |
| 919 | lean_inc(x_13); |
| 920 | lean_dec(x_12); |
| 921 | if (lean_obj_tag(x_13) == 0) |
| 922 | { |
| 923 | lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; |
| 924 | x_14 = lean_ctor_get(x_11, 1); |
| 925 | lean_inc(x_14); |
| 926 | lean_dec(x_11); |
| 927 | x_15 = l_main___lambda__4___closed__3; |
| 928 | x_16 = lean_box(0); |
| 929 | x_17 = l_main___lambda__3(x_2, x_6, x_1, x_9, x_7, x_15, x_15, x_16, x_14); |
| 930 | return x_17; |
| 931 | } |
| 932 | else |
| 933 | { |
| 934 | uint8_t x_18; |
| 935 | lean_dec(x_9); |
| 936 | lean_dec(x_6); |
| 937 | lean_dec(x_2); |
| 938 | lean_dec(x_1); |
| 939 | x_18 = !lean_is_exclusive(x_11); |
| 940 | if (x_18 == 0) |
| 941 | { |
| 942 | lean_object* x_19; lean_object* x_20; |
| 943 | x_19 = lean_ctor_get(x_11, 0); |
| 944 | lean_dec(x_19); |
| 945 | x_20 = lean_ctor_get(x_13, 0); |
| 946 | lean_inc(x_20); |
| 947 | lean_dec(x_13); |
| 948 | lean_ctor_set(x_11, 0, x_20); |
| 949 | return x_11; |
| 950 | } |
| 951 | else |
| 952 | { |
| 953 | lean_object* x_21; lean_object* x_22; lean_object* x_23; |
| 954 | x_21 = lean_ctor_get(x_11, 1); |
| 955 | lean_inc(x_21); |
| 956 | lean_dec(x_11); |
| 957 | x_22 = lean_ctor_get(x_13, 0); |
| 958 | lean_inc(x_22); |
| 959 | lean_dec(x_13); |
| 960 | x_23 = lean_alloc_ctor(0, 2, 0); |
| 961 | lean_ctor_set(x_23, 0, x_22); |
| 962 | lean_ctor_set(x_23, 1, x_21); |
| 963 | return x_23; |
| 964 | } |
| 965 | } |
| 966 | } |
| 967 | else |
| 968 | { |
| 969 | uint8_t x_24; |
| 970 | lean_dec(x_9); |
| 971 | lean_dec(x_6); |
| 972 | lean_dec(x_2); |
| 973 | lean_dec(x_1); |
| 974 | x_24 = !lean_is_exclusive(x_11); |
| 975 | if (x_24 == 0) |
| 976 | { |
| 977 | return x_11; |
| 978 | } |
| 979 | else |
| 980 | { |
| 981 | lean_object* x_25; lean_object* x_26; lean_object* x_27; |
| 982 | x_25 = lean_ctor_get(x_11, 0); |
| 983 | x_26 = lean_ctor_get(x_11, 1); |
| 984 | lean_inc(x_26); |
| 985 | lean_inc(x_25); |
| 986 | lean_dec(x_11); |
| 987 | x_27 = lean_alloc_ctor(1, 2, 0); |
| 988 | lean_ctor_set(x_27, 0, x_25); |
| 989 | lean_ctor_set(x_27, 1, x_26); |
| 990 | return x_27; |
| 991 | } |
| 992 | } |
| 993 | } |
| 994 | } |
| 995 | } |
| 996 | static lean_object* _init_l_main___lambda__5___closed__1() { |
| 997 | _start: |
| 998 | { |
| 999 | lean_object* x_1; |
| 1000 | x_1 = lean_mk_string_from_bytes("LEAN_SYSROOT" , 12); |
| 1001 | return x_1; |
| 1002 | } |
| 1003 | } |
| 1004 | static lean_object* _init_l_main___lambda__5___closed__2() { |
| 1005 | _start: |
| 1006 | { |
| 1007 | lean_object* x_1; |
| 1008 | x_1 = lean_mk_string_from_bytes("Init.Data.Option.BasicAux" , 25); |
| 1009 | return x_1; |
| 1010 | } |
| 1011 | } |
| 1012 | static lean_object* _init_l_main___lambda__5___closed__3() { |
| 1013 | _start: |
| 1014 | { |
| 1015 | lean_object* x_1; |
| 1016 | x_1 = lean_mk_string_from_bytes("Option.get!" , 11); |
| 1017 | return x_1; |
| 1018 | } |
| 1019 | } |
| 1020 | static lean_object* _init_l_main___lambda__5___closed__4() { |
| 1021 | _start: |
| 1022 | { |
| 1023 | lean_object* x_1; |
| 1024 | x_1 = lean_mk_string_from_bytes("value is none" , 13); |
| 1025 | return x_1; |
| 1026 | } |
| 1027 | } |
| 1028 | static lean_object* _init_l_main___lambda__5___closed__5() { |
| 1029 | _start: |
| 1030 | { |
| 1031 | lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; |
| 1032 | x_1 = l_main___lambda__5___closed__2; |
| 1033 | x_2 = l_main___lambda__5___closed__3; |
| 1034 | x_3 = lean_unsigned_to_nat(16u); |
| 1035 | x_4 = lean_unsigned_to_nat(14u); |
| 1036 | x_5 = l_main___lambda__5___closed__4; |
| 1037 | x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); |
| 1038 | return x_6; |
| 1039 | } |
| 1040 | } |
| 1041 | LEAN_EXPORT lean_object* l_main___lambda__5(lean_object* x_1, lean_object* x_2, lean_object* x_3) { |
| 1042 | _start: |
| 1043 | { |
| 1044 | lean_object* x_4; lean_object* x_5; lean_object* x_6; |
| 1045 | lean_dec(x_2); |
| 1046 | x_4 = l_main___lambda__5___closed__1; |
| 1047 | x_5 = lean_io_getenv(x_4, x_3); |
| 1048 | x_6 = lean_ctor_get(x_5, 0); |
| 1049 | lean_inc(x_6); |
| 1050 | if (lean_obj_tag(x_6) == 0) |
| 1051 | { |
| 1052 | lean_object* x_7; lean_object* x_8; |
| 1053 | x_7 = lean_ctor_get(x_5, 1); |
| 1054 | lean_inc(x_7); |
| 1055 | lean_dec(x_5); |
| 1056 | x_8 = l_IO_appDir(x_7); |
| 1057 | if (lean_obj_tag(x_8) == 0) |
| 1058 | { |
| 1059 | lean_object* x_9; lean_object* x_10; lean_object* x_11; |
| 1060 | x_9 = lean_ctor_get(x_8, 0); |
| 1061 | lean_inc(x_9); |
| 1062 | x_10 = lean_ctor_get(x_8, 1); |
| 1063 | lean_inc(x_10); |
| 1064 | lean_dec(x_8); |
| 1065 | x_11 = l_System_FilePath_parent(x_9); |
| 1066 | lean_dec(x_9); |
| 1067 | if (lean_obj_tag(x_11) == 0) |
| 1068 | { |
| 1069 | lean_object* x_12; lean_object* x_13; lean_object* x_14; |
| 1070 | x_12 = l_main___lambda__5___closed__5; |
| 1071 | x_13 = l_panic___at_main___spec__9(x_12); |
| 1072 | x_14 = l_main___lambda__4(x_1, x_13, x_10); |
| 1073 | return x_14; |
| 1074 | } |
| 1075 | else |
| 1076 | { |
| 1077 | lean_object* x_15; lean_object* x_16; |
| 1078 | x_15 = lean_ctor_get(x_11, 0); |
| 1079 | lean_inc(x_15); |
| 1080 | lean_dec(x_11); |
| 1081 | x_16 = l_main___lambda__4(x_1, x_15, x_10); |
| 1082 | return x_16; |
| 1083 | } |
| 1084 | } |
| 1085 | else |
| 1086 | { |
| 1087 | uint8_t x_17; |
| 1088 | lean_dec(x_1); |
| 1089 | x_17 = !lean_is_exclusive(x_8); |
| 1090 | if (x_17 == 0) |
| 1091 | { |
| 1092 | return x_8; |
| 1093 | } |
| 1094 | else |
| 1095 | { |
| 1096 | lean_object* x_18; lean_object* x_19; lean_object* x_20; |
| 1097 | x_18 = lean_ctor_get(x_8, 0); |
| 1098 | x_19 = lean_ctor_get(x_8, 1); |
| 1099 | lean_inc(x_19); |
| 1100 | lean_inc(x_18); |
| 1101 | lean_dec(x_8); |
| 1102 | x_20 = lean_alloc_ctor(1, 2, 0); |
| 1103 | lean_ctor_set(x_20, 0, x_18); |
| 1104 | lean_ctor_set(x_20, 1, x_19); |
| 1105 | return x_20; |
| 1106 | } |
| 1107 | } |
| 1108 | } |
| 1109 | else |
| 1110 | { |
| 1111 | lean_object* x_21; lean_object* x_22; lean_object* x_23; |
| 1112 | x_21 = lean_ctor_get(x_5, 1); |
| 1113 | lean_inc(x_21); |
| 1114 | lean_dec(x_5); |
| 1115 | x_22 = lean_ctor_get(x_6, 0); |
| 1116 | lean_inc(x_22); |
| 1117 | lean_dec(x_6); |
| 1118 | x_23 = l_main___lambda__4(x_1, x_22, x_21); |
| 1119 | return x_23; |
| 1120 | } |
| 1121 | } |
| 1122 | } |
| 1123 | static lean_object* _init_l_main___closed__1() { |
| 1124 | _start: |
| 1125 | { |
| 1126 | lean_object* x_1; |
| 1127 | x_1 = lean_mk_string_from_bytes("Lean C compiler\n\nA simple wrapper around a C compiler. Defaults to `cc`,\nwhich can be overridden with the environment variable `LEAN_CC`. All parameters are passed\nas-is to the wrapped compiler.\n\nInteresting options:\n* `--print-cflags`: print C compiler flags necessary for building against the Lean runtime and exit\n* `--print-ldflags`: print C compiler flags necessary for statically linking against the Lean library and exit" , 427); |
| 1128 | return x_1; |
| 1129 | } |
| 1130 | } |
| 1131 | static lean_object* _init_l_main___boxed__const__1() { |
| 1132 | _start: |
| 1133 | { |
| 1134 | uint32_t x_1; lean_object* x_2; |
| 1135 | x_1 = 1; |
| 1136 | x_2 = lean_box_uint32(x_1); |
| 1137 | return x_2; |
| 1138 | } |
| 1139 | } |
| 1140 | LEAN_EXPORT lean_object* _lean_main(lean_object* x_1, lean_object* x_2) { |
| 1141 | _start: |
| 1142 | { |
| 1143 | uint8_t x_3; |
| 1144 | x_3 = l_List_isEmpty___rarg(x_1); |
| 1145 | if (x_3 == 0) |
| 1146 | { |
| 1147 | lean_object* x_4; lean_object* x_5; |
| 1148 | x_4 = lean_box(0); |
| 1149 | x_5 = l_main___lambda__5(x_1, x_4, x_2); |
| 1150 | return x_5; |
| 1151 | } |
| 1152 | else |
| 1153 | { |
| 1154 | lean_object* x_6; lean_object* x_7; |
| 1155 | lean_dec(x_1); |
| 1156 | x_6 = l_main___closed__1; |
| 1157 | x_7 = l_IO_println___at_Lean_instEval___spec__1(x_6, x_2); |
| 1158 | if (lean_obj_tag(x_7) == 0) |
| 1159 | { |
| 1160 | uint8_t x_8; |
| 1161 | x_8 = !lean_is_exclusive(x_7); |
| 1162 | if (x_8 == 0) |
| 1163 | { |
| 1164 | lean_object* x_9; lean_object* x_10; |
| 1165 | x_9 = lean_ctor_get(x_7, 0); |
| 1166 | lean_dec(x_9); |
| 1167 | x_10 = l_main___boxed__const__1; |
| 1168 | lean_ctor_set(x_7, 0, x_10); |
| 1169 | return x_7; |
| 1170 | } |
| 1171 | else |
| 1172 | { |
| 1173 | lean_object* x_11; lean_object* x_12; lean_object* x_13; |
| 1174 | x_11 = lean_ctor_get(x_7, 1); |
| 1175 | lean_inc(x_11); |
| 1176 | lean_dec(x_7); |
| 1177 | x_12 = l_main___boxed__const__1; |
| 1178 | x_13 = lean_alloc_ctor(0, 2, 0); |
| 1179 | lean_ctor_set(x_13, 0, x_12); |
| 1180 | lean_ctor_set(x_13, 1, x_11); |
| 1181 | return x_13; |
| 1182 | } |
| 1183 | } |
| 1184 | else |
| 1185 | { |
| 1186 | uint8_t x_14; |
| 1187 | x_14 = !lean_is_exclusive(x_7); |
| 1188 | if (x_14 == 0) |
| 1189 | { |
| 1190 | return x_7; |
| 1191 | } |
| 1192 | else |
| 1193 | { |
| 1194 | lean_object* x_15; lean_object* x_16; lean_object* x_17; |
| 1195 | x_15 = lean_ctor_get(x_7, 0); |
| 1196 | x_16 = lean_ctor_get(x_7, 1); |
| 1197 | lean_inc(x_16); |
| 1198 | lean_inc(x_15); |
| 1199 | lean_dec(x_7); |
| 1200 | x_17 = lean_alloc_ctor(1, 2, 0); |
| 1201 | lean_ctor_set(x_17, 0, x_15); |
| 1202 | lean_ctor_set(x_17, 1, x_16); |
| 1203 | return x_17; |
| 1204 | } |
| 1205 | } |
| 1206 | } |
| 1207 | } |
| 1208 | } |
| 1209 | LEAN_EXPORT lean_object* l_List_elem___at_main___spec__1___boxed(lean_object* x_1, lean_object* x_2) { |
| 1210 | _start: |
| 1211 | { |
| 1212 | uint8_t x_3; lean_object* x_4; |
| 1213 | x_3 = l_List_elem___at_main___spec__1(x_1, x_2); |
| 1214 | lean_dec(x_2); |
| 1215 | lean_dec(x_1); |
| 1216 | x_4 = lean_box(x_3); |
| 1217 | return x_4; |
| 1218 | } |
| 1219 | } |
| 1220 | LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_main___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { |
| 1221 | _start: |
| 1222 | { |
| 1223 | size_t x_5; size_t x_6; lean_object* x_7; |
| 1224 | x_5 = lean_unbox_usize(x_2); |
| 1225 | lean_dec(x_2); |
| 1226 | x_6 = lean_unbox_usize(x_3); |
| 1227 | lean_dec(x_3); |
| 1228 | x_7 = l_Array_mapMUnsafe_map___at_main___spec__2(x_1, x_5, x_6, x_4); |
| 1229 | lean_dec(x_1); |
| 1230 | return x_7; |
| 1231 | } |
| 1232 | } |
| 1233 | LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_main___spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { |
| 1234 | _start: |
| 1235 | { |
| 1236 | size_t x_5; size_t x_6; lean_object* x_7; |
| 1237 | x_5 = lean_unbox_usize(x_2); |
| 1238 | lean_dec(x_2); |
| 1239 | x_6 = lean_unbox_usize(x_3); |
| 1240 | lean_dec(x_3); |
| 1241 | x_7 = l_Array_mapMUnsafe_map___at_main___spec__3(x_1, x_5, x_6, x_4); |
| 1242 | lean_dec(x_1); |
| 1243 | return x_7; |
| 1244 | } |
| 1245 | } |
| 1246 | LEAN_EXPORT lean_object* l_List_forIn_loop___at_main___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) { |
| 1247 | _start: |
| 1248 | { |
| 1249 | lean_object* x_8; |
| 1250 | x_8 = l_List_forIn_loop___at_main___spec__4(x_1, x_2, x_3, x_4, x_5, x_6, x_7); |
| 1251 | lean_dec(x_5); |
| 1252 | lean_dec(x_1); |
| 1253 | return x_8; |
| 1254 | } |
| 1255 | } |
| 1256 | LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_main___spec__5___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { |
| 1257 | _start: |
| 1258 | { |
| 1259 | size_t x_5; size_t x_6; lean_object* x_7; |
| 1260 | x_5 = lean_unbox_usize(x_2); |
| 1261 | lean_dec(x_2); |
| 1262 | x_6 = lean_unbox_usize(x_3); |
| 1263 | lean_dec(x_3); |
| 1264 | x_7 = l_Array_mapMUnsafe_map___at_main___spec__5(x_1, x_5, x_6, x_4); |
| 1265 | lean_dec(x_1); |
| 1266 | return x_7; |
| 1267 | } |
| 1268 | } |
| 1269 | LEAN_EXPORT lean_object* l_Array_anyMUnsafe_any___at_main___spec__7___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { |
| 1270 | _start: |
| 1271 | { |
| 1272 | size_t x_5; size_t x_6; uint8_t x_7; lean_object* x_8; |
| 1273 | x_5 = lean_unbox_usize(x_3); |
| 1274 | lean_dec(x_3); |
| 1275 | x_6 = lean_unbox_usize(x_4); |
| 1276 | lean_dec(x_4); |
| 1277 | x_7 = l_Array_anyMUnsafe_any___at_main___spec__7(x_1, x_2, x_5, x_6); |
| 1278 | lean_dec(x_2); |
| 1279 | lean_dec(x_1); |
| 1280 | x_8 = lean_box(x_7); |
| 1281 | return x_8; |
| 1282 | } |
| 1283 | } |
| 1284 | LEAN_EXPORT lean_object* l_Array_contains___at_main___spec__6___boxed(lean_object* x_1, lean_object* x_2) { |
| 1285 | _start: |
| 1286 | { |
| 1287 | uint8_t x_3; lean_object* x_4; |
| 1288 | x_3 = l_Array_contains___at_main___spec__6(x_1, x_2); |
| 1289 | lean_dec(x_2); |
| 1290 | lean_dec(x_1); |
| 1291 | x_4 = lean_box(x_3); |
| 1292 | return x_4; |
| 1293 | } |
| 1294 | } |
| 1295 | LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_main___spec__8___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { |
| 1296 | _start: |
| 1297 | { |
| 1298 | size_t x_5; size_t x_6; lean_object* x_7; |
| 1299 | x_5 = lean_unbox_usize(x_2); |
| 1300 | lean_dec(x_2); |
| 1301 | x_6 = lean_unbox_usize(x_3); |
| 1302 | lean_dec(x_3); |
| 1303 | x_7 = l_Array_foldlMUnsafe_fold___at_main___spec__8(x_1, x_5, x_6, x_4); |
| 1304 | lean_dec(x_1); |
| 1305 | return x_7; |
| 1306 | } |
| 1307 | } |
| 1308 | LEAN_EXPORT lean_object* l_main___lambda__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) { |
| 1309 | _start: |
| 1310 | { |
| 1311 | lean_object* x_7; |
| 1312 | x_7 = l_main___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6); |
| 1313 | lean_dec(x_5); |
| 1314 | return x_7; |
| 1315 | } |
| 1316 | } |
| 1317 | LEAN_EXPORT lean_object* l_main___lambda__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, lean_object* x_9, lean_object* x_10) { |
| 1318 | _start: |
| 1319 | { |
| 1320 | lean_object* x_11; |
| 1321 | x_11 = l_main___lambda__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); |
| 1322 | lean_dec(x_9); |
| 1323 | return x_11; |
| 1324 | } |
| 1325 | } |
| 1326 | lean_object* initialize_Init(uint8_t builtin, lean_object*); |
| 1327 | lean_object* initialize_Lean_Compiler_FFI(uint8_t builtin, lean_object*); |
| 1328 | static bool _G_initialized = false; |
| 1329 | LEAN_EXPORT lean_object* initialize_Leanc(uint8_t builtin, lean_object* w) { |
| 1330 | lean_object * res; |
| 1331 | if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); |
| 1332 | _G_initialized = true; |
| 1333 | res = initialize_Init(builtin, lean_io_mk_world()); |
| 1334 | if (lean_io_result_is_error(res)) return res; |
| 1335 | lean_dec_ref(res); |
| 1336 | res = initialize_Lean_Compiler_FFI(builtin, lean_io_mk_world()); |
| 1337 | if (lean_io_result_is_error(res)) return res; |
| 1338 | lean_dec_ref(res); |
| 1339 | l_Array_mapMUnsafe_map___at_main___spec__2___closed__1 = _init_l_Array_mapMUnsafe_map___at_main___spec__2___closed__1(); |
| 1340 | lean_mark_persistent(l_Array_mapMUnsafe_map___at_main___spec__2___closed__1); |
| 1341 | l_Array_mapMUnsafe_map___at_main___spec__2___closed__2 = _init_l_Array_mapMUnsafe_map___at_main___spec__2___closed__2(); |
| 1342 | lean_mark_persistent(l_Array_mapMUnsafe_map___at_main___spec__2___closed__2); |
| 1343 | l_List_forIn_loop___at_main___spec__4___closed__1 = _init_l_List_forIn_loop___at_main___spec__4___closed__1(); |
| 1344 | lean_mark_persistent(l_List_forIn_loop___at_main___spec__4___closed__1); |
| 1345 | l_List_forIn_loop___at_main___spec__4___closed__2 = _init_l_List_forIn_loop___at_main___spec__4___closed__2(); |
| 1346 | lean_mark_persistent(l_List_forIn_loop___at_main___spec__4___closed__2); |
| 1347 | l_List_forIn_loop___at_main___spec__4___closed__3 = _init_l_List_forIn_loop___at_main___spec__4___closed__3(); |
| 1348 | lean_mark_persistent(l_List_forIn_loop___at_main___spec__4___closed__3); |
| 1349 | l_List_forIn_loop___at_main___spec__4___closed__4___boxed__const__1 = _init_l_List_forIn_loop___at_main___spec__4___closed__4___boxed__const__1(); |
| 1350 | lean_mark_persistent(l_List_forIn_loop___at_main___spec__4___closed__4___boxed__const__1); |
| 1351 | l_List_forIn_loop___at_main___spec__4___closed__4 = _init_l_List_forIn_loop___at_main___spec__4___closed__4(); |
| 1352 | lean_mark_persistent(l_List_forIn_loop___at_main___spec__4___closed__4); |
| 1353 | l_List_forIn_loop___at_main___spec__4___closed__5 = _init_l_List_forIn_loop___at_main___spec__4___closed__5(); |
| 1354 | lean_mark_persistent(l_List_forIn_loop___at_main___spec__4___closed__5); |
| 1355 | l_main___lambda__1___closed__1 = _init_l_main___lambda__1___closed__1(); |
| 1356 | lean_mark_persistent(l_main___lambda__1___closed__1); |
| 1357 | l_main___lambda__2___closed__1 = _init_l_main___lambda__2___closed__1(); |
| 1358 | lean_mark_persistent(l_main___lambda__2___closed__1); |
| 1359 | l_main___lambda__2___closed__2 = _init_l_main___lambda__2___closed__2(); |
| 1360 | lean_mark_persistent(l_main___lambda__2___closed__2); |
| 1361 | l_main___lambda__2___closed__3 = _init_l_main___lambda__2___closed__3(); |
| 1362 | lean_mark_persistent(l_main___lambda__2___closed__3); |
| 1363 | l_main___lambda__2___closed__4 = _init_l_main___lambda__2___closed__4(); |
| 1364 | lean_mark_persistent(l_main___lambda__2___closed__4); |
| 1365 | l_main___lambda__3___closed__1 = _init_l_main___lambda__3___closed__1(); |
| 1366 | lean_mark_persistent(l_main___lambda__3___closed__1); |
| 1367 | l_main___lambda__3___closed__2 = _init_l_main___lambda__3___closed__2(); |
| 1368 | lean_mark_persistent(l_main___lambda__3___closed__2); |
| 1369 | l_main___lambda__4___closed__1 = _init_l_main___lambda__4___closed__1(); |
| 1370 | lean_mark_persistent(l_main___lambda__4___closed__1); |
| 1371 | l_main___lambda__4___closed__2 = _init_l_main___lambda__4___closed__2(); |
| 1372 | lean_mark_persistent(l_main___lambda__4___closed__2); |
| 1373 | l_main___lambda__4___closed__3 = _init_l_main___lambda__4___closed__3(); |
| 1374 | lean_mark_persistent(l_main___lambda__4___closed__3); |
| 1375 | l_main___lambda__4___closed__4 = _init_l_main___lambda__4___closed__4(); |
| 1376 | lean_mark_persistent(l_main___lambda__4___closed__4); |
| 1377 | l_main___lambda__5___closed__1 = _init_l_main___lambda__5___closed__1(); |
| 1378 | lean_mark_persistent(l_main___lambda__5___closed__1); |
| 1379 | l_main___lambda__5___closed__2 = _init_l_main___lambda__5___closed__2(); |
| 1380 | lean_mark_persistent(l_main___lambda__5___closed__2); |
| 1381 | l_main___lambda__5___closed__3 = _init_l_main___lambda__5___closed__3(); |
| 1382 | lean_mark_persistent(l_main___lambda__5___closed__3); |
| 1383 | l_main___lambda__5___closed__4 = _init_l_main___lambda__5___closed__4(); |
| 1384 | lean_mark_persistent(l_main___lambda__5___closed__4); |
| 1385 | l_main___lambda__5___closed__5 = _init_l_main___lambda__5___closed__5(); |
| 1386 | lean_mark_persistent(l_main___lambda__5___closed__5); |
| 1387 | l_main___closed__1 = _init_l_main___closed__1(); |
| 1388 | lean_mark_persistent(l_main___closed__1); |
| 1389 | l_main___boxed__const__1 = _init_l_main___boxed__const__1(); |
| 1390 | lean_mark_persistent(l_main___boxed__const__1); |
| 1391 | return lean_io_result_mk_ok(lean_box(0)); |
| 1392 | } |
| 1393 | void lean_initialize(); |
| 1394 | |
| 1395 | #if defined(WIN32) || defined(_WIN32) |
| 1396 | #include <windows.h> |
| 1397 | #endif |
| 1398 | |
| 1399 | int main(int argc, char ** argv) { |
| 1400 | #if defined(WIN32) || defined(_WIN32) |
| 1401 | SetErrorMode(SEM_FAILCRITICALERRORS); |
| 1402 | #endif |
| 1403 | lean_object* in; lean_object* res; |
| 1404 | lean_initialize(); |
| 1405 | lean_set_panic_messages(false); |
| 1406 | res = initialize_Leanc(1 /* builtin */, lean_io_mk_world()); |
| 1407 | lean_set_panic_messages(true); |
| 1408 | lean_io_mark_end_initialization(); |
| 1409 | if (lean_io_result_is_ok(res)) { |
| 1410 | lean_dec_ref(res); |
| 1411 | lean_init_task_manager(); |
| 1412 | in = lean_box(0); |
| 1413 | int i = argc; |
| 1414 | while (i > 1) { |
| 1415 | lean_object* n; |
| 1416 | i--; |
| 1417 | n = lean_alloc_ctor(1,2,0); lean_ctor_set(n, 0, lean_mk_string(argv[i])); lean_ctor_set(n, 1, in); |
| 1418 | in = n; |
| 1419 | } |
| 1420 | res = _lean_main(in, lean_io_mk_world()); |
| 1421 | } |
| 1422 | lean_finalize_task_manager(); |
| 1423 | if (lean_io_result_is_ok(res)) { |
| 1424 | int ret = lean_unbox_uint32(lean_io_result_get_value(res)); |
| 1425 | lean_dec_ref(res); |
| 1426 | return ret; |
| 1427 | } else { |
| 1428 | lean_io_result_show_error(res); |
| 1429 | lean_dec_ref(res); |
| 1430 | return 1; |
| 1431 | } |
| 1432 | } |
| 1433 | #ifdef __cplusplus |
| 1434 | } |
| 1435 | #endif |
| 1436 | |