diff --git "a/.lake/build/ir/REPL/Main.c" "b/.lake/build/ir/REPL/Main.c" new file mode 100644--- /dev/null +++ "b/.lake/build/ir/REPL/Main.c" @@ -0,0 +1,10453 @@ +// Lean compiler output +// Module: REPL.Main +// Imports: Init REPL.JSON REPL.Frontend REPL.Util.Path REPL.Lean.ContextInfo REPL.Lean.Environment REPL.Lean.InfoTree REPL.Lean.InfoTree.ToJson REPL.Snapshots +#include +#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 +lean_object* l_Lean_JsonNumber_fromNat(lean_object*); +LEAN_EXPORT lean_object* l_REPL_createProofStepReponse___rarg___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_List_join___rarg(lean_object*); +lean_object* lean_format_pretty(lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_unpickleProofSnapshot___spec__2(lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_REPL_runCommand___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__7(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_REPL_recordProofSnapshot___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_mk_empty_array_with_capacity(lean_object*); +LEAN_EXPORT lean_object* _lean_main(lean_object*, lean_object*); +static lean_object* l_REPL_pickleProofSnapshot___rarg___lambda__3___closed__1; +lean_object* l_REPL_ProofSnapshot_ppGoals(lean_object*, lean_object*); +lean_object* l_REPL_CommandSnapshot_pickle(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Json_mkObj(lean_object*); +LEAN_EXPORT lean_object* l_REPL_sorries___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___closed__1; +LEAN_EXPORT lean_object* l_REPL_createProofStepReponse(lean_object*); +static lean_object* l_List_mapTR_loop___at_REPL_sorries___spec__1___closed__1; +static lean_object* l_repl_loop___lambda__1___closed__7; +LEAN_EXPORT lean_object* l_REPL_unpickleCommandSnapshot___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_REPL_Json_nonemptyList___at_REPL_instToJsonCommandResponse___spec__1(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_parse(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_REPL_recordCommandSnapshot___at_REPL_unpickleCommandSnapshot___spec__1(lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__8(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_repl_loop___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_array_push(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_List_mapTR_loop___at_REPL_runCommand___spec__4(lean_object*, lean_object*); +static lean_object* l_REPL_ppTactic___lambda__1___closed__1; +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_unpickleProofSnapshot___spec__6___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_REPL_createProofStepReponse___at_REPL_unpickleProofSnapshot___spec__1___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_InfoTree_toJson(lean_object*, lean_object*, lean_object*); +lean_object* l_REPL_CommandSnapshot_unpickle_unsafe__1(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_List_mapTR_loop___at_REPL_tactics___spec__1(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_REPL_tactics___at_REPL_runCommand___spec__5(lean_object*, lean_object*, lean_object*); +lean_object* l_String_trim(lean_object*); +lean_object* lean_array_fget(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_sorries___spec__4___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_REPL_unpickleProofSnapshot___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_REPL_JSON_0__REPL_fromJsonUnpickleProofState____x40_REPL_JSON___hyg_3453_(lean_object*); +LEAN_EXPORT lean_object* l_REPL_createProofStepReponse___rarg___lambda__7(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_List_mapTR_loop___at_REPL_runCommand___spec__2___closed__1; +LEAN_EXPORT lean_object* l_REPL_unpickleProofSnapshot(lean_object*, lean_object*, lean_object*); +lean_object* l_REPL_ProofSnapshot_unpickle_unsafe__1(lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_tactics___spec__2(lean_object*); +lean_object* l_EStateM_instMonadEStateM(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_REPL_sorries___at_REPL_unpickleProofSnapshot___spec__3(lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_REPL_createProofStepReponse___at_REPL_unpickleProofSnapshot___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_createProofStepReponse___spec__1___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_panic___at_REPL_unpickleProofSnapshot___spec__5___closed__3; +lean_object* l___private_REPL_JSON_0__REPL_toJsonError____x40_REPL_JSON___hyg_2860_(lean_object*); +lean_object* l_REPL_ProofSnapshot_pickle(lean_object*, lean_object*, lean_object*); +static lean_object* l_REPL_createProofStepReponse___rarg___lambda__7___closed__1; +lean_object* l_Lean_Elab_IO_processInput_unsafe__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_ContextInfo_ppGoals___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_REPL_Json_nonemptyList___at_REPL_instToJsonProofStepResponse__1___spec__1(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_REPL_sorries(lean_object*); +uint8_t lean_string_dec_eq(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_REPL_createProofStepReponse___rarg___lambda__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_REPL_State_cmdStates___default___closed__1; +lean_object* l_REPL_Json_nonemptyList___at_REPL_instToJsonCommandResponse___spec__5(lean_object*, lean_object*); +lean_object* l___private_REPL_JSON_0__REPL_fromJsonCommand____x40_REPL_JSON___hyg_128_(lean_object*); +LEAN_EXPORT lean_object* l_REPL_processFile___boxed(lean_object*, lean_object*, lean_object*); +static lean_object* l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__8___closed__1; +LEAN_EXPORT lean_object* l_REPL_unpickleCommandSnapshot(lean_object*, lean_object*, lean_object*); +static lean_object* l_repl_loop___lambda__1___closed__5; +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_unpickleProofSnapshot___spec__6___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_REPL_runCommand___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_REPL_tactics(lean_object*); +lean_object* l_IO_println___at_Lean_instEval___spec__1(lean_object*, lean_object*); +static lean_object* l_repl_loop___lambda__1___closed__3; +lean_object* l_Lean_initSearchPath(lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_instToJsonSum___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_CommandContextInfo_save___at_Lean_Widget_goalToInteractive___spec__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +size_t lean_usize_of_nat(lean_object*); +uint8_t l_String_isEmpty(lean_object*); +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_createProofStepReponse___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_REPL_ProofSnapshot_pickle___boxed(lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__9(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_REPL_runCommand___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_findSysroot(lean_object*, lean_object*); +static lean_object* l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___closed__4; +lean_object* l___private_REPL_JSON_0__REPL_fromJsonProofStep____x40_REPL_JSON___hyg_529_(lean_object*); +LEAN_EXPORT lean_object* l_REPL_State_proofStates___default; +LEAN_EXPORT lean_object* l_REPL_pickleProofSnapshot___at_repl_loop___spec__2___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_REPL_ProofSnapshot_newTraces(lean_object*, lean_object*, lean_object*); +static lean_object* l_REPL_runCommand___lambda__1___closed__1; +static lean_object* l_REPL_runCommand___lambda__1___closed__2; +LEAN_EXPORT lean_object* l_REPL_pickleCommandSnapshot___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_REPL_createProofStepReponse___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_String_instInhabitedString; +lean_object* l_Lean_Elab_InfoTree_sorries(lean_object*); +LEAN_EXPORT lean_object* l_panic___at_REPL_unpickleProofSnapshot___spec__5(lean_object*, lean_object*, lean_object*); +lean_object* l_REPL_Message_of(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_REPL_createProofStepReponse___rarg___lambda__8(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_REPL_JSON_0__REPL_fromJsonUnpickleEnvironment____x40_REPL_JSON___hyg_3161_(lean_object*); +LEAN_EXPORT lean_object* l_REPL_recordCommandSnapshot___rarg___lambda__1(lean_object*, lean_object*, lean_object*); +static lean_object* l_panic___at_REPL_unpickleProofSnapshot___spec__5___closed__1; +static lean_object* l_REPL_runCommand___lambda__1___closed__5; +LEAN_EXPORT lean_object* l_REPL_createProofStepReponse___rarg___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_instToJsonSum(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_REPL_runCommand___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_REPL_processFile(lean_object*, lean_object*, lean_object*); +static lean_object* l_main___closed__1; +LEAN_EXPORT lean_object* l_REPL_recordProofSnapshot___rarg(lean_object*, lean_object*, lean_object*); +static lean_object* l_repl_loop___lambda__1___closed__8; +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_InfoTree_retainTacticInfo___lambda__1___boxed(lean_object*); +LEAN_EXPORT lean_object* l_List_mapTR_loop___at_REPL_unpickleProofSnapshot___spec__7(lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_REPL_recordProofSnapshot___at_REPL_unpickleProofSnapshot___spec__4(lean_object*, lean_object*, lean_object*); +uint8_t l_List_isEmpty___rarg(lean_object*); +LEAN_EXPORT lean_object* l_REPL_runCommand___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_REPL_JSON_0__REPL_fromJsonPickleEnvironment____x40_REPL_JSON___hyg_3018_(lean_object*); +lean_object* l_REPL_ProofSnapshot_runString(lean_object*, lean_object*, lean_object*); +static lean_object* l_repl_loop___lambda__1___closed__9; +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_sorries___spec__4(lean_object*); +static lean_object* l_REPL_pickleCommandSnapshot___rarg___lambda__4___closed__2; +static lean_object* l_parse___closed__2; +uint8_t l_String_startsWith(lean_object*, lean_object*); +lean_object* l_instInhabited___rarg(lean_object*, lean_object*); +lean_object* l___private_REPL_JSON_0__REPL_fromJsonPickleProofState____x40_REPL_JSON___hyg_3287_(lean_object*); +static lean_object* l_repl___closed__1; +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__6(lean_object*, lean_object*, lean_object*); +lean_object* l_REPL_ProofSnapshot_runMetaM___rarg(lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_REPL_runCommand___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_get_stdin(lean_object*); +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_tactics___spec__2___rarg___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___closed__3; +static lean_object* l_REPL_unpickleProofSnapshot___closed__2; +LEAN_EXPORT lean_object* l_REPL_pickleProofSnapshot___rarg___lambda__1(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_REPL_pickleCommandSnapshot___rarg___lambda__1(lean_object*, lean_object*, lean_object*); +static lean_object* l_repl_loop___lambda__1___closed__6; +lean_object* l_Lean_Elab_InfoTree_tactics(lean_object*); +LEAN_EXPORT lean_object* l_REPL_pickleCommandSnapshot___rarg___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_REPL_pickleProofSnapshot___rarg___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_createProofStepReponse___spec__1(lean_object*); +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_tactics___spec__2___rarg___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_REPL_runCommand___lambda__1___closed__3; +LEAN_EXPORT lean_object* l_List_mapTR_loop___at_REPL_sorries___spec__3(lean_object*, lean_object*); +lean_object* l_StateT_instMonadStateT___rarg(lean_object*); +lean_object* l_REPL_Json_nonemptyList___at_REPL_instToJsonCommandResponse___spec__3(lean_object*, lean_object*); +lean_object* l_Lean_Elab_InfoTree_retainSubstantive___lambda__1___boxed(lean_object*); +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__3(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_List_mapTR_loop___at_REPL_runCommand___spec__3(lean_object*, lean_object*); +static lean_object* l_REPL_ppTactic___closed__4; +lean_object* l___private_Init_Util_0__mkPanicMessageWithDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_repl_loop___lambda__1___closed__4; +static lean_object* l_REPL_pickleCommandSnapshot___rarg___lambda__4___closed__1; +static lean_object* l_REPL_ppTactic___closed__3; +static lean_object* l_REPL_runProofStep___closed__3; +static lean_object* l_REPL_ppTactic___closed__6; +static lean_object* l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___closed__2; +extern lean_object* l_Std_Format_defWidth; +LEAN_EXPORT lean_object* l_List_mapTR_loop___at_REPL_createProofStepReponse___spec__2(lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_REPL_pickleProofSnapshot___rarg___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_REPL_Sorry_of(lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_REPL_pickleProofSnapshot(lean_object*); +lean_object* l_REPL_ProofSnapshot_create(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_REPL_CommandSnapshot_pickle___boxed(lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_REPL_createProofStepReponse___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_REPL_runCommand___spec__1(size_t, size_t, lean_object*, lean_object*, lean_object*); +static lean_object* l_REPL_ppTactic___lambda__1___closed__2; +lean_object* l_REPL_ProofSnapshot_newMessages(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_REPL_createProofStepReponse___rarg___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_REPL_recordCommandSnapshot(lean_object*); +lean_object* l_IO_FS_readFile(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_REPL_ppTactic___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_REPL_Tactic_of(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_REPL_createProofStepReponse___rarg___lambda__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_repl_loop___lambda__1___closed__1; +LEAN_EXPORT lean_object* l_panic___at_REPL_sorries___spec__2(lean_object*); +LEAN_EXPORT lean_object* l_REPL_pickleCommandSnapshot(lean_object*); +LEAN_EXPORT lean_object* l_REPL_ppTactic___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_REPL_pickleCommandSnapshot___at_repl_loop___spec__1(lean_object*, lean_object*, lean_object*); +lean_object* l_REPL_ProofSnapshot_create___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_ParseImportsFast_0__Lean_toJsonPrintImportResult____x40_Lean_Elab_ParseImportsFast___hyg_1425____spec__3(size_t, size_t, lean_object*); +LEAN_EXPORT lean_object* l_List_mapTR_loop___at_REPL_runCommand___spec__2(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_REPL_pickleCommandSnapshot___rarg___lambda__2(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_REPL_recordCommandSnapshot___rarg(lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_unpickleProofSnapshot___spec__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_REPL_pickleCommandSnapshot___rarg___lambda__3(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Info_isOriginal___boxed(lean_object*); +uint8_t lean_nat_dec_lt(lean_object*, lean_object*); +static lean_object* l_List_mapTR_loop___at_REPL_runCommand___spec__3___closed__1; +LEAN_EXPORT lean_object* l_List_mapTR_loop___at_REPL_sorries___spec__1(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_REPL_unpickleProofSnapshot___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_panic___at_REPL_sorries___spec__2___rarg(lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_REPL_ppTactic(lean_object*, lean_object*, lean_object*); +static lean_object* l_REPL_pickleProofSnapshot___rarg___lambda__3___closed__2; +lean_object* lean_panic_fn(lean_object*, lean_object*); +static lean_object* l_REPL_ppTactic___closed__2; +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_tactics___spec__2___rarg___lambda__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_REPL_runProofStep___closed__2; +static lean_object* l_repl_loop___lambda__1___closed__10; +LEAN_EXPORT lean_object* l_REPL_pickleProofSnapshot___at_repl_loop___spec__2(lean_object*, lean_object*, lean_object*); +lean_object* l_REPL_ProofSnapshot_newInfoTrees(lean_object*, lean_object*); +lean_object* l_Lean_PersistentHashMap_mkEmptyEntriesArray(lean_object*, lean_object*); +static lean_object* l_List_mapTR_loop___at_REPL_runCommand___spec__2___closed__2; +LEAN_EXPORT lean_object* l_repl_loop(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_REPL_runProofStep(lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_REPL_runCommand(lean_object*, lean_object*, lean_object*); +lean_object* l_List_reverse___rarg(lean_object*); +extern lean_object* l_Lean_firstFrontendMacroScope; +lean_object* l_Lean_Elab_InfoTree_retainTacticInfo___lambda__2___boxed(lean_object*); +lean_object* l_String_intercalate(lean_object*, lean_object*); +lean_object* l_Lean_PrettyPrinter_ppTactic(lean_object*, lean_object*, lean_object*, lean_object*); +size_t lean_usize_add(size_t, size_t); +lean_object* l___private_REPL_JSON_0__REPL_fromJsonFile____x40_REPL_JSON___hyg_325_(lean_object*); +static lean_object* l_REPL_ppTactic___closed__5; +lean_object* l_Lean_Elab_ContextInfo_ppGoals(lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_REPL_recordCommandSnapshot___rarg___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_array_uget(lean_object*, size_t); +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_runCommand___spec__6(lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_REPL_ppTactic___closed__1; +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_tactics___spec__2___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_io_error_to_string(lean_object*); +LEAN_EXPORT lean_object* l_REPL_createProofStepReponse___rarg___lambda__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_List_redLength___rarg(lean_object*); +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_tactics___spec__2___rarg___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_panic___at_REPL_sorries___spec__2___rarg___closed__1; +LEAN_EXPORT lean_object* l_repl(lean_object*); +lean_object* lean_string_append(lean_object*, lean_object*); +static lean_object* l_panic___at_REPL_unpickleProofSnapshot___spec__5___closed__2; +lean_object* lean_array_get_size(lean_object*); +LEAN_EXPORT lean_object* l_REPL_pickleCommandSnapshot___at_repl_loop___spec__1___boxed(lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_REPL_tactics___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t lean_usize_dec_lt(size_t, size_t); +lean_object* l_Lean_Elab_InfoTree_filter(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Json_parse(lean_object*); +LEAN_EXPORT lean_object* l_getLines(lean_object*); +uint8_t l_Lean_Exception_isRuntime(lean_object*); +LEAN_EXPORT lean_object* l_REPL_pickleProofSnapshot___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Json_pretty(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_REPL_unpickleProofSnapshot___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_tactics___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_REPL_ppTactic___boxed(lean_object*, lean_object*, lean_object*); +static lean_object* l_REPL_runProofStep___closed__1; +lean_object* lean_array_uset(lean_object*, size_t, lean_object*); +lean_object* l_Lean_Elab_ContextInfo_runMetaM___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_tactics___spec__2___rarg___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_repl_loop___lambda__1___closed__2; +static lean_object* l_REPL_unpickleProofSnapshot___closed__1; +static lean_object* l_REPL_runCommand___lambda__1___closed__4; +LEAN_EXPORT lean_object* l_REPL_recordProofSnapshot(lean_object*); +LEAN_EXPORT lean_object* l_REPL_State_cmdStates___default; +static lean_object* l_List_mapTR_loop___at_REPL_runCommand___spec__4___closed__1; +lean_object* l_List_toArrayAux___rarg(lean_object*, lean_object*); +static lean_object* l_parse___closed__1; +static lean_object* l_REPL_ppTactic___closed__7; +LEAN_EXPORT lean_object* l_REPL_runCommand___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* _init_l_REPL_State_cmdStates___default___closed__1() { +_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_REPL_State_cmdStates___default() { +_start: +{ +lean_object* x_1; +x_1 = l_REPL_State_cmdStates___default___closed__1; +return x_1; +} +} +static lean_object* _init_l_REPL_State_proofStates___default() { +_start: +{ +lean_object* x_1; +x_1 = l_REPL_State_cmdStates___default___closed__1; +return x_1; +} +} +LEAN_EXPORT lean_object* l_REPL_recordCommandSnapshot___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +uint8_t x_4; +x_4 = !lean_is_exclusive(x_3); +if (x_4 == 0) +{ +lean_object* x_5; lean_object* x_6; +x_5 = lean_ctor_get(x_3, 0); +lean_dec(x_5); +lean_ctor_set(x_3, 0, x_1); +x_6 = lean_apply_2(x_2, lean_box(0), x_3); +return x_6; +} +else +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; +x_7 = lean_ctor_get(x_3, 1); +lean_inc(x_7); +lean_dec(x_3); +x_8 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_8, 0, x_1); +lean_ctor_set(x_8, 1, x_7); +x_9 = lean_apply_2(x_2, lean_box(0), x_8); +return x_9; +} +} +} +LEAN_EXPORT lean_object* l_REPL_recordCommandSnapshot___rarg___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +uint8_t x_5; +x_5 = !lean_is_exclusive(x_4); +if (x_5 == 0) +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; +x_6 = lean_ctor_get(x_4, 0); +x_7 = lean_ctor_get(x_4, 1); +x_8 = lean_ctor_get(x_6, 0); +lean_inc(x_8); +lean_dec(x_6); +x_9 = lean_array_get_size(x_8); +lean_dec(x_8); +x_10 = !lean_is_exclusive(x_7); +if (x_10 == 0) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_11 = lean_ctor_get(x_7, 0); +x_12 = lean_array_push(x_11, x_1); +lean_ctor_set(x_7, 0, x_12); +x_13 = lean_box(0); +lean_ctor_set(x_4, 0, x_13); +lean_inc(x_2); +x_14 = lean_apply_2(x_2, lean_box(0), x_4); +x_15 = lean_alloc_closure((void*)(l_REPL_recordCommandSnapshot___rarg___lambda__1), 3, 2); +lean_closure_set(x_15, 0, x_9); +lean_closure_set(x_15, 1, x_2); +x_16 = lean_apply_4(x_3, lean_box(0), lean_box(0), x_14, x_15); +return x_16; +} +else +{ +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; +x_17 = lean_ctor_get(x_7, 0); +x_18 = lean_ctor_get(x_7, 1); +lean_inc(x_18); +lean_inc(x_17); +lean_dec(x_7); +x_19 = lean_array_push(x_17, x_1); +x_20 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_20, 0, x_19); +lean_ctor_set(x_20, 1, x_18); +x_21 = lean_box(0); +lean_ctor_set(x_4, 1, x_20); +lean_ctor_set(x_4, 0, x_21); +lean_inc(x_2); +x_22 = lean_apply_2(x_2, lean_box(0), x_4); +x_23 = lean_alloc_closure((void*)(l_REPL_recordCommandSnapshot___rarg___lambda__1), 3, 2); +lean_closure_set(x_23, 0, x_9); +lean_closure_set(x_23, 1, x_2); +x_24 = lean_apply_4(x_3, lean_box(0), lean_box(0), x_22, x_23); +return x_24; +} +} +else +{ +lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; 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; lean_object* x_37; lean_object* x_38; +x_25 = lean_ctor_get(x_4, 0); +x_26 = lean_ctor_get(x_4, 1); +lean_inc(x_26); +lean_inc(x_25); +lean_dec(x_4); +x_27 = lean_ctor_get(x_25, 0); +lean_inc(x_27); +lean_dec(x_25); +x_28 = lean_array_get_size(x_27); +lean_dec(x_27); +x_29 = lean_ctor_get(x_26, 0); +lean_inc(x_29); +x_30 = lean_ctor_get(x_26, 1); +lean_inc(x_30); +if (lean_is_exclusive(x_26)) { + lean_ctor_release(x_26, 0); + lean_ctor_release(x_26, 1); + x_31 = x_26; +} else { + lean_dec_ref(x_26); + x_31 = lean_box(0); +} +x_32 = lean_array_push(x_29, x_1); +if (lean_is_scalar(x_31)) { + x_33 = lean_alloc_ctor(0, 2, 0); +} else { + x_33 = x_31; +} +lean_ctor_set(x_33, 0, x_32); +lean_ctor_set(x_33, 1, x_30); +x_34 = lean_box(0); +x_35 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_35, 0, x_34); +lean_ctor_set(x_35, 1, x_33); +lean_inc(x_2); +x_36 = lean_apply_2(x_2, lean_box(0), x_35); +x_37 = lean_alloc_closure((void*)(l_REPL_recordCommandSnapshot___rarg___lambda__1), 3, 2); +lean_closure_set(x_37, 0, x_28); +lean_closure_set(x_37, 1, x_2); +x_38 = lean_apply_4(x_3, lean_box(0), lean_box(0), x_36, x_37); +return x_38; +} +} +} +LEAN_EXPORT lean_object* l_REPL_recordCommandSnapshot___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +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; +x_4 = lean_ctor_get(x_1, 1); +lean_inc(x_4); +x_5 = lean_ctor_get(x_1, 0); +lean_inc(x_5); +lean_dec(x_1); +x_6 = lean_ctor_get(x_5, 1); +lean_inc(x_6); +lean_dec(x_5); +lean_inc(x_3); +x_7 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_7, 0, x_3); +lean_ctor_set(x_7, 1, x_3); +lean_inc(x_6); +x_8 = lean_apply_2(x_6, lean_box(0), x_7); +lean_inc(x_4); +x_9 = lean_alloc_closure((void*)(l_REPL_recordCommandSnapshot___rarg___lambda__2), 4, 3); +lean_closure_set(x_9, 0, x_2); +lean_closure_set(x_9, 1, x_6); +lean_closure_set(x_9, 2, x_4); +x_10 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_8, x_9); +return x_10; +} +} +LEAN_EXPORT lean_object* l_REPL_recordCommandSnapshot(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_REPL_recordCommandSnapshot___rarg), 3, 0); +return x_2; +} +} +LEAN_EXPORT lean_object* l_REPL_recordProofSnapshot___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +uint8_t x_5; +x_5 = !lean_is_exclusive(x_4); +if (x_5 == 0) +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; +x_6 = lean_ctor_get(x_4, 0); +x_7 = lean_ctor_get(x_4, 1); +x_8 = lean_ctor_get(x_6, 1); +lean_inc(x_8); +lean_dec(x_6); +x_9 = lean_array_get_size(x_8); +lean_dec(x_8); +x_10 = !lean_is_exclusive(x_7); +if (x_10 == 0) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_11 = lean_ctor_get(x_7, 1); +x_12 = lean_array_push(x_11, x_1); +lean_ctor_set(x_7, 1, x_12); +x_13 = lean_box(0); +lean_ctor_set(x_4, 0, x_13); +lean_inc(x_2); +x_14 = lean_apply_2(x_2, lean_box(0), x_4); +x_15 = lean_alloc_closure((void*)(l_REPL_recordCommandSnapshot___rarg___lambda__1), 3, 2); +lean_closure_set(x_15, 0, x_9); +lean_closure_set(x_15, 1, x_2); +x_16 = lean_apply_4(x_3, lean_box(0), lean_box(0), x_14, x_15); +return x_16; +} +else +{ +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; +x_17 = lean_ctor_get(x_7, 0); +x_18 = lean_ctor_get(x_7, 1); +lean_inc(x_18); +lean_inc(x_17); +lean_dec(x_7); +x_19 = lean_array_push(x_18, x_1); +x_20 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_20, 0, x_17); +lean_ctor_set(x_20, 1, x_19); +x_21 = lean_box(0); +lean_ctor_set(x_4, 1, x_20); +lean_ctor_set(x_4, 0, x_21); +lean_inc(x_2); +x_22 = lean_apply_2(x_2, lean_box(0), x_4); +x_23 = lean_alloc_closure((void*)(l_REPL_recordCommandSnapshot___rarg___lambda__1), 3, 2); +lean_closure_set(x_23, 0, x_9); +lean_closure_set(x_23, 1, x_2); +x_24 = lean_apply_4(x_3, lean_box(0), lean_box(0), x_22, x_23); +return x_24; +} +} +else +{ +lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; 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; lean_object* x_37; lean_object* x_38; +x_25 = lean_ctor_get(x_4, 0); +x_26 = lean_ctor_get(x_4, 1); +lean_inc(x_26); +lean_inc(x_25); +lean_dec(x_4); +x_27 = lean_ctor_get(x_25, 1); +lean_inc(x_27); +lean_dec(x_25); +x_28 = lean_array_get_size(x_27); +lean_dec(x_27); +x_29 = lean_ctor_get(x_26, 0); +lean_inc(x_29); +x_30 = lean_ctor_get(x_26, 1); +lean_inc(x_30); +if (lean_is_exclusive(x_26)) { + lean_ctor_release(x_26, 0); + lean_ctor_release(x_26, 1); + x_31 = x_26; +} else { + lean_dec_ref(x_26); + x_31 = lean_box(0); +} +x_32 = lean_array_push(x_30, x_1); +if (lean_is_scalar(x_31)) { + x_33 = lean_alloc_ctor(0, 2, 0); +} else { + x_33 = x_31; +} +lean_ctor_set(x_33, 0, x_29); +lean_ctor_set(x_33, 1, x_32); +x_34 = lean_box(0); +x_35 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_35, 0, x_34); +lean_ctor_set(x_35, 1, x_33); +lean_inc(x_2); +x_36 = lean_apply_2(x_2, lean_box(0), x_35); +x_37 = lean_alloc_closure((void*)(l_REPL_recordCommandSnapshot___rarg___lambda__1), 3, 2); +lean_closure_set(x_37, 0, x_28); +lean_closure_set(x_37, 1, x_2); +x_38 = lean_apply_4(x_3, lean_box(0), lean_box(0), x_36, x_37); +return x_38; +} +} +} +LEAN_EXPORT lean_object* l_REPL_recordProofSnapshot___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +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; +x_4 = lean_ctor_get(x_1, 1); +lean_inc(x_4); +x_5 = lean_ctor_get(x_1, 0); +lean_inc(x_5); +lean_dec(x_1); +x_6 = lean_ctor_get(x_5, 1); +lean_inc(x_6); +lean_dec(x_5); +lean_inc(x_3); +x_7 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_7, 0, x_3); +lean_ctor_set(x_7, 1, x_3); +lean_inc(x_6); +x_8 = lean_apply_2(x_6, lean_box(0), x_7); +lean_inc(x_4); +x_9 = lean_alloc_closure((void*)(l_REPL_recordProofSnapshot___rarg___lambda__1), 4, 3); +lean_closure_set(x_9, 0, x_2); +lean_closure_set(x_9, 1, x_6); +lean_closure_set(x_9, 2, x_4); +x_10 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_8, x_9); +return x_10; +} +} +LEAN_EXPORT lean_object* l_REPL_recordProofSnapshot(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_REPL_recordProofSnapshot___rarg), 3, 0); +return x_2; +} +} +static lean_object* _init_l_List_mapTR_loop___at_REPL_sorries___spec__1___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("", 0); +return x_1; +} +} +LEAN_EXPORT lean_object* l_List_mapTR_loop___at_REPL_sorries___spec__1(lean_object* x_1, lean_object* x_2) { +_start: +{ +if (lean_obj_tag(x_1) == 0) +{ +lean_object* x_3; +x_3 = l_List_reverse___rarg(x_2); +return x_3; +} +else +{ +uint8_t x_4; +x_4 = !lean_is_exclusive(x_1); +if (x_4 == 0) +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_5 = lean_ctor_get(x_1, 0); +x_6 = lean_ctor_get(x_1, 1); +x_7 = l_Std_Format_defWidth; +x_8 = lean_unsigned_to_nat(0u); +x_9 = lean_format_pretty(x_5, x_7, x_8, x_8); +x_10 = l_List_mapTR_loop___at_REPL_sorries___spec__1___closed__1; +x_11 = lean_string_append(x_10, x_9); +lean_dec(x_9); +x_12 = lean_string_append(x_11, x_10); +lean_ctor_set(x_1, 1, x_2); +lean_ctor_set(x_1, 0, x_12); +{ +lean_object* _tmp_0 = x_6; +lean_object* _tmp_1 = x_1; +x_1 = _tmp_0; +x_2 = _tmp_1; +} +goto _start; +} +else +{ +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; lean_object* x_22; +x_14 = lean_ctor_get(x_1, 0); +x_15 = lean_ctor_get(x_1, 1); +lean_inc(x_15); +lean_inc(x_14); +lean_dec(x_1); +x_16 = l_Std_Format_defWidth; +x_17 = lean_unsigned_to_nat(0u); +x_18 = lean_format_pretty(x_14, x_16, x_17, x_17); +x_19 = l_List_mapTR_loop___at_REPL_sorries___spec__1___closed__1; +x_20 = lean_string_append(x_19, x_18); +lean_dec(x_18); +x_21 = lean_string_append(x_20, x_19); +x_22 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_22, 0, x_21); +lean_ctor_set(x_22, 1, x_2); +x_1 = x_15; +x_2 = x_22; +goto _start; +} +} +} +} +static lean_object* _init_l_panic___at_REPL_sorries___spec__2___rarg___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_String_instInhabitedString; +x_3 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); +return x_3; +} +} +LEAN_EXPORT lean_object* l_panic___at_REPL_sorries___spec__2___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; +x_4 = l_StateT_instMonadStateT___rarg(x_1); +x_5 = l_panic___at_REPL_sorries___spec__2___rarg___closed__1; +x_6 = l_instInhabited___rarg(x_4, x_5); +x_7 = lean_panic_fn(x_6, x_2); +x_8 = lean_apply_1(x_7, x_3); +return x_8; +} +} +LEAN_EXPORT lean_object* l_panic___at_REPL_sorries___spec__2(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_panic___at_REPL_sorries___spec__2___rarg), 3, 0); +return x_2; +} +} +LEAN_EXPORT lean_object* l_List_mapTR_loop___at_REPL_sorries___spec__3(lean_object* x_1, lean_object* x_2) { +_start: +{ +if (lean_obj_tag(x_1) == 0) +{ +lean_object* x_3; +x_3 = l_List_reverse___rarg(x_2); +return x_3; +} +else +{ +uint8_t x_4; +x_4 = !lean_is_exclusive(x_1); +if (x_4 == 0) +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; +x_5 = lean_ctor_get(x_1, 0); +x_6 = lean_ctor_get(x_1, 1); +x_7 = l_Lean_Elab_InfoTree_sorries(x_5); +lean_ctor_set(x_1, 1, x_2); +lean_ctor_set(x_1, 0, x_7); +{ +lean_object* _tmp_0 = x_6; +lean_object* _tmp_1 = x_1; +x_1 = _tmp_0; +x_2 = _tmp_1; +} +goto _start; +} +else +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_9 = lean_ctor_get(x_1, 0); +x_10 = lean_ctor_get(x_1, 1); +lean_inc(x_10); +lean_inc(x_9); +lean_dec(x_1); +x_11 = l_Lean_Elab_InfoTree_sorries(x_9); +x_12 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_12, 0, x_11); +lean_ctor_set(x_12, 1, x_2); +x_1 = x_10; +x_2 = x_12; +goto _start; +} +} +} +} +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___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) { +_start: +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_7 = lean_ctor_get(x_6, 0); +lean_inc(x_7); +x_8 = lean_ctor_get(x_6, 1); +lean_inc(x_8); +lean_dec(x_6); +x_9 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_9, 0, x_7); +lean_ctor_set(x_9, 1, x_1); +x_10 = l_List_mapM_loop___at_REPL_sorries___spec__4___rarg(x_2, x_3, x_4, x_5, x_9, x_8); +return x_10; +} +} +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__2(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; +x_6 = !lean_is_exclusive(x_5); +if (x_6 == 0) +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; +x_7 = lean_ctor_get(x_5, 0); +x_8 = l_REPL_Sorry_of(x_1, x_2, x_3, x_7); +lean_ctor_set(x_5, 0, x_8); +x_9 = lean_apply_2(x_4, lean_box(0), x_5); +return x_9; +} +else +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; +x_10 = lean_ctor_get(x_5, 0); +x_11 = lean_ctor_get(x_5, 1); +lean_inc(x_11); +lean_inc(x_10); +lean_dec(x_5); +x_12 = l_REPL_Sorry_of(x_1, x_2, x_3, x_10); +x_13 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_13, 0, x_12); +lean_ctor_set(x_13, 1, x_11); +x_14 = lean_apply_2(x_4, lean_box(0), x_13); +return x_14; +} +} +} +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__3(lean_object* x_1, lean_object* x_2) { +_start: +{ +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; lean_object* x_8; +x_4 = lean_ctor_get(x_2, 0); +x_5 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_5, 0, x_4); +x_6 = lean_ctor_get(x_1, 0); +lean_inc(x_6); +lean_dec(x_1); +x_7 = lean_ctor_get(x_6, 1); +lean_inc(x_7); +lean_dec(x_6); +lean_ctor_set(x_2, 0, x_5); +x_8 = lean_apply_2(x_7, lean_box(0), x_2); +return x_8; +} +else +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; +x_9 = lean_ctor_get(x_2, 0); +x_10 = lean_ctor_get(x_2, 1); +lean_inc(x_10); +lean_inc(x_9); +lean_dec(x_2); +x_11 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_11, 0, x_9); +x_12 = lean_ctor_get(x_1, 0); +lean_inc(x_12); +lean_dec(x_1); +x_13 = lean_ctor_get(x_12, 1); +lean_inc(x_13); +lean_dec(x_12); +x_14 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_14, 0, x_11); +lean_ctor_set(x_14, 1, x_10); +x_15 = lean_apply_2(x_13, lean_box(0), x_14); +return x_15; +} +} +} +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__4(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; +x_6 = !lean_is_exclusive(x_5); +if (x_6 == 0) +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_7 = lean_ctor_get(x_5, 0); +x_8 = l_REPL_Sorry_of(x_1, x_2, x_3, x_7); +x_9 = lean_ctor_get(x_4, 0); +lean_inc(x_9); +lean_dec(x_4); +x_10 = lean_ctor_get(x_9, 1); +lean_inc(x_10); +lean_dec(x_9); +lean_ctor_set(x_5, 0, x_8); +x_11 = lean_apply_2(x_10, lean_box(0), x_5); +return x_11; +} +else +{ +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; +x_12 = lean_ctor_get(x_5, 0); +x_13 = lean_ctor_get(x_5, 1); +lean_inc(x_13); +lean_inc(x_12); +lean_dec(x_5); +x_14 = l_REPL_Sorry_of(x_1, x_2, x_3, x_12); +x_15 = lean_ctor_get(x_4, 0); +lean_inc(x_15); +lean_dec(x_4); +x_16 = lean_ctor_get(x_15, 1); +lean_inc(x_16); +lean_dec(x_15); +x_17 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_17, 0, x_14); +lean_ctor_set(x_17, 1, x_13); +x_18 = lean_apply_2(x_16, lean_box(0), x_17); +return x_18; +} +} +} +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__5(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 = lean_ctor_get(x_5, 1); +lean_inc(x_7); +if (lean_obj_tag(x_7) == 0) +{ +uint8_t x_8; +x_8 = !lean_is_exclusive(x_5); +if (x_8 == 0) +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_9 = lean_ctor_get(x_5, 0); +x_10 = lean_ctor_get(x_5, 1); +lean_dec(x_10); +x_11 = lean_box(0); +x_12 = lean_ctor_get(x_1, 0); +lean_inc(x_12); +lean_dec(x_1); +x_13 = lean_ctor_get(x_12, 1); +lean_inc(x_13); +lean_dec(x_12); +lean_ctor_set(x_5, 1, x_6); +lean_ctor_set(x_5, 0, x_11); +lean_inc(x_13); +x_14 = lean_apply_2(x_13, lean_box(0), x_5); +x_15 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__2___boxed), 5, 4); +lean_closure_set(x_15, 0, x_9); +lean_closure_set(x_15, 1, x_2); +lean_closure_set(x_15, 2, x_3); +lean_closure_set(x_15, 3, x_13); +x_16 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_14, x_15); +return x_16; +} +else +{ +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; +x_17 = lean_ctor_get(x_5, 0); +lean_inc(x_17); +lean_dec(x_5); +x_18 = lean_box(0); +x_19 = lean_ctor_get(x_1, 0); +lean_inc(x_19); +lean_dec(x_1); +x_20 = lean_ctor_get(x_19, 1); +lean_inc(x_20); +lean_dec(x_19); +x_21 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_21, 0, x_18); +lean_ctor_set(x_21, 1, x_6); +lean_inc(x_20); +x_22 = lean_apply_2(x_20, lean_box(0), x_21); +x_23 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__2___boxed), 5, 4); +lean_closure_set(x_23, 0, x_17); +lean_closure_set(x_23, 1, x_2); +lean_closure_set(x_23, 2, x_3); +lean_closure_set(x_23, 3, x_20); +x_24 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_22, x_23); +return x_24; +} +} +else +{ +lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_25 = lean_ctor_get(x_5, 0); +lean_inc(x_25); +lean_dec(x_5); +x_26 = lean_ctor_get(x_7, 0); +lean_inc(x_26); +lean_dec(x_7); +lean_inc(x_1); +x_27 = l_REPL_recordProofSnapshot___rarg(x_1, x_26, x_6); +lean_inc(x_1); +x_28 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__3), 2, 1); +lean_closure_set(x_28, 0, x_1); +lean_inc(x_4); +x_29 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_27, x_28); +x_30 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__4___boxed), 5, 4); +lean_closure_set(x_30, 0, x_25); +lean_closure_set(x_30, 1, x_2); +lean_closure_set(x_30, 2, x_3); +lean_closure_set(x_30, 3, x_1); +x_31 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_29, x_30); +return x_31; +} +} +} +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__6(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; +x_4 = lean_ctor_get(x_1, 0); +lean_inc(x_4); +lean_dec(x_1); +x_5 = lean_ctor_get(x_4, 1); +lean_inc(x_5); +lean_dec(x_4); +x_6 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_6, 0, x_3); +lean_ctor_set(x_6, 1, x_2); +x_7 = lean_apply_2(x_5, lean_box(0), x_6); +return x_7; +} +} +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__7(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; +x_3 = lean_ctor_get(x_2, 0); +lean_inc(x_3); +x_4 = lean_ctor_get(x_2, 1); +lean_inc(x_4); +lean_dec(x_2); +x_5 = lean_apply_2(x_1, x_3, x_4); +return x_5; +} +} +static lean_object* _init_l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__8___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("\n", 1); +return x_1; +} +} +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__8(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: +{ +uint8_t x_7; +x_7 = !lean_is_exclusive(x_6); +if (x_7 == 0) +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; 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; +x_8 = lean_ctor_get(x_6, 0); +x_9 = lean_ctor_get(x_6, 1); +x_10 = l_List_mapTR_loop___at_REPL_sorries___spec__1(x_8, x_1); +x_11 = l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__8___closed__1; +x_12 = l_String_intercalate(x_11, x_10); +x_13 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_13, 0, x_2); +lean_ctor_set(x_6, 1, x_13); +lean_ctor_set(x_6, 0, x_12); +x_14 = lean_ctor_get(x_3, 0); +lean_inc(x_14); +lean_dec(x_3); +x_15 = lean_ctor_get(x_14, 1); +lean_inc(x_15); +lean_dec(x_14); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_6); +lean_ctor_set(x_16, 1, x_9); +x_17 = lean_apply_2(x_15, lean_box(0), x_16); +x_18 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__7), 2, 1); +lean_closure_set(x_18, 0, x_4); +x_19 = lean_apply_4(x_5, lean_box(0), lean_box(0), x_17, x_18); +return x_19; +} +else +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; +x_20 = lean_ctor_get(x_6, 0); +x_21 = lean_ctor_get(x_6, 1); +lean_inc(x_21); +lean_inc(x_20); +lean_dec(x_6); +x_22 = l_List_mapTR_loop___at_REPL_sorries___spec__1(x_20, x_1); +x_23 = l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__8___closed__1; +x_24 = l_String_intercalate(x_23, x_22); +x_25 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_25, 0, x_2); +x_26 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_26, 0, x_24); +lean_ctor_set(x_26, 1, x_25); +x_27 = lean_ctor_get(x_3, 0); +lean_inc(x_27); +lean_dec(x_3); +x_28 = lean_ctor_get(x_27, 1); +lean_inc(x_28); +lean_dec(x_27); +x_29 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_29, 0, x_26); +lean_ctor_set(x_29, 1, x_21); +x_30 = lean_apply_2(x_28, lean_box(0), x_29); +x_31 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__7), 2, 1); +lean_closure_set(x_31, 0, x_4); +x_32 = lean_apply_4(x_5, lean_box(0), lean_box(0), x_30, x_31); +return x_32; +} +} +} +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__9(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; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; +x_7 = lean_ctor_get(x_6, 0); +lean_inc(x_7); +x_8 = lean_ctor_get(x_6, 1); +lean_inc(x_8); +lean_dec(x_6); +lean_inc(x_7); +x_9 = lean_alloc_closure((void*)(l_REPL_ProofSnapshot_ppGoals), 2, 1); +lean_closure_set(x_9, 0, x_7); +x_10 = lean_apply_2(x_1, lean_box(0), x_9); +lean_inc(x_2); +x_11 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__6), 3, 2); +lean_closure_set(x_11, 0, x_2); +lean_closure_set(x_11, 1, x_8); +lean_inc(x_3); +x_12 = lean_apply_4(x_3, lean_box(0), lean_box(0), x_10, x_11); +lean_inc(x_3); +x_13 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__8), 6, 5); +lean_closure_set(x_13, 0, x_4); +lean_closure_set(x_13, 1, x_7); +lean_closure_set(x_13, 2, x_2); +lean_closure_set(x_13, 3, x_5); +lean_closure_set(x_13, 4, x_3); +x_14 = lean_apply_4(x_3, lean_box(0), lean_box(0), x_12, x_13); +return x_14; +} +} +static lean_object* _init_l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("REPL.Main", 9); +return x_1; +} +} +static lean_object* _init_l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___closed__2() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("REPL.sorries", 12); +return x_1; +} +} +static lean_object* _init_l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("unreachable code has been reached", 33); +return x_1; +} +} +static lean_object* _init_l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_1 = l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___closed__1; +x_2 = l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___closed__2; +x_3 = lean_unsigned_to_nat(107u); +x_4 = lean_unsigned_to_nat(24u); +x_5 = l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___closed__3; +x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); +return x_6; +} +} +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_sorries___spec__4___rarg(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: +{ +if (lean_obj_tag(x_4) == 0) +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; +lean_dec(x_3); +lean_dec(x_2); +x_7 = l_List_reverse___rarg(x_5); +x_8 = lean_ctor_get(x_1, 0); +lean_inc(x_8); +lean_dec(x_1); +x_9 = lean_ctor_get(x_8, 1); +lean_inc(x_9); +lean_dec(x_8); +x_10 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_10, 0, x_7); +lean_ctor_set(x_10, 1, x_6); +x_11 = lean_apply_2(x_9, lean_box(0), x_10); +return x_11; +} +else +{ +uint8_t x_12; +x_12 = !lean_is_exclusive(x_4); +if (x_12 == 0) +{ +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; lean_object* x_22; lean_object* x_23; +x_13 = lean_ctor_get(x_4, 0); +x_14 = lean_ctor_get(x_4, 1); +x_15 = lean_ctor_get(x_1, 1); +lean_inc(x_15); +lean_inc(x_3); +lean_inc(x_2); +lean_inc(x_1); +x_16 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__1), 6, 5); +lean_closure_set(x_16, 0, x_5); +lean_closure_set(x_16, 1, x_1); +lean_closure_set(x_16, 2, x_2); +lean_closure_set(x_16, 3, x_3); +lean_closure_set(x_16, 4, x_14); +x_17 = lean_ctor_get(x_13, 1); +lean_inc(x_17); +x_18 = lean_ctor_get(x_17, 1); +lean_inc(x_18); +x_19 = lean_ctor_get(x_13, 0); +lean_inc(x_19); +lean_dec(x_13); +x_20 = lean_ctor_get(x_17, 0); +lean_inc(x_20); +lean_dec(x_17); +x_21 = lean_ctor_get(x_18, 0); +lean_inc(x_21); +x_22 = lean_ctor_get(x_18, 1); +lean_inc(x_22); +lean_dec(x_18); +lean_inc(x_15); +lean_inc(x_1); +x_23 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__5), 6, 4); +lean_closure_set(x_23, 0, x_1); +lean_closure_set(x_23, 1, x_21); +lean_closure_set(x_23, 2, x_22); +lean_closure_set(x_23, 3, x_15); +if (lean_obj_tag(x_20) == 0) +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_24 = lean_ctor_get(x_20, 0); +lean_inc(x_24); +lean_dec(x_20); +x_25 = lean_box(0); +x_26 = lean_box(0); +lean_ctor_set(x_4, 1, x_26); +lean_ctor_set(x_4, 0, x_24); +x_27 = lean_alloc_closure((void*)(l_REPL_ProofSnapshot_create___boxed), 6, 5); +lean_closure_set(x_27, 0, x_19); +lean_closure_set(x_27, 1, x_25); +lean_closure_set(x_27, 2, x_3); +lean_closure_set(x_27, 3, x_4); +lean_closure_set(x_27, 4, x_26); +lean_inc(x_2); +x_28 = lean_apply_2(x_2, lean_box(0), x_27); +lean_inc(x_1); +x_29 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__6), 3, 2); +lean_closure_set(x_29, 0, x_1); +lean_closure_set(x_29, 1, x_6); +lean_inc(x_15); +x_30 = lean_apply_4(x_15, lean_box(0), lean_box(0), x_28, x_29); +lean_inc(x_15); +x_31 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__9), 6, 5); +lean_closure_set(x_31, 0, x_2); +lean_closure_set(x_31, 1, x_1); +lean_closure_set(x_31, 2, x_15); +lean_closure_set(x_31, 3, x_26); +lean_closure_set(x_31, 4, x_23); +lean_inc(x_15); +x_32 = lean_apply_4(x_15, lean_box(0), lean_box(0), x_30, x_31); +x_33 = lean_apply_4(x_15, lean_box(0), lean_box(0), x_32, x_16); +return x_33; +} +else +{ +lean_object* x_34; +x_34 = lean_ctor_get(x_20, 1); +lean_inc(x_34); +if (lean_obj_tag(x_34) == 0) +{ +lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; +lean_dec(x_20); +lean_dec(x_19); +lean_free_object(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_35 = l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___closed__4; +x_36 = l_panic___at_REPL_sorries___spec__2___rarg(x_1, x_35, x_6); +x_37 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__7), 2, 1); +lean_closure_set(x_37, 0, x_23); +lean_inc(x_15); +x_38 = lean_apply_4(x_15, lean_box(0), lean_box(0), x_36, x_37); +x_39 = lean_apply_4(x_15, lean_box(0), lean_box(0), x_38, x_16); +return x_39; +} +else +{ +lean_object* x_40; uint8_t x_41; +x_40 = lean_ctor_get(x_20, 0); +lean_inc(x_40); +lean_dec(x_20); +x_41 = !lean_is_exclusive(x_34); +if (x_41 == 0) +{ +lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; +x_42 = lean_ctor_get(x_34, 0); +lean_ctor_set(x_34, 0, x_40); +x_43 = lean_box(0); +lean_ctor_set(x_4, 1, x_43); +lean_ctor_set(x_4, 0, x_42); +x_44 = lean_alloc_closure((void*)(l_REPL_ProofSnapshot_create___boxed), 6, 5); +lean_closure_set(x_44, 0, x_19); +lean_closure_set(x_44, 1, x_34); +lean_closure_set(x_44, 2, x_3); +lean_closure_set(x_44, 3, x_43); +lean_closure_set(x_44, 4, x_4); +lean_inc(x_2); +x_45 = lean_apply_2(x_2, lean_box(0), x_44); +lean_inc(x_1); +x_46 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__6), 3, 2); +lean_closure_set(x_46, 0, x_1); +lean_closure_set(x_46, 1, x_6); +lean_inc(x_15); +x_47 = lean_apply_4(x_15, lean_box(0), lean_box(0), x_45, x_46); +lean_inc(x_15); +x_48 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__9), 6, 5); +lean_closure_set(x_48, 0, x_2); +lean_closure_set(x_48, 1, x_1); +lean_closure_set(x_48, 2, x_15); +lean_closure_set(x_48, 3, x_43); +lean_closure_set(x_48, 4, x_23); +lean_inc(x_15); +x_49 = lean_apply_4(x_15, lean_box(0), lean_box(0), x_47, x_48); +x_50 = lean_apply_4(x_15, lean_box(0), lean_box(0), x_49, x_16); +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; lean_object* x_59; lean_object* x_60; +x_51 = lean_ctor_get(x_34, 0); +lean_inc(x_51); +lean_dec(x_34); +x_52 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_52, 0, x_40); +x_53 = lean_box(0); +lean_ctor_set(x_4, 1, x_53); +lean_ctor_set(x_4, 0, x_51); +x_54 = lean_alloc_closure((void*)(l_REPL_ProofSnapshot_create___boxed), 6, 5); +lean_closure_set(x_54, 0, x_19); +lean_closure_set(x_54, 1, x_52); +lean_closure_set(x_54, 2, x_3); +lean_closure_set(x_54, 3, x_53); +lean_closure_set(x_54, 4, x_4); +lean_inc(x_2); +x_55 = lean_apply_2(x_2, lean_box(0), x_54); +lean_inc(x_1); +x_56 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__6), 3, 2); +lean_closure_set(x_56, 0, x_1); +lean_closure_set(x_56, 1, x_6); +lean_inc(x_15); +x_57 = lean_apply_4(x_15, lean_box(0), lean_box(0), x_55, x_56); +lean_inc(x_15); +x_58 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__9), 6, 5); +lean_closure_set(x_58, 0, x_2); +lean_closure_set(x_58, 1, x_1); +lean_closure_set(x_58, 2, x_15); +lean_closure_set(x_58, 3, x_53); +lean_closure_set(x_58, 4, x_23); +lean_inc(x_15); +x_59 = lean_apply_4(x_15, lean_box(0), lean_box(0), x_57, x_58); +x_60 = lean_apply_4(x_15, lean_box(0), lean_box(0), x_59, x_16); +return x_60; +} +} +} +} +else +{ +lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; +x_61 = lean_ctor_get(x_4, 0); +x_62 = lean_ctor_get(x_4, 1); +lean_inc(x_62); +lean_inc(x_61); +lean_dec(x_4); +x_63 = lean_ctor_get(x_1, 1); +lean_inc(x_63); +lean_inc(x_3); +lean_inc(x_2); +lean_inc(x_1); +x_64 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__1), 6, 5); +lean_closure_set(x_64, 0, x_5); +lean_closure_set(x_64, 1, x_1); +lean_closure_set(x_64, 2, x_2); +lean_closure_set(x_64, 3, x_3); +lean_closure_set(x_64, 4, x_62); +x_65 = lean_ctor_get(x_61, 1); +lean_inc(x_65); +x_66 = lean_ctor_get(x_65, 1); +lean_inc(x_66); +x_67 = lean_ctor_get(x_61, 0); +lean_inc(x_67); +lean_dec(x_61); +x_68 = lean_ctor_get(x_65, 0); +lean_inc(x_68); +lean_dec(x_65); +x_69 = lean_ctor_get(x_66, 0); +lean_inc(x_69); +x_70 = lean_ctor_get(x_66, 1); +lean_inc(x_70); +lean_dec(x_66); +lean_inc(x_63); +lean_inc(x_1); +x_71 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__5), 6, 4); +lean_closure_set(x_71, 0, x_1); +lean_closure_set(x_71, 1, x_69); +lean_closure_set(x_71, 2, x_70); +lean_closure_set(x_71, 3, x_63); +if (lean_obj_tag(x_68) == 0) +{ +lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; +x_72 = lean_ctor_get(x_68, 0); +lean_inc(x_72); +lean_dec(x_68); +x_73 = lean_box(0); +x_74 = lean_box(0); +x_75 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_75, 0, x_72); +lean_ctor_set(x_75, 1, x_74); +x_76 = lean_alloc_closure((void*)(l_REPL_ProofSnapshot_create___boxed), 6, 5); +lean_closure_set(x_76, 0, x_67); +lean_closure_set(x_76, 1, x_73); +lean_closure_set(x_76, 2, x_3); +lean_closure_set(x_76, 3, x_75); +lean_closure_set(x_76, 4, x_74); +lean_inc(x_2); +x_77 = lean_apply_2(x_2, lean_box(0), x_76); +lean_inc(x_1); +x_78 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__6), 3, 2); +lean_closure_set(x_78, 0, x_1); +lean_closure_set(x_78, 1, x_6); +lean_inc(x_63); +x_79 = lean_apply_4(x_63, lean_box(0), lean_box(0), x_77, x_78); +lean_inc(x_63); +x_80 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__9), 6, 5); +lean_closure_set(x_80, 0, x_2); +lean_closure_set(x_80, 1, x_1); +lean_closure_set(x_80, 2, x_63); +lean_closure_set(x_80, 3, x_74); +lean_closure_set(x_80, 4, x_71); +lean_inc(x_63); +x_81 = lean_apply_4(x_63, lean_box(0), lean_box(0), x_79, x_80); +x_82 = lean_apply_4(x_63, lean_box(0), lean_box(0), x_81, x_64); +return x_82; +} +else +{ +lean_object* x_83; +x_83 = lean_ctor_get(x_68, 1); +lean_inc(x_83); +if (lean_obj_tag(x_83) == 0) +{ +lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; +lean_dec(x_68); +lean_dec(x_67); +lean_dec(x_3); +lean_dec(x_2); +x_84 = l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___closed__4; +x_85 = l_panic___at_REPL_sorries___spec__2___rarg(x_1, x_84, x_6); +x_86 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__7), 2, 1); +lean_closure_set(x_86, 0, x_71); +lean_inc(x_63); +x_87 = lean_apply_4(x_63, lean_box(0), lean_box(0), x_85, x_86); +x_88 = lean_apply_4(x_63, lean_box(0), lean_box(0), x_87, x_64); +return x_88; +} +else +{ +lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; +x_89 = lean_ctor_get(x_68, 0); +lean_inc(x_89); +lean_dec(x_68); +x_90 = lean_ctor_get(x_83, 0); +lean_inc(x_90); +if (lean_is_exclusive(x_83)) { + lean_ctor_release(x_83, 0); + x_91 = x_83; +} else { + lean_dec_ref(x_83); + x_91 = lean_box(0); +} +if (lean_is_scalar(x_91)) { + x_92 = lean_alloc_ctor(1, 1, 0); +} else { + x_92 = x_91; +} +lean_ctor_set(x_92, 0, x_89); +x_93 = lean_box(0); +x_94 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_94, 0, x_90); +lean_ctor_set(x_94, 1, x_93); +x_95 = lean_alloc_closure((void*)(l_REPL_ProofSnapshot_create___boxed), 6, 5); +lean_closure_set(x_95, 0, x_67); +lean_closure_set(x_95, 1, x_92); +lean_closure_set(x_95, 2, x_3); +lean_closure_set(x_95, 3, x_93); +lean_closure_set(x_95, 4, x_94); +lean_inc(x_2); +x_96 = lean_apply_2(x_2, lean_box(0), x_95); +lean_inc(x_1); +x_97 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__6), 3, 2); +lean_closure_set(x_97, 0, x_1); +lean_closure_set(x_97, 1, x_6); +lean_inc(x_63); +x_98 = lean_apply_4(x_63, lean_box(0), lean_box(0), x_96, x_97); +lean_inc(x_63); +x_99 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__9), 6, 5); +lean_closure_set(x_99, 0, x_2); +lean_closure_set(x_99, 1, x_1); +lean_closure_set(x_99, 2, x_63); +lean_closure_set(x_99, 3, x_93); +lean_closure_set(x_99, 4, x_71); +lean_inc(x_63); +x_100 = lean_apply_4(x_63, lean_box(0), lean_box(0), x_98, x_99); +x_101 = lean_apply_4(x_63, lean_box(0), lean_box(0), x_100, x_64); +return x_101; +} +} +} +} +} +} +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_sorries___spec__4(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_sorries___spec__4___rarg), 6, 0); +return x_2; +} +} +LEAN_EXPORT lean_object* l_REPL_sorries___rarg(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; lean_object* x_7; lean_object* x_8; lean_object* x_9; +x_6 = lean_box(0); +x_7 = l_List_mapTR_loop___at_REPL_sorries___spec__3(x_3, x_6); +x_8 = l_List_join___rarg(x_7); +x_9 = l_List_mapM_loop___at_REPL_sorries___spec__4___rarg(x_1, x_2, x_4, x_8, x_6, x_5); +return x_9; +} +} +LEAN_EXPORT lean_object* l_REPL_sorries(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_REPL_sorries___rarg), 5, 0); +return x_2; +} +} +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__2___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_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__2(x_1, x_2, x_3, x_4, x_5); +lean_dec(x_3); +lean_dec(x_2); +return x_6; +} +} +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__4___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_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__4(x_1, x_2, x_3, x_4, x_5); +lean_dec(x_3); +lean_dec(x_2); +return x_6; +} +} +static lean_object* _init_l_REPL_ppTactic___lambda__1___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("", 24); +return x_1; +} +} +static lean_object* _init_l_REPL_ppTactic___lambda__1___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_REPL_ppTactic___lambda__1___closed__1; +x_2 = lean_alloc_ctor(3, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +LEAN_EXPORT lean_object* l_REPL_ppTactic___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) { +_start: +{ +lean_object* x_7; +lean_inc(x_4); +x_7 = l_Lean_PrettyPrinter_ppTactic(x_1, x_4, x_5, x_6); +if (lean_obj_tag(x_7) == 0) +{ +lean_dec(x_4); +return x_7; +} +else +{ +uint8_t x_8; +x_8 = !lean_is_exclusive(x_7); +if (x_8 == 0) +{ +lean_object* x_9; uint8_t x_10; +x_9 = lean_ctor_get(x_7, 0); +x_10 = l_Lean_Exception_isRuntime(x_9); +if (x_10 == 0) +{ +lean_object* x_11; +lean_dec(x_9); +lean_dec(x_4); +x_11 = l_REPL_ppTactic___lambda__1___closed__2; +lean_ctor_set_tag(x_7, 0); +lean_ctor_set(x_7, 0, x_11); +return x_7; +} +else +{ +uint8_t x_12; +x_12 = lean_ctor_get_uint8(x_4, sizeof(void*)*11); +lean_dec(x_4); +if (x_12 == 0) +{ +return x_7; +} +else +{ +lean_object* x_13; +lean_dec(x_9); +x_13 = l_REPL_ppTactic___lambda__1___closed__2; +lean_ctor_set_tag(x_7, 0); +lean_ctor_set(x_7, 0, x_13); +return x_7; +} +} +} +else +{ +lean_object* x_14; lean_object* x_15; uint8_t x_16; +x_14 = lean_ctor_get(x_7, 0); +x_15 = lean_ctor_get(x_7, 1); +lean_inc(x_15); +lean_inc(x_14); +lean_dec(x_7); +x_16 = l_Lean_Exception_isRuntime(x_14); +if (x_16 == 0) +{ +lean_object* x_17; lean_object* x_18; +lean_dec(x_14); +lean_dec(x_4); +x_17 = l_REPL_ppTactic___lambda__1___closed__2; +x_18 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_18, 0, x_17); +lean_ctor_set(x_18, 1, x_15); +return x_18; +} +else +{ +uint8_t x_19; +x_19 = lean_ctor_get_uint8(x_4, sizeof(void*)*11); +lean_dec(x_4); +if (x_19 == 0) +{ +lean_object* x_20; +x_20 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_20, 0, x_14); +lean_ctor_set(x_20, 1, x_15); +return x_20; +} +else +{ +lean_object* x_21; lean_object* x_22; +lean_dec(x_14); +x_21 = l_REPL_ppTactic___lambda__1___closed__2; +x_22 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_22, 0, x_21); +lean_ctor_set(x_22, 1, x_15); +return x_22; +} +} +} +} +} +} +static lean_object* _init_l_REPL_ppTactic___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = l_Lean_PersistentHashMap_mkEmptyEntriesArray(lean_box(0), lean_box(0)); +return x_1; +} +} +static lean_object* _init_l_REPL_ppTactic___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_REPL_ppTactic___closed__1; +x_2 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +static lean_object* _init_l_REPL_ppTactic___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_REPL_ppTactic___closed__2; +x_2 = lean_unsigned_to_nat(0u); +x_3 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set(x_3, 1, x_2); +return x_3; +} +} +static lean_object* _init_l_REPL_ppTactic___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = lean_unsigned_to_nat(32u); +x_2 = lean_mk_empty_array_with_capacity(x_1); +return x_2; +} +} +static lean_object* _init_l_REPL_ppTactic___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_REPL_ppTactic___closed__4; +x_2 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +static lean_object* _init_l_REPL_ppTactic___closed__6() { +_start: +{ +size_t x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; +x_1 = 5; +x_2 = l_REPL_ppTactic___closed__5; +x_3 = l_REPL_ppTactic___closed__4; +x_4 = lean_unsigned_to_nat(0u); +x_5 = lean_alloc_ctor(0, 4, sizeof(size_t)*1); +lean_ctor_set(x_5, 0, x_2); +lean_ctor_set(x_5, 1, x_3); +lean_ctor_set(x_5, 2, x_4); +lean_ctor_set(x_5, 3, x_4); +lean_ctor_set_usize(x_5, 4, x_1); +return x_5; +} +} +static lean_object* _init_l_REPL_ppTactic___closed__7() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_REPL_ppTactic___closed__3; +x_2 = l_REPL_ppTactic___closed__6; +x_3 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set(x_3, 1, x_2); +return x_3; +} +} +LEAN_EXPORT lean_object* l_REPL_ppTactic(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_4 = lean_alloc_closure((void*)(l_REPL_ppTactic___lambda__1___boxed), 6, 1); +lean_closure_set(x_4, 0, x_2); +x_5 = l_REPL_ppTactic___closed__7; +x_6 = l_Lean_Elab_ContextInfo_runMetaM___rarg(x_1, x_5, x_4, x_3); +return x_6; +} +} +LEAN_EXPORT lean_object* l_REPL_ppTactic___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) { +_start: +{ +lean_object* x_7; +x_7 = l_REPL_ppTactic___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6); +lean_dec(x_3); +lean_dec(x_2); +return x_7; +} +} +LEAN_EXPORT lean_object* l_REPL_ppTactic___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_REPL_ppTactic(x_1, x_2, x_3); +lean_dec(x_1); +return x_4; +} +} +LEAN_EXPORT lean_object* l_List_mapTR_loop___at_REPL_tactics___spec__1(lean_object* x_1, lean_object* x_2) { +_start: +{ +if (lean_obj_tag(x_1) == 0) +{ +lean_object* x_3; +x_3 = l_List_reverse___rarg(x_2); +return x_3; +} +else +{ +uint8_t x_4; +x_4 = !lean_is_exclusive(x_1); +if (x_4 == 0) +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; +x_5 = lean_ctor_get(x_1, 0); +x_6 = lean_ctor_get(x_1, 1); +x_7 = l_Lean_Elab_InfoTree_tactics(x_5); +lean_ctor_set(x_1, 1, x_2); +lean_ctor_set(x_1, 0, x_7); +{ +lean_object* _tmp_0 = x_6; +lean_object* _tmp_1 = x_1; +x_1 = _tmp_0; +x_2 = _tmp_1; +} +goto _start; +} +else +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_9 = lean_ctor_get(x_1, 0); +x_10 = lean_ctor_get(x_1, 1); +lean_inc(x_10); +lean_inc(x_9); +lean_dec(x_1); +x_11 = l_Lean_Elab_InfoTree_tactics(x_9); +x_12 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_12, 0, x_11); +lean_ctor_set(x_12, 1, x_2); +x_1 = x_10; +x_2 = x_12; +goto _start; +} +} +} +} +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_tactics___spec__2___rarg___lambda__1(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; lean_object* x_7; lean_object* x_8; lean_object* x_9; +x_6 = lean_ctor_get(x_5, 0); +lean_inc(x_6); +x_7 = lean_ctor_get(x_5, 1); +lean_inc(x_7); +lean_dec(x_5); +x_8 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_8, 0, x_6); +lean_ctor_set(x_8, 1, x_1); +x_9 = l_List_mapM_loop___at_REPL_tactics___spec__2___rarg(x_2, x_3, x_4, x_8, x_7); +return x_9; +} +} +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_tactics___spec__2___rarg___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) { +_start: +{ +uint8_t x_7; +x_7 = !lean_is_exclusive(x_6); +if (x_7 == 0) +{ +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_6, 0); +x_9 = l_REPL_Tactic_of(x_1, x_2, x_3, x_4, x_8); +x_10 = lean_ctor_get(x_5, 0); +lean_inc(x_10); +lean_dec(x_5); +x_11 = lean_ctor_get(x_10, 1); +lean_inc(x_11); +lean_dec(x_10); +lean_ctor_set(x_6, 0, x_9); +x_12 = lean_apply_2(x_11, lean_box(0), x_6); +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_19; +x_13 = lean_ctor_get(x_6, 0); +x_14 = lean_ctor_get(x_6, 1); +lean_inc(x_14); +lean_inc(x_13); +lean_dec(x_6); +x_15 = l_REPL_Tactic_of(x_1, x_2, x_3, x_4, x_13); +x_16 = lean_ctor_get(x_5, 0); +lean_inc(x_16); +lean_dec(x_5); +x_17 = lean_ctor_get(x_16, 1); +lean_inc(x_17); +lean_dec(x_16); +x_18 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_18, 0, x_15); +lean_ctor_set(x_18, 1, x_14); +x_19 = lean_apply_2(x_17, lean_box(0), x_18); +return x_19; +} +} +} +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_tactics___spec__2___rarg___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) { +_start: +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; 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; +x_8 = lean_ctor_get(x_7, 0); +lean_inc(x_8); +x_9 = lean_ctor_get(x_7, 1); +lean_inc(x_9); +lean_dec(x_7); +x_10 = l_Std_Format_defWidth; +x_11 = lean_unsigned_to_nat(0u); +x_12 = lean_format_pretty(x_8, x_10, x_11, x_11); +lean_inc(x_1); +x_13 = l_REPL_recordProofSnapshot___rarg(x_1, x_2, x_9); +lean_inc(x_1); +x_14 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__3), 2, 1); +lean_closure_set(x_14, 0, x_1); +lean_inc(x_3); +x_15 = lean_apply_4(x_3, lean_box(0), lean_box(0), x_13, x_14); +x_16 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_tactics___spec__2___rarg___lambda__2___boxed), 6, 5); +lean_closure_set(x_16, 0, x_4); +lean_closure_set(x_16, 1, x_12); +lean_closure_set(x_16, 2, x_5); +lean_closure_set(x_16, 3, x_6); +lean_closure_set(x_16, 4, x_1); +x_17 = lean_apply_4(x_3, lean_box(0), lean_box(0), x_15, x_16); +return x_17; +} +} +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_tactics___spec__2___rarg___lambda__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, lean_object* x_8, lean_object* x_9) { +_start: +{ +lean_object* x_10; 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; lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_10 = lean_ctor_get(x_9, 0); +lean_inc(x_10); +x_11 = lean_ctor_get(x_9, 1); +lean_inc(x_11); +lean_dec(x_9); +x_12 = l_Std_Format_defWidth; +x_13 = lean_unsigned_to_nat(0u); +x_14 = lean_format_pretty(x_10, x_12, x_13, x_13); +x_15 = l_List_mapTR_loop___at_REPL_sorries___spec__1___closed__1; +x_16 = lean_string_append(x_15, x_14); +lean_dec(x_14); +x_17 = lean_string_append(x_16, x_15); +x_18 = l_String_trim(x_17); +lean_dec(x_17); +x_19 = lean_alloc_closure((void*)(l_REPL_ppTactic___boxed), 3, 2); +lean_closure_set(x_19, 0, x_1); +lean_closure_set(x_19, 1, x_2); +x_20 = lean_apply_2(x_3, lean_box(0), x_19); +lean_inc(x_4); +x_21 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__6), 3, 2); +lean_closure_set(x_21, 0, x_4); +lean_closure_set(x_21, 1, x_11); +lean_inc(x_5); +x_22 = lean_apply_4(x_5, lean_box(0), lean_box(0), x_20, x_21); +lean_inc(x_5); +x_23 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_tactics___spec__2___rarg___lambda__3), 7, 6); +lean_closure_set(x_23, 0, x_4); +lean_closure_set(x_23, 1, x_6); +lean_closure_set(x_23, 2, x_5); +lean_closure_set(x_23, 3, x_18); +lean_closure_set(x_23, 4, x_7); +lean_closure_set(x_23, 5, x_8); +x_24 = lean_apply_4(x_5, lean_box(0), lean_box(0), x_22, x_23); +return x_24; +} +} +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_tactics___spec__2___rarg___lambda__5(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: +{ +lean_object* x_10; 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; +x_10 = lean_ctor_get(x_9, 0); +lean_inc(x_10); +x_11 = lean_ctor_get(x_9, 1); +lean_inc(x_11); +lean_dec(x_9); +lean_inc(x_1); +x_12 = lean_alloc_closure((void*)(l_Lean_Elab_ContextInfo_ppGoals___boxed), 3, 2); +lean_closure_set(x_12, 0, x_1); +lean_closure_set(x_12, 1, x_2); +lean_inc(x_3); +x_13 = lean_apply_2(x_3, lean_box(0), x_12); +lean_inc(x_4); +x_14 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__6), 3, 2); +lean_closure_set(x_14, 0, x_4); +lean_closure_set(x_14, 1, x_11); +lean_inc(x_5); +x_15 = lean_apply_4(x_5, lean_box(0), lean_box(0), x_13, x_14); +lean_inc(x_5); +x_16 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_tactics___spec__2___rarg___lambda__4), 9, 8); +lean_closure_set(x_16, 0, x_1); +lean_closure_set(x_16, 1, x_6); +lean_closure_set(x_16, 2, x_3); +lean_closure_set(x_16, 3, x_4); +lean_closure_set(x_16, 4, x_5); +lean_closure_set(x_16, 5, x_10); +lean_closure_set(x_16, 6, x_7); +lean_closure_set(x_16, 7, x_8); +x_17 = lean_apply_4(x_5, lean_box(0), lean_box(0), x_15, x_16); +return x_17; +} +} +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_tactics___spec__2___rarg(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_3) == 0) +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; +lean_dec(x_2); +x_6 = l_List_reverse___rarg(x_4); +x_7 = lean_ctor_get(x_1, 0); +lean_inc(x_7); +lean_dec(x_1); +x_8 = lean_ctor_get(x_7, 1); +lean_inc(x_8); +lean_dec(x_7); +x_9 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_9, 0, x_6); +lean_ctor_set(x_9, 1, x_5); +x_10 = lean_apply_2(x_8, lean_box(0), x_9); +return x_10; +} +else +{ +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; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_11 = lean_ctor_get(x_3, 0); +lean_inc(x_11); +x_12 = lean_ctor_get(x_3, 1); +lean_inc(x_12); +lean_dec(x_3); +x_13 = lean_ctor_get(x_1, 1); +lean_inc(x_13); +lean_inc(x_2); +lean_inc(x_1); +x_14 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_tactics___spec__2___rarg___lambda__1), 5, 4); +lean_closure_set(x_14, 0, x_4); +lean_closure_set(x_14, 1, x_1); +lean_closure_set(x_14, 2, x_2); +lean_closure_set(x_14, 3, x_12); +x_15 = lean_ctor_get(x_11, 1); +lean_inc(x_15); +x_16 = lean_ctor_get(x_15, 1); +lean_inc(x_16); +x_17 = lean_ctor_get(x_16, 1); +lean_inc(x_17); +x_18 = lean_ctor_get(x_11, 0); +lean_inc(x_18); +lean_dec(x_11); +x_19 = lean_ctor_get(x_15, 0); +lean_inc(x_19); +lean_dec(x_15); +x_20 = lean_ctor_get(x_16, 0); +lean_inc(x_20); +lean_dec(x_16); +x_21 = lean_ctor_get(x_17, 0); +lean_inc(x_21); +x_22 = lean_ctor_get(x_17, 1); +lean_inc(x_22); +lean_dec(x_17); +x_23 = lean_box(0); +x_24 = lean_box(0); +lean_inc(x_20); +lean_inc(x_18); +x_25 = lean_alloc_closure((void*)(l_REPL_ProofSnapshot_create___boxed), 6, 5); +lean_closure_set(x_25, 0, x_18); +lean_closure_set(x_25, 1, x_23); +lean_closure_set(x_25, 2, x_23); +lean_closure_set(x_25, 3, x_20); +lean_closure_set(x_25, 4, x_24); +lean_inc(x_2); +x_26 = lean_apply_2(x_2, lean_box(0), x_25); +lean_inc(x_1); +x_27 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__6), 3, 2); +lean_closure_set(x_27, 0, x_1); +lean_closure_set(x_27, 1, x_5); +lean_inc(x_13); +x_28 = lean_apply_4(x_13, lean_box(0), lean_box(0), x_26, x_27); +lean_inc(x_13); +x_29 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_tactics___spec__2___rarg___lambda__5), 9, 8); +lean_closure_set(x_29, 0, x_18); +lean_closure_set(x_29, 1, x_20); +lean_closure_set(x_29, 2, x_2); +lean_closure_set(x_29, 3, x_1); +lean_closure_set(x_29, 4, x_13); +lean_closure_set(x_29, 5, x_19); +lean_closure_set(x_29, 6, x_21); +lean_closure_set(x_29, 7, x_22); +lean_inc(x_13); +x_30 = lean_apply_4(x_13, lean_box(0), lean_box(0), x_28, x_29); +x_31 = lean_apply_4(x_13, lean_box(0), lean_box(0), x_30, x_14); +return x_31; +} +} +} +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_tactics___spec__2(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_tactics___spec__2___rarg), 5, 0); +return x_2; +} +} +LEAN_EXPORT lean_object* l_REPL_tactics___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; +x_5 = lean_box(0); +x_6 = l_List_mapTR_loop___at_REPL_tactics___spec__1(x_3, x_5); +x_7 = l_List_join___rarg(x_6); +x_8 = l_List_mapM_loop___at_REPL_tactics___spec__2___rarg(x_1, x_2, x_7, x_5, x_4); +return x_8; +} +} +LEAN_EXPORT lean_object* l_REPL_tactics(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_REPL_tactics___rarg), 4, 0); +return x_2; +} +} +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_tactics___spec__2___rarg___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) { +_start: +{ +lean_object* x_7; +x_7 = l_List_mapM_loop___at_REPL_tactics___spec__2___rarg___lambda__2(x_1, x_2, x_3, x_4, x_5, x_6); +lean_dec(x_4); +lean_dec(x_3); +return x_7; +} +} +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_createProofStepReponse___spec__1___rarg___lambda__1(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; lean_object* x_7; lean_object* x_8; lean_object* x_9; +x_6 = lean_ctor_get(x_5, 0); +lean_inc(x_6); +x_7 = lean_ctor_get(x_5, 1); +lean_inc(x_7); +lean_dec(x_5); +x_8 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_8, 0, x_6); +lean_ctor_set(x_8, 1, x_1); +x_9 = l_List_mapM_loop___at_REPL_createProofStepReponse___spec__1___rarg(x_2, x_3, x_4, x_8, x_7); +return x_9; +} +} +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_createProofStepReponse___spec__1___rarg(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_3) == 0) +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; +lean_dec(x_2); +x_6 = l_List_reverse___rarg(x_4); +x_7 = lean_ctor_get(x_1, 0); +lean_inc(x_7); +lean_dec(x_1); +x_8 = lean_ctor_get(x_7, 1); +lean_inc(x_8); +lean_dec(x_7); +x_9 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_9, 0, x_6); +lean_ctor_set(x_9, 1, x_5); +x_10 = lean_apply_2(x_8, lean_box(0), x_9); +return x_10; +} +else +{ +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; +x_11 = lean_ctor_get(x_3, 0); +lean_inc(x_11); +x_12 = lean_ctor_get(x_3, 1); +lean_inc(x_12); +lean_dec(x_3); +x_13 = lean_ctor_get(x_1, 1); +lean_inc(x_13); +x_14 = lean_alloc_closure((void*)(l_REPL_Message_of), 2, 1); +lean_closure_set(x_14, 0, x_11); +lean_inc(x_2); +x_15 = lean_apply_2(x_2, lean_box(0), x_14); +lean_inc(x_1); +x_16 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__6), 3, 2); +lean_closure_set(x_16, 0, x_1); +lean_closure_set(x_16, 1, x_5); +lean_inc(x_13); +x_17 = lean_apply_4(x_13, lean_box(0), lean_box(0), x_15, x_16); +x_18 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_createProofStepReponse___spec__1___rarg___lambda__1), 5, 4); +lean_closure_set(x_18, 0, x_4); +lean_closure_set(x_18, 1, x_1); +lean_closure_set(x_18, 2, x_2); +lean_closure_set(x_18, 3, x_12); +x_19 = lean_apply_4(x_13, lean_box(0), lean_box(0), x_17, x_18); +return x_19; +} +} +} +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_createProofStepReponse___spec__1(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_createProofStepReponse___spec__1___rarg), 5, 0); +return x_2; +} +} +LEAN_EXPORT lean_object* l_List_mapTR_loop___at_REPL_createProofStepReponse___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +if (lean_obj_tag(x_2) == 0) +{ +lean_object* x_4; +lean_dec(x_1); +x_4 = l_List_reverse___rarg(x_3); +return x_4; +} +else +{ +uint8_t x_5; +x_5 = !lean_is_exclusive(x_2); +if (x_5 == 0) +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; +x_6 = lean_ctor_get(x_2, 0); +x_7 = lean_ctor_get(x_2, 1); +lean_inc(x_1); +x_8 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_8, 0, x_1); +lean_ctor_set(x_8, 1, x_6); +lean_ctor_set(x_2, 1, x_3); +lean_ctor_set(x_2, 0, x_8); +{ +lean_object* _tmp_1 = x_7; +lean_object* _tmp_2 = x_2; +x_2 = _tmp_1; +x_3 = _tmp_2; +} +goto _start; +} +else +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_10 = lean_ctor_get(x_2, 0); +x_11 = lean_ctor_get(x_2, 1); +lean_inc(x_11); +lean_inc(x_10); +lean_dec(x_2); +lean_inc(x_1); +x_12 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_12, 0, x_1); +lean_ctor_set(x_12, 1, x_10); +x_13 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_13, 0, x_12); +lean_ctor_set(x_13, 1, x_3); +x_2 = x_11; +x_3 = x_13; +goto _start; +} +} +} +} +LEAN_EXPORT lean_object* l_REPL_createProofStepReponse___rarg___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, lean_object* x_7) { +_start: +{ +uint8_t x_8; +x_8 = !lean_is_exclusive(x_7); +if (x_8 == 0) +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; +x_9 = lean_ctor_get(x_7, 0); +x_10 = l_List_mapTR_loop___at_REPL_sorries___spec__1(x_9, x_1); +x_11 = lean_alloc_ctor(0, 5, 0); +lean_ctor_set(x_11, 0, x_2); +lean_ctor_set(x_11, 1, x_10); +lean_ctor_set(x_11, 2, x_3); +lean_ctor_set(x_11, 3, x_4); +lean_ctor_set(x_11, 4, x_5); +x_12 = lean_ctor_get(x_6, 0); +lean_inc(x_12); +lean_dec(x_6); +x_13 = lean_ctor_get(x_12, 1); +lean_inc(x_13); +lean_dec(x_12); +lean_ctor_set(x_7, 0, x_11); +x_14 = lean_apply_2(x_13, lean_box(0), x_7); +return x_14; +} +else +{ +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; lean_object* x_22; +x_15 = lean_ctor_get(x_7, 0); +x_16 = lean_ctor_get(x_7, 1); +lean_inc(x_16); +lean_inc(x_15); +lean_dec(x_7); +x_17 = l_List_mapTR_loop___at_REPL_sorries___spec__1(x_15, x_1); +x_18 = lean_alloc_ctor(0, 5, 0); +lean_ctor_set(x_18, 0, x_2); +lean_ctor_set(x_18, 1, x_17); +lean_ctor_set(x_18, 2, x_3); +lean_ctor_set(x_18, 3, x_4); +lean_ctor_set(x_18, 4, x_5); +x_19 = lean_ctor_get(x_6, 0); +lean_inc(x_19); +lean_dec(x_6); +x_20 = lean_ctor_get(x_19, 1); +lean_inc(x_20); +lean_dec(x_19); +x_21 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_21, 0, x_18); +lean_ctor_set(x_21, 1, x_16); +x_22 = lean_apply_2(x_20, lean_box(0), x_21); +return x_22; +} +} +} +LEAN_EXPORT lean_object* l_REPL_createProofStepReponse___rarg___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) { +_start: +{ +lean_object* x_10; 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; +x_10 = lean_ctor_get(x_9, 0); +lean_inc(x_10); +x_11 = lean_ctor_get(x_9, 1); +lean_inc(x_11); +lean_dec(x_9); +x_12 = lean_alloc_closure((void*)(l_REPL_ProofSnapshot_ppGoals), 2, 1); +lean_closure_set(x_12, 0, x_1); +x_13 = lean_apply_2(x_2, lean_box(0), x_12); +lean_inc(x_3); +x_14 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__6), 3, 2); +lean_closure_set(x_14, 0, x_3); +lean_closure_set(x_14, 1, x_11); +lean_inc(x_4); +x_15 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_13, x_14); +x_16 = lean_alloc_closure((void*)(l_REPL_createProofStepReponse___rarg___lambda__1), 7, 6); +lean_closure_set(x_16, 0, x_5); +lean_closure_set(x_16, 1, x_10); +lean_closure_set(x_16, 2, x_6); +lean_closure_set(x_16, 3, x_7); +lean_closure_set(x_16, 4, x_8); +lean_closure_set(x_16, 5, x_3); +x_17 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_15, x_16); +return x_17; +} +} +LEAN_EXPORT lean_object* l_REPL_createProofStepReponse___rarg___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) { +_start: +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_9 = lean_ctor_get(x_8, 0); +lean_inc(x_9); +x_10 = lean_ctor_get(x_8, 1); +lean_inc(x_10); +lean_dec(x_8); +lean_inc(x_2); +lean_inc(x_1); +x_11 = l_REPL_recordProofSnapshot___rarg(x_1, x_2, x_10); +lean_inc(x_4); +x_12 = lean_alloc_closure((void*)(l_REPL_createProofStepReponse___rarg___lambda__2), 9, 8); +lean_closure_set(x_12, 0, x_2); +lean_closure_set(x_12, 1, x_3); +lean_closure_set(x_12, 2, x_1); +lean_closure_set(x_12, 3, x_4); +lean_closure_set(x_12, 4, x_5); +lean_closure_set(x_12, 5, x_6); +lean_closure_set(x_12, 6, x_9); +lean_closure_set(x_12, 7, x_7); +x_13 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_11, x_12); +return x_13; +} +} +LEAN_EXPORT lean_object* l_REPL_createProofStepReponse___rarg___lambda__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, lean_object* x_8, lean_object* x_9) { +_start: +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_10 = lean_box(0); +lean_inc(x_2); +lean_inc(x_1); +x_11 = l_REPL_sorries___rarg(x_1, x_2, x_8, x_10, x_9); +lean_inc(x_4); +x_12 = lean_alloc_closure((void*)(l_REPL_createProofStepReponse___rarg___lambda__3), 8, 7); +lean_closure_set(x_12, 0, x_1); +lean_closure_set(x_12, 1, x_3); +lean_closure_set(x_12, 2, x_2); +lean_closure_set(x_12, 3, x_4); +lean_closure_set(x_12, 4, x_5); +lean_closure_set(x_12, 5, x_6); +lean_closure_set(x_12, 6, x_7); +x_13 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_11, x_12); +return x_13; +} +} +LEAN_EXPORT lean_object* l_REPL_createProofStepReponse___rarg___lambda__5(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; uint8_t x_7; +x_6 = l_Lean_Elab_CommandContextInfo_save___at_Lean_Widget_goalToInteractive___spec__6(x_1, x_2, x_3, x_4, x_5); +x_7 = !lean_is_exclusive(x_6); +if (x_7 == 0) +{ +lean_object* x_8; uint8_t x_9; +x_8 = lean_ctor_get(x_6, 0); +x_9 = !lean_is_exclusive(x_8); +if (x_9 == 0) +{ +return x_6; +} +else +{ +lean_object* x_10; 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; +x_10 = lean_ctor_get(x_8, 0); +x_11 = lean_ctor_get(x_8, 1); +x_12 = lean_ctor_get(x_8, 2); +x_13 = lean_ctor_get(x_8, 3); +x_14 = lean_ctor_get(x_8, 4); +x_15 = lean_ctor_get(x_8, 5); +x_16 = lean_ctor_get(x_8, 6); +lean_inc(x_16); +lean_inc(x_15); +lean_inc(x_14); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_dec(x_8); +x_17 = lean_alloc_ctor(0, 7, 0); +lean_ctor_set(x_17, 0, x_10); +lean_ctor_set(x_17, 1, x_11); +lean_ctor_set(x_17, 2, x_12); +lean_ctor_set(x_17, 3, x_13); +lean_ctor_set(x_17, 4, x_14); +lean_ctor_set(x_17, 5, x_15); +lean_ctor_set(x_17, 6, x_16); +lean_ctor_set(x_6, 0, x_17); +return x_6; +} +} +else +{ +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; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_18 = lean_ctor_get(x_6, 0); +x_19 = lean_ctor_get(x_6, 1); +lean_inc(x_19); +lean_inc(x_18); +lean_dec(x_6); +x_20 = lean_ctor_get(x_18, 0); +lean_inc(x_20); +x_21 = lean_ctor_get(x_18, 1); +lean_inc(x_21); +x_22 = lean_ctor_get(x_18, 2); +lean_inc(x_22); +x_23 = lean_ctor_get(x_18, 3); +lean_inc(x_23); +x_24 = lean_ctor_get(x_18, 4); +lean_inc(x_24); +x_25 = lean_ctor_get(x_18, 5); +lean_inc(x_25); +x_26 = lean_ctor_get(x_18, 6); +lean_inc(x_26); +if (lean_is_exclusive(x_18)) { + lean_ctor_release(x_18, 0); + lean_ctor_release(x_18, 1); + lean_ctor_release(x_18, 2); + lean_ctor_release(x_18, 3); + lean_ctor_release(x_18, 4); + lean_ctor_release(x_18, 5); + lean_ctor_release(x_18, 6); + x_27 = x_18; +} else { + lean_dec_ref(x_18); + x_27 = lean_box(0); +} +if (lean_is_scalar(x_27)) { + x_28 = lean_alloc_ctor(0, 7, 0); +} else { + x_28 = x_27; +} +lean_ctor_set(x_28, 0, x_20); +lean_ctor_set(x_28, 1, x_21); +lean_ctor_set(x_28, 2, x_22); +lean_ctor_set(x_28, 3, x_23); +lean_ctor_set(x_28, 4, x_24); +lean_ctor_set(x_28, 5, x_25); +lean_ctor_set(x_28, 6, x_26); +x_29 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_29, 0, x_28); +lean_ctor_set(x_29, 1, x_19); +return x_29; +} +} +} +LEAN_EXPORT lean_object* l_REPL_createProofStepReponse___rarg___lambda__6(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; lean_object* x_8; uint8_t x_9; +x_7 = lean_ctor_get(x_6, 0); +lean_inc(x_7); +x_8 = lean_ctor_get(x_6, 1); +lean_inc(x_8); +lean_dec(x_6); +x_9 = !lean_is_exclusive(x_7); +if (x_9 == 0) +{ +lean_object* x_10; 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; +x_10 = lean_ctor_get(x_7, 0); +x_11 = lean_ctor_get(x_7, 1); +lean_dec(x_11); +x_12 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_12, 0, x_10); +x_13 = l_List_mapTR_loop___at_REPL_createProofStepReponse___spec__2(x_12, x_1, x_2); +x_14 = lean_ctor_get(x_3, 0); +lean_inc(x_14); +lean_dec(x_3); +x_15 = lean_ctor_get(x_14, 1); +lean_inc(x_15); +lean_dec(x_14); +lean_ctor_set(x_7, 1, x_8); +lean_ctor_set(x_7, 0, x_13); +x_16 = lean_apply_2(x_15, lean_box(0), x_7); +x_17 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__7), 2, 1); +lean_closure_set(x_17, 0, x_4); +x_18 = lean_apply_4(x_5, lean_box(0), lean_box(0), x_16, x_17); +return x_18; +} +else +{ +lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; +x_19 = lean_ctor_get(x_7, 0); +lean_inc(x_19); +lean_dec(x_7); +x_20 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_20, 0, x_19); +x_21 = l_List_mapTR_loop___at_REPL_createProofStepReponse___spec__2(x_20, x_1, x_2); +x_22 = lean_ctor_get(x_3, 0); +lean_inc(x_22); +lean_dec(x_3); +x_23 = lean_ctor_get(x_22, 1); +lean_inc(x_23); +lean_dec(x_22); +x_24 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_24, 0, x_21); +lean_ctor_set(x_24, 1, x_8); +x_25 = lean_apply_2(x_23, lean_box(0), x_24); +x_26 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__7), 2, 1); +lean_closure_set(x_26, 0, x_4); +x_27 = lean_apply_4(x_5, lean_box(0), lean_box(0), x_25, x_26); +return x_27; +} +} +} +static lean_object* _init_l_REPL_createProofStepReponse___rarg___lambda__7___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_REPL_createProofStepReponse___rarg___lambda__5___boxed), 5, 0); +return x_1; +} +} +LEAN_EXPORT lean_object* l_REPL_createProofStepReponse___rarg___lambda__7(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: +{ +uint8_t x_9; +x_9 = !lean_is_exclusive(x_8); +if (x_9 == 0) +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_10 = lean_ctor_get(x_8, 0); +x_11 = lean_ctor_get(x_8, 1); +lean_inc(x_2); +lean_inc(x_1); +x_12 = l_REPL_ProofSnapshot_newInfoTrees(x_1, x_2); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +lean_inc(x_3); +x_13 = lean_alloc_closure((void*)(l_REPL_createProofStepReponse___rarg___lambda__4), 9, 7); +lean_closure_set(x_13, 0, x_3); +lean_closure_set(x_13, 1, x_4); +lean_closure_set(x_13, 2, x_1); +lean_closure_set(x_13, 3, x_5); +lean_closure_set(x_13, 4, x_6); +lean_closure_set(x_13, 5, x_7); +lean_closure_set(x_13, 6, x_10); +if (lean_obj_tag(x_2) == 0) +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; +lean_dec(x_6); +lean_dec(x_4); +x_14 = lean_ctor_get(x_3, 0); +lean_inc(x_14); +lean_dec(x_3); +x_15 = lean_ctor_get(x_14, 1); +lean_inc(x_15); +lean_dec(x_14); +lean_ctor_set(x_8, 0, x_12); +x_16 = lean_apply_2(x_15, lean_box(0), x_8); +x_17 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__7), 2, 1); +lean_closure_set(x_17, 0, x_13); +x_18 = lean_apply_4(x_5, lean_box(0), lean_box(0), x_16, x_17); +return x_18; +} +else +{ +lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; +lean_free_object(x_8); +x_19 = lean_ctor_get(x_2, 0); +lean_inc(x_19); +lean_dec(x_2); +x_20 = l_REPL_createProofStepReponse___rarg___lambda__7___closed__1; +x_21 = lean_alloc_closure((void*)(l_REPL_ProofSnapshot_runMetaM___rarg), 3, 2); +lean_closure_set(x_21, 0, x_19); +lean_closure_set(x_21, 1, x_20); +x_22 = lean_apply_2(x_4, lean_box(0), x_21); +lean_inc(x_3); +x_23 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__6), 3, 2); +lean_closure_set(x_23, 0, x_3); +lean_closure_set(x_23, 1, x_11); +lean_inc(x_5); +x_24 = lean_apply_4(x_5, lean_box(0), lean_box(0), x_22, x_23); +lean_inc(x_5); +x_25 = lean_alloc_closure((void*)(l_REPL_createProofStepReponse___rarg___lambda__6), 6, 5); +lean_closure_set(x_25, 0, x_12); +lean_closure_set(x_25, 1, x_6); +lean_closure_set(x_25, 2, x_3); +lean_closure_set(x_25, 3, x_13); +lean_closure_set(x_25, 4, x_5); +x_26 = lean_apply_4(x_5, lean_box(0), lean_box(0), x_24, x_25); +return x_26; +} +} +else +{ +lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; +x_27 = lean_ctor_get(x_8, 0); +x_28 = lean_ctor_get(x_8, 1); +lean_inc(x_28); +lean_inc(x_27); +lean_dec(x_8); +lean_inc(x_2); +lean_inc(x_1); +x_29 = l_REPL_ProofSnapshot_newInfoTrees(x_1, x_2); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +lean_inc(x_3); +x_30 = lean_alloc_closure((void*)(l_REPL_createProofStepReponse___rarg___lambda__4), 9, 7); +lean_closure_set(x_30, 0, x_3); +lean_closure_set(x_30, 1, x_4); +lean_closure_set(x_30, 2, x_1); +lean_closure_set(x_30, 3, x_5); +lean_closure_set(x_30, 4, x_6); +lean_closure_set(x_30, 5, x_7); +lean_closure_set(x_30, 6, x_27); +if (lean_obj_tag(x_2) == 0) +{ +lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; +lean_dec(x_6); +lean_dec(x_4); +x_31 = lean_ctor_get(x_3, 0); +lean_inc(x_31); +lean_dec(x_3); +x_32 = lean_ctor_get(x_31, 1); +lean_inc(x_32); +lean_dec(x_31); +x_33 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_33, 0, x_29); +lean_ctor_set(x_33, 1, x_28); +x_34 = lean_apply_2(x_32, lean_box(0), x_33); +x_35 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__7), 2, 1); +lean_closure_set(x_35, 0, x_30); +x_36 = lean_apply_4(x_5, lean_box(0), lean_box(0), x_34, x_35); +return x_36; +} +else +{ +lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; +x_37 = lean_ctor_get(x_2, 0); +lean_inc(x_37); +lean_dec(x_2); +x_38 = l_REPL_createProofStepReponse___rarg___lambda__7___closed__1; +x_39 = lean_alloc_closure((void*)(l_REPL_ProofSnapshot_runMetaM___rarg), 3, 2); +lean_closure_set(x_39, 0, x_37); +lean_closure_set(x_39, 1, x_38); +x_40 = lean_apply_2(x_4, lean_box(0), x_39); +lean_inc(x_3); +x_41 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__6), 3, 2); +lean_closure_set(x_41, 0, x_3); +lean_closure_set(x_41, 1, x_28); +lean_inc(x_5); +x_42 = lean_apply_4(x_5, lean_box(0), lean_box(0), x_40, x_41); +lean_inc(x_5); +x_43 = lean_alloc_closure((void*)(l_REPL_createProofStepReponse___rarg___lambda__6), 6, 5); +lean_closure_set(x_43, 0, x_29); +lean_closure_set(x_43, 1, x_6); +lean_closure_set(x_43, 2, x_3); +lean_closure_set(x_43, 3, x_30); +lean_closure_set(x_43, 4, x_5); +x_44 = lean_apply_4(x_5, lean_box(0), lean_box(0), x_42, x_43); +return x_44; +} +} +} +} +LEAN_EXPORT lean_object* l_REPL_createProofStepReponse___rarg___lambda__8(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_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; +x_8 = lean_ctor_get(x_7, 0); +lean_inc(x_8); +x_9 = lean_ctor_get(x_7, 1); +lean_inc(x_9); +lean_dec(x_7); +lean_inc(x_2); +lean_inc(x_1); +x_10 = lean_alloc_closure((void*)(l_REPL_ProofSnapshot_newTraces), 3, 2); +lean_closure_set(x_10, 0, x_1); +lean_closure_set(x_10, 1, x_2); +lean_inc(x_3); +x_11 = lean_apply_2(x_3, lean_box(0), x_10); +lean_inc(x_4); +x_12 = lean_alloc_closure((void*)(l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__6), 3, 2); +lean_closure_set(x_12, 0, x_4); +lean_closure_set(x_12, 1, x_9); +lean_inc(x_5); +x_13 = lean_apply_4(x_5, lean_box(0), lean_box(0), x_11, x_12); +lean_inc(x_5); +x_14 = lean_alloc_closure((void*)(l_REPL_createProofStepReponse___rarg___lambda__7), 8, 7); +lean_closure_set(x_14, 0, x_1); +lean_closure_set(x_14, 1, x_2); +lean_closure_set(x_14, 2, x_4); +lean_closure_set(x_14, 3, x_3); +lean_closure_set(x_14, 4, x_5); +lean_closure_set(x_14, 5, x_6); +lean_closure_set(x_14, 6, x_8); +x_15 = lean_apply_4(x_5, lean_box(0), lean_box(0), x_13, x_14); +return x_15; +} +} +LEAN_EXPORT lean_object* l_REPL_createProofStepReponse___rarg(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; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; +lean_inc(x_4); +lean_inc(x_3); +x_6 = l_REPL_ProofSnapshot_newMessages(x_3, x_4); +x_7 = lean_box(0); +x_8 = lean_ctor_get(x_1, 1); +lean_inc(x_8); +lean_inc(x_2); +lean_inc(x_1); +x_9 = l_List_mapM_loop___at_REPL_createProofStepReponse___spec__1___rarg(x_1, x_2, x_6, x_7, x_5); +lean_inc(x_8); +x_10 = lean_alloc_closure((void*)(l_REPL_createProofStepReponse___rarg___lambda__8), 7, 6); +lean_closure_set(x_10, 0, x_3); +lean_closure_set(x_10, 1, x_4); +lean_closure_set(x_10, 2, x_2); +lean_closure_set(x_10, 3, x_1); +lean_closure_set(x_10, 4, x_8); +lean_closure_set(x_10, 5, x_7); +x_11 = lean_apply_4(x_8, lean_box(0), lean_box(0), x_9, x_10); +return x_11; +} +} +LEAN_EXPORT lean_object* l_REPL_createProofStepReponse(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_REPL_createProofStepReponse___rarg), 5, 0); +return x_2; +} +} +LEAN_EXPORT lean_object* l_REPL_createProofStepReponse___rarg___lambda__5___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_REPL_createProofStepReponse___rarg___lambda__5(x_1, x_2, x_3, x_4, x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +return x_6; +} +} +LEAN_EXPORT lean_object* l_REPL_pickleCommandSnapshot___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; +x_4 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_4, 0, x_3); +lean_ctor_set(x_4, 1, x_1); +x_5 = lean_apply_2(x_2, lean_box(0), x_4); +return x_5; +} +} +LEAN_EXPORT lean_object* l_REPL_pickleCommandSnapshot___rarg___lambda__2(lean_object* x_1, lean_object* x_2) { +_start: +{ +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; +x_4 = lean_ctor_get(x_2, 0); +lean_dec(x_4); +x_5 = lean_box(0); +lean_ctor_set(x_2, 0, x_5); +x_6 = lean_apply_2(x_1, lean_box(0), x_2); +return x_6; +} +else +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_7 = lean_ctor_get(x_2, 1); +lean_inc(x_7); +lean_dec(x_2); +x_8 = lean_box(0); +x_9 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_9, 0, x_8); +lean_ctor_set(x_9, 1, x_7); +x_10 = lean_apply_2(x_1, lean_box(0), x_9); +return x_10; +} +} +} +LEAN_EXPORT lean_object* l_REPL_pickleCommandSnapshot___rarg___lambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +uint8_t x_4; +x_4 = !lean_is_exclusive(x_3); +if (x_4 == 0) +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_5 = lean_ctor_get(x_3, 0); +lean_dec(x_5); +x_6 = lean_box(0); +x_7 = lean_box(0); +x_8 = lean_alloc_ctor(0, 5, 0); +lean_ctor_set(x_8, 0, x_1); +lean_ctor_set(x_8, 1, x_6); +lean_ctor_set(x_8, 2, x_6); +lean_ctor_set(x_8, 3, x_6); +lean_ctor_set(x_8, 4, x_7); +x_9 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_9, 0, x_8); +lean_ctor_set(x_3, 0, x_9); +x_10 = lean_apply_2(x_2, lean_box(0), x_3); +return x_10; +} +else +{ +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; +x_11 = lean_ctor_get(x_3, 1); +lean_inc(x_11); +lean_dec(x_3); +x_12 = lean_box(0); +x_13 = lean_box(0); +x_14 = lean_alloc_ctor(0, 5, 0); +lean_ctor_set(x_14, 0, x_1); +lean_ctor_set(x_14, 1, x_12); +lean_ctor_set(x_14, 2, x_12); +lean_ctor_set(x_14, 3, x_12); +lean_ctor_set(x_14, 4, x_13); +x_15 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_15, 0, x_14); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_15); +lean_ctor_set(x_16, 1, x_11); +x_17 = lean_apply_2(x_2, lean_box(0), x_16); +return x_17; +} +} +} +static lean_object* _init_l_REPL_pickleCommandSnapshot___rarg___lambda__4___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("Unknown environment.", 20); +return x_1; +} +} +static lean_object* _init_l_REPL_pickleCommandSnapshot___rarg___lambda__4___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_REPL_pickleCommandSnapshot___rarg___lambda__4___closed__1; +x_2 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +LEAN_EXPORT lean_object* l_REPL_pickleCommandSnapshot___rarg___lambda__4(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; +x_6 = !lean_is_exclusive(x_5); +if (x_6 == 0) +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; +x_7 = lean_ctor_get(x_5, 0); +x_8 = lean_ctor_get(x_5, 1); +x_9 = lean_ctor_get(x_7, 0); +lean_inc(x_9); +lean_dec(x_7); +x_10 = lean_ctor_get(x_1, 0); +lean_inc(x_10); +x_11 = lean_ctor_get(x_1, 1); +lean_inc(x_11); +lean_dec(x_1); +x_12 = lean_array_get_size(x_9); +x_13 = lean_nat_dec_lt(x_10, x_12); +lean_dec(x_12); +if (x_13 == 0) +{ +lean_object* x_14; lean_object* x_15; +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_4); +lean_dec(x_3); +x_14 = l_REPL_pickleCommandSnapshot___rarg___lambda__4___closed__2; +lean_ctor_set(x_5, 0, x_14); +x_15 = lean_apply_2(x_2, lean_box(0), x_5); +return x_15; +} +else +{ +lean_object* x_16; 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; +lean_free_object(x_5); +x_16 = lean_array_fget(x_9, x_10); +lean_dec(x_9); +x_17 = lean_alloc_closure((void*)(l_REPL_CommandSnapshot_pickle___boxed), 3, 2); +lean_closure_set(x_17, 0, x_16); +lean_closure_set(x_17, 1, x_11); +x_18 = lean_apply_2(x_3, lean_box(0), x_17); +lean_inc(x_2); +x_19 = lean_alloc_closure((void*)(l_REPL_pickleCommandSnapshot___rarg___lambda__1), 3, 2); +lean_closure_set(x_19, 0, x_8); +lean_closure_set(x_19, 1, x_2); +lean_inc(x_4); +x_20 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_18, x_19); +lean_inc(x_2); +x_21 = lean_alloc_closure((void*)(l_REPL_pickleCommandSnapshot___rarg___lambda__2), 2, 1); +lean_closure_set(x_21, 0, x_2); +lean_inc(x_4); +x_22 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_20, x_21); +x_23 = lean_alloc_closure((void*)(l_REPL_pickleCommandSnapshot___rarg___lambda__3), 3, 2); +lean_closure_set(x_23, 0, x_10); +lean_closure_set(x_23, 1, x_2); +x_24 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_22, x_23); +return x_24; +} +} +else +{ +lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; uint8_t x_31; +x_25 = lean_ctor_get(x_5, 0); +x_26 = lean_ctor_get(x_5, 1); +lean_inc(x_26); +lean_inc(x_25); +lean_dec(x_5); +x_27 = lean_ctor_get(x_25, 0); +lean_inc(x_27); +lean_dec(x_25); +x_28 = lean_ctor_get(x_1, 0); +lean_inc(x_28); +x_29 = lean_ctor_get(x_1, 1); +lean_inc(x_29); +lean_dec(x_1); +x_30 = lean_array_get_size(x_27); +x_31 = lean_nat_dec_lt(x_28, x_30); +lean_dec(x_30); +if (x_31 == 0) +{ +lean_object* x_32; lean_object* x_33; lean_object* x_34; +lean_dec(x_29); +lean_dec(x_28); +lean_dec(x_27); +lean_dec(x_4); +lean_dec(x_3); +x_32 = l_REPL_pickleCommandSnapshot___rarg___lambda__4___closed__2; +x_33 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_33, 0, x_32); +lean_ctor_set(x_33, 1, x_26); +x_34 = lean_apply_2(x_2, lean_box(0), x_33); +return x_34; +} +else +{ +lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; +x_35 = lean_array_fget(x_27, x_28); +lean_dec(x_27); +x_36 = lean_alloc_closure((void*)(l_REPL_CommandSnapshot_pickle___boxed), 3, 2); +lean_closure_set(x_36, 0, x_35); +lean_closure_set(x_36, 1, x_29); +x_37 = lean_apply_2(x_3, lean_box(0), x_36); +lean_inc(x_2); +x_38 = lean_alloc_closure((void*)(l_REPL_pickleCommandSnapshot___rarg___lambda__1), 3, 2); +lean_closure_set(x_38, 0, x_26); +lean_closure_set(x_38, 1, x_2); +lean_inc(x_4); +x_39 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_37, x_38); +lean_inc(x_2); +x_40 = lean_alloc_closure((void*)(l_REPL_pickleCommandSnapshot___rarg___lambda__2), 2, 1); +lean_closure_set(x_40, 0, x_2); +lean_inc(x_4); +x_41 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_39, x_40); +x_42 = lean_alloc_closure((void*)(l_REPL_pickleCommandSnapshot___rarg___lambda__3), 3, 2); +lean_closure_set(x_42, 0, x_28); +lean_closure_set(x_42, 1, x_2); +x_43 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_41, x_42); +return x_43; +} +} +} +} +LEAN_EXPORT lean_object* l_REPL_pickleCommandSnapshot___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; 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_5 = lean_ctor_get(x_1, 1); +lean_inc(x_5); +x_6 = lean_ctor_get(x_1, 0); +lean_inc(x_6); +lean_dec(x_1); +x_7 = lean_ctor_get(x_6, 1); +lean_inc(x_7); +lean_dec(x_6); +lean_inc(x_4); +x_8 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_8, 0, x_4); +lean_ctor_set(x_8, 1, x_4); +lean_inc(x_7); +x_9 = lean_apply_2(x_7, lean_box(0), x_8); +lean_inc(x_5); +x_10 = lean_alloc_closure((void*)(l_REPL_pickleCommandSnapshot___rarg___lambda__4), 5, 4); +lean_closure_set(x_10, 0, x_3); +lean_closure_set(x_10, 1, x_7); +lean_closure_set(x_10, 2, x_2); +lean_closure_set(x_10, 3, x_5); +x_11 = lean_apply_4(x_5, lean_box(0), lean_box(0), x_9, x_10); +return x_11; +} +} +LEAN_EXPORT lean_object* l_REPL_pickleCommandSnapshot(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_REPL_pickleCommandSnapshot___rarg), 4, 0); +return x_2; +} +} +LEAN_EXPORT lean_object* l_REPL_recordCommandSnapshot___at_REPL_unpickleCommandSnapshot___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +uint8_t x_4; +x_4 = !lean_is_exclusive(x_2); +if (x_4 == 0) +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; +x_5 = lean_ctor_get(x_2, 0); +x_6 = lean_array_get_size(x_5); +x_7 = lean_array_push(x_5, x_1); +lean_ctor_set(x_2, 0, x_7); +x_8 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_8, 0, x_6); +lean_ctor_set(x_8, 1, x_2); +x_9 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_9, 0, x_8); +lean_ctor_set(x_9, 1, x_3); +return x_9; +} +else +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_10 = lean_ctor_get(x_2, 0); +x_11 = lean_ctor_get(x_2, 1); +lean_inc(x_11); +lean_inc(x_10); +lean_dec(x_2); +x_12 = lean_array_get_size(x_10); +x_13 = lean_array_push(x_10, x_1); +x_14 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_14, 0, x_13); +lean_ctor_set(x_14, 1, x_11); +x_15 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_15, 0, x_12); +lean_ctor_set(x_15, 1, x_14); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_15); +lean_ctor_set(x_16, 1, x_3); +return x_16; +} +} +} +LEAN_EXPORT lean_object* l_REPL_unpickleCommandSnapshot(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_REPL_CommandSnapshot_unpickle_unsafe__1(x_1, 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; uint8_t x_9; +x_5 = lean_ctor_get(x_4, 0); +lean_inc(x_5); +x_6 = lean_ctor_get(x_4, 1); +lean_inc(x_6); +lean_dec(x_4); +x_7 = lean_ctor_get(x_5, 0); +lean_inc(x_7); +lean_dec(x_5); +x_8 = l_REPL_recordCommandSnapshot___at_REPL_unpickleCommandSnapshot___spec__1(x_7, x_2, x_6); +x_9 = !lean_is_exclusive(x_8); +if (x_9 == 0) +{ +lean_object* x_10; uint8_t x_11; +x_10 = lean_ctor_get(x_8, 0); +x_11 = !lean_is_exclusive(x_10); +if (x_11 == 0) +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; +x_12 = lean_ctor_get(x_10, 0); +x_13 = lean_box(0); +x_14 = lean_box(0); +x_15 = lean_alloc_ctor(0, 5, 0); +lean_ctor_set(x_15, 0, x_12); +lean_ctor_set(x_15, 1, x_13); +lean_ctor_set(x_15, 2, x_13); +lean_ctor_set(x_15, 3, x_13); +lean_ctor_set(x_15, 4, x_14); +lean_ctor_set(x_10, 0, x_15); +return x_8; +} +else +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; +x_16 = lean_ctor_get(x_10, 0); +x_17 = lean_ctor_get(x_10, 1); +lean_inc(x_17); +lean_inc(x_16); +lean_dec(x_10); +x_18 = lean_box(0); +x_19 = lean_box(0); +x_20 = lean_alloc_ctor(0, 5, 0); +lean_ctor_set(x_20, 0, x_16); +lean_ctor_set(x_20, 1, x_18); +lean_ctor_set(x_20, 2, x_18); +lean_ctor_set(x_20, 3, x_18); +lean_ctor_set(x_20, 4, x_19); +x_21 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_21, 0, x_20); +lean_ctor_set(x_21, 1, x_17); +lean_ctor_set(x_8, 0, x_21); +return x_8; +} +} +else +{ +lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_22 = lean_ctor_get(x_8, 0); +x_23 = lean_ctor_get(x_8, 1); +lean_inc(x_23); +lean_inc(x_22); +lean_dec(x_8); +x_24 = lean_ctor_get(x_22, 0); +lean_inc(x_24); +x_25 = lean_ctor_get(x_22, 1); +lean_inc(x_25); +if (lean_is_exclusive(x_22)) { + lean_ctor_release(x_22, 0); + lean_ctor_release(x_22, 1); + x_26 = x_22; +} else { + lean_dec_ref(x_22); + x_26 = lean_box(0); +} +x_27 = lean_box(0); +x_28 = lean_box(0); +x_29 = lean_alloc_ctor(0, 5, 0); +lean_ctor_set(x_29, 0, x_24); +lean_ctor_set(x_29, 1, x_27); +lean_ctor_set(x_29, 2, x_27); +lean_ctor_set(x_29, 3, x_27); +lean_ctor_set(x_29, 4, x_28); +if (lean_is_scalar(x_26)) { + x_30 = lean_alloc_ctor(0, 2, 0); +} else { + x_30 = x_26; +} +lean_ctor_set(x_30, 0, x_29); +lean_ctor_set(x_30, 1, x_25); +x_31 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_31, 0, x_30); +lean_ctor_set(x_31, 1, x_23); +return x_31; +} +} +else +{ +uint8_t x_32; +lean_dec(x_2); +x_32 = !lean_is_exclusive(x_4); +if (x_32 == 0) +{ +return x_4; +} +else +{ +lean_object* x_33; lean_object* x_34; lean_object* x_35; +x_33 = lean_ctor_get(x_4, 0); +x_34 = lean_ctor_get(x_4, 1); +lean_inc(x_34); +lean_inc(x_33); +lean_dec(x_4); +x_35 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_35, 0, x_33); +lean_ctor_set(x_35, 1, x_34); +return x_35; +} +} +} +} +LEAN_EXPORT lean_object* l_REPL_unpickleCommandSnapshot___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_REPL_unpickleCommandSnapshot(x_1, x_2, x_3); +lean_dec(x_1); +return x_4; +} +} +LEAN_EXPORT lean_object* l_REPL_pickleProofSnapshot___rarg___lambda__1(lean_object* x_1, lean_object* x_2) { +_start: +{ +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; +x_4 = lean_ctor_get(x_2, 0); +x_5 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_5, 0, x_4); +lean_ctor_set(x_2, 0, x_5); +x_6 = lean_apply_2(x_1, lean_box(0), x_2); +return x_6; +} +else +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_7 = lean_ctor_get(x_2, 0); +x_8 = lean_ctor_get(x_2, 1); +lean_inc(x_8); +lean_inc(x_7); +lean_dec(x_2); +x_9 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_9, 0, x_7); +x_10 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_10, 0, x_9); +lean_ctor_set(x_10, 1, x_8); +x_11 = lean_apply_2(x_1, lean_box(0), x_10); +return x_11; +} +} +} +LEAN_EXPORT lean_object* l_REPL_pickleProofSnapshot___rarg___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) { +_start: +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_7 = lean_ctor_get(x_6, 1); +lean_inc(x_7); +lean_dec(x_6); +x_8 = lean_box(0); +x_9 = l_REPL_createProofStepReponse___rarg(x_1, x_2, x_3, x_8, x_7); +x_10 = lean_alloc_closure((void*)(l_REPL_pickleProofSnapshot___rarg___lambda__1), 2, 1); +lean_closure_set(x_10, 0, x_4); +x_11 = lean_apply_4(x_5, lean_box(0), lean_box(0), x_9, x_10); +return x_11; +} +} +static lean_object* _init_l_REPL_pickleProofSnapshot___rarg___lambda__3___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("Unknown proof State.", 20); +return x_1; +} +} +static lean_object* _init_l_REPL_pickleProofSnapshot___rarg___lambda__3___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_REPL_pickleProofSnapshot___rarg___lambda__3___closed__1; +x_2 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +LEAN_EXPORT lean_object* l_REPL_pickleProofSnapshot___rarg___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) { +_start: +{ +uint8_t x_7; +x_7 = !lean_is_exclusive(x_6); +if (x_7 == 0) +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; +x_8 = lean_ctor_get(x_6, 0); +x_9 = lean_ctor_get(x_6, 1); +x_10 = lean_ctor_get(x_8, 1); +lean_inc(x_10); +lean_dec(x_8); +x_11 = lean_ctor_get(x_1, 0); +lean_inc(x_11); +x_12 = lean_array_get_size(x_10); +x_13 = lean_nat_dec_lt(x_11, x_12); +lean_dec(x_12); +if (x_13 == 0) +{ +lean_object* x_14; lean_object* x_15; +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_1); +x_14 = l_REPL_pickleProofSnapshot___rarg___lambda__3___closed__2; +lean_ctor_set(x_6, 0, x_14); +x_15 = lean_apply_2(x_2, lean_box(0), x_6); +return x_15; +} +else +{ +lean_object* x_16; 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; lean_object* x_25; +lean_free_object(x_6); +x_16 = lean_array_fget(x_10, x_11); +lean_dec(x_11); +lean_dec(x_10); +x_17 = lean_ctor_get(x_1, 1); +lean_inc(x_17); +lean_dec(x_1); +lean_inc(x_16); +x_18 = lean_alloc_closure((void*)(l_REPL_ProofSnapshot_pickle___boxed), 3, 2); +lean_closure_set(x_18, 0, x_16); +lean_closure_set(x_18, 1, x_17); +lean_inc(x_3); +x_19 = lean_apply_2(x_3, lean_box(0), x_18); +lean_inc(x_2); +x_20 = lean_alloc_closure((void*)(l_REPL_pickleCommandSnapshot___rarg___lambda__1), 3, 2); +lean_closure_set(x_20, 0, x_9); +lean_closure_set(x_20, 1, x_2); +lean_inc(x_4); +x_21 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_19, x_20); +lean_inc(x_2); +x_22 = lean_alloc_closure((void*)(l_REPL_pickleCommandSnapshot___rarg___lambda__2), 2, 1); +lean_closure_set(x_22, 0, x_2); +lean_inc(x_4); +x_23 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_21, x_22); +lean_inc(x_4); +x_24 = lean_alloc_closure((void*)(l_REPL_pickleProofSnapshot___rarg___lambda__2), 6, 5); +lean_closure_set(x_24, 0, x_5); +lean_closure_set(x_24, 1, x_3); +lean_closure_set(x_24, 2, x_16); +lean_closure_set(x_24, 3, x_2); +lean_closure_set(x_24, 4, x_4); +x_25 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_23, x_24); +return x_25; +} +} +else +{ +lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; uint8_t x_31; +x_26 = lean_ctor_get(x_6, 0); +x_27 = lean_ctor_get(x_6, 1); +lean_inc(x_27); +lean_inc(x_26); +lean_dec(x_6); +x_28 = lean_ctor_get(x_26, 1); +lean_inc(x_28); +lean_dec(x_26); +x_29 = lean_ctor_get(x_1, 0); +lean_inc(x_29); +x_30 = lean_array_get_size(x_28); +x_31 = lean_nat_dec_lt(x_29, x_30); +lean_dec(x_30); +if (x_31 == 0) +{ +lean_object* x_32; lean_object* x_33; lean_object* x_34; +lean_dec(x_29); +lean_dec(x_28); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_1); +x_32 = l_REPL_pickleProofSnapshot___rarg___lambda__3___closed__2; +x_33 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_33, 0, x_32); +lean_ctor_set(x_33, 1, x_27); +x_34 = lean_apply_2(x_2, lean_box(0), x_33); +return x_34; +} +else +{ +lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; +x_35 = lean_array_fget(x_28, x_29); +lean_dec(x_29); +lean_dec(x_28); +x_36 = lean_ctor_get(x_1, 1); +lean_inc(x_36); +lean_dec(x_1); +lean_inc(x_35); +x_37 = lean_alloc_closure((void*)(l_REPL_ProofSnapshot_pickle___boxed), 3, 2); +lean_closure_set(x_37, 0, x_35); +lean_closure_set(x_37, 1, x_36); +lean_inc(x_3); +x_38 = lean_apply_2(x_3, lean_box(0), x_37); +lean_inc(x_2); +x_39 = lean_alloc_closure((void*)(l_REPL_pickleCommandSnapshot___rarg___lambda__1), 3, 2); +lean_closure_set(x_39, 0, x_27); +lean_closure_set(x_39, 1, x_2); +lean_inc(x_4); +x_40 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_38, x_39); +lean_inc(x_2); +x_41 = lean_alloc_closure((void*)(l_REPL_pickleCommandSnapshot___rarg___lambda__2), 2, 1); +lean_closure_set(x_41, 0, x_2); +lean_inc(x_4); +x_42 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_40, x_41); +lean_inc(x_4); +x_43 = lean_alloc_closure((void*)(l_REPL_pickleProofSnapshot___rarg___lambda__2), 6, 5); +lean_closure_set(x_43, 0, x_5); +lean_closure_set(x_43, 1, x_3); +lean_closure_set(x_43, 2, x_35); +lean_closure_set(x_43, 3, x_2); +lean_closure_set(x_43, 4, x_4); +x_44 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_42, x_43); +return x_44; +} +} +} +} +LEAN_EXPORT lean_object* l_REPL_pickleProofSnapshot___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; 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_5 = lean_ctor_get(x_1, 1); +lean_inc(x_5); +x_6 = lean_ctor_get(x_1, 0); +lean_inc(x_6); +x_7 = lean_ctor_get(x_6, 1); +lean_inc(x_7); +lean_dec(x_6); +lean_inc(x_4); +x_8 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_8, 0, x_4); +lean_ctor_set(x_8, 1, x_4); +lean_inc(x_7); +x_9 = lean_apply_2(x_7, lean_box(0), x_8); +lean_inc(x_5); +x_10 = lean_alloc_closure((void*)(l_REPL_pickleProofSnapshot___rarg___lambda__3), 6, 5); +lean_closure_set(x_10, 0, x_3); +lean_closure_set(x_10, 1, x_7); +lean_closure_set(x_10, 2, x_2); +lean_closure_set(x_10, 3, x_5); +lean_closure_set(x_10, 4, x_1); +x_11 = lean_apply_4(x_5, lean_box(0), lean_box(0), x_9, x_10); +return x_11; +} +} +LEAN_EXPORT lean_object* l_REPL_pickleProofSnapshot(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_REPL_pickleProofSnapshot___rarg), 4, 0); +return x_2; +} +} +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_unpickleProofSnapshot___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +if (lean_obj_tag(x_1) == 0) +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; +x_5 = l_List_reverse___rarg(x_2); +x_6 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_6, 0, x_5); +lean_ctor_set(x_6, 1, x_3); +x_7 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_7, 0, x_6); +lean_ctor_set(x_7, 1, x_4); +return x_7; +} +else +{ +uint8_t x_8; +x_8 = !lean_is_exclusive(x_1); +if (x_8 == 0) +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_9 = lean_ctor_get(x_1, 0); +x_10 = lean_ctor_get(x_1, 1); +x_11 = l_REPL_Message_of(x_9, x_4); +if (lean_obj_tag(x_11) == 0) +{ +lean_object* x_12; lean_object* x_13; +x_12 = lean_ctor_get(x_11, 0); +lean_inc(x_12); +x_13 = lean_ctor_get(x_11, 1); +lean_inc(x_13); +lean_dec(x_11); +lean_ctor_set(x_1, 1, x_2); +lean_ctor_set(x_1, 0, x_12); +{ +lean_object* _tmp_0 = x_10; +lean_object* _tmp_1 = x_1; +lean_object* _tmp_3 = x_13; +x_1 = _tmp_0; +x_2 = _tmp_1; +x_4 = _tmp_3; +} +goto _start; +} +else +{ +uint8_t x_15; +lean_free_object(x_1); +lean_dec(x_10); +lean_dec(x_3); +lean_dec(x_2); +x_15 = !lean_is_exclusive(x_11); +if (x_15 == 0) +{ +return x_11; +} +else +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_16 = lean_ctor_get(x_11, 0); +x_17 = lean_ctor_get(x_11, 1); +lean_inc(x_17); +lean_inc(x_16); +lean_dec(x_11); +x_18 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_18, 0, x_16); +lean_ctor_set(x_18, 1, x_17); +return x_18; +} +} +} +else +{ +lean_object* x_19; lean_object* x_20; lean_object* x_21; +x_19 = lean_ctor_get(x_1, 0); +x_20 = lean_ctor_get(x_1, 1); +lean_inc(x_20); +lean_inc(x_19); +lean_dec(x_1); +x_21 = l_REPL_Message_of(x_19, x_4); +if (lean_obj_tag(x_21) == 0) +{ +lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_22 = lean_ctor_get(x_21, 0); +lean_inc(x_22); +x_23 = lean_ctor_get(x_21, 1); +lean_inc(x_23); +lean_dec(x_21); +x_24 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_24, 0, x_22); +lean_ctor_set(x_24, 1, x_2); +x_1 = x_20; +x_2 = x_24; +x_4 = x_23; +goto _start; +} +else +{ +lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; +lean_dec(x_20); +lean_dec(x_3); +lean_dec(x_2); +x_26 = lean_ctor_get(x_21, 0); +lean_inc(x_26); +x_27 = lean_ctor_get(x_21, 1); +lean_inc(x_27); +if (lean_is_exclusive(x_21)) { + lean_ctor_release(x_21, 0); + lean_ctor_release(x_21, 1); + x_28 = x_21; +} else { + lean_dec_ref(x_21); + x_28 = lean_box(0); +} +if (lean_is_scalar(x_28)) { + x_29 = lean_alloc_ctor(1, 2, 0); +} else { + x_29 = x_28; +} +lean_ctor_set(x_29, 0, x_26); +lean_ctor_set(x_29, 1, x_27); +return x_29; +} +} +} +} +} +LEAN_EXPORT lean_object* l_REPL_recordProofSnapshot___at_REPL_unpickleProofSnapshot___spec__4(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +uint8_t x_4; +x_4 = !lean_is_exclusive(x_2); +if (x_4 == 0) +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; +x_5 = lean_ctor_get(x_2, 1); +x_6 = lean_array_get_size(x_5); +x_7 = lean_array_push(x_5, x_1); +lean_ctor_set(x_2, 1, x_7); +x_8 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_8, 0, x_6); +lean_ctor_set(x_8, 1, x_2); +x_9 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_9, 0, x_8); +lean_ctor_set(x_9, 1, x_3); +return x_9; +} +else +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_10 = lean_ctor_get(x_2, 0); +x_11 = lean_ctor_get(x_2, 1); +lean_inc(x_11); +lean_inc(x_10); +lean_dec(x_2); +x_12 = lean_array_get_size(x_11); +x_13 = lean_array_push(x_11, x_1); +x_14 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_14, 0, x_10); +lean_ctor_set(x_14, 1, x_13); +x_15 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_15, 0, x_12); +lean_ctor_set(x_15, 1, x_14); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_15); +lean_ctor_set(x_16, 1, x_3); +return x_16; +} +} +} +static lean_object* _init_l_panic___at_REPL_unpickleProofSnapshot___spec__5___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = l_EStateM_instMonadEStateM(lean_box(0), lean_box(0)); +return x_1; +} +} +static lean_object* _init_l_panic___at_REPL_unpickleProofSnapshot___spec__5___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_panic___at_REPL_unpickleProofSnapshot___spec__5___closed__1; +x_2 = l_StateT_instMonadStateT___rarg(x_1); +return x_2; +} +} +static lean_object* _init_l_panic___at_REPL_unpickleProofSnapshot___spec__5___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_panic___at_REPL_unpickleProofSnapshot___spec__5___closed__2; +x_2 = l_panic___at_REPL_sorries___spec__2___rarg___closed__1; +x_3 = l_instInhabited___rarg(x_1, x_2); +return x_3; +} +} +LEAN_EXPORT lean_object* l_panic___at_REPL_unpickleProofSnapshot___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_4 = l_panic___at_REPL_unpickleProofSnapshot___spec__5___closed__3; +x_5 = lean_panic_fn(x_4, x_1); +x_6 = lean_apply_2(x_5, x_2, x_3); +return x_6; +} +} +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_unpickleProofSnapshot___spec__6___lambda__1(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 = lean_ctor_get(x_3, 1); +lean_inc(x_6); +if (lean_obj_tag(x_6) == 0) +{ +uint8_t x_7; +x_7 = !lean_is_exclusive(x_3); +if (x_7 == 0) +{ +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_3, 0); +x_9 = lean_ctor_get(x_3, 1); +lean_dec(x_9); +x_10 = lean_box(0); +x_11 = l_REPL_Sorry_of(x_8, x_1, x_2, x_10); +lean_ctor_set(x_3, 1, x_4); +lean_ctor_set(x_3, 0, x_11); +x_12 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_12, 0, x_3); +lean_ctor_set(x_12, 1, x_5); +return x_12; +} +else +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_13 = lean_ctor_get(x_3, 0); +lean_inc(x_13); +lean_dec(x_3); +x_14 = lean_box(0); +x_15 = l_REPL_Sorry_of(x_13, x_1, x_2, x_14); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_15); +lean_ctor_set(x_16, 1, x_4); +x_17 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_17, 0, x_16); +lean_ctor_set(x_17, 1, x_5); +return x_17; +} +} +else +{ +lean_object* x_18; uint8_t x_19; +x_18 = lean_ctor_get(x_3, 0); +lean_inc(x_18); +lean_dec(x_3); +x_19 = !lean_is_exclusive(x_6); +if (x_19 == 0) +{ +lean_object* x_20; lean_object* x_21; uint8_t x_22; +x_20 = lean_ctor_get(x_6, 0); +x_21 = l_REPL_recordProofSnapshot___at_REPL_unpickleProofSnapshot___spec__4(x_20, x_4, x_5); +x_22 = !lean_is_exclusive(x_21); +if (x_22 == 0) +{ +lean_object* x_23; uint8_t x_24; +x_23 = lean_ctor_get(x_21, 0); +x_24 = !lean_is_exclusive(x_23); +if (x_24 == 0) +{ +lean_object* x_25; lean_object* x_26; +x_25 = lean_ctor_get(x_23, 0); +lean_ctor_set(x_6, 0, x_25); +x_26 = l_REPL_Sorry_of(x_18, x_1, x_2, x_6); +lean_ctor_set(x_23, 0, x_26); +return x_21; +} +else +{ +lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; +x_27 = lean_ctor_get(x_23, 0); +x_28 = lean_ctor_get(x_23, 1); +lean_inc(x_28); +lean_inc(x_27); +lean_dec(x_23); +lean_ctor_set(x_6, 0, x_27); +x_29 = l_REPL_Sorry_of(x_18, x_1, x_2, x_6); +x_30 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_30, 0, x_29); +lean_ctor_set(x_30, 1, x_28); +lean_ctor_set(x_21, 0, x_30); +return x_21; +} +} +else +{ +lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; +x_31 = lean_ctor_get(x_21, 0); +x_32 = lean_ctor_get(x_21, 1); +lean_inc(x_32); +lean_inc(x_31); +lean_dec(x_21); +x_33 = lean_ctor_get(x_31, 0); +lean_inc(x_33); +x_34 = lean_ctor_get(x_31, 1); +lean_inc(x_34); +if (lean_is_exclusive(x_31)) { + lean_ctor_release(x_31, 0); + lean_ctor_release(x_31, 1); + x_35 = x_31; +} else { + lean_dec_ref(x_31); + x_35 = lean_box(0); +} +lean_ctor_set(x_6, 0, x_33); +x_36 = l_REPL_Sorry_of(x_18, x_1, x_2, x_6); +if (lean_is_scalar(x_35)) { + x_37 = lean_alloc_ctor(0, 2, 0); +} else { + x_37 = x_35; +} +lean_ctor_set(x_37, 0, x_36); +lean_ctor_set(x_37, 1, x_34); +x_38 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_38, 0, x_37); +lean_ctor_set(x_38, 1, x_32); +return x_38; +} +} +else +{ +lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; +x_39 = lean_ctor_get(x_6, 0); +lean_inc(x_39); +lean_dec(x_6); +x_40 = l_REPL_recordProofSnapshot___at_REPL_unpickleProofSnapshot___spec__4(x_39, x_4, x_5); +x_41 = lean_ctor_get(x_40, 0); +lean_inc(x_41); +x_42 = lean_ctor_get(x_40, 1); +lean_inc(x_42); +if (lean_is_exclusive(x_40)) { + lean_ctor_release(x_40, 0); + lean_ctor_release(x_40, 1); + x_43 = x_40; +} else { + lean_dec_ref(x_40); + x_43 = lean_box(0); +} +x_44 = lean_ctor_get(x_41, 0); +lean_inc(x_44); +x_45 = lean_ctor_get(x_41, 1); +lean_inc(x_45); +if (lean_is_exclusive(x_41)) { + lean_ctor_release(x_41, 0); + lean_ctor_release(x_41, 1); + x_46 = x_41; +} else { + lean_dec_ref(x_41); + x_46 = lean_box(0); +} +x_47 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_47, 0, x_44); +x_48 = l_REPL_Sorry_of(x_18, x_1, x_2, x_47); +if (lean_is_scalar(x_46)) { + x_49 = lean_alloc_ctor(0, 2, 0); +} else { + x_49 = x_46; +} +lean_ctor_set(x_49, 0, x_48); +lean_ctor_set(x_49, 1, x_45); +if (lean_is_scalar(x_43)) { + x_50 = lean_alloc_ctor(0, 2, 0); +} else { + x_50 = x_43; +} +lean_ctor_set(x_50, 0, x_49); +lean_ctor_set(x_50, 1, x_42); +return x_50; +} +} +} +} +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_unpickleProofSnapshot___spec__6(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_2) == 0) +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; +lean_dec(x_1); +x_6 = l_List_reverse___rarg(x_3); +x_7 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_7, 0, x_6); +lean_ctor_set(x_7, 1, x_4); +x_8 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_8, 0, x_7); +lean_ctor_set(x_8, 1, x_5); +return x_8; +} +else +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_19; lean_object* x_20; lean_object* x_21; +x_9 = lean_ctor_get(x_2, 0); +lean_inc(x_9); +x_10 = lean_ctor_get(x_2, 1); +lean_inc(x_10); +if (lean_is_exclusive(x_2)) { + lean_ctor_release(x_2, 0); + lean_ctor_release(x_2, 1); + x_11 = x_2; +} else { + lean_dec_ref(x_2); + x_11 = lean_box(0); +} +x_19 = lean_ctor_get(x_9, 1); +lean_inc(x_19); +x_20 = lean_ctor_get(x_19, 1); +lean_inc(x_20); +x_21 = lean_ctor_get(x_19, 0); +lean_inc(x_21); +lean_dec(x_19); +if (lean_obj_tag(x_21) == 0) +{ +lean_object* x_22; uint8_t x_23; +x_22 = lean_ctor_get(x_9, 0); +lean_inc(x_22); +lean_dec(x_9); +x_23 = !lean_is_exclusive(x_20); +if (x_23 == 0) +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; +x_24 = lean_ctor_get(x_20, 0); +x_25 = lean_ctor_get(x_20, 1); +x_26 = lean_ctor_get(x_21, 0); +lean_inc(x_26); +lean_dec(x_21); +x_27 = lean_box(0); +x_28 = lean_box(0); +x_29 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_29, 0, x_26); +lean_ctor_set(x_29, 1, x_28); +lean_inc(x_1); +x_30 = l_REPL_ProofSnapshot_create(x_22, x_27, x_1, x_29, x_28, x_5); +lean_dec(x_22); +if (lean_obj_tag(x_30) == 0) +{ +lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_31 = lean_ctor_get(x_30, 0); +lean_inc(x_31); +x_32 = lean_ctor_get(x_30, 1); +lean_inc(x_32); +lean_dec(x_30); +lean_inc(x_31); +x_33 = l_REPL_ProofSnapshot_ppGoals(x_31, x_32); +if (lean_obj_tag(x_33) == 0) +{ +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; lean_object* x_41; lean_object* x_42; +x_34 = lean_ctor_get(x_33, 0); +lean_inc(x_34); +x_35 = lean_ctor_get(x_33, 1); +lean_inc(x_35); +lean_dec(x_33); +x_36 = l_List_mapTR_loop___at_REPL_sorries___spec__1(x_34, x_28); +x_37 = l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__8___closed__1; +x_38 = l_String_intercalate(x_37, x_36); +x_39 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_39, 0, x_31); +lean_ctor_set(x_20, 1, x_39); +lean_ctor_set(x_20, 0, x_38); +x_40 = l_List_mapM_loop___at_REPL_unpickleProofSnapshot___spec__6___lambda__1(x_24, x_25, x_20, x_4, x_35); +lean_dec(x_25); +lean_dec(x_24); +x_41 = lean_ctor_get(x_40, 0); +lean_inc(x_41); +x_42 = lean_ctor_get(x_40, 1); +lean_inc(x_42); +lean_dec(x_40); +x_12 = x_41; +x_13 = x_42; +goto block_18; +} +else +{ +uint8_t x_43; +lean_dec(x_31); +lean_free_object(x_20); +lean_dec(x_25); +lean_dec(x_24); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_1); +x_43 = !lean_is_exclusive(x_33); +if (x_43 == 0) +{ +return x_33; +} +else +{ +lean_object* x_44; lean_object* x_45; lean_object* x_46; +x_44 = lean_ctor_get(x_33, 0); +x_45 = lean_ctor_get(x_33, 1); +lean_inc(x_45); +lean_inc(x_44); +lean_dec(x_33); +x_46 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_46, 0, x_44); +lean_ctor_set(x_46, 1, x_45); +return x_46; +} +} +} +else +{ +uint8_t x_47; +lean_free_object(x_20); +lean_dec(x_25); +lean_dec(x_24); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_1); +x_47 = !lean_is_exclusive(x_30); +if (x_47 == 0) +{ +return x_30; +} +else +{ +lean_object* x_48; lean_object* x_49; lean_object* x_50; +x_48 = lean_ctor_get(x_30, 0); +x_49 = lean_ctor_get(x_30, 1); +lean_inc(x_49); +lean_inc(x_48); +lean_dec(x_30); +x_50 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_50, 0, x_48); +lean_ctor_set(x_50, 1, 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; +x_51 = lean_ctor_get(x_20, 0); +x_52 = lean_ctor_get(x_20, 1); +lean_inc(x_52); +lean_inc(x_51); +lean_dec(x_20); +x_53 = lean_ctor_get(x_21, 0); +lean_inc(x_53); +lean_dec(x_21); +x_54 = lean_box(0); +x_55 = lean_box(0); +x_56 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_56, 0, x_53); +lean_ctor_set(x_56, 1, x_55); +lean_inc(x_1); +x_57 = l_REPL_ProofSnapshot_create(x_22, x_54, x_1, x_56, x_55, x_5); +lean_dec(x_22); +if (lean_obj_tag(x_57) == 0) +{ +lean_object* x_58; lean_object* x_59; lean_object* x_60; +x_58 = lean_ctor_get(x_57, 0); +lean_inc(x_58); +x_59 = lean_ctor_get(x_57, 1); +lean_inc(x_59); +lean_dec(x_57); +lean_inc(x_58); +x_60 = l_REPL_ProofSnapshot_ppGoals(x_58, x_59); +if (lean_obj_tag(x_60) == 0) +{ +lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; +x_61 = lean_ctor_get(x_60, 0); +lean_inc(x_61); +x_62 = lean_ctor_get(x_60, 1); +lean_inc(x_62); +lean_dec(x_60); +x_63 = l_List_mapTR_loop___at_REPL_sorries___spec__1(x_61, x_55); +x_64 = l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__8___closed__1; +x_65 = l_String_intercalate(x_64, x_63); +x_66 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_66, 0, x_58); +x_67 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_67, 0, x_65); +lean_ctor_set(x_67, 1, x_66); +x_68 = l_List_mapM_loop___at_REPL_unpickleProofSnapshot___spec__6___lambda__1(x_51, x_52, x_67, x_4, x_62); +lean_dec(x_52); +lean_dec(x_51); +x_69 = lean_ctor_get(x_68, 0); +lean_inc(x_69); +x_70 = lean_ctor_get(x_68, 1); +lean_inc(x_70); +lean_dec(x_68); +x_12 = x_69; +x_13 = x_70; +goto block_18; +} +else +{ +lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; +lean_dec(x_58); +lean_dec(x_52); +lean_dec(x_51); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_1); +x_71 = lean_ctor_get(x_60, 0); +lean_inc(x_71); +x_72 = lean_ctor_get(x_60, 1); +lean_inc(x_72); +if (lean_is_exclusive(x_60)) { + lean_ctor_release(x_60, 0); + lean_ctor_release(x_60, 1); + x_73 = x_60; +} else { + lean_dec_ref(x_60); + x_73 = lean_box(0); +} +if (lean_is_scalar(x_73)) { + x_74 = lean_alloc_ctor(1, 2, 0); +} else { + x_74 = x_73; +} +lean_ctor_set(x_74, 0, x_71); +lean_ctor_set(x_74, 1, x_72); +return x_74; +} +} +else +{ +lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; +lean_dec(x_52); +lean_dec(x_51); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_1); +x_75 = lean_ctor_get(x_57, 0); +lean_inc(x_75); +x_76 = lean_ctor_get(x_57, 1); +lean_inc(x_76); +if (lean_is_exclusive(x_57)) { + lean_ctor_release(x_57, 0); + lean_ctor_release(x_57, 1); + x_77 = x_57; +} else { + lean_dec_ref(x_57); + x_77 = lean_box(0); +} +if (lean_is_scalar(x_77)) { + x_78 = lean_alloc_ctor(1, 2, 0); +} else { + x_78 = x_77; +} +lean_ctor_set(x_78, 0, x_75); +lean_ctor_set(x_78, 1, x_76); +return x_78; +} +} +} +else +{ +lean_object* x_79; +x_79 = lean_ctor_get(x_21, 1); +lean_inc(x_79); +if (lean_obj_tag(x_79) == 0) +{ +lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; +lean_dec(x_21); +lean_dec(x_9); +x_80 = lean_ctor_get(x_20, 0); +lean_inc(x_80); +x_81 = lean_ctor_get(x_20, 1); +lean_inc(x_81); +lean_dec(x_20); +x_82 = l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___closed__4; +x_83 = l_panic___at_REPL_unpickleProofSnapshot___spec__5(x_82, x_4, x_5); +if (lean_obj_tag(x_83) == 0) +{ +lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; +x_84 = lean_ctor_get(x_83, 0); +lean_inc(x_84); +x_85 = lean_ctor_get(x_83, 1); +lean_inc(x_85); +lean_dec(x_83); +x_86 = lean_ctor_get(x_84, 0); +lean_inc(x_86); +x_87 = lean_ctor_get(x_84, 1); +lean_inc(x_87); +lean_dec(x_84); +x_88 = l_List_mapM_loop___at_REPL_unpickleProofSnapshot___spec__6___lambda__1(x_80, x_81, x_86, x_87, x_85); +lean_dec(x_81); +lean_dec(x_80); +x_89 = lean_ctor_get(x_88, 0); +lean_inc(x_89); +x_90 = lean_ctor_get(x_88, 1); +lean_inc(x_90); +lean_dec(x_88); +x_12 = x_89; +x_13 = x_90; +goto block_18; +} +else +{ +uint8_t x_91; +lean_dec(x_81); +lean_dec(x_80); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_3); +lean_dec(x_1); +x_91 = !lean_is_exclusive(x_83); +if (x_91 == 0) +{ +return x_83; +} +else +{ +lean_object* x_92; lean_object* x_93; lean_object* x_94; +x_92 = lean_ctor_get(x_83, 0); +x_93 = lean_ctor_get(x_83, 1); +lean_inc(x_93); +lean_inc(x_92); +lean_dec(x_83); +x_94 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_94, 0, x_92); +lean_ctor_set(x_94, 1, x_93); +return x_94; +} +} +} +else +{ +lean_object* x_95; uint8_t x_96; +x_95 = lean_ctor_get(x_9, 0); +lean_inc(x_95); +lean_dec(x_9); +x_96 = !lean_is_exclusive(x_20); +if (x_96 == 0) +{ +lean_object* x_97; lean_object* x_98; lean_object* x_99; uint8_t x_100; +x_97 = lean_ctor_get(x_20, 0); +x_98 = lean_ctor_get(x_20, 1); +x_99 = lean_ctor_get(x_21, 0); +lean_inc(x_99); +lean_dec(x_21); +x_100 = !lean_is_exclusive(x_79); +if (x_100 == 0) +{ +lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; +x_101 = lean_ctor_get(x_79, 0); +lean_ctor_set(x_79, 0, x_99); +x_102 = lean_box(0); +x_103 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_103, 0, x_101); +lean_ctor_set(x_103, 1, x_102); +lean_inc(x_1); +x_104 = l_REPL_ProofSnapshot_create(x_95, x_79, x_1, x_102, x_103, x_5); +lean_dec(x_95); +if (lean_obj_tag(x_104) == 0) +{ +lean_object* x_105; lean_object* x_106; lean_object* x_107; +x_105 = lean_ctor_get(x_104, 0); +lean_inc(x_105); +x_106 = lean_ctor_get(x_104, 1); +lean_inc(x_106); +lean_dec(x_104); +lean_inc(x_105); +x_107 = l_REPL_ProofSnapshot_ppGoals(x_105, x_106); +if (lean_obj_tag(x_107) == 0) +{ +lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; +x_108 = lean_ctor_get(x_107, 0); +lean_inc(x_108); +x_109 = lean_ctor_get(x_107, 1); +lean_inc(x_109); +lean_dec(x_107); +x_110 = l_List_mapTR_loop___at_REPL_sorries___spec__1(x_108, x_102); +x_111 = l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__8___closed__1; +x_112 = l_String_intercalate(x_111, x_110); +x_113 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_113, 0, x_105); +lean_ctor_set(x_20, 1, x_113); +lean_ctor_set(x_20, 0, x_112); +x_114 = l_List_mapM_loop___at_REPL_unpickleProofSnapshot___spec__6___lambda__1(x_97, x_98, x_20, x_4, x_109); +lean_dec(x_98); +lean_dec(x_97); +x_115 = lean_ctor_get(x_114, 0); +lean_inc(x_115); +x_116 = lean_ctor_get(x_114, 1); +lean_inc(x_116); +lean_dec(x_114); +x_12 = x_115; +x_13 = x_116; +goto block_18; +} +else +{ +uint8_t x_117; +lean_dec(x_105); +lean_free_object(x_20); +lean_dec(x_98); +lean_dec(x_97); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_1); +x_117 = !lean_is_exclusive(x_107); +if (x_117 == 0) +{ +return x_107; +} +else +{ +lean_object* x_118; lean_object* x_119; lean_object* x_120; +x_118 = lean_ctor_get(x_107, 0); +x_119 = lean_ctor_get(x_107, 1); +lean_inc(x_119); +lean_inc(x_118); +lean_dec(x_107); +x_120 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_120, 0, x_118); +lean_ctor_set(x_120, 1, x_119); +return x_120; +} +} +} +else +{ +uint8_t x_121; +lean_free_object(x_20); +lean_dec(x_98); +lean_dec(x_97); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_1); +x_121 = !lean_is_exclusive(x_104); +if (x_121 == 0) +{ +return x_104; +} +else +{ +lean_object* x_122; lean_object* x_123; lean_object* x_124; +x_122 = lean_ctor_get(x_104, 0); +x_123 = lean_ctor_get(x_104, 1); +lean_inc(x_123); +lean_inc(x_122); +lean_dec(x_104); +x_124 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_124, 0, x_122); +lean_ctor_set(x_124, 1, x_123); +return x_124; +} +} +} +else +{ +lean_object* x_125; lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; +x_125 = lean_ctor_get(x_79, 0); +lean_inc(x_125); +lean_dec(x_79); +x_126 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_126, 0, x_99); +x_127 = lean_box(0); +x_128 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_128, 0, x_125); +lean_ctor_set(x_128, 1, x_127); +lean_inc(x_1); +x_129 = l_REPL_ProofSnapshot_create(x_95, x_126, x_1, x_127, x_128, x_5); +lean_dec(x_95); +if (lean_obj_tag(x_129) == 0) +{ +lean_object* x_130; lean_object* x_131; lean_object* x_132; +x_130 = lean_ctor_get(x_129, 0); +lean_inc(x_130); +x_131 = lean_ctor_get(x_129, 1); +lean_inc(x_131); +lean_dec(x_129); +lean_inc(x_130); +x_132 = l_REPL_ProofSnapshot_ppGoals(x_130, x_131); +if (lean_obj_tag(x_132) == 0) +{ +lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; +x_133 = lean_ctor_get(x_132, 0); +lean_inc(x_133); +x_134 = lean_ctor_get(x_132, 1); +lean_inc(x_134); +lean_dec(x_132); +x_135 = l_List_mapTR_loop___at_REPL_sorries___spec__1(x_133, x_127); +x_136 = l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__8___closed__1; +x_137 = l_String_intercalate(x_136, x_135); +x_138 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_138, 0, x_130); +lean_ctor_set(x_20, 1, x_138); +lean_ctor_set(x_20, 0, x_137); +x_139 = l_List_mapM_loop___at_REPL_unpickleProofSnapshot___spec__6___lambda__1(x_97, x_98, x_20, x_4, x_134); +lean_dec(x_98); +lean_dec(x_97); +x_140 = lean_ctor_get(x_139, 0); +lean_inc(x_140); +x_141 = lean_ctor_get(x_139, 1); +lean_inc(x_141); +lean_dec(x_139); +x_12 = x_140; +x_13 = x_141; +goto block_18; +} +else +{ +lean_object* x_142; lean_object* x_143; lean_object* x_144; lean_object* x_145; +lean_dec(x_130); +lean_free_object(x_20); +lean_dec(x_98); +lean_dec(x_97); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_1); +x_142 = lean_ctor_get(x_132, 0); +lean_inc(x_142); +x_143 = lean_ctor_get(x_132, 1); +lean_inc(x_143); +if (lean_is_exclusive(x_132)) { + lean_ctor_release(x_132, 0); + lean_ctor_release(x_132, 1); + x_144 = x_132; +} else { + lean_dec_ref(x_132); + x_144 = lean_box(0); +} +if (lean_is_scalar(x_144)) { + x_145 = lean_alloc_ctor(1, 2, 0); +} else { + x_145 = x_144; +} +lean_ctor_set(x_145, 0, x_142); +lean_ctor_set(x_145, 1, x_143); +return x_145; +} +} +else +{ +lean_object* x_146; lean_object* x_147; lean_object* x_148; lean_object* x_149; +lean_free_object(x_20); +lean_dec(x_98); +lean_dec(x_97); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_1); +x_146 = lean_ctor_get(x_129, 0); +lean_inc(x_146); +x_147 = lean_ctor_get(x_129, 1); +lean_inc(x_147); +if (lean_is_exclusive(x_129)) { + lean_ctor_release(x_129, 0); + lean_ctor_release(x_129, 1); + x_148 = x_129; +} else { + lean_dec_ref(x_129); + x_148 = lean_box(0); +} +if (lean_is_scalar(x_148)) { + x_149 = lean_alloc_ctor(1, 2, 0); +} else { + x_149 = x_148; +} +lean_ctor_set(x_149, 0, x_146); +lean_ctor_set(x_149, 1, x_147); +return x_149; +} +} +} +else +{ +lean_object* x_150; lean_object* x_151; lean_object* x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_158; +x_150 = lean_ctor_get(x_20, 0); +x_151 = lean_ctor_get(x_20, 1); +lean_inc(x_151); +lean_inc(x_150); +lean_dec(x_20); +x_152 = lean_ctor_get(x_21, 0); +lean_inc(x_152); +lean_dec(x_21); +x_153 = lean_ctor_get(x_79, 0); +lean_inc(x_153); +if (lean_is_exclusive(x_79)) { + lean_ctor_release(x_79, 0); + x_154 = x_79; +} else { + lean_dec_ref(x_79); + x_154 = lean_box(0); +} +if (lean_is_scalar(x_154)) { + x_155 = lean_alloc_ctor(1, 1, 0); +} else { + x_155 = x_154; +} +lean_ctor_set(x_155, 0, x_152); +x_156 = lean_box(0); +x_157 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_157, 0, x_153); +lean_ctor_set(x_157, 1, x_156); +lean_inc(x_1); +x_158 = l_REPL_ProofSnapshot_create(x_95, x_155, x_1, x_156, x_157, x_5); +lean_dec(x_95); +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); +x_160 = lean_ctor_get(x_158, 1); +lean_inc(x_160); +lean_dec(x_158); +lean_inc(x_159); +x_161 = l_REPL_ProofSnapshot_ppGoals(x_159, x_160); +if (lean_obj_tag(x_161) == 0) +{ +lean_object* x_162; lean_object* x_163; lean_object* x_164; lean_object* x_165; lean_object* x_166; lean_object* x_167; lean_object* x_168; lean_object* x_169; lean_object* x_170; lean_object* x_171; +x_162 = lean_ctor_get(x_161, 0); +lean_inc(x_162); +x_163 = lean_ctor_get(x_161, 1); +lean_inc(x_163); +lean_dec(x_161); +x_164 = l_List_mapTR_loop___at_REPL_sorries___spec__1(x_162, x_156); +x_165 = l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__8___closed__1; +x_166 = l_String_intercalate(x_165, x_164); +x_167 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_167, 0, x_159); +x_168 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_168, 0, x_166); +lean_ctor_set(x_168, 1, x_167); +x_169 = l_List_mapM_loop___at_REPL_unpickleProofSnapshot___spec__6___lambda__1(x_150, x_151, x_168, x_4, x_163); +lean_dec(x_151); +lean_dec(x_150); +x_170 = lean_ctor_get(x_169, 0); +lean_inc(x_170); +x_171 = lean_ctor_get(x_169, 1); +lean_inc(x_171); +lean_dec(x_169); +x_12 = x_170; +x_13 = x_171; +goto block_18; +} +else +{ +lean_object* x_172; lean_object* x_173; lean_object* x_174; lean_object* x_175; +lean_dec(x_159); +lean_dec(x_151); +lean_dec(x_150); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_1); +x_172 = lean_ctor_get(x_161, 0); +lean_inc(x_172); +x_173 = lean_ctor_get(x_161, 1); +lean_inc(x_173); +if (lean_is_exclusive(x_161)) { + lean_ctor_release(x_161, 0); + lean_ctor_release(x_161, 1); + x_174 = x_161; +} else { + lean_dec_ref(x_161); + x_174 = lean_box(0); +} +if (lean_is_scalar(x_174)) { + x_175 = lean_alloc_ctor(1, 2, 0); +} else { + x_175 = x_174; +} +lean_ctor_set(x_175, 0, x_172); +lean_ctor_set(x_175, 1, x_173); +return x_175; +} +} +else +{ +lean_object* x_176; lean_object* x_177; lean_object* x_178; lean_object* x_179; +lean_dec(x_151); +lean_dec(x_150); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_1); +x_176 = lean_ctor_get(x_158, 0); +lean_inc(x_176); +x_177 = lean_ctor_get(x_158, 1); +lean_inc(x_177); +if (lean_is_exclusive(x_158)) { + lean_ctor_release(x_158, 0); + lean_ctor_release(x_158, 1); + x_178 = x_158; +} else { + lean_dec_ref(x_158); + x_178 = lean_box(0); +} +if (lean_is_scalar(x_178)) { + x_179 = lean_alloc_ctor(1, 2, 0); +} else { + x_179 = x_178; +} +lean_ctor_set(x_179, 0, x_176); +lean_ctor_set(x_179, 1, x_177); +return x_179; +} +} +} +} +block_18: +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_14 = lean_ctor_get(x_12, 0); +lean_inc(x_14); +x_15 = lean_ctor_get(x_12, 1); +lean_inc(x_15); +lean_dec(x_12); +if (lean_is_scalar(x_11)) { + x_16 = lean_alloc_ctor(1, 2, 0); +} else { + x_16 = x_11; +} +lean_ctor_set(x_16, 0, x_14); +lean_ctor_set(x_16, 1, x_3); +x_2 = x_10; +x_3 = x_16; +x_4 = x_15; +x_5 = x_13; +goto _start; +} +} +} +} +LEAN_EXPORT lean_object* l_REPL_sorries___at_REPL_unpickleProofSnapshot___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; +x_5 = lean_box(0); +x_6 = l_List_mapTR_loop___at_REPL_sorries___spec__3(x_1, x_5); +x_7 = l_List_join___rarg(x_6); +x_8 = l_List_mapM_loop___at_REPL_unpickleProofSnapshot___spec__6(x_2, x_7, x_5, x_3, x_4); +return x_8; +} +} +LEAN_EXPORT lean_object* l_List_mapTR_loop___at_REPL_unpickleProofSnapshot___spec__7(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +if (lean_obj_tag(x_2) == 0) +{ +lean_object* x_4; +lean_dec(x_1); +x_4 = l_List_reverse___rarg(x_3); +return x_4; +} +else +{ +uint8_t x_5; +x_5 = !lean_is_exclusive(x_2); +if (x_5 == 0) +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; +x_6 = lean_ctor_get(x_2, 0); +x_7 = lean_ctor_get(x_2, 1); +lean_inc(x_1); +x_8 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_8, 0, x_1); +lean_ctor_set(x_8, 1, x_6); +lean_ctor_set(x_2, 1, x_3); +lean_ctor_set(x_2, 0, x_8); +{ +lean_object* _tmp_1 = x_7; +lean_object* _tmp_2 = x_2; +x_2 = _tmp_1; +x_3 = _tmp_2; +} +goto _start; +} +else +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_10 = lean_ctor_get(x_2, 0); +x_11 = lean_ctor_get(x_2, 1); +lean_inc(x_11); +lean_inc(x_10); +lean_dec(x_2); +lean_inc(x_1); +x_12 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_12, 0, x_1); +lean_ctor_set(x_12, 1, x_10); +x_13 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_13, 0, x_12); +lean_ctor_set(x_13, 1, x_3); +x_2 = x_11; +x_3 = x_13; +goto _start; +} +} +} +} +LEAN_EXPORT lean_object* l_REPL_createProofStepReponse___at_REPL_unpickleProofSnapshot___spec__1___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, lean_object* x_7) { +_start: +{ +lean_object* x_8; lean_object* x_9; +x_8 = lean_box(0); +x_9 = l_REPL_sorries___at_REPL_unpickleProofSnapshot___spec__3(x_5, x_8, x_6, x_7); +if (lean_obj_tag(x_9) == 0) +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; uint8_t x_17; +x_10 = lean_ctor_get(x_9, 0); +lean_inc(x_10); +x_11 = lean_ctor_get(x_9, 1); +lean_inc(x_11); +lean_dec(x_9); +x_12 = lean_ctor_get(x_10, 0); +lean_inc(x_12); +x_13 = lean_ctor_get(x_10, 1); +lean_inc(x_13); +lean_dec(x_10); +lean_inc(x_1); +x_14 = l_REPL_recordProofSnapshot___at_REPL_unpickleProofSnapshot___spec__4(x_1, x_13, x_11); +x_15 = lean_ctor_get(x_14, 0); +lean_inc(x_15); +x_16 = lean_ctor_get(x_14, 1); +lean_inc(x_16); +lean_dec(x_14); +x_17 = !lean_is_exclusive(x_15); +if (x_17 == 0) +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_18 = lean_ctor_get(x_15, 0); +x_19 = lean_ctor_get(x_15, 1); +x_20 = l_REPL_ProofSnapshot_ppGoals(x_1, x_16); +if (lean_obj_tag(x_20) == 0) +{ +uint8_t x_21; +x_21 = !lean_is_exclusive(x_20); +if (x_21 == 0) +{ +lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_22 = lean_ctor_get(x_20, 0); +x_23 = l_List_mapTR_loop___at_REPL_sorries___spec__1(x_22, x_2); +x_24 = lean_alloc_ctor(0, 5, 0); +lean_ctor_set(x_24, 0, x_18); +lean_ctor_set(x_24, 1, x_23); +lean_ctor_set(x_24, 2, x_3); +lean_ctor_set(x_24, 3, x_12); +lean_ctor_set(x_24, 4, x_4); +lean_ctor_set(x_15, 0, x_24); +lean_ctor_set(x_20, 0, x_15); +return x_20; +} +else +{ +lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_25 = lean_ctor_get(x_20, 0); +x_26 = lean_ctor_get(x_20, 1); +lean_inc(x_26); +lean_inc(x_25); +lean_dec(x_20); +x_27 = l_List_mapTR_loop___at_REPL_sorries___spec__1(x_25, x_2); +x_28 = lean_alloc_ctor(0, 5, 0); +lean_ctor_set(x_28, 0, x_18); +lean_ctor_set(x_28, 1, x_27); +lean_ctor_set(x_28, 2, x_3); +lean_ctor_set(x_28, 3, x_12); +lean_ctor_set(x_28, 4, x_4); +lean_ctor_set(x_15, 0, x_28); +x_29 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_29, 0, x_15); +lean_ctor_set(x_29, 1, x_26); +return x_29; +} +} +else +{ +uint8_t x_30; +lean_free_object(x_15); +lean_dec(x_19); +lean_dec(x_18); +lean_dec(x_12); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_30 = !lean_is_exclusive(x_20); +if (x_30 == 0) +{ +return x_20; +} +else +{ +lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_31 = lean_ctor_get(x_20, 0); +x_32 = lean_ctor_get(x_20, 1); +lean_inc(x_32); +lean_inc(x_31); +lean_dec(x_20); +x_33 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_33, 0, x_31); +lean_ctor_set(x_33, 1, x_32); +return x_33; +} +} +} +else +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; +x_34 = lean_ctor_get(x_15, 0); +x_35 = lean_ctor_get(x_15, 1); +lean_inc(x_35); +lean_inc(x_34); +lean_dec(x_15); +x_36 = l_REPL_ProofSnapshot_ppGoals(x_1, x_16); +if (lean_obj_tag(x_36) == 0) +{ +lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; +x_37 = lean_ctor_get(x_36, 0); +lean_inc(x_37); +x_38 = lean_ctor_get(x_36, 1); +lean_inc(x_38); +if (lean_is_exclusive(x_36)) { + lean_ctor_release(x_36, 0); + lean_ctor_release(x_36, 1); + x_39 = x_36; +} else { + lean_dec_ref(x_36); + x_39 = lean_box(0); +} +x_40 = l_List_mapTR_loop___at_REPL_sorries___spec__1(x_37, x_2); +x_41 = lean_alloc_ctor(0, 5, 0); +lean_ctor_set(x_41, 0, x_34); +lean_ctor_set(x_41, 1, x_40); +lean_ctor_set(x_41, 2, x_3); +lean_ctor_set(x_41, 3, x_12); +lean_ctor_set(x_41, 4, x_4); +x_42 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_42, 0, x_41); +lean_ctor_set(x_42, 1, x_35); +if (lean_is_scalar(x_39)) { + x_43 = lean_alloc_ctor(0, 2, 0); +} else { + x_43 = x_39; +} +lean_ctor_set(x_43, 0, x_42); +lean_ctor_set(x_43, 1, x_38); +return x_43; +} +else +{ +lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; +lean_dec(x_35); +lean_dec(x_34); +lean_dec(x_12); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_44 = lean_ctor_get(x_36, 0); +lean_inc(x_44); +x_45 = lean_ctor_get(x_36, 1); +lean_inc(x_45); +if (lean_is_exclusive(x_36)) { + lean_ctor_release(x_36, 0); + lean_ctor_release(x_36, 1); + x_46 = x_36; +} else { + lean_dec_ref(x_36); + x_46 = lean_box(0); +} +if (lean_is_scalar(x_46)) { + x_47 = lean_alloc_ctor(1, 2, 0); +} else { + x_47 = x_46; +} +lean_ctor_set(x_47, 0, x_44); +lean_ctor_set(x_47, 1, x_45); +return x_47; +} +} +} +else +{ +uint8_t x_48; +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_48 = !lean_is_exclusive(x_9); +if (x_48 == 0) +{ +return x_9; +} +else +{ +lean_object* x_49; lean_object* x_50; lean_object* x_51; +x_49 = lean_ctor_get(x_9, 0); +x_50 = lean_ctor_get(x_9, 1); +lean_inc(x_50); +lean_inc(x_49); +lean_dec(x_9); +x_51 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_51, 0, x_49); +lean_ctor_set(x_51, 1, x_50); +return x_51; +} +} +} +} +LEAN_EXPORT lean_object* l_REPL_createProofStepReponse___at_REPL_unpickleProofSnapshot___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; +lean_inc(x_2); +lean_inc(x_1); +x_5 = l_REPL_ProofSnapshot_newMessages(x_1, x_2); +x_6 = lean_box(0); +x_7 = l_List_mapM_loop___at_REPL_unpickleProofSnapshot___spec__2(x_5, x_6, x_3, x_4); +if (lean_obj_tag(x_7) == 0) +{ +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_7, 0); +lean_inc(x_8); +x_9 = lean_ctor_get(x_7, 1); +lean_inc(x_9); +lean_dec(x_7); +x_10 = lean_ctor_get(x_8, 0); +lean_inc(x_10); +x_11 = lean_ctor_get(x_8, 1); +lean_inc(x_11); +lean_dec(x_8); +lean_inc(x_2); +lean_inc(x_1); +x_12 = l_REPL_ProofSnapshot_newTraces(x_1, x_2, x_9); +if (lean_obj_tag(x_12) == 0) +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; +x_13 = lean_ctor_get(x_12, 0); +lean_inc(x_13); +x_14 = lean_ctor_get(x_12, 1); +lean_inc(x_14); +lean_dec(x_12); +lean_inc(x_2); +lean_inc(x_1); +x_15 = l_REPL_ProofSnapshot_newInfoTrees(x_1, x_2); +if (lean_obj_tag(x_2) == 0) +{ +lean_object* x_16; +x_16 = l_REPL_createProofStepReponse___at_REPL_unpickleProofSnapshot___spec__1___lambda__1(x_1, x_6, x_10, x_13, x_15, x_11, x_14); +return x_16; +} +else +{ +lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_17 = lean_ctor_get(x_2, 0); +lean_inc(x_17); +lean_dec(x_2); +x_18 = l_REPL_createProofStepReponse___rarg___lambda__7___closed__1; +x_19 = l_REPL_ProofSnapshot_runMetaM___rarg(x_17, x_18, x_14); +if (lean_obj_tag(x_19) == 0) +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; +x_20 = lean_ctor_get(x_19, 0); +lean_inc(x_20); +x_21 = lean_ctor_get(x_19, 1); +lean_inc(x_21); +lean_dec(x_19); +x_22 = lean_ctor_get(x_20, 0); +lean_inc(x_22); +lean_dec(x_20); +x_23 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_23, 0, x_22); +x_24 = l_List_mapTR_loop___at_REPL_unpickleProofSnapshot___spec__7(x_23, x_15, x_6); +x_25 = l_REPL_createProofStepReponse___at_REPL_unpickleProofSnapshot___spec__1___lambda__1(x_1, x_6, x_10, x_13, x_24, x_11, x_21); +return x_25; +} +else +{ +uint8_t x_26; +lean_dec(x_15); +lean_dec(x_13); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_1); +x_26 = !lean_is_exclusive(x_19); +if (x_26 == 0) +{ +return x_19; +} +else +{ +lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_27 = lean_ctor_get(x_19, 0); +x_28 = lean_ctor_get(x_19, 1); +lean_inc(x_28); +lean_inc(x_27); +lean_dec(x_19); +x_29 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_29, 0, x_27); +lean_ctor_set(x_29, 1, x_28); +return x_29; +} +} +} +} +else +{ +uint8_t x_30; +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_2); +lean_dec(x_1); +x_30 = !lean_is_exclusive(x_12); +if (x_30 == 0) +{ +return x_12; +} +else +{ +lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_31 = lean_ctor_get(x_12, 0); +x_32 = lean_ctor_get(x_12, 1); +lean_inc(x_32); +lean_inc(x_31); +lean_dec(x_12); +x_33 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_33, 0, x_31); +lean_ctor_set(x_33, 1, x_32); +return x_33; +} +} +} +else +{ +uint8_t x_34; +lean_dec(x_2); +lean_dec(x_1); +x_34 = !lean_is_exclusive(x_7); +if (x_34 == 0) +{ +return x_7; +} +else +{ +lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_35 = lean_ctor_get(x_7, 0); +x_36 = lean_ctor_get(x_7, 1); +lean_inc(x_36); +lean_inc(x_35); +lean_dec(x_7); +x_37 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_37, 0, x_35); +lean_ctor_set(x_37, 1, x_36); +return x_37; +} +} +} +} +LEAN_EXPORT lean_object* l_REPL_unpickleProofSnapshot___lambda__1(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; lean_object* x_7; +x_6 = lean_ctor_get(x_1, 0); +lean_inc(x_6); +lean_dec(x_1); +x_7 = l_REPL_ProofSnapshot_unpickle_unsafe__1(x_6, x_2, x_5); +if (lean_obj_tag(x_7) == 0) +{ +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_7, 0); +lean_inc(x_8); +x_9 = lean_ctor_get(x_7, 1); +lean_inc(x_9); +lean_dec(x_7); +x_10 = lean_ctor_get(x_8, 0); +lean_inc(x_10); +lean_dec(x_8); +x_11 = lean_box(0); +x_12 = l_REPL_createProofStepReponse___at_REPL_unpickleProofSnapshot___spec__1(x_10, x_11, x_4, x_9); +if (lean_obj_tag(x_12) == 0) +{ +uint8_t x_13; +x_13 = !lean_is_exclusive(x_12); +if (x_13 == 0) +{ +lean_object* x_14; uint8_t x_15; +x_14 = lean_ctor_get(x_12, 0); +x_15 = !lean_is_exclusive(x_14); +if (x_15 == 0) +{ +lean_object* x_16; lean_object* x_17; +x_16 = lean_ctor_get(x_14, 0); +x_17 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_17, 0, x_16); +lean_ctor_set(x_14, 0, x_17); +return x_12; +} +else +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; +x_18 = lean_ctor_get(x_14, 0); +x_19 = lean_ctor_get(x_14, 1); +lean_inc(x_19); +lean_inc(x_18); +lean_dec(x_14); +x_20 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_20, 0, x_18); +x_21 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_21, 0, x_20); +lean_ctor_set(x_21, 1, x_19); +lean_ctor_set(x_12, 0, x_21); +return x_12; +} +} +else +{ +lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_22 = lean_ctor_get(x_12, 0); +x_23 = lean_ctor_get(x_12, 1); +lean_inc(x_23); +lean_inc(x_22); +lean_dec(x_12); +x_24 = lean_ctor_get(x_22, 0); +lean_inc(x_24); +x_25 = lean_ctor_get(x_22, 1); +lean_inc(x_25); +if (lean_is_exclusive(x_22)) { + lean_ctor_release(x_22, 0); + lean_ctor_release(x_22, 1); + x_26 = x_22; +} else { + lean_dec_ref(x_22); + x_26 = lean_box(0); +} +x_27 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_27, 0, x_24); +if (lean_is_scalar(x_26)) { + x_28 = lean_alloc_ctor(0, 2, 0); +} else { + x_28 = x_26; +} +lean_ctor_set(x_28, 0, x_27); +lean_ctor_set(x_28, 1, x_25); +x_29 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_29, 0, x_28); +lean_ctor_set(x_29, 1, x_23); +return x_29; +} +} +else +{ +uint8_t x_30; +x_30 = !lean_is_exclusive(x_12); +if (x_30 == 0) +{ +return x_12; +} +else +{ +lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_31 = lean_ctor_get(x_12, 0); +x_32 = lean_ctor_get(x_12, 1); +lean_inc(x_32); +lean_inc(x_31); +lean_dec(x_12); +x_33 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_33, 0, x_31); +lean_ctor_set(x_33, 1, x_32); +return x_33; +} +} +} +else +{ +uint8_t x_34; +lean_dec(x_4); +x_34 = !lean_is_exclusive(x_7); +if (x_34 == 0) +{ +return x_7; +} +else +{ +lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_35 = lean_ctor_get(x_7, 0); +x_36 = lean_ctor_get(x_7, 1); +lean_inc(x_36); +lean_inc(x_35); +lean_dec(x_7); +x_37 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_37, 0, x_35); +lean_ctor_set(x_37, 1, x_36); +return x_37; +} +} +} +} +LEAN_EXPORT lean_object* l_REPL_unpickleProofSnapshot___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; uint8_t x_6; +x_5 = lean_ctor_get(x_2, 1); +lean_inc(x_5); +x_6 = lean_unbox(x_5); +lean_dec(x_5); +if (x_6 == 0) +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; +x_7 = lean_ctor_get(x_2, 0); +lean_inc(x_7); +lean_dec(x_2); +x_8 = lean_box(0); +x_9 = l_REPL_unpickleProofSnapshot___lambda__1(x_1, x_7, x_8, x_3, x_4); +return x_9; +} +else +{ +uint8_t x_10; +lean_dec(x_1); +x_10 = !lean_is_exclusive(x_2); +if (x_10 == 0) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; +x_11 = lean_ctor_get(x_2, 1); +lean_dec(x_11); +x_12 = lean_ctor_get(x_2, 0); +lean_dec(x_12); +x_13 = l_REPL_pickleCommandSnapshot___rarg___lambda__4___closed__2; +lean_ctor_set(x_2, 1, x_3); +lean_ctor_set(x_2, 0, x_13); +x_14 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_14, 0, x_2); +lean_ctor_set(x_14, 1, x_4); +return x_14; +} +else +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; +lean_dec(x_2); +x_15 = l_REPL_pickleCommandSnapshot___rarg___lambda__4___closed__2; +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_15); +lean_ctor_set(x_16, 1, x_3); +x_17 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_17, 0, x_16); +lean_ctor_set(x_17, 1, x_4); +return x_17; +} +} +} +} +static lean_object* _init_l_REPL_unpickleProofSnapshot___closed__1() { +_start: +{ +lean_object* x_1; uint8_t x_2; lean_object* x_3; lean_object* x_4; +x_1 = lean_box(0); +x_2 = 0; +x_3 = lean_box(x_2); +x_4 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_3); +return x_4; +} +} +static lean_object* _init_l_REPL_unpickleProofSnapshot___closed__2() { +_start: +{ +lean_object* x_1; uint8_t x_2; lean_object* x_3; lean_object* x_4; +x_1 = lean_box(0); +x_2 = 1; +x_3 = lean_box(x_2); +x_4 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_3); +return x_4; +} +} +LEAN_EXPORT lean_object* l_REPL_unpickleProofSnapshot(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = lean_ctor_get(x_1, 1); +lean_inc(x_4); +if (lean_obj_tag(x_4) == 0) +{ +lean_object* x_5; lean_object* x_6; +x_5 = l_REPL_unpickleProofSnapshot___closed__1; +x_6 = l_REPL_unpickleProofSnapshot___lambda__2(x_1, x_5, x_2, x_3); +return x_6; +} +else +{ +uint8_t x_7; +x_7 = !lean_is_exclusive(x_4); +if (x_7 == 0) +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; +x_8 = lean_ctor_get(x_4, 0); +x_9 = lean_ctor_get(x_2, 0); +lean_inc(x_9); +x_10 = lean_array_get_size(x_9); +x_11 = lean_nat_dec_lt(x_8, x_10); +lean_dec(x_10); +if (x_11 == 0) +{ +lean_object* x_12; lean_object* x_13; +lean_dec(x_9); +lean_free_object(x_4); +lean_dec(x_8); +x_12 = l_REPL_unpickleProofSnapshot___closed__2; +x_13 = l_REPL_unpickleProofSnapshot___lambda__2(x_1, x_12, x_2, x_3); +return x_13; +} +else +{ +lean_object* x_14; uint8_t x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_14 = lean_array_fget(x_9, x_8); +lean_dec(x_8); +lean_dec(x_9); +lean_ctor_set(x_4, 0, x_14); +x_15 = 0; +x_16 = lean_box(x_15); +x_17 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_17, 0, x_4); +lean_ctor_set(x_17, 1, x_16); +x_18 = l_REPL_unpickleProofSnapshot___lambda__2(x_1, x_17, x_2, x_3); +return x_18; +} +} +else +{ +lean_object* x_19; lean_object* x_20; lean_object* x_21; uint8_t x_22; +x_19 = lean_ctor_get(x_4, 0); +lean_inc(x_19); +lean_dec(x_4); +x_20 = lean_ctor_get(x_2, 0); +lean_inc(x_20); +x_21 = lean_array_get_size(x_20); +x_22 = lean_nat_dec_lt(x_19, x_21); +lean_dec(x_21); +if (x_22 == 0) +{ +lean_object* x_23; lean_object* x_24; +lean_dec(x_20); +lean_dec(x_19); +x_23 = l_REPL_unpickleProofSnapshot___closed__2; +x_24 = l_REPL_unpickleProofSnapshot___lambda__2(x_1, x_23, x_2, x_3); +return x_24; +} +else +{ +lean_object* x_25; lean_object* x_26; uint8_t x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; +x_25 = lean_array_fget(x_20, x_19); +lean_dec(x_19); +lean_dec(x_20); +x_26 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_26, 0, x_25); +x_27 = 0; +x_28 = lean_box(x_27); +x_29 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_29, 0, x_26); +lean_ctor_set(x_29, 1, x_28); +x_30 = l_REPL_unpickleProofSnapshot___lambda__2(x_1, x_29, x_2, x_3); +return x_30; +} +} +} +} +} +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_unpickleProofSnapshot___spec__6___lambda__1___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_mapM_loop___at_REPL_unpickleProofSnapshot___spec__6___lambda__1(x_1, x_2, x_3, x_4, x_5); +lean_dec(x_2); +lean_dec(x_1); +return x_6; +} +} +LEAN_EXPORT lean_object* l_REPL_unpickleProofSnapshot___lambda__1___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_REPL_unpickleProofSnapshot___lambda__1(x_1, x_2, x_3, x_4, x_5); +lean_dec(x_3); +return x_6; +} +} +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_REPL_runCommand___spec__1(size_t x_1, size_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +uint8_t x_6; +x_6 = lean_usize_dec_lt(x_2, x_1); +if (x_6 == 0) +{ +lean_object* x_7; lean_object* x_8; +x_7 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_7, 0, x_3); +lean_ctor_set(x_7, 1, x_4); +x_8 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_8, 0, x_7); +lean_ctor_set(x_8, 1, x_5); +return x_8; +} +else +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_9 = lean_array_uget(x_3, x_2); +x_10 = lean_unsigned_to_nat(0u); +x_11 = lean_array_uset(x_3, x_2, x_10); +x_12 = lean_box(0); +x_13 = l_Lean_Elab_InfoTree_toJson(x_9, x_12, x_5); +if (lean_obj_tag(x_13) == 0) +{ +lean_object* x_14; lean_object* x_15; size_t x_16; size_t x_17; lean_object* x_18; +x_14 = lean_ctor_get(x_13, 0); +lean_inc(x_14); +x_15 = lean_ctor_get(x_13, 1); +lean_inc(x_15); +lean_dec(x_13); +x_16 = 1; +x_17 = lean_usize_add(x_2, x_16); +x_18 = lean_array_uset(x_11, x_2, x_14); +x_2 = x_17; +x_3 = x_18; +x_5 = x_15; +goto _start; +} +else +{ +uint8_t x_20; +lean_dec(x_11); +lean_dec(x_4); +x_20 = !lean_is_exclusive(x_13); +if (x_20 == 0) +{ +return x_13; +} +else +{ +lean_object* x_21; lean_object* x_22; lean_object* x_23; +x_21 = lean_ctor_get(x_13, 0); +x_22 = lean_ctor_get(x_13, 1); +lean_inc(x_22); +lean_inc(x_21); +lean_dec(x_13); +x_23 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_23, 0, x_21); +lean_ctor_set(x_23, 1, x_22); +return x_23; +} +} +} +} +} +static lean_object* _init_l_List_mapTR_loop___at_REPL_runCommand___spec__2___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Elab_InfoTree_retainTacticInfo___lambda__1___boxed), 1, 0); +return x_1; +} +} +static lean_object* _init_l_List_mapTR_loop___at_REPL_runCommand___spec__2___closed__2() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Elab_InfoTree_retainTacticInfo___lambda__2___boxed), 1, 0); +return x_1; +} +} +LEAN_EXPORT lean_object* l_List_mapTR_loop___at_REPL_runCommand___spec__2(lean_object* x_1, lean_object* x_2) { +_start: +{ +if (lean_obj_tag(x_1) == 0) +{ +lean_object* x_3; +x_3 = l_List_reverse___rarg(x_2); +return x_3; +} +else +{ +uint8_t x_4; +x_4 = !lean_is_exclusive(x_1); +if (x_4 == 0) +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; +x_5 = lean_ctor_get(x_1, 0); +x_6 = lean_ctor_get(x_1, 1); +x_7 = l_List_mapTR_loop___at_REPL_runCommand___spec__2___closed__1; +x_8 = l_List_mapTR_loop___at_REPL_runCommand___spec__2___closed__2; +x_9 = l_Lean_Elab_InfoTree_filter(x_7, x_8, x_5); +lean_ctor_set(x_1, 1, x_2); +lean_ctor_set(x_1, 0, x_9); +{ +lean_object* _tmp_0 = x_6; +lean_object* _tmp_1 = x_1; +x_1 = _tmp_0; +x_2 = _tmp_1; +} +goto _start; +} +else +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_11 = lean_ctor_get(x_1, 0); +x_12 = lean_ctor_get(x_1, 1); +lean_inc(x_12); +lean_inc(x_11); +lean_dec(x_1); +x_13 = l_List_mapTR_loop___at_REPL_runCommand___spec__2___closed__1; +x_14 = l_List_mapTR_loop___at_REPL_runCommand___spec__2___closed__2; +x_15 = l_Lean_Elab_InfoTree_filter(x_13, x_14, x_11); +x_16 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_16, 0, x_15); +lean_ctor_set(x_16, 1, x_2); +x_1 = x_12; +x_2 = x_16; +goto _start; +} +} +} +} +static lean_object* _init_l_List_mapTR_loop___at_REPL_runCommand___spec__3___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Elab_InfoTree_retainSubstantive___lambda__1___boxed), 1, 0); +return x_1; +} +} +LEAN_EXPORT lean_object* l_List_mapTR_loop___at_REPL_runCommand___spec__3(lean_object* x_1, lean_object* x_2) { +_start: +{ +if (lean_obj_tag(x_1) == 0) +{ +lean_object* x_3; +x_3 = l_List_reverse___rarg(x_2); +return x_3; +} +else +{ +uint8_t x_4; +x_4 = !lean_is_exclusive(x_1); +if (x_4 == 0) +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; +x_5 = lean_ctor_get(x_1, 0); +x_6 = lean_ctor_get(x_1, 1); +x_7 = l_List_mapTR_loop___at_REPL_runCommand___spec__3___closed__1; +x_8 = l_List_mapTR_loop___at_REPL_runCommand___spec__2___closed__2; +x_9 = l_Lean_Elab_InfoTree_filter(x_7, x_8, x_5); +lean_ctor_set(x_1, 1, x_2); +lean_ctor_set(x_1, 0, x_9); +{ +lean_object* _tmp_0 = x_6; +lean_object* _tmp_1 = x_1; +x_1 = _tmp_0; +x_2 = _tmp_1; +} +goto _start; +} +else +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_11 = lean_ctor_get(x_1, 0); +x_12 = lean_ctor_get(x_1, 1); +lean_inc(x_12); +lean_inc(x_11); +lean_dec(x_1); +x_13 = l_List_mapTR_loop___at_REPL_runCommand___spec__3___closed__1; +x_14 = l_List_mapTR_loop___at_REPL_runCommand___spec__2___closed__2; +x_15 = l_Lean_Elab_InfoTree_filter(x_13, x_14, x_11); +x_16 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_16, 0, x_15); +lean_ctor_set(x_16, 1, x_2); +x_1 = x_12; +x_2 = x_16; +goto _start; +} +} +} +} +static lean_object* _init_l_List_mapTR_loop___at_REPL_runCommand___spec__4___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Info_isOriginal___boxed), 1, 0); +return x_1; +} +} +LEAN_EXPORT lean_object* l_List_mapTR_loop___at_REPL_runCommand___spec__4(lean_object* x_1, lean_object* x_2) { +_start: +{ +if (lean_obj_tag(x_1) == 0) +{ +lean_object* x_3; +x_3 = l_List_reverse___rarg(x_2); +return x_3; +} +else +{ +uint8_t x_4; +x_4 = !lean_is_exclusive(x_1); +if (x_4 == 0) +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; +x_5 = lean_ctor_get(x_1, 0); +x_6 = lean_ctor_get(x_1, 1); +x_7 = l_List_mapTR_loop___at_REPL_runCommand___spec__4___closed__1; +x_8 = l_List_mapTR_loop___at_REPL_runCommand___spec__2___closed__2; +x_9 = l_Lean_Elab_InfoTree_filter(x_7, x_8, x_5); +lean_ctor_set(x_1, 1, x_2); +lean_ctor_set(x_1, 0, x_9); +{ +lean_object* _tmp_0 = x_6; +lean_object* _tmp_1 = x_1; +x_1 = _tmp_0; +x_2 = _tmp_1; +} +goto _start; +} +else +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_11 = lean_ctor_get(x_1, 0); +x_12 = lean_ctor_get(x_1, 1); +lean_inc(x_12); +lean_inc(x_11); +lean_dec(x_1); +x_13 = l_List_mapTR_loop___at_REPL_runCommand___spec__4___closed__1; +x_14 = l_List_mapTR_loop___at_REPL_runCommand___spec__2___closed__2; +x_15 = l_Lean_Elab_InfoTree_filter(x_13, x_14, x_11); +x_16 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_16, 0, x_15); +lean_ctor_set(x_16, 1, x_2); +x_1 = x_12; +x_2 = x_16; +goto _start; +} +} +} +} +LEAN_EXPORT lean_object* l_List_mapM_loop___at_REPL_runCommand___spec__6(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +if (lean_obj_tag(x_1) == 0) +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; +x_5 = l_List_reverse___rarg(x_2); +x_6 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_6, 0, x_5); +lean_ctor_set(x_6, 1, x_3); +x_7 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_7, 0, x_6); +lean_ctor_set(x_7, 1, x_4); +return x_7; +} +else +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12; +x_8 = lean_ctor_get(x_1, 0); +lean_inc(x_8); +x_9 = lean_ctor_get(x_8, 1); +lean_inc(x_9); +x_10 = lean_ctor_get(x_9, 1); +lean_inc(x_10); +x_11 = lean_ctor_get(x_10, 1); +lean_inc(x_11); +x_12 = !lean_is_exclusive(x_1); +if (x_12 == 0) +{ +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; lean_object* x_22; +x_13 = lean_ctor_get(x_1, 1); +x_14 = lean_ctor_get(x_1, 0); +lean_dec(x_14); +x_15 = lean_ctor_get(x_8, 0); +lean_inc(x_15); +lean_dec(x_8); +x_16 = lean_ctor_get(x_9, 0); +lean_inc(x_16); +lean_dec(x_9); +x_17 = lean_ctor_get(x_10, 0); +lean_inc(x_17); +lean_dec(x_10); +x_18 = lean_ctor_get(x_11, 0); +lean_inc(x_18); +x_19 = lean_ctor_get(x_11, 1); +lean_inc(x_19); +lean_dec(x_11); +x_20 = lean_box(0); +x_21 = lean_box(0); +lean_inc(x_17); +x_22 = l_REPL_ProofSnapshot_create(x_15, x_20, x_20, x_17, x_21, x_4); +if (lean_obj_tag(x_22) == 0) +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; +x_23 = lean_ctor_get(x_22, 0); +lean_inc(x_23); +x_24 = lean_ctor_get(x_22, 1); +lean_inc(x_24); +lean_dec(x_22); +x_25 = l_Lean_Elab_ContextInfo_ppGoals(x_15, x_17, x_24); +if (lean_obj_tag(x_25) == 0) +{ +lean_object* x_26; lean_object* x_27; lean_object* x_28; 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; +x_26 = lean_ctor_get(x_25, 0); +lean_inc(x_26); +x_27 = lean_ctor_get(x_25, 1); +lean_inc(x_27); +lean_dec(x_25); +x_28 = l_Std_Format_defWidth; +x_29 = lean_unsigned_to_nat(0u); +x_30 = lean_format_pretty(x_26, x_28, x_29, x_29); +x_31 = l_List_mapTR_loop___at_REPL_sorries___spec__1___closed__1; +x_32 = lean_string_append(x_31, x_30); +lean_dec(x_30); +x_33 = lean_string_append(x_32, x_31); +x_34 = l_String_trim(x_33); +lean_dec(x_33); +x_35 = l_REPL_ppTactic(x_15, x_16, x_27); +lean_dec(x_15); +if (lean_obj_tag(x_35) == 0) +{ +lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; +x_36 = lean_ctor_get(x_35, 0); +lean_inc(x_36); +x_37 = lean_ctor_get(x_35, 1); +lean_inc(x_37); +lean_dec(x_35); +x_38 = lean_format_pretty(x_36, x_28, x_29, x_29); +x_39 = l_REPL_recordProofSnapshot___at_REPL_unpickleProofSnapshot___spec__4(x_23, x_3, x_37); +x_40 = lean_ctor_get(x_39, 0); +lean_inc(x_40); +x_41 = lean_ctor_get(x_39, 1); +lean_inc(x_41); +lean_dec(x_39); +x_42 = lean_ctor_get(x_40, 0); +lean_inc(x_42); +x_43 = lean_ctor_get(x_40, 1); +lean_inc(x_43); +lean_dec(x_40); +x_44 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_44, 0, x_42); +x_45 = l_REPL_Tactic_of(x_34, x_38, x_18, x_19, x_44); +lean_dec(x_19); +lean_dec(x_18); +lean_ctor_set(x_1, 1, x_2); +lean_ctor_set(x_1, 0, x_45); +{ +lean_object* _tmp_0 = x_13; +lean_object* _tmp_1 = x_1; +lean_object* _tmp_2 = x_43; +lean_object* _tmp_3 = x_41; +x_1 = _tmp_0; +x_2 = _tmp_1; +x_3 = _tmp_2; +x_4 = _tmp_3; +} +goto _start; +} +else +{ +uint8_t x_47; +lean_dec(x_34); +lean_dec(x_23); +lean_dec(x_19); +lean_dec(x_18); +lean_free_object(x_1); +lean_dec(x_13); +lean_dec(x_3); +lean_dec(x_2); +x_47 = !lean_is_exclusive(x_35); +if (x_47 == 0) +{ +return x_35; +} +else +{ +lean_object* x_48; lean_object* x_49; lean_object* x_50; +x_48 = lean_ctor_get(x_35, 0); +x_49 = lean_ctor_get(x_35, 1); +lean_inc(x_49); +lean_inc(x_48); +lean_dec(x_35); +x_50 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_50, 0, x_48); +lean_ctor_set(x_50, 1, x_49); +return x_50; +} +} +} +else +{ +uint8_t x_51; +lean_dec(x_23); +lean_dec(x_19); +lean_dec(x_18); +lean_dec(x_16); +lean_dec(x_15); +lean_free_object(x_1); +lean_dec(x_13); +lean_dec(x_3); +lean_dec(x_2); +x_51 = !lean_is_exclusive(x_25); +if (x_51 == 0) +{ +return x_25; +} +else +{ +lean_object* x_52; lean_object* x_53; lean_object* x_54; +x_52 = lean_ctor_get(x_25, 0); +x_53 = lean_ctor_get(x_25, 1); +lean_inc(x_53); +lean_inc(x_52); +lean_dec(x_25); +x_54 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_54, 0, x_52); +lean_ctor_set(x_54, 1, x_53); +return x_54; +} +} +} +else +{ +uint8_t x_55; +lean_dec(x_19); +lean_dec(x_18); +lean_dec(x_17); +lean_dec(x_16); +lean_dec(x_15); +lean_free_object(x_1); +lean_dec(x_13); +lean_dec(x_3); +lean_dec(x_2); +x_55 = !lean_is_exclusive(x_22); +if (x_55 == 0) +{ +return x_22; +} +else +{ +lean_object* x_56; lean_object* x_57; lean_object* x_58; +x_56 = lean_ctor_get(x_22, 0); +x_57 = lean_ctor_get(x_22, 1); +lean_inc(x_57); +lean_inc(x_56); +lean_dec(x_22); +x_58 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_58, 0, x_56); +lean_ctor_set(x_58, 1, x_57); +return x_58; +} +} +} +else +{ +lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; +x_59 = lean_ctor_get(x_1, 1); +lean_inc(x_59); +lean_dec(x_1); +x_60 = lean_ctor_get(x_8, 0); +lean_inc(x_60); +lean_dec(x_8); +x_61 = lean_ctor_get(x_9, 0); +lean_inc(x_61); +lean_dec(x_9); +x_62 = lean_ctor_get(x_10, 0); +lean_inc(x_62); +lean_dec(x_10); +x_63 = lean_ctor_get(x_11, 0); +lean_inc(x_63); +x_64 = lean_ctor_get(x_11, 1); +lean_inc(x_64); +lean_dec(x_11); +x_65 = lean_box(0); +x_66 = lean_box(0); +lean_inc(x_62); +x_67 = l_REPL_ProofSnapshot_create(x_60, x_65, x_65, x_62, x_66, x_4); +if (lean_obj_tag(x_67) == 0) +{ +lean_object* x_68; lean_object* x_69; lean_object* x_70; +x_68 = lean_ctor_get(x_67, 0); +lean_inc(x_68); +x_69 = lean_ctor_get(x_67, 1); +lean_inc(x_69); +lean_dec(x_67); +x_70 = l_Lean_Elab_ContextInfo_ppGoals(x_60, x_62, x_69); +if (lean_obj_tag(x_70) == 0) +{ +lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; +x_71 = lean_ctor_get(x_70, 0); +lean_inc(x_71); +x_72 = lean_ctor_get(x_70, 1); +lean_inc(x_72); +lean_dec(x_70); +x_73 = l_Std_Format_defWidth; +x_74 = lean_unsigned_to_nat(0u); +x_75 = lean_format_pretty(x_71, x_73, x_74, x_74); +x_76 = l_List_mapTR_loop___at_REPL_sorries___spec__1___closed__1; +x_77 = lean_string_append(x_76, x_75); +lean_dec(x_75); +x_78 = lean_string_append(x_77, x_76); +x_79 = l_String_trim(x_78); +lean_dec(x_78); +x_80 = l_REPL_ppTactic(x_60, x_61, x_72); +lean_dec(x_60); +if (lean_obj_tag(x_80) == 0) +{ +lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; +x_81 = lean_ctor_get(x_80, 0); +lean_inc(x_81); +x_82 = lean_ctor_get(x_80, 1); +lean_inc(x_82); +lean_dec(x_80); +x_83 = lean_format_pretty(x_81, x_73, x_74, x_74); +x_84 = l_REPL_recordProofSnapshot___at_REPL_unpickleProofSnapshot___spec__4(x_68, x_3, x_82); +x_85 = lean_ctor_get(x_84, 0); +lean_inc(x_85); +x_86 = lean_ctor_get(x_84, 1); +lean_inc(x_86); +lean_dec(x_84); +x_87 = lean_ctor_get(x_85, 0); +lean_inc(x_87); +x_88 = lean_ctor_get(x_85, 1); +lean_inc(x_88); +lean_dec(x_85); +x_89 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_89, 0, x_87); +x_90 = l_REPL_Tactic_of(x_79, x_83, x_63, x_64, x_89); +lean_dec(x_64); +lean_dec(x_63); +x_91 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_91, 0, x_90); +lean_ctor_set(x_91, 1, x_2); +x_1 = x_59; +x_2 = x_91; +x_3 = x_88; +x_4 = x_86; +goto _start; +} +else +{ +lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; +lean_dec(x_79); +lean_dec(x_68); +lean_dec(x_64); +lean_dec(x_63); +lean_dec(x_59); +lean_dec(x_3); +lean_dec(x_2); +x_93 = lean_ctor_get(x_80, 0); +lean_inc(x_93); +x_94 = lean_ctor_get(x_80, 1); +lean_inc(x_94); +if (lean_is_exclusive(x_80)) { + lean_ctor_release(x_80, 0); + lean_ctor_release(x_80, 1); + x_95 = x_80; +} else { + lean_dec_ref(x_80); + x_95 = lean_box(0); +} +if (lean_is_scalar(x_95)) { + x_96 = lean_alloc_ctor(1, 2, 0); +} else { + x_96 = x_95; +} +lean_ctor_set(x_96, 0, x_93); +lean_ctor_set(x_96, 1, x_94); +return x_96; +} +} +else +{ +lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; +lean_dec(x_68); +lean_dec(x_64); +lean_dec(x_63); +lean_dec(x_61); +lean_dec(x_60); +lean_dec(x_59); +lean_dec(x_3); +lean_dec(x_2); +x_97 = lean_ctor_get(x_70, 0); +lean_inc(x_97); +x_98 = lean_ctor_get(x_70, 1); +lean_inc(x_98); +if (lean_is_exclusive(x_70)) { + lean_ctor_release(x_70, 0); + lean_ctor_release(x_70, 1); + x_99 = x_70; +} else { + lean_dec_ref(x_70); + x_99 = lean_box(0); +} +if (lean_is_scalar(x_99)) { + x_100 = lean_alloc_ctor(1, 2, 0); +} else { + x_100 = x_99; +} +lean_ctor_set(x_100, 0, x_97); +lean_ctor_set(x_100, 1, x_98); +return x_100; +} +} +else +{ +lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; +lean_dec(x_64); +lean_dec(x_63); +lean_dec(x_62); +lean_dec(x_61); +lean_dec(x_60); +lean_dec(x_59); +lean_dec(x_3); +lean_dec(x_2); +x_101 = lean_ctor_get(x_67, 0); +lean_inc(x_101); +x_102 = lean_ctor_get(x_67, 1); +lean_inc(x_102); +if (lean_is_exclusive(x_67)) { + lean_ctor_release(x_67, 0); + lean_ctor_release(x_67, 1); + x_103 = x_67; +} else { + lean_dec_ref(x_67); + x_103 = lean_box(0); +} +if (lean_is_scalar(x_103)) { + x_104 = lean_alloc_ctor(1, 2, 0); +} else { + x_104 = x_103; +} +lean_ctor_set(x_104, 0, x_101); +lean_ctor_set(x_104, 1, x_102); +return x_104; +} +} +} +} +} +LEAN_EXPORT lean_object* l_REPL_tactics___at_REPL_runCommand___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; +x_4 = lean_box(0); +x_5 = l_List_mapTR_loop___at_REPL_tactics___spec__1(x_1, x_4); +x_6 = l_List_join___rarg(x_5); +x_7 = l_List_mapM_loop___at_REPL_runCommand___spec__6(x_6, x_4, x_2, x_3); +return x_7; +} +} +static lean_object* _init_l_REPL_runCommand___lambda__1___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("full", 4); +return x_1; +} +} +static lean_object* _init_l_REPL_runCommand___lambda__1___closed__2() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("tactics", 7); +return x_1; +} +} +static lean_object* _init_l_REPL_runCommand___lambda__1___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("original", 8); +return x_1; +} +} +static lean_object* _init_l_REPL_runCommand___lambda__1___closed__4() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("substantive", 11); +return x_1; +} +} +static lean_object* _init_l_REPL_runCommand___lambda__1___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_List_mapTR_loop___at_REPL_sorries___spec__1___closed__1; +x_2 = l_REPL_State_cmdStates___default___closed__1; +x_3 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set(x_3, 1, x_2); +lean_ctor_set(x_3, 2, x_2); +return x_3; +} +} +LEAN_EXPORT lean_object* l_REPL_runCommand___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, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { +_start: +{ +lean_object* x_12; +if (lean_obj_tag(x_8) == 0) +{ +lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; +x_92 = l_List_mapTR_loop___at_REPL_sorries___spec__1___closed__1; +x_93 = l_REPL_runCommand___lambda__1___closed__5; +x_94 = lean_unsigned_to_nat(0u); +x_95 = l_Lean_firstFrontendMacroScope; +x_96 = lean_box(0); +lean_inc(x_5); +lean_inc(x_6); +x_97 = lean_alloc_ctor(0, 8, 0); +lean_ctor_set(x_97, 0, x_92); +lean_ctor_set(x_97, 1, x_93); +lean_ctor_set(x_97, 2, x_94); +lean_ctor_set(x_97, 3, x_94); +lean_ctor_set(x_97, 4, x_6); +lean_ctor_set(x_97, 5, x_95); +lean_ctor_set(x_97, 6, x_96); +lean_ctor_set(x_97, 7, x_5); +x_12 = x_97; +goto block_91; +} +else +{ +lean_object* x_98; lean_object* x_99; +x_98 = lean_ctor_get(x_8, 0); +lean_inc(x_98); +lean_dec(x_8); +x_99 = lean_ctor_get(x_98, 1); +lean_inc(x_99); +lean_dec(x_98); +x_12 = x_99; +goto block_91; +} +block_91: +{ +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; size_t x_21; lean_object* x_22; +x_13 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_13, 0, x_1); +lean_ctor_set(x_13, 1, x_12); +x_14 = l_REPL_recordCommandSnapshot___at_REPL_unpickleCommandSnapshot___spec__1(x_13, x_10, x_11); +x_15 = lean_ctor_get(x_14, 0); +lean_inc(x_15); +x_16 = lean_ctor_get(x_14, 1); +lean_inc(x_16); +lean_dec(x_14); +x_17 = lean_ctor_get(x_15, 0); +lean_inc(x_17); +x_18 = lean_ctor_get(x_15, 1); +lean_inc(x_18); +lean_dec(x_15); +x_19 = lean_ctor_get(x_2, 0); +x_20 = lean_ctor_get(x_19, 1); +x_21 = 0; +if (lean_obj_tag(x_20) == 0) +{ +lean_dec(x_7); +x_22 = x_6; +goto block_71; +} +else +{ +lean_object* x_72; lean_object* x_73; uint8_t x_74; +x_72 = lean_ctor_get(x_20, 0); +x_73 = l_REPL_runCommand___lambda__1___closed__1; +x_74 = lean_string_dec_eq(x_72, x_73); +if (x_74 == 0) +{ +lean_object* x_75; uint8_t x_76; +x_75 = l_REPL_runCommand___lambda__1___closed__2; +x_76 = lean_string_dec_eq(x_72, x_75); +if (x_76 == 0) +{ +lean_object* x_77; uint8_t x_78; +x_77 = l_REPL_runCommand___lambda__1___closed__3; +x_78 = lean_string_dec_eq(x_72, x_77); +if (x_78 == 0) +{ +lean_object* x_79; uint8_t x_80; +x_79 = l_REPL_runCommand___lambda__1___closed__4; +x_80 = lean_string_dec_eq(x_72, x_79); +if (x_80 == 0) +{ +lean_dec(x_7); +x_22 = x_6; +goto block_71; +} +else +{ +lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; +lean_inc(x_6); +x_81 = l_List_mapTR_loop___at_REPL_runCommand___spec__2(x_7, x_6); +x_82 = l_List_join___rarg(x_81); +x_83 = l_List_mapTR_loop___at_REPL_runCommand___spec__3(x_82, x_6); +x_84 = l_List_join___rarg(x_83); +x_22 = x_84; +goto block_71; +} +} +else +{ +lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; +lean_inc(x_6); +x_85 = l_List_mapTR_loop___at_REPL_runCommand___spec__2(x_7, x_6); +x_86 = l_List_join___rarg(x_85); +x_87 = l_List_mapTR_loop___at_REPL_runCommand___spec__4(x_86, x_6); +x_88 = l_List_join___rarg(x_87); +x_22 = x_88; +goto block_71; +} +} +else +{ +lean_object* x_89; lean_object* x_90; +x_89 = l_List_mapTR_loop___at_REPL_runCommand___spec__2(x_7, x_6); +x_90 = l_List_join___rarg(x_89); +x_22 = x_90; +goto block_71; +} +} +else +{ +lean_dec(x_6); +x_22 = x_7; +goto block_71; +} +} +block_71: +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; size_t x_27; lean_object* x_28; +x_23 = l_List_redLength___rarg(x_22); +x_24 = lean_mk_empty_array_with_capacity(x_23); +lean_dec(x_23); +lean_inc(x_22); +x_25 = l_List_toArrayAux___rarg(x_22, x_24); +x_26 = lean_array_get_size(x_25); +x_27 = lean_usize_of_nat(x_26); +lean_dec(x_26); +x_28 = l_Array_mapMUnsafe_map___at_REPL_runCommand___spec__1(x_27, x_21, x_25, x_18, x_16); +if (lean_obj_tag(x_28) == 0) +{ +uint8_t x_29; +x_29 = !lean_is_exclusive(x_28); +if (x_29 == 0) +{ +lean_object* x_30; uint8_t x_31; +x_30 = lean_ctor_get(x_28, 0); +x_31 = !lean_is_exclusive(x_30); +if (x_31 == 0) +{ +lean_object* x_32; uint8_t x_33; +x_32 = lean_ctor_get(x_30, 0); +x_33 = l_List_isEmpty___rarg(x_22); +lean_dec(x_22); +if (x_33 == 0) +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; +lean_dec(x_5); +x_34 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_34, 0, x_32); +x_35 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_35, 0, x_34); +x_36 = lean_alloc_ctor(0, 5, 0); +lean_ctor_set(x_36, 0, x_17); +lean_ctor_set(x_36, 1, x_3); +lean_ctor_set(x_36, 2, x_4); +lean_ctor_set(x_36, 3, x_9); +lean_ctor_set(x_36, 4, x_35); +x_37 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_37, 0, x_36); +lean_ctor_set(x_30, 0, x_37); +return x_28; +} +else +{ +lean_object* x_38; lean_object* x_39; +lean_dec(x_32); +x_38 = lean_alloc_ctor(0, 5, 0); +lean_ctor_set(x_38, 0, x_17); +lean_ctor_set(x_38, 1, x_3); +lean_ctor_set(x_38, 2, x_4); +lean_ctor_set(x_38, 3, x_9); +lean_ctor_set(x_38, 4, x_5); +x_39 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_39, 0, x_38); +lean_ctor_set(x_30, 0, x_39); +return x_28; +} +} +else +{ +lean_object* x_40; lean_object* x_41; uint8_t x_42; +x_40 = lean_ctor_get(x_30, 0); +x_41 = lean_ctor_get(x_30, 1); +lean_inc(x_41); +lean_inc(x_40); +lean_dec(x_30); +x_42 = l_List_isEmpty___rarg(x_22); +lean_dec(x_22); +if (x_42 == 0) +{ +lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; +lean_dec(x_5); +x_43 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_43, 0, x_40); +x_44 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_44, 0, x_43); +x_45 = lean_alloc_ctor(0, 5, 0); +lean_ctor_set(x_45, 0, x_17); +lean_ctor_set(x_45, 1, x_3); +lean_ctor_set(x_45, 2, x_4); +lean_ctor_set(x_45, 3, x_9); +lean_ctor_set(x_45, 4, x_44); +x_46 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_46, 0, x_45); +x_47 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_47, 0, x_46); +lean_ctor_set(x_47, 1, x_41); +lean_ctor_set(x_28, 0, x_47); +return x_28; +} +else +{ +lean_object* x_48; lean_object* x_49; lean_object* x_50; +lean_dec(x_40); +x_48 = lean_alloc_ctor(0, 5, 0); +lean_ctor_set(x_48, 0, x_17); +lean_ctor_set(x_48, 1, x_3); +lean_ctor_set(x_48, 2, x_4); +lean_ctor_set(x_48, 3, x_9); +lean_ctor_set(x_48, 4, x_5); +x_49 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_49, 0, x_48); +x_50 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_50, 0, x_49); +lean_ctor_set(x_50, 1, x_41); +lean_ctor_set(x_28, 0, x_50); +return x_28; +} +} +} +else +{ +lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; uint8_t x_56; +x_51 = lean_ctor_get(x_28, 0); +x_52 = lean_ctor_get(x_28, 1); +lean_inc(x_52); +lean_inc(x_51); +lean_dec(x_28); +x_53 = lean_ctor_get(x_51, 0); +lean_inc(x_53); +x_54 = lean_ctor_get(x_51, 1); +lean_inc(x_54); +if (lean_is_exclusive(x_51)) { + lean_ctor_release(x_51, 0); + lean_ctor_release(x_51, 1); + x_55 = x_51; +} else { + lean_dec_ref(x_51); + x_55 = lean_box(0); +} +x_56 = l_List_isEmpty___rarg(x_22); +lean_dec(x_22); +if (x_56 == 0) +{ +lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; +lean_dec(x_5); +x_57 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_57, 0, x_53); +x_58 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_58, 0, x_57); +x_59 = lean_alloc_ctor(0, 5, 0); +lean_ctor_set(x_59, 0, x_17); +lean_ctor_set(x_59, 1, x_3); +lean_ctor_set(x_59, 2, x_4); +lean_ctor_set(x_59, 3, x_9); +lean_ctor_set(x_59, 4, x_58); +x_60 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_60, 0, x_59); +if (lean_is_scalar(x_55)) { + x_61 = lean_alloc_ctor(0, 2, 0); +} else { + x_61 = x_55; +} +lean_ctor_set(x_61, 0, x_60); +lean_ctor_set(x_61, 1, x_54); +x_62 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_62, 0, x_61); +lean_ctor_set(x_62, 1, x_52); +return x_62; +} +else +{ +lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; +lean_dec(x_53); +x_63 = lean_alloc_ctor(0, 5, 0); +lean_ctor_set(x_63, 0, x_17); +lean_ctor_set(x_63, 1, x_3); +lean_ctor_set(x_63, 2, x_4); +lean_ctor_set(x_63, 3, x_9); +lean_ctor_set(x_63, 4, x_5); +x_64 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_64, 0, x_63); +if (lean_is_scalar(x_55)) { + x_65 = lean_alloc_ctor(0, 2, 0); +} else { + x_65 = x_55; +} +lean_ctor_set(x_65, 0, x_64); +lean_ctor_set(x_65, 1, x_54); +x_66 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_66, 0, x_65); +lean_ctor_set(x_66, 1, x_52); +return x_66; +} +} +} +else +{ +uint8_t x_67; +lean_dec(x_22); +lean_dec(x_17); +lean_dec(x_9); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +x_67 = !lean_is_exclusive(x_28); +if (x_67 == 0) +{ +return x_28; +} +else +{ +lean_object* x_68; lean_object* x_69; lean_object* x_70; +x_68 = lean_ctor_get(x_28, 0); +x_69 = lean_ctor_get(x_28, 1); +lean_inc(x_69); +lean_inc(x_68); +lean_dec(x_28); +x_70 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_70, 0, x_68); +lean_ctor_set(x_70, 1, x_69); +return x_70; +} +} +} +} +} +} +LEAN_EXPORT lean_object* l_REPL_runCommand___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) { +_start: +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_9 = lean_ctor_get(x_6, 1); +lean_inc(x_9); +x_10 = lean_ctor_get(x_6, 0); +lean_inc(x_10); +lean_dec(x_6); +x_11 = lean_ctor_get(x_9, 0); +lean_inc(x_11); +x_12 = lean_ctor_get(x_9, 1); +lean_inc(x_12); +lean_dec(x_9); +lean_inc(x_1); +x_13 = l_List_mapM_loop___at_REPL_unpickleProofSnapshot___spec__2(x_11, x_1, x_7, x_8); +if (lean_obj_tag(x_13) == 0) +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_14 = lean_ctor_get(x_13, 0); +lean_inc(x_14); +x_15 = lean_ctor_get(x_13, 1); +lean_inc(x_15); +lean_dec(x_13); +x_16 = lean_ctor_get(x_14, 0); +lean_inc(x_16); +x_17 = lean_ctor_get(x_14, 1); +lean_inc(x_17); +lean_dec(x_14); +if (lean_obj_tag(x_5) == 0) +{ +lean_inc(x_3); +x_18 = x_3; +goto block_50; +} +else +{ +uint8_t x_51; +x_51 = !lean_is_exclusive(x_5); +if (x_51 == 0) +{ +lean_object* x_52; lean_object* x_53; +x_52 = lean_ctor_get(x_5, 0); +x_53 = lean_ctor_get(x_52, 0); +lean_inc(x_53); +lean_dec(x_52); +lean_ctor_set(x_5, 0, x_53); +x_18 = x_5; +goto block_50; +} +else +{ +lean_object* x_54; lean_object* x_55; lean_object* x_56; +x_54 = lean_ctor_get(x_5, 0); +lean_inc(x_54); +lean_dec(x_5); +x_55 = lean_ctor_get(x_54, 0); +lean_inc(x_55); +lean_dec(x_54); +x_56 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_56, 0, x_55); +x_18 = x_56; +goto block_50; +} +} +block_50: +{ +lean_object* x_19; +lean_inc(x_12); +x_19 = l_REPL_sorries___at_REPL_unpickleProofSnapshot___spec__3(x_12, x_18, x_17, x_15); +if (lean_obj_tag(x_19) == 0) +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_20 = lean_ctor_get(x_19, 0); +lean_inc(x_20); +x_21 = lean_ctor_get(x_2, 0); +x_22 = lean_ctor_get(x_21, 0); +if (lean_obj_tag(x_22) == 0) +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; +x_23 = lean_ctor_get(x_19, 1); +lean_inc(x_23); +lean_dec(x_19); +x_24 = lean_ctor_get(x_20, 0); +lean_inc(x_24); +x_25 = lean_ctor_get(x_20, 1); +lean_inc(x_25); +lean_dec(x_20); +lean_inc(x_1); +x_26 = l_REPL_runCommand___lambda__1(x_10, x_2, x_16, x_24, x_3, x_1, x_12, x_4, x_1, x_25, x_23); +return x_26; +} +else +{ +lean_object* x_27; uint8_t x_28; +x_27 = lean_ctor_get(x_22, 0); +x_28 = lean_unbox(x_27); +if (x_28 == 0) +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; +x_29 = lean_ctor_get(x_19, 1); +lean_inc(x_29); +lean_dec(x_19); +x_30 = lean_ctor_get(x_20, 0); +lean_inc(x_30); +x_31 = lean_ctor_get(x_20, 1); +lean_inc(x_31); +lean_dec(x_20); +lean_inc(x_1); +x_32 = l_REPL_runCommand___lambda__1(x_10, x_2, x_16, x_30, x_3, x_1, x_12, x_4, x_1, x_31, x_29); +return x_32; +} +else +{ +lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; +x_33 = lean_ctor_get(x_19, 1); +lean_inc(x_33); +lean_dec(x_19); +x_34 = lean_ctor_get(x_20, 0); +lean_inc(x_34); +x_35 = lean_ctor_get(x_20, 1); +lean_inc(x_35); +lean_dec(x_20); +lean_inc(x_12); +x_36 = l_REPL_tactics___at_REPL_runCommand___spec__5(x_12, x_35, x_33); +if (lean_obj_tag(x_36) == 0) +{ +lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; +x_37 = lean_ctor_get(x_36, 0); +lean_inc(x_37); +x_38 = lean_ctor_get(x_36, 1); +lean_inc(x_38); +lean_dec(x_36); +x_39 = lean_ctor_get(x_37, 0); +lean_inc(x_39); +x_40 = lean_ctor_get(x_37, 1); +lean_inc(x_40); +lean_dec(x_37); +x_41 = l_REPL_runCommand___lambda__1(x_10, x_2, x_16, x_34, x_3, x_1, x_12, x_4, x_39, x_40, x_38); +return x_41; +} +else +{ +uint8_t x_42; +lean_dec(x_34); +lean_dec(x_16); +lean_dec(x_12); +lean_dec(x_10); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_1); +x_42 = !lean_is_exclusive(x_36); +if (x_42 == 0) +{ +return x_36; +} +else +{ +lean_object* x_43; lean_object* x_44; lean_object* x_45; +x_43 = lean_ctor_get(x_36, 0); +x_44 = lean_ctor_get(x_36, 1); +lean_inc(x_44); +lean_inc(x_43); +lean_dec(x_36); +x_45 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_45, 0, x_43); +lean_ctor_set(x_45, 1, x_44); +return x_45; +} +} +} +} +} +else +{ +uint8_t x_46; +lean_dec(x_16); +lean_dec(x_12); +lean_dec(x_10); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_1); +x_46 = !lean_is_exclusive(x_19); +if (x_46 == 0) +{ +return x_19; +} +else +{ +lean_object* x_47; lean_object* x_48; lean_object* x_49; +x_47 = lean_ctor_get(x_19, 0); +x_48 = lean_ctor_get(x_19, 1); +lean_inc(x_48); +lean_inc(x_47); +lean_dec(x_19); +x_49 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_49, 0, x_47); +lean_ctor_set(x_49, 1, x_48); +return x_49; +} +} +} +} +else +{ +uint8_t x_57; +lean_dec(x_12); +lean_dec(x_10); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_1); +x_57 = !lean_is_exclusive(x_13); +if (x_57 == 0) +{ +return x_13; +} +else +{ +lean_object* x_58; lean_object* x_59; lean_object* x_60; +x_58 = lean_ctor_get(x_13, 0); +x_59 = lean_ctor_get(x_13, 1); +lean_inc(x_59); +lean_inc(x_58); +lean_dec(x_13); +x_60 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_60, 0, x_58); +lean_ctor_set(x_60, 1, x_59); +return x_60; +} +} +} +} +LEAN_EXPORT lean_object* l_REPL_runCommand___lambda__3(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; lean_object* x_7; lean_object* x_8; lean_object* x_9; +lean_dec(x_3); +x_6 = lean_ctor_get(x_1, 2); +lean_inc(x_6); +x_7 = lean_box(0); +x_8 = lean_box(0); +if (lean_obj_tag(x_2) == 0) +{ +x_9 = x_8; +goto block_25; +} +else +{ +lean_object* x_26; lean_object* x_27; lean_object* x_28; +x_26 = lean_ctor_get(x_2, 0); +lean_inc(x_26); +x_27 = lean_ctor_get(x_26, 0); +lean_inc(x_27); +lean_dec(x_26); +x_28 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_28, 0, x_27); +x_9 = x_28; +goto block_25; +} +block_25: +{ +lean_object* x_10; +lean_inc(x_9); +x_10 = l_Lean_Elab_IO_processInput_unsafe__1(x_6, x_9, x_7, x_8, x_5); +if (lean_obj_tag(x_10) == 0) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; +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); +x_13 = l_REPL_runCommand___lambda__2(x_7, x_1, x_8, x_2, x_9, x_11, x_4, x_12); +lean_dec(x_1); +return x_13; +} +else +{ +uint8_t x_14; +lean_dec(x_9); +lean_dec(x_2); +lean_dec(x_1); +x_14 = !lean_is_exclusive(x_10); +if (x_14 == 0) +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_15 = lean_ctor_get(x_10, 0); +x_16 = lean_io_error_to_string(x_15); +x_17 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_17, 0, x_16); +x_18 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_18, 0, x_17); +lean_ctor_set(x_18, 1, x_4); +lean_ctor_set_tag(x_10, 0); +lean_ctor_set(x_10, 0, x_18); +return x_10; +} +else +{ +lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_19 = lean_ctor_get(x_10, 0); +x_20 = lean_ctor_get(x_10, 1); +lean_inc(x_20); +lean_inc(x_19); +lean_dec(x_10); +x_21 = lean_io_error_to_string(x_19); +x_22 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_22, 0, x_21); +x_23 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_23, 0, x_22); +lean_ctor_set(x_23, 1, x_4); +x_24 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_24, 0, x_23); +lean_ctor_set(x_24, 1, x_20); +return x_24; +} +} +} +} +} +LEAN_EXPORT lean_object* l_REPL_runCommand___lambda__4(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; uint8_t x_6; +x_5 = lean_ctor_get(x_2, 1); +lean_inc(x_5); +x_6 = lean_unbox(x_5); +lean_dec(x_5); +if (x_6 == 0) +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; +x_7 = lean_ctor_get(x_2, 0); +lean_inc(x_7); +lean_dec(x_2); +x_8 = lean_box(0); +x_9 = l_REPL_runCommand___lambda__3(x_1, x_7, x_8, x_3, x_4); +return x_9; +} +else +{ +uint8_t x_10; +lean_dec(x_1); +x_10 = !lean_is_exclusive(x_2); +if (x_10 == 0) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; +x_11 = lean_ctor_get(x_2, 1); +lean_dec(x_11); +x_12 = lean_ctor_get(x_2, 0); +lean_dec(x_12); +x_13 = l_REPL_pickleCommandSnapshot___rarg___lambda__4___closed__2; +lean_ctor_set(x_2, 1, x_3); +lean_ctor_set(x_2, 0, x_13); +x_14 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_14, 0, x_2); +lean_ctor_set(x_14, 1, x_4); +return x_14; +} +else +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; +lean_dec(x_2); +x_15 = l_REPL_pickleCommandSnapshot___rarg___lambda__4___closed__2; +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_15); +lean_ctor_set(x_16, 1, x_3); +x_17 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_17, 0, x_16); +lean_ctor_set(x_17, 1, x_4); +return x_17; +} +} +} +} +LEAN_EXPORT lean_object* l_REPL_runCommand(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = lean_ctor_get(x_1, 1); +lean_inc(x_4); +if (lean_obj_tag(x_4) == 0) +{ +lean_object* x_5; lean_object* x_6; +x_5 = l_REPL_unpickleProofSnapshot___closed__1; +x_6 = l_REPL_runCommand___lambda__4(x_1, x_5, x_2, x_3); +return x_6; +} +else +{ +uint8_t x_7; +x_7 = !lean_is_exclusive(x_4); +if (x_7 == 0) +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; +x_8 = lean_ctor_get(x_4, 0); +x_9 = lean_ctor_get(x_2, 0); +lean_inc(x_9); +x_10 = lean_array_get_size(x_9); +x_11 = lean_nat_dec_lt(x_8, x_10); +lean_dec(x_10); +if (x_11 == 0) +{ +lean_object* x_12; lean_object* x_13; +lean_dec(x_9); +lean_free_object(x_4); +lean_dec(x_8); +x_12 = l_REPL_unpickleProofSnapshot___closed__2; +x_13 = l_REPL_runCommand___lambda__4(x_1, x_12, x_2, x_3); +return x_13; +} +else +{ +lean_object* x_14; uint8_t x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_14 = lean_array_fget(x_9, x_8); +lean_dec(x_8); +lean_dec(x_9); +lean_ctor_set(x_4, 0, x_14); +x_15 = 0; +x_16 = lean_box(x_15); +x_17 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_17, 0, x_4); +lean_ctor_set(x_17, 1, x_16); +x_18 = l_REPL_runCommand___lambda__4(x_1, x_17, x_2, x_3); +return x_18; +} +} +else +{ +lean_object* x_19; lean_object* x_20; lean_object* x_21; uint8_t x_22; +x_19 = lean_ctor_get(x_4, 0); +lean_inc(x_19); +lean_dec(x_4); +x_20 = lean_ctor_get(x_2, 0); +lean_inc(x_20); +x_21 = lean_array_get_size(x_20); +x_22 = lean_nat_dec_lt(x_19, x_21); +lean_dec(x_21); +if (x_22 == 0) +{ +lean_object* x_23; lean_object* x_24; +lean_dec(x_20); +lean_dec(x_19); +x_23 = l_REPL_unpickleProofSnapshot___closed__2; +x_24 = l_REPL_runCommand___lambda__4(x_1, x_23, x_2, x_3); +return x_24; +} +else +{ +lean_object* x_25; lean_object* x_26; uint8_t x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; +x_25 = lean_array_fget(x_20, x_19); +lean_dec(x_19); +lean_dec(x_20); +x_26 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_26, 0, x_25); +x_27 = 0; +x_28 = lean_box(x_27); +x_29 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_29, 0, x_26); +lean_ctor_set(x_29, 1, x_28); +x_30 = l_REPL_runCommand___lambda__4(x_1, x_29, x_2, x_3); +return x_30; +} +} +} +} +} +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_REPL_runCommand___spec__1___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_1); +lean_dec(x_1); +x_7 = lean_unbox_usize(x_2); +lean_dec(x_2); +x_8 = l_Array_mapMUnsafe_map___at_REPL_runCommand___spec__1(x_6, x_7, x_3, x_4, x_5); +return x_8; +} +} +LEAN_EXPORT lean_object* l_REPL_runCommand___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, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { +_start: +{ +lean_object* x_12; +x_12 = l_REPL_runCommand___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11); +lean_dec(x_2); +return x_12; +} +} +LEAN_EXPORT lean_object* l_REPL_runCommand___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) { +_start: +{ +lean_object* x_9; +x_9 = l_REPL_runCommand___lambda__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +lean_dec(x_2); +return x_9; +} +} +LEAN_EXPORT lean_object* l_REPL_processFile(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_4 = lean_ctor_get(x_1, 0); +x_5 = lean_ctor_get(x_1, 1); +x_6 = l_IO_FS_readFile(x_5, x_3); +if (lean_obj_tag(x_6) == 0) +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_7 = lean_ctor_get(x_6, 0); +lean_inc(x_7); +x_8 = lean_ctor_get(x_6, 1); +lean_inc(x_8); +lean_dec(x_6); +x_9 = lean_box(0); +lean_inc(x_4); +x_10 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_10, 0, x_4); +lean_ctor_set(x_10, 1, x_9); +lean_ctor_set(x_10, 2, x_7); +lean_inc(x_2); +x_11 = l_REPL_runCommand(x_10, x_2, x_8); +if (lean_obj_tag(x_11) == 0) +{ +lean_dec(x_2); +return x_11; +} +else +{ +uint8_t x_12; +x_12 = !lean_is_exclusive(x_11); +if (x_12 == 0) +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_13 = lean_ctor_get(x_11, 0); +x_14 = lean_io_error_to_string(x_13); +x_15 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_15, 0, x_14); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_15); +lean_ctor_set(x_16, 1, x_2); +lean_ctor_set_tag(x_11, 0); +lean_ctor_set(x_11, 0, x_16); +return x_11; +} +else +{ +lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_17 = lean_ctor_get(x_11, 0); +x_18 = lean_ctor_get(x_11, 1); +lean_inc(x_18); +lean_inc(x_17); +lean_dec(x_11); +x_19 = lean_io_error_to_string(x_17); +x_20 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_20, 0, x_19); +x_21 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_21, 0, x_20); +lean_ctor_set(x_21, 1, x_2); +x_22 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_22, 0, x_21); +lean_ctor_set(x_22, 1, x_18); +return x_22; +} +} +} +else +{ +uint8_t x_23; +x_23 = !lean_is_exclusive(x_6); +if (x_23 == 0) +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; +x_24 = lean_ctor_get(x_6, 0); +x_25 = lean_io_error_to_string(x_24); +x_26 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_26, 0, x_25); +x_27 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_27, 0, x_26); +lean_ctor_set(x_27, 1, x_2); +lean_ctor_set_tag(x_6, 0); +lean_ctor_set(x_6, 0, x_27); +return x_6; +} +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; +x_28 = lean_ctor_get(x_6, 0); +x_29 = lean_ctor_get(x_6, 1); +lean_inc(x_29); +lean_inc(x_28); +lean_dec(x_6); +x_30 = lean_io_error_to_string(x_28); +x_31 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_31, 0, x_30); +x_32 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_32, 0, x_31); +lean_ctor_set(x_32, 1, x_2); +x_33 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_33, 0, x_32); +lean_ctor_set(x_33, 1, x_29); +return x_33; +} +} +} +} +LEAN_EXPORT lean_object* l_REPL_processFile___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_REPL_processFile(x_1, x_2, x_3); +lean_dec(x_1); +return x_4; +} +} +static lean_object* _init_l_REPL_runProofStep___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("Unknown proof state.", 20); +return x_1; +} +} +static lean_object* _init_l_REPL_runProofStep___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_REPL_runProofStep___closed__1; +x_2 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +static lean_object* _init_l_REPL_runProofStep___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("Lean error:\n", 12); +return x_1; +} +} +LEAN_EXPORT lean_object* l_REPL_runProofStep(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; uint8_t x_7; +x_4 = lean_ctor_get(x_2, 1); +lean_inc(x_4); +x_5 = lean_ctor_get(x_1, 0); +lean_inc(x_5); +x_6 = lean_array_get_size(x_4); +x_7 = lean_nat_dec_lt(x_5, x_6); +lean_dec(x_6); +if (x_7 == 0) +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_1); +x_8 = l_REPL_runProofStep___closed__2; +x_9 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_9, 0, x_8); +lean_ctor_set(x_9, 1, x_2); +x_10 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_10, 0, x_9); +lean_ctor_set(x_10, 1, x_3); +return x_10; +} +else +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_11 = lean_array_fget(x_4, x_5); +lean_dec(x_5); +lean_dec(x_4); +x_12 = lean_ctor_get(x_1, 1); +lean_inc(x_12); +lean_dec(x_1); +lean_inc(x_11); +x_13 = l_REPL_ProofSnapshot_runString(x_11, x_12, x_3); +if (lean_obj_tag(x_13) == 0) +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_14 = lean_ctor_get(x_13, 0); +lean_inc(x_14); +x_15 = lean_ctor_get(x_13, 1); +lean_inc(x_15); +lean_dec(x_13); +x_16 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_16, 0, x_11); +lean_inc(x_2); +x_17 = l_REPL_createProofStepReponse___at_REPL_unpickleProofSnapshot___spec__1(x_14, x_16, x_2, x_15); +if (lean_obj_tag(x_17) == 0) +{ +uint8_t x_18; +lean_dec(x_2); +x_18 = !lean_is_exclusive(x_17); +if (x_18 == 0) +{ +lean_object* x_19; uint8_t x_20; +x_19 = lean_ctor_get(x_17, 0); +x_20 = !lean_is_exclusive(x_19); +if (x_20 == 0) +{ +lean_object* x_21; lean_object* x_22; +x_21 = lean_ctor_get(x_19, 0); +x_22 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_22, 0, x_21); +lean_ctor_set(x_19, 0, x_22); +return x_17; +} +else +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; +x_23 = lean_ctor_get(x_19, 0); +x_24 = lean_ctor_get(x_19, 1); +lean_inc(x_24); +lean_inc(x_23); +lean_dec(x_19); +x_25 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_25, 0, x_23); +x_26 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_26, 0, x_25); +lean_ctor_set(x_26, 1, x_24); +lean_ctor_set(x_17, 0, x_26); +return x_17; +} +} +else +{ +lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; +x_27 = lean_ctor_get(x_17, 0); +x_28 = lean_ctor_get(x_17, 1); +lean_inc(x_28); +lean_inc(x_27); +lean_dec(x_17); +x_29 = lean_ctor_get(x_27, 0); +lean_inc(x_29); +x_30 = lean_ctor_get(x_27, 1); +lean_inc(x_30); +if (lean_is_exclusive(x_27)) { + lean_ctor_release(x_27, 0); + lean_ctor_release(x_27, 1); + x_31 = x_27; +} else { + lean_dec_ref(x_27); + x_31 = lean_box(0); +} +x_32 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_32, 0, x_29); +if (lean_is_scalar(x_31)) { + x_33 = lean_alloc_ctor(0, 2, 0); +} else { + x_33 = x_31; +} +lean_ctor_set(x_33, 0, x_32); +lean_ctor_set(x_33, 1, x_30); +x_34 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_34, 0, x_33); +lean_ctor_set(x_34, 1, x_28); +return x_34; +} +} +else +{ +uint8_t x_35; +x_35 = !lean_is_exclusive(x_17); +if (x_35 == 0) +{ +lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; +x_36 = lean_ctor_get(x_17, 0); +x_37 = lean_io_error_to_string(x_36); +x_38 = l_REPL_runProofStep___closed__3; +x_39 = lean_string_append(x_38, x_37); +lean_dec(x_37); +x_40 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_40, 0, x_39); +x_41 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_41, 0, x_40); +lean_ctor_set(x_41, 1, x_2); +lean_ctor_set_tag(x_17, 0); +lean_ctor_set(x_17, 0, x_41); +return x_17; +} +else +{ +lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; +x_42 = lean_ctor_get(x_17, 0); +x_43 = lean_ctor_get(x_17, 1); +lean_inc(x_43); +lean_inc(x_42); +lean_dec(x_17); +x_44 = lean_io_error_to_string(x_42); +x_45 = l_REPL_runProofStep___closed__3; +x_46 = lean_string_append(x_45, x_44); +lean_dec(x_44); +x_47 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_47, 0, x_46); +x_48 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_48, 0, x_47); +lean_ctor_set(x_48, 1, x_2); +x_49 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_49, 0, x_48); +lean_ctor_set(x_49, 1, x_43); +return x_49; +} +} +} +else +{ +uint8_t x_50; +lean_dec(x_11); +x_50 = !lean_is_exclusive(x_13); +if (x_50 == 0) +{ +lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; +x_51 = lean_ctor_get(x_13, 0); +x_52 = lean_io_error_to_string(x_51); +x_53 = l_REPL_runProofStep___closed__3; +x_54 = lean_string_append(x_53, x_52); +lean_dec(x_52); +x_55 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_55, 0, x_54); +x_56 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_56, 0, x_55); +lean_ctor_set(x_56, 1, x_2); +lean_ctor_set_tag(x_13, 0); +lean_ctor_set(x_13, 0, x_56); +return x_13; +} +else +{ +lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; +x_57 = lean_ctor_get(x_13, 0); +x_58 = lean_ctor_get(x_13, 1); +lean_inc(x_58); +lean_inc(x_57); +lean_dec(x_13); +x_59 = lean_io_error_to_string(x_57); +x_60 = l_REPL_runProofStep___closed__3; +x_61 = lean_string_append(x_60, x_59); +lean_dec(x_59); +x_62 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_62, 0, x_61); +x_63 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_63, 0, x_62); +lean_ctor_set(x_63, 1, x_2); +x_64 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_64, 0, x_63); +lean_ctor_set(x_64, 1, x_58); +return x_64; +} +} +} +} +} +LEAN_EXPORT lean_object* l_getLines(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_2 = lean_get_stdin(x_1); +x_3 = lean_ctor_get(x_2, 0); +lean_inc(x_3); +x_4 = lean_ctor_get(x_2, 1); +lean_inc(x_4); +lean_dec(x_2); +x_5 = lean_ctor_get(x_3, 3); +lean_inc(x_5); +lean_dec(x_3); +x_6 = lean_apply_1(x_5, x_4); +if (lean_obj_tag(x_6) == 0) +{ +uint8_t x_7; +x_7 = !lean_is_exclusive(x_6); +if (x_7 == 0) +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; +x_8 = lean_ctor_get(x_6, 0); +x_9 = lean_ctor_get(x_6, 1); +x_10 = l_String_trim(x_8); +x_11 = l_String_isEmpty(x_10); +lean_dec(x_10); +if (x_11 == 0) +{ +lean_object* x_12; +lean_free_object(x_6); +x_12 = l_getLines(x_9); +if (lean_obj_tag(x_12) == 0) +{ +uint8_t x_13; +x_13 = !lean_is_exclusive(x_12); +if (x_13 == 0) +{ +lean_object* x_14; lean_object* x_15; +x_14 = lean_ctor_get(x_12, 0); +x_15 = lean_string_append(x_8, x_14); +lean_dec(x_14); +lean_ctor_set(x_12, 0, x_15); +return x_12; +} +else +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_16 = lean_ctor_get(x_12, 0); +x_17 = lean_ctor_get(x_12, 1); +lean_inc(x_17); +lean_inc(x_16); +lean_dec(x_12); +x_18 = lean_string_append(x_8, x_16); +lean_dec(x_16); +x_19 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_19, 0, x_18); +lean_ctor_set(x_19, 1, x_17); +return x_19; +} +} +else +{ +uint8_t x_20; +lean_dec(x_8); +x_20 = !lean_is_exclusive(x_12); +if (x_20 == 0) +{ +return x_12; +} +else +{ +lean_object* x_21; lean_object* x_22; lean_object* x_23; +x_21 = lean_ctor_get(x_12, 0); +x_22 = lean_ctor_get(x_12, 1); +lean_inc(x_22); +lean_inc(x_21); +lean_dec(x_12); +x_23 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_23, 0, x_21); +lean_ctor_set(x_23, 1, x_22); +return x_23; +} +} +} +else +{ +return x_6; +} +} +else +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; uint8_t x_27; +x_24 = lean_ctor_get(x_6, 0); +x_25 = lean_ctor_get(x_6, 1); +lean_inc(x_25); +lean_inc(x_24); +lean_dec(x_6); +x_26 = l_String_trim(x_24); +x_27 = l_String_isEmpty(x_26); +lean_dec(x_26); +if (x_27 == 0) +{ +lean_object* x_28; +x_28 = l_getLines(x_25); +if (lean_obj_tag(x_28) == 0) +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_29 = lean_ctor_get(x_28, 0); +lean_inc(x_29); +x_30 = lean_ctor_get(x_28, 1); +lean_inc(x_30); +if (lean_is_exclusive(x_28)) { + lean_ctor_release(x_28, 0); + lean_ctor_release(x_28, 1); + x_31 = x_28; +} else { + lean_dec_ref(x_28); + x_31 = lean_box(0); +} +x_32 = lean_string_append(x_24, x_29); +lean_dec(x_29); +if (lean_is_scalar(x_31)) { + x_33 = lean_alloc_ctor(0, 2, 0); +} else { + x_33 = x_31; +} +lean_ctor_set(x_33, 0, x_32); +lean_ctor_set(x_33, 1, x_30); +return x_33; +} +else +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; +lean_dec(x_24); +x_34 = lean_ctor_get(x_28, 0); +lean_inc(x_34); +x_35 = lean_ctor_get(x_28, 1); +lean_inc(x_35); +if (lean_is_exclusive(x_28)) { + lean_ctor_release(x_28, 0); + lean_ctor_release(x_28, 1); + x_36 = x_28; +} else { + lean_dec_ref(x_28); + x_36 = lean_box(0); +} +if (lean_is_scalar(x_36)) { + x_37 = lean_alloc_ctor(1, 2, 0); +} else { + x_37 = x_36; +} +lean_ctor_set(x_37, 0, x_34); +lean_ctor_set(x_37, 1, x_35); +return x_37; +} +} +else +{ +lean_object* x_38; +x_38 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_38, 0, x_24); +lean_ctor_set(x_38, 1, x_25); +return x_38; +} +} +} +else +{ +uint8_t x_39; +x_39 = !lean_is_exclusive(x_6); +if (x_39 == 0) +{ +return x_6; +} +else +{ +lean_object* x_40; lean_object* x_41; lean_object* x_42; +x_40 = lean_ctor_get(x_6, 0); +x_41 = lean_ctor_get(x_6, 1); +lean_inc(x_41); +lean_inc(x_40); +lean_dec(x_6); +x_42 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_42, 0, x_40); +lean_ctor_set(x_42, 1, x_41); +return x_42; +} +} +} +} +LEAN_EXPORT lean_object* l_instToJsonSum___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +if (lean_obj_tag(x_3) == 0) +{ +lean_object* x_4; lean_object* x_5; +lean_dec(x_2); +x_4 = lean_ctor_get(x_3, 0); +lean_inc(x_4); +lean_dec(x_3); +x_5 = lean_apply_1(x_1, x_4); +return x_5; +} +else +{ +lean_object* x_6; lean_object* x_7; +lean_dec(x_1); +x_6 = lean_ctor_get(x_3, 0); +lean_inc(x_6); +lean_dec(x_3); +x_7 = lean_apply_1(x_2, x_6); +return x_7; +} +} +} +LEAN_EXPORT lean_object* l_instToJsonSum(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l_instToJsonSum___rarg), 3, 0); +return x_3; +} +} +static lean_object* _init_l_parse___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("Could not parse JSON:\n", 22); +return x_1; +} +} +static lean_object* _init_l_parse___closed__2() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("Could not parse as a valid JSON command:\n", 41); +return x_1; +} +} +LEAN_EXPORT lean_object* l_parse(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_Lean_Json_parse(x_1); +if (lean_obj_tag(x_3) == 0) +{ +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; lean_object* x_11; +x_4 = lean_ctor_get(x_3, 0); +lean_inc(x_4); +lean_dec(x_3); +x_5 = l_parse___closed__1; +x_6 = lean_string_append(x_5, x_4); +lean_dec(x_4); +x_7 = l___private_REPL_JSON_0__REPL_toJsonError____x40_REPL_JSON___hyg_2860_(x_6); +x_8 = lean_unsigned_to_nat(80u); +x_9 = l_Lean_Json_pretty(x_7, x_8); +x_10 = lean_alloc_ctor(18, 1, 0); +lean_ctor_set(x_10, 0, x_9); +x_11 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_11, 0, x_10); +lean_ctor_set(x_11, 1, x_2); +return x_11; +} +else +{ +lean_object* x_12; lean_object* x_13; +x_12 = lean_ctor_get(x_3, 0); +lean_inc(x_12); +lean_dec(x_3); +x_13 = l___private_REPL_JSON_0__REPL_fromJsonProofStep____x40_REPL_JSON___hyg_529_(x_12); +if (lean_obj_tag(x_13) == 0) +{ +lean_object* x_14; +lean_dec(x_13); +x_14 = l___private_REPL_JSON_0__REPL_fromJsonPickleEnvironment____x40_REPL_JSON___hyg_3018_(x_12); +if (lean_obj_tag(x_14) == 0) +{ +lean_object* x_15; +lean_dec(x_14); +x_15 = l___private_REPL_JSON_0__REPL_fromJsonUnpickleEnvironment____x40_REPL_JSON___hyg_3161_(x_12); +if (lean_obj_tag(x_15) == 0) +{ +lean_object* x_16; +lean_dec(x_15); +x_16 = l___private_REPL_JSON_0__REPL_fromJsonPickleProofState____x40_REPL_JSON___hyg_3287_(x_12); +if (lean_obj_tag(x_16) == 0) +{ +lean_object* x_17; +lean_dec(x_16); +x_17 = l___private_REPL_JSON_0__REPL_fromJsonUnpickleProofState____x40_REPL_JSON___hyg_3453_(x_12); +if (lean_obj_tag(x_17) == 0) +{ +lean_object* x_18; +lean_dec(x_17); +x_18 = l___private_REPL_JSON_0__REPL_fromJsonCommand____x40_REPL_JSON___hyg_128_(x_12); +if (lean_obj_tag(x_18) == 0) +{ +lean_object* x_19; +lean_dec(x_18); +x_19 = l___private_REPL_JSON_0__REPL_fromJsonFile____x40_REPL_JSON___hyg_325_(x_12); +lean_dec(x_12); +if (lean_obj_tag(x_19) == 0) +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; +x_20 = lean_ctor_get(x_19, 0); +lean_inc(x_20); +lean_dec(x_19); +x_21 = l_parse___closed__2; +x_22 = lean_string_append(x_21, x_20); +lean_dec(x_20); +x_23 = l___private_REPL_JSON_0__REPL_toJsonError____x40_REPL_JSON___hyg_2860_(x_22); +x_24 = lean_unsigned_to_nat(80u); +x_25 = l_Lean_Json_pretty(x_23, x_24); +x_26 = lean_alloc_ctor(18, 1, 0); +lean_ctor_set(x_26, 0, x_25); +x_27 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_27, 0, x_26); +lean_ctor_set(x_27, 1, x_2); +return x_27; +} +else +{ +lean_object* x_28; lean_object* x_29; lean_object* x_30; +x_28 = lean_ctor_get(x_19, 0); +lean_inc(x_28); +lean_dec(x_19); +x_29 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_29, 0, x_28); +x_30 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_30, 0, x_29); +lean_ctor_set(x_30, 1, x_2); +return x_30; +} +} +else +{ +lean_object* x_31; lean_object* x_32; lean_object* x_33; +lean_dec(x_12); +x_31 = lean_ctor_get(x_18, 0); +lean_inc(x_31); +lean_dec(x_18); +x_32 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_32, 0, x_31); +x_33 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_33, 0, x_32); +lean_ctor_set(x_33, 1, x_2); +return x_33; +} +} +else +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; +lean_dec(x_12); +x_34 = lean_ctor_get(x_17, 0); +lean_inc(x_34); +lean_dec(x_17); +x_35 = lean_alloc_ctor(6, 1, 0); +lean_ctor_set(x_35, 0, 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_2); +return x_36; +} +} +else +{ +lean_object* x_37; lean_object* x_38; lean_object* x_39; +lean_dec(x_12); +x_37 = lean_ctor_get(x_16, 0); +lean_inc(x_37); +lean_dec(x_16); +x_38 = lean_alloc_ctor(5, 1, 0); +lean_ctor_set(x_38, 0, x_37); +x_39 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_39, 0, x_38); +lean_ctor_set(x_39, 1, x_2); +return x_39; +} +} +else +{ +lean_object* x_40; lean_object* x_41; lean_object* x_42; +lean_dec(x_12); +x_40 = lean_ctor_get(x_15, 0); +lean_inc(x_40); +lean_dec(x_15); +x_41 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_41, 0, x_40); +x_42 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_42, 0, x_41); +lean_ctor_set(x_42, 1, x_2); +return x_42; +} +} +else +{ +lean_object* x_43; lean_object* x_44; lean_object* x_45; +lean_dec(x_12); +x_43 = lean_ctor_get(x_14, 0); +lean_inc(x_43); +lean_dec(x_14); +x_44 = lean_alloc_ctor(3, 1, 0); +lean_ctor_set(x_44, 0, x_43); +x_45 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_45, 0, x_44); +lean_ctor_set(x_45, 1, x_2); +return x_45; +} +} +else +{ +lean_object* x_46; lean_object* x_47; lean_object* x_48; +lean_dec(x_12); +x_46 = lean_ctor_get(x_13, 0); +lean_inc(x_46); +lean_dec(x_13); +x_47 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_47, 0, x_46); +x_48 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_48, 0, x_47); +lean_ctor_set(x_48, 1, x_2); +return x_48; +} +} +} +} +LEAN_EXPORT lean_object* l_REPL_pickleCommandSnapshot___at_repl_loop___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8; +x_4 = lean_ctor_get(x_2, 0); +lean_inc(x_4); +x_5 = lean_ctor_get(x_1, 0); +x_6 = lean_ctor_get(x_1, 1); +x_7 = lean_array_get_size(x_4); +x_8 = lean_nat_dec_lt(x_5, x_7); +lean_dec(x_7); +if (x_8 == 0) +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; +lean_dec(x_4); +x_9 = l_REPL_pickleCommandSnapshot___rarg___lambda__4___closed__2; +x_10 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_10, 0, x_9); +lean_ctor_set(x_10, 1, x_2); +x_11 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_11, 0, x_10); +lean_ctor_set(x_11, 1, x_3); +return x_11; +} +else +{ +lean_object* x_12; lean_object* x_13; +x_12 = lean_array_fget(x_4, x_5); +lean_dec(x_4); +x_13 = l_REPL_CommandSnapshot_pickle(x_12, x_6, x_3); +lean_dec(x_12); +if (lean_obj_tag(x_13) == 0) +{ +uint8_t x_14; +x_14 = !lean_is_exclusive(x_13); +if (x_14 == 0) +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_15 = lean_ctor_get(x_13, 0); +lean_dec(x_15); +x_16 = lean_box(0); +x_17 = lean_box(0); +lean_inc(x_5); +x_18 = lean_alloc_ctor(0, 5, 0); +lean_ctor_set(x_18, 0, x_5); +lean_ctor_set(x_18, 1, x_16); +lean_ctor_set(x_18, 2, x_16); +lean_ctor_set(x_18, 3, x_16); +lean_ctor_set(x_18, 4, x_17); +x_19 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_19, 0, x_18); +x_20 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_20, 0, x_19); +lean_ctor_set(x_20, 1, x_2); +lean_ctor_set(x_13, 0, x_20); +return x_13; +} +else +{ +lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; +x_21 = lean_ctor_get(x_13, 1); +lean_inc(x_21); +lean_dec(x_13); +x_22 = lean_box(0); +x_23 = lean_box(0); +lean_inc(x_5); +x_24 = lean_alloc_ctor(0, 5, 0); +lean_ctor_set(x_24, 0, x_5); +lean_ctor_set(x_24, 1, x_22); +lean_ctor_set(x_24, 2, x_22); +lean_ctor_set(x_24, 3, x_22); +lean_ctor_set(x_24, 4, x_23); +x_25 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_25, 0, x_24); +x_26 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_26, 0, x_25); +lean_ctor_set(x_26, 1, x_2); +x_27 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_27, 0, x_26); +lean_ctor_set(x_27, 1, x_21); +return x_27; +} +} +else +{ +uint8_t x_28; +lean_dec(x_2); +x_28 = !lean_is_exclusive(x_13); +if (x_28 == 0) +{ +return x_13; +} +else +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_29 = lean_ctor_get(x_13, 0); +x_30 = lean_ctor_get(x_13, 1); +lean_inc(x_30); +lean_inc(x_29); +lean_dec(x_13); +x_31 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_31, 0, x_29); +lean_ctor_set(x_31, 1, x_30); +return x_31; +} +} +} +} +} +LEAN_EXPORT lean_object* l_REPL_pickleProofSnapshot___at_repl_loop___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; uint8_t x_7; +x_4 = lean_ctor_get(x_2, 1); +lean_inc(x_4); +x_5 = lean_ctor_get(x_1, 0); +x_6 = lean_array_get_size(x_4); +x_7 = lean_nat_dec_lt(x_5, x_6); +lean_dec(x_6); +if (x_7 == 0) +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; +lean_dec(x_4); +x_8 = l_REPL_pickleProofSnapshot___rarg___lambda__3___closed__2; +x_9 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_9, 0, x_8); +lean_ctor_set(x_9, 1, x_2); +x_10 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_10, 0, x_9); +lean_ctor_set(x_10, 1, x_3); +return x_10; +} +else +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_11 = lean_array_fget(x_4, x_5); +lean_dec(x_4); +x_12 = lean_ctor_get(x_1, 1); +x_13 = l_REPL_ProofSnapshot_pickle(x_11, x_12, x_3); +if (lean_obj_tag(x_13) == 0) +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_14 = lean_ctor_get(x_13, 1); +lean_inc(x_14); +lean_dec(x_13); +x_15 = lean_box(0); +x_16 = l_REPL_createProofStepReponse___at_REPL_unpickleProofSnapshot___spec__1(x_11, x_15, x_2, x_14); +if (lean_obj_tag(x_16) == 0) +{ +uint8_t x_17; +x_17 = !lean_is_exclusive(x_16); +if (x_17 == 0) +{ +lean_object* x_18; uint8_t x_19; +x_18 = lean_ctor_get(x_16, 0); +x_19 = !lean_is_exclusive(x_18); +if (x_19 == 0) +{ +lean_object* x_20; lean_object* x_21; +x_20 = lean_ctor_get(x_18, 0); +x_21 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_21, 0, x_20); +lean_ctor_set(x_18, 0, x_21); +return x_16; +} +else +{ +lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; +x_22 = lean_ctor_get(x_18, 0); +x_23 = lean_ctor_get(x_18, 1); +lean_inc(x_23); +lean_inc(x_22); +lean_dec(x_18); +x_24 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_24, 0, x_22); +x_25 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_25, 0, x_24); +lean_ctor_set(x_25, 1, x_23); +lean_ctor_set(x_16, 0, x_25); +return x_16; +} +} +else +{ +lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_26 = lean_ctor_get(x_16, 0); +x_27 = lean_ctor_get(x_16, 1); +lean_inc(x_27); +lean_inc(x_26); +lean_dec(x_16); +x_28 = lean_ctor_get(x_26, 0); +lean_inc(x_28); +x_29 = lean_ctor_get(x_26, 1); +lean_inc(x_29); +if (lean_is_exclusive(x_26)) { + lean_ctor_release(x_26, 0); + lean_ctor_release(x_26, 1); + x_30 = x_26; +} else { + lean_dec_ref(x_26); + x_30 = lean_box(0); +} +x_31 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_31, 0, x_28); +if (lean_is_scalar(x_30)) { + x_32 = lean_alloc_ctor(0, 2, 0); +} else { + x_32 = x_30; +} +lean_ctor_set(x_32, 0, x_31); +lean_ctor_set(x_32, 1, x_29); +x_33 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_33, 0, x_32); +lean_ctor_set(x_33, 1, x_27); +return x_33; +} +} +else +{ +uint8_t x_34; +x_34 = !lean_is_exclusive(x_16); +if (x_34 == 0) +{ +return x_16; +} +else +{ +lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_35 = lean_ctor_get(x_16, 0); +x_36 = lean_ctor_get(x_16, 1); +lean_inc(x_36); +lean_inc(x_35); +lean_dec(x_16); +x_37 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_37, 0, x_35); +lean_ctor_set(x_37, 1, x_36); +return x_37; +} +} +} +else +{ +uint8_t x_38; +lean_dec(x_11); +lean_dec(x_2); +x_38 = !lean_is_exclusive(x_13); +if (x_38 == 0) +{ +return x_13; +} +else +{ +lean_object* x_39; lean_object* x_40; lean_object* x_41; +x_39 = lean_ctor_get(x_13, 0); +x_40 = lean_ctor_get(x_13, 1); +lean_inc(x_40); +lean_inc(x_39); +lean_dec(x_13); +x_41 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_41, 0, x_39); +lean_ctor_set(x_41, 1, x_40); +return x_41; +} +} +} +} +} +static lean_object* _init_l_repl_loop___lambda__1___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("#", 1); +return x_1; +} +} +static lean_object* _init_l_repl_loop___lambda__1___closed__2() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("--", 2); +return x_1; +} +} +static lean_object* _init_l_repl_loop___lambda__1___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("env", 3); +return x_1; +} +} +static lean_object* _init_l_repl_loop___lambda__1___closed__4() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("messages", 8); +return x_1; +} +} +static lean_object* _init_l_repl_loop___lambda__1___closed__5() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("sorries", 7); +return x_1; +} +} +static lean_object* _init_l_repl_loop___lambda__1___closed__6() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = lean_box(0); +x_2 = lean_alloc_ctor(1, 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_repl_loop___lambda__1___closed__7() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("infotree", 8); +return x_1; +} +} +static lean_object* _init_l_repl_loop___lambda__1___closed__8() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("proofState", 10); +return x_1; +} +} +static lean_object* _init_l_repl_loop___lambda__1___closed__9() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("goals", 5); +return x_1; +} +} +static lean_object* _init_l_repl_loop___lambda__1___closed__10() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("traces", 6); +return x_1; +} +} +LEAN_EXPORT lean_object* l_repl_loop___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; lean_object* x_6; lean_object* x_26; uint8_t x_27; +lean_dec(x_2); +x_26 = l_repl_loop___lambda__1___closed__1; +lean_inc(x_1); +x_27 = l_String_startsWith(x_1, x_26); +if (x_27 == 0) +{ +lean_object* x_28; uint8_t x_29; +x_28 = l_repl_loop___lambda__1___closed__2; +lean_inc(x_1); +x_29 = l_String_startsWith(x_1, x_28); +if (x_29 == 0) +{ +lean_object* x_30; +x_30 = l_parse(x_1, x_4); +if (lean_obj_tag(x_30) == 0) +{ +lean_object* x_31; +x_31 = lean_ctor_get(x_30, 0); +lean_inc(x_31); +switch (lean_obj_tag(x_31)) { +case 0: +{ +lean_object* x_32; lean_object* x_33; lean_object* x_34; +x_32 = lean_ctor_get(x_30, 1); +lean_inc(x_32); +lean_dec(x_30); +x_33 = lean_ctor_get(x_31, 0); +lean_inc(x_33); +lean_dec(x_31); +x_34 = l_REPL_runCommand(x_33, x_3, x_32); +if (lean_obj_tag(x_34) == 0) +{ +lean_object* x_35; lean_object* x_36; +x_35 = lean_ctor_get(x_34, 0); +lean_inc(x_35); +x_36 = lean_ctor_get(x_35, 0); +lean_inc(x_36); +if (lean_obj_tag(x_36) == 0) +{ +lean_object* x_37; uint8_t x_38; +x_37 = lean_ctor_get(x_34, 1); +lean_inc(x_37); +lean_dec(x_34); +x_38 = !lean_is_exclusive(x_35); +if (x_38 == 0) +{ +lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; 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; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; +x_39 = lean_ctor_get(x_35, 1); +x_40 = lean_ctor_get(x_35, 0); +lean_dec(x_40); +x_41 = lean_ctor_get(x_36, 0); +lean_inc(x_41); +lean_dec(x_36); +x_42 = lean_ctor_get(x_41, 0); +lean_inc(x_42); +x_43 = l_Lean_JsonNumber_fromNat(x_42); +x_44 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_44, 0, x_43); +x_45 = l_repl_loop___lambda__1___closed__3; +lean_ctor_set(x_35, 1, x_44); +lean_ctor_set(x_35, 0, x_45); +x_46 = lean_box(0); +x_47 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_47, 0, x_35); +lean_ctor_set(x_47, 1, x_46); +x_48 = lean_ctor_get(x_41, 1); +lean_inc(x_48); +x_49 = l_repl_loop___lambda__1___closed__4; +x_50 = l_REPL_Json_nonemptyList___at_REPL_instToJsonCommandResponse___spec__1(x_49, x_48); +x_51 = lean_ctor_get(x_41, 2); +lean_inc(x_51); +x_52 = l_repl_loop___lambda__1___closed__5; +x_53 = l_REPL_Json_nonemptyList___at_REPL_instToJsonCommandResponse___spec__3(x_52, x_51); +x_54 = lean_ctor_get(x_41, 3); +lean_inc(x_54); +x_55 = l_REPL_runCommand___lambda__1___closed__2; +x_56 = l_REPL_Json_nonemptyList___at_REPL_instToJsonCommandResponse___spec__5(x_55, x_54); +x_57 = lean_ctor_get(x_41, 4); +lean_inc(x_57); +lean_dec(x_41); +if (lean_obj_tag(x_57) == 0) +{ +lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; +x_58 = l_repl_loop___lambda__1___closed__6; +x_59 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_59, 0, x_56); +lean_ctor_set(x_59, 1, x_58); +x_60 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_60, 0, x_53); +lean_ctor_set(x_60, 1, x_59); +x_61 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_61, 0, x_50); +lean_ctor_set(x_61, 1, x_60); +x_62 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_62, 0, x_47); +lean_ctor_set(x_62, 1, x_61); +x_63 = l_List_join___rarg(x_62); +x_64 = l_Lean_Json_mkObj(x_63); +x_65 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_65, 0, x_64); +lean_ctor_set(x_65, 1, x_39); +x_5 = x_65; +x_6 = x_37; +goto block_25; +} +else +{ +lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; +x_66 = lean_ctor_get(x_57, 0); +lean_inc(x_66); +lean_dec(x_57); +x_67 = l_repl_loop___lambda__1___closed__7; +x_68 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_68, 0, x_67); +lean_ctor_set(x_68, 1, x_66); +x_69 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_69, 0, x_68); +lean_ctor_set(x_69, 1, x_46); +x_70 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_70, 0, x_69); +lean_ctor_set(x_70, 1, x_46); +x_71 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_71, 0, x_56); +lean_ctor_set(x_71, 1, x_70); +x_72 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_72, 0, x_53); +lean_ctor_set(x_72, 1, x_71); +x_73 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_73, 0, x_50); +lean_ctor_set(x_73, 1, x_72); +x_74 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_74, 0, x_47); +lean_ctor_set(x_74, 1, x_73); +x_75 = l_List_join___rarg(x_74); +x_76 = l_Lean_Json_mkObj(x_75); +x_77 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_77, 0, x_76); +lean_ctor_set(x_77, 1, x_39); +x_5 = x_77; +x_6 = x_37; +goto block_25; +} +} +else +{ +lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; +x_78 = lean_ctor_get(x_35, 1); +lean_inc(x_78); +lean_dec(x_35); +x_79 = lean_ctor_get(x_36, 0); +lean_inc(x_79); +lean_dec(x_36); +x_80 = lean_ctor_get(x_79, 0); +lean_inc(x_80); +x_81 = l_Lean_JsonNumber_fromNat(x_80); +x_82 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_82, 0, x_81); +x_83 = l_repl_loop___lambda__1___closed__3; +x_84 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_84, 0, x_83); +lean_ctor_set(x_84, 1, x_82); +x_85 = lean_box(0); +x_86 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_86, 0, x_84); +lean_ctor_set(x_86, 1, x_85); +x_87 = lean_ctor_get(x_79, 1); +lean_inc(x_87); +x_88 = l_repl_loop___lambda__1___closed__4; +x_89 = l_REPL_Json_nonemptyList___at_REPL_instToJsonCommandResponse___spec__1(x_88, x_87); +x_90 = lean_ctor_get(x_79, 2); +lean_inc(x_90); +x_91 = l_repl_loop___lambda__1___closed__5; +x_92 = l_REPL_Json_nonemptyList___at_REPL_instToJsonCommandResponse___spec__3(x_91, x_90); +x_93 = lean_ctor_get(x_79, 3); +lean_inc(x_93); +x_94 = l_REPL_runCommand___lambda__1___closed__2; +x_95 = l_REPL_Json_nonemptyList___at_REPL_instToJsonCommandResponse___spec__5(x_94, x_93); +x_96 = lean_ctor_get(x_79, 4); +lean_inc(x_96); +lean_dec(x_79); +if (lean_obj_tag(x_96) == 0) +{ +lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; +x_97 = l_repl_loop___lambda__1___closed__6; +x_98 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_98, 0, x_95); +lean_ctor_set(x_98, 1, x_97); +x_99 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_99, 0, x_92); +lean_ctor_set(x_99, 1, x_98); +x_100 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_100, 0, x_89); +lean_ctor_set(x_100, 1, x_99); +x_101 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_101, 0, x_86); +lean_ctor_set(x_101, 1, x_100); +x_102 = l_List_join___rarg(x_101); +x_103 = l_Lean_Json_mkObj(x_102); +x_104 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_104, 0, x_103); +lean_ctor_set(x_104, 1, x_78); +x_5 = x_104; +x_6 = x_37; +goto block_25; +} +else +{ +lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; +x_105 = lean_ctor_get(x_96, 0); +lean_inc(x_105); +lean_dec(x_96); +x_106 = l_repl_loop___lambda__1___closed__7; +x_107 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_107, 0, x_106); +lean_ctor_set(x_107, 1, x_105); +x_108 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_108, 0, x_107); +lean_ctor_set(x_108, 1, x_85); +x_109 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_109, 0, x_108); +lean_ctor_set(x_109, 1, x_85); +x_110 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_110, 0, x_95); +lean_ctor_set(x_110, 1, x_109); +x_111 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_111, 0, x_92); +lean_ctor_set(x_111, 1, x_110); +x_112 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_112, 0, x_89); +lean_ctor_set(x_112, 1, x_111); +x_113 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_113, 0, x_86); +lean_ctor_set(x_113, 1, x_112); +x_114 = l_List_join___rarg(x_113); +x_115 = l_Lean_Json_mkObj(x_114); +x_116 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_116, 0, x_115); +lean_ctor_set(x_116, 1, x_78); +x_5 = x_116; +x_6 = x_37; +goto block_25; +} +} +} +else +{ +lean_object* x_117; uint8_t x_118; +x_117 = lean_ctor_get(x_34, 1); +lean_inc(x_117); +lean_dec(x_34); +x_118 = !lean_is_exclusive(x_35); +if (x_118 == 0) +{ +lean_object* x_119; lean_object* x_120; lean_object* x_121; +x_119 = lean_ctor_get(x_35, 0); +lean_dec(x_119); +x_120 = lean_ctor_get(x_36, 0); +lean_inc(x_120); +lean_dec(x_36); +x_121 = l___private_REPL_JSON_0__REPL_toJsonError____x40_REPL_JSON___hyg_2860_(x_120); +lean_ctor_set(x_35, 0, x_121); +x_5 = x_35; +x_6 = x_117; +goto block_25; +} +else +{ +lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_125; +x_122 = lean_ctor_get(x_35, 1); +lean_inc(x_122); +lean_dec(x_35); +x_123 = lean_ctor_get(x_36, 0); +lean_inc(x_123); +lean_dec(x_36); +x_124 = l___private_REPL_JSON_0__REPL_toJsonError____x40_REPL_JSON___hyg_2860_(x_123); +x_125 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_125, 0, x_124); +lean_ctor_set(x_125, 1, x_122); +x_5 = x_125; +x_6 = x_117; +goto block_25; +} +} +} +else +{ +uint8_t x_126; +x_126 = !lean_is_exclusive(x_34); +if (x_126 == 0) +{ +return x_34; +} +else +{ +lean_object* x_127; lean_object* x_128; lean_object* x_129; +x_127 = lean_ctor_get(x_34, 0); +x_128 = lean_ctor_get(x_34, 1); +lean_inc(x_128); +lean_inc(x_127); +lean_dec(x_34); +x_129 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_129, 0, x_127); +lean_ctor_set(x_129, 1, x_128); +return x_129; +} +} +} +case 1: +{ +lean_object* x_130; lean_object* x_131; lean_object* x_132; +x_130 = lean_ctor_get(x_30, 1); +lean_inc(x_130); +lean_dec(x_30); +x_131 = lean_ctor_get(x_31, 0); +lean_inc(x_131); +lean_dec(x_31); +x_132 = l_REPL_processFile(x_131, x_3, x_130); +lean_dec(x_131); +if (lean_obj_tag(x_132) == 0) +{ +lean_object* x_133; lean_object* x_134; +x_133 = lean_ctor_get(x_132, 0); +lean_inc(x_133); +x_134 = lean_ctor_get(x_133, 0); +lean_inc(x_134); +if (lean_obj_tag(x_134) == 0) +{ +lean_object* x_135; uint8_t x_136; +x_135 = lean_ctor_get(x_132, 1); +lean_inc(x_135); +lean_dec(x_132); +x_136 = !lean_is_exclusive(x_133); +if (x_136 == 0) +{ +lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; 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; +x_137 = lean_ctor_get(x_133, 1); +x_138 = lean_ctor_get(x_133, 0); +lean_dec(x_138); +x_139 = lean_ctor_get(x_134, 0); +lean_inc(x_139); +lean_dec(x_134); +x_140 = lean_ctor_get(x_139, 0); +lean_inc(x_140); +x_141 = l_Lean_JsonNumber_fromNat(x_140); +x_142 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_142, 0, x_141); +x_143 = l_repl_loop___lambda__1___closed__3; +lean_ctor_set(x_133, 1, x_142); +lean_ctor_set(x_133, 0, x_143); +x_144 = lean_box(0); +x_145 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_145, 0, x_133); +lean_ctor_set(x_145, 1, x_144); +x_146 = lean_ctor_get(x_139, 1); +lean_inc(x_146); +x_147 = l_repl_loop___lambda__1___closed__4; +x_148 = l_REPL_Json_nonemptyList___at_REPL_instToJsonCommandResponse___spec__1(x_147, x_146); +x_149 = lean_ctor_get(x_139, 2); +lean_inc(x_149); +x_150 = l_repl_loop___lambda__1___closed__5; +x_151 = l_REPL_Json_nonemptyList___at_REPL_instToJsonCommandResponse___spec__3(x_150, x_149); +x_152 = lean_ctor_get(x_139, 3); +lean_inc(x_152); +x_153 = l_REPL_runCommand___lambda__1___closed__2; +x_154 = l_REPL_Json_nonemptyList___at_REPL_instToJsonCommandResponse___spec__5(x_153, x_152); +x_155 = lean_ctor_get(x_139, 4); +lean_inc(x_155); +lean_dec(x_139); +if (lean_obj_tag(x_155) == 0) +{ +lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_object* x_160; lean_object* x_161; lean_object* x_162; lean_object* x_163; +x_156 = l_repl_loop___lambda__1___closed__6; +x_157 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_157, 0, x_154); +lean_ctor_set(x_157, 1, x_156); +x_158 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_158, 0, x_151); +lean_ctor_set(x_158, 1, x_157); +x_159 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_159, 0, x_148); +lean_ctor_set(x_159, 1, x_158); +x_160 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_160, 0, x_145); +lean_ctor_set(x_160, 1, x_159); +x_161 = l_List_join___rarg(x_160); +x_162 = l_Lean_Json_mkObj(x_161); +x_163 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_163, 0, x_162); +lean_ctor_set(x_163, 1, x_137); +x_5 = x_163; +x_6 = x_135; +goto block_25; +} +else +{ +lean_object* x_164; lean_object* x_165; lean_object* x_166; lean_object* x_167; lean_object* x_168; lean_object* x_169; lean_object* x_170; lean_object* x_171; lean_object* x_172; lean_object* x_173; lean_object* x_174; lean_object* x_175; +x_164 = lean_ctor_get(x_155, 0); +lean_inc(x_164); +lean_dec(x_155); +x_165 = l_repl_loop___lambda__1___closed__7; +x_166 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_166, 0, x_165); +lean_ctor_set(x_166, 1, x_164); +x_167 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_167, 0, x_166); +lean_ctor_set(x_167, 1, x_144); +x_168 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_168, 0, x_167); +lean_ctor_set(x_168, 1, x_144); +x_169 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_169, 0, x_154); +lean_ctor_set(x_169, 1, x_168); +x_170 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_170, 0, x_151); +lean_ctor_set(x_170, 1, x_169); +x_171 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_171, 0, x_148); +lean_ctor_set(x_171, 1, x_170); +x_172 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_172, 0, x_145); +lean_ctor_set(x_172, 1, x_171); +x_173 = l_List_join___rarg(x_172); +x_174 = l_Lean_Json_mkObj(x_173); +x_175 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_175, 0, x_174); +lean_ctor_set(x_175, 1, x_137); +x_5 = x_175; +x_6 = x_135; +goto block_25; +} +} +else +{ +lean_object* x_176; lean_object* x_177; lean_object* x_178; lean_object* x_179; lean_object* x_180; lean_object* x_181; lean_object* x_182; lean_object* x_183; lean_object* x_184; lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; lean_object* x_189; lean_object* x_190; lean_object* x_191; lean_object* x_192; lean_object* x_193; lean_object* x_194; +x_176 = lean_ctor_get(x_133, 1); +lean_inc(x_176); +lean_dec(x_133); +x_177 = lean_ctor_get(x_134, 0); +lean_inc(x_177); +lean_dec(x_134); +x_178 = lean_ctor_get(x_177, 0); +lean_inc(x_178); +x_179 = l_Lean_JsonNumber_fromNat(x_178); +x_180 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_180, 0, x_179); +x_181 = l_repl_loop___lambda__1___closed__3; +x_182 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_182, 0, x_181); +lean_ctor_set(x_182, 1, x_180); +x_183 = lean_box(0); +x_184 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_184, 0, x_182); +lean_ctor_set(x_184, 1, x_183); +x_185 = lean_ctor_get(x_177, 1); +lean_inc(x_185); +x_186 = l_repl_loop___lambda__1___closed__4; +x_187 = l_REPL_Json_nonemptyList___at_REPL_instToJsonCommandResponse___spec__1(x_186, x_185); +x_188 = lean_ctor_get(x_177, 2); +lean_inc(x_188); +x_189 = l_repl_loop___lambda__1___closed__5; +x_190 = l_REPL_Json_nonemptyList___at_REPL_instToJsonCommandResponse___spec__3(x_189, x_188); +x_191 = lean_ctor_get(x_177, 3); +lean_inc(x_191); +x_192 = l_REPL_runCommand___lambda__1___closed__2; +x_193 = l_REPL_Json_nonemptyList___at_REPL_instToJsonCommandResponse___spec__5(x_192, x_191); +x_194 = lean_ctor_get(x_177, 4); +lean_inc(x_194); +lean_dec(x_177); +if (lean_obj_tag(x_194) == 0) +{ +lean_object* x_195; lean_object* 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_195 = l_repl_loop___lambda__1___closed__6; +x_196 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_196, 0, x_193); +lean_ctor_set(x_196, 1, x_195); +x_197 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_197, 0, x_190); +lean_ctor_set(x_197, 1, x_196); +x_198 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_198, 0, x_187); +lean_ctor_set(x_198, 1, x_197); +x_199 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_199, 0, x_184); +lean_ctor_set(x_199, 1, x_198); +x_200 = l_List_join___rarg(x_199); +x_201 = l_Lean_Json_mkObj(x_200); +x_202 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_202, 0, x_201); +lean_ctor_set(x_202, 1, x_176); +x_5 = x_202; +x_6 = x_135; +goto block_25; +} +else +{ +lean_object* x_203; lean_object* x_204; lean_object* x_205; lean_object* x_206; lean_object* x_207; lean_object* x_208; lean_object* x_209; lean_object* x_210; lean_object* x_211; lean_object* x_212; lean_object* x_213; lean_object* x_214; +x_203 = lean_ctor_get(x_194, 0); +lean_inc(x_203); +lean_dec(x_194); +x_204 = l_repl_loop___lambda__1___closed__7; +x_205 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_205, 0, x_204); +lean_ctor_set(x_205, 1, x_203); +x_206 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_206, 0, x_205); +lean_ctor_set(x_206, 1, x_183); +x_207 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_207, 0, x_206); +lean_ctor_set(x_207, 1, x_183); +x_208 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_208, 0, x_193); +lean_ctor_set(x_208, 1, x_207); +x_209 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_209, 0, x_190); +lean_ctor_set(x_209, 1, x_208); +x_210 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_210, 0, x_187); +lean_ctor_set(x_210, 1, x_209); +x_211 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_211, 0, x_184); +lean_ctor_set(x_211, 1, x_210); +x_212 = l_List_join___rarg(x_211); +x_213 = l_Lean_Json_mkObj(x_212); +x_214 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_214, 0, x_213); +lean_ctor_set(x_214, 1, x_176); +x_5 = x_214; +x_6 = x_135; +goto block_25; +} +} +} +else +{ +lean_object* x_215; uint8_t x_216; +x_215 = lean_ctor_get(x_132, 1); +lean_inc(x_215); +lean_dec(x_132); +x_216 = !lean_is_exclusive(x_133); +if (x_216 == 0) +{ +lean_object* x_217; lean_object* x_218; lean_object* x_219; +x_217 = lean_ctor_get(x_133, 0); +lean_dec(x_217); +x_218 = lean_ctor_get(x_134, 0); +lean_inc(x_218); +lean_dec(x_134); +x_219 = l___private_REPL_JSON_0__REPL_toJsonError____x40_REPL_JSON___hyg_2860_(x_218); +lean_ctor_set(x_133, 0, x_219); +x_5 = x_133; +x_6 = x_215; +goto block_25; +} +else +{ +lean_object* x_220; lean_object* x_221; lean_object* x_222; lean_object* x_223; +x_220 = lean_ctor_get(x_133, 1); +lean_inc(x_220); +lean_dec(x_133); +x_221 = lean_ctor_get(x_134, 0); +lean_inc(x_221); +lean_dec(x_134); +x_222 = l___private_REPL_JSON_0__REPL_toJsonError____x40_REPL_JSON___hyg_2860_(x_221); +x_223 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_223, 0, x_222); +lean_ctor_set(x_223, 1, x_220); +x_5 = x_223; +x_6 = x_215; +goto block_25; +} +} +} +else +{ +uint8_t x_224; +x_224 = !lean_is_exclusive(x_132); +if (x_224 == 0) +{ +return x_132; +} +else +{ +lean_object* x_225; lean_object* x_226; lean_object* x_227; +x_225 = lean_ctor_get(x_132, 0); +x_226 = lean_ctor_get(x_132, 1); +lean_inc(x_226); +lean_inc(x_225); +lean_dec(x_132); +x_227 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_227, 0, x_225); +lean_ctor_set(x_227, 1, x_226); +return x_227; +} +} +} +case 2: +{ +lean_object* x_228; lean_object* x_229; lean_object* x_230; lean_object* x_231; lean_object* x_232; +x_228 = lean_ctor_get(x_30, 1); +lean_inc(x_228); +lean_dec(x_30); +x_229 = lean_ctor_get(x_31, 0); +lean_inc(x_229); +lean_dec(x_31); +x_230 = l_REPL_runProofStep(x_229, x_3, x_228); +x_231 = lean_ctor_get(x_230, 0); +lean_inc(x_231); +x_232 = lean_ctor_get(x_231, 0); +lean_inc(x_232); +if (lean_obj_tag(x_232) == 0) +{ +lean_object* x_233; uint8_t x_234; +x_233 = lean_ctor_get(x_230, 1); +lean_inc(x_233); +lean_dec(x_230); +x_234 = !lean_is_exclusive(x_231); +if (x_234 == 0) +{ +lean_object* x_235; lean_object* x_236; lean_object* x_237; lean_object* x_238; lean_object* x_239; lean_object* x_240; lean_object* x_241; lean_object* x_242; lean_object* x_243; lean_object* x_244; lean_object* x_245; lean_object* x_246; lean_object* x_247; lean_object* x_248; size_t x_249; size_t x_250; lean_object* x_251; lean_object* x_252; lean_object* x_253; lean_object* x_254; lean_object* x_255; lean_object* x_256; lean_object* x_257; lean_object* x_258; lean_object* x_259; lean_object* x_260; lean_object* x_261; lean_object* x_262; lean_object* x_263; lean_object* x_264; lean_object* x_265; lean_object* x_266; lean_object* x_267; lean_object* x_268; lean_object* x_269; lean_object* x_270; lean_object* x_271; lean_object* x_272; +x_235 = lean_ctor_get(x_231, 1); +x_236 = lean_ctor_get(x_231, 0); +lean_dec(x_236); +x_237 = lean_ctor_get(x_232, 0); +lean_inc(x_237); +lean_dec(x_232); +x_238 = lean_ctor_get(x_237, 0); +lean_inc(x_238); +x_239 = l_Lean_JsonNumber_fromNat(x_238); +x_240 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_240, 0, x_239); +x_241 = l_repl_loop___lambda__1___closed__8; +lean_ctor_set(x_231, 1, x_240); +lean_ctor_set(x_231, 0, x_241); +x_242 = lean_box(0); +x_243 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_243, 0, x_231); +lean_ctor_set(x_243, 1, x_242); +x_244 = lean_ctor_get(x_237, 1); +lean_inc(x_244); +x_245 = l_List_redLength___rarg(x_244); +x_246 = lean_mk_empty_array_with_capacity(x_245); +lean_dec(x_245); +x_247 = l_List_toArrayAux___rarg(x_244, x_246); +x_248 = lean_array_get_size(x_247); +x_249 = lean_usize_of_nat(x_248); +lean_dec(x_248); +x_250 = 0; +x_251 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_ParseImportsFast_0__Lean_toJsonPrintImportResult____x40_Lean_Elab_ParseImportsFast___hyg_1425____spec__3(x_249, x_250, x_247); +x_252 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_252, 0, x_251); +x_253 = l_repl_loop___lambda__1___closed__9; +x_254 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_254, 0, x_253); +lean_ctor_set(x_254, 1, x_252); +x_255 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_255, 0, x_254); +lean_ctor_set(x_255, 1, x_242); +x_256 = lean_ctor_get(x_237, 2); +lean_inc(x_256); +x_257 = l_repl_loop___lambda__1___closed__4; +x_258 = l_REPL_Json_nonemptyList___at_REPL_instToJsonCommandResponse___spec__1(x_257, x_256); +x_259 = lean_ctor_get(x_237, 3); +lean_inc(x_259); +x_260 = l_repl_loop___lambda__1___closed__5; +x_261 = l_REPL_Json_nonemptyList___at_REPL_instToJsonCommandResponse___spec__3(x_260, x_259); +x_262 = lean_ctor_get(x_237, 4); +lean_inc(x_262); +lean_dec(x_237); +x_263 = l_repl_loop___lambda__1___closed__10; +x_264 = l_REPL_Json_nonemptyList___at_REPL_instToJsonProofStepResponse__1___spec__1(x_263, x_262); +x_265 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_265, 0, x_264); +lean_ctor_set(x_265, 1, x_242); +x_266 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_266, 0, x_261); +lean_ctor_set(x_266, 1, x_265); +x_267 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_267, 0, x_258); +lean_ctor_set(x_267, 1, x_266); +x_268 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_268, 0, x_255); +lean_ctor_set(x_268, 1, x_267); +x_269 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_269, 0, x_243); +lean_ctor_set(x_269, 1, x_268); +x_270 = l_List_join___rarg(x_269); +x_271 = l_Lean_Json_mkObj(x_270); +x_272 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_272, 0, x_271); +lean_ctor_set(x_272, 1, x_235); +x_5 = x_272; +x_6 = x_233; +goto block_25; +} +else +{ +lean_object* x_273; lean_object* x_274; lean_object* x_275; lean_object* x_276; lean_object* x_277; lean_object* x_278; lean_object* x_279; lean_object* x_280; lean_object* x_281; lean_object* x_282; lean_object* x_283; lean_object* x_284; lean_object* x_285; lean_object* x_286; size_t x_287; size_t x_288; lean_object* x_289; lean_object* x_290; lean_object* x_291; lean_object* x_292; lean_object* x_293; lean_object* x_294; lean_object* x_295; lean_object* x_296; lean_object* x_297; lean_object* x_298; lean_object* x_299; lean_object* x_300; lean_object* x_301; lean_object* x_302; lean_object* x_303; lean_object* x_304; lean_object* x_305; lean_object* x_306; lean_object* x_307; lean_object* x_308; lean_object* x_309; lean_object* x_310; +x_273 = lean_ctor_get(x_231, 1); +lean_inc(x_273); +lean_dec(x_231); +x_274 = lean_ctor_get(x_232, 0); +lean_inc(x_274); +lean_dec(x_232); +x_275 = lean_ctor_get(x_274, 0); +lean_inc(x_275); +x_276 = l_Lean_JsonNumber_fromNat(x_275); +x_277 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_277, 0, x_276); +x_278 = l_repl_loop___lambda__1___closed__8; +x_279 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_279, 0, x_278); +lean_ctor_set(x_279, 1, x_277); +x_280 = lean_box(0); +x_281 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_281, 0, x_279); +lean_ctor_set(x_281, 1, x_280); +x_282 = lean_ctor_get(x_274, 1); +lean_inc(x_282); +x_283 = l_List_redLength___rarg(x_282); +x_284 = lean_mk_empty_array_with_capacity(x_283); +lean_dec(x_283); +x_285 = l_List_toArrayAux___rarg(x_282, x_284); +x_286 = lean_array_get_size(x_285); +x_287 = lean_usize_of_nat(x_286); +lean_dec(x_286); +x_288 = 0; +x_289 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_ParseImportsFast_0__Lean_toJsonPrintImportResult____x40_Lean_Elab_ParseImportsFast___hyg_1425____spec__3(x_287, x_288, x_285); +x_290 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_290, 0, x_289); +x_291 = l_repl_loop___lambda__1___closed__9; +x_292 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_292, 0, x_291); +lean_ctor_set(x_292, 1, x_290); +x_293 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_293, 0, x_292); +lean_ctor_set(x_293, 1, x_280); +x_294 = lean_ctor_get(x_274, 2); +lean_inc(x_294); +x_295 = l_repl_loop___lambda__1___closed__4; +x_296 = l_REPL_Json_nonemptyList___at_REPL_instToJsonCommandResponse___spec__1(x_295, x_294); +x_297 = lean_ctor_get(x_274, 3); +lean_inc(x_297); +x_298 = l_repl_loop___lambda__1___closed__5; +x_299 = l_REPL_Json_nonemptyList___at_REPL_instToJsonCommandResponse___spec__3(x_298, x_297); +x_300 = lean_ctor_get(x_274, 4); +lean_inc(x_300); +lean_dec(x_274); +x_301 = l_repl_loop___lambda__1___closed__10; +x_302 = l_REPL_Json_nonemptyList___at_REPL_instToJsonProofStepResponse__1___spec__1(x_301, x_300); +x_303 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_303, 0, x_302); +lean_ctor_set(x_303, 1, x_280); +x_304 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_304, 0, x_299); +lean_ctor_set(x_304, 1, x_303); +x_305 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_305, 0, x_296); +lean_ctor_set(x_305, 1, x_304); +x_306 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_306, 0, x_293); +lean_ctor_set(x_306, 1, x_305); +x_307 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_307, 0, x_281); +lean_ctor_set(x_307, 1, x_306); +x_308 = l_List_join___rarg(x_307); +x_309 = l_Lean_Json_mkObj(x_308); +x_310 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_310, 0, x_309); +lean_ctor_set(x_310, 1, x_273); +x_5 = x_310; +x_6 = x_233; +goto block_25; +} +} +else +{ +lean_object* x_311; uint8_t x_312; +x_311 = lean_ctor_get(x_230, 1); +lean_inc(x_311); +lean_dec(x_230); +x_312 = !lean_is_exclusive(x_231); +if (x_312 == 0) +{ +lean_object* x_313; lean_object* x_314; lean_object* x_315; +x_313 = lean_ctor_get(x_231, 0); +lean_dec(x_313); +x_314 = lean_ctor_get(x_232, 0); +lean_inc(x_314); +lean_dec(x_232); +x_315 = l___private_REPL_JSON_0__REPL_toJsonError____x40_REPL_JSON___hyg_2860_(x_314); +lean_ctor_set(x_231, 0, x_315); +x_5 = x_231; +x_6 = x_311; +goto block_25; +} +else +{ +lean_object* x_316; lean_object* x_317; lean_object* x_318; lean_object* x_319; +x_316 = lean_ctor_get(x_231, 1); +lean_inc(x_316); +lean_dec(x_231); +x_317 = lean_ctor_get(x_232, 0); +lean_inc(x_317); +lean_dec(x_232); +x_318 = l___private_REPL_JSON_0__REPL_toJsonError____x40_REPL_JSON___hyg_2860_(x_317); +x_319 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_319, 0, x_318); +lean_ctor_set(x_319, 1, x_316); +x_5 = x_319; +x_6 = x_311; +goto block_25; +} +} +} +case 3: +{ +lean_object* x_320; lean_object* x_321; lean_object* x_322; +x_320 = lean_ctor_get(x_30, 1); +lean_inc(x_320); +lean_dec(x_30); +x_321 = lean_ctor_get(x_31, 0); +lean_inc(x_321); +lean_dec(x_31); +x_322 = l_REPL_pickleCommandSnapshot___at_repl_loop___spec__1(x_321, x_3, x_320); +lean_dec(x_321); +if (lean_obj_tag(x_322) == 0) +{ +lean_object* x_323; lean_object* x_324; +x_323 = lean_ctor_get(x_322, 0); +lean_inc(x_323); +x_324 = lean_ctor_get(x_323, 0); +lean_inc(x_324); +if (lean_obj_tag(x_324) == 0) +{ +lean_object* x_325; uint8_t x_326; +x_325 = lean_ctor_get(x_322, 1); +lean_inc(x_325); +lean_dec(x_322); +x_326 = !lean_is_exclusive(x_323); +if (x_326 == 0) +{ +lean_object* x_327; lean_object* x_328; lean_object* x_329; lean_object* x_330; lean_object* x_331; lean_object* x_332; lean_object* x_333; lean_object* x_334; lean_object* x_335; lean_object* x_336; lean_object* x_337; lean_object* x_338; lean_object* x_339; lean_object* x_340; lean_object* x_341; lean_object* x_342; lean_object* x_343; lean_object* x_344; lean_object* x_345; +x_327 = lean_ctor_get(x_323, 1); +x_328 = lean_ctor_get(x_323, 0); +lean_dec(x_328); +x_329 = lean_ctor_get(x_324, 0); +lean_inc(x_329); +lean_dec(x_324); +x_330 = lean_ctor_get(x_329, 0); +lean_inc(x_330); +x_331 = l_Lean_JsonNumber_fromNat(x_330); +x_332 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_332, 0, x_331); +x_333 = l_repl_loop___lambda__1___closed__3; +lean_ctor_set(x_323, 1, x_332); +lean_ctor_set(x_323, 0, x_333); +x_334 = lean_box(0); +x_335 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_335, 0, x_323); +lean_ctor_set(x_335, 1, x_334); +x_336 = lean_ctor_get(x_329, 1); +lean_inc(x_336); +x_337 = l_repl_loop___lambda__1___closed__4; +x_338 = l_REPL_Json_nonemptyList___at_REPL_instToJsonCommandResponse___spec__1(x_337, x_336); +x_339 = lean_ctor_get(x_329, 2); +lean_inc(x_339); +x_340 = l_repl_loop___lambda__1___closed__5; +x_341 = l_REPL_Json_nonemptyList___at_REPL_instToJsonCommandResponse___spec__3(x_340, x_339); +x_342 = lean_ctor_get(x_329, 3); +lean_inc(x_342); +x_343 = l_REPL_runCommand___lambda__1___closed__2; +x_344 = l_REPL_Json_nonemptyList___at_REPL_instToJsonCommandResponse___spec__5(x_343, x_342); +x_345 = lean_ctor_get(x_329, 4); +lean_inc(x_345); +lean_dec(x_329); +if (lean_obj_tag(x_345) == 0) +{ +lean_object* x_346; lean_object* x_347; lean_object* x_348; lean_object* x_349; lean_object* x_350; lean_object* x_351; lean_object* x_352; lean_object* x_353; +x_346 = l_repl_loop___lambda__1___closed__6; +x_347 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_347, 0, x_344); +lean_ctor_set(x_347, 1, x_346); +x_348 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_348, 0, x_341); +lean_ctor_set(x_348, 1, x_347); +x_349 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_349, 0, x_338); +lean_ctor_set(x_349, 1, x_348); +x_350 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_350, 0, x_335); +lean_ctor_set(x_350, 1, x_349); +x_351 = l_List_join___rarg(x_350); +x_352 = l_Lean_Json_mkObj(x_351); +x_353 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_353, 0, x_352); +lean_ctor_set(x_353, 1, x_327); +x_5 = x_353; +x_6 = x_325; +goto block_25; +} +else +{ +lean_object* x_354; lean_object* x_355; lean_object* x_356; lean_object* x_357; lean_object* x_358; lean_object* x_359; lean_object* x_360; lean_object* x_361; lean_object* x_362; lean_object* x_363; lean_object* x_364; lean_object* x_365; +x_354 = lean_ctor_get(x_345, 0); +lean_inc(x_354); +lean_dec(x_345); +x_355 = l_repl_loop___lambda__1___closed__7; +x_356 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_356, 0, x_355); +lean_ctor_set(x_356, 1, x_354); +x_357 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_357, 0, x_356); +lean_ctor_set(x_357, 1, x_334); +x_358 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_358, 0, x_357); +lean_ctor_set(x_358, 1, x_334); +x_359 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_359, 0, x_344); +lean_ctor_set(x_359, 1, x_358); +x_360 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_360, 0, x_341); +lean_ctor_set(x_360, 1, x_359); +x_361 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_361, 0, x_338); +lean_ctor_set(x_361, 1, x_360); +x_362 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_362, 0, x_335); +lean_ctor_set(x_362, 1, x_361); +x_363 = l_List_join___rarg(x_362); +x_364 = l_Lean_Json_mkObj(x_363); +x_365 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_365, 0, x_364); +lean_ctor_set(x_365, 1, x_327); +x_5 = x_365; +x_6 = x_325; +goto block_25; +} +} +else +{ +lean_object* x_366; lean_object* x_367; lean_object* x_368; lean_object* x_369; lean_object* x_370; lean_object* x_371; lean_object* x_372; lean_object* x_373; lean_object* x_374; lean_object* x_375; lean_object* x_376; lean_object* x_377; lean_object* x_378; lean_object* x_379; lean_object* x_380; lean_object* x_381; lean_object* x_382; lean_object* x_383; lean_object* x_384; +x_366 = lean_ctor_get(x_323, 1); +lean_inc(x_366); +lean_dec(x_323); +x_367 = lean_ctor_get(x_324, 0); +lean_inc(x_367); +lean_dec(x_324); +x_368 = lean_ctor_get(x_367, 0); +lean_inc(x_368); +x_369 = l_Lean_JsonNumber_fromNat(x_368); +x_370 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_370, 0, x_369); +x_371 = l_repl_loop___lambda__1___closed__3; +x_372 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_372, 0, x_371); +lean_ctor_set(x_372, 1, x_370); +x_373 = lean_box(0); +x_374 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_374, 0, x_372); +lean_ctor_set(x_374, 1, x_373); +x_375 = lean_ctor_get(x_367, 1); +lean_inc(x_375); +x_376 = l_repl_loop___lambda__1___closed__4; +x_377 = l_REPL_Json_nonemptyList___at_REPL_instToJsonCommandResponse___spec__1(x_376, x_375); +x_378 = lean_ctor_get(x_367, 2); +lean_inc(x_378); +x_379 = l_repl_loop___lambda__1___closed__5; +x_380 = l_REPL_Json_nonemptyList___at_REPL_instToJsonCommandResponse___spec__3(x_379, x_378); +x_381 = lean_ctor_get(x_367, 3); +lean_inc(x_381); +x_382 = l_REPL_runCommand___lambda__1___closed__2; +x_383 = l_REPL_Json_nonemptyList___at_REPL_instToJsonCommandResponse___spec__5(x_382, x_381); +x_384 = lean_ctor_get(x_367, 4); +lean_inc(x_384); +lean_dec(x_367); +if (lean_obj_tag(x_384) == 0) +{ +lean_object* x_385; lean_object* x_386; lean_object* x_387; lean_object* x_388; lean_object* x_389; lean_object* x_390; lean_object* x_391; lean_object* x_392; +x_385 = l_repl_loop___lambda__1___closed__6; +x_386 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_386, 0, x_383); +lean_ctor_set(x_386, 1, x_385); +x_387 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_387, 0, x_380); +lean_ctor_set(x_387, 1, x_386); +x_388 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_388, 0, x_377); +lean_ctor_set(x_388, 1, x_387); +x_389 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_389, 0, x_374); +lean_ctor_set(x_389, 1, x_388); +x_390 = l_List_join___rarg(x_389); +x_391 = l_Lean_Json_mkObj(x_390); +x_392 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_392, 0, x_391); +lean_ctor_set(x_392, 1, x_366); +x_5 = x_392; +x_6 = x_325; +goto block_25; +} +else +{ +lean_object* x_393; lean_object* x_394; lean_object* x_395; lean_object* x_396; lean_object* x_397; lean_object* x_398; lean_object* x_399; lean_object* x_400; lean_object* x_401; lean_object* x_402; lean_object* x_403; lean_object* x_404; +x_393 = lean_ctor_get(x_384, 0); +lean_inc(x_393); +lean_dec(x_384); +x_394 = l_repl_loop___lambda__1___closed__7; +x_395 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_395, 0, x_394); +lean_ctor_set(x_395, 1, x_393); +x_396 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_396, 0, x_395); +lean_ctor_set(x_396, 1, x_373); +x_397 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_397, 0, x_396); +lean_ctor_set(x_397, 1, x_373); +x_398 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_398, 0, x_383); +lean_ctor_set(x_398, 1, x_397); +x_399 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_399, 0, x_380); +lean_ctor_set(x_399, 1, x_398); +x_400 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_400, 0, x_377); +lean_ctor_set(x_400, 1, x_399); +x_401 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_401, 0, x_374); +lean_ctor_set(x_401, 1, x_400); +x_402 = l_List_join___rarg(x_401); +x_403 = l_Lean_Json_mkObj(x_402); +x_404 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_404, 0, x_403); +lean_ctor_set(x_404, 1, x_366); +x_5 = x_404; +x_6 = x_325; +goto block_25; +} +} +} +else +{ +lean_object* x_405; uint8_t x_406; +x_405 = lean_ctor_get(x_322, 1); +lean_inc(x_405); +lean_dec(x_322); +x_406 = !lean_is_exclusive(x_323); +if (x_406 == 0) +{ +lean_object* x_407; lean_object* x_408; lean_object* x_409; +x_407 = lean_ctor_get(x_323, 0); +lean_dec(x_407); +x_408 = lean_ctor_get(x_324, 0); +lean_inc(x_408); +lean_dec(x_324); +x_409 = l___private_REPL_JSON_0__REPL_toJsonError____x40_REPL_JSON___hyg_2860_(x_408); +lean_ctor_set(x_323, 0, x_409); +x_5 = x_323; +x_6 = x_405; +goto block_25; +} +else +{ +lean_object* x_410; lean_object* x_411; lean_object* x_412; lean_object* x_413; +x_410 = lean_ctor_get(x_323, 1); +lean_inc(x_410); +lean_dec(x_323); +x_411 = lean_ctor_get(x_324, 0); +lean_inc(x_411); +lean_dec(x_324); +x_412 = l___private_REPL_JSON_0__REPL_toJsonError____x40_REPL_JSON___hyg_2860_(x_411); +x_413 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_413, 0, x_412); +lean_ctor_set(x_413, 1, x_410); +x_5 = x_413; +x_6 = x_405; +goto block_25; +} +} +} +else +{ +uint8_t x_414; +x_414 = !lean_is_exclusive(x_322); +if (x_414 == 0) +{ +return x_322; +} +else +{ +lean_object* x_415; lean_object* x_416; lean_object* x_417; +x_415 = lean_ctor_get(x_322, 0); +x_416 = lean_ctor_get(x_322, 1); +lean_inc(x_416); +lean_inc(x_415); +lean_dec(x_322); +x_417 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_417, 0, x_415); +lean_ctor_set(x_417, 1, x_416); +return x_417; +} +} +} +case 4: +{ +lean_object* x_418; lean_object* x_419; lean_object* x_420; +x_418 = lean_ctor_get(x_30, 1); +lean_inc(x_418); +lean_dec(x_30); +x_419 = lean_ctor_get(x_31, 0); +lean_inc(x_419); +lean_dec(x_31); +x_420 = l_REPL_unpickleCommandSnapshot(x_419, x_3, x_418); +lean_dec(x_419); +if (lean_obj_tag(x_420) == 0) +{ +lean_object* x_421; lean_object* x_422; uint8_t x_423; +x_421 = lean_ctor_get(x_420, 0); +lean_inc(x_421); +x_422 = lean_ctor_get(x_420, 1); +lean_inc(x_422); +lean_dec(x_420); +x_423 = !lean_is_exclusive(x_421); +if (x_423 == 0) +{ +lean_object* x_424; lean_object* x_425; lean_object* x_426; lean_object* x_427; lean_object* x_428; lean_object* x_429; lean_object* x_430; lean_object* x_431; lean_object* x_432; lean_object* x_433; lean_object* x_434; lean_object* x_435; lean_object* x_436; lean_object* x_437; lean_object* x_438; lean_object* x_439; lean_object* x_440; lean_object* x_441; +x_424 = lean_ctor_get(x_421, 0); +x_425 = lean_ctor_get(x_421, 1); +x_426 = lean_ctor_get(x_424, 0); +lean_inc(x_426); +x_427 = l_Lean_JsonNumber_fromNat(x_426); +x_428 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_428, 0, x_427); +x_429 = l_repl_loop___lambda__1___closed__3; +lean_ctor_set(x_421, 1, x_428); +lean_ctor_set(x_421, 0, x_429); +x_430 = lean_box(0); +x_431 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_431, 0, x_421); +lean_ctor_set(x_431, 1, x_430); +x_432 = lean_ctor_get(x_424, 1); +lean_inc(x_432); +x_433 = l_repl_loop___lambda__1___closed__4; +x_434 = l_REPL_Json_nonemptyList___at_REPL_instToJsonCommandResponse___spec__1(x_433, x_432); +x_435 = lean_ctor_get(x_424, 2); +lean_inc(x_435); +x_436 = l_repl_loop___lambda__1___closed__5; +x_437 = l_REPL_Json_nonemptyList___at_REPL_instToJsonCommandResponse___spec__3(x_436, x_435); +x_438 = lean_ctor_get(x_424, 3); +lean_inc(x_438); +x_439 = l_REPL_runCommand___lambda__1___closed__2; +x_440 = l_REPL_Json_nonemptyList___at_REPL_instToJsonCommandResponse___spec__5(x_439, x_438); +x_441 = lean_ctor_get(x_424, 4); +lean_inc(x_441); +lean_dec(x_424); +if (lean_obj_tag(x_441) == 0) +{ +lean_object* x_442; lean_object* x_443; lean_object* x_444; lean_object* x_445; lean_object* x_446; lean_object* x_447; lean_object* x_448; lean_object* x_449; +x_442 = l_repl_loop___lambda__1___closed__6; +x_443 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_443, 0, x_440); +lean_ctor_set(x_443, 1, x_442); +x_444 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_444, 0, x_437); +lean_ctor_set(x_444, 1, x_443); +x_445 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_445, 0, x_434); +lean_ctor_set(x_445, 1, x_444); +x_446 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_446, 0, x_431); +lean_ctor_set(x_446, 1, x_445); +x_447 = l_List_join___rarg(x_446); +x_448 = l_Lean_Json_mkObj(x_447); +x_449 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_449, 0, x_448); +lean_ctor_set(x_449, 1, x_425); +x_5 = x_449; +x_6 = x_422; +goto block_25; +} +else +{ +lean_object* x_450; lean_object* x_451; lean_object* x_452; lean_object* x_453; lean_object* x_454; lean_object* x_455; lean_object* x_456; lean_object* x_457; lean_object* x_458; lean_object* x_459; lean_object* x_460; lean_object* x_461; +x_450 = lean_ctor_get(x_441, 0); +lean_inc(x_450); +lean_dec(x_441); +x_451 = l_repl_loop___lambda__1___closed__7; +x_452 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_452, 0, x_451); +lean_ctor_set(x_452, 1, x_450); +x_453 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_453, 0, x_452); +lean_ctor_set(x_453, 1, x_430); +x_454 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_454, 0, x_453); +lean_ctor_set(x_454, 1, x_430); +x_455 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_455, 0, x_440); +lean_ctor_set(x_455, 1, x_454); +x_456 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_456, 0, x_437); +lean_ctor_set(x_456, 1, x_455); +x_457 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_457, 0, x_434); +lean_ctor_set(x_457, 1, x_456); +x_458 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_458, 0, x_431); +lean_ctor_set(x_458, 1, x_457); +x_459 = l_List_join___rarg(x_458); +x_460 = l_Lean_Json_mkObj(x_459); +x_461 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_461, 0, x_460); +lean_ctor_set(x_461, 1, x_425); +x_5 = x_461; +x_6 = x_422; +goto block_25; +} +} +else +{ +lean_object* x_462; lean_object* x_463; lean_object* x_464; lean_object* x_465; lean_object* x_466; lean_object* x_467; lean_object* x_468; lean_object* x_469; lean_object* x_470; lean_object* x_471; lean_object* x_472; lean_object* x_473; lean_object* x_474; lean_object* x_475; lean_object* x_476; lean_object* x_477; lean_object* x_478; lean_object* x_479; lean_object* x_480; +x_462 = lean_ctor_get(x_421, 0); +x_463 = lean_ctor_get(x_421, 1); +lean_inc(x_463); +lean_inc(x_462); +lean_dec(x_421); +x_464 = lean_ctor_get(x_462, 0); +lean_inc(x_464); +x_465 = l_Lean_JsonNumber_fromNat(x_464); +x_466 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_466, 0, x_465); +x_467 = l_repl_loop___lambda__1___closed__3; +x_468 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_468, 0, x_467); +lean_ctor_set(x_468, 1, x_466); +x_469 = lean_box(0); +x_470 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_470, 0, x_468); +lean_ctor_set(x_470, 1, x_469); +x_471 = lean_ctor_get(x_462, 1); +lean_inc(x_471); +x_472 = l_repl_loop___lambda__1___closed__4; +x_473 = l_REPL_Json_nonemptyList___at_REPL_instToJsonCommandResponse___spec__1(x_472, x_471); +x_474 = lean_ctor_get(x_462, 2); +lean_inc(x_474); +x_475 = l_repl_loop___lambda__1___closed__5; +x_476 = l_REPL_Json_nonemptyList___at_REPL_instToJsonCommandResponse___spec__3(x_475, x_474); +x_477 = lean_ctor_get(x_462, 3); +lean_inc(x_477); +x_478 = l_REPL_runCommand___lambda__1___closed__2; +x_479 = l_REPL_Json_nonemptyList___at_REPL_instToJsonCommandResponse___spec__5(x_478, x_477); +x_480 = lean_ctor_get(x_462, 4); +lean_inc(x_480); +lean_dec(x_462); +if (lean_obj_tag(x_480) == 0) +{ +lean_object* x_481; lean_object* x_482; lean_object* x_483; lean_object* x_484; lean_object* x_485; lean_object* x_486; lean_object* x_487; lean_object* x_488; +x_481 = l_repl_loop___lambda__1___closed__6; +x_482 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_482, 0, x_479); +lean_ctor_set(x_482, 1, x_481); +x_483 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_483, 0, x_476); +lean_ctor_set(x_483, 1, x_482); +x_484 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_484, 0, x_473); +lean_ctor_set(x_484, 1, x_483); +x_485 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_485, 0, x_470); +lean_ctor_set(x_485, 1, x_484); +x_486 = l_List_join___rarg(x_485); +x_487 = l_Lean_Json_mkObj(x_486); +x_488 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_488, 0, x_487); +lean_ctor_set(x_488, 1, x_463); +x_5 = x_488; +x_6 = x_422; +goto block_25; +} +else +{ +lean_object* x_489; lean_object* x_490; lean_object* x_491; lean_object* x_492; lean_object* x_493; lean_object* x_494; lean_object* x_495; lean_object* x_496; lean_object* x_497; lean_object* x_498; lean_object* x_499; lean_object* x_500; +x_489 = lean_ctor_get(x_480, 0); +lean_inc(x_489); +lean_dec(x_480); +x_490 = l_repl_loop___lambda__1___closed__7; +x_491 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_491, 0, x_490); +lean_ctor_set(x_491, 1, x_489); +x_492 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_492, 0, x_491); +lean_ctor_set(x_492, 1, x_469); +x_493 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_493, 0, x_492); +lean_ctor_set(x_493, 1, x_469); +x_494 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_494, 0, x_479); +lean_ctor_set(x_494, 1, x_493); +x_495 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_495, 0, x_476); +lean_ctor_set(x_495, 1, x_494); +x_496 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_496, 0, x_473); +lean_ctor_set(x_496, 1, x_495); +x_497 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_497, 0, x_470); +lean_ctor_set(x_497, 1, x_496); +x_498 = l_List_join___rarg(x_497); +x_499 = l_Lean_Json_mkObj(x_498); +x_500 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_500, 0, x_499); +lean_ctor_set(x_500, 1, x_463); +x_5 = x_500; +x_6 = x_422; +goto block_25; +} +} +} +else +{ +uint8_t x_501; +x_501 = !lean_is_exclusive(x_420); +if (x_501 == 0) +{ +return x_420; +} +else +{ +lean_object* x_502; lean_object* x_503; lean_object* x_504; +x_502 = lean_ctor_get(x_420, 0); +x_503 = lean_ctor_get(x_420, 1); +lean_inc(x_503); +lean_inc(x_502); +lean_dec(x_420); +x_504 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_504, 0, x_502); +lean_ctor_set(x_504, 1, x_503); +return x_504; +} +} +} +case 5: +{ +lean_object* x_505; lean_object* x_506; lean_object* x_507; +x_505 = lean_ctor_get(x_30, 1); +lean_inc(x_505); +lean_dec(x_30); +x_506 = lean_ctor_get(x_31, 0); +lean_inc(x_506); +lean_dec(x_31); +x_507 = l_REPL_pickleProofSnapshot___at_repl_loop___spec__2(x_506, x_3, x_505); +lean_dec(x_506); +if (lean_obj_tag(x_507) == 0) +{ +lean_object* x_508; lean_object* x_509; +x_508 = lean_ctor_get(x_507, 0); +lean_inc(x_508); +x_509 = lean_ctor_get(x_508, 0); +lean_inc(x_509); +if (lean_obj_tag(x_509) == 0) +{ +lean_object* x_510; uint8_t x_511; +x_510 = lean_ctor_get(x_507, 1); +lean_inc(x_510); +lean_dec(x_507); +x_511 = !lean_is_exclusive(x_508); +if (x_511 == 0) +{ +lean_object* x_512; lean_object* x_513; lean_object* x_514; lean_object* x_515; lean_object* x_516; lean_object* x_517; lean_object* x_518; lean_object* x_519; lean_object* x_520; lean_object* x_521; lean_object* x_522; lean_object* x_523; lean_object* x_524; lean_object* x_525; size_t x_526; size_t x_527; lean_object* x_528; lean_object* x_529; lean_object* x_530; lean_object* x_531; lean_object* x_532; lean_object* x_533; lean_object* x_534; lean_object* x_535; lean_object* x_536; lean_object* x_537; lean_object* x_538; lean_object* x_539; lean_object* x_540; lean_object* x_541; lean_object* x_542; lean_object* x_543; lean_object* x_544; lean_object* x_545; lean_object* x_546; lean_object* x_547; lean_object* x_548; lean_object* x_549; +x_512 = lean_ctor_get(x_508, 1); +x_513 = lean_ctor_get(x_508, 0); +lean_dec(x_513); +x_514 = lean_ctor_get(x_509, 0); +lean_inc(x_514); +lean_dec(x_509); +x_515 = lean_ctor_get(x_514, 0); +lean_inc(x_515); +x_516 = l_Lean_JsonNumber_fromNat(x_515); +x_517 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_517, 0, x_516); +x_518 = l_repl_loop___lambda__1___closed__8; +lean_ctor_set(x_508, 1, x_517); +lean_ctor_set(x_508, 0, x_518); +x_519 = lean_box(0); +x_520 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_520, 0, x_508); +lean_ctor_set(x_520, 1, x_519); +x_521 = lean_ctor_get(x_514, 1); +lean_inc(x_521); +x_522 = l_List_redLength___rarg(x_521); +x_523 = lean_mk_empty_array_with_capacity(x_522); +lean_dec(x_522); +x_524 = l_List_toArrayAux___rarg(x_521, x_523); +x_525 = lean_array_get_size(x_524); +x_526 = lean_usize_of_nat(x_525); +lean_dec(x_525); +x_527 = 0; +x_528 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_ParseImportsFast_0__Lean_toJsonPrintImportResult____x40_Lean_Elab_ParseImportsFast___hyg_1425____spec__3(x_526, x_527, x_524); +x_529 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_529, 0, x_528); +x_530 = l_repl_loop___lambda__1___closed__9; +x_531 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_531, 0, x_530); +lean_ctor_set(x_531, 1, x_529); +x_532 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_532, 0, x_531); +lean_ctor_set(x_532, 1, x_519); +x_533 = lean_ctor_get(x_514, 2); +lean_inc(x_533); +x_534 = l_repl_loop___lambda__1___closed__4; +x_535 = l_REPL_Json_nonemptyList___at_REPL_instToJsonCommandResponse___spec__1(x_534, x_533); +x_536 = lean_ctor_get(x_514, 3); +lean_inc(x_536); +x_537 = l_repl_loop___lambda__1___closed__5; +x_538 = l_REPL_Json_nonemptyList___at_REPL_instToJsonCommandResponse___spec__3(x_537, x_536); +x_539 = lean_ctor_get(x_514, 4); +lean_inc(x_539); +lean_dec(x_514); +x_540 = l_repl_loop___lambda__1___closed__10; +x_541 = l_REPL_Json_nonemptyList___at_REPL_instToJsonProofStepResponse__1___spec__1(x_540, x_539); +x_542 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_542, 0, x_541); +lean_ctor_set(x_542, 1, x_519); +x_543 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_543, 0, x_538); +lean_ctor_set(x_543, 1, x_542); +x_544 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_544, 0, x_535); +lean_ctor_set(x_544, 1, x_543); +x_545 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_545, 0, x_532); +lean_ctor_set(x_545, 1, x_544); +x_546 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_546, 0, x_520); +lean_ctor_set(x_546, 1, x_545); +x_547 = l_List_join___rarg(x_546); +x_548 = l_Lean_Json_mkObj(x_547); +x_549 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_549, 0, x_548); +lean_ctor_set(x_549, 1, x_512); +x_5 = x_549; +x_6 = x_510; +goto block_25; +} +else +{ +lean_object* x_550; lean_object* x_551; lean_object* x_552; lean_object* x_553; lean_object* x_554; lean_object* x_555; lean_object* x_556; lean_object* x_557; lean_object* x_558; lean_object* x_559; lean_object* x_560; lean_object* x_561; lean_object* x_562; lean_object* x_563; size_t x_564; size_t x_565; lean_object* x_566; lean_object* x_567; lean_object* x_568; lean_object* x_569; lean_object* x_570; lean_object* x_571; lean_object* x_572; lean_object* x_573; lean_object* x_574; lean_object* x_575; lean_object* x_576; lean_object* x_577; lean_object* x_578; lean_object* x_579; lean_object* x_580; lean_object* x_581; lean_object* x_582; lean_object* x_583; lean_object* x_584; lean_object* x_585; lean_object* x_586; lean_object* x_587; +x_550 = lean_ctor_get(x_508, 1); +lean_inc(x_550); +lean_dec(x_508); +x_551 = lean_ctor_get(x_509, 0); +lean_inc(x_551); +lean_dec(x_509); +x_552 = lean_ctor_get(x_551, 0); +lean_inc(x_552); +x_553 = l_Lean_JsonNumber_fromNat(x_552); +x_554 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_554, 0, x_553); +x_555 = l_repl_loop___lambda__1___closed__8; +x_556 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_556, 0, x_555); +lean_ctor_set(x_556, 1, x_554); +x_557 = lean_box(0); +x_558 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_558, 0, x_556); +lean_ctor_set(x_558, 1, x_557); +x_559 = lean_ctor_get(x_551, 1); +lean_inc(x_559); +x_560 = l_List_redLength___rarg(x_559); +x_561 = lean_mk_empty_array_with_capacity(x_560); +lean_dec(x_560); +x_562 = l_List_toArrayAux___rarg(x_559, x_561); +x_563 = lean_array_get_size(x_562); +x_564 = lean_usize_of_nat(x_563); +lean_dec(x_563); +x_565 = 0; +x_566 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_ParseImportsFast_0__Lean_toJsonPrintImportResult____x40_Lean_Elab_ParseImportsFast___hyg_1425____spec__3(x_564, x_565, x_562); +x_567 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_567, 0, x_566); +x_568 = l_repl_loop___lambda__1___closed__9; +x_569 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_569, 0, x_568); +lean_ctor_set(x_569, 1, x_567); +x_570 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_570, 0, x_569); +lean_ctor_set(x_570, 1, x_557); +x_571 = lean_ctor_get(x_551, 2); +lean_inc(x_571); +x_572 = l_repl_loop___lambda__1___closed__4; +x_573 = l_REPL_Json_nonemptyList___at_REPL_instToJsonCommandResponse___spec__1(x_572, x_571); +x_574 = lean_ctor_get(x_551, 3); +lean_inc(x_574); +x_575 = l_repl_loop___lambda__1___closed__5; +x_576 = l_REPL_Json_nonemptyList___at_REPL_instToJsonCommandResponse___spec__3(x_575, x_574); +x_577 = lean_ctor_get(x_551, 4); +lean_inc(x_577); +lean_dec(x_551); +x_578 = l_repl_loop___lambda__1___closed__10; +x_579 = l_REPL_Json_nonemptyList___at_REPL_instToJsonProofStepResponse__1___spec__1(x_578, x_577); +x_580 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_580, 0, x_579); +lean_ctor_set(x_580, 1, x_557); +x_581 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_581, 0, x_576); +lean_ctor_set(x_581, 1, x_580); +x_582 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_582, 0, x_573); +lean_ctor_set(x_582, 1, x_581); +x_583 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_583, 0, x_570); +lean_ctor_set(x_583, 1, x_582); +x_584 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_584, 0, x_558); +lean_ctor_set(x_584, 1, x_583); +x_585 = l_List_join___rarg(x_584); +x_586 = l_Lean_Json_mkObj(x_585); +x_587 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_587, 0, x_586); +lean_ctor_set(x_587, 1, x_550); +x_5 = x_587; +x_6 = x_510; +goto block_25; +} +} +else +{ +lean_object* x_588; uint8_t x_589; +x_588 = lean_ctor_get(x_507, 1); +lean_inc(x_588); +lean_dec(x_507); +x_589 = !lean_is_exclusive(x_508); +if (x_589 == 0) +{ +lean_object* x_590; lean_object* x_591; lean_object* x_592; +x_590 = lean_ctor_get(x_508, 0); +lean_dec(x_590); +x_591 = lean_ctor_get(x_509, 0); +lean_inc(x_591); +lean_dec(x_509); +x_592 = l___private_REPL_JSON_0__REPL_toJsonError____x40_REPL_JSON___hyg_2860_(x_591); +lean_ctor_set(x_508, 0, x_592); +x_5 = x_508; +x_6 = x_588; +goto block_25; +} +else +{ +lean_object* x_593; lean_object* x_594; lean_object* x_595; lean_object* x_596; +x_593 = lean_ctor_get(x_508, 1); +lean_inc(x_593); +lean_dec(x_508); +x_594 = lean_ctor_get(x_509, 0); +lean_inc(x_594); +lean_dec(x_509); +x_595 = l___private_REPL_JSON_0__REPL_toJsonError____x40_REPL_JSON___hyg_2860_(x_594); +x_596 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_596, 0, x_595); +lean_ctor_set(x_596, 1, x_593); +x_5 = x_596; +x_6 = x_588; +goto block_25; +} +} +} +else +{ +uint8_t x_597; +x_597 = !lean_is_exclusive(x_507); +if (x_597 == 0) +{ +return x_507; +} +else +{ +lean_object* x_598; lean_object* x_599; lean_object* x_600; +x_598 = lean_ctor_get(x_507, 0); +x_599 = lean_ctor_get(x_507, 1); +lean_inc(x_599); +lean_inc(x_598); +lean_dec(x_507); +x_600 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_600, 0, x_598); +lean_ctor_set(x_600, 1, x_599); +return x_600; +} +} +} +default: +{ +lean_object* x_601; lean_object* x_602; lean_object* x_603; +x_601 = lean_ctor_get(x_30, 1); +lean_inc(x_601); +lean_dec(x_30); +x_602 = lean_ctor_get(x_31, 0); +lean_inc(x_602); +lean_dec(x_31); +x_603 = l_REPL_unpickleProofSnapshot(x_602, x_3, x_601); +if (lean_obj_tag(x_603) == 0) +{ +lean_object* x_604; lean_object* x_605; +x_604 = lean_ctor_get(x_603, 0); +lean_inc(x_604); +x_605 = lean_ctor_get(x_604, 0); +lean_inc(x_605); +if (lean_obj_tag(x_605) == 0) +{ +lean_object* x_606; uint8_t x_607; +x_606 = lean_ctor_get(x_603, 1); +lean_inc(x_606); +lean_dec(x_603); +x_607 = !lean_is_exclusive(x_604); +if (x_607 == 0) +{ +lean_object* x_608; lean_object* x_609; lean_object* x_610; lean_object* x_611; lean_object* x_612; lean_object* x_613; lean_object* x_614; lean_object* x_615; lean_object* x_616; lean_object* x_617; lean_object* x_618; lean_object* x_619; lean_object* x_620; lean_object* x_621; size_t x_622; size_t x_623; lean_object* x_624; lean_object* x_625; lean_object* x_626; lean_object* x_627; lean_object* x_628; lean_object* x_629; lean_object* x_630; lean_object* x_631; lean_object* x_632; lean_object* x_633; lean_object* x_634; lean_object* x_635; lean_object* x_636; lean_object* x_637; lean_object* x_638; lean_object* x_639; lean_object* x_640; lean_object* x_641; lean_object* x_642; lean_object* x_643; lean_object* x_644; lean_object* x_645; +x_608 = lean_ctor_get(x_604, 1); +x_609 = lean_ctor_get(x_604, 0); +lean_dec(x_609); +x_610 = lean_ctor_get(x_605, 0); +lean_inc(x_610); +lean_dec(x_605); +x_611 = lean_ctor_get(x_610, 0); +lean_inc(x_611); +x_612 = l_Lean_JsonNumber_fromNat(x_611); +x_613 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_613, 0, x_612); +x_614 = l_repl_loop___lambda__1___closed__8; +lean_ctor_set(x_604, 1, x_613); +lean_ctor_set(x_604, 0, x_614); +x_615 = lean_box(0); +x_616 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_616, 0, x_604); +lean_ctor_set(x_616, 1, x_615); +x_617 = lean_ctor_get(x_610, 1); +lean_inc(x_617); +x_618 = l_List_redLength___rarg(x_617); +x_619 = lean_mk_empty_array_with_capacity(x_618); +lean_dec(x_618); +x_620 = l_List_toArrayAux___rarg(x_617, x_619); +x_621 = lean_array_get_size(x_620); +x_622 = lean_usize_of_nat(x_621); +lean_dec(x_621); +x_623 = 0; +x_624 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_ParseImportsFast_0__Lean_toJsonPrintImportResult____x40_Lean_Elab_ParseImportsFast___hyg_1425____spec__3(x_622, x_623, x_620); +x_625 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_625, 0, x_624); +x_626 = l_repl_loop___lambda__1___closed__9; +x_627 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_627, 0, x_626); +lean_ctor_set(x_627, 1, x_625); +x_628 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_628, 0, x_627); +lean_ctor_set(x_628, 1, x_615); +x_629 = lean_ctor_get(x_610, 2); +lean_inc(x_629); +x_630 = l_repl_loop___lambda__1___closed__4; +x_631 = l_REPL_Json_nonemptyList___at_REPL_instToJsonCommandResponse___spec__1(x_630, x_629); +x_632 = lean_ctor_get(x_610, 3); +lean_inc(x_632); +x_633 = l_repl_loop___lambda__1___closed__5; +x_634 = l_REPL_Json_nonemptyList___at_REPL_instToJsonCommandResponse___spec__3(x_633, x_632); +x_635 = lean_ctor_get(x_610, 4); +lean_inc(x_635); +lean_dec(x_610); +x_636 = l_repl_loop___lambda__1___closed__10; +x_637 = l_REPL_Json_nonemptyList___at_REPL_instToJsonProofStepResponse__1___spec__1(x_636, x_635); +x_638 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_638, 0, x_637); +lean_ctor_set(x_638, 1, x_615); +x_639 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_639, 0, x_634); +lean_ctor_set(x_639, 1, x_638); +x_640 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_640, 0, x_631); +lean_ctor_set(x_640, 1, x_639); +x_641 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_641, 0, x_628); +lean_ctor_set(x_641, 1, x_640); +x_642 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_642, 0, x_616); +lean_ctor_set(x_642, 1, x_641); +x_643 = l_List_join___rarg(x_642); +x_644 = l_Lean_Json_mkObj(x_643); +x_645 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_645, 0, x_644); +lean_ctor_set(x_645, 1, x_608); +x_5 = x_645; +x_6 = x_606; +goto block_25; +} +else +{ +lean_object* x_646; lean_object* x_647; lean_object* x_648; lean_object* x_649; lean_object* x_650; lean_object* x_651; lean_object* x_652; lean_object* x_653; lean_object* x_654; lean_object* x_655; lean_object* x_656; lean_object* x_657; lean_object* x_658; lean_object* x_659; size_t x_660; size_t x_661; lean_object* x_662; lean_object* x_663; lean_object* x_664; lean_object* x_665; lean_object* x_666; lean_object* x_667; lean_object* x_668; lean_object* x_669; lean_object* x_670; lean_object* x_671; lean_object* x_672; lean_object* x_673; lean_object* x_674; lean_object* x_675; lean_object* x_676; lean_object* x_677; lean_object* x_678; lean_object* x_679; lean_object* x_680; lean_object* x_681; lean_object* x_682; lean_object* x_683; +x_646 = lean_ctor_get(x_604, 1); +lean_inc(x_646); +lean_dec(x_604); +x_647 = lean_ctor_get(x_605, 0); +lean_inc(x_647); +lean_dec(x_605); +x_648 = lean_ctor_get(x_647, 0); +lean_inc(x_648); +x_649 = l_Lean_JsonNumber_fromNat(x_648); +x_650 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_650, 0, x_649); +x_651 = l_repl_loop___lambda__1___closed__8; +x_652 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_652, 0, x_651); +lean_ctor_set(x_652, 1, x_650); +x_653 = lean_box(0); +x_654 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_654, 0, x_652); +lean_ctor_set(x_654, 1, x_653); +x_655 = lean_ctor_get(x_647, 1); +lean_inc(x_655); +x_656 = l_List_redLength___rarg(x_655); +x_657 = lean_mk_empty_array_with_capacity(x_656); +lean_dec(x_656); +x_658 = l_List_toArrayAux___rarg(x_655, x_657); +x_659 = lean_array_get_size(x_658); +x_660 = lean_usize_of_nat(x_659); +lean_dec(x_659); +x_661 = 0; +x_662 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_ParseImportsFast_0__Lean_toJsonPrintImportResult____x40_Lean_Elab_ParseImportsFast___hyg_1425____spec__3(x_660, x_661, x_658); +x_663 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_663, 0, x_662); +x_664 = l_repl_loop___lambda__1___closed__9; +x_665 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_665, 0, x_664); +lean_ctor_set(x_665, 1, x_663); +x_666 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_666, 0, x_665); +lean_ctor_set(x_666, 1, x_653); +x_667 = lean_ctor_get(x_647, 2); +lean_inc(x_667); +x_668 = l_repl_loop___lambda__1___closed__4; +x_669 = l_REPL_Json_nonemptyList___at_REPL_instToJsonCommandResponse___spec__1(x_668, x_667); +x_670 = lean_ctor_get(x_647, 3); +lean_inc(x_670); +x_671 = l_repl_loop___lambda__1___closed__5; +x_672 = l_REPL_Json_nonemptyList___at_REPL_instToJsonCommandResponse___spec__3(x_671, x_670); +x_673 = lean_ctor_get(x_647, 4); +lean_inc(x_673); +lean_dec(x_647); +x_674 = l_repl_loop___lambda__1___closed__10; +x_675 = l_REPL_Json_nonemptyList___at_REPL_instToJsonProofStepResponse__1___spec__1(x_674, x_673); +x_676 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_676, 0, x_675); +lean_ctor_set(x_676, 1, x_653); +x_677 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_677, 0, x_672); +lean_ctor_set(x_677, 1, x_676); +x_678 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_678, 0, x_669); +lean_ctor_set(x_678, 1, x_677); +x_679 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_679, 0, x_666); +lean_ctor_set(x_679, 1, x_678); +x_680 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_680, 0, x_654); +lean_ctor_set(x_680, 1, x_679); +x_681 = l_List_join___rarg(x_680); +x_682 = l_Lean_Json_mkObj(x_681); +x_683 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_683, 0, x_682); +lean_ctor_set(x_683, 1, x_646); +x_5 = x_683; +x_6 = x_606; +goto block_25; +} +} +else +{ +lean_object* x_684; uint8_t x_685; +x_684 = lean_ctor_get(x_603, 1); +lean_inc(x_684); +lean_dec(x_603); +x_685 = !lean_is_exclusive(x_604); +if (x_685 == 0) +{ +lean_object* x_686; lean_object* x_687; lean_object* x_688; +x_686 = lean_ctor_get(x_604, 0); +lean_dec(x_686); +x_687 = lean_ctor_get(x_605, 0); +lean_inc(x_687); +lean_dec(x_605); +x_688 = l___private_REPL_JSON_0__REPL_toJsonError____x40_REPL_JSON___hyg_2860_(x_687); +lean_ctor_set(x_604, 0, x_688); +x_5 = x_604; +x_6 = x_684; +goto block_25; +} +else +{ +lean_object* x_689; lean_object* x_690; lean_object* x_691; lean_object* x_692; +x_689 = lean_ctor_get(x_604, 1); +lean_inc(x_689); +lean_dec(x_604); +x_690 = lean_ctor_get(x_605, 0); +lean_inc(x_690); +lean_dec(x_605); +x_691 = l___private_REPL_JSON_0__REPL_toJsonError____x40_REPL_JSON___hyg_2860_(x_690); +x_692 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_692, 0, x_691); +lean_ctor_set(x_692, 1, x_689); +x_5 = x_692; +x_6 = x_684; +goto block_25; +} +} +} +else +{ +uint8_t x_693; +x_693 = !lean_is_exclusive(x_603); +if (x_693 == 0) +{ +return x_603; +} +else +{ +lean_object* x_694; lean_object* x_695; lean_object* x_696; +x_694 = lean_ctor_get(x_603, 0); +x_695 = lean_ctor_get(x_603, 1); +lean_inc(x_695); +lean_inc(x_694); +lean_dec(x_603); +x_696 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_696, 0, x_694); +lean_ctor_set(x_696, 1, x_695); +return x_696; +} +} +} +} +} +else +{ +uint8_t x_697; +lean_dec(x_3); +x_697 = !lean_is_exclusive(x_30); +if (x_697 == 0) +{ +return x_30; +} +else +{ +lean_object* x_698; lean_object* x_699; lean_object* x_700; +x_698 = lean_ctor_get(x_30, 0); +x_699 = lean_ctor_get(x_30, 1); +lean_inc(x_699); +lean_inc(x_698); +lean_dec(x_30); +x_700 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_700, 0, x_698); +lean_ctor_set(x_700, 1, x_699); +return x_700; +} +} +} +else +{ +lean_object* x_701; +lean_dec(x_1); +x_701 = l_repl_loop(x_3, x_4); +return x_701; +} +} +else +{ +lean_object* x_702; +lean_dec(x_1); +x_702 = l_repl_loop(x_3, x_4); +return x_702; +} +block_25: +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_7 = lean_ctor_get(x_5, 0); +lean_inc(x_7); +x_8 = lean_ctor_get(x_5, 1); +lean_inc(x_8); +lean_dec(x_5); +x_9 = lean_unsigned_to_nat(80u); +x_10 = l_Lean_Json_pretty(x_7, x_9); +x_11 = l_IO_println___at_Lean_instEval___spec__1(x_10, x_6); +if (lean_obj_tag(x_11) == 0) +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; +x_12 = lean_ctor_get(x_11, 1); +lean_inc(x_12); +lean_dec(x_11); +x_13 = l_List_mapTR_loop___at_REPL_sorries___spec__1___closed__1; +x_14 = l_IO_println___at_Lean_instEval___spec__1(x_13, x_12); +if (lean_obj_tag(x_14) == 0) +{ +lean_object* x_15; lean_object* x_16; +x_15 = lean_ctor_get(x_14, 1); +lean_inc(x_15); +lean_dec(x_14); +x_16 = l_repl_loop(x_8, x_15); +return x_16; +} +else +{ +uint8_t x_17; +lean_dec(x_8); +x_17 = !lean_is_exclusive(x_14); +if (x_17 == 0) +{ +return x_14; +} +else +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_18 = lean_ctor_get(x_14, 0); +x_19 = lean_ctor_get(x_14, 1); +lean_inc(x_19); +lean_inc(x_18); +lean_dec(x_14); +x_20 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_20, 0, x_18); +lean_ctor_set(x_20, 1, x_19); +return x_20; +} +} +} +else +{ +uint8_t x_21; +lean_dec(x_8); +x_21 = !lean_is_exclusive(x_11); +if (x_21 == 0) +{ +return x_11; +} +else +{ +lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_22 = lean_ctor_get(x_11, 0); +x_23 = lean_ctor_get(x_11, 1); +lean_inc(x_23); +lean_inc(x_22); +lean_dec(x_11); +x_24 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_24, 0, x_22); +lean_ctor_set(x_24, 1, x_23); +return x_24; +} +} +} +} +} +LEAN_EXPORT lean_object* l_repl_loop(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_getLines(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; lean_object* x_6; lean_object* x_7; uint8_t x_8; +x_5 = lean_ctor_get(x_3, 0); +x_6 = lean_ctor_get(x_3, 1); +x_7 = l_List_mapTR_loop___at_REPL_sorries___spec__1___closed__1; +x_8 = lean_string_dec_eq(x_5, x_7); +if (x_8 == 0) +{ +lean_object* x_9; lean_object* x_10; +lean_free_object(x_3); +x_9 = lean_box(0); +x_10 = l_repl_loop___lambda__1(x_5, x_9, x_1, x_6); +return x_10; +} +else +{ +lean_object* x_11; lean_object* x_12; +lean_dec(x_5); +x_11 = lean_box(0); +x_12 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_12, 0, x_11); +lean_ctor_set(x_12, 1, x_1); +lean_ctor_set(x_3, 0, x_12); +return x_3; +} +} +else +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; +x_13 = lean_ctor_get(x_3, 0); +x_14 = lean_ctor_get(x_3, 1); +lean_inc(x_14); +lean_inc(x_13); +lean_dec(x_3); +x_15 = l_List_mapTR_loop___at_REPL_sorries___spec__1___closed__1; +x_16 = lean_string_dec_eq(x_13, x_15); +if (x_16 == 0) +{ +lean_object* x_17; lean_object* x_18; +x_17 = lean_box(0); +x_18 = l_repl_loop___lambda__1(x_13, x_17, x_1, x_14); +return x_18; +} +else +{ +lean_object* x_19; lean_object* x_20; lean_object* x_21; +lean_dec(x_13); +x_19 = lean_box(0); +x_20 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_20, 0, x_19); +lean_ctor_set(x_20, 1, x_1); +x_21 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_21, 0, x_20); +lean_ctor_set(x_21, 1, x_14); +return x_21; +} +} +} +else +{ +uint8_t x_22; +lean_dec(x_1); +x_22 = !lean_is_exclusive(x_3); +if (x_22 == 0) +{ +return x_3; +} +else +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; +x_23 = lean_ctor_get(x_3, 0); +x_24 = lean_ctor_get(x_3, 1); +lean_inc(x_24); +lean_inc(x_23); +lean_dec(x_3); +x_25 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_25, 0, x_23); +lean_ctor_set(x_25, 1, x_24); +return x_25; +} +} +} +} +LEAN_EXPORT lean_object* l_REPL_pickleCommandSnapshot___at_repl_loop___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_REPL_pickleCommandSnapshot___at_repl_loop___spec__1(x_1, x_2, x_3); +lean_dec(x_1); +return x_4; +} +} +LEAN_EXPORT lean_object* l_REPL_pickleProofSnapshot___at_repl_loop___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_REPL_pickleProofSnapshot___at_repl_loop___spec__2(x_1, x_2, x_3); +lean_dec(x_1); +return x_4; +} +} +static lean_object* _init_l_repl___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_REPL_State_cmdStates___default___closed__1; +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; +} +} +LEAN_EXPORT lean_object* l_repl(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; +x_2 = l_repl___closed__1; +x_3 = l_repl_loop(x_2, 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; lean_object* x_6; +x_5 = lean_ctor_get(x_3, 0); +x_6 = lean_ctor_get(x_5, 0); +lean_inc(x_6); +lean_dec(x_5); +lean_ctor_set(x_3, 0, x_6); +return x_3; +} +else +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_7 = lean_ctor_get(x_3, 0); +x_8 = lean_ctor_get(x_3, 1); +lean_inc(x_8); +lean_inc(x_7); +lean_dec(x_3); +x_9 = lean_ctor_get(x_7, 0); +lean_inc(x_9); +lean_dec(x_7); +x_10 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_10, 0, x_9); +lean_ctor_set(x_10, 1, x_8); +return x_10; +} +} +else +{ +uint8_t x_11; +x_11 = !lean_is_exclusive(x_3); +if (x_11 == 0) +{ +return x_3; +} +else +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; +x_12 = lean_ctor_get(x_3, 0); +x_13 = lean_ctor_get(x_3, 1); +lean_inc(x_13); +lean_inc(x_12); +lean_dec(x_3); +x_14 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_14, 0, x_12); +lean_ctor_set(x_14, 1, x_13); +return x_14; +} +} +} +} +static lean_object* _init_l_main___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("lean", 4); +return x_1; +} +} +LEAN_EXPORT lean_object* _lean_main(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; +lean_dec(x_1); +x_3 = l_main___closed__1; +x_4 = l_Lean_findSysroot(x_3, x_2); +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); +x_6 = lean_ctor_get(x_4, 1); +lean_inc(x_6); +lean_dec(x_4); +x_7 = lean_box(0); +x_8 = l_Lean_initSearchPath(x_5, x_7, x_6); +if (lean_obj_tag(x_8) == 0) +{ +lean_object* x_9; lean_object* x_10; +x_9 = lean_ctor_get(x_8, 1); +lean_inc(x_9); +lean_dec(x_8); +x_10 = l_repl(x_9); +return x_10; +} +else +{ +uint8_t x_11; +x_11 = !lean_is_exclusive(x_8); +if (x_11 == 0) +{ +return x_8; +} +else +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; +x_12 = lean_ctor_get(x_8, 0); +x_13 = lean_ctor_get(x_8, 1); +lean_inc(x_13); +lean_inc(x_12); +lean_dec(x_8); +x_14 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_14, 0, x_12); +lean_ctor_set(x_14, 1, x_13); +return x_14; +} +} +} +else +{ +uint8_t x_15; +x_15 = !lean_is_exclusive(x_4); +if (x_15 == 0) +{ +return x_4; +} +else +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_16 = lean_ctor_get(x_4, 0); +x_17 = lean_ctor_get(x_4, 1); +lean_inc(x_17); +lean_inc(x_16); +lean_dec(x_4); +x_18 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_18, 0, x_16); +lean_ctor_set(x_18, 1, x_17); +return x_18; +} +} +} +} +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_REPL_JSON(uint8_t builtin, lean_object*); +lean_object* initialize_REPL_Frontend(uint8_t builtin, lean_object*); +lean_object* initialize_REPL_Util_Path(uint8_t builtin, lean_object*); +lean_object* initialize_REPL_Lean_ContextInfo(uint8_t builtin, lean_object*); +lean_object* initialize_REPL_Lean_Environment(uint8_t builtin, lean_object*); +lean_object* initialize_REPL_Lean_InfoTree(uint8_t builtin, lean_object*); +lean_object* initialize_REPL_Lean_InfoTree_ToJson(uint8_t builtin, lean_object*); +lean_object* initialize_REPL_Snapshots(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_REPL_Main(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_REPL_JSON(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_REPL_Frontend(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_REPL_Util_Path(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_REPL_Lean_ContextInfo(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_REPL_Lean_Environment(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_REPL_Lean_InfoTree(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_REPL_Lean_InfoTree_ToJson(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_REPL_Snapshots(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +l_REPL_State_cmdStates___default___closed__1 = _init_l_REPL_State_cmdStates___default___closed__1(); +lean_mark_persistent(l_REPL_State_cmdStates___default___closed__1); +l_REPL_State_cmdStates___default = _init_l_REPL_State_cmdStates___default(); +lean_mark_persistent(l_REPL_State_cmdStates___default); +l_REPL_State_proofStates___default = _init_l_REPL_State_proofStates___default(); +lean_mark_persistent(l_REPL_State_proofStates___default); +l_List_mapTR_loop___at_REPL_sorries___spec__1___closed__1 = _init_l_List_mapTR_loop___at_REPL_sorries___spec__1___closed__1(); +lean_mark_persistent(l_List_mapTR_loop___at_REPL_sorries___spec__1___closed__1); +l_panic___at_REPL_sorries___spec__2___rarg___closed__1 = _init_l_panic___at_REPL_sorries___spec__2___rarg___closed__1(); +lean_mark_persistent(l_panic___at_REPL_sorries___spec__2___rarg___closed__1); +l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__8___closed__1 = _init_l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__8___closed__1(); +lean_mark_persistent(l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___lambda__8___closed__1); +l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___closed__1 = _init_l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___closed__1(); +lean_mark_persistent(l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___closed__1); +l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___closed__2 = _init_l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___closed__2(); +lean_mark_persistent(l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___closed__2); +l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___closed__3 = _init_l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___closed__3(); +lean_mark_persistent(l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___closed__3); +l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___closed__4 = _init_l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___closed__4(); +lean_mark_persistent(l_List_mapM_loop___at_REPL_sorries___spec__4___rarg___closed__4); +l_REPL_ppTactic___lambda__1___closed__1 = _init_l_REPL_ppTactic___lambda__1___closed__1(); +lean_mark_persistent(l_REPL_ppTactic___lambda__1___closed__1); +l_REPL_ppTactic___lambda__1___closed__2 = _init_l_REPL_ppTactic___lambda__1___closed__2(); +lean_mark_persistent(l_REPL_ppTactic___lambda__1___closed__2); +l_REPL_ppTactic___closed__1 = _init_l_REPL_ppTactic___closed__1(); +lean_mark_persistent(l_REPL_ppTactic___closed__1); +l_REPL_ppTactic___closed__2 = _init_l_REPL_ppTactic___closed__2(); +lean_mark_persistent(l_REPL_ppTactic___closed__2); +l_REPL_ppTactic___closed__3 = _init_l_REPL_ppTactic___closed__3(); +lean_mark_persistent(l_REPL_ppTactic___closed__3); +l_REPL_ppTactic___closed__4 = _init_l_REPL_ppTactic___closed__4(); +lean_mark_persistent(l_REPL_ppTactic___closed__4); +l_REPL_ppTactic___closed__5 = _init_l_REPL_ppTactic___closed__5(); +lean_mark_persistent(l_REPL_ppTactic___closed__5); +l_REPL_ppTactic___closed__6 = _init_l_REPL_ppTactic___closed__6(); +lean_mark_persistent(l_REPL_ppTactic___closed__6); +l_REPL_ppTactic___closed__7 = _init_l_REPL_ppTactic___closed__7(); +lean_mark_persistent(l_REPL_ppTactic___closed__7); +l_REPL_createProofStepReponse___rarg___lambda__7___closed__1 = _init_l_REPL_createProofStepReponse___rarg___lambda__7___closed__1(); +lean_mark_persistent(l_REPL_createProofStepReponse___rarg___lambda__7___closed__1); +l_REPL_pickleCommandSnapshot___rarg___lambda__4___closed__1 = _init_l_REPL_pickleCommandSnapshot___rarg___lambda__4___closed__1(); +lean_mark_persistent(l_REPL_pickleCommandSnapshot___rarg___lambda__4___closed__1); +l_REPL_pickleCommandSnapshot___rarg___lambda__4___closed__2 = _init_l_REPL_pickleCommandSnapshot___rarg___lambda__4___closed__2(); +lean_mark_persistent(l_REPL_pickleCommandSnapshot___rarg___lambda__4___closed__2); +l_REPL_pickleProofSnapshot___rarg___lambda__3___closed__1 = _init_l_REPL_pickleProofSnapshot___rarg___lambda__3___closed__1(); +lean_mark_persistent(l_REPL_pickleProofSnapshot___rarg___lambda__3___closed__1); +l_REPL_pickleProofSnapshot___rarg___lambda__3___closed__2 = _init_l_REPL_pickleProofSnapshot___rarg___lambda__3___closed__2(); +lean_mark_persistent(l_REPL_pickleProofSnapshot___rarg___lambda__3___closed__2); +l_panic___at_REPL_unpickleProofSnapshot___spec__5___closed__1 = _init_l_panic___at_REPL_unpickleProofSnapshot___spec__5___closed__1(); +lean_mark_persistent(l_panic___at_REPL_unpickleProofSnapshot___spec__5___closed__1); +l_panic___at_REPL_unpickleProofSnapshot___spec__5___closed__2 = _init_l_panic___at_REPL_unpickleProofSnapshot___spec__5___closed__2(); +lean_mark_persistent(l_panic___at_REPL_unpickleProofSnapshot___spec__5___closed__2); +l_panic___at_REPL_unpickleProofSnapshot___spec__5___closed__3 = _init_l_panic___at_REPL_unpickleProofSnapshot___spec__5___closed__3(); +lean_mark_persistent(l_panic___at_REPL_unpickleProofSnapshot___spec__5___closed__3); +l_REPL_unpickleProofSnapshot___closed__1 = _init_l_REPL_unpickleProofSnapshot___closed__1(); +lean_mark_persistent(l_REPL_unpickleProofSnapshot___closed__1); +l_REPL_unpickleProofSnapshot___closed__2 = _init_l_REPL_unpickleProofSnapshot___closed__2(); +lean_mark_persistent(l_REPL_unpickleProofSnapshot___closed__2); +l_List_mapTR_loop___at_REPL_runCommand___spec__2___closed__1 = _init_l_List_mapTR_loop___at_REPL_runCommand___spec__2___closed__1(); +lean_mark_persistent(l_List_mapTR_loop___at_REPL_runCommand___spec__2___closed__1); +l_List_mapTR_loop___at_REPL_runCommand___spec__2___closed__2 = _init_l_List_mapTR_loop___at_REPL_runCommand___spec__2___closed__2(); +lean_mark_persistent(l_List_mapTR_loop___at_REPL_runCommand___spec__2___closed__2); +l_List_mapTR_loop___at_REPL_runCommand___spec__3___closed__1 = _init_l_List_mapTR_loop___at_REPL_runCommand___spec__3___closed__1(); +lean_mark_persistent(l_List_mapTR_loop___at_REPL_runCommand___spec__3___closed__1); +l_List_mapTR_loop___at_REPL_runCommand___spec__4___closed__1 = _init_l_List_mapTR_loop___at_REPL_runCommand___spec__4___closed__1(); +lean_mark_persistent(l_List_mapTR_loop___at_REPL_runCommand___spec__4___closed__1); +l_REPL_runCommand___lambda__1___closed__1 = _init_l_REPL_runCommand___lambda__1___closed__1(); +lean_mark_persistent(l_REPL_runCommand___lambda__1___closed__1); +l_REPL_runCommand___lambda__1___closed__2 = _init_l_REPL_runCommand___lambda__1___closed__2(); +lean_mark_persistent(l_REPL_runCommand___lambda__1___closed__2); +l_REPL_runCommand___lambda__1___closed__3 = _init_l_REPL_runCommand___lambda__1___closed__3(); +lean_mark_persistent(l_REPL_runCommand___lambda__1___closed__3); +l_REPL_runCommand___lambda__1___closed__4 = _init_l_REPL_runCommand___lambda__1___closed__4(); +lean_mark_persistent(l_REPL_runCommand___lambda__1___closed__4); +l_REPL_runCommand___lambda__1___closed__5 = _init_l_REPL_runCommand___lambda__1___closed__5(); +lean_mark_persistent(l_REPL_runCommand___lambda__1___closed__5); +l_REPL_runProofStep___closed__1 = _init_l_REPL_runProofStep___closed__1(); +lean_mark_persistent(l_REPL_runProofStep___closed__1); +l_REPL_runProofStep___closed__2 = _init_l_REPL_runProofStep___closed__2(); +lean_mark_persistent(l_REPL_runProofStep___closed__2); +l_REPL_runProofStep___closed__3 = _init_l_REPL_runProofStep___closed__3(); +lean_mark_persistent(l_REPL_runProofStep___closed__3); +l_parse___closed__1 = _init_l_parse___closed__1(); +lean_mark_persistent(l_parse___closed__1); +l_parse___closed__2 = _init_l_parse___closed__2(); +lean_mark_persistent(l_parse___closed__2); +l_repl_loop___lambda__1___closed__1 = _init_l_repl_loop___lambda__1___closed__1(); +lean_mark_persistent(l_repl_loop___lambda__1___closed__1); +l_repl_loop___lambda__1___closed__2 = _init_l_repl_loop___lambda__1___closed__2(); +lean_mark_persistent(l_repl_loop___lambda__1___closed__2); +l_repl_loop___lambda__1___closed__3 = _init_l_repl_loop___lambda__1___closed__3(); +lean_mark_persistent(l_repl_loop___lambda__1___closed__3); +l_repl_loop___lambda__1___closed__4 = _init_l_repl_loop___lambda__1___closed__4(); +lean_mark_persistent(l_repl_loop___lambda__1___closed__4); +l_repl_loop___lambda__1___closed__5 = _init_l_repl_loop___lambda__1___closed__5(); +lean_mark_persistent(l_repl_loop___lambda__1___closed__5); +l_repl_loop___lambda__1___closed__6 = _init_l_repl_loop___lambda__1___closed__6(); +lean_mark_persistent(l_repl_loop___lambda__1___closed__6); +l_repl_loop___lambda__1___closed__7 = _init_l_repl_loop___lambda__1___closed__7(); +lean_mark_persistent(l_repl_loop___lambda__1___closed__7); +l_repl_loop___lambda__1___closed__8 = _init_l_repl_loop___lambda__1___closed__8(); +lean_mark_persistent(l_repl_loop___lambda__1___closed__8); +l_repl_loop___lambda__1___closed__9 = _init_l_repl_loop___lambda__1___closed__9(); +lean_mark_persistent(l_repl_loop___lambda__1___closed__9); +l_repl_loop___lambda__1___closed__10 = _init_l_repl_loop___lambda__1___closed__10(); +lean_mark_persistent(l_repl_loop___lambda__1___closed__10); +l_repl___closed__1 = _init_l_repl___closed__1(); +lean_mark_persistent(l_repl___closed__1); +l_main___closed__1 = _init_l_main___closed__1(); +lean_mark_persistent(l_main___closed__1); +return lean_io_result_mk_ok(lean_box(0)); +} +void lean_initialize(); + + #if defined(WIN32) || defined(_WIN32) + #include + #endif + + int main(int argc, char ** argv) { + #if defined(WIN32) || defined(_WIN32) + SetErrorMode(SEM_FAILCRITICALERRORS); + #endif + lean_object* in; lean_object* res; +lean_initialize(); +lean_set_panic_messages(false); +res = initialize_REPL_Main(1 /* builtin */, lean_io_mk_world()); +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_io_mk_world()); +} +lean_finalize_task_manager(); +if (lean_io_result_is_ok(res)) { + int ret = 0; + lean_dec_ref(res); + return ret; +} else { + lean_io_result_show_error(res); + lean_dec_ref(res); + return 1; +} +} +#ifdef __cplusplus +} +#endif