From 7c99d58b8347a9df7c385b03e8aa034dc6567b8f Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Sat, 26 Oct 2019 09:55:31 -0700 Subject: [PATCH] chore: update stage0 and fix local_ctx.cpp --- src/kernel/local_ctx.cpp | 17 +- src/stage0/CMakeLists.txt | 2 +- src/stage0/Init/Lean/AbstractMetavarContext.c | 11308 ++++++++++++++++ src/stage0/Init/Lean/Elaborator/Basic.c | 516 +- src/stage0/Init/Lean/Elaborator/PreTerm.c | 158 +- src/stage0/Init/Lean/Expr.c | 472 +- src/stage0/Init/Lean/LocalContext.c | 186 +- src/stage0/Init/Lean/MetavarContext.c | 8988 +++++++++++- src/stage0/Init/Lean/TypeClass/Context.c | 21 +- src/stage0/Init/Lean/TypeClass/Synth.c | 135 +- src/stage0/Init/Lean/TypeContext.c | 5330 +------- 11 files changed, 21379 insertions(+), 5754 deletions(-) create mode 100644 src/stage0/Init/Lean/AbstractMetavarContext.c diff --git a/src/kernel/local_ctx.cpp b/src/kernel/local_ctx.cpp index 9d3509e844..7d76d24937 100644 --- a/src/kernel/local_ctx.cpp +++ b/src/kernel/local_ctx.cpp @@ -44,6 +44,7 @@ expr local_decl::mk_ref() const { } extern "C" object * lean_mk_empty_local_ctx(object*); +extern "C" object * lean_local_ctx_num_indices(object*); extern "C" uint8 lean_local_ctx_is_empty(object*); extern "C" object * lean_local_ctx_mk_local_decl(object * lctx, object * name, object * user_name, object * expr, uint8 bi); extern "C" object * lean_local_ctx_mk_let_decl(object * lctx, object * name, object * user_name, object * type, object * value); @@ -58,19 +59,15 @@ bool local_ctx::empty() const { } local_decl local_ctx::mk_local_decl(name const & n, name const & un, expr const & type, expr const & value) { - object * p = lean_local_ctx_mk_let_decl(raw(), n.to_obj_arg(), un.to_obj_arg(), type.to_obj_arg(), value.to_obj_arg()); - local_decl decl(cnstr_get(p, 0)); - m_obj = cnstr_get(p, 1); - lean_free_object(p); - return decl; + unsigned idx = unbox(lean_local_ctx_num_indices(to_obj_arg())); + m_obj = lean_local_ctx_mk_let_decl(raw(), n.to_obj_arg(), un.to_obj_arg(), type.to_obj_arg(), value.to_obj_arg()); + return local_decl(idx, n, un, type, value); } local_decl local_ctx::mk_local_decl(name const & n, name const & un, expr const & type, binder_info bi) { - object * p = lean_local_ctx_mk_local_decl(raw(), n.to_obj_arg(), un.to_obj_arg(), type.to_obj_arg(), static_cast(bi)); - local_decl decl(cnstr_get(p, 0)); - m_obj = cnstr_get(p, 1); - lean_free_object(p); - return decl; + unsigned idx = unbox(lean_local_ctx_num_indices(to_obj_arg())); + m_obj = lean_local_ctx_mk_local_decl(raw(), n.to_obj_arg(), un.to_obj_arg(), type.to_obj_arg(), static_cast(bi)); + return local_decl(idx, n, un, type, bi); } optional local_ctx::find_local_decl(name const & n) const { diff --git a/src/stage0/CMakeLists.txt b/src/stage0/CMakeLists.txt index eaa2132ba4..edb65a549c 100644 --- a/src/stage0/CMakeLists.txt +++ b/src/stage0/CMakeLists.txt @@ -1 +1 @@ -add_library (stage0 OBJECT ./Init/Coe.c ./Init/Control/Alternative.c ./Init/Control/Applicative.c ./Init/Control/Combinators.c ./Init/Control/Conditional.c ./Init/Control/Default.c ./Init/Control/EState.c ./Init/Control/Except.c ./Init/Control/Functor.c ./Init/Control/Id.c ./Init/Control/Lift.c ./Init/Control/Monad.c ./Init/Control/MonadFail.c ./Init/Control/Option.c ./Init/Control/Reader.c ./Init/Control/State.c ./Init/Core.c ./Init/Data/Array/Basic.c ./Init/Data/Array/BinSearch.c ./Init/Data/Array/Default.c ./Init/Data/Array/QSort.c ./Init/Data/AssocList.c ./Init/Data/Basic.c ./Init/Data/BinomialHeap/Basic.c ./Init/Data/BinomialHeap/Default.c ./Init/Data/ByteArray/Basic.c ./Init/Data/ByteArray/Default.c ./Init/Data/Char/Basic.c ./Init/Data/Char/Default.c ./Init/Data/DList.c ./Init/Data/Default.c ./Init/Data/Fin/Basic.c ./Init/Data/Fin/Default.c ./Init/Data/HashMap/Basic.c ./Init/Data/HashMap/Default.c ./Init/Data/Hashable.c ./Init/Data/Int/Basic.c ./Init/Data/Int/Default.c ./Init/Data/List/Basic.c ./Init/Data/List/BasicAux.c ./Init/Data/List/Default.c ./Init/Data/List/Instances.c ./Init/Data/Nat/Basic.c ./Init/Data/Nat/Bitwise.c ./Init/Data/Nat/Default.c ./Init/Data/Nat/Div.c ./Init/Data/Option/Basic.c ./Init/Data/Option/BasicAux.c ./Init/Data/Option/Default.c ./Init/Data/Option/Instances.c ./Init/Data/PersistentArray/Basic.c ./Init/Data/PersistentArray/Default.c ./Init/Data/PersistentHashMap/Basic.c ./Init/Data/PersistentHashMap/Default.c ./Init/Data/Queue/Basic.c ./Init/Data/Queue/Default.c ./Init/Data/RBMap/Basic.c ./Init/Data/RBMap/BasicAux.c ./Init/Data/RBMap/Default.c ./Init/Data/RBTree/Basic.c ./Init/Data/RBTree/Default.c ./Init/Data/Random.c ./Init/Data/Repr.c ./Init/Data/Stack/Basic.c ./Init/Data/Stack/Default.c ./Init/Data/String/Basic.c ./Init/Data/String/Default.c ./Init/Data/ToString.c ./Init/Data/UInt.c ./Init/Default.c ./Init/Fix.c ./Init/Lean/Attributes.c ./Init/Lean/Class.c ./Init/Lean/Compiler/ClosedTermCache.c ./Init/Lean/Compiler/ConstFolding.c ./Init/Lean/Compiler/Default.c ./Init/Lean/Compiler/ExportAttr.c ./Init/Lean/Compiler/ExternAttr.c ./Init/Lean/Compiler/IR/Basic.c ./Init/Lean/Compiler/IR/Borrow.c ./Init/Lean/Compiler/IR/Boxing.c ./Init/Lean/Compiler/IR/Checker.c ./Init/Lean/Compiler/IR/CompilerM.c ./Init/Lean/Compiler/IR/CtorLayout.c ./Init/Lean/Compiler/IR/Default.c ./Init/Lean/Compiler/IR/ElimDeadBranches.c ./Init/Lean/Compiler/IR/ElimDeadVars.c ./Init/Lean/Compiler/IR/EmitC.c ./Init/Lean/Compiler/IR/EmitUtil.c ./Init/Lean/Compiler/IR/ExpandResetReuse.c ./Init/Lean/Compiler/IR/Format.c ./Init/Lean/Compiler/IR/FreeVars.c ./Init/Lean/Compiler/IR/LiveVars.c ./Init/Lean/Compiler/IR/NormIds.c ./Init/Lean/Compiler/IR/PushProj.c ./Init/Lean/Compiler/IR/RC.c ./Init/Lean/Compiler/IR/ResetReuse.c ./Init/Lean/Compiler/IR/SimpCase.c ./Init/Lean/Compiler/IR/UnboxResult.c ./Init/Lean/Compiler/ImplementedByAttr.c ./Init/Lean/Compiler/InitAttr.c ./Init/Lean/Compiler/InlineAttrs.c ./Init/Lean/Compiler/NameMangling.c ./Init/Lean/Compiler/NeverExtractAttr.c ./Init/Lean/Compiler/Specialize.c ./Init/Lean/Compiler/Util.c ./Init/Lean/Declaration.c ./Init/Lean/Default.c ./Init/Lean/Elaborator/Alias.c ./Init/Lean/Elaborator/Basic.c ./Init/Lean/Elaborator/Command.c ./Init/Lean/Elaborator/Default.c ./Init/Lean/Elaborator/ElabStrategyAttrs.c ./Init/Lean/Elaborator/PreTerm.c ./Init/Lean/Elaborator/ResolveName.c ./Init/Lean/Elaborator/Term.c ./Init/Lean/Environment.c ./Init/Lean/EqnCompiler/Default.c ./Init/Lean/EqnCompiler/MatchPattern.c ./Init/Lean/Expr.c ./Init/Lean/Format.c ./Init/Lean/KVMap.c ./Init/Lean/Level.c ./Init/Lean/LocalContext.c ./Init/Lean/Message.c ./Init/Lean/MetavarContext.c ./Init/Lean/Modifiers.c ./Init/Lean/Name.c ./Init/Lean/NameGenerator.c ./Init/Lean/Options.c ./Init/Lean/Parser/Command.c ./Init/Lean/Parser/Default.c ./Init/Lean/Parser/Identifier.c ./Init/Lean/Parser/Level.c ./Init/Lean/Parser/Module.c ./Init/Lean/Parser/Parser.c ./Init/Lean/Parser/Term.c ./Init/Lean/Parser/Transform.c ./Init/Lean/Parser/Trie.c ./Init/Lean/Path.c ./Init/Lean/Position.c ./Init/Lean/ProjFns.c ./Init/Lean/ReducibilityAttrs.c ./Init/Lean/Runtime.c ./Init/Lean/SMap.c ./Init/Lean/Scopes.c ./Init/Lean/Syntax.c ./Init/Lean/ToExpr.c ./Init/Lean/Trace.c ./Init/Lean/TypeClass/Basic.c ./Init/Lean/TypeClass/Context.c ./Init/Lean/TypeClass/Default.c ./Init/Lean/TypeClass/Synth.c ./Init/Lean/TypeContext.c ./Init/Lean/Util.c ./Init/System/Default.c ./Init/System/FilePath.c ./Init/System/IO.c ./Init/System/Platform.c ./Init/Util.c ./Init/WF.c) +add_library (stage0 OBJECT ./Init/Coe.c ./Init/Control/Alternative.c ./Init/Control/Applicative.c ./Init/Control/Combinators.c ./Init/Control/Conditional.c ./Init/Control/Default.c ./Init/Control/EState.c ./Init/Control/Except.c ./Init/Control/Functor.c ./Init/Control/Id.c ./Init/Control/Lift.c ./Init/Control/Monad.c ./Init/Control/MonadFail.c ./Init/Control/Option.c ./Init/Control/Reader.c ./Init/Control/State.c ./Init/Core.c ./Init/Data/Array/Basic.c ./Init/Data/Array/BinSearch.c ./Init/Data/Array/Default.c ./Init/Data/Array/QSort.c ./Init/Data/AssocList.c ./Init/Data/Basic.c ./Init/Data/BinomialHeap/Basic.c ./Init/Data/BinomialHeap/Default.c ./Init/Data/ByteArray/Basic.c ./Init/Data/ByteArray/Default.c ./Init/Data/Char/Basic.c ./Init/Data/Char/Default.c ./Init/Data/DList.c ./Init/Data/Default.c ./Init/Data/Fin/Basic.c ./Init/Data/Fin/Default.c ./Init/Data/HashMap/Basic.c ./Init/Data/HashMap/Default.c ./Init/Data/Hashable.c ./Init/Data/Int/Basic.c ./Init/Data/Int/Default.c ./Init/Data/List/Basic.c ./Init/Data/List/BasicAux.c ./Init/Data/List/Default.c ./Init/Data/List/Instances.c ./Init/Data/Nat/Basic.c ./Init/Data/Nat/Bitwise.c ./Init/Data/Nat/Default.c ./Init/Data/Nat/Div.c ./Init/Data/Option/Basic.c ./Init/Data/Option/BasicAux.c ./Init/Data/Option/Default.c ./Init/Data/Option/Instances.c ./Init/Data/PersistentArray/Basic.c ./Init/Data/PersistentArray/Default.c ./Init/Data/PersistentHashMap/Basic.c ./Init/Data/PersistentHashMap/Default.c ./Init/Data/Queue/Basic.c ./Init/Data/Queue/Default.c ./Init/Data/RBMap/Basic.c ./Init/Data/RBMap/BasicAux.c ./Init/Data/RBMap/Default.c ./Init/Data/RBTree/Basic.c ./Init/Data/RBTree/Default.c ./Init/Data/Random.c ./Init/Data/Repr.c ./Init/Data/Stack/Basic.c ./Init/Data/Stack/Default.c ./Init/Data/String/Basic.c ./Init/Data/String/Default.c ./Init/Data/ToString.c ./Init/Data/UInt.c ./Init/Default.c ./Init/Fix.c ./Init/Lean/AbstractMetavarContext.c ./Init/Lean/Attributes.c ./Init/Lean/Class.c ./Init/Lean/Compiler/ClosedTermCache.c ./Init/Lean/Compiler/ConstFolding.c ./Init/Lean/Compiler/Default.c ./Init/Lean/Compiler/ExportAttr.c ./Init/Lean/Compiler/ExternAttr.c ./Init/Lean/Compiler/IR/Basic.c ./Init/Lean/Compiler/IR/Borrow.c ./Init/Lean/Compiler/IR/Boxing.c ./Init/Lean/Compiler/IR/Checker.c ./Init/Lean/Compiler/IR/CompilerM.c ./Init/Lean/Compiler/IR/CtorLayout.c ./Init/Lean/Compiler/IR/Default.c ./Init/Lean/Compiler/IR/ElimDeadBranches.c ./Init/Lean/Compiler/IR/ElimDeadVars.c ./Init/Lean/Compiler/IR/EmitC.c ./Init/Lean/Compiler/IR/EmitUtil.c ./Init/Lean/Compiler/IR/ExpandResetReuse.c ./Init/Lean/Compiler/IR/Format.c ./Init/Lean/Compiler/IR/FreeVars.c ./Init/Lean/Compiler/IR/LiveVars.c ./Init/Lean/Compiler/IR/NormIds.c ./Init/Lean/Compiler/IR/PushProj.c ./Init/Lean/Compiler/IR/RC.c ./Init/Lean/Compiler/IR/ResetReuse.c ./Init/Lean/Compiler/IR/SimpCase.c ./Init/Lean/Compiler/IR/UnboxResult.c ./Init/Lean/Compiler/ImplementedByAttr.c ./Init/Lean/Compiler/InitAttr.c ./Init/Lean/Compiler/InlineAttrs.c ./Init/Lean/Compiler/NameMangling.c ./Init/Lean/Compiler/NeverExtractAttr.c ./Init/Lean/Compiler/Specialize.c ./Init/Lean/Compiler/Util.c ./Init/Lean/Declaration.c ./Init/Lean/Default.c ./Init/Lean/Elaborator/Alias.c ./Init/Lean/Elaborator/Basic.c ./Init/Lean/Elaborator/Command.c ./Init/Lean/Elaborator/Default.c ./Init/Lean/Elaborator/ElabStrategyAttrs.c ./Init/Lean/Elaborator/PreTerm.c ./Init/Lean/Elaborator/ResolveName.c ./Init/Lean/Elaborator/Term.c ./Init/Lean/Environment.c ./Init/Lean/EqnCompiler/Default.c ./Init/Lean/EqnCompiler/MatchPattern.c ./Init/Lean/Expr.c ./Init/Lean/Format.c ./Init/Lean/KVMap.c ./Init/Lean/Level.c ./Init/Lean/LocalContext.c ./Init/Lean/Message.c ./Init/Lean/MetavarContext.c ./Init/Lean/Modifiers.c ./Init/Lean/Name.c ./Init/Lean/NameGenerator.c ./Init/Lean/Options.c ./Init/Lean/Parser/Command.c ./Init/Lean/Parser/Default.c ./Init/Lean/Parser/Identifier.c ./Init/Lean/Parser/Level.c ./Init/Lean/Parser/Module.c ./Init/Lean/Parser/Parser.c ./Init/Lean/Parser/Term.c ./Init/Lean/Parser/Transform.c ./Init/Lean/Parser/Trie.c ./Init/Lean/Path.c ./Init/Lean/Position.c ./Init/Lean/ProjFns.c ./Init/Lean/ReducibilityAttrs.c ./Init/Lean/Runtime.c ./Init/Lean/SMap.c ./Init/Lean/Scopes.c ./Init/Lean/Syntax.c ./Init/Lean/ToExpr.c ./Init/Lean/Trace.c ./Init/Lean/TypeClass/Basic.c ./Init/Lean/TypeClass/Context.c ./Init/Lean/TypeClass/Default.c ./Init/Lean/TypeClass/Synth.c ./Init/Lean/TypeContext.c ./Init/Lean/Util.c ./Init/System/Default.c ./Init/System/FilePath.c ./Init/System/IO.c ./Init/System/Platform.c ./Init/Util.c ./Init/WF.c) diff --git a/src/stage0/Init/Lean/AbstractMetavarContext.c b/src/stage0/Init/Lean/AbstractMetavarContext.c new file mode 100644 index 0000000000..c75876c0a7 --- /dev/null +++ b/src/stage0/Init/Lean/AbstractMetavarContext.c @@ -0,0 +1,11308 @@ +// Lean compiler output +// Module: Init.Lean.AbstractMetavarContext +// Imports: Init.Lean.LocalContext +#include "runtime/lean.h" +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* l_AssocList_contains___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__4___boxed(lean_object*, lean_object*); +lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_AbstractMetavarContext_isLevelAssigned___rarg___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_getMCtx(lean_object*); +lean_object* l_Lean_AbstractMetavarContext_hasAssignedLevelMVar___main___rarg___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Expr_betaRev(lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Expr_3__withAppRevAux___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__5(lean_object*); +extern lean_object* l_Array_empty___closed__1; +lean_object* lean_nat_sub(lean_object*, lean_object*); +lean_object* l_panicWithPos___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Expr_letName___closed__1; +lean_object* l_Array_ummapAux___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__4(lean_object*); +lean_object* lean_mk_array(lean_object*, lean_object*); +extern lean_object* l_Lean_exprIsInhabited; +size_t lean_expr_hash(lean_object*); +lean_object* l___private_Init_Lean_Expr_3__withAppRevAux___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__5___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_visit___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_monadInhabited___rarg(lean_object*, lean_object*); +lean_object* l_HashMapImp_moveEntries___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__6(lean_object*, lean_object*, lean_object*); +uint8_t lean_level_has_mvar(lean_object*); +lean_object* lean_expr_mk_let(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___rarg___closed__2; +lean_object* l_Lean_AbstractMetavarContext_hasAssignedMVar___main(lean_object*); +lean_object* l_StateT_Monad___rarg(lean_object*); +lean_object* l_Lean_AbstractMetavarContext_instantiateLevelMVars___main(lean_object*); +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main(lean_object*); +lean_object* l_panicWithPos___at_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___spec__1___rarg___closed__2; +lean_object* l_Lean_AbstractMetavarContext_hasAssignedMVar(lean_object*); +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateLevelMVars(lean_object*); +lean_object* l_panicWithPos___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__2___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_AbstractMetavarContext_hasAssignedLevelMVar(lean_object*); +lean_object* lean_array_uget(lean_object*, size_t); +lean_object* l_Lean_AbstractMetavarContext_hasAssignedLevelMVar___rarg___boxed(lean_object*, lean_object*, lean_object*); +lean_object* lean_array_uset(lean_object*, size_t, lean_object*); +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayed___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Expr_getAppNumArgsAux___main(lean_object*, lean_object*); +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateLevelMVars___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_panicWithPos___at_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_ummapAux___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__4___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_mkAppRev(lean_object*, lean_object*); +uint8_t l_List_foldr___main___at_Lean_AbstractMetavarContext_hasAssignedMVar___main___spec__1___rarg(lean_object*, lean_object*, uint8_t, lean_object*); +lean_object* lean_mk_empty_array_with_capacity(lean_object*); +extern lean_object* l_Id_Monad; +lean_object* l_AssocList_replace___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__8(lean_object*, lean_object*, lean_object*); +lean_object* lean_expr_update_forall(lean_object*, uint8_t, lean_object*, lean_object*); +lean_object* l_panicWithPos___at_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___spec__1(lean_object*); +lean_object* lean_level_update_succ(lean_object*, lean_object*); +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache(lean_object*); +lean_object* l_Lean_AbstractMetavarContext_isLevelAssigned(lean_object*); +uint8_t l_Lean_AbstractMetavarContext_isExprAssigned___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Nat_repr(lean_object*); +uint8_t l_AssocList_contains___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__4(lean_object*, lean_object*); +extern lean_object* l_Lean_Expr_updateForall_x21___closed__1; +extern lean_object* l_panicWithPos___rarg___closed__3; +extern lean_object* l_Lean_Expr_constName___closed__1; +uint8_t lean_expr_eqv(lean_object*, lean_object*); +lean_object* l_List_foldr___main___at_Lean_AbstractMetavarContext_hasAssignedMVar___main___spec__1(lean_object*); +extern lean_object* l_Lean_Expr_updateProj_x21___closed__1; +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_AbstractMetavarContext_hasAssignedLevelMVar___main(lean_object*); +lean_object* l_Lean_LocalContext_findFVar(lean_object*, lean_object*); +lean_object* lean_string_append(lean_object*, lean_object*); +uint8_t l_Lean_AbstractMetavarContext_hasAssignedMVar___main___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux(lean_object*, lean_object*); +uint8_t l_Lean_AbstractMetavarContext_hasAssignedMVar___rarg(lean_object*, lean_object*, lean_object*); +uint8_t lean_nat_dec_lt(lean_object*, lean_object*); +lean_object* lean_expr_update_const(lean_object*, lean_object*); +lean_object* l_Lean_AbstractMetavarContext_instantiateLevelMVars(lean_object*); +lean_object* l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(lean_object*, lean_object*); +uint8_t l_Lean_AbstractMetavarContext_isLevelAssigned___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_AbstractMetavarContext_hasAssignedMVar___rarg___boxed(lean_object*, lean_object*, lean_object*); +lean_object* lean_nat_add(lean_object*, lean_object*); +lean_object* l_List_foldr___main___at_Lean_AbstractMetavarContext_hasAssignedMVar___main___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t lean_nat_dec_eq(lean_object*, lean_object*); +lean_object* lean_array_push(lean_object*, lean_object*); +lean_object* lean_expr_update_proj(lean_object*, lean_object*); +extern lean_object* l_panicWithPos___rarg___closed__1; +lean_object* l_Lean_AbstractMetavarContext_instantiateExprMVars(lean_object*); +lean_object* l_Lean_AbstractMetavarContext_isExprAssigned(lean_object*); +lean_object* lean_expr_update_mdata(lean_object*, lean_object*); +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___rarg___closed__1; +lean_object* l_AssocList_find___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__2(lean_object*, lean_object*); +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_getMCtx___rarg(lean_object*); +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_main(lean_object*); +lean_object* l_Lean_AbstractMetavarContext_instantiateExprMVars___rarg___closed__1; +uint8_t l_Lean_Expr_isMVar(lean_object*); +lean_object* lean_expr_update_lambda(lean_object*, uint8_t, lean_object*, lean_object*); +lean_object* l_Lean_AbstractMetavarContext_instantiateExprMVars___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_AbstractMetavarContext_instantiateLevelMVars___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___boxed(lean_object*, lean_object*); +extern lean_object* l_Lean_Level_updateSucc_x21___closed__1; +lean_object* l_List_mmap___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__3___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_AssocList_find___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__2___boxed(lean_object*, lean_object*); +lean_object* l_mkHashMap___at_Lean_AbstractMetavarContext_instantiateExprMVars___spec__1(lean_object*); +lean_object* lean_expr_abstract_range(lean_object*, lean_object*, lean_object*); +lean_object* l_panic(lean_object*, lean_object*, lean_object*); +uint8_t l_Lean_AbstractMetavarContext_hasAssignedLevelMVar___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_AbstractMetavarContext_instantiateLevelMVars___main___rarg(lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Level_updateIMax_x21___closed__1; +extern lean_object* l_Lean_Expr_updateLambda_x21___closed__1; +uint8_t l_Lean_AbstractMetavarContext_hasAssignedLevelMVar___main___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +size_t lean_usize_modn(size_t, lean_object*); +lean_object* l_Lean_AbstractMetavarContext_hasAssignedMVar___main___rarg___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_List_mmap___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__3(lean_object*); +lean_object* lean_array_get_size(lean_object*); +lean_object* lean_array_fget(lean_object*, lean_object*); +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayed(lean_object*); +lean_object* l_mkHashMapImp___rarg(lean_object*); +lean_object* l_AssocList_mfoldl___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__7(lean_object*, lean_object*); +lean_object* l_HashMapImp_expand___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__5(lean_object*, lean_object*); +uint8_t lean_nat_dec_le(lean_object*, lean_object*); +lean_object* lean_expr_mk_lambda(lean_object*, uint8_t, lean_object*, lean_object*); +extern lean_object* l_panicWithPos___rarg___closed__2; +lean_object* l_panicWithPos___at_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___spec__1___rarg___closed__1; +lean_object* lean_level_update_max(lean_object*, lean_object*, lean_object*); +uint8_t lean_expr_has_expr_mvar(lean_object*); +lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Expr_updateMData_x21___closed__1; +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___rarg(lean_object*, lean_object*, lean_object*); +lean_object* lean_expr_abstract(lean_object*, lean_object*); +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_panicWithPos___at_Lean_Expr_bindingDomain___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_expr_update_sort(lean_object*, lean_object*); +lean_object* l_panicWithPos___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__2(lean_object*); +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main(lean_object*); +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_visit(lean_object*); +lean_object* lean_nat_mul(lean_object*, lean_object*); +lean_object* l_Lean_AbstractMetavarContext_isExprAssigned___rarg___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1___boxed(lean_object*, lean_object*); +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__1(lean_object*); +lean_object* l_panicWithPos___at_Lean_Level_updateSucc_x21___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_expr_update_let(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_panicWithPos___at_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t lean_expr_has_level_mvar(lean_object*); +uint8_t l_Lean_Expr_isLambda(lean_object*); +uint8_t l_Lean_AbstractMetavarContext_isLevelAssigned___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; +x_4 = lean_ctor_get(x_1, 2); +lean_inc(x_4); +lean_dec(x_1); +x_5 = lean_apply_2(x_4, x_2, x_3); +if (lean_obj_tag(x_5) == 0) +{ +uint8_t x_6; +x_6 = 0; +return x_6; +} +else +{ +uint8_t x_7; +lean_dec(x_5); +x_7 = 1; +return x_7; +} +} +} +lean_object* l_Lean_AbstractMetavarContext_isLevelAssigned(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_AbstractMetavarContext_isLevelAssigned___rarg___boxed), 3, 0); +return x_2; +} +} +lean_object* l_Lean_AbstractMetavarContext_isLevelAssigned___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +uint8_t x_4; lean_object* x_5; +x_4 = l_Lean_AbstractMetavarContext_isLevelAssigned___rarg(x_1, x_2, x_3); +x_5 = lean_box(x_4); +return x_5; +} +} +uint8_t l_Lean_AbstractMetavarContext_isExprAssigned___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; +x_4 = lean_ctor_get(x_1, 5); +lean_inc(x_4); +lean_dec(x_1); +x_5 = lean_apply_2(x_4, x_2, x_3); +if (lean_obj_tag(x_5) == 0) +{ +uint8_t x_6; +x_6 = 0; +return x_6; +} +else +{ +uint8_t x_7; +lean_dec(x_5); +x_7 = 1; +return x_7; +} +} +} +lean_object* l_Lean_AbstractMetavarContext_isExprAssigned(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_AbstractMetavarContext_isExprAssigned___rarg___boxed), 3, 0); +return x_2; +} +} +lean_object* l_Lean_AbstractMetavarContext_isExprAssigned___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +uint8_t x_4; lean_object* x_5; +x_4 = l_Lean_AbstractMetavarContext_isExprAssigned___rarg(x_1, x_2, x_3); +x_5 = lean_box(x_4); +return x_5; +} +} +uint8_t l_Lean_AbstractMetavarContext_hasAssignedLevelMVar___main___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +switch (lean_obj_tag(x_3)) { +case 1: +{ +lean_object* x_4; uint8_t x_5; +x_4 = lean_ctor_get(x_3, 0); +lean_inc(x_4); +lean_dec(x_3); +lean_inc(x_4); +x_5 = lean_level_has_mvar(x_4); +if (x_5 == 0) +{ +uint8_t x_6; +lean_dec(x_4); +lean_dec(x_2); +lean_dec(x_1); +x_6 = 0; +return x_6; +} +else +{ +x_3 = x_4; +goto _start; +} +} +case 2: +{ +lean_object* x_8; lean_object* x_9; uint8_t x_10; +x_8 = lean_ctor_get(x_3, 0); +lean_inc(x_8); +x_9 = lean_ctor_get(x_3, 1); +lean_inc(x_9); +lean_dec(x_3); +lean_inc(x_8); +x_10 = lean_level_has_mvar(x_8); +if (x_10 == 0) +{ +uint8_t x_11; +lean_dec(x_8); +lean_inc(x_9); +x_11 = lean_level_has_mvar(x_9); +if (x_11 == 0) +{ +uint8_t x_12; +lean_dec(x_9); +lean_dec(x_2); +lean_dec(x_1); +x_12 = 0; +return x_12; +} +else +{ +x_3 = x_9; +goto _start; +} +} +else +{ +uint8_t x_14; +lean_inc(x_2); +lean_inc(x_1); +x_14 = l_Lean_AbstractMetavarContext_hasAssignedLevelMVar___main___rarg(x_1, x_2, x_8); +if (x_14 == 0) +{ +uint8_t x_15; +lean_inc(x_9); +x_15 = lean_level_has_mvar(x_9); +if (x_15 == 0) +{ +lean_dec(x_9); +lean_dec(x_2); +lean_dec(x_1); +return x_14; +} +else +{ +x_3 = x_9; +goto _start; +} +} +else +{ +uint8_t x_17; +lean_dec(x_9); +lean_dec(x_2); +lean_dec(x_1); +x_17 = 1; +return x_17; +} +} +} +case 3: +{ +lean_object* x_18; lean_object* x_19; uint8_t x_20; +x_18 = lean_ctor_get(x_3, 0); +lean_inc(x_18); +x_19 = lean_ctor_get(x_3, 1); +lean_inc(x_19); +lean_dec(x_3); +lean_inc(x_18); +x_20 = lean_level_has_mvar(x_18); +if (x_20 == 0) +{ +uint8_t x_21; +lean_dec(x_18); +lean_inc(x_19); +x_21 = lean_level_has_mvar(x_19); +if (x_21 == 0) +{ +uint8_t x_22; +lean_dec(x_19); +lean_dec(x_2); +lean_dec(x_1); +x_22 = 0; +return x_22; +} +else +{ +x_3 = x_19; +goto _start; +} +} +else +{ +uint8_t x_24; +lean_inc(x_2); +lean_inc(x_1); +x_24 = l_Lean_AbstractMetavarContext_hasAssignedLevelMVar___main___rarg(x_1, x_2, x_18); +if (x_24 == 0) +{ +uint8_t x_25; +lean_inc(x_19); +x_25 = lean_level_has_mvar(x_19); +if (x_25 == 0) +{ +lean_dec(x_19); +lean_dec(x_2); +lean_dec(x_1); +return x_24; +} +else +{ +x_3 = x_19; +goto _start; +} +} +else +{ +uint8_t x_27; +lean_dec(x_19); +lean_dec(x_2); +lean_dec(x_1); +x_27 = 1; +return x_27; +} +} +} +case 5: +{ +lean_object* x_28; lean_object* x_29; lean_object* x_30; +x_28 = lean_ctor_get(x_3, 0); +lean_inc(x_28); +lean_dec(x_3); +x_29 = lean_ctor_get(x_1, 2); +lean_inc(x_29); +lean_dec(x_1); +x_30 = lean_apply_2(x_29, x_2, x_28); +if (lean_obj_tag(x_30) == 0) +{ +uint8_t x_31; +x_31 = 0; +return x_31; +} +else +{ +uint8_t x_32; +lean_dec(x_30); +x_32 = 1; +return x_32; +} +} +default: +{ +uint8_t x_33; +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_33 = 0; +return x_33; +} +} +} +} +lean_object* l_Lean_AbstractMetavarContext_hasAssignedLevelMVar___main(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_AbstractMetavarContext_hasAssignedLevelMVar___main___rarg___boxed), 3, 0); +return x_2; +} +} +lean_object* l_Lean_AbstractMetavarContext_hasAssignedLevelMVar___main___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +uint8_t x_4; lean_object* x_5; +x_4 = l_Lean_AbstractMetavarContext_hasAssignedLevelMVar___main___rarg(x_1, x_2, x_3); +x_5 = lean_box(x_4); +return x_5; +} +} +uint8_t l_Lean_AbstractMetavarContext_hasAssignedLevelMVar___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +uint8_t x_4; +x_4 = l_Lean_AbstractMetavarContext_hasAssignedLevelMVar___main___rarg(x_1, x_2, x_3); +return x_4; +} +} +lean_object* l_Lean_AbstractMetavarContext_hasAssignedLevelMVar(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_AbstractMetavarContext_hasAssignedLevelMVar___rarg___boxed), 3, 0); +return x_2; +} +} +lean_object* l_Lean_AbstractMetavarContext_hasAssignedLevelMVar___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +uint8_t x_4; lean_object* x_5; +x_4 = l_Lean_AbstractMetavarContext_hasAssignedLevelMVar___rarg(x_1, x_2, x_3); +x_5 = lean_box(x_4); +return x_5; +} +} +uint8_t l_List_foldr___main___at_Lean_AbstractMetavarContext_hasAssignedMVar___main___spec__1___rarg(lean_object* x_1, lean_object* x_2, uint8_t x_3, lean_object* x_4) { +_start: +{ +if (lean_obj_tag(x_4) == 0) +{ +lean_dec(x_2); +lean_dec(x_1); +return x_3; +} +else +{ +lean_object* x_5; lean_object* x_6; uint8_t x_7; uint8_t 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); +lean_inc(x_2); +lean_inc(x_1); +x_7 = l_List_foldr___main___at_Lean_AbstractMetavarContext_hasAssignedMVar___main___spec__1___rarg(x_1, x_2, x_3, x_6); +x_8 = l_Lean_AbstractMetavarContext_hasAssignedLevelMVar___main___rarg(x_1, x_2, x_5); +if (x_8 == 0) +{ +return x_7; +} +else +{ +uint8_t x_9; +x_9 = 1; +return x_9; +} +} +} +} +lean_object* l_List_foldr___main___at_Lean_AbstractMetavarContext_hasAssignedMVar___main___spec__1(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_List_foldr___main___at_Lean_AbstractMetavarContext_hasAssignedMVar___main___spec__1___rarg___boxed), 4, 0); +return x_2; +} +} +uint8_t l_Lean_AbstractMetavarContext_hasAssignedMVar___main___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +switch (lean_obj_tag(x_3)) { +case 2: +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_4 = lean_ctor_get(x_3, 0); +lean_inc(x_4); +lean_dec(x_3); +x_5 = lean_ctor_get(x_1, 5); +lean_inc(x_5); +lean_dec(x_1); +x_6 = lean_apply_2(x_5, x_2, x_4); +if (lean_obj_tag(x_6) == 0) +{ +uint8_t x_7; +x_7 = 0; +return x_7; +} +else +{ +uint8_t x_8; +lean_dec(x_6); +x_8 = 1; +return x_8; +} +} +case 3: +{ +lean_object* x_9; uint8_t x_10; +x_9 = lean_ctor_get(x_3, 0); +lean_inc(x_9); +lean_dec(x_3); +x_10 = l_Lean_AbstractMetavarContext_hasAssignedLevelMVar___main___rarg(x_1, x_2, x_9); +return x_10; +} +case 4: +{ +lean_object* x_11; uint8_t x_12; uint8_t x_13; +x_11 = lean_ctor_get(x_3, 1); +lean_inc(x_11); +lean_dec(x_3); +x_12 = 0; +x_13 = l_List_foldr___main___at_Lean_AbstractMetavarContext_hasAssignedMVar___main___spec__1___rarg(x_1, x_2, x_12, x_11); +return x_13; +} +case 5: +{ +lean_object* x_14; lean_object* x_15; uint8_t x_16; +x_14 = lean_ctor_get(x_3, 0); +lean_inc(x_14); +x_15 = lean_ctor_get(x_3, 1); +lean_inc(x_15); +lean_dec(x_3); +x_16 = lean_expr_has_expr_mvar(x_14); +if (x_16 == 0) +{ +uint8_t x_17; +x_17 = lean_expr_has_level_mvar(x_14); +if (x_17 == 0) +{ +uint8_t x_18; +lean_dec(x_14); +x_18 = lean_expr_has_expr_mvar(x_15); +if (x_18 == 0) +{ +uint8_t x_19; +x_19 = lean_expr_has_level_mvar(x_15); +if (x_19 == 0) +{ +uint8_t x_20; +lean_dec(x_15); +lean_dec(x_2); +lean_dec(x_1); +x_20 = 0; +return x_20; +} +else +{ +x_3 = x_15; +goto _start; +} +} +else +{ +x_3 = x_15; +goto _start; +} +} +else +{ +uint8_t x_23; +lean_inc(x_2); +lean_inc(x_1); +x_23 = l_Lean_AbstractMetavarContext_hasAssignedMVar___main___rarg(x_1, x_2, x_14); +if (x_23 == 0) +{ +uint8_t x_24; +x_24 = lean_expr_has_expr_mvar(x_15); +if (x_24 == 0) +{ +uint8_t x_25; +x_25 = lean_expr_has_level_mvar(x_15); +if (x_25 == 0) +{ +lean_dec(x_15); +lean_dec(x_2); +lean_dec(x_1); +return x_23; +} +else +{ +x_3 = x_15; +goto _start; +} +} +else +{ +x_3 = x_15; +goto _start; +} +} +else +{ +uint8_t x_28; +lean_dec(x_15); +lean_dec(x_2); +lean_dec(x_1); +x_28 = 1; +return x_28; +} +} +} +else +{ +uint8_t x_29; +lean_inc(x_2); +lean_inc(x_1); +x_29 = l_Lean_AbstractMetavarContext_hasAssignedMVar___main___rarg(x_1, x_2, x_14); +if (x_29 == 0) +{ +uint8_t x_30; +x_30 = lean_expr_has_expr_mvar(x_15); +if (x_30 == 0) +{ +uint8_t x_31; +x_31 = lean_expr_has_level_mvar(x_15); +if (x_31 == 0) +{ +lean_dec(x_15); +lean_dec(x_2); +lean_dec(x_1); +return x_29; +} +else +{ +x_3 = x_15; +goto _start; +} +} +else +{ +x_3 = x_15; +goto _start; +} +} +else +{ +uint8_t x_34; +lean_dec(x_15); +lean_dec(x_2); +lean_dec(x_1); +x_34 = 1; +return x_34; +} +} +} +case 6: +{ +lean_object* x_35; lean_object* x_36; uint8_t x_37; +x_35 = lean_ctor_get(x_3, 1); +lean_inc(x_35); +x_36 = lean_ctor_get(x_3, 2); +lean_inc(x_36); +lean_dec(x_3); +x_37 = lean_expr_has_expr_mvar(x_35); +if (x_37 == 0) +{ +uint8_t x_38; +x_38 = lean_expr_has_level_mvar(x_35); +if (x_38 == 0) +{ +uint8_t x_39; +lean_dec(x_35); +x_39 = lean_expr_has_expr_mvar(x_36); +if (x_39 == 0) +{ +uint8_t x_40; +x_40 = lean_expr_has_level_mvar(x_36); +if (x_40 == 0) +{ +uint8_t x_41; +lean_dec(x_36); +lean_dec(x_2); +lean_dec(x_1); +x_41 = 0; +return x_41; +} +else +{ +x_3 = x_36; +goto _start; +} +} +else +{ +x_3 = x_36; +goto _start; +} +} +else +{ +uint8_t x_44; +lean_inc(x_2); +lean_inc(x_1); +x_44 = l_Lean_AbstractMetavarContext_hasAssignedMVar___main___rarg(x_1, x_2, x_35); +if (x_44 == 0) +{ +uint8_t x_45; +x_45 = lean_expr_has_expr_mvar(x_36); +if (x_45 == 0) +{ +uint8_t x_46; +x_46 = lean_expr_has_level_mvar(x_36); +if (x_46 == 0) +{ +lean_dec(x_36); +lean_dec(x_2); +lean_dec(x_1); +return x_44; +} +else +{ +x_3 = x_36; +goto _start; +} +} +else +{ +x_3 = x_36; +goto _start; +} +} +else +{ +uint8_t x_49; +lean_dec(x_36); +lean_dec(x_2); +lean_dec(x_1); +x_49 = 1; +return x_49; +} +} +} +else +{ +uint8_t x_50; +lean_inc(x_2); +lean_inc(x_1); +x_50 = l_Lean_AbstractMetavarContext_hasAssignedMVar___main___rarg(x_1, x_2, x_35); +if (x_50 == 0) +{ +uint8_t x_51; +x_51 = lean_expr_has_expr_mvar(x_36); +if (x_51 == 0) +{ +uint8_t x_52; +x_52 = lean_expr_has_level_mvar(x_36); +if (x_52 == 0) +{ +lean_dec(x_36); +lean_dec(x_2); +lean_dec(x_1); +return x_50; +} +else +{ +x_3 = x_36; +goto _start; +} +} +else +{ +x_3 = x_36; +goto _start; +} +} +else +{ +uint8_t x_55; +lean_dec(x_36); +lean_dec(x_2); +lean_dec(x_1); +x_55 = 1; +return x_55; +} +} +} +case 7: +{ +lean_object* x_56; lean_object* x_57; uint8_t x_58; +x_56 = lean_ctor_get(x_3, 1); +lean_inc(x_56); +x_57 = lean_ctor_get(x_3, 2); +lean_inc(x_57); +lean_dec(x_3); +x_58 = lean_expr_has_expr_mvar(x_56); +if (x_58 == 0) +{ +uint8_t x_59; +x_59 = lean_expr_has_level_mvar(x_56); +if (x_59 == 0) +{ +uint8_t x_60; +lean_dec(x_56); +x_60 = lean_expr_has_expr_mvar(x_57); +if (x_60 == 0) +{ +uint8_t x_61; +x_61 = lean_expr_has_level_mvar(x_57); +if (x_61 == 0) +{ +uint8_t x_62; +lean_dec(x_57); +lean_dec(x_2); +lean_dec(x_1); +x_62 = 0; +return x_62; +} +else +{ +x_3 = x_57; +goto _start; +} +} +else +{ +x_3 = x_57; +goto _start; +} +} +else +{ +uint8_t x_65; +lean_inc(x_2); +lean_inc(x_1); +x_65 = l_Lean_AbstractMetavarContext_hasAssignedMVar___main___rarg(x_1, x_2, x_56); +if (x_65 == 0) +{ +uint8_t x_66; +x_66 = lean_expr_has_expr_mvar(x_57); +if (x_66 == 0) +{ +uint8_t x_67; +x_67 = lean_expr_has_level_mvar(x_57); +if (x_67 == 0) +{ +lean_dec(x_57); +lean_dec(x_2); +lean_dec(x_1); +return x_65; +} +else +{ +x_3 = x_57; +goto _start; +} +} +else +{ +x_3 = x_57; +goto _start; +} +} +else +{ +uint8_t x_70; +lean_dec(x_57); +lean_dec(x_2); +lean_dec(x_1); +x_70 = 1; +return x_70; +} +} +} +else +{ +uint8_t x_71; +lean_inc(x_2); +lean_inc(x_1); +x_71 = l_Lean_AbstractMetavarContext_hasAssignedMVar___main___rarg(x_1, x_2, x_56); +if (x_71 == 0) +{ +uint8_t x_72; +x_72 = lean_expr_has_expr_mvar(x_57); +if (x_72 == 0) +{ +uint8_t x_73; +x_73 = lean_expr_has_level_mvar(x_57); +if (x_73 == 0) +{ +lean_dec(x_57); +lean_dec(x_2); +lean_dec(x_1); +return x_71; +} +else +{ +x_3 = x_57; +goto _start; +} +} +else +{ +x_3 = x_57; +goto _start; +} +} +else +{ +uint8_t x_76; +lean_dec(x_57); +lean_dec(x_2); +lean_dec(x_1); +x_76 = 1; +return x_76; +} +} +} +case 8: +{ +lean_object* x_77; lean_object* x_78; lean_object* x_79; uint8_t x_80; uint8_t x_101; +x_77 = lean_ctor_get(x_3, 1); +lean_inc(x_77); +x_78 = lean_ctor_get(x_3, 2); +lean_inc(x_78); +x_79 = lean_ctor_get(x_3, 3); +lean_inc(x_79); +lean_dec(x_3); +x_101 = lean_expr_has_expr_mvar(x_77); +if (x_101 == 0) +{ +uint8_t x_102; +x_102 = lean_expr_has_level_mvar(x_77); +if (x_102 == 0) +{ +uint8_t x_103; +lean_dec(x_77); +x_103 = 0; +x_80 = x_103; +goto block_100; +} +else +{ +uint8_t x_104; +lean_inc(x_2); +lean_inc(x_1); +x_104 = l_Lean_AbstractMetavarContext_hasAssignedMVar___main___rarg(x_1, x_2, x_77); +if (x_104 == 0) +{ +x_80 = x_104; +goto block_100; +} +else +{ +uint8_t x_105; +lean_dec(x_79); +lean_dec(x_78); +lean_dec(x_2); +lean_dec(x_1); +x_105 = 1; +return x_105; +} +} +} +else +{ +uint8_t x_106; +lean_inc(x_2); +lean_inc(x_1); +x_106 = l_Lean_AbstractMetavarContext_hasAssignedMVar___main___rarg(x_1, x_2, x_77); +if (x_106 == 0) +{ +x_80 = x_106; +goto block_100; +} +else +{ +uint8_t x_107; +lean_dec(x_79); +lean_dec(x_78); +lean_dec(x_2); +lean_dec(x_1); +x_107 = 1; +return x_107; +} +} +block_100: +{ +uint8_t x_81; +x_81 = lean_expr_has_expr_mvar(x_78); +if (x_81 == 0) +{ +uint8_t x_82; +x_82 = lean_expr_has_level_mvar(x_78); +if (x_82 == 0) +{ +lean_dec(x_78); +if (x_80 == 0) +{ +uint8_t x_83; +x_83 = lean_expr_has_expr_mvar(x_79); +if (x_83 == 0) +{ +uint8_t x_84; +x_84 = lean_expr_has_level_mvar(x_79); +if (x_84 == 0) +{ +lean_dec(x_79); +lean_dec(x_2); +lean_dec(x_1); +return x_80; +} +else +{ +x_3 = x_79; +goto _start; +} +} +else +{ +x_3 = x_79; +goto _start; +} +} +else +{ +uint8_t x_87; +lean_dec(x_79); +lean_dec(x_2); +lean_dec(x_1); +x_87 = 1; +return x_87; +} +} +else +{ +uint8_t x_88; +lean_inc(x_2); +lean_inc(x_1); +x_88 = l_Lean_AbstractMetavarContext_hasAssignedMVar___main___rarg(x_1, x_2, x_78); +if (x_88 == 0) +{ +uint8_t x_89; +x_89 = lean_expr_has_expr_mvar(x_79); +if (x_89 == 0) +{ +uint8_t x_90; +x_90 = lean_expr_has_level_mvar(x_79); +if (x_90 == 0) +{ +lean_dec(x_79); +lean_dec(x_2); +lean_dec(x_1); +return x_88; +} +else +{ +x_3 = x_79; +goto _start; +} +} +else +{ +x_3 = x_79; +goto _start; +} +} +else +{ +uint8_t x_93; +lean_dec(x_79); +lean_dec(x_2); +lean_dec(x_1); +x_93 = 1; +return x_93; +} +} +} +else +{ +uint8_t x_94; +lean_inc(x_2); +lean_inc(x_1); +x_94 = l_Lean_AbstractMetavarContext_hasAssignedMVar___main___rarg(x_1, x_2, x_78); +if (x_94 == 0) +{ +uint8_t x_95; +x_95 = lean_expr_has_expr_mvar(x_79); +if (x_95 == 0) +{ +uint8_t x_96; +x_96 = lean_expr_has_level_mvar(x_79); +if (x_96 == 0) +{ +lean_dec(x_79); +lean_dec(x_2); +lean_dec(x_1); +return x_94; +} +else +{ +x_3 = x_79; +goto _start; +} +} +else +{ +x_3 = x_79; +goto _start; +} +} +else +{ +uint8_t x_99; +lean_dec(x_79); +lean_dec(x_2); +lean_dec(x_1); +x_99 = 1; +return x_99; +} +} +} +} +case 10: +{ +lean_object* x_108; uint8_t x_109; +x_108 = lean_ctor_get(x_3, 1); +lean_inc(x_108); +lean_dec(x_3); +x_109 = lean_expr_has_expr_mvar(x_108); +if (x_109 == 0) +{ +uint8_t x_110; +x_110 = lean_expr_has_level_mvar(x_108); +if (x_110 == 0) +{ +uint8_t x_111; +lean_dec(x_108); +lean_dec(x_2); +lean_dec(x_1); +x_111 = 0; +return x_111; +} +else +{ +x_3 = x_108; +goto _start; +} +} +else +{ +x_3 = x_108; +goto _start; +} +} +case 11: +{ +lean_object* x_114; uint8_t x_115; +x_114 = lean_ctor_get(x_3, 2); +lean_inc(x_114); +lean_dec(x_3); +x_115 = lean_expr_has_expr_mvar(x_114); +if (x_115 == 0) +{ +uint8_t x_116; +x_116 = lean_expr_has_level_mvar(x_114); +if (x_116 == 0) +{ +uint8_t x_117; +lean_dec(x_114); +lean_dec(x_2); +lean_dec(x_1); +x_117 = 0; +return x_117; +} +else +{ +x_3 = x_114; +goto _start; +} +} +else +{ +x_3 = x_114; +goto _start; +} +} +default: +{ +uint8_t x_120; +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_120 = 0; +return x_120; +} +} +} +} +lean_object* l_Lean_AbstractMetavarContext_hasAssignedMVar___main(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_AbstractMetavarContext_hasAssignedMVar___main___rarg___boxed), 3, 0); +return x_2; +} +} +lean_object* l_List_foldr___main___at_Lean_AbstractMetavarContext_hasAssignedMVar___main___spec__1___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +uint8_t x_5; uint8_t x_6; lean_object* x_7; +x_5 = lean_unbox(x_3); +lean_dec(x_3); +x_6 = l_List_foldr___main___at_Lean_AbstractMetavarContext_hasAssignedMVar___main___spec__1___rarg(x_1, x_2, x_5, x_4); +x_7 = lean_box(x_6); +return x_7; +} +} +lean_object* l_Lean_AbstractMetavarContext_hasAssignedMVar___main___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +uint8_t x_4; lean_object* x_5; +x_4 = l_Lean_AbstractMetavarContext_hasAssignedMVar___main___rarg(x_1, x_2, x_3); +x_5 = lean_box(x_4); +return x_5; +} +} +uint8_t l_Lean_AbstractMetavarContext_hasAssignedMVar___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +uint8_t x_4; +x_4 = l_Lean_AbstractMetavarContext_hasAssignedMVar___main___rarg(x_1, x_2, x_3); +return x_4; +} +} +lean_object* l_Lean_AbstractMetavarContext_hasAssignedMVar(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_AbstractMetavarContext_hasAssignedMVar___rarg___boxed), 3, 0); +return x_2; +} +} +lean_object* l_Lean_AbstractMetavarContext_hasAssignedMVar___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +uint8_t x_4; lean_object* x_5; +x_4 = l_Lean_AbstractMetavarContext_hasAssignedMVar___rarg(x_1, x_2, x_3); +x_5 = lean_box(x_4); +return x_5; +} +} +lean_object* l_Lean_AbstractMetavarContext_instantiateLevelMVars___main___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +switch (lean_obj_tag(x_2)) { +case 1: +{ +lean_object* x_4; lean_object* x_5; uint8_t x_6; +x_4 = lean_ctor_get(x_2, 0); +lean_inc(x_4); +x_5 = l_Lean_AbstractMetavarContext_instantiateLevelMVars___main___rarg(x_1, x_4, x_3); +x_6 = !lean_is_exclusive(x_5); +if (x_6 == 0) +{ +lean_object* x_7; lean_object* x_8; +x_7 = lean_ctor_get(x_5, 0); +x_8 = lean_level_update_succ(x_2, x_7); +lean_ctor_set(x_5, 0, x_8); +return x_5; +} +else +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_9 = lean_ctor_get(x_5, 0); +x_10 = lean_ctor_get(x_5, 1); +lean_inc(x_10); +lean_inc(x_9); +lean_dec(x_5); +x_11 = lean_level_update_succ(x_2, x_9); +x_12 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_12, 0, x_11); +lean_ctor_set(x_12, 1, x_10); +return x_12; +} +} +case 2: +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; uint8_t x_19; +x_13 = lean_ctor_get(x_2, 0); +lean_inc(x_13); +x_14 = lean_ctor_get(x_2, 1); +lean_inc(x_14); +lean_inc(x_1); +x_15 = l_Lean_AbstractMetavarContext_instantiateLevelMVars___main___rarg(x_1, x_13, x_3); +x_16 = lean_ctor_get(x_15, 0); +lean_inc(x_16); +x_17 = lean_ctor_get(x_15, 1); +lean_inc(x_17); +lean_dec(x_15); +x_18 = l_Lean_AbstractMetavarContext_instantiateLevelMVars___main___rarg(x_1, x_14, x_17); +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_level_update_max(x_2, x_16, x_20); +lean_ctor_set(x_18, 0, x_21); +return x_18; +} +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_level_update_max(x_2, x_16, 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); +return x_25; +} +} +case 3: +{ +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_2, 0); +lean_inc(x_26); +x_27 = lean_ctor_get(x_2, 1); +lean_inc(x_27); +lean_dec(x_2); +lean_inc(x_1); +x_28 = l_Lean_AbstractMetavarContext_instantiateLevelMVars___main___rarg(x_1, x_26, x_3); +x_29 = lean_ctor_get(x_28, 1); +lean_inc(x_29); +lean_dec(x_28); +x_30 = l_Lean_AbstractMetavarContext_instantiateLevelMVars___main___rarg(x_1, x_27, x_29); +x_31 = !lean_is_exclusive(x_30); +if (x_31 == 0) +{ +lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_32 = lean_ctor_get(x_30, 0); +lean_dec(x_32); +x_33 = l_Lean_Level_updateSucc_x21___closed__1; +x_34 = lean_unsigned_to_nat(218u); +x_35 = lean_unsigned_to_nat(17u); +x_36 = l_Lean_Level_updateIMax_x21___closed__1; +x_37 = l_panicWithPos___at_Lean_Level_updateSucc_x21___spec__1(x_33, x_34, x_35, x_36); +lean_ctor_set(x_30, 0, x_37); +return x_30; +} +else +{ +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_38 = lean_ctor_get(x_30, 1); +lean_inc(x_38); +lean_dec(x_30); +x_39 = l_Lean_Level_updateSucc_x21___closed__1; +x_40 = lean_unsigned_to_nat(218u); +x_41 = lean_unsigned_to_nat(17u); +x_42 = l_Lean_Level_updateIMax_x21___closed__1; +x_43 = l_panicWithPos___at_Lean_Level_updateSucc_x21___spec__1(x_39, x_40, x_41, x_42); +x_44 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_44, 0, x_43); +lean_ctor_set(x_44, 1, x_38); +return x_44; +} +} +case 5: +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; +x_45 = lean_ctor_get(x_2, 0); +lean_inc(x_45); +x_46 = lean_ctor_get(x_1, 2); +lean_inc(x_46); +lean_inc(x_45); +lean_inc(x_3); +x_47 = lean_apply_2(x_46, x_3, x_45); +if (lean_obj_tag(x_47) == 0) +{ +lean_object* x_48; +lean_dec(x_45); +lean_dec(x_1); +x_48 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_48, 0, x_2); +lean_ctor_set(x_48, 1, x_3); +return x_48; +} +else +{ +lean_object* x_49; uint8_t x_50; +lean_dec(x_2); +x_49 = lean_ctor_get(x_47, 0); +lean_inc(x_49); +lean_dec(x_47); +lean_inc(x_49); +x_50 = lean_level_has_mvar(x_49); +if (x_50 == 0) +{ +lean_object* x_51; +lean_dec(x_45); +lean_dec(x_1); +x_51 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_51, 0, x_49); +lean_ctor_set(x_51, 1, x_3); +return x_51; +} +else +{ +lean_object* x_52; uint8_t x_53; +lean_inc(x_1); +x_52 = l_Lean_AbstractMetavarContext_instantiateLevelMVars___main___rarg(x_1, x_49, x_3); +x_53 = !lean_is_exclusive(x_52); +if (x_53 == 0) +{ +lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; +x_54 = lean_ctor_get(x_52, 0); +x_55 = lean_ctor_get(x_52, 1); +x_56 = lean_ctor_get(x_1, 3); +lean_inc(x_56); +lean_dec(x_1); +lean_inc(x_54); +x_57 = lean_apply_3(x_56, x_55, x_45, x_54); +lean_ctor_set(x_52, 1, x_57); +return x_52; +} +else +{ +lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; +x_58 = lean_ctor_get(x_52, 0); +x_59 = lean_ctor_get(x_52, 1); +lean_inc(x_59); +lean_inc(x_58); +lean_dec(x_52); +x_60 = lean_ctor_get(x_1, 3); +lean_inc(x_60); +lean_dec(x_1); +lean_inc(x_58); +x_61 = lean_apply_3(x_60, x_59, x_45, x_58); +x_62 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_62, 0, x_58); +lean_ctor_set(x_62, 1, x_61); +return x_62; +} +} +} +} +default: +{ +lean_object* x_63; +lean_dec(x_1); +x_63 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_63, 0, x_2); +lean_ctor_set(x_63, 1, x_3); +return x_63; +} +} +} +} +lean_object* l_Lean_AbstractMetavarContext_instantiateLevelMVars___main(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_AbstractMetavarContext_instantiateLevelMVars___main___rarg), 3, 0); +return x_2; +} +} +lean_object* l_Lean_AbstractMetavarContext_instantiateLevelMVars___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Lean_AbstractMetavarContext_instantiateLevelMVars___main___rarg(x_1, x_2, x_3); +return x_4; +} +} +lean_object* l_Lean_AbstractMetavarContext_instantiateLevelMVars(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_AbstractMetavarContext_instantiateLevelMVars___rarg), 3, 0); +return x_2; +} +} +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateLevelMVars___rarg(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; uint8_t x_7; +x_5 = lean_ctor_get(x_3, 0); +x_6 = l_Lean_AbstractMetavarContext_instantiateLevelMVars___main___rarg(x_1, x_2, x_5); +x_7 = !lean_is_exclusive(x_6); +if (x_7 == 0) +{ +lean_object* x_8; +x_8 = lean_ctor_get(x_6, 1); +lean_ctor_set(x_3, 0, x_8); +lean_ctor_set(x_6, 1, x_3); +return x_6; +} +else +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_9 = lean_ctor_get(x_6, 0); +x_10 = lean_ctor_get(x_6, 1); +lean_inc(x_10); +lean_inc(x_9); +lean_dec(x_6); +lean_ctor_set(x_3, 0, x_10); +x_11 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_11, 0, x_9); +lean_ctor_set(x_11, 1, x_3); +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; lean_object* x_19; +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 = l_Lean_AbstractMetavarContext_instantiateLevelMVars___main___rarg(x_1, x_2, x_12); +x_15 = lean_ctor_get(x_14, 0); +lean_inc(x_15); +x_16 = lean_ctor_get(x_14, 1); +lean_inc(x_16); +if (lean_is_exclusive(x_14)) { + lean_ctor_release(x_14, 0); + lean_ctor_release(x_14, 1); + x_17 = x_14; +} else { + lean_dec_ref(x_14); + x_17 = lean_box(0); +} +x_18 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_18, 0, x_16); +lean_ctor_set(x_18, 1, x_13); +if (lean_is_scalar(x_17)) { + x_19 = lean_alloc_ctor(0, 2, 0); +} else { + x_19 = x_17; +} +lean_ctor_set(x_19, 0, x_15); +lean_ctor_set(x_19, 1, x_18); +return x_19; +} +} +} +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateLevelMVars(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateLevelMVars___rarg), 3, 0); +return x_2; +} +} +lean_object* l_AssocList_find___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__2(lean_object* x_1, lean_object* x_2) { +_start: +{ +if (lean_obj_tag(x_2) == 0) +{ +lean_object* x_3; +x_3 = lean_box(0); +return x_3; +} +else +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; uint8_t x_7; +x_4 = lean_ctor_get(x_2, 0); +x_5 = lean_ctor_get(x_2, 1); +x_6 = lean_ctor_get(x_2, 2); +x_7 = lean_expr_eqv(x_4, x_1); +if (x_7 == 0) +{ +x_2 = x_6; +goto _start; +} +else +{ +lean_object* x_9; +lean_inc(x_5); +x_9 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_9, 0, x_5); +return x_9; +} +} +} +} +lean_object* l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; size_t x_5; size_t x_6; lean_object* x_7; lean_object* x_8; +x_3 = lean_ctor_get(x_1, 1); +x_4 = lean_array_get_size(x_3); +x_5 = lean_expr_hash(x_2); +x_6 = lean_usize_modn(x_5, x_4); +lean_dec(x_4); +x_7 = lean_array_uget(x_3, x_6); +x_8 = l_AssocList_find___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__2(x_2, x_7); +lean_dec(x_7); +return x_8; +} +} +uint8_t l_AssocList_contains___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__4(lean_object* x_1, lean_object* x_2) { +_start: +{ +if (lean_obj_tag(x_2) == 0) +{ +uint8_t x_3; +x_3 = 0; +return x_3; +} +else +{ +lean_object* x_4; lean_object* x_5; uint8_t x_6; +x_4 = lean_ctor_get(x_2, 0); +x_5 = lean_ctor_get(x_2, 2); +x_6 = lean_expr_eqv(x_4, x_1); +if (x_6 == 0) +{ +x_2 = x_5; +goto _start; +} +else +{ +uint8_t x_8; +x_8 = 1; +return x_8; +} +} +} +} +lean_object* l_AssocList_mfoldl___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__7(lean_object* x_1, lean_object* x_2) { +_start: +{ +if (lean_obj_tag(x_2) == 0) +{ +return x_1; +} +else +{ +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; size_t x_7; size_t x_8; lean_object* x_9; lean_object* x_10; +x_4 = lean_ctor_get(x_2, 0); +x_5 = lean_ctor_get(x_2, 2); +x_6 = lean_array_get_size(x_1); +x_7 = lean_expr_hash(x_4); +x_8 = lean_usize_modn(x_7, x_6); +lean_dec(x_6); +x_9 = lean_array_uget(x_1, x_8); +lean_ctor_set(x_2, 2, x_9); +x_10 = lean_array_uset(x_1, x_8, x_2); +x_1 = x_10; +x_2 = x_5; +goto _start; +} +else +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; size_t x_16; size_t x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_12 = lean_ctor_get(x_2, 0); +x_13 = lean_ctor_get(x_2, 1); +x_14 = lean_ctor_get(x_2, 2); +lean_inc(x_14); +lean_inc(x_13); +lean_inc(x_12); +lean_dec(x_2); +x_15 = lean_array_get_size(x_1); +x_16 = lean_expr_hash(x_12); +x_17 = lean_usize_modn(x_16, x_15); +lean_dec(x_15); +x_18 = lean_array_uget(x_1, x_17); +x_19 = lean_alloc_ctor(1, 3, 0); +lean_ctor_set(x_19, 0, x_12); +lean_ctor_set(x_19, 1, x_13); +lean_ctor_set(x_19, 2, x_18); +x_20 = lean_array_uset(x_1, x_17, x_19); +x_1 = x_20; +x_2 = x_14; +goto _start; +} +} +} +} +lean_object* l_HashMapImp_moveEntries___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__6(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; uint8_t x_5; +x_4 = lean_array_get_size(x_2); +x_5 = lean_nat_dec_lt(x_1, x_4); +lean_dec(x_4); +if (x_5 == 0) +{ +lean_dec(x_2); +lean_dec(x_1); +return x_3; +} +else +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_6 = lean_array_fget(x_2, x_1); +x_7 = lean_box(0); +x_8 = lean_array_fset(x_2, x_1, x_7); +x_9 = l_AssocList_mfoldl___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__7(x_3, x_6); +x_10 = lean_unsigned_to_nat(1u); +x_11 = lean_nat_add(x_1, x_10); +lean_dec(x_1); +x_1 = x_11; +x_2 = x_8; +x_3 = x_9; +goto _start; +} +} +} +lean_object* l_HashMapImp_expand___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__5(lean_object* x_1, lean_object* x_2) { +_start: +{ +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; +x_3 = lean_array_get_size(x_2); +x_4 = lean_unsigned_to_nat(2u); +x_5 = lean_nat_mul(x_3, x_4); +lean_dec(x_3); +x_6 = lean_box(0); +x_7 = lean_mk_array(x_5, x_6); +x_8 = lean_unsigned_to_nat(0u); +x_9 = l_HashMapImp_moveEntries___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__6(x_8, x_2, x_7); +x_10 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_10, 0, x_1); +lean_ctor_set(x_10, 1, x_9); +return x_10; +} +} +lean_object* l_AssocList_replace___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__8(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +if (lean_obj_tag(x_3) == 0) +{ +lean_dec(x_2); +lean_dec(x_1); +return x_3; +} +else +{ +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 = lean_ctor_get(x_3, 2); +x_8 = lean_expr_eqv(x_5, x_1); +if (x_8 == 0) +{ +lean_object* x_9; +x_9 = l_AssocList_replace___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__8(x_1, x_2, x_7); +lean_ctor_set(x_3, 2, x_9); +return x_3; +} +else +{ +lean_dec(x_6); +lean_dec(x_5); +lean_ctor_set(x_3, 1, x_2); +lean_ctor_set(x_3, 0, x_1); +return x_3; +} +} +else +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; +x_10 = lean_ctor_get(x_3, 0); +x_11 = lean_ctor_get(x_3, 1); +x_12 = lean_ctor_get(x_3, 2); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_dec(x_3); +x_13 = lean_expr_eqv(x_10, x_1); +if (x_13 == 0) +{ +lean_object* x_14; lean_object* x_15; +x_14 = l_AssocList_replace___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__8(x_1, x_2, x_12); +x_15 = lean_alloc_ctor(1, 3, 0); +lean_ctor_set(x_15, 0, x_10); +lean_ctor_set(x_15, 1, x_11); +lean_ctor_set(x_15, 2, x_14); +return x_15; +} +else +{ +lean_object* x_16; +lean_dec(x_11); +lean_dec(x_10); +x_16 = lean_alloc_ctor(1, 3, 0); +lean_ctor_set(x_16, 0, x_1); +lean_ctor_set(x_16, 1, x_2); +lean_ctor_set(x_16, 2, x_12); +return x_16; +} +} +} +} +} +lean_object* l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +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; size_t x_8; size_t x_9; lean_object* x_10; uint8_t x_11; +x_5 = lean_ctor_get(x_1, 0); +x_6 = lean_ctor_get(x_1, 1); +x_7 = lean_array_get_size(x_6); +x_8 = lean_expr_hash(x_2); +x_9 = lean_usize_modn(x_8, x_7); +x_10 = lean_array_uget(x_6, x_9); +x_11 = l_AssocList_contains___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__4(x_2, x_10); +if (x_11 == 0) +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; +x_12 = lean_unsigned_to_nat(1u); +x_13 = lean_nat_add(x_5, x_12); +lean_dec(x_5); +x_14 = lean_alloc_ctor(1, 3, 0); +lean_ctor_set(x_14, 0, x_2); +lean_ctor_set(x_14, 1, x_3); +lean_ctor_set(x_14, 2, x_10); +x_15 = lean_array_uset(x_6, x_9, x_14); +x_16 = lean_nat_dec_le(x_13, x_7); +lean_dec(x_7); +if (x_16 == 0) +{ +lean_object* x_17; +lean_free_object(x_1); +x_17 = l_HashMapImp_expand___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__5(x_13, x_15); +return x_17; +} +else +{ +lean_ctor_set(x_1, 1, x_15); +lean_ctor_set(x_1, 0, x_13); +return x_1; +} +} +else +{ +lean_object* x_18; lean_object* x_19; +lean_dec(x_7); +x_18 = l_AssocList_replace___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__8(x_2, x_3, x_10); +x_19 = lean_array_uset(x_6, x_9, x_18); +lean_ctor_set(x_1, 1, x_19); +return x_1; +} +} +else +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; size_t x_23; size_t x_24; lean_object* x_25; uint8_t x_26; +x_20 = lean_ctor_get(x_1, 0); +x_21 = lean_ctor_get(x_1, 1); +lean_inc(x_21); +lean_inc(x_20); +lean_dec(x_1); +x_22 = lean_array_get_size(x_21); +x_23 = lean_expr_hash(x_2); +x_24 = lean_usize_modn(x_23, x_22); +x_25 = lean_array_uget(x_21, x_24); +x_26 = l_AssocList_contains___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__4(x_2, x_25); +if (x_26 == 0) +{ +lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; uint8_t x_31; +x_27 = lean_unsigned_to_nat(1u); +x_28 = lean_nat_add(x_20, x_27); +lean_dec(x_20); +x_29 = lean_alloc_ctor(1, 3, 0); +lean_ctor_set(x_29, 0, x_2); +lean_ctor_set(x_29, 1, x_3); +lean_ctor_set(x_29, 2, x_25); +x_30 = lean_array_uset(x_21, x_24, x_29); +x_31 = lean_nat_dec_le(x_28, x_22); +lean_dec(x_22); +if (x_31 == 0) +{ +lean_object* x_32; +x_32 = l_HashMapImp_expand___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__5(x_28, x_30); +return x_32; +} +else +{ +lean_object* x_33; +x_33 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_33, 0, x_28); +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_dec(x_22); +x_34 = l_AssocList_replace___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__8(x_2, x_3, x_25); +x_35 = lean_array_uset(x_21, x_24, x_34); +x_36 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_36, 0, x_20); +lean_ctor_set(x_36, 1, x_35); +return x_36; +} +} +} +} +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; +x_4 = lean_ctor_get(x_3, 1); +lean_inc(x_4); +x_5 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_4, x_1); +lean_dec(x_4); +if (lean_obj_tag(x_5) == 0) +{ +lean_object* x_6; uint8_t x_7; +lean_inc(x_1); +x_6 = lean_apply_2(x_2, x_1, x_3); +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, 1); +x_9 = !lean_is_exclusive(x_8); +if (x_9 == 0) +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_10 = lean_ctor_get(x_6, 0); +x_11 = lean_ctor_get(x_8, 1); +lean_inc(x_10); +x_12 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_11, x_1, x_10); +lean_ctor_set(x_8, 1, x_12); +return x_6; +} +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_6, 0); +x_14 = lean_ctor_get(x_8, 0); +x_15 = lean_ctor_get(x_8, 1); +lean_inc(x_15); +lean_inc(x_14); +lean_dec(x_8); +lean_inc(x_13); +x_16 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_15, x_1, x_13); +x_17 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_17, 0, x_14); +lean_ctor_set(x_17, 1, x_16); +lean_ctor_set(x_6, 1, 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; +x_18 = lean_ctor_get(x_6, 1); +x_19 = lean_ctor_get(x_6, 0); +lean_inc(x_18); +lean_inc(x_19); +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); +if (lean_is_exclusive(x_18)) { + lean_ctor_release(x_18, 0); + lean_ctor_release(x_18, 1); + x_22 = x_18; +} else { + lean_dec_ref(x_18); + x_22 = lean_box(0); +} +lean_inc(x_19); +x_23 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_21, x_1, x_19); +if (lean_is_scalar(x_22)) { + x_24 = lean_alloc_ctor(0, 2, 0); +} else { + x_24 = x_22; +} +lean_ctor_set(x_24, 0, x_20); +lean_ctor_set(x_24, 1, x_23); +x_25 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_25, 0, x_19); +lean_ctor_set(x_25, 1, x_24); +return x_25; +} +} +else +{ +lean_object* x_26; lean_object* x_27; +lean_dec(x_2); +lean_dec(x_1); +x_26 = lean_ctor_get(x_5, 0); +lean_inc(x_26); +lean_dec(x_5); +x_27 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_27, 0, x_26); +lean_ctor_set(x_27, 1, x_3); +return x_27; +} +} +} +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___rarg), 3, 0); +return x_2; +} +} +lean_object* l_AssocList_find___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__2___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_AssocList_find___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__2(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); +return x_3; +} +} +lean_object* l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); +return x_3; +} +} +lean_object* l_AssocList_contains___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__4___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +uint8_t x_3; lean_object* x_4; +x_3 = l_AssocList_contains___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__4(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); +x_4 = lean_box(x_3); +return x_4; +} +} +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_visit___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +uint8_t x_4; +x_4 = lean_expr_has_expr_mvar(x_2); +if (x_4 == 0) +{ +uint8_t x_5; +x_5 = lean_expr_has_level_mvar(x_2); +if (x_5 == 0) +{ +lean_object* x_6; +lean_dec(x_1); +x_6 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_6, 0, x_2); +lean_ctor_set(x_6, 1, x_3); +return x_6; +} +else +{ +lean_object* x_7; lean_object* x_8; +x_7 = lean_ctor_get(x_3, 1); +lean_inc(x_7); +x_8 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_7, x_2); +lean_dec(x_7); +if (lean_obj_tag(x_8) == 0) +{ +lean_object* x_9; uint8_t x_10; +lean_inc(x_2); +x_9 = lean_apply_2(x_1, x_2, x_3); +x_10 = !lean_is_exclusive(x_9); +if (x_10 == 0) +{ +lean_object* x_11; uint8_t x_12; +x_11 = lean_ctor_get(x_9, 1); +x_12 = !lean_is_exclusive(x_11); +if (x_12 == 0) +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; +x_13 = lean_ctor_get(x_9, 0); +x_14 = lean_ctor_get(x_11, 1); +lean_inc(x_13); +x_15 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_14, x_2, x_13); +lean_ctor_set(x_11, 1, x_15); +return x_9; +} +else +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_16 = lean_ctor_get(x_9, 0); +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); +lean_inc(x_16); +x_19 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_18, x_2, x_16); +x_20 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_20, 0, x_17); +lean_ctor_set(x_20, 1, x_19); +lean_ctor_set(x_9, 1, x_20); +return x_9; +} +} +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; lean_object* x_28; +x_21 = lean_ctor_get(x_9, 1); +x_22 = lean_ctor_get(x_9, 0); +lean_inc(x_21); +lean_inc(x_22); +lean_dec(x_9); +x_23 = lean_ctor_get(x_21, 0); +lean_inc(x_23); +x_24 = lean_ctor_get(x_21, 1); +lean_inc(x_24); +if (lean_is_exclusive(x_21)) { + lean_ctor_release(x_21, 0); + lean_ctor_release(x_21, 1); + x_25 = x_21; +} else { + lean_dec_ref(x_21); + x_25 = lean_box(0); +} +lean_inc(x_22); +x_26 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_24, x_2, x_22); +if (lean_is_scalar(x_25)) { + x_27 = lean_alloc_ctor(0, 2, 0); +} else { + x_27 = x_25; +} +lean_ctor_set(x_27, 0, x_23); +lean_ctor_set(x_27, 1, x_26); +x_28 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_28, 0, x_22); +lean_ctor_set(x_28, 1, x_27); +return x_28; +} +} +else +{ +lean_object* x_29; lean_object* x_30; +lean_dec(x_2); +lean_dec(x_1); +x_29 = lean_ctor_get(x_8, 0); +lean_inc(x_29); +lean_dec(x_8); +x_30 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_30, 0, x_29); +lean_ctor_set(x_30, 1, x_3); +return x_30; +} +} +} +else +{ +lean_object* x_31; lean_object* x_32; +x_31 = lean_ctor_get(x_3, 1); +lean_inc(x_31); +x_32 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_31, x_2); +lean_dec(x_31); +if (lean_obj_tag(x_32) == 0) +{ +lean_object* x_33; uint8_t x_34; +lean_inc(x_2); +x_33 = lean_apply_2(x_1, x_2, x_3); +x_34 = !lean_is_exclusive(x_33); +if (x_34 == 0) +{ +lean_object* x_35; uint8_t x_36; +x_35 = lean_ctor_get(x_33, 1); +x_36 = !lean_is_exclusive(x_35); +if (x_36 == 0) +{ +lean_object* x_37; lean_object* x_38; lean_object* x_39; +x_37 = lean_ctor_get(x_33, 0); +x_38 = lean_ctor_get(x_35, 1); +lean_inc(x_37); +x_39 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_38, x_2, x_37); +lean_ctor_set(x_35, 1, x_39); +return x_33; +} +else +{ +lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; +x_40 = lean_ctor_get(x_33, 0); +x_41 = lean_ctor_get(x_35, 0); +x_42 = lean_ctor_get(x_35, 1); +lean_inc(x_42); +lean_inc(x_41); +lean_dec(x_35); +lean_inc(x_40); +x_43 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_42, x_2, x_40); +x_44 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_44, 0, x_41); +lean_ctor_set(x_44, 1, x_43); +lean_ctor_set(x_33, 1, x_44); +return x_33; +} +} +else +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; +x_45 = lean_ctor_get(x_33, 1); +x_46 = lean_ctor_get(x_33, 0); +lean_inc(x_45); +lean_inc(x_46); +lean_dec(x_33); +x_47 = lean_ctor_get(x_45, 0); +lean_inc(x_47); +x_48 = lean_ctor_get(x_45, 1); +lean_inc(x_48); +if (lean_is_exclusive(x_45)) { + lean_ctor_release(x_45, 0); + lean_ctor_release(x_45, 1); + x_49 = x_45; +} else { + lean_dec_ref(x_45); + x_49 = lean_box(0); +} +lean_inc(x_46); +x_50 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_48, x_2, x_46); +if (lean_is_scalar(x_49)) { + x_51 = lean_alloc_ctor(0, 2, 0); +} else { + x_51 = x_49; +} +lean_ctor_set(x_51, 0, x_47); +lean_ctor_set(x_51, 1, x_50); +x_52 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_52, 0, x_46); +lean_ctor_set(x_52, 1, x_51); +return x_52; +} +} +else +{ +lean_object* x_53; lean_object* x_54; +lean_dec(x_2); +lean_dec(x_1); +x_53 = lean_ctor_get(x_32, 0); +lean_inc(x_53); +lean_dec(x_32); +x_54 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_54, 0, x_53); +lean_ctor_set(x_54, 1, x_3); +return x_54; +} +} +} +} +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_visit(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_AbstractMetavarContext_InstantiateExprMVars_visit___rarg), 3, 0); +return x_2; +} +} +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_getMCtx___rarg(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; +x_2 = lean_ctor_get(x_1, 0); +lean_inc(x_2); +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_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_getMCtx(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_AbstractMetavarContext_InstantiateExprMVars_getMCtx___rarg), 1, 0); +return x_2; +} +} +lean_object* _init_l_panicWithPos___at_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___spec__1___rarg___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Id_Monad; +x_2 = l_StateT_Monad___rarg(x_1); +return x_2; +} +} +lean_object* _init_l_panicWithPos___at_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___spec__1___rarg___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_panicWithPos___at_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___spec__1___rarg___closed__1; +x_3 = l_monadInhabited___rarg(x_2, x_1); +return x_3; +} +} +lean_object* l_panicWithPos___at_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___spec__1___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_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; +x_6 = l_panicWithPos___rarg___closed__1; +x_7 = lean_string_append(x_6, x_1); +x_8 = l_panicWithPos___rarg___closed__2; +x_9 = lean_string_append(x_7, x_8); +x_10 = l_Nat_repr(x_2); +x_11 = lean_string_append(x_9, x_10); +lean_dec(x_10); +x_12 = l_panicWithPos___rarg___closed__2; +x_13 = lean_string_append(x_11, x_12); +x_14 = l_Nat_repr(x_3); +x_15 = lean_string_append(x_13, x_14); +lean_dec(x_14); +x_16 = l_panicWithPos___rarg___closed__3; +x_17 = lean_string_append(x_15, x_16); +x_18 = lean_string_append(x_17, x_4); +x_19 = l_panicWithPos___at_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___spec__1___rarg___closed__2; +x_20 = lean_panic_fn(x_18); +x_21 = lean_apply_1(x_20, x_5); +return x_21; +} +} +lean_object* l_panicWithPos___at_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___spec__1(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_panicWithPos___at_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___spec__1___rarg___boxed), 5, 0); +return x_2; +} +} +lean_object* _init_l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___rarg___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("Init.Lean.AbstractMetavarContext"); +return x_1; +} +} +lean_object* _init_l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___rarg___closed__2() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("unknown local declaration"); +return x_1; +} +} +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___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: +{ +lean_object* x_7; uint8_t x_8; +x_7 = lean_unsigned_to_nat(0u); +x_8 = lean_nat_dec_eq(x_4, 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; +x_9 = lean_unsigned_to_nat(1u); +x_10 = lean_nat_sub(x_4, x_9); +lean_dec(x_4); +x_11 = l_Lean_exprIsInhabited; +x_12 = lean_array_get(x_11, x_3, x_10); +lean_inc(x_2); +x_13 = l_Lean_LocalContext_findFVar(x_2, x_12); +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; +lean_dec(x_10); +lean_dec(x_5); +lean_dec(x_2); +lean_dec(x_1); +x_14 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___rarg___closed__1; +x_15 = lean_unsigned_to_nat(134u); +x_16 = lean_unsigned_to_nat(12u); +x_17 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___rarg___closed__2; +x_18 = l_panicWithPos___at_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___spec__1___rarg(x_14, x_15, x_16, x_17, x_6); +return x_18; +} +else +{ +lean_object* x_19; +x_19 = lean_ctor_get(x_13, 0); +lean_inc(x_19); +lean_dec(x_13); +if (lean_obj_tag(x_19) == 0) +{ +lean_object* x_20; lean_object* x_21; uint8_t x_22; lean_object* x_23; lean_object* x_24; uint8_t x_35; +x_20 = lean_ctor_get(x_19, 2); +lean_inc(x_20); +x_21 = lean_ctor_get(x_19, 3); +lean_inc(x_21); +x_22 = lean_ctor_get_uint8(x_19, sizeof(void*)*4); +lean_dec(x_19); +x_35 = lean_expr_has_expr_mvar(x_21); +if (x_35 == 0) +{ +uint8_t x_36; +x_36 = lean_expr_has_level_mvar(x_21); +if (x_36 == 0) +{ +x_23 = x_21; +x_24 = x_6; +goto block_34; +} +else +{ +lean_object* x_37; lean_object* x_38; +x_37 = lean_ctor_get(x_6, 1); +lean_inc(x_37); +x_38 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_37, x_21); +lean_dec(x_37); +if (lean_obj_tag(x_38) == 0) +{ +lean_object* x_39; lean_object* x_40; lean_object* x_41; uint8_t x_42; +lean_inc(x_1); +lean_inc(x_21); +x_39 = lean_apply_2(x_1, x_21, x_6); +x_40 = lean_ctor_get(x_39, 1); +lean_inc(x_40); +x_41 = lean_ctor_get(x_39, 0); +lean_inc(x_41); +lean_dec(x_39); +x_42 = !lean_is_exclusive(x_40); +if (x_42 == 0) +{ +lean_object* x_43; lean_object* x_44; +x_43 = lean_ctor_get(x_40, 1); +lean_inc(x_41); +x_44 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_43, x_21, x_41); +lean_ctor_set(x_40, 1, x_44); +x_23 = x_41; +x_24 = x_40; +goto block_34; +} +else +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; +x_45 = lean_ctor_get(x_40, 0); +x_46 = lean_ctor_get(x_40, 1); +lean_inc(x_46); +lean_inc(x_45); +lean_dec(x_40); +lean_inc(x_41); +x_47 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_46, x_21, x_41); +x_48 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_48, 0, x_45); +lean_ctor_set(x_48, 1, x_47); +x_23 = x_41; +x_24 = x_48; +goto block_34; +} +} +else +{ +lean_object* x_49; +lean_dec(x_21); +x_49 = lean_ctor_get(x_38, 0); +lean_inc(x_49); +lean_dec(x_38); +x_23 = x_49; +x_24 = x_6; +goto block_34; +} +} +} +else +{ +lean_object* x_50; lean_object* x_51; +x_50 = lean_ctor_get(x_6, 1); +lean_inc(x_50); +x_51 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_50, x_21); +lean_dec(x_50); +if (lean_obj_tag(x_51) == 0) +{ +lean_object* x_52; lean_object* x_53; lean_object* x_54; uint8_t x_55; +lean_inc(x_1); +lean_inc(x_21); +x_52 = lean_apply_2(x_1, x_21, x_6); +x_53 = lean_ctor_get(x_52, 1); +lean_inc(x_53); +x_54 = lean_ctor_get(x_52, 0); +lean_inc(x_54); +lean_dec(x_52); +x_55 = !lean_is_exclusive(x_53); +if (x_55 == 0) +{ +lean_object* x_56; lean_object* x_57; +x_56 = lean_ctor_get(x_53, 1); +lean_inc(x_54); +x_57 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_56, x_21, x_54); +lean_ctor_set(x_53, 1, x_57); +x_23 = x_54; +x_24 = x_53; +goto block_34; +} +else +{ +lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; +x_58 = lean_ctor_get(x_53, 0); +x_59 = lean_ctor_get(x_53, 1); +lean_inc(x_59); +lean_inc(x_58); +lean_dec(x_53); +lean_inc(x_54); +x_60 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_59, x_21, x_54); +x_61 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_61, 0, x_58); +lean_ctor_set(x_61, 1, x_60); +x_23 = x_54; +x_24 = x_61; +goto block_34; +} +} +else +{ +lean_object* x_62; +lean_dec(x_21); +x_62 = lean_ctor_get(x_51, 0); +lean_inc(x_62); +lean_dec(x_51); +x_23 = x_62; +x_24 = x_6; +goto block_34; +} +} +block_34: +{ +uint8_t x_25; +x_25 = lean_expr_has_expr_mvar(x_23); +if (x_25 == 0) +{ +uint8_t x_26; +x_26 = lean_expr_has_level_mvar(x_23); +if (x_26 == 0) +{ +lean_object* x_27; lean_object* x_28; +x_27 = lean_expr_abstract_range(x_23, x_10, x_3); +lean_dec(x_23); +x_28 = lean_expr_mk_lambda(x_20, x_22, x_27, x_5); +x_4 = x_10; +x_5 = x_28; +x_6 = x_24; +goto _start; +} +else +{ +lean_object* x_30; lean_object* x_31; +lean_dec(x_23); +lean_dec(x_20); +lean_dec(x_10); +lean_dec(x_5); +lean_dec(x_2); +lean_dec(x_1); +x_30 = lean_box(0); +x_31 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_31, 0, x_30); +lean_ctor_set(x_31, 1, x_24); +return x_31; +} +} +else +{ +lean_object* x_32; lean_object* x_33; +lean_dec(x_23); +lean_dec(x_20); +lean_dec(x_10); +lean_dec(x_5); +lean_dec(x_2); +lean_dec(x_1); +x_32 = lean_box(0); +x_33 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_33, 0, x_32); +lean_ctor_set(x_33, 1, x_24); +return x_33; +} +} +} +else +{ +lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; uint8_t x_116; +x_63 = lean_ctor_get(x_19, 2); +lean_inc(x_63); +x_64 = lean_ctor_get(x_19, 3); +lean_inc(x_64); +x_65 = lean_ctor_get(x_19, 4); +lean_inc(x_65); +lean_dec(x_19); +x_116 = lean_expr_has_expr_mvar(x_64); +if (x_116 == 0) +{ +uint8_t x_117; +x_117 = lean_expr_has_level_mvar(x_64); +if (x_117 == 0) +{ +x_66 = x_64; +x_67 = x_6; +goto block_115; +} +else +{ +lean_object* x_118; lean_object* x_119; +x_118 = lean_ctor_get(x_6, 1); +lean_inc(x_118); +x_119 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_118, x_64); +lean_dec(x_118); +if (lean_obj_tag(x_119) == 0) +{ +lean_object* x_120; lean_object* x_121; lean_object* x_122; uint8_t x_123; +lean_inc(x_1); +lean_inc(x_64); +x_120 = lean_apply_2(x_1, x_64, x_6); +x_121 = lean_ctor_get(x_120, 1); +lean_inc(x_121); +x_122 = lean_ctor_get(x_120, 0); +lean_inc(x_122); +lean_dec(x_120); +x_123 = !lean_is_exclusive(x_121); +if (x_123 == 0) +{ +lean_object* x_124; lean_object* x_125; +x_124 = lean_ctor_get(x_121, 1); +lean_inc(x_122); +x_125 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_124, x_64, x_122); +lean_ctor_set(x_121, 1, x_125); +x_66 = x_122; +x_67 = x_121; +goto block_115; +} +else +{ +lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; +x_126 = lean_ctor_get(x_121, 0); +x_127 = lean_ctor_get(x_121, 1); +lean_inc(x_127); +lean_inc(x_126); +lean_dec(x_121); +lean_inc(x_122); +x_128 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_127, x_64, x_122); +x_129 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_129, 0, x_126); +lean_ctor_set(x_129, 1, x_128); +x_66 = x_122; +x_67 = x_129; +goto block_115; +} +} +else +{ +lean_object* x_130; +lean_dec(x_64); +x_130 = lean_ctor_get(x_119, 0); +lean_inc(x_130); +lean_dec(x_119); +x_66 = x_130; +x_67 = x_6; +goto block_115; +} +} +} +else +{ +lean_object* x_131; lean_object* x_132; +x_131 = lean_ctor_get(x_6, 1); +lean_inc(x_131); +x_132 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_131, x_64); +lean_dec(x_131); +if (lean_obj_tag(x_132) == 0) +{ +lean_object* x_133; lean_object* x_134; lean_object* x_135; uint8_t x_136; +lean_inc(x_1); +lean_inc(x_64); +x_133 = lean_apply_2(x_1, x_64, x_6); +x_134 = lean_ctor_get(x_133, 1); +lean_inc(x_134); +x_135 = lean_ctor_get(x_133, 0); +lean_inc(x_135); +lean_dec(x_133); +x_136 = !lean_is_exclusive(x_134); +if (x_136 == 0) +{ +lean_object* x_137; lean_object* x_138; +x_137 = lean_ctor_get(x_134, 1); +lean_inc(x_135); +x_138 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_137, x_64, x_135); +lean_ctor_set(x_134, 1, x_138); +x_66 = x_135; +x_67 = x_134; +goto block_115; +} +else +{ +lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; +x_139 = lean_ctor_get(x_134, 0); +x_140 = lean_ctor_get(x_134, 1); +lean_inc(x_140); +lean_inc(x_139); +lean_dec(x_134); +lean_inc(x_135); +x_141 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_140, x_64, x_135); +x_142 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_142, 0, x_139); +lean_ctor_set(x_142, 1, x_141); +x_66 = x_135; +x_67 = x_142; +goto block_115; +} +} +else +{ +lean_object* x_143; +lean_dec(x_64); +x_143 = lean_ctor_get(x_132, 0); +lean_inc(x_143); +lean_dec(x_132); +x_66 = x_143; +x_67 = x_6; +goto block_115; +} +} +block_115: +{ +lean_object* x_68; lean_object* x_69; uint8_t x_81; +x_81 = lean_expr_has_expr_mvar(x_66); +if (x_81 == 0) +{ +uint8_t x_82; +x_82 = lean_expr_has_level_mvar(x_66); +if (x_82 == 0) +{ +uint8_t x_83; +x_83 = lean_expr_has_expr_mvar(x_65); +if (x_83 == 0) +{ +uint8_t x_84; +x_84 = lean_expr_has_level_mvar(x_65); +if (x_84 == 0) +{ +x_68 = x_65; +x_69 = x_67; +goto block_80; +} +else +{ +lean_object* x_85; lean_object* x_86; +x_85 = lean_ctor_get(x_67, 1); +lean_inc(x_85); +x_86 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_85, x_65); +lean_dec(x_85); +if (lean_obj_tag(x_86) == 0) +{ +lean_object* x_87; lean_object* x_88; lean_object* x_89; uint8_t x_90; +lean_inc(x_1); +lean_inc(x_65); +x_87 = lean_apply_2(x_1, x_65, x_67); +x_88 = lean_ctor_get(x_87, 1); +lean_inc(x_88); +x_89 = lean_ctor_get(x_87, 0); +lean_inc(x_89); +lean_dec(x_87); +x_90 = !lean_is_exclusive(x_88); +if (x_90 == 0) +{ +lean_object* x_91; lean_object* x_92; +x_91 = lean_ctor_get(x_88, 1); +lean_inc(x_89); +x_92 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_91, x_65, x_89); +lean_ctor_set(x_88, 1, x_92); +x_68 = x_89; +x_69 = x_88; +goto block_80; +} +else +{ +lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; +x_93 = lean_ctor_get(x_88, 0); +x_94 = lean_ctor_get(x_88, 1); +lean_inc(x_94); +lean_inc(x_93); +lean_dec(x_88); +lean_inc(x_89); +x_95 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_94, x_65, x_89); +x_96 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_96, 0, x_93); +lean_ctor_set(x_96, 1, x_95); +x_68 = x_89; +x_69 = x_96; +goto block_80; +} +} +else +{ +lean_object* x_97; +lean_dec(x_65); +x_97 = lean_ctor_get(x_86, 0); +lean_inc(x_97); +lean_dec(x_86); +x_68 = x_97; +x_69 = x_67; +goto block_80; +} +} +} +else +{ +lean_object* x_98; lean_object* x_99; +x_98 = lean_ctor_get(x_67, 1); +lean_inc(x_98); +x_99 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_98, x_65); +lean_dec(x_98); +if (lean_obj_tag(x_99) == 0) +{ +lean_object* x_100; lean_object* x_101; lean_object* x_102; uint8_t x_103; +lean_inc(x_1); +lean_inc(x_65); +x_100 = lean_apply_2(x_1, x_65, x_67); +x_101 = lean_ctor_get(x_100, 1); +lean_inc(x_101); +x_102 = lean_ctor_get(x_100, 0); +lean_inc(x_102); +lean_dec(x_100); +x_103 = !lean_is_exclusive(x_101); +if (x_103 == 0) +{ +lean_object* x_104; lean_object* x_105; +x_104 = lean_ctor_get(x_101, 1); +lean_inc(x_102); +x_105 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_104, x_65, x_102); +lean_ctor_set(x_101, 1, x_105); +x_68 = x_102; +x_69 = x_101; +goto block_80; +} +else +{ +lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; +x_106 = lean_ctor_get(x_101, 0); +x_107 = lean_ctor_get(x_101, 1); +lean_inc(x_107); +lean_inc(x_106); +lean_dec(x_101); +lean_inc(x_102); +x_108 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_107, x_65, x_102); +x_109 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_109, 0, x_106); +lean_ctor_set(x_109, 1, x_108); +x_68 = x_102; +x_69 = x_109; +goto block_80; +} +} +else +{ +lean_object* x_110; +lean_dec(x_65); +x_110 = lean_ctor_get(x_99, 0); +lean_inc(x_110); +lean_dec(x_99); +x_68 = x_110; +x_69 = x_67; +goto block_80; +} +} +} +else +{ +lean_object* x_111; lean_object* x_112; +lean_dec(x_66); +lean_dec(x_65); +lean_dec(x_63); +lean_dec(x_10); +lean_dec(x_5); +lean_dec(x_2); +lean_dec(x_1); +x_111 = lean_box(0); +x_112 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_112, 0, x_111); +lean_ctor_set(x_112, 1, x_67); +return x_112; +} +} +else +{ +lean_object* x_113; lean_object* x_114; +lean_dec(x_66); +lean_dec(x_65); +lean_dec(x_63); +lean_dec(x_10); +lean_dec(x_5); +lean_dec(x_2); +lean_dec(x_1); +x_113 = lean_box(0); +x_114 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_114, 0, x_113); +lean_ctor_set(x_114, 1, x_67); +return x_114; +} +block_80: +{ +uint8_t x_70; +x_70 = lean_expr_has_expr_mvar(x_68); +if (x_70 == 0) +{ +uint8_t x_71; +x_71 = lean_expr_has_level_mvar(x_68); +if (x_71 == 0) +{ +lean_object* x_72; lean_object* x_73; lean_object* x_74; +x_72 = lean_expr_abstract_range(x_66, x_10, x_3); +lean_dec(x_66); +x_73 = lean_expr_abstract_range(x_68, x_10, x_3); +lean_dec(x_68); +x_74 = lean_expr_mk_let(x_63, x_72, x_73, x_5); +x_4 = x_10; +x_5 = x_74; +x_6 = x_69; +goto _start; +} +else +{ +lean_object* x_76; lean_object* x_77; +lean_dec(x_68); +lean_dec(x_66); +lean_dec(x_63); +lean_dec(x_10); +lean_dec(x_5); +lean_dec(x_2); +lean_dec(x_1); +x_76 = lean_box(0); +x_77 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_77, 0, x_76); +lean_ctor_set(x_77, 1, x_69); +return x_77; +} +} +else +{ +lean_object* x_78; lean_object* x_79; +lean_dec(x_68); +lean_dec(x_66); +lean_dec(x_63); +lean_dec(x_10); +lean_dec(x_5); +lean_dec(x_2); +lean_dec(x_1); +x_78 = lean_box(0); +x_79 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_79, 0, x_78); +lean_ctor_set(x_79, 1, x_69); +return x_79; +} +} +} +} +} +} +else +{ +lean_object* x_144; lean_object* x_145; +lean_dec(x_4); +lean_dec(x_2); +lean_dec(x_1); +x_144 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_144, 0, x_5); +x_145 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_145, 0, x_144); +lean_ctor_set(x_145, 1, x_6); +return x_145; +} +} +} +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___rarg___boxed), 6, 0); +return x_2; +} +} +lean_object* l_panicWithPos___at_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___spec__1___rarg___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_panicWithPos___at_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___spec__1___rarg(x_1, x_2, x_3, x_4, x_5); +lean_dec(x_4); +lean_dec(x_1); +return x_6; +} +} +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___rarg___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_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___rarg(x_1, x_2, x_3, x_4, x_5, x_6); +lean_dec(x_3); +return x_7; +} +} +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___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: +{ +lean_object* x_7; +x_7 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___rarg(x_1, x_2, x_3, x_4, x_5, x_6); +return x_7; +} +} +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___rarg___boxed), 6, 0); +return x_3; +} +} +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___rarg___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_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___rarg(x_1, x_2, x_3, x_4, x_5, x_6); +lean_dec(x_3); +return x_7; +} +} +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux(x_1, x_2); +lean_dec(x_2); +return x_3; +} +} +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayed___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; uint8_t x_90; +x_6 = lean_ctor_get(x_4, 0); +lean_inc(x_6); +x_7 = lean_ctor_get(x_4, 1); +lean_inc(x_7); +x_8 = lean_ctor_get(x_4, 2); +lean_inc(x_8); +lean_dec(x_4); +x_90 = lean_expr_has_expr_mvar(x_8); +if (x_90 == 0) +{ +uint8_t x_91; +x_91 = lean_expr_has_level_mvar(x_8); +if (x_91 == 0) +{ +x_9 = x_8; +x_10 = x_5; +goto block_89; +} +else +{ +lean_object* x_92; lean_object* x_93; +x_92 = lean_ctor_get(x_5, 1); +lean_inc(x_92); +x_93 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_92, x_8); +lean_dec(x_92); +if (lean_obj_tag(x_93) == 0) +{ +lean_object* x_94; lean_object* x_95; lean_object* x_96; uint8_t x_97; +lean_inc(x_2); +lean_inc(x_8); +x_94 = lean_apply_2(x_2, x_8, x_5); +x_95 = lean_ctor_get(x_94, 1); +lean_inc(x_95); +x_96 = lean_ctor_get(x_94, 0); +lean_inc(x_96); +lean_dec(x_94); +x_97 = !lean_is_exclusive(x_95); +if (x_97 == 0) +{ +lean_object* x_98; lean_object* x_99; +x_98 = lean_ctor_get(x_95, 1); +lean_inc(x_96); +x_99 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_98, x_8, x_96); +lean_ctor_set(x_95, 1, x_99); +x_9 = x_96; +x_10 = x_95; +goto block_89; +} +else +{ +lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; +x_100 = lean_ctor_get(x_95, 0); +x_101 = lean_ctor_get(x_95, 1); +lean_inc(x_101); +lean_inc(x_100); +lean_dec(x_95); +lean_inc(x_96); +x_102 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_101, x_8, x_96); +x_103 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_103, 0, x_100); +lean_ctor_set(x_103, 1, x_102); +x_9 = x_96; +x_10 = x_103; +goto block_89; +} +} +else +{ +lean_object* x_104; +lean_dec(x_8); +x_104 = lean_ctor_get(x_93, 0); +lean_inc(x_104); +lean_dec(x_93); +x_9 = x_104; +x_10 = x_5; +goto block_89; +} +} +} +else +{ +lean_object* x_105; lean_object* x_106; +x_105 = lean_ctor_get(x_5, 1); +lean_inc(x_105); +x_106 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_105, x_8); +lean_dec(x_105); +if (lean_obj_tag(x_106) == 0) +{ +lean_object* x_107; lean_object* x_108; lean_object* x_109; uint8_t x_110; +lean_inc(x_2); +lean_inc(x_8); +x_107 = lean_apply_2(x_2, x_8, x_5); +x_108 = lean_ctor_get(x_107, 1); +lean_inc(x_108); +x_109 = lean_ctor_get(x_107, 0); +lean_inc(x_109); +lean_dec(x_107); +x_110 = !lean_is_exclusive(x_108); +if (x_110 == 0) +{ +lean_object* x_111; lean_object* x_112; +x_111 = lean_ctor_get(x_108, 1); +lean_inc(x_109); +x_112 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_111, x_8, x_109); +lean_ctor_set(x_108, 1, x_112); +x_9 = x_109; +x_10 = x_108; +goto block_89; +} +else +{ +lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; +x_113 = lean_ctor_get(x_108, 0); +x_114 = lean_ctor_get(x_108, 1); +lean_inc(x_114); +lean_inc(x_113); +lean_dec(x_108); +lean_inc(x_109); +x_115 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_114, x_8, x_109); +x_116 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_116, 0, x_113); +lean_ctor_set(x_116, 1, x_115); +x_9 = x_109; +x_10 = x_116; +goto block_89; +} +} +else +{ +lean_object* x_117; +lean_dec(x_8); +x_117 = lean_ctor_get(x_106, 0); +lean_inc(x_117); +lean_dec(x_106); +x_9 = x_117; +x_10 = x_5; +goto block_89; +} +} +block_89: +{ +uint8_t x_11; +x_11 = lean_expr_has_expr_mvar(x_9); +if (x_11 == 0) +{ +uint8_t x_12; +x_12 = lean_expr_has_level_mvar(x_9); +if (x_12 == 0) +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_13 = lean_array_get_size(x_7); +x_14 = lean_expr_abstract(x_9, x_7); +lean_inc(x_6); +x_15 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___rarg(x_2, x_6, x_7, x_13, x_14, x_10); +x_16 = lean_ctor_get(x_15, 0); +lean_inc(x_16); +if (lean_obj_tag(x_16) == 0) +{ +uint8_t x_17; +x_17 = !lean_is_exclusive(x_15); +if (x_17 == 0) +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; uint8_t x_21; +x_18 = lean_ctor_get(x_15, 1); +x_19 = lean_ctor_get(x_15, 0); +lean_dec(x_19); +x_20 = lean_ctor_get(x_1, 9); +lean_inc(x_20); +lean_dec(x_1); +x_21 = !lean_is_exclusive(x_18); +if (x_21 == 0) +{ +lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_22 = lean_ctor_get(x_18, 0); +x_23 = lean_apply_5(x_20, x_22, x_3, x_6, x_7, x_9); +lean_ctor_set(x_18, 0, x_23); +x_24 = lean_box(0); +lean_ctor_set(x_15, 0, x_24); +return x_15; +} +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_18, 0); +x_26 = lean_ctor_get(x_18, 1); +lean_inc(x_26); +lean_inc(x_25); +lean_dec(x_18); +x_27 = lean_apply_5(x_20, x_25, x_3, x_6, x_7, x_9); +x_28 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_28, 0, x_27); +lean_ctor_set(x_28, 1, x_26); +x_29 = lean_box(0); +lean_ctor_set(x_15, 1, x_28); +lean_ctor_set(x_15, 0, x_29); +return x_15; +} +} +else +{ +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_30 = lean_ctor_get(x_15, 1); +lean_inc(x_30); +lean_dec(x_15); +x_31 = lean_ctor_get(x_1, 9); +lean_inc(x_31); +lean_dec(x_1); +x_32 = lean_ctor_get(x_30, 0); +lean_inc(x_32); +x_33 = lean_ctor_get(x_30, 1); +lean_inc(x_33); +if (lean_is_exclusive(x_30)) { + lean_ctor_release(x_30, 0); + lean_ctor_release(x_30, 1); + x_34 = x_30; +} else { + lean_dec_ref(x_30); + x_34 = lean_box(0); +} +x_35 = lean_apply_5(x_31, x_32, x_3, x_6, x_7, x_9); +if (lean_is_scalar(x_34)) { + x_36 = lean_alloc_ctor(0, 2, 0); +} else { + x_36 = x_34; +} +lean_ctor_set(x_36, 0, x_35); +lean_ctor_set(x_36, 1, x_33); +x_37 = lean_box(0); +x_38 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_38, 0, x_37); +lean_ctor_set(x_38, 1, x_36); +return x_38; +} +} +else +{ +uint8_t x_39; +lean_dec(x_9); +lean_dec(x_7); +lean_dec(x_6); +x_39 = !lean_is_exclusive(x_15); +if (x_39 == 0) +{ +lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; uint8_t x_45; +x_40 = lean_ctor_get(x_15, 1); +x_41 = lean_ctor_get(x_15, 0); +lean_dec(x_41); +x_42 = lean_ctor_get(x_16, 0); +lean_inc(x_42); +x_43 = lean_ctor_get(x_1, 6); +lean_inc(x_43); +x_44 = lean_ctor_get(x_1, 11); +lean_inc(x_44); +lean_dec(x_1); +x_45 = !lean_is_exclusive(x_40); +if (x_45 == 0) +{ +lean_object* x_46; lean_object* x_47; lean_object* x_48; +x_46 = lean_ctor_get(x_40, 0); +lean_inc(x_3); +x_47 = lean_apply_2(x_44, x_46, x_3); +x_48 = lean_apply_3(x_43, x_47, x_3, x_42); +lean_ctor_set(x_40, 0, x_48); +return x_15; +} +else +{ +lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; +x_49 = lean_ctor_get(x_40, 0); +x_50 = lean_ctor_get(x_40, 1); +lean_inc(x_50); +lean_inc(x_49); +lean_dec(x_40); +lean_inc(x_3); +x_51 = lean_apply_2(x_44, x_49, x_3); +x_52 = lean_apply_3(x_43, x_51, x_3, x_42); +x_53 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_53, 0, x_52); +lean_ctor_set(x_53, 1, x_50); +lean_ctor_set(x_15, 1, x_53); +return x_15; +} +} +else +{ +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; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; +x_54 = lean_ctor_get(x_15, 1); +lean_inc(x_54); +lean_dec(x_15); +x_55 = lean_ctor_get(x_16, 0); +lean_inc(x_55); +x_56 = lean_ctor_get(x_1, 6); +lean_inc(x_56); +x_57 = lean_ctor_get(x_1, 11); +lean_inc(x_57); +lean_dec(x_1); +x_58 = lean_ctor_get(x_54, 0); +lean_inc(x_58); +x_59 = lean_ctor_get(x_54, 1); +lean_inc(x_59); +if (lean_is_exclusive(x_54)) { + lean_ctor_release(x_54, 0); + lean_ctor_release(x_54, 1); + x_60 = x_54; +} else { + lean_dec_ref(x_54); + x_60 = lean_box(0); +} +lean_inc(x_3); +x_61 = lean_apply_2(x_57, x_58, x_3); +x_62 = lean_apply_3(x_56, x_61, x_3, x_55); +if (lean_is_scalar(x_60)) { + x_63 = lean_alloc_ctor(0, 2, 0); +} else { + x_63 = x_60; +} +lean_ctor_set(x_63, 0, x_62); +lean_ctor_set(x_63, 1, x_59); +x_64 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_64, 0, x_16); +lean_ctor_set(x_64, 1, x_63); +return x_64; +} +} +} +else +{ +lean_object* x_65; uint8_t x_66; +lean_dec(x_2); +x_65 = lean_ctor_get(x_1, 9); +lean_inc(x_65); +lean_dec(x_1); +x_66 = !lean_is_exclusive(x_10); +if (x_66 == 0) +{ +lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; +x_67 = lean_ctor_get(x_10, 0); +x_68 = lean_apply_5(x_65, x_67, x_3, x_6, x_7, x_9); +lean_ctor_set(x_10, 0, x_68); +x_69 = lean_box(0); +x_70 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_70, 0, x_69); +lean_ctor_set(x_70, 1, x_10); +return x_70; +} +else +{ +lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; +x_71 = lean_ctor_get(x_10, 0); +x_72 = lean_ctor_get(x_10, 1); +lean_inc(x_72); +lean_inc(x_71); +lean_dec(x_10); +x_73 = lean_apply_5(x_65, x_71, x_3, x_6, x_7, x_9); +x_74 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_74, 0, x_73); +lean_ctor_set(x_74, 1, x_72); +x_75 = lean_box(0); +x_76 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_76, 0, x_75); +lean_ctor_set(x_76, 1, x_74); +return x_76; +} +} +} +else +{ +lean_object* x_77; uint8_t x_78; +lean_dec(x_2); +x_77 = lean_ctor_get(x_1, 9); +lean_inc(x_77); +lean_dec(x_1); +x_78 = !lean_is_exclusive(x_10); +if (x_78 == 0) +{ +lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; +x_79 = lean_ctor_get(x_10, 0); +x_80 = lean_apply_5(x_77, x_79, x_3, x_6, x_7, x_9); +lean_ctor_set(x_10, 0, x_80); +x_81 = lean_box(0); +x_82 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_82, 0, x_81); +lean_ctor_set(x_82, 1, x_10); +return x_82; +} +else +{ +lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; +x_83 = lean_ctor_get(x_10, 0); +x_84 = lean_ctor_get(x_10, 1); +lean_inc(x_84); +lean_inc(x_83); +lean_dec(x_10); +x_85 = lean_apply_5(x_77, x_83, x_3, x_6, x_7, x_9); +x_86 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_86, 0, x_85); +lean_ctor_set(x_86, 1, x_84); +x_87 = lean_box(0); +x_88 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_88, 0, x_87); +lean_ctor_set(x_88, 1, x_86); +return x_88; +} +} +} +} +} +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayed___rarg), 5, 0); +return x_2; +} +} +lean_object* l_panicWithPos___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__2___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_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; +x_6 = l_panicWithPos___rarg___closed__1; +x_7 = lean_string_append(x_6, x_1); +x_8 = l_panicWithPos___rarg___closed__2; +x_9 = lean_string_append(x_7, x_8); +x_10 = l_Nat_repr(x_2); +x_11 = lean_string_append(x_9, x_10); +lean_dec(x_10); +x_12 = l_panicWithPos___rarg___closed__2; +x_13 = lean_string_append(x_11, x_12); +x_14 = l_Nat_repr(x_3); +x_15 = lean_string_append(x_13, x_14); +lean_dec(x_14); +x_16 = l_panicWithPos___rarg___closed__3; +x_17 = lean_string_append(x_15, x_16); +x_18 = lean_string_append(x_17, x_4); +x_19 = l_panicWithPos___at_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___spec__1___rarg___closed__2; +x_20 = lean_panic_fn(x_18); +x_21 = lean_apply_1(x_20, x_5); +return x_21; +} +} +lean_object* l_panicWithPos___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__2(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_panicWithPos___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__2___rarg___boxed), 5, 0); +return x_2; +} +} +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__1___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: +{ +lean_object* x_7; uint8_t x_8; +x_7 = lean_unsigned_to_nat(0u); +x_8 = lean_nat_dec_eq(x_4, 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; +x_9 = lean_unsigned_to_nat(1u); +x_10 = lean_nat_sub(x_4, x_9); +lean_dec(x_4); +x_11 = l_Lean_exprIsInhabited; +x_12 = lean_array_get(x_11, x_3, x_10); +lean_inc(x_2); +x_13 = l_Lean_LocalContext_findFVar(x_2, x_12); +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; +lean_dec(x_10); +lean_dec(x_5); +lean_dec(x_2); +lean_dec(x_1); +x_14 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___rarg___closed__1; +x_15 = lean_unsigned_to_nat(134u); +x_16 = lean_unsigned_to_nat(12u); +x_17 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___rarg___closed__2; +x_18 = l_panicWithPos___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__2___rarg(x_14, x_15, x_16, x_17, x_6); +return x_18; +} +else +{ +lean_object* x_19; +x_19 = lean_ctor_get(x_13, 0); +lean_inc(x_19); +lean_dec(x_13); +if (lean_obj_tag(x_19) == 0) +{ +lean_object* x_20; lean_object* x_21; uint8_t x_22; lean_object* x_23; lean_object* x_24; uint8_t x_35; +x_20 = lean_ctor_get(x_19, 2); +lean_inc(x_20); +x_21 = lean_ctor_get(x_19, 3); +lean_inc(x_21); +x_22 = lean_ctor_get_uint8(x_19, sizeof(void*)*4); +lean_dec(x_19); +x_35 = lean_expr_has_expr_mvar(x_21); +if (x_35 == 0) +{ +uint8_t x_36; +x_36 = lean_expr_has_level_mvar(x_21); +if (x_36 == 0) +{ +x_23 = x_21; +x_24 = x_6; +goto block_34; +} +else +{ +lean_object* x_37; lean_object* x_38; +x_37 = lean_ctor_get(x_6, 1); +lean_inc(x_37); +x_38 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_37, x_21); +lean_dec(x_37); +if (lean_obj_tag(x_38) == 0) +{ +lean_object* x_39; lean_object* x_40; lean_object* x_41; uint8_t x_42; +lean_inc(x_21); +lean_inc(x_1); +x_39 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_21, x_6); +x_40 = lean_ctor_get(x_39, 1); +lean_inc(x_40); +x_41 = lean_ctor_get(x_39, 0); +lean_inc(x_41); +lean_dec(x_39); +x_42 = !lean_is_exclusive(x_40); +if (x_42 == 0) +{ +lean_object* x_43; lean_object* x_44; +x_43 = lean_ctor_get(x_40, 1); +lean_inc(x_41); +x_44 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_43, x_21, x_41); +lean_ctor_set(x_40, 1, x_44); +x_23 = x_41; +x_24 = x_40; +goto block_34; +} +else +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; +x_45 = lean_ctor_get(x_40, 0); +x_46 = lean_ctor_get(x_40, 1); +lean_inc(x_46); +lean_inc(x_45); +lean_dec(x_40); +lean_inc(x_41); +x_47 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_46, x_21, x_41); +x_48 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_48, 0, x_45); +lean_ctor_set(x_48, 1, x_47); +x_23 = x_41; +x_24 = x_48; +goto block_34; +} +} +else +{ +lean_object* x_49; +lean_dec(x_21); +x_49 = lean_ctor_get(x_38, 0); +lean_inc(x_49); +lean_dec(x_38); +x_23 = x_49; +x_24 = x_6; +goto block_34; +} +} +} +else +{ +lean_object* x_50; lean_object* x_51; +x_50 = lean_ctor_get(x_6, 1); +lean_inc(x_50); +x_51 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_50, x_21); +lean_dec(x_50); +if (lean_obj_tag(x_51) == 0) +{ +lean_object* x_52; lean_object* x_53; lean_object* x_54; uint8_t x_55; +lean_inc(x_21); +lean_inc(x_1); +x_52 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_21, x_6); +x_53 = lean_ctor_get(x_52, 1); +lean_inc(x_53); +x_54 = lean_ctor_get(x_52, 0); +lean_inc(x_54); +lean_dec(x_52); +x_55 = !lean_is_exclusive(x_53); +if (x_55 == 0) +{ +lean_object* x_56; lean_object* x_57; +x_56 = lean_ctor_get(x_53, 1); +lean_inc(x_54); +x_57 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_56, x_21, x_54); +lean_ctor_set(x_53, 1, x_57); +x_23 = x_54; +x_24 = x_53; +goto block_34; +} +else +{ +lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; +x_58 = lean_ctor_get(x_53, 0); +x_59 = lean_ctor_get(x_53, 1); +lean_inc(x_59); +lean_inc(x_58); +lean_dec(x_53); +lean_inc(x_54); +x_60 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_59, x_21, x_54); +x_61 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_61, 0, x_58); +lean_ctor_set(x_61, 1, x_60); +x_23 = x_54; +x_24 = x_61; +goto block_34; +} +} +else +{ +lean_object* x_62; +lean_dec(x_21); +x_62 = lean_ctor_get(x_51, 0); +lean_inc(x_62); +lean_dec(x_51); +x_23 = x_62; +x_24 = x_6; +goto block_34; +} +} +block_34: +{ +uint8_t x_25; +x_25 = lean_expr_has_expr_mvar(x_23); +if (x_25 == 0) +{ +uint8_t x_26; +x_26 = lean_expr_has_level_mvar(x_23); +if (x_26 == 0) +{ +lean_object* x_27; lean_object* x_28; +x_27 = lean_expr_abstract_range(x_23, x_10, x_3); +lean_dec(x_23); +x_28 = lean_expr_mk_lambda(x_20, x_22, x_27, x_5); +x_4 = x_10; +x_5 = x_28; +x_6 = x_24; +goto _start; +} +else +{ +lean_object* x_30; lean_object* x_31; +lean_dec(x_23); +lean_dec(x_20); +lean_dec(x_10); +lean_dec(x_5); +lean_dec(x_2); +lean_dec(x_1); +x_30 = lean_box(0); +x_31 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_31, 0, x_30); +lean_ctor_set(x_31, 1, x_24); +return x_31; +} +} +else +{ +lean_object* x_32; lean_object* x_33; +lean_dec(x_23); +lean_dec(x_20); +lean_dec(x_10); +lean_dec(x_5); +lean_dec(x_2); +lean_dec(x_1); +x_32 = lean_box(0); +x_33 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_33, 0, x_32); +lean_ctor_set(x_33, 1, x_24); +return x_33; +} +} +} +else +{ +lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; uint8_t x_116; +x_63 = lean_ctor_get(x_19, 2); +lean_inc(x_63); +x_64 = lean_ctor_get(x_19, 3); +lean_inc(x_64); +x_65 = lean_ctor_get(x_19, 4); +lean_inc(x_65); +lean_dec(x_19); +x_116 = lean_expr_has_expr_mvar(x_64); +if (x_116 == 0) +{ +uint8_t x_117; +x_117 = lean_expr_has_level_mvar(x_64); +if (x_117 == 0) +{ +x_66 = x_64; +x_67 = x_6; +goto block_115; +} +else +{ +lean_object* x_118; lean_object* x_119; +x_118 = lean_ctor_get(x_6, 1); +lean_inc(x_118); +x_119 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_118, x_64); +lean_dec(x_118); +if (lean_obj_tag(x_119) == 0) +{ +lean_object* x_120; lean_object* x_121; lean_object* x_122; uint8_t x_123; +lean_inc(x_64); +lean_inc(x_1); +x_120 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_64, x_6); +x_121 = lean_ctor_get(x_120, 1); +lean_inc(x_121); +x_122 = lean_ctor_get(x_120, 0); +lean_inc(x_122); +lean_dec(x_120); +x_123 = !lean_is_exclusive(x_121); +if (x_123 == 0) +{ +lean_object* x_124; lean_object* x_125; +x_124 = lean_ctor_get(x_121, 1); +lean_inc(x_122); +x_125 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_124, x_64, x_122); +lean_ctor_set(x_121, 1, x_125); +x_66 = x_122; +x_67 = x_121; +goto block_115; +} +else +{ +lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; +x_126 = lean_ctor_get(x_121, 0); +x_127 = lean_ctor_get(x_121, 1); +lean_inc(x_127); +lean_inc(x_126); +lean_dec(x_121); +lean_inc(x_122); +x_128 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_127, x_64, x_122); +x_129 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_129, 0, x_126); +lean_ctor_set(x_129, 1, x_128); +x_66 = x_122; +x_67 = x_129; +goto block_115; +} +} +else +{ +lean_object* x_130; +lean_dec(x_64); +x_130 = lean_ctor_get(x_119, 0); +lean_inc(x_130); +lean_dec(x_119); +x_66 = x_130; +x_67 = x_6; +goto block_115; +} +} +} +else +{ +lean_object* x_131; lean_object* x_132; +x_131 = lean_ctor_get(x_6, 1); +lean_inc(x_131); +x_132 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_131, x_64); +lean_dec(x_131); +if (lean_obj_tag(x_132) == 0) +{ +lean_object* x_133; lean_object* x_134; lean_object* x_135; uint8_t x_136; +lean_inc(x_64); +lean_inc(x_1); +x_133 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_64, x_6); +x_134 = lean_ctor_get(x_133, 1); +lean_inc(x_134); +x_135 = lean_ctor_get(x_133, 0); +lean_inc(x_135); +lean_dec(x_133); +x_136 = !lean_is_exclusive(x_134); +if (x_136 == 0) +{ +lean_object* x_137; lean_object* x_138; +x_137 = lean_ctor_get(x_134, 1); +lean_inc(x_135); +x_138 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_137, x_64, x_135); +lean_ctor_set(x_134, 1, x_138); +x_66 = x_135; +x_67 = x_134; +goto block_115; +} +else +{ +lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; +x_139 = lean_ctor_get(x_134, 0); +x_140 = lean_ctor_get(x_134, 1); +lean_inc(x_140); +lean_inc(x_139); +lean_dec(x_134); +lean_inc(x_135); +x_141 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_140, x_64, x_135); +x_142 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_142, 0, x_139); +lean_ctor_set(x_142, 1, x_141); +x_66 = x_135; +x_67 = x_142; +goto block_115; +} +} +else +{ +lean_object* x_143; +lean_dec(x_64); +x_143 = lean_ctor_get(x_132, 0); +lean_inc(x_143); +lean_dec(x_132); +x_66 = x_143; +x_67 = x_6; +goto block_115; +} +} +block_115: +{ +lean_object* x_68; lean_object* x_69; uint8_t x_81; +x_81 = lean_expr_has_expr_mvar(x_66); +if (x_81 == 0) +{ +uint8_t x_82; +x_82 = lean_expr_has_level_mvar(x_66); +if (x_82 == 0) +{ +uint8_t x_83; +x_83 = lean_expr_has_expr_mvar(x_65); +if (x_83 == 0) +{ +uint8_t x_84; +x_84 = lean_expr_has_level_mvar(x_65); +if (x_84 == 0) +{ +x_68 = x_65; +x_69 = x_67; +goto block_80; +} +else +{ +lean_object* x_85; lean_object* x_86; +x_85 = lean_ctor_get(x_67, 1); +lean_inc(x_85); +x_86 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_85, x_65); +lean_dec(x_85); +if (lean_obj_tag(x_86) == 0) +{ +lean_object* x_87; lean_object* x_88; lean_object* x_89; uint8_t x_90; +lean_inc(x_65); +lean_inc(x_1); +x_87 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_65, x_67); +x_88 = lean_ctor_get(x_87, 1); +lean_inc(x_88); +x_89 = lean_ctor_get(x_87, 0); +lean_inc(x_89); +lean_dec(x_87); +x_90 = !lean_is_exclusive(x_88); +if (x_90 == 0) +{ +lean_object* x_91; lean_object* x_92; +x_91 = lean_ctor_get(x_88, 1); +lean_inc(x_89); +x_92 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_91, x_65, x_89); +lean_ctor_set(x_88, 1, x_92); +x_68 = x_89; +x_69 = x_88; +goto block_80; +} +else +{ +lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; +x_93 = lean_ctor_get(x_88, 0); +x_94 = lean_ctor_get(x_88, 1); +lean_inc(x_94); +lean_inc(x_93); +lean_dec(x_88); +lean_inc(x_89); +x_95 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_94, x_65, x_89); +x_96 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_96, 0, x_93); +lean_ctor_set(x_96, 1, x_95); +x_68 = x_89; +x_69 = x_96; +goto block_80; +} +} +else +{ +lean_object* x_97; +lean_dec(x_65); +x_97 = lean_ctor_get(x_86, 0); +lean_inc(x_97); +lean_dec(x_86); +x_68 = x_97; +x_69 = x_67; +goto block_80; +} +} +} +else +{ +lean_object* x_98; lean_object* x_99; +x_98 = lean_ctor_get(x_67, 1); +lean_inc(x_98); +x_99 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_98, x_65); +lean_dec(x_98); +if (lean_obj_tag(x_99) == 0) +{ +lean_object* x_100; lean_object* x_101; lean_object* x_102; uint8_t x_103; +lean_inc(x_65); +lean_inc(x_1); +x_100 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_65, x_67); +x_101 = lean_ctor_get(x_100, 1); +lean_inc(x_101); +x_102 = lean_ctor_get(x_100, 0); +lean_inc(x_102); +lean_dec(x_100); +x_103 = !lean_is_exclusive(x_101); +if (x_103 == 0) +{ +lean_object* x_104; lean_object* x_105; +x_104 = lean_ctor_get(x_101, 1); +lean_inc(x_102); +x_105 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_104, x_65, x_102); +lean_ctor_set(x_101, 1, x_105); +x_68 = x_102; +x_69 = x_101; +goto block_80; +} +else +{ +lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; +x_106 = lean_ctor_get(x_101, 0); +x_107 = lean_ctor_get(x_101, 1); +lean_inc(x_107); +lean_inc(x_106); +lean_dec(x_101); +lean_inc(x_102); +x_108 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_107, x_65, x_102); +x_109 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_109, 0, x_106); +lean_ctor_set(x_109, 1, x_108); +x_68 = x_102; +x_69 = x_109; +goto block_80; +} +} +else +{ +lean_object* x_110; +lean_dec(x_65); +x_110 = lean_ctor_get(x_99, 0); +lean_inc(x_110); +lean_dec(x_99); +x_68 = x_110; +x_69 = x_67; +goto block_80; +} +} +} +else +{ +lean_object* x_111; lean_object* x_112; +lean_dec(x_66); +lean_dec(x_65); +lean_dec(x_63); +lean_dec(x_10); +lean_dec(x_5); +lean_dec(x_2); +lean_dec(x_1); +x_111 = lean_box(0); +x_112 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_112, 0, x_111); +lean_ctor_set(x_112, 1, x_67); +return x_112; +} +} +else +{ +lean_object* x_113; lean_object* x_114; +lean_dec(x_66); +lean_dec(x_65); +lean_dec(x_63); +lean_dec(x_10); +lean_dec(x_5); +lean_dec(x_2); +lean_dec(x_1); +x_113 = lean_box(0); +x_114 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_114, 0, x_113); +lean_ctor_set(x_114, 1, x_67); +return x_114; +} +block_80: +{ +uint8_t x_70; +x_70 = lean_expr_has_expr_mvar(x_68); +if (x_70 == 0) +{ +uint8_t x_71; +x_71 = lean_expr_has_level_mvar(x_68); +if (x_71 == 0) +{ +lean_object* x_72; lean_object* x_73; lean_object* x_74; +x_72 = lean_expr_abstract_range(x_66, x_10, x_3); +lean_dec(x_66); +x_73 = lean_expr_abstract_range(x_68, x_10, x_3); +lean_dec(x_68); +x_74 = lean_expr_mk_let(x_63, x_72, x_73, x_5); +x_4 = x_10; +x_5 = x_74; +x_6 = x_69; +goto _start; +} +else +{ +lean_object* x_76; lean_object* x_77; +lean_dec(x_68); +lean_dec(x_66); +lean_dec(x_63); +lean_dec(x_10); +lean_dec(x_5); +lean_dec(x_2); +lean_dec(x_1); +x_76 = lean_box(0); +x_77 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_77, 0, x_76); +lean_ctor_set(x_77, 1, x_69); +return x_77; +} +} +else +{ +lean_object* x_78; lean_object* x_79; +lean_dec(x_68); +lean_dec(x_66); +lean_dec(x_63); +lean_dec(x_10); +lean_dec(x_5); +lean_dec(x_2); +lean_dec(x_1); +x_78 = lean_box(0); +x_79 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_79, 0, x_78); +lean_ctor_set(x_79, 1, x_69); +return x_79; +} +} +} +} +} +} +else +{ +lean_object* x_144; lean_object* x_145; +lean_dec(x_4); +lean_dec(x_2); +lean_dec(x_1); +x_144 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_144, 0, x_5); +x_145 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_145, 0, x_144); +lean_ctor_set(x_145, 1, x_6); +return x_145; +} +} +} +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__1(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__1___rarg___boxed), 6, 0); +return x_2; +} +} +lean_object* l_List_mmap___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__3___rarg(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_object* x_5; +lean_dec(x_1); +x_4 = lean_box(0); +x_5 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_5, 0, x_4); +lean_ctor_set(x_5, 1, x_3); +return x_5; +} +else +{ +uint8_t x_6; +x_6 = !lean_is_exclusive(x_2); +if (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; lean_object* x_13; lean_object* x_14; uint8_t x_15; +x_8 = lean_ctor_get(x_2, 0); +x_9 = lean_ctor_get(x_2, 1); +x_10 = lean_ctor_get(x_3, 0); +lean_inc(x_1); +x_11 = l_Lean_AbstractMetavarContext_instantiateLevelMVars___main___rarg(x_1, x_8, x_10); +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_3, 0, x_13); +x_14 = l_List_mmap___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__3___rarg(x_1, x_9, x_3); +x_15 = !lean_is_exclusive(x_14); +if (x_15 == 0) +{ +lean_object* x_16; +x_16 = lean_ctor_get(x_14, 0); +lean_ctor_set(x_2, 1, x_16); +lean_ctor_set(x_2, 0, x_12); +lean_ctor_set(x_14, 0, x_2); +return x_14; +} +else +{ +lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_17 = lean_ctor_get(x_14, 0); +x_18 = lean_ctor_get(x_14, 1); +lean_inc(x_18); +lean_inc(x_17); +lean_dec(x_14); +lean_ctor_set(x_2, 1, x_17); +lean_ctor_set(x_2, 0, x_12); +x_19 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_19, 0, x_2); +lean_ctor_set(x_19, 1, 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_2, 0); +x_21 = lean_ctor_get(x_2, 1); +x_22 = lean_ctor_get(x_3, 0); +x_23 = lean_ctor_get(x_3, 1); +lean_inc(x_23); +lean_inc(x_22); +lean_dec(x_3); +lean_inc(x_1); +x_24 = l_Lean_AbstractMetavarContext_instantiateLevelMVars___main___rarg(x_1, x_20, x_22); +x_25 = lean_ctor_get(x_24, 0); +lean_inc(x_25); +x_26 = lean_ctor_get(x_24, 1); +lean_inc(x_26); +lean_dec(x_24); +x_27 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_27, 0, x_26); +lean_ctor_set(x_27, 1, x_23); +x_28 = l_List_mmap___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__3___rarg(x_1, x_21, x_27); +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); +} +lean_ctor_set(x_2, 1, x_29); +lean_ctor_set(x_2, 0, x_25); +if (lean_is_scalar(x_31)) { + x_32 = lean_alloc_ctor(0, 2, 0); +} else { + x_32 = x_31; +} +lean_ctor_set(x_32, 0, x_2); +lean_ctor_set(x_32, 1, x_30); +return x_32; +} +} +else +{ +lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; 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; +x_33 = lean_ctor_get(x_2, 0); +x_34 = lean_ctor_get(x_2, 1); +lean_inc(x_34); +lean_inc(x_33); +lean_dec(x_2); +x_35 = lean_ctor_get(x_3, 0); +lean_inc(x_35); +x_36 = lean_ctor_get(x_3, 1); +lean_inc(x_36); +if (lean_is_exclusive(x_3)) { + lean_ctor_release(x_3, 0); + lean_ctor_release(x_3, 1); + x_37 = x_3; +} else { + lean_dec_ref(x_3); + x_37 = lean_box(0); +} +lean_inc(x_1); +x_38 = l_Lean_AbstractMetavarContext_instantiateLevelMVars___main___rarg(x_1, x_33, x_35); +x_39 = lean_ctor_get(x_38, 0); +lean_inc(x_39); +x_40 = lean_ctor_get(x_38, 1); +lean_inc(x_40); +lean_dec(x_38); +if (lean_is_scalar(x_37)) { + x_41 = lean_alloc_ctor(0, 2, 0); +} else { + x_41 = x_37; +} +lean_ctor_set(x_41, 0, x_40); +lean_ctor_set(x_41, 1, x_36); +x_42 = l_List_mmap___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__3___rarg(x_1, x_34, x_41); +x_43 = lean_ctor_get(x_42, 0); +lean_inc(x_43); +x_44 = lean_ctor_get(x_42, 1); +lean_inc(x_44); +if (lean_is_exclusive(x_42)) { + lean_ctor_release(x_42, 0); + lean_ctor_release(x_42, 1); + x_45 = x_42; +} else { + lean_dec_ref(x_42); + x_45 = lean_box(0); +} +x_46 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_46, 0, x_39); +lean_ctor_set(x_46, 1, x_43); +if (lean_is_scalar(x_45)) { + x_47 = lean_alloc_ctor(0, 2, 0); +} else { + x_47 = x_45; +} +lean_ctor_set(x_47, 0, x_46); +lean_ctor_set(x_47, 1, x_44); +return x_47; +} +} +} +} +lean_object* l_List_mmap___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__3(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_List_mmap___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__3___rarg), 3, 0); +return x_2; +} +} +lean_object* l_Array_ummapAux___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__4___rarg(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_array_get_size(x_3); +x_6 = lean_nat_dec_lt(x_2, x_5); +lean_dec(x_5); +if (x_6 == 0) +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; +lean_dec(x_2); +lean_dec(x_1); +x_7 = l_Array_empty___closed__1; +x_8 = x_3; +x_9 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_9, 0, x_8); +lean_ctor_set(x_9, 1, x_4); +return x_9; +} +else +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; +x_10 = lean_array_fget(x_3, x_2); +x_11 = lean_box(0); +lean_inc(x_10); +x_12 = x_11; +x_13 = lean_array_fset(x_3, x_2, x_12); +x_14 = lean_expr_has_expr_mvar(x_10); +if (x_14 == 0) +{ +uint8_t x_15; +x_15 = lean_expr_has_level_mvar(x_10); +if (x_15 == 0) +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_16 = lean_unsigned_to_nat(1u); +x_17 = lean_nat_add(x_2, x_16); +lean_inc(x_10); +x_18 = x_10; +x_19 = lean_array_fset(x_13, x_2, x_18); +lean_dec(x_2); +x_2 = x_17; +x_3 = x_19; +goto _start; +} +else +{ +lean_object* x_21; lean_object* x_22; +x_21 = lean_ctor_get(x_4, 1); +lean_inc(x_21); +x_22 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_21, x_10); +lean_dec(x_21); +if (lean_obj_tag(x_22) == 0) +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; uint8_t x_26; +lean_inc(x_10); +lean_inc(x_1); +x_23 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_10, x_4); +x_24 = lean_ctor_get(x_23, 1); +lean_inc(x_24); +x_25 = lean_ctor_get(x_23, 0); +lean_inc(x_25); +lean_dec(x_23); +x_26 = !lean_is_exclusive(x_24); +if (x_26 == 0) +{ +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_27 = lean_ctor_get(x_24, 1); +lean_inc(x_25); +lean_inc(x_10); +x_28 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_27, x_10, x_25); +lean_ctor_set(x_24, 1, x_28); +x_29 = lean_unsigned_to_nat(1u); +x_30 = lean_nat_add(x_2, x_29); +x_31 = x_25; +x_32 = lean_array_fset(x_13, x_2, x_31); +lean_dec(x_2); +x_2 = x_30; +x_3 = x_32; +x_4 = x_24; +goto _start; +} +else +{ +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; +x_34 = lean_ctor_get(x_24, 0); +x_35 = lean_ctor_get(x_24, 1); +lean_inc(x_35); +lean_inc(x_34); +lean_dec(x_24); +lean_inc(x_25); +lean_inc(x_10); +x_36 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_35, x_10, x_25); +x_37 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_37, 0, x_34); +lean_ctor_set(x_37, 1, x_36); +x_38 = lean_unsigned_to_nat(1u); +x_39 = lean_nat_add(x_2, x_38); +x_40 = x_25; +x_41 = lean_array_fset(x_13, x_2, x_40); +lean_dec(x_2); +x_2 = x_39; +x_3 = x_41; +x_4 = x_37; +goto _start; +} +} +else +{ +lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; +x_43 = lean_ctor_get(x_22, 0); +lean_inc(x_43); +lean_dec(x_22); +x_44 = lean_unsigned_to_nat(1u); +x_45 = lean_nat_add(x_2, x_44); +x_46 = x_43; +x_47 = lean_array_fset(x_13, x_2, x_46); +lean_dec(x_2); +x_2 = x_45; +x_3 = x_47; +goto _start; +} +} +} +else +{ +lean_object* x_49; lean_object* x_50; +x_49 = lean_ctor_get(x_4, 1); +lean_inc(x_49); +x_50 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_49, x_10); +lean_dec(x_49); +if (lean_obj_tag(x_50) == 0) +{ +lean_object* x_51; lean_object* x_52; lean_object* x_53; uint8_t x_54; +lean_inc(x_10); +lean_inc(x_1); +x_51 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_10, x_4); +x_52 = lean_ctor_get(x_51, 1); +lean_inc(x_52); +x_53 = lean_ctor_get(x_51, 0); +lean_inc(x_53); +lean_dec(x_51); +x_54 = !lean_is_exclusive(x_52); +if (x_54 == 0) +{ +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_55 = lean_ctor_get(x_52, 1); +lean_inc(x_53); +lean_inc(x_10); +x_56 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_55, x_10, x_53); +lean_ctor_set(x_52, 1, x_56); +x_57 = lean_unsigned_to_nat(1u); +x_58 = lean_nat_add(x_2, x_57); +x_59 = x_53; +x_60 = lean_array_fset(x_13, x_2, x_59); +lean_dec(x_2); +x_2 = x_58; +x_3 = x_60; +x_4 = x_52; +goto _start; +} +else +{ +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; +x_62 = lean_ctor_get(x_52, 0); +x_63 = lean_ctor_get(x_52, 1); +lean_inc(x_63); +lean_inc(x_62); +lean_dec(x_52); +lean_inc(x_53); +lean_inc(x_10); +x_64 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_63, x_10, x_53); +x_65 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_65, 0, x_62); +lean_ctor_set(x_65, 1, x_64); +x_66 = lean_unsigned_to_nat(1u); +x_67 = lean_nat_add(x_2, x_66); +x_68 = x_53; +x_69 = lean_array_fset(x_13, x_2, x_68); +lean_dec(x_2); +x_2 = x_67; +x_3 = x_69; +x_4 = x_65; +goto _start; +} +} +else +{ +lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; +x_71 = lean_ctor_get(x_50, 0); +lean_inc(x_71); +lean_dec(x_50); +x_72 = lean_unsigned_to_nat(1u); +x_73 = lean_nat_add(x_2, x_72); +x_74 = x_71; +x_75 = lean_array_fset(x_13, x_2, x_74); +lean_dec(x_2); +x_2 = x_73; +x_3 = x_75; +goto _start; +} +} +} +} +} +lean_object* l_Array_ummapAux___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__4(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Array_ummapAux___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__4___rarg), 4, 0); +return x_2; +} +} +lean_object* l___private_Init_Lean_Expr_3__withAppRevAux___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__5___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +switch (lean_obj_tag(x_2)) { +case 0: +{ +uint8_t x_5; lean_object* x_6; lean_object* x_7; uint8_t x_75; +x_5 = l_Lean_Expr_isMVar(x_2); +x_75 = lean_expr_has_expr_mvar(x_2); +if (x_75 == 0) +{ +uint8_t x_76; +x_76 = lean_expr_has_level_mvar(x_2); +if (x_76 == 0) +{ +x_6 = x_2; +x_7 = x_4; +goto block_74; +} +else +{ +lean_object* x_77; lean_object* x_78; +x_77 = lean_ctor_get(x_4, 1); +lean_inc(x_77); +x_78 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_77, x_2); +lean_dec(x_77); +if (lean_obj_tag(x_78) == 0) +{ +lean_object* x_79; lean_object* x_80; lean_object* x_81; uint8_t x_82; +lean_inc(x_2); +lean_inc(x_1); +x_79 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_2, x_4); +x_80 = lean_ctor_get(x_79, 1); +lean_inc(x_80); +x_81 = lean_ctor_get(x_79, 0); +lean_inc(x_81); +lean_dec(x_79); +x_82 = !lean_is_exclusive(x_80); +if (x_82 == 0) +{ +lean_object* x_83; lean_object* x_84; +x_83 = lean_ctor_get(x_80, 1); +lean_inc(x_81); +x_84 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_83, x_2, x_81); +lean_ctor_set(x_80, 1, x_84); +x_6 = x_81; +x_7 = x_80; +goto block_74; +} +else +{ +lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; +x_85 = lean_ctor_get(x_80, 0); +x_86 = lean_ctor_get(x_80, 1); +lean_inc(x_86); +lean_inc(x_85); +lean_dec(x_80); +lean_inc(x_81); +x_87 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_86, x_2, x_81); +x_88 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_88, 0, x_85); +lean_ctor_set(x_88, 1, x_87); +x_6 = x_81; +x_7 = x_88; +goto block_74; +} +} +else +{ +lean_object* x_89; +lean_dec(x_2); +x_89 = lean_ctor_get(x_78, 0); +lean_inc(x_89); +lean_dec(x_78); +x_6 = x_89; +x_7 = x_4; +goto block_74; +} +} +} +else +{ +lean_object* x_90; lean_object* x_91; +x_90 = lean_ctor_get(x_4, 1); +lean_inc(x_90); +x_91 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_90, x_2); +lean_dec(x_90); +if (lean_obj_tag(x_91) == 0) +{ +lean_object* x_92; lean_object* x_93; lean_object* x_94; uint8_t x_95; +lean_inc(x_2); +lean_inc(x_1); +x_92 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_2, x_4); +x_93 = lean_ctor_get(x_92, 1); +lean_inc(x_93); +x_94 = lean_ctor_get(x_92, 0); +lean_inc(x_94); +lean_dec(x_92); +x_95 = !lean_is_exclusive(x_93); +if (x_95 == 0) +{ +lean_object* x_96; lean_object* x_97; +x_96 = lean_ctor_get(x_93, 1); +lean_inc(x_94); +x_97 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_96, x_2, x_94); +lean_ctor_set(x_93, 1, x_97); +x_6 = x_94; +x_7 = x_93; +goto block_74; +} +else +{ +lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; +x_98 = lean_ctor_get(x_93, 0); +x_99 = lean_ctor_get(x_93, 1); +lean_inc(x_99); +lean_inc(x_98); +lean_dec(x_93); +lean_inc(x_94); +x_100 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_99, x_2, x_94); +x_101 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_101, 0, x_98); +lean_ctor_set(x_101, 1, x_100); +x_6 = x_94; +x_7 = x_101; +goto block_74; +} +} +else +{ +lean_object* x_102; +lean_dec(x_2); +x_102 = lean_ctor_get(x_91, 0); +lean_inc(x_102); +lean_dec(x_91); +x_6 = x_102; +x_7 = x_4; +goto block_74; +} +} +block_74: +{ +lean_object* x_8; +if (x_5 == 0) +{ +lean_object* x_19; +x_19 = lean_box(0); +x_8 = x_19; +goto block_18; +} +else +{ +uint8_t x_20; +x_20 = l_Lean_Expr_isLambda(x_6); +if (x_20 == 0) +{ +lean_object* x_21; +x_21 = lean_box(0); +x_8 = x_21; +goto block_18; +} +else +{ +lean_object* x_22; uint8_t x_23; +x_22 = l_Lean_Expr_betaRev(x_6, x_3); +lean_dec(x_6); +x_23 = lean_expr_has_expr_mvar(x_22); +if (x_23 == 0) +{ +uint8_t x_24; +x_24 = lean_expr_has_level_mvar(x_22); +if (x_24 == 0) +{ +lean_object* x_25; +lean_dec(x_1); +x_25 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_25, 0, x_22); +lean_ctor_set(x_25, 1, x_7); +return x_25; +} +else +{ +lean_object* x_26; lean_object* x_27; +x_26 = lean_ctor_get(x_7, 1); +lean_inc(x_26); +x_27 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_26, x_22); +lean_dec(x_26); +if (lean_obj_tag(x_27) == 0) +{ +lean_object* x_28; uint8_t x_29; +lean_inc(x_22); +x_28 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_22, x_7); +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, 1); +x_31 = !lean_is_exclusive(x_30); +if (x_31 == 0) +{ +lean_object* x_32; lean_object* x_33; lean_object* x_34; +x_32 = lean_ctor_get(x_28, 0); +x_33 = lean_ctor_get(x_30, 1); +lean_inc(x_32); +x_34 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_33, x_22, x_32); +lean_ctor_set(x_30, 1, x_34); +return x_28; +} +else +{ +lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; +x_35 = lean_ctor_get(x_28, 0); +x_36 = lean_ctor_get(x_30, 0); +x_37 = lean_ctor_get(x_30, 1); +lean_inc(x_37); +lean_inc(x_36); +lean_dec(x_30); +lean_inc(x_35); +x_38 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_37, x_22, x_35); +x_39 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_39, 0, x_36); +lean_ctor_set(x_39, 1, x_38); +lean_ctor_set(x_28, 1, x_39); +return x_28; +} +} +else +{ +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; +x_40 = lean_ctor_get(x_28, 1); +x_41 = lean_ctor_get(x_28, 0); +lean_inc(x_40); +lean_inc(x_41); +lean_dec(x_28); +x_42 = lean_ctor_get(x_40, 0); +lean_inc(x_42); +x_43 = lean_ctor_get(x_40, 1); +lean_inc(x_43); +if (lean_is_exclusive(x_40)) { + lean_ctor_release(x_40, 0); + lean_ctor_release(x_40, 1); + x_44 = x_40; +} else { + lean_dec_ref(x_40); + x_44 = lean_box(0); +} +lean_inc(x_41); +x_45 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_43, x_22, x_41); +if (lean_is_scalar(x_44)) { + x_46 = lean_alloc_ctor(0, 2, 0); +} else { + x_46 = x_44; +} +lean_ctor_set(x_46, 0, x_42); +lean_ctor_set(x_46, 1, x_45); +x_47 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_47, 0, x_41); +lean_ctor_set(x_47, 1, x_46); +return x_47; +} +} +else +{ +lean_object* x_48; lean_object* x_49; +lean_dec(x_22); +lean_dec(x_1); +x_48 = lean_ctor_get(x_27, 0); +lean_inc(x_48); +lean_dec(x_27); +x_49 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_49, 0, x_48); +lean_ctor_set(x_49, 1, x_7); +return x_49; +} +} +} +else +{ +lean_object* x_50; lean_object* x_51; +x_50 = lean_ctor_get(x_7, 1); +lean_inc(x_50); +x_51 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_50, x_22); +lean_dec(x_50); +if (lean_obj_tag(x_51) == 0) +{ +lean_object* x_52; uint8_t x_53; +lean_inc(x_22); +x_52 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_22, x_7); +x_53 = !lean_is_exclusive(x_52); +if (x_53 == 0) +{ +lean_object* x_54; uint8_t x_55; +x_54 = lean_ctor_get(x_52, 1); +x_55 = !lean_is_exclusive(x_54); +if (x_55 == 0) +{ +lean_object* x_56; lean_object* x_57; lean_object* x_58; +x_56 = lean_ctor_get(x_52, 0); +x_57 = lean_ctor_get(x_54, 1); +lean_inc(x_56); +x_58 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_57, x_22, x_56); +lean_ctor_set(x_54, 1, x_58); +return x_52; +} +else +{ +lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; +x_59 = lean_ctor_get(x_52, 0); +x_60 = lean_ctor_get(x_54, 0); +x_61 = lean_ctor_get(x_54, 1); +lean_inc(x_61); +lean_inc(x_60); +lean_dec(x_54); +lean_inc(x_59); +x_62 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_61, x_22, x_59); +x_63 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_63, 0, x_60); +lean_ctor_set(x_63, 1, x_62); +lean_ctor_set(x_52, 1, x_63); +return x_52; +} +} +else +{ +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_64 = lean_ctor_get(x_52, 1); +x_65 = lean_ctor_get(x_52, 0); +lean_inc(x_64); +lean_inc(x_65); +lean_dec(x_52); +x_66 = lean_ctor_get(x_64, 0); +lean_inc(x_66); +x_67 = lean_ctor_get(x_64, 1); +lean_inc(x_67); +if (lean_is_exclusive(x_64)) { + lean_ctor_release(x_64, 0); + lean_ctor_release(x_64, 1); + x_68 = x_64; +} else { + lean_dec_ref(x_64); + x_68 = lean_box(0); +} +lean_inc(x_65); +x_69 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_67, x_22, x_65); +if (lean_is_scalar(x_68)) { + x_70 = lean_alloc_ctor(0, 2, 0); +} else { + x_70 = x_68; +} +lean_ctor_set(x_70, 0, x_66); +lean_ctor_set(x_70, 1, x_69); +x_71 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_71, 0, x_65); +lean_ctor_set(x_71, 1, x_70); +return x_71; +} +} +else +{ +lean_object* x_72; lean_object* x_73; +lean_dec(x_22); +lean_dec(x_1); +x_72 = lean_ctor_get(x_51, 0); +lean_inc(x_72); +lean_dec(x_51); +x_73 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_73, 0, x_72); +lean_ctor_set(x_73, 1, x_7); +return x_73; +} +} +} +} +block_18: +{ +lean_object* x_9; lean_object* x_10; uint8_t x_11; +lean_dec(x_8); +x_9 = lean_unsigned_to_nat(0u); +x_10 = l_Array_ummapAux___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__4___rarg(x_1, x_9, x_3, x_7); +x_11 = !lean_is_exclusive(x_10); +if (x_11 == 0) +{ +lean_object* x_12; lean_object* x_13; +x_12 = lean_ctor_get(x_10, 0); +x_13 = l_Lean_mkAppRev(x_6, x_12); +lean_dec(x_12); +lean_ctor_set(x_10, 0, x_13); +return x_10; +} +else +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_14 = lean_ctor_get(x_10, 0); +x_15 = lean_ctor_get(x_10, 1); +lean_inc(x_15); +lean_inc(x_14); +lean_dec(x_10); +x_16 = l_Lean_mkAppRev(x_6, x_14); +lean_dec(x_14); +x_17 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_17, 0, x_16); +lean_ctor_set(x_17, 1, x_15); +return x_17; +} +} +} +} +case 1: +{ +uint8_t x_103; lean_object* x_104; lean_object* x_105; uint8_t x_173; +x_103 = l_Lean_Expr_isMVar(x_2); +x_173 = lean_expr_has_expr_mvar(x_2); +if (x_173 == 0) +{ +uint8_t x_174; +x_174 = lean_expr_has_level_mvar(x_2); +if (x_174 == 0) +{ +x_104 = x_2; +x_105 = x_4; +goto block_172; +} +else +{ +lean_object* x_175; lean_object* x_176; +x_175 = lean_ctor_get(x_4, 1); +lean_inc(x_175); +x_176 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_175, x_2); +lean_dec(x_175); +if (lean_obj_tag(x_176) == 0) +{ +lean_object* x_177; lean_object* x_178; lean_object* x_179; uint8_t x_180; +lean_inc(x_2); +lean_inc(x_1); +x_177 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_2, x_4); +x_178 = lean_ctor_get(x_177, 1); +lean_inc(x_178); +x_179 = lean_ctor_get(x_177, 0); +lean_inc(x_179); +lean_dec(x_177); +x_180 = !lean_is_exclusive(x_178); +if (x_180 == 0) +{ +lean_object* x_181; lean_object* x_182; +x_181 = lean_ctor_get(x_178, 1); +lean_inc(x_179); +x_182 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_181, x_2, x_179); +lean_ctor_set(x_178, 1, x_182); +x_104 = x_179; +x_105 = x_178; +goto block_172; +} +else +{ +lean_object* x_183; lean_object* x_184; lean_object* x_185; lean_object* x_186; +x_183 = lean_ctor_get(x_178, 0); +x_184 = lean_ctor_get(x_178, 1); +lean_inc(x_184); +lean_inc(x_183); +lean_dec(x_178); +lean_inc(x_179); +x_185 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_184, x_2, x_179); +x_186 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_186, 0, x_183); +lean_ctor_set(x_186, 1, x_185); +x_104 = x_179; +x_105 = x_186; +goto block_172; +} +} +else +{ +lean_object* x_187; +lean_dec(x_2); +x_187 = lean_ctor_get(x_176, 0); +lean_inc(x_187); +lean_dec(x_176); +x_104 = x_187; +x_105 = x_4; +goto block_172; +} +} +} +else +{ +lean_object* x_188; lean_object* x_189; +x_188 = lean_ctor_get(x_4, 1); +lean_inc(x_188); +x_189 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_188, x_2); +lean_dec(x_188); +if (lean_obj_tag(x_189) == 0) +{ +lean_object* x_190; lean_object* x_191; lean_object* x_192; uint8_t x_193; +lean_inc(x_2); +lean_inc(x_1); +x_190 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_2, x_4); +x_191 = lean_ctor_get(x_190, 1); +lean_inc(x_191); +x_192 = lean_ctor_get(x_190, 0); +lean_inc(x_192); +lean_dec(x_190); +x_193 = !lean_is_exclusive(x_191); +if (x_193 == 0) +{ +lean_object* x_194; lean_object* x_195; +x_194 = lean_ctor_get(x_191, 1); +lean_inc(x_192); +x_195 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_194, x_2, x_192); +lean_ctor_set(x_191, 1, x_195); +x_104 = x_192; +x_105 = x_191; +goto block_172; +} +else +{ +lean_object* x_196; lean_object* x_197; lean_object* x_198; lean_object* x_199; +x_196 = lean_ctor_get(x_191, 0); +x_197 = lean_ctor_get(x_191, 1); +lean_inc(x_197); +lean_inc(x_196); +lean_dec(x_191); +lean_inc(x_192); +x_198 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_197, x_2, x_192); +x_199 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_199, 0, x_196); +lean_ctor_set(x_199, 1, x_198); +x_104 = x_192; +x_105 = x_199; +goto block_172; +} +} +else +{ +lean_object* x_200; +lean_dec(x_2); +x_200 = lean_ctor_get(x_189, 0); +lean_inc(x_200); +lean_dec(x_189); +x_104 = x_200; +x_105 = x_4; +goto block_172; +} +} +block_172: +{ +lean_object* x_106; +if (x_103 == 0) +{ +lean_object* x_117; +x_117 = lean_box(0); +x_106 = x_117; +goto block_116; +} +else +{ +uint8_t x_118; +x_118 = l_Lean_Expr_isLambda(x_104); +if (x_118 == 0) +{ +lean_object* x_119; +x_119 = lean_box(0); +x_106 = x_119; +goto block_116; +} +else +{ +lean_object* x_120; uint8_t x_121; +x_120 = l_Lean_Expr_betaRev(x_104, x_3); +lean_dec(x_104); +x_121 = lean_expr_has_expr_mvar(x_120); +if (x_121 == 0) +{ +uint8_t x_122; +x_122 = lean_expr_has_level_mvar(x_120); +if (x_122 == 0) +{ +lean_object* x_123; +lean_dec(x_1); +x_123 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_123, 0, x_120); +lean_ctor_set(x_123, 1, x_105); +return x_123; +} +else +{ +lean_object* x_124; lean_object* x_125; +x_124 = lean_ctor_get(x_105, 1); +lean_inc(x_124); +x_125 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_124, x_120); +lean_dec(x_124); +if (lean_obj_tag(x_125) == 0) +{ +lean_object* x_126; uint8_t x_127; +lean_inc(x_120); +x_126 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_120, x_105); +x_127 = !lean_is_exclusive(x_126); +if (x_127 == 0) +{ +lean_object* x_128; uint8_t x_129; +x_128 = lean_ctor_get(x_126, 1); +x_129 = !lean_is_exclusive(x_128); +if (x_129 == 0) +{ +lean_object* x_130; lean_object* x_131; lean_object* x_132; +x_130 = lean_ctor_get(x_126, 0); +x_131 = lean_ctor_get(x_128, 1); +lean_inc(x_130); +x_132 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_131, x_120, x_130); +lean_ctor_set(x_128, 1, x_132); +return x_126; +} +else +{ +lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; +x_133 = lean_ctor_get(x_126, 0); +x_134 = lean_ctor_get(x_128, 0); +x_135 = lean_ctor_get(x_128, 1); +lean_inc(x_135); +lean_inc(x_134); +lean_dec(x_128); +lean_inc(x_133); +x_136 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_135, x_120, x_133); +x_137 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_137, 0, x_134); +lean_ctor_set(x_137, 1, x_136); +lean_ctor_set(x_126, 1, x_137); +return x_126; +} +} +else +{ +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; +x_138 = lean_ctor_get(x_126, 1); +x_139 = lean_ctor_get(x_126, 0); +lean_inc(x_138); +lean_inc(x_139); +lean_dec(x_126); +x_140 = lean_ctor_get(x_138, 0); +lean_inc(x_140); +x_141 = lean_ctor_get(x_138, 1); +lean_inc(x_141); +if (lean_is_exclusive(x_138)) { + lean_ctor_release(x_138, 0); + lean_ctor_release(x_138, 1); + x_142 = x_138; +} else { + lean_dec_ref(x_138); + x_142 = lean_box(0); +} +lean_inc(x_139); +x_143 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_141, x_120, x_139); +if (lean_is_scalar(x_142)) { + x_144 = lean_alloc_ctor(0, 2, 0); +} else { + x_144 = x_142; +} +lean_ctor_set(x_144, 0, x_140); +lean_ctor_set(x_144, 1, x_143); +x_145 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_145, 0, x_139); +lean_ctor_set(x_145, 1, x_144); +return x_145; +} +} +else +{ +lean_object* x_146; lean_object* x_147; +lean_dec(x_120); +lean_dec(x_1); +x_146 = lean_ctor_get(x_125, 0); +lean_inc(x_146); +lean_dec(x_125); +x_147 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_147, 0, x_146); +lean_ctor_set(x_147, 1, x_105); +return x_147; +} +} +} +else +{ +lean_object* x_148; lean_object* x_149; +x_148 = lean_ctor_get(x_105, 1); +lean_inc(x_148); +x_149 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_148, x_120); +lean_dec(x_148); +if (lean_obj_tag(x_149) == 0) +{ +lean_object* x_150; uint8_t x_151; +lean_inc(x_120); +x_150 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_120, x_105); +x_151 = !lean_is_exclusive(x_150); +if (x_151 == 0) +{ +lean_object* x_152; uint8_t x_153; +x_152 = lean_ctor_get(x_150, 1); +x_153 = !lean_is_exclusive(x_152); +if (x_153 == 0) +{ +lean_object* x_154; lean_object* x_155; lean_object* x_156; +x_154 = lean_ctor_get(x_150, 0); +x_155 = lean_ctor_get(x_152, 1); +lean_inc(x_154); +x_156 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_155, x_120, x_154); +lean_ctor_set(x_152, 1, x_156); +return x_150; +} +else +{ +lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_object* x_160; lean_object* x_161; +x_157 = lean_ctor_get(x_150, 0); +x_158 = lean_ctor_get(x_152, 0); +x_159 = lean_ctor_get(x_152, 1); +lean_inc(x_159); +lean_inc(x_158); +lean_dec(x_152); +lean_inc(x_157); +x_160 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_159, x_120, x_157); +x_161 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_161, 0, x_158); +lean_ctor_set(x_161, 1, x_160); +lean_ctor_set(x_150, 1, x_161); +return x_150; +} +} +else +{ +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; +x_162 = lean_ctor_get(x_150, 1); +x_163 = lean_ctor_get(x_150, 0); +lean_inc(x_162); +lean_inc(x_163); +lean_dec(x_150); +x_164 = lean_ctor_get(x_162, 0); +lean_inc(x_164); +x_165 = lean_ctor_get(x_162, 1); +lean_inc(x_165); +if (lean_is_exclusive(x_162)) { + lean_ctor_release(x_162, 0); + lean_ctor_release(x_162, 1); + x_166 = x_162; +} else { + lean_dec_ref(x_162); + x_166 = lean_box(0); +} +lean_inc(x_163); +x_167 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_165, x_120, x_163); +if (lean_is_scalar(x_166)) { + x_168 = lean_alloc_ctor(0, 2, 0); +} else { + x_168 = x_166; +} +lean_ctor_set(x_168, 0, x_164); +lean_ctor_set(x_168, 1, x_167); +x_169 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_169, 0, x_163); +lean_ctor_set(x_169, 1, x_168); +return x_169; +} +} +else +{ +lean_object* x_170; lean_object* x_171; +lean_dec(x_120); +lean_dec(x_1); +x_170 = lean_ctor_get(x_149, 0); +lean_inc(x_170); +lean_dec(x_149); +x_171 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_171, 0, x_170); +lean_ctor_set(x_171, 1, x_105); +return x_171; +} +} +} +} +block_116: +{ +lean_object* x_107; lean_object* x_108; uint8_t x_109; +lean_dec(x_106); +x_107 = lean_unsigned_to_nat(0u); +x_108 = l_Array_ummapAux___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__4___rarg(x_1, x_107, x_3, x_105); +x_109 = !lean_is_exclusive(x_108); +if (x_109 == 0) +{ +lean_object* x_110; lean_object* x_111; +x_110 = lean_ctor_get(x_108, 0); +x_111 = l_Lean_mkAppRev(x_104, x_110); +lean_dec(x_110); +lean_ctor_set(x_108, 0, x_111); +return x_108; +} +else +{ +lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; +x_112 = lean_ctor_get(x_108, 0); +x_113 = lean_ctor_get(x_108, 1); +lean_inc(x_113); +lean_inc(x_112); +lean_dec(x_108); +x_114 = l_Lean_mkAppRev(x_104, x_112); +lean_dec(x_112); +x_115 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_115, 0, x_114); +lean_ctor_set(x_115, 1, x_113); +return x_115; +} +} +} +} +case 2: +{ +uint8_t x_201; lean_object* x_202; lean_object* x_203; uint8_t x_271; +x_201 = l_Lean_Expr_isMVar(x_2); +x_271 = lean_expr_has_expr_mvar(x_2); +if (x_271 == 0) +{ +uint8_t x_272; +x_272 = lean_expr_has_level_mvar(x_2); +if (x_272 == 0) +{ +x_202 = x_2; +x_203 = x_4; +goto block_270; +} +else +{ +lean_object* x_273; lean_object* x_274; +x_273 = lean_ctor_get(x_4, 1); +lean_inc(x_273); +x_274 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_273, x_2); +lean_dec(x_273); +if (lean_obj_tag(x_274) == 0) +{ +lean_object* x_275; lean_object* x_276; lean_object* x_277; uint8_t x_278; +lean_inc(x_2); +lean_inc(x_1); +x_275 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_2, x_4); +x_276 = lean_ctor_get(x_275, 1); +lean_inc(x_276); +x_277 = lean_ctor_get(x_275, 0); +lean_inc(x_277); +lean_dec(x_275); +x_278 = !lean_is_exclusive(x_276); +if (x_278 == 0) +{ +lean_object* x_279; lean_object* x_280; +x_279 = lean_ctor_get(x_276, 1); +lean_inc(x_277); +x_280 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_279, x_2, x_277); +lean_ctor_set(x_276, 1, x_280); +x_202 = x_277; +x_203 = x_276; +goto block_270; +} +else +{ +lean_object* x_281; lean_object* x_282; lean_object* x_283; lean_object* x_284; +x_281 = lean_ctor_get(x_276, 0); +x_282 = lean_ctor_get(x_276, 1); +lean_inc(x_282); +lean_inc(x_281); +lean_dec(x_276); +lean_inc(x_277); +x_283 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_282, x_2, x_277); +x_284 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_284, 0, x_281); +lean_ctor_set(x_284, 1, x_283); +x_202 = x_277; +x_203 = x_284; +goto block_270; +} +} +else +{ +lean_object* x_285; +lean_dec(x_2); +x_285 = lean_ctor_get(x_274, 0); +lean_inc(x_285); +lean_dec(x_274); +x_202 = x_285; +x_203 = x_4; +goto block_270; +} +} +} +else +{ +lean_object* x_286; lean_object* x_287; +x_286 = lean_ctor_get(x_4, 1); +lean_inc(x_286); +x_287 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_286, x_2); +lean_dec(x_286); +if (lean_obj_tag(x_287) == 0) +{ +lean_object* x_288; lean_object* x_289; lean_object* x_290; uint8_t x_291; +lean_inc(x_2); +lean_inc(x_1); +x_288 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_2, x_4); +x_289 = lean_ctor_get(x_288, 1); +lean_inc(x_289); +x_290 = lean_ctor_get(x_288, 0); +lean_inc(x_290); +lean_dec(x_288); +x_291 = !lean_is_exclusive(x_289); +if (x_291 == 0) +{ +lean_object* x_292; lean_object* x_293; +x_292 = lean_ctor_get(x_289, 1); +lean_inc(x_290); +x_293 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_292, x_2, x_290); +lean_ctor_set(x_289, 1, x_293); +x_202 = x_290; +x_203 = x_289; +goto block_270; +} +else +{ +lean_object* x_294; lean_object* x_295; lean_object* x_296; lean_object* x_297; +x_294 = lean_ctor_get(x_289, 0); +x_295 = lean_ctor_get(x_289, 1); +lean_inc(x_295); +lean_inc(x_294); +lean_dec(x_289); +lean_inc(x_290); +x_296 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_295, x_2, x_290); +x_297 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_297, 0, x_294); +lean_ctor_set(x_297, 1, x_296); +x_202 = x_290; +x_203 = x_297; +goto block_270; +} +} +else +{ +lean_object* x_298; +lean_dec(x_2); +x_298 = lean_ctor_get(x_287, 0); +lean_inc(x_298); +lean_dec(x_287); +x_202 = x_298; +x_203 = x_4; +goto block_270; +} +} +block_270: +{ +lean_object* x_204; +if (x_201 == 0) +{ +lean_object* x_215; +x_215 = lean_box(0); +x_204 = x_215; +goto block_214; +} +else +{ +uint8_t x_216; +x_216 = l_Lean_Expr_isLambda(x_202); +if (x_216 == 0) +{ +lean_object* x_217; +x_217 = lean_box(0); +x_204 = x_217; +goto block_214; +} +else +{ +lean_object* x_218; uint8_t x_219; +x_218 = l_Lean_Expr_betaRev(x_202, x_3); +lean_dec(x_202); +x_219 = lean_expr_has_expr_mvar(x_218); +if (x_219 == 0) +{ +uint8_t x_220; +x_220 = lean_expr_has_level_mvar(x_218); +if (x_220 == 0) +{ +lean_object* x_221; +lean_dec(x_1); +x_221 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_221, 0, x_218); +lean_ctor_set(x_221, 1, x_203); +return x_221; +} +else +{ +lean_object* x_222; lean_object* x_223; +x_222 = lean_ctor_get(x_203, 1); +lean_inc(x_222); +x_223 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_222, x_218); +lean_dec(x_222); +if (lean_obj_tag(x_223) == 0) +{ +lean_object* x_224; uint8_t x_225; +lean_inc(x_218); +x_224 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_218, x_203); +x_225 = !lean_is_exclusive(x_224); +if (x_225 == 0) +{ +lean_object* x_226; uint8_t x_227; +x_226 = lean_ctor_get(x_224, 1); +x_227 = !lean_is_exclusive(x_226); +if (x_227 == 0) +{ +lean_object* x_228; lean_object* x_229; lean_object* x_230; +x_228 = lean_ctor_get(x_224, 0); +x_229 = lean_ctor_get(x_226, 1); +lean_inc(x_228); +x_230 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_229, x_218, x_228); +lean_ctor_set(x_226, 1, x_230); +return x_224; +} +else +{ +lean_object* x_231; lean_object* x_232; lean_object* x_233; lean_object* x_234; lean_object* x_235; +x_231 = lean_ctor_get(x_224, 0); +x_232 = lean_ctor_get(x_226, 0); +x_233 = lean_ctor_get(x_226, 1); +lean_inc(x_233); +lean_inc(x_232); +lean_dec(x_226); +lean_inc(x_231); +x_234 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_233, x_218, x_231); +x_235 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_235, 0, x_232); +lean_ctor_set(x_235, 1, x_234); +lean_ctor_set(x_224, 1, x_235); +return x_224; +} +} +else +{ +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; +x_236 = lean_ctor_get(x_224, 1); +x_237 = lean_ctor_get(x_224, 0); +lean_inc(x_236); +lean_inc(x_237); +lean_dec(x_224); +x_238 = lean_ctor_get(x_236, 0); +lean_inc(x_238); +x_239 = lean_ctor_get(x_236, 1); +lean_inc(x_239); +if (lean_is_exclusive(x_236)) { + lean_ctor_release(x_236, 0); + lean_ctor_release(x_236, 1); + x_240 = x_236; +} else { + lean_dec_ref(x_236); + x_240 = lean_box(0); +} +lean_inc(x_237); +x_241 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_239, x_218, x_237); +if (lean_is_scalar(x_240)) { + x_242 = lean_alloc_ctor(0, 2, 0); +} else { + x_242 = x_240; +} +lean_ctor_set(x_242, 0, x_238); +lean_ctor_set(x_242, 1, x_241); +x_243 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_243, 0, x_237); +lean_ctor_set(x_243, 1, x_242); +return x_243; +} +} +else +{ +lean_object* x_244; lean_object* x_245; +lean_dec(x_218); +lean_dec(x_1); +x_244 = lean_ctor_get(x_223, 0); +lean_inc(x_244); +lean_dec(x_223); +x_245 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_245, 0, x_244); +lean_ctor_set(x_245, 1, x_203); +return x_245; +} +} +} +else +{ +lean_object* x_246; lean_object* x_247; +x_246 = lean_ctor_get(x_203, 1); +lean_inc(x_246); +x_247 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_246, x_218); +lean_dec(x_246); +if (lean_obj_tag(x_247) == 0) +{ +lean_object* x_248; uint8_t x_249; +lean_inc(x_218); +x_248 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_218, x_203); +x_249 = !lean_is_exclusive(x_248); +if (x_249 == 0) +{ +lean_object* x_250; uint8_t x_251; +x_250 = lean_ctor_get(x_248, 1); +x_251 = !lean_is_exclusive(x_250); +if (x_251 == 0) +{ +lean_object* x_252; lean_object* x_253; lean_object* x_254; +x_252 = lean_ctor_get(x_248, 0); +x_253 = lean_ctor_get(x_250, 1); +lean_inc(x_252); +x_254 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_253, x_218, x_252); +lean_ctor_set(x_250, 1, x_254); +return x_248; +} +else +{ +lean_object* x_255; lean_object* x_256; lean_object* x_257; lean_object* x_258; lean_object* x_259; +x_255 = lean_ctor_get(x_248, 0); +x_256 = lean_ctor_get(x_250, 0); +x_257 = lean_ctor_get(x_250, 1); +lean_inc(x_257); +lean_inc(x_256); +lean_dec(x_250); +lean_inc(x_255); +x_258 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_257, x_218, x_255); +x_259 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_259, 0, x_256); +lean_ctor_set(x_259, 1, x_258); +lean_ctor_set(x_248, 1, x_259); +return x_248; +} +} +else +{ +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; +x_260 = lean_ctor_get(x_248, 1); +x_261 = lean_ctor_get(x_248, 0); +lean_inc(x_260); +lean_inc(x_261); +lean_dec(x_248); +x_262 = lean_ctor_get(x_260, 0); +lean_inc(x_262); +x_263 = lean_ctor_get(x_260, 1); +lean_inc(x_263); +if (lean_is_exclusive(x_260)) { + lean_ctor_release(x_260, 0); + lean_ctor_release(x_260, 1); + x_264 = x_260; +} else { + lean_dec_ref(x_260); + x_264 = lean_box(0); +} +lean_inc(x_261); +x_265 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_263, x_218, x_261); +if (lean_is_scalar(x_264)) { + x_266 = lean_alloc_ctor(0, 2, 0); +} else { + x_266 = x_264; +} +lean_ctor_set(x_266, 0, x_262); +lean_ctor_set(x_266, 1, x_265); +x_267 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_267, 0, x_261); +lean_ctor_set(x_267, 1, x_266); +return x_267; +} +} +else +{ +lean_object* x_268; lean_object* x_269; +lean_dec(x_218); +lean_dec(x_1); +x_268 = lean_ctor_get(x_247, 0); +lean_inc(x_268); +lean_dec(x_247); +x_269 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_269, 0, x_268); +lean_ctor_set(x_269, 1, x_203); +return x_269; +} +} +} +} +block_214: +{ +lean_object* x_205; lean_object* x_206; uint8_t x_207; +lean_dec(x_204); +x_205 = lean_unsigned_to_nat(0u); +x_206 = l_Array_ummapAux___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__4___rarg(x_1, x_205, x_3, x_203); +x_207 = !lean_is_exclusive(x_206); +if (x_207 == 0) +{ +lean_object* x_208; lean_object* x_209; +x_208 = lean_ctor_get(x_206, 0); +x_209 = l_Lean_mkAppRev(x_202, x_208); +lean_dec(x_208); +lean_ctor_set(x_206, 0, x_209); +return x_206; +} +else +{ +lean_object* x_210; lean_object* x_211; lean_object* x_212; lean_object* x_213; +x_210 = lean_ctor_get(x_206, 0); +x_211 = lean_ctor_get(x_206, 1); +lean_inc(x_211); +lean_inc(x_210); +lean_dec(x_206); +x_212 = l_Lean_mkAppRev(x_202, x_210); +lean_dec(x_210); +x_213 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_213, 0, x_212); +lean_ctor_set(x_213, 1, x_211); +return x_213; +} +} +} +} +case 3: +{ +uint8_t x_299; lean_object* x_300; lean_object* x_301; uint8_t x_369; +x_299 = l_Lean_Expr_isMVar(x_2); +x_369 = lean_expr_has_expr_mvar(x_2); +if (x_369 == 0) +{ +uint8_t x_370; +x_370 = lean_expr_has_level_mvar(x_2); +if (x_370 == 0) +{ +x_300 = x_2; +x_301 = x_4; +goto block_368; +} +else +{ +lean_object* x_371; lean_object* x_372; +x_371 = lean_ctor_get(x_4, 1); +lean_inc(x_371); +x_372 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_371, x_2); +lean_dec(x_371); +if (lean_obj_tag(x_372) == 0) +{ +lean_object* x_373; lean_object* x_374; lean_object* x_375; uint8_t x_376; +lean_inc(x_2); +lean_inc(x_1); +x_373 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_2, x_4); +x_374 = lean_ctor_get(x_373, 1); +lean_inc(x_374); +x_375 = lean_ctor_get(x_373, 0); +lean_inc(x_375); +lean_dec(x_373); +x_376 = !lean_is_exclusive(x_374); +if (x_376 == 0) +{ +lean_object* x_377; lean_object* x_378; +x_377 = lean_ctor_get(x_374, 1); +lean_inc(x_375); +x_378 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_377, x_2, x_375); +lean_ctor_set(x_374, 1, x_378); +x_300 = x_375; +x_301 = x_374; +goto block_368; +} +else +{ +lean_object* x_379; lean_object* x_380; lean_object* x_381; lean_object* x_382; +x_379 = lean_ctor_get(x_374, 0); +x_380 = lean_ctor_get(x_374, 1); +lean_inc(x_380); +lean_inc(x_379); +lean_dec(x_374); +lean_inc(x_375); +x_381 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_380, x_2, x_375); +x_382 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_382, 0, x_379); +lean_ctor_set(x_382, 1, x_381); +x_300 = x_375; +x_301 = x_382; +goto block_368; +} +} +else +{ +lean_object* x_383; +lean_dec(x_2); +x_383 = lean_ctor_get(x_372, 0); +lean_inc(x_383); +lean_dec(x_372); +x_300 = x_383; +x_301 = x_4; +goto block_368; +} +} +} +else +{ +lean_object* x_384; lean_object* x_385; +x_384 = lean_ctor_get(x_4, 1); +lean_inc(x_384); +x_385 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_384, x_2); +lean_dec(x_384); +if (lean_obj_tag(x_385) == 0) +{ +lean_object* x_386; lean_object* x_387; lean_object* x_388; uint8_t x_389; +lean_inc(x_2); +lean_inc(x_1); +x_386 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_2, x_4); +x_387 = lean_ctor_get(x_386, 1); +lean_inc(x_387); +x_388 = lean_ctor_get(x_386, 0); +lean_inc(x_388); +lean_dec(x_386); +x_389 = !lean_is_exclusive(x_387); +if (x_389 == 0) +{ +lean_object* x_390; lean_object* x_391; +x_390 = lean_ctor_get(x_387, 1); +lean_inc(x_388); +x_391 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_390, x_2, x_388); +lean_ctor_set(x_387, 1, x_391); +x_300 = x_388; +x_301 = x_387; +goto block_368; +} +else +{ +lean_object* x_392; lean_object* x_393; lean_object* x_394; lean_object* x_395; +x_392 = lean_ctor_get(x_387, 0); +x_393 = lean_ctor_get(x_387, 1); +lean_inc(x_393); +lean_inc(x_392); +lean_dec(x_387); +lean_inc(x_388); +x_394 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_393, x_2, x_388); +x_395 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_395, 0, x_392); +lean_ctor_set(x_395, 1, x_394); +x_300 = x_388; +x_301 = x_395; +goto block_368; +} +} +else +{ +lean_object* x_396; +lean_dec(x_2); +x_396 = lean_ctor_get(x_385, 0); +lean_inc(x_396); +lean_dec(x_385); +x_300 = x_396; +x_301 = x_4; +goto block_368; +} +} +block_368: +{ +lean_object* x_302; +if (x_299 == 0) +{ +lean_object* x_313; +x_313 = lean_box(0); +x_302 = x_313; +goto block_312; +} +else +{ +uint8_t x_314; +x_314 = l_Lean_Expr_isLambda(x_300); +if (x_314 == 0) +{ +lean_object* x_315; +x_315 = lean_box(0); +x_302 = x_315; +goto block_312; +} +else +{ +lean_object* x_316; uint8_t x_317; +x_316 = l_Lean_Expr_betaRev(x_300, x_3); +lean_dec(x_300); +x_317 = lean_expr_has_expr_mvar(x_316); +if (x_317 == 0) +{ +uint8_t x_318; +x_318 = lean_expr_has_level_mvar(x_316); +if (x_318 == 0) +{ +lean_object* x_319; +lean_dec(x_1); +x_319 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_319, 0, x_316); +lean_ctor_set(x_319, 1, x_301); +return x_319; +} +else +{ +lean_object* x_320; lean_object* x_321; +x_320 = lean_ctor_get(x_301, 1); +lean_inc(x_320); +x_321 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_320, x_316); +lean_dec(x_320); +if (lean_obj_tag(x_321) == 0) +{ +lean_object* x_322; uint8_t x_323; +lean_inc(x_316); +x_322 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_316, x_301); +x_323 = !lean_is_exclusive(x_322); +if (x_323 == 0) +{ +lean_object* x_324; uint8_t x_325; +x_324 = lean_ctor_get(x_322, 1); +x_325 = !lean_is_exclusive(x_324); +if (x_325 == 0) +{ +lean_object* x_326; lean_object* x_327; lean_object* x_328; +x_326 = lean_ctor_get(x_322, 0); +x_327 = lean_ctor_get(x_324, 1); +lean_inc(x_326); +x_328 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_327, x_316, x_326); +lean_ctor_set(x_324, 1, x_328); +return x_322; +} +else +{ +lean_object* x_329; lean_object* x_330; lean_object* x_331; lean_object* x_332; lean_object* x_333; +x_329 = lean_ctor_get(x_322, 0); +x_330 = lean_ctor_get(x_324, 0); +x_331 = lean_ctor_get(x_324, 1); +lean_inc(x_331); +lean_inc(x_330); +lean_dec(x_324); +lean_inc(x_329); +x_332 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_331, x_316, x_329); +x_333 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_333, 0, x_330); +lean_ctor_set(x_333, 1, x_332); +lean_ctor_set(x_322, 1, x_333); +return x_322; +} +} +else +{ +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; +x_334 = lean_ctor_get(x_322, 1); +x_335 = lean_ctor_get(x_322, 0); +lean_inc(x_334); +lean_inc(x_335); +lean_dec(x_322); +x_336 = lean_ctor_get(x_334, 0); +lean_inc(x_336); +x_337 = lean_ctor_get(x_334, 1); +lean_inc(x_337); +if (lean_is_exclusive(x_334)) { + lean_ctor_release(x_334, 0); + lean_ctor_release(x_334, 1); + x_338 = x_334; +} else { + lean_dec_ref(x_334); + x_338 = lean_box(0); +} +lean_inc(x_335); +x_339 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_337, x_316, x_335); +if (lean_is_scalar(x_338)) { + x_340 = lean_alloc_ctor(0, 2, 0); +} else { + x_340 = x_338; +} +lean_ctor_set(x_340, 0, x_336); +lean_ctor_set(x_340, 1, x_339); +x_341 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_341, 0, x_335); +lean_ctor_set(x_341, 1, x_340); +return x_341; +} +} +else +{ +lean_object* x_342; lean_object* x_343; +lean_dec(x_316); +lean_dec(x_1); +x_342 = lean_ctor_get(x_321, 0); +lean_inc(x_342); +lean_dec(x_321); +x_343 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_343, 0, x_342); +lean_ctor_set(x_343, 1, x_301); +return x_343; +} +} +} +else +{ +lean_object* x_344; lean_object* x_345; +x_344 = lean_ctor_get(x_301, 1); +lean_inc(x_344); +x_345 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_344, x_316); +lean_dec(x_344); +if (lean_obj_tag(x_345) == 0) +{ +lean_object* x_346; uint8_t x_347; +lean_inc(x_316); +x_346 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_316, x_301); +x_347 = !lean_is_exclusive(x_346); +if (x_347 == 0) +{ +lean_object* x_348; uint8_t x_349; +x_348 = lean_ctor_get(x_346, 1); +x_349 = !lean_is_exclusive(x_348); +if (x_349 == 0) +{ +lean_object* x_350; lean_object* x_351; lean_object* x_352; +x_350 = lean_ctor_get(x_346, 0); +x_351 = lean_ctor_get(x_348, 1); +lean_inc(x_350); +x_352 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_351, x_316, x_350); +lean_ctor_set(x_348, 1, x_352); +return x_346; +} +else +{ +lean_object* x_353; lean_object* x_354; lean_object* x_355; lean_object* x_356; lean_object* x_357; +x_353 = lean_ctor_get(x_346, 0); +x_354 = lean_ctor_get(x_348, 0); +x_355 = lean_ctor_get(x_348, 1); +lean_inc(x_355); +lean_inc(x_354); +lean_dec(x_348); +lean_inc(x_353); +x_356 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_355, x_316, x_353); +x_357 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_357, 0, x_354); +lean_ctor_set(x_357, 1, x_356); +lean_ctor_set(x_346, 1, x_357); +return x_346; +} +} +else +{ +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_358 = lean_ctor_get(x_346, 1); +x_359 = lean_ctor_get(x_346, 0); +lean_inc(x_358); +lean_inc(x_359); +lean_dec(x_346); +x_360 = lean_ctor_get(x_358, 0); +lean_inc(x_360); +x_361 = lean_ctor_get(x_358, 1); +lean_inc(x_361); +if (lean_is_exclusive(x_358)) { + lean_ctor_release(x_358, 0); + lean_ctor_release(x_358, 1); + x_362 = x_358; +} else { + lean_dec_ref(x_358); + x_362 = lean_box(0); +} +lean_inc(x_359); +x_363 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_361, x_316, x_359); +if (lean_is_scalar(x_362)) { + x_364 = lean_alloc_ctor(0, 2, 0); +} else { + x_364 = x_362; +} +lean_ctor_set(x_364, 0, x_360); +lean_ctor_set(x_364, 1, x_363); +x_365 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_365, 0, x_359); +lean_ctor_set(x_365, 1, x_364); +return x_365; +} +} +else +{ +lean_object* x_366; lean_object* x_367; +lean_dec(x_316); +lean_dec(x_1); +x_366 = lean_ctor_get(x_345, 0); +lean_inc(x_366); +lean_dec(x_345); +x_367 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_367, 0, x_366); +lean_ctor_set(x_367, 1, x_301); +return x_367; +} +} +} +} +block_312: +{ +lean_object* x_303; lean_object* x_304; uint8_t x_305; +lean_dec(x_302); +x_303 = lean_unsigned_to_nat(0u); +x_304 = l_Array_ummapAux___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__4___rarg(x_1, x_303, x_3, x_301); +x_305 = !lean_is_exclusive(x_304); +if (x_305 == 0) +{ +lean_object* x_306; lean_object* x_307; +x_306 = lean_ctor_get(x_304, 0); +x_307 = l_Lean_mkAppRev(x_300, x_306); +lean_dec(x_306); +lean_ctor_set(x_304, 0, x_307); +return x_304; +} +else +{ +lean_object* x_308; lean_object* x_309; lean_object* x_310; lean_object* x_311; +x_308 = lean_ctor_get(x_304, 0); +x_309 = lean_ctor_get(x_304, 1); +lean_inc(x_309); +lean_inc(x_308); +lean_dec(x_304); +x_310 = l_Lean_mkAppRev(x_300, x_308); +lean_dec(x_308); +x_311 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_311, 0, x_310); +lean_ctor_set(x_311, 1, x_309); +return x_311; +} +} +} +} +case 4: +{ +uint8_t x_397; lean_object* x_398; lean_object* x_399; uint8_t x_467; +x_397 = l_Lean_Expr_isMVar(x_2); +x_467 = lean_expr_has_expr_mvar(x_2); +if (x_467 == 0) +{ +uint8_t x_468; +x_468 = lean_expr_has_level_mvar(x_2); +if (x_468 == 0) +{ +x_398 = x_2; +x_399 = x_4; +goto block_466; +} +else +{ +lean_object* x_469; lean_object* x_470; +x_469 = lean_ctor_get(x_4, 1); +lean_inc(x_469); +x_470 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_469, x_2); +lean_dec(x_469); +if (lean_obj_tag(x_470) == 0) +{ +lean_object* x_471; lean_object* x_472; lean_object* x_473; uint8_t x_474; +lean_inc(x_2); +lean_inc(x_1); +x_471 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_2, x_4); +x_472 = lean_ctor_get(x_471, 1); +lean_inc(x_472); +x_473 = lean_ctor_get(x_471, 0); +lean_inc(x_473); +lean_dec(x_471); +x_474 = !lean_is_exclusive(x_472); +if (x_474 == 0) +{ +lean_object* x_475; lean_object* x_476; +x_475 = lean_ctor_get(x_472, 1); +lean_inc(x_473); +x_476 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_475, x_2, x_473); +lean_ctor_set(x_472, 1, x_476); +x_398 = x_473; +x_399 = x_472; +goto block_466; +} +else +{ +lean_object* x_477; lean_object* x_478; lean_object* x_479; lean_object* x_480; +x_477 = lean_ctor_get(x_472, 0); +x_478 = lean_ctor_get(x_472, 1); +lean_inc(x_478); +lean_inc(x_477); +lean_dec(x_472); +lean_inc(x_473); +x_479 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_478, x_2, x_473); +x_480 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_480, 0, x_477); +lean_ctor_set(x_480, 1, x_479); +x_398 = x_473; +x_399 = x_480; +goto block_466; +} +} +else +{ +lean_object* x_481; +lean_dec(x_2); +x_481 = lean_ctor_get(x_470, 0); +lean_inc(x_481); +lean_dec(x_470); +x_398 = x_481; +x_399 = x_4; +goto block_466; +} +} +} +else +{ +lean_object* x_482; lean_object* x_483; +x_482 = lean_ctor_get(x_4, 1); +lean_inc(x_482); +x_483 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_482, x_2); +lean_dec(x_482); +if (lean_obj_tag(x_483) == 0) +{ +lean_object* x_484; lean_object* x_485; lean_object* x_486; uint8_t x_487; +lean_inc(x_2); +lean_inc(x_1); +x_484 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_2, x_4); +x_485 = lean_ctor_get(x_484, 1); +lean_inc(x_485); +x_486 = lean_ctor_get(x_484, 0); +lean_inc(x_486); +lean_dec(x_484); +x_487 = !lean_is_exclusive(x_485); +if (x_487 == 0) +{ +lean_object* x_488; lean_object* x_489; +x_488 = lean_ctor_get(x_485, 1); +lean_inc(x_486); +x_489 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_488, x_2, x_486); +lean_ctor_set(x_485, 1, x_489); +x_398 = x_486; +x_399 = x_485; +goto block_466; +} +else +{ +lean_object* x_490; lean_object* x_491; lean_object* x_492; lean_object* x_493; +x_490 = lean_ctor_get(x_485, 0); +x_491 = lean_ctor_get(x_485, 1); +lean_inc(x_491); +lean_inc(x_490); +lean_dec(x_485); +lean_inc(x_486); +x_492 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_491, x_2, x_486); +x_493 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_493, 0, x_490); +lean_ctor_set(x_493, 1, x_492); +x_398 = x_486; +x_399 = x_493; +goto block_466; +} +} +else +{ +lean_object* x_494; +lean_dec(x_2); +x_494 = lean_ctor_get(x_483, 0); +lean_inc(x_494); +lean_dec(x_483); +x_398 = x_494; +x_399 = x_4; +goto block_466; +} +} +block_466: +{ +lean_object* x_400; +if (x_397 == 0) +{ +lean_object* x_411; +x_411 = lean_box(0); +x_400 = x_411; +goto block_410; +} +else +{ +uint8_t x_412; +x_412 = l_Lean_Expr_isLambda(x_398); +if (x_412 == 0) +{ +lean_object* x_413; +x_413 = lean_box(0); +x_400 = x_413; +goto block_410; +} +else +{ +lean_object* x_414; uint8_t x_415; +x_414 = l_Lean_Expr_betaRev(x_398, x_3); +lean_dec(x_398); +x_415 = lean_expr_has_expr_mvar(x_414); +if (x_415 == 0) +{ +uint8_t x_416; +x_416 = lean_expr_has_level_mvar(x_414); +if (x_416 == 0) +{ +lean_object* x_417; +lean_dec(x_1); +x_417 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_417, 0, x_414); +lean_ctor_set(x_417, 1, x_399); +return x_417; +} +else +{ +lean_object* x_418; lean_object* x_419; +x_418 = lean_ctor_get(x_399, 1); +lean_inc(x_418); +x_419 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_418, x_414); +lean_dec(x_418); +if (lean_obj_tag(x_419) == 0) +{ +lean_object* x_420; uint8_t x_421; +lean_inc(x_414); +x_420 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_414, x_399); +x_421 = !lean_is_exclusive(x_420); +if (x_421 == 0) +{ +lean_object* x_422; uint8_t x_423; +x_422 = lean_ctor_get(x_420, 1); +x_423 = !lean_is_exclusive(x_422); +if (x_423 == 0) +{ +lean_object* x_424; lean_object* x_425; lean_object* x_426; +x_424 = lean_ctor_get(x_420, 0); +x_425 = lean_ctor_get(x_422, 1); +lean_inc(x_424); +x_426 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_425, x_414, x_424); +lean_ctor_set(x_422, 1, x_426); +return x_420; +} +else +{ +lean_object* x_427; lean_object* x_428; lean_object* x_429; lean_object* x_430; lean_object* x_431; +x_427 = lean_ctor_get(x_420, 0); +x_428 = lean_ctor_get(x_422, 0); +x_429 = lean_ctor_get(x_422, 1); +lean_inc(x_429); +lean_inc(x_428); +lean_dec(x_422); +lean_inc(x_427); +x_430 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_429, x_414, x_427); +x_431 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_431, 0, x_428); +lean_ctor_set(x_431, 1, x_430); +lean_ctor_set(x_420, 1, x_431); +return x_420; +} +} +else +{ +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; +x_432 = lean_ctor_get(x_420, 1); +x_433 = lean_ctor_get(x_420, 0); +lean_inc(x_432); +lean_inc(x_433); +lean_dec(x_420); +x_434 = lean_ctor_get(x_432, 0); +lean_inc(x_434); +x_435 = lean_ctor_get(x_432, 1); +lean_inc(x_435); +if (lean_is_exclusive(x_432)) { + lean_ctor_release(x_432, 0); + lean_ctor_release(x_432, 1); + x_436 = x_432; +} else { + lean_dec_ref(x_432); + x_436 = lean_box(0); +} +lean_inc(x_433); +x_437 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_435, x_414, x_433); +if (lean_is_scalar(x_436)) { + x_438 = lean_alloc_ctor(0, 2, 0); +} else { + x_438 = x_436; +} +lean_ctor_set(x_438, 0, x_434); +lean_ctor_set(x_438, 1, x_437); +x_439 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_439, 0, x_433); +lean_ctor_set(x_439, 1, x_438); +return x_439; +} +} +else +{ +lean_object* x_440; lean_object* x_441; +lean_dec(x_414); +lean_dec(x_1); +x_440 = lean_ctor_get(x_419, 0); +lean_inc(x_440); +lean_dec(x_419); +x_441 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_441, 0, x_440); +lean_ctor_set(x_441, 1, x_399); +return x_441; +} +} +} +else +{ +lean_object* x_442; lean_object* x_443; +x_442 = lean_ctor_get(x_399, 1); +lean_inc(x_442); +x_443 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_442, x_414); +lean_dec(x_442); +if (lean_obj_tag(x_443) == 0) +{ +lean_object* x_444; uint8_t x_445; +lean_inc(x_414); +x_444 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_414, x_399); +x_445 = !lean_is_exclusive(x_444); +if (x_445 == 0) +{ +lean_object* x_446; uint8_t x_447; +x_446 = lean_ctor_get(x_444, 1); +x_447 = !lean_is_exclusive(x_446); +if (x_447 == 0) +{ +lean_object* x_448; lean_object* x_449; lean_object* x_450; +x_448 = lean_ctor_get(x_444, 0); +x_449 = lean_ctor_get(x_446, 1); +lean_inc(x_448); +x_450 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_449, x_414, x_448); +lean_ctor_set(x_446, 1, x_450); +return x_444; +} +else +{ +lean_object* x_451; lean_object* x_452; lean_object* x_453; lean_object* x_454; lean_object* x_455; +x_451 = lean_ctor_get(x_444, 0); +x_452 = lean_ctor_get(x_446, 0); +x_453 = lean_ctor_get(x_446, 1); +lean_inc(x_453); +lean_inc(x_452); +lean_dec(x_446); +lean_inc(x_451); +x_454 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_453, x_414, x_451); +x_455 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_455, 0, x_452); +lean_ctor_set(x_455, 1, x_454); +lean_ctor_set(x_444, 1, x_455); +return x_444; +} +} +else +{ +lean_object* x_456; lean_object* x_457; lean_object* x_458; lean_object* x_459; lean_object* x_460; lean_object* x_461; lean_object* x_462; lean_object* x_463; +x_456 = lean_ctor_get(x_444, 1); +x_457 = lean_ctor_get(x_444, 0); +lean_inc(x_456); +lean_inc(x_457); +lean_dec(x_444); +x_458 = lean_ctor_get(x_456, 0); +lean_inc(x_458); +x_459 = lean_ctor_get(x_456, 1); +lean_inc(x_459); +if (lean_is_exclusive(x_456)) { + lean_ctor_release(x_456, 0); + lean_ctor_release(x_456, 1); + x_460 = x_456; +} else { + lean_dec_ref(x_456); + x_460 = lean_box(0); +} +lean_inc(x_457); +x_461 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_459, x_414, x_457); +if (lean_is_scalar(x_460)) { + x_462 = lean_alloc_ctor(0, 2, 0); +} else { + x_462 = x_460; +} +lean_ctor_set(x_462, 0, x_458); +lean_ctor_set(x_462, 1, x_461); +x_463 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_463, 0, x_457); +lean_ctor_set(x_463, 1, x_462); +return x_463; +} +} +else +{ +lean_object* x_464; lean_object* x_465; +lean_dec(x_414); +lean_dec(x_1); +x_464 = lean_ctor_get(x_443, 0); +lean_inc(x_464); +lean_dec(x_443); +x_465 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_465, 0, x_464); +lean_ctor_set(x_465, 1, x_399); +return x_465; +} +} +} +} +block_410: +{ +lean_object* x_401; lean_object* x_402; uint8_t x_403; +lean_dec(x_400); +x_401 = lean_unsigned_to_nat(0u); +x_402 = l_Array_ummapAux___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__4___rarg(x_1, x_401, x_3, x_399); +x_403 = !lean_is_exclusive(x_402); +if (x_403 == 0) +{ +lean_object* x_404; lean_object* x_405; +x_404 = lean_ctor_get(x_402, 0); +x_405 = l_Lean_mkAppRev(x_398, x_404); +lean_dec(x_404); +lean_ctor_set(x_402, 0, x_405); +return x_402; +} +else +{ +lean_object* x_406; lean_object* x_407; lean_object* x_408; lean_object* x_409; +x_406 = lean_ctor_get(x_402, 0); +x_407 = lean_ctor_get(x_402, 1); +lean_inc(x_407); +lean_inc(x_406); +lean_dec(x_402); +x_408 = l_Lean_mkAppRev(x_398, x_406); +lean_dec(x_406); +x_409 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_409, 0, x_408); +lean_ctor_set(x_409, 1, x_407); +return x_409; +} +} +} +} +case 5: +{ +lean_object* x_495; lean_object* x_496; lean_object* x_497; +x_495 = lean_ctor_get(x_2, 0); +lean_inc(x_495); +x_496 = lean_ctor_get(x_2, 1); +lean_inc(x_496); +lean_dec(x_2); +x_497 = lean_array_push(x_3, x_496); +x_2 = x_495; +x_3 = x_497; +goto _start; +} +case 6: +{ +uint8_t x_499; lean_object* x_500; lean_object* x_501; uint8_t x_569; +x_499 = l_Lean_Expr_isMVar(x_2); +x_569 = lean_expr_has_expr_mvar(x_2); +if (x_569 == 0) +{ +uint8_t x_570; +x_570 = lean_expr_has_level_mvar(x_2); +if (x_570 == 0) +{ +x_500 = x_2; +x_501 = x_4; +goto block_568; +} +else +{ +lean_object* x_571; lean_object* x_572; +x_571 = lean_ctor_get(x_4, 1); +lean_inc(x_571); +x_572 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_571, x_2); +lean_dec(x_571); +if (lean_obj_tag(x_572) == 0) +{ +lean_object* x_573; lean_object* x_574; lean_object* x_575; uint8_t x_576; +lean_inc(x_2); +lean_inc(x_1); +x_573 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_2, x_4); +x_574 = lean_ctor_get(x_573, 1); +lean_inc(x_574); +x_575 = lean_ctor_get(x_573, 0); +lean_inc(x_575); +lean_dec(x_573); +x_576 = !lean_is_exclusive(x_574); +if (x_576 == 0) +{ +lean_object* x_577; lean_object* x_578; +x_577 = lean_ctor_get(x_574, 1); +lean_inc(x_575); +x_578 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_577, x_2, x_575); +lean_ctor_set(x_574, 1, x_578); +x_500 = x_575; +x_501 = x_574; +goto block_568; +} +else +{ +lean_object* x_579; lean_object* x_580; lean_object* x_581; lean_object* x_582; +x_579 = lean_ctor_get(x_574, 0); +x_580 = lean_ctor_get(x_574, 1); +lean_inc(x_580); +lean_inc(x_579); +lean_dec(x_574); +lean_inc(x_575); +x_581 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_580, x_2, x_575); +x_582 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_582, 0, x_579); +lean_ctor_set(x_582, 1, x_581); +x_500 = x_575; +x_501 = x_582; +goto block_568; +} +} +else +{ +lean_object* x_583; +lean_dec(x_2); +x_583 = lean_ctor_get(x_572, 0); +lean_inc(x_583); +lean_dec(x_572); +x_500 = x_583; +x_501 = x_4; +goto block_568; +} +} +} +else +{ +lean_object* x_584; lean_object* x_585; +x_584 = lean_ctor_get(x_4, 1); +lean_inc(x_584); +x_585 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_584, x_2); +lean_dec(x_584); +if (lean_obj_tag(x_585) == 0) +{ +lean_object* x_586; lean_object* x_587; lean_object* x_588; uint8_t x_589; +lean_inc(x_2); +lean_inc(x_1); +x_586 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_2, x_4); +x_587 = lean_ctor_get(x_586, 1); +lean_inc(x_587); +x_588 = lean_ctor_get(x_586, 0); +lean_inc(x_588); +lean_dec(x_586); +x_589 = !lean_is_exclusive(x_587); +if (x_589 == 0) +{ +lean_object* x_590; lean_object* x_591; +x_590 = lean_ctor_get(x_587, 1); +lean_inc(x_588); +x_591 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_590, x_2, x_588); +lean_ctor_set(x_587, 1, x_591); +x_500 = x_588; +x_501 = x_587; +goto block_568; +} +else +{ +lean_object* x_592; lean_object* x_593; lean_object* x_594; lean_object* x_595; +x_592 = lean_ctor_get(x_587, 0); +x_593 = lean_ctor_get(x_587, 1); +lean_inc(x_593); +lean_inc(x_592); +lean_dec(x_587); +lean_inc(x_588); +x_594 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_593, x_2, x_588); +x_595 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_595, 0, x_592); +lean_ctor_set(x_595, 1, x_594); +x_500 = x_588; +x_501 = x_595; +goto block_568; +} +} +else +{ +lean_object* x_596; +lean_dec(x_2); +x_596 = lean_ctor_get(x_585, 0); +lean_inc(x_596); +lean_dec(x_585); +x_500 = x_596; +x_501 = x_4; +goto block_568; +} +} +block_568: +{ +lean_object* x_502; +if (x_499 == 0) +{ +lean_object* x_513; +x_513 = lean_box(0); +x_502 = x_513; +goto block_512; +} +else +{ +uint8_t x_514; +x_514 = l_Lean_Expr_isLambda(x_500); +if (x_514 == 0) +{ +lean_object* x_515; +x_515 = lean_box(0); +x_502 = x_515; +goto block_512; +} +else +{ +lean_object* x_516; uint8_t x_517; +x_516 = l_Lean_Expr_betaRev(x_500, x_3); +lean_dec(x_500); +x_517 = lean_expr_has_expr_mvar(x_516); +if (x_517 == 0) +{ +uint8_t x_518; +x_518 = lean_expr_has_level_mvar(x_516); +if (x_518 == 0) +{ +lean_object* x_519; +lean_dec(x_1); +x_519 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_519, 0, x_516); +lean_ctor_set(x_519, 1, x_501); +return x_519; +} +else +{ +lean_object* x_520; lean_object* x_521; +x_520 = lean_ctor_get(x_501, 1); +lean_inc(x_520); +x_521 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_520, x_516); +lean_dec(x_520); +if (lean_obj_tag(x_521) == 0) +{ +lean_object* x_522; uint8_t x_523; +lean_inc(x_516); +x_522 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_516, x_501); +x_523 = !lean_is_exclusive(x_522); +if (x_523 == 0) +{ +lean_object* x_524; uint8_t x_525; +x_524 = lean_ctor_get(x_522, 1); +x_525 = !lean_is_exclusive(x_524); +if (x_525 == 0) +{ +lean_object* x_526; lean_object* x_527; lean_object* x_528; +x_526 = lean_ctor_get(x_522, 0); +x_527 = lean_ctor_get(x_524, 1); +lean_inc(x_526); +x_528 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_527, x_516, x_526); +lean_ctor_set(x_524, 1, x_528); +return x_522; +} +else +{ +lean_object* x_529; lean_object* x_530; lean_object* x_531; lean_object* x_532; lean_object* x_533; +x_529 = lean_ctor_get(x_522, 0); +x_530 = lean_ctor_get(x_524, 0); +x_531 = lean_ctor_get(x_524, 1); +lean_inc(x_531); +lean_inc(x_530); +lean_dec(x_524); +lean_inc(x_529); +x_532 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_531, x_516, x_529); +x_533 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_533, 0, x_530); +lean_ctor_set(x_533, 1, x_532); +lean_ctor_set(x_522, 1, x_533); +return x_522; +} +} +else +{ +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; +x_534 = lean_ctor_get(x_522, 1); +x_535 = lean_ctor_get(x_522, 0); +lean_inc(x_534); +lean_inc(x_535); +lean_dec(x_522); +x_536 = lean_ctor_get(x_534, 0); +lean_inc(x_536); +x_537 = lean_ctor_get(x_534, 1); +lean_inc(x_537); +if (lean_is_exclusive(x_534)) { + lean_ctor_release(x_534, 0); + lean_ctor_release(x_534, 1); + x_538 = x_534; +} else { + lean_dec_ref(x_534); + x_538 = lean_box(0); +} +lean_inc(x_535); +x_539 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_537, x_516, x_535); +if (lean_is_scalar(x_538)) { + x_540 = lean_alloc_ctor(0, 2, 0); +} else { + x_540 = x_538; +} +lean_ctor_set(x_540, 0, x_536); +lean_ctor_set(x_540, 1, x_539); +x_541 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_541, 0, x_535); +lean_ctor_set(x_541, 1, x_540); +return x_541; +} +} +else +{ +lean_object* x_542; lean_object* x_543; +lean_dec(x_516); +lean_dec(x_1); +x_542 = lean_ctor_get(x_521, 0); +lean_inc(x_542); +lean_dec(x_521); +x_543 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_543, 0, x_542); +lean_ctor_set(x_543, 1, x_501); +return x_543; +} +} +} +else +{ +lean_object* x_544; lean_object* x_545; +x_544 = lean_ctor_get(x_501, 1); +lean_inc(x_544); +x_545 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_544, x_516); +lean_dec(x_544); +if (lean_obj_tag(x_545) == 0) +{ +lean_object* x_546; uint8_t x_547; +lean_inc(x_516); +x_546 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_516, x_501); +x_547 = !lean_is_exclusive(x_546); +if (x_547 == 0) +{ +lean_object* x_548; uint8_t x_549; +x_548 = lean_ctor_get(x_546, 1); +x_549 = !lean_is_exclusive(x_548); +if (x_549 == 0) +{ +lean_object* x_550; lean_object* x_551; lean_object* x_552; +x_550 = lean_ctor_get(x_546, 0); +x_551 = lean_ctor_get(x_548, 1); +lean_inc(x_550); +x_552 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_551, x_516, x_550); +lean_ctor_set(x_548, 1, x_552); +return x_546; +} +else +{ +lean_object* x_553; lean_object* x_554; lean_object* x_555; lean_object* x_556; lean_object* x_557; +x_553 = lean_ctor_get(x_546, 0); +x_554 = lean_ctor_get(x_548, 0); +x_555 = lean_ctor_get(x_548, 1); +lean_inc(x_555); +lean_inc(x_554); +lean_dec(x_548); +lean_inc(x_553); +x_556 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_555, x_516, x_553); +x_557 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_557, 0, x_554); +lean_ctor_set(x_557, 1, x_556); +lean_ctor_set(x_546, 1, x_557); +return x_546; +} +} +else +{ +lean_object* x_558; lean_object* x_559; lean_object* x_560; lean_object* x_561; lean_object* x_562; lean_object* x_563; lean_object* x_564; lean_object* x_565; +x_558 = lean_ctor_get(x_546, 1); +x_559 = lean_ctor_get(x_546, 0); +lean_inc(x_558); +lean_inc(x_559); +lean_dec(x_546); +x_560 = lean_ctor_get(x_558, 0); +lean_inc(x_560); +x_561 = lean_ctor_get(x_558, 1); +lean_inc(x_561); +if (lean_is_exclusive(x_558)) { + lean_ctor_release(x_558, 0); + lean_ctor_release(x_558, 1); + x_562 = x_558; +} else { + lean_dec_ref(x_558); + x_562 = lean_box(0); +} +lean_inc(x_559); +x_563 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_561, x_516, x_559); +if (lean_is_scalar(x_562)) { + x_564 = lean_alloc_ctor(0, 2, 0); +} else { + x_564 = x_562; +} +lean_ctor_set(x_564, 0, x_560); +lean_ctor_set(x_564, 1, x_563); +x_565 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_565, 0, x_559); +lean_ctor_set(x_565, 1, x_564); +return x_565; +} +} +else +{ +lean_object* x_566; lean_object* x_567; +lean_dec(x_516); +lean_dec(x_1); +x_566 = lean_ctor_get(x_545, 0); +lean_inc(x_566); +lean_dec(x_545); +x_567 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_567, 0, x_566); +lean_ctor_set(x_567, 1, x_501); +return x_567; +} +} +} +} +block_512: +{ +lean_object* x_503; lean_object* x_504; uint8_t x_505; +lean_dec(x_502); +x_503 = lean_unsigned_to_nat(0u); +x_504 = l_Array_ummapAux___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__4___rarg(x_1, x_503, x_3, x_501); +x_505 = !lean_is_exclusive(x_504); +if (x_505 == 0) +{ +lean_object* x_506; lean_object* x_507; +x_506 = lean_ctor_get(x_504, 0); +x_507 = l_Lean_mkAppRev(x_500, x_506); +lean_dec(x_506); +lean_ctor_set(x_504, 0, x_507); +return x_504; +} +else +{ +lean_object* x_508; lean_object* x_509; lean_object* x_510; lean_object* x_511; +x_508 = lean_ctor_get(x_504, 0); +x_509 = lean_ctor_get(x_504, 1); +lean_inc(x_509); +lean_inc(x_508); +lean_dec(x_504); +x_510 = l_Lean_mkAppRev(x_500, x_508); +lean_dec(x_508); +x_511 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_511, 0, x_510); +lean_ctor_set(x_511, 1, x_509); +return x_511; +} +} +} +} +case 7: +{ +uint8_t x_597; lean_object* x_598; lean_object* x_599; uint8_t x_667; +x_597 = l_Lean_Expr_isMVar(x_2); +x_667 = lean_expr_has_expr_mvar(x_2); +if (x_667 == 0) +{ +uint8_t x_668; +x_668 = lean_expr_has_level_mvar(x_2); +if (x_668 == 0) +{ +x_598 = x_2; +x_599 = x_4; +goto block_666; +} +else +{ +lean_object* x_669; lean_object* x_670; +x_669 = lean_ctor_get(x_4, 1); +lean_inc(x_669); +x_670 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_669, x_2); +lean_dec(x_669); +if (lean_obj_tag(x_670) == 0) +{ +lean_object* x_671; lean_object* x_672; lean_object* x_673; uint8_t x_674; +lean_inc(x_2); +lean_inc(x_1); +x_671 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_2, x_4); +x_672 = lean_ctor_get(x_671, 1); +lean_inc(x_672); +x_673 = lean_ctor_get(x_671, 0); +lean_inc(x_673); +lean_dec(x_671); +x_674 = !lean_is_exclusive(x_672); +if (x_674 == 0) +{ +lean_object* x_675; lean_object* x_676; +x_675 = lean_ctor_get(x_672, 1); +lean_inc(x_673); +x_676 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_675, x_2, x_673); +lean_ctor_set(x_672, 1, x_676); +x_598 = x_673; +x_599 = x_672; +goto block_666; +} +else +{ +lean_object* x_677; lean_object* x_678; lean_object* x_679; lean_object* x_680; +x_677 = lean_ctor_get(x_672, 0); +x_678 = lean_ctor_get(x_672, 1); +lean_inc(x_678); +lean_inc(x_677); +lean_dec(x_672); +lean_inc(x_673); +x_679 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_678, x_2, x_673); +x_680 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_680, 0, x_677); +lean_ctor_set(x_680, 1, x_679); +x_598 = x_673; +x_599 = x_680; +goto block_666; +} +} +else +{ +lean_object* x_681; +lean_dec(x_2); +x_681 = lean_ctor_get(x_670, 0); +lean_inc(x_681); +lean_dec(x_670); +x_598 = x_681; +x_599 = x_4; +goto block_666; +} +} +} +else +{ +lean_object* x_682; lean_object* x_683; +x_682 = lean_ctor_get(x_4, 1); +lean_inc(x_682); +x_683 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_682, x_2); +lean_dec(x_682); +if (lean_obj_tag(x_683) == 0) +{ +lean_object* x_684; lean_object* x_685; lean_object* x_686; uint8_t x_687; +lean_inc(x_2); +lean_inc(x_1); +x_684 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_2, x_4); +x_685 = lean_ctor_get(x_684, 1); +lean_inc(x_685); +x_686 = lean_ctor_get(x_684, 0); +lean_inc(x_686); +lean_dec(x_684); +x_687 = !lean_is_exclusive(x_685); +if (x_687 == 0) +{ +lean_object* x_688; lean_object* x_689; +x_688 = lean_ctor_get(x_685, 1); +lean_inc(x_686); +x_689 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_688, x_2, x_686); +lean_ctor_set(x_685, 1, x_689); +x_598 = x_686; +x_599 = x_685; +goto block_666; +} +else +{ +lean_object* x_690; lean_object* x_691; lean_object* x_692; lean_object* x_693; +x_690 = lean_ctor_get(x_685, 0); +x_691 = lean_ctor_get(x_685, 1); +lean_inc(x_691); +lean_inc(x_690); +lean_dec(x_685); +lean_inc(x_686); +x_692 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_691, x_2, x_686); +x_693 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_693, 0, x_690); +lean_ctor_set(x_693, 1, x_692); +x_598 = x_686; +x_599 = x_693; +goto block_666; +} +} +else +{ +lean_object* x_694; +lean_dec(x_2); +x_694 = lean_ctor_get(x_683, 0); +lean_inc(x_694); +lean_dec(x_683); +x_598 = x_694; +x_599 = x_4; +goto block_666; +} +} +block_666: +{ +lean_object* x_600; +if (x_597 == 0) +{ +lean_object* x_611; +x_611 = lean_box(0); +x_600 = x_611; +goto block_610; +} +else +{ +uint8_t x_612; +x_612 = l_Lean_Expr_isLambda(x_598); +if (x_612 == 0) +{ +lean_object* x_613; +x_613 = lean_box(0); +x_600 = x_613; +goto block_610; +} +else +{ +lean_object* x_614; uint8_t x_615; +x_614 = l_Lean_Expr_betaRev(x_598, x_3); +lean_dec(x_598); +x_615 = lean_expr_has_expr_mvar(x_614); +if (x_615 == 0) +{ +uint8_t x_616; +x_616 = lean_expr_has_level_mvar(x_614); +if (x_616 == 0) +{ +lean_object* x_617; +lean_dec(x_1); +x_617 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_617, 0, x_614); +lean_ctor_set(x_617, 1, x_599); +return x_617; +} +else +{ +lean_object* x_618; lean_object* x_619; +x_618 = lean_ctor_get(x_599, 1); +lean_inc(x_618); +x_619 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_618, x_614); +lean_dec(x_618); +if (lean_obj_tag(x_619) == 0) +{ +lean_object* x_620; uint8_t x_621; +lean_inc(x_614); +x_620 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_614, x_599); +x_621 = !lean_is_exclusive(x_620); +if (x_621 == 0) +{ +lean_object* x_622; uint8_t x_623; +x_622 = lean_ctor_get(x_620, 1); +x_623 = !lean_is_exclusive(x_622); +if (x_623 == 0) +{ +lean_object* x_624; lean_object* x_625; lean_object* x_626; +x_624 = lean_ctor_get(x_620, 0); +x_625 = lean_ctor_get(x_622, 1); +lean_inc(x_624); +x_626 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_625, x_614, x_624); +lean_ctor_set(x_622, 1, x_626); +return x_620; +} +else +{ +lean_object* x_627; lean_object* x_628; lean_object* x_629; lean_object* x_630; lean_object* x_631; +x_627 = lean_ctor_get(x_620, 0); +x_628 = lean_ctor_get(x_622, 0); +x_629 = lean_ctor_get(x_622, 1); +lean_inc(x_629); +lean_inc(x_628); +lean_dec(x_622); +lean_inc(x_627); +x_630 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_629, x_614, x_627); +x_631 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_631, 0, x_628); +lean_ctor_set(x_631, 1, x_630); +lean_ctor_set(x_620, 1, x_631); +return x_620; +} +} +else +{ +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; +x_632 = lean_ctor_get(x_620, 1); +x_633 = lean_ctor_get(x_620, 0); +lean_inc(x_632); +lean_inc(x_633); +lean_dec(x_620); +x_634 = lean_ctor_get(x_632, 0); +lean_inc(x_634); +x_635 = lean_ctor_get(x_632, 1); +lean_inc(x_635); +if (lean_is_exclusive(x_632)) { + lean_ctor_release(x_632, 0); + lean_ctor_release(x_632, 1); + x_636 = x_632; +} else { + lean_dec_ref(x_632); + x_636 = lean_box(0); +} +lean_inc(x_633); +x_637 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_635, x_614, x_633); +if (lean_is_scalar(x_636)) { + x_638 = lean_alloc_ctor(0, 2, 0); +} else { + x_638 = x_636; +} +lean_ctor_set(x_638, 0, x_634); +lean_ctor_set(x_638, 1, x_637); +x_639 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_639, 0, x_633); +lean_ctor_set(x_639, 1, x_638); +return x_639; +} +} +else +{ +lean_object* x_640; lean_object* x_641; +lean_dec(x_614); +lean_dec(x_1); +x_640 = lean_ctor_get(x_619, 0); +lean_inc(x_640); +lean_dec(x_619); +x_641 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_641, 0, x_640); +lean_ctor_set(x_641, 1, x_599); +return x_641; +} +} +} +else +{ +lean_object* x_642; lean_object* x_643; +x_642 = lean_ctor_get(x_599, 1); +lean_inc(x_642); +x_643 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_642, x_614); +lean_dec(x_642); +if (lean_obj_tag(x_643) == 0) +{ +lean_object* x_644; uint8_t x_645; +lean_inc(x_614); +x_644 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_614, x_599); +x_645 = !lean_is_exclusive(x_644); +if (x_645 == 0) +{ +lean_object* x_646; uint8_t x_647; +x_646 = lean_ctor_get(x_644, 1); +x_647 = !lean_is_exclusive(x_646); +if (x_647 == 0) +{ +lean_object* x_648; lean_object* x_649; lean_object* x_650; +x_648 = lean_ctor_get(x_644, 0); +x_649 = lean_ctor_get(x_646, 1); +lean_inc(x_648); +x_650 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_649, x_614, x_648); +lean_ctor_set(x_646, 1, x_650); +return x_644; +} +else +{ +lean_object* x_651; lean_object* x_652; lean_object* x_653; lean_object* x_654; lean_object* x_655; +x_651 = lean_ctor_get(x_644, 0); +x_652 = lean_ctor_get(x_646, 0); +x_653 = lean_ctor_get(x_646, 1); +lean_inc(x_653); +lean_inc(x_652); +lean_dec(x_646); +lean_inc(x_651); +x_654 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_653, x_614, x_651); +x_655 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_655, 0, x_652); +lean_ctor_set(x_655, 1, x_654); +lean_ctor_set(x_644, 1, x_655); +return x_644; +} +} +else +{ +lean_object* x_656; lean_object* x_657; lean_object* x_658; lean_object* x_659; lean_object* x_660; lean_object* x_661; lean_object* x_662; lean_object* x_663; +x_656 = lean_ctor_get(x_644, 1); +x_657 = lean_ctor_get(x_644, 0); +lean_inc(x_656); +lean_inc(x_657); +lean_dec(x_644); +x_658 = lean_ctor_get(x_656, 0); +lean_inc(x_658); +x_659 = lean_ctor_get(x_656, 1); +lean_inc(x_659); +if (lean_is_exclusive(x_656)) { + lean_ctor_release(x_656, 0); + lean_ctor_release(x_656, 1); + x_660 = x_656; +} else { + lean_dec_ref(x_656); + x_660 = lean_box(0); +} +lean_inc(x_657); +x_661 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_659, x_614, x_657); +if (lean_is_scalar(x_660)) { + x_662 = lean_alloc_ctor(0, 2, 0); +} else { + x_662 = x_660; +} +lean_ctor_set(x_662, 0, x_658); +lean_ctor_set(x_662, 1, x_661); +x_663 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_663, 0, x_657); +lean_ctor_set(x_663, 1, x_662); +return x_663; +} +} +else +{ +lean_object* x_664; lean_object* x_665; +lean_dec(x_614); +lean_dec(x_1); +x_664 = lean_ctor_get(x_643, 0); +lean_inc(x_664); +lean_dec(x_643); +x_665 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_665, 0, x_664); +lean_ctor_set(x_665, 1, x_599); +return x_665; +} +} +} +} +block_610: +{ +lean_object* x_601; lean_object* x_602; uint8_t x_603; +lean_dec(x_600); +x_601 = lean_unsigned_to_nat(0u); +x_602 = l_Array_ummapAux___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__4___rarg(x_1, x_601, x_3, x_599); +x_603 = !lean_is_exclusive(x_602); +if (x_603 == 0) +{ +lean_object* x_604; lean_object* x_605; +x_604 = lean_ctor_get(x_602, 0); +x_605 = l_Lean_mkAppRev(x_598, x_604); +lean_dec(x_604); +lean_ctor_set(x_602, 0, x_605); +return x_602; +} +else +{ +lean_object* x_606; lean_object* x_607; lean_object* x_608; lean_object* x_609; +x_606 = lean_ctor_get(x_602, 0); +x_607 = lean_ctor_get(x_602, 1); +lean_inc(x_607); +lean_inc(x_606); +lean_dec(x_602); +x_608 = l_Lean_mkAppRev(x_598, x_606); +lean_dec(x_606); +x_609 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_609, 0, x_608); +lean_ctor_set(x_609, 1, x_607); +return x_609; +} +} +} +} +case 8: +{ +uint8_t x_695; lean_object* x_696; lean_object* x_697; uint8_t x_765; +x_695 = l_Lean_Expr_isMVar(x_2); +x_765 = lean_expr_has_expr_mvar(x_2); +if (x_765 == 0) +{ +uint8_t x_766; +x_766 = lean_expr_has_level_mvar(x_2); +if (x_766 == 0) +{ +x_696 = x_2; +x_697 = x_4; +goto block_764; +} +else +{ +lean_object* x_767; lean_object* x_768; +x_767 = lean_ctor_get(x_4, 1); +lean_inc(x_767); +x_768 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_767, x_2); +lean_dec(x_767); +if (lean_obj_tag(x_768) == 0) +{ +lean_object* x_769; lean_object* x_770; lean_object* x_771; uint8_t x_772; +lean_inc(x_2); +lean_inc(x_1); +x_769 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_2, x_4); +x_770 = lean_ctor_get(x_769, 1); +lean_inc(x_770); +x_771 = lean_ctor_get(x_769, 0); +lean_inc(x_771); +lean_dec(x_769); +x_772 = !lean_is_exclusive(x_770); +if (x_772 == 0) +{ +lean_object* x_773; lean_object* x_774; +x_773 = lean_ctor_get(x_770, 1); +lean_inc(x_771); +x_774 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_773, x_2, x_771); +lean_ctor_set(x_770, 1, x_774); +x_696 = x_771; +x_697 = x_770; +goto block_764; +} +else +{ +lean_object* x_775; lean_object* x_776; lean_object* x_777; lean_object* x_778; +x_775 = lean_ctor_get(x_770, 0); +x_776 = lean_ctor_get(x_770, 1); +lean_inc(x_776); +lean_inc(x_775); +lean_dec(x_770); +lean_inc(x_771); +x_777 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_776, x_2, x_771); +x_778 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_778, 0, x_775); +lean_ctor_set(x_778, 1, x_777); +x_696 = x_771; +x_697 = x_778; +goto block_764; +} +} +else +{ +lean_object* x_779; +lean_dec(x_2); +x_779 = lean_ctor_get(x_768, 0); +lean_inc(x_779); +lean_dec(x_768); +x_696 = x_779; +x_697 = x_4; +goto block_764; +} +} +} +else +{ +lean_object* x_780; lean_object* x_781; +x_780 = lean_ctor_get(x_4, 1); +lean_inc(x_780); +x_781 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_780, x_2); +lean_dec(x_780); +if (lean_obj_tag(x_781) == 0) +{ +lean_object* x_782; lean_object* x_783; lean_object* x_784; uint8_t x_785; +lean_inc(x_2); +lean_inc(x_1); +x_782 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_2, x_4); +x_783 = lean_ctor_get(x_782, 1); +lean_inc(x_783); +x_784 = lean_ctor_get(x_782, 0); +lean_inc(x_784); +lean_dec(x_782); +x_785 = !lean_is_exclusive(x_783); +if (x_785 == 0) +{ +lean_object* x_786; lean_object* x_787; +x_786 = lean_ctor_get(x_783, 1); +lean_inc(x_784); +x_787 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_786, x_2, x_784); +lean_ctor_set(x_783, 1, x_787); +x_696 = x_784; +x_697 = x_783; +goto block_764; +} +else +{ +lean_object* x_788; lean_object* x_789; lean_object* x_790; lean_object* x_791; +x_788 = lean_ctor_get(x_783, 0); +x_789 = lean_ctor_get(x_783, 1); +lean_inc(x_789); +lean_inc(x_788); +lean_dec(x_783); +lean_inc(x_784); +x_790 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_789, x_2, x_784); +x_791 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_791, 0, x_788); +lean_ctor_set(x_791, 1, x_790); +x_696 = x_784; +x_697 = x_791; +goto block_764; +} +} +else +{ +lean_object* x_792; +lean_dec(x_2); +x_792 = lean_ctor_get(x_781, 0); +lean_inc(x_792); +lean_dec(x_781); +x_696 = x_792; +x_697 = x_4; +goto block_764; +} +} +block_764: +{ +lean_object* x_698; +if (x_695 == 0) +{ +lean_object* x_709; +x_709 = lean_box(0); +x_698 = x_709; +goto block_708; +} +else +{ +uint8_t x_710; +x_710 = l_Lean_Expr_isLambda(x_696); +if (x_710 == 0) +{ +lean_object* x_711; +x_711 = lean_box(0); +x_698 = x_711; +goto block_708; +} +else +{ +lean_object* x_712; uint8_t x_713; +x_712 = l_Lean_Expr_betaRev(x_696, x_3); +lean_dec(x_696); +x_713 = lean_expr_has_expr_mvar(x_712); +if (x_713 == 0) +{ +uint8_t x_714; +x_714 = lean_expr_has_level_mvar(x_712); +if (x_714 == 0) +{ +lean_object* x_715; +lean_dec(x_1); +x_715 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_715, 0, x_712); +lean_ctor_set(x_715, 1, x_697); +return x_715; +} +else +{ +lean_object* x_716; lean_object* x_717; +x_716 = lean_ctor_get(x_697, 1); +lean_inc(x_716); +x_717 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_716, x_712); +lean_dec(x_716); +if (lean_obj_tag(x_717) == 0) +{ +lean_object* x_718; uint8_t x_719; +lean_inc(x_712); +x_718 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_712, x_697); +x_719 = !lean_is_exclusive(x_718); +if (x_719 == 0) +{ +lean_object* x_720; uint8_t x_721; +x_720 = lean_ctor_get(x_718, 1); +x_721 = !lean_is_exclusive(x_720); +if (x_721 == 0) +{ +lean_object* x_722; lean_object* x_723; lean_object* x_724; +x_722 = lean_ctor_get(x_718, 0); +x_723 = lean_ctor_get(x_720, 1); +lean_inc(x_722); +x_724 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_723, x_712, x_722); +lean_ctor_set(x_720, 1, x_724); +return x_718; +} +else +{ +lean_object* x_725; lean_object* x_726; lean_object* x_727; lean_object* x_728; lean_object* x_729; +x_725 = lean_ctor_get(x_718, 0); +x_726 = lean_ctor_get(x_720, 0); +x_727 = lean_ctor_get(x_720, 1); +lean_inc(x_727); +lean_inc(x_726); +lean_dec(x_720); +lean_inc(x_725); +x_728 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_727, x_712, x_725); +x_729 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_729, 0, x_726); +lean_ctor_set(x_729, 1, x_728); +lean_ctor_set(x_718, 1, x_729); +return x_718; +} +} +else +{ +lean_object* x_730; lean_object* x_731; lean_object* x_732; lean_object* x_733; lean_object* x_734; lean_object* x_735; lean_object* x_736; lean_object* x_737; +x_730 = lean_ctor_get(x_718, 1); +x_731 = lean_ctor_get(x_718, 0); +lean_inc(x_730); +lean_inc(x_731); +lean_dec(x_718); +x_732 = lean_ctor_get(x_730, 0); +lean_inc(x_732); +x_733 = lean_ctor_get(x_730, 1); +lean_inc(x_733); +if (lean_is_exclusive(x_730)) { + lean_ctor_release(x_730, 0); + lean_ctor_release(x_730, 1); + x_734 = x_730; +} else { + lean_dec_ref(x_730); + x_734 = lean_box(0); +} +lean_inc(x_731); +x_735 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_733, x_712, x_731); +if (lean_is_scalar(x_734)) { + x_736 = lean_alloc_ctor(0, 2, 0); +} else { + x_736 = x_734; +} +lean_ctor_set(x_736, 0, x_732); +lean_ctor_set(x_736, 1, x_735); +x_737 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_737, 0, x_731); +lean_ctor_set(x_737, 1, x_736); +return x_737; +} +} +else +{ +lean_object* x_738; lean_object* x_739; +lean_dec(x_712); +lean_dec(x_1); +x_738 = lean_ctor_get(x_717, 0); +lean_inc(x_738); +lean_dec(x_717); +x_739 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_739, 0, x_738); +lean_ctor_set(x_739, 1, x_697); +return x_739; +} +} +} +else +{ +lean_object* x_740; lean_object* x_741; +x_740 = lean_ctor_get(x_697, 1); +lean_inc(x_740); +x_741 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_740, x_712); +lean_dec(x_740); +if (lean_obj_tag(x_741) == 0) +{ +lean_object* x_742; uint8_t x_743; +lean_inc(x_712); +x_742 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_712, x_697); +x_743 = !lean_is_exclusive(x_742); +if (x_743 == 0) +{ +lean_object* x_744; uint8_t x_745; +x_744 = lean_ctor_get(x_742, 1); +x_745 = !lean_is_exclusive(x_744); +if (x_745 == 0) +{ +lean_object* x_746; lean_object* x_747; lean_object* x_748; +x_746 = lean_ctor_get(x_742, 0); +x_747 = lean_ctor_get(x_744, 1); +lean_inc(x_746); +x_748 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_747, x_712, x_746); +lean_ctor_set(x_744, 1, x_748); +return x_742; +} +else +{ +lean_object* x_749; lean_object* x_750; lean_object* x_751; lean_object* x_752; lean_object* x_753; +x_749 = lean_ctor_get(x_742, 0); +x_750 = lean_ctor_get(x_744, 0); +x_751 = lean_ctor_get(x_744, 1); +lean_inc(x_751); +lean_inc(x_750); +lean_dec(x_744); +lean_inc(x_749); +x_752 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_751, x_712, x_749); +x_753 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_753, 0, x_750); +lean_ctor_set(x_753, 1, x_752); +lean_ctor_set(x_742, 1, x_753); +return x_742; +} +} +else +{ +lean_object* x_754; lean_object* x_755; lean_object* x_756; lean_object* x_757; lean_object* x_758; lean_object* x_759; lean_object* x_760; lean_object* x_761; +x_754 = lean_ctor_get(x_742, 1); +x_755 = lean_ctor_get(x_742, 0); +lean_inc(x_754); +lean_inc(x_755); +lean_dec(x_742); +x_756 = lean_ctor_get(x_754, 0); +lean_inc(x_756); +x_757 = lean_ctor_get(x_754, 1); +lean_inc(x_757); +if (lean_is_exclusive(x_754)) { + lean_ctor_release(x_754, 0); + lean_ctor_release(x_754, 1); + x_758 = x_754; +} else { + lean_dec_ref(x_754); + x_758 = lean_box(0); +} +lean_inc(x_755); +x_759 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_757, x_712, x_755); +if (lean_is_scalar(x_758)) { + x_760 = lean_alloc_ctor(0, 2, 0); +} else { + x_760 = x_758; +} +lean_ctor_set(x_760, 0, x_756); +lean_ctor_set(x_760, 1, x_759); +x_761 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_761, 0, x_755); +lean_ctor_set(x_761, 1, x_760); +return x_761; +} +} +else +{ +lean_object* x_762; lean_object* x_763; +lean_dec(x_712); +lean_dec(x_1); +x_762 = lean_ctor_get(x_741, 0); +lean_inc(x_762); +lean_dec(x_741); +x_763 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_763, 0, x_762); +lean_ctor_set(x_763, 1, x_697); +return x_763; +} +} +} +} +block_708: +{ +lean_object* x_699; lean_object* x_700; uint8_t x_701; +lean_dec(x_698); +x_699 = lean_unsigned_to_nat(0u); +x_700 = l_Array_ummapAux___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__4___rarg(x_1, x_699, x_3, x_697); +x_701 = !lean_is_exclusive(x_700); +if (x_701 == 0) +{ +lean_object* x_702; lean_object* x_703; +x_702 = lean_ctor_get(x_700, 0); +x_703 = l_Lean_mkAppRev(x_696, x_702); +lean_dec(x_702); +lean_ctor_set(x_700, 0, x_703); +return x_700; +} +else +{ +lean_object* x_704; lean_object* x_705; lean_object* x_706; lean_object* x_707; +x_704 = lean_ctor_get(x_700, 0); +x_705 = lean_ctor_get(x_700, 1); +lean_inc(x_705); +lean_inc(x_704); +lean_dec(x_700); +x_706 = l_Lean_mkAppRev(x_696, x_704); +lean_dec(x_704); +x_707 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_707, 0, x_706); +lean_ctor_set(x_707, 1, x_705); +return x_707; +} +} +} +} +case 9: +{ +uint8_t x_793; lean_object* x_794; lean_object* x_795; uint8_t x_863; +x_793 = l_Lean_Expr_isMVar(x_2); +x_863 = lean_expr_has_expr_mvar(x_2); +if (x_863 == 0) +{ +uint8_t x_864; +x_864 = lean_expr_has_level_mvar(x_2); +if (x_864 == 0) +{ +x_794 = x_2; +x_795 = x_4; +goto block_862; +} +else +{ +lean_object* x_865; lean_object* x_866; +x_865 = lean_ctor_get(x_4, 1); +lean_inc(x_865); +x_866 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_865, x_2); +lean_dec(x_865); +if (lean_obj_tag(x_866) == 0) +{ +lean_object* x_867; lean_object* x_868; lean_object* x_869; uint8_t x_870; +lean_inc(x_2); +lean_inc(x_1); +x_867 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_2, x_4); +x_868 = lean_ctor_get(x_867, 1); +lean_inc(x_868); +x_869 = lean_ctor_get(x_867, 0); +lean_inc(x_869); +lean_dec(x_867); +x_870 = !lean_is_exclusive(x_868); +if (x_870 == 0) +{ +lean_object* x_871; lean_object* x_872; +x_871 = lean_ctor_get(x_868, 1); +lean_inc(x_869); +x_872 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_871, x_2, x_869); +lean_ctor_set(x_868, 1, x_872); +x_794 = x_869; +x_795 = x_868; +goto block_862; +} +else +{ +lean_object* x_873; lean_object* x_874; lean_object* x_875; lean_object* x_876; +x_873 = lean_ctor_get(x_868, 0); +x_874 = lean_ctor_get(x_868, 1); +lean_inc(x_874); +lean_inc(x_873); +lean_dec(x_868); +lean_inc(x_869); +x_875 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_874, x_2, x_869); +x_876 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_876, 0, x_873); +lean_ctor_set(x_876, 1, x_875); +x_794 = x_869; +x_795 = x_876; +goto block_862; +} +} +else +{ +lean_object* x_877; +lean_dec(x_2); +x_877 = lean_ctor_get(x_866, 0); +lean_inc(x_877); +lean_dec(x_866); +x_794 = x_877; +x_795 = x_4; +goto block_862; +} +} +} +else +{ +lean_object* x_878; lean_object* x_879; +x_878 = lean_ctor_get(x_4, 1); +lean_inc(x_878); +x_879 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_878, x_2); +lean_dec(x_878); +if (lean_obj_tag(x_879) == 0) +{ +lean_object* x_880; lean_object* x_881; lean_object* x_882; uint8_t x_883; +lean_inc(x_2); +lean_inc(x_1); +x_880 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_2, x_4); +x_881 = lean_ctor_get(x_880, 1); +lean_inc(x_881); +x_882 = lean_ctor_get(x_880, 0); +lean_inc(x_882); +lean_dec(x_880); +x_883 = !lean_is_exclusive(x_881); +if (x_883 == 0) +{ +lean_object* x_884; lean_object* x_885; +x_884 = lean_ctor_get(x_881, 1); +lean_inc(x_882); +x_885 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_884, x_2, x_882); +lean_ctor_set(x_881, 1, x_885); +x_794 = x_882; +x_795 = x_881; +goto block_862; +} +else +{ +lean_object* x_886; lean_object* x_887; lean_object* x_888; lean_object* x_889; +x_886 = lean_ctor_get(x_881, 0); +x_887 = lean_ctor_get(x_881, 1); +lean_inc(x_887); +lean_inc(x_886); +lean_dec(x_881); +lean_inc(x_882); +x_888 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_887, x_2, x_882); +x_889 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_889, 0, x_886); +lean_ctor_set(x_889, 1, x_888); +x_794 = x_882; +x_795 = x_889; +goto block_862; +} +} +else +{ +lean_object* x_890; +lean_dec(x_2); +x_890 = lean_ctor_get(x_879, 0); +lean_inc(x_890); +lean_dec(x_879); +x_794 = x_890; +x_795 = x_4; +goto block_862; +} +} +block_862: +{ +lean_object* x_796; +if (x_793 == 0) +{ +lean_object* x_807; +x_807 = lean_box(0); +x_796 = x_807; +goto block_806; +} +else +{ +uint8_t x_808; +x_808 = l_Lean_Expr_isLambda(x_794); +if (x_808 == 0) +{ +lean_object* x_809; +x_809 = lean_box(0); +x_796 = x_809; +goto block_806; +} +else +{ +lean_object* x_810; uint8_t x_811; +x_810 = l_Lean_Expr_betaRev(x_794, x_3); +lean_dec(x_794); +x_811 = lean_expr_has_expr_mvar(x_810); +if (x_811 == 0) +{ +uint8_t x_812; +x_812 = lean_expr_has_level_mvar(x_810); +if (x_812 == 0) +{ +lean_object* x_813; +lean_dec(x_1); +x_813 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_813, 0, x_810); +lean_ctor_set(x_813, 1, x_795); +return x_813; +} +else +{ +lean_object* x_814; lean_object* x_815; +x_814 = lean_ctor_get(x_795, 1); +lean_inc(x_814); +x_815 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_814, x_810); +lean_dec(x_814); +if (lean_obj_tag(x_815) == 0) +{ +lean_object* x_816; uint8_t x_817; +lean_inc(x_810); +x_816 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_810, x_795); +x_817 = !lean_is_exclusive(x_816); +if (x_817 == 0) +{ +lean_object* x_818; uint8_t x_819; +x_818 = lean_ctor_get(x_816, 1); +x_819 = !lean_is_exclusive(x_818); +if (x_819 == 0) +{ +lean_object* x_820; lean_object* x_821; lean_object* x_822; +x_820 = lean_ctor_get(x_816, 0); +x_821 = lean_ctor_get(x_818, 1); +lean_inc(x_820); +x_822 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_821, x_810, x_820); +lean_ctor_set(x_818, 1, x_822); +return x_816; +} +else +{ +lean_object* x_823; lean_object* x_824; lean_object* x_825; lean_object* x_826; lean_object* x_827; +x_823 = lean_ctor_get(x_816, 0); +x_824 = lean_ctor_get(x_818, 0); +x_825 = lean_ctor_get(x_818, 1); +lean_inc(x_825); +lean_inc(x_824); +lean_dec(x_818); +lean_inc(x_823); +x_826 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_825, x_810, x_823); +x_827 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_827, 0, x_824); +lean_ctor_set(x_827, 1, x_826); +lean_ctor_set(x_816, 1, x_827); +return x_816; +} +} +else +{ +lean_object* x_828; lean_object* x_829; lean_object* x_830; lean_object* x_831; lean_object* x_832; lean_object* x_833; lean_object* x_834; lean_object* x_835; +x_828 = lean_ctor_get(x_816, 1); +x_829 = lean_ctor_get(x_816, 0); +lean_inc(x_828); +lean_inc(x_829); +lean_dec(x_816); +x_830 = lean_ctor_get(x_828, 0); +lean_inc(x_830); +x_831 = lean_ctor_get(x_828, 1); +lean_inc(x_831); +if (lean_is_exclusive(x_828)) { + lean_ctor_release(x_828, 0); + lean_ctor_release(x_828, 1); + x_832 = x_828; +} else { + lean_dec_ref(x_828); + x_832 = lean_box(0); +} +lean_inc(x_829); +x_833 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_831, x_810, x_829); +if (lean_is_scalar(x_832)) { + x_834 = lean_alloc_ctor(0, 2, 0); +} else { + x_834 = x_832; +} +lean_ctor_set(x_834, 0, x_830); +lean_ctor_set(x_834, 1, x_833); +x_835 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_835, 0, x_829); +lean_ctor_set(x_835, 1, x_834); +return x_835; +} +} +else +{ +lean_object* x_836; lean_object* x_837; +lean_dec(x_810); +lean_dec(x_1); +x_836 = lean_ctor_get(x_815, 0); +lean_inc(x_836); +lean_dec(x_815); +x_837 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_837, 0, x_836); +lean_ctor_set(x_837, 1, x_795); +return x_837; +} +} +} +else +{ +lean_object* x_838; lean_object* x_839; +x_838 = lean_ctor_get(x_795, 1); +lean_inc(x_838); +x_839 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_838, x_810); +lean_dec(x_838); +if (lean_obj_tag(x_839) == 0) +{ +lean_object* x_840; uint8_t x_841; +lean_inc(x_810); +x_840 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_810, x_795); +x_841 = !lean_is_exclusive(x_840); +if (x_841 == 0) +{ +lean_object* x_842; uint8_t x_843; +x_842 = lean_ctor_get(x_840, 1); +x_843 = !lean_is_exclusive(x_842); +if (x_843 == 0) +{ +lean_object* x_844; lean_object* x_845; lean_object* x_846; +x_844 = lean_ctor_get(x_840, 0); +x_845 = lean_ctor_get(x_842, 1); +lean_inc(x_844); +x_846 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_845, x_810, x_844); +lean_ctor_set(x_842, 1, x_846); +return x_840; +} +else +{ +lean_object* x_847; lean_object* x_848; lean_object* x_849; lean_object* x_850; lean_object* x_851; +x_847 = lean_ctor_get(x_840, 0); +x_848 = lean_ctor_get(x_842, 0); +x_849 = lean_ctor_get(x_842, 1); +lean_inc(x_849); +lean_inc(x_848); +lean_dec(x_842); +lean_inc(x_847); +x_850 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_849, x_810, x_847); +x_851 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_851, 0, x_848); +lean_ctor_set(x_851, 1, x_850); +lean_ctor_set(x_840, 1, x_851); +return x_840; +} +} +else +{ +lean_object* x_852; lean_object* x_853; lean_object* x_854; lean_object* x_855; lean_object* x_856; lean_object* x_857; lean_object* x_858; lean_object* x_859; +x_852 = lean_ctor_get(x_840, 1); +x_853 = lean_ctor_get(x_840, 0); +lean_inc(x_852); +lean_inc(x_853); +lean_dec(x_840); +x_854 = lean_ctor_get(x_852, 0); +lean_inc(x_854); +x_855 = lean_ctor_get(x_852, 1); +lean_inc(x_855); +if (lean_is_exclusive(x_852)) { + lean_ctor_release(x_852, 0); + lean_ctor_release(x_852, 1); + x_856 = x_852; +} else { + lean_dec_ref(x_852); + x_856 = lean_box(0); +} +lean_inc(x_853); +x_857 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_855, x_810, x_853); +if (lean_is_scalar(x_856)) { + x_858 = lean_alloc_ctor(0, 2, 0); +} else { + x_858 = x_856; +} +lean_ctor_set(x_858, 0, x_854); +lean_ctor_set(x_858, 1, x_857); +x_859 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_859, 0, x_853); +lean_ctor_set(x_859, 1, x_858); +return x_859; +} +} +else +{ +lean_object* x_860; lean_object* x_861; +lean_dec(x_810); +lean_dec(x_1); +x_860 = lean_ctor_get(x_839, 0); +lean_inc(x_860); +lean_dec(x_839); +x_861 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_861, 0, x_860); +lean_ctor_set(x_861, 1, x_795); +return x_861; +} +} +} +} +block_806: +{ +lean_object* x_797; lean_object* x_798; uint8_t x_799; +lean_dec(x_796); +x_797 = lean_unsigned_to_nat(0u); +x_798 = l_Array_ummapAux___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__4___rarg(x_1, x_797, x_3, x_795); +x_799 = !lean_is_exclusive(x_798); +if (x_799 == 0) +{ +lean_object* x_800; lean_object* x_801; +x_800 = lean_ctor_get(x_798, 0); +x_801 = l_Lean_mkAppRev(x_794, x_800); +lean_dec(x_800); +lean_ctor_set(x_798, 0, x_801); +return x_798; +} +else +{ +lean_object* x_802; lean_object* x_803; lean_object* x_804; lean_object* x_805; +x_802 = lean_ctor_get(x_798, 0); +x_803 = lean_ctor_get(x_798, 1); +lean_inc(x_803); +lean_inc(x_802); +lean_dec(x_798); +x_804 = l_Lean_mkAppRev(x_794, x_802); +lean_dec(x_802); +x_805 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_805, 0, x_804); +lean_ctor_set(x_805, 1, x_803); +return x_805; +} +} +} +} +case 10: +{ +uint8_t x_891; lean_object* x_892; lean_object* x_893; uint8_t x_961; +x_891 = l_Lean_Expr_isMVar(x_2); +x_961 = lean_expr_has_expr_mvar(x_2); +if (x_961 == 0) +{ +uint8_t x_962; +x_962 = lean_expr_has_level_mvar(x_2); +if (x_962 == 0) +{ +x_892 = x_2; +x_893 = x_4; +goto block_960; +} +else +{ +lean_object* x_963; lean_object* x_964; +x_963 = lean_ctor_get(x_4, 1); +lean_inc(x_963); +x_964 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_963, x_2); +lean_dec(x_963); +if (lean_obj_tag(x_964) == 0) +{ +lean_object* x_965; lean_object* x_966; lean_object* x_967; uint8_t x_968; +lean_inc(x_2); +lean_inc(x_1); +x_965 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_2, x_4); +x_966 = lean_ctor_get(x_965, 1); +lean_inc(x_966); +x_967 = lean_ctor_get(x_965, 0); +lean_inc(x_967); +lean_dec(x_965); +x_968 = !lean_is_exclusive(x_966); +if (x_968 == 0) +{ +lean_object* x_969; lean_object* x_970; +x_969 = lean_ctor_get(x_966, 1); +lean_inc(x_967); +x_970 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_969, x_2, x_967); +lean_ctor_set(x_966, 1, x_970); +x_892 = x_967; +x_893 = x_966; +goto block_960; +} +else +{ +lean_object* x_971; lean_object* x_972; lean_object* x_973; lean_object* x_974; +x_971 = lean_ctor_get(x_966, 0); +x_972 = lean_ctor_get(x_966, 1); +lean_inc(x_972); +lean_inc(x_971); +lean_dec(x_966); +lean_inc(x_967); +x_973 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_972, x_2, x_967); +x_974 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_974, 0, x_971); +lean_ctor_set(x_974, 1, x_973); +x_892 = x_967; +x_893 = x_974; +goto block_960; +} +} +else +{ +lean_object* x_975; +lean_dec(x_2); +x_975 = lean_ctor_get(x_964, 0); +lean_inc(x_975); +lean_dec(x_964); +x_892 = x_975; +x_893 = x_4; +goto block_960; +} +} +} +else +{ +lean_object* x_976; lean_object* x_977; +x_976 = lean_ctor_get(x_4, 1); +lean_inc(x_976); +x_977 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_976, x_2); +lean_dec(x_976); +if (lean_obj_tag(x_977) == 0) +{ +lean_object* x_978; lean_object* x_979; lean_object* x_980; uint8_t x_981; +lean_inc(x_2); +lean_inc(x_1); +x_978 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_2, x_4); +x_979 = lean_ctor_get(x_978, 1); +lean_inc(x_979); +x_980 = lean_ctor_get(x_978, 0); +lean_inc(x_980); +lean_dec(x_978); +x_981 = !lean_is_exclusive(x_979); +if (x_981 == 0) +{ +lean_object* x_982; lean_object* x_983; +x_982 = lean_ctor_get(x_979, 1); +lean_inc(x_980); +x_983 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_982, x_2, x_980); +lean_ctor_set(x_979, 1, x_983); +x_892 = x_980; +x_893 = x_979; +goto block_960; +} +else +{ +lean_object* x_984; lean_object* x_985; lean_object* x_986; lean_object* x_987; +x_984 = lean_ctor_get(x_979, 0); +x_985 = lean_ctor_get(x_979, 1); +lean_inc(x_985); +lean_inc(x_984); +lean_dec(x_979); +lean_inc(x_980); +x_986 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_985, x_2, x_980); +x_987 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_987, 0, x_984); +lean_ctor_set(x_987, 1, x_986); +x_892 = x_980; +x_893 = x_987; +goto block_960; +} +} +else +{ +lean_object* x_988; +lean_dec(x_2); +x_988 = lean_ctor_get(x_977, 0); +lean_inc(x_988); +lean_dec(x_977); +x_892 = x_988; +x_893 = x_4; +goto block_960; +} +} +block_960: +{ +lean_object* x_894; +if (x_891 == 0) +{ +lean_object* x_905; +x_905 = lean_box(0); +x_894 = x_905; +goto block_904; +} +else +{ +uint8_t x_906; +x_906 = l_Lean_Expr_isLambda(x_892); +if (x_906 == 0) +{ +lean_object* x_907; +x_907 = lean_box(0); +x_894 = x_907; +goto block_904; +} +else +{ +lean_object* x_908; uint8_t x_909; +x_908 = l_Lean_Expr_betaRev(x_892, x_3); +lean_dec(x_892); +x_909 = lean_expr_has_expr_mvar(x_908); +if (x_909 == 0) +{ +uint8_t x_910; +x_910 = lean_expr_has_level_mvar(x_908); +if (x_910 == 0) +{ +lean_object* x_911; +lean_dec(x_1); +x_911 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_911, 0, x_908); +lean_ctor_set(x_911, 1, x_893); +return x_911; +} +else +{ +lean_object* x_912; lean_object* x_913; +x_912 = lean_ctor_get(x_893, 1); +lean_inc(x_912); +x_913 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_912, x_908); +lean_dec(x_912); +if (lean_obj_tag(x_913) == 0) +{ +lean_object* x_914; uint8_t x_915; +lean_inc(x_908); +x_914 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_908, x_893); +x_915 = !lean_is_exclusive(x_914); +if (x_915 == 0) +{ +lean_object* x_916; uint8_t x_917; +x_916 = lean_ctor_get(x_914, 1); +x_917 = !lean_is_exclusive(x_916); +if (x_917 == 0) +{ +lean_object* x_918; lean_object* x_919; lean_object* x_920; +x_918 = lean_ctor_get(x_914, 0); +x_919 = lean_ctor_get(x_916, 1); +lean_inc(x_918); +x_920 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_919, x_908, x_918); +lean_ctor_set(x_916, 1, x_920); +return x_914; +} +else +{ +lean_object* x_921; lean_object* x_922; lean_object* x_923; lean_object* x_924; lean_object* x_925; +x_921 = lean_ctor_get(x_914, 0); +x_922 = lean_ctor_get(x_916, 0); +x_923 = lean_ctor_get(x_916, 1); +lean_inc(x_923); +lean_inc(x_922); +lean_dec(x_916); +lean_inc(x_921); +x_924 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_923, x_908, x_921); +x_925 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_925, 0, x_922); +lean_ctor_set(x_925, 1, x_924); +lean_ctor_set(x_914, 1, x_925); +return x_914; +} +} +else +{ +lean_object* x_926; lean_object* x_927; lean_object* x_928; lean_object* x_929; lean_object* x_930; lean_object* x_931; lean_object* x_932; lean_object* x_933; +x_926 = lean_ctor_get(x_914, 1); +x_927 = lean_ctor_get(x_914, 0); +lean_inc(x_926); +lean_inc(x_927); +lean_dec(x_914); +x_928 = lean_ctor_get(x_926, 0); +lean_inc(x_928); +x_929 = lean_ctor_get(x_926, 1); +lean_inc(x_929); +if (lean_is_exclusive(x_926)) { + lean_ctor_release(x_926, 0); + lean_ctor_release(x_926, 1); + x_930 = x_926; +} else { + lean_dec_ref(x_926); + x_930 = lean_box(0); +} +lean_inc(x_927); +x_931 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_929, x_908, x_927); +if (lean_is_scalar(x_930)) { + x_932 = lean_alloc_ctor(0, 2, 0); +} else { + x_932 = x_930; +} +lean_ctor_set(x_932, 0, x_928); +lean_ctor_set(x_932, 1, x_931); +x_933 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_933, 0, x_927); +lean_ctor_set(x_933, 1, x_932); +return x_933; +} +} +else +{ +lean_object* x_934; lean_object* x_935; +lean_dec(x_908); +lean_dec(x_1); +x_934 = lean_ctor_get(x_913, 0); +lean_inc(x_934); +lean_dec(x_913); +x_935 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_935, 0, x_934); +lean_ctor_set(x_935, 1, x_893); +return x_935; +} +} +} +else +{ +lean_object* x_936; lean_object* x_937; +x_936 = lean_ctor_get(x_893, 1); +lean_inc(x_936); +x_937 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_936, x_908); +lean_dec(x_936); +if (lean_obj_tag(x_937) == 0) +{ +lean_object* x_938; uint8_t x_939; +lean_inc(x_908); +x_938 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_908, x_893); +x_939 = !lean_is_exclusive(x_938); +if (x_939 == 0) +{ +lean_object* x_940; uint8_t x_941; +x_940 = lean_ctor_get(x_938, 1); +x_941 = !lean_is_exclusive(x_940); +if (x_941 == 0) +{ +lean_object* x_942; lean_object* x_943; lean_object* x_944; +x_942 = lean_ctor_get(x_938, 0); +x_943 = lean_ctor_get(x_940, 1); +lean_inc(x_942); +x_944 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_943, x_908, x_942); +lean_ctor_set(x_940, 1, x_944); +return x_938; +} +else +{ +lean_object* x_945; lean_object* x_946; lean_object* x_947; lean_object* x_948; lean_object* x_949; +x_945 = lean_ctor_get(x_938, 0); +x_946 = lean_ctor_get(x_940, 0); +x_947 = lean_ctor_get(x_940, 1); +lean_inc(x_947); +lean_inc(x_946); +lean_dec(x_940); +lean_inc(x_945); +x_948 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_947, x_908, x_945); +x_949 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_949, 0, x_946); +lean_ctor_set(x_949, 1, x_948); +lean_ctor_set(x_938, 1, x_949); +return x_938; +} +} +else +{ +lean_object* x_950; lean_object* x_951; lean_object* x_952; lean_object* x_953; lean_object* x_954; lean_object* x_955; lean_object* x_956; lean_object* x_957; +x_950 = lean_ctor_get(x_938, 1); +x_951 = lean_ctor_get(x_938, 0); +lean_inc(x_950); +lean_inc(x_951); +lean_dec(x_938); +x_952 = lean_ctor_get(x_950, 0); +lean_inc(x_952); +x_953 = lean_ctor_get(x_950, 1); +lean_inc(x_953); +if (lean_is_exclusive(x_950)) { + lean_ctor_release(x_950, 0); + lean_ctor_release(x_950, 1); + x_954 = x_950; +} else { + lean_dec_ref(x_950); + x_954 = lean_box(0); +} +lean_inc(x_951); +x_955 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_953, x_908, x_951); +if (lean_is_scalar(x_954)) { + x_956 = lean_alloc_ctor(0, 2, 0); +} else { + x_956 = x_954; +} +lean_ctor_set(x_956, 0, x_952); +lean_ctor_set(x_956, 1, x_955); +x_957 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_957, 0, x_951); +lean_ctor_set(x_957, 1, x_956); +return x_957; +} +} +else +{ +lean_object* x_958; lean_object* x_959; +lean_dec(x_908); +lean_dec(x_1); +x_958 = lean_ctor_get(x_937, 0); +lean_inc(x_958); +lean_dec(x_937); +x_959 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_959, 0, x_958); +lean_ctor_set(x_959, 1, x_893); +return x_959; +} +} +} +} +block_904: +{ +lean_object* x_895; lean_object* x_896; uint8_t x_897; +lean_dec(x_894); +x_895 = lean_unsigned_to_nat(0u); +x_896 = l_Array_ummapAux___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__4___rarg(x_1, x_895, x_3, x_893); +x_897 = !lean_is_exclusive(x_896); +if (x_897 == 0) +{ +lean_object* x_898; lean_object* x_899; +x_898 = lean_ctor_get(x_896, 0); +x_899 = l_Lean_mkAppRev(x_892, x_898); +lean_dec(x_898); +lean_ctor_set(x_896, 0, x_899); +return x_896; +} +else +{ +lean_object* x_900; lean_object* x_901; lean_object* x_902; lean_object* x_903; +x_900 = lean_ctor_get(x_896, 0); +x_901 = lean_ctor_get(x_896, 1); +lean_inc(x_901); +lean_inc(x_900); +lean_dec(x_896); +x_902 = l_Lean_mkAppRev(x_892, x_900); +lean_dec(x_900); +x_903 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_903, 0, x_902); +lean_ctor_set(x_903, 1, x_901); +return x_903; +} +} +} +} +default: +{ +uint8_t x_989; lean_object* x_990; lean_object* x_991; uint8_t x_1059; +x_989 = l_Lean_Expr_isMVar(x_2); +x_1059 = lean_expr_has_expr_mvar(x_2); +if (x_1059 == 0) +{ +uint8_t x_1060; +x_1060 = lean_expr_has_level_mvar(x_2); +if (x_1060 == 0) +{ +x_990 = x_2; +x_991 = x_4; +goto block_1058; +} +else +{ +lean_object* x_1061; lean_object* x_1062; +x_1061 = lean_ctor_get(x_4, 1); +lean_inc(x_1061); +x_1062 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_1061, x_2); +lean_dec(x_1061); +if (lean_obj_tag(x_1062) == 0) +{ +lean_object* x_1063; lean_object* x_1064; lean_object* x_1065; uint8_t x_1066; +lean_inc(x_2); +lean_inc(x_1); +x_1063 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_2, x_4); +x_1064 = lean_ctor_get(x_1063, 1); +lean_inc(x_1064); +x_1065 = lean_ctor_get(x_1063, 0); +lean_inc(x_1065); +lean_dec(x_1063); +x_1066 = !lean_is_exclusive(x_1064); +if (x_1066 == 0) +{ +lean_object* x_1067; lean_object* x_1068; +x_1067 = lean_ctor_get(x_1064, 1); +lean_inc(x_1065); +x_1068 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_1067, x_2, x_1065); +lean_ctor_set(x_1064, 1, x_1068); +x_990 = x_1065; +x_991 = x_1064; +goto block_1058; +} +else +{ +lean_object* x_1069; lean_object* x_1070; lean_object* x_1071; lean_object* x_1072; +x_1069 = lean_ctor_get(x_1064, 0); +x_1070 = lean_ctor_get(x_1064, 1); +lean_inc(x_1070); +lean_inc(x_1069); +lean_dec(x_1064); +lean_inc(x_1065); +x_1071 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_1070, x_2, x_1065); +x_1072 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_1072, 0, x_1069); +lean_ctor_set(x_1072, 1, x_1071); +x_990 = x_1065; +x_991 = x_1072; +goto block_1058; +} +} +else +{ +lean_object* x_1073; +lean_dec(x_2); +x_1073 = lean_ctor_get(x_1062, 0); +lean_inc(x_1073); +lean_dec(x_1062); +x_990 = x_1073; +x_991 = x_4; +goto block_1058; +} +} +} +else +{ +lean_object* x_1074; lean_object* x_1075; +x_1074 = lean_ctor_get(x_4, 1); +lean_inc(x_1074); +x_1075 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_1074, x_2); +lean_dec(x_1074); +if (lean_obj_tag(x_1075) == 0) +{ +lean_object* x_1076; lean_object* x_1077; lean_object* x_1078; uint8_t x_1079; +lean_inc(x_2); +lean_inc(x_1); +x_1076 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_2, x_4); +x_1077 = lean_ctor_get(x_1076, 1); +lean_inc(x_1077); +x_1078 = lean_ctor_get(x_1076, 0); +lean_inc(x_1078); +lean_dec(x_1076); +x_1079 = !lean_is_exclusive(x_1077); +if (x_1079 == 0) +{ +lean_object* x_1080; lean_object* x_1081; +x_1080 = lean_ctor_get(x_1077, 1); +lean_inc(x_1078); +x_1081 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_1080, x_2, x_1078); +lean_ctor_set(x_1077, 1, x_1081); +x_990 = x_1078; +x_991 = x_1077; +goto block_1058; +} +else +{ +lean_object* x_1082; lean_object* x_1083; lean_object* x_1084; lean_object* x_1085; +x_1082 = lean_ctor_get(x_1077, 0); +x_1083 = lean_ctor_get(x_1077, 1); +lean_inc(x_1083); +lean_inc(x_1082); +lean_dec(x_1077); +lean_inc(x_1078); +x_1084 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_1083, x_2, x_1078); +x_1085 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_1085, 0, x_1082); +lean_ctor_set(x_1085, 1, x_1084); +x_990 = x_1078; +x_991 = x_1085; +goto block_1058; +} +} +else +{ +lean_object* x_1086; +lean_dec(x_2); +x_1086 = lean_ctor_get(x_1075, 0); +lean_inc(x_1086); +lean_dec(x_1075); +x_990 = x_1086; +x_991 = x_4; +goto block_1058; +} +} +block_1058: +{ +lean_object* x_992; +if (x_989 == 0) +{ +lean_object* x_1003; +x_1003 = lean_box(0); +x_992 = x_1003; +goto block_1002; +} +else +{ +uint8_t x_1004; +x_1004 = l_Lean_Expr_isLambda(x_990); +if (x_1004 == 0) +{ +lean_object* x_1005; +x_1005 = lean_box(0); +x_992 = x_1005; +goto block_1002; +} +else +{ +lean_object* x_1006; uint8_t x_1007; +x_1006 = l_Lean_Expr_betaRev(x_990, x_3); +lean_dec(x_990); +x_1007 = lean_expr_has_expr_mvar(x_1006); +if (x_1007 == 0) +{ +uint8_t x_1008; +x_1008 = lean_expr_has_level_mvar(x_1006); +if (x_1008 == 0) +{ +lean_object* x_1009; +lean_dec(x_1); +x_1009 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_1009, 0, x_1006); +lean_ctor_set(x_1009, 1, x_991); +return x_1009; +} +else +{ +lean_object* x_1010; lean_object* x_1011; +x_1010 = lean_ctor_get(x_991, 1); +lean_inc(x_1010); +x_1011 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_1010, x_1006); +lean_dec(x_1010); +if (lean_obj_tag(x_1011) == 0) +{ +lean_object* x_1012; uint8_t x_1013; +lean_inc(x_1006); +x_1012 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_1006, x_991); +x_1013 = !lean_is_exclusive(x_1012); +if (x_1013 == 0) +{ +lean_object* x_1014; uint8_t x_1015; +x_1014 = lean_ctor_get(x_1012, 1); +x_1015 = !lean_is_exclusive(x_1014); +if (x_1015 == 0) +{ +lean_object* x_1016; lean_object* x_1017; lean_object* x_1018; +x_1016 = lean_ctor_get(x_1012, 0); +x_1017 = lean_ctor_get(x_1014, 1); +lean_inc(x_1016); +x_1018 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_1017, x_1006, x_1016); +lean_ctor_set(x_1014, 1, x_1018); +return x_1012; +} +else +{ +lean_object* x_1019; lean_object* x_1020; lean_object* x_1021; lean_object* x_1022; lean_object* x_1023; +x_1019 = lean_ctor_get(x_1012, 0); +x_1020 = lean_ctor_get(x_1014, 0); +x_1021 = lean_ctor_get(x_1014, 1); +lean_inc(x_1021); +lean_inc(x_1020); +lean_dec(x_1014); +lean_inc(x_1019); +x_1022 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_1021, x_1006, x_1019); +x_1023 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_1023, 0, x_1020); +lean_ctor_set(x_1023, 1, x_1022); +lean_ctor_set(x_1012, 1, x_1023); +return x_1012; +} +} +else +{ +lean_object* x_1024; lean_object* x_1025; lean_object* x_1026; lean_object* x_1027; lean_object* x_1028; lean_object* x_1029; lean_object* x_1030; lean_object* x_1031; +x_1024 = lean_ctor_get(x_1012, 1); +x_1025 = lean_ctor_get(x_1012, 0); +lean_inc(x_1024); +lean_inc(x_1025); +lean_dec(x_1012); +x_1026 = lean_ctor_get(x_1024, 0); +lean_inc(x_1026); +x_1027 = lean_ctor_get(x_1024, 1); +lean_inc(x_1027); +if (lean_is_exclusive(x_1024)) { + lean_ctor_release(x_1024, 0); + lean_ctor_release(x_1024, 1); + x_1028 = x_1024; +} else { + lean_dec_ref(x_1024); + x_1028 = lean_box(0); +} +lean_inc(x_1025); +x_1029 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_1027, x_1006, x_1025); +if (lean_is_scalar(x_1028)) { + x_1030 = lean_alloc_ctor(0, 2, 0); +} else { + x_1030 = x_1028; +} +lean_ctor_set(x_1030, 0, x_1026); +lean_ctor_set(x_1030, 1, x_1029); +x_1031 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_1031, 0, x_1025); +lean_ctor_set(x_1031, 1, x_1030); +return x_1031; +} +} +else +{ +lean_object* x_1032; lean_object* x_1033; +lean_dec(x_1006); +lean_dec(x_1); +x_1032 = lean_ctor_get(x_1011, 0); +lean_inc(x_1032); +lean_dec(x_1011); +x_1033 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_1033, 0, x_1032); +lean_ctor_set(x_1033, 1, x_991); +return x_1033; +} +} +} +else +{ +lean_object* x_1034; lean_object* x_1035; +x_1034 = lean_ctor_get(x_991, 1); +lean_inc(x_1034); +x_1035 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_1034, x_1006); +lean_dec(x_1034); +if (lean_obj_tag(x_1035) == 0) +{ +lean_object* x_1036; uint8_t x_1037; +lean_inc(x_1006); +x_1036 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_1006, x_991); +x_1037 = !lean_is_exclusive(x_1036); +if (x_1037 == 0) +{ +lean_object* x_1038; uint8_t x_1039; +x_1038 = lean_ctor_get(x_1036, 1); +x_1039 = !lean_is_exclusive(x_1038); +if (x_1039 == 0) +{ +lean_object* x_1040; lean_object* x_1041; lean_object* x_1042; +x_1040 = lean_ctor_get(x_1036, 0); +x_1041 = lean_ctor_get(x_1038, 1); +lean_inc(x_1040); +x_1042 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_1041, x_1006, x_1040); +lean_ctor_set(x_1038, 1, x_1042); +return x_1036; +} +else +{ +lean_object* x_1043; lean_object* x_1044; lean_object* x_1045; lean_object* x_1046; lean_object* x_1047; +x_1043 = lean_ctor_get(x_1036, 0); +x_1044 = lean_ctor_get(x_1038, 0); +x_1045 = lean_ctor_get(x_1038, 1); +lean_inc(x_1045); +lean_inc(x_1044); +lean_dec(x_1038); +lean_inc(x_1043); +x_1046 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_1045, x_1006, x_1043); +x_1047 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_1047, 0, x_1044); +lean_ctor_set(x_1047, 1, x_1046); +lean_ctor_set(x_1036, 1, x_1047); +return x_1036; +} +} +else +{ +lean_object* x_1048; lean_object* x_1049; lean_object* x_1050; lean_object* x_1051; lean_object* x_1052; lean_object* x_1053; lean_object* x_1054; lean_object* x_1055; +x_1048 = lean_ctor_get(x_1036, 1); +x_1049 = lean_ctor_get(x_1036, 0); +lean_inc(x_1048); +lean_inc(x_1049); +lean_dec(x_1036); +x_1050 = lean_ctor_get(x_1048, 0); +lean_inc(x_1050); +x_1051 = lean_ctor_get(x_1048, 1); +lean_inc(x_1051); +if (lean_is_exclusive(x_1048)) { + lean_ctor_release(x_1048, 0); + lean_ctor_release(x_1048, 1); + x_1052 = x_1048; +} else { + lean_dec_ref(x_1048); + x_1052 = lean_box(0); +} +lean_inc(x_1049); +x_1053 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_1051, x_1006, x_1049); +if (lean_is_scalar(x_1052)) { + x_1054 = lean_alloc_ctor(0, 2, 0); +} else { + x_1054 = x_1052; +} +lean_ctor_set(x_1054, 0, x_1050); +lean_ctor_set(x_1054, 1, x_1053); +x_1055 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_1055, 0, x_1049); +lean_ctor_set(x_1055, 1, x_1054); +return x_1055; +} +} +else +{ +lean_object* x_1056; lean_object* x_1057; +lean_dec(x_1006); +lean_dec(x_1); +x_1056 = lean_ctor_get(x_1035, 0); +lean_inc(x_1056); +lean_dec(x_1035); +x_1057 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_1057, 0, x_1056); +lean_ctor_set(x_1057, 1, x_991); +return x_1057; +} +} +} +} +block_1002: +{ +lean_object* x_993; lean_object* x_994; uint8_t x_995; +lean_dec(x_992); +x_993 = lean_unsigned_to_nat(0u); +x_994 = l_Array_ummapAux___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__4___rarg(x_1, x_993, x_3, x_991); +x_995 = !lean_is_exclusive(x_994); +if (x_995 == 0) +{ +lean_object* x_996; lean_object* x_997; +x_996 = lean_ctor_get(x_994, 0); +x_997 = l_Lean_mkAppRev(x_990, x_996); +lean_dec(x_996); +lean_ctor_set(x_994, 0, x_997); +return x_994; +} +else +{ +lean_object* x_998; lean_object* x_999; lean_object* x_1000; lean_object* x_1001; +x_998 = lean_ctor_get(x_994, 0); +x_999 = lean_ctor_get(x_994, 1); +lean_inc(x_999); +lean_inc(x_998); +lean_dec(x_994); +x_1000 = l_Lean_mkAppRev(x_990, x_998); +lean_dec(x_998); +x_1001 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_1001, 0, x_1000); +lean_ctor_set(x_1001, 1, x_999); +return x_1001; +} +} +} +} +} +} +} +lean_object* l___private_Init_Lean_Expr_3__withAppRevAux___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__5(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l___private_Init_Lean_Expr_3__withAppRevAux___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__5___rarg), 4, 0); +return x_2; +} +} +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___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_16; lean_object* x_17; lean_object* x_27; lean_object* x_28; +switch (lean_obj_tag(x_2)) { +case 2: +{ +lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_50; lean_object* x_51; +x_38 = lean_ctor_get(x_2, 0); +lean_inc(x_38); +x_50 = lean_ctor_get(x_3, 1); +lean_inc(x_50); +x_51 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_50, x_2); +if (lean_obj_tag(x_51) == 0) +{ +lean_object* x_52; lean_object* x_53; lean_object* x_54; +x_52 = lean_ctor_get(x_3, 0); +lean_inc(x_52); +x_53 = lean_ctor_get(x_1, 5); +lean_inc(x_53); +lean_inc(x_38); +lean_inc(x_52); +x_54 = lean_apply_2(x_53, x_52, x_38); +if (lean_obj_tag(x_54) == 0) +{ +lean_object* x_55; lean_object* x_56; +x_55 = lean_ctor_get(x_1, 10); +lean_inc(x_55); +lean_inc(x_38); +x_56 = lean_apply_2(x_55, x_52, x_38); +if (lean_obj_tag(x_56) == 0) +{ +lean_dec(x_50); +lean_dec(x_38); +lean_dec(x_1); +lean_inc(x_2); +x_4 = x_2; +x_5 = x_3; +goto block_15; +} +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; uint8_t x_108; +x_57 = lean_ctor_get(x_56, 0); +lean_inc(x_57); +lean_dec(x_56); +x_58 = lean_ctor_get(x_57, 0); +lean_inc(x_58); +x_59 = lean_ctor_get(x_57, 1); +lean_inc(x_59); +x_60 = lean_ctor_get(x_57, 2); +lean_inc(x_60); +lean_dec(x_57); +x_108 = lean_expr_has_expr_mvar(x_60); +if (x_108 == 0) +{ +uint8_t x_109; +x_109 = lean_expr_has_level_mvar(x_60); +if (x_109 == 0) +{ +lean_dec(x_50); +x_61 = x_60; +x_62 = x_3; +goto block_107; +} +else +{ +lean_object* x_110; +x_110 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_50, x_60); +lean_dec(x_50); +if (lean_obj_tag(x_110) == 0) +{ +lean_object* x_111; lean_object* x_112; lean_object* x_113; uint8_t x_114; +lean_inc(x_60); +lean_inc(x_1); +x_111 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_60, x_3); +x_112 = lean_ctor_get(x_111, 1); +lean_inc(x_112); +x_113 = lean_ctor_get(x_111, 0); +lean_inc(x_113); +lean_dec(x_111); +x_114 = !lean_is_exclusive(x_112); +if (x_114 == 0) +{ +lean_object* x_115; lean_object* x_116; +x_115 = lean_ctor_get(x_112, 1); +lean_inc(x_113); +x_116 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_115, x_60, x_113); +lean_ctor_set(x_112, 1, x_116); +x_61 = x_113; +x_62 = x_112; +goto block_107; +} +else +{ +lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; +x_117 = lean_ctor_get(x_112, 0); +x_118 = lean_ctor_get(x_112, 1); +lean_inc(x_118); +lean_inc(x_117); +lean_dec(x_112); +lean_inc(x_113); +x_119 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_118, x_60, x_113); +x_120 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_120, 0, x_117); +lean_ctor_set(x_120, 1, x_119); +x_61 = x_113; +x_62 = x_120; +goto block_107; +} +} +else +{ +lean_object* x_121; +lean_dec(x_60); +x_121 = lean_ctor_get(x_110, 0); +lean_inc(x_121); +lean_dec(x_110); +x_61 = x_121; +x_62 = x_3; +goto block_107; +} +} +} +else +{ +lean_object* x_122; +x_122 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_50, x_60); +lean_dec(x_50); +if (lean_obj_tag(x_122) == 0) +{ +lean_object* x_123; lean_object* x_124; lean_object* x_125; uint8_t x_126; +lean_inc(x_60); +lean_inc(x_1); +x_123 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_60, x_3); +x_124 = lean_ctor_get(x_123, 1); +lean_inc(x_124); +x_125 = lean_ctor_get(x_123, 0); +lean_inc(x_125); +lean_dec(x_123); +x_126 = !lean_is_exclusive(x_124); +if (x_126 == 0) +{ +lean_object* x_127; lean_object* x_128; +x_127 = lean_ctor_get(x_124, 1); +lean_inc(x_125); +x_128 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_127, x_60, x_125); +lean_ctor_set(x_124, 1, x_128); +x_61 = x_125; +x_62 = x_124; +goto block_107; +} +else +{ +lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; +x_129 = lean_ctor_get(x_124, 0); +x_130 = lean_ctor_get(x_124, 1); +lean_inc(x_130); +lean_inc(x_129); +lean_dec(x_124); +lean_inc(x_125); +x_131 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_130, x_60, x_125); +x_132 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_132, 0, x_129); +lean_ctor_set(x_132, 1, x_131); +x_61 = x_125; +x_62 = x_132; +goto block_107; +} +} +else +{ +lean_object* x_133; +lean_dec(x_60); +x_133 = lean_ctor_get(x_122, 0); +lean_inc(x_133); +lean_dec(x_122); +x_61 = x_133; +x_62 = x_3; +goto block_107; +} +} +block_107: +{ +uint8_t x_63; +x_63 = lean_expr_has_expr_mvar(x_61); +if (x_63 == 0) +{ +uint8_t x_64; +x_64 = lean_expr_has_level_mvar(x_61); +if (x_64 == 0) +{ +lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; +x_65 = lean_array_get_size(x_59); +x_66 = lean_expr_abstract(x_61, x_59); +lean_inc(x_58); +lean_inc(x_1); +x_67 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__1___rarg(x_1, x_58, x_59, x_65, x_66, x_62); +x_68 = lean_ctor_get(x_67, 0); +lean_inc(x_68); +if (lean_obj_tag(x_68) == 0) +{ +lean_object* x_69; lean_object* x_70; uint8_t x_71; +x_69 = lean_ctor_get(x_67, 1); +lean_inc(x_69); +lean_dec(x_67); +x_70 = lean_ctor_get(x_1, 9); +lean_inc(x_70); +lean_dec(x_1); +x_71 = !lean_is_exclusive(x_69); +if (x_71 == 0) +{ +lean_object* x_72; lean_object* x_73; +x_72 = lean_ctor_get(x_69, 0); +x_73 = lean_apply_5(x_70, x_72, x_38, x_58, x_59, x_61); +lean_ctor_set(x_69, 0, x_73); +lean_inc(x_2); +x_4 = x_2; +x_5 = x_69; +goto block_15; +} +else +{ +lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; +x_74 = lean_ctor_get(x_69, 0); +x_75 = lean_ctor_get(x_69, 1); +lean_inc(x_75); +lean_inc(x_74); +lean_dec(x_69); +x_76 = lean_apply_5(x_70, x_74, x_38, x_58, x_59, x_61); +x_77 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_77, 0, x_76); +lean_ctor_set(x_77, 1, x_75); +lean_inc(x_2); +x_4 = x_2; +x_5 = x_77; +goto block_15; +} +} +else +{ +lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; uint8_t x_82; +lean_dec(x_61); +lean_dec(x_59); +lean_dec(x_58); +x_78 = lean_ctor_get(x_67, 1); +lean_inc(x_78); +lean_dec(x_67); +x_79 = lean_ctor_get(x_68, 0); +lean_inc(x_79); +lean_dec(x_68); +x_80 = lean_ctor_get(x_1, 6); +lean_inc(x_80); +x_81 = lean_ctor_get(x_1, 11); +lean_inc(x_81); +lean_dec(x_1); +x_82 = !lean_is_exclusive(x_78); +if (x_82 == 0) +{ +lean_object* x_83; lean_object* x_84; lean_object* x_85; +x_83 = lean_ctor_get(x_78, 0); +lean_inc(x_38); +x_84 = lean_apply_2(x_81, x_83, x_38); +lean_inc(x_79); +x_85 = lean_apply_3(x_80, x_84, x_38, x_79); +lean_ctor_set(x_78, 0, x_85); +x_4 = x_79; +x_5 = x_78; +goto block_15; +} +else +{ +lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; +x_86 = lean_ctor_get(x_78, 0); +x_87 = lean_ctor_get(x_78, 1); +lean_inc(x_87); +lean_inc(x_86); +lean_dec(x_78); +lean_inc(x_38); +x_88 = lean_apply_2(x_81, x_86, x_38); +lean_inc(x_79); +x_89 = lean_apply_3(x_80, x_88, x_38, x_79); +x_90 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_90, 0, x_89); +lean_ctor_set(x_90, 1, x_87); +x_4 = x_79; +x_5 = x_90; +goto block_15; +} +} +} +else +{ +lean_object* x_91; uint8_t x_92; +x_91 = lean_ctor_get(x_1, 9); +lean_inc(x_91); +lean_dec(x_1); +x_92 = !lean_is_exclusive(x_62); +if (x_92 == 0) +{ +lean_object* x_93; lean_object* x_94; +x_93 = lean_ctor_get(x_62, 0); +x_94 = lean_apply_5(x_91, x_93, x_38, x_58, x_59, x_61); +lean_ctor_set(x_62, 0, x_94); +lean_inc(x_2); +x_4 = x_2; +x_5 = x_62; +goto block_15; +} +else +{ +lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; +x_95 = lean_ctor_get(x_62, 0); +x_96 = lean_ctor_get(x_62, 1); +lean_inc(x_96); +lean_inc(x_95); +lean_dec(x_62); +x_97 = lean_apply_5(x_91, x_95, x_38, x_58, x_59, x_61); +x_98 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_98, 0, x_97); +lean_ctor_set(x_98, 1, x_96); +lean_inc(x_2); +x_4 = x_2; +x_5 = x_98; +goto block_15; +} +} +} +else +{ +lean_object* x_99; uint8_t x_100; +x_99 = lean_ctor_get(x_1, 9); +lean_inc(x_99); +lean_dec(x_1); +x_100 = !lean_is_exclusive(x_62); +if (x_100 == 0) +{ +lean_object* x_101; lean_object* x_102; +x_101 = lean_ctor_get(x_62, 0); +x_102 = lean_apply_5(x_99, x_101, x_38, x_58, x_59, x_61); +lean_ctor_set(x_62, 0, x_102); +lean_inc(x_2); +x_4 = x_2; +x_5 = x_62; +goto block_15; +} +else +{ +lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; +x_103 = lean_ctor_get(x_62, 0); +x_104 = lean_ctor_get(x_62, 1); +lean_inc(x_104); +lean_inc(x_103); +lean_dec(x_62); +x_105 = lean_apply_5(x_99, x_103, x_38, x_58, x_59, x_61); +x_106 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_106, 0, x_105); +lean_ctor_set(x_106, 1, x_104); +lean_inc(x_2); +x_4 = x_2; +x_5 = x_106; +goto block_15; +} +} +} +} +} +else +{ +lean_object* x_134; uint8_t x_135; +lean_dec(x_52); +x_134 = lean_ctor_get(x_54, 0); +lean_inc(x_134); +lean_dec(x_54); +x_135 = lean_expr_has_expr_mvar(x_134); +if (x_135 == 0) +{ +uint8_t x_136; +x_136 = lean_expr_has_level_mvar(x_134); +if (x_136 == 0) +{ +lean_dec(x_50); +x_39 = x_134; +x_40 = x_3; +goto block_49; +} +else +{ +lean_object* x_137; +x_137 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_50, x_134); +lean_dec(x_50); +if (lean_obj_tag(x_137) == 0) +{ +lean_object* x_138; lean_object* x_139; lean_object* x_140; uint8_t x_141; +lean_inc(x_134); +lean_inc(x_1); +x_138 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_134, x_3); +x_139 = lean_ctor_get(x_138, 1); +lean_inc(x_139); +x_140 = lean_ctor_get(x_138, 0); +lean_inc(x_140); +lean_dec(x_138); +x_141 = !lean_is_exclusive(x_139); +if (x_141 == 0) +{ +lean_object* x_142; lean_object* x_143; +x_142 = lean_ctor_get(x_139, 1); +lean_inc(x_140); +x_143 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_142, x_134, x_140); +lean_ctor_set(x_139, 1, x_143); +x_39 = x_140; +x_40 = x_139; +goto block_49; +} +else +{ +lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147; +x_144 = lean_ctor_get(x_139, 0); +x_145 = lean_ctor_get(x_139, 1); +lean_inc(x_145); +lean_inc(x_144); +lean_dec(x_139); +lean_inc(x_140); +x_146 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_145, x_134, x_140); +x_147 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_147, 0, x_144); +lean_ctor_set(x_147, 1, x_146); +x_39 = x_140; +x_40 = x_147; +goto block_49; +} +} +else +{ +lean_object* x_148; +lean_dec(x_134); +x_148 = lean_ctor_get(x_137, 0); +lean_inc(x_148); +lean_dec(x_137); +x_39 = x_148; +x_40 = x_3; +goto block_49; +} +} +} +else +{ +lean_object* x_149; +x_149 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_50, x_134); +lean_dec(x_50); +if (lean_obj_tag(x_149) == 0) +{ +lean_object* x_150; lean_object* x_151; lean_object* x_152; uint8_t x_153; +lean_inc(x_134); +lean_inc(x_1); +x_150 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_134, x_3); +x_151 = lean_ctor_get(x_150, 1); +lean_inc(x_151); +x_152 = lean_ctor_get(x_150, 0); +lean_inc(x_152); +lean_dec(x_150); +x_153 = !lean_is_exclusive(x_151); +if (x_153 == 0) +{ +lean_object* x_154; lean_object* x_155; +x_154 = lean_ctor_get(x_151, 1); +lean_inc(x_152); +x_155 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_154, x_134, x_152); +lean_ctor_set(x_151, 1, x_155); +x_39 = x_152; +x_40 = x_151; +goto block_49; +} +else +{ +lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; +x_156 = lean_ctor_get(x_151, 0); +x_157 = lean_ctor_get(x_151, 1); +lean_inc(x_157); +lean_inc(x_156); +lean_dec(x_151); +lean_inc(x_152); +x_158 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_157, x_134, x_152); +x_159 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_159, 0, x_156); +lean_ctor_set(x_159, 1, x_158); +x_39 = x_152; +x_40 = x_159; +goto block_49; +} +} +else +{ +lean_object* x_160; +lean_dec(x_134); +x_160 = lean_ctor_get(x_149, 0); +lean_inc(x_160); +lean_dec(x_149); +x_39 = x_160; +x_40 = x_3; +goto block_49; +} +} +} +} +else +{ +lean_object* x_161; lean_object* x_162; +lean_dec(x_50); +lean_dec(x_38); +lean_dec(x_2); +lean_dec(x_1); +x_161 = lean_ctor_get(x_51, 0); +lean_inc(x_161); +lean_dec(x_51); +x_162 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_162, 0, x_161); +lean_ctor_set(x_162, 1, x_3); +return x_162; +} +block_49: +{ +lean_object* x_41; uint8_t x_42; +x_41 = lean_ctor_get(x_1, 6); +lean_inc(x_41); +lean_dec(x_1); +x_42 = !lean_is_exclusive(x_40); +if (x_42 == 0) +{ +lean_object* x_43; lean_object* x_44; +x_43 = lean_ctor_get(x_40, 0); +lean_inc(x_39); +x_44 = lean_apply_3(x_41, x_43, x_38, x_39); +lean_ctor_set(x_40, 0, x_44); +x_4 = x_39; +x_5 = x_40; +goto block_15; +} +else +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; +x_45 = lean_ctor_get(x_40, 0); +x_46 = lean_ctor_get(x_40, 1); +lean_inc(x_46); +lean_inc(x_45); +lean_dec(x_40); +lean_inc(x_39); +x_47 = lean_apply_3(x_41, x_45, x_38, x_39); +x_48 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_48, 0, x_47); +lean_ctor_set(x_48, 1, x_46); +x_4 = x_39; +x_5 = x_48; +goto block_15; +} +} +} +case 3: +{ +lean_object* x_163; uint8_t x_164; +x_163 = lean_ctor_get(x_2, 0); +lean_inc(x_163); +x_164 = !lean_is_exclusive(x_3); +if (x_164 == 0) +{ +lean_object* x_165; lean_object* x_166; uint8_t x_167; +x_165 = lean_ctor_get(x_3, 0); +x_166 = l_Lean_AbstractMetavarContext_instantiateLevelMVars___main___rarg(x_1, x_163, x_165); +x_167 = !lean_is_exclusive(x_166); +if (x_167 == 0) +{ +lean_object* x_168; lean_object* x_169; lean_object* x_170; +x_168 = lean_ctor_get(x_166, 0); +x_169 = lean_ctor_get(x_166, 1); +lean_ctor_set(x_3, 0, x_169); +x_170 = lean_expr_update_sort(x_2, x_168); +lean_ctor_set(x_166, 1, x_3); +lean_ctor_set(x_166, 0, x_170); +return x_166; +} +else +{ +lean_object* x_171; lean_object* x_172; lean_object* x_173; lean_object* x_174; +x_171 = lean_ctor_get(x_166, 0); +x_172 = lean_ctor_get(x_166, 1); +lean_inc(x_172); +lean_inc(x_171); +lean_dec(x_166); +lean_ctor_set(x_3, 0, x_172); +x_173 = lean_expr_update_sort(x_2, x_171); +x_174 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_174, 0, x_173); +lean_ctor_set(x_174, 1, x_3); +return x_174; +} +} +else +{ +lean_object* x_175; 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; +x_175 = lean_ctor_get(x_3, 0); +x_176 = lean_ctor_get(x_3, 1); +lean_inc(x_176); +lean_inc(x_175); +lean_dec(x_3); +x_177 = l_Lean_AbstractMetavarContext_instantiateLevelMVars___main___rarg(x_1, x_163, x_175); +x_178 = lean_ctor_get(x_177, 0); +lean_inc(x_178); +x_179 = lean_ctor_get(x_177, 1); +lean_inc(x_179); +if (lean_is_exclusive(x_177)) { + lean_ctor_release(x_177, 0); + lean_ctor_release(x_177, 1); + x_180 = x_177; +} else { + lean_dec_ref(x_177); + x_180 = lean_box(0); +} +x_181 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_181, 0, x_179); +lean_ctor_set(x_181, 1, x_176); +x_182 = lean_expr_update_sort(x_2, x_178); +if (lean_is_scalar(x_180)) { + x_183 = lean_alloc_ctor(0, 2, 0); +} else { + x_183 = x_180; +} +lean_ctor_set(x_183, 0, x_182); +lean_ctor_set(x_183, 1, x_181); +return x_183; +} +} +case 4: +{ +lean_object* x_184; lean_object* x_185; uint8_t x_186; +x_184 = lean_ctor_get(x_2, 1); +lean_inc(x_184); +x_185 = l_List_mmap___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__3___rarg(x_1, x_184, x_3); +x_186 = !lean_is_exclusive(x_185); +if (x_186 == 0) +{ +lean_object* x_187; lean_object* x_188; +x_187 = lean_ctor_get(x_185, 0); +x_188 = lean_expr_update_const(x_2, x_187); +lean_ctor_set(x_185, 0, x_188); +return x_185; +} +else +{ +lean_object* x_189; lean_object* x_190; lean_object* x_191; lean_object* x_192; +x_189 = lean_ctor_get(x_185, 0); +x_190 = lean_ctor_get(x_185, 1); +lean_inc(x_190); +lean_inc(x_189); +lean_dec(x_185); +x_191 = lean_expr_update_const(x_2, x_189); +x_192 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_192, 0, x_191); +lean_ctor_set(x_192, 1, x_190); +return x_192; +} +} +case 5: +{ +lean_object* x_193; lean_object* x_194; lean_object* x_195; lean_object* x_196; +x_193 = lean_unsigned_to_nat(0u); +x_194 = l_Lean_Expr_getAppNumArgsAux___main(x_2, x_193); +x_195 = lean_mk_empty_array_with_capacity(x_194); +lean_dec(x_194); +x_196 = l___private_Init_Lean_Expr_3__withAppRevAux___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__5___rarg(x_1, x_2, x_195, x_3); +return x_196; +} +case 6: +{ +lean_object* x_197; lean_object* x_198; lean_object* x_199; lean_object* x_200; uint8_t x_242; +x_197 = lean_ctor_get(x_2, 1); +lean_inc(x_197); +x_198 = lean_ctor_get(x_2, 2); +lean_inc(x_198); +x_242 = lean_expr_has_expr_mvar(x_197); +if (x_242 == 0) +{ +uint8_t x_243; +x_243 = lean_expr_has_level_mvar(x_197); +if (x_243 == 0) +{ +x_199 = x_197; +x_200 = x_3; +goto block_241; +} +else +{ +lean_object* x_244; lean_object* x_245; +x_244 = lean_ctor_get(x_3, 1); +lean_inc(x_244); +x_245 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_244, x_197); +lean_dec(x_244); +if (lean_obj_tag(x_245) == 0) +{ +lean_object* x_246; lean_object* x_247; lean_object* x_248; uint8_t x_249; +lean_inc(x_197); +lean_inc(x_1); +x_246 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_197, x_3); +x_247 = lean_ctor_get(x_246, 1); +lean_inc(x_247); +x_248 = lean_ctor_get(x_246, 0); +lean_inc(x_248); +lean_dec(x_246); +x_249 = !lean_is_exclusive(x_247); +if (x_249 == 0) +{ +lean_object* x_250; lean_object* x_251; +x_250 = lean_ctor_get(x_247, 1); +lean_inc(x_248); +x_251 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_250, x_197, x_248); +lean_ctor_set(x_247, 1, x_251); +x_199 = x_248; +x_200 = x_247; +goto block_241; +} +else +{ +lean_object* x_252; lean_object* x_253; lean_object* x_254; lean_object* x_255; +x_252 = lean_ctor_get(x_247, 0); +x_253 = lean_ctor_get(x_247, 1); +lean_inc(x_253); +lean_inc(x_252); +lean_dec(x_247); +lean_inc(x_248); +x_254 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_253, x_197, x_248); +x_255 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_255, 0, x_252); +lean_ctor_set(x_255, 1, x_254); +x_199 = x_248; +x_200 = x_255; +goto block_241; +} +} +else +{ +lean_object* x_256; +lean_dec(x_197); +x_256 = lean_ctor_get(x_245, 0); +lean_inc(x_256); +lean_dec(x_245); +x_199 = x_256; +x_200 = x_3; +goto block_241; +} +} +} +else +{ +lean_object* x_257; lean_object* x_258; +x_257 = lean_ctor_get(x_3, 1); +lean_inc(x_257); +x_258 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_257, x_197); +lean_dec(x_257); +if (lean_obj_tag(x_258) == 0) +{ +lean_object* x_259; lean_object* x_260; lean_object* x_261; uint8_t x_262; +lean_inc(x_197); +lean_inc(x_1); +x_259 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_197, x_3); +x_260 = lean_ctor_get(x_259, 1); +lean_inc(x_260); +x_261 = lean_ctor_get(x_259, 0); +lean_inc(x_261); +lean_dec(x_259); +x_262 = !lean_is_exclusive(x_260); +if (x_262 == 0) +{ +lean_object* x_263; lean_object* x_264; +x_263 = lean_ctor_get(x_260, 1); +lean_inc(x_261); +x_264 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_263, x_197, x_261); +lean_ctor_set(x_260, 1, x_264); +x_199 = x_261; +x_200 = x_260; +goto block_241; +} +else +{ +lean_object* x_265; lean_object* x_266; lean_object* x_267; lean_object* x_268; +x_265 = lean_ctor_get(x_260, 0); +x_266 = lean_ctor_get(x_260, 1); +lean_inc(x_266); +lean_inc(x_265); +lean_dec(x_260); +lean_inc(x_261); +x_267 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_266, x_197, x_261); +x_268 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_268, 0, x_265); +lean_ctor_set(x_268, 1, x_267); +x_199 = x_261; +x_200 = x_268; +goto block_241; +} +} +else +{ +lean_object* x_269; +lean_dec(x_197); +x_269 = lean_ctor_get(x_258, 0); +lean_inc(x_269); +lean_dec(x_258); +x_199 = x_269; +x_200 = x_3; +goto block_241; +} +} +block_241: +{ +lean_object* x_201; lean_object* x_202; uint8_t x_213; +x_213 = lean_expr_has_expr_mvar(x_198); +if (x_213 == 0) +{ +uint8_t x_214; +x_214 = lean_expr_has_level_mvar(x_198); +if (x_214 == 0) +{ +lean_dec(x_1); +x_201 = x_198; +x_202 = x_200; +goto block_212; +} +else +{ +lean_object* x_215; lean_object* x_216; +x_215 = lean_ctor_get(x_200, 1); +lean_inc(x_215); +x_216 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_215, x_198); +lean_dec(x_215); +if (lean_obj_tag(x_216) == 0) +{ +lean_object* x_217; lean_object* x_218; lean_object* x_219; uint8_t x_220; +lean_inc(x_198); +x_217 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_198, x_200); +x_218 = lean_ctor_get(x_217, 1); +lean_inc(x_218); +x_219 = lean_ctor_get(x_217, 0); +lean_inc(x_219); +lean_dec(x_217); +x_220 = !lean_is_exclusive(x_218); +if (x_220 == 0) +{ +lean_object* x_221; lean_object* x_222; +x_221 = lean_ctor_get(x_218, 1); +lean_inc(x_219); +x_222 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_221, x_198, x_219); +lean_ctor_set(x_218, 1, x_222); +x_201 = x_219; +x_202 = x_218; +goto block_212; +} +else +{ +lean_object* x_223; lean_object* x_224; lean_object* x_225; lean_object* x_226; +x_223 = lean_ctor_get(x_218, 0); +x_224 = lean_ctor_get(x_218, 1); +lean_inc(x_224); +lean_inc(x_223); +lean_dec(x_218); +lean_inc(x_219); +x_225 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_224, x_198, x_219); +x_226 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_226, 0, x_223); +lean_ctor_set(x_226, 1, x_225); +x_201 = x_219; +x_202 = x_226; +goto block_212; +} +} +else +{ +lean_object* x_227; +lean_dec(x_198); +lean_dec(x_1); +x_227 = lean_ctor_get(x_216, 0); +lean_inc(x_227); +lean_dec(x_216); +x_201 = x_227; +x_202 = x_200; +goto block_212; +} +} +} +else +{ +lean_object* x_228; lean_object* x_229; +x_228 = lean_ctor_get(x_200, 1); +lean_inc(x_228); +x_229 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_228, x_198); +lean_dec(x_228); +if (lean_obj_tag(x_229) == 0) +{ +lean_object* x_230; lean_object* x_231; lean_object* x_232; uint8_t x_233; +lean_inc(x_198); +x_230 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_198, x_200); +x_231 = lean_ctor_get(x_230, 1); +lean_inc(x_231); +x_232 = lean_ctor_get(x_230, 0); +lean_inc(x_232); +lean_dec(x_230); +x_233 = !lean_is_exclusive(x_231); +if (x_233 == 0) +{ +lean_object* x_234; lean_object* x_235; +x_234 = lean_ctor_get(x_231, 1); +lean_inc(x_232); +x_235 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_234, x_198, x_232); +lean_ctor_set(x_231, 1, x_235); +x_201 = x_232; +x_202 = x_231; +goto block_212; +} +else +{ +lean_object* x_236; lean_object* x_237; lean_object* x_238; lean_object* x_239; +x_236 = lean_ctor_get(x_231, 0); +x_237 = lean_ctor_get(x_231, 1); +lean_inc(x_237); +lean_inc(x_236); +lean_dec(x_231); +lean_inc(x_232); +x_238 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_237, x_198, x_232); +x_239 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_239, 0, x_236); +lean_ctor_set(x_239, 1, x_238); +x_201 = x_232; +x_202 = x_239; +goto block_212; +} +} +else +{ +lean_object* x_240; +lean_dec(x_198); +lean_dec(x_1); +x_240 = lean_ctor_get(x_229, 0); +lean_inc(x_240); +lean_dec(x_229); +x_201 = x_240; +x_202 = x_200; +goto block_212; +} +} +block_212: +{ +if (lean_obj_tag(x_2) == 6) +{ +uint8_t x_203; lean_object* x_204; lean_object* x_205; +x_203 = lean_ctor_get_uint8(x_2, sizeof(void*)*3); +x_204 = lean_expr_update_lambda(x_2, x_203, x_199, x_201); +x_205 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_205, 0, x_204); +lean_ctor_set(x_205, 1, x_202); +return x_205; +} +else +{ +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_dec(x_201); +lean_dec(x_199); +lean_dec(x_2); +x_206 = l_Lean_Expr_constName___closed__1; +x_207 = lean_unsigned_to_nat(466u); +x_208 = lean_unsigned_to_nat(18u); +x_209 = l_Lean_Expr_updateLambda_x21___closed__1; +x_210 = l_panicWithPos___at_Lean_Expr_bindingDomain___spec__1(x_206, x_207, x_208, x_209); +x_211 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_211, 0, x_210); +lean_ctor_set(x_211, 1, x_202); +return x_211; +} +} +} +} +case 7: +{ +lean_object* x_270; lean_object* x_271; lean_object* x_272; lean_object* x_273; uint8_t x_315; +x_270 = lean_ctor_get(x_2, 1); +lean_inc(x_270); +x_271 = lean_ctor_get(x_2, 2); +lean_inc(x_271); +x_315 = lean_expr_has_expr_mvar(x_270); +if (x_315 == 0) +{ +uint8_t x_316; +x_316 = lean_expr_has_level_mvar(x_270); +if (x_316 == 0) +{ +x_272 = x_270; +x_273 = x_3; +goto block_314; +} +else +{ +lean_object* x_317; lean_object* x_318; +x_317 = lean_ctor_get(x_3, 1); +lean_inc(x_317); +x_318 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_317, x_270); +lean_dec(x_317); +if (lean_obj_tag(x_318) == 0) +{ +lean_object* x_319; lean_object* x_320; lean_object* x_321; uint8_t x_322; +lean_inc(x_270); +lean_inc(x_1); +x_319 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_270, x_3); +x_320 = lean_ctor_get(x_319, 1); +lean_inc(x_320); +x_321 = lean_ctor_get(x_319, 0); +lean_inc(x_321); +lean_dec(x_319); +x_322 = !lean_is_exclusive(x_320); +if (x_322 == 0) +{ +lean_object* x_323; lean_object* x_324; +x_323 = lean_ctor_get(x_320, 1); +lean_inc(x_321); +x_324 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_323, x_270, x_321); +lean_ctor_set(x_320, 1, x_324); +x_272 = x_321; +x_273 = x_320; +goto block_314; +} +else +{ +lean_object* x_325; lean_object* x_326; lean_object* x_327; lean_object* x_328; +x_325 = lean_ctor_get(x_320, 0); +x_326 = lean_ctor_get(x_320, 1); +lean_inc(x_326); +lean_inc(x_325); +lean_dec(x_320); +lean_inc(x_321); +x_327 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_326, x_270, x_321); +x_328 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_328, 0, x_325); +lean_ctor_set(x_328, 1, x_327); +x_272 = x_321; +x_273 = x_328; +goto block_314; +} +} +else +{ +lean_object* x_329; +lean_dec(x_270); +x_329 = lean_ctor_get(x_318, 0); +lean_inc(x_329); +lean_dec(x_318); +x_272 = x_329; +x_273 = x_3; +goto block_314; +} +} +} +else +{ +lean_object* x_330; lean_object* x_331; +x_330 = lean_ctor_get(x_3, 1); +lean_inc(x_330); +x_331 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_330, x_270); +lean_dec(x_330); +if (lean_obj_tag(x_331) == 0) +{ +lean_object* x_332; lean_object* x_333; lean_object* x_334; uint8_t x_335; +lean_inc(x_270); +lean_inc(x_1); +x_332 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_270, x_3); +x_333 = lean_ctor_get(x_332, 1); +lean_inc(x_333); +x_334 = lean_ctor_get(x_332, 0); +lean_inc(x_334); +lean_dec(x_332); +x_335 = !lean_is_exclusive(x_333); +if (x_335 == 0) +{ +lean_object* x_336; lean_object* x_337; +x_336 = lean_ctor_get(x_333, 1); +lean_inc(x_334); +x_337 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_336, x_270, x_334); +lean_ctor_set(x_333, 1, x_337); +x_272 = x_334; +x_273 = x_333; +goto block_314; +} +else +{ +lean_object* x_338; lean_object* x_339; lean_object* x_340; lean_object* x_341; +x_338 = lean_ctor_get(x_333, 0); +x_339 = lean_ctor_get(x_333, 1); +lean_inc(x_339); +lean_inc(x_338); +lean_dec(x_333); +lean_inc(x_334); +x_340 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_339, x_270, x_334); +x_341 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_341, 0, x_338); +lean_ctor_set(x_341, 1, x_340); +x_272 = x_334; +x_273 = x_341; +goto block_314; +} +} +else +{ +lean_object* x_342; +lean_dec(x_270); +x_342 = lean_ctor_get(x_331, 0); +lean_inc(x_342); +lean_dec(x_331); +x_272 = x_342; +x_273 = x_3; +goto block_314; +} +} +block_314: +{ +lean_object* x_274; lean_object* x_275; uint8_t x_286; +x_286 = lean_expr_has_expr_mvar(x_271); +if (x_286 == 0) +{ +uint8_t x_287; +x_287 = lean_expr_has_level_mvar(x_271); +if (x_287 == 0) +{ +lean_dec(x_1); +x_274 = x_271; +x_275 = x_273; +goto block_285; +} +else +{ +lean_object* x_288; lean_object* x_289; +x_288 = lean_ctor_get(x_273, 1); +lean_inc(x_288); +x_289 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_288, x_271); +lean_dec(x_288); +if (lean_obj_tag(x_289) == 0) +{ +lean_object* x_290; lean_object* x_291; lean_object* x_292; uint8_t x_293; +lean_inc(x_271); +x_290 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_271, x_273); +x_291 = lean_ctor_get(x_290, 1); +lean_inc(x_291); +x_292 = lean_ctor_get(x_290, 0); +lean_inc(x_292); +lean_dec(x_290); +x_293 = !lean_is_exclusive(x_291); +if (x_293 == 0) +{ +lean_object* x_294; lean_object* x_295; +x_294 = lean_ctor_get(x_291, 1); +lean_inc(x_292); +x_295 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_294, x_271, x_292); +lean_ctor_set(x_291, 1, x_295); +x_274 = x_292; +x_275 = x_291; +goto block_285; +} +else +{ +lean_object* x_296; lean_object* x_297; lean_object* x_298; lean_object* x_299; +x_296 = lean_ctor_get(x_291, 0); +x_297 = lean_ctor_get(x_291, 1); +lean_inc(x_297); +lean_inc(x_296); +lean_dec(x_291); +lean_inc(x_292); +x_298 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_297, x_271, x_292); +x_299 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_299, 0, x_296); +lean_ctor_set(x_299, 1, x_298); +x_274 = x_292; +x_275 = x_299; +goto block_285; +} +} +else +{ +lean_object* x_300; +lean_dec(x_271); +lean_dec(x_1); +x_300 = lean_ctor_get(x_289, 0); +lean_inc(x_300); +lean_dec(x_289); +x_274 = x_300; +x_275 = x_273; +goto block_285; +} +} +} +else +{ +lean_object* x_301; lean_object* x_302; +x_301 = lean_ctor_get(x_273, 1); +lean_inc(x_301); +x_302 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_301, x_271); +lean_dec(x_301); +if (lean_obj_tag(x_302) == 0) +{ +lean_object* x_303; lean_object* x_304; lean_object* x_305; uint8_t x_306; +lean_inc(x_271); +x_303 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_271, x_273); +x_304 = lean_ctor_get(x_303, 1); +lean_inc(x_304); +x_305 = lean_ctor_get(x_303, 0); +lean_inc(x_305); +lean_dec(x_303); +x_306 = !lean_is_exclusive(x_304); +if (x_306 == 0) +{ +lean_object* x_307; lean_object* x_308; +x_307 = lean_ctor_get(x_304, 1); +lean_inc(x_305); +x_308 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_307, x_271, x_305); +lean_ctor_set(x_304, 1, x_308); +x_274 = x_305; +x_275 = x_304; +goto block_285; +} +else +{ +lean_object* x_309; lean_object* x_310; lean_object* x_311; lean_object* x_312; +x_309 = lean_ctor_get(x_304, 0); +x_310 = lean_ctor_get(x_304, 1); +lean_inc(x_310); +lean_inc(x_309); +lean_dec(x_304); +lean_inc(x_305); +x_311 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_310, x_271, x_305); +x_312 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_312, 0, x_309); +lean_ctor_set(x_312, 1, x_311); +x_274 = x_305; +x_275 = x_312; +goto block_285; +} +} +else +{ +lean_object* x_313; +lean_dec(x_271); +lean_dec(x_1); +x_313 = lean_ctor_get(x_302, 0); +lean_inc(x_313); +lean_dec(x_302); +x_274 = x_313; +x_275 = x_273; +goto block_285; +} +} +block_285: +{ +if (lean_obj_tag(x_2) == 7) +{ +uint8_t x_276; lean_object* x_277; lean_object* x_278; +x_276 = lean_ctor_get_uint8(x_2, sizeof(void*)*3); +x_277 = lean_expr_update_forall(x_2, x_276, x_272, x_274); +x_278 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_278, 0, x_277); +lean_ctor_set(x_278, 1, x_275); +return x_278; +} +else +{ +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_dec(x_274); +lean_dec(x_272); +lean_dec(x_2); +x_279 = l_Lean_Expr_constName___closed__1; +x_280 = lean_unsigned_to_nat(452u); +x_281 = lean_unsigned_to_nat(22u); +x_282 = l_Lean_Expr_updateForall_x21___closed__1; +x_283 = l_panicWithPos___at_Lean_Expr_bindingDomain___spec__1(x_279, x_280, x_281, x_282); +x_284 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_284, 0, x_283); +lean_ctor_set(x_284, 1, x_275); +return x_284; +} +} +} +} +case 8: +{ +lean_object* x_343; lean_object* x_344; lean_object* x_345; lean_object* x_346; lean_object* x_347; uint8_t x_419; +x_343 = lean_ctor_get(x_2, 1); +lean_inc(x_343); +x_344 = lean_ctor_get(x_2, 2); +lean_inc(x_344); +x_345 = lean_ctor_get(x_2, 3); +lean_inc(x_345); +x_419 = lean_expr_has_expr_mvar(x_343); +if (x_419 == 0) +{ +uint8_t x_420; +x_420 = lean_expr_has_level_mvar(x_343); +if (x_420 == 0) +{ +x_346 = x_343; +x_347 = x_3; +goto block_418; +} +else +{ +lean_object* x_421; lean_object* x_422; +x_421 = lean_ctor_get(x_3, 1); +lean_inc(x_421); +x_422 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_421, x_343); +lean_dec(x_421); +if (lean_obj_tag(x_422) == 0) +{ +lean_object* x_423; lean_object* x_424; lean_object* x_425; uint8_t x_426; +lean_inc(x_343); +lean_inc(x_1); +x_423 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_343, x_3); +x_424 = lean_ctor_get(x_423, 1); +lean_inc(x_424); +x_425 = lean_ctor_get(x_423, 0); +lean_inc(x_425); +lean_dec(x_423); +x_426 = !lean_is_exclusive(x_424); +if (x_426 == 0) +{ +lean_object* x_427; lean_object* x_428; +x_427 = lean_ctor_get(x_424, 1); +lean_inc(x_425); +x_428 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_427, x_343, x_425); +lean_ctor_set(x_424, 1, x_428); +x_346 = x_425; +x_347 = x_424; +goto block_418; +} +else +{ +lean_object* x_429; lean_object* x_430; lean_object* x_431; lean_object* x_432; +x_429 = lean_ctor_get(x_424, 0); +x_430 = lean_ctor_get(x_424, 1); +lean_inc(x_430); +lean_inc(x_429); +lean_dec(x_424); +lean_inc(x_425); +x_431 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_430, x_343, x_425); +x_432 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_432, 0, x_429); +lean_ctor_set(x_432, 1, x_431); +x_346 = x_425; +x_347 = x_432; +goto block_418; +} +} +else +{ +lean_object* x_433; +lean_dec(x_343); +x_433 = lean_ctor_get(x_422, 0); +lean_inc(x_433); +lean_dec(x_422); +x_346 = x_433; +x_347 = x_3; +goto block_418; +} +} +} +else +{ +lean_object* x_434; lean_object* x_435; +x_434 = lean_ctor_get(x_3, 1); +lean_inc(x_434); +x_435 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_434, x_343); +lean_dec(x_434); +if (lean_obj_tag(x_435) == 0) +{ +lean_object* x_436; lean_object* x_437; lean_object* x_438; uint8_t x_439; +lean_inc(x_343); +lean_inc(x_1); +x_436 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_343, x_3); +x_437 = lean_ctor_get(x_436, 1); +lean_inc(x_437); +x_438 = lean_ctor_get(x_436, 0); +lean_inc(x_438); +lean_dec(x_436); +x_439 = !lean_is_exclusive(x_437); +if (x_439 == 0) +{ +lean_object* x_440; lean_object* x_441; +x_440 = lean_ctor_get(x_437, 1); +lean_inc(x_438); +x_441 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_440, x_343, x_438); +lean_ctor_set(x_437, 1, x_441); +x_346 = x_438; +x_347 = x_437; +goto block_418; +} +else +{ +lean_object* x_442; lean_object* x_443; lean_object* x_444; lean_object* x_445; +x_442 = lean_ctor_get(x_437, 0); +x_443 = lean_ctor_get(x_437, 1); +lean_inc(x_443); +lean_inc(x_442); +lean_dec(x_437); +lean_inc(x_438); +x_444 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_443, x_343, x_438); +x_445 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_445, 0, x_442); +lean_ctor_set(x_445, 1, x_444); +x_346 = x_438; +x_347 = x_445; +goto block_418; +} +} +else +{ +lean_object* x_446; +lean_dec(x_343); +x_446 = lean_ctor_get(x_435, 0); +lean_inc(x_446); +lean_dec(x_435); +x_346 = x_446; +x_347 = x_3; +goto block_418; +} +} +block_418: +{ +lean_object* x_348; lean_object* x_349; uint8_t x_390; +x_390 = lean_expr_has_expr_mvar(x_344); +if (x_390 == 0) +{ +uint8_t x_391; +x_391 = lean_expr_has_level_mvar(x_344); +if (x_391 == 0) +{ +x_348 = x_344; +x_349 = x_347; +goto block_389; +} +else +{ +lean_object* x_392; lean_object* x_393; +x_392 = lean_ctor_get(x_347, 1); +lean_inc(x_392); +x_393 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_392, x_344); +lean_dec(x_392); +if (lean_obj_tag(x_393) == 0) +{ +lean_object* x_394; lean_object* x_395; lean_object* x_396; uint8_t x_397; +lean_inc(x_344); +lean_inc(x_1); +x_394 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_344, x_347); +x_395 = lean_ctor_get(x_394, 1); +lean_inc(x_395); +x_396 = lean_ctor_get(x_394, 0); +lean_inc(x_396); +lean_dec(x_394); +x_397 = !lean_is_exclusive(x_395); +if (x_397 == 0) +{ +lean_object* x_398; lean_object* x_399; +x_398 = lean_ctor_get(x_395, 1); +lean_inc(x_396); +x_399 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_398, x_344, x_396); +lean_ctor_set(x_395, 1, x_399); +x_348 = x_396; +x_349 = x_395; +goto block_389; +} +else +{ +lean_object* x_400; lean_object* x_401; lean_object* x_402; lean_object* x_403; +x_400 = lean_ctor_get(x_395, 0); +x_401 = lean_ctor_get(x_395, 1); +lean_inc(x_401); +lean_inc(x_400); +lean_dec(x_395); +lean_inc(x_396); +x_402 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_401, x_344, x_396); +x_403 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_403, 0, x_400); +lean_ctor_set(x_403, 1, x_402); +x_348 = x_396; +x_349 = x_403; +goto block_389; +} +} +else +{ +lean_object* x_404; +lean_dec(x_344); +x_404 = lean_ctor_get(x_393, 0); +lean_inc(x_404); +lean_dec(x_393); +x_348 = x_404; +x_349 = x_347; +goto block_389; +} +} +} +else +{ +lean_object* x_405; lean_object* x_406; +x_405 = lean_ctor_get(x_347, 1); +lean_inc(x_405); +x_406 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_405, x_344); +lean_dec(x_405); +if (lean_obj_tag(x_406) == 0) +{ +lean_object* x_407; lean_object* x_408; lean_object* x_409; uint8_t x_410; +lean_inc(x_344); +lean_inc(x_1); +x_407 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_344, x_347); +x_408 = lean_ctor_get(x_407, 1); +lean_inc(x_408); +x_409 = lean_ctor_get(x_407, 0); +lean_inc(x_409); +lean_dec(x_407); +x_410 = !lean_is_exclusive(x_408); +if (x_410 == 0) +{ +lean_object* x_411; lean_object* x_412; +x_411 = lean_ctor_get(x_408, 1); +lean_inc(x_409); +x_412 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_411, x_344, x_409); +lean_ctor_set(x_408, 1, x_412); +x_348 = x_409; +x_349 = x_408; +goto block_389; +} +else +{ +lean_object* x_413; lean_object* x_414; lean_object* x_415; lean_object* x_416; +x_413 = lean_ctor_get(x_408, 0); +x_414 = lean_ctor_get(x_408, 1); +lean_inc(x_414); +lean_inc(x_413); +lean_dec(x_408); +lean_inc(x_409); +x_415 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_414, x_344, x_409); +x_416 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_416, 0, x_413); +lean_ctor_set(x_416, 1, x_415); +x_348 = x_409; +x_349 = x_416; +goto block_389; +} +} +else +{ +lean_object* x_417; +lean_dec(x_344); +x_417 = lean_ctor_get(x_406, 0); +lean_inc(x_417); +lean_dec(x_406); +x_348 = x_417; +x_349 = x_347; +goto block_389; +} +} +block_389: +{ +lean_object* x_350; lean_object* x_351; uint8_t x_361; +x_361 = lean_expr_has_expr_mvar(x_345); +if (x_361 == 0) +{ +uint8_t x_362; +x_362 = lean_expr_has_level_mvar(x_345); +if (x_362 == 0) +{ +lean_dec(x_1); +x_350 = x_345; +x_351 = x_349; +goto block_360; +} +else +{ +lean_object* x_363; lean_object* x_364; +x_363 = lean_ctor_get(x_349, 1); +lean_inc(x_363); +x_364 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_363, x_345); +lean_dec(x_363); +if (lean_obj_tag(x_364) == 0) +{ +lean_object* x_365; lean_object* x_366; lean_object* x_367; uint8_t x_368; +lean_inc(x_345); +x_365 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_345, x_349); +x_366 = lean_ctor_get(x_365, 1); +lean_inc(x_366); +x_367 = lean_ctor_get(x_365, 0); +lean_inc(x_367); +lean_dec(x_365); +x_368 = !lean_is_exclusive(x_366); +if (x_368 == 0) +{ +lean_object* x_369; lean_object* x_370; +x_369 = lean_ctor_get(x_366, 1); +lean_inc(x_367); +x_370 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_369, x_345, x_367); +lean_ctor_set(x_366, 1, x_370); +x_350 = x_367; +x_351 = x_366; +goto block_360; +} +else +{ +lean_object* x_371; lean_object* x_372; lean_object* x_373; lean_object* x_374; +x_371 = lean_ctor_get(x_366, 0); +x_372 = lean_ctor_get(x_366, 1); +lean_inc(x_372); +lean_inc(x_371); +lean_dec(x_366); +lean_inc(x_367); +x_373 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_372, x_345, x_367); +x_374 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_374, 0, x_371); +lean_ctor_set(x_374, 1, x_373); +x_350 = x_367; +x_351 = x_374; +goto block_360; +} +} +else +{ +lean_object* x_375; +lean_dec(x_345); +lean_dec(x_1); +x_375 = lean_ctor_get(x_364, 0); +lean_inc(x_375); +lean_dec(x_364); +x_350 = x_375; +x_351 = x_349; +goto block_360; +} +} +} +else +{ +lean_object* x_376; lean_object* x_377; +x_376 = lean_ctor_get(x_349, 1); +lean_inc(x_376); +x_377 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_376, x_345); +lean_dec(x_376); +if (lean_obj_tag(x_377) == 0) +{ +lean_object* x_378; lean_object* x_379; lean_object* x_380; uint8_t x_381; +lean_inc(x_345); +x_378 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_345, x_349); +x_379 = lean_ctor_get(x_378, 1); +lean_inc(x_379); +x_380 = lean_ctor_get(x_378, 0); +lean_inc(x_380); +lean_dec(x_378); +x_381 = !lean_is_exclusive(x_379); +if (x_381 == 0) +{ +lean_object* x_382; lean_object* x_383; +x_382 = lean_ctor_get(x_379, 1); +lean_inc(x_380); +x_383 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_382, x_345, x_380); +lean_ctor_set(x_379, 1, x_383); +x_350 = x_380; +x_351 = x_379; +goto block_360; +} +else +{ +lean_object* x_384; lean_object* x_385; lean_object* x_386; lean_object* x_387; +x_384 = lean_ctor_get(x_379, 0); +x_385 = lean_ctor_get(x_379, 1); +lean_inc(x_385); +lean_inc(x_384); +lean_dec(x_379); +lean_inc(x_380); +x_386 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_385, x_345, x_380); +x_387 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_387, 0, x_384); +lean_ctor_set(x_387, 1, x_386); +x_350 = x_380; +x_351 = x_387; +goto block_360; +} +} +else +{ +lean_object* x_388; +lean_dec(x_345); +lean_dec(x_1); +x_388 = lean_ctor_get(x_377, 0); +lean_inc(x_388); +lean_dec(x_377); +x_350 = x_388; +x_351 = x_349; +goto block_360; +} +} +block_360: +{ +if (lean_obj_tag(x_2) == 8) +{ +lean_object* x_352; lean_object* x_353; +x_352 = lean_expr_update_let(x_2, x_346, x_348, x_350); +x_353 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_353, 0, x_352); +lean_ctor_set(x_353, 1, x_351); +return x_353; +} +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_dec(x_350); +lean_dec(x_348); +lean_dec(x_346); +lean_dec(x_2); +x_354 = l_Lean_Expr_constName___closed__1; +x_355 = lean_unsigned_to_nat(475u); +x_356 = lean_unsigned_to_nat(18u); +x_357 = l_Lean_Expr_letName___closed__1; +x_358 = l_panicWithPos___at_Lean_Expr_bindingDomain___spec__1(x_354, x_355, x_356, x_357); +x_359 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_359, 0, x_358); +lean_ctor_set(x_359, 1, x_351); +return x_359; +} +} +} +} +} +case 10: +{ +lean_object* x_447; uint8_t x_448; +x_447 = lean_ctor_get(x_2, 1); +lean_inc(x_447); +x_448 = lean_expr_has_expr_mvar(x_447); +if (x_448 == 0) +{ +uint8_t x_449; +x_449 = lean_expr_has_level_mvar(x_447); +if (x_449 == 0) +{ +lean_dec(x_1); +x_16 = x_447; +x_17 = x_3; +goto block_26; +} +else +{ +lean_object* x_450; lean_object* x_451; +x_450 = lean_ctor_get(x_3, 1); +lean_inc(x_450); +x_451 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_450, x_447); +lean_dec(x_450); +if (lean_obj_tag(x_451) == 0) +{ +lean_object* x_452; lean_object* x_453; lean_object* x_454; uint8_t x_455; +lean_inc(x_447); +x_452 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_447, x_3); +x_453 = lean_ctor_get(x_452, 1); +lean_inc(x_453); +x_454 = lean_ctor_get(x_452, 0); +lean_inc(x_454); +lean_dec(x_452); +x_455 = !lean_is_exclusive(x_453); +if (x_455 == 0) +{ +lean_object* x_456; lean_object* x_457; +x_456 = lean_ctor_get(x_453, 1); +lean_inc(x_454); +x_457 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_456, x_447, x_454); +lean_ctor_set(x_453, 1, x_457); +x_16 = x_454; +x_17 = x_453; +goto block_26; +} +else +{ +lean_object* x_458; lean_object* x_459; lean_object* x_460; lean_object* x_461; +x_458 = lean_ctor_get(x_453, 0); +x_459 = lean_ctor_get(x_453, 1); +lean_inc(x_459); +lean_inc(x_458); +lean_dec(x_453); +lean_inc(x_454); +x_460 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_459, x_447, x_454); +x_461 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_461, 0, x_458); +lean_ctor_set(x_461, 1, x_460); +x_16 = x_454; +x_17 = x_461; +goto block_26; +} +} +else +{ +lean_object* x_462; +lean_dec(x_447); +lean_dec(x_1); +x_462 = lean_ctor_get(x_451, 0); +lean_inc(x_462); +lean_dec(x_451); +x_16 = x_462; +x_17 = x_3; +goto block_26; +} +} +} +else +{ +lean_object* x_463; lean_object* x_464; +x_463 = lean_ctor_get(x_3, 1); +lean_inc(x_463); +x_464 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_463, x_447); +lean_dec(x_463); +if (lean_obj_tag(x_464) == 0) +{ +lean_object* x_465; lean_object* x_466; lean_object* x_467; uint8_t x_468; +lean_inc(x_447); +x_465 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_447, x_3); +x_466 = lean_ctor_get(x_465, 1); +lean_inc(x_466); +x_467 = lean_ctor_get(x_465, 0); +lean_inc(x_467); +lean_dec(x_465); +x_468 = !lean_is_exclusive(x_466); +if (x_468 == 0) +{ +lean_object* x_469; lean_object* x_470; +x_469 = lean_ctor_get(x_466, 1); +lean_inc(x_467); +x_470 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_469, x_447, x_467); +lean_ctor_set(x_466, 1, x_470); +x_16 = x_467; +x_17 = x_466; +goto block_26; +} +else +{ +lean_object* x_471; lean_object* x_472; lean_object* x_473; lean_object* x_474; +x_471 = lean_ctor_get(x_466, 0); +x_472 = lean_ctor_get(x_466, 1); +lean_inc(x_472); +lean_inc(x_471); +lean_dec(x_466); +lean_inc(x_467); +x_473 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_472, x_447, x_467); +x_474 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_474, 0, x_471); +lean_ctor_set(x_474, 1, x_473); +x_16 = x_467; +x_17 = x_474; +goto block_26; +} +} +else +{ +lean_object* x_475; +lean_dec(x_447); +lean_dec(x_1); +x_475 = lean_ctor_get(x_464, 0); +lean_inc(x_475); +lean_dec(x_464); +x_16 = x_475; +x_17 = x_3; +goto block_26; +} +} +} +case 11: +{ +lean_object* x_476; uint8_t x_477; +x_476 = lean_ctor_get(x_2, 2); +lean_inc(x_476); +x_477 = lean_expr_has_expr_mvar(x_476); +if (x_477 == 0) +{ +uint8_t x_478; +x_478 = lean_expr_has_level_mvar(x_476); +if (x_478 == 0) +{ +lean_dec(x_1); +x_27 = x_476; +x_28 = x_3; +goto block_37; +} +else +{ +lean_object* x_479; lean_object* x_480; +x_479 = lean_ctor_get(x_3, 1); +lean_inc(x_479); +x_480 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_479, x_476); +lean_dec(x_479); +if (lean_obj_tag(x_480) == 0) +{ +lean_object* x_481; lean_object* x_482; lean_object* x_483; uint8_t x_484; +lean_inc(x_476); +x_481 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_476, x_3); +x_482 = lean_ctor_get(x_481, 1); +lean_inc(x_482); +x_483 = lean_ctor_get(x_481, 0); +lean_inc(x_483); +lean_dec(x_481); +x_484 = !lean_is_exclusive(x_482); +if (x_484 == 0) +{ +lean_object* x_485; lean_object* x_486; +x_485 = lean_ctor_get(x_482, 1); +lean_inc(x_483); +x_486 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_485, x_476, x_483); +lean_ctor_set(x_482, 1, x_486); +x_27 = x_483; +x_28 = x_482; +goto block_37; +} +else +{ +lean_object* x_487; lean_object* x_488; lean_object* x_489; lean_object* x_490; +x_487 = lean_ctor_get(x_482, 0); +x_488 = lean_ctor_get(x_482, 1); +lean_inc(x_488); +lean_inc(x_487); +lean_dec(x_482); +lean_inc(x_483); +x_489 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_488, x_476, x_483); +x_490 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_490, 0, x_487); +lean_ctor_set(x_490, 1, x_489); +x_27 = x_483; +x_28 = x_490; +goto block_37; +} +} +else +{ +lean_object* x_491; +lean_dec(x_476); +lean_dec(x_1); +x_491 = lean_ctor_get(x_480, 0); +lean_inc(x_491); +lean_dec(x_480); +x_27 = x_491; +x_28 = x_3; +goto block_37; +} +} +} +else +{ +lean_object* x_492; lean_object* x_493; +x_492 = lean_ctor_get(x_3, 1); +lean_inc(x_492); +x_493 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_492, x_476); +lean_dec(x_492); +if (lean_obj_tag(x_493) == 0) +{ +lean_object* x_494; lean_object* x_495; lean_object* x_496; uint8_t x_497; +lean_inc(x_476); +x_494 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_476, x_3); +x_495 = lean_ctor_get(x_494, 1); +lean_inc(x_495); +x_496 = lean_ctor_get(x_494, 0); +lean_inc(x_496); +lean_dec(x_494); +x_497 = !lean_is_exclusive(x_495); +if (x_497 == 0) +{ +lean_object* x_498; lean_object* x_499; +x_498 = lean_ctor_get(x_495, 1); +lean_inc(x_496); +x_499 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_498, x_476, x_496); +lean_ctor_set(x_495, 1, x_499); +x_27 = x_496; +x_28 = x_495; +goto block_37; +} +else +{ +lean_object* x_500; lean_object* x_501; lean_object* x_502; lean_object* x_503; +x_500 = lean_ctor_get(x_495, 0); +x_501 = lean_ctor_get(x_495, 1); +lean_inc(x_501); +lean_inc(x_500); +lean_dec(x_495); +lean_inc(x_496); +x_502 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_501, x_476, x_496); +x_503 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_503, 0, x_500); +lean_ctor_set(x_503, 1, x_502); +x_27 = x_496; +x_28 = x_503; +goto block_37; +} +} +else +{ +lean_object* x_504; +lean_dec(x_476); +lean_dec(x_1); +x_504 = lean_ctor_get(x_493, 0); +lean_inc(x_504); +lean_dec(x_493); +x_27 = x_504; +x_28 = x_3; +goto block_37; +} +} +} +default: +{ +lean_object* x_505; +lean_dec(x_1); +x_505 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_505, 0, x_2); +lean_ctor_set(x_505, 1, x_3); +return x_505; +} +} +block_15: +{ +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, 1); +lean_inc(x_4); +x_8 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_7, x_2, x_4); +lean_ctor_set(x_5, 1, x_8); +x_9 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_9, 0, x_4); +lean_ctor_set(x_9, 1, 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); +lean_inc(x_4); +x_12 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_11, x_2, x_4); +x_13 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_13, 0, x_10); +lean_ctor_set(x_13, 1, x_12); +x_14 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_14, 0, x_4); +lean_ctor_set(x_14, 1, x_13); +return x_14; +} +} +block_26: +{ +if (lean_obj_tag(x_2) == 10) +{ +lean_object* x_18; lean_object* x_19; +x_18 = lean_expr_update_mdata(x_2, 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 +{ +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_dec(x_16); +lean_dec(x_2); +x_20 = l_Lean_Expr_constName___closed__1; +x_21 = lean_unsigned_to_nat(433u); +x_22 = lean_unsigned_to_nat(15u); +x_23 = l_Lean_Expr_updateMData_x21___closed__1; +x_24 = l_panicWithPos___at_Lean_Expr_bindingDomain___spec__1(x_20, x_21, x_22, x_23); +x_25 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_25, 0, x_24); +lean_ctor_set(x_25, 1, x_17); +return x_25; +} +} +block_37: +{ +if (lean_obj_tag(x_2) == 11) +{ +lean_object* x_29; lean_object* x_30; +x_29 = lean_expr_update_proj(x_2, x_27); +x_30 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_30, 0, x_29); +lean_ctor_set(x_30, 1, x_28); +return x_30; +} +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_dec(x_27); +lean_dec(x_2); +x_31 = l_Lean_Expr_constName___closed__1; +x_32 = lean_unsigned_to_nat(438u); +x_33 = lean_unsigned_to_nat(16u); +x_34 = l_Lean_Expr_updateProj_x21___closed__1; +x_35 = l_panicWithPos___at_Lean_Expr_bindingDomain___spec__1(x_31, x_32, x_33, 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_28); +return x_36; +} +} +} +} +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg), 3, 0); +return x_2; +} +} +lean_object* l_panicWithPos___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__2___rarg___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_panicWithPos___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__2___rarg(x_1, x_2, x_3, x_4, x_5); +lean_dec(x_4); +lean_dec(x_1); +return x_6; +} +} +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__1___rarg___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_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___at_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___spec__1___rarg(x_1, x_2, x_3, x_4, x_5, x_6); +lean_dec(x_3); +return x_7; +} +} +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_2, x_3); +return x_4; +} +} +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_main(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___rarg), 3, 0); +return x_2; +} +} +lean_object* l_mkHashMap___at_Lean_AbstractMetavarContext_instantiateExprMVars___spec__1(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_mkHashMapImp___rarg(x_1); +return x_2; +} +} +lean_object* _init_l_Lean_AbstractMetavarContext_instantiateExprMVars___rarg___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = lean_unsigned_to_nat(8u); +x_2 = l_mkHashMapImp___rarg(x_1); +return x_2; +} +} +lean_object* l_Lean_AbstractMetavarContext_instantiateExprMVars___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +uint8_t x_4; +x_4 = lean_expr_has_expr_mvar(x_2); +if (x_4 == 0) +{ +uint8_t x_5; +x_5 = lean_expr_has_level_mvar(x_2); +if (x_5 == 0) +{ +lean_object* x_6; +lean_dec(x_1); +x_6 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_6, 0, x_2); +lean_ctor_set(x_6, 1, x_3); +return x_6; +} +else +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; +x_7 = l_Lean_AbstractMetavarContext_instantiateExprMVars___rarg___closed__1; +x_8 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_8, 0, x_3); +lean_ctor_set(x_8, 1, x_7); +x_9 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_2, x_8); +x_10 = !lean_is_exclusive(x_9); +if (x_10 == 0) +{ +lean_object* x_11; lean_object* x_12; +x_11 = lean_ctor_get(x_9, 1); +x_12 = lean_ctor_get(x_11, 0); +lean_inc(x_12); +lean_dec(x_11); +lean_ctor_set(x_9, 1, x_12); +return x_9; +} +else +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_13 = lean_ctor_get(x_9, 0); +x_14 = lean_ctor_get(x_9, 1); +lean_inc(x_14); +lean_inc(x_13); +lean_dec(x_9); +x_15 = lean_ctor_get(x_14, 0); +lean_inc(x_15); +lean_dec(x_14); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_13); +lean_ctor_set(x_16, 1, x_15); +return x_16; +} +} +} +else +{ +lean_object* x_17; lean_object* x_18; lean_object* x_19; uint8_t x_20; +x_17 = l_Lean_AbstractMetavarContext_instantiateExprMVars___rarg___closed__1; +x_18 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_18, 0, x_3); +lean_ctor_set(x_18, 1, x_17); +x_19 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___rarg(x_1, x_2, x_18); +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, 1); +x_22 = lean_ctor_get(x_21, 0); +lean_inc(x_22); +lean_dec(x_21); +lean_ctor_set(x_19, 1, x_22); +return x_19; +} +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_ctor_get(x_24, 0); +lean_inc(x_25); +lean_dec(x_24); +x_26 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_26, 0, x_23); +lean_ctor_set(x_26, 1, x_25); +return x_26; +} +} +} +} +lean_object* l_Lean_AbstractMetavarContext_instantiateExprMVars(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_AbstractMetavarContext_instantiateExprMVars___rarg), 3, 0); +return x_2; +} +} +lean_object* initialize_Init_Lean_LocalContext(lean_object*); +static bool _G_initialized = false; +lean_object* initialize_Init_Lean_AbstractMetavarContext(lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_mk_io_result(lean_box(0)); +_G_initialized = true; +res = initialize_Init_Lean_LocalContext(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +l_panicWithPos___at_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___spec__1___rarg___closed__1 = _init_l_panicWithPos___at_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___spec__1___rarg___closed__1(); +lean_mark_persistent(l_panicWithPos___at_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___spec__1___rarg___closed__1); +l_panicWithPos___at_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___spec__1___rarg___closed__2 = _init_l_panicWithPos___at_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___spec__1___rarg___closed__2(); +lean_mark_persistent(l_panicWithPos___at_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___spec__1___rarg___closed__2); +l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___rarg___closed__1 = _init_l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___rarg___closed__1(); +lean_mark_persistent(l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___rarg___closed__1); +l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___rarg___closed__2 = _init_l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___rarg___closed__2(); +lean_mark_persistent(l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___rarg___closed__2); +l_Lean_AbstractMetavarContext_instantiateExprMVars___rarg___closed__1 = _init_l_Lean_AbstractMetavarContext_instantiateExprMVars___rarg___closed__1(); +lean_mark_persistent(l_Lean_AbstractMetavarContext_instantiateExprMVars___rarg___closed__1); +return lean_mk_io_result(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/src/stage0/Init/Lean/Elaborator/Basic.c b/src/stage0/Init/Lean/Elaborator/Basic.c index 41aa5bbc80..8ec1576a6f 100644 --- a/src/stage0/Init/Lean/Elaborator/Basic.c +++ b/src/stage0/Init/Lean/Elaborator/Basic.c @@ -86,6 +86,7 @@ extern lean_object* l_Lean_PersistentEnvExtension_inhabited___rarg___closed__3; lean_object* l_List_toString___at_Lean_Environment_displayStats___spec__1(lean_object*); lean_object* l_PersistentHashMap_insertAux___main___at_Lean_addBuiltinCommandElab___spec__8___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_addBuiltinTermElab___closed__2; +lean_object* l_Lean_Elab_modifyScope___at_Lean_Elab_mkLocalDecl___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_registerBuiltinTermElabAttr___lambda__1___closed__1; lean_object* l_Lean_Elab_mkLocalDecl(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_registerBuiltinTermElabAttr___closed__7; @@ -157,6 +158,7 @@ lean_object* l_Lean_Elab_getEnv___boxed(lean_object*); lean_object* l_Lean_Elab_getScope(lean_object*); lean_object* l_PersistentHashMap_containsAtAux___main___at_Lean_addBuiltinTermElab___spec__6___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_contains___at_Lean_addBuiltinCommandElab___spec__4___boxed(lean_object*, lean_object*); +lean_object* lean_expr_mk_fvar(lean_object*); lean_object* lean_local_ctx_mk_local_decl(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t); extern lean_object* l_List_get_x21___main___rarg___closed__1; lean_object* lean_mk_empty_environment(uint32_t, lean_object*); @@ -295,7 +297,6 @@ lean_object* l_panicWithPos___at_Lean_Elab_getScope___spec__2(lean_object*, lean extern size_t l_PersistentHashMap_insertAux___main___rarg___closed__2; extern lean_object* l_Lean_Parser_mkCommandParserAttribute___closed__4; lean_object* l_Lean_Elab_elabCommand___closed__2; -lean_object* l_Lean_Elab_modifyGetScope___at_Lean_Elab_mkLocalDecl___spec__1(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_getOpenDecls___boxed(lean_object*); lean_object* lean_io_mk_ref(lean_object*, lean_object*); lean_object* l_panicWithPos___at_Lean_Elab_getScope___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); @@ -303,7 +304,6 @@ lean_object* l_Lean_Elab_logUnknownDecl___rarg(lean_object*, lean_object*, lean_ uint8_t l_Lean_isNamespace(lean_object*, lean_object*); lean_object* l_Lean_mkCApp(lean_object*, lean_object*); lean_object* l_Lean_Elab_logElabException___closed__1; -extern lean_object* l_Lean_LocalDecl_Inhabited___closed__1; lean_object* l_Lean_Elab_testFrontend___closed__1; lean_object* l_Lean_Parser_parseCommand___main(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_mkCommandElabAttribute___spec__2(lean_object*, lean_object*); @@ -359,7 +359,6 @@ lean_object* l_Lean_registerBuiltinCommandElabAttr___lambda__1___closed__3; uint8_t l_List_hasDecEq___main___at_Lean_OpenDecl_HasToString___spec__1(lean_object*, lean_object*); lean_object* l_Array_miterateAux___main___at_Lean_Elab_processHeaderAux___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_HashMapImp_moveEntries___main___at_Lean_addBuiltinTermElab___spec__14(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_modifyGetScope___at_Lean_Elab_mkLocalDecl___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_getEnv___rarg(lean_object*); extern lean_object* l_PersistentHashMap_insertAux___main___rarg___closed__3; lean_object* lean_array_get_size(lean_object*); @@ -453,6 +452,7 @@ lean_object* l_Lean_mkTermElabAttribute(lean_object*); lean_object* l_Lean_Elab_inPattern___rarg(lean_object*); lean_object* l_Lean_Elab_withNewScope___rarg(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_registerEnvExtensionUnsafe___rarg___closed__1; +lean_object* l_Lean_Elab_modifyScope___at_Lean_Elab_mkLocalDecl___spec__1(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_Elab_elabCommand___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_getEnv(lean_object*); lean_object* lean_io_ref_reset(lean_object*, lean_object*); @@ -10760,7 +10760,7 @@ lean_dec(x_1); return x_2; } } -lean_object* l_Lean_Elab_modifyGetScope___at_Lean_Elab_mkLocalDecl___spec__1(lean_object* x_1, lean_object* x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +lean_object* l_Lean_Elab_modifyScope___at_Lean_Elab_mkLocalDecl___spec__1(lean_object* x_1, lean_object* x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { lean_object* x_7; @@ -10768,254 +10768,272 @@ x_7 = lean_ctor_get(x_6, 5); lean_inc(x_7); if (lean_obj_tag(x_7) == 0) { -lean_object* x_8; lean_object* x_9; +uint8_t x_8; lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); -x_8 = l_Lean_LocalDecl_Inhabited___closed__1; -x_9 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_9, 0, x_8); -lean_ctor_set(x_9, 1, x_6); -return x_9; +x_8 = !lean_is_exclusive(x_6); +if (x_8 == 0) +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_9 = lean_ctor_get(x_6, 5); +lean_dec(x_9); +x_10 = lean_box(0); +x_11 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_11, 0, x_10); +lean_ctor_set(x_11, 1, x_6); +return x_11; } else { -lean_object* x_10; uint8_t x_11; -x_10 = lean_ctor_get(x_7, 0); -lean_inc(x_10); -x_11 = !lean_is_exclusive(x_6); -if (x_11 == 0) -{ -lean_object* x_12; uint8_t x_13; -x_12 = lean_ctor_get(x_6, 5); -lean_dec(x_12); -x_13 = !lean_is_exclusive(x_7); -if (x_13 == 0) -{ -lean_object* x_14; uint8_t x_15; -x_14 = lean_ctor_get(x_7, 0); -lean_dec(x_14); -x_15 = !lean_is_exclusive(x_10); -if (x_15 == 0) -{ -lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; -x_16 = lean_ctor_get(x_10, 6); -x_17 = lean_local_ctx_mk_local_decl(x_16, x_4, x_1, x_2, x_3); -x_18 = lean_ctor_get(x_17, 0); -lean_inc(x_18); -x_19 = lean_ctor_get(x_17, 1); -lean_inc(x_19); -lean_dec(x_17); -lean_ctor_set(x_10, 6, x_19); -x_20 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_20, 0, x_18); -lean_ctor_set(x_20, 1, x_6); -return x_20; -} -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; lean_object* x_28; uint8_t x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; -x_21 = lean_ctor_get(x_10, 0); -x_22 = lean_ctor_get(x_10, 1); -x_23 = lean_ctor_get(x_10, 2); -x_24 = lean_ctor_get(x_10, 3); -x_25 = lean_ctor_get(x_10, 4); -x_26 = lean_ctor_get(x_10, 5); -x_27 = lean_ctor_get(x_10, 6); -x_28 = lean_ctor_get(x_10, 7); -x_29 = lean_ctor_get_uint8(x_10, sizeof(void*)*8); -lean_inc(x_28); -lean_inc(x_27); -lean_inc(x_26); -lean_inc(x_25); -lean_inc(x_24); -lean_inc(x_23); -lean_inc(x_22); -lean_inc(x_21); -lean_dec(x_10); -x_30 = lean_local_ctx_mk_local_decl(x_27, x_4, x_1, x_2, x_3); -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); -x_33 = lean_alloc_ctor(0, 8, 1); -lean_ctor_set(x_33, 0, x_21); -lean_ctor_set(x_33, 1, x_22); -lean_ctor_set(x_33, 2, x_23); -lean_ctor_set(x_33, 3, x_24); -lean_ctor_set(x_33, 4, x_25); -lean_ctor_set(x_33, 5, x_26); -lean_ctor_set(x_33, 6, x_32); -lean_ctor_set(x_33, 7, x_28); -lean_ctor_set_uint8(x_33, sizeof(void*)*8, x_29); -lean_ctor_set(x_7, 0, x_33); -x_34 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_34, 0, x_31); -lean_ctor_set(x_34, 1, x_6); -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; uint8_t 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; -x_35 = lean_ctor_get(x_7, 1); -lean_inc(x_35); -lean_dec(x_7); -x_36 = lean_ctor_get(x_10, 0); -lean_inc(x_36); -x_37 = lean_ctor_get(x_10, 1); -lean_inc(x_37); -x_38 = lean_ctor_get(x_10, 2); -lean_inc(x_38); -x_39 = lean_ctor_get(x_10, 3); -lean_inc(x_39); -x_40 = lean_ctor_get(x_10, 4); -lean_inc(x_40); -x_41 = lean_ctor_get(x_10, 5); -lean_inc(x_41); -x_42 = lean_ctor_get(x_10, 6); -lean_inc(x_42); -x_43 = lean_ctor_get(x_10, 7); -lean_inc(x_43); -x_44 = lean_ctor_get_uint8(x_10, sizeof(void*)*8); -if (lean_is_exclusive(x_10)) { - lean_ctor_release(x_10, 0); - lean_ctor_release(x_10, 1); - lean_ctor_release(x_10, 2); - lean_ctor_release(x_10, 3); - lean_ctor_release(x_10, 4); - lean_ctor_release(x_10, 5); - lean_ctor_release(x_10, 6); - lean_ctor_release(x_10, 7); - x_45 = x_10; -} else { - lean_dec_ref(x_10); - x_45 = lean_box(0); -} -x_46 = lean_local_ctx_mk_local_decl(x_42, x_4, x_1, x_2, x_3); -x_47 = lean_ctor_get(x_46, 0); -lean_inc(x_47); -x_48 = lean_ctor_get(x_46, 1); -lean_inc(x_48); -lean_dec(x_46); -if (lean_is_scalar(x_45)) { - x_49 = lean_alloc_ctor(0, 8, 1); -} else { - x_49 = x_45; -} -lean_ctor_set(x_49, 0, x_36); -lean_ctor_set(x_49, 1, x_37); -lean_ctor_set(x_49, 2, x_38); -lean_ctor_set(x_49, 3, x_39); -lean_ctor_set(x_49, 4, x_40); -lean_ctor_set(x_49, 5, x_41); -lean_ctor_set(x_49, 6, x_48); -lean_ctor_set(x_49, 7, x_43); -lean_ctor_set_uint8(x_49, sizeof(void*)*8, x_44); -x_50 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_50, 0, x_49); -lean_ctor_set(x_50, 1, x_35); -lean_ctor_set(x_6, 5, x_50); -x_51 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_51, 0, x_47); -lean_ctor_set(x_51, 1, x_6); -return x_51; -} -} -else -{ -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; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; uint8_t 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; -x_52 = lean_ctor_get(x_6, 0); -x_53 = lean_ctor_get(x_6, 1); -x_54 = lean_ctor_get(x_6, 2); -x_55 = lean_ctor_get(x_6, 3); -x_56 = lean_ctor_get(x_6, 4); -lean_inc(x_56); -lean_inc(x_55); -lean_inc(x_54); -lean_inc(x_53); -lean_inc(x_52); +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_12 = lean_ctor_get(x_6, 0); +x_13 = lean_ctor_get(x_6, 1); +x_14 = lean_ctor_get(x_6, 2); +x_15 = lean_ctor_get(x_6, 3); +x_16 = lean_ctor_get(x_6, 4); +lean_inc(x_16); +lean_inc(x_15); +lean_inc(x_14); +lean_inc(x_13); +lean_inc(x_12); lean_dec(x_6); -x_57 = lean_ctor_get(x_7, 1); -lean_inc(x_57); +x_17 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_17, 0, x_12); +lean_ctor_set(x_17, 1, x_13); +lean_ctor_set(x_17, 2, x_14); +lean_ctor_set(x_17, 3, x_15); +lean_ctor_set(x_17, 4, x_16); +lean_ctor_set(x_17, 5, x_7); +x_18 = lean_box(0); +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 +{ +lean_object* x_20; uint8_t x_21; +x_20 = lean_ctor_get(x_7, 0); +lean_inc(x_20); +x_21 = !lean_is_exclusive(x_6); +if (x_21 == 0) +{ +lean_object* x_22; uint8_t x_23; +x_22 = lean_ctor_get(x_6, 5); +lean_dec(x_22); +x_23 = !lean_is_exclusive(x_7); +if (x_23 == 0) +{ +lean_object* x_24; uint8_t x_25; +x_24 = lean_ctor_get(x_7, 0); +lean_dec(x_24); +x_25 = !lean_is_exclusive(x_20); +if (x_25 == 0) +{ +lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_26 = lean_ctor_get(x_20, 6); +x_27 = lean_local_ctx_mk_local_decl(x_26, x_4, x_1, x_2, x_3); +lean_ctor_set(x_20, 6, x_27); +x_28 = lean_box(0); +x_29 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_29, 0, x_28); +lean_ctor_set(x_29, 1, x_6); +return x_29; +} +else +{ +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; uint8_t x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; +x_30 = lean_ctor_get(x_20, 0); +x_31 = lean_ctor_get(x_20, 1); +x_32 = lean_ctor_get(x_20, 2); +x_33 = lean_ctor_get(x_20, 3); +x_34 = lean_ctor_get(x_20, 4); +x_35 = lean_ctor_get(x_20, 5); +x_36 = lean_ctor_get(x_20, 6); +x_37 = lean_ctor_get(x_20, 7); +x_38 = lean_ctor_get_uint8(x_20, sizeof(void*)*8); +lean_inc(x_37); +lean_inc(x_36); +lean_inc(x_35); +lean_inc(x_34); +lean_inc(x_33); +lean_inc(x_32); +lean_inc(x_31); +lean_inc(x_30); +lean_dec(x_20); +x_39 = lean_local_ctx_mk_local_decl(x_36, x_4, x_1, x_2, x_3); +x_40 = lean_alloc_ctor(0, 8, 1); +lean_ctor_set(x_40, 0, x_30); +lean_ctor_set(x_40, 1, x_31); +lean_ctor_set(x_40, 2, x_32); +lean_ctor_set(x_40, 3, x_33); +lean_ctor_set(x_40, 4, x_34); +lean_ctor_set(x_40, 5, x_35); +lean_ctor_set(x_40, 6, x_39); +lean_ctor_set(x_40, 7, x_37); +lean_ctor_set_uint8(x_40, sizeof(void*)*8, x_38); +lean_ctor_set(x_7, 0, x_40); +x_41 = lean_box(0); +x_42 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_42, 0, x_41); +lean_ctor_set(x_42, 1, x_6); +return x_42; +} +} +else +{ +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; uint8_t 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; +x_43 = lean_ctor_get(x_7, 1); +lean_inc(x_43); +lean_dec(x_7); +x_44 = lean_ctor_get(x_20, 0); +lean_inc(x_44); +x_45 = lean_ctor_get(x_20, 1); +lean_inc(x_45); +x_46 = lean_ctor_get(x_20, 2); +lean_inc(x_46); +x_47 = lean_ctor_get(x_20, 3); +lean_inc(x_47); +x_48 = lean_ctor_get(x_20, 4); +lean_inc(x_48); +x_49 = lean_ctor_get(x_20, 5); +lean_inc(x_49); +x_50 = lean_ctor_get(x_20, 6); +lean_inc(x_50); +x_51 = lean_ctor_get(x_20, 7); +lean_inc(x_51); +x_52 = lean_ctor_get_uint8(x_20, sizeof(void*)*8); +if (lean_is_exclusive(x_20)) { + lean_ctor_release(x_20, 0); + lean_ctor_release(x_20, 1); + lean_ctor_release(x_20, 2); + lean_ctor_release(x_20, 3); + lean_ctor_release(x_20, 4); + lean_ctor_release(x_20, 5); + lean_ctor_release(x_20, 6); + lean_ctor_release(x_20, 7); + x_53 = x_20; +} else { + lean_dec_ref(x_20); + x_53 = lean_box(0); +} +x_54 = lean_local_ctx_mk_local_decl(x_50, x_4, x_1, x_2, x_3); +if (lean_is_scalar(x_53)) { + x_55 = lean_alloc_ctor(0, 8, 1); +} else { + x_55 = x_53; +} +lean_ctor_set(x_55, 0, x_44); +lean_ctor_set(x_55, 1, x_45); +lean_ctor_set(x_55, 2, x_46); +lean_ctor_set(x_55, 3, x_47); +lean_ctor_set(x_55, 4, x_48); +lean_ctor_set(x_55, 5, x_49); +lean_ctor_set(x_55, 6, x_54); +lean_ctor_set(x_55, 7, x_51); +lean_ctor_set_uint8(x_55, sizeof(void*)*8, x_52); +x_56 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_56, 0, x_55); +lean_ctor_set(x_56, 1, x_43); +lean_ctor_set(x_6, 5, x_56); +x_57 = lean_box(0); +x_58 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_58, 0, x_57); +lean_ctor_set(x_58, 1, x_6); +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; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; uint8_t 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; +x_59 = lean_ctor_get(x_6, 0); +x_60 = lean_ctor_get(x_6, 1); +x_61 = lean_ctor_get(x_6, 2); +x_62 = lean_ctor_get(x_6, 3); +x_63 = lean_ctor_get(x_6, 4); +lean_inc(x_63); +lean_inc(x_62); +lean_inc(x_61); +lean_inc(x_60); +lean_inc(x_59); +lean_dec(x_6); +x_64 = lean_ctor_get(x_7, 1); +lean_inc(x_64); if (lean_is_exclusive(x_7)) { lean_ctor_release(x_7, 0); lean_ctor_release(x_7, 1); - x_58 = x_7; + x_65 = x_7; } else { lean_dec_ref(x_7); - x_58 = lean_box(0); + x_65 = lean_box(0); } -x_59 = lean_ctor_get(x_10, 0); -lean_inc(x_59); -x_60 = lean_ctor_get(x_10, 1); -lean_inc(x_60); -x_61 = lean_ctor_get(x_10, 2); -lean_inc(x_61); -x_62 = lean_ctor_get(x_10, 3); -lean_inc(x_62); -x_63 = lean_ctor_get(x_10, 4); -lean_inc(x_63); -x_64 = lean_ctor_get(x_10, 5); -lean_inc(x_64); -x_65 = lean_ctor_get(x_10, 6); -lean_inc(x_65); -x_66 = lean_ctor_get(x_10, 7); +x_66 = lean_ctor_get(x_20, 0); lean_inc(x_66); -x_67 = lean_ctor_get_uint8(x_10, sizeof(void*)*8); -if (lean_is_exclusive(x_10)) { - lean_ctor_release(x_10, 0); - lean_ctor_release(x_10, 1); - lean_ctor_release(x_10, 2); - lean_ctor_release(x_10, 3); - lean_ctor_release(x_10, 4); - lean_ctor_release(x_10, 5); - lean_ctor_release(x_10, 6); - lean_ctor_release(x_10, 7); - x_68 = x_10; -} else { - lean_dec_ref(x_10); - x_68 = lean_box(0); -} -x_69 = lean_local_ctx_mk_local_decl(x_65, x_4, x_1, x_2, x_3); -x_70 = lean_ctor_get(x_69, 0); +x_67 = lean_ctor_get(x_20, 1); +lean_inc(x_67); +x_68 = lean_ctor_get(x_20, 2); +lean_inc(x_68); +x_69 = lean_ctor_get(x_20, 3); +lean_inc(x_69); +x_70 = lean_ctor_get(x_20, 4); lean_inc(x_70); -x_71 = lean_ctor_get(x_69, 1); +x_71 = lean_ctor_get(x_20, 5); lean_inc(x_71); -lean_dec(x_69); -if (lean_is_scalar(x_68)) { - x_72 = lean_alloc_ctor(0, 8, 1); +x_72 = lean_ctor_get(x_20, 6); +lean_inc(x_72); +x_73 = lean_ctor_get(x_20, 7); +lean_inc(x_73); +x_74 = lean_ctor_get_uint8(x_20, sizeof(void*)*8); +if (lean_is_exclusive(x_20)) { + lean_ctor_release(x_20, 0); + lean_ctor_release(x_20, 1); + lean_ctor_release(x_20, 2); + lean_ctor_release(x_20, 3); + lean_ctor_release(x_20, 4); + lean_ctor_release(x_20, 5); + lean_ctor_release(x_20, 6); + lean_ctor_release(x_20, 7); + x_75 = x_20; } else { - x_72 = x_68; + lean_dec_ref(x_20); + x_75 = lean_box(0); } -lean_ctor_set(x_72, 0, x_59); -lean_ctor_set(x_72, 1, x_60); -lean_ctor_set(x_72, 2, x_61); -lean_ctor_set(x_72, 3, x_62); -lean_ctor_set(x_72, 4, x_63); -lean_ctor_set(x_72, 5, x_64); -lean_ctor_set(x_72, 6, x_71); -lean_ctor_set(x_72, 7, x_66); -lean_ctor_set_uint8(x_72, sizeof(void*)*8, x_67); -if (lean_is_scalar(x_58)) { - x_73 = lean_alloc_ctor(1, 2, 0); +x_76 = lean_local_ctx_mk_local_decl(x_72, x_4, x_1, x_2, x_3); +if (lean_is_scalar(x_75)) { + x_77 = lean_alloc_ctor(0, 8, 1); } else { - x_73 = x_58; + x_77 = x_75; } -lean_ctor_set(x_73, 0, x_72); -lean_ctor_set(x_73, 1, x_57); -x_74 = lean_alloc_ctor(0, 6, 0); -lean_ctor_set(x_74, 0, x_52); -lean_ctor_set(x_74, 1, x_53); -lean_ctor_set(x_74, 2, x_54); -lean_ctor_set(x_74, 3, x_55); -lean_ctor_set(x_74, 4, x_56); -lean_ctor_set(x_74, 5, x_73); -x_75 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_75, 0, x_70); -lean_ctor_set(x_75, 1, x_74); -return x_75; +lean_ctor_set(x_77, 0, x_66); +lean_ctor_set(x_77, 1, x_67); +lean_ctor_set(x_77, 2, x_68); +lean_ctor_set(x_77, 3, x_69); +lean_ctor_set(x_77, 4, x_70); +lean_ctor_set(x_77, 5, x_71); +lean_ctor_set(x_77, 6, x_76); +lean_ctor_set(x_77, 7, x_73); +lean_ctor_set_uint8(x_77, sizeof(void*)*8, x_74); +if (lean_is_scalar(x_65)) { + x_78 = lean_alloc_ctor(1, 2, 0); +} else { + x_78 = x_65; +} +lean_ctor_set(x_78, 0, x_77); +lean_ctor_set(x_78, 1, x_64); +x_79 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_79, 0, x_59); +lean_ctor_set(x_79, 1, x_60); +lean_ctor_set(x_79, 2, x_61); +lean_ctor_set(x_79, 3, x_62); +lean_ctor_set(x_79, 4, x_63); +lean_ctor_set(x_79, 5, x_78); +x_80 = lean_box(0); +x_81 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_81, 0, x_80); +lean_ctor_set(x_81, 1, x_79); +return x_81; } } } @@ -11023,24 +11041,46 @@ return x_75; lean_object* l_Lean_Elab_mkLocalDecl(lean_object* x_1, lean_object* x_2, uint8_t 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_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; x_6 = l_Lean_Elab_mkFreshName___rarg(x_5); 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 = l_Lean_Elab_modifyGetScope___at_Lean_Elab_mkLocalDecl___spec__1(x_1, x_2, x_3, x_7, x_4, x_8); +lean_inc(x_7); +x_9 = l_Lean_Elab_modifyScope___at_Lean_Elab_mkLocalDecl___spec__1(x_1, x_2, x_3, x_7, x_4, x_8); +x_10 = !lean_is_exclusive(x_9); +if (x_10 == 0) +{ +lean_object* x_11; lean_object* x_12; +x_11 = lean_ctor_get(x_9, 0); +lean_dec(x_11); +x_12 = lean_expr_mk_fvar(x_7); +lean_ctor_set(x_9, 0, x_12); return x_9; } +else +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; +x_13 = lean_ctor_get(x_9, 1); +lean_inc(x_13); +lean_dec(x_9); +x_14 = lean_expr_mk_fvar(x_7); +x_15 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_15, 0, x_14); +lean_ctor_set(x_15, 1, x_13); +return x_15; } -lean_object* l_Lean_Elab_modifyGetScope___at_Lean_Elab_mkLocalDecl___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +} +} +lean_object* l_Lean_Elab_modifyScope___at_Lean_Elab_mkLocalDecl___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { uint8_t x_7; lean_object* x_8; x_7 = lean_unbox(x_3); lean_dec(x_3); -x_8 = l_Lean_Elab_modifyGetScope___at_Lean_Elab_mkLocalDecl___spec__1(x_1, x_2, x_7, x_4, x_5, x_6); +x_8 = l_Lean_Elab_modifyScope___at_Lean_Elab_mkLocalDecl___spec__1(x_1, x_2, x_7, x_4, x_5, x_6); lean_dec(x_5); return x_8; } @@ -11092,6 +11132,8 @@ _start: lean_object* x_5; x_5 = l_Lean_Elab_mkLambda(x_1, x_2, x_3, x_4); lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); return x_5; } } @@ -11131,6 +11173,8 @@ _start: lean_object* x_5; x_5 = l_Lean_Elab_mkForall(x_1, x_2, x_3, x_4); lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); return x_5; } } diff --git a/src/stage0/Init/Lean/Elaborator/PreTerm.c b/src/stage0/Init/Lean/Elaborator/PreTerm.c index 8917419c3c..660ca52286 100644 --- a/src/stage0/Init/Lean/Elaborator/PreTerm.c +++ b/src/stage0/Init/Lean/Elaborator/PreTerm.c @@ -2812,77 +2812,77 @@ 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_25; lean_object* x_26; lean_object* x_27; lean_object* x_70; lean_object* x_71; uint8_t x_72; +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_25; lean_object* x_26; lean_object* x_27; lean_object* x_68; lean_object* x_69; uint8_t x_70; x_13 = lean_array_fget(x_5, x_4); x_14 = lean_box(0); lean_inc(x_13); x_15 = x_14; x_16 = lean_array_fset(x_5, x_4, x_15); x_25 = l_Lean_Syntax_getId___rarg(x_13); -x_70 = l_Lean_Syntax_getNumArgs___rarg(x_2); -x_71 = lean_unsigned_to_nat(0u); -x_72 = lean_nat_dec_eq(x_70, x_71); -lean_dec(x_70); -if (x_72 == 0) +x_68 = l_Lean_Syntax_getNumArgs___rarg(x_2); +x_69 = lean_unsigned_to_nat(0u); +x_70 = lean_nat_dec_eq(x_68, x_69); +lean_dec(x_68); +if (x_70 == 0) { -lean_object* x_73; lean_object* x_74; lean_object* x_75; -x_73 = lean_unsigned_to_nat(1u); -x_74 = l_Lean_Syntax_getArg___rarg(x_2, x_73); +lean_object* x_71; lean_object* x_72; lean_object* x_73; +x_71 = lean_unsigned_to_nat(1u); +x_72 = l_Lean_Syntax_getArg___rarg(x_2, x_71); lean_inc(x_6); -x_75 = l_Lean_Elab_toPreTerm(x_74, x_6, x_7); -if (lean_obj_tag(x_75) == 0) +x_73 = l_Lean_Elab_toPreTerm(x_72, x_6, x_7); +if (lean_obj_tag(x_73) == 0) { -lean_object* x_76; lean_object* x_77; -x_76 = lean_ctor_get(x_75, 0); -lean_inc(x_76); -x_77 = lean_ctor_get(x_75, 1); -lean_inc(x_77); -lean_dec(x_75); -x_26 = x_76; -x_27 = x_77; -goto block_69; +lean_object* x_74; lean_object* x_75; +x_74 = lean_ctor_get(x_73, 0); +lean_inc(x_74); +x_75 = lean_ctor_get(x_73, 1); +lean_inc(x_75); +lean_dec(x_73); +x_26 = x_74; +x_27 = x_75; +goto block_67; } else { -uint8_t x_78; +uint8_t x_76; lean_dec(x_25); lean_dec(x_16); lean_dec(x_13); lean_dec(x_6); lean_dec(x_4); lean_dec(x_1); -x_78 = !lean_is_exclusive(x_75); -if (x_78 == 0) +x_76 = !lean_is_exclusive(x_73); +if (x_76 == 0) { -return x_75; +return x_73; } else { -lean_object* x_79; lean_object* x_80; lean_object* x_81; -x_79 = lean_ctor_get(x_75, 0); -x_80 = lean_ctor_get(x_75, 1); -lean_inc(x_80); -lean_inc(x_79); -lean_dec(x_75); -x_81 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_81, 0, x_79); -lean_ctor_set(x_81, 1, x_80); -return x_81; +lean_object* x_77; lean_object* x_78; lean_object* x_79; +x_77 = lean_ctor_get(x_73, 0); +x_78 = lean_ctor_get(x_73, 1); +lean_inc(x_78); +lean_inc(x_77); +lean_dec(x_73); +x_79 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_79, 0, x_77); +lean_ctor_set(x_79, 1, x_78); +return x_79; } } } else { -lean_object* x_82; lean_object* x_83; lean_object* x_84; -x_82 = l___private_Init_Lean_Elaborator_PreTerm_3__mkHoleFor(x_13, x_6, x_7); -x_83 = lean_ctor_get(x_82, 0); -lean_inc(x_83); -x_84 = lean_ctor_get(x_82, 1); -lean_inc(x_84); -lean_dec(x_82); -x_26 = x_83; -x_27 = x_84; -goto block_69; +lean_object* x_80; lean_object* x_81; lean_object* x_82; +x_80 = l___private_Init_Lean_Elaborator_PreTerm_3__mkHoleFor(x_13, x_6, x_7); +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_26 = x_81; +x_27 = x_82; +goto block_67; } block_24: { @@ -2897,7 +2897,7 @@ x_5 = x_22; x_7 = x_18; goto _start; } -block_69: +block_67: { lean_object* x_28; lean_object* x_29; uint8_t x_30; x_28 = l_Lean_Syntax_getNumArgs___rarg(x_3); @@ -2975,7 +2975,7 @@ lean_inc(x_6); x_49 = l_Lean_Elab_toPreTerm(x_48, x_6, x_27); if (lean_obj_tag(x_49) == 0) { -lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; uint8_t x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; +lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; uint8_t x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; x_50 = lean_ctor_get(x_49, 0); lean_inc(x_50); x_51 = lean_ctor_get(x_49, 1); @@ -2991,15 +2991,13 @@ lean_inc(x_57); x_58 = lean_ctor_get(x_56, 1); lean_inc(x_58); lean_dec(x_56); -x_59 = l___private_Init_Lean_Elaborator_PreTerm_4__mkLocal(x_57); -lean_dec(x_57); -x_17 = x_59; +x_17 = x_57; x_18 = x_58; goto block_24; } else { -uint8_t x_60; +uint8_t x_59; lean_dec(x_26); lean_dec(x_25); lean_dec(x_16); @@ -3007,41 +3005,39 @@ lean_dec(x_13); lean_dec(x_6); lean_dec(x_4); lean_dec(x_1); -x_60 = !lean_is_exclusive(x_49); -if (x_60 == 0) +x_59 = !lean_is_exclusive(x_49); +if (x_59 == 0) { return x_49; } else { -lean_object* x_61; lean_object* x_62; lean_object* x_63; -x_61 = lean_ctor_get(x_49, 0); -x_62 = lean_ctor_get(x_49, 1); -lean_inc(x_62); +lean_object* x_60; lean_object* x_61; lean_object* x_62; +x_60 = lean_ctor_get(x_49, 0); +x_61 = lean_ctor_get(x_49, 1); lean_inc(x_61); +lean_inc(x_60); lean_dec(x_49); -x_63 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_63, 0, x_61); -lean_ctor_set(x_63, 1, x_62); -return x_63; +x_62 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_62, 0, x_60); +lean_ctor_set(x_62, 1, x_61); +return x_62; } } } } else { -uint8_t x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; -x_64 = 0; -x_65 = l_Lean_Elab_mkLocalDecl(x_25, x_26, x_64, x_6, x_27); -x_66 = lean_ctor_get(x_65, 0); +uint8_t x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; +x_63 = 0; +x_64 = l_Lean_Elab_mkLocalDecl(x_25, x_26, x_63, x_6, x_27); +x_65 = lean_ctor_get(x_64, 0); +lean_inc(x_65); +x_66 = lean_ctor_get(x_64, 1); lean_inc(x_66); -x_67 = lean_ctor_get(x_65, 1); -lean_inc(x_67); -lean_dec(x_65); -x_68 = l___private_Init_Lean_Elaborator_PreTerm_4__mkLocal(x_66); -lean_dec(x_66); -x_17 = x_68; -x_18 = x_67; +lean_dec(x_64); +x_17 = x_65; +x_18 = x_66; goto block_24; } } @@ -3068,7 +3064,7 @@ 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; lean_object* x_17; uint8_t 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_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; uint8_t 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; x_10 = lean_array_fget(x_2, x_1); x_11 = lean_box(0); lean_inc(x_10); @@ -3088,15 +3084,13 @@ lean_inc(x_20); x_21 = lean_ctor_get(x_19, 1); lean_inc(x_21); lean_dec(x_19); -x_22 = l___private_Init_Lean_Elaborator_PreTerm_4__mkLocal(x_20); -lean_dec(x_20); -x_23 = lean_unsigned_to_nat(1u); -x_24 = lean_nat_add(x_1, x_23); -x_25 = x_22; -x_26 = lean_array_fset(x_13, x_1, x_25); +x_22 = lean_unsigned_to_nat(1u); +x_23 = lean_nat_add(x_1, x_22); +x_24 = x_20; +x_25 = lean_array_fset(x_13, x_1, x_24); lean_dec(x_1); -x_1 = x_24; -x_2 = x_26; +x_1 = x_23; +x_2 = x_25; x_4 = x_21; goto _start; } @@ -3496,6 +3490,8 @@ lean_inc(x_20); lean_dec(x_18); x_21 = l_Lean_Elab_mkForall(x_14, x_19, x_2, x_20); lean_dec(x_2); +lean_dec(x_19); +lean_dec(x_14); x_22 = !lean_is_exclusive(x_21); if (x_22 == 0) { @@ -3698,6 +3694,8 @@ lean_inc(x_76); lean_dec(x_74); x_77 = l_Lean_Elab_mkForall(x_70, x_75, x_2, x_76); lean_dec(x_2); +lean_dec(x_75); +lean_dec(x_70); x_78 = lean_ctor_get(x_77, 1); lean_inc(x_78); x_79 = lean_ctor_get(x_77, 0); diff --git a/src/stage0/Init/Lean/Expr.c b/src/stage0/Init/Lean/Expr.c index 21a77c75ed..d132253711 100644 --- a/src/stage0/Init/Lean/Expr.c +++ b/src/stage0/Init/Lean/Expr.c @@ -14,6 +14,7 @@ extern "C" { #endif lean_object* lean_expr_mk_mdata(lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Expr_3__withAppRevAux___main(lean_object*); uint8_t lean_expr_has_fvar(lean_object*); lean_object* l_Lean_Expr_getAppNumArgsAux___main___boxed(lean_object*, lean_object*); lean_object* l_Lean_Expr_lam___boxed(lean_object*, lean_object*, lean_object*, lean_object*); @@ -22,26 +23,32 @@ lean_object* l_Lean_Expr_hash___boxed(lean_object*); lean_object* l_Lean_Expr_updateProj___boxed(lean_object*, lean_object*, lean_object*); uint8_t lean_name_dec_eq(lean_object*, lean_object*); lean_object* l_Lean_Expr_getAppFn(lean_object*); +lean_object* l_Lean_Expr_betaRev(lean_object*, lean_object*); lean_object* l_Lean_ExprStructEq_HasRepr(lean_object*); lean_object* l_Lean_mkBinApp(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_MData_empty; lean_object* lean_expr_mk_forall(lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_Expr_constName(lean_object*); lean_object* lean_expr_mk_sort(lean_object*); +lean_object* l___private_Init_Lean_Expr_5__betaRevAux(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_expr_update_app(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_updateSort___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_getAppRevArgs(lean_object*); lean_object* l_Lean_Expr_updateConst___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_isLambda___boxed(lean_object*); +lean_object* l_Lean_Expr_withApp(lean_object*); lean_object* lean_nat_sub(lean_object*, lean_object*); uint8_t l_Lean_Expr_isSort(lean_object*); uint8_t l_Lean_Expr_isConst(lean_object*); lean_object* l_Lean_Expr_forallE___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Expr_withAppAux___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_bvarIdx(lean_object*); lean_object* l_Lean_Expr_letName___closed__1; lean_object* l_Lean_Expr_HasBeq___closed__1; lean_object* l_Lean_Expr_isAppOfArity___main___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_updateLambda_x21(lean_object*, uint8_t, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Expr_5__betaRevAux___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_mk_array(lean_object*, lean_object*); lean_object* l_Lean_exprIsInhabited; lean_object* l_Lean_Expr_updateLambdaE_x21(lean_object*, lean_object*, lean_object*); @@ -56,6 +63,7 @@ lean_object* lean_expr_mk_let(lean_object*, lean_object*, lean_object*, lean_obj lean_object* l_Lean_Expr_instantiate1___boxed(lean_object*, lean_object*); lean_object* l_Lean_Expr_eqv___boxed(lean_object*, lean_object*); lean_object* l_Lean_mkDecIsTrue___closed__4; +lean_object* l_Lean_Expr_withAppRev(lean_object*); lean_object* l_Lean_ExprStructEq_HasBeq___closed__1; lean_object* l_Lean_Expr_isBVar___boxed(lean_object*); lean_object* l_panicWithPos___at_Lean_Expr_constName___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); @@ -73,10 +81,12 @@ lean_object* l_Lean_Expr_bindingName___boxed(lean_object*); lean_object* l_Lean_BinderInfo_isInstImplicit___boxed(lean_object*); lean_object* lean_expr_instantiate1(lean_object*, lean_object*); lean_object* l_Lean_exprToExprStructEq___boxed(lean_object*); +lean_object* l___private_Init_Lean_Expr_5__betaRevAux___main___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_getAppFn___main(lean_object*); extern lean_object* l_Lean_Inhabited; lean_object* l_Lean_mkDecIsFalse___closed__1; lean_object* l_Lean_Expr_isAppOfArity___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Expr_5__betaRevAux___main(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_panicWithPos___at_Lean_Expr_constLevels___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_miterateAux___main___at_Lean_mkApp___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkDecIsTrue___closed__3; @@ -84,15 +94,20 @@ lean_object* l_Lean_Expr_isProj___boxed(lean_object*); lean_object* l_Lean_mkConst(lean_object*, lean_object*); lean_object* l_Lean_Expr_getAppNumArgsAux___main(lean_object*, lean_object*); lean_object* l_Lean_Expr_equal___boxed(lean_object*, lean_object*); +lean_object* l___private_Init_Data_Array_Basic_3__miterateRevAux___main___at_Lean_mkAppRev___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_hasMVar___boxed(lean_object*); lean_object* l_Lean_Expr_sort___boxed(lean_object*); lean_object* l_Lean_Expr_HasToString___closed__1; lean_object* l_Lean_ExprStructEq_HasToString(lean_object*); +lean_object* l_Lean_mkAppRev(lean_object*, lean_object*); lean_object* l_Lean_Expr_updateMData_x21(lean_object*, lean_object*); lean_object* lean_expr_mk_fvar(lean_object*); lean_object* lean_mk_empty_array_with_capacity(lean_object*); +lean_object* l_Lean_Expr_withAppAux___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_miterateAux___main___at_Lean_mkApp___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Expr_4__mkAppRevRangeAux(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_expr_update_forall(lean_object*, uint8_t, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Expr_3__withAppRevAux___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_BinderInfo_beq___boxed(lean_object*, lean_object*); uint8_t l_Lean_Expr_isLet(lean_object*); lean_object* l_Lean_Expr_bvarIdx___boxed(lean_object*); @@ -109,6 +124,7 @@ lean_object* l_Lean_Expr_updateForall_x21___boxed(lean_object*, lean_object*, le lean_object* l_Lean_Expr_Hashable___closed__1; uint8_t lean_expr_eqv(lean_object*, lean_object*); lean_object* l_Lean_Expr_updateMData___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Expr_withAppRev___rarg(lean_object*, lean_object*); lean_object* l_Lean_MData_HasEmptyc; lean_object* l_Lean_Expr_updateForall_x21(lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_ExprStructEq_HasBeq; @@ -125,12 +141,15 @@ lean_object* l_Lean_Expr_instantiateRev___boxed(lean_object*, lean_object*); lean_object* lean_string_append(lean_object*, lean_object*); lean_object* l_Lean_Expr_constName___closed__2; lean_object* l_Lean_Expr_updateForallE_x21(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Expr_withApp___rarg(lean_object*, lean_object*); lean_object* l_Lean_Expr_instantiate___boxed(lean_object*, lean_object*); uint8_t l_Lean_Expr_isForall(lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); lean_object* lean_expr_update_const(lean_object*, lean_object*); lean_object* l_Lean_Expr_getAppNumArgs(lean_object*); lean_object* l_Lean_mkDecIsTrue___closed__1; +lean_object* lean_expr_instantiate_range(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Expr_withAppAux(lean_object*); lean_object* l_Lean_mkBinCApp(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkDecIsFalse(lean_object*, lean_object*); lean_object* lean_name_mk_string(lean_object*, lean_object*); @@ -150,6 +169,7 @@ extern lean_object* l_panicWithPos___rarg___closed__1; lean_object* l_Lean_Expr_getAppArgs(lean_object*); lean_object* l_Lean_mkCApp___boxed(lean_object*, lean_object*); lean_object* l_Lean_Expr_letName(lean_object*); +lean_object* l___private_Init_Lean_Expr_4__mkAppRevRangeAux___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_expr_update_mdata(lean_object*, lean_object*); lean_object* l_Lean_Expr_getAppFn___main___boxed(lean_object*); uint8_t l_Lean_Expr_isFVar(lean_object*); @@ -165,7 +185,9 @@ uint8_t l_Lean_ExprStructEq_beq(lean_object*, lean_object*); lean_object* l_Lean_Expr_updateLambda___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkCApp(lean_object*, lean_object*); lean_object* l_Lean_mkDecIsTrue___closed__5; +lean_object* l___private_Init_Data_Array_Basic_3__miterateRevAux___main___at_Lean_mkAppRev___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_hasFVar___boxed(lean_object*); +lean_object* l___private_Init_Lean_Expr_3__withAppRevAux(lean_object*); lean_object* l___private_Init_Lean_Expr_1__getAppArgsAux(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_HasToString; uint8_t l_Lean_Expr_isAppOfArity___main(lean_object*, lean_object*, lean_object*); @@ -176,6 +198,7 @@ uint8_t l_Lean_Expr_isMVar(lean_object*); lean_object* lean_expr_update_lambda(lean_object*, uint8_t, lean_object*, lean_object*); lean_object* lean_expr_mk_bvar(lean_object*); lean_object* l_Lean_Expr_bindingDomain___boxed(lean_object*); +lean_object* l_Lean_Expr_withAppAux___main(lean_object*); lean_object* lean_expr_abstract_range(lean_object*, lean_object*, lean_object*); lean_object* l_panic(lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Expr_1__getAppArgsAux___main(lean_object*, lean_object*, lean_object*); @@ -185,6 +208,7 @@ lean_object* l_Lean_Expr_updateLambda_x21___closed__1; lean_object* l_Lean_BinderInfo_HasBeq___closed__1; uint8_t lean_expr_lt(lean_object*, lean_object*); lean_object* l_Lean_Expr_updateApp___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Expr_betaRev___boxed(lean_object*, lean_object*); uint8_t l_Lean_Expr_isApp(lean_object*); lean_object* l_Lean_Expr_hasLevelMVar___boxed(lean_object*); lean_object* lean_array_get_size(lean_object*); @@ -198,11 +222,13 @@ size_t l_Lean_ExprStructEq_hash(lean_object*); lean_object* l_Lean_Expr_updateProj_x21(lean_object*, lean_object*); lean_object* l_Lean_Expr_const___boxed(lean_object*, lean_object*); lean_object* l_Lean_Expr_constLevels(lean_object*); +lean_object* l___private_Init_Lean_Expr_3__withAppRevAux___main___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_updateApp_x21(lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Expr_hasMVar(lean_object*); lean_object* l_Lean_Expr_isFVar___boxed(lean_object*); lean_object* l_Lean_Expr_abstractRange___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_fvar___boxed(lean_object*); +lean_object* l___private_Init_Lean_Expr_4__mkAppRevRangeAux___main___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_ExprStructEq_HasToString___boxed(lean_object*); lean_object* lean_expr_mk_lambda(lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_Expr_letE___boxed(lean_object*, lean_object*, lean_object*, lean_object*); @@ -211,6 +237,7 @@ lean_object* l_Lean_Expr_bvarIdx___closed__1; extern lean_object* l_panicWithPos___rarg___closed__2; lean_object* l_Lean_Expr_HasBeq; lean_object* l_Lean_mkApp___boxed(lean_object*, lean_object*); +lean_object* l_Lean_mkAppRev___boxed(lean_object*, lean_object*); lean_object* l_Lean_Expr_bindingName___closed__1; uint8_t l_Lean_Expr_isBVar(lean_object*); lean_object* l_Lean_Expr_updateSort_x21___closed__1; @@ -220,18 +247,22 @@ lean_object* l_Lean_Expr_Hashable; lean_object* l_Lean_Expr_updateMData_x21___closed__1; lean_object* l_Lean_Expr_getAppNumArgs___boxed(lean_object*); lean_object* l_Lean_Expr_bindingBody___boxed(lean_object*); +lean_object* l___private_Init_Lean_Expr_4__mkAppRevRangeAux___main(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_mvar___boxed(lean_object*); lean_object* lean_expr_abstract(lean_object*, lean_object*); lean_object* l_panicWithPos___at_Lean_Expr_bindingDomain___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_fvarName(lean_object*); lean_object* l_Lean_Expr_isSort___boxed(lean_object*); +lean_object* l_Lean_Expr_instantiateRange___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_expr_update_sort(lean_object*, lean_object*); uint8_t l_Lean_Expr_isProj(lean_object*); lean_object* l_Lean_Expr_local___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_isLet___boxed(lean_object*); lean_object* l_Lean_Expr_getAppFn___boxed(lean_object*); +lean_object* l_Lean_Expr_mkAppRevRange(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Expr_isAppOfArity(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_isForall___boxed(lean_object*); +lean_object* l_Lean_Expr_mkAppRevRange___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_getAppNumArgsAux(lean_object*, lean_object*); lean_object* l_Lean_Expr_isMVar___boxed(lean_object*); lean_object* l_Lean_ExprStructEq_Inhabited; @@ -623,6 +654,60 @@ lean_dec(x_2); return x_3; } } +lean_object* l___private_Init_Data_Array_Basic_3__miterateRevAux___main___at_Lean_mkAppRev___spec__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; uint8_t x_7; +x_6 = lean_unsigned_to_nat(0u); +x_7 = lean_nat_dec_eq(x_3, x_6); +if (x_7 == 0) +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_8 = lean_unsigned_to_nat(1u); +x_9 = lean_nat_sub(x_3, x_8); +lean_dec(x_3); +x_10 = lean_array_fget(x_2, x_9); +x_11 = lean_expr_mk_app(x_5, x_10); +x_3 = x_9; +x_4 = lean_box(0); +x_5 = x_11; +goto _start; +} +else +{ +lean_dec(x_3); +return x_5; +} +} +} +lean_object* l_Lean_mkAppRev(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; +x_3 = lean_array_get_size(x_2); +x_4 = l___private_Init_Data_Array_Basic_3__miterateRevAux___main___at_Lean_mkAppRev___spec__1(x_2, x_2, x_3, lean_box(0), x_1); +return x_4; +} +} +lean_object* l___private_Init_Data_Array_Basic_3__miterateRevAux___main___at_Lean_mkAppRev___spec__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___private_Init_Data_Array_Basic_3__miterateRevAux___main___at_Lean_mkAppRev___spec__1(x_1, x_2, x_3, x_4, x_5); +lean_dec(x_2); +lean_dec(x_1); +return x_6; +} +} +lean_object* l_Lean_mkAppRev___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_Lean_mkAppRev(x_1, x_2); +lean_dec(x_2); +return x_3; +} +} lean_object* l_Lean_Expr_hash___boxed(lean_object* x_1) { _start: { @@ -1311,6 +1396,151 @@ x_5 = l___private_Init_Lean_Expr_2__getAppRevArgsAux___main(x_1, x_4); return x_5; } } +lean_object* l_Lean_Expr_withAppAux___main___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +if (lean_obj_tag(x_2) == 5) +{ +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); +lean_inc(x_5); +x_6 = lean_ctor_get(x_2, 1); +lean_inc(x_6); +lean_dec(x_2); +x_7 = lean_array_set(x_3, x_4, x_6); +x_8 = lean_unsigned_to_nat(1u); +x_9 = lean_nat_sub(x_4, x_8); +lean_dec(x_4); +x_2 = x_5; +x_3 = x_7; +x_4 = x_9; +goto _start; +} +else +{ +lean_object* x_11; +lean_dec(x_4); +x_11 = lean_apply_2(x_1, x_2, x_3); +return x_11; +} +} +} +lean_object* l_Lean_Expr_withAppAux___main(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Expr_withAppAux___main___rarg), 4, 0); +return x_2; +} +} +lean_object* l_Lean_Expr_withAppAux___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_Lean_Expr_withAppAux___main___rarg(x_1, x_2, x_3, x_4); +return x_5; +} +} +lean_object* l_Lean_Expr_withAppAux(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Expr_withAppAux___rarg), 4, 0); +return x_2; +} +} +lean_object* l_Lean_Expr_withApp___rarg(lean_object* x_1, lean_object* x_2) { +_start: +{ +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; +x_3 = lean_unsigned_to_nat(0u); +x_4 = l_Lean_Expr_getAppNumArgsAux___main(x_1, x_3); +x_5 = l_Lean_exprIsInhabited___closed__1; +lean_inc(x_4); +x_6 = lean_mk_array(x_4, x_5); +x_7 = lean_unsigned_to_nat(1u); +x_8 = lean_nat_sub(x_4, x_7); +lean_dec(x_4); +x_9 = l_Lean_Expr_withAppAux___main___rarg(x_2, x_1, x_6, x_8); +return x_9; +} +} +lean_object* l_Lean_Expr_withApp(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Expr_withApp___rarg), 2, 0); +return x_2; +} +} +lean_object* l___private_Init_Lean_Expr_3__withAppRevAux___main___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +if (lean_obj_tag(x_2) == 5) +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_4 = lean_ctor_get(x_2, 0); +lean_inc(x_4); +x_5 = lean_ctor_get(x_2, 1); +lean_inc(x_5); +lean_dec(x_2); +x_6 = lean_array_push(x_3, x_5); +x_2 = x_4; +x_3 = x_6; +goto _start; +} +else +{ +lean_object* x_8; +x_8 = lean_apply_2(x_1, x_2, x_3); +return x_8; +} +} +} +lean_object* l___private_Init_Lean_Expr_3__withAppRevAux___main(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l___private_Init_Lean_Expr_3__withAppRevAux___main___rarg), 3, 0); +return x_2; +} +} +lean_object* l___private_Init_Lean_Expr_3__withAppRevAux___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l___private_Init_Lean_Expr_3__withAppRevAux___main___rarg(x_1, x_2, x_3); +return x_4; +} +} +lean_object* l___private_Init_Lean_Expr_3__withAppRevAux(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l___private_Init_Lean_Expr_3__withAppRevAux___rarg), 3, 0); +return x_2; +} +} +lean_object* l_Lean_Expr_withAppRev___rarg(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_3 = lean_unsigned_to_nat(0u); +x_4 = l_Lean_Expr_getAppNumArgsAux___main(x_1, x_3); +x_5 = lean_mk_empty_array_with_capacity(x_4); +lean_dec(x_4); +x_6 = l___private_Init_Lean_Expr_3__withAppRevAux___main___rarg(x_2, x_1, x_5); +return x_6; +} +} +lean_object* l_Lean_Expr_withAppRev(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Expr_withAppRev___rarg), 2, 0); +return x_2; +} +} uint8_t l_Lean_Expr_isAppOf(lean_object* x_1, lean_object* x_2) { _start: { @@ -1488,7 +1718,7 @@ else { lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; x_3 = l_Lean_Expr_constName___closed__1; -x_4 = lean_unsigned_to_nat(215u); +x_4 = lean_unsigned_to_nat(234u); x_5 = lean_unsigned_to_nat(15u); x_6 = l_Lean_Expr_constName___closed__2; x_7 = l_panicWithPos___at_Lean_Expr_constName___spec__1(x_3, x_4, x_5, x_6); @@ -1553,7 +1783,7 @@ else { lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; x_3 = l_Lean_Expr_constName___closed__1; -x_4 = lean_unsigned_to_nat(219u); +x_4 = lean_unsigned_to_nat(238u); x_5 = lean_unsigned_to_nat(16u); x_6 = l_Lean_Expr_constName___closed__2; x_7 = l_panicWithPos___at_Lean_Expr_constLevels___spec__1(x_3, x_4, x_5, x_6); @@ -1602,7 +1832,7 @@ else { lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; x_3 = l_Lean_Expr_constName___closed__1; -x_4 = lean_unsigned_to_nat(223u); +x_4 = lean_unsigned_to_nat(242u); x_5 = lean_unsigned_to_nat(14u); x_6 = l_Lean_Expr_bvarIdx___closed__1; x_7 = l_panicWithPos___at_Array_findIdx_x21___spec__1(x_3, x_4, x_5, x_6); @@ -1641,7 +1871,7 @@ else { lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; x_3 = l_Lean_Expr_constName___closed__1; -x_4 = lean_unsigned_to_nat(227u); +x_4 = lean_unsigned_to_nat(246u); x_5 = lean_unsigned_to_nat(12u); x_6 = l_Lean_Expr_fvarName___closed__1; x_7 = l_panicWithPos___at_Lean_Expr_constName___spec__1(x_3, x_4, x_5, x_6); @@ -1688,7 +1918,7 @@ default: { lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; x_4 = l_Lean_Expr_constName___closed__1; -x_5 = lean_unsigned_to_nat(232u); +x_5 = lean_unsigned_to_nat(251u); x_6 = lean_unsigned_to_nat(21u); x_7 = l_Lean_Expr_bindingName___closed__1; x_8 = l_panicWithPos___at_Lean_Expr_constName___spec__1(x_4, x_5, x_6, x_7); @@ -1752,7 +1982,7 @@ default: { lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; x_4 = l_Lean_Expr_constName___closed__1; -x_5 = lean_unsigned_to_nat(237u); +x_5 = lean_unsigned_to_nat(256u); x_6 = lean_unsigned_to_nat(21u); x_7 = l_Lean_Expr_bindingName___closed__1; x_8 = l_panicWithPos___at_Lean_Expr_bindingDomain___spec__1(x_4, x_5, x_6, x_7); @@ -1802,7 +2032,7 @@ default: { lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; x_4 = l_Lean_Expr_constName___closed__1; -x_5 = lean_unsigned_to_nat(242u); +x_5 = lean_unsigned_to_nat(261u); x_6 = lean_unsigned_to_nat(21u); x_7 = l_Lean_Expr_bindingName___closed__1; x_8 = l_panicWithPos___at_Lean_Expr_bindingDomain___spec__1(x_4, x_5, x_6, x_7); @@ -1842,7 +2072,7 @@ else { lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; x_3 = l_Lean_Expr_constName___closed__1; -x_4 = lean_unsigned_to_nat(246u); +x_4 = lean_unsigned_to_nat(265u); x_5 = lean_unsigned_to_nat(18u); x_6 = l_Lean_Expr_letName___closed__1; x_7 = l_panicWithPos___at_Lean_Expr_constName___spec__1(x_3, x_4, x_5, x_6); @@ -1864,6 +2094,8 @@ _start: { lean_object* x_3; x_3 = lean_expr_instantiate(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); return x_3; } } @@ -1872,6 +2104,8 @@ _start: { lean_object* x_3; x_3 = lean_expr_instantiate1(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); return x_3; } } @@ -1880,14 +2114,29 @@ _start: { lean_object* x_3; x_3 = lean_expr_instantiate_rev(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); return x_3; } } +lean_object* l_Lean_Expr_instantiateRange___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = lean_expr_instantiate_range(x_1, x_2, x_3, x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +return x_5; +} +} lean_object* l_Lean_Expr_abstract___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; x_3 = lean_expr_abstract(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); return x_3; } } @@ -1896,6 +2145,9 @@ _start: { lean_object* x_4; x_4 = lean_expr_abstract_range(x_1, x_2, x_3); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); return x_4; } } @@ -2169,6 +2421,190 @@ lean_dec(x_1); return x_2; } } +lean_object* l___private_Init_Lean_Expr_4__mkAppRevRangeAux___main(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +uint8_t x_5; +x_5 = lean_nat_dec_eq(x_4, x_2); +if (x_5 == 0) +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_6 = lean_unsigned_to_nat(1u); +x_7 = lean_nat_sub(x_4, x_6); +lean_dec(x_4); +x_8 = l_Lean_exprIsInhabited; +x_9 = lean_array_get(x_8, x_1, x_7); +x_10 = lean_expr_mk_app(x_3, x_9); +x_3 = x_10; +x_4 = x_7; +goto _start; +} +else +{ +lean_dec(x_4); +return x_3; +} +} +} +lean_object* l___private_Init_Lean_Expr_4__mkAppRevRangeAux___main___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l___private_Init_Lean_Expr_4__mkAppRevRangeAux___main(x_1, x_2, x_3, x_4); +lean_dec(x_2); +lean_dec(x_1); +return x_5; +} +} +lean_object* l___private_Init_Lean_Expr_4__mkAppRevRangeAux(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l___private_Init_Lean_Expr_4__mkAppRevRangeAux___main(x_1, x_2, x_3, x_4); +return x_5; +} +} +lean_object* l___private_Init_Lean_Expr_4__mkAppRevRangeAux___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l___private_Init_Lean_Expr_4__mkAppRevRangeAux(x_1, x_2, x_3, x_4); +lean_dec(x_2); +lean_dec(x_1); +return x_5; +} +} +lean_object* l_Lean_Expr_mkAppRevRange(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l___private_Init_Lean_Expr_4__mkAppRevRangeAux___main(x_4, x_2, x_1, x_3); +return x_5; +} +} +lean_object* l_Lean_Expr_mkAppRevRange___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_Lean_Expr_mkAppRevRange(x_1, x_2, x_3, x_4); +lean_dec(x_4); +lean_dec(x_2); +return x_5; +} +} +lean_object* l___private_Init_Lean_Expr_5__betaRevAux___main(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +if (lean_obj_tag(x_3) == 6) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; +x_11 = lean_ctor_get(x_3, 2); +x_12 = lean_unsigned_to_nat(1u); +x_13 = lean_nat_add(x_4, x_12); +lean_dec(x_4); +x_14 = lean_nat_dec_lt(x_13, x_2); +if (x_14 == 0) +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_15 = lean_nat_sub(x_2, x_13); +lean_dec(x_13); +lean_inc(x_1); +x_16 = lean_expr_instantiate_range(x_11, x_15, x_2, x_1); +x_17 = lean_unsigned_to_nat(0u); +x_18 = l___private_Init_Lean_Expr_4__mkAppRevRangeAux___main(x_1, x_17, x_16, x_15); +lean_dec(x_1); +return x_18; +} +else +{ +x_3 = x_11; +x_4 = x_13; +goto _start; +} +} +else +{ +lean_object* x_20; +x_20 = lean_box(0); +x_5 = x_20; +goto block_10; +} +block_10: +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; +lean_dec(x_5); +x_6 = lean_nat_sub(x_2, x_4); +lean_dec(x_4); +lean_inc(x_1); +x_7 = lean_expr_instantiate_range(x_3, x_6, x_2, x_1); +x_8 = lean_unsigned_to_nat(0u); +x_9 = l___private_Init_Lean_Expr_4__mkAppRevRangeAux___main(x_1, x_8, x_7, x_6); +lean_dec(x_1); +return x_9; +} +} +} +lean_object* l___private_Init_Lean_Expr_5__betaRevAux___main___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l___private_Init_Lean_Expr_5__betaRevAux___main(x_1, x_2, x_3, x_4); +lean_dec(x_3); +lean_dec(x_2); +return x_5; +} +} +lean_object* l___private_Init_Lean_Expr_5__betaRevAux(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l___private_Init_Lean_Expr_5__betaRevAux___main(x_1, x_2, x_3, x_4); +return x_5; +} +} +lean_object* l___private_Init_Lean_Expr_5__betaRevAux___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l___private_Init_Lean_Expr_5__betaRevAux(x_1, x_2, x_3, x_4); +lean_dec(x_3); +lean_dec(x_2); +return x_5; +} +} +lean_object* l_Lean_Expr_betaRev(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; uint8_t x_5; +x_3 = lean_array_get_size(x_2); +x_4 = lean_unsigned_to_nat(0u); +x_5 = lean_nat_dec_eq(x_3, x_4); +if (x_5 == 0) +{ +lean_object* x_6; +x_6 = l___private_Init_Lean_Expr_5__betaRevAux___main(x_2, x_3, x_1, x_4); +lean_dec(x_3); +return x_6; +} +else +{ +lean_dec(x_3); +lean_dec(x_2); +lean_inc(x_1); +return x_1; +} +} +} +lean_object* l_Lean_Expr_betaRev___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_Lean_Expr_betaRev(x_1, x_2); +lean_dec(x_1); +return x_3; +} +} lean_object* l_Lean_Expr_updateApp___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { @@ -2201,7 +2637,7 @@ lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_5 = l_Lean_Expr_constName___closed__1; -x_6 = lean_unsigned_to_nat(337u); +x_6 = lean_unsigned_to_nat(398u); x_7 = lean_unsigned_to_nat(16u); x_8 = l_Lean_Expr_updateApp_x21___closed__1; x_9 = l_panicWithPos___at_Lean_Expr_bindingDomain___spec__1(x_5, x_6, x_7, x_8); @@ -2232,7 +2668,7 @@ lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_obj lean_dec(x_2); lean_dec(x_1); x_4 = l_Lean_Expr_constName___closed__1; -x_5 = lean_unsigned_to_nat(346u); +x_5 = lean_unsigned_to_nat(407u); x_6 = lean_unsigned_to_nat(16u); x_7 = l_Lean_Expr_constName___closed__2; x_8 = l_panicWithPos___at_Lean_Expr_bindingDomain___spec__1(x_4, x_5, x_6, x_7); @@ -2271,7 +2707,7 @@ lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_obj lean_dec(x_2); lean_dec(x_1); x_4 = l_Lean_Expr_constName___closed__1; -x_5 = lean_unsigned_to_nat(355u); +x_5 = lean_unsigned_to_nat(416u); x_6 = lean_unsigned_to_nat(12u); x_7 = l_Lean_Expr_updateSort_x21___closed__1; x_8 = l_panicWithPos___at_Lean_Expr_bindingDomain___spec__1(x_4, x_5, x_6, x_7); @@ -2318,7 +2754,7 @@ lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_obj lean_dec(x_2); lean_dec(x_1); x_4 = l_Lean_Expr_constName___closed__1; -x_5 = lean_unsigned_to_nat(372u); +x_5 = lean_unsigned_to_nat(433u); x_6 = lean_unsigned_to_nat(15u); x_7 = l_Lean_Expr_updateMData_x21___closed__1; x_8 = l_panicWithPos___at_Lean_Expr_bindingDomain___spec__1(x_4, x_5, x_6, x_7); @@ -2349,7 +2785,7 @@ lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_obj lean_dec(x_2); lean_dec(x_1); x_4 = l_Lean_Expr_constName___closed__1; -x_5 = lean_unsigned_to_nat(377u); +x_5 = lean_unsigned_to_nat(438u); x_6 = lean_unsigned_to_nat(16u); x_7 = l_Lean_Expr_updateProj_x21___closed__1; x_8 = l_panicWithPos___at_Lean_Expr_bindingDomain___spec__1(x_4, x_5, x_6, x_7); @@ -2391,7 +2827,7 @@ lean_dec(x_4); lean_dec(x_3); lean_dec(x_1); x_6 = l_Lean_Expr_constName___closed__1; -x_7 = lean_unsigned_to_nat(386u); +x_7 = lean_unsigned_to_nat(447u); x_8 = lean_unsigned_to_nat(22u); x_9 = l_Lean_Expr_updateForall_x21___closed__1; x_10 = l_panicWithPos___at_Lean_Expr_bindingDomain___spec__1(x_6, x_7, x_8, x_9); @@ -2426,7 +2862,7 @@ lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_6 = l_Lean_Expr_constName___closed__1; -x_7 = lean_unsigned_to_nat(391u); +x_7 = lean_unsigned_to_nat(452u); x_8 = lean_unsigned_to_nat(22u); x_9 = l_Lean_Expr_updateForall_x21___closed__1; x_10 = l_panicWithPos___at_Lean_Expr_bindingDomain___spec__1(x_6, x_7, x_8, x_9); @@ -2468,7 +2904,7 @@ lean_dec(x_4); lean_dec(x_3); lean_dec(x_1); x_6 = l_Lean_Expr_constName___closed__1; -x_7 = lean_unsigned_to_nat(400u); +x_7 = lean_unsigned_to_nat(461u); x_8 = lean_unsigned_to_nat(18u); x_9 = l_Lean_Expr_updateLambda_x21___closed__1; x_10 = l_panicWithPos___at_Lean_Expr_bindingDomain___spec__1(x_6, x_7, x_8, x_9); @@ -2503,7 +2939,7 @@ lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_6 = l_Lean_Expr_constName___closed__1; -x_7 = lean_unsigned_to_nat(405u); +x_7 = lean_unsigned_to_nat(466u); x_8 = lean_unsigned_to_nat(18u); x_9 = l_Lean_Expr_updateLambda_x21___closed__1; x_10 = l_panicWithPos___at_Lean_Expr_bindingDomain___spec__1(x_6, x_7, x_8, x_9); @@ -2536,7 +2972,7 @@ lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_6 = l_Lean_Expr_constName___closed__1; -x_7 = lean_unsigned_to_nat(414u); +x_7 = lean_unsigned_to_nat(475u); x_8 = lean_unsigned_to_nat(18u); x_9 = l_Lean_Expr_letName___closed__1; x_10 = l_panicWithPos___at_Lean_Expr_bindingDomain___spec__1(x_6, x_7, x_8, x_9); diff --git a/src/stage0/Init/Lean/LocalContext.c b/src/stage0/Init/Lean/LocalContext.c index 7176c1f7ef..8e9eb15de6 100644 --- a/src/stage0/Init/Lean/LocalContext.c +++ b/src/stage0/Init/Lean/LocalContext.c @@ -33,6 +33,7 @@ size_t l_USize_mul(size_t, size_t); lean_object* l_PersistentArray_mfindRev___at_Lean_LocalContext_findDeclRev___spec__2___rarg(lean_object*, lean_object*); uint8_t l_Lean_LocalContext_isSubPrefixOfAux(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_local_ctx_find_from_user_name(lean_object*, lean_object*); +lean_object* l_Nat_foldRevAux___main___at_Lean_LocalContext_mkLambda___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_PersistentArray_mfoldl___at_Lean_LocalContext_mfoldl___spec__1___boxed(lean_object*); lean_object* lean_expr_mk_forall(lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_Array_miterateAux___main___at_Lean_LocalContext_mfoldlFrom___spec__3___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -92,6 +93,7 @@ lean_object* l_Array_mfindAux___main___at_Lean_LocalContext_findDecl___spec__5(l lean_object* l_PersistentArray_mforAux___main___at_Lean_LocalContext_mfor___spec__2___boxed(lean_object*); lean_object* l_Lean_LocalContext_mfindDeclRev___at_Lean_LocalContext_findDeclRev___spec__1(lean_object*); lean_object* l_Array_mfindRevAux___main___at_Lean_LocalContext_mfindDeclRev___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_LocalContext_mkLambda___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_LocalContext_mfindDecl___boxed(lean_object*); lean_object* l_Lean_LocalContext_mfoldlFrom___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_LocalContext_findDeclRev___rarg(lean_object*, lean_object*); @@ -100,6 +102,7 @@ lean_object* l_PersistentArray_mfoldlAux___main___at_Lean_LocalContext_foldl___s lean_object* l_Lean_LocalContext_findDeclRev(lean_object*); lean_object* l_PersistentArray_mfindRev___at_Lean_LocalContext_findDeclRev___spec__2___rarg___boxed(lean_object*, lean_object*); lean_object* l_Array_miterateAux___main___at_Lean_LocalContext_mfoldlFrom___spec__3___boxed(lean_object*); +lean_object* l_Lean_LocalContext_mkForall___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Array_mfindAux___main___at_Lean_LocalContext_findDecl___spec__5___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_LocalContext_mkBinding(uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_LocalContext_mfor___boxed(lean_object*); @@ -241,6 +244,7 @@ lean_object* l_PersistentArray_mfoldlFrom___at_Lean_LocalContext_mfoldlFrom___sp lean_object* l_Nat_foldRevAux___main___at_Lean_LocalContext_mkBinding___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_mforAux___main___at_Lean_LocalContext_mfor___spec__4___boxed(lean_object*); lean_object* lean_expr_abstract_range(lean_object*, lean_object*, lean_object*); +lean_object* l_Nat_foldRevAux___main___at_Lean_LocalContext_mkForall___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_LocalContext_mfoldl___boxed(lean_object*); lean_object* l_Array_mfindAux___main___at_Lean_LocalContext_mfindDecl___spec__4___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_mforAux___main___at_Lean_LocalContext_mfor___spec__5___boxed(lean_object*); @@ -1181,7 +1185,7 @@ uint8_t x_6; x_6 = !lean_is_exclusive(x_1); if (x_6 == 0) { -lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; +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; x_7 = lean_ctor_get(x_1, 0); x_8 = lean_ctor_get(x_1, 1); x_9 = lean_ctor_get(x_8, 2); @@ -1195,47 +1199,39 @@ lean_ctor_set(x_10, 3, x_4); lean_ctor_set_uint8(x_10, sizeof(void*)*4, x_5); lean_inc(x_10); x_11 = l_PersistentHashMap_insert___at_Lean_LocalContext_mkLocalDecl___spec__1(x_7, x_2, x_10); -lean_inc(x_10); x_12 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_12, 0, x_10); x_13 = l_PersistentArray_push___rarg(x_8, x_12); lean_ctor_set(x_1, 1, x_13); lean_ctor_set(x_1, 0, x_11); -x_14 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_14, 0, x_10); -lean_ctor_set(x_14, 1, x_1); -return x_14; +return x_1; } 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; lean_object* x_23; -x_15 = lean_ctor_get(x_1, 0); -x_16 = lean_ctor_get(x_1, 1); -lean_inc(x_16); +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; +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_17 = lean_ctor_get(x_16, 2); -lean_inc(x_17); +x_16 = lean_ctor_get(x_15, 2); +lean_inc(x_16); lean_inc(x_2); -x_18 = lean_alloc_ctor(0, 4, 1); -lean_ctor_set(x_18, 0, x_17); -lean_ctor_set(x_18, 1, x_2); -lean_ctor_set(x_18, 2, x_3); -lean_ctor_set(x_18, 3, x_4); -lean_ctor_set_uint8(x_18, sizeof(void*)*4, x_5); -lean_inc(x_18); -x_19 = l_PersistentHashMap_insert___at_Lean_LocalContext_mkLocalDecl___spec__1(x_15, x_2, x_18); -lean_inc(x_18); -x_20 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_20, 0, x_18); -x_21 = l_PersistentArray_push___rarg(x_16, x_20); -x_22 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_22, 0, x_19); -lean_ctor_set(x_22, 1, x_21); -x_23 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_23, 0, x_18); -lean_ctor_set(x_23, 1, x_22); -return x_23; +x_17 = lean_alloc_ctor(0, 4, 1); +lean_ctor_set(x_17, 0, x_16); +lean_ctor_set(x_17, 1, x_2); +lean_ctor_set(x_17, 2, x_3); +lean_ctor_set(x_17, 3, x_4); +lean_ctor_set_uint8(x_17, sizeof(void*)*4, x_5); +lean_inc(x_17); +x_18 = l_PersistentHashMap_insert___at_Lean_LocalContext_mkLocalDecl___spec__1(x_14, x_2, x_17); +x_19 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_19, 0, x_17); +x_20 = l_PersistentArray_push___rarg(x_15, 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_20); +return x_21; } } } @@ -1281,7 +1277,7 @@ uint8_t x_6; x_6 = !lean_is_exclusive(x_1); if (x_6 == 0) { -lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; +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; x_7 = lean_ctor_get(x_1, 0); x_8 = lean_ctor_get(x_1, 1); x_9 = lean_ctor_get(x_8, 2); @@ -1295,47 +1291,39 @@ lean_ctor_set(x_10, 3, x_4); lean_ctor_set(x_10, 4, x_5); lean_inc(x_10); x_11 = l_PersistentHashMap_insert___at_Lean_LocalContext_mkLocalDecl___spec__1(x_7, x_2, x_10); -lean_inc(x_10); x_12 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_12, 0, x_10); x_13 = l_PersistentArray_push___rarg(x_8, x_12); lean_ctor_set(x_1, 1, x_13); lean_ctor_set(x_1, 0, x_11); -x_14 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_14, 0, x_10); -lean_ctor_set(x_14, 1, x_1); -return x_14; +return x_1; } 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; lean_object* x_23; -x_15 = lean_ctor_get(x_1, 0); -x_16 = lean_ctor_get(x_1, 1); -lean_inc(x_16); +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; +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_17 = lean_ctor_get(x_16, 2); -lean_inc(x_17); +x_16 = lean_ctor_get(x_15, 2); +lean_inc(x_16); lean_inc(x_2); -x_18 = lean_alloc_ctor(1, 5, 0); -lean_ctor_set(x_18, 0, x_17); -lean_ctor_set(x_18, 1, x_2); -lean_ctor_set(x_18, 2, x_3); -lean_ctor_set(x_18, 3, x_4); -lean_ctor_set(x_18, 4, x_5); -lean_inc(x_18); -x_19 = l_PersistentHashMap_insert___at_Lean_LocalContext_mkLocalDecl___spec__1(x_15, x_2, x_18); -lean_inc(x_18); -x_20 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_20, 0, x_18); -x_21 = l_PersistentArray_push___rarg(x_16, x_20); -x_22 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_22, 0, x_19); -lean_ctor_set(x_22, 1, x_21); -x_23 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_23, 0, x_18); -lean_ctor_set(x_23, 1, x_22); -return x_23; +x_17 = lean_alloc_ctor(1, 5, 0); +lean_ctor_set(x_17, 0, x_16); +lean_ctor_set(x_17, 1, x_2); +lean_ctor_set(x_17, 2, x_3); +lean_ctor_set(x_17, 3, x_4); +lean_ctor_set(x_17, 4, x_5); +lean_inc(x_17); +x_18 = l_PersistentHashMap_insert___at_Lean_LocalContext_mkLocalDecl___spec__1(x_14, x_2, x_17); +x_19 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_19, 0, x_17); +x_20 = l_PersistentArray_push___rarg(x_15, 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_20); +return x_21; } } } @@ -6615,9 +6603,8 @@ x_16 = lean_ctor_get(x_14, 3); lean_inc(x_16); x_17 = lean_ctor_get_uint8(x_14, sizeof(void*)*4); lean_dec(x_14); -lean_inc(x_3); -lean_inc(x_9); x_18 = lean_expr_abstract_range(x_16, x_9, x_3); +lean_dec(x_16); if (x_1 == 0) { lean_object* x_19; @@ -6645,12 +6632,10 @@ lean_inc(x_24); x_25 = lean_ctor_get(x_14, 4); lean_inc(x_25); lean_dec(x_14); -lean_inc(x_3); -lean_inc(x_9); x_26 = lean_expr_abstract_range(x_24, x_9, x_3); -lean_inc(x_3); -lean_inc(x_9); +lean_dec(x_24); x_27 = lean_expr_abstract_range(x_25, x_9, x_3); +lean_dec(x_25); x_28 = lean_expr_mk_let(x_23, x_26, x_27, x_5); x_4 = x_9; x_5 = x_28; @@ -6661,7 +6646,6 @@ goto _start; else { lean_dec(x_4); -lean_dec(x_3); lean_dec(x_2); return x_5; } @@ -6671,7 +6655,6 @@ lean_object* l_Lean_LocalContext_mkBinding(uint8_t x_1, lean_object* x_2, lean_o _start: { lean_object* x_5; lean_object* x_6; lean_object* x_7; -lean_inc(x_3); x_5 = lean_expr_abstract(x_4, x_3); x_6 = lean_array_get_size(x_3); x_7 = l_Nat_foldRevAux___main___at_Lean_LocalContext_mkBinding___spec__1(x_1, x_2, x_3, x_6, x_5); @@ -6685,6 +6668,7 @@ uint8_t x_6; lean_object* x_7; x_6 = lean_unbox(x_1); lean_dec(x_1); x_7 = l_Nat_foldRevAux___main___at_Lean_LocalContext_mkBinding___spec__1(x_6, x_2, x_3, x_4, x_5); +lean_dec(x_3); return x_7; } } @@ -6695,6 +6679,8 @@ uint8_t x_5; lean_object* x_6; x_5 = lean_unbox(x_1); lean_dec(x_1); x_6 = l_Lean_LocalContext_mkBinding(x_5, x_2, x_3, x_4); +lean_dec(x_4); +lean_dec(x_3); return x_6; } } @@ -6734,9 +6720,8 @@ x_15 = lean_ctor_get(x_13, 3); lean_inc(x_15); x_16 = lean_ctor_get_uint8(x_13, sizeof(void*)*4); lean_dec(x_13); -lean_inc(x_2); -lean_inc(x_8); x_17 = lean_expr_abstract_range(x_15, x_8, x_2); +lean_dec(x_15); x_18 = lean_expr_mk_lambda(x_14, x_16, x_17, x_4); x_3 = x_8; x_4 = x_18; @@ -6752,12 +6737,10 @@ lean_inc(x_21); x_22 = lean_ctor_get(x_13, 4); lean_inc(x_22); lean_dec(x_13); -lean_inc(x_2); -lean_inc(x_8); x_23 = lean_expr_abstract_range(x_21, x_8, x_2); -lean_inc(x_2); -lean_inc(x_8); +lean_dec(x_21); x_24 = lean_expr_abstract_range(x_22, x_8, x_2); +lean_dec(x_22); x_25 = lean_expr_mk_let(x_20, x_23, x_24, x_4); x_3 = x_8; x_4 = x_25; @@ -6768,7 +6751,6 @@ goto _start; else { lean_dec(x_3); -lean_dec(x_2); lean_dec(x_1); return x_4; } @@ -6778,13 +6760,31 @@ lean_object* l_Lean_LocalContext_mkLambda(lean_object* x_1, lean_object* x_2, le _start: { lean_object* x_4; lean_object* x_5; lean_object* x_6; -lean_inc(x_2); x_4 = lean_expr_abstract(x_3, x_2); x_5 = lean_array_get_size(x_2); x_6 = l_Nat_foldRevAux___main___at_Lean_LocalContext_mkLambda___spec__1(x_1, x_2, x_5, x_4); return x_6; } } +lean_object* l_Nat_foldRevAux___main___at_Lean_LocalContext_mkLambda___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_Nat_foldRevAux___main___at_Lean_LocalContext_mkLambda___spec__1(x_1, x_2, x_3, x_4); +lean_dec(x_2); +return x_5; +} +} +lean_object* l_Lean_LocalContext_mkLambda___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Lean_LocalContext_mkLambda(x_1, x_2, x_3); +lean_dec(x_3); +lean_dec(x_2); +return x_4; +} +} lean_object* l_Nat_foldRevAux___main___at_Lean_LocalContext_mkForall___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { @@ -6821,9 +6821,8 @@ x_15 = lean_ctor_get(x_13, 3); lean_inc(x_15); x_16 = lean_ctor_get_uint8(x_13, sizeof(void*)*4); lean_dec(x_13); -lean_inc(x_2); -lean_inc(x_8); x_17 = lean_expr_abstract_range(x_15, x_8, x_2); +lean_dec(x_15); x_18 = lean_expr_mk_forall(x_14, x_16, x_17, x_4); x_3 = x_8; x_4 = x_18; @@ -6839,12 +6838,10 @@ lean_inc(x_21); x_22 = lean_ctor_get(x_13, 4); lean_inc(x_22); lean_dec(x_13); -lean_inc(x_2); -lean_inc(x_8); x_23 = lean_expr_abstract_range(x_21, x_8, x_2); -lean_inc(x_2); -lean_inc(x_8); +lean_dec(x_21); x_24 = lean_expr_abstract_range(x_22, x_8, x_2); +lean_dec(x_22); x_25 = lean_expr_mk_let(x_20, x_23, x_24, x_4); x_3 = x_8; x_4 = x_25; @@ -6855,7 +6852,6 @@ goto _start; else { lean_dec(x_3); -lean_dec(x_2); lean_dec(x_1); return x_4; } @@ -6865,13 +6861,31 @@ lean_object* l_Lean_LocalContext_mkForall(lean_object* x_1, lean_object* x_2, le _start: { lean_object* x_4; lean_object* x_5; lean_object* x_6; -lean_inc(x_2); x_4 = lean_expr_abstract(x_3, x_2); x_5 = lean_array_get_size(x_2); x_6 = l_Nat_foldRevAux___main___at_Lean_LocalContext_mkForall___spec__1(x_1, x_2, x_5, x_4); return x_6; } } +lean_object* l_Nat_foldRevAux___main___at_Lean_LocalContext_mkForall___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_Nat_foldRevAux___main___at_Lean_LocalContext_mkForall___spec__1(x_1, x_2, x_3, x_4); +lean_dec(x_2); +return x_5; +} +} +lean_object* l_Lean_LocalContext_mkForall___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Lean_LocalContext_mkForall(x_1, x_2, x_3); +lean_dec(x_3); +lean_dec(x_2); +return x_4; +} +} lean_object* initialize_Init_Data_PersistentArray_Basic(lean_object*); lean_object* initialize_Init_Data_PersistentHashMap_Basic(lean_object*); lean_object* initialize_Init_Lean_Expr(lean_object*); diff --git a/src/stage0/Init/Lean/MetavarContext.c b/src/stage0/Init/Lean/MetavarContext.c index fa0d20ac8b..a7fd8d8556 100644 --- a/src/stage0/Init/Lean/MetavarContext.c +++ b/src/stage0/Init/Lean/MetavarContext.c @@ -1,6 +1,6 @@ // Lean compiler output // Module: Init.Lean.MetavarContext -// Imports: Init.Lean.LocalContext +// Imports: Init.Lean.AbstractMetavarContext #include "runtime/lean.h" #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" @@ -14,46 +14,86 @@ extern "C" { #endif uint8_t lean_metavar_ctx_is_level_assigned(lean_object*, lean_object*); +lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_ummapAux___main___at_Lean_MetavarContext_instantiateExprMVars___spec__7(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__6; uint8_t lean_name_dec_eq(lean_object*, lean_object*); lean_object* l_PersistentHashMap_findAux___main___at_Lean_MetavarContext_getLevelAssignment___spec__2(lean_object*, size_t, lean_object*); size_t l_USize_mul(size_t, size_t); +lean_object* l_Lean_Expr_betaRev(lean_object*, lean_object*); lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_MetavarContext_findDecl___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_List_foldr___main___at_Lean_MetavarContext_hasAssignedMVar___spec__2___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_find___at_Lean_MetavarContext_findDecl___spec__1___boxed(lean_object*, lean_object*); uint8_t l_PersistentHashMap_contains___at_Lean_MetavarContext_isExprAssigned___spec__1(lean_object*, lean_object*); +extern lean_object* l_Array_empty___closed__1; lean_object* lean_nat_sub(lean_object*, lean_object*); +uint8_t l_Lean_AbstractMetavarContext_hasAssignedLevelMVar___main___at_Lean_MetavarContext_hasAssignedLevelMVar___spec__1(lean_object*, lean_object*); lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Expr_letName___closed__1; +lean_object* l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__11; lean_object* l_PersistentHashMap_insertAux___main___at_Lean_MetavarContext_assignExpr___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_exprIsInhabited; lean_object* l_PersistentHashMap_find___at_Lean_MetavarContext_getExprAssignment___spec__1___boxed(lean_object*, lean_object*); lean_object* l_Array_miterateAux___main___at_Lean_MetavarContext_mkDecl___spec__4(size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_findAux___main___at_Lean_MetavarContext_findDecl___spec__2___boxed(lean_object*, lean_object*, lean_object*); size_t l_USize_shift__right(size_t, size_t); +uint8_t lean_level_has_mvar(lean_object*); lean_object* l_PersistentHashMap_containsAux___main___at_Lean_MetavarContext_isDelayedAssigned___spec__2___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Array_miterateAux___main___at_Lean_MetavarContext_mkDecl___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_expr_mk_let(lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t l_Lean_MetavarContext_hasAssignedLevelMVar(lean_object*, lean_object*); lean_object* l_Lean_MetavarContext_getExprMVarLCtx(lean_object*, lean_object*); +extern lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___rarg___closed__2; lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_MetavarContext_getDelayedAssignment___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_panicWithPos___at_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___spec__1___rarg___closed__2; lean_object* lean_metavar_ctx_erase_delayed(lean_object*, lean_object*); lean_object* l_PersistentHashMap_containsAtAux___main___at_Lean_MetavarContext_isLevelAssigned___spec__3___boxed(lean_object*, lean_object*, lean_object*); lean_object* lean_metavar_ctx_get_delayed_assignment(lean_object*, lean_object*); +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___at_Lean_MetavarContext_instantiateExprMVars___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); size_t l_USize_sub(size_t, size_t); lean_object* l_Lean_MetavarContext_mkMetavarContext___closed__1; +lean_object* l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(lean_object*, lean_object*, lean_object*); uint8_t l_PersistentHashMap_contains___at_Lean_MetavarContext_isDelayedAssigned___spec__1(lean_object*, lean_object*); +lean_object* l_Lean_MetavarContext_instantiateLevelMVars(lean_object*, lean_object*); lean_object* l_Array_miterateAux___main___at_Lean_MetavarContext_assignLevel___spec__4(size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_insertAux___main___at_Lean_MetavarContext_mkDecl___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_MetavarContext_hasAssignedLevelMVar___boxed(lean_object*, lean_object*); +lean_object* l_Lean_Expr_getAppNumArgsAux___main(lean_object*, lean_object*); lean_object* lean_metavar_ctx_get_expr_assignment(lean_object*, lean_object*); lean_object* l_PersistentHashMap_eraseAux___main___at_Lean_MetavarContext_eraseDelayed___spec__2(lean_object*, size_t, lean_object*); uint8_t l_PersistentHashMap_contains___at_Lean_MetavarContext_isLevelAssigned___spec__1(lean_object*, lean_object*); lean_object* l_PersistentHashMap_find___at_Lean_MetavarContext_findDecl___spec__1(lean_object*, lean_object*); lean_object* l_PersistentHashMap_find___at_Lean_MetavarContext_getDelayedAssignment___spec__1(lean_object*, lean_object*); lean_object* l_PersistentHashMap_getCollisionNodeSize___rarg(lean_object*); +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateLevelMVars___at_Lean_MetavarContext_instantiateExprMVars___spec__5(lean_object*, lean_object*); lean_object* l_Lean_MetavarContext_getExprMVarType(lean_object*, lean_object*); +lean_object* l_Lean_mkAppRev(lean_object*, lean_object*); +lean_object* lean_mk_empty_array_with_capacity(lean_object*); +lean_object* lean_expr_update_forall(lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_PersistentHashMap_insertAux___main___at_Lean_MetavarContext_assignDelayed___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_level_update_succ(lean_object*, lean_object*); +lean_object* l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__8; lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_MetavarContext_getLevelAssignment___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_List_mmap___main___at_Lean_MetavarContext_instantiateExprMVars___spec__6(lean_object*, lean_object*); +lean_object* l_Nat_repr(lean_object*); lean_object* l_PersistentHashMap_mkCollisionNode___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___lambda__1(lean_object*); +extern lean_object* l_Lean_Expr_updateForall_x21___closed__1; +lean_object* l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__10; +extern lean_object* l_panicWithPos___rarg___closed__3; lean_object* l_PersistentHashMap_findAux___main___at_Lean_MetavarContext_getDelayedAssignment___spec__2___boxed(lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Expr_constName___closed__1; lean_object* l_PersistentHashMap_contains___at_Lean_MetavarContext_isLevelAssigned___spec__1___boxed(lean_object*, lean_object*); +lean_object* l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext; lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_MetavarContext_getLevelAssignment___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); size_t lean_name_hash_usize(lean_object*); lean_object* l_PersistentHashMap_findAux___main___at_Lean_MetavarContext_getLevelAssignment___spec__2___boxed(lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Expr_updateProj_x21___closed__1; +lean_object* l_Lean_MetavarContext_instantiateExprMVars(lean_object*, lean_object*); +lean_object* l_Lean_LocalContext_findFVar(lean_object*, lean_object*); +lean_object* l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__7; +lean_object* lean_string_append(lean_object*, lean_object*); +lean_object* l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__9; size_t l_USize_add(size_t, size_t); lean_object* l_PersistentHashMap_erase___at_Lean_MetavarContext_eraseDelayed___spec__1(lean_object*, lean_object*); lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_MetavarContext_findDecl___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -61,34 +101,57 @@ lean_object* l_PersistentHashMap_find___at_Lean_MetavarContext_getLevelAssignmen lean_object* l_PersistentHashMap_insertAtCollisionNodeAux___main___at_Lean_MetavarContext_assignLevel___spec__3(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); lean_object* l_PersistentHashMap_find___at_Lean_MetavarContext_getExprAssignment___spec__1(lean_object*, lean_object*); +lean_object* lean_expr_update_const(lean_object*, lean_object*); lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_MetavarContext_getExprAssignment___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_mk_metavar_ctx(lean_object*); uint8_t l_PersistentHashMap_containsAux___main___at_Lean_MetavarContext_isLevelAssigned___spec__2(lean_object*, size_t, lean_object*); extern lean_object* l_PersistentHashMap_empty___closed__3; +lean_object* l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__5; +lean_object* l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(lean_object*, lean_object*); lean_object* l_Array_miterateAux___main___at_Lean_MetavarContext_assignExpr___spec__4(size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_nat_add(lean_object*, lean_object*); lean_object* l_Array_miterateAux___main___at_Lean_MetavarContext_assignLevel___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_metavar_ctx_assign_expr(lean_object*, lean_object*, lean_object*); lean_object* l_Array_miterateAux___main___at_Lean_MetavarContext_assignDelayed___spec__4(size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t lean_nat_dec_eq(lean_object*, lean_object*); +uint8_t l_List_foldr___main___at_Lean_MetavarContext_hasAssignedMVar___spec__2(lean_object*, uint8_t, lean_object*); lean_object* lean_array_push(lean_object*, lean_object*); lean_object* l_PersistentHashMap_eraseAux___main___at_Lean_MetavarContext_eraseDelayed___spec__2___boxed(lean_object*, lean_object*, lean_object*); +lean_object* lean_expr_update_proj(lean_object*, lean_object*); +extern lean_object* l_panicWithPos___rarg___closed__1; lean_object* l_PersistentHashMap_find___at_Lean_MetavarContext_getDelayedAssignment___spec__1___boxed(lean_object*, lean_object*); +lean_object* l_panicWithPos___at_Lean_MetavarContext_instantiateExprMVars___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_AbstractMetavarContext_instantiateLevelMVars___main___at_Lean_MetavarContext_instantiateLevelMVars___spec__1(lean_object*, lean_object*); lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_MetavarContext_getDelayedAssignment___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_expr_update_mdata(lean_object*, lean_object*); lean_object* l_PersistentHashMap_insertAtCollisionNodeAux___main___at_Lean_MetavarContext_mkDecl___spec__3(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_set(lean_object*, lean_object*, lean_object*); extern size_t l_PersistentHashMap_insertAux___main___rarg___closed__2; +extern lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___rarg___closed__1; lean_object* l_Array_miterateAux___main___at_Lean_MetavarContext_assignDelayed___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_find___at_Lean_MetavarContext_getLevelAssignment___spec__1___boxed(lean_object*, lean_object*); lean_object* l_PersistentHashMap_insert___at_Lean_MetavarContext_assignExpr___spec__1(lean_object*, lean_object*, lean_object*); uint8_t l_PersistentHashMap_containsAux___main___at_Lean_MetavarContext_isDelayedAssigned___spec__2(lean_object*, size_t, lean_object*); +uint8_t l_Lean_Expr_isMVar(lean_object*); lean_object* l_PersistentHashMap_containsAux___main___at_Lean_MetavarContext_isExprAssigned___spec__2___boxed(lean_object*, lean_object*, lean_object*); lean_object* lean_metavar_ctx_get_level_assignment(lean_object*, lean_object*); +lean_object* lean_expr_update_lambda(lean_object*, uint8_t, lean_object*, lean_object*); uint8_t lean_metavar_ctx_is_delayed_assigned(lean_object*, lean_object*); +uint8_t l_Lean_AbstractMetavarContext_hasAssignedMVar___main___at_Lean_MetavarContext_hasAssignedMVar___spec__1(lean_object*, lean_object*); +extern lean_object* l_Lean_Level_updateSucc_x21___closed__1; lean_object* l_PersistentHashMap_insertAux___main___at_Lean_MetavarContext_assignDelayed___spec__2(lean_object*, size_t, size_t, lean_object*, lean_object*); +lean_object* l_Lean_AbstractMetavarContext_hasAssignedMVar___main___at_Lean_MetavarContext_hasAssignedMVar___spec__1___boxed(lean_object*, lean_object*); lean_object* l_PersistentHashMap_insert___at_Lean_MetavarContext_mkDecl___spec__1(lean_object*, lean_object*, lean_object*); +lean_object* lean_expr_abstract_range(lean_object*, lean_object*, lean_object*); +lean_object* l_panic(lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Level_updateIMax_x21___closed__1; uint8_t l_PersistentHashMap_containsAtAux___main___at_Lean_MetavarContext_isLevelAssigned___spec__3(lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Expr_updateLambda_x21___closed__1; +lean_object* l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__1; lean_object* l_PersistentHashMap_findAux___main___at_Lean_MetavarContext_findDecl___spec__2(lean_object*, size_t, lean_object*); +extern lean_object* l_HashMap_Inhabited___closed__1; lean_object* l_Lean_MetavarContext_isDelayedAssigned___boxed(lean_object*, lean_object*); +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___at_Lean_MetavarContext_instantiateExprMVars___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_insertAtCollisionNodeAux___main___at_Lean_MetavarContext_assignExpr___spec__3(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_MetavarContext_isLevelAssigned___boxed(lean_object*, lean_object*); extern lean_object* l_PersistentHashMap_insertAux___main___rarg___closed__3; @@ -106,24 +169,47 @@ lean_object* l_PersistentHashMap_insertAux___main___at_Lean_MetavarContext_assig lean_object* lean_metavar_ctx_find_decl(lean_object*, lean_object*); lean_object* l_PersistentHashMap_insertAux___main___at_Lean_MetavarContext_assignLevel___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_insert___at_Lean_MetavarContext_assignLevel___spec__1(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___lambda__1___boxed(lean_object*); +lean_object* l___private_Init_Lean_Expr_3__withAppRevAux___main___at_Lean_MetavarContext_instantiateExprMVars___spec__8(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_MetavarContext_isExprAssigned___boxed(lean_object*, lean_object*); +uint8_t l_Lean_MetavarContext_hasAssignedMVar(lean_object*, lean_object*); lean_object* lean_metavar_ctx_assign_delayed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_insertAux___main___at_Lean_MetavarContext_mkDecl___spec__2(lean_object*, size_t, size_t, lean_object*, lean_object*); +lean_object* lean_expr_mk_lambda(lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_PersistentHashMap_insert___at_Lean_MetavarContext_assignDelayed___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_erase___at_Lean_MetavarContext_eraseDelayed___spec__1___boxed(lean_object*, lean_object*); lean_object* l_PersistentHashMap_contains___at_Lean_MetavarContext_isDelayedAssigned___spec__1___boxed(lean_object*, lean_object*); uint8_t l_USize_decLe(size_t, size_t); +extern lean_object* l_panicWithPos___rarg___closed__2; lean_object* l_PersistentHashMap_findAux___main___at_Lean_MetavarContext_getExprAssignment___spec__2___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__2; +lean_object* l_Lean_AbstractMetavarContext_instantiateExprMVars___at_Lean_MetavarContext_instantiateExprMVars___spec__1(lean_object*, lean_object*); +lean_object* lean_level_update_max(lean_object*, lean_object*, lean_object*); uint8_t l_PersistentHashMap_containsAux___main___at_Lean_MetavarContext_isExprAssigned___spec__2(lean_object*, size_t, lean_object*); +uint8_t lean_expr_has_expr_mvar(lean_object*); lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_findAux___main___at_Lean_MetavarContext_getExprAssignment___spec__2(lean_object*, size_t, lean_object*); +extern lean_object* l_Lean_Expr_updateMData_x21___closed__1; +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(lean_object*, lean_object*); +lean_object* l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__4; +lean_object* lean_expr_abstract(lean_object*, lean_object*); +lean_object* l_panicWithPos___at_Lean_Expr_bindingDomain___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_expr_update_sort(lean_object*, lean_object*); size_t l_USize_land(size_t, size_t); +lean_object* l_Lean_MetavarContext_hasAssignedMVar___boxed(lean_object*, lean_object*); lean_object* lean_usize_to_nat(size_t); lean_object* lean_metavar_ctx_assign_level(lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_findAux___main___at_Lean_MetavarContext_getDelayedAssignment___spec__2(lean_object*, size_t, lean_object*); +lean_object* l_panicWithPos___at_Lean_MetavarContext_instantiateExprMVars___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_containsAux___main___at_Lean_MetavarContext_isLevelAssigned___spec__2___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_panicWithPos___at_Lean_Level_updateSucc_x21___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_expr_update_let(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__3; +uint8_t lean_expr_has_level_mvar(lean_object*); +uint8_t l_Lean_Expr_isLambda(lean_object*); lean_object* l_PersistentHashMap_insertAux___main___at_Lean_MetavarContext_assignLevel___spec__2(lean_object*, size_t, size_t, lean_object*, lean_object*); lean_object* l_PersistentHashMap_contains___at_Lean_MetavarContext_isExprAssigned___spec__1___boxed(lean_object*, lean_object*); +lean_object* l_Lean_AbstractMetavarContext_hasAssignedLevelMVar___main___at_Lean_MetavarContext_hasAssignedLevelMVar___spec__1___boxed(lean_object*, lean_object*); lean_object* _init_l_Lean_MetavarContext_mkMetavarContext___closed__1() { _start: { @@ -4136,17 +4222,8913 @@ lean_dec(x_2); return x_3; } } -lean_object* initialize_Init_Lean_LocalContext(lean_object*); +uint8_t l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___lambda__1(lean_object* x_1) { +_start: +{ +uint8_t x_2; +x_2 = 1; +return x_2; +} +} +lean_object* _init_l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___lambda__1___boxed), 1, 0); +return x_1; +} +} +lean_object* _init_l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__2() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(lean_metavar_ctx_get_level_assignment), 2, 0); +return x_1; +} +} +lean_object* _init_l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(lean_metavar_ctx_assign_level), 3, 0); +return x_1; +} +} +lean_object* _init_l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__4() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(lean_metavar_ctx_get_expr_assignment), 2, 0); +return x_1; +} +} +lean_object* _init_l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__5() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(lean_metavar_ctx_assign_expr), 3, 0); +return x_1; +} +} +lean_object* _init_l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__6() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_MetavarContext_getExprMVarLCtx), 2, 0); +return x_1; +} +} +lean_object* _init_l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__7() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_MetavarContext_getExprMVarType), 2, 0); +return x_1; +} +} +lean_object* _init_l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__8() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(lean_metavar_ctx_assign_delayed), 5, 0); +return x_1; +} +} +lean_object* _init_l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__9() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(lean_metavar_ctx_get_delayed_assignment), 2, 0); +return x_1; +} +} +lean_object* _init_l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__10() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(lean_metavar_ctx_erase_delayed), 2, 0); +return x_1; +} +} +lean_object* _init_l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__11() { +_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; lean_object* x_7; lean_object* x_8; uint8_t x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_1 = l_Lean_MetavarContext_mkMetavarContext___closed__1; +x_2 = l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__1; +x_3 = l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__2; +x_4 = l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__3; +x_5 = l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__4; +x_6 = l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__5; +x_7 = l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__6; +x_8 = l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__7; +x_9 = 0; +x_10 = l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__8; +x_11 = l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__9; +x_12 = l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__10; +x_13 = lean_alloc_ctor(0, 12, 1); +lean_ctor_set(x_13, 0, x_1); +lean_ctor_set(x_13, 1, x_2); +lean_ctor_set(x_13, 2, x_3); +lean_ctor_set(x_13, 3, x_4); +lean_ctor_set(x_13, 4, x_2); +lean_ctor_set(x_13, 5, x_5); +lean_ctor_set(x_13, 6, x_6); +lean_ctor_set(x_13, 7, x_7); +lean_ctor_set(x_13, 8, x_8); +lean_ctor_set(x_13, 9, x_10); +lean_ctor_set(x_13, 10, x_11); +lean_ctor_set(x_13, 11, x_12); +lean_ctor_set_uint8(x_13, sizeof(void*)*12, x_9); +return x_13; +} +} +lean_object* _init_l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext() { +_start: +{ +lean_object* x_1; +x_1 = l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__11; +return x_1; +} +} +lean_object* l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___lambda__1___boxed(lean_object* x_1) { +_start: +{ +uint8_t x_2; lean_object* x_3; +x_2 = l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___lambda__1(x_1); +lean_dec(x_1); +x_3 = lean_box(x_2); +return x_3; +} +} +uint8_t l_Lean_AbstractMetavarContext_hasAssignedLevelMVar___main___at_Lean_MetavarContext_hasAssignedLevelMVar___spec__1(lean_object* x_1, lean_object* x_2) { +_start: +{ +switch (lean_obj_tag(x_2)) { +case 1: +{ +lean_object* x_3; uint8_t x_4; +x_3 = lean_ctor_get(x_2, 0); +lean_inc(x_3); +lean_dec(x_2); +lean_inc(x_3); +x_4 = lean_level_has_mvar(x_3); +if (x_4 == 0) +{ +uint8_t x_5; +lean_dec(x_3); +lean_dec(x_1); +x_5 = 0; +return x_5; +} +else +{ +x_2 = x_3; +goto _start; +} +} +case 2: +{ +lean_object* x_7; lean_object* x_8; uint8_t x_9; +x_7 = lean_ctor_get(x_2, 0); +lean_inc(x_7); +x_8 = lean_ctor_get(x_2, 1); +lean_inc(x_8); +lean_dec(x_2); +lean_inc(x_7); +x_9 = lean_level_has_mvar(x_7); +if (x_9 == 0) +{ +uint8_t x_10; +lean_dec(x_7); +lean_inc(x_8); +x_10 = lean_level_has_mvar(x_8); +if (x_10 == 0) +{ +uint8_t x_11; +lean_dec(x_8); +lean_dec(x_1); +x_11 = 0; +return x_11; +} +else +{ +x_2 = x_8; +goto _start; +} +} +else +{ +uint8_t x_13; +lean_inc(x_1); +x_13 = l_Lean_AbstractMetavarContext_hasAssignedLevelMVar___main___at_Lean_MetavarContext_hasAssignedLevelMVar___spec__1(x_1, x_7); +if (x_13 == 0) +{ +uint8_t x_14; +lean_inc(x_8); +x_14 = lean_level_has_mvar(x_8); +if (x_14 == 0) +{ +lean_dec(x_8); +lean_dec(x_1); +return x_13; +} +else +{ +x_2 = x_8; +goto _start; +} +} +else +{ +uint8_t x_16; +lean_dec(x_8); +lean_dec(x_1); +x_16 = 1; +return x_16; +} +} +} +case 3: +{ +lean_object* x_17; lean_object* x_18; uint8_t x_19; +x_17 = lean_ctor_get(x_2, 0); +lean_inc(x_17); +x_18 = lean_ctor_get(x_2, 1); +lean_inc(x_18); +lean_dec(x_2); +lean_inc(x_17); +x_19 = lean_level_has_mvar(x_17); +if (x_19 == 0) +{ +uint8_t x_20; +lean_dec(x_17); +lean_inc(x_18); +x_20 = lean_level_has_mvar(x_18); +if (x_20 == 0) +{ +uint8_t x_21; +lean_dec(x_18); +lean_dec(x_1); +x_21 = 0; +return x_21; +} +else +{ +x_2 = x_18; +goto _start; +} +} +else +{ +uint8_t x_23; +lean_inc(x_1); +x_23 = l_Lean_AbstractMetavarContext_hasAssignedLevelMVar___main___at_Lean_MetavarContext_hasAssignedLevelMVar___spec__1(x_1, x_17); +if (x_23 == 0) +{ +uint8_t x_24; +lean_inc(x_18); +x_24 = lean_level_has_mvar(x_18); +if (x_24 == 0) +{ +lean_dec(x_18); +lean_dec(x_1); +return x_23; +} +else +{ +x_2 = x_18; +goto _start; +} +} +else +{ +uint8_t x_26; +lean_dec(x_18); +lean_dec(x_1); +x_26 = 1; +return x_26; +} +} +} +case 5: +{ +lean_object* x_27; lean_object* x_28; +x_27 = lean_ctor_get(x_2, 0); +lean_inc(x_27); +lean_dec(x_2); +x_28 = lean_metavar_ctx_get_level_assignment(x_1, x_27); +if (lean_obj_tag(x_28) == 0) +{ +uint8_t x_29; +x_29 = 0; +return x_29; +} +else +{ +uint8_t x_30; +lean_dec(x_28); +x_30 = 1; +return x_30; +} +} +default: +{ +uint8_t x_31; +lean_dec(x_2); +lean_dec(x_1); +x_31 = 0; +return x_31; +} +} +} +} +uint8_t l_Lean_MetavarContext_hasAssignedLevelMVar(lean_object* x_1, lean_object* x_2) { +_start: +{ +uint8_t x_3; +x_3 = l_Lean_AbstractMetavarContext_hasAssignedLevelMVar___main___at_Lean_MetavarContext_hasAssignedLevelMVar___spec__1(x_1, x_2); +return x_3; +} +} +lean_object* l_Lean_AbstractMetavarContext_hasAssignedLevelMVar___main___at_Lean_MetavarContext_hasAssignedLevelMVar___spec__1___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +uint8_t x_3; lean_object* x_4; +x_3 = l_Lean_AbstractMetavarContext_hasAssignedLevelMVar___main___at_Lean_MetavarContext_hasAssignedLevelMVar___spec__1(x_1, x_2); +x_4 = lean_box(x_3); +return x_4; +} +} +lean_object* l_Lean_MetavarContext_hasAssignedLevelMVar___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +uint8_t x_3; lean_object* x_4; +x_3 = l_Lean_MetavarContext_hasAssignedLevelMVar(x_1, x_2); +x_4 = lean_box(x_3); +return x_4; +} +} +uint8_t l_List_foldr___main___at_Lean_MetavarContext_hasAssignedMVar___spec__2(lean_object* x_1, uint8_t x_2, lean_object* x_3) { +_start: +{ +if (lean_obj_tag(x_3) == 0) +{ +lean_dec(x_1); +return x_2; +} +else +{ +lean_object* x_4; lean_object* x_5; uint8_t x_6; uint8_t x_7; +x_4 = lean_ctor_get(x_3, 0); +lean_inc(x_4); +x_5 = lean_ctor_get(x_3, 1); +lean_inc(x_5); +lean_dec(x_3); +lean_inc(x_1); +x_6 = l_List_foldr___main___at_Lean_MetavarContext_hasAssignedMVar___spec__2(x_1, x_2, x_5); +x_7 = l_Lean_AbstractMetavarContext_hasAssignedLevelMVar___main___at_Lean_MetavarContext_hasAssignedLevelMVar___spec__1(x_1, x_4); +if (x_7 == 0) +{ +return x_6; +} +else +{ +uint8_t x_8; +x_8 = 1; +return x_8; +} +} +} +} +uint8_t l_Lean_AbstractMetavarContext_hasAssignedMVar___main___at_Lean_MetavarContext_hasAssignedMVar___spec__1(lean_object* x_1, lean_object* x_2) { +_start: +{ +switch (lean_obj_tag(x_2)) { +case 2: +{ +lean_object* x_3; lean_object* x_4; +x_3 = lean_ctor_get(x_2, 0); +lean_inc(x_3); +lean_dec(x_2); +x_4 = lean_metavar_ctx_get_expr_assignment(x_1, x_3); +if (lean_obj_tag(x_4) == 0) +{ +uint8_t x_5; +x_5 = 0; +return x_5; +} +else +{ +uint8_t x_6; +lean_dec(x_4); +x_6 = 1; +return x_6; +} +} +case 3: +{ +lean_object* x_7; uint8_t x_8; +x_7 = lean_ctor_get(x_2, 0); +lean_inc(x_7); +lean_dec(x_2); +x_8 = l_Lean_AbstractMetavarContext_hasAssignedLevelMVar___main___at_Lean_MetavarContext_hasAssignedLevelMVar___spec__1(x_1, x_7); +return x_8; +} +case 4: +{ +lean_object* x_9; uint8_t x_10; uint8_t x_11; +x_9 = lean_ctor_get(x_2, 1); +lean_inc(x_9); +lean_dec(x_2); +x_10 = 0; +x_11 = l_List_foldr___main___at_Lean_MetavarContext_hasAssignedMVar___spec__2(x_1, x_10, x_9); +return x_11; +} +case 5: +{ +lean_object* x_12; lean_object* x_13; uint8_t x_14; +x_12 = lean_ctor_get(x_2, 0); +lean_inc(x_12); +x_13 = lean_ctor_get(x_2, 1); +lean_inc(x_13); +lean_dec(x_2); +x_14 = lean_expr_has_expr_mvar(x_12); +if (x_14 == 0) +{ +uint8_t x_15; +x_15 = lean_expr_has_level_mvar(x_12); +if (x_15 == 0) +{ +uint8_t x_16; +lean_dec(x_12); +x_16 = lean_expr_has_expr_mvar(x_13); +if (x_16 == 0) +{ +uint8_t x_17; +x_17 = lean_expr_has_level_mvar(x_13); +if (x_17 == 0) +{ +uint8_t x_18; +lean_dec(x_13); +lean_dec(x_1); +x_18 = 0; +return x_18; +} +else +{ +x_2 = x_13; +goto _start; +} +} +else +{ +x_2 = x_13; +goto _start; +} +} +else +{ +uint8_t x_21; +lean_inc(x_1); +x_21 = l_Lean_AbstractMetavarContext_hasAssignedMVar___main___at_Lean_MetavarContext_hasAssignedMVar___spec__1(x_1, x_12); +if (x_21 == 0) +{ +uint8_t x_22; +x_22 = lean_expr_has_expr_mvar(x_13); +if (x_22 == 0) +{ +uint8_t x_23; +x_23 = lean_expr_has_level_mvar(x_13); +if (x_23 == 0) +{ +lean_dec(x_13); +lean_dec(x_1); +return x_21; +} +else +{ +x_2 = x_13; +goto _start; +} +} +else +{ +x_2 = x_13; +goto _start; +} +} +else +{ +uint8_t x_26; +lean_dec(x_13); +lean_dec(x_1); +x_26 = 1; +return x_26; +} +} +} +else +{ +uint8_t x_27; +lean_inc(x_1); +x_27 = l_Lean_AbstractMetavarContext_hasAssignedMVar___main___at_Lean_MetavarContext_hasAssignedMVar___spec__1(x_1, x_12); +if (x_27 == 0) +{ +uint8_t x_28; +x_28 = lean_expr_has_expr_mvar(x_13); +if (x_28 == 0) +{ +uint8_t x_29; +x_29 = lean_expr_has_level_mvar(x_13); +if (x_29 == 0) +{ +lean_dec(x_13); +lean_dec(x_1); +return x_27; +} +else +{ +x_2 = x_13; +goto _start; +} +} +else +{ +x_2 = x_13; +goto _start; +} +} +else +{ +uint8_t x_32; +lean_dec(x_13); +lean_dec(x_1); +x_32 = 1; +return x_32; +} +} +} +case 6: +{ +lean_object* x_33; lean_object* x_34; uint8_t x_35; +x_33 = lean_ctor_get(x_2, 1); +lean_inc(x_33); +x_34 = lean_ctor_get(x_2, 2); +lean_inc(x_34); +lean_dec(x_2); +x_35 = lean_expr_has_expr_mvar(x_33); +if (x_35 == 0) +{ +uint8_t x_36; +x_36 = lean_expr_has_level_mvar(x_33); +if (x_36 == 0) +{ +uint8_t x_37; +lean_dec(x_33); +x_37 = lean_expr_has_expr_mvar(x_34); +if (x_37 == 0) +{ +uint8_t x_38; +x_38 = lean_expr_has_level_mvar(x_34); +if (x_38 == 0) +{ +uint8_t x_39; +lean_dec(x_34); +lean_dec(x_1); +x_39 = 0; +return x_39; +} +else +{ +x_2 = x_34; +goto _start; +} +} +else +{ +x_2 = x_34; +goto _start; +} +} +else +{ +uint8_t x_42; +lean_inc(x_1); +x_42 = l_Lean_AbstractMetavarContext_hasAssignedMVar___main___at_Lean_MetavarContext_hasAssignedMVar___spec__1(x_1, x_33); +if (x_42 == 0) +{ +uint8_t x_43; +x_43 = lean_expr_has_expr_mvar(x_34); +if (x_43 == 0) +{ +uint8_t x_44; +x_44 = lean_expr_has_level_mvar(x_34); +if (x_44 == 0) +{ +lean_dec(x_34); +lean_dec(x_1); +return x_42; +} +else +{ +x_2 = x_34; +goto _start; +} +} +else +{ +x_2 = x_34; +goto _start; +} +} +else +{ +uint8_t x_47; +lean_dec(x_34); +lean_dec(x_1); +x_47 = 1; +return x_47; +} +} +} +else +{ +uint8_t x_48; +lean_inc(x_1); +x_48 = l_Lean_AbstractMetavarContext_hasAssignedMVar___main___at_Lean_MetavarContext_hasAssignedMVar___spec__1(x_1, x_33); +if (x_48 == 0) +{ +uint8_t x_49; +x_49 = lean_expr_has_expr_mvar(x_34); +if (x_49 == 0) +{ +uint8_t x_50; +x_50 = lean_expr_has_level_mvar(x_34); +if (x_50 == 0) +{ +lean_dec(x_34); +lean_dec(x_1); +return x_48; +} +else +{ +x_2 = x_34; +goto _start; +} +} +else +{ +x_2 = x_34; +goto _start; +} +} +else +{ +uint8_t x_53; +lean_dec(x_34); +lean_dec(x_1); +x_53 = 1; +return x_53; +} +} +} +case 7: +{ +lean_object* x_54; lean_object* x_55; uint8_t x_56; +x_54 = lean_ctor_get(x_2, 1); +lean_inc(x_54); +x_55 = lean_ctor_get(x_2, 2); +lean_inc(x_55); +lean_dec(x_2); +x_56 = lean_expr_has_expr_mvar(x_54); +if (x_56 == 0) +{ +uint8_t x_57; +x_57 = lean_expr_has_level_mvar(x_54); +if (x_57 == 0) +{ +uint8_t x_58; +lean_dec(x_54); +x_58 = lean_expr_has_expr_mvar(x_55); +if (x_58 == 0) +{ +uint8_t x_59; +x_59 = lean_expr_has_level_mvar(x_55); +if (x_59 == 0) +{ +uint8_t x_60; +lean_dec(x_55); +lean_dec(x_1); +x_60 = 0; +return x_60; +} +else +{ +x_2 = x_55; +goto _start; +} +} +else +{ +x_2 = x_55; +goto _start; +} +} +else +{ +uint8_t x_63; +lean_inc(x_1); +x_63 = l_Lean_AbstractMetavarContext_hasAssignedMVar___main___at_Lean_MetavarContext_hasAssignedMVar___spec__1(x_1, x_54); +if (x_63 == 0) +{ +uint8_t x_64; +x_64 = lean_expr_has_expr_mvar(x_55); +if (x_64 == 0) +{ +uint8_t x_65; +x_65 = lean_expr_has_level_mvar(x_55); +if (x_65 == 0) +{ +lean_dec(x_55); +lean_dec(x_1); +return x_63; +} +else +{ +x_2 = x_55; +goto _start; +} +} +else +{ +x_2 = x_55; +goto _start; +} +} +else +{ +uint8_t x_68; +lean_dec(x_55); +lean_dec(x_1); +x_68 = 1; +return x_68; +} +} +} +else +{ +uint8_t x_69; +lean_inc(x_1); +x_69 = l_Lean_AbstractMetavarContext_hasAssignedMVar___main___at_Lean_MetavarContext_hasAssignedMVar___spec__1(x_1, x_54); +if (x_69 == 0) +{ +uint8_t x_70; +x_70 = lean_expr_has_expr_mvar(x_55); +if (x_70 == 0) +{ +uint8_t x_71; +x_71 = lean_expr_has_level_mvar(x_55); +if (x_71 == 0) +{ +lean_dec(x_55); +lean_dec(x_1); +return x_69; +} +else +{ +x_2 = x_55; +goto _start; +} +} +else +{ +x_2 = x_55; +goto _start; +} +} +else +{ +uint8_t x_74; +lean_dec(x_55); +lean_dec(x_1); +x_74 = 1; +return x_74; +} +} +} +case 8: +{ +lean_object* x_75; lean_object* x_76; lean_object* x_77; uint8_t x_78; uint8_t x_99; +x_75 = lean_ctor_get(x_2, 1); +lean_inc(x_75); +x_76 = lean_ctor_get(x_2, 2); +lean_inc(x_76); +x_77 = lean_ctor_get(x_2, 3); +lean_inc(x_77); +lean_dec(x_2); +x_99 = lean_expr_has_expr_mvar(x_75); +if (x_99 == 0) +{ +uint8_t x_100; +x_100 = lean_expr_has_level_mvar(x_75); +if (x_100 == 0) +{ +uint8_t x_101; +lean_dec(x_75); +x_101 = 0; +x_78 = x_101; +goto block_98; +} +else +{ +uint8_t x_102; +lean_inc(x_1); +x_102 = l_Lean_AbstractMetavarContext_hasAssignedMVar___main___at_Lean_MetavarContext_hasAssignedMVar___spec__1(x_1, x_75); +if (x_102 == 0) +{ +x_78 = x_102; +goto block_98; +} +else +{ +uint8_t x_103; +lean_dec(x_77); +lean_dec(x_76); +lean_dec(x_1); +x_103 = 1; +return x_103; +} +} +} +else +{ +uint8_t x_104; +lean_inc(x_1); +x_104 = l_Lean_AbstractMetavarContext_hasAssignedMVar___main___at_Lean_MetavarContext_hasAssignedMVar___spec__1(x_1, x_75); +if (x_104 == 0) +{ +x_78 = x_104; +goto block_98; +} +else +{ +uint8_t x_105; +lean_dec(x_77); +lean_dec(x_76); +lean_dec(x_1); +x_105 = 1; +return x_105; +} +} +block_98: +{ +uint8_t x_79; +x_79 = lean_expr_has_expr_mvar(x_76); +if (x_79 == 0) +{ +uint8_t x_80; +x_80 = lean_expr_has_level_mvar(x_76); +if (x_80 == 0) +{ +lean_dec(x_76); +if (x_78 == 0) +{ +uint8_t x_81; +x_81 = lean_expr_has_expr_mvar(x_77); +if (x_81 == 0) +{ +uint8_t x_82; +x_82 = lean_expr_has_level_mvar(x_77); +if (x_82 == 0) +{ +lean_dec(x_77); +lean_dec(x_1); +return x_78; +} +else +{ +x_2 = x_77; +goto _start; +} +} +else +{ +x_2 = x_77; +goto _start; +} +} +else +{ +uint8_t x_85; +lean_dec(x_77); +lean_dec(x_1); +x_85 = 1; +return x_85; +} +} +else +{ +uint8_t x_86; +lean_inc(x_1); +x_86 = l_Lean_AbstractMetavarContext_hasAssignedMVar___main___at_Lean_MetavarContext_hasAssignedMVar___spec__1(x_1, x_76); +if (x_86 == 0) +{ +uint8_t x_87; +x_87 = lean_expr_has_expr_mvar(x_77); +if (x_87 == 0) +{ +uint8_t x_88; +x_88 = lean_expr_has_level_mvar(x_77); +if (x_88 == 0) +{ +lean_dec(x_77); +lean_dec(x_1); +return x_86; +} +else +{ +x_2 = x_77; +goto _start; +} +} +else +{ +x_2 = x_77; +goto _start; +} +} +else +{ +uint8_t x_91; +lean_dec(x_77); +lean_dec(x_1); +x_91 = 1; +return x_91; +} +} +} +else +{ +uint8_t x_92; +lean_inc(x_1); +x_92 = l_Lean_AbstractMetavarContext_hasAssignedMVar___main___at_Lean_MetavarContext_hasAssignedMVar___spec__1(x_1, x_76); +if (x_92 == 0) +{ +uint8_t x_93; +x_93 = lean_expr_has_expr_mvar(x_77); +if (x_93 == 0) +{ +uint8_t x_94; +x_94 = lean_expr_has_level_mvar(x_77); +if (x_94 == 0) +{ +lean_dec(x_77); +lean_dec(x_1); +return x_92; +} +else +{ +x_2 = x_77; +goto _start; +} +} +else +{ +x_2 = x_77; +goto _start; +} +} +else +{ +uint8_t x_97; +lean_dec(x_77); +lean_dec(x_1); +x_97 = 1; +return x_97; +} +} +} +} +case 10: +{ +lean_object* x_106; uint8_t x_107; +x_106 = lean_ctor_get(x_2, 1); +lean_inc(x_106); +lean_dec(x_2); +x_107 = lean_expr_has_expr_mvar(x_106); +if (x_107 == 0) +{ +uint8_t x_108; +x_108 = lean_expr_has_level_mvar(x_106); +if (x_108 == 0) +{ +uint8_t x_109; +lean_dec(x_106); +lean_dec(x_1); +x_109 = 0; +return x_109; +} +else +{ +x_2 = x_106; +goto _start; +} +} +else +{ +x_2 = x_106; +goto _start; +} +} +case 11: +{ +lean_object* x_112; uint8_t x_113; +x_112 = lean_ctor_get(x_2, 2); +lean_inc(x_112); +lean_dec(x_2); +x_113 = lean_expr_has_expr_mvar(x_112); +if (x_113 == 0) +{ +uint8_t x_114; +x_114 = lean_expr_has_level_mvar(x_112); +if (x_114 == 0) +{ +uint8_t x_115; +lean_dec(x_112); +lean_dec(x_1); +x_115 = 0; +return x_115; +} +else +{ +x_2 = x_112; +goto _start; +} +} +else +{ +x_2 = x_112; +goto _start; +} +} +default: +{ +uint8_t x_118; +lean_dec(x_2); +lean_dec(x_1); +x_118 = 0; +return x_118; +} +} +} +} +uint8_t l_Lean_MetavarContext_hasAssignedMVar(lean_object* x_1, lean_object* x_2) { +_start: +{ +uint8_t x_3; +x_3 = l_Lean_AbstractMetavarContext_hasAssignedMVar___main___at_Lean_MetavarContext_hasAssignedMVar___spec__1(x_1, x_2); +return x_3; +} +} +lean_object* l_List_foldr___main___at_Lean_MetavarContext_hasAssignedMVar___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +uint8_t x_4; uint8_t x_5; lean_object* x_6; +x_4 = lean_unbox(x_2); +lean_dec(x_2); +x_5 = l_List_foldr___main___at_Lean_MetavarContext_hasAssignedMVar___spec__2(x_1, x_4, x_3); +x_6 = lean_box(x_5); +return x_6; +} +} +lean_object* l_Lean_AbstractMetavarContext_hasAssignedMVar___main___at_Lean_MetavarContext_hasAssignedMVar___spec__1___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +uint8_t x_3; lean_object* x_4; +x_3 = l_Lean_AbstractMetavarContext_hasAssignedMVar___main___at_Lean_MetavarContext_hasAssignedMVar___spec__1(x_1, x_2); +x_4 = lean_box(x_3); +return x_4; +} +} +lean_object* l_Lean_MetavarContext_hasAssignedMVar___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +uint8_t x_3; lean_object* x_4; +x_3 = l_Lean_MetavarContext_hasAssignedMVar(x_1, x_2); +x_4 = lean_box(x_3); +return x_4; +} +} +lean_object* l_Lean_AbstractMetavarContext_instantiateLevelMVars___main___at_Lean_MetavarContext_instantiateLevelMVars___spec__1(lean_object* x_1, lean_object* x_2) { +_start: +{ +switch (lean_obj_tag(x_1)) { +case 1: +{ +lean_object* x_3; lean_object* x_4; uint8_t x_5; +x_3 = lean_ctor_get(x_1, 0); +lean_inc(x_3); +x_4 = l_Lean_AbstractMetavarContext_instantiateLevelMVars___main___at_Lean_MetavarContext_instantiateLevelMVars___spec__1(x_3, x_2); +x_5 = !lean_is_exclusive(x_4); +if (x_5 == 0) +{ +lean_object* x_6; lean_object* x_7; +x_6 = lean_ctor_get(x_4, 0); +x_7 = lean_level_update_succ(x_1, x_6); +lean_ctor_set(x_4, 0, x_7); +return x_4; +} +else +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_8 = lean_ctor_get(x_4, 0); +x_9 = lean_ctor_get(x_4, 1); +lean_inc(x_9); +lean_inc(x_8); +lean_dec(x_4); +x_10 = lean_level_update_succ(x_1, x_8); +x_11 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_11, 0, x_10); +lean_ctor_set(x_11, 1, x_9); +return x_11; +} +} +case 2: +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18; +x_12 = lean_ctor_get(x_1, 0); +lean_inc(x_12); +x_13 = lean_ctor_get(x_1, 1); +lean_inc(x_13); +x_14 = l_Lean_AbstractMetavarContext_instantiateLevelMVars___main___at_Lean_MetavarContext_instantiateLevelMVars___spec__1(x_12, x_2); +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 = l_Lean_AbstractMetavarContext_instantiateLevelMVars___main___at_Lean_MetavarContext_instantiateLevelMVars___spec__1(x_13, x_16); +x_18 = !lean_is_exclusive(x_17); +if (x_18 == 0) +{ +lean_object* x_19; lean_object* x_20; +x_19 = lean_ctor_get(x_17, 0); +x_20 = lean_level_update_max(x_1, x_15, x_19); +lean_ctor_set(x_17, 0, x_20); +return x_17; +} +else +{ +lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_21 = lean_ctor_get(x_17, 0); +x_22 = lean_ctor_get(x_17, 1); +lean_inc(x_22); +lean_inc(x_21); +lean_dec(x_17); +x_23 = lean_level_update_max(x_1, x_15, x_21); +x_24 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_24, 0, x_23); +lean_ctor_set(x_24, 1, x_22); +return x_24; +} +} +case 3: +{ +lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; uint8_t x_30; +x_25 = lean_ctor_get(x_1, 0); +lean_inc(x_25); +x_26 = lean_ctor_get(x_1, 1); +lean_inc(x_26); +lean_dec(x_1); +x_27 = l_Lean_AbstractMetavarContext_instantiateLevelMVars___main___at_Lean_MetavarContext_instantiateLevelMVars___spec__1(x_25, x_2); +x_28 = lean_ctor_get(x_27, 1); +lean_inc(x_28); +lean_dec(x_27); +x_29 = l_Lean_AbstractMetavarContext_instantiateLevelMVars___main___at_Lean_MetavarContext_instantiateLevelMVars___spec__1(x_26, x_28); +x_30 = !lean_is_exclusive(x_29); +if (x_30 == 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; +x_31 = lean_ctor_get(x_29, 0); +lean_dec(x_31); +x_32 = l_Lean_Level_updateSucc_x21___closed__1; +x_33 = lean_unsigned_to_nat(218u); +x_34 = lean_unsigned_to_nat(17u); +x_35 = l_Lean_Level_updateIMax_x21___closed__1; +x_36 = l_panicWithPos___at_Lean_Level_updateSucc_x21___spec__1(x_32, x_33, x_34, x_35); +lean_ctor_set(x_29, 0, x_36); +return x_29; +} +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; +x_37 = lean_ctor_get(x_29, 1); +lean_inc(x_37); +lean_dec(x_29); +x_38 = l_Lean_Level_updateSucc_x21___closed__1; +x_39 = lean_unsigned_to_nat(218u); +x_40 = lean_unsigned_to_nat(17u); +x_41 = l_Lean_Level_updateIMax_x21___closed__1; +x_42 = l_panicWithPos___at_Lean_Level_updateSucc_x21___spec__1(x_38, x_39, x_40, x_41); +x_43 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_43, 0, x_42); +lean_ctor_set(x_43, 1, x_37); +return x_43; +} +} +case 5: +{ +lean_object* x_44; lean_object* x_45; +x_44 = lean_ctor_get(x_1, 0); +lean_inc(x_44); +lean_inc(x_44); +lean_inc(x_2); +x_45 = lean_metavar_ctx_get_level_assignment(x_2, x_44); +if (lean_obj_tag(x_45) == 0) +{ +lean_object* x_46; +lean_dec(x_44); +x_46 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_46, 0, x_1); +lean_ctor_set(x_46, 1, x_2); +return x_46; +} +else +{ +lean_object* x_47; uint8_t x_48; +lean_dec(x_1); +x_47 = lean_ctor_get(x_45, 0); +lean_inc(x_47); +lean_dec(x_45); +lean_inc(x_47); +x_48 = lean_level_has_mvar(x_47); +if (x_48 == 0) +{ +lean_object* x_49; +lean_dec(x_44); +x_49 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_49, 0, x_47); +lean_ctor_set(x_49, 1, x_2); +return x_49; +} +else +{ +lean_object* x_50; uint8_t x_51; +x_50 = l_Lean_AbstractMetavarContext_instantiateLevelMVars___main___at_Lean_MetavarContext_instantiateLevelMVars___spec__1(x_47, x_2); +x_51 = !lean_is_exclusive(x_50); +if (x_51 == 0) +{ +lean_object* x_52; lean_object* x_53; lean_object* x_54; +x_52 = lean_ctor_get(x_50, 0); +x_53 = lean_ctor_get(x_50, 1); +lean_inc(x_52); +x_54 = lean_metavar_ctx_assign_level(x_53, x_44, x_52); +lean_ctor_set(x_50, 1, x_54); +return x_50; +} +else +{ +lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; +x_55 = lean_ctor_get(x_50, 0); +x_56 = lean_ctor_get(x_50, 1); +lean_inc(x_56); +lean_inc(x_55); +lean_dec(x_50); +lean_inc(x_55); +x_57 = lean_metavar_ctx_assign_level(x_56, x_44, x_55); +x_58 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_58, 0, x_55); +lean_ctor_set(x_58, 1, x_57); +return x_58; +} +} +} +} +default: +{ +lean_object* x_59; +x_59 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_59, 0, x_1); +lean_ctor_set(x_59, 1, x_2); +return x_59; +} +} +} +} +lean_object* l_Lean_MetavarContext_instantiateLevelMVars(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_Lean_AbstractMetavarContext_instantiateLevelMVars___main___at_Lean_MetavarContext_instantiateLevelMVars___spec__1(x_2, x_1); +return x_3; +} +} +lean_object* l_panicWithPos___at_Lean_MetavarContext_instantiateExprMVars___spec__4(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_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; +x_6 = l_panicWithPos___rarg___closed__1; +x_7 = lean_string_append(x_6, x_1); +x_8 = l_panicWithPos___rarg___closed__2; +x_9 = lean_string_append(x_7, x_8); +x_10 = l_Nat_repr(x_2); +x_11 = lean_string_append(x_9, x_10); +lean_dec(x_10); +x_12 = l_panicWithPos___rarg___closed__2; +x_13 = lean_string_append(x_11, x_12); +x_14 = l_Nat_repr(x_3); +x_15 = lean_string_append(x_13, x_14); +lean_dec(x_14); +x_16 = l_panicWithPos___rarg___closed__3; +x_17 = lean_string_append(x_15, x_16); +x_18 = lean_string_append(x_17, x_4); +x_19 = l_panicWithPos___at_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___spec__1___rarg___closed__2; +x_20 = lean_panic_fn(x_18); +x_21 = lean_apply_1(x_20, x_5); +return x_21; +} +} +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___at_Lean_MetavarContext_instantiateExprMVars___spec__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; uint8_t x_7; +x_6 = lean_unsigned_to_nat(0u); +x_7 = lean_nat_dec_eq(x_3, 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_unsigned_to_nat(1u); +x_9 = lean_nat_sub(x_3, x_8); +lean_dec(x_3); +x_10 = l_Lean_exprIsInhabited; +x_11 = lean_array_get(x_10, x_2, x_9); +lean_inc(x_1); +x_12 = l_Lean_LocalContext_findFVar(x_1, x_11); +if (lean_obj_tag(x_12) == 0) +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; +lean_dec(x_9); +lean_dec(x_4); +lean_dec(x_1); +x_13 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___rarg___closed__1; +x_14 = lean_unsigned_to_nat(134u); +x_15 = lean_unsigned_to_nat(12u); +x_16 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___rarg___closed__2; +x_17 = l_panicWithPos___at_Lean_MetavarContext_instantiateExprMVars___spec__4(x_13, x_14, x_15, x_16, x_5); +return x_17; +} +else +{ +lean_object* x_18; +x_18 = lean_ctor_get(x_12, 0); +lean_inc(x_18); +lean_dec(x_12); +if (lean_obj_tag(x_18) == 0) +{ +lean_object* x_19; lean_object* x_20; uint8_t x_21; lean_object* x_22; lean_object* x_23; uint8_t x_34; +x_19 = lean_ctor_get(x_18, 2); +lean_inc(x_19); +x_20 = lean_ctor_get(x_18, 3); +lean_inc(x_20); +x_21 = lean_ctor_get_uint8(x_18, sizeof(void*)*4); +lean_dec(x_18); +x_34 = lean_expr_has_expr_mvar(x_20); +if (x_34 == 0) +{ +uint8_t x_35; +x_35 = lean_expr_has_level_mvar(x_20); +if (x_35 == 0) +{ +x_22 = x_20; +x_23 = x_5; +goto block_33; +} +else +{ +lean_object* x_36; lean_object* x_37; +x_36 = lean_ctor_get(x_5, 1); +lean_inc(x_36); +x_37 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_36, x_20); +lean_dec(x_36); +if (lean_obj_tag(x_37) == 0) +{ +lean_object* x_38; lean_object* x_39; lean_object* x_40; uint8_t x_41; +lean_inc(x_20); +x_38 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_20, x_5); +x_39 = lean_ctor_get(x_38, 1); +lean_inc(x_39); +x_40 = lean_ctor_get(x_38, 0); +lean_inc(x_40); +lean_dec(x_38); +x_41 = !lean_is_exclusive(x_39); +if (x_41 == 0) +{ +lean_object* x_42; lean_object* x_43; +x_42 = lean_ctor_get(x_39, 1); +lean_inc(x_40); +x_43 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_42, x_20, x_40); +lean_ctor_set(x_39, 1, x_43); +x_22 = x_40; +x_23 = x_39; +goto block_33; +} +else +{ +lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; +x_44 = lean_ctor_get(x_39, 0); +x_45 = lean_ctor_get(x_39, 1); +lean_inc(x_45); +lean_inc(x_44); +lean_dec(x_39); +lean_inc(x_40); +x_46 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_45, x_20, x_40); +x_47 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_47, 0, x_44); +lean_ctor_set(x_47, 1, x_46); +x_22 = x_40; +x_23 = x_47; +goto block_33; +} +} +else +{ +lean_object* x_48; +lean_dec(x_20); +x_48 = lean_ctor_get(x_37, 0); +lean_inc(x_48); +lean_dec(x_37); +x_22 = x_48; +x_23 = x_5; +goto block_33; +} +} +} +else +{ +lean_object* x_49; lean_object* x_50; +x_49 = lean_ctor_get(x_5, 1); +lean_inc(x_49); +x_50 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_49, x_20); +lean_dec(x_49); +if (lean_obj_tag(x_50) == 0) +{ +lean_object* x_51; lean_object* x_52; lean_object* x_53; uint8_t x_54; +lean_inc(x_20); +x_51 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_20, x_5); +x_52 = lean_ctor_get(x_51, 1); +lean_inc(x_52); +x_53 = lean_ctor_get(x_51, 0); +lean_inc(x_53); +lean_dec(x_51); +x_54 = !lean_is_exclusive(x_52); +if (x_54 == 0) +{ +lean_object* x_55; lean_object* x_56; +x_55 = lean_ctor_get(x_52, 1); +lean_inc(x_53); +x_56 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_55, x_20, x_53); +lean_ctor_set(x_52, 1, x_56); +x_22 = x_53; +x_23 = x_52; +goto block_33; +} +else +{ +lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; +x_57 = lean_ctor_get(x_52, 0); +x_58 = lean_ctor_get(x_52, 1); +lean_inc(x_58); +lean_inc(x_57); +lean_dec(x_52); +lean_inc(x_53); +x_59 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_58, x_20, x_53); +x_60 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_60, 0, x_57); +lean_ctor_set(x_60, 1, x_59); +x_22 = x_53; +x_23 = x_60; +goto block_33; +} +} +else +{ +lean_object* x_61; +lean_dec(x_20); +x_61 = lean_ctor_get(x_50, 0); +lean_inc(x_61); +lean_dec(x_50); +x_22 = x_61; +x_23 = x_5; +goto block_33; +} +} +block_33: +{ +uint8_t x_24; +x_24 = lean_expr_has_expr_mvar(x_22); +if (x_24 == 0) +{ +uint8_t x_25; +x_25 = lean_expr_has_level_mvar(x_22); +if (x_25 == 0) +{ +lean_object* x_26; lean_object* x_27; +x_26 = lean_expr_abstract_range(x_22, x_9, x_2); +lean_dec(x_22); +x_27 = lean_expr_mk_lambda(x_19, x_21, x_26, x_4); +x_3 = x_9; +x_4 = x_27; +x_5 = x_23; +goto _start; +} +else +{ +lean_object* x_29; lean_object* x_30; +lean_dec(x_22); +lean_dec(x_19); +lean_dec(x_9); +lean_dec(x_4); +lean_dec(x_1); +x_29 = lean_box(0); +x_30 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_30, 0, x_29); +lean_ctor_set(x_30, 1, x_23); +return x_30; +} +} +else +{ +lean_object* x_31; lean_object* x_32; +lean_dec(x_22); +lean_dec(x_19); +lean_dec(x_9); +lean_dec(x_4); +lean_dec(x_1); +x_31 = lean_box(0); +x_32 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_32, 0, x_31); +lean_ctor_set(x_32, 1, x_23); +return x_32; +} +} +} +else +{ +lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; uint8_t x_115; +x_62 = lean_ctor_get(x_18, 2); +lean_inc(x_62); +x_63 = lean_ctor_get(x_18, 3); +lean_inc(x_63); +x_64 = lean_ctor_get(x_18, 4); +lean_inc(x_64); +lean_dec(x_18); +x_115 = lean_expr_has_expr_mvar(x_63); +if (x_115 == 0) +{ +uint8_t x_116; +x_116 = lean_expr_has_level_mvar(x_63); +if (x_116 == 0) +{ +x_65 = x_63; +x_66 = x_5; +goto block_114; +} +else +{ +lean_object* x_117; lean_object* x_118; +x_117 = lean_ctor_get(x_5, 1); +lean_inc(x_117); +x_118 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_117, x_63); +lean_dec(x_117); +if (lean_obj_tag(x_118) == 0) +{ +lean_object* x_119; lean_object* x_120; lean_object* x_121; uint8_t x_122; +lean_inc(x_63); +x_119 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_63, x_5); +x_120 = lean_ctor_get(x_119, 1); +lean_inc(x_120); +x_121 = lean_ctor_get(x_119, 0); +lean_inc(x_121); +lean_dec(x_119); +x_122 = !lean_is_exclusive(x_120); +if (x_122 == 0) +{ +lean_object* x_123; lean_object* x_124; +x_123 = lean_ctor_get(x_120, 1); +lean_inc(x_121); +x_124 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_123, x_63, x_121); +lean_ctor_set(x_120, 1, x_124); +x_65 = x_121; +x_66 = x_120; +goto block_114; +} +else +{ +lean_object* x_125; lean_object* x_126; lean_object* x_127; lean_object* x_128; +x_125 = lean_ctor_get(x_120, 0); +x_126 = lean_ctor_get(x_120, 1); +lean_inc(x_126); +lean_inc(x_125); +lean_dec(x_120); +lean_inc(x_121); +x_127 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_126, x_63, x_121); +x_128 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_128, 0, x_125); +lean_ctor_set(x_128, 1, x_127); +x_65 = x_121; +x_66 = x_128; +goto block_114; +} +} +else +{ +lean_object* x_129; +lean_dec(x_63); +x_129 = lean_ctor_get(x_118, 0); +lean_inc(x_129); +lean_dec(x_118); +x_65 = x_129; +x_66 = x_5; +goto block_114; +} +} +} +else +{ +lean_object* x_130; lean_object* x_131; +x_130 = lean_ctor_get(x_5, 1); +lean_inc(x_130); +x_131 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_130, x_63); +lean_dec(x_130); +if (lean_obj_tag(x_131) == 0) +{ +lean_object* x_132; lean_object* x_133; lean_object* x_134; uint8_t x_135; +lean_inc(x_63); +x_132 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_63, x_5); +x_133 = lean_ctor_get(x_132, 1); +lean_inc(x_133); +x_134 = lean_ctor_get(x_132, 0); +lean_inc(x_134); +lean_dec(x_132); +x_135 = !lean_is_exclusive(x_133); +if (x_135 == 0) +{ +lean_object* x_136; lean_object* x_137; +x_136 = lean_ctor_get(x_133, 1); +lean_inc(x_134); +x_137 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_136, x_63, x_134); +lean_ctor_set(x_133, 1, x_137); +x_65 = x_134; +x_66 = x_133; +goto block_114; +} +else +{ +lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; +x_138 = lean_ctor_get(x_133, 0); +x_139 = lean_ctor_get(x_133, 1); +lean_inc(x_139); +lean_inc(x_138); +lean_dec(x_133); +lean_inc(x_134); +x_140 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_139, x_63, x_134); +x_141 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_141, 0, x_138); +lean_ctor_set(x_141, 1, x_140); +x_65 = x_134; +x_66 = x_141; +goto block_114; +} +} +else +{ +lean_object* x_142; +lean_dec(x_63); +x_142 = lean_ctor_get(x_131, 0); +lean_inc(x_142); +lean_dec(x_131); +x_65 = x_142; +x_66 = x_5; +goto block_114; +} +} +block_114: +{ +lean_object* x_67; lean_object* x_68; uint8_t x_80; +x_80 = lean_expr_has_expr_mvar(x_65); +if (x_80 == 0) +{ +uint8_t x_81; +x_81 = lean_expr_has_level_mvar(x_65); +if (x_81 == 0) +{ +uint8_t x_82; +x_82 = lean_expr_has_expr_mvar(x_64); +if (x_82 == 0) +{ +uint8_t x_83; +x_83 = lean_expr_has_level_mvar(x_64); +if (x_83 == 0) +{ +x_67 = x_64; +x_68 = x_66; +goto block_79; +} +else +{ +lean_object* x_84; lean_object* x_85; +x_84 = lean_ctor_get(x_66, 1); +lean_inc(x_84); +x_85 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_84, x_64); +lean_dec(x_84); +if (lean_obj_tag(x_85) == 0) +{ +lean_object* x_86; lean_object* x_87; lean_object* x_88; uint8_t x_89; +lean_inc(x_64); +x_86 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_64, x_66); +x_87 = lean_ctor_get(x_86, 1); +lean_inc(x_87); +x_88 = lean_ctor_get(x_86, 0); +lean_inc(x_88); +lean_dec(x_86); +x_89 = !lean_is_exclusive(x_87); +if (x_89 == 0) +{ +lean_object* x_90; lean_object* x_91; +x_90 = lean_ctor_get(x_87, 1); +lean_inc(x_88); +x_91 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_90, x_64, x_88); +lean_ctor_set(x_87, 1, x_91); +x_67 = x_88; +x_68 = x_87; +goto block_79; +} +else +{ +lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; +x_92 = lean_ctor_get(x_87, 0); +x_93 = lean_ctor_get(x_87, 1); +lean_inc(x_93); +lean_inc(x_92); +lean_dec(x_87); +lean_inc(x_88); +x_94 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_93, x_64, x_88); +x_95 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_95, 0, x_92); +lean_ctor_set(x_95, 1, x_94); +x_67 = x_88; +x_68 = x_95; +goto block_79; +} +} +else +{ +lean_object* x_96; +lean_dec(x_64); +x_96 = lean_ctor_get(x_85, 0); +lean_inc(x_96); +lean_dec(x_85); +x_67 = x_96; +x_68 = x_66; +goto block_79; +} +} +} +else +{ +lean_object* x_97; lean_object* x_98; +x_97 = lean_ctor_get(x_66, 1); +lean_inc(x_97); +x_98 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_97, x_64); +lean_dec(x_97); +if (lean_obj_tag(x_98) == 0) +{ +lean_object* x_99; lean_object* x_100; lean_object* x_101; uint8_t x_102; +lean_inc(x_64); +x_99 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_64, x_66); +x_100 = lean_ctor_get(x_99, 1); +lean_inc(x_100); +x_101 = lean_ctor_get(x_99, 0); +lean_inc(x_101); +lean_dec(x_99); +x_102 = !lean_is_exclusive(x_100); +if (x_102 == 0) +{ +lean_object* x_103; lean_object* x_104; +x_103 = lean_ctor_get(x_100, 1); +lean_inc(x_101); +x_104 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_103, x_64, x_101); +lean_ctor_set(x_100, 1, x_104); +x_67 = x_101; +x_68 = x_100; +goto block_79; +} +else +{ +lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; +x_105 = lean_ctor_get(x_100, 0); +x_106 = lean_ctor_get(x_100, 1); +lean_inc(x_106); +lean_inc(x_105); +lean_dec(x_100); +lean_inc(x_101); +x_107 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_106, x_64, x_101); +x_108 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_108, 0, x_105); +lean_ctor_set(x_108, 1, x_107); +x_67 = x_101; +x_68 = x_108; +goto block_79; +} +} +else +{ +lean_object* x_109; +lean_dec(x_64); +x_109 = lean_ctor_get(x_98, 0); +lean_inc(x_109); +lean_dec(x_98); +x_67 = x_109; +x_68 = x_66; +goto block_79; +} +} +} +else +{ +lean_object* x_110; lean_object* x_111; +lean_dec(x_65); +lean_dec(x_64); +lean_dec(x_62); +lean_dec(x_9); +lean_dec(x_4); +lean_dec(x_1); +x_110 = lean_box(0); +x_111 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_111, 0, x_110); +lean_ctor_set(x_111, 1, x_66); +return x_111; +} +} +else +{ +lean_object* x_112; lean_object* x_113; +lean_dec(x_65); +lean_dec(x_64); +lean_dec(x_62); +lean_dec(x_9); +lean_dec(x_4); +lean_dec(x_1); +x_112 = lean_box(0); +x_113 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_113, 0, x_112); +lean_ctor_set(x_113, 1, x_66); +return x_113; +} +block_79: +{ +uint8_t x_69; +x_69 = lean_expr_has_expr_mvar(x_67); +if (x_69 == 0) +{ +uint8_t x_70; +x_70 = lean_expr_has_level_mvar(x_67); +if (x_70 == 0) +{ +lean_object* x_71; lean_object* x_72; lean_object* x_73; +x_71 = lean_expr_abstract_range(x_65, x_9, x_2); +lean_dec(x_65); +x_72 = lean_expr_abstract_range(x_67, x_9, x_2); +lean_dec(x_67); +x_73 = lean_expr_mk_let(x_62, x_71, x_72, x_4); +x_3 = x_9; +x_4 = x_73; +x_5 = x_68; +goto _start; +} +else +{ +lean_object* x_75; lean_object* x_76; +lean_dec(x_67); +lean_dec(x_65); +lean_dec(x_62); +lean_dec(x_9); +lean_dec(x_4); +lean_dec(x_1); +x_75 = lean_box(0); +x_76 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_76, 0, x_75); +lean_ctor_set(x_76, 1, x_68); +return x_76; +} +} +else +{ +lean_object* x_77; lean_object* x_78; +lean_dec(x_67); +lean_dec(x_65); +lean_dec(x_62); +lean_dec(x_9); +lean_dec(x_4); +lean_dec(x_1); +x_77 = lean_box(0); +x_78 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_78, 0, x_77); +lean_ctor_set(x_78, 1, x_68); +return x_78; +} +} +} +} +} +} +else +{ +lean_object* x_143; lean_object* x_144; +lean_dec(x_3); +lean_dec(x_1); +x_143 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_143, 0, x_4); +x_144 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_144, 0, x_143); +lean_ctor_set(x_144, 1, x_5); +return x_144; +} +} +} +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateLevelMVars___at_Lean_MetavarContext_instantiateExprMVars___spec__5(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; uint8_t x_6; +x_4 = lean_ctor_get(x_2, 0); +x_5 = l_Lean_AbstractMetavarContext_instantiateLevelMVars___main___at_Lean_MetavarContext_instantiateLevelMVars___spec__1(x_1, x_4); +x_6 = !lean_is_exclusive(x_5); +if (x_6 == 0) +{ +lean_object* x_7; +x_7 = lean_ctor_get(x_5, 1); +lean_ctor_set(x_2, 0, x_7); +lean_ctor_set(x_5, 1, x_2); +return x_5; +} +else +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_8 = lean_ctor_get(x_5, 0); +x_9 = lean_ctor_get(x_5, 1); +lean_inc(x_9); +lean_inc(x_8); +lean_dec(x_5); +lean_ctor_set(x_2, 0, x_9); +x_10 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_10, 0, x_8); +lean_ctor_set(x_10, 1, x_2); +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; +x_11 = lean_ctor_get(x_2, 0); +x_12 = lean_ctor_get(x_2, 1); +lean_inc(x_12); +lean_inc(x_11); +lean_dec(x_2); +x_13 = l_Lean_AbstractMetavarContext_instantiateLevelMVars___main___at_Lean_MetavarContext_instantiateLevelMVars___spec__1(x_1, x_11); +x_14 = lean_ctor_get(x_13, 0); +lean_inc(x_14); +x_15 = lean_ctor_get(x_13, 1); +lean_inc(x_15); +if (lean_is_exclusive(x_13)) { + lean_ctor_release(x_13, 0); + lean_ctor_release(x_13, 1); + x_16 = x_13; +} else { + lean_dec_ref(x_13); + x_16 = lean_box(0); +} +x_17 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_17, 0, x_15); +lean_ctor_set(x_17, 1, x_12); +if (lean_is_scalar(x_16)) { + x_18 = lean_alloc_ctor(0, 2, 0); +} else { + x_18 = x_16; +} +lean_ctor_set(x_18, 0, x_14); +lean_ctor_set(x_18, 1, x_17); +return x_18; +} +} +} +lean_object* l_List_mmap___main___at_Lean_MetavarContext_instantiateExprMVars___spec__6(lean_object* x_1, lean_object* x_2) { +_start: +{ +if (lean_obj_tag(x_1) == 0) +{ +lean_object* x_3; lean_object* x_4; +x_3 = lean_box(0); +x_4 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_4, 0, x_3); +lean_ctor_set(x_4, 1, x_2); +return x_4; +} +else +{ +uint8_t x_5; +x_5 = !lean_is_exclusive(x_1); +if (x_5 == 0) +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12; +x_6 = lean_ctor_get(x_1, 0); +x_7 = lean_ctor_get(x_1, 1); +x_8 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateLevelMVars___at_Lean_MetavarContext_instantiateExprMVars___spec__5(x_6, x_2); +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); +x_11 = l_List_mmap___main___at_Lean_MetavarContext_instantiateExprMVars___spec__6(x_7, x_10); +x_12 = !lean_is_exclusive(x_11); +if (x_12 == 0) +{ +lean_object* x_13; +x_13 = lean_ctor_get(x_11, 0); +lean_ctor_set(x_1, 1, x_13); +lean_ctor_set(x_1, 0, x_9); +lean_ctor_set(x_11, 0, x_1); +return x_11; +} +else +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_14 = lean_ctor_get(x_11, 0); +x_15 = lean_ctor_get(x_11, 1); +lean_inc(x_15); +lean_inc(x_14); +lean_dec(x_11); +lean_ctor_set(x_1, 1, x_14); +lean_ctor_set(x_1, 0, x_9); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_1); +lean_ctor_set(x_16, 1, 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; lean_object* x_25; lean_object* x_26; lean_object* x_27; +x_17 = lean_ctor_get(x_1, 0); +x_18 = lean_ctor_get(x_1, 1); +lean_inc(x_18); +lean_inc(x_17); +lean_dec(x_1); +x_19 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateLevelMVars___at_Lean_MetavarContext_instantiateExprMVars___spec__5(x_17, x_2); +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 = l_List_mmap___main___at_Lean_MetavarContext_instantiateExprMVars___spec__6(x_18, x_21); +x_23 = lean_ctor_get(x_22, 0); +lean_inc(x_23); +x_24 = lean_ctor_get(x_22, 1); +lean_inc(x_24); +if (lean_is_exclusive(x_22)) { + lean_ctor_release(x_22, 0); + lean_ctor_release(x_22, 1); + x_25 = x_22; +} else { + lean_dec_ref(x_22); + x_25 = lean_box(0); +} +x_26 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_26, 0, x_20); +lean_ctor_set(x_26, 1, x_23); +if (lean_is_scalar(x_25)) { + x_27 = lean_alloc_ctor(0, 2, 0); +} else { + x_27 = x_25; +} +lean_ctor_set(x_27, 0, x_26); +lean_ctor_set(x_27, 1, x_24); +return x_27; +} +} +} +} +lean_object* l_Array_ummapAux___main___at_Lean_MetavarContext_instantiateExprMVars___spec__7(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; uint8_t x_5; +x_4 = lean_array_get_size(x_2); +x_5 = lean_nat_dec_lt(x_1, x_4); +lean_dec(x_4); +if (x_5 == 0) +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; +lean_dec(x_1); +x_6 = l_Array_empty___closed__1; +x_7 = x_2; +x_8 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_8, 0, x_7); +lean_ctor_set(x_8, 1, x_3); +return x_8; +} +else +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; +x_9 = lean_array_fget(x_2, x_1); +x_10 = lean_box(0); +lean_inc(x_9); +x_11 = x_10; +x_12 = lean_array_fset(x_2, x_1, x_11); +x_13 = lean_expr_has_expr_mvar(x_9); +if (x_13 == 0) +{ +uint8_t x_14; +x_14 = lean_expr_has_level_mvar(x_9); +if (x_14 == 0) +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_15 = lean_unsigned_to_nat(1u); +x_16 = lean_nat_add(x_1, x_15); +lean_inc(x_9); +x_17 = x_9; +x_18 = lean_array_fset(x_12, x_1, x_17); +lean_dec(x_1); +x_1 = x_16; +x_2 = x_18; +goto _start; +} +else +{ +lean_object* x_20; lean_object* x_21; +x_20 = lean_ctor_get(x_3, 1); +lean_inc(x_20); +x_21 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_20, x_9); +lean_dec(x_20); +if (lean_obj_tag(x_21) == 0) +{ +lean_object* x_22; lean_object* x_23; lean_object* x_24; uint8_t x_25; +lean_inc(x_9); +x_22 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_9, x_3); +x_23 = lean_ctor_get(x_22, 1); +lean_inc(x_23); +x_24 = lean_ctor_get(x_22, 0); +lean_inc(x_24); +lean_dec(x_22); +x_25 = !lean_is_exclusive(x_23); +if (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; +x_26 = lean_ctor_get(x_23, 1); +lean_inc(x_24); +lean_inc(x_9); +x_27 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_26, x_9, x_24); +lean_ctor_set(x_23, 1, x_27); +x_28 = lean_unsigned_to_nat(1u); +x_29 = lean_nat_add(x_1, x_28); +x_30 = x_24; +x_31 = lean_array_fset(x_12, x_1, x_30); +lean_dec(x_1); +x_1 = x_29; +x_2 = x_31; +x_3 = x_23; +goto _start; +} +else +{ +lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; +x_33 = lean_ctor_get(x_23, 0); +x_34 = lean_ctor_get(x_23, 1); +lean_inc(x_34); +lean_inc(x_33); +lean_dec(x_23); +lean_inc(x_24); +lean_inc(x_9); +x_35 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_34, x_9, x_24); +x_36 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_36, 0, x_33); +lean_ctor_set(x_36, 1, x_35); +x_37 = lean_unsigned_to_nat(1u); +x_38 = lean_nat_add(x_1, x_37); +x_39 = x_24; +x_40 = lean_array_fset(x_12, x_1, x_39); +lean_dec(x_1); +x_1 = x_38; +x_2 = x_40; +x_3 = x_36; +goto _start; +} +} +else +{ +lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; +x_42 = lean_ctor_get(x_21, 0); +lean_inc(x_42); +lean_dec(x_21); +x_43 = lean_unsigned_to_nat(1u); +x_44 = lean_nat_add(x_1, x_43); +x_45 = x_42; +x_46 = lean_array_fset(x_12, x_1, x_45); +lean_dec(x_1); +x_1 = x_44; +x_2 = x_46; +goto _start; +} +} +} +else +{ +lean_object* x_48; lean_object* x_49; +x_48 = lean_ctor_get(x_3, 1); +lean_inc(x_48); +x_49 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_48, x_9); +lean_dec(x_48); +if (lean_obj_tag(x_49) == 0) +{ +lean_object* x_50; lean_object* x_51; lean_object* x_52; uint8_t x_53; +lean_inc(x_9); +x_50 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_9, x_3); +x_51 = lean_ctor_get(x_50, 1); +lean_inc(x_51); +x_52 = lean_ctor_get(x_50, 0); +lean_inc(x_52); +lean_dec(x_50); +x_53 = !lean_is_exclusive(x_51); +if (x_53 == 0) +{ +lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; +x_54 = lean_ctor_get(x_51, 1); +lean_inc(x_52); +lean_inc(x_9); +x_55 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_54, x_9, x_52); +lean_ctor_set(x_51, 1, x_55); +x_56 = lean_unsigned_to_nat(1u); +x_57 = lean_nat_add(x_1, x_56); +x_58 = x_52; +x_59 = lean_array_fset(x_12, x_1, x_58); +lean_dec(x_1); +x_1 = x_57; +x_2 = x_59; +x_3 = x_51; +goto _start; +} +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; +x_61 = lean_ctor_get(x_51, 0); +x_62 = lean_ctor_get(x_51, 1); +lean_inc(x_62); +lean_inc(x_61); +lean_dec(x_51); +lean_inc(x_52); +lean_inc(x_9); +x_63 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_62, x_9, x_52); +x_64 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_64, 0, x_61); +lean_ctor_set(x_64, 1, x_63); +x_65 = lean_unsigned_to_nat(1u); +x_66 = lean_nat_add(x_1, x_65); +x_67 = x_52; +x_68 = lean_array_fset(x_12, x_1, x_67); +lean_dec(x_1); +x_1 = x_66; +x_2 = x_68; +x_3 = x_64; +goto _start; +} +} +else +{ +lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; +x_70 = lean_ctor_get(x_49, 0); +lean_inc(x_70); +lean_dec(x_49); +x_71 = lean_unsigned_to_nat(1u); +x_72 = lean_nat_add(x_1, x_71); +x_73 = x_70; +x_74 = lean_array_fset(x_12, x_1, x_73); +lean_dec(x_1); +x_1 = x_72; +x_2 = x_74; +goto _start; +} +} +} +} +} +lean_object* l___private_Init_Lean_Expr_3__withAppRevAux___main___at_Lean_MetavarContext_instantiateExprMVars___spec__8(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +switch (lean_obj_tag(x_1)) { +case 0: +{ +uint8_t x_4; lean_object* x_5; lean_object* x_6; uint8_t x_74; +x_4 = l_Lean_Expr_isMVar(x_1); +x_74 = lean_expr_has_expr_mvar(x_1); +if (x_74 == 0) +{ +uint8_t x_75; +x_75 = lean_expr_has_level_mvar(x_1); +if (x_75 == 0) +{ +x_5 = x_1; +x_6 = x_3; +goto block_73; +} +else +{ +lean_object* x_76; lean_object* x_77; +x_76 = lean_ctor_get(x_3, 1); +lean_inc(x_76); +x_77 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_76, x_1); +lean_dec(x_76); +if (lean_obj_tag(x_77) == 0) +{ +lean_object* x_78; lean_object* x_79; lean_object* x_80; uint8_t x_81; +lean_inc(x_1); +x_78 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_1, x_3); +x_79 = lean_ctor_get(x_78, 1); +lean_inc(x_79); +x_80 = lean_ctor_get(x_78, 0); +lean_inc(x_80); +lean_dec(x_78); +x_81 = !lean_is_exclusive(x_79); +if (x_81 == 0) +{ +lean_object* x_82; lean_object* x_83; +x_82 = lean_ctor_get(x_79, 1); +lean_inc(x_80); +x_83 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_82, x_1, x_80); +lean_ctor_set(x_79, 1, x_83); +x_5 = x_80; +x_6 = x_79; +goto block_73; +} +else +{ +lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; +x_84 = lean_ctor_get(x_79, 0); +x_85 = lean_ctor_get(x_79, 1); +lean_inc(x_85); +lean_inc(x_84); +lean_dec(x_79); +lean_inc(x_80); +x_86 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_85, x_1, x_80); +x_87 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_87, 0, x_84); +lean_ctor_set(x_87, 1, x_86); +x_5 = x_80; +x_6 = x_87; +goto block_73; +} +} +else +{ +lean_object* x_88; +lean_dec(x_1); +x_88 = lean_ctor_get(x_77, 0); +lean_inc(x_88); +lean_dec(x_77); +x_5 = x_88; +x_6 = x_3; +goto block_73; +} +} +} +else +{ +lean_object* x_89; lean_object* x_90; +x_89 = lean_ctor_get(x_3, 1); +lean_inc(x_89); +x_90 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_89, x_1); +lean_dec(x_89); +if (lean_obj_tag(x_90) == 0) +{ +lean_object* x_91; lean_object* x_92; lean_object* x_93; uint8_t x_94; +lean_inc(x_1); +x_91 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_1, x_3); +x_92 = lean_ctor_get(x_91, 1); +lean_inc(x_92); +x_93 = lean_ctor_get(x_91, 0); +lean_inc(x_93); +lean_dec(x_91); +x_94 = !lean_is_exclusive(x_92); +if (x_94 == 0) +{ +lean_object* x_95; lean_object* x_96; +x_95 = lean_ctor_get(x_92, 1); +lean_inc(x_93); +x_96 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_95, x_1, x_93); +lean_ctor_set(x_92, 1, x_96); +x_5 = x_93; +x_6 = x_92; +goto block_73; +} +else +{ +lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; +x_97 = lean_ctor_get(x_92, 0); +x_98 = lean_ctor_get(x_92, 1); +lean_inc(x_98); +lean_inc(x_97); +lean_dec(x_92); +lean_inc(x_93); +x_99 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_98, x_1, x_93); +x_100 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_100, 0, x_97); +lean_ctor_set(x_100, 1, x_99); +x_5 = x_93; +x_6 = x_100; +goto block_73; +} +} +else +{ +lean_object* x_101; +lean_dec(x_1); +x_101 = lean_ctor_get(x_90, 0); +lean_inc(x_101); +lean_dec(x_90); +x_5 = x_101; +x_6 = x_3; +goto block_73; +} +} +block_73: +{ +lean_object* x_7; +if (x_4 == 0) +{ +lean_object* x_18; +x_18 = lean_box(0); +x_7 = x_18; +goto block_17; +} +else +{ +uint8_t x_19; +x_19 = l_Lean_Expr_isLambda(x_5); +if (x_19 == 0) +{ +lean_object* x_20; +x_20 = lean_box(0); +x_7 = x_20; +goto block_17; +} +else +{ +lean_object* x_21; uint8_t x_22; +x_21 = l_Lean_Expr_betaRev(x_5, x_2); +lean_dec(x_5); +x_22 = lean_expr_has_expr_mvar(x_21); +if (x_22 == 0) +{ +uint8_t x_23; +x_23 = lean_expr_has_level_mvar(x_21); +if (x_23 == 0) +{ +lean_object* x_24; +x_24 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_24, 0, x_21); +lean_ctor_set(x_24, 1, x_6); +return x_24; +} +else +{ +lean_object* x_25; lean_object* x_26; +x_25 = lean_ctor_get(x_6, 1); +lean_inc(x_25); +x_26 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_25, x_21); +lean_dec(x_25); +if (lean_obj_tag(x_26) == 0) +{ +lean_object* x_27; uint8_t x_28; +lean_inc(x_21); +x_27 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_21, x_6); +x_28 = !lean_is_exclusive(x_27); +if (x_28 == 0) +{ +lean_object* x_29; uint8_t x_30; +x_29 = lean_ctor_get(x_27, 1); +x_30 = !lean_is_exclusive(x_29); +if (x_30 == 0) +{ +lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_31 = lean_ctor_get(x_27, 0); +x_32 = lean_ctor_get(x_29, 1); +lean_inc(x_31); +x_33 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_32, x_21, x_31); +lean_ctor_set(x_29, 1, x_33); +return x_27; +} +else +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; +x_34 = lean_ctor_get(x_27, 0); +x_35 = lean_ctor_get(x_29, 0); +x_36 = lean_ctor_get(x_29, 1); +lean_inc(x_36); +lean_inc(x_35); +lean_dec(x_29); +lean_inc(x_34); +x_37 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_36, x_21, x_34); +x_38 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_38, 0, x_35); +lean_ctor_set(x_38, 1, x_37); +lean_ctor_set(x_27, 1, x_38); +return x_27; +} +} +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; +x_39 = lean_ctor_get(x_27, 1); +x_40 = lean_ctor_get(x_27, 0); +lean_inc(x_39); +lean_inc(x_40); +lean_dec(x_27); +x_41 = lean_ctor_get(x_39, 0); +lean_inc(x_41); +x_42 = lean_ctor_get(x_39, 1); +lean_inc(x_42); +if (lean_is_exclusive(x_39)) { + lean_ctor_release(x_39, 0); + lean_ctor_release(x_39, 1); + x_43 = x_39; +} else { + lean_dec_ref(x_39); + x_43 = lean_box(0); +} +lean_inc(x_40); +x_44 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_42, x_21, x_40); +if (lean_is_scalar(x_43)) { + x_45 = lean_alloc_ctor(0, 2, 0); +} else { + x_45 = x_43; +} +lean_ctor_set(x_45, 0, x_41); +lean_ctor_set(x_45, 1, x_44); +x_46 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_46, 0, x_40); +lean_ctor_set(x_46, 1, x_45); +return x_46; +} +} +else +{ +lean_object* x_47; lean_object* x_48; +lean_dec(x_21); +x_47 = lean_ctor_get(x_26, 0); +lean_inc(x_47); +lean_dec(x_26); +x_48 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_48, 0, x_47); +lean_ctor_set(x_48, 1, x_6); +return x_48; +} +} +} +else +{ +lean_object* x_49; lean_object* x_50; +x_49 = lean_ctor_get(x_6, 1); +lean_inc(x_49); +x_50 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_49, x_21); +lean_dec(x_49); +if (lean_obj_tag(x_50) == 0) +{ +lean_object* x_51; uint8_t x_52; +lean_inc(x_21); +x_51 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_21, x_6); +x_52 = !lean_is_exclusive(x_51); +if (x_52 == 0) +{ +lean_object* x_53; uint8_t x_54; +x_53 = lean_ctor_get(x_51, 1); +x_54 = !lean_is_exclusive(x_53); +if (x_54 == 0) +{ +lean_object* x_55; lean_object* x_56; lean_object* x_57; +x_55 = lean_ctor_get(x_51, 0); +x_56 = lean_ctor_get(x_53, 1); +lean_inc(x_55); +x_57 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_56, x_21, x_55); +lean_ctor_set(x_53, 1, x_57); +return x_51; +} +else +{ +lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; +x_58 = lean_ctor_get(x_51, 0); +x_59 = lean_ctor_get(x_53, 0); +x_60 = lean_ctor_get(x_53, 1); +lean_inc(x_60); +lean_inc(x_59); +lean_dec(x_53); +lean_inc(x_58); +x_61 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_60, x_21, x_58); +x_62 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_62, 0, x_59); +lean_ctor_set(x_62, 1, x_61); +lean_ctor_set(x_51, 1, x_62); +return x_51; +} +} +else +{ +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_63 = lean_ctor_get(x_51, 1); +x_64 = lean_ctor_get(x_51, 0); +lean_inc(x_63); +lean_inc(x_64); +lean_dec(x_51); +x_65 = lean_ctor_get(x_63, 0); +lean_inc(x_65); +x_66 = lean_ctor_get(x_63, 1); +lean_inc(x_66); +if (lean_is_exclusive(x_63)) { + lean_ctor_release(x_63, 0); + lean_ctor_release(x_63, 1); + x_67 = x_63; +} else { + lean_dec_ref(x_63); + x_67 = lean_box(0); +} +lean_inc(x_64); +x_68 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_66, x_21, x_64); +if (lean_is_scalar(x_67)) { + x_69 = lean_alloc_ctor(0, 2, 0); +} else { + x_69 = x_67; +} +lean_ctor_set(x_69, 0, x_65); +lean_ctor_set(x_69, 1, x_68); +x_70 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_70, 0, x_64); +lean_ctor_set(x_70, 1, x_69); +return x_70; +} +} +else +{ +lean_object* x_71; lean_object* x_72; +lean_dec(x_21); +x_71 = lean_ctor_get(x_50, 0); +lean_inc(x_71); +lean_dec(x_50); +x_72 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_72, 0, x_71); +lean_ctor_set(x_72, 1, x_6); +return x_72; +} +} +} +} +block_17: +{ +lean_object* x_8; lean_object* x_9; uint8_t x_10; +lean_dec(x_7); +x_8 = lean_unsigned_to_nat(0u); +x_9 = l_Array_ummapAux___main___at_Lean_MetavarContext_instantiateExprMVars___spec__7(x_8, x_2, x_6); +x_10 = !lean_is_exclusive(x_9); +if (x_10 == 0) +{ +lean_object* x_11; lean_object* x_12; +x_11 = lean_ctor_get(x_9, 0); +x_12 = l_Lean_mkAppRev(x_5, x_11); +lean_dec(x_11); +lean_ctor_set(x_9, 0, x_12); +return x_9; +} +else +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_13 = lean_ctor_get(x_9, 0); +x_14 = lean_ctor_get(x_9, 1); +lean_inc(x_14); +lean_inc(x_13); +lean_dec(x_9); +x_15 = l_Lean_mkAppRev(x_5, x_13); +lean_dec(x_13); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_15); +lean_ctor_set(x_16, 1, x_14); +return x_16; +} +} +} +} +case 1: +{ +uint8_t x_102; lean_object* x_103; lean_object* x_104; uint8_t x_172; +x_102 = l_Lean_Expr_isMVar(x_1); +x_172 = lean_expr_has_expr_mvar(x_1); +if (x_172 == 0) +{ +uint8_t x_173; +x_173 = lean_expr_has_level_mvar(x_1); +if (x_173 == 0) +{ +x_103 = x_1; +x_104 = x_3; +goto block_171; +} +else +{ +lean_object* x_174; lean_object* x_175; +x_174 = lean_ctor_get(x_3, 1); +lean_inc(x_174); +x_175 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_174, x_1); +lean_dec(x_174); +if (lean_obj_tag(x_175) == 0) +{ +lean_object* x_176; lean_object* x_177; lean_object* x_178; uint8_t x_179; +lean_inc(x_1); +x_176 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_1, x_3); +x_177 = lean_ctor_get(x_176, 1); +lean_inc(x_177); +x_178 = lean_ctor_get(x_176, 0); +lean_inc(x_178); +lean_dec(x_176); +x_179 = !lean_is_exclusive(x_177); +if (x_179 == 0) +{ +lean_object* x_180; lean_object* x_181; +x_180 = lean_ctor_get(x_177, 1); +lean_inc(x_178); +x_181 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_180, x_1, x_178); +lean_ctor_set(x_177, 1, x_181); +x_103 = x_178; +x_104 = x_177; +goto block_171; +} +else +{ +lean_object* x_182; lean_object* x_183; lean_object* x_184; lean_object* x_185; +x_182 = lean_ctor_get(x_177, 0); +x_183 = lean_ctor_get(x_177, 1); +lean_inc(x_183); +lean_inc(x_182); +lean_dec(x_177); +lean_inc(x_178); +x_184 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_183, x_1, x_178); +x_185 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_185, 0, x_182); +lean_ctor_set(x_185, 1, x_184); +x_103 = x_178; +x_104 = x_185; +goto block_171; +} +} +else +{ +lean_object* x_186; +lean_dec(x_1); +x_186 = lean_ctor_get(x_175, 0); +lean_inc(x_186); +lean_dec(x_175); +x_103 = x_186; +x_104 = x_3; +goto block_171; +} +} +} +else +{ +lean_object* x_187; lean_object* x_188; +x_187 = lean_ctor_get(x_3, 1); +lean_inc(x_187); +x_188 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_187, x_1); +lean_dec(x_187); +if (lean_obj_tag(x_188) == 0) +{ +lean_object* x_189; lean_object* x_190; lean_object* x_191; uint8_t x_192; +lean_inc(x_1); +x_189 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_1, x_3); +x_190 = lean_ctor_get(x_189, 1); +lean_inc(x_190); +x_191 = lean_ctor_get(x_189, 0); +lean_inc(x_191); +lean_dec(x_189); +x_192 = !lean_is_exclusive(x_190); +if (x_192 == 0) +{ +lean_object* x_193; lean_object* x_194; +x_193 = lean_ctor_get(x_190, 1); +lean_inc(x_191); +x_194 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_193, x_1, x_191); +lean_ctor_set(x_190, 1, x_194); +x_103 = x_191; +x_104 = x_190; +goto block_171; +} +else +{ +lean_object* x_195; lean_object* x_196; lean_object* x_197; lean_object* x_198; +x_195 = lean_ctor_get(x_190, 0); +x_196 = lean_ctor_get(x_190, 1); +lean_inc(x_196); +lean_inc(x_195); +lean_dec(x_190); +lean_inc(x_191); +x_197 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_196, x_1, x_191); +x_198 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_198, 0, x_195); +lean_ctor_set(x_198, 1, x_197); +x_103 = x_191; +x_104 = x_198; +goto block_171; +} +} +else +{ +lean_object* x_199; +lean_dec(x_1); +x_199 = lean_ctor_get(x_188, 0); +lean_inc(x_199); +lean_dec(x_188); +x_103 = x_199; +x_104 = x_3; +goto block_171; +} +} +block_171: +{ +lean_object* x_105; +if (x_102 == 0) +{ +lean_object* x_116; +x_116 = lean_box(0); +x_105 = x_116; +goto block_115; +} +else +{ +uint8_t x_117; +x_117 = l_Lean_Expr_isLambda(x_103); +if (x_117 == 0) +{ +lean_object* x_118; +x_118 = lean_box(0); +x_105 = x_118; +goto block_115; +} +else +{ +lean_object* x_119; uint8_t x_120; +x_119 = l_Lean_Expr_betaRev(x_103, x_2); +lean_dec(x_103); +x_120 = lean_expr_has_expr_mvar(x_119); +if (x_120 == 0) +{ +uint8_t x_121; +x_121 = lean_expr_has_level_mvar(x_119); +if (x_121 == 0) +{ +lean_object* x_122; +x_122 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_122, 0, x_119); +lean_ctor_set(x_122, 1, x_104); +return x_122; +} +else +{ +lean_object* x_123; lean_object* x_124; +x_123 = lean_ctor_get(x_104, 1); +lean_inc(x_123); +x_124 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_123, x_119); +lean_dec(x_123); +if (lean_obj_tag(x_124) == 0) +{ +lean_object* x_125; uint8_t x_126; +lean_inc(x_119); +x_125 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_119, x_104); +x_126 = !lean_is_exclusive(x_125); +if (x_126 == 0) +{ +lean_object* x_127; uint8_t x_128; +x_127 = lean_ctor_get(x_125, 1); +x_128 = !lean_is_exclusive(x_127); +if (x_128 == 0) +{ +lean_object* x_129; lean_object* x_130; lean_object* x_131; +x_129 = lean_ctor_get(x_125, 0); +x_130 = lean_ctor_get(x_127, 1); +lean_inc(x_129); +x_131 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_130, x_119, x_129); +lean_ctor_set(x_127, 1, x_131); +return x_125; +} +else +{ +lean_object* x_132; lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; +x_132 = lean_ctor_get(x_125, 0); +x_133 = lean_ctor_get(x_127, 0); +x_134 = lean_ctor_get(x_127, 1); +lean_inc(x_134); +lean_inc(x_133); +lean_dec(x_127); +lean_inc(x_132); +x_135 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_134, x_119, x_132); +x_136 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_136, 0, x_133); +lean_ctor_set(x_136, 1, x_135); +lean_ctor_set(x_125, 1, x_136); +return x_125; +} +} +else +{ +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; +x_137 = lean_ctor_get(x_125, 1); +x_138 = lean_ctor_get(x_125, 0); +lean_inc(x_137); +lean_inc(x_138); +lean_dec(x_125); +x_139 = lean_ctor_get(x_137, 0); +lean_inc(x_139); +x_140 = lean_ctor_get(x_137, 1); +lean_inc(x_140); +if (lean_is_exclusive(x_137)) { + lean_ctor_release(x_137, 0); + lean_ctor_release(x_137, 1); + x_141 = x_137; +} else { + lean_dec_ref(x_137); + x_141 = lean_box(0); +} +lean_inc(x_138); +x_142 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_140, x_119, x_138); +if (lean_is_scalar(x_141)) { + x_143 = lean_alloc_ctor(0, 2, 0); +} else { + x_143 = x_141; +} +lean_ctor_set(x_143, 0, x_139); +lean_ctor_set(x_143, 1, x_142); +x_144 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_144, 0, x_138); +lean_ctor_set(x_144, 1, x_143); +return x_144; +} +} +else +{ +lean_object* x_145; lean_object* x_146; +lean_dec(x_119); +x_145 = lean_ctor_get(x_124, 0); +lean_inc(x_145); +lean_dec(x_124); +x_146 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_146, 0, x_145); +lean_ctor_set(x_146, 1, x_104); +return x_146; +} +} +} +else +{ +lean_object* x_147; lean_object* x_148; +x_147 = lean_ctor_get(x_104, 1); +lean_inc(x_147); +x_148 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_147, x_119); +lean_dec(x_147); +if (lean_obj_tag(x_148) == 0) +{ +lean_object* x_149; uint8_t x_150; +lean_inc(x_119); +x_149 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_119, x_104); +x_150 = !lean_is_exclusive(x_149); +if (x_150 == 0) +{ +lean_object* x_151; uint8_t x_152; +x_151 = lean_ctor_get(x_149, 1); +x_152 = !lean_is_exclusive(x_151); +if (x_152 == 0) +{ +lean_object* x_153; lean_object* x_154; lean_object* x_155; +x_153 = lean_ctor_get(x_149, 0); +x_154 = lean_ctor_get(x_151, 1); +lean_inc(x_153); +x_155 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_154, x_119, x_153); +lean_ctor_set(x_151, 1, x_155); +return x_149; +} +else +{ +lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_object* x_160; +x_156 = lean_ctor_get(x_149, 0); +x_157 = lean_ctor_get(x_151, 0); +x_158 = lean_ctor_get(x_151, 1); +lean_inc(x_158); +lean_inc(x_157); +lean_dec(x_151); +lean_inc(x_156); +x_159 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_158, x_119, x_156); +x_160 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_160, 0, x_157); +lean_ctor_set(x_160, 1, x_159); +lean_ctor_set(x_149, 1, x_160); +return x_149; +} +} +else +{ +lean_object* x_161; 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; +x_161 = lean_ctor_get(x_149, 1); +x_162 = lean_ctor_get(x_149, 0); +lean_inc(x_161); +lean_inc(x_162); +lean_dec(x_149); +x_163 = lean_ctor_get(x_161, 0); +lean_inc(x_163); +x_164 = lean_ctor_get(x_161, 1); +lean_inc(x_164); +if (lean_is_exclusive(x_161)) { + lean_ctor_release(x_161, 0); + lean_ctor_release(x_161, 1); + x_165 = x_161; +} else { + lean_dec_ref(x_161); + x_165 = lean_box(0); +} +lean_inc(x_162); +x_166 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_164, x_119, x_162); +if (lean_is_scalar(x_165)) { + x_167 = lean_alloc_ctor(0, 2, 0); +} else { + x_167 = x_165; +} +lean_ctor_set(x_167, 0, x_163); +lean_ctor_set(x_167, 1, x_166); +x_168 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_168, 0, x_162); +lean_ctor_set(x_168, 1, x_167); +return x_168; +} +} +else +{ +lean_object* x_169; lean_object* x_170; +lean_dec(x_119); +x_169 = lean_ctor_get(x_148, 0); +lean_inc(x_169); +lean_dec(x_148); +x_170 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_170, 0, x_169); +lean_ctor_set(x_170, 1, x_104); +return x_170; +} +} +} +} +block_115: +{ +lean_object* x_106; lean_object* x_107; uint8_t x_108; +lean_dec(x_105); +x_106 = lean_unsigned_to_nat(0u); +x_107 = l_Array_ummapAux___main___at_Lean_MetavarContext_instantiateExprMVars___spec__7(x_106, x_2, x_104); +x_108 = !lean_is_exclusive(x_107); +if (x_108 == 0) +{ +lean_object* x_109; lean_object* x_110; +x_109 = lean_ctor_get(x_107, 0); +x_110 = l_Lean_mkAppRev(x_103, x_109); +lean_dec(x_109); +lean_ctor_set(x_107, 0, x_110); +return x_107; +} +else +{ +lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; +x_111 = lean_ctor_get(x_107, 0); +x_112 = lean_ctor_get(x_107, 1); +lean_inc(x_112); +lean_inc(x_111); +lean_dec(x_107); +x_113 = l_Lean_mkAppRev(x_103, x_111); +lean_dec(x_111); +x_114 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_114, 0, x_113); +lean_ctor_set(x_114, 1, x_112); +return x_114; +} +} +} +} +case 2: +{ +uint8_t x_200; lean_object* x_201; lean_object* x_202; uint8_t x_270; +x_200 = l_Lean_Expr_isMVar(x_1); +x_270 = lean_expr_has_expr_mvar(x_1); +if (x_270 == 0) +{ +uint8_t x_271; +x_271 = lean_expr_has_level_mvar(x_1); +if (x_271 == 0) +{ +x_201 = x_1; +x_202 = x_3; +goto block_269; +} +else +{ +lean_object* x_272; lean_object* x_273; +x_272 = lean_ctor_get(x_3, 1); +lean_inc(x_272); +x_273 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_272, x_1); +lean_dec(x_272); +if (lean_obj_tag(x_273) == 0) +{ +lean_object* x_274; lean_object* x_275; lean_object* x_276; uint8_t x_277; +lean_inc(x_1); +x_274 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_1, x_3); +x_275 = lean_ctor_get(x_274, 1); +lean_inc(x_275); +x_276 = lean_ctor_get(x_274, 0); +lean_inc(x_276); +lean_dec(x_274); +x_277 = !lean_is_exclusive(x_275); +if (x_277 == 0) +{ +lean_object* x_278; lean_object* x_279; +x_278 = lean_ctor_get(x_275, 1); +lean_inc(x_276); +x_279 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_278, x_1, x_276); +lean_ctor_set(x_275, 1, x_279); +x_201 = x_276; +x_202 = x_275; +goto block_269; +} +else +{ +lean_object* x_280; lean_object* x_281; lean_object* x_282; lean_object* x_283; +x_280 = lean_ctor_get(x_275, 0); +x_281 = lean_ctor_get(x_275, 1); +lean_inc(x_281); +lean_inc(x_280); +lean_dec(x_275); +lean_inc(x_276); +x_282 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_281, x_1, x_276); +x_283 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_283, 0, x_280); +lean_ctor_set(x_283, 1, x_282); +x_201 = x_276; +x_202 = x_283; +goto block_269; +} +} +else +{ +lean_object* x_284; +lean_dec(x_1); +x_284 = lean_ctor_get(x_273, 0); +lean_inc(x_284); +lean_dec(x_273); +x_201 = x_284; +x_202 = x_3; +goto block_269; +} +} +} +else +{ +lean_object* x_285; lean_object* x_286; +x_285 = lean_ctor_get(x_3, 1); +lean_inc(x_285); +x_286 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_285, x_1); +lean_dec(x_285); +if (lean_obj_tag(x_286) == 0) +{ +lean_object* x_287; lean_object* x_288; lean_object* x_289; uint8_t x_290; +lean_inc(x_1); +x_287 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_1, x_3); +x_288 = lean_ctor_get(x_287, 1); +lean_inc(x_288); +x_289 = lean_ctor_get(x_287, 0); +lean_inc(x_289); +lean_dec(x_287); +x_290 = !lean_is_exclusive(x_288); +if (x_290 == 0) +{ +lean_object* x_291; lean_object* x_292; +x_291 = lean_ctor_get(x_288, 1); +lean_inc(x_289); +x_292 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_291, x_1, x_289); +lean_ctor_set(x_288, 1, x_292); +x_201 = x_289; +x_202 = x_288; +goto block_269; +} +else +{ +lean_object* x_293; lean_object* x_294; lean_object* x_295; lean_object* x_296; +x_293 = lean_ctor_get(x_288, 0); +x_294 = lean_ctor_get(x_288, 1); +lean_inc(x_294); +lean_inc(x_293); +lean_dec(x_288); +lean_inc(x_289); +x_295 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_294, x_1, x_289); +x_296 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_296, 0, x_293); +lean_ctor_set(x_296, 1, x_295); +x_201 = x_289; +x_202 = x_296; +goto block_269; +} +} +else +{ +lean_object* x_297; +lean_dec(x_1); +x_297 = lean_ctor_get(x_286, 0); +lean_inc(x_297); +lean_dec(x_286); +x_201 = x_297; +x_202 = x_3; +goto block_269; +} +} +block_269: +{ +lean_object* x_203; +if (x_200 == 0) +{ +lean_object* x_214; +x_214 = lean_box(0); +x_203 = x_214; +goto block_213; +} +else +{ +uint8_t x_215; +x_215 = l_Lean_Expr_isLambda(x_201); +if (x_215 == 0) +{ +lean_object* x_216; +x_216 = lean_box(0); +x_203 = x_216; +goto block_213; +} +else +{ +lean_object* x_217; uint8_t x_218; +x_217 = l_Lean_Expr_betaRev(x_201, x_2); +lean_dec(x_201); +x_218 = lean_expr_has_expr_mvar(x_217); +if (x_218 == 0) +{ +uint8_t x_219; +x_219 = lean_expr_has_level_mvar(x_217); +if (x_219 == 0) +{ +lean_object* x_220; +x_220 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_220, 0, x_217); +lean_ctor_set(x_220, 1, x_202); +return x_220; +} +else +{ +lean_object* x_221; lean_object* x_222; +x_221 = lean_ctor_get(x_202, 1); +lean_inc(x_221); +x_222 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_221, x_217); +lean_dec(x_221); +if (lean_obj_tag(x_222) == 0) +{ +lean_object* x_223; uint8_t x_224; +lean_inc(x_217); +x_223 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_217, x_202); +x_224 = !lean_is_exclusive(x_223); +if (x_224 == 0) +{ +lean_object* x_225; uint8_t x_226; +x_225 = lean_ctor_get(x_223, 1); +x_226 = !lean_is_exclusive(x_225); +if (x_226 == 0) +{ +lean_object* x_227; lean_object* x_228; lean_object* x_229; +x_227 = lean_ctor_get(x_223, 0); +x_228 = lean_ctor_get(x_225, 1); +lean_inc(x_227); +x_229 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_228, x_217, x_227); +lean_ctor_set(x_225, 1, x_229); +return x_223; +} +else +{ +lean_object* x_230; lean_object* x_231; lean_object* x_232; lean_object* x_233; lean_object* x_234; +x_230 = lean_ctor_get(x_223, 0); +x_231 = lean_ctor_get(x_225, 0); +x_232 = lean_ctor_get(x_225, 1); +lean_inc(x_232); +lean_inc(x_231); +lean_dec(x_225); +lean_inc(x_230); +x_233 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_232, x_217, x_230); +x_234 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_234, 0, x_231); +lean_ctor_set(x_234, 1, x_233); +lean_ctor_set(x_223, 1, x_234); +return x_223; +} +} +else +{ +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; +x_235 = lean_ctor_get(x_223, 1); +x_236 = lean_ctor_get(x_223, 0); +lean_inc(x_235); +lean_inc(x_236); +lean_dec(x_223); +x_237 = lean_ctor_get(x_235, 0); +lean_inc(x_237); +x_238 = lean_ctor_get(x_235, 1); +lean_inc(x_238); +if (lean_is_exclusive(x_235)) { + lean_ctor_release(x_235, 0); + lean_ctor_release(x_235, 1); + x_239 = x_235; +} else { + lean_dec_ref(x_235); + x_239 = lean_box(0); +} +lean_inc(x_236); +x_240 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_238, x_217, x_236); +if (lean_is_scalar(x_239)) { + x_241 = lean_alloc_ctor(0, 2, 0); +} else { + x_241 = x_239; +} +lean_ctor_set(x_241, 0, x_237); +lean_ctor_set(x_241, 1, x_240); +x_242 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_242, 0, x_236); +lean_ctor_set(x_242, 1, x_241); +return x_242; +} +} +else +{ +lean_object* x_243; lean_object* x_244; +lean_dec(x_217); +x_243 = lean_ctor_get(x_222, 0); +lean_inc(x_243); +lean_dec(x_222); +x_244 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_244, 0, x_243); +lean_ctor_set(x_244, 1, x_202); +return x_244; +} +} +} +else +{ +lean_object* x_245; lean_object* x_246; +x_245 = lean_ctor_get(x_202, 1); +lean_inc(x_245); +x_246 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_245, x_217); +lean_dec(x_245); +if (lean_obj_tag(x_246) == 0) +{ +lean_object* x_247; uint8_t x_248; +lean_inc(x_217); +x_247 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_217, x_202); +x_248 = !lean_is_exclusive(x_247); +if (x_248 == 0) +{ +lean_object* x_249; uint8_t x_250; +x_249 = lean_ctor_get(x_247, 1); +x_250 = !lean_is_exclusive(x_249); +if (x_250 == 0) +{ +lean_object* x_251; lean_object* x_252; lean_object* x_253; +x_251 = lean_ctor_get(x_247, 0); +x_252 = lean_ctor_get(x_249, 1); +lean_inc(x_251); +x_253 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_252, x_217, x_251); +lean_ctor_set(x_249, 1, x_253); +return x_247; +} +else +{ +lean_object* x_254; lean_object* x_255; lean_object* x_256; lean_object* x_257; lean_object* x_258; +x_254 = lean_ctor_get(x_247, 0); +x_255 = lean_ctor_get(x_249, 0); +x_256 = lean_ctor_get(x_249, 1); +lean_inc(x_256); +lean_inc(x_255); +lean_dec(x_249); +lean_inc(x_254); +x_257 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_256, x_217, x_254); +x_258 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_258, 0, x_255); +lean_ctor_set(x_258, 1, x_257); +lean_ctor_set(x_247, 1, x_258); +return x_247; +} +} +else +{ +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; +x_259 = lean_ctor_get(x_247, 1); +x_260 = lean_ctor_get(x_247, 0); +lean_inc(x_259); +lean_inc(x_260); +lean_dec(x_247); +x_261 = lean_ctor_get(x_259, 0); +lean_inc(x_261); +x_262 = lean_ctor_get(x_259, 1); +lean_inc(x_262); +if (lean_is_exclusive(x_259)) { + lean_ctor_release(x_259, 0); + lean_ctor_release(x_259, 1); + x_263 = x_259; +} else { + lean_dec_ref(x_259); + x_263 = lean_box(0); +} +lean_inc(x_260); +x_264 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_262, x_217, x_260); +if (lean_is_scalar(x_263)) { + x_265 = lean_alloc_ctor(0, 2, 0); +} else { + x_265 = x_263; +} +lean_ctor_set(x_265, 0, x_261); +lean_ctor_set(x_265, 1, x_264); +x_266 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_266, 0, x_260); +lean_ctor_set(x_266, 1, x_265); +return x_266; +} +} +else +{ +lean_object* x_267; lean_object* x_268; +lean_dec(x_217); +x_267 = lean_ctor_get(x_246, 0); +lean_inc(x_267); +lean_dec(x_246); +x_268 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_268, 0, x_267); +lean_ctor_set(x_268, 1, x_202); +return x_268; +} +} +} +} +block_213: +{ +lean_object* x_204; lean_object* x_205; uint8_t x_206; +lean_dec(x_203); +x_204 = lean_unsigned_to_nat(0u); +x_205 = l_Array_ummapAux___main___at_Lean_MetavarContext_instantiateExprMVars___spec__7(x_204, x_2, x_202); +x_206 = !lean_is_exclusive(x_205); +if (x_206 == 0) +{ +lean_object* x_207; lean_object* x_208; +x_207 = lean_ctor_get(x_205, 0); +x_208 = l_Lean_mkAppRev(x_201, x_207); +lean_dec(x_207); +lean_ctor_set(x_205, 0, x_208); +return x_205; +} +else +{ +lean_object* x_209; lean_object* x_210; lean_object* x_211; lean_object* x_212; +x_209 = lean_ctor_get(x_205, 0); +x_210 = lean_ctor_get(x_205, 1); +lean_inc(x_210); +lean_inc(x_209); +lean_dec(x_205); +x_211 = l_Lean_mkAppRev(x_201, x_209); +lean_dec(x_209); +x_212 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_212, 0, x_211); +lean_ctor_set(x_212, 1, x_210); +return x_212; +} +} +} +} +case 3: +{ +uint8_t x_298; lean_object* x_299; lean_object* x_300; uint8_t x_368; +x_298 = l_Lean_Expr_isMVar(x_1); +x_368 = lean_expr_has_expr_mvar(x_1); +if (x_368 == 0) +{ +uint8_t x_369; +x_369 = lean_expr_has_level_mvar(x_1); +if (x_369 == 0) +{ +x_299 = x_1; +x_300 = x_3; +goto block_367; +} +else +{ +lean_object* x_370; lean_object* x_371; +x_370 = lean_ctor_get(x_3, 1); +lean_inc(x_370); +x_371 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_370, x_1); +lean_dec(x_370); +if (lean_obj_tag(x_371) == 0) +{ +lean_object* x_372; lean_object* x_373; lean_object* x_374; uint8_t x_375; +lean_inc(x_1); +x_372 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_1, x_3); +x_373 = lean_ctor_get(x_372, 1); +lean_inc(x_373); +x_374 = lean_ctor_get(x_372, 0); +lean_inc(x_374); +lean_dec(x_372); +x_375 = !lean_is_exclusive(x_373); +if (x_375 == 0) +{ +lean_object* x_376; lean_object* x_377; +x_376 = lean_ctor_get(x_373, 1); +lean_inc(x_374); +x_377 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_376, x_1, x_374); +lean_ctor_set(x_373, 1, x_377); +x_299 = x_374; +x_300 = x_373; +goto block_367; +} +else +{ +lean_object* x_378; lean_object* x_379; lean_object* x_380; lean_object* x_381; +x_378 = lean_ctor_get(x_373, 0); +x_379 = lean_ctor_get(x_373, 1); +lean_inc(x_379); +lean_inc(x_378); +lean_dec(x_373); +lean_inc(x_374); +x_380 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_379, x_1, x_374); +x_381 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_381, 0, x_378); +lean_ctor_set(x_381, 1, x_380); +x_299 = x_374; +x_300 = x_381; +goto block_367; +} +} +else +{ +lean_object* x_382; +lean_dec(x_1); +x_382 = lean_ctor_get(x_371, 0); +lean_inc(x_382); +lean_dec(x_371); +x_299 = x_382; +x_300 = x_3; +goto block_367; +} +} +} +else +{ +lean_object* x_383; lean_object* x_384; +x_383 = lean_ctor_get(x_3, 1); +lean_inc(x_383); +x_384 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_383, x_1); +lean_dec(x_383); +if (lean_obj_tag(x_384) == 0) +{ +lean_object* x_385; lean_object* x_386; lean_object* x_387; uint8_t x_388; +lean_inc(x_1); +x_385 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_1, x_3); +x_386 = lean_ctor_get(x_385, 1); +lean_inc(x_386); +x_387 = lean_ctor_get(x_385, 0); +lean_inc(x_387); +lean_dec(x_385); +x_388 = !lean_is_exclusive(x_386); +if (x_388 == 0) +{ +lean_object* x_389; lean_object* x_390; +x_389 = lean_ctor_get(x_386, 1); +lean_inc(x_387); +x_390 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_389, x_1, x_387); +lean_ctor_set(x_386, 1, x_390); +x_299 = x_387; +x_300 = x_386; +goto block_367; +} +else +{ +lean_object* x_391; lean_object* x_392; lean_object* x_393; lean_object* x_394; +x_391 = lean_ctor_get(x_386, 0); +x_392 = lean_ctor_get(x_386, 1); +lean_inc(x_392); +lean_inc(x_391); +lean_dec(x_386); +lean_inc(x_387); +x_393 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_392, x_1, x_387); +x_394 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_394, 0, x_391); +lean_ctor_set(x_394, 1, x_393); +x_299 = x_387; +x_300 = x_394; +goto block_367; +} +} +else +{ +lean_object* x_395; +lean_dec(x_1); +x_395 = lean_ctor_get(x_384, 0); +lean_inc(x_395); +lean_dec(x_384); +x_299 = x_395; +x_300 = x_3; +goto block_367; +} +} +block_367: +{ +lean_object* x_301; +if (x_298 == 0) +{ +lean_object* x_312; +x_312 = lean_box(0); +x_301 = x_312; +goto block_311; +} +else +{ +uint8_t x_313; +x_313 = l_Lean_Expr_isLambda(x_299); +if (x_313 == 0) +{ +lean_object* x_314; +x_314 = lean_box(0); +x_301 = x_314; +goto block_311; +} +else +{ +lean_object* x_315; uint8_t x_316; +x_315 = l_Lean_Expr_betaRev(x_299, x_2); +lean_dec(x_299); +x_316 = lean_expr_has_expr_mvar(x_315); +if (x_316 == 0) +{ +uint8_t x_317; +x_317 = lean_expr_has_level_mvar(x_315); +if (x_317 == 0) +{ +lean_object* x_318; +x_318 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_318, 0, x_315); +lean_ctor_set(x_318, 1, x_300); +return x_318; +} +else +{ +lean_object* x_319; lean_object* x_320; +x_319 = lean_ctor_get(x_300, 1); +lean_inc(x_319); +x_320 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_319, x_315); +lean_dec(x_319); +if (lean_obj_tag(x_320) == 0) +{ +lean_object* x_321; uint8_t x_322; +lean_inc(x_315); +x_321 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_315, x_300); +x_322 = !lean_is_exclusive(x_321); +if (x_322 == 0) +{ +lean_object* x_323; uint8_t x_324; +x_323 = lean_ctor_get(x_321, 1); +x_324 = !lean_is_exclusive(x_323); +if (x_324 == 0) +{ +lean_object* x_325; lean_object* x_326; lean_object* x_327; +x_325 = lean_ctor_get(x_321, 0); +x_326 = lean_ctor_get(x_323, 1); +lean_inc(x_325); +x_327 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_326, x_315, x_325); +lean_ctor_set(x_323, 1, x_327); +return x_321; +} +else +{ +lean_object* x_328; lean_object* x_329; lean_object* x_330; lean_object* x_331; lean_object* x_332; +x_328 = lean_ctor_get(x_321, 0); +x_329 = lean_ctor_get(x_323, 0); +x_330 = lean_ctor_get(x_323, 1); +lean_inc(x_330); +lean_inc(x_329); +lean_dec(x_323); +lean_inc(x_328); +x_331 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_330, x_315, x_328); +x_332 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_332, 0, x_329); +lean_ctor_set(x_332, 1, x_331); +lean_ctor_set(x_321, 1, x_332); +return x_321; +} +} +else +{ +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; +x_333 = lean_ctor_get(x_321, 1); +x_334 = lean_ctor_get(x_321, 0); +lean_inc(x_333); +lean_inc(x_334); +lean_dec(x_321); +x_335 = lean_ctor_get(x_333, 0); +lean_inc(x_335); +x_336 = lean_ctor_get(x_333, 1); +lean_inc(x_336); +if (lean_is_exclusive(x_333)) { + lean_ctor_release(x_333, 0); + lean_ctor_release(x_333, 1); + x_337 = x_333; +} else { + lean_dec_ref(x_333); + x_337 = lean_box(0); +} +lean_inc(x_334); +x_338 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_336, x_315, x_334); +if (lean_is_scalar(x_337)) { + x_339 = lean_alloc_ctor(0, 2, 0); +} else { + x_339 = x_337; +} +lean_ctor_set(x_339, 0, x_335); +lean_ctor_set(x_339, 1, x_338); +x_340 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_340, 0, x_334); +lean_ctor_set(x_340, 1, x_339); +return x_340; +} +} +else +{ +lean_object* x_341; lean_object* x_342; +lean_dec(x_315); +x_341 = lean_ctor_get(x_320, 0); +lean_inc(x_341); +lean_dec(x_320); +x_342 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_342, 0, x_341); +lean_ctor_set(x_342, 1, x_300); +return x_342; +} +} +} +else +{ +lean_object* x_343; lean_object* x_344; +x_343 = lean_ctor_get(x_300, 1); +lean_inc(x_343); +x_344 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_343, x_315); +lean_dec(x_343); +if (lean_obj_tag(x_344) == 0) +{ +lean_object* x_345; uint8_t x_346; +lean_inc(x_315); +x_345 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_315, x_300); +x_346 = !lean_is_exclusive(x_345); +if (x_346 == 0) +{ +lean_object* x_347; uint8_t x_348; +x_347 = lean_ctor_get(x_345, 1); +x_348 = !lean_is_exclusive(x_347); +if (x_348 == 0) +{ +lean_object* x_349; lean_object* x_350; lean_object* x_351; +x_349 = lean_ctor_get(x_345, 0); +x_350 = lean_ctor_get(x_347, 1); +lean_inc(x_349); +x_351 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_350, x_315, x_349); +lean_ctor_set(x_347, 1, x_351); +return x_345; +} +else +{ +lean_object* x_352; lean_object* x_353; lean_object* x_354; lean_object* x_355; lean_object* x_356; +x_352 = lean_ctor_get(x_345, 0); +x_353 = lean_ctor_get(x_347, 0); +x_354 = lean_ctor_get(x_347, 1); +lean_inc(x_354); +lean_inc(x_353); +lean_dec(x_347); +lean_inc(x_352); +x_355 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_354, x_315, x_352); +x_356 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_356, 0, x_353); +lean_ctor_set(x_356, 1, x_355); +lean_ctor_set(x_345, 1, x_356); +return x_345; +} +} +else +{ +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; +x_357 = lean_ctor_get(x_345, 1); +x_358 = lean_ctor_get(x_345, 0); +lean_inc(x_357); +lean_inc(x_358); +lean_dec(x_345); +x_359 = lean_ctor_get(x_357, 0); +lean_inc(x_359); +x_360 = lean_ctor_get(x_357, 1); +lean_inc(x_360); +if (lean_is_exclusive(x_357)) { + lean_ctor_release(x_357, 0); + lean_ctor_release(x_357, 1); + x_361 = x_357; +} else { + lean_dec_ref(x_357); + x_361 = lean_box(0); +} +lean_inc(x_358); +x_362 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_360, x_315, x_358); +if (lean_is_scalar(x_361)) { + x_363 = lean_alloc_ctor(0, 2, 0); +} else { + x_363 = x_361; +} +lean_ctor_set(x_363, 0, x_359); +lean_ctor_set(x_363, 1, x_362); +x_364 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_364, 0, x_358); +lean_ctor_set(x_364, 1, x_363); +return x_364; +} +} +else +{ +lean_object* x_365; lean_object* x_366; +lean_dec(x_315); +x_365 = lean_ctor_get(x_344, 0); +lean_inc(x_365); +lean_dec(x_344); +x_366 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_366, 0, x_365); +lean_ctor_set(x_366, 1, x_300); +return x_366; +} +} +} +} +block_311: +{ +lean_object* x_302; lean_object* x_303; uint8_t x_304; +lean_dec(x_301); +x_302 = lean_unsigned_to_nat(0u); +x_303 = l_Array_ummapAux___main___at_Lean_MetavarContext_instantiateExprMVars___spec__7(x_302, x_2, x_300); +x_304 = !lean_is_exclusive(x_303); +if (x_304 == 0) +{ +lean_object* x_305; lean_object* x_306; +x_305 = lean_ctor_get(x_303, 0); +x_306 = l_Lean_mkAppRev(x_299, x_305); +lean_dec(x_305); +lean_ctor_set(x_303, 0, x_306); +return x_303; +} +else +{ +lean_object* x_307; lean_object* x_308; lean_object* x_309; lean_object* x_310; +x_307 = lean_ctor_get(x_303, 0); +x_308 = lean_ctor_get(x_303, 1); +lean_inc(x_308); +lean_inc(x_307); +lean_dec(x_303); +x_309 = l_Lean_mkAppRev(x_299, x_307); +lean_dec(x_307); +x_310 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_310, 0, x_309); +lean_ctor_set(x_310, 1, x_308); +return x_310; +} +} +} +} +case 4: +{ +uint8_t x_396; lean_object* x_397; lean_object* x_398; uint8_t x_466; +x_396 = l_Lean_Expr_isMVar(x_1); +x_466 = lean_expr_has_expr_mvar(x_1); +if (x_466 == 0) +{ +uint8_t x_467; +x_467 = lean_expr_has_level_mvar(x_1); +if (x_467 == 0) +{ +x_397 = x_1; +x_398 = x_3; +goto block_465; +} +else +{ +lean_object* x_468; lean_object* x_469; +x_468 = lean_ctor_get(x_3, 1); +lean_inc(x_468); +x_469 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_468, x_1); +lean_dec(x_468); +if (lean_obj_tag(x_469) == 0) +{ +lean_object* x_470; lean_object* x_471; lean_object* x_472; uint8_t x_473; +lean_inc(x_1); +x_470 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_1, x_3); +x_471 = lean_ctor_get(x_470, 1); +lean_inc(x_471); +x_472 = lean_ctor_get(x_470, 0); +lean_inc(x_472); +lean_dec(x_470); +x_473 = !lean_is_exclusive(x_471); +if (x_473 == 0) +{ +lean_object* x_474; lean_object* x_475; +x_474 = lean_ctor_get(x_471, 1); +lean_inc(x_472); +x_475 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_474, x_1, x_472); +lean_ctor_set(x_471, 1, x_475); +x_397 = x_472; +x_398 = x_471; +goto block_465; +} +else +{ +lean_object* x_476; lean_object* x_477; lean_object* x_478; lean_object* x_479; +x_476 = lean_ctor_get(x_471, 0); +x_477 = lean_ctor_get(x_471, 1); +lean_inc(x_477); +lean_inc(x_476); +lean_dec(x_471); +lean_inc(x_472); +x_478 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_477, x_1, x_472); +x_479 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_479, 0, x_476); +lean_ctor_set(x_479, 1, x_478); +x_397 = x_472; +x_398 = x_479; +goto block_465; +} +} +else +{ +lean_object* x_480; +lean_dec(x_1); +x_480 = lean_ctor_get(x_469, 0); +lean_inc(x_480); +lean_dec(x_469); +x_397 = x_480; +x_398 = x_3; +goto block_465; +} +} +} +else +{ +lean_object* x_481; lean_object* x_482; +x_481 = lean_ctor_get(x_3, 1); +lean_inc(x_481); +x_482 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_481, x_1); +lean_dec(x_481); +if (lean_obj_tag(x_482) == 0) +{ +lean_object* x_483; lean_object* x_484; lean_object* x_485; uint8_t x_486; +lean_inc(x_1); +x_483 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_1, x_3); +x_484 = lean_ctor_get(x_483, 1); +lean_inc(x_484); +x_485 = lean_ctor_get(x_483, 0); +lean_inc(x_485); +lean_dec(x_483); +x_486 = !lean_is_exclusive(x_484); +if (x_486 == 0) +{ +lean_object* x_487; lean_object* x_488; +x_487 = lean_ctor_get(x_484, 1); +lean_inc(x_485); +x_488 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_487, x_1, x_485); +lean_ctor_set(x_484, 1, x_488); +x_397 = x_485; +x_398 = x_484; +goto block_465; +} +else +{ +lean_object* x_489; lean_object* x_490; lean_object* x_491; lean_object* x_492; +x_489 = lean_ctor_get(x_484, 0); +x_490 = lean_ctor_get(x_484, 1); +lean_inc(x_490); +lean_inc(x_489); +lean_dec(x_484); +lean_inc(x_485); +x_491 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_490, x_1, x_485); +x_492 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_492, 0, x_489); +lean_ctor_set(x_492, 1, x_491); +x_397 = x_485; +x_398 = x_492; +goto block_465; +} +} +else +{ +lean_object* x_493; +lean_dec(x_1); +x_493 = lean_ctor_get(x_482, 0); +lean_inc(x_493); +lean_dec(x_482); +x_397 = x_493; +x_398 = x_3; +goto block_465; +} +} +block_465: +{ +lean_object* x_399; +if (x_396 == 0) +{ +lean_object* x_410; +x_410 = lean_box(0); +x_399 = x_410; +goto block_409; +} +else +{ +uint8_t x_411; +x_411 = l_Lean_Expr_isLambda(x_397); +if (x_411 == 0) +{ +lean_object* x_412; +x_412 = lean_box(0); +x_399 = x_412; +goto block_409; +} +else +{ +lean_object* x_413; uint8_t x_414; +x_413 = l_Lean_Expr_betaRev(x_397, x_2); +lean_dec(x_397); +x_414 = lean_expr_has_expr_mvar(x_413); +if (x_414 == 0) +{ +uint8_t x_415; +x_415 = lean_expr_has_level_mvar(x_413); +if (x_415 == 0) +{ +lean_object* x_416; +x_416 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_416, 0, x_413); +lean_ctor_set(x_416, 1, x_398); +return x_416; +} +else +{ +lean_object* x_417; lean_object* x_418; +x_417 = lean_ctor_get(x_398, 1); +lean_inc(x_417); +x_418 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_417, x_413); +lean_dec(x_417); +if (lean_obj_tag(x_418) == 0) +{ +lean_object* x_419; uint8_t x_420; +lean_inc(x_413); +x_419 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_413, x_398); +x_420 = !lean_is_exclusive(x_419); +if (x_420 == 0) +{ +lean_object* x_421; uint8_t x_422; +x_421 = lean_ctor_get(x_419, 1); +x_422 = !lean_is_exclusive(x_421); +if (x_422 == 0) +{ +lean_object* x_423; lean_object* x_424; lean_object* x_425; +x_423 = lean_ctor_get(x_419, 0); +x_424 = lean_ctor_get(x_421, 1); +lean_inc(x_423); +x_425 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_424, x_413, x_423); +lean_ctor_set(x_421, 1, x_425); +return x_419; +} +else +{ +lean_object* x_426; lean_object* x_427; lean_object* x_428; lean_object* x_429; lean_object* x_430; +x_426 = lean_ctor_get(x_419, 0); +x_427 = lean_ctor_get(x_421, 0); +x_428 = lean_ctor_get(x_421, 1); +lean_inc(x_428); +lean_inc(x_427); +lean_dec(x_421); +lean_inc(x_426); +x_429 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_428, x_413, x_426); +x_430 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_430, 0, x_427); +lean_ctor_set(x_430, 1, x_429); +lean_ctor_set(x_419, 1, x_430); +return x_419; +} +} +else +{ +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; +x_431 = lean_ctor_get(x_419, 1); +x_432 = lean_ctor_get(x_419, 0); +lean_inc(x_431); +lean_inc(x_432); +lean_dec(x_419); +x_433 = lean_ctor_get(x_431, 0); +lean_inc(x_433); +x_434 = lean_ctor_get(x_431, 1); +lean_inc(x_434); +if (lean_is_exclusive(x_431)) { + lean_ctor_release(x_431, 0); + lean_ctor_release(x_431, 1); + x_435 = x_431; +} else { + lean_dec_ref(x_431); + x_435 = lean_box(0); +} +lean_inc(x_432); +x_436 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_434, x_413, x_432); +if (lean_is_scalar(x_435)) { + x_437 = lean_alloc_ctor(0, 2, 0); +} else { + x_437 = x_435; +} +lean_ctor_set(x_437, 0, x_433); +lean_ctor_set(x_437, 1, x_436); +x_438 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_438, 0, x_432); +lean_ctor_set(x_438, 1, x_437); +return x_438; +} +} +else +{ +lean_object* x_439; lean_object* x_440; +lean_dec(x_413); +x_439 = lean_ctor_get(x_418, 0); +lean_inc(x_439); +lean_dec(x_418); +x_440 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_440, 0, x_439); +lean_ctor_set(x_440, 1, x_398); +return x_440; +} +} +} +else +{ +lean_object* x_441; lean_object* x_442; +x_441 = lean_ctor_get(x_398, 1); +lean_inc(x_441); +x_442 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_441, x_413); +lean_dec(x_441); +if (lean_obj_tag(x_442) == 0) +{ +lean_object* x_443; uint8_t x_444; +lean_inc(x_413); +x_443 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_413, x_398); +x_444 = !lean_is_exclusive(x_443); +if (x_444 == 0) +{ +lean_object* x_445; uint8_t x_446; +x_445 = lean_ctor_get(x_443, 1); +x_446 = !lean_is_exclusive(x_445); +if (x_446 == 0) +{ +lean_object* x_447; lean_object* x_448; lean_object* x_449; +x_447 = lean_ctor_get(x_443, 0); +x_448 = lean_ctor_get(x_445, 1); +lean_inc(x_447); +x_449 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_448, x_413, x_447); +lean_ctor_set(x_445, 1, x_449); +return x_443; +} +else +{ +lean_object* x_450; lean_object* x_451; lean_object* x_452; lean_object* x_453; lean_object* x_454; +x_450 = lean_ctor_get(x_443, 0); +x_451 = lean_ctor_get(x_445, 0); +x_452 = lean_ctor_get(x_445, 1); +lean_inc(x_452); +lean_inc(x_451); +lean_dec(x_445); +lean_inc(x_450); +x_453 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_452, x_413, x_450); +x_454 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_454, 0, x_451); +lean_ctor_set(x_454, 1, x_453); +lean_ctor_set(x_443, 1, x_454); +return x_443; +} +} +else +{ +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; lean_object* x_462; +x_455 = lean_ctor_get(x_443, 1); +x_456 = lean_ctor_get(x_443, 0); +lean_inc(x_455); +lean_inc(x_456); +lean_dec(x_443); +x_457 = lean_ctor_get(x_455, 0); +lean_inc(x_457); +x_458 = lean_ctor_get(x_455, 1); +lean_inc(x_458); +if (lean_is_exclusive(x_455)) { + lean_ctor_release(x_455, 0); + lean_ctor_release(x_455, 1); + x_459 = x_455; +} else { + lean_dec_ref(x_455); + x_459 = lean_box(0); +} +lean_inc(x_456); +x_460 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_458, x_413, x_456); +if (lean_is_scalar(x_459)) { + x_461 = lean_alloc_ctor(0, 2, 0); +} else { + x_461 = x_459; +} +lean_ctor_set(x_461, 0, x_457); +lean_ctor_set(x_461, 1, x_460); +x_462 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_462, 0, x_456); +lean_ctor_set(x_462, 1, x_461); +return x_462; +} +} +else +{ +lean_object* x_463; lean_object* x_464; +lean_dec(x_413); +x_463 = lean_ctor_get(x_442, 0); +lean_inc(x_463); +lean_dec(x_442); +x_464 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_464, 0, x_463); +lean_ctor_set(x_464, 1, x_398); +return x_464; +} +} +} +} +block_409: +{ +lean_object* x_400; lean_object* x_401; uint8_t x_402; +lean_dec(x_399); +x_400 = lean_unsigned_to_nat(0u); +x_401 = l_Array_ummapAux___main___at_Lean_MetavarContext_instantiateExprMVars___spec__7(x_400, x_2, x_398); +x_402 = !lean_is_exclusive(x_401); +if (x_402 == 0) +{ +lean_object* x_403; lean_object* x_404; +x_403 = lean_ctor_get(x_401, 0); +x_404 = l_Lean_mkAppRev(x_397, x_403); +lean_dec(x_403); +lean_ctor_set(x_401, 0, x_404); +return x_401; +} +else +{ +lean_object* x_405; lean_object* x_406; lean_object* x_407; lean_object* x_408; +x_405 = lean_ctor_get(x_401, 0); +x_406 = lean_ctor_get(x_401, 1); +lean_inc(x_406); +lean_inc(x_405); +lean_dec(x_401); +x_407 = l_Lean_mkAppRev(x_397, x_405); +lean_dec(x_405); +x_408 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_408, 0, x_407); +lean_ctor_set(x_408, 1, x_406); +return x_408; +} +} +} +} +case 5: +{ +lean_object* x_494; lean_object* x_495; lean_object* x_496; +x_494 = lean_ctor_get(x_1, 0); +lean_inc(x_494); +x_495 = lean_ctor_get(x_1, 1); +lean_inc(x_495); +lean_dec(x_1); +x_496 = lean_array_push(x_2, x_495); +x_1 = x_494; +x_2 = x_496; +goto _start; +} +case 6: +{ +uint8_t x_498; lean_object* x_499; lean_object* x_500; uint8_t x_568; +x_498 = l_Lean_Expr_isMVar(x_1); +x_568 = lean_expr_has_expr_mvar(x_1); +if (x_568 == 0) +{ +uint8_t x_569; +x_569 = lean_expr_has_level_mvar(x_1); +if (x_569 == 0) +{ +x_499 = x_1; +x_500 = x_3; +goto block_567; +} +else +{ +lean_object* x_570; lean_object* x_571; +x_570 = lean_ctor_get(x_3, 1); +lean_inc(x_570); +x_571 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_570, x_1); +lean_dec(x_570); +if (lean_obj_tag(x_571) == 0) +{ +lean_object* x_572; lean_object* x_573; lean_object* x_574; uint8_t x_575; +lean_inc(x_1); +x_572 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_1, x_3); +x_573 = lean_ctor_get(x_572, 1); +lean_inc(x_573); +x_574 = lean_ctor_get(x_572, 0); +lean_inc(x_574); +lean_dec(x_572); +x_575 = !lean_is_exclusive(x_573); +if (x_575 == 0) +{ +lean_object* x_576; lean_object* x_577; +x_576 = lean_ctor_get(x_573, 1); +lean_inc(x_574); +x_577 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_576, x_1, x_574); +lean_ctor_set(x_573, 1, x_577); +x_499 = x_574; +x_500 = x_573; +goto block_567; +} +else +{ +lean_object* x_578; lean_object* x_579; lean_object* x_580; lean_object* x_581; +x_578 = lean_ctor_get(x_573, 0); +x_579 = lean_ctor_get(x_573, 1); +lean_inc(x_579); +lean_inc(x_578); +lean_dec(x_573); +lean_inc(x_574); +x_580 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_579, x_1, x_574); +x_581 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_581, 0, x_578); +lean_ctor_set(x_581, 1, x_580); +x_499 = x_574; +x_500 = x_581; +goto block_567; +} +} +else +{ +lean_object* x_582; +lean_dec(x_1); +x_582 = lean_ctor_get(x_571, 0); +lean_inc(x_582); +lean_dec(x_571); +x_499 = x_582; +x_500 = x_3; +goto block_567; +} +} +} +else +{ +lean_object* x_583; lean_object* x_584; +x_583 = lean_ctor_get(x_3, 1); +lean_inc(x_583); +x_584 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_583, x_1); +lean_dec(x_583); +if (lean_obj_tag(x_584) == 0) +{ +lean_object* x_585; lean_object* x_586; lean_object* x_587; uint8_t x_588; +lean_inc(x_1); +x_585 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_1, x_3); +x_586 = lean_ctor_get(x_585, 1); +lean_inc(x_586); +x_587 = lean_ctor_get(x_585, 0); +lean_inc(x_587); +lean_dec(x_585); +x_588 = !lean_is_exclusive(x_586); +if (x_588 == 0) +{ +lean_object* x_589; lean_object* x_590; +x_589 = lean_ctor_get(x_586, 1); +lean_inc(x_587); +x_590 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_589, x_1, x_587); +lean_ctor_set(x_586, 1, x_590); +x_499 = x_587; +x_500 = x_586; +goto block_567; +} +else +{ +lean_object* x_591; lean_object* x_592; lean_object* x_593; lean_object* x_594; +x_591 = lean_ctor_get(x_586, 0); +x_592 = lean_ctor_get(x_586, 1); +lean_inc(x_592); +lean_inc(x_591); +lean_dec(x_586); +lean_inc(x_587); +x_593 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_592, x_1, x_587); +x_594 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_594, 0, x_591); +lean_ctor_set(x_594, 1, x_593); +x_499 = x_587; +x_500 = x_594; +goto block_567; +} +} +else +{ +lean_object* x_595; +lean_dec(x_1); +x_595 = lean_ctor_get(x_584, 0); +lean_inc(x_595); +lean_dec(x_584); +x_499 = x_595; +x_500 = x_3; +goto block_567; +} +} +block_567: +{ +lean_object* x_501; +if (x_498 == 0) +{ +lean_object* x_512; +x_512 = lean_box(0); +x_501 = x_512; +goto block_511; +} +else +{ +uint8_t x_513; +x_513 = l_Lean_Expr_isLambda(x_499); +if (x_513 == 0) +{ +lean_object* x_514; +x_514 = lean_box(0); +x_501 = x_514; +goto block_511; +} +else +{ +lean_object* x_515; uint8_t x_516; +x_515 = l_Lean_Expr_betaRev(x_499, x_2); +lean_dec(x_499); +x_516 = lean_expr_has_expr_mvar(x_515); +if (x_516 == 0) +{ +uint8_t x_517; +x_517 = lean_expr_has_level_mvar(x_515); +if (x_517 == 0) +{ +lean_object* x_518; +x_518 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_518, 0, x_515); +lean_ctor_set(x_518, 1, x_500); +return x_518; +} +else +{ +lean_object* x_519; lean_object* x_520; +x_519 = lean_ctor_get(x_500, 1); +lean_inc(x_519); +x_520 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_519, x_515); +lean_dec(x_519); +if (lean_obj_tag(x_520) == 0) +{ +lean_object* x_521; uint8_t x_522; +lean_inc(x_515); +x_521 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_515, x_500); +x_522 = !lean_is_exclusive(x_521); +if (x_522 == 0) +{ +lean_object* x_523; uint8_t x_524; +x_523 = lean_ctor_get(x_521, 1); +x_524 = !lean_is_exclusive(x_523); +if (x_524 == 0) +{ +lean_object* x_525; lean_object* x_526; lean_object* x_527; +x_525 = lean_ctor_get(x_521, 0); +x_526 = lean_ctor_get(x_523, 1); +lean_inc(x_525); +x_527 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_526, x_515, x_525); +lean_ctor_set(x_523, 1, x_527); +return x_521; +} +else +{ +lean_object* x_528; lean_object* x_529; lean_object* x_530; lean_object* x_531; lean_object* x_532; +x_528 = lean_ctor_get(x_521, 0); +x_529 = lean_ctor_get(x_523, 0); +x_530 = lean_ctor_get(x_523, 1); +lean_inc(x_530); +lean_inc(x_529); +lean_dec(x_523); +lean_inc(x_528); +x_531 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_530, x_515, x_528); +x_532 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_532, 0, x_529); +lean_ctor_set(x_532, 1, x_531); +lean_ctor_set(x_521, 1, x_532); +return x_521; +} +} +else +{ +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; +x_533 = lean_ctor_get(x_521, 1); +x_534 = lean_ctor_get(x_521, 0); +lean_inc(x_533); +lean_inc(x_534); +lean_dec(x_521); +x_535 = lean_ctor_get(x_533, 0); +lean_inc(x_535); +x_536 = lean_ctor_get(x_533, 1); +lean_inc(x_536); +if (lean_is_exclusive(x_533)) { + lean_ctor_release(x_533, 0); + lean_ctor_release(x_533, 1); + x_537 = x_533; +} else { + lean_dec_ref(x_533); + x_537 = lean_box(0); +} +lean_inc(x_534); +x_538 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_536, x_515, x_534); +if (lean_is_scalar(x_537)) { + x_539 = lean_alloc_ctor(0, 2, 0); +} else { + x_539 = x_537; +} +lean_ctor_set(x_539, 0, x_535); +lean_ctor_set(x_539, 1, x_538); +x_540 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_540, 0, x_534); +lean_ctor_set(x_540, 1, x_539); +return x_540; +} +} +else +{ +lean_object* x_541; lean_object* x_542; +lean_dec(x_515); +x_541 = lean_ctor_get(x_520, 0); +lean_inc(x_541); +lean_dec(x_520); +x_542 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_542, 0, x_541); +lean_ctor_set(x_542, 1, x_500); +return x_542; +} +} +} +else +{ +lean_object* x_543; lean_object* x_544; +x_543 = lean_ctor_get(x_500, 1); +lean_inc(x_543); +x_544 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_543, x_515); +lean_dec(x_543); +if (lean_obj_tag(x_544) == 0) +{ +lean_object* x_545; uint8_t x_546; +lean_inc(x_515); +x_545 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_515, x_500); +x_546 = !lean_is_exclusive(x_545); +if (x_546 == 0) +{ +lean_object* x_547; uint8_t x_548; +x_547 = lean_ctor_get(x_545, 1); +x_548 = !lean_is_exclusive(x_547); +if (x_548 == 0) +{ +lean_object* x_549; lean_object* x_550; lean_object* x_551; +x_549 = lean_ctor_get(x_545, 0); +x_550 = lean_ctor_get(x_547, 1); +lean_inc(x_549); +x_551 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_550, x_515, x_549); +lean_ctor_set(x_547, 1, x_551); +return x_545; +} +else +{ +lean_object* x_552; lean_object* x_553; lean_object* x_554; lean_object* x_555; lean_object* x_556; +x_552 = lean_ctor_get(x_545, 0); +x_553 = lean_ctor_get(x_547, 0); +x_554 = lean_ctor_get(x_547, 1); +lean_inc(x_554); +lean_inc(x_553); +lean_dec(x_547); +lean_inc(x_552); +x_555 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_554, x_515, x_552); +x_556 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_556, 0, x_553); +lean_ctor_set(x_556, 1, x_555); +lean_ctor_set(x_545, 1, x_556); +return x_545; +} +} +else +{ +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; lean_object* x_564; +x_557 = lean_ctor_get(x_545, 1); +x_558 = lean_ctor_get(x_545, 0); +lean_inc(x_557); +lean_inc(x_558); +lean_dec(x_545); +x_559 = lean_ctor_get(x_557, 0); +lean_inc(x_559); +x_560 = lean_ctor_get(x_557, 1); +lean_inc(x_560); +if (lean_is_exclusive(x_557)) { + lean_ctor_release(x_557, 0); + lean_ctor_release(x_557, 1); + x_561 = x_557; +} else { + lean_dec_ref(x_557); + x_561 = lean_box(0); +} +lean_inc(x_558); +x_562 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_560, x_515, x_558); +if (lean_is_scalar(x_561)) { + x_563 = lean_alloc_ctor(0, 2, 0); +} else { + x_563 = x_561; +} +lean_ctor_set(x_563, 0, x_559); +lean_ctor_set(x_563, 1, x_562); +x_564 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_564, 0, x_558); +lean_ctor_set(x_564, 1, x_563); +return x_564; +} +} +else +{ +lean_object* x_565; lean_object* x_566; +lean_dec(x_515); +x_565 = lean_ctor_get(x_544, 0); +lean_inc(x_565); +lean_dec(x_544); +x_566 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_566, 0, x_565); +lean_ctor_set(x_566, 1, x_500); +return x_566; +} +} +} +} +block_511: +{ +lean_object* x_502; lean_object* x_503; uint8_t x_504; +lean_dec(x_501); +x_502 = lean_unsigned_to_nat(0u); +x_503 = l_Array_ummapAux___main___at_Lean_MetavarContext_instantiateExprMVars___spec__7(x_502, x_2, x_500); +x_504 = !lean_is_exclusive(x_503); +if (x_504 == 0) +{ +lean_object* x_505; lean_object* x_506; +x_505 = lean_ctor_get(x_503, 0); +x_506 = l_Lean_mkAppRev(x_499, x_505); +lean_dec(x_505); +lean_ctor_set(x_503, 0, x_506); +return x_503; +} +else +{ +lean_object* x_507; lean_object* x_508; lean_object* x_509; lean_object* x_510; +x_507 = lean_ctor_get(x_503, 0); +x_508 = lean_ctor_get(x_503, 1); +lean_inc(x_508); +lean_inc(x_507); +lean_dec(x_503); +x_509 = l_Lean_mkAppRev(x_499, x_507); +lean_dec(x_507); +x_510 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_510, 0, x_509); +lean_ctor_set(x_510, 1, x_508); +return x_510; +} +} +} +} +case 7: +{ +uint8_t x_596; lean_object* x_597; lean_object* x_598; uint8_t x_666; +x_596 = l_Lean_Expr_isMVar(x_1); +x_666 = lean_expr_has_expr_mvar(x_1); +if (x_666 == 0) +{ +uint8_t x_667; +x_667 = lean_expr_has_level_mvar(x_1); +if (x_667 == 0) +{ +x_597 = x_1; +x_598 = x_3; +goto block_665; +} +else +{ +lean_object* x_668; lean_object* x_669; +x_668 = lean_ctor_get(x_3, 1); +lean_inc(x_668); +x_669 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_668, x_1); +lean_dec(x_668); +if (lean_obj_tag(x_669) == 0) +{ +lean_object* x_670; lean_object* x_671; lean_object* x_672; uint8_t x_673; +lean_inc(x_1); +x_670 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_1, x_3); +x_671 = lean_ctor_get(x_670, 1); +lean_inc(x_671); +x_672 = lean_ctor_get(x_670, 0); +lean_inc(x_672); +lean_dec(x_670); +x_673 = !lean_is_exclusive(x_671); +if (x_673 == 0) +{ +lean_object* x_674; lean_object* x_675; +x_674 = lean_ctor_get(x_671, 1); +lean_inc(x_672); +x_675 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_674, x_1, x_672); +lean_ctor_set(x_671, 1, x_675); +x_597 = x_672; +x_598 = x_671; +goto block_665; +} +else +{ +lean_object* x_676; lean_object* x_677; lean_object* x_678; lean_object* x_679; +x_676 = lean_ctor_get(x_671, 0); +x_677 = lean_ctor_get(x_671, 1); +lean_inc(x_677); +lean_inc(x_676); +lean_dec(x_671); +lean_inc(x_672); +x_678 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_677, x_1, x_672); +x_679 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_679, 0, x_676); +lean_ctor_set(x_679, 1, x_678); +x_597 = x_672; +x_598 = x_679; +goto block_665; +} +} +else +{ +lean_object* x_680; +lean_dec(x_1); +x_680 = lean_ctor_get(x_669, 0); +lean_inc(x_680); +lean_dec(x_669); +x_597 = x_680; +x_598 = x_3; +goto block_665; +} +} +} +else +{ +lean_object* x_681; lean_object* x_682; +x_681 = lean_ctor_get(x_3, 1); +lean_inc(x_681); +x_682 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_681, x_1); +lean_dec(x_681); +if (lean_obj_tag(x_682) == 0) +{ +lean_object* x_683; lean_object* x_684; lean_object* x_685; uint8_t x_686; +lean_inc(x_1); +x_683 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_1, x_3); +x_684 = lean_ctor_get(x_683, 1); +lean_inc(x_684); +x_685 = lean_ctor_get(x_683, 0); +lean_inc(x_685); +lean_dec(x_683); +x_686 = !lean_is_exclusive(x_684); +if (x_686 == 0) +{ +lean_object* x_687; lean_object* x_688; +x_687 = lean_ctor_get(x_684, 1); +lean_inc(x_685); +x_688 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_687, x_1, x_685); +lean_ctor_set(x_684, 1, x_688); +x_597 = x_685; +x_598 = x_684; +goto block_665; +} +else +{ +lean_object* x_689; lean_object* x_690; lean_object* x_691; lean_object* x_692; +x_689 = lean_ctor_get(x_684, 0); +x_690 = lean_ctor_get(x_684, 1); +lean_inc(x_690); +lean_inc(x_689); +lean_dec(x_684); +lean_inc(x_685); +x_691 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_690, x_1, x_685); +x_692 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_692, 0, x_689); +lean_ctor_set(x_692, 1, x_691); +x_597 = x_685; +x_598 = x_692; +goto block_665; +} +} +else +{ +lean_object* x_693; +lean_dec(x_1); +x_693 = lean_ctor_get(x_682, 0); +lean_inc(x_693); +lean_dec(x_682); +x_597 = x_693; +x_598 = x_3; +goto block_665; +} +} +block_665: +{ +lean_object* x_599; +if (x_596 == 0) +{ +lean_object* x_610; +x_610 = lean_box(0); +x_599 = x_610; +goto block_609; +} +else +{ +uint8_t x_611; +x_611 = l_Lean_Expr_isLambda(x_597); +if (x_611 == 0) +{ +lean_object* x_612; +x_612 = lean_box(0); +x_599 = x_612; +goto block_609; +} +else +{ +lean_object* x_613; uint8_t x_614; +x_613 = l_Lean_Expr_betaRev(x_597, x_2); +lean_dec(x_597); +x_614 = lean_expr_has_expr_mvar(x_613); +if (x_614 == 0) +{ +uint8_t x_615; +x_615 = lean_expr_has_level_mvar(x_613); +if (x_615 == 0) +{ +lean_object* x_616; +x_616 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_616, 0, x_613); +lean_ctor_set(x_616, 1, x_598); +return x_616; +} +else +{ +lean_object* x_617; lean_object* x_618; +x_617 = lean_ctor_get(x_598, 1); +lean_inc(x_617); +x_618 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_617, x_613); +lean_dec(x_617); +if (lean_obj_tag(x_618) == 0) +{ +lean_object* x_619; uint8_t x_620; +lean_inc(x_613); +x_619 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_613, x_598); +x_620 = !lean_is_exclusive(x_619); +if (x_620 == 0) +{ +lean_object* x_621; uint8_t x_622; +x_621 = lean_ctor_get(x_619, 1); +x_622 = !lean_is_exclusive(x_621); +if (x_622 == 0) +{ +lean_object* x_623; lean_object* x_624; lean_object* x_625; +x_623 = lean_ctor_get(x_619, 0); +x_624 = lean_ctor_get(x_621, 1); +lean_inc(x_623); +x_625 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_624, x_613, x_623); +lean_ctor_set(x_621, 1, x_625); +return x_619; +} +else +{ +lean_object* x_626; lean_object* x_627; lean_object* x_628; lean_object* x_629; lean_object* x_630; +x_626 = lean_ctor_get(x_619, 0); +x_627 = lean_ctor_get(x_621, 0); +x_628 = lean_ctor_get(x_621, 1); +lean_inc(x_628); +lean_inc(x_627); +lean_dec(x_621); +lean_inc(x_626); +x_629 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_628, x_613, x_626); +x_630 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_630, 0, x_627); +lean_ctor_set(x_630, 1, x_629); +lean_ctor_set(x_619, 1, x_630); +return x_619; +} +} +else +{ +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; +x_631 = lean_ctor_get(x_619, 1); +x_632 = lean_ctor_get(x_619, 0); +lean_inc(x_631); +lean_inc(x_632); +lean_dec(x_619); +x_633 = lean_ctor_get(x_631, 0); +lean_inc(x_633); +x_634 = lean_ctor_get(x_631, 1); +lean_inc(x_634); +if (lean_is_exclusive(x_631)) { + lean_ctor_release(x_631, 0); + lean_ctor_release(x_631, 1); + x_635 = x_631; +} else { + lean_dec_ref(x_631); + x_635 = lean_box(0); +} +lean_inc(x_632); +x_636 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_634, x_613, x_632); +if (lean_is_scalar(x_635)) { + x_637 = lean_alloc_ctor(0, 2, 0); +} else { + x_637 = x_635; +} +lean_ctor_set(x_637, 0, x_633); +lean_ctor_set(x_637, 1, x_636); +x_638 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_638, 0, x_632); +lean_ctor_set(x_638, 1, x_637); +return x_638; +} +} +else +{ +lean_object* x_639; lean_object* x_640; +lean_dec(x_613); +x_639 = lean_ctor_get(x_618, 0); +lean_inc(x_639); +lean_dec(x_618); +x_640 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_640, 0, x_639); +lean_ctor_set(x_640, 1, x_598); +return x_640; +} +} +} +else +{ +lean_object* x_641; lean_object* x_642; +x_641 = lean_ctor_get(x_598, 1); +lean_inc(x_641); +x_642 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_641, x_613); +lean_dec(x_641); +if (lean_obj_tag(x_642) == 0) +{ +lean_object* x_643; uint8_t x_644; +lean_inc(x_613); +x_643 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_613, x_598); +x_644 = !lean_is_exclusive(x_643); +if (x_644 == 0) +{ +lean_object* x_645; uint8_t x_646; +x_645 = lean_ctor_get(x_643, 1); +x_646 = !lean_is_exclusive(x_645); +if (x_646 == 0) +{ +lean_object* x_647; lean_object* x_648; lean_object* x_649; +x_647 = lean_ctor_get(x_643, 0); +x_648 = lean_ctor_get(x_645, 1); +lean_inc(x_647); +x_649 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_648, x_613, x_647); +lean_ctor_set(x_645, 1, x_649); +return x_643; +} +else +{ +lean_object* x_650; lean_object* x_651; lean_object* x_652; lean_object* x_653; lean_object* x_654; +x_650 = lean_ctor_get(x_643, 0); +x_651 = lean_ctor_get(x_645, 0); +x_652 = lean_ctor_get(x_645, 1); +lean_inc(x_652); +lean_inc(x_651); +lean_dec(x_645); +lean_inc(x_650); +x_653 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_652, x_613, x_650); +x_654 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_654, 0, x_651); +lean_ctor_set(x_654, 1, x_653); +lean_ctor_set(x_643, 1, x_654); +return x_643; +} +} +else +{ +lean_object* x_655; lean_object* x_656; lean_object* x_657; lean_object* x_658; lean_object* x_659; lean_object* x_660; lean_object* x_661; lean_object* x_662; +x_655 = lean_ctor_get(x_643, 1); +x_656 = lean_ctor_get(x_643, 0); +lean_inc(x_655); +lean_inc(x_656); +lean_dec(x_643); +x_657 = lean_ctor_get(x_655, 0); +lean_inc(x_657); +x_658 = lean_ctor_get(x_655, 1); +lean_inc(x_658); +if (lean_is_exclusive(x_655)) { + lean_ctor_release(x_655, 0); + lean_ctor_release(x_655, 1); + x_659 = x_655; +} else { + lean_dec_ref(x_655); + x_659 = lean_box(0); +} +lean_inc(x_656); +x_660 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_658, x_613, x_656); +if (lean_is_scalar(x_659)) { + x_661 = lean_alloc_ctor(0, 2, 0); +} else { + x_661 = x_659; +} +lean_ctor_set(x_661, 0, x_657); +lean_ctor_set(x_661, 1, x_660); +x_662 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_662, 0, x_656); +lean_ctor_set(x_662, 1, x_661); +return x_662; +} +} +else +{ +lean_object* x_663; lean_object* x_664; +lean_dec(x_613); +x_663 = lean_ctor_get(x_642, 0); +lean_inc(x_663); +lean_dec(x_642); +x_664 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_664, 0, x_663); +lean_ctor_set(x_664, 1, x_598); +return x_664; +} +} +} +} +block_609: +{ +lean_object* x_600; lean_object* x_601; uint8_t x_602; +lean_dec(x_599); +x_600 = lean_unsigned_to_nat(0u); +x_601 = l_Array_ummapAux___main___at_Lean_MetavarContext_instantiateExprMVars___spec__7(x_600, x_2, x_598); +x_602 = !lean_is_exclusive(x_601); +if (x_602 == 0) +{ +lean_object* x_603; lean_object* x_604; +x_603 = lean_ctor_get(x_601, 0); +x_604 = l_Lean_mkAppRev(x_597, x_603); +lean_dec(x_603); +lean_ctor_set(x_601, 0, x_604); +return x_601; +} +else +{ +lean_object* x_605; lean_object* x_606; lean_object* x_607; lean_object* x_608; +x_605 = lean_ctor_get(x_601, 0); +x_606 = lean_ctor_get(x_601, 1); +lean_inc(x_606); +lean_inc(x_605); +lean_dec(x_601); +x_607 = l_Lean_mkAppRev(x_597, x_605); +lean_dec(x_605); +x_608 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_608, 0, x_607); +lean_ctor_set(x_608, 1, x_606); +return x_608; +} +} +} +} +case 8: +{ +uint8_t x_694; lean_object* x_695; lean_object* x_696; uint8_t x_764; +x_694 = l_Lean_Expr_isMVar(x_1); +x_764 = lean_expr_has_expr_mvar(x_1); +if (x_764 == 0) +{ +uint8_t x_765; +x_765 = lean_expr_has_level_mvar(x_1); +if (x_765 == 0) +{ +x_695 = x_1; +x_696 = x_3; +goto block_763; +} +else +{ +lean_object* x_766; lean_object* x_767; +x_766 = lean_ctor_get(x_3, 1); +lean_inc(x_766); +x_767 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_766, x_1); +lean_dec(x_766); +if (lean_obj_tag(x_767) == 0) +{ +lean_object* x_768; lean_object* x_769; lean_object* x_770; uint8_t x_771; +lean_inc(x_1); +x_768 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_1, x_3); +x_769 = lean_ctor_get(x_768, 1); +lean_inc(x_769); +x_770 = lean_ctor_get(x_768, 0); +lean_inc(x_770); +lean_dec(x_768); +x_771 = !lean_is_exclusive(x_769); +if (x_771 == 0) +{ +lean_object* x_772; lean_object* x_773; +x_772 = lean_ctor_get(x_769, 1); +lean_inc(x_770); +x_773 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_772, x_1, x_770); +lean_ctor_set(x_769, 1, x_773); +x_695 = x_770; +x_696 = x_769; +goto block_763; +} +else +{ +lean_object* x_774; lean_object* x_775; lean_object* x_776; lean_object* x_777; +x_774 = lean_ctor_get(x_769, 0); +x_775 = lean_ctor_get(x_769, 1); +lean_inc(x_775); +lean_inc(x_774); +lean_dec(x_769); +lean_inc(x_770); +x_776 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_775, x_1, x_770); +x_777 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_777, 0, x_774); +lean_ctor_set(x_777, 1, x_776); +x_695 = x_770; +x_696 = x_777; +goto block_763; +} +} +else +{ +lean_object* x_778; +lean_dec(x_1); +x_778 = lean_ctor_get(x_767, 0); +lean_inc(x_778); +lean_dec(x_767); +x_695 = x_778; +x_696 = x_3; +goto block_763; +} +} +} +else +{ +lean_object* x_779; lean_object* x_780; +x_779 = lean_ctor_get(x_3, 1); +lean_inc(x_779); +x_780 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_779, x_1); +lean_dec(x_779); +if (lean_obj_tag(x_780) == 0) +{ +lean_object* x_781; lean_object* x_782; lean_object* x_783; uint8_t x_784; +lean_inc(x_1); +x_781 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_1, x_3); +x_782 = lean_ctor_get(x_781, 1); +lean_inc(x_782); +x_783 = lean_ctor_get(x_781, 0); +lean_inc(x_783); +lean_dec(x_781); +x_784 = !lean_is_exclusive(x_782); +if (x_784 == 0) +{ +lean_object* x_785; lean_object* x_786; +x_785 = lean_ctor_get(x_782, 1); +lean_inc(x_783); +x_786 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_785, x_1, x_783); +lean_ctor_set(x_782, 1, x_786); +x_695 = x_783; +x_696 = x_782; +goto block_763; +} +else +{ +lean_object* x_787; lean_object* x_788; lean_object* x_789; lean_object* x_790; +x_787 = lean_ctor_get(x_782, 0); +x_788 = lean_ctor_get(x_782, 1); +lean_inc(x_788); +lean_inc(x_787); +lean_dec(x_782); +lean_inc(x_783); +x_789 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_788, x_1, x_783); +x_790 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_790, 0, x_787); +lean_ctor_set(x_790, 1, x_789); +x_695 = x_783; +x_696 = x_790; +goto block_763; +} +} +else +{ +lean_object* x_791; +lean_dec(x_1); +x_791 = lean_ctor_get(x_780, 0); +lean_inc(x_791); +lean_dec(x_780); +x_695 = x_791; +x_696 = x_3; +goto block_763; +} +} +block_763: +{ +lean_object* x_697; +if (x_694 == 0) +{ +lean_object* x_708; +x_708 = lean_box(0); +x_697 = x_708; +goto block_707; +} +else +{ +uint8_t x_709; +x_709 = l_Lean_Expr_isLambda(x_695); +if (x_709 == 0) +{ +lean_object* x_710; +x_710 = lean_box(0); +x_697 = x_710; +goto block_707; +} +else +{ +lean_object* x_711; uint8_t x_712; +x_711 = l_Lean_Expr_betaRev(x_695, x_2); +lean_dec(x_695); +x_712 = lean_expr_has_expr_mvar(x_711); +if (x_712 == 0) +{ +uint8_t x_713; +x_713 = lean_expr_has_level_mvar(x_711); +if (x_713 == 0) +{ +lean_object* x_714; +x_714 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_714, 0, x_711); +lean_ctor_set(x_714, 1, x_696); +return x_714; +} +else +{ +lean_object* x_715; lean_object* x_716; +x_715 = lean_ctor_get(x_696, 1); +lean_inc(x_715); +x_716 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_715, x_711); +lean_dec(x_715); +if (lean_obj_tag(x_716) == 0) +{ +lean_object* x_717; uint8_t x_718; +lean_inc(x_711); +x_717 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_711, x_696); +x_718 = !lean_is_exclusive(x_717); +if (x_718 == 0) +{ +lean_object* x_719; uint8_t x_720; +x_719 = lean_ctor_get(x_717, 1); +x_720 = !lean_is_exclusive(x_719); +if (x_720 == 0) +{ +lean_object* x_721; lean_object* x_722; lean_object* x_723; +x_721 = lean_ctor_get(x_717, 0); +x_722 = lean_ctor_get(x_719, 1); +lean_inc(x_721); +x_723 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_722, x_711, x_721); +lean_ctor_set(x_719, 1, x_723); +return x_717; +} +else +{ +lean_object* x_724; lean_object* x_725; lean_object* x_726; lean_object* x_727; lean_object* x_728; +x_724 = lean_ctor_get(x_717, 0); +x_725 = lean_ctor_get(x_719, 0); +x_726 = lean_ctor_get(x_719, 1); +lean_inc(x_726); +lean_inc(x_725); +lean_dec(x_719); +lean_inc(x_724); +x_727 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_726, x_711, x_724); +x_728 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_728, 0, x_725); +lean_ctor_set(x_728, 1, x_727); +lean_ctor_set(x_717, 1, x_728); +return x_717; +} +} +else +{ +lean_object* x_729; lean_object* x_730; lean_object* x_731; lean_object* x_732; lean_object* x_733; lean_object* x_734; lean_object* x_735; lean_object* x_736; +x_729 = lean_ctor_get(x_717, 1); +x_730 = lean_ctor_get(x_717, 0); +lean_inc(x_729); +lean_inc(x_730); +lean_dec(x_717); +x_731 = lean_ctor_get(x_729, 0); +lean_inc(x_731); +x_732 = lean_ctor_get(x_729, 1); +lean_inc(x_732); +if (lean_is_exclusive(x_729)) { + lean_ctor_release(x_729, 0); + lean_ctor_release(x_729, 1); + x_733 = x_729; +} else { + lean_dec_ref(x_729); + x_733 = lean_box(0); +} +lean_inc(x_730); +x_734 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_732, x_711, x_730); +if (lean_is_scalar(x_733)) { + x_735 = lean_alloc_ctor(0, 2, 0); +} else { + x_735 = x_733; +} +lean_ctor_set(x_735, 0, x_731); +lean_ctor_set(x_735, 1, x_734); +x_736 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_736, 0, x_730); +lean_ctor_set(x_736, 1, x_735); +return x_736; +} +} +else +{ +lean_object* x_737; lean_object* x_738; +lean_dec(x_711); +x_737 = lean_ctor_get(x_716, 0); +lean_inc(x_737); +lean_dec(x_716); +x_738 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_738, 0, x_737); +lean_ctor_set(x_738, 1, x_696); +return x_738; +} +} +} +else +{ +lean_object* x_739; lean_object* x_740; +x_739 = lean_ctor_get(x_696, 1); +lean_inc(x_739); +x_740 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_739, x_711); +lean_dec(x_739); +if (lean_obj_tag(x_740) == 0) +{ +lean_object* x_741; uint8_t x_742; +lean_inc(x_711); +x_741 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_711, x_696); +x_742 = !lean_is_exclusive(x_741); +if (x_742 == 0) +{ +lean_object* x_743; uint8_t x_744; +x_743 = lean_ctor_get(x_741, 1); +x_744 = !lean_is_exclusive(x_743); +if (x_744 == 0) +{ +lean_object* x_745; lean_object* x_746; lean_object* x_747; +x_745 = lean_ctor_get(x_741, 0); +x_746 = lean_ctor_get(x_743, 1); +lean_inc(x_745); +x_747 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_746, x_711, x_745); +lean_ctor_set(x_743, 1, x_747); +return x_741; +} +else +{ +lean_object* x_748; lean_object* x_749; lean_object* x_750; lean_object* x_751; lean_object* x_752; +x_748 = lean_ctor_get(x_741, 0); +x_749 = lean_ctor_get(x_743, 0); +x_750 = lean_ctor_get(x_743, 1); +lean_inc(x_750); +lean_inc(x_749); +lean_dec(x_743); +lean_inc(x_748); +x_751 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_750, x_711, x_748); +x_752 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_752, 0, x_749); +lean_ctor_set(x_752, 1, x_751); +lean_ctor_set(x_741, 1, x_752); +return x_741; +} +} +else +{ +lean_object* x_753; lean_object* x_754; lean_object* x_755; lean_object* x_756; lean_object* x_757; lean_object* x_758; lean_object* x_759; lean_object* x_760; +x_753 = lean_ctor_get(x_741, 1); +x_754 = lean_ctor_get(x_741, 0); +lean_inc(x_753); +lean_inc(x_754); +lean_dec(x_741); +x_755 = lean_ctor_get(x_753, 0); +lean_inc(x_755); +x_756 = lean_ctor_get(x_753, 1); +lean_inc(x_756); +if (lean_is_exclusive(x_753)) { + lean_ctor_release(x_753, 0); + lean_ctor_release(x_753, 1); + x_757 = x_753; +} else { + lean_dec_ref(x_753); + x_757 = lean_box(0); +} +lean_inc(x_754); +x_758 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_756, x_711, x_754); +if (lean_is_scalar(x_757)) { + x_759 = lean_alloc_ctor(0, 2, 0); +} else { + x_759 = x_757; +} +lean_ctor_set(x_759, 0, x_755); +lean_ctor_set(x_759, 1, x_758); +x_760 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_760, 0, x_754); +lean_ctor_set(x_760, 1, x_759); +return x_760; +} +} +else +{ +lean_object* x_761; lean_object* x_762; +lean_dec(x_711); +x_761 = lean_ctor_get(x_740, 0); +lean_inc(x_761); +lean_dec(x_740); +x_762 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_762, 0, x_761); +lean_ctor_set(x_762, 1, x_696); +return x_762; +} +} +} +} +block_707: +{ +lean_object* x_698; lean_object* x_699; uint8_t x_700; +lean_dec(x_697); +x_698 = lean_unsigned_to_nat(0u); +x_699 = l_Array_ummapAux___main___at_Lean_MetavarContext_instantiateExprMVars___spec__7(x_698, x_2, x_696); +x_700 = !lean_is_exclusive(x_699); +if (x_700 == 0) +{ +lean_object* x_701; lean_object* x_702; +x_701 = lean_ctor_get(x_699, 0); +x_702 = l_Lean_mkAppRev(x_695, x_701); +lean_dec(x_701); +lean_ctor_set(x_699, 0, x_702); +return x_699; +} +else +{ +lean_object* x_703; lean_object* x_704; lean_object* x_705; lean_object* x_706; +x_703 = lean_ctor_get(x_699, 0); +x_704 = lean_ctor_get(x_699, 1); +lean_inc(x_704); +lean_inc(x_703); +lean_dec(x_699); +x_705 = l_Lean_mkAppRev(x_695, x_703); +lean_dec(x_703); +x_706 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_706, 0, x_705); +lean_ctor_set(x_706, 1, x_704); +return x_706; +} +} +} +} +case 9: +{ +uint8_t x_792; lean_object* x_793; lean_object* x_794; uint8_t x_862; +x_792 = l_Lean_Expr_isMVar(x_1); +x_862 = lean_expr_has_expr_mvar(x_1); +if (x_862 == 0) +{ +uint8_t x_863; +x_863 = lean_expr_has_level_mvar(x_1); +if (x_863 == 0) +{ +x_793 = x_1; +x_794 = x_3; +goto block_861; +} +else +{ +lean_object* x_864; lean_object* x_865; +x_864 = lean_ctor_get(x_3, 1); +lean_inc(x_864); +x_865 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_864, x_1); +lean_dec(x_864); +if (lean_obj_tag(x_865) == 0) +{ +lean_object* x_866; lean_object* x_867; lean_object* x_868; uint8_t x_869; +lean_inc(x_1); +x_866 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_1, x_3); +x_867 = lean_ctor_get(x_866, 1); +lean_inc(x_867); +x_868 = lean_ctor_get(x_866, 0); +lean_inc(x_868); +lean_dec(x_866); +x_869 = !lean_is_exclusive(x_867); +if (x_869 == 0) +{ +lean_object* x_870; lean_object* x_871; +x_870 = lean_ctor_get(x_867, 1); +lean_inc(x_868); +x_871 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_870, x_1, x_868); +lean_ctor_set(x_867, 1, x_871); +x_793 = x_868; +x_794 = x_867; +goto block_861; +} +else +{ +lean_object* x_872; lean_object* x_873; lean_object* x_874; lean_object* x_875; +x_872 = lean_ctor_get(x_867, 0); +x_873 = lean_ctor_get(x_867, 1); +lean_inc(x_873); +lean_inc(x_872); +lean_dec(x_867); +lean_inc(x_868); +x_874 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_873, x_1, x_868); +x_875 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_875, 0, x_872); +lean_ctor_set(x_875, 1, x_874); +x_793 = x_868; +x_794 = x_875; +goto block_861; +} +} +else +{ +lean_object* x_876; +lean_dec(x_1); +x_876 = lean_ctor_get(x_865, 0); +lean_inc(x_876); +lean_dec(x_865); +x_793 = x_876; +x_794 = x_3; +goto block_861; +} +} +} +else +{ +lean_object* x_877; lean_object* x_878; +x_877 = lean_ctor_get(x_3, 1); +lean_inc(x_877); +x_878 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_877, x_1); +lean_dec(x_877); +if (lean_obj_tag(x_878) == 0) +{ +lean_object* x_879; lean_object* x_880; lean_object* x_881; uint8_t x_882; +lean_inc(x_1); +x_879 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_1, x_3); +x_880 = lean_ctor_get(x_879, 1); +lean_inc(x_880); +x_881 = lean_ctor_get(x_879, 0); +lean_inc(x_881); +lean_dec(x_879); +x_882 = !lean_is_exclusive(x_880); +if (x_882 == 0) +{ +lean_object* x_883; lean_object* x_884; +x_883 = lean_ctor_get(x_880, 1); +lean_inc(x_881); +x_884 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_883, x_1, x_881); +lean_ctor_set(x_880, 1, x_884); +x_793 = x_881; +x_794 = x_880; +goto block_861; +} +else +{ +lean_object* x_885; lean_object* x_886; lean_object* x_887; lean_object* x_888; +x_885 = lean_ctor_get(x_880, 0); +x_886 = lean_ctor_get(x_880, 1); +lean_inc(x_886); +lean_inc(x_885); +lean_dec(x_880); +lean_inc(x_881); +x_887 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_886, x_1, x_881); +x_888 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_888, 0, x_885); +lean_ctor_set(x_888, 1, x_887); +x_793 = x_881; +x_794 = x_888; +goto block_861; +} +} +else +{ +lean_object* x_889; +lean_dec(x_1); +x_889 = lean_ctor_get(x_878, 0); +lean_inc(x_889); +lean_dec(x_878); +x_793 = x_889; +x_794 = x_3; +goto block_861; +} +} +block_861: +{ +lean_object* x_795; +if (x_792 == 0) +{ +lean_object* x_806; +x_806 = lean_box(0); +x_795 = x_806; +goto block_805; +} +else +{ +uint8_t x_807; +x_807 = l_Lean_Expr_isLambda(x_793); +if (x_807 == 0) +{ +lean_object* x_808; +x_808 = lean_box(0); +x_795 = x_808; +goto block_805; +} +else +{ +lean_object* x_809; uint8_t x_810; +x_809 = l_Lean_Expr_betaRev(x_793, x_2); +lean_dec(x_793); +x_810 = lean_expr_has_expr_mvar(x_809); +if (x_810 == 0) +{ +uint8_t x_811; +x_811 = lean_expr_has_level_mvar(x_809); +if (x_811 == 0) +{ +lean_object* x_812; +x_812 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_812, 0, x_809); +lean_ctor_set(x_812, 1, x_794); +return x_812; +} +else +{ +lean_object* x_813; lean_object* x_814; +x_813 = lean_ctor_get(x_794, 1); +lean_inc(x_813); +x_814 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_813, x_809); +lean_dec(x_813); +if (lean_obj_tag(x_814) == 0) +{ +lean_object* x_815; uint8_t x_816; +lean_inc(x_809); +x_815 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_809, x_794); +x_816 = !lean_is_exclusive(x_815); +if (x_816 == 0) +{ +lean_object* x_817; uint8_t x_818; +x_817 = lean_ctor_get(x_815, 1); +x_818 = !lean_is_exclusive(x_817); +if (x_818 == 0) +{ +lean_object* x_819; lean_object* x_820; lean_object* x_821; +x_819 = lean_ctor_get(x_815, 0); +x_820 = lean_ctor_get(x_817, 1); +lean_inc(x_819); +x_821 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_820, x_809, x_819); +lean_ctor_set(x_817, 1, x_821); +return x_815; +} +else +{ +lean_object* x_822; lean_object* x_823; lean_object* x_824; lean_object* x_825; lean_object* x_826; +x_822 = lean_ctor_get(x_815, 0); +x_823 = lean_ctor_get(x_817, 0); +x_824 = lean_ctor_get(x_817, 1); +lean_inc(x_824); +lean_inc(x_823); +lean_dec(x_817); +lean_inc(x_822); +x_825 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_824, x_809, x_822); +x_826 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_826, 0, x_823); +lean_ctor_set(x_826, 1, x_825); +lean_ctor_set(x_815, 1, x_826); +return x_815; +} +} +else +{ +lean_object* x_827; lean_object* x_828; lean_object* x_829; lean_object* x_830; lean_object* x_831; lean_object* x_832; lean_object* x_833; lean_object* x_834; +x_827 = lean_ctor_get(x_815, 1); +x_828 = lean_ctor_get(x_815, 0); +lean_inc(x_827); +lean_inc(x_828); +lean_dec(x_815); +x_829 = lean_ctor_get(x_827, 0); +lean_inc(x_829); +x_830 = lean_ctor_get(x_827, 1); +lean_inc(x_830); +if (lean_is_exclusive(x_827)) { + lean_ctor_release(x_827, 0); + lean_ctor_release(x_827, 1); + x_831 = x_827; +} else { + lean_dec_ref(x_827); + x_831 = lean_box(0); +} +lean_inc(x_828); +x_832 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_830, x_809, x_828); +if (lean_is_scalar(x_831)) { + x_833 = lean_alloc_ctor(0, 2, 0); +} else { + x_833 = x_831; +} +lean_ctor_set(x_833, 0, x_829); +lean_ctor_set(x_833, 1, x_832); +x_834 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_834, 0, x_828); +lean_ctor_set(x_834, 1, x_833); +return x_834; +} +} +else +{ +lean_object* x_835; lean_object* x_836; +lean_dec(x_809); +x_835 = lean_ctor_get(x_814, 0); +lean_inc(x_835); +lean_dec(x_814); +x_836 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_836, 0, x_835); +lean_ctor_set(x_836, 1, x_794); +return x_836; +} +} +} +else +{ +lean_object* x_837; lean_object* x_838; +x_837 = lean_ctor_get(x_794, 1); +lean_inc(x_837); +x_838 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_837, x_809); +lean_dec(x_837); +if (lean_obj_tag(x_838) == 0) +{ +lean_object* x_839; uint8_t x_840; +lean_inc(x_809); +x_839 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_809, x_794); +x_840 = !lean_is_exclusive(x_839); +if (x_840 == 0) +{ +lean_object* x_841; uint8_t x_842; +x_841 = lean_ctor_get(x_839, 1); +x_842 = !lean_is_exclusive(x_841); +if (x_842 == 0) +{ +lean_object* x_843; lean_object* x_844; lean_object* x_845; +x_843 = lean_ctor_get(x_839, 0); +x_844 = lean_ctor_get(x_841, 1); +lean_inc(x_843); +x_845 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_844, x_809, x_843); +lean_ctor_set(x_841, 1, x_845); +return x_839; +} +else +{ +lean_object* x_846; lean_object* x_847; lean_object* x_848; lean_object* x_849; lean_object* x_850; +x_846 = lean_ctor_get(x_839, 0); +x_847 = lean_ctor_get(x_841, 0); +x_848 = lean_ctor_get(x_841, 1); +lean_inc(x_848); +lean_inc(x_847); +lean_dec(x_841); +lean_inc(x_846); +x_849 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_848, x_809, x_846); +x_850 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_850, 0, x_847); +lean_ctor_set(x_850, 1, x_849); +lean_ctor_set(x_839, 1, x_850); +return x_839; +} +} +else +{ +lean_object* x_851; lean_object* x_852; lean_object* x_853; lean_object* x_854; lean_object* x_855; lean_object* x_856; lean_object* x_857; lean_object* x_858; +x_851 = lean_ctor_get(x_839, 1); +x_852 = lean_ctor_get(x_839, 0); +lean_inc(x_851); +lean_inc(x_852); +lean_dec(x_839); +x_853 = lean_ctor_get(x_851, 0); +lean_inc(x_853); +x_854 = lean_ctor_get(x_851, 1); +lean_inc(x_854); +if (lean_is_exclusive(x_851)) { + lean_ctor_release(x_851, 0); + lean_ctor_release(x_851, 1); + x_855 = x_851; +} else { + lean_dec_ref(x_851); + x_855 = lean_box(0); +} +lean_inc(x_852); +x_856 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_854, x_809, x_852); +if (lean_is_scalar(x_855)) { + x_857 = lean_alloc_ctor(0, 2, 0); +} else { + x_857 = x_855; +} +lean_ctor_set(x_857, 0, x_853); +lean_ctor_set(x_857, 1, x_856); +x_858 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_858, 0, x_852); +lean_ctor_set(x_858, 1, x_857); +return x_858; +} +} +else +{ +lean_object* x_859; lean_object* x_860; +lean_dec(x_809); +x_859 = lean_ctor_get(x_838, 0); +lean_inc(x_859); +lean_dec(x_838); +x_860 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_860, 0, x_859); +lean_ctor_set(x_860, 1, x_794); +return x_860; +} +} +} +} +block_805: +{ +lean_object* x_796; lean_object* x_797; uint8_t x_798; +lean_dec(x_795); +x_796 = lean_unsigned_to_nat(0u); +x_797 = l_Array_ummapAux___main___at_Lean_MetavarContext_instantiateExprMVars___spec__7(x_796, x_2, x_794); +x_798 = !lean_is_exclusive(x_797); +if (x_798 == 0) +{ +lean_object* x_799; lean_object* x_800; +x_799 = lean_ctor_get(x_797, 0); +x_800 = l_Lean_mkAppRev(x_793, x_799); +lean_dec(x_799); +lean_ctor_set(x_797, 0, x_800); +return x_797; +} +else +{ +lean_object* x_801; lean_object* x_802; lean_object* x_803; lean_object* x_804; +x_801 = lean_ctor_get(x_797, 0); +x_802 = lean_ctor_get(x_797, 1); +lean_inc(x_802); +lean_inc(x_801); +lean_dec(x_797); +x_803 = l_Lean_mkAppRev(x_793, x_801); +lean_dec(x_801); +x_804 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_804, 0, x_803); +lean_ctor_set(x_804, 1, x_802); +return x_804; +} +} +} +} +case 10: +{ +uint8_t x_890; lean_object* x_891; lean_object* x_892; uint8_t x_960; +x_890 = l_Lean_Expr_isMVar(x_1); +x_960 = lean_expr_has_expr_mvar(x_1); +if (x_960 == 0) +{ +uint8_t x_961; +x_961 = lean_expr_has_level_mvar(x_1); +if (x_961 == 0) +{ +x_891 = x_1; +x_892 = x_3; +goto block_959; +} +else +{ +lean_object* x_962; lean_object* x_963; +x_962 = lean_ctor_get(x_3, 1); +lean_inc(x_962); +x_963 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_962, x_1); +lean_dec(x_962); +if (lean_obj_tag(x_963) == 0) +{ +lean_object* x_964; lean_object* x_965; lean_object* x_966; uint8_t x_967; +lean_inc(x_1); +x_964 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_1, x_3); +x_965 = lean_ctor_get(x_964, 1); +lean_inc(x_965); +x_966 = lean_ctor_get(x_964, 0); +lean_inc(x_966); +lean_dec(x_964); +x_967 = !lean_is_exclusive(x_965); +if (x_967 == 0) +{ +lean_object* x_968; lean_object* x_969; +x_968 = lean_ctor_get(x_965, 1); +lean_inc(x_966); +x_969 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_968, x_1, x_966); +lean_ctor_set(x_965, 1, x_969); +x_891 = x_966; +x_892 = x_965; +goto block_959; +} +else +{ +lean_object* x_970; lean_object* x_971; lean_object* x_972; lean_object* x_973; +x_970 = lean_ctor_get(x_965, 0); +x_971 = lean_ctor_get(x_965, 1); +lean_inc(x_971); +lean_inc(x_970); +lean_dec(x_965); +lean_inc(x_966); +x_972 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_971, x_1, x_966); +x_973 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_973, 0, x_970); +lean_ctor_set(x_973, 1, x_972); +x_891 = x_966; +x_892 = x_973; +goto block_959; +} +} +else +{ +lean_object* x_974; +lean_dec(x_1); +x_974 = lean_ctor_get(x_963, 0); +lean_inc(x_974); +lean_dec(x_963); +x_891 = x_974; +x_892 = x_3; +goto block_959; +} +} +} +else +{ +lean_object* x_975; lean_object* x_976; +x_975 = lean_ctor_get(x_3, 1); +lean_inc(x_975); +x_976 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_975, x_1); +lean_dec(x_975); +if (lean_obj_tag(x_976) == 0) +{ +lean_object* x_977; lean_object* x_978; lean_object* x_979; uint8_t x_980; +lean_inc(x_1); +x_977 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_1, x_3); +x_978 = lean_ctor_get(x_977, 1); +lean_inc(x_978); +x_979 = lean_ctor_get(x_977, 0); +lean_inc(x_979); +lean_dec(x_977); +x_980 = !lean_is_exclusive(x_978); +if (x_980 == 0) +{ +lean_object* x_981; lean_object* x_982; +x_981 = lean_ctor_get(x_978, 1); +lean_inc(x_979); +x_982 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_981, x_1, x_979); +lean_ctor_set(x_978, 1, x_982); +x_891 = x_979; +x_892 = x_978; +goto block_959; +} +else +{ +lean_object* x_983; lean_object* x_984; lean_object* x_985; lean_object* x_986; +x_983 = lean_ctor_get(x_978, 0); +x_984 = lean_ctor_get(x_978, 1); +lean_inc(x_984); +lean_inc(x_983); +lean_dec(x_978); +lean_inc(x_979); +x_985 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_984, x_1, x_979); +x_986 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_986, 0, x_983); +lean_ctor_set(x_986, 1, x_985); +x_891 = x_979; +x_892 = x_986; +goto block_959; +} +} +else +{ +lean_object* x_987; +lean_dec(x_1); +x_987 = lean_ctor_get(x_976, 0); +lean_inc(x_987); +lean_dec(x_976); +x_891 = x_987; +x_892 = x_3; +goto block_959; +} +} +block_959: +{ +lean_object* x_893; +if (x_890 == 0) +{ +lean_object* x_904; +x_904 = lean_box(0); +x_893 = x_904; +goto block_903; +} +else +{ +uint8_t x_905; +x_905 = l_Lean_Expr_isLambda(x_891); +if (x_905 == 0) +{ +lean_object* x_906; +x_906 = lean_box(0); +x_893 = x_906; +goto block_903; +} +else +{ +lean_object* x_907; uint8_t x_908; +x_907 = l_Lean_Expr_betaRev(x_891, x_2); +lean_dec(x_891); +x_908 = lean_expr_has_expr_mvar(x_907); +if (x_908 == 0) +{ +uint8_t x_909; +x_909 = lean_expr_has_level_mvar(x_907); +if (x_909 == 0) +{ +lean_object* x_910; +x_910 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_910, 0, x_907); +lean_ctor_set(x_910, 1, x_892); +return x_910; +} +else +{ +lean_object* x_911; lean_object* x_912; +x_911 = lean_ctor_get(x_892, 1); +lean_inc(x_911); +x_912 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_911, x_907); +lean_dec(x_911); +if (lean_obj_tag(x_912) == 0) +{ +lean_object* x_913; uint8_t x_914; +lean_inc(x_907); +x_913 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_907, x_892); +x_914 = !lean_is_exclusive(x_913); +if (x_914 == 0) +{ +lean_object* x_915; uint8_t x_916; +x_915 = lean_ctor_get(x_913, 1); +x_916 = !lean_is_exclusive(x_915); +if (x_916 == 0) +{ +lean_object* x_917; lean_object* x_918; lean_object* x_919; +x_917 = lean_ctor_get(x_913, 0); +x_918 = lean_ctor_get(x_915, 1); +lean_inc(x_917); +x_919 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_918, x_907, x_917); +lean_ctor_set(x_915, 1, x_919); +return x_913; +} +else +{ +lean_object* x_920; lean_object* x_921; lean_object* x_922; lean_object* x_923; lean_object* x_924; +x_920 = lean_ctor_get(x_913, 0); +x_921 = lean_ctor_get(x_915, 0); +x_922 = lean_ctor_get(x_915, 1); +lean_inc(x_922); +lean_inc(x_921); +lean_dec(x_915); +lean_inc(x_920); +x_923 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_922, x_907, x_920); +x_924 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_924, 0, x_921); +lean_ctor_set(x_924, 1, x_923); +lean_ctor_set(x_913, 1, x_924); +return x_913; +} +} +else +{ +lean_object* x_925; lean_object* x_926; lean_object* x_927; lean_object* x_928; lean_object* x_929; lean_object* x_930; lean_object* x_931; lean_object* x_932; +x_925 = lean_ctor_get(x_913, 1); +x_926 = lean_ctor_get(x_913, 0); +lean_inc(x_925); +lean_inc(x_926); +lean_dec(x_913); +x_927 = lean_ctor_get(x_925, 0); +lean_inc(x_927); +x_928 = lean_ctor_get(x_925, 1); +lean_inc(x_928); +if (lean_is_exclusive(x_925)) { + lean_ctor_release(x_925, 0); + lean_ctor_release(x_925, 1); + x_929 = x_925; +} else { + lean_dec_ref(x_925); + x_929 = lean_box(0); +} +lean_inc(x_926); +x_930 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_928, x_907, x_926); +if (lean_is_scalar(x_929)) { + x_931 = lean_alloc_ctor(0, 2, 0); +} else { + x_931 = x_929; +} +lean_ctor_set(x_931, 0, x_927); +lean_ctor_set(x_931, 1, x_930); +x_932 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_932, 0, x_926); +lean_ctor_set(x_932, 1, x_931); +return x_932; +} +} +else +{ +lean_object* x_933; lean_object* x_934; +lean_dec(x_907); +x_933 = lean_ctor_get(x_912, 0); +lean_inc(x_933); +lean_dec(x_912); +x_934 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_934, 0, x_933); +lean_ctor_set(x_934, 1, x_892); +return x_934; +} +} +} +else +{ +lean_object* x_935; lean_object* x_936; +x_935 = lean_ctor_get(x_892, 1); +lean_inc(x_935); +x_936 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_935, x_907); +lean_dec(x_935); +if (lean_obj_tag(x_936) == 0) +{ +lean_object* x_937; uint8_t x_938; +lean_inc(x_907); +x_937 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_907, x_892); +x_938 = !lean_is_exclusive(x_937); +if (x_938 == 0) +{ +lean_object* x_939; uint8_t x_940; +x_939 = lean_ctor_get(x_937, 1); +x_940 = !lean_is_exclusive(x_939); +if (x_940 == 0) +{ +lean_object* x_941; lean_object* x_942; lean_object* x_943; +x_941 = lean_ctor_get(x_937, 0); +x_942 = lean_ctor_get(x_939, 1); +lean_inc(x_941); +x_943 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_942, x_907, x_941); +lean_ctor_set(x_939, 1, x_943); +return x_937; +} +else +{ +lean_object* x_944; lean_object* x_945; lean_object* x_946; lean_object* x_947; lean_object* x_948; +x_944 = lean_ctor_get(x_937, 0); +x_945 = lean_ctor_get(x_939, 0); +x_946 = lean_ctor_get(x_939, 1); +lean_inc(x_946); +lean_inc(x_945); +lean_dec(x_939); +lean_inc(x_944); +x_947 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_946, x_907, x_944); +x_948 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_948, 0, x_945); +lean_ctor_set(x_948, 1, x_947); +lean_ctor_set(x_937, 1, x_948); +return x_937; +} +} +else +{ +lean_object* x_949; lean_object* x_950; lean_object* x_951; lean_object* x_952; lean_object* x_953; lean_object* x_954; lean_object* x_955; lean_object* x_956; +x_949 = lean_ctor_get(x_937, 1); +x_950 = lean_ctor_get(x_937, 0); +lean_inc(x_949); +lean_inc(x_950); +lean_dec(x_937); +x_951 = lean_ctor_get(x_949, 0); +lean_inc(x_951); +x_952 = lean_ctor_get(x_949, 1); +lean_inc(x_952); +if (lean_is_exclusive(x_949)) { + lean_ctor_release(x_949, 0); + lean_ctor_release(x_949, 1); + x_953 = x_949; +} else { + lean_dec_ref(x_949); + x_953 = lean_box(0); +} +lean_inc(x_950); +x_954 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_952, x_907, x_950); +if (lean_is_scalar(x_953)) { + x_955 = lean_alloc_ctor(0, 2, 0); +} else { + x_955 = x_953; +} +lean_ctor_set(x_955, 0, x_951); +lean_ctor_set(x_955, 1, x_954); +x_956 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_956, 0, x_950); +lean_ctor_set(x_956, 1, x_955); +return x_956; +} +} +else +{ +lean_object* x_957; lean_object* x_958; +lean_dec(x_907); +x_957 = lean_ctor_get(x_936, 0); +lean_inc(x_957); +lean_dec(x_936); +x_958 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_958, 0, x_957); +lean_ctor_set(x_958, 1, x_892); +return x_958; +} +} +} +} +block_903: +{ +lean_object* x_894; lean_object* x_895; uint8_t x_896; +lean_dec(x_893); +x_894 = lean_unsigned_to_nat(0u); +x_895 = l_Array_ummapAux___main___at_Lean_MetavarContext_instantiateExprMVars___spec__7(x_894, x_2, x_892); +x_896 = !lean_is_exclusive(x_895); +if (x_896 == 0) +{ +lean_object* x_897; lean_object* x_898; +x_897 = lean_ctor_get(x_895, 0); +x_898 = l_Lean_mkAppRev(x_891, x_897); +lean_dec(x_897); +lean_ctor_set(x_895, 0, x_898); +return x_895; +} +else +{ +lean_object* x_899; lean_object* x_900; lean_object* x_901; lean_object* x_902; +x_899 = lean_ctor_get(x_895, 0); +x_900 = lean_ctor_get(x_895, 1); +lean_inc(x_900); +lean_inc(x_899); +lean_dec(x_895); +x_901 = l_Lean_mkAppRev(x_891, x_899); +lean_dec(x_899); +x_902 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_902, 0, x_901); +lean_ctor_set(x_902, 1, x_900); +return x_902; +} +} +} +} +default: +{ +uint8_t x_988; lean_object* x_989; lean_object* x_990; uint8_t x_1058; +x_988 = l_Lean_Expr_isMVar(x_1); +x_1058 = lean_expr_has_expr_mvar(x_1); +if (x_1058 == 0) +{ +uint8_t x_1059; +x_1059 = lean_expr_has_level_mvar(x_1); +if (x_1059 == 0) +{ +x_989 = x_1; +x_990 = x_3; +goto block_1057; +} +else +{ +lean_object* x_1060; lean_object* x_1061; +x_1060 = lean_ctor_get(x_3, 1); +lean_inc(x_1060); +x_1061 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_1060, x_1); +lean_dec(x_1060); +if (lean_obj_tag(x_1061) == 0) +{ +lean_object* x_1062; lean_object* x_1063; lean_object* x_1064; uint8_t x_1065; +lean_inc(x_1); +x_1062 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_1, x_3); +x_1063 = lean_ctor_get(x_1062, 1); +lean_inc(x_1063); +x_1064 = lean_ctor_get(x_1062, 0); +lean_inc(x_1064); +lean_dec(x_1062); +x_1065 = !lean_is_exclusive(x_1063); +if (x_1065 == 0) +{ +lean_object* x_1066; lean_object* x_1067; +x_1066 = lean_ctor_get(x_1063, 1); +lean_inc(x_1064); +x_1067 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_1066, x_1, x_1064); +lean_ctor_set(x_1063, 1, x_1067); +x_989 = x_1064; +x_990 = x_1063; +goto block_1057; +} +else +{ +lean_object* x_1068; lean_object* x_1069; lean_object* x_1070; lean_object* x_1071; +x_1068 = lean_ctor_get(x_1063, 0); +x_1069 = lean_ctor_get(x_1063, 1); +lean_inc(x_1069); +lean_inc(x_1068); +lean_dec(x_1063); +lean_inc(x_1064); +x_1070 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_1069, x_1, x_1064); +x_1071 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_1071, 0, x_1068); +lean_ctor_set(x_1071, 1, x_1070); +x_989 = x_1064; +x_990 = x_1071; +goto block_1057; +} +} +else +{ +lean_object* x_1072; +lean_dec(x_1); +x_1072 = lean_ctor_get(x_1061, 0); +lean_inc(x_1072); +lean_dec(x_1061); +x_989 = x_1072; +x_990 = x_3; +goto block_1057; +} +} +} +else +{ +lean_object* x_1073; lean_object* x_1074; +x_1073 = lean_ctor_get(x_3, 1); +lean_inc(x_1073); +x_1074 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_1073, x_1); +lean_dec(x_1073); +if (lean_obj_tag(x_1074) == 0) +{ +lean_object* x_1075; lean_object* x_1076; lean_object* x_1077; uint8_t x_1078; +lean_inc(x_1); +x_1075 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_1, x_3); +x_1076 = lean_ctor_get(x_1075, 1); +lean_inc(x_1076); +x_1077 = lean_ctor_get(x_1075, 0); +lean_inc(x_1077); +lean_dec(x_1075); +x_1078 = !lean_is_exclusive(x_1076); +if (x_1078 == 0) +{ +lean_object* x_1079; lean_object* x_1080; +x_1079 = lean_ctor_get(x_1076, 1); +lean_inc(x_1077); +x_1080 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_1079, x_1, x_1077); +lean_ctor_set(x_1076, 1, x_1080); +x_989 = x_1077; +x_990 = x_1076; +goto block_1057; +} +else +{ +lean_object* x_1081; lean_object* x_1082; lean_object* x_1083; lean_object* x_1084; +x_1081 = lean_ctor_get(x_1076, 0); +x_1082 = lean_ctor_get(x_1076, 1); +lean_inc(x_1082); +lean_inc(x_1081); +lean_dec(x_1076); +lean_inc(x_1077); +x_1083 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_1082, x_1, x_1077); +x_1084 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_1084, 0, x_1081); +lean_ctor_set(x_1084, 1, x_1083); +x_989 = x_1077; +x_990 = x_1084; +goto block_1057; +} +} +else +{ +lean_object* x_1085; +lean_dec(x_1); +x_1085 = lean_ctor_get(x_1074, 0); +lean_inc(x_1085); +lean_dec(x_1074); +x_989 = x_1085; +x_990 = x_3; +goto block_1057; +} +} +block_1057: +{ +lean_object* x_991; +if (x_988 == 0) +{ +lean_object* x_1002; +x_1002 = lean_box(0); +x_991 = x_1002; +goto block_1001; +} +else +{ +uint8_t x_1003; +x_1003 = l_Lean_Expr_isLambda(x_989); +if (x_1003 == 0) +{ +lean_object* x_1004; +x_1004 = lean_box(0); +x_991 = x_1004; +goto block_1001; +} +else +{ +lean_object* x_1005; uint8_t x_1006; +x_1005 = l_Lean_Expr_betaRev(x_989, x_2); +lean_dec(x_989); +x_1006 = lean_expr_has_expr_mvar(x_1005); +if (x_1006 == 0) +{ +uint8_t x_1007; +x_1007 = lean_expr_has_level_mvar(x_1005); +if (x_1007 == 0) +{ +lean_object* x_1008; +x_1008 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_1008, 0, x_1005); +lean_ctor_set(x_1008, 1, x_990); +return x_1008; +} +else +{ +lean_object* x_1009; lean_object* x_1010; +x_1009 = lean_ctor_get(x_990, 1); +lean_inc(x_1009); +x_1010 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_1009, x_1005); +lean_dec(x_1009); +if (lean_obj_tag(x_1010) == 0) +{ +lean_object* x_1011; uint8_t x_1012; +lean_inc(x_1005); +x_1011 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_1005, x_990); +x_1012 = !lean_is_exclusive(x_1011); +if (x_1012 == 0) +{ +lean_object* x_1013; uint8_t x_1014; +x_1013 = lean_ctor_get(x_1011, 1); +x_1014 = !lean_is_exclusive(x_1013); +if (x_1014 == 0) +{ +lean_object* x_1015; lean_object* x_1016; lean_object* x_1017; +x_1015 = lean_ctor_get(x_1011, 0); +x_1016 = lean_ctor_get(x_1013, 1); +lean_inc(x_1015); +x_1017 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_1016, x_1005, x_1015); +lean_ctor_set(x_1013, 1, x_1017); +return x_1011; +} +else +{ +lean_object* x_1018; lean_object* x_1019; lean_object* x_1020; lean_object* x_1021; lean_object* x_1022; +x_1018 = lean_ctor_get(x_1011, 0); +x_1019 = lean_ctor_get(x_1013, 0); +x_1020 = lean_ctor_get(x_1013, 1); +lean_inc(x_1020); +lean_inc(x_1019); +lean_dec(x_1013); +lean_inc(x_1018); +x_1021 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_1020, x_1005, x_1018); +x_1022 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_1022, 0, x_1019); +lean_ctor_set(x_1022, 1, x_1021); +lean_ctor_set(x_1011, 1, x_1022); +return x_1011; +} +} +else +{ +lean_object* x_1023; lean_object* x_1024; lean_object* x_1025; lean_object* x_1026; lean_object* x_1027; lean_object* x_1028; lean_object* x_1029; lean_object* x_1030; +x_1023 = lean_ctor_get(x_1011, 1); +x_1024 = lean_ctor_get(x_1011, 0); +lean_inc(x_1023); +lean_inc(x_1024); +lean_dec(x_1011); +x_1025 = lean_ctor_get(x_1023, 0); +lean_inc(x_1025); +x_1026 = lean_ctor_get(x_1023, 1); +lean_inc(x_1026); +if (lean_is_exclusive(x_1023)) { + lean_ctor_release(x_1023, 0); + lean_ctor_release(x_1023, 1); + x_1027 = x_1023; +} else { + lean_dec_ref(x_1023); + x_1027 = lean_box(0); +} +lean_inc(x_1024); +x_1028 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_1026, x_1005, x_1024); +if (lean_is_scalar(x_1027)) { + x_1029 = lean_alloc_ctor(0, 2, 0); +} else { + x_1029 = x_1027; +} +lean_ctor_set(x_1029, 0, x_1025); +lean_ctor_set(x_1029, 1, x_1028); +x_1030 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_1030, 0, x_1024); +lean_ctor_set(x_1030, 1, x_1029); +return x_1030; +} +} +else +{ +lean_object* x_1031; lean_object* x_1032; +lean_dec(x_1005); +x_1031 = lean_ctor_get(x_1010, 0); +lean_inc(x_1031); +lean_dec(x_1010); +x_1032 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_1032, 0, x_1031); +lean_ctor_set(x_1032, 1, x_990); +return x_1032; +} +} +} +else +{ +lean_object* x_1033; lean_object* x_1034; +x_1033 = lean_ctor_get(x_990, 1); +lean_inc(x_1033); +x_1034 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_1033, x_1005); +lean_dec(x_1033); +if (lean_obj_tag(x_1034) == 0) +{ +lean_object* x_1035; uint8_t x_1036; +lean_inc(x_1005); +x_1035 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_1005, x_990); +x_1036 = !lean_is_exclusive(x_1035); +if (x_1036 == 0) +{ +lean_object* x_1037; uint8_t x_1038; +x_1037 = lean_ctor_get(x_1035, 1); +x_1038 = !lean_is_exclusive(x_1037); +if (x_1038 == 0) +{ +lean_object* x_1039; lean_object* x_1040; lean_object* x_1041; +x_1039 = lean_ctor_get(x_1035, 0); +x_1040 = lean_ctor_get(x_1037, 1); +lean_inc(x_1039); +x_1041 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_1040, x_1005, x_1039); +lean_ctor_set(x_1037, 1, x_1041); +return x_1035; +} +else +{ +lean_object* x_1042; lean_object* x_1043; lean_object* x_1044; lean_object* x_1045; lean_object* x_1046; +x_1042 = lean_ctor_get(x_1035, 0); +x_1043 = lean_ctor_get(x_1037, 0); +x_1044 = lean_ctor_get(x_1037, 1); +lean_inc(x_1044); +lean_inc(x_1043); +lean_dec(x_1037); +lean_inc(x_1042); +x_1045 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_1044, x_1005, x_1042); +x_1046 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_1046, 0, x_1043); +lean_ctor_set(x_1046, 1, x_1045); +lean_ctor_set(x_1035, 1, x_1046); +return x_1035; +} +} +else +{ +lean_object* x_1047; lean_object* x_1048; lean_object* x_1049; lean_object* x_1050; lean_object* x_1051; lean_object* x_1052; lean_object* x_1053; lean_object* x_1054; +x_1047 = lean_ctor_get(x_1035, 1); +x_1048 = lean_ctor_get(x_1035, 0); +lean_inc(x_1047); +lean_inc(x_1048); +lean_dec(x_1035); +x_1049 = lean_ctor_get(x_1047, 0); +lean_inc(x_1049); +x_1050 = lean_ctor_get(x_1047, 1); +lean_inc(x_1050); +if (lean_is_exclusive(x_1047)) { + lean_ctor_release(x_1047, 0); + lean_ctor_release(x_1047, 1); + x_1051 = x_1047; +} else { + lean_dec_ref(x_1047); + x_1051 = lean_box(0); +} +lean_inc(x_1048); +x_1052 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_1050, x_1005, x_1048); +if (lean_is_scalar(x_1051)) { + x_1053 = lean_alloc_ctor(0, 2, 0); +} else { + x_1053 = x_1051; +} +lean_ctor_set(x_1053, 0, x_1049); +lean_ctor_set(x_1053, 1, x_1052); +x_1054 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_1054, 0, x_1048); +lean_ctor_set(x_1054, 1, x_1053); +return x_1054; +} +} +else +{ +lean_object* x_1055; lean_object* x_1056; +lean_dec(x_1005); +x_1055 = lean_ctor_get(x_1034, 0); +lean_inc(x_1055); +lean_dec(x_1034); +x_1056 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_1056, 0, x_1055); +lean_ctor_set(x_1056, 1, x_990); +return x_1056; +} +} +} +} +block_1001: +{ +lean_object* x_992; lean_object* x_993; uint8_t x_994; +lean_dec(x_991); +x_992 = lean_unsigned_to_nat(0u); +x_993 = l_Array_ummapAux___main___at_Lean_MetavarContext_instantiateExprMVars___spec__7(x_992, x_2, x_990); +x_994 = !lean_is_exclusive(x_993); +if (x_994 == 0) +{ +lean_object* x_995; lean_object* x_996; +x_995 = lean_ctor_get(x_993, 0); +x_996 = l_Lean_mkAppRev(x_989, x_995); +lean_dec(x_995); +lean_ctor_set(x_993, 0, x_996); +return x_993; +} +else +{ +lean_object* x_997; lean_object* x_998; lean_object* x_999; lean_object* x_1000; +x_997 = lean_ctor_get(x_993, 0); +x_998 = lean_ctor_get(x_993, 1); +lean_inc(x_998); +lean_inc(x_997); +lean_dec(x_993); +x_999 = l_Lean_mkAppRev(x_989, x_997); +lean_dec(x_997); +x_1000 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_1000, 0, x_999); +lean_ctor_set(x_1000, 1, x_998); +return x_1000; +} +} +} +} +} +} +} +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; lean_object* x_15; lean_object* x_16; lean_object* x_26; lean_object* x_27; +switch (lean_obj_tag(x_1)) { +case 2: +{ +lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_48; lean_object* x_49; +x_37 = lean_ctor_get(x_1, 0); +lean_inc(x_37); +x_48 = lean_ctor_get(x_2, 1); +lean_inc(x_48); +x_49 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_48, x_1); +if (lean_obj_tag(x_49) == 0) +{ +lean_object* x_50; lean_object* x_51; +x_50 = lean_ctor_get(x_2, 0); +lean_inc(x_50); +lean_inc(x_37); +lean_inc(x_50); +x_51 = lean_metavar_ctx_get_expr_assignment(x_50, x_37); +if (lean_obj_tag(x_51) == 0) +{ +lean_object* x_52; +lean_inc(x_37); +x_52 = lean_metavar_ctx_get_delayed_assignment(x_50, x_37); +if (lean_obj_tag(x_52) == 0) +{ +lean_dec(x_48); +lean_dec(x_37); +lean_inc(x_1); +x_3 = x_1; +x_4 = x_2; +goto block_14; +} +else +{ +lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; uint8_t x_99; +x_53 = lean_ctor_get(x_52, 0); +lean_inc(x_53); +lean_dec(x_52); +x_54 = lean_ctor_get(x_53, 0); +lean_inc(x_54); +x_55 = lean_ctor_get(x_53, 1); +lean_inc(x_55); +x_56 = lean_ctor_get(x_53, 2); +lean_inc(x_56); +lean_dec(x_53); +x_99 = lean_expr_has_expr_mvar(x_56); +if (x_99 == 0) +{ +uint8_t x_100; +x_100 = lean_expr_has_level_mvar(x_56); +if (x_100 == 0) +{ +lean_dec(x_48); +x_57 = x_56; +x_58 = x_2; +goto block_98; +} +else +{ +lean_object* x_101; +x_101 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_48, x_56); +lean_dec(x_48); +if (lean_obj_tag(x_101) == 0) +{ +lean_object* x_102; lean_object* x_103; lean_object* x_104; uint8_t x_105; +lean_inc(x_56); +x_102 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_56, x_2); +x_103 = lean_ctor_get(x_102, 1); +lean_inc(x_103); +x_104 = lean_ctor_get(x_102, 0); +lean_inc(x_104); +lean_dec(x_102); +x_105 = !lean_is_exclusive(x_103); +if (x_105 == 0) +{ +lean_object* x_106; lean_object* x_107; +x_106 = lean_ctor_get(x_103, 1); +lean_inc(x_104); +x_107 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_106, x_56, x_104); +lean_ctor_set(x_103, 1, x_107); +x_57 = x_104; +x_58 = x_103; +goto block_98; +} +else +{ +lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; +x_108 = lean_ctor_get(x_103, 0); +x_109 = lean_ctor_get(x_103, 1); +lean_inc(x_109); +lean_inc(x_108); +lean_dec(x_103); +lean_inc(x_104); +x_110 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_109, x_56, x_104); +x_111 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_111, 0, x_108); +lean_ctor_set(x_111, 1, x_110); +x_57 = x_104; +x_58 = x_111; +goto block_98; +} +} +else +{ +lean_object* x_112; +lean_dec(x_56); +x_112 = lean_ctor_get(x_101, 0); +lean_inc(x_112); +lean_dec(x_101); +x_57 = x_112; +x_58 = x_2; +goto block_98; +} +} +} +else +{ +lean_object* x_113; +x_113 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_48, x_56); +lean_dec(x_48); +if (lean_obj_tag(x_113) == 0) +{ +lean_object* x_114; lean_object* x_115; lean_object* x_116; uint8_t x_117; +lean_inc(x_56); +x_114 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_56, x_2); +x_115 = lean_ctor_get(x_114, 1); +lean_inc(x_115); +x_116 = lean_ctor_get(x_114, 0); +lean_inc(x_116); +lean_dec(x_114); +x_117 = !lean_is_exclusive(x_115); +if (x_117 == 0) +{ +lean_object* x_118; lean_object* x_119; +x_118 = lean_ctor_get(x_115, 1); +lean_inc(x_116); +x_119 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_118, x_56, x_116); +lean_ctor_set(x_115, 1, x_119); +x_57 = x_116; +x_58 = x_115; +goto block_98; +} +else +{ +lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; +x_120 = lean_ctor_get(x_115, 0); +x_121 = lean_ctor_get(x_115, 1); +lean_inc(x_121); +lean_inc(x_120); +lean_dec(x_115); +lean_inc(x_116); +x_122 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_121, x_56, x_116); +x_123 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_123, 0, x_120); +lean_ctor_set(x_123, 1, x_122); +x_57 = x_116; +x_58 = x_123; +goto block_98; +} +} +else +{ +lean_object* x_124; +lean_dec(x_56); +x_124 = lean_ctor_get(x_113, 0); +lean_inc(x_124); +lean_dec(x_113); +x_57 = x_124; +x_58 = x_2; +goto block_98; +} +} +block_98: +{ +uint8_t x_59; +x_59 = lean_expr_has_expr_mvar(x_57); +if (x_59 == 0) +{ +uint8_t x_60; +x_60 = lean_expr_has_level_mvar(x_57); +if (x_60 == 0) +{ +lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; +x_61 = lean_array_get_size(x_55); +x_62 = lean_expr_abstract(x_57, x_55); +lean_inc(x_54); +x_63 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___at_Lean_MetavarContext_instantiateExprMVars___spec__3(x_54, x_55, x_61, x_62, x_58); +x_64 = lean_ctor_get(x_63, 0); +lean_inc(x_64); +if (lean_obj_tag(x_64) == 0) +{ +lean_object* x_65; uint8_t x_66; +x_65 = lean_ctor_get(x_63, 1); +lean_inc(x_65); +lean_dec(x_63); +x_66 = !lean_is_exclusive(x_65); +if (x_66 == 0) +{ +lean_object* x_67; lean_object* x_68; +x_67 = lean_ctor_get(x_65, 0); +x_68 = lean_metavar_ctx_assign_delayed(x_67, x_37, x_54, x_55, x_57); +lean_ctor_set(x_65, 0, x_68); +lean_inc(x_1); +x_3 = x_1; +x_4 = x_65; +goto block_14; +} +else +{ +lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; +x_69 = lean_ctor_get(x_65, 0); +x_70 = lean_ctor_get(x_65, 1); +lean_inc(x_70); +lean_inc(x_69); +lean_dec(x_65); +x_71 = lean_metavar_ctx_assign_delayed(x_69, x_37, x_54, x_55, x_57); +x_72 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_72, 0, x_71); +lean_ctor_set(x_72, 1, x_70); +lean_inc(x_1); +x_3 = x_1; +x_4 = x_72; +goto block_14; +} +} +else +{ +lean_object* x_73; lean_object* x_74; uint8_t x_75; +lean_dec(x_57); +lean_dec(x_55); +lean_dec(x_54); +x_73 = lean_ctor_get(x_63, 1); +lean_inc(x_73); +lean_dec(x_63); +x_74 = lean_ctor_get(x_64, 0); +lean_inc(x_74); +lean_dec(x_64); +x_75 = !lean_is_exclusive(x_73); +if (x_75 == 0) +{ +lean_object* x_76; lean_object* x_77; lean_object* x_78; +x_76 = lean_ctor_get(x_73, 0); +lean_inc(x_37); +x_77 = lean_metavar_ctx_erase_delayed(x_76, x_37); +lean_inc(x_74); +x_78 = lean_metavar_ctx_assign_expr(x_77, x_37, x_74); +lean_ctor_set(x_73, 0, x_78); +x_3 = x_74; +x_4 = x_73; +goto block_14; +} +else +{ +lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; +x_79 = lean_ctor_get(x_73, 0); +x_80 = lean_ctor_get(x_73, 1); +lean_inc(x_80); +lean_inc(x_79); +lean_dec(x_73); +lean_inc(x_37); +x_81 = lean_metavar_ctx_erase_delayed(x_79, x_37); +lean_inc(x_74); +x_82 = lean_metavar_ctx_assign_expr(x_81, x_37, x_74); +x_83 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_83, 0, x_82); +lean_ctor_set(x_83, 1, x_80); +x_3 = x_74; +x_4 = x_83; +goto block_14; +} +} +} +else +{ +uint8_t x_84; +x_84 = !lean_is_exclusive(x_58); +if (x_84 == 0) +{ +lean_object* x_85; lean_object* x_86; +x_85 = lean_ctor_get(x_58, 0); +x_86 = lean_metavar_ctx_assign_delayed(x_85, x_37, x_54, x_55, x_57); +lean_ctor_set(x_58, 0, x_86); +lean_inc(x_1); +x_3 = x_1; +x_4 = x_58; +goto block_14; +} +else +{ +lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; +x_87 = lean_ctor_get(x_58, 0); +x_88 = lean_ctor_get(x_58, 1); +lean_inc(x_88); +lean_inc(x_87); +lean_dec(x_58); +x_89 = lean_metavar_ctx_assign_delayed(x_87, x_37, x_54, x_55, x_57); +x_90 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_90, 0, x_89); +lean_ctor_set(x_90, 1, x_88); +lean_inc(x_1); +x_3 = x_1; +x_4 = x_90; +goto block_14; +} +} +} +else +{ +uint8_t x_91; +x_91 = !lean_is_exclusive(x_58); +if (x_91 == 0) +{ +lean_object* x_92; lean_object* x_93; +x_92 = lean_ctor_get(x_58, 0); +x_93 = lean_metavar_ctx_assign_delayed(x_92, x_37, x_54, x_55, x_57); +lean_ctor_set(x_58, 0, x_93); +lean_inc(x_1); +x_3 = x_1; +x_4 = x_58; +goto block_14; +} +else +{ +lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; +x_94 = lean_ctor_get(x_58, 0); +x_95 = lean_ctor_get(x_58, 1); +lean_inc(x_95); +lean_inc(x_94); +lean_dec(x_58); +x_96 = lean_metavar_ctx_assign_delayed(x_94, x_37, x_54, x_55, x_57); +x_97 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_97, 0, x_96); +lean_ctor_set(x_97, 1, x_95); +lean_inc(x_1); +x_3 = x_1; +x_4 = x_97; +goto block_14; +} +} +} +} +} +else +{ +lean_object* x_125; uint8_t x_126; +lean_dec(x_50); +x_125 = lean_ctor_get(x_51, 0); +lean_inc(x_125); +lean_dec(x_51); +x_126 = lean_expr_has_expr_mvar(x_125); +if (x_126 == 0) +{ +uint8_t x_127; +x_127 = lean_expr_has_level_mvar(x_125); +if (x_127 == 0) +{ +lean_dec(x_48); +x_38 = x_125; +x_39 = x_2; +goto block_47; +} +else +{ +lean_object* x_128; +x_128 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_48, x_125); +lean_dec(x_48); +if (lean_obj_tag(x_128) == 0) +{ +lean_object* x_129; lean_object* x_130; lean_object* x_131; uint8_t x_132; +lean_inc(x_125); +x_129 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_125, x_2); +x_130 = lean_ctor_get(x_129, 1); +lean_inc(x_130); +x_131 = lean_ctor_get(x_129, 0); +lean_inc(x_131); +lean_dec(x_129); +x_132 = !lean_is_exclusive(x_130); +if (x_132 == 0) +{ +lean_object* x_133; lean_object* x_134; +x_133 = lean_ctor_get(x_130, 1); +lean_inc(x_131); +x_134 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_133, x_125, x_131); +lean_ctor_set(x_130, 1, x_134); +x_38 = x_131; +x_39 = x_130; +goto block_47; +} +else +{ +lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; +x_135 = lean_ctor_get(x_130, 0); +x_136 = lean_ctor_get(x_130, 1); +lean_inc(x_136); +lean_inc(x_135); +lean_dec(x_130); +lean_inc(x_131); +x_137 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_136, x_125, x_131); +x_138 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_138, 0, x_135); +lean_ctor_set(x_138, 1, x_137); +x_38 = x_131; +x_39 = x_138; +goto block_47; +} +} +else +{ +lean_object* x_139; +lean_dec(x_125); +x_139 = lean_ctor_get(x_128, 0); +lean_inc(x_139); +lean_dec(x_128); +x_38 = x_139; +x_39 = x_2; +goto block_47; +} +} +} +else +{ +lean_object* x_140; +x_140 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_48, x_125); +lean_dec(x_48); +if (lean_obj_tag(x_140) == 0) +{ +lean_object* x_141; lean_object* x_142; lean_object* x_143; uint8_t x_144; +lean_inc(x_125); +x_141 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_125, x_2); +x_142 = lean_ctor_get(x_141, 1); +lean_inc(x_142); +x_143 = lean_ctor_get(x_141, 0); +lean_inc(x_143); +lean_dec(x_141); +x_144 = !lean_is_exclusive(x_142); +if (x_144 == 0) +{ +lean_object* x_145; lean_object* x_146; +x_145 = lean_ctor_get(x_142, 1); +lean_inc(x_143); +x_146 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_145, x_125, x_143); +lean_ctor_set(x_142, 1, x_146); +x_38 = x_143; +x_39 = x_142; +goto block_47; +} +else +{ +lean_object* x_147; lean_object* x_148; lean_object* x_149; lean_object* x_150; +x_147 = lean_ctor_get(x_142, 0); +x_148 = lean_ctor_get(x_142, 1); +lean_inc(x_148); +lean_inc(x_147); +lean_dec(x_142); +lean_inc(x_143); +x_149 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_148, x_125, x_143); +x_150 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_150, 0, x_147); +lean_ctor_set(x_150, 1, x_149); +x_38 = x_143; +x_39 = x_150; +goto block_47; +} +} +else +{ +lean_object* x_151; +lean_dec(x_125); +x_151 = lean_ctor_get(x_140, 0); +lean_inc(x_151); +lean_dec(x_140); +x_38 = x_151; +x_39 = x_2; +goto block_47; +} +} +} +} +else +{ +lean_object* x_152; lean_object* x_153; +lean_dec(x_48); +lean_dec(x_37); +lean_dec(x_1); +x_152 = lean_ctor_get(x_49, 0); +lean_inc(x_152); +lean_dec(x_49); +x_153 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_153, 0, x_152); +lean_ctor_set(x_153, 1, x_2); +return x_153; +} +block_47: +{ +uint8_t x_40; +x_40 = !lean_is_exclusive(x_39); +if (x_40 == 0) +{ +lean_object* x_41; lean_object* x_42; +x_41 = lean_ctor_get(x_39, 0); +lean_inc(x_38); +x_42 = lean_metavar_ctx_assign_expr(x_41, x_37, x_38); +lean_ctor_set(x_39, 0, x_42); +x_3 = x_38; +x_4 = x_39; +goto block_14; +} +else +{ +lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; +x_43 = lean_ctor_get(x_39, 0); +x_44 = lean_ctor_get(x_39, 1); +lean_inc(x_44); +lean_inc(x_43); +lean_dec(x_39); +lean_inc(x_38); +x_45 = lean_metavar_ctx_assign_expr(x_43, x_37, x_38); +x_46 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_46, 0, x_45); +lean_ctor_set(x_46, 1, x_44); +x_3 = x_38; +x_4 = x_46; +goto block_14; +} +} +} +case 3: +{ +lean_object* x_154; uint8_t x_155; +x_154 = lean_ctor_get(x_1, 0); +lean_inc(x_154); +x_155 = !lean_is_exclusive(x_2); +if (x_155 == 0) +{ +lean_object* x_156; lean_object* x_157; uint8_t x_158; +x_156 = lean_ctor_get(x_2, 0); +x_157 = l_Lean_AbstractMetavarContext_instantiateLevelMVars___main___at_Lean_MetavarContext_instantiateLevelMVars___spec__1(x_154, x_156); +x_158 = !lean_is_exclusive(x_157); +if (x_158 == 0) +{ +lean_object* x_159; lean_object* x_160; lean_object* x_161; +x_159 = lean_ctor_get(x_157, 0); +x_160 = lean_ctor_get(x_157, 1); +lean_ctor_set(x_2, 0, x_160); +x_161 = lean_expr_update_sort(x_1, x_159); +lean_ctor_set(x_157, 1, x_2); +lean_ctor_set(x_157, 0, x_161); +return x_157; +} +else +{ +lean_object* x_162; lean_object* x_163; lean_object* x_164; lean_object* x_165; +x_162 = lean_ctor_get(x_157, 0); +x_163 = lean_ctor_get(x_157, 1); +lean_inc(x_163); +lean_inc(x_162); +lean_dec(x_157); +lean_ctor_set(x_2, 0, x_163); +x_164 = lean_expr_update_sort(x_1, x_162); +x_165 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_165, 0, x_164); +lean_ctor_set(x_165, 1, x_2); +return x_165; +} +} +else +{ +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; +x_166 = lean_ctor_get(x_2, 0); +x_167 = lean_ctor_get(x_2, 1); +lean_inc(x_167); +lean_inc(x_166); +lean_dec(x_2); +x_168 = l_Lean_AbstractMetavarContext_instantiateLevelMVars___main___at_Lean_MetavarContext_instantiateLevelMVars___spec__1(x_154, x_166); +x_169 = lean_ctor_get(x_168, 0); +lean_inc(x_169); +x_170 = lean_ctor_get(x_168, 1); +lean_inc(x_170); +if (lean_is_exclusive(x_168)) { + lean_ctor_release(x_168, 0); + lean_ctor_release(x_168, 1); + x_171 = x_168; +} else { + lean_dec_ref(x_168); + x_171 = lean_box(0); +} +x_172 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_172, 0, x_170); +lean_ctor_set(x_172, 1, x_167); +x_173 = lean_expr_update_sort(x_1, x_169); +if (lean_is_scalar(x_171)) { + x_174 = lean_alloc_ctor(0, 2, 0); +} else { + x_174 = x_171; +} +lean_ctor_set(x_174, 0, x_173); +lean_ctor_set(x_174, 1, x_172); +return x_174; +} +} +case 4: +{ +lean_object* x_175; lean_object* x_176; uint8_t x_177; +x_175 = lean_ctor_get(x_1, 1); +lean_inc(x_175); +x_176 = l_List_mmap___main___at_Lean_MetavarContext_instantiateExprMVars___spec__6(x_175, x_2); +x_177 = !lean_is_exclusive(x_176); +if (x_177 == 0) +{ +lean_object* x_178; lean_object* x_179; +x_178 = lean_ctor_get(x_176, 0); +x_179 = lean_expr_update_const(x_1, x_178); +lean_ctor_set(x_176, 0, x_179); +return x_176; +} +else +{ +lean_object* x_180; lean_object* x_181; lean_object* x_182; lean_object* x_183; +x_180 = lean_ctor_get(x_176, 0); +x_181 = lean_ctor_get(x_176, 1); +lean_inc(x_181); +lean_inc(x_180); +lean_dec(x_176); +x_182 = lean_expr_update_const(x_1, x_180); +x_183 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_183, 0, x_182); +lean_ctor_set(x_183, 1, x_181); +return x_183; +} +} +case 5: +{ +lean_object* x_184; lean_object* x_185; lean_object* x_186; lean_object* x_187; +x_184 = lean_unsigned_to_nat(0u); +x_185 = l_Lean_Expr_getAppNumArgsAux___main(x_1, x_184); +x_186 = lean_mk_empty_array_with_capacity(x_185); +lean_dec(x_185); +x_187 = l___private_Init_Lean_Expr_3__withAppRevAux___main___at_Lean_MetavarContext_instantiateExprMVars___spec__8(x_1, x_186, x_2); +return x_187; +} +case 6: +{ +lean_object* x_188; lean_object* x_189; lean_object* x_190; lean_object* x_191; uint8_t x_233; +x_188 = lean_ctor_get(x_1, 1); +lean_inc(x_188); +x_189 = lean_ctor_get(x_1, 2); +lean_inc(x_189); +x_233 = lean_expr_has_expr_mvar(x_188); +if (x_233 == 0) +{ +uint8_t x_234; +x_234 = lean_expr_has_level_mvar(x_188); +if (x_234 == 0) +{ +x_190 = x_188; +x_191 = x_2; +goto block_232; +} +else +{ +lean_object* x_235; lean_object* x_236; +x_235 = lean_ctor_get(x_2, 1); +lean_inc(x_235); +x_236 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_235, x_188); +lean_dec(x_235); +if (lean_obj_tag(x_236) == 0) +{ +lean_object* x_237; lean_object* x_238; lean_object* x_239; uint8_t x_240; +lean_inc(x_188); +x_237 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_188, x_2); +x_238 = lean_ctor_get(x_237, 1); +lean_inc(x_238); +x_239 = lean_ctor_get(x_237, 0); +lean_inc(x_239); +lean_dec(x_237); +x_240 = !lean_is_exclusive(x_238); +if (x_240 == 0) +{ +lean_object* x_241; lean_object* x_242; +x_241 = lean_ctor_get(x_238, 1); +lean_inc(x_239); +x_242 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_241, x_188, x_239); +lean_ctor_set(x_238, 1, x_242); +x_190 = x_239; +x_191 = x_238; +goto block_232; +} +else +{ +lean_object* x_243; lean_object* x_244; lean_object* x_245; lean_object* x_246; +x_243 = lean_ctor_get(x_238, 0); +x_244 = lean_ctor_get(x_238, 1); +lean_inc(x_244); +lean_inc(x_243); +lean_dec(x_238); +lean_inc(x_239); +x_245 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_244, x_188, x_239); +x_246 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_246, 0, x_243); +lean_ctor_set(x_246, 1, x_245); +x_190 = x_239; +x_191 = x_246; +goto block_232; +} +} +else +{ +lean_object* x_247; +lean_dec(x_188); +x_247 = lean_ctor_get(x_236, 0); +lean_inc(x_247); +lean_dec(x_236); +x_190 = x_247; +x_191 = x_2; +goto block_232; +} +} +} +else +{ +lean_object* x_248; lean_object* x_249; +x_248 = lean_ctor_get(x_2, 1); +lean_inc(x_248); +x_249 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_248, x_188); +lean_dec(x_248); +if (lean_obj_tag(x_249) == 0) +{ +lean_object* x_250; lean_object* x_251; lean_object* x_252; uint8_t x_253; +lean_inc(x_188); +x_250 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_188, x_2); +x_251 = lean_ctor_get(x_250, 1); +lean_inc(x_251); +x_252 = lean_ctor_get(x_250, 0); +lean_inc(x_252); +lean_dec(x_250); +x_253 = !lean_is_exclusive(x_251); +if (x_253 == 0) +{ +lean_object* x_254; lean_object* x_255; +x_254 = lean_ctor_get(x_251, 1); +lean_inc(x_252); +x_255 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_254, x_188, x_252); +lean_ctor_set(x_251, 1, x_255); +x_190 = x_252; +x_191 = x_251; +goto block_232; +} +else +{ +lean_object* x_256; lean_object* x_257; lean_object* x_258; lean_object* x_259; +x_256 = lean_ctor_get(x_251, 0); +x_257 = lean_ctor_get(x_251, 1); +lean_inc(x_257); +lean_inc(x_256); +lean_dec(x_251); +lean_inc(x_252); +x_258 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_257, x_188, x_252); +x_259 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_259, 0, x_256); +lean_ctor_set(x_259, 1, x_258); +x_190 = x_252; +x_191 = x_259; +goto block_232; +} +} +else +{ +lean_object* x_260; +lean_dec(x_188); +x_260 = lean_ctor_get(x_249, 0); +lean_inc(x_260); +lean_dec(x_249); +x_190 = x_260; +x_191 = x_2; +goto block_232; +} +} +block_232: +{ +lean_object* x_192; lean_object* x_193; uint8_t x_204; +x_204 = lean_expr_has_expr_mvar(x_189); +if (x_204 == 0) +{ +uint8_t x_205; +x_205 = lean_expr_has_level_mvar(x_189); +if (x_205 == 0) +{ +x_192 = x_189; +x_193 = x_191; +goto block_203; +} +else +{ +lean_object* x_206; lean_object* x_207; +x_206 = lean_ctor_get(x_191, 1); +lean_inc(x_206); +x_207 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_206, x_189); +lean_dec(x_206); +if (lean_obj_tag(x_207) == 0) +{ +lean_object* x_208; lean_object* x_209; lean_object* x_210; uint8_t x_211; +lean_inc(x_189); +x_208 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_189, x_191); +x_209 = lean_ctor_get(x_208, 1); +lean_inc(x_209); +x_210 = lean_ctor_get(x_208, 0); +lean_inc(x_210); +lean_dec(x_208); +x_211 = !lean_is_exclusive(x_209); +if (x_211 == 0) +{ +lean_object* x_212; lean_object* x_213; +x_212 = lean_ctor_get(x_209, 1); +lean_inc(x_210); +x_213 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_212, x_189, x_210); +lean_ctor_set(x_209, 1, x_213); +x_192 = x_210; +x_193 = x_209; +goto block_203; +} +else +{ +lean_object* x_214; lean_object* x_215; lean_object* x_216; lean_object* x_217; +x_214 = lean_ctor_get(x_209, 0); +x_215 = lean_ctor_get(x_209, 1); +lean_inc(x_215); +lean_inc(x_214); +lean_dec(x_209); +lean_inc(x_210); +x_216 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_215, x_189, x_210); +x_217 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_217, 0, x_214); +lean_ctor_set(x_217, 1, x_216); +x_192 = x_210; +x_193 = x_217; +goto block_203; +} +} +else +{ +lean_object* x_218; +lean_dec(x_189); +x_218 = lean_ctor_get(x_207, 0); +lean_inc(x_218); +lean_dec(x_207); +x_192 = x_218; +x_193 = x_191; +goto block_203; +} +} +} +else +{ +lean_object* x_219; lean_object* x_220; +x_219 = lean_ctor_get(x_191, 1); +lean_inc(x_219); +x_220 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_219, x_189); +lean_dec(x_219); +if (lean_obj_tag(x_220) == 0) +{ +lean_object* x_221; lean_object* x_222; lean_object* x_223; uint8_t x_224; +lean_inc(x_189); +x_221 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_189, x_191); +x_222 = lean_ctor_get(x_221, 1); +lean_inc(x_222); +x_223 = lean_ctor_get(x_221, 0); +lean_inc(x_223); +lean_dec(x_221); +x_224 = !lean_is_exclusive(x_222); +if (x_224 == 0) +{ +lean_object* x_225; lean_object* x_226; +x_225 = lean_ctor_get(x_222, 1); +lean_inc(x_223); +x_226 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_225, x_189, x_223); +lean_ctor_set(x_222, 1, x_226); +x_192 = x_223; +x_193 = x_222; +goto block_203; +} +else +{ +lean_object* x_227; lean_object* x_228; lean_object* x_229; lean_object* x_230; +x_227 = lean_ctor_get(x_222, 0); +x_228 = lean_ctor_get(x_222, 1); +lean_inc(x_228); +lean_inc(x_227); +lean_dec(x_222); +lean_inc(x_223); +x_229 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_228, x_189, x_223); +x_230 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_230, 0, x_227); +lean_ctor_set(x_230, 1, x_229); +x_192 = x_223; +x_193 = x_230; +goto block_203; +} +} +else +{ +lean_object* x_231; +lean_dec(x_189); +x_231 = lean_ctor_get(x_220, 0); +lean_inc(x_231); +lean_dec(x_220); +x_192 = x_231; +x_193 = x_191; +goto block_203; +} +} +block_203: +{ +if (lean_obj_tag(x_1) == 6) +{ +uint8_t x_194; lean_object* x_195; lean_object* x_196; +x_194 = lean_ctor_get_uint8(x_1, sizeof(void*)*3); +x_195 = lean_expr_update_lambda(x_1, x_194, x_190, x_192); +x_196 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_196, 0, x_195); +lean_ctor_set(x_196, 1, x_193); +return x_196; +} +else +{ +lean_object* x_197; lean_object* x_198; lean_object* x_199; lean_object* x_200; lean_object* x_201; lean_object* x_202; +lean_dec(x_192); +lean_dec(x_190); +lean_dec(x_1); +x_197 = l_Lean_Expr_constName___closed__1; +x_198 = lean_unsigned_to_nat(466u); +x_199 = lean_unsigned_to_nat(18u); +x_200 = l_Lean_Expr_updateLambda_x21___closed__1; +x_201 = l_panicWithPos___at_Lean_Expr_bindingDomain___spec__1(x_197, x_198, x_199, 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_193); +return x_202; +} +} +} +} +case 7: +{ +lean_object* x_261; lean_object* x_262; lean_object* x_263; lean_object* x_264; uint8_t x_306; +x_261 = lean_ctor_get(x_1, 1); +lean_inc(x_261); +x_262 = lean_ctor_get(x_1, 2); +lean_inc(x_262); +x_306 = lean_expr_has_expr_mvar(x_261); +if (x_306 == 0) +{ +uint8_t x_307; +x_307 = lean_expr_has_level_mvar(x_261); +if (x_307 == 0) +{ +x_263 = x_261; +x_264 = x_2; +goto block_305; +} +else +{ +lean_object* x_308; lean_object* x_309; +x_308 = lean_ctor_get(x_2, 1); +lean_inc(x_308); +x_309 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_308, x_261); +lean_dec(x_308); +if (lean_obj_tag(x_309) == 0) +{ +lean_object* x_310; lean_object* x_311; lean_object* x_312; uint8_t x_313; +lean_inc(x_261); +x_310 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_261, x_2); +x_311 = lean_ctor_get(x_310, 1); +lean_inc(x_311); +x_312 = lean_ctor_get(x_310, 0); +lean_inc(x_312); +lean_dec(x_310); +x_313 = !lean_is_exclusive(x_311); +if (x_313 == 0) +{ +lean_object* x_314; lean_object* x_315; +x_314 = lean_ctor_get(x_311, 1); +lean_inc(x_312); +x_315 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_314, x_261, x_312); +lean_ctor_set(x_311, 1, x_315); +x_263 = x_312; +x_264 = x_311; +goto block_305; +} +else +{ +lean_object* x_316; lean_object* x_317; lean_object* x_318; lean_object* x_319; +x_316 = lean_ctor_get(x_311, 0); +x_317 = lean_ctor_get(x_311, 1); +lean_inc(x_317); +lean_inc(x_316); +lean_dec(x_311); +lean_inc(x_312); +x_318 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_317, x_261, x_312); +x_319 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_319, 0, x_316); +lean_ctor_set(x_319, 1, x_318); +x_263 = x_312; +x_264 = x_319; +goto block_305; +} +} +else +{ +lean_object* x_320; +lean_dec(x_261); +x_320 = lean_ctor_get(x_309, 0); +lean_inc(x_320); +lean_dec(x_309); +x_263 = x_320; +x_264 = x_2; +goto block_305; +} +} +} +else +{ +lean_object* x_321; lean_object* x_322; +x_321 = lean_ctor_get(x_2, 1); +lean_inc(x_321); +x_322 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_321, x_261); +lean_dec(x_321); +if (lean_obj_tag(x_322) == 0) +{ +lean_object* x_323; lean_object* x_324; lean_object* x_325; uint8_t x_326; +lean_inc(x_261); +x_323 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_261, x_2); +x_324 = lean_ctor_get(x_323, 1); +lean_inc(x_324); +x_325 = lean_ctor_get(x_323, 0); +lean_inc(x_325); +lean_dec(x_323); +x_326 = !lean_is_exclusive(x_324); +if (x_326 == 0) +{ +lean_object* x_327; lean_object* x_328; +x_327 = lean_ctor_get(x_324, 1); +lean_inc(x_325); +x_328 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_327, x_261, x_325); +lean_ctor_set(x_324, 1, x_328); +x_263 = x_325; +x_264 = x_324; +goto block_305; +} +else +{ +lean_object* x_329; lean_object* x_330; lean_object* x_331; lean_object* x_332; +x_329 = lean_ctor_get(x_324, 0); +x_330 = lean_ctor_get(x_324, 1); +lean_inc(x_330); +lean_inc(x_329); +lean_dec(x_324); +lean_inc(x_325); +x_331 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_330, x_261, x_325); +x_332 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_332, 0, x_329); +lean_ctor_set(x_332, 1, x_331); +x_263 = x_325; +x_264 = x_332; +goto block_305; +} +} +else +{ +lean_object* x_333; +lean_dec(x_261); +x_333 = lean_ctor_get(x_322, 0); +lean_inc(x_333); +lean_dec(x_322); +x_263 = x_333; +x_264 = x_2; +goto block_305; +} +} +block_305: +{ +lean_object* x_265; lean_object* x_266; uint8_t x_277; +x_277 = lean_expr_has_expr_mvar(x_262); +if (x_277 == 0) +{ +uint8_t x_278; +x_278 = lean_expr_has_level_mvar(x_262); +if (x_278 == 0) +{ +x_265 = x_262; +x_266 = x_264; +goto block_276; +} +else +{ +lean_object* x_279; lean_object* x_280; +x_279 = lean_ctor_get(x_264, 1); +lean_inc(x_279); +x_280 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_279, x_262); +lean_dec(x_279); +if (lean_obj_tag(x_280) == 0) +{ +lean_object* x_281; lean_object* x_282; lean_object* x_283; uint8_t x_284; +lean_inc(x_262); +x_281 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_262, x_264); +x_282 = lean_ctor_get(x_281, 1); +lean_inc(x_282); +x_283 = lean_ctor_get(x_281, 0); +lean_inc(x_283); +lean_dec(x_281); +x_284 = !lean_is_exclusive(x_282); +if (x_284 == 0) +{ +lean_object* x_285; lean_object* x_286; +x_285 = lean_ctor_get(x_282, 1); +lean_inc(x_283); +x_286 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_285, x_262, x_283); +lean_ctor_set(x_282, 1, x_286); +x_265 = x_283; +x_266 = x_282; +goto block_276; +} +else +{ +lean_object* x_287; lean_object* x_288; lean_object* x_289; lean_object* x_290; +x_287 = lean_ctor_get(x_282, 0); +x_288 = lean_ctor_get(x_282, 1); +lean_inc(x_288); +lean_inc(x_287); +lean_dec(x_282); +lean_inc(x_283); +x_289 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_288, x_262, x_283); +x_290 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_290, 0, x_287); +lean_ctor_set(x_290, 1, x_289); +x_265 = x_283; +x_266 = x_290; +goto block_276; +} +} +else +{ +lean_object* x_291; +lean_dec(x_262); +x_291 = lean_ctor_get(x_280, 0); +lean_inc(x_291); +lean_dec(x_280); +x_265 = x_291; +x_266 = x_264; +goto block_276; +} +} +} +else +{ +lean_object* x_292; lean_object* x_293; +x_292 = lean_ctor_get(x_264, 1); +lean_inc(x_292); +x_293 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_292, x_262); +lean_dec(x_292); +if (lean_obj_tag(x_293) == 0) +{ +lean_object* x_294; lean_object* x_295; lean_object* x_296; uint8_t x_297; +lean_inc(x_262); +x_294 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_262, x_264); +x_295 = lean_ctor_get(x_294, 1); +lean_inc(x_295); +x_296 = lean_ctor_get(x_294, 0); +lean_inc(x_296); +lean_dec(x_294); +x_297 = !lean_is_exclusive(x_295); +if (x_297 == 0) +{ +lean_object* x_298; lean_object* x_299; +x_298 = lean_ctor_get(x_295, 1); +lean_inc(x_296); +x_299 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_298, x_262, x_296); +lean_ctor_set(x_295, 1, x_299); +x_265 = x_296; +x_266 = x_295; +goto block_276; +} +else +{ +lean_object* x_300; lean_object* x_301; lean_object* x_302; lean_object* x_303; +x_300 = lean_ctor_get(x_295, 0); +x_301 = lean_ctor_get(x_295, 1); +lean_inc(x_301); +lean_inc(x_300); +lean_dec(x_295); +lean_inc(x_296); +x_302 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_301, x_262, x_296); +x_303 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_303, 0, x_300); +lean_ctor_set(x_303, 1, x_302); +x_265 = x_296; +x_266 = x_303; +goto block_276; +} +} +else +{ +lean_object* x_304; +lean_dec(x_262); +x_304 = lean_ctor_get(x_293, 0); +lean_inc(x_304); +lean_dec(x_293); +x_265 = x_304; +x_266 = x_264; +goto block_276; +} +} +block_276: +{ +if (lean_obj_tag(x_1) == 7) +{ +uint8_t x_267; lean_object* x_268; lean_object* x_269; +x_267 = lean_ctor_get_uint8(x_1, sizeof(void*)*3); +x_268 = lean_expr_update_forall(x_1, x_267, x_263, x_265); +x_269 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_269, 0, x_268); +lean_ctor_set(x_269, 1, x_266); +return x_269; +} +else +{ +lean_object* x_270; lean_object* x_271; lean_object* x_272; lean_object* x_273; lean_object* x_274; lean_object* x_275; +lean_dec(x_265); +lean_dec(x_263); +lean_dec(x_1); +x_270 = l_Lean_Expr_constName___closed__1; +x_271 = lean_unsigned_to_nat(452u); +x_272 = lean_unsigned_to_nat(22u); +x_273 = l_Lean_Expr_updateForall_x21___closed__1; +x_274 = l_panicWithPos___at_Lean_Expr_bindingDomain___spec__1(x_270, x_271, x_272, x_273); +x_275 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_275, 0, x_274); +lean_ctor_set(x_275, 1, x_266); +return x_275; +} +} +} +} +case 8: +{ +lean_object* x_334; lean_object* x_335; lean_object* x_336; lean_object* x_337; lean_object* x_338; uint8_t x_410; +x_334 = lean_ctor_get(x_1, 1); +lean_inc(x_334); +x_335 = lean_ctor_get(x_1, 2); +lean_inc(x_335); +x_336 = lean_ctor_get(x_1, 3); +lean_inc(x_336); +x_410 = lean_expr_has_expr_mvar(x_334); +if (x_410 == 0) +{ +uint8_t x_411; +x_411 = lean_expr_has_level_mvar(x_334); +if (x_411 == 0) +{ +x_337 = x_334; +x_338 = x_2; +goto block_409; +} +else +{ +lean_object* x_412; lean_object* x_413; +x_412 = lean_ctor_get(x_2, 1); +lean_inc(x_412); +x_413 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_412, x_334); +lean_dec(x_412); +if (lean_obj_tag(x_413) == 0) +{ +lean_object* x_414; lean_object* x_415; lean_object* x_416; uint8_t x_417; +lean_inc(x_334); +x_414 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_334, x_2); +x_415 = lean_ctor_get(x_414, 1); +lean_inc(x_415); +x_416 = lean_ctor_get(x_414, 0); +lean_inc(x_416); +lean_dec(x_414); +x_417 = !lean_is_exclusive(x_415); +if (x_417 == 0) +{ +lean_object* x_418; lean_object* x_419; +x_418 = lean_ctor_get(x_415, 1); +lean_inc(x_416); +x_419 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_418, x_334, x_416); +lean_ctor_set(x_415, 1, x_419); +x_337 = x_416; +x_338 = x_415; +goto block_409; +} +else +{ +lean_object* x_420; lean_object* x_421; lean_object* x_422; lean_object* x_423; +x_420 = lean_ctor_get(x_415, 0); +x_421 = lean_ctor_get(x_415, 1); +lean_inc(x_421); +lean_inc(x_420); +lean_dec(x_415); +lean_inc(x_416); +x_422 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_421, x_334, x_416); +x_423 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_423, 0, x_420); +lean_ctor_set(x_423, 1, x_422); +x_337 = x_416; +x_338 = x_423; +goto block_409; +} +} +else +{ +lean_object* x_424; +lean_dec(x_334); +x_424 = lean_ctor_get(x_413, 0); +lean_inc(x_424); +lean_dec(x_413); +x_337 = x_424; +x_338 = x_2; +goto block_409; +} +} +} +else +{ +lean_object* x_425; lean_object* x_426; +x_425 = lean_ctor_get(x_2, 1); +lean_inc(x_425); +x_426 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_425, x_334); +lean_dec(x_425); +if (lean_obj_tag(x_426) == 0) +{ +lean_object* x_427; lean_object* x_428; lean_object* x_429; uint8_t x_430; +lean_inc(x_334); +x_427 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_334, x_2); +x_428 = lean_ctor_get(x_427, 1); +lean_inc(x_428); +x_429 = lean_ctor_get(x_427, 0); +lean_inc(x_429); +lean_dec(x_427); +x_430 = !lean_is_exclusive(x_428); +if (x_430 == 0) +{ +lean_object* x_431; lean_object* x_432; +x_431 = lean_ctor_get(x_428, 1); +lean_inc(x_429); +x_432 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_431, x_334, x_429); +lean_ctor_set(x_428, 1, x_432); +x_337 = x_429; +x_338 = x_428; +goto block_409; +} +else +{ +lean_object* x_433; lean_object* x_434; lean_object* x_435; lean_object* x_436; +x_433 = lean_ctor_get(x_428, 0); +x_434 = lean_ctor_get(x_428, 1); +lean_inc(x_434); +lean_inc(x_433); +lean_dec(x_428); +lean_inc(x_429); +x_435 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_434, x_334, x_429); +x_436 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_436, 0, x_433); +lean_ctor_set(x_436, 1, x_435); +x_337 = x_429; +x_338 = x_436; +goto block_409; +} +} +else +{ +lean_object* x_437; +lean_dec(x_334); +x_437 = lean_ctor_get(x_426, 0); +lean_inc(x_437); +lean_dec(x_426); +x_337 = x_437; +x_338 = x_2; +goto block_409; +} +} +block_409: +{ +lean_object* x_339; lean_object* x_340; uint8_t x_381; +x_381 = lean_expr_has_expr_mvar(x_335); +if (x_381 == 0) +{ +uint8_t x_382; +x_382 = lean_expr_has_level_mvar(x_335); +if (x_382 == 0) +{ +x_339 = x_335; +x_340 = x_338; +goto block_380; +} +else +{ +lean_object* x_383; lean_object* x_384; +x_383 = lean_ctor_get(x_338, 1); +lean_inc(x_383); +x_384 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_383, x_335); +lean_dec(x_383); +if (lean_obj_tag(x_384) == 0) +{ +lean_object* x_385; lean_object* x_386; lean_object* x_387; uint8_t x_388; +lean_inc(x_335); +x_385 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_335, x_338); +x_386 = lean_ctor_get(x_385, 1); +lean_inc(x_386); +x_387 = lean_ctor_get(x_385, 0); +lean_inc(x_387); +lean_dec(x_385); +x_388 = !lean_is_exclusive(x_386); +if (x_388 == 0) +{ +lean_object* x_389; lean_object* x_390; +x_389 = lean_ctor_get(x_386, 1); +lean_inc(x_387); +x_390 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_389, x_335, x_387); +lean_ctor_set(x_386, 1, x_390); +x_339 = x_387; +x_340 = x_386; +goto block_380; +} +else +{ +lean_object* x_391; lean_object* x_392; lean_object* x_393; lean_object* x_394; +x_391 = lean_ctor_get(x_386, 0); +x_392 = lean_ctor_get(x_386, 1); +lean_inc(x_392); +lean_inc(x_391); +lean_dec(x_386); +lean_inc(x_387); +x_393 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_392, x_335, x_387); +x_394 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_394, 0, x_391); +lean_ctor_set(x_394, 1, x_393); +x_339 = x_387; +x_340 = x_394; +goto block_380; +} +} +else +{ +lean_object* x_395; +lean_dec(x_335); +x_395 = lean_ctor_get(x_384, 0); +lean_inc(x_395); +lean_dec(x_384); +x_339 = x_395; +x_340 = x_338; +goto block_380; +} +} +} +else +{ +lean_object* x_396; lean_object* x_397; +x_396 = lean_ctor_get(x_338, 1); +lean_inc(x_396); +x_397 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_396, x_335); +lean_dec(x_396); +if (lean_obj_tag(x_397) == 0) +{ +lean_object* x_398; lean_object* x_399; lean_object* x_400; uint8_t x_401; +lean_inc(x_335); +x_398 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_335, x_338); +x_399 = lean_ctor_get(x_398, 1); +lean_inc(x_399); +x_400 = lean_ctor_get(x_398, 0); +lean_inc(x_400); +lean_dec(x_398); +x_401 = !lean_is_exclusive(x_399); +if (x_401 == 0) +{ +lean_object* x_402; lean_object* x_403; +x_402 = lean_ctor_get(x_399, 1); +lean_inc(x_400); +x_403 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_402, x_335, x_400); +lean_ctor_set(x_399, 1, x_403); +x_339 = x_400; +x_340 = x_399; +goto block_380; +} +else +{ +lean_object* x_404; lean_object* x_405; lean_object* x_406; lean_object* x_407; +x_404 = lean_ctor_get(x_399, 0); +x_405 = lean_ctor_get(x_399, 1); +lean_inc(x_405); +lean_inc(x_404); +lean_dec(x_399); +lean_inc(x_400); +x_406 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_405, x_335, x_400); +x_407 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_407, 0, x_404); +lean_ctor_set(x_407, 1, x_406); +x_339 = x_400; +x_340 = x_407; +goto block_380; +} +} +else +{ +lean_object* x_408; +lean_dec(x_335); +x_408 = lean_ctor_get(x_397, 0); +lean_inc(x_408); +lean_dec(x_397); +x_339 = x_408; +x_340 = x_338; +goto block_380; +} +} +block_380: +{ +lean_object* x_341; lean_object* x_342; uint8_t x_352; +x_352 = lean_expr_has_expr_mvar(x_336); +if (x_352 == 0) +{ +uint8_t x_353; +x_353 = lean_expr_has_level_mvar(x_336); +if (x_353 == 0) +{ +x_341 = x_336; +x_342 = x_340; +goto block_351; +} +else +{ +lean_object* x_354; lean_object* x_355; +x_354 = lean_ctor_get(x_340, 1); +lean_inc(x_354); +x_355 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_354, x_336); +lean_dec(x_354); +if (lean_obj_tag(x_355) == 0) +{ +lean_object* x_356; lean_object* x_357; lean_object* x_358; uint8_t x_359; +lean_inc(x_336); +x_356 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_336, x_340); +x_357 = lean_ctor_get(x_356, 1); +lean_inc(x_357); +x_358 = lean_ctor_get(x_356, 0); +lean_inc(x_358); +lean_dec(x_356); +x_359 = !lean_is_exclusive(x_357); +if (x_359 == 0) +{ +lean_object* x_360; lean_object* x_361; +x_360 = lean_ctor_get(x_357, 1); +lean_inc(x_358); +x_361 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_360, x_336, x_358); +lean_ctor_set(x_357, 1, x_361); +x_341 = x_358; +x_342 = x_357; +goto block_351; +} +else +{ +lean_object* x_362; lean_object* x_363; lean_object* x_364; lean_object* x_365; +x_362 = lean_ctor_get(x_357, 0); +x_363 = lean_ctor_get(x_357, 1); +lean_inc(x_363); +lean_inc(x_362); +lean_dec(x_357); +lean_inc(x_358); +x_364 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_363, x_336, x_358); +x_365 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_365, 0, x_362); +lean_ctor_set(x_365, 1, x_364); +x_341 = x_358; +x_342 = x_365; +goto block_351; +} +} +else +{ +lean_object* x_366; +lean_dec(x_336); +x_366 = lean_ctor_get(x_355, 0); +lean_inc(x_366); +lean_dec(x_355); +x_341 = x_366; +x_342 = x_340; +goto block_351; +} +} +} +else +{ +lean_object* x_367; lean_object* x_368; +x_367 = lean_ctor_get(x_340, 1); +lean_inc(x_367); +x_368 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_367, x_336); +lean_dec(x_367); +if (lean_obj_tag(x_368) == 0) +{ +lean_object* x_369; lean_object* x_370; lean_object* x_371; uint8_t x_372; +lean_inc(x_336); +x_369 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_336, x_340); +x_370 = lean_ctor_get(x_369, 1); +lean_inc(x_370); +x_371 = lean_ctor_get(x_369, 0); +lean_inc(x_371); +lean_dec(x_369); +x_372 = !lean_is_exclusive(x_370); +if (x_372 == 0) +{ +lean_object* x_373; lean_object* x_374; +x_373 = lean_ctor_get(x_370, 1); +lean_inc(x_371); +x_374 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_373, x_336, x_371); +lean_ctor_set(x_370, 1, x_374); +x_341 = x_371; +x_342 = x_370; +goto block_351; +} +else +{ +lean_object* x_375; lean_object* x_376; lean_object* x_377; lean_object* x_378; +x_375 = lean_ctor_get(x_370, 0); +x_376 = lean_ctor_get(x_370, 1); +lean_inc(x_376); +lean_inc(x_375); +lean_dec(x_370); +lean_inc(x_371); +x_377 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_376, x_336, x_371); +x_378 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_378, 0, x_375); +lean_ctor_set(x_378, 1, x_377); +x_341 = x_371; +x_342 = x_378; +goto block_351; +} +} +else +{ +lean_object* x_379; +lean_dec(x_336); +x_379 = lean_ctor_get(x_368, 0); +lean_inc(x_379); +lean_dec(x_368); +x_341 = x_379; +x_342 = x_340; +goto block_351; +} +} +block_351: +{ +if (lean_obj_tag(x_1) == 8) +{ +lean_object* x_343; lean_object* x_344; +x_343 = lean_expr_update_let(x_1, x_337, x_339, x_341); +x_344 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_344, 0, x_343); +lean_ctor_set(x_344, 1, x_342); +return x_344; +} +else +{ +lean_object* x_345; lean_object* x_346; lean_object* x_347; lean_object* x_348; lean_object* x_349; lean_object* x_350; +lean_dec(x_341); +lean_dec(x_339); +lean_dec(x_337); +lean_dec(x_1); +x_345 = l_Lean_Expr_constName___closed__1; +x_346 = lean_unsigned_to_nat(475u); +x_347 = lean_unsigned_to_nat(18u); +x_348 = l_Lean_Expr_letName___closed__1; +x_349 = l_panicWithPos___at_Lean_Expr_bindingDomain___spec__1(x_345, x_346, x_347, x_348); +x_350 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_350, 0, x_349); +lean_ctor_set(x_350, 1, x_342); +return x_350; +} +} +} +} +} +case 10: +{ +lean_object* x_438; uint8_t x_439; +x_438 = lean_ctor_get(x_1, 1); +lean_inc(x_438); +x_439 = lean_expr_has_expr_mvar(x_438); +if (x_439 == 0) +{ +uint8_t x_440; +x_440 = lean_expr_has_level_mvar(x_438); +if (x_440 == 0) +{ +x_15 = x_438; +x_16 = x_2; +goto block_25; +} +else +{ +lean_object* x_441; lean_object* x_442; +x_441 = lean_ctor_get(x_2, 1); +lean_inc(x_441); +x_442 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_441, x_438); +lean_dec(x_441); +if (lean_obj_tag(x_442) == 0) +{ +lean_object* x_443; lean_object* x_444; lean_object* x_445; uint8_t x_446; +lean_inc(x_438); +x_443 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_438, x_2); +x_444 = lean_ctor_get(x_443, 1); +lean_inc(x_444); +x_445 = lean_ctor_get(x_443, 0); +lean_inc(x_445); +lean_dec(x_443); +x_446 = !lean_is_exclusive(x_444); +if (x_446 == 0) +{ +lean_object* x_447; lean_object* x_448; +x_447 = lean_ctor_get(x_444, 1); +lean_inc(x_445); +x_448 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_447, x_438, x_445); +lean_ctor_set(x_444, 1, x_448); +x_15 = x_445; +x_16 = x_444; +goto block_25; +} +else +{ +lean_object* x_449; lean_object* x_450; lean_object* x_451; lean_object* x_452; +x_449 = lean_ctor_get(x_444, 0); +x_450 = lean_ctor_get(x_444, 1); +lean_inc(x_450); +lean_inc(x_449); +lean_dec(x_444); +lean_inc(x_445); +x_451 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_450, x_438, x_445); +x_452 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_452, 0, x_449); +lean_ctor_set(x_452, 1, x_451); +x_15 = x_445; +x_16 = x_452; +goto block_25; +} +} +else +{ +lean_object* x_453; +lean_dec(x_438); +x_453 = lean_ctor_get(x_442, 0); +lean_inc(x_453); +lean_dec(x_442); +x_15 = x_453; +x_16 = x_2; +goto block_25; +} +} +} +else +{ +lean_object* x_454; lean_object* x_455; +x_454 = lean_ctor_get(x_2, 1); +lean_inc(x_454); +x_455 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_454, x_438); +lean_dec(x_454); +if (lean_obj_tag(x_455) == 0) +{ +lean_object* x_456; lean_object* x_457; lean_object* x_458; uint8_t x_459; +lean_inc(x_438); +x_456 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_438, x_2); +x_457 = lean_ctor_get(x_456, 1); +lean_inc(x_457); +x_458 = lean_ctor_get(x_456, 0); +lean_inc(x_458); +lean_dec(x_456); +x_459 = !lean_is_exclusive(x_457); +if (x_459 == 0) +{ +lean_object* x_460; lean_object* x_461; +x_460 = lean_ctor_get(x_457, 1); +lean_inc(x_458); +x_461 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_460, x_438, x_458); +lean_ctor_set(x_457, 1, x_461); +x_15 = x_458; +x_16 = x_457; +goto block_25; +} +else +{ +lean_object* x_462; lean_object* x_463; lean_object* x_464; lean_object* x_465; +x_462 = lean_ctor_get(x_457, 0); +x_463 = lean_ctor_get(x_457, 1); +lean_inc(x_463); +lean_inc(x_462); +lean_dec(x_457); +lean_inc(x_458); +x_464 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_463, x_438, x_458); +x_465 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_465, 0, x_462); +lean_ctor_set(x_465, 1, x_464); +x_15 = x_458; +x_16 = x_465; +goto block_25; +} +} +else +{ +lean_object* x_466; +lean_dec(x_438); +x_466 = lean_ctor_get(x_455, 0); +lean_inc(x_466); +lean_dec(x_455); +x_15 = x_466; +x_16 = x_2; +goto block_25; +} +} +} +case 11: +{ +lean_object* x_467; uint8_t x_468; +x_467 = lean_ctor_get(x_1, 2); +lean_inc(x_467); +x_468 = lean_expr_has_expr_mvar(x_467); +if (x_468 == 0) +{ +uint8_t x_469; +x_469 = lean_expr_has_level_mvar(x_467); +if (x_469 == 0) +{ +x_26 = x_467; +x_27 = x_2; +goto block_36; +} +else +{ +lean_object* x_470; lean_object* x_471; +x_470 = lean_ctor_get(x_2, 1); +lean_inc(x_470); +x_471 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_470, x_467); +lean_dec(x_470); +if (lean_obj_tag(x_471) == 0) +{ +lean_object* x_472; lean_object* x_473; lean_object* x_474; uint8_t x_475; +lean_inc(x_467); +x_472 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_467, x_2); +x_473 = lean_ctor_get(x_472, 1); +lean_inc(x_473); +x_474 = lean_ctor_get(x_472, 0); +lean_inc(x_474); +lean_dec(x_472); +x_475 = !lean_is_exclusive(x_473); +if (x_475 == 0) +{ +lean_object* x_476; lean_object* x_477; +x_476 = lean_ctor_get(x_473, 1); +lean_inc(x_474); +x_477 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_476, x_467, x_474); +lean_ctor_set(x_473, 1, x_477); +x_26 = x_474; +x_27 = x_473; +goto block_36; +} +else +{ +lean_object* x_478; lean_object* x_479; lean_object* x_480; lean_object* x_481; +x_478 = lean_ctor_get(x_473, 0); +x_479 = lean_ctor_get(x_473, 1); +lean_inc(x_479); +lean_inc(x_478); +lean_dec(x_473); +lean_inc(x_474); +x_480 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_479, x_467, x_474); +x_481 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_481, 0, x_478); +lean_ctor_set(x_481, 1, x_480); +x_26 = x_474; +x_27 = x_481; +goto block_36; +} +} +else +{ +lean_object* x_482; +lean_dec(x_467); +x_482 = lean_ctor_get(x_471, 0); +lean_inc(x_482); +lean_dec(x_471); +x_26 = x_482; +x_27 = x_2; +goto block_36; +} +} +} +else +{ +lean_object* x_483; lean_object* x_484; +x_483 = lean_ctor_get(x_2, 1); +lean_inc(x_483); +x_484 = l_HashMapImp_find___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__1(x_483, x_467); +lean_dec(x_483); +if (lean_obj_tag(x_484) == 0) +{ +lean_object* x_485; lean_object* x_486; lean_object* x_487; uint8_t x_488; +lean_inc(x_467); +x_485 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_467, x_2); +x_486 = lean_ctor_get(x_485, 1); +lean_inc(x_486); +x_487 = lean_ctor_get(x_485, 0); +lean_inc(x_487); +lean_dec(x_485); +x_488 = !lean_is_exclusive(x_486); +if (x_488 == 0) +{ +lean_object* x_489; lean_object* x_490; +x_489 = lean_ctor_get(x_486, 1); +lean_inc(x_487); +x_490 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_489, x_467, x_487); +lean_ctor_set(x_486, 1, x_490); +x_26 = x_487; +x_27 = x_486; +goto block_36; +} +else +{ +lean_object* x_491; lean_object* x_492; lean_object* x_493; lean_object* x_494; +x_491 = lean_ctor_get(x_486, 0); +x_492 = lean_ctor_get(x_486, 1); +lean_inc(x_492); +lean_inc(x_491); +lean_dec(x_486); +lean_inc(x_487); +x_493 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_492, x_467, x_487); +x_494 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_494, 0, x_491); +lean_ctor_set(x_494, 1, x_493); +x_26 = x_487; +x_27 = x_494; +goto block_36; +} +} +else +{ +lean_object* x_495; +lean_dec(x_467); +x_495 = lean_ctor_get(x_484, 0); +lean_inc(x_495); +lean_dec(x_484); +x_26 = x_495; +x_27 = x_2; +goto block_36; +} +} +} +default: +{ +lean_object* x_496; +x_496 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_496, 0, x_1); +lean_ctor_set(x_496, 1, x_2); +return x_496; +} +} +block_14: +{ +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; +x_6 = lean_ctor_get(x_4, 1); +lean_inc(x_3); +x_7 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_6, x_1, x_3); +lean_ctor_set(x_4, 1, x_7); +x_8 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_8, 0, x_3); +lean_ctor_set(x_8, 1, x_4); +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_ctor_get(x_4, 0); +x_10 = lean_ctor_get(x_4, 1); +lean_inc(x_10); +lean_inc(x_9); +lean_dec(x_4); +lean_inc(x_3); +x_11 = l_HashMapImp_insert___at_Lean_AbstractMetavarContext_InstantiateExprMVars_checkCache___spec__3(x_10, x_1, x_3); +x_12 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_12, 0, x_9); +lean_ctor_set(x_12, 1, x_11); +x_13 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_13, 0, x_3); +lean_ctor_set(x_13, 1, x_12); +return x_13; +} +} +block_25: +{ +if (lean_obj_tag(x_1) == 10) +{ +lean_object* x_17; lean_object* x_18; +x_17 = lean_expr_update_mdata(x_1, x_15); +x_18 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_18, 0, x_17); +lean_ctor_set(x_18, 1, x_16); +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_dec(x_15); +lean_dec(x_1); +x_19 = l_Lean_Expr_constName___closed__1; +x_20 = lean_unsigned_to_nat(433u); +x_21 = lean_unsigned_to_nat(15u); +x_22 = l_Lean_Expr_updateMData_x21___closed__1; +x_23 = l_panicWithPos___at_Lean_Expr_bindingDomain___spec__1(x_19, x_20, x_21, x_22); +x_24 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_24, 0, x_23); +lean_ctor_set(x_24, 1, x_16); +return x_24; +} +} +block_36: +{ +if (lean_obj_tag(x_1) == 11) +{ +lean_object* x_28; lean_object* x_29; +x_28 = lean_expr_update_proj(x_1, 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_27); +return x_29; +} +else +{ +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_dec(x_26); +lean_dec(x_1); +x_30 = l_Lean_Expr_constName___closed__1; +x_31 = lean_unsigned_to_nat(438u); +x_32 = lean_unsigned_to_nat(16u); +x_33 = l_Lean_Expr_updateProj_x21___closed__1; +x_34 = l_panicWithPos___at_Lean_Expr_bindingDomain___spec__1(x_30, x_31, x_32, x_33); +x_35 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_35, 0, x_34); +lean_ctor_set(x_35, 1, x_27); +return x_35; +} +} +} +} +lean_object* l_Lean_AbstractMetavarContext_instantiateExprMVars___at_Lean_MetavarContext_instantiateExprMVars___spec__1(lean_object* x_1, lean_object* x_2) { +_start: +{ +uint8_t x_3; +x_3 = lean_expr_has_expr_mvar(x_1); +if (x_3 == 0) +{ +uint8_t x_4; +x_4 = lean_expr_has_level_mvar(x_1); +if (x_4 == 0) +{ +lean_object* x_5; +x_5 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_5, 0, x_1); +lean_ctor_set(x_5, 1, x_2); +return x_5; +} +else +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; +x_6 = l_HashMap_Inhabited___closed__1; +x_7 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_7, 0, x_2); +lean_ctor_set(x_7, 1, x_6); +x_8 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_1, x_7); +x_9 = !lean_is_exclusive(x_8); +if (x_9 == 0) +{ +lean_object* x_10; lean_object* x_11; +x_10 = lean_ctor_get(x_8, 1); +x_11 = lean_ctor_get(x_10, 0); +lean_inc(x_11); +lean_dec(x_10); +lean_ctor_set(x_8, 1, x_11); +return x_8; +} +else +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; +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_ctor_get(x_13, 0); +lean_inc(x_14); +lean_dec(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); +return x_15; +} +} +} +else +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; uint8_t x_19; +x_16 = l_HashMap_Inhabited___closed__1; +x_17 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_17, 0, x_2); +lean_ctor_set(x_17, 1, x_16); +x_18 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_main___main___at_Lean_MetavarContext_instantiateExprMVars___spec__2(x_1, x_17); +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, 1); +x_21 = lean_ctor_get(x_20, 0); +lean_inc(x_21); +lean_dec(x_20); +lean_ctor_set(x_18, 1, x_21); +return x_18; +} +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_ctor_get(x_23, 0); +lean_inc(x_24); +lean_dec(x_23); +x_25 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_25, 0, x_22); +lean_ctor_set(x_25, 1, x_24); +return x_25; +} +} +} +} +lean_object* l_Lean_MetavarContext_instantiateExprMVars(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_Lean_AbstractMetavarContext_instantiateExprMVars___at_Lean_MetavarContext_instantiateExprMVars___spec__1(x_2, x_1); +return x_3; +} +} +lean_object* l_panicWithPos___at_Lean_MetavarContext_instantiateExprMVars___spec__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_panicWithPos___at_Lean_MetavarContext_instantiateExprMVars___spec__4(x_1, x_2, x_3, x_4, x_5); +lean_dec(x_4); +lean_dec(x_1); +return x_6; +} +} +lean_object* l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___at_Lean_MetavarContext_instantiateExprMVars___spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; +x_6 = l_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___at_Lean_MetavarContext_instantiateExprMVars___spec__3(x_1, x_2, x_3, x_4, x_5); +lean_dec(x_2); +return x_6; +} +} +lean_object* initialize_Init_Lean_AbstractMetavarContext(lean_object*); static bool _G_initialized = false; lean_object* initialize_Init_Lean_MetavarContext(lean_object* w) { lean_object * res; if (_G_initialized) return lean_mk_io_result(lean_box(0)); _G_initialized = true; -res = initialize_Init_Lean_LocalContext(lean_io_mk_world()); +res = initialize_Init_Lean_AbstractMetavarContext(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); l_Lean_MetavarContext_mkMetavarContext___closed__1 = _init_l_Lean_MetavarContext_mkMetavarContext___closed__1(); lean_mark_persistent(l_Lean_MetavarContext_mkMetavarContext___closed__1); +l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__1 = _init_l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__1(); +lean_mark_persistent(l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__1); +l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__2 = _init_l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__2(); +lean_mark_persistent(l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__2); +l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__3 = _init_l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__3(); +lean_mark_persistent(l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__3); +l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__4 = _init_l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__4(); +lean_mark_persistent(l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__4); +l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__5 = _init_l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__5(); +lean_mark_persistent(l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__5); +l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__6 = _init_l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__6(); +lean_mark_persistent(l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__6); +l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__7 = _init_l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__7(); +lean_mark_persistent(l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__7); +l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__8 = _init_l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__8(); +lean_mark_persistent(l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__8); +l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__9 = _init_l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__9(); +lean_mark_persistent(l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__9); +l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__10 = _init_l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__10(); +lean_mark_persistent(l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__10); +l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__11 = _init_l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__11(); +lean_mark_persistent(l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext___closed__11); +l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext = _init_l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext(); +lean_mark_persistent(l_Lean_MetavarContext_metavarContextIsAbstractMetavarContext); return lean_mk_io_result(lean_box(0)); } #ifdef __cplusplus diff --git a/src/stage0/Init/Lean/TypeClass/Context.c b/src/stage0/Init/Lean/TypeClass/Context.c index 9d3408b21e..7bb9aa8227 100644 --- a/src/stage0/Init/Lean/TypeClass/Context.c +++ b/src/stage0/Init/Lean/TypeClass/Context.c @@ -44,7 +44,6 @@ lean_object* lean_expr_dbg_to_string(lean_object*); lean_object* l_Lean_TypeClass_Context_alphaMetaPrefix___closed__1; lean_object* l_Lean_TypeClass_Context_slowWhnfApp(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_TypeClass_Context_uLookupIdx(lean_object*, lean_object*); -lean_object* l_StateT_Monad___rarg(lean_object*); lean_object* l_Lean_TypeClass_Context_uUnify___main___closed__4; uint8_t l_Lean_TypeClass_Context_eFind(lean_object*, lean_object*); lean_object* l_PersistentArray_get_x21___at_Lean_TypeClass_Context_uLookupIdx___spec__1___boxed(lean_object*, lean_object*); @@ -75,7 +74,6 @@ lean_object* l_Lean_TypeClass_Context_Inhabited___closed__1; lean_object* l_Lean_TypeClass_Context_eAssign___closed__1; lean_object* l_Lean_Level_format(lean_object*); lean_object* l_PersistentArray_set___rarg(lean_object*, lean_object*, lean_object*); -extern lean_object* l_Id_Monad; lean_object* l_Lean_TypeClass_Context_uLookupIdx___boxed(lean_object*, lean_object*); lean_object* l_Lean_TypeClass_Context_eUnify___main___closed__1; lean_object* l_Lean_TypeClass_Context_uFind___main___boxed(lean_object*, lean_object*); @@ -186,8 +184,8 @@ lean_object* lean_expr_mk_lambda(lean_object*, uint8_t, lean_object*, lean_objec lean_object* l_Lean_TypeClass_Context_eNewMeta(lean_object*, lean_object*); lean_object* l_Lean_TypeClass_Context_uHasTmpMVar___boxed(lean_object*); lean_object* l_panicWithPos___at_Lean_TypeClass_Context_eUnify___main___spec__1___closed__1; -lean_object* l_panicWithPos___at_Lean_TypeClass_Context_eAssign___spec__1___closed__2; extern lean_object* l_panicWithPos___rarg___closed__2; +extern lean_object* l_panicWithPos___at_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___spec__1___rarg___closed__1; lean_object* l_PersistentArray_getAux___main___at_Lean_TypeClass_Context_uLookupIdx___spec__2(lean_object*, size_t, size_t); lean_object* l_Lean_TypeClass_Context_uAssign(lean_object*, lean_object*, lean_object*); size_t l_USize_shift__left(size_t, size_t); @@ -823,17 +821,8 @@ return x_4; lean_object* _init_l_panicWithPos___at_Lean_TypeClass_Context_eAssign___spec__1___closed__1() { _start: { -lean_object* x_1; lean_object* x_2; -x_1 = l_Id_Monad; -x_2 = l_StateT_Monad___rarg(x_1); -return x_2; -} -} -lean_object* _init_l_panicWithPos___at_Lean_TypeClass_Context_eAssign___spec__1___closed__2() { -_start: -{ lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_panicWithPos___at_Lean_TypeClass_Context_eAssign___spec__1___closed__1; +x_1 = l_panicWithPos___at_Lean_AbstractMetavarContext_InstantiateExprMVars_instantiateDelayedAux___main___spec__1___rarg___closed__1; x_2 = l_PUnit_Inhabited; x_3 = l_monadInhabited___rarg(x_1, x_2); return x_3; @@ -858,7 +847,7 @@ lean_dec(x_14); x_16 = l_panicWithPos___rarg___closed__3; x_17 = lean_string_append(x_15, x_16); x_18 = lean_string_append(x_17, x_4); -x_19 = l_panicWithPos___at_Lean_TypeClass_Context_eAssign___spec__1___closed__2; +x_19 = l_panicWithPos___at_Lean_TypeClass_Context_eAssign___spec__1___closed__1; x_20 = lean_panic_fn(x_18); x_21 = lean_apply_1(x_20, x_5); return x_21; @@ -2517,6 +2506,8 @@ lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_dec(x_2); x_16 = lean_array_fget(x_1, x_3); x_17 = lean_expr_instantiate1(x_13, x_16); +lean_dec(x_16); +lean_dec(x_13); x_18 = lean_unsigned_to_nat(1u); x_19 = lean_nat_add(x_3, x_18); lean_dec(x_3); @@ -6861,8 +6852,6 @@ l_Lean_TypeClass_Context_eInfer___closed__2 = _init_l_Lean_TypeClass_Context_eIn lean_mark_persistent(l_Lean_TypeClass_Context_eInfer___closed__2); l_panicWithPos___at_Lean_TypeClass_Context_eAssign___spec__1___closed__1 = _init_l_panicWithPos___at_Lean_TypeClass_Context_eAssign___spec__1___closed__1(); lean_mark_persistent(l_panicWithPos___at_Lean_TypeClass_Context_eAssign___spec__1___closed__1); -l_panicWithPos___at_Lean_TypeClass_Context_eAssign___spec__1___closed__2 = _init_l_panicWithPos___at_Lean_TypeClass_Context_eAssign___spec__1___closed__2(); -lean_mark_persistent(l_panicWithPos___at_Lean_TypeClass_Context_eAssign___spec__1___closed__2); l_Lean_TypeClass_Context_eAssign___closed__1 = _init_l_Lean_TypeClass_Context_eAssign___closed__1(); lean_mark_persistent(l_Lean_TypeClass_Context_eAssign___closed__1); l_Lean_TypeClass_Context_eHasETmpMVar___closed__1 = _init_l_Lean_TypeClass_Context_eHasETmpMVar___closed__1(); diff --git a/src/stage0/Init/Lean/TypeClass/Synth.c b/src/stage0/Init/Lean/TypeClass/Synth.c index 0ac229bc36..455d43a407 100644 --- a/src/stage0/Init/Lean/TypeClass/Synth.c +++ b/src/stage0/Init/Lean/TypeClass/Synth.c @@ -24,6 +24,7 @@ lean_object* lean_nat_sub(lean_object*, lean_object*); uint8_t l_Lean_Expr_isConst(lean_object*); lean_object* l_panicWithPos___at_Lean_TypeClass_collectEReplacements___main___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_TypeClass_Context_eInfer(lean_object*, lean_object*); +lean_object* l_Lean_TypeClass_collectEReplacements___main___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_TypeClass_synthCore___rarg(lean_object*, lean_object*); lean_object* l_PersistentHashMap_findAux___main___at_Lean_TypeClass_newAnswer___spec__2___boxed(lean_object*, lean_object*, lean_object*); @@ -120,7 +121,9 @@ lean_object* lean_instantiate_type_lparams(lean_object*, lean_object*); lean_object* lean_array_push(lean_object*, lean_object*); extern lean_object* l_panicWithPos___rarg___closed__1; lean_object* l_Stack_peek_x21___at_Lean_TypeClass_generate___spec__1___boxed(lean_object*); +lean_object* l_Lean_TypeClass_collectEReplacements___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_TypeClass_GeneratorNode_Inhabited; +lean_object* l_Lean_TypeClass_introduceMVars___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern size_t l_PersistentHashMap_insertAux___main___rarg___closed__2; lean_object* l_Array_mforAux___main___at_Lean_TypeClass_newAnswer___spec__5(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_TypeClass_introduceMVars(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -138,6 +141,7 @@ lean_object* l___private_Init_Lean_Expr_1__getAppArgsAux___main(lean_object*, le lean_object* l_Lean_TypeClass_newConsumerNode(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_TypeClass_Context_eInstantiate___main(lean_object*, lean_object*); lean_object* l_Lean_TypeClass_generate___closed__1; +lean_object* l_Lean_TypeClass_introduceMVars___main___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_pop(lean_object*); lean_object* l_Lean_TypeClass_newSubgoal___closed__3; lean_object* l_Lean_TypeClass_preprocessForOutParams(lean_object*, lean_object*); @@ -1238,9 +1242,9 @@ lean_inc(x_13); x_14 = lean_ctor_get(x_5, 2); lean_inc(x_14); lean_dec(x_5); -lean_inc(x_2); lean_inc(x_1); x_15 = l_Lean_LocalContext_mkForall(x_1, x_2, x_13); +lean_dec(x_13); x_16 = l_Lean_TypeClass_Context_eNewMeta(x_15, x_3); x_17 = lean_ctor_get(x_16, 0); lean_inc(x_17); @@ -1253,6 +1257,8 @@ x_20 = l_Array_miterateAux___main___at_Lean_mkApp___spec__1(x_2, x_2, x_19, x_17 lean_inc(x_20); x_21 = lean_expr_mk_app(x_4, x_20); x_22 = lean_expr_instantiate1(x_14, x_20); +lean_dec(x_20); +lean_dec(x_14); x_23 = l_Lean_BinderInfo_isInstImplicit(x_12); if (x_23 == 0) { @@ -1276,7 +1282,6 @@ goto _start; else { lean_object* x_27; -lean_dec(x_2); lean_dec(x_1); x_27 = lean_box(0); x_7 = x_27; @@ -1299,6 +1304,15 @@ return x_10; } } } +lean_object* l_Lean_TypeClass_introduceMVars___main___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_Lean_TypeClass_introduceMVars___main(x_1, x_2, x_3, x_4, x_5, x_6); +lean_dec(x_2); +return x_7; +} +} lean_object* l_Lean_TypeClass_introduceMVars(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: { @@ -1307,6 +1321,15 @@ x_7 = l_Lean_TypeClass_introduceMVars___main(x_1, x_2, x_3, x_4, x_5, x_6); return x_7; } } +lean_object* l_Lean_TypeClass_introduceMVars___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_Lean_TypeClass_introduceMVars(x_1, x_2, x_3, x_4, x_5, x_6); +lean_dec(x_2); +return x_7; +} +} lean_object* _init_l_Lean_TypeClass_introduceLocals___main___closed__1() { _start: { @@ -1330,7 +1353,7 @@ _start: { if (lean_obj_tag(x_4) == 7) { -lean_object* x_5; uint8_t 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; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; +lean_object* x_5; uint8_t 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; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; x_5 = lean_ctor_get(x_4, 0); lean_inc(x_5); x_6 = lean_ctor_get_uint8(x_4, sizeof(void*)*3); @@ -1344,33 +1367,32 @@ lean_inc(x_1); x_10 = lean_name_mk_numeral(x_9, x_1); lean_inc(x_10); x_11 = lean_local_ctx_mk_local_decl(x_2, x_10, x_5, x_7, x_6); -x_12 = lean_ctor_get(x_11, 1); -lean_inc(x_12); -lean_dec(x_11); -x_13 = lean_expr_mk_fvar(x_10); -x_14 = lean_unsigned_to_nat(1u); -x_15 = lean_nat_add(x_1, x_14); +x_12 = lean_expr_mk_fvar(x_10); +x_13 = lean_unsigned_to_nat(1u); +x_14 = lean_nat_add(x_1, x_13); lean_dec(x_1); -lean_inc(x_13); -x_16 = lean_array_push(x_3, x_13); -x_17 = lean_expr_instantiate1(x_8, x_13); -x_1 = x_15; -x_2 = x_12; -x_3 = x_16; -x_4 = x_17; +lean_inc(x_12); +x_15 = lean_array_push(x_3, x_12); +x_16 = lean_expr_instantiate1(x_8, x_12); +lean_dec(x_12); +lean_dec(x_8); +x_1 = x_14; +x_2 = x_11; +x_3 = x_15; +x_4 = x_16; goto _start; } else { -lean_object* x_19; lean_object* x_20; +lean_object* x_18; lean_object* x_19; lean_dec(x_1); +x_18 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_18, 0, x_4); +lean_ctor_set(x_18, 1, x_3); x_19 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_19, 0, x_4); -lean_ctor_set(x_19, 1, x_3); -x_20 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_20, 0, x_2); -lean_ctor_set(x_20, 1, x_19); -return x_20; +lean_ctor_set(x_19, 0, x_2); +lean_ctor_set(x_19, 1, x_18); +return x_19; } } } @@ -1410,7 +1432,6 @@ lean_inc(x_15); x_16 = lean_ctor_get(x_13, 1); lean_inc(x_16); lean_dec(x_13); -lean_inc(x_16); lean_inc(x_14); x_17 = l_Lean_TypeClass_introduceMVars___main(x_14, x_16, x_1, x_7, x_8, x_11); x_18 = lean_ctor_get(x_17, 1); @@ -1430,6 +1451,8 @@ 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); x_25 = l_Lean_LocalContext_mkLambda(x_14, x_16, x_21); +lean_dec(x_21); +lean_dec(x_16); x_26 = l_Lean_TypeClass_Context_eUnify___main(x_15, x_23, x_20); if (lean_obj_tag(x_26) == 0) { @@ -1549,6 +1572,8 @@ lean_inc(x_51); lean_inc(x_50); lean_dec(x_19); x_52 = l_Lean_LocalContext_mkLambda(x_14, x_16, x_21); +lean_dec(x_21); +lean_dec(x_16); x_53 = l_Lean_TypeClass_Context_eUnify___main(x_15, x_50, x_20); if (lean_obj_tag(x_53) == 0) { @@ -4155,7 +4180,6 @@ if (lean_obj_tag(x_4) == 0) { lean_object* x_8; lean_object* x_9; lean_dec(x_3); -lean_dec(x_2); lean_dec(x_1); x_8 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_8, 0, x_6); @@ -4184,8 +4208,8 @@ if (x_14 == 0) { lean_object* x_15; lean_object* x_16; lean_dec(x_10); -lean_inc(x_12); x_15 = lean_expr_instantiate1(x_11, x_12); +lean_dec(x_11); x_16 = lean_array_push(x_7, x_12); x_3 = x_15; x_4 = x_13; @@ -4195,9 +4219,9 @@ goto _start; else { lean_object* x_18; lean_object* x_19; uint8_t x_20; -lean_inc(x_2); lean_inc(x_1); x_18 = l_Lean_LocalContext_mkForall(x_1, x_2, x_10); +lean_dec(x_10); x_19 = l_Lean_TypeClass_Context_eNewMeta(x_18, x_5); x_20 = !lean_is_exclusive(x_19); if (x_20 == 0) @@ -4208,8 +4232,8 @@ x_22 = lean_ctor_get(x_19, 1); x_23 = lean_unsigned_to_nat(0u); lean_inc(x_21); x_24 = l_Array_miterateAux___main___at_Lean_mkApp___spec__1(x_2, x_2, x_23, x_21); -lean_inc(x_24); x_25 = lean_expr_instantiate1(x_11, x_24); +lean_dec(x_11); lean_ctor_set(x_19, 1, x_12); x_26 = lean_array_push(x_6, x_19); x_27 = lean_array_push(x_7, x_24); @@ -4231,8 +4255,8 @@ lean_dec(x_19); x_31 = lean_unsigned_to_nat(0u); lean_inc(x_29); x_32 = l_Array_miterateAux___main___at_Lean_mkApp___spec__1(x_2, x_2, x_31, x_29); -lean_inc(x_32); x_33 = lean_expr_instantiate1(x_11, x_32); +lean_dec(x_11); x_34 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_34, 0, x_29); lean_ctor_set(x_34, 1, x_12); @@ -4251,7 +4275,6 @@ goto _start; else { lean_dec(x_3); -lean_dec(x_2); lean_dec(x_1); if (lean_obj_tag(x_4) == 0) { @@ -4291,6 +4314,15 @@ lean_dec(x_1); return x_5; } } +lean_object* l_Lean_TypeClass_collectEReplacements___main___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +lean_object* x_8; +x_8 = l_Lean_TypeClass_collectEReplacements___main(x_1, x_2, x_3, x_4, x_5, x_6, x_7); +lean_dec(x_2); +return x_8; +} +} lean_object* l_Lean_TypeClass_collectEReplacements___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, lean_object* x_7) { _start: { @@ -4303,10 +4335,19 @@ lean_object* l_Lean_TypeClass_collectEReplacements(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_TypeClass_collectEReplacements___rarg), 7, 0); +x_2 = lean_alloc_closure((void*)(l_Lean_TypeClass_collectEReplacements___rarg___boxed), 7, 0); return x_2; } } +lean_object* l_Lean_TypeClass_collectEReplacements___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +lean_object* x_8; +x_8 = l_Lean_TypeClass_collectEReplacements___rarg(x_1, x_2, x_3, x_4, x_5, x_6, x_7); +lean_dec(x_2); +return x_8; +} +} lean_object* l_Lean_TypeClass_collectEReplacements___boxed(lean_object* x_1) { _start: { @@ -4510,7 +4551,6 @@ x_71 = lean_unsigned_to_nat(284u); x_72 = lean_unsigned_to_nat(16u); x_73 = l_Lean_TypeClass_preprocessForOutParams___closed__1; x_74 = l_panicWithPos___at_Lean_Expr_bindingDomain___spec__1(x_70, x_71, x_72, x_73); -lean_inc(x_12); lean_inc(x_11); x_75 = l_Lean_TypeClass_collectEReplacements___main(x_11, x_12, x_74, x_37, x_32, x_6, x_6); x_42 = x_75; @@ -4523,7 +4563,6 @@ x_76 = lean_ctor_get(x_41, 0); lean_inc(x_76); lean_dec(x_41); x_77 = lean_instantiate_type_lparams(x_76, x_38); -lean_inc(x_12); lean_inc(x_11); x_78 = l_Lean_TypeClass_collectEReplacements___main(x_11, x_12, x_77, x_37, x_32, x_6, x_6); x_42 = x_78; @@ -4547,6 +4586,8 @@ x_48 = lean_ctor_get(x_44, 1); x_49 = l_Array_miterateAux___main___at_Lean_mkApp___spec__1(x_48, x_48, x_4, x_39); lean_dec(x_48); x_50 = l_Lean_LocalContext_mkForall(x_11, x_12, x_49); +lean_dec(x_49); +lean_dec(x_12); lean_ctor_set(x_44, 1, x_47); lean_ctor_set(x_44, 0, x_33); lean_ctor_set(x_42, 0, x_50); @@ -4571,6 +4612,8 @@ lean_dec(x_44); x_55 = l_Array_miterateAux___main___at_Lean_mkApp___spec__1(x_54, x_54, x_4, x_39); lean_dec(x_54); x_56 = l_Lean_LocalContext_mkForall(x_11, x_12, x_55); +lean_dec(x_55); +lean_dec(x_12); x_57 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_57, 0, x_33); lean_ctor_set(x_57, 1, x_53); @@ -4609,6 +4652,8 @@ if (lean_is_exclusive(x_59)) { x_64 = l_Array_miterateAux___main___at_Lean_mkApp___spec__1(x_62, x_62, x_4, x_39); lean_dec(x_62); x_65 = l_Lean_LocalContext_mkForall(x_11, x_12, x_64); +lean_dec(x_64); +lean_dec(x_12); if (lean_is_scalar(x_63)) { x_66 = lean_alloc_ctor(0, 2, 0); } else { @@ -4643,7 +4688,6 @@ x_109 = lean_unsigned_to_nat(284u); x_110 = lean_unsigned_to_nat(16u); x_111 = l_Lean_TypeClass_preprocessForOutParams___closed__1; x_112 = l_panicWithPos___at_Lean_Expr_bindingDomain___spec__1(x_108, x_109, x_110, x_111); -lean_inc(x_12); lean_inc(x_11); x_113 = l_Lean_TypeClass_collectEReplacements___main(x_11, x_12, x_112, x_37, x_32, x_6, x_6); x_80 = x_113; @@ -4658,7 +4702,6 @@ lean_dec(x_79); x_115 = l_Array_toList___rarg(x_34); lean_dec(x_34); x_116 = lean_instantiate_type_lparams(x_114, x_115); -lean_inc(x_12); lean_inc(x_11); x_117 = l_Lean_TypeClass_collectEReplacements___main(x_11, x_12, x_116, x_37, x_32, x_6, x_6); x_80 = x_117; @@ -4682,6 +4725,8 @@ x_86 = lean_ctor_get(x_82, 1); x_87 = l_Array_miterateAux___main___at_Lean_mkApp___spec__1(x_86, x_86, x_4, x_14); lean_dec(x_86); x_88 = l_Lean_LocalContext_mkForall(x_11, x_12, x_87); +lean_dec(x_87); +lean_dec(x_12); lean_ctor_set(x_82, 1, x_85); lean_ctor_set(x_82, 0, x_33); lean_ctor_set(x_80, 0, x_88); @@ -4706,6 +4751,8 @@ lean_dec(x_82); x_93 = l_Array_miterateAux___main___at_Lean_mkApp___spec__1(x_92, x_92, x_4, x_14); lean_dec(x_92); x_94 = l_Lean_LocalContext_mkForall(x_11, x_12, x_93); +lean_dec(x_93); +lean_dec(x_12); x_95 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_95, 0, x_33); lean_ctor_set(x_95, 1, x_91); @@ -4744,6 +4791,8 @@ if (lean_is_exclusive(x_97)) { x_102 = l_Array_miterateAux___main___at_Lean_mkApp___spec__1(x_100, x_100, x_4, x_14); lean_dec(x_100); x_103 = l_Lean_LocalContext_mkForall(x_11, x_12, x_102); +lean_dec(x_102); +lean_dec(x_12); if (lean_is_scalar(x_101)) { x_104 = lean_alloc_ctor(0, 2, 0); } else { @@ -4875,7 +4924,6 @@ x_164 = lean_unsigned_to_nat(284u); x_165 = lean_unsigned_to_nat(16u); x_166 = l_Lean_TypeClass_preprocessForOutParams___closed__1; x_167 = l_panicWithPos___at_Lean_Expr_bindingDomain___spec__1(x_163, x_164, x_165, x_166); -lean_inc(x_119); lean_inc(x_118); x_168 = l_Lean_TypeClass_collectEReplacements___main(x_118, x_119, x_167, x_145, x_140, x_6, x_6); x_150 = x_168; @@ -4888,7 +4936,6 @@ x_169 = lean_ctor_get(x_149, 0); lean_inc(x_169); lean_dec(x_149); x_170 = lean_instantiate_type_lparams(x_169, x_146); -lean_inc(x_119); lean_inc(x_118); x_171 = l_Lean_TypeClass_collectEReplacements___main(x_118, x_119, x_170, x_145, x_140, x_6, x_6); x_150 = x_171; @@ -4924,6 +4971,8 @@ if (lean_is_exclusive(x_151)) { x_157 = l_Array_miterateAux___main___at_Lean_mkApp___spec__1(x_155, x_155, x_4, x_147); lean_dec(x_155); x_158 = l_Lean_LocalContext_mkForall(x_118, x_119, x_157); +lean_dec(x_157); +lean_dec(x_119); if (lean_is_scalar(x_156)) { x_159 = lean_alloc_ctor(0, 2, 0); } else { @@ -4961,7 +5010,6 @@ x_187 = lean_unsigned_to_nat(284u); x_188 = lean_unsigned_to_nat(16u); x_189 = l_Lean_TypeClass_preprocessForOutParams___closed__1; x_190 = l_panicWithPos___at_Lean_Expr_bindingDomain___spec__1(x_186, x_187, x_188, x_189); -lean_inc(x_119); lean_inc(x_118); x_191 = l_Lean_TypeClass_collectEReplacements___main(x_118, x_119, x_190, x_145, x_140, x_6, x_6); x_173 = x_191; @@ -4976,7 +5024,6 @@ lean_dec(x_172); x_193 = l_Array_toList___rarg(x_142); lean_dec(x_142); x_194 = lean_instantiate_type_lparams(x_192, x_193); -lean_inc(x_119); lean_inc(x_118); x_195 = l_Lean_TypeClass_collectEReplacements___main(x_118, x_119, x_194, x_145, x_140, x_6, x_6); x_173 = x_195; @@ -5012,6 +5059,8 @@ if (lean_is_exclusive(x_174)) { x_180 = l_Array_miterateAux___main___at_Lean_mkApp___spec__1(x_178, x_178, x_4, x_120); lean_dec(x_178); x_181 = l_Lean_LocalContext_mkForall(x_118, x_119, x_180); +lean_dec(x_180); +lean_dec(x_119); if (lean_is_scalar(x_179)) { x_182 = lean_alloc_ctor(0, 2, 0); } else { @@ -5168,7 +5217,6 @@ x_246 = lean_unsigned_to_nat(284u); x_247 = lean_unsigned_to_nat(16u); x_248 = l_Lean_TypeClass_preprocessForOutParams___closed__1; x_249 = l_panicWithPos___at_Lean_Expr_bindingDomain___spec__1(x_245, x_246, x_247, x_248); -lean_inc(x_198); lean_inc(x_197); x_250 = l_Lean_TypeClass_collectEReplacements___main(x_197, x_198, x_249, x_227, x_222, x_6, x_6); x_232 = x_250; @@ -5181,7 +5229,6 @@ x_251 = lean_ctor_get(x_231, 0); lean_inc(x_251); lean_dec(x_231); x_252 = lean_instantiate_type_lparams(x_251, x_228); -lean_inc(x_198); lean_inc(x_197); x_253 = l_Lean_TypeClass_collectEReplacements___main(x_197, x_198, x_252, x_227, x_222, x_6, x_6); x_232 = x_253; @@ -5217,6 +5264,8 @@ if (lean_is_exclusive(x_233)) { x_239 = l_Array_miterateAux___main___at_Lean_mkApp___spec__1(x_237, x_237, x_4, x_229); lean_dec(x_237); x_240 = l_Lean_LocalContext_mkForall(x_197, x_198, x_239); +lean_dec(x_239); +lean_dec(x_198); if (lean_is_scalar(x_238)) { x_241 = lean_alloc_ctor(0, 2, 0); } else { @@ -5254,7 +5303,6 @@ x_269 = lean_unsigned_to_nat(284u); x_270 = lean_unsigned_to_nat(16u); x_271 = l_Lean_TypeClass_preprocessForOutParams___closed__1; x_272 = l_panicWithPos___at_Lean_Expr_bindingDomain___spec__1(x_268, x_269, x_270, x_271); -lean_inc(x_198); lean_inc(x_197); x_273 = l_Lean_TypeClass_collectEReplacements___main(x_197, x_198, x_272, x_227, x_222, x_6, x_6); x_255 = x_273; @@ -5269,7 +5317,6 @@ lean_dec(x_254); x_275 = l_Array_toList___rarg(x_224); lean_dec(x_224); x_276 = lean_instantiate_type_lparams(x_274, x_275); -lean_inc(x_198); lean_inc(x_197); x_277 = l_Lean_TypeClass_collectEReplacements___main(x_197, x_198, x_276, x_227, x_222, x_6, x_6); x_255 = x_277; @@ -5305,6 +5352,8 @@ if (lean_is_exclusive(x_256)) { x_262 = l_Array_miterateAux___main___at_Lean_mkApp___spec__1(x_260, x_260, x_4, x_200); lean_dec(x_260); x_263 = l_Lean_LocalContext_mkForall(x_197, x_198, x_262); +lean_dec(x_262); +lean_dec(x_198); if (lean_is_scalar(x_261)) { x_264 = lean_alloc_ctor(0, 2, 0); } else { diff --git a/src/stage0/Init/Lean/TypeContext.c b/src/stage0/Init/Lean/TypeContext.c index 439f7e92c5..c2a66194bb 100644 --- a/src/stage0/Init/Lean/TypeContext.c +++ b/src/stage0/Init/Lean/TypeContext.c @@ -1,6 +1,6 @@ // Lean compiler output // Module: Init.Lean.TypeContext -// Imports: Init.Control.Reader Init.Lean.NameGenerator Init.Lean.Environment Init.Lean.LocalContext Init.Lean.Trace +// Imports: Init.Control.Reader Init.Lean.NameGenerator Init.Lean.Environment Init.Lean.AbstractMetavarContext Init.Lean.Trace #include "runtime/lean.h" #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" @@ -13,138 +13,34 @@ #ifdef __cplusplus extern "C" { #endif -lean_object* l_Lean_AbstractTypeContext_instantiateExprMVars___rarg___closed__1; +lean_object* l_Lean_typeContextNoCacheIsAbstractTCCache___closed__1; lean_object* l___private_Init_Lean_TypeContext_1__getOptions(lean_object*, lean_object*); -lean_object* l_Lean_AbstractTypeContext_InstantiateExprMVars_main___main___rarg(lean_object*, lean_object*, lean_object*); -lean_object* lean_expr_update_app(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l_List_mmap___main___at_Lean_AbstractTypeContext_InstantiateExprMVars_main___main___spec__1(lean_object*); -lean_object* l_Lean_AbstractTypeContext_InstantiateExprMVars_visit(lean_object*); lean_object* l_Lean_AbstractTypeContext_tracer___closed__3; -lean_object* l_List_foldr___main___at_Lean_AbstractTypeContext_hasAssignedMVar___main___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* lean_mk_array(lean_object*, lean_object*); -size_t lean_expr_hash(lean_object*); -lean_object* l_Lean_AbstractTypeContext_isExprAssigned___rarg___boxed(lean_object*, lean_object*, lean_object*); -uint8_t lean_level_has_mvar(lean_object*); -uint8_t l_Lean_metavarContextIsAbstractMetavarContext___lambda__1(lean_object*); -lean_object* l_Lean_MetavarContext_getExprMVarLCtx(lean_object*, lean_object*); -uint8_t l_Lean_AbstractTypeContext_hasAssignedMVar___rarg(lean_object*, lean_object*, lean_object*); -lean_object* lean_metavar_ctx_erase_delayed(lean_object*, lean_object*); -lean_object* l_Lean_AbstractTypeContext_hasAssignedMVar___rarg___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_typeContextNoCacheIsAbstractTCCache___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_typeContextNoCacheIsAbstractTCCache___lambda__1(lean_object*, uint8_t, lean_object*); lean_object* l_Lean_TCState_backtrackable___lambda__2(lean_object*, lean_object*); lean_object* l_Lean_TCState_backtrackable___lambda__1___boxed(lean_object*); -lean_object* lean_metavar_ctx_get_delayed_assignment(lean_object*, lean_object*); -lean_object* l_Lean_Expr_updateLet_x21(lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_MetavarContext_mkMetavarContext___closed__1; -lean_object* l_Lean_AbstractTypeContext_isLevelAssigned(lean_object*); lean_object* l___private_Init_Lean_TypeContext_2__getTraceState(lean_object*, lean_object*, lean_object*); -lean_object* lean_array_uget(lean_object*, size_t); -lean_object* l_HashMapImp_find___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__1___boxed(lean_object*, lean_object*); -lean_object* lean_array_uset(lean_object*, size_t, lean_object*); -lean_object* l_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache(lean_object*); lean_object* l___private_Init_Lean_TypeContext_2__getTraceState___boxed(lean_object*, lean_object*, lean_object*); -lean_object* lean_metavar_ctx_get_expr_assignment(lean_object*, lean_object*); -lean_object* l_Lean_metavarContextIsAbstractMetavarContext___closed__3; lean_object* l___private_Init_Lean_TypeContext_1__getOptions___rarg___boxed(lean_object*, lean_object*); -lean_object* l_Lean_MetavarContext_getExprMVarType(lean_object*, lean_object*); -lean_object* l_Lean_AbstractTypeContext_InstantiateExprMVars_main___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l_AssocList_mfoldl___main___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__7(lean_object*, lean_object*); -uint8_t l_Lean_AbstractTypeContext_isLevelAssigned___rarg(lean_object*, lean_object*, lean_object*); -lean_object* lean_expr_update_forall(lean_object*, uint8_t, lean_object*, lean_object*); -lean_object* lean_level_update_succ(lean_object*, lean_object*); lean_object* l_Lean_TCState_backtrackable___closed__3; -lean_object* l_Lean_AbstractTypeContext_hasAssignedMVar(lean_object*); -lean_object* l_Lean_AbstractTypeContext_InstantiateExprMVars_main___main(lean_object*); -lean_object* l_Lean_AbstractTypeContext_hasAssignedMVar___main(lean_object*); -lean_object* l_Lean_AbstractTypeContext_instantiateLevelMVars(lean_object*); lean_object* l_Lean_TCState_backtrackable___lambda__1(lean_object*); -lean_object* l_List_foldr___main___at_Lean_AbstractTypeContext_hasAssignedMVar___main___spec__1(lean_object*); lean_object* l___private_Init_Lean_TypeContext_1__getOptions___rarg(lean_object*, lean_object*); -lean_object* l_Lean_AbstractTypeContext_instantiateExprMVars___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l_List_mmap___main___at_Lean_AbstractTypeContext_InstantiateExprMVars_main___main___spec__1___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l_HashMapImp_expand___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__5(lean_object*, lean_object*); -lean_object* l_Lean_metavarContextIsAbstractMetavarContext; lean_object* l_Lean_TCState_backtrackable___closed__2; -lean_object* l_Lean_AbstractTypeContext_hasAssignedLevelMVar___rarg___boxed(lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_Expr_constName___closed__1; -lean_object* l_AssocList_contains___main___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__4___boxed(lean_object*, lean_object*); -lean_object* l_Lean_AbstractTypeContext_isLevelAssigned___rarg___boxed(lean_object*, lean_object*, lean_object*); -uint8_t lean_expr_eqv(lean_object*, lean_object*); lean_object* l_Lean_AbstractTypeContext_tracer___lambda__1___boxed(lean_object*, lean_object*, lean_object*); -uint8_t l_Lean_AbstractTypeContext_hasAssignedMVar___main___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_metavarContextIsAbstractMetavarContext___closed__2; +lean_object* l_Lean_typeContextNoCacheIsAbstractTCCache___closed__2; lean_object* l_Lean_AbstractTypeContext_tracer___closed__2; -extern lean_object* l_Lean_Expr_updateProj_x21___closed__1; -lean_object* l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_AbstractTypeContext_hasAssignedLevelMVar___main(lean_object*); -uint8_t l_AssocList_contains___main___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__4(lean_object*, lean_object*); -uint8_t lean_nat_dec_lt(lean_object*, lean_object*); -lean_object* lean_expr_update_const(lean_object*, lean_object*); -lean_object* l_HashMapImp_moveEntries___main___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__6(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_metavarContextIsAbstractMetavarContext___lambda__1___boxed(lean_object*); -lean_object* l_Lean_metavarContextIsAbstractMetavarContext___closed__7; -lean_object* lean_nat_add(lean_object*, lean_object*); -lean_object* lean_metavar_ctx_assign_expr(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_AbstractTypeContext_tracer___closed__1; -lean_object* lean_expr_update_proj(lean_object*, lean_object*); -lean_object* l_HashMapImp_find___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__1(lean_object*, lean_object*); -lean_object* l_Lean_metavarContextIsAbstractMetavarContext___closed__8; lean_object* l_Lean_AbstractTypeContext_tracer___lambda__1(lean_object*, lean_object*, lean_object*); -lean_object* lean_expr_update_mdata(lean_object*, lean_object*); lean_object* l_Lean_TCState_backtrackable___closed__1; lean_object* l_Lean_TCState_backtrackable(lean_object*, lean_object*); -lean_object* l_Lean_AbstractTypeContext_instantiateLevelMVars___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_AbstractTypeContext_InstantiateExprMVars_main(lean_object*); -lean_object* l_Lean_metavarContextIsAbstractMetavarContext___closed__4; lean_object* l_Lean_AbstractTypeContext_tracer(lean_object*, lean_object*); -lean_object* lean_metavar_ctx_get_level_assignment(lean_object*, lean_object*); -lean_object* lean_expr_update_lambda(lean_object*, uint8_t, lean_object*, lean_object*); -lean_object* l_Lean_metavarContextIsAbstractMetavarContext___closed__6; -extern lean_object* l_Lean_Level_updateSucc_x21___closed__1; -lean_object* l_Lean_metavarContextIsAbstractMetavarContext___closed__9; -lean_object* l_Lean_AbstractTypeContext_instantiateLevelMVars___main___rarg(lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_TypeContext_2__getTraceState___rarg(lean_object*); -lean_object* l_Lean_AbstractTypeContext_InstantiateExprMVars_getMCtx___rarg(lean_object*); -lean_object* l_Lean_metavarContextIsAbstractMetavarContext___closed__11; lean_object* l_Lean_AbstractTypeContext_tracer___closed__4; -extern lean_object* l_Lean_Level_updateIMax_x21___closed__1; -size_t lean_usize_modn(size_t, lean_object*); -lean_object* l_Lean_AbstractTypeContext_hasAssignedLevelMVar___main___rarg___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_AssocList_find___main___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__2___boxed(lean_object*, lean_object*); -uint8_t l_Lean_AbstractTypeContext_hasAssignedLevelMVar___main___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_AbstractTypeContext_isExprAssigned(lean_object*); -lean_object* l_Lean_AbstractTypeContext_InstantiateExprMVars_instantiateLevelMVars___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l_AssocList_find___main___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__2(lean_object*, lean_object*); -lean_object* lean_array_get_size(lean_object*); -lean_object* l_Lean_AbstractTypeContext_hasAssignedMVar___main___rarg___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_metavarContextIsAbstractMetavarContext___closed__1; -lean_object* lean_array_fget(lean_object*, lean_object*); -lean_object* l_mkHashMapImp___rarg(lean_object*); -lean_object* l_Lean_metavarContextIsAbstractMetavarContext___closed__5; -lean_object* lean_metavar_ctx_assign_delayed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -uint8_t lean_nat_dec_le(lean_object*, lean_object*); -uint8_t l_List_foldr___main___at_Lean_AbstractTypeContext_hasAssignedMVar___main___spec__1___rarg(lean_object*, lean_object*, uint8_t, lean_object*); -lean_object* lean_level_update_max(lean_object*, lean_object*, lean_object*); -uint8_t lean_expr_has_expr_mvar(lean_object*); -lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_Expr_updateMData_x21___closed__1; -lean_object* l_Lean_AbstractTypeContext_InstantiateExprMVars_getMCtx(lean_object*); -lean_object* l_AssocList_replace___main___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__8(lean_object*, lean_object*, lean_object*); -lean_object* l_panicWithPos___at_Lean_Expr_bindingDomain___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_AbstractTypeContext_instantiateLevelMVars___main(lean_object*); -lean_object* lean_expr_update_sort(lean_object*, lean_object*); -lean_object* l_Lean_AbstractTypeContext_InstantiateExprMVars_visit___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_AbstractTypeContext_InstantiateExprMVars_instantiateLevelMVars(lean_object*); -lean_object* lean_metavar_ctx_assign_level(lean_object*, lean_object*, lean_object*); -lean_object* lean_nat_mul(lean_object*, lean_object*); -lean_object* l_Lean_metavarContextIsAbstractMetavarContext___closed__10; -lean_object* l_mkHashMap___at_Lean_AbstractTypeContext_instantiateExprMVars___spec__1(lean_object*); -uint8_t l_Lean_AbstractTypeContext_isExprAssigned___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l_panicWithPos___at_Lean_Level_updateSucc_x21___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); -uint8_t l_Lean_AbstractTypeContext_hasAssignedLevelMVar___rarg(lean_object*, lean_object*, lean_object*); -uint8_t lean_expr_has_level_mvar(lean_object*); -lean_object* l_Lean_AbstractTypeContext_hasAssignedLevelMVar(lean_object*); -lean_object* l_Lean_AbstractTypeContext_instantiateExprMVars(lean_object*); +lean_object* l_Lean_typeContextNoCacheIsAbstractTCCache___lambda__2(lean_object*, uint8_t, lean_object*, lean_object*); +lean_object* l_Lean_typeContextNoCacheIsAbstractTCCache___closed__3; +lean_object* l_Lean_typeContextNoCacheIsAbstractTCCache; +lean_object* l_Lean_typeContextNoCacheIsAbstractTCCache___lambda__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_TCState_backtrackable___lambda__1(lean_object* x_1) { _start: { @@ -236,5013 +132,6 @@ lean_dec(x_1); return x_2; } } -uint8_t l_Lean_AbstractTypeContext_isLevelAssigned___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; lean_object* x_5; -x_4 = lean_ctor_get(x_1, 2); -lean_inc(x_4); -lean_dec(x_1); -x_5 = lean_apply_2(x_4, x_2, x_3); -if (lean_obj_tag(x_5) == 0) -{ -uint8_t x_6; -x_6 = 0; -return x_6; -} -else -{ -uint8_t x_7; -lean_dec(x_5); -x_7 = 1; -return x_7; -} -} -} -lean_object* l_Lean_AbstractTypeContext_isLevelAssigned(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_AbstractTypeContext_isLevelAssigned___rarg___boxed), 3, 0); -return x_2; -} -} -lean_object* l_Lean_AbstractTypeContext_isLevelAssigned___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -uint8_t x_4; lean_object* x_5; -x_4 = l_Lean_AbstractTypeContext_isLevelAssigned___rarg(x_1, x_2, x_3); -x_5 = lean_box(x_4); -return x_5; -} -} -uint8_t l_Lean_AbstractTypeContext_isExprAssigned___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; lean_object* x_5; -x_4 = lean_ctor_get(x_1, 5); -lean_inc(x_4); -lean_dec(x_1); -x_5 = lean_apply_2(x_4, x_2, x_3); -if (lean_obj_tag(x_5) == 0) -{ -uint8_t x_6; -x_6 = 0; -return x_6; -} -else -{ -uint8_t x_7; -lean_dec(x_5); -x_7 = 1; -return x_7; -} -} -} -lean_object* l_Lean_AbstractTypeContext_isExprAssigned(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_AbstractTypeContext_isExprAssigned___rarg___boxed), 3, 0); -return x_2; -} -} -lean_object* l_Lean_AbstractTypeContext_isExprAssigned___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -uint8_t x_4; lean_object* x_5; -x_4 = l_Lean_AbstractTypeContext_isExprAssigned___rarg(x_1, x_2, x_3); -x_5 = lean_box(x_4); -return x_5; -} -} -uint8_t l_Lean_AbstractTypeContext_hasAssignedLevelMVar___main___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -switch (lean_obj_tag(x_3)) { -case 1: -{ -lean_object* x_4; uint8_t x_5; -x_4 = lean_ctor_get(x_3, 0); -lean_inc(x_4); -lean_dec(x_3); -lean_inc(x_4); -x_5 = lean_level_has_mvar(x_4); -if (x_5 == 0) -{ -uint8_t x_6; -lean_dec(x_4); -lean_dec(x_2); -lean_dec(x_1); -x_6 = 0; -return x_6; -} -else -{ -x_3 = x_4; -goto _start; -} -} -case 2: -{ -lean_object* x_8; lean_object* x_9; uint8_t x_10; -x_8 = lean_ctor_get(x_3, 0); -lean_inc(x_8); -x_9 = lean_ctor_get(x_3, 1); -lean_inc(x_9); -lean_dec(x_3); -lean_inc(x_8); -x_10 = lean_level_has_mvar(x_8); -if (x_10 == 0) -{ -uint8_t x_11; -lean_dec(x_8); -lean_inc(x_9); -x_11 = lean_level_has_mvar(x_9); -if (x_11 == 0) -{ -uint8_t x_12; -lean_dec(x_9); -lean_dec(x_2); -lean_dec(x_1); -x_12 = 0; -return x_12; -} -else -{ -x_3 = x_9; -goto _start; -} -} -else -{ -uint8_t x_14; -lean_inc(x_2); -lean_inc(x_1); -x_14 = l_Lean_AbstractTypeContext_hasAssignedLevelMVar___main___rarg(x_1, x_2, x_8); -if (x_14 == 0) -{ -uint8_t x_15; -lean_inc(x_9); -x_15 = lean_level_has_mvar(x_9); -if (x_15 == 0) -{ -lean_dec(x_9); -lean_dec(x_2); -lean_dec(x_1); -return x_14; -} -else -{ -x_3 = x_9; -goto _start; -} -} -else -{ -uint8_t x_17; -lean_dec(x_9); -lean_dec(x_2); -lean_dec(x_1); -x_17 = 1; -return x_17; -} -} -} -case 3: -{ -lean_object* x_18; lean_object* x_19; uint8_t x_20; -x_18 = lean_ctor_get(x_3, 0); -lean_inc(x_18); -x_19 = lean_ctor_get(x_3, 1); -lean_inc(x_19); -lean_dec(x_3); -lean_inc(x_18); -x_20 = lean_level_has_mvar(x_18); -if (x_20 == 0) -{ -uint8_t x_21; -lean_dec(x_18); -lean_inc(x_19); -x_21 = lean_level_has_mvar(x_19); -if (x_21 == 0) -{ -uint8_t x_22; -lean_dec(x_19); -lean_dec(x_2); -lean_dec(x_1); -x_22 = 0; -return x_22; -} -else -{ -x_3 = x_19; -goto _start; -} -} -else -{ -uint8_t x_24; -lean_inc(x_2); -lean_inc(x_1); -x_24 = l_Lean_AbstractTypeContext_hasAssignedLevelMVar___main___rarg(x_1, x_2, x_18); -if (x_24 == 0) -{ -uint8_t x_25; -lean_inc(x_19); -x_25 = lean_level_has_mvar(x_19); -if (x_25 == 0) -{ -lean_dec(x_19); -lean_dec(x_2); -lean_dec(x_1); -return x_24; -} -else -{ -x_3 = x_19; -goto _start; -} -} -else -{ -uint8_t x_27; -lean_dec(x_19); -lean_dec(x_2); -lean_dec(x_1); -x_27 = 1; -return x_27; -} -} -} -case 5: -{ -lean_object* x_28; lean_object* x_29; lean_object* x_30; -x_28 = lean_ctor_get(x_3, 0); -lean_inc(x_28); -lean_dec(x_3); -x_29 = lean_ctor_get(x_1, 2); -lean_inc(x_29); -lean_dec(x_1); -x_30 = lean_apply_2(x_29, x_2, x_28); -if (lean_obj_tag(x_30) == 0) -{ -uint8_t x_31; -x_31 = 0; -return x_31; -} -else -{ -uint8_t x_32; -lean_dec(x_30); -x_32 = 1; -return x_32; -} -} -default: -{ -uint8_t x_33; -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_33 = 0; -return x_33; -} -} -} -} -lean_object* l_Lean_AbstractTypeContext_hasAssignedLevelMVar___main(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_AbstractTypeContext_hasAssignedLevelMVar___main___rarg___boxed), 3, 0); -return x_2; -} -} -lean_object* l_Lean_AbstractTypeContext_hasAssignedLevelMVar___main___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -uint8_t x_4; lean_object* x_5; -x_4 = l_Lean_AbstractTypeContext_hasAssignedLevelMVar___main___rarg(x_1, x_2, x_3); -x_5 = lean_box(x_4); -return x_5; -} -} -uint8_t l_Lean_AbstractTypeContext_hasAssignedLevelMVar___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -uint8_t x_4; -x_4 = l_Lean_AbstractTypeContext_hasAssignedLevelMVar___main___rarg(x_1, x_2, x_3); -return x_4; -} -} -lean_object* l_Lean_AbstractTypeContext_hasAssignedLevelMVar(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_AbstractTypeContext_hasAssignedLevelMVar___rarg___boxed), 3, 0); -return x_2; -} -} -lean_object* l_Lean_AbstractTypeContext_hasAssignedLevelMVar___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -uint8_t x_4; lean_object* x_5; -x_4 = l_Lean_AbstractTypeContext_hasAssignedLevelMVar___rarg(x_1, x_2, x_3); -x_5 = lean_box(x_4); -return x_5; -} -} -uint8_t l_List_foldr___main___at_Lean_AbstractTypeContext_hasAssignedMVar___main___spec__1___rarg(lean_object* x_1, lean_object* x_2, uint8_t x_3, lean_object* x_4) { -_start: -{ -if (lean_obj_tag(x_4) == 0) -{ -lean_dec(x_2); -lean_dec(x_1); -return x_3; -} -else -{ -lean_object* x_5; lean_object* x_6; uint8_t x_7; uint8_t 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); -lean_inc(x_2); -lean_inc(x_1); -x_7 = l_List_foldr___main___at_Lean_AbstractTypeContext_hasAssignedMVar___main___spec__1___rarg(x_1, x_2, x_3, x_6); -x_8 = l_Lean_AbstractTypeContext_hasAssignedLevelMVar___main___rarg(x_1, x_2, x_5); -if (x_8 == 0) -{ -return x_7; -} -else -{ -uint8_t x_9; -x_9 = 1; -return x_9; -} -} -} -} -lean_object* l_List_foldr___main___at_Lean_AbstractTypeContext_hasAssignedMVar___main___spec__1(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_List_foldr___main___at_Lean_AbstractTypeContext_hasAssignedMVar___main___spec__1___rarg___boxed), 4, 0); -return x_2; -} -} -uint8_t l_Lean_AbstractTypeContext_hasAssignedMVar___main___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -switch (lean_obj_tag(x_3)) { -case 2: -{ -lean_object* x_4; lean_object* x_5; lean_object* x_6; -x_4 = lean_ctor_get(x_3, 0); -lean_inc(x_4); -lean_dec(x_3); -x_5 = lean_ctor_get(x_1, 5); -lean_inc(x_5); -lean_dec(x_1); -x_6 = lean_apply_2(x_5, x_2, x_4); -if (lean_obj_tag(x_6) == 0) -{ -uint8_t x_7; -x_7 = 0; -return x_7; -} -else -{ -uint8_t x_8; -lean_dec(x_6); -x_8 = 1; -return x_8; -} -} -case 3: -{ -lean_object* x_9; uint8_t x_10; -x_9 = lean_ctor_get(x_3, 0); -lean_inc(x_9); -lean_dec(x_3); -x_10 = l_Lean_AbstractTypeContext_hasAssignedLevelMVar___main___rarg(x_1, x_2, x_9); -return x_10; -} -case 4: -{ -lean_object* x_11; uint8_t x_12; uint8_t x_13; -x_11 = lean_ctor_get(x_3, 1); -lean_inc(x_11); -lean_dec(x_3); -x_12 = 0; -x_13 = l_List_foldr___main___at_Lean_AbstractTypeContext_hasAssignedMVar___main___spec__1___rarg(x_1, x_2, x_12, x_11); -return x_13; -} -case 5: -{ -lean_object* x_14; lean_object* x_15; uint8_t x_16; -x_14 = lean_ctor_get(x_3, 0); -lean_inc(x_14); -x_15 = lean_ctor_get(x_3, 1); -lean_inc(x_15); -lean_dec(x_3); -x_16 = lean_expr_has_expr_mvar(x_14); -if (x_16 == 0) -{ -uint8_t x_17; -x_17 = lean_expr_has_level_mvar(x_14); -if (x_17 == 0) -{ -uint8_t x_18; -lean_dec(x_14); -x_18 = lean_expr_has_expr_mvar(x_15); -if (x_18 == 0) -{ -uint8_t x_19; -x_19 = lean_expr_has_level_mvar(x_15); -if (x_19 == 0) -{ -uint8_t x_20; -lean_dec(x_15); -lean_dec(x_2); -lean_dec(x_1); -x_20 = 0; -return x_20; -} -else -{ -x_3 = x_15; -goto _start; -} -} -else -{ -x_3 = x_15; -goto _start; -} -} -else -{ -uint8_t x_23; -lean_inc(x_2); -lean_inc(x_1); -x_23 = l_Lean_AbstractTypeContext_hasAssignedMVar___main___rarg(x_1, x_2, x_14); -if (x_23 == 0) -{ -uint8_t x_24; -x_24 = lean_expr_has_expr_mvar(x_15); -if (x_24 == 0) -{ -uint8_t x_25; -x_25 = lean_expr_has_level_mvar(x_15); -if (x_25 == 0) -{ -lean_dec(x_15); -lean_dec(x_2); -lean_dec(x_1); -return x_23; -} -else -{ -x_3 = x_15; -goto _start; -} -} -else -{ -x_3 = x_15; -goto _start; -} -} -else -{ -uint8_t x_28; -lean_dec(x_15); -lean_dec(x_2); -lean_dec(x_1); -x_28 = 1; -return x_28; -} -} -} -else -{ -uint8_t x_29; -lean_inc(x_2); -lean_inc(x_1); -x_29 = l_Lean_AbstractTypeContext_hasAssignedMVar___main___rarg(x_1, x_2, x_14); -if (x_29 == 0) -{ -uint8_t x_30; -x_30 = lean_expr_has_expr_mvar(x_15); -if (x_30 == 0) -{ -uint8_t x_31; -x_31 = lean_expr_has_level_mvar(x_15); -if (x_31 == 0) -{ -lean_dec(x_15); -lean_dec(x_2); -lean_dec(x_1); -return x_29; -} -else -{ -x_3 = x_15; -goto _start; -} -} -else -{ -x_3 = x_15; -goto _start; -} -} -else -{ -uint8_t x_34; -lean_dec(x_15); -lean_dec(x_2); -lean_dec(x_1); -x_34 = 1; -return x_34; -} -} -} -case 6: -{ -lean_object* x_35; lean_object* x_36; uint8_t x_37; -x_35 = lean_ctor_get(x_3, 1); -lean_inc(x_35); -x_36 = lean_ctor_get(x_3, 2); -lean_inc(x_36); -lean_dec(x_3); -x_37 = lean_expr_has_expr_mvar(x_35); -if (x_37 == 0) -{ -uint8_t x_38; -x_38 = lean_expr_has_level_mvar(x_35); -if (x_38 == 0) -{ -uint8_t x_39; -lean_dec(x_35); -x_39 = lean_expr_has_expr_mvar(x_36); -if (x_39 == 0) -{ -uint8_t x_40; -x_40 = lean_expr_has_level_mvar(x_36); -if (x_40 == 0) -{ -uint8_t x_41; -lean_dec(x_36); -lean_dec(x_2); -lean_dec(x_1); -x_41 = 0; -return x_41; -} -else -{ -x_3 = x_36; -goto _start; -} -} -else -{ -x_3 = x_36; -goto _start; -} -} -else -{ -uint8_t x_44; -lean_inc(x_2); -lean_inc(x_1); -x_44 = l_Lean_AbstractTypeContext_hasAssignedMVar___main___rarg(x_1, x_2, x_35); -if (x_44 == 0) -{ -uint8_t x_45; -x_45 = lean_expr_has_expr_mvar(x_36); -if (x_45 == 0) -{ -uint8_t x_46; -x_46 = lean_expr_has_level_mvar(x_36); -if (x_46 == 0) -{ -lean_dec(x_36); -lean_dec(x_2); -lean_dec(x_1); -return x_44; -} -else -{ -x_3 = x_36; -goto _start; -} -} -else -{ -x_3 = x_36; -goto _start; -} -} -else -{ -uint8_t x_49; -lean_dec(x_36); -lean_dec(x_2); -lean_dec(x_1); -x_49 = 1; -return x_49; -} -} -} -else -{ -uint8_t x_50; -lean_inc(x_2); -lean_inc(x_1); -x_50 = l_Lean_AbstractTypeContext_hasAssignedMVar___main___rarg(x_1, x_2, x_35); -if (x_50 == 0) -{ -uint8_t x_51; -x_51 = lean_expr_has_expr_mvar(x_36); -if (x_51 == 0) -{ -uint8_t x_52; -x_52 = lean_expr_has_level_mvar(x_36); -if (x_52 == 0) -{ -lean_dec(x_36); -lean_dec(x_2); -lean_dec(x_1); -return x_50; -} -else -{ -x_3 = x_36; -goto _start; -} -} -else -{ -x_3 = x_36; -goto _start; -} -} -else -{ -uint8_t x_55; -lean_dec(x_36); -lean_dec(x_2); -lean_dec(x_1); -x_55 = 1; -return x_55; -} -} -} -case 7: -{ -lean_object* x_56; lean_object* x_57; uint8_t x_58; -x_56 = lean_ctor_get(x_3, 1); -lean_inc(x_56); -x_57 = lean_ctor_get(x_3, 2); -lean_inc(x_57); -lean_dec(x_3); -x_58 = lean_expr_has_expr_mvar(x_56); -if (x_58 == 0) -{ -uint8_t x_59; -x_59 = lean_expr_has_level_mvar(x_56); -if (x_59 == 0) -{ -uint8_t x_60; -lean_dec(x_56); -x_60 = lean_expr_has_expr_mvar(x_57); -if (x_60 == 0) -{ -uint8_t x_61; -x_61 = lean_expr_has_level_mvar(x_57); -if (x_61 == 0) -{ -uint8_t x_62; -lean_dec(x_57); -lean_dec(x_2); -lean_dec(x_1); -x_62 = 0; -return x_62; -} -else -{ -x_3 = x_57; -goto _start; -} -} -else -{ -x_3 = x_57; -goto _start; -} -} -else -{ -uint8_t x_65; -lean_inc(x_2); -lean_inc(x_1); -x_65 = l_Lean_AbstractTypeContext_hasAssignedMVar___main___rarg(x_1, x_2, x_56); -if (x_65 == 0) -{ -uint8_t x_66; -x_66 = lean_expr_has_expr_mvar(x_57); -if (x_66 == 0) -{ -uint8_t x_67; -x_67 = lean_expr_has_level_mvar(x_57); -if (x_67 == 0) -{ -lean_dec(x_57); -lean_dec(x_2); -lean_dec(x_1); -return x_65; -} -else -{ -x_3 = x_57; -goto _start; -} -} -else -{ -x_3 = x_57; -goto _start; -} -} -else -{ -uint8_t x_70; -lean_dec(x_57); -lean_dec(x_2); -lean_dec(x_1); -x_70 = 1; -return x_70; -} -} -} -else -{ -uint8_t x_71; -lean_inc(x_2); -lean_inc(x_1); -x_71 = l_Lean_AbstractTypeContext_hasAssignedMVar___main___rarg(x_1, x_2, x_56); -if (x_71 == 0) -{ -uint8_t x_72; -x_72 = lean_expr_has_expr_mvar(x_57); -if (x_72 == 0) -{ -uint8_t x_73; -x_73 = lean_expr_has_level_mvar(x_57); -if (x_73 == 0) -{ -lean_dec(x_57); -lean_dec(x_2); -lean_dec(x_1); -return x_71; -} -else -{ -x_3 = x_57; -goto _start; -} -} -else -{ -x_3 = x_57; -goto _start; -} -} -else -{ -uint8_t x_76; -lean_dec(x_57); -lean_dec(x_2); -lean_dec(x_1); -x_76 = 1; -return x_76; -} -} -} -case 8: -{ -lean_object* x_77; lean_object* x_78; lean_object* x_79; uint8_t x_80; uint8_t x_101; -x_77 = lean_ctor_get(x_3, 1); -lean_inc(x_77); -x_78 = lean_ctor_get(x_3, 2); -lean_inc(x_78); -x_79 = lean_ctor_get(x_3, 3); -lean_inc(x_79); -lean_dec(x_3); -x_101 = lean_expr_has_expr_mvar(x_77); -if (x_101 == 0) -{ -uint8_t x_102; -x_102 = lean_expr_has_level_mvar(x_77); -if (x_102 == 0) -{ -uint8_t x_103; -lean_dec(x_77); -x_103 = 0; -x_80 = x_103; -goto block_100; -} -else -{ -uint8_t x_104; -lean_inc(x_2); -lean_inc(x_1); -x_104 = l_Lean_AbstractTypeContext_hasAssignedMVar___main___rarg(x_1, x_2, x_77); -if (x_104 == 0) -{ -x_80 = x_104; -goto block_100; -} -else -{ -uint8_t x_105; -lean_dec(x_79); -lean_dec(x_78); -lean_dec(x_2); -lean_dec(x_1); -x_105 = 1; -return x_105; -} -} -} -else -{ -uint8_t x_106; -lean_inc(x_2); -lean_inc(x_1); -x_106 = l_Lean_AbstractTypeContext_hasAssignedMVar___main___rarg(x_1, x_2, x_77); -if (x_106 == 0) -{ -x_80 = x_106; -goto block_100; -} -else -{ -uint8_t x_107; -lean_dec(x_79); -lean_dec(x_78); -lean_dec(x_2); -lean_dec(x_1); -x_107 = 1; -return x_107; -} -} -block_100: -{ -uint8_t x_81; -x_81 = lean_expr_has_expr_mvar(x_78); -if (x_81 == 0) -{ -uint8_t x_82; -x_82 = lean_expr_has_level_mvar(x_78); -if (x_82 == 0) -{ -lean_dec(x_78); -if (x_80 == 0) -{ -uint8_t x_83; -x_83 = lean_expr_has_expr_mvar(x_79); -if (x_83 == 0) -{ -uint8_t x_84; -x_84 = lean_expr_has_level_mvar(x_79); -if (x_84 == 0) -{ -lean_dec(x_79); -lean_dec(x_2); -lean_dec(x_1); -return x_80; -} -else -{ -x_3 = x_79; -goto _start; -} -} -else -{ -x_3 = x_79; -goto _start; -} -} -else -{ -uint8_t x_87; -lean_dec(x_79); -lean_dec(x_2); -lean_dec(x_1); -x_87 = 1; -return x_87; -} -} -else -{ -uint8_t x_88; -lean_inc(x_2); -lean_inc(x_1); -x_88 = l_Lean_AbstractTypeContext_hasAssignedMVar___main___rarg(x_1, x_2, x_78); -if (x_88 == 0) -{ -uint8_t x_89; -x_89 = lean_expr_has_expr_mvar(x_79); -if (x_89 == 0) -{ -uint8_t x_90; -x_90 = lean_expr_has_level_mvar(x_79); -if (x_90 == 0) -{ -lean_dec(x_79); -lean_dec(x_2); -lean_dec(x_1); -return x_88; -} -else -{ -x_3 = x_79; -goto _start; -} -} -else -{ -x_3 = x_79; -goto _start; -} -} -else -{ -uint8_t x_93; -lean_dec(x_79); -lean_dec(x_2); -lean_dec(x_1); -x_93 = 1; -return x_93; -} -} -} -else -{ -uint8_t x_94; -lean_inc(x_2); -lean_inc(x_1); -x_94 = l_Lean_AbstractTypeContext_hasAssignedMVar___main___rarg(x_1, x_2, x_78); -if (x_94 == 0) -{ -uint8_t x_95; -x_95 = lean_expr_has_expr_mvar(x_79); -if (x_95 == 0) -{ -uint8_t x_96; -x_96 = lean_expr_has_level_mvar(x_79); -if (x_96 == 0) -{ -lean_dec(x_79); -lean_dec(x_2); -lean_dec(x_1); -return x_94; -} -else -{ -x_3 = x_79; -goto _start; -} -} -else -{ -x_3 = x_79; -goto _start; -} -} -else -{ -uint8_t x_99; -lean_dec(x_79); -lean_dec(x_2); -lean_dec(x_1); -x_99 = 1; -return x_99; -} -} -} -} -case 10: -{ -lean_object* x_108; uint8_t x_109; -x_108 = lean_ctor_get(x_3, 1); -lean_inc(x_108); -lean_dec(x_3); -x_109 = lean_expr_has_expr_mvar(x_108); -if (x_109 == 0) -{ -uint8_t x_110; -x_110 = lean_expr_has_level_mvar(x_108); -if (x_110 == 0) -{ -uint8_t x_111; -lean_dec(x_108); -lean_dec(x_2); -lean_dec(x_1); -x_111 = 0; -return x_111; -} -else -{ -x_3 = x_108; -goto _start; -} -} -else -{ -x_3 = x_108; -goto _start; -} -} -case 11: -{ -lean_object* x_114; uint8_t x_115; -x_114 = lean_ctor_get(x_3, 2); -lean_inc(x_114); -lean_dec(x_3); -x_115 = lean_expr_has_expr_mvar(x_114); -if (x_115 == 0) -{ -uint8_t x_116; -x_116 = lean_expr_has_level_mvar(x_114); -if (x_116 == 0) -{ -uint8_t x_117; -lean_dec(x_114); -lean_dec(x_2); -lean_dec(x_1); -x_117 = 0; -return x_117; -} -else -{ -x_3 = x_114; -goto _start; -} -} -else -{ -x_3 = x_114; -goto _start; -} -} -default: -{ -uint8_t x_120; -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_120 = 0; -return x_120; -} -} -} -} -lean_object* l_Lean_AbstractTypeContext_hasAssignedMVar___main(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_AbstractTypeContext_hasAssignedMVar___main___rarg___boxed), 3, 0); -return x_2; -} -} -lean_object* l_List_foldr___main___at_Lean_AbstractTypeContext_hasAssignedMVar___main___spec__1___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -uint8_t x_5; uint8_t x_6; lean_object* x_7; -x_5 = lean_unbox(x_3); -lean_dec(x_3); -x_6 = l_List_foldr___main___at_Lean_AbstractTypeContext_hasAssignedMVar___main___spec__1___rarg(x_1, x_2, x_5, x_4); -x_7 = lean_box(x_6); -return x_7; -} -} -lean_object* l_Lean_AbstractTypeContext_hasAssignedMVar___main___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -uint8_t x_4; lean_object* x_5; -x_4 = l_Lean_AbstractTypeContext_hasAssignedMVar___main___rarg(x_1, x_2, x_3); -x_5 = lean_box(x_4); -return x_5; -} -} -uint8_t l_Lean_AbstractTypeContext_hasAssignedMVar___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -uint8_t x_4; -x_4 = l_Lean_AbstractTypeContext_hasAssignedMVar___main___rarg(x_1, x_2, x_3); -return x_4; -} -} -lean_object* l_Lean_AbstractTypeContext_hasAssignedMVar(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_AbstractTypeContext_hasAssignedMVar___rarg___boxed), 3, 0); -return x_2; -} -} -lean_object* l_Lean_AbstractTypeContext_hasAssignedMVar___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -uint8_t x_4; lean_object* x_5; -x_4 = l_Lean_AbstractTypeContext_hasAssignedMVar___rarg(x_1, x_2, x_3); -x_5 = lean_box(x_4); -return x_5; -} -} -lean_object* l_Lean_AbstractTypeContext_instantiateLevelMVars___main___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -switch (lean_obj_tag(x_2)) { -case 1: -{ -lean_object* x_4; lean_object* x_5; uint8_t x_6; -x_4 = lean_ctor_get(x_2, 0); -lean_inc(x_4); -x_5 = l_Lean_AbstractTypeContext_instantiateLevelMVars___main___rarg(x_1, x_4, x_3); -x_6 = !lean_is_exclusive(x_5); -if (x_6 == 0) -{ -lean_object* x_7; lean_object* x_8; -x_7 = lean_ctor_get(x_5, 0); -x_8 = lean_level_update_succ(x_2, x_7); -lean_ctor_set(x_5, 0, x_8); -return x_5; -} -else -{ -lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; -x_9 = lean_ctor_get(x_5, 0); -x_10 = lean_ctor_get(x_5, 1); -lean_inc(x_10); -lean_inc(x_9); -lean_dec(x_5); -x_11 = lean_level_update_succ(x_2, x_9); -x_12 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_12, 0, x_11); -lean_ctor_set(x_12, 1, x_10); -return x_12; -} -} -case 2: -{ -lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; uint8_t x_19; -x_13 = lean_ctor_get(x_2, 0); -lean_inc(x_13); -x_14 = lean_ctor_get(x_2, 1); -lean_inc(x_14); -lean_inc(x_1); -x_15 = l_Lean_AbstractTypeContext_instantiateLevelMVars___main___rarg(x_1, x_13, x_3); -x_16 = lean_ctor_get(x_15, 0); -lean_inc(x_16); -x_17 = lean_ctor_get(x_15, 1); -lean_inc(x_17); -lean_dec(x_15); -x_18 = l_Lean_AbstractTypeContext_instantiateLevelMVars___main___rarg(x_1, x_14, x_17); -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_level_update_max(x_2, x_16, x_20); -lean_ctor_set(x_18, 0, x_21); -return x_18; -} -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_level_update_max(x_2, x_16, 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); -return x_25; -} -} -case 3: -{ -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_2, 0); -lean_inc(x_26); -x_27 = lean_ctor_get(x_2, 1); -lean_inc(x_27); -lean_dec(x_2); -lean_inc(x_1); -x_28 = l_Lean_AbstractTypeContext_instantiateLevelMVars___main___rarg(x_1, x_26, x_3); -x_29 = lean_ctor_get(x_28, 1); -lean_inc(x_29); -lean_dec(x_28); -x_30 = l_Lean_AbstractTypeContext_instantiateLevelMVars___main___rarg(x_1, x_27, x_29); -x_31 = !lean_is_exclusive(x_30); -if (x_31 == 0) -{ -lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; -x_32 = lean_ctor_get(x_30, 0); -lean_dec(x_32); -x_33 = l_Lean_Level_updateSucc_x21___closed__1; -x_34 = lean_unsigned_to_nat(218u); -x_35 = lean_unsigned_to_nat(17u); -x_36 = l_Lean_Level_updateIMax_x21___closed__1; -x_37 = l_panicWithPos___at_Lean_Level_updateSucc_x21___spec__1(x_33, x_34, x_35, x_36); -lean_ctor_set(x_30, 0, x_37); -return x_30; -} -else -{ -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_38 = lean_ctor_get(x_30, 1); -lean_inc(x_38); -lean_dec(x_30); -x_39 = l_Lean_Level_updateSucc_x21___closed__1; -x_40 = lean_unsigned_to_nat(218u); -x_41 = lean_unsigned_to_nat(17u); -x_42 = l_Lean_Level_updateIMax_x21___closed__1; -x_43 = l_panicWithPos___at_Lean_Level_updateSucc_x21___spec__1(x_39, x_40, x_41, x_42); -x_44 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_44, 0, x_43); -lean_ctor_set(x_44, 1, x_38); -return x_44; -} -} -case 5: -{ -lean_object* x_45; lean_object* x_46; lean_object* x_47; -x_45 = lean_ctor_get(x_2, 0); -lean_inc(x_45); -x_46 = lean_ctor_get(x_1, 2); -lean_inc(x_46); -lean_inc(x_45); -lean_inc(x_3); -x_47 = lean_apply_2(x_46, x_3, x_45); -if (lean_obj_tag(x_47) == 0) -{ -lean_object* x_48; -lean_dec(x_45); -lean_dec(x_1); -x_48 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_48, 0, x_2); -lean_ctor_set(x_48, 1, x_3); -return x_48; -} -else -{ -lean_object* x_49; uint8_t x_50; -lean_dec(x_2); -x_49 = lean_ctor_get(x_47, 0); -lean_inc(x_49); -lean_dec(x_47); -lean_inc(x_49); -x_50 = lean_level_has_mvar(x_49); -if (x_50 == 0) -{ -lean_object* x_51; -lean_dec(x_45); -lean_dec(x_1); -x_51 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_51, 0, x_49); -lean_ctor_set(x_51, 1, x_3); -return x_51; -} -else -{ -lean_object* x_52; uint8_t x_53; -lean_inc(x_1); -x_52 = l_Lean_AbstractTypeContext_instantiateLevelMVars___main___rarg(x_1, x_49, x_3); -x_53 = !lean_is_exclusive(x_52); -if (x_53 == 0) -{ -lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; -x_54 = lean_ctor_get(x_52, 0); -x_55 = lean_ctor_get(x_52, 1); -x_56 = lean_ctor_get(x_1, 3); -lean_inc(x_56); -lean_dec(x_1); -lean_inc(x_54); -x_57 = lean_apply_3(x_56, x_55, x_45, x_54); -lean_ctor_set(x_52, 1, x_57); -return x_52; -} -else -{ -lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; -x_58 = lean_ctor_get(x_52, 0); -x_59 = lean_ctor_get(x_52, 1); -lean_inc(x_59); -lean_inc(x_58); -lean_dec(x_52); -x_60 = lean_ctor_get(x_1, 3); -lean_inc(x_60); -lean_dec(x_1); -lean_inc(x_58); -x_61 = lean_apply_3(x_60, x_59, x_45, x_58); -x_62 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_62, 0, x_58); -lean_ctor_set(x_62, 1, x_61); -return x_62; -} -} -} -} -default: -{ -lean_object* x_63; -lean_dec(x_1); -x_63 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_63, 0, x_2); -lean_ctor_set(x_63, 1, x_3); -return x_63; -} -} -} -} -lean_object* l_Lean_AbstractTypeContext_instantiateLevelMVars___main(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_AbstractTypeContext_instantiateLevelMVars___main___rarg), 3, 0); -return x_2; -} -} -lean_object* l_Lean_AbstractTypeContext_instantiateLevelMVars___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l_Lean_AbstractTypeContext_instantiateLevelMVars___main___rarg(x_1, x_2, x_3); -return x_4; -} -} -lean_object* l_Lean_AbstractTypeContext_instantiateLevelMVars(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_AbstractTypeContext_instantiateLevelMVars___rarg), 3, 0); -return x_2; -} -} -lean_object* l_Lean_AbstractTypeContext_InstantiateExprMVars_instantiateLevelMVars___rarg(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; uint8_t x_7; -x_5 = lean_ctor_get(x_3, 0); -x_6 = l_Lean_AbstractTypeContext_instantiateLevelMVars___main___rarg(x_1, x_2, x_5); -x_7 = !lean_is_exclusive(x_6); -if (x_7 == 0) -{ -lean_object* x_8; -x_8 = lean_ctor_get(x_6, 1); -lean_ctor_set(x_3, 0, x_8); -lean_ctor_set(x_6, 1, x_3); -return x_6; -} -else -{ -lean_object* x_9; lean_object* x_10; lean_object* x_11; -x_9 = lean_ctor_get(x_6, 0); -x_10 = lean_ctor_get(x_6, 1); -lean_inc(x_10); -lean_inc(x_9); -lean_dec(x_6); -lean_ctor_set(x_3, 0, x_10); -x_11 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_11, 0, x_9); -lean_ctor_set(x_11, 1, x_3); -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; lean_object* x_19; -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 = l_Lean_AbstractTypeContext_instantiateLevelMVars___main___rarg(x_1, x_2, x_12); -x_15 = lean_ctor_get(x_14, 0); -lean_inc(x_15); -x_16 = lean_ctor_get(x_14, 1); -lean_inc(x_16); -if (lean_is_exclusive(x_14)) { - lean_ctor_release(x_14, 0); - lean_ctor_release(x_14, 1); - x_17 = x_14; -} else { - lean_dec_ref(x_14); - x_17 = lean_box(0); -} -x_18 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_18, 0, x_16); -lean_ctor_set(x_18, 1, x_13); -if (lean_is_scalar(x_17)) { - x_19 = lean_alloc_ctor(0, 2, 0); -} else { - x_19 = x_17; -} -lean_ctor_set(x_19, 0, x_15); -lean_ctor_set(x_19, 1, x_18); -return x_19; -} -} -} -lean_object* l_Lean_AbstractTypeContext_InstantiateExprMVars_instantiateLevelMVars(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_AbstractTypeContext_InstantiateExprMVars_instantiateLevelMVars___rarg), 3, 0); -return x_2; -} -} -lean_object* l_AssocList_find___main___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__2(lean_object* x_1, lean_object* x_2) { -_start: -{ -if (lean_obj_tag(x_2) == 0) -{ -lean_object* x_3; -x_3 = lean_box(0); -return x_3; -} -else -{ -lean_object* x_4; lean_object* x_5; lean_object* x_6; uint8_t x_7; -x_4 = lean_ctor_get(x_2, 0); -x_5 = lean_ctor_get(x_2, 1); -x_6 = lean_ctor_get(x_2, 2); -x_7 = lean_expr_eqv(x_4, x_1); -if (x_7 == 0) -{ -x_2 = x_6; -goto _start; -} -else -{ -lean_object* x_9; -lean_inc(x_5); -x_9 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_9, 0, x_5); -return x_9; -} -} -} -} -lean_object* l_HashMapImp_find___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__1(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; lean_object* x_4; size_t x_5; size_t x_6; lean_object* x_7; lean_object* x_8; -x_3 = lean_ctor_get(x_1, 1); -x_4 = lean_array_get_size(x_3); -x_5 = lean_expr_hash(x_2); -x_6 = lean_usize_modn(x_5, x_4); -lean_dec(x_4); -x_7 = lean_array_uget(x_3, x_6); -x_8 = l_AssocList_find___main___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__2(x_2, x_7); -lean_dec(x_7); -return x_8; -} -} -uint8_t l_AssocList_contains___main___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__4(lean_object* x_1, lean_object* x_2) { -_start: -{ -if (lean_obj_tag(x_2) == 0) -{ -uint8_t x_3; -x_3 = 0; -return x_3; -} -else -{ -lean_object* x_4; lean_object* x_5; uint8_t x_6; -x_4 = lean_ctor_get(x_2, 0); -x_5 = lean_ctor_get(x_2, 2); -x_6 = lean_expr_eqv(x_4, x_1); -if (x_6 == 0) -{ -x_2 = x_5; -goto _start; -} -else -{ -uint8_t x_8; -x_8 = 1; -return x_8; -} -} -} -} -lean_object* l_AssocList_mfoldl___main___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__7(lean_object* x_1, lean_object* x_2) { -_start: -{ -if (lean_obj_tag(x_2) == 0) -{ -return x_1; -} -else -{ -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; size_t x_7; size_t x_8; lean_object* x_9; lean_object* x_10; -x_4 = lean_ctor_get(x_2, 0); -x_5 = lean_ctor_get(x_2, 2); -x_6 = lean_array_get_size(x_1); -x_7 = lean_expr_hash(x_4); -x_8 = lean_usize_modn(x_7, x_6); -lean_dec(x_6); -x_9 = lean_array_uget(x_1, x_8); -lean_ctor_set(x_2, 2, x_9); -x_10 = lean_array_uset(x_1, x_8, x_2); -x_1 = x_10; -x_2 = x_5; -goto _start; -} -else -{ -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; size_t x_16; size_t x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; -x_12 = lean_ctor_get(x_2, 0); -x_13 = lean_ctor_get(x_2, 1); -x_14 = lean_ctor_get(x_2, 2); -lean_inc(x_14); -lean_inc(x_13); -lean_inc(x_12); -lean_dec(x_2); -x_15 = lean_array_get_size(x_1); -x_16 = lean_expr_hash(x_12); -x_17 = lean_usize_modn(x_16, x_15); -lean_dec(x_15); -x_18 = lean_array_uget(x_1, x_17); -x_19 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_19, 0, x_12); -lean_ctor_set(x_19, 1, x_13); -lean_ctor_set(x_19, 2, x_18); -x_20 = lean_array_uset(x_1, x_17, x_19); -x_1 = x_20; -x_2 = x_14; -goto _start; -} -} -} -} -lean_object* l_HashMapImp_moveEntries___main___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__6(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; uint8_t x_5; -x_4 = lean_array_get_size(x_2); -x_5 = lean_nat_dec_lt(x_1, x_4); -lean_dec(x_4); -if (x_5 == 0) -{ -lean_dec(x_2); -lean_dec(x_1); -return x_3; -} -else -{ -lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; -x_6 = lean_array_fget(x_2, x_1); -x_7 = lean_box(0); -x_8 = lean_array_fset(x_2, x_1, x_7); -x_9 = l_AssocList_mfoldl___main___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__7(x_3, x_6); -x_10 = lean_unsigned_to_nat(1u); -x_11 = lean_nat_add(x_1, x_10); -lean_dec(x_1); -x_1 = x_11; -x_2 = x_8; -x_3 = x_9; -goto _start; -} -} -} -lean_object* l_HashMapImp_expand___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__5(lean_object* x_1, lean_object* x_2) { -_start: -{ -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; -x_3 = lean_array_get_size(x_2); -x_4 = lean_unsigned_to_nat(2u); -x_5 = lean_nat_mul(x_3, x_4); -lean_dec(x_3); -x_6 = lean_box(0); -x_7 = lean_mk_array(x_5, x_6); -x_8 = lean_unsigned_to_nat(0u); -x_9 = l_HashMapImp_moveEntries___main___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__6(x_8, x_2, x_7); -x_10 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_10, 0, x_1); -lean_ctor_set(x_10, 1, x_9); -return x_10; -} -} -lean_object* l_AssocList_replace___main___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__8(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -if (lean_obj_tag(x_3) == 0) -{ -lean_dec(x_2); -lean_dec(x_1); -return x_3; -} -else -{ -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 = lean_ctor_get(x_3, 2); -x_8 = lean_expr_eqv(x_5, x_1); -if (x_8 == 0) -{ -lean_object* x_9; -x_9 = l_AssocList_replace___main___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__8(x_1, x_2, x_7); -lean_ctor_set(x_3, 2, x_9); -return x_3; -} -else -{ -lean_dec(x_6); -lean_dec(x_5); -lean_ctor_set(x_3, 1, x_2); -lean_ctor_set(x_3, 0, x_1); -return x_3; -} -} -else -{ -lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; -x_10 = lean_ctor_get(x_3, 0); -x_11 = lean_ctor_get(x_3, 1); -x_12 = lean_ctor_get(x_3, 2); -lean_inc(x_12); -lean_inc(x_11); -lean_inc(x_10); -lean_dec(x_3); -x_13 = lean_expr_eqv(x_10, x_1); -if (x_13 == 0) -{ -lean_object* x_14; lean_object* x_15; -x_14 = l_AssocList_replace___main___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__8(x_1, x_2, x_12); -x_15 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_15, 0, x_10); -lean_ctor_set(x_15, 1, x_11); -lean_ctor_set(x_15, 2, x_14); -return x_15; -} -else -{ -lean_object* x_16; -lean_dec(x_11); -lean_dec(x_10); -x_16 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_16, 0, x_1); -lean_ctor_set(x_16, 1, x_2); -lean_ctor_set(x_16, 2, x_12); -return x_16; -} -} -} -} -} -lean_object* l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -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; size_t x_8; size_t x_9; lean_object* x_10; uint8_t x_11; -x_5 = lean_ctor_get(x_1, 0); -x_6 = lean_ctor_get(x_1, 1); -x_7 = lean_array_get_size(x_6); -x_8 = lean_expr_hash(x_2); -x_9 = lean_usize_modn(x_8, x_7); -x_10 = lean_array_uget(x_6, x_9); -x_11 = l_AssocList_contains___main___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__4(x_2, x_10); -if (x_11 == 0) -{ -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; -x_12 = lean_unsigned_to_nat(1u); -x_13 = lean_nat_add(x_5, x_12); -lean_dec(x_5); -x_14 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_14, 0, x_2); -lean_ctor_set(x_14, 1, x_3); -lean_ctor_set(x_14, 2, x_10); -x_15 = lean_array_uset(x_6, x_9, x_14); -x_16 = lean_nat_dec_le(x_13, x_7); -lean_dec(x_7); -if (x_16 == 0) -{ -lean_object* x_17; -lean_free_object(x_1); -x_17 = l_HashMapImp_expand___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__5(x_13, x_15); -return x_17; -} -else -{ -lean_ctor_set(x_1, 1, x_15); -lean_ctor_set(x_1, 0, x_13); -return x_1; -} -} -else -{ -lean_object* x_18; lean_object* x_19; -lean_dec(x_7); -x_18 = l_AssocList_replace___main___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__8(x_2, x_3, x_10); -x_19 = lean_array_uset(x_6, x_9, x_18); -lean_ctor_set(x_1, 1, x_19); -return x_1; -} -} -else -{ -lean_object* x_20; lean_object* x_21; lean_object* x_22; size_t x_23; size_t x_24; lean_object* x_25; uint8_t x_26; -x_20 = lean_ctor_get(x_1, 0); -x_21 = lean_ctor_get(x_1, 1); -lean_inc(x_21); -lean_inc(x_20); -lean_dec(x_1); -x_22 = lean_array_get_size(x_21); -x_23 = lean_expr_hash(x_2); -x_24 = lean_usize_modn(x_23, x_22); -x_25 = lean_array_uget(x_21, x_24); -x_26 = l_AssocList_contains___main___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__4(x_2, x_25); -if (x_26 == 0) -{ -lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; uint8_t x_31; -x_27 = lean_unsigned_to_nat(1u); -x_28 = lean_nat_add(x_20, x_27); -lean_dec(x_20); -x_29 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_29, 0, x_2); -lean_ctor_set(x_29, 1, x_3); -lean_ctor_set(x_29, 2, x_25); -x_30 = lean_array_uset(x_21, x_24, x_29); -x_31 = lean_nat_dec_le(x_28, x_22); -lean_dec(x_22); -if (x_31 == 0) -{ -lean_object* x_32; -x_32 = l_HashMapImp_expand___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__5(x_28, x_30); -return x_32; -} -else -{ -lean_object* x_33; -x_33 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_33, 0, x_28); -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_dec(x_22); -x_34 = l_AssocList_replace___main___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__8(x_2, x_3, x_25); -x_35 = lean_array_uset(x_21, x_24, x_34); -x_36 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_36, 0, x_20); -lean_ctor_set(x_36, 1, x_35); -return x_36; -} -} -} -} -lean_object* l_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; lean_object* x_5; -x_4 = lean_ctor_get(x_3, 1); -lean_inc(x_4); -x_5 = l_HashMapImp_find___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__1(x_4, x_1); -lean_dec(x_4); -if (lean_obj_tag(x_5) == 0) -{ -lean_object* x_6; uint8_t x_7; -lean_inc(x_1); -x_6 = lean_apply_2(x_2, x_1, x_3); -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, 1); -x_9 = !lean_is_exclusive(x_8); -if (x_9 == 0) -{ -lean_object* x_10; lean_object* x_11; lean_object* x_12; -x_10 = lean_ctor_get(x_6, 0); -x_11 = lean_ctor_get(x_8, 1); -lean_inc(x_10); -x_12 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_11, x_1, x_10); -lean_ctor_set(x_8, 1, x_12); -return x_6; -} -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_6, 0); -x_14 = lean_ctor_get(x_8, 0); -x_15 = lean_ctor_get(x_8, 1); -lean_inc(x_15); -lean_inc(x_14); -lean_dec(x_8); -lean_inc(x_13); -x_16 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_15, x_1, x_13); -x_17 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_17, 0, x_14); -lean_ctor_set(x_17, 1, x_16); -lean_ctor_set(x_6, 1, 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; -x_18 = lean_ctor_get(x_6, 1); -x_19 = lean_ctor_get(x_6, 0); -lean_inc(x_18); -lean_inc(x_19); -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); -if (lean_is_exclusive(x_18)) { - lean_ctor_release(x_18, 0); - lean_ctor_release(x_18, 1); - x_22 = x_18; -} else { - lean_dec_ref(x_18); - x_22 = lean_box(0); -} -lean_inc(x_19); -x_23 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_21, x_1, x_19); -if (lean_is_scalar(x_22)) { - x_24 = lean_alloc_ctor(0, 2, 0); -} else { - x_24 = x_22; -} -lean_ctor_set(x_24, 0, x_20); -lean_ctor_set(x_24, 1, x_23); -x_25 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_25, 0, x_19); -lean_ctor_set(x_25, 1, x_24); -return x_25; -} -} -else -{ -lean_object* x_26; lean_object* x_27; -lean_dec(x_2); -lean_dec(x_1); -x_26 = lean_ctor_get(x_5, 0); -lean_inc(x_26); -lean_dec(x_5); -x_27 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_27, 0, x_26); -lean_ctor_set(x_27, 1, x_3); -return x_27; -} -} -} -lean_object* l_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___rarg), 3, 0); -return x_2; -} -} -lean_object* l_AssocList_find___main___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__2___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_AssocList_find___main___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__2(x_1, x_2); -lean_dec(x_2); -lean_dec(x_1); -return x_3; -} -} -lean_object* l_HashMapImp_find___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__1___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_HashMapImp_find___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__1(x_1, x_2); -lean_dec(x_2); -lean_dec(x_1); -return x_3; -} -} -lean_object* l_AssocList_contains___main___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__4___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -uint8_t x_3; lean_object* x_4; -x_3 = l_AssocList_contains___main___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__4(x_1, x_2); -lean_dec(x_2); -lean_dec(x_1); -x_4 = lean_box(x_3); -return x_4; -} -} -lean_object* l_Lean_AbstractTypeContext_InstantiateExprMVars_visit___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -uint8_t x_4; -x_4 = lean_expr_has_expr_mvar(x_2); -if (x_4 == 0) -{ -uint8_t x_5; -x_5 = lean_expr_has_level_mvar(x_2); -if (x_5 == 0) -{ -lean_object* x_6; -lean_dec(x_1); -x_6 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_6, 0, x_2); -lean_ctor_set(x_6, 1, x_3); -return x_6; -} -else -{ -lean_object* x_7; lean_object* x_8; -x_7 = lean_ctor_get(x_3, 1); -lean_inc(x_7); -x_8 = l_HashMapImp_find___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__1(x_7, x_2); -lean_dec(x_7); -if (lean_obj_tag(x_8) == 0) -{ -lean_object* x_9; uint8_t x_10; -lean_inc(x_2); -x_9 = lean_apply_2(x_1, x_2, x_3); -x_10 = !lean_is_exclusive(x_9); -if (x_10 == 0) -{ -lean_object* x_11; uint8_t x_12; -x_11 = lean_ctor_get(x_9, 1); -x_12 = !lean_is_exclusive(x_11); -if (x_12 == 0) -{ -lean_object* x_13; lean_object* x_14; lean_object* x_15; -x_13 = lean_ctor_get(x_9, 0); -x_14 = lean_ctor_get(x_11, 1); -lean_inc(x_13); -x_15 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_14, x_2, x_13); -lean_ctor_set(x_11, 1, x_15); -return x_9; -} -else -{ -lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; -x_16 = lean_ctor_get(x_9, 0); -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); -lean_inc(x_16); -x_19 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_18, x_2, x_16); -x_20 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_20, 0, x_17); -lean_ctor_set(x_20, 1, x_19); -lean_ctor_set(x_9, 1, x_20); -return x_9; -} -} -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; lean_object* x_28; -x_21 = lean_ctor_get(x_9, 1); -x_22 = lean_ctor_get(x_9, 0); -lean_inc(x_21); -lean_inc(x_22); -lean_dec(x_9); -x_23 = lean_ctor_get(x_21, 0); -lean_inc(x_23); -x_24 = lean_ctor_get(x_21, 1); -lean_inc(x_24); -if (lean_is_exclusive(x_21)) { - lean_ctor_release(x_21, 0); - lean_ctor_release(x_21, 1); - x_25 = x_21; -} else { - lean_dec_ref(x_21); - x_25 = lean_box(0); -} -lean_inc(x_22); -x_26 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_24, x_2, x_22); -if (lean_is_scalar(x_25)) { - x_27 = lean_alloc_ctor(0, 2, 0); -} else { - x_27 = x_25; -} -lean_ctor_set(x_27, 0, x_23); -lean_ctor_set(x_27, 1, x_26); -x_28 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_28, 0, x_22); -lean_ctor_set(x_28, 1, x_27); -return x_28; -} -} -else -{ -lean_object* x_29; lean_object* x_30; -lean_dec(x_2); -lean_dec(x_1); -x_29 = lean_ctor_get(x_8, 0); -lean_inc(x_29); -lean_dec(x_8); -x_30 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_30, 0, x_29); -lean_ctor_set(x_30, 1, x_3); -return x_30; -} -} -} -else -{ -lean_object* x_31; lean_object* x_32; -x_31 = lean_ctor_get(x_3, 1); -lean_inc(x_31); -x_32 = l_HashMapImp_find___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__1(x_31, x_2); -lean_dec(x_31); -if (lean_obj_tag(x_32) == 0) -{ -lean_object* x_33; uint8_t x_34; -lean_inc(x_2); -x_33 = lean_apply_2(x_1, x_2, x_3); -x_34 = !lean_is_exclusive(x_33); -if (x_34 == 0) -{ -lean_object* x_35; uint8_t x_36; -x_35 = lean_ctor_get(x_33, 1); -x_36 = !lean_is_exclusive(x_35); -if (x_36 == 0) -{ -lean_object* x_37; lean_object* x_38; lean_object* x_39; -x_37 = lean_ctor_get(x_33, 0); -x_38 = lean_ctor_get(x_35, 1); -lean_inc(x_37); -x_39 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_38, x_2, x_37); -lean_ctor_set(x_35, 1, x_39); -return x_33; -} -else -{ -lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; -x_40 = lean_ctor_get(x_33, 0); -x_41 = lean_ctor_get(x_35, 0); -x_42 = lean_ctor_get(x_35, 1); -lean_inc(x_42); -lean_inc(x_41); -lean_dec(x_35); -lean_inc(x_40); -x_43 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_42, x_2, x_40); -x_44 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_44, 0, x_41); -lean_ctor_set(x_44, 1, x_43); -lean_ctor_set(x_33, 1, x_44); -return x_33; -} -} -else -{ -lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; -x_45 = lean_ctor_get(x_33, 1); -x_46 = lean_ctor_get(x_33, 0); -lean_inc(x_45); -lean_inc(x_46); -lean_dec(x_33); -x_47 = lean_ctor_get(x_45, 0); -lean_inc(x_47); -x_48 = lean_ctor_get(x_45, 1); -lean_inc(x_48); -if (lean_is_exclusive(x_45)) { - lean_ctor_release(x_45, 0); - lean_ctor_release(x_45, 1); - x_49 = x_45; -} else { - lean_dec_ref(x_45); - x_49 = lean_box(0); -} -lean_inc(x_46); -x_50 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_48, x_2, x_46); -if (lean_is_scalar(x_49)) { - x_51 = lean_alloc_ctor(0, 2, 0); -} else { - x_51 = x_49; -} -lean_ctor_set(x_51, 0, x_47); -lean_ctor_set(x_51, 1, x_50); -x_52 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_52, 0, x_46); -lean_ctor_set(x_52, 1, x_51); -return x_52; -} -} -else -{ -lean_object* x_53; lean_object* x_54; -lean_dec(x_2); -lean_dec(x_1); -x_53 = lean_ctor_get(x_32, 0); -lean_inc(x_53); -lean_dec(x_32); -x_54 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_54, 0, x_53); -lean_ctor_set(x_54, 1, x_3); -return x_54; -} -} -} -} -lean_object* l_Lean_AbstractTypeContext_InstantiateExprMVars_visit(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_AbstractTypeContext_InstantiateExprMVars_visit___rarg), 3, 0); -return x_2; -} -} -lean_object* l_Lean_AbstractTypeContext_InstantiateExprMVars_getMCtx___rarg(lean_object* x_1) { -_start: -{ -lean_object* x_2; lean_object* x_3; -x_2 = lean_ctor_get(x_1, 0); -lean_inc(x_2); -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_object* l_Lean_AbstractTypeContext_InstantiateExprMVars_getMCtx(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_AbstractTypeContext_InstantiateExprMVars_getMCtx___rarg), 1, 0); -return x_2; -} -} -lean_object* l_List_mmap___main___at_Lean_AbstractTypeContext_InstantiateExprMVars_main___main___spec__1___rarg(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_object* x_5; -lean_dec(x_1); -x_4 = lean_box(0); -x_5 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_5, 0, x_4); -lean_ctor_set(x_5, 1, x_3); -return x_5; -} -else -{ -uint8_t x_6; -x_6 = !lean_is_exclusive(x_2); -if (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; lean_object* x_13; lean_object* x_14; uint8_t x_15; -x_8 = lean_ctor_get(x_2, 0); -x_9 = lean_ctor_get(x_2, 1); -x_10 = lean_ctor_get(x_3, 0); -lean_inc(x_1); -x_11 = l_Lean_AbstractTypeContext_instantiateLevelMVars___main___rarg(x_1, x_8, x_10); -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_3, 0, x_13); -x_14 = l_List_mmap___main___at_Lean_AbstractTypeContext_InstantiateExprMVars_main___main___spec__1___rarg(x_1, x_9, x_3); -x_15 = !lean_is_exclusive(x_14); -if (x_15 == 0) -{ -lean_object* x_16; -x_16 = lean_ctor_get(x_14, 0); -lean_ctor_set(x_2, 1, x_16); -lean_ctor_set(x_2, 0, x_12); -lean_ctor_set(x_14, 0, x_2); -return x_14; -} -else -{ -lean_object* x_17; lean_object* x_18; lean_object* x_19; -x_17 = lean_ctor_get(x_14, 0); -x_18 = lean_ctor_get(x_14, 1); -lean_inc(x_18); -lean_inc(x_17); -lean_dec(x_14); -lean_ctor_set(x_2, 1, x_17); -lean_ctor_set(x_2, 0, x_12); -x_19 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_19, 0, x_2); -lean_ctor_set(x_19, 1, 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_2, 0); -x_21 = lean_ctor_get(x_2, 1); -x_22 = lean_ctor_get(x_3, 0); -x_23 = lean_ctor_get(x_3, 1); -lean_inc(x_23); -lean_inc(x_22); -lean_dec(x_3); -lean_inc(x_1); -x_24 = l_Lean_AbstractTypeContext_instantiateLevelMVars___main___rarg(x_1, x_20, x_22); -x_25 = lean_ctor_get(x_24, 0); -lean_inc(x_25); -x_26 = lean_ctor_get(x_24, 1); -lean_inc(x_26); -lean_dec(x_24); -x_27 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_27, 0, x_26); -lean_ctor_set(x_27, 1, x_23); -x_28 = l_List_mmap___main___at_Lean_AbstractTypeContext_InstantiateExprMVars_main___main___spec__1___rarg(x_1, x_21, x_27); -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); -} -lean_ctor_set(x_2, 1, x_29); -lean_ctor_set(x_2, 0, x_25); -if (lean_is_scalar(x_31)) { - x_32 = lean_alloc_ctor(0, 2, 0); -} else { - x_32 = x_31; -} -lean_ctor_set(x_32, 0, x_2); -lean_ctor_set(x_32, 1, x_30); -return x_32; -} -} -else -{ -lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; 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; -x_33 = lean_ctor_get(x_2, 0); -x_34 = lean_ctor_get(x_2, 1); -lean_inc(x_34); -lean_inc(x_33); -lean_dec(x_2); -x_35 = lean_ctor_get(x_3, 0); -lean_inc(x_35); -x_36 = lean_ctor_get(x_3, 1); -lean_inc(x_36); -if (lean_is_exclusive(x_3)) { - lean_ctor_release(x_3, 0); - lean_ctor_release(x_3, 1); - x_37 = x_3; -} else { - lean_dec_ref(x_3); - x_37 = lean_box(0); -} -lean_inc(x_1); -x_38 = l_Lean_AbstractTypeContext_instantiateLevelMVars___main___rarg(x_1, x_33, x_35); -x_39 = lean_ctor_get(x_38, 0); -lean_inc(x_39); -x_40 = lean_ctor_get(x_38, 1); -lean_inc(x_40); -lean_dec(x_38); -if (lean_is_scalar(x_37)) { - x_41 = lean_alloc_ctor(0, 2, 0); -} else { - x_41 = x_37; -} -lean_ctor_set(x_41, 0, x_40); -lean_ctor_set(x_41, 1, x_36); -x_42 = l_List_mmap___main___at_Lean_AbstractTypeContext_InstantiateExprMVars_main___main___spec__1___rarg(x_1, x_34, x_41); -x_43 = lean_ctor_get(x_42, 0); -lean_inc(x_43); -x_44 = lean_ctor_get(x_42, 1); -lean_inc(x_44); -if (lean_is_exclusive(x_42)) { - lean_ctor_release(x_42, 0); - lean_ctor_release(x_42, 1); - x_45 = x_42; -} else { - lean_dec_ref(x_42); - x_45 = lean_box(0); -} -x_46 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_46, 0, x_39); -lean_ctor_set(x_46, 1, x_43); -if (lean_is_scalar(x_45)) { - x_47 = lean_alloc_ctor(0, 2, 0); -} else { - x_47 = x_45; -} -lean_ctor_set(x_47, 0, x_46); -lean_ctor_set(x_47, 1, x_44); -return x_47; -} -} -} -} -lean_object* l_List_mmap___main___at_Lean_AbstractTypeContext_InstantiateExprMVars_main___main___spec__1(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_List_mmap___main___at_Lean_AbstractTypeContext_InstantiateExprMVars_main___main___spec__1___rarg), 3, 0); -return x_2; -} -} -lean_object* l_Lean_AbstractTypeContext_InstantiateExprMVars_main___main___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_16; lean_object* x_17; lean_object* x_27; lean_object* x_28; -switch (lean_obj_tag(x_2)) { -case 2: -{ -lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_50; lean_object* x_51; -x_38 = lean_ctor_get(x_2, 0); -lean_inc(x_38); -x_50 = lean_ctor_get(x_3, 1); -lean_inc(x_50); -x_51 = l_HashMapImp_find___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__1(x_50, x_2); -if (lean_obj_tag(x_51) == 0) -{ -lean_object* x_52; lean_object* x_53; lean_object* x_54; -x_52 = lean_ctor_get(x_3, 0); -lean_inc(x_52); -x_53 = lean_ctor_get(x_1, 5); -lean_inc(x_53); -lean_inc(x_38); -lean_inc(x_52); -x_54 = lean_apply_2(x_53, x_52, x_38); -if (lean_obj_tag(x_54) == 0) -{ -lean_object* x_55; lean_object* x_56; -x_55 = lean_ctor_get(x_1, 10); -lean_inc(x_55); -lean_inc(x_38); -x_56 = lean_apply_2(x_55, x_52, x_38); -if (lean_obj_tag(x_56) == 0) -{ -lean_dec(x_50); -lean_dec(x_38); -lean_dec(x_1); -lean_inc(x_2); -x_4 = x_2; -x_5 = x_3; -goto block_15; -} -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; uint8_t x_82; -x_57 = lean_ctor_get(x_56, 0); -lean_inc(x_57); -lean_dec(x_56); -x_58 = lean_ctor_get(x_57, 0); -lean_inc(x_58); -x_59 = lean_ctor_get(x_57, 1); -lean_inc(x_59); -x_60 = lean_ctor_get(x_57, 2); -lean_inc(x_60); -lean_dec(x_57); -x_82 = lean_expr_has_expr_mvar(x_60); -if (x_82 == 0) -{ -uint8_t x_83; -x_83 = lean_expr_has_level_mvar(x_60); -if (x_83 == 0) -{ -lean_dec(x_50); -x_61 = x_60; -x_62 = x_3; -goto block_81; -} -else -{ -lean_object* x_84; -x_84 = l_HashMapImp_find___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__1(x_50, x_60); -lean_dec(x_50); -if (lean_obj_tag(x_84) == 0) -{ -lean_object* x_85; lean_object* x_86; lean_object* x_87; uint8_t x_88; -lean_inc(x_60); -lean_inc(x_1); -x_85 = l_Lean_AbstractTypeContext_InstantiateExprMVars_main___main___rarg(x_1, x_60, x_3); -x_86 = lean_ctor_get(x_85, 1); -lean_inc(x_86); -x_87 = lean_ctor_get(x_85, 0); -lean_inc(x_87); -lean_dec(x_85); -x_88 = !lean_is_exclusive(x_86); -if (x_88 == 0) -{ -lean_object* x_89; lean_object* x_90; -x_89 = lean_ctor_get(x_86, 1); -lean_inc(x_87); -x_90 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_89, x_60, x_87); -lean_ctor_set(x_86, 1, x_90); -x_61 = x_87; -x_62 = x_86; -goto block_81; -} -else -{ -lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; -x_91 = lean_ctor_get(x_86, 0); -x_92 = lean_ctor_get(x_86, 1); -lean_inc(x_92); -lean_inc(x_91); -lean_dec(x_86); -lean_inc(x_87); -x_93 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_92, x_60, x_87); -x_94 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_94, 0, x_91); -lean_ctor_set(x_94, 1, x_93); -x_61 = x_87; -x_62 = x_94; -goto block_81; -} -} -else -{ -lean_object* x_95; -lean_dec(x_60); -x_95 = lean_ctor_get(x_84, 0); -lean_inc(x_95); -lean_dec(x_84); -x_61 = x_95; -x_62 = x_3; -goto block_81; -} -} -} -else -{ -lean_object* x_96; -x_96 = l_HashMapImp_find___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__1(x_50, x_60); -lean_dec(x_50); -if (lean_obj_tag(x_96) == 0) -{ -lean_object* x_97; lean_object* x_98; lean_object* x_99; uint8_t x_100; -lean_inc(x_60); -lean_inc(x_1); -x_97 = l_Lean_AbstractTypeContext_InstantiateExprMVars_main___main___rarg(x_1, x_60, x_3); -x_98 = lean_ctor_get(x_97, 1); -lean_inc(x_98); -x_99 = lean_ctor_get(x_97, 0); -lean_inc(x_99); -lean_dec(x_97); -x_100 = !lean_is_exclusive(x_98); -if (x_100 == 0) -{ -lean_object* x_101; lean_object* x_102; -x_101 = lean_ctor_get(x_98, 1); -lean_inc(x_99); -x_102 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_101, x_60, x_99); -lean_ctor_set(x_98, 1, x_102); -x_61 = x_99; -x_62 = x_98; -goto block_81; -} -else -{ -lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; -x_103 = lean_ctor_get(x_98, 0); -x_104 = lean_ctor_get(x_98, 1); -lean_inc(x_104); -lean_inc(x_103); -lean_dec(x_98); -lean_inc(x_99); -x_105 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_104, x_60, x_99); -x_106 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_106, 0, x_103); -lean_ctor_set(x_106, 1, x_105); -x_61 = x_99; -x_62 = x_106; -goto block_81; -} -} -else -{ -lean_object* x_107; -lean_dec(x_60); -x_107 = lean_ctor_get(x_96, 0); -lean_inc(x_107); -lean_dec(x_96); -x_61 = x_107; -x_62 = x_3; -goto block_81; -} -} -block_81: -{ -uint8_t x_63; -x_63 = lean_expr_has_expr_mvar(x_61); -if (x_63 == 0) -{ -uint8_t x_64; -x_64 = lean_expr_has_level_mvar(x_61); -if (x_64 == 0) -{ -lean_dec(x_61); -lean_dec(x_59); -lean_dec(x_58); -lean_dec(x_38); -lean_dec(x_1); -lean_inc(x_2); -x_4 = x_2; -x_5 = x_62; -goto block_15; -} -else -{ -lean_object* x_65; uint8_t x_66; -x_65 = lean_ctor_get(x_1, 9); -lean_inc(x_65); -lean_dec(x_1); -x_66 = !lean_is_exclusive(x_62); -if (x_66 == 0) -{ -lean_object* x_67; lean_object* x_68; -x_67 = lean_ctor_get(x_62, 0); -x_68 = lean_apply_5(x_65, x_67, x_38, x_58, x_59, x_61); -lean_ctor_set(x_62, 0, x_68); -lean_inc(x_2); -x_4 = x_2; -x_5 = x_62; -goto block_15; -} -else -{ -lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; -x_69 = lean_ctor_get(x_62, 0); -x_70 = lean_ctor_get(x_62, 1); -lean_inc(x_70); -lean_inc(x_69); -lean_dec(x_62); -x_71 = lean_apply_5(x_65, x_69, x_38, x_58, x_59, x_61); -x_72 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_72, 0, x_71); -lean_ctor_set(x_72, 1, x_70); -lean_inc(x_2); -x_4 = x_2; -x_5 = x_72; -goto block_15; -} -} -} -else -{ -lean_object* x_73; uint8_t x_74; -x_73 = lean_ctor_get(x_1, 9); -lean_inc(x_73); -lean_dec(x_1); -x_74 = !lean_is_exclusive(x_62); -if (x_74 == 0) -{ -lean_object* x_75; lean_object* x_76; -x_75 = lean_ctor_get(x_62, 0); -x_76 = lean_apply_5(x_73, x_75, x_38, x_58, x_59, x_61); -lean_ctor_set(x_62, 0, x_76); -lean_inc(x_2); -x_4 = x_2; -x_5 = x_62; -goto block_15; -} -else -{ -lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; -x_77 = lean_ctor_get(x_62, 0); -x_78 = lean_ctor_get(x_62, 1); -lean_inc(x_78); -lean_inc(x_77); -lean_dec(x_62); -x_79 = lean_apply_5(x_73, x_77, x_38, x_58, x_59, x_61); -x_80 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_80, 0, x_79); -lean_ctor_set(x_80, 1, x_78); -lean_inc(x_2); -x_4 = x_2; -x_5 = x_80; -goto block_15; -} -} -} -} -} -else -{ -lean_object* x_108; uint8_t x_109; -lean_dec(x_52); -x_108 = lean_ctor_get(x_54, 0); -lean_inc(x_108); -lean_dec(x_54); -x_109 = lean_expr_has_expr_mvar(x_108); -if (x_109 == 0) -{ -uint8_t x_110; -x_110 = lean_expr_has_level_mvar(x_108); -if (x_110 == 0) -{ -lean_dec(x_50); -x_39 = x_108; -x_40 = x_3; -goto block_49; -} -else -{ -lean_object* x_111; -x_111 = l_HashMapImp_find___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__1(x_50, x_108); -lean_dec(x_50); -if (lean_obj_tag(x_111) == 0) -{ -lean_object* x_112; lean_object* x_113; lean_object* x_114; uint8_t x_115; -lean_inc(x_108); -lean_inc(x_1); -x_112 = l_Lean_AbstractTypeContext_InstantiateExprMVars_main___main___rarg(x_1, x_108, x_3); -x_113 = lean_ctor_get(x_112, 1); -lean_inc(x_113); -x_114 = lean_ctor_get(x_112, 0); -lean_inc(x_114); -lean_dec(x_112); -x_115 = !lean_is_exclusive(x_113); -if (x_115 == 0) -{ -lean_object* x_116; lean_object* x_117; -x_116 = lean_ctor_get(x_113, 1); -lean_inc(x_114); -x_117 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_116, x_108, x_114); -lean_ctor_set(x_113, 1, x_117); -x_39 = x_114; -x_40 = x_113; -goto block_49; -} -else -{ -lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_object* x_121; -x_118 = lean_ctor_get(x_113, 0); -x_119 = lean_ctor_get(x_113, 1); -lean_inc(x_119); -lean_inc(x_118); -lean_dec(x_113); -lean_inc(x_114); -x_120 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_119, x_108, x_114); -x_121 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_121, 0, x_118); -lean_ctor_set(x_121, 1, x_120); -x_39 = x_114; -x_40 = x_121; -goto block_49; -} -} -else -{ -lean_object* x_122; -lean_dec(x_108); -x_122 = lean_ctor_get(x_111, 0); -lean_inc(x_122); -lean_dec(x_111); -x_39 = x_122; -x_40 = x_3; -goto block_49; -} -} -} -else -{ -lean_object* x_123; -x_123 = l_HashMapImp_find___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__1(x_50, x_108); -lean_dec(x_50); -if (lean_obj_tag(x_123) == 0) -{ -lean_object* x_124; lean_object* x_125; lean_object* x_126; uint8_t x_127; -lean_inc(x_108); -lean_inc(x_1); -x_124 = l_Lean_AbstractTypeContext_InstantiateExprMVars_main___main___rarg(x_1, x_108, x_3); -x_125 = lean_ctor_get(x_124, 1); -lean_inc(x_125); -x_126 = lean_ctor_get(x_124, 0); -lean_inc(x_126); -lean_dec(x_124); -x_127 = !lean_is_exclusive(x_125); -if (x_127 == 0) -{ -lean_object* x_128; lean_object* x_129; -x_128 = lean_ctor_get(x_125, 1); -lean_inc(x_126); -x_129 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_128, x_108, x_126); -lean_ctor_set(x_125, 1, x_129); -x_39 = x_126; -x_40 = x_125; -goto block_49; -} -else -{ -lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; -x_130 = lean_ctor_get(x_125, 0); -x_131 = lean_ctor_get(x_125, 1); -lean_inc(x_131); -lean_inc(x_130); -lean_dec(x_125); -lean_inc(x_126); -x_132 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_131, x_108, x_126); -x_133 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_133, 0, x_130); -lean_ctor_set(x_133, 1, x_132); -x_39 = x_126; -x_40 = x_133; -goto block_49; -} -} -else -{ -lean_object* x_134; -lean_dec(x_108); -x_134 = lean_ctor_get(x_123, 0); -lean_inc(x_134); -lean_dec(x_123); -x_39 = x_134; -x_40 = x_3; -goto block_49; -} -} -} -} -else -{ -lean_object* x_135; lean_object* x_136; -lean_dec(x_50); -lean_dec(x_38); -lean_dec(x_2); -lean_dec(x_1); -x_135 = lean_ctor_get(x_51, 0); -lean_inc(x_135); -lean_dec(x_51); -x_136 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_136, 0, x_135); -lean_ctor_set(x_136, 1, x_3); -return x_136; -} -block_49: -{ -lean_object* x_41; uint8_t x_42; -x_41 = lean_ctor_get(x_1, 6); -lean_inc(x_41); -lean_dec(x_1); -x_42 = !lean_is_exclusive(x_40); -if (x_42 == 0) -{ -lean_object* x_43; lean_object* x_44; -x_43 = lean_ctor_get(x_40, 0); -lean_inc(x_39); -x_44 = lean_apply_3(x_41, x_43, x_38, x_39); -lean_ctor_set(x_40, 0, x_44); -x_4 = x_39; -x_5 = x_40; -goto block_15; -} -else -{ -lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; -x_45 = lean_ctor_get(x_40, 0); -x_46 = lean_ctor_get(x_40, 1); -lean_inc(x_46); -lean_inc(x_45); -lean_dec(x_40); -lean_inc(x_39); -x_47 = lean_apply_3(x_41, x_45, x_38, x_39); -x_48 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_48, 0, x_47); -lean_ctor_set(x_48, 1, x_46); -x_4 = x_39; -x_5 = x_48; -goto block_15; -} -} -} -case 3: -{ -lean_object* x_137; uint8_t x_138; -x_137 = lean_ctor_get(x_2, 0); -lean_inc(x_137); -x_138 = !lean_is_exclusive(x_3); -if (x_138 == 0) -{ -lean_object* x_139; lean_object* x_140; uint8_t x_141; -x_139 = lean_ctor_get(x_3, 0); -x_140 = l_Lean_AbstractTypeContext_instantiateLevelMVars___main___rarg(x_1, x_137, x_139); -x_141 = !lean_is_exclusive(x_140); -if (x_141 == 0) -{ -lean_object* x_142; lean_object* x_143; lean_object* x_144; -x_142 = lean_ctor_get(x_140, 0); -x_143 = lean_ctor_get(x_140, 1); -lean_ctor_set(x_3, 0, x_143); -x_144 = lean_expr_update_sort(x_2, x_142); -lean_ctor_set(x_140, 1, x_3); -lean_ctor_set(x_140, 0, x_144); -return x_140; -} -else -{ -lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; -x_145 = lean_ctor_get(x_140, 0); -x_146 = lean_ctor_get(x_140, 1); -lean_inc(x_146); -lean_inc(x_145); -lean_dec(x_140); -lean_ctor_set(x_3, 0, x_146); -x_147 = lean_expr_update_sort(x_2, x_145); -x_148 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_148, 0, x_147); -lean_ctor_set(x_148, 1, x_3); -return x_148; -} -} -else -{ -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; lean_object* x_156; lean_object* x_157; -x_149 = lean_ctor_get(x_3, 0); -x_150 = lean_ctor_get(x_3, 1); -lean_inc(x_150); -lean_inc(x_149); -lean_dec(x_3); -x_151 = l_Lean_AbstractTypeContext_instantiateLevelMVars___main___rarg(x_1, x_137, x_149); -x_152 = lean_ctor_get(x_151, 0); -lean_inc(x_152); -x_153 = lean_ctor_get(x_151, 1); -lean_inc(x_153); -if (lean_is_exclusive(x_151)) { - lean_ctor_release(x_151, 0); - lean_ctor_release(x_151, 1); - x_154 = x_151; -} else { - lean_dec_ref(x_151); - x_154 = lean_box(0); -} -x_155 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_155, 0, x_153); -lean_ctor_set(x_155, 1, x_150); -x_156 = lean_expr_update_sort(x_2, x_152); -if (lean_is_scalar(x_154)) { - x_157 = lean_alloc_ctor(0, 2, 0); -} else { - x_157 = x_154; -} -lean_ctor_set(x_157, 0, x_156); -lean_ctor_set(x_157, 1, x_155); -return x_157; -} -} -case 4: -{ -lean_object* x_158; lean_object* x_159; uint8_t x_160; -x_158 = lean_ctor_get(x_2, 1); -lean_inc(x_158); -x_159 = l_List_mmap___main___at_Lean_AbstractTypeContext_InstantiateExprMVars_main___main___spec__1___rarg(x_1, x_158, x_3); -x_160 = !lean_is_exclusive(x_159); -if (x_160 == 0) -{ -lean_object* x_161; lean_object* x_162; -x_161 = lean_ctor_get(x_159, 0); -x_162 = lean_expr_update_const(x_2, x_161); -lean_ctor_set(x_159, 0, x_162); -return x_159; -} -else -{ -lean_object* x_163; lean_object* x_164; lean_object* x_165; lean_object* x_166; -x_163 = lean_ctor_get(x_159, 0); -x_164 = lean_ctor_get(x_159, 1); -lean_inc(x_164); -lean_inc(x_163); -lean_dec(x_159); -x_165 = lean_expr_update_const(x_2, x_163); -x_166 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_166, 0, x_165); -lean_ctor_set(x_166, 1, x_164); -return x_166; -} -} -case 5: -{ -lean_object* x_167; lean_object* x_168; lean_object* x_169; lean_object* x_170; uint8_t x_232; -x_167 = lean_ctor_get(x_2, 0); -lean_inc(x_167); -x_168 = lean_ctor_get(x_2, 1); -lean_inc(x_168); -x_232 = lean_expr_has_expr_mvar(x_167); -if (x_232 == 0) -{ -uint8_t x_233; -x_233 = lean_expr_has_level_mvar(x_167); -if (x_233 == 0) -{ -x_169 = x_167; -x_170 = x_3; -goto block_231; -} -else -{ -lean_object* x_234; lean_object* x_235; -x_234 = lean_ctor_get(x_3, 1); -lean_inc(x_234); -x_235 = l_HashMapImp_find___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__1(x_234, x_167); -lean_dec(x_234); -if (lean_obj_tag(x_235) == 0) -{ -lean_object* x_236; lean_object* x_237; lean_object* x_238; uint8_t x_239; -lean_inc(x_167); -lean_inc(x_1); -x_236 = l_Lean_AbstractTypeContext_InstantiateExprMVars_main___main___rarg(x_1, x_167, x_3); -x_237 = lean_ctor_get(x_236, 1); -lean_inc(x_237); -x_238 = lean_ctor_get(x_236, 0); -lean_inc(x_238); -lean_dec(x_236); -x_239 = !lean_is_exclusive(x_237); -if (x_239 == 0) -{ -lean_object* x_240; lean_object* x_241; -x_240 = lean_ctor_get(x_237, 1); -lean_inc(x_238); -x_241 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_240, x_167, x_238); -lean_ctor_set(x_237, 1, x_241); -x_169 = x_238; -x_170 = x_237; -goto block_231; -} -else -{ -lean_object* x_242; lean_object* x_243; lean_object* x_244; lean_object* x_245; -x_242 = lean_ctor_get(x_237, 0); -x_243 = lean_ctor_get(x_237, 1); -lean_inc(x_243); -lean_inc(x_242); -lean_dec(x_237); -lean_inc(x_238); -x_244 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_243, x_167, x_238); -x_245 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_245, 0, x_242); -lean_ctor_set(x_245, 1, x_244); -x_169 = x_238; -x_170 = x_245; -goto block_231; -} -} -else -{ -lean_object* x_246; -lean_dec(x_167); -x_246 = lean_ctor_get(x_235, 0); -lean_inc(x_246); -lean_dec(x_235); -x_169 = x_246; -x_170 = x_3; -goto block_231; -} -} -} -else -{ -lean_object* x_247; lean_object* x_248; -x_247 = lean_ctor_get(x_3, 1); -lean_inc(x_247); -x_248 = l_HashMapImp_find___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__1(x_247, x_167); -lean_dec(x_247); -if (lean_obj_tag(x_248) == 0) -{ -lean_object* x_249; lean_object* x_250; lean_object* x_251; uint8_t x_252; -lean_inc(x_167); -lean_inc(x_1); -x_249 = l_Lean_AbstractTypeContext_InstantiateExprMVars_main___main___rarg(x_1, x_167, x_3); -x_250 = lean_ctor_get(x_249, 1); -lean_inc(x_250); -x_251 = lean_ctor_get(x_249, 0); -lean_inc(x_251); -lean_dec(x_249); -x_252 = !lean_is_exclusive(x_250); -if (x_252 == 0) -{ -lean_object* x_253; lean_object* x_254; -x_253 = lean_ctor_get(x_250, 1); -lean_inc(x_251); -x_254 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_253, x_167, x_251); -lean_ctor_set(x_250, 1, x_254); -x_169 = x_251; -x_170 = x_250; -goto block_231; -} -else -{ -lean_object* x_255; lean_object* x_256; lean_object* x_257; lean_object* x_258; -x_255 = lean_ctor_get(x_250, 0); -x_256 = lean_ctor_get(x_250, 1); -lean_inc(x_256); -lean_inc(x_255); -lean_dec(x_250); -lean_inc(x_251); -x_257 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_256, x_167, x_251); -x_258 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_258, 0, x_255); -lean_ctor_set(x_258, 1, x_257); -x_169 = x_251; -x_170 = x_258; -goto block_231; -} -} -else -{ -lean_object* x_259; -lean_dec(x_167); -x_259 = lean_ctor_get(x_248, 0); -lean_inc(x_259); -lean_dec(x_248); -x_169 = x_259; -x_170 = x_3; -goto block_231; -} -} -block_231: -{ -uint8_t x_171; -x_171 = lean_expr_has_expr_mvar(x_168); -if (x_171 == 0) -{ -uint8_t x_172; -x_172 = lean_expr_has_level_mvar(x_168); -if (x_172 == 0) -{ -lean_object* x_173; lean_object* x_174; -lean_dec(x_1); -x_173 = lean_expr_update_app(x_2, x_169, x_168); -x_174 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_174, 0, x_173); -lean_ctor_set(x_174, 1, x_170); -return x_174; -} -else -{ -lean_object* x_175; lean_object* x_176; -x_175 = lean_ctor_get(x_170, 1); -lean_inc(x_175); -x_176 = l_HashMapImp_find___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__1(x_175, x_168); -lean_dec(x_175); -if (lean_obj_tag(x_176) == 0) -{ -lean_object* x_177; uint8_t x_178; -lean_inc(x_168); -x_177 = l_Lean_AbstractTypeContext_InstantiateExprMVars_main___main___rarg(x_1, x_168, x_170); -x_178 = !lean_is_exclusive(x_177); -if (x_178 == 0) -{ -lean_object* x_179; uint8_t x_180; -x_179 = lean_ctor_get(x_177, 1); -x_180 = !lean_is_exclusive(x_179); -if (x_180 == 0) -{ -lean_object* x_181; lean_object* x_182; lean_object* x_183; lean_object* x_184; -x_181 = lean_ctor_get(x_177, 0); -x_182 = lean_ctor_get(x_179, 1); -lean_inc(x_181); -x_183 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_182, x_168, x_181); -lean_ctor_set(x_179, 1, x_183); -x_184 = lean_expr_update_app(x_2, x_169, x_181); -lean_ctor_set(x_177, 0, x_184); -return x_177; -} -else -{ -lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; lean_object* x_189; lean_object* x_190; -x_185 = lean_ctor_get(x_177, 0); -x_186 = lean_ctor_get(x_179, 0); -x_187 = lean_ctor_get(x_179, 1); -lean_inc(x_187); -lean_inc(x_186); -lean_dec(x_179); -lean_inc(x_185); -x_188 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_187, x_168, x_185); -x_189 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_189, 0, x_186); -lean_ctor_set(x_189, 1, x_188); -x_190 = lean_expr_update_app(x_2, x_169, x_185); -lean_ctor_set(x_177, 1, x_189); -lean_ctor_set(x_177, 0, x_190); -return x_177; -} -} -else -{ -lean_object* x_191; lean_object* x_192; lean_object* x_193; lean_object* x_194; lean_object* x_195; lean_object* x_196; lean_object* x_197; lean_object* x_198; lean_object* x_199; -x_191 = lean_ctor_get(x_177, 1); -x_192 = lean_ctor_get(x_177, 0); -lean_inc(x_191); -lean_inc(x_192); -lean_dec(x_177); -x_193 = lean_ctor_get(x_191, 0); -lean_inc(x_193); -x_194 = lean_ctor_get(x_191, 1); -lean_inc(x_194); -if (lean_is_exclusive(x_191)) { - lean_ctor_release(x_191, 0); - lean_ctor_release(x_191, 1); - x_195 = x_191; -} else { - lean_dec_ref(x_191); - x_195 = lean_box(0); -} -lean_inc(x_192); -x_196 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_194, x_168, x_192); -if (lean_is_scalar(x_195)) { - x_197 = lean_alloc_ctor(0, 2, 0); -} else { - x_197 = x_195; -} -lean_ctor_set(x_197, 0, x_193); -lean_ctor_set(x_197, 1, x_196); -x_198 = lean_expr_update_app(x_2, x_169, x_192); -x_199 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_199, 0, x_198); -lean_ctor_set(x_199, 1, x_197); -return x_199; -} -} -else -{ -lean_object* x_200; lean_object* x_201; lean_object* x_202; -lean_dec(x_168); -lean_dec(x_1); -x_200 = lean_ctor_get(x_176, 0); -lean_inc(x_200); -lean_dec(x_176); -x_201 = lean_expr_update_app(x_2, x_169, 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_170); -return x_202; -} -} -} -else -{ -lean_object* x_203; lean_object* x_204; -x_203 = lean_ctor_get(x_170, 1); -lean_inc(x_203); -x_204 = l_HashMapImp_find___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__1(x_203, x_168); -lean_dec(x_203); -if (lean_obj_tag(x_204) == 0) -{ -lean_object* x_205; uint8_t x_206; -lean_inc(x_168); -x_205 = l_Lean_AbstractTypeContext_InstantiateExprMVars_main___main___rarg(x_1, x_168, x_170); -x_206 = !lean_is_exclusive(x_205); -if (x_206 == 0) -{ -lean_object* x_207; uint8_t x_208; -x_207 = lean_ctor_get(x_205, 1); -x_208 = !lean_is_exclusive(x_207); -if (x_208 == 0) -{ -lean_object* x_209; lean_object* x_210; lean_object* x_211; lean_object* x_212; -x_209 = lean_ctor_get(x_205, 0); -x_210 = lean_ctor_get(x_207, 1); -lean_inc(x_209); -x_211 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_210, x_168, x_209); -lean_ctor_set(x_207, 1, x_211); -x_212 = lean_expr_update_app(x_2, x_169, x_209); -lean_ctor_set(x_205, 0, x_212); -return x_205; -} -else -{ -lean_object* x_213; lean_object* x_214; lean_object* x_215; lean_object* x_216; lean_object* x_217; lean_object* x_218; -x_213 = lean_ctor_get(x_205, 0); -x_214 = lean_ctor_get(x_207, 0); -x_215 = lean_ctor_get(x_207, 1); -lean_inc(x_215); -lean_inc(x_214); -lean_dec(x_207); -lean_inc(x_213); -x_216 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_215, x_168, x_213); -x_217 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_217, 0, x_214); -lean_ctor_set(x_217, 1, x_216); -x_218 = lean_expr_update_app(x_2, x_169, x_213); -lean_ctor_set(x_205, 1, x_217); -lean_ctor_set(x_205, 0, x_218); -return x_205; -} -} -else -{ -lean_object* x_219; lean_object* x_220; lean_object* x_221; lean_object* x_222; lean_object* x_223; lean_object* x_224; lean_object* x_225; lean_object* x_226; lean_object* x_227; -x_219 = lean_ctor_get(x_205, 1); -x_220 = lean_ctor_get(x_205, 0); -lean_inc(x_219); -lean_inc(x_220); -lean_dec(x_205); -x_221 = lean_ctor_get(x_219, 0); -lean_inc(x_221); -x_222 = lean_ctor_get(x_219, 1); -lean_inc(x_222); -if (lean_is_exclusive(x_219)) { - lean_ctor_release(x_219, 0); - lean_ctor_release(x_219, 1); - x_223 = x_219; -} else { - lean_dec_ref(x_219); - x_223 = lean_box(0); -} -lean_inc(x_220); -x_224 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_222, x_168, x_220); -if (lean_is_scalar(x_223)) { - x_225 = lean_alloc_ctor(0, 2, 0); -} else { - x_225 = x_223; -} -lean_ctor_set(x_225, 0, x_221); -lean_ctor_set(x_225, 1, x_224); -x_226 = lean_expr_update_app(x_2, x_169, x_220); -x_227 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_227, 0, x_226); -lean_ctor_set(x_227, 1, x_225); -return x_227; -} -} -else -{ -lean_object* x_228; lean_object* x_229; lean_object* x_230; -lean_dec(x_168); -lean_dec(x_1); -x_228 = lean_ctor_get(x_204, 0); -lean_inc(x_228); -lean_dec(x_204); -x_229 = lean_expr_update_app(x_2, x_169, x_228); -x_230 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_230, 0, x_229); -lean_ctor_set(x_230, 1, x_170); -return x_230; -} -} -} -} -case 6: -{ -uint8_t x_260; lean_object* x_261; lean_object* x_262; lean_object* x_263; lean_object* x_264; uint8_t x_326; -x_260 = lean_ctor_get_uint8(x_2, sizeof(void*)*3); -x_261 = lean_ctor_get(x_2, 1); -lean_inc(x_261); -x_262 = lean_ctor_get(x_2, 2); -lean_inc(x_262); -x_326 = lean_expr_has_expr_mvar(x_261); -if (x_326 == 0) -{ -uint8_t x_327; -x_327 = lean_expr_has_level_mvar(x_261); -if (x_327 == 0) -{ -x_263 = x_261; -x_264 = x_3; -goto block_325; -} -else -{ -lean_object* x_328; lean_object* x_329; -x_328 = lean_ctor_get(x_3, 1); -lean_inc(x_328); -x_329 = l_HashMapImp_find___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__1(x_328, x_261); -lean_dec(x_328); -if (lean_obj_tag(x_329) == 0) -{ -lean_object* x_330; lean_object* x_331; lean_object* x_332; uint8_t x_333; -lean_inc(x_261); -lean_inc(x_1); -x_330 = l_Lean_AbstractTypeContext_InstantiateExprMVars_main___main___rarg(x_1, x_261, x_3); -x_331 = lean_ctor_get(x_330, 1); -lean_inc(x_331); -x_332 = lean_ctor_get(x_330, 0); -lean_inc(x_332); -lean_dec(x_330); -x_333 = !lean_is_exclusive(x_331); -if (x_333 == 0) -{ -lean_object* x_334; lean_object* x_335; -x_334 = lean_ctor_get(x_331, 1); -lean_inc(x_332); -x_335 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_334, x_261, x_332); -lean_ctor_set(x_331, 1, x_335); -x_263 = x_332; -x_264 = x_331; -goto block_325; -} -else -{ -lean_object* x_336; lean_object* x_337; lean_object* x_338; lean_object* x_339; -x_336 = lean_ctor_get(x_331, 0); -x_337 = lean_ctor_get(x_331, 1); -lean_inc(x_337); -lean_inc(x_336); -lean_dec(x_331); -lean_inc(x_332); -x_338 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_337, x_261, x_332); -x_339 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_339, 0, x_336); -lean_ctor_set(x_339, 1, x_338); -x_263 = x_332; -x_264 = x_339; -goto block_325; -} -} -else -{ -lean_object* x_340; -lean_dec(x_261); -x_340 = lean_ctor_get(x_329, 0); -lean_inc(x_340); -lean_dec(x_329); -x_263 = x_340; -x_264 = x_3; -goto block_325; -} -} -} -else -{ -lean_object* x_341; lean_object* x_342; -x_341 = lean_ctor_get(x_3, 1); -lean_inc(x_341); -x_342 = l_HashMapImp_find___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__1(x_341, x_261); -lean_dec(x_341); -if (lean_obj_tag(x_342) == 0) -{ -lean_object* x_343; lean_object* x_344; lean_object* x_345; uint8_t x_346; -lean_inc(x_261); -lean_inc(x_1); -x_343 = l_Lean_AbstractTypeContext_InstantiateExprMVars_main___main___rarg(x_1, x_261, x_3); -x_344 = lean_ctor_get(x_343, 1); -lean_inc(x_344); -x_345 = lean_ctor_get(x_343, 0); -lean_inc(x_345); -lean_dec(x_343); -x_346 = !lean_is_exclusive(x_344); -if (x_346 == 0) -{ -lean_object* x_347; lean_object* x_348; -x_347 = lean_ctor_get(x_344, 1); -lean_inc(x_345); -x_348 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_347, x_261, x_345); -lean_ctor_set(x_344, 1, x_348); -x_263 = x_345; -x_264 = x_344; -goto block_325; -} -else -{ -lean_object* x_349; lean_object* x_350; lean_object* x_351; lean_object* x_352; -x_349 = lean_ctor_get(x_344, 0); -x_350 = lean_ctor_get(x_344, 1); -lean_inc(x_350); -lean_inc(x_349); -lean_dec(x_344); -lean_inc(x_345); -x_351 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_350, x_261, x_345); -x_352 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_352, 0, x_349); -lean_ctor_set(x_352, 1, x_351); -x_263 = x_345; -x_264 = x_352; -goto block_325; -} -} -else -{ -lean_object* x_353; -lean_dec(x_261); -x_353 = lean_ctor_get(x_342, 0); -lean_inc(x_353); -lean_dec(x_342); -x_263 = x_353; -x_264 = x_3; -goto block_325; -} -} -block_325: -{ -uint8_t x_265; -x_265 = lean_expr_has_expr_mvar(x_262); -if (x_265 == 0) -{ -uint8_t x_266; -x_266 = lean_expr_has_level_mvar(x_262); -if (x_266 == 0) -{ -lean_object* x_267; lean_object* x_268; -lean_dec(x_1); -x_267 = lean_expr_update_lambda(x_2, x_260, x_263, x_262); -x_268 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_268, 0, x_267); -lean_ctor_set(x_268, 1, x_264); -return x_268; -} -else -{ -lean_object* x_269; lean_object* x_270; -x_269 = lean_ctor_get(x_264, 1); -lean_inc(x_269); -x_270 = l_HashMapImp_find___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__1(x_269, x_262); -lean_dec(x_269); -if (lean_obj_tag(x_270) == 0) -{ -lean_object* x_271; uint8_t x_272; -lean_inc(x_262); -x_271 = l_Lean_AbstractTypeContext_InstantiateExprMVars_main___main___rarg(x_1, x_262, x_264); -x_272 = !lean_is_exclusive(x_271); -if (x_272 == 0) -{ -lean_object* x_273; uint8_t x_274; -x_273 = lean_ctor_get(x_271, 1); -x_274 = !lean_is_exclusive(x_273); -if (x_274 == 0) -{ -lean_object* x_275; lean_object* x_276; lean_object* x_277; lean_object* x_278; -x_275 = lean_ctor_get(x_271, 0); -x_276 = lean_ctor_get(x_273, 1); -lean_inc(x_275); -x_277 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_276, x_262, x_275); -lean_ctor_set(x_273, 1, x_277); -x_278 = lean_expr_update_lambda(x_2, x_260, x_263, x_275); -lean_ctor_set(x_271, 0, x_278); -return x_271; -} -else -{ -lean_object* x_279; lean_object* x_280; lean_object* x_281; lean_object* x_282; lean_object* x_283; lean_object* x_284; -x_279 = lean_ctor_get(x_271, 0); -x_280 = lean_ctor_get(x_273, 0); -x_281 = lean_ctor_get(x_273, 1); -lean_inc(x_281); -lean_inc(x_280); -lean_dec(x_273); -lean_inc(x_279); -x_282 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_281, x_262, x_279); -x_283 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_283, 0, x_280); -lean_ctor_set(x_283, 1, x_282); -x_284 = lean_expr_update_lambda(x_2, x_260, x_263, x_279); -lean_ctor_set(x_271, 1, x_283); -lean_ctor_set(x_271, 0, x_284); -return x_271; -} -} -else -{ -lean_object* x_285; lean_object* x_286; lean_object* x_287; lean_object* x_288; lean_object* x_289; lean_object* x_290; lean_object* x_291; lean_object* x_292; lean_object* x_293; -x_285 = lean_ctor_get(x_271, 1); -x_286 = lean_ctor_get(x_271, 0); -lean_inc(x_285); -lean_inc(x_286); -lean_dec(x_271); -x_287 = lean_ctor_get(x_285, 0); -lean_inc(x_287); -x_288 = lean_ctor_get(x_285, 1); -lean_inc(x_288); -if (lean_is_exclusive(x_285)) { - lean_ctor_release(x_285, 0); - lean_ctor_release(x_285, 1); - x_289 = x_285; -} else { - lean_dec_ref(x_285); - x_289 = lean_box(0); -} -lean_inc(x_286); -x_290 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_288, x_262, x_286); -if (lean_is_scalar(x_289)) { - x_291 = lean_alloc_ctor(0, 2, 0); -} else { - x_291 = x_289; -} -lean_ctor_set(x_291, 0, x_287); -lean_ctor_set(x_291, 1, x_290); -x_292 = lean_expr_update_lambda(x_2, x_260, x_263, x_286); -x_293 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_293, 0, x_292); -lean_ctor_set(x_293, 1, x_291); -return x_293; -} -} -else -{ -lean_object* x_294; lean_object* x_295; lean_object* x_296; -lean_dec(x_262); -lean_dec(x_1); -x_294 = lean_ctor_get(x_270, 0); -lean_inc(x_294); -lean_dec(x_270); -x_295 = lean_expr_update_lambda(x_2, x_260, x_263, x_294); -x_296 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_296, 0, x_295); -lean_ctor_set(x_296, 1, x_264); -return x_296; -} -} -} -else -{ -lean_object* x_297; lean_object* x_298; -x_297 = lean_ctor_get(x_264, 1); -lean_inc(x_297); -x_298 = l_HashMapImp_find___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__1(x_297, x_262); -lean_dec(x_297); -if (lean_obj_tag(x_298) == 0) -{ -lean_object* x_299; uint8_t x_300; -lean_inc(x_262); -x_299 = l_Lean_AbstractTypeContext_InstantiateExprMVars_main___main___rarg(x_1, x_262, x_264); -x_300 = !lean_is_exclusive(x_299); -if (x_300 == 0) -{ -lean_object* x_301; uint8_t x_302; -x_301 = lean_ctor_get(x_299, 1); -x_302 = !lean_is_exclusive(x_301); -if (x_302 == 0) -{ -lean_object* x_303; lean_object* x_304; lean_object* x_305; lean_object* x_306; -x_303 = lean_ctor_get(x_299, 0); -x_304 = lean_ctor_get(x_301, 1); -lean_inc(x_303); -x_305 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_304, x_262, x_303); -lean_ctor_set(x_301, 1, x_305); -x_306 = lean_expr_update_lambda(x_2, x_260, x_263, x_303); -lean_ctor_set(x_299, 0, x_306); -return x_299; -} -else -{ -lean_object* x_307; lean_object* x_308; lean_object* x_309; lean_object* x_310; lean_object* x_311; lean_object* x_312; -x_307 = lean_ctor_get(x_299, 0); -x_308 = lean_ctor_get(x_301, 0); -x_309 = lean_ctor_get(x_301, 1); -lean_inc(x_309); -lean_inc(x_308); -lean_dec(x_301); -lean_inc(x_307); -x_310 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_309, x_262, x_307); -x_311 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_311, 0, x_308); -lean_ctor_set(x_311, 1, x_310); -x_312 = lean_expr_update_lambda(x_2, x_260, x_263, x_307); -lean_ctor_set(x_299, 1, x_311); -lean_ctor_set(x_299, 0, x_312); -return x_299; -} -} -else -{ -lean_object* x_313; lean_object* x_314; lean_object* x_315; lean_object* x_316; lean_object* x_317; lean_object* x_318; lean_object* x_319; lean_object* x_320; lean_object* x_321; -x_313 = lean_ctor_get(x_299, 1); -x_314 = lean_ctor_get(x_299, 0); -lean_inc(x_313); -lean_inc(x_314); -lean_dec(x_299); -x_315 = lean_ctor_get(x_313, 0); -lean_inc(x_315); -x_316 = lean_ctor_get(x_313, 1); -lean_inc(x_316); -if (lean_is_exclusive(x_313)) { - lean_ctor_release(x_313, 0); - lean_ctor_release(x_313, 1); - x_317 = x_313; -} else { - lean_dec_ref(x_313); - x_317 = lean_box(0); -} -lean_inc(x_314); -x_318 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_316, x_262, x_314); -if (lean_is_scalar(x_317)) { - x_319 = lean_alloc_ctor(0, 2, 0); -} else { - x_319 = x_317; -} -lean_ctor_set(x_319, 0, x_315); -lean_ctor_set(x_319, 1, x_318); -x_320 = lean_expr_update_lambda(x_2, x_260, x_263, x_314); -x_321 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_321, 0, x_320); -lean_ctor_set(x_321, 1, x_319); -return x_321; -} -} -else -{ -lean_object* x_322; lean_object* x_323; lean_object* x_324; -lean_dec(x_262); -lean_dec(x_1); -x_322 = lean_ctor_get(x_298, 0); -lean_inc(x_322); -lean_dec(x_298); -x_323 = lean_expr_update_lambda(x_2, x_260, x_263, x_322); -x_324 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_324, 0, x_323); -lean_ctor_set(x_324, 1, x_264); -return x_324; -} -} -} -} -case 7: -{ -uint8_t x_354; lean_object* x_355; lean_object* x_356; lean_object* x_357; lean_object* x_358; uint8_t x_420; -x_354 = lean_ctor_get_uint8(x_2, sizeof(void*)*3); -x_355 = lean_ctor_get(x_2, 1); -lean_inc(x_355); -x_356 = lean_ctor_get(x_2, 2); -lean_inc(x_356); -x_420 = lean_expr_has_expr_mvar(x_355); -if (x_420 == 0) -{ -uint8_t x_421; -x_421 = lean_expr_has_level_mvar(x_355); -if (x_421 == 0) -{ -x_357 = x_355; -x_358 = x_3; -goto block_419; -} -else -{ -lean_object* x_422; lean_object* x_423; -x_422 = lean_ctor_get(x_3, 1); -lean_inc(x_422); -x_423 = l_HashMapImp_find___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__1(x_422, x_355); -lean_dec(x_422); -if (lean_obj_tag(x_423) == 0) -{ -lean_object* x_424; lean_object* x_425; lean_object* x_426; uint8_t x_427; -lean_inc(x_355); -lean_inc(x_1); -x_424 = l_Lean_AbstractTypeContext_InstantiateExprMVars_main___main___rarg(x_1, x_355, x_3); -x_425 = lean_ctor_get(x_424, 1); -lean_inc(x_425); -x_426 = lean_ctor_get(x_424, 0); -lean_inc(x_426); -lean_dec(x_424); -x_427 = !lean_is_exclusive(x_425); -if (x_427 == 0) -{ -lean_object* x_428; lean_object* x_429; -x_428 = lean_ctor_get(x_425, 1); -lean_inc(x_426); -x_429 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_428, x_355, x_426); -lean_ctor_set(x_425, 1, x_429); -x_357 = x_426; -x_358 = x_425; -goto block_419; -} -else -{ -lean_object* x_430; lean_object* x_431; lean_object* x_432; lean_object* x_433; -x_430 = lean_ctor_get(x_425, 0); -x_431 = lean_ctor_get(x_425, 1); -lean_inc(x_431); -lean_inc(x_430); -lean_dec(x_425); -lean_inc(x_426); -x_432 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_431, x_355, x_426); -x_433 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_433, 0, x_430); -lean_ctor_set(x_433, 1, x_432); -x_357 = x_426; -x_358 = x_433; -goto block_419; -} -} -else -{ -lean_object* x_434; -lean_dec(x_355); -x_434 = lean_ctor_get(x_423, 0); -lean_inc(x_434); -lean_dec(x_423); -x_357 = x_434; -x_358 = x_3; -goto block_419; -} -} -} -else -{ -lean_object* x_435; lean_object* x_436; -x_435 = lean_ctor_get(x_3, 1); -lean_inc(x_435); -x_436 = l_HashMapImp_find___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__1(x_435, x_355); -lean_dec(x_435); -if (lean_obj_tag(x_436) == 0) -{ -lean_object* x_437; lean_object* x_438; lean_object* x_439; uint8_t x_440; -lean_inc(x_355); -lean_inc(x_1); -x_437 = l_Lean_AbstractTypeContext_InstantiateExprMVars_main___main___rarg(x_1, x_355, x_3); -x_438 = lean_ctor_get(x_437, 1); -lean_inc(x_438); -x_439 = lean_ctor_get(x_437, 0); -lean_inc(x_439); -lean_dec(x_437); -x_440 = !lean_is_exclusive(x_438); -if (x_440 == 0) -{ -lean_object* x_441; lean_object* x_442; -x_441 = lean_ctor_get(x_438, 1); -lean_inc(x_439); -x_442 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_441, x_355, x_439); -lean_ctor_set(x_438, 1, x_442); -x_357 = x_439; -x_358 = x_438; -goto block_419; -} -else -{ -lean_object* x_443; lean_object* x_444; lean_object* x_445; lean_object* x_446; -x_443 = lean_ctor_get(x_438, 0); -x_444 = lean_ctor_get(x_438, 1); -lean_inc(x_444); -lean_inc(x_443); -lean_dec(x_438); -lean_inc(x_439); -x_445 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_444, x_355, x_439); -x_446 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_446, 0, x_443); -lean_ctor_set(x_446, 1, x_445); -x_357 = x_439; -x_358 = x_446; -goto block_419; -} -} -else -{ -lean_object* x_447; -lean_dec(x_355); -x_447 = lean_ctor_get(x_436, 0); -lean_inc(x_447); -lean_dec(x_436); -x_357 = x_447; -x_358 = x_3; -goto block_419; -} -} -block_419: -{ -uint8_t x_359; -x_359 = lean_expr_has_expr_mvar(x_356); -if (x_359 == 0) -{ -uint8_t x_360; -x_360 = lean_expr_has_level_mvar(x_356); -if (x_360 == 0) -{ -lean_object* x_361; lean_object* x_362; -lean_dec(x_1); -x_361 = lean_expr_update_forall(x_2, x_354, x_357, x_356); -x_362 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_362, 0, x_361); -lean_ctor_set(x_362, 1, x_358); -return x_362; -} -else -{ -lean_object* x_363; lean_object* x_364; -x_363 = lean_ctor_get(x_358, 1); -lean_inc(x_363); -x_364 = l_HashMapImp_find___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__1(x_363, x_356); -lean_dec(x_363); -if (lean_obj_tag(x_364) == 0) -{ -lean_object* x_365; uint8_t x_366; -lean_inc(x_356); -x_365 = l_Lean_AbstractTypeContext_InstantiateExprMVars_main___main___rarg(x_1, x_356, x_358); -x_366 = !lean_is_exclusive(x_365); -if (x_366 == 0) -{ -lean_object* x_367; uint8_t x_368; -x_367 = lean_ctor_get(x_365, 1); -x_368 = !lean_is_exclusive(x_367); -if (x_368 == 0) -{ -lean_object* x_369; lean_object* x_370; lean_object* x_371; lean_object* x_372; -x_369 = lean_ctor_get(x_365, 0); -x_370 = lean_ctor_get(x_367, 1); -lean_inc(x_369); -x_371 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_370, x_356, x_369); -lean_ctor_set(x_367, 1, x_371); -x_372 = lean_expr_update_forall(x_2, x_354, x_357, x_369); -lean_ctor_set(x_365, 0, x_372); -return x_365; -} -else -{ -lean_object* x_373; lean_object* x_374; lean_object* x_375; lean_object* x_376; lean_object* x_377; lean_object* x_378; -x_373 = lean_ctor_get(x_365, 0); -x_374 = lean_ctor_get(x_367, 0); -x_375 = lean_ctor_get(x_367, 1); -lean_inc(x_375); -lean_inc(x_374); -lean_dec(x_367); -lean_inc(x_373); -x_376 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_375, x_356, x_373); -x_377 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_377, 0, x_374); -lean_ctor_set(x_377, 1, x_376); -x_378 = lean_expr_update_forall(x_2, x_354, x_357, x_373); -lean_ctor_set(x_365, 1, x_377); -lean_ctor_set(x_365, 0, x_378); -return x_365; -} -} -else -{ -lean_object* x_379; lean_object* x_380; lean_object* x_381; lean_object* x_382; lean_object* x_383; lean_object* x_384; lean_object* x_385; lean_object* x_386; lean_object* x_387; -x_379 = lean_ctor_get(x_365, 1); -x_380 = lean_ctor_get(x_365, 0); -lean_inc(x_379); -lean_inc(x_380); -lean_dec(x_365); -x_381 = lean_ctor_get(x_379, 0); -lean_inc(x_381); -x_382 = lean_ctor_get(x_379, 1); -lean_inc(x_382); -if (lean_is_exclusive(x_379)) { - lean_ctor_release(x_379, 0); - lean_ctor_release(x_379, 1); - x_383 = x_379; -} else { - lean_dec_ref(x_379); - x_383 = lean_box(0); -} -lean_inc(x_380); -x_384 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_382, x_356, x_380); -if (lean_is_scalar(x_383)) { - x_385 = lean_alloc_ctor(0, 2, 0); -} else { - x_385 = x_383; -} -lean_ctor_set(x_385, 0, x_381); -lean_ctor_set(x_385, 1, x_384); -x_386 = lean_expr_update_forall(x_2, x_354, x_357, x_380); -x_387 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_387, 0, x_386); -lean_ctor_set(x_387, 1, x_385); -return x_387; -} -} -else -{ -lean_object* x_388; lean_object* x_389; lean_object* x_390; -lean_dec(x_356); -lean_dec(x_1); -x_388 = lean_ctor_get(x_364, 0); -lean_inc(x_388); -lean_dec(x_364); -x_389 = lean_expr_update_forall(x_2, x_354, x_357, x_388); -x_390 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_390, 0, x_389); -lean_ctor_set(x_390, 1, x_358); -return x_390; -} -} -} -else -{ -lean_object* x_391; lean_object* x_392; -x_391 = lean_ctor_get(x_358, 1); -lean_inc(x_391); -x_392 = l_HashMapImp_find___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__1(x_391, x_356); -lean_dec(x_391); -if (lean_obj_tag(x_392) == 0) -{ -lean_object* x_393; uint8_t x_394; -lean_inc(x_356); -x_393 = l_Lean_AbstractTypeContext_InstantiateExprMVars_main___main___rarg(x_1, x_356, x_358); -x_394 = !lean_is_exclusive(x_393); -if (x_394 == 0) -{ -lean_object* x_395; uint8_t x_396; -x_395 = lean_ctor_get(x_393, 1); -x_396 = !lean_is_exclusive(x_395); -if (x_396 == 0) -{ -lean_object* x_397; lean_object* x_398; lean_object* x_399; lean_object* x_400; -x_397 = lean_ctor_get(x_393, 0); -x_398 = lean_ctor_get(x_395, 1); -lean_inc(x_397); -x_399 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_398, x_356, x_397); -lean_ctor_set(x_395, 1, x_399); -x_400 = lean_expr_update_forall(x_2, x_354, x_357, x_397); -lean_ctor_set(x_393, 0, x_400); -return x_393; -} -else -{ -lean_object* x_401; lean_object* x_402; lean_object* x_403; lean_object* x_404; lean_object* x_405; lean_object* x_406; -x_401 = lean_ctor_get(x_393, 0); -x_402 = lean_ctor_get(x_395, 0); -x_403 = lean_ctor_get(x_395, 1); -lean_inc(x_403); -lean_inc(x_402); -lean_dec(x_395); -lean_inc(x_401); -x_404 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_403, x_356, x_401); -x_405 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_405, 0, x_402); -lean_ctor_set(x_405, 1, x_404); -x_406 = lean_expr_update_forall(x_2, x_354, x_357, x_401); -lean_ctor_set(x_393, 1, x_405); -lean_ctor_set(x_393, 0, x_406); -return x_393; -} -} -else -{ -lean_object* x_407; lean_object* x_408; lean_object* x_409; lean_object* x_410; lean_object* x_411; lean_object* x_412; lean_object* x_413; lean_object* x_414; lean_object* x_415; -x_407 = lean_ctor_get(x_393, 1); -x_408 = lean_ctor_get(x_393, 0); -lean_inc(x_407); -lean_inc(x_408); -lean_dec(x_393); -x_409 = lean_ctor_get(x_407, 0); -lean_inc(x_409); -x_410 = lean_ctor_get(x_407, 1); -lean_inc(x_410); -if (lean_is_exclusive(x_407)) { - lean_ctor_release(x_407, 0); - lean_ctor_release(x_407, 1); - x_411 = x_407; -} else { - lean_dec_ref(x_407); - x_411 = lean_box(0); -} -lean_inc(x_408); -x_412 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_410, x_356, x_408); -if (lean_is_scalar(x_411)) { - x_413 = lean_alloc_ctor(0, 2, 0); -} else { - x_413 = x_411; -} -lean_ctor_set(x_413, 0, x_409); -lean_ctor_set(x_413, 1, x_412); -x_414 = lean_expr_update_forall(x_2, x_354, x_357, x_408); -x_415 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_415, 0, x_414); -lean_ctor_set(x_415, 1, x_413); -return x_415; -} -} -else -{ -lean_object* x_416; lean_object* x_417; lean_object* x_418; -lean_dec(x_356); -lean_dec(x_1); -x_416 = lean_ctor_get(x_392, 0); -lean_inc(x_416); -lean_dec(x_392); -x_417 = lean_expr_update_forall(x_2, x_354, x_357, x_416); -x_418 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_418, 0, x_417); -lean_ctor_set(x_418, 1, x_358); -return x_418; -} -} -} -} -case 8: -{ -lean_object* x_448; lean_object* x_449; lean_object* x_450; lean_object* x_451; lean_object* x_452; lean_object* x_514; lean_object* x_515; uint8_t x_552; -x_448 = lean_ctor_get(x_2, 1); -lean_inc(x_448); -x_449 = lean_ctor_get(x_2, 2); -lean_inc(x_449); -x_450 = lean_ctor_get(x_2, 3); -lean_inc(x_450); -x_552 = lean_expr_has_expr_mvar(x_448); -if (x_552 == 0) -{ -uint8_t x_553; -x_553 = lean_expr_has_level_mvar(x_448); -if (x_553 == 0) -{ -x_514 = x_448; -x_515 = x_3; -goto block_551; -} -else -{ -lean_object* x_554; lean_object* x_555; -x_554 = lean_ctor_get(x_3, 1); -lean_inc(x_554); -x_555 = l_HashMapImp_find___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__1(x_554, x_448); -lean_dec(x_554); -if (lean_obj_tag(x_555) == 0) -{ -lean_object* x_556; lean_object* x_557; lean_object* x_558; uint8_t x_559; -lean_inc(x_448); -lean_inc(x_1); -x_556 = l_Lean_AbstractTypeContext_InstantiateExprMVars_main___main___rarg(x_1, x_448, x_3); -x_557 = lean_ctor_get(x_556, 1); -lean_inc(x_557); -x_558 = lean_ctor_get(x_556, 0); -lean_inc(x_558); -lean_dec(x_556); -x_559 = !lean_is_exclusive(x_557); -if (x_559 == 0) -{ -lean_object* x_560; lean_object* x_561; -x_560 = lean_ctor_get(x_557, 1); -lean_inc(x_558); -x_561 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_560, x_448, x_558); -lean_ctor_set(x_557, 1, x_561); -x_514 = x_558; -x_515 = x_557; -goto block_551; -} -else -{ -lean_object* x_562; lean_object* x_563; lean_object* x_564; lean_object* x_565; -x_562 = lean_ctor_get(x_557, 0); -x_563 = lean_ctor_get(x_557, 1); -lean_inc(x_563); -lean_inc(x_562); -lean_dec(x_557); -lean_inc(x_558); -x_564 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_563, x_448, x_558); -x_565 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_565, 0, x_562); -lean_ctor_set(x_565, 1, x_564); -x_514 = x_558; -x_515 = x_565; -goto block_551; -} -} -else -{ -lean_object* x_566; -lean_dec(x_448); -x_566 = lean_ctor_get(x_555, 0); -lean_inc(x_566); -lean_dec(x_555); -x_514 = x_566; -x_515 = x_3; -goto block_551; -} -} -} -else -{ -lean_object* x_567; lean_object* x_568; -x_567 = lean_ctor_get(x_3, 1); -lean_inc(x_567); -x_568 = l_HashMapImp_find___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__1(x_567, x_448); -lean_dec(x_567); -if (lean_obj_tag(x_568) == 0) -{ -lean_object* x_569; lean_object* x_570; lean_object* x_571; uint8_t x_572; -lean_inc(x_448); -lean_inc(x_1); -x_569 = l_Lean_AbstractTypeContext_InstantiateExprMVars_main___main___rarg(x_1, x_448, x_3); -x_570 = lean_ctor_get(x_569, 1); -lean_inc(x_570); -x_571 = lean_ctor_get(x_569, 0); -lean_inc(x_571); -lean_dec(x_569); -x_572 = !lean_is_exclusive(x_570); -if (x_572 == 0) -{ -lean_object* x_573; lean_object* x_574; -x_573 = lean_ctor_get(x_570, 1); -lean_inc(x_571); -x_574 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_573, x_448, x_571); -lean_ctor_set(x_570, 1, x_574); -x_514 = x_571; -x_515 = x_570; -goto block_551; -} -else -{ -lean_object* x_575; lean_object* x_576; lean_object* x_577; lean_object* x_578; -x_575 = lean_ctor_get(x_570, 0); -x_576 = lean_ctor_get(x_570, 1); -lean_inc(x_576); -lean_inc(x_575); -lean_dec(x_570); -lean_inc(x_571); -x_577 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_576, x_448, x_571); -x_578 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_578, 0, x_575); -lean_ctor_set(x_578, 1, x_577); -x_514 = x_571; -x_515 = x_578; -goto block_551; -} -} -else -{ -lean_object* x_579; -lean_dec(x_448); -x_579 = lean_ctor_get(x_568, 0); -lean_inc(x_579); -lean_dec(x_568); -x_514 = x_579; -x_515 = x_3; -goto block_551; -} -} -block_513: -{ -uint8_t x_453; -x_453 = lean_expr_has_expr_mvar(x_450); -if (x_453 == 0) -{ -uint8_t x_454; -x_454 = lean_expr_has_level_mvar(x_450); -if (x_454 == 0) -{ -lean_object* x_455; lean_object* x_456; -lean_dec(x_1); -x_455 = lean_apply_1(x_451, x_450); -x_456 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_456, 0, x_455); -lean_ctor_set(x_456, 1, x_452); -return x_456; -} -else -{ -lean_object* x_457; lean_object* x_458; -x_457 = lean_ctor_get(x_452, 1); -lean_inc(x_457); -x_458 = l_HashMapImp_find___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__1(x_457, x_450); -lean_dec(x_457); -if (lean_obj_tag(x_458) == 0) -{ -lean_object* x_459; uint8_t x_460; -lean_inc(x_450); -x_459 = l_Lean_AbstractTypeContext_InstantiateExprMVars_main___main___rarg(x_1, x_450, x_452); -x_460 = !lean_is_exclusive(x_459); -if (x_460 == 0) -{ -lean_object* x_461; uint8_t x_462; -x_461 = lean_ctor_get(x_459, 1); -x_462 = !lean_is_exclusive(x_461); -if (x_462 == 0) -{ -lean_object* x_463; lean_object* x_464; lean_object* x_465; lean_object* x_466; -x_463 = lean_ctor_get(x_459, 0); -x_464 = lean_ctor_get(x_461, 1); -lean_inc(x_463); -x_465 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_464, x_450, x_463); -lean_ctor_set(x_461, 1, x_465); -x_466 = lean_apply_1(x_451, x_463); -lean_ctor_set(x_459, 0, x_466); -return x_459; -} -else -{ -lean_object* x_467; lean_object* x_468; lean_object* x_469; lean_object* x_470; lean_object* x_471; lean_object* x_472; -x_467 = lean_ctor_get(x_459, 0); -x_468 = lean_ctor_get(x_461, 0); -x_469 = lean_ctor_get(x_461, 1); -lean_inc(x_469); -lean_inc(x_468); -lean_dec(x_461); -lean_inc(x_467); -x_470 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_469, x_450, x_467); -x_471 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_471, 0, x_468); -lean_ctor_set(x_471, 1, x_470); -x_472 = lean_apply_1(x_451, x_467); -lean_ctor_set(x_459, 1, x_471); -lean_ctor_set(x_459, 0, x_472); -return x_459; -} -} -else -{ -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; lean_object* x_481; -x_473 = lean_ctor_get(x_459, 1); -x_474 = lean_ctor_get(x_459, 0); -lean_inc(x_473); -lean_inc(x_474); -lean_dec(x_459); -x_475 = lean_ctor_get(x_473, 0); -lean_inc(x_475); -x_476 = lean_ctor_get(x_473, 1); -lean_inc(x_476); -if (lean_is_exclusive(x_473)) { - lean_ctor_release(x_473, 0); - lean_ctor_release(x_473, 1); - x_477 = x_473; -} else { - lean_dec_ref(x_473); - x_477 = lean_box(0); -} -lean_inc(x_474); -x_478 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_476, x_450, x_474); -if (lean_is_scalar(x_477)) { - x_479 = lean_alloc_ctor(0, 2, 0); -} else { - x_479 = x_477; -} -lean_ctor_set(x_479, 0, x_475); -lean_ctor_set(x_479, 1, x_478); -x_480 = lean_apply_1(x_451, x_474); -x_481 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_481, 0, x_480); -lean_ctor_set(x_481, 1, x_479); -return x_481; -} -} -else -{ -lean_object* x_482; lean_object* x_483; lean_object* x_484; -lean_dec(x_450); -lean_dec(x_1); -x_482 = lean_ctor_get(x_458, 0); -lean_inc(x_482); -lean_dec(x_458); -x_483 = lean_apply_1(x_451, x_482); -x_484 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_484, 0, x_483); -lean_ctor_set(x_484, 1, x_452); -return x_484; -} -} -} -else -{ -lean_object* x_485; lean_object* x_486; -x_485 = lean_ctor_get(x_452, 1); -lean_inc(x_485); -x_486 = l_HashMapImp_find___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__1(x_485, x_450); -lean_dec(x_485); -if (lean_obj_tag(x_486) == 0) -{ -lean_object* x_487; uint8_t x_488; -lean_inc(x_450); -x_487 = l_Lean_AbstractTypeContext_InstantiateExprMVars_main___main___rarg(x_1, x_450, x_452); -x_488 = !lean_is_exclusive(x_487); -if (x_488 == 0) -{ -lean_object* x_489; uint8_t x_490; -x_489 = lean_ctor_get(x_487, 1); -x_490 = !lean_is_exclusive(x_489); -if (x_490 == 0) -{ -lean_object* x_491; lean_object* x_492; lean_object* x_493; lean_object* x_494; -x_491 = lean_ctor_get(x_487, 0); -x_492 = lean_ctor_get(x_489, 1); -lean_inc(x_491); -x_493 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_492, x_450, x_491); -lean_ctor_set(x_489, 1, x_493); -x_494 = lean_apply_1(x_451, x_491); -lean_ctor_set(x_487, 0, x_494); -return x_487; -} -else -{ -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_495 = lean_ctor_get(x_487, 0); -x_496 = lean_ctor_get(x_489, 0); -x_497 = lean_ctor_get(x_489, 1); -lean_inc(x_497); -lean_inc(x_496); -lean_dec(x_489); -lean_inc(x_495); -x_498 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_497, x_450, x_495); -x_499 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_499, 0, x_496); -lean_ctor_set(x_499, 1, x_498); -x_500 = lean_apply_1(x_451, x_495); -lean_ctor_set(x_487, 1, x_499); -lean_ctor_set(x_487, 0, x_500); -return x_487; -} -} -else -{ -lean_object* x_501; lean_object* x_502; lean_object* x_503; lean_object* x_504; lean_object* x_505; lean_object* x_506; lean_object* x_507; lean_object* x_508; lean_object* x_509; -x_501 = lean_ctor_get(x_487, 1); -x_502 = lean_ctor_get(x_487, 0); -lean_inc(x_501); -lean_inc(x_502); -lean_dec(x_487); -x_503 = lean_ctor_get(x_501, 0); -lean_inc(x_503); -x_504 = lean_ctor_get(x_501, 1); -lean_inc(x_504); -if (lean_is_exclusive(x_501)) { - lean_ctor_release(x_501, 0); - lean_ctor_release(x_501, 1); - x_505 = x_501; -} else { - lean_dec_ref(x_501); - x_505 = lean_box(0); -} -lean_inc(x_502); -x_506 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_504, x_450, x_502); -if (lean_is_scalar(x_505)) { - x_507 = lean_alloc_ctor(0, 2, 0); -} else { - x_507 = x_505; -} -lean_ctor_set(x_507, 0, x_503); -lean_ctor_set(x_507, 1, x_506); -x_508 = lean_apply_1(x_451, x_502); -x_509 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_509, 0, x_508); -lean_ctor_set(x_509, 1, x_507); -return x_509; -} -} -else -{ -lean_object* x_510; lean_object* x_511; lean_object* x_512; -lean_dec(x_450); -lean_dec(x_1); -x_510 = lean_ctor_get(x_486, 0); -lean_inc(x_510); -lean_dec(x_486); -x_511 = lean_apply_1(x_451, x_510); -x_512 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_512, 0, x_511); -lean_ctor_set(x_512, 1, x_452); -return x_512; -} -} -} -block_551: -{ -uint8_t x_516; -x_516 = lean_expr_has_expr_mvar(x_449); -if (x_516 == 0) -{ -uint8_t x_517; -x_517 = lean_expr_has_level_mvar(x_449); -if (x_517 == 0) -{ -lean_object* x_518; -x_518 = lean_alloc_closure((void*)(l_Lean_Expr_updateLet_x21), 4, 3); -lean_closure_set(x_518, 0, x_2); -lean_closure_set(x_518, 1, x_514); -lean_closure_set(x_518, 2, x_449); -x_451 = x_518; -x_452 = x_515; -goto block_513; -} -else -{ -lean_object* x_519; lean_object* x_520; -x_519 = lean_ctor_get(x_515, 1); -lean_inc(x_519); -x_520 = l_HashMapImp_find___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__1(x_519, x_449); -lean_dec(x_519); -if (lean_obj_tag(x_520) == 0) -{ -lean_object* x_521; lean_object* x_522; lean_object* x_523; uint8_t x_524; -lean_inc(x_449); -lean_inc(x_1); -x_521 = l_Lean_AbstractTypeContext_InstantiateExprMVars_main___main___rarg(x_1, x_449, x_515); -x_522 = lean_ctor_get(x_521, 1); -lean_inc(x_522); -x_523 = lean_ctor_get(x_521, 0); -lean_inc(x_523); -lean_dec(x_521); -x_524 = !lean_is_exclusive(x_522); -if (x_524 == 0) -{ -lean_object* x_525; lean_object* x_526; lean_object* x_527; -x_525 = lean_ctor_get(x_522, 1); -lean_inc(x_523); -x_526 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_525, x_449, x_523); -lean_ctor_set(x_522, 1, x_526); -x_527 = lean_alloc_closure((void*)(l_Lean_Expr_updateLet_x21), 4, 3); -lean_closure_set(x_527, 0, x_2); -lean_closure_set(x_527, 1, x_514); -lean_closure_set(x_527, 2, x_523); -x_451 = x_527; -x_452 = x_522; -goto block_513; -} -else -{ -lean_object* x_528; lean_object* x_529; lean_object* x_530; lean_object* x_531; lean_object* x_532; -x_528 = lean_ctor_get(x_522, 0); -x_529 = lean_ctor_get(x_522, 1); -lean_inc(x_529); -lean_inc(x_528); -lean_dec(x_522); -lean_inc(x_523); -x_530 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_529, x_449, x_523); -x_531 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_531, 0, x_528); -lean_ctor_set(x_531, 1, x_530); -x_532 = lean_alloc_closure((void*)(l_Lean_Expr_updateLet_x21), 4, 3); -lean_closure_set(x_532, 0, x_2); -lean_closure_set(x_532, 1, x_514); -lean_closure_set(x_532, 2, x_523); -x_451 = x_532; -x_452 = x_531; -goto block_513; -} -} -else -{ -lean_object* x_533; lean_object* x_534; -lean_dec(x_449); -x_533 = lean_ctor_get(x_520, 0); -lean_inc(x_533); -lean_dec(x_520); -x_534 = lean_alloc_closure((void*)(l_Lean_Expr_updateLet_x21), 4, 3); -lean_closure_set(x_534, 0, x_2); -lean_closure_set(x_534, 1, x_514); -lean_closure_set(x_534, 2, x_533); -x_451 = x_534; -x_452 = x_515; -goto block_513; -} -} -} -else -{ -lean_object* x_535; lean_object* x_536; -x_535 = lean_ctor_get(x_515, 1); -lean_inc(x_535); -x_536 = l_HashMapImp_find___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__1(x_535, x_449); -lean_dec(x_535); -if (lean_obj_tag(x_536) == 0) -{ -lean_object* x_537; lean_object* x_538; lean_object* x_539; uint8_t x_540; -lean_inc(x_449); -lean_inc(x_1); -x_537 = l_Lean_AbstractTypeContext_InstantiateExprMVars_main___main___rarg(x_1, x_449, x_515); -x_538 = lean_ctor_get(x_537, 1); -lean_inc(x_538); -x_539 = lean_ctor_get(x_537, 0); -lean_inc(x_539); -lean_dec(x_537); -x_540 = !lean_is_exclusive(x_538); -if (x_540 == 0) -{ -lean_object* x_541; lean_object* x_542; lean_object* x_543; -x_541 = lean_ctor_get(x_538, 1); -lean_inc(x_539); -x_542 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_541, x_449, x_539); -lean_ctor_set(x_538, 1, x_542); -x_543 = lean_alloc_closure((void*)(l_Lean_Expr_updateLet_x21), 4, 3); -lean_closure_set(x_543, 0, x_2); -lean_closure_set(x_543, 1, x_514); -lean_closure_set(x_543, 2, x_539); -x_451 = x_543; -x_452 = x_538; -goto block_513; -} -else -{ -lean_object* x_544; lean_object* x_545; lean_object* x_546; lean_object* x_547; lean_object* x_548; -x_544 = lean_ctor_get(x_538, 0); -x_545 = lean_ctor_get(x_538, 1); -lean_inc(x_545); -lean_inc(x_544); -lean_dec(x_538); -lean_inc(x_539); -x_546 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_545, x_449, x_539); -x_547 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_547, 0, x_544); -lean_ctor_set(x_547, 1, x_546); -x_548 = lean_alloc_closure((void*)(l_Lean_Expr_updateLet_x21), 4, 3); -lean_closure_set(x_548, 0, x_2); -lean_closure_set(x_548, 1, x_514); -lean_closure_set(x_548, 2, x_539); -x_451 = x_548; -x_452 = x_547; -goto block_513; -} -} -else -{ -lean_object* x_549; lean_object* x_550; -lean_dec(x_449); -x_549 = lean_ctor_get(x_536, 0); -lean_inc(x_549); -lean_dec(x_536); -x_550 = lean_alloc_closure((void*)(l_Lean_Expr_updateLet_x21), 4, 3); -lean_closure_set(x_550, 0, x_2); -lean_closure_set(x_550, 1, x_514); -lean_closure_set(x_550, 2, x_549); -x_451 = x_550; -x_452 = x_515; -goto block_513; -} -} -} -} -case 10: -{ -lean_object* x_580; uint8_t x_581; -x_580 = lean_ctor_get(x_2, 1); -lean_inc(x_580); -x_581 = lean_expr_has_expr_mvar(x_580); -if (x_581 == 0) -{ -uint8_t x_582; -x_582 = lean_expr_has_level_mvar(x_580); -if (x_582 == 0) -{ -lean_dec(x_1); -x_16 = x_580; -x_17 = x_3; -goto block_26; -} -else -{ -lean_object* x_583; lean_object* x_584; -x_583 = lean_ctor_get(x_3, 1); -lean_inc(x_583); -x_584 = l_HashMapImp_find___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__1(x_583, x_580); -lean_dec(x_583); -if (lean_obj_tag(x_584) == 0) -{ -lean_object* x_585; lean_object* x_586; lean_object* x_587; uint8_t x_588; -lean_inc(x_580); -x_585 = l_Lean_AbstractTypeContext_InstantiateExprMVars_main___main___rarg(x_1, x_580, x_3); -x_586 = lean_ctor_get(x_585, 1); -lean_inc(x_586); -x_587 = lean_ctor_get(x_585, 0); -lean_inc(x_587); -lean_dec(x_585); -x_588 = !lean_is_exclusive(x_586); -if (x_588 == 0) -{ -lean_object* x_589; lean_object* x_590; -x_589 = lean_ctor_get(x_586, 1); -lean_inc(x_587); -x_590 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_589, x_580, x_587); -lean_ctor_set(x_586, 1, x_590); -x_16 = x_587; -x_17 = x_586; -goto block_26; -} -else -{ -lean_object* x_591; lean_object* x_592; lean_object* x_593; lean_object* x_594; -x_591 = lean_ctor_get(x_586, 0); -x_592 = lean_ctor_get(x_586, 1); -lean_inc(x_592); -lean_inc(x_591); -lean_dec(x_586); -lean_inc(x_587); -x_593 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_592, x_580, x_587); -x_594 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_594, 0, x_591); -lean_ctor_set(x_594, 1, x_593); -x_16 = x_587; -x_17 = x_594; -goto block_26; -} -} -else -{ -lean_object* x_595; -lean_dec(x_580); -lean_dec(x_1); -x_595 = lean_ctor_get(x_584, 0); -lean_inc(x_595); -lean_dec(x_584); -x_16 = x_595; -x_17 = x_3; -goto block_26; -} -} -} -else -{ -lean_object* x_596; lean_object* x_597; -x_596 = lean_ctor_get(x_3, 1); -lean_inc(x_596); -x_597 = l_HashMapImp_find___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__1(x_596, x_580); -lean_dec(x_596); -if (lean_obj_tag(x_597) == 0) -{ -lean_object* x_598; lean_object* x_599; lean_object* x_600; uint8_t x_601; -lean_inc(x_580); -x_598 = l_Lean_AbstractTypeContext_InstantiateExprMVars_main___main___rarg(x_1, x_580, x_3); -x_599 = lean_ctor_get(x_598, 1); -lean_inc(x_599); -x_600 = lean_ctor_get(x_598, 0); -lean_inc(x_600); -lean_dec(x_598); -x_601 = !lean_is_exclusive(x_599); -if (x_601 == 0) -{ -lean_object* x_602; lean_object* x_603; -x_602 = lean_ctor_get(x_599, 1); -lean_inc(x_600); -x_603 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_602, x_580, x_600); -lean_ctor_set(x_599, 1, x_603); -x_16 = x_600; -x_17 = x_599; -goto block_26; -} -else -{ -lean_object* x_604; lean_object* x_605; lean_object* x_606; lean_object* x_607; -x_604 = lean_ctor_get(x_599, 0); -x_605 = lean_ctor_get(x_599, 1); -lean_inc(x_605); -lean_inc(x_604); -lean_dec(x_599); -lean_inc(x_600); -x_606 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_605, x_580, x_600); -x_607 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_607, 0, x_604); -lean_ctor_set(x_607, 1, x_606); -x_16 = x_600; -x_17 = x_607; -goto block_26; -} -} -else -{ -lean_object* x_608; -lean_dec(x_580); -lean_dec(x_1); -x_608 = lean_ctor_get(x_597, 0); -lean_inc(x_608); -lean_dec(x_597); -x_16 = x_608; -x_17 = x_3; -goto block_26; -} -} -} -case 11: -{ -lean_object* x_609; uint8_t x_610; -x_609 = lean_ctor_get(x_2, 2); -lean_inc(x_609); -x_610 = lean_expr_has_expr_mvar(x_609); -if (x_610 == 0) -{ -uint8_t x_611; -x_611 = lean_expr_has_level_mvar(x_609); -if (x_611 == 0) -{ -lean_dec(x_1); -x_27 = x_609; -x_28 = x_3; -goto block_37; -} -else -{ -lean_object* x_612; lean_object* x_613; -x_612 = lean_ctor_get(x_3, 1); -lean_inc(x_612); -x_613 = l_HashMapImp_find___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__1(x_612, x_609); -lean_dec(x_612); -if (lean_obj_tag(x_613) == 0) -{ -lean_object* x_614; lean_object* x_615; lean_object* x_616; uint8_t x_617; -lean_inc(x_609); -x_614 = l_Lean_AbstractTypeContext_InstantiateExprMVars_main___main___rarg(x_1, x_609, x_3); -x_615 = lean_ctor_get(x_614, 1); -lean_inc(x_615); -x_616 = lean_ctor_get(x_614, 0); -lean_inc(x_616); -lean_dec(x_614); -x_617 = !lean_is_exclusive(x_615); -if (x_617 == 0) -{ -lean_object* x_618; lean_object* x_619; -x_618 = lean_ctor_get(x_615, 1); -lean_inc(x_616); -x_619 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_618, x_609, x_616); -lean_ctor_set(x_615, 1, x_619); -x_27 = x_616; -x_28 = x_615; -goto block_37; -} -else -{ -lean_object* x_620; lean_object* x_621; lean_object* x_622; lean_object* x_623; -x_620 = lean_ctor_get(x_615, 0); -x_621 = lean_ctor_get(x_615, 1); -lean_inc(x_621); -lean_inc(x_620); -lean_dec(x_615); -lean_inc(x_616); -x_622 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_621, x_609, x_616); -x_623 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_623, 0, x_620); -lean_ctor_set(x_623, 1, x_622); -x_27 = x_616; -x_28 = x_623; -goto block_37; -} -} -else -{ -lean_object* x_624; -lean_dec(x_609); -lean_dec(x_1); -x_624 = lean_ctor_get(x_613, 0); -lean_inc(x_624); -lean_dec(x_613); -x_27 = x_624; -x_28 = x_3; -goto block_37; -} -} -} -else -{ -lean_object* x_625; lean_object* x_626; -x_625 = lean_ctor_get(x_3, 1); -lean_inc(x_625); -x_626 = l_HashMapImp_find___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__1(x_625, x_609); -lean_dec(x_625); -if (lean_obj_tag(x_626) == 0) -{ -lean_object* x_627; lean_object* x_628; lean_object* x_629; uint8_t x_630; -lean_inc(x_609); -x_627 = l_Lean_AbstractTypeContext_InstantiateExprMVars_main___main___rarg(x_1, x_609, x_3); -x_628 = lean_ctor_get(x_627, 1); -lean_inc(x_628); -x_629 = lean_ctor_get(x_627, 0); -lean_inc(x_629); -lean_dec(x_627); -x_630 = !lean_is_exclusive(x_628); -if (x_630 == 0) -{ -lean_object* x_631; lean_object* x_632; -x_631 = lean_ctor_get(x_628, 1); -lean_inc(x_629); -x_632 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_631, x_609, x_629); -lean_ctor_set(x_628, 1, x_632); -x_27 = x_629; -x_28 = x_628; -goto block_37; -} -else -{ -lean_object* x_633; lean_object* x_634; lean_object* x_635; lean_object* x_636; -x_633 = lean_ctor_get(x_628, 0); -x_634 = lean_ctor_get(x_628, 1); -lean_inc(x_634); -lean_inc(x_633); -lean_dec(x_628); -lean_inc(x_629); -x_635 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_634, x_609, x_629); -x_636 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_636, 0, x_633); -lean_ctor_set(x_636, 1, x_635); -x_27 = x_629; -x_28 = x_636; -goto block_37; -} -} -else -{ -lean_object* x_637; -lean_dec(x_609); -lean_dec(x_1); -x_637 = lean_ctor_get(x_626, 0); -lean_inc(x_637); -lean_dec(x_626); -x_27 = x_637; -x_28 = x_3; -goto block_37; -} -} -} -default: -{ -lean_object* x_638; -lean_dec(x_1); -x_638 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_638, 0, x_2); -lean_ctor_set(x_638, 1, x_3); -return x_638; -} -} -block_15: -{ -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, 1); -lean_inc(x_4); -x_8 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_7, x_2, x_4); -lean_ctor_set(x_5, 1, x_8); -x_9 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_9, 0, x_4); -lean_ctor_set(x_9, 1, 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); -lean_inc(x_4); -x_12 = l_HashMapImp_insert___at_Lean_AbstractTypeContext_InstantiateExprMVars_checkCache___spec__3(x_11, x_2, x_4); -x_13 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_13, 0, x_10); -lean_ctor_set(x_13, 1, x_12); -x_14 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_14, 0, x_4); -lean_ctor_set(x_14, 1, x_13); -return x_14; -} -} -block_26: -{ -if (lean_obj_tag(x_2) == 10) -{ -lean_object* x_18; lean_object* x_19; -x_18 = lean_expr_update_mdata(x_2, 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 -{ -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_dec(x_16); -lean_dec(x_2); -x_20 = l_Lean_Expr_constName___closed__1; -x_21 = lean_unsigned_to_nat(372u); -x_22 = lean_unsigned_to_nat(15u); -x_23 = l_Lean_Expr_updateMData_x21___closed__1; -x_24 = l_panicWithPos___at_Lean_Expr_bindingDomain___spec__1(x_20, x_21, x_22, x_23); -x_25 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_25, 0, x_24); -lean_ctor_set(x_25, 1, x_17); -return x_25; -} -} -block_37: -{ -if (lean_obj_tag(x_2) == 11) -{ -lean_object* x_29; lean_object* x_30; -x_29 = lean_expr_update_proj(x_2, x_27); -x_30 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_30, 0, x_29); -lean_ctor_set(x_30, 1, x_28); -return x_30; -} -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_dec(x_27); -lean_dec(x_2); -x_31 = l_Lean_Expr_constName___closed__1; -x_32 = lean_unsigned_to_nat(377u); -x_33 = lean_unsigned_to_nat(16u); -x_34 = l_Lean_Expr_updateProj_x21___closed__1; -x_35 = l_panicWithPos___at_Lean_Expr_bindingDomain___spec__1(x_31, x_32, x_33, 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_28); -return x_36; -} -} -} -} -lean_object* l_Lean_AbstractTypeContext_InstantiateExprMVars_main___main(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_AbstractTypeContext_InstantiateExprMVars_main___main___rarg), 3, 0); -return x_2; -} -} -lean_object* l_Lean_AbstractTypeContext_InstantiateExprMVars_main___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l_Lean_AbstractTypeContext_InstantiateExprMVars_main___main___rarg(x_1, x_2, x_3); -return x_4; -} -} -lean_object* l_Lean_AbstractTypeContext_InstantiateExprMVars_main(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_AbstractTypeContext_InstantiateExprMVars_main___rarg), 3, 0); -return x_2; -} -} -lean_object* l_mkHashMap___at_Lean_AbstractTypeContext_instantiateExprMVars___spec__1(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_mkHashMapImp___rarg(x_1); -return x_2; -} -} -lean_object* _init_l_Lean_AbstractTypeContext_instantiateExprMVars___rarg___closed__1() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = lean_unsigned_to_nat(8u); -x_2 = l_mkHashMapImp___rarg(x_1); -return x_2; -} -} -lean_object* l_Lean_AbstractTypeContext_instantiateExprMVars___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; uint8_t x_7; -x_4 = l_Lean_AbstractTypeContext_instantiateExprMVars___rarg___closed__1; -x_5 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_5, 0, x_3); -lean_ctor_set(x_5, 1, x_4); -x_6 = l_Lean_AbstractTypeContext_InstantiateExprMVars_main___main___rarg(x_1, x_2, x_5); -x_7 = !lean_is_exclusive(x_6); -if (x_7 == 0) -{ -lean_object* x_8; lean_object* x_9; -x_8 = lean_ctor_get(x_6, 1); -x_9 = lean_ctor_get(x_8, 0); -lean_inc(x_9); -lean_dec(x_8); -lean_ctor_set(x_6, 1, x_9); -return x_6; -} -else -{ -lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; -x_10 = lean_ctor_get(x_6, 0); -x_11 = lean_ctor_get(x_6, 1); -lean_inc(x_11); -lean_inc(x_10); -lean_dec(x_6); -x_12 = lean_ctor_get(x_11, 0); -lean_inc(x_12); -lean_dec(x_11); -x_13 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_13, 0, x_10); -lean_ctor_set(x_13, 1, x_12); -return x_13; -} -} -} -lean_object* l_Lean_AbstractTypeContext_instantiateExprMVars(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_AbstractTypeContext_instantiateExprMVars___rarg), 3, 0); -return x_2; -} -} lean_object* l___private_Init_Lean_TypeContext_1__getOptions___rarg(lean_object* x_1, lean_object* x_2) { _start: { @@ -5407,149 +296,86 @@ lean_dec(x_2); return x_4; } } -uint8_t l_Lean_metavarContextIsAbstractMetavarContext___lambda__1(lean_object* x_1) { +lean_object* l_Lean_typeContextNoCacheIsAbstractTCCache___lambda__1(lean_object* x_1, uint8_t x_2, lean_object* x_3) { _start: { -uint8_t x_2; -x_2 = 1; -return x_2; +lean_object* x_4; +x_4 = lean_box(0); +return x_4; } } -lean_object* _init_l_Lean_metavarContextIsAbstractMetavarContext___closed__1() { +lean_object* l_Lean_typeContextNoCacheIsAbstractTCCache___lambda__2(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4) { _start: { -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_metavarContextIsAbstractMetavarContext___lambda__1___boxed), 1, 0); +lean_inc(x_1); return x_1; } } -lean_object* _init_l_Lean_metavarContextIsAbstractMetavarContext___closed__2() { +lean_object* _init_l_Lean_typeContextNoCacheIsAbstractTCCache___closed__1() { _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(lean_metavar_ctx_get_level_assignment), 2, 0); +x_1 = lean_alloc_closure((void*)(l_Lean_typeContextNoCacheIsAbstractTCCache___lambda__1___boxed), 3, 0); return x_1; } } -lean_object* _init_l_Lean_metavarContextIsAbstractMetavarContext___closed__3() { +lean_object* _init_l_Lean_typeContextNoCacheIsAbstractTCCache___closed__2() { _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(lean_metavar_ctx_assign_level), 3, 0); +x_1 = lean_alloc_closure((void*)(l_Lean_typeContextNoCacheIsAbstractTCCache___lambda__2___boxed), 4, 0); return x_1; } } -lean_object* _init_l_Lean_metavarContextIsAbstractMetavarContext___closed__4() { +lean_object* _init_l_Lean_typeContextNoCacheIsAbstractTCCache___closed__3() { _start: { -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(lean_metavar_ctx_get_expr_assignment), 2, 0); -return x_1; -} -} -lean_object* _init_l_Lean_metavarContextIsAbstractMetavarContext___closed__5() { -_start: -{ -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(lean_metavar_ctx_assign_expr), 3, 0); -return x_1; -} -} -lean_object* _init_l_Lean_metavarContextIsAbstractMetavarContext___closed__6() { -_start: -{ -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_MetavarContext_getExprMVarLCtx), 2, 0); -return x_1; -} -} -lean_object* _init_l_Lean_metavarContextIsAbstractMetavarContext___closed__7() { -_start: -{ -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_MetavarContext_getExprMVarType), 2, 0); -return x_1; -} -} -lean_object* _init_l_Lean_metavarContextIsAbstractMetavarContext___closed__8() { -_start: -{ -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(lean_metavar_ctx_assign_delayed), 5, 0); -return x_1; -} -} -lean_object* _init_l_Lean_metavarContextIsAbstractMetavarContext___closed__9() { -_start: -{ -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(lean_metavar_ctx_get_delayed_assignment), 2, 0); -return x_1; -} -} -lean_object* _init_l_Lean_metavarContextIsAbstractMetavarContext___closed__10() { -_start: -{ -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(lean_metavar_ctx_erase_delayed), 2, 0); -return x_1; -} -} -lean_object* _init_l_Lean_metavarContextIsAbstractMetavarContext___closed__11() { -_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; lean_object* x_7; lean_object* x_8; uint8_t x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; -x_1 = l_Lean_MetavarContext_mkMetavarContext___closed__1; -x_2 = l_Lean_metavarContextIsAbstractMetavarContext___closed__1; -x_3 = l_Lean_metavarContextIsAbstractMetavarContext___closed__2; -x_4 = l_Lean_metavarContextIsAbstractMetavarContext___closed__3; -x_5 = l_Lean_metavarContextIsAbstractMetavarContext___closed__4; -x_6 = l_Lean_metavarContextIsAbstractMetavarContext___closed__5; -x_7 = l_Lean_metavarContextIsAbstractMetavarContext___closed__6; -x_8 = l_Lean_metavarContextIsAbstractMetavarContext___closed__7; -x_9 = 0; -x_10 = l_Lean_metavarContextIsAbstractMetavarContext___closed__8; -x_11 = l_Lean_metavarContextIsAbstractMetavarContext___closed__9; -x_12 = l_Lean_metavarContextIsAbstractMetavarContext___closed__10; -x_13 = lean_alloc_ctor(0, 12, 1); -lean_ctor_set(x_13, 0, x_1); -lean_ctor_set(x_13, 1, x_2); -lean_ctor_set(x_13, 2, x_3); -lean_ctor_set(x_13, 3, x_4); -lean_ctor_set(x_13, 4, x_2); -lean_ctor_set(x_13, 5, x_5); -lean_ctor_set(x_13, 6, x_6); -lean_ctor_set(x_13, 7, x_7); -lean_ctor_set(x_13, 8, x_8); -lean_ctor_set(x_13, 9, x_10); -lean_ctor_set(x_13, 10, x_11); -lean_ctor_set(x_13, 11, x_12); -lean_ctor_set_uint8(x_13, sizeof(void*)*12, x_9); -return x_13; -} -} -lean_object* _init_l_Lean_metavarContextIsAbstractMetavarContext() { -_start: -{ -lean_object* x_1; -x_1 = l_Lean_metavarContextIsAbstractMetavarContext___closed__11; -return x_1; -} -} -lean_object* l_Lean_metavarContextIsAbstractMetavarContext___lambda__1___boxed(lean_object* x_1) { -_start: -{ -uint8_t x_2; lean_object* x_3; -x_2 = l_Lean_metavarContextIsAbstractMetavarContext___lambda__1(x_1); -lean_dec(x_1); -x_3 = lean_box(x_2); +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_typeContextNoCacheIsAbstractTCCache___closed__1; +x_2 = l_Lean_typeContextNoCacheIsAbstractTCCache___closed__2; +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_object* _init_l_Lean_typeContextNoCacheIsAbstractTCCache() { +_start: +{ +lean_object* x_1; +x_1 = l_Lean_typeContextNoCacheIsAbstractTCCache___closed__3; +return x_1; +} +} +lean_object* l_Lean_typeContextNoCacheIsAbstractTCCache___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +uint8_t x_4; lean_object* x_5; +x_4 = lean_unbox(x_2); +lean_dec(x_2); +x_5 = l_Lean_typeContextNoCacheIsAbstractTCCache___lambda__1(x_1, x_4, x_3); +lean_dec(x_3); +lean_dec(x_1); +return x_5; +} +} +lean_object* l_Lean_typeContextNoCacheIsAbstractTCCache___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +uint8_t x_5; lean_object* x_6; +x_5 = lean_unbox(x_2); +lean_dec(x_2); +x_6 = l_Lean_typeContextNoCacheIsAbstractTCCache___lambda__2(x_1, x_5, x_3, x_4); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_1); +return x_6; +} +} lean_object* initialize_Init_Control_Reader(lean_object*); lean_object* initialize_Init_Lean_NameGenerator(lean_object*); lean_object* initialize_Init_Lean_Environment(lean_object*); -lean_object* initialize_Init_Lean_LocalContext(lean_object*); +lean_object* initialize_Init_Lean_AbstractMetavarContext(lean_object*); lean_object* initialize_Init_Lean_Trace(lean_object*); static bool _G_initialized = false; lean_object* initialize_Init_Lean_TypeContext(lean_object* w) { @@ -5565,7 +391,7 @@ lean_dec_ref(res); res = initialize_Init_Lean_Environment(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); -res = initialize_Init_Lean_LocalContext(lean_io_mk_world()); +res = initialize_Init_Lean_AbstractMetavarContext(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Init_Lean_Trace(lean_io_mk_world()); @@ -5577,8 +403,6 @@ l_Lean_TCState_backtrackable___closed__2 = _init_l_Lean_TCState_backtrackable___ lean_mark_persistent(l_Lean_TCState_backtrackable___closed__2); l_Lean_TCState_backtrackable___closed__3 = _init_l_Lean_TCState_backtrackable___closed__3(); lean_mark_persistent(l_Lean_TCState_backtrackable___closed__3); -l_Lean_AbstractTypeContext_instantiateExprMVars___rarg___closed__1 = _init_l_Lean_AbstractTypeContext_instantiateExprMVars___rarg___closed__1(); -lean_mark_persistent(l_Lean_AbstractTypeContext_instantiateExprMVars___rarg___closed__1); l_Lean_AbstractTypeContext_tracer___closed__1 = _init_l_Lean_AbstractTypeContext_tracer___closed__1(); lean_mark_persistent(l_Lean_AbstractTypeContext_tracer___closed__1); l_Lean_AbstractTypeContext_tracer___closed__2 = _init_l_Lean_AbstractTypeContext_tracer___closed__2(); @@ -5587,30 +411,14 @@ l_Lean_AbstractTypeContext_tracer___closed__3 = _init_l_Lean_AbstractTypeContext lean_mark_persistent(l_Lean_AbstractTypeContext_tracer___closed__3); l_Lean_AbstractTypeContext_tracer___closed__4 = _init_l_Lean_AbstractTypeContext_tracer___closed__4(); lean_mark_persistent(l_Lean_AbstractTypeContext_tracer___closed__4); -l_Lean_metavarContextIsAbstractMetavarContext___closed__1 = _init_l_Lean_metavarContextIsAbstractMetavarContext___closed__1(); -lean_mark_persistent(l_Lean_metavarContextIsAbstractMetavarContext___closed__1); -l_Lean_metavarContextIsAbstractMetavarContext___closed__2 = _init_l_Lean_metavarContextIsAbstractMetavarContext___closed__2(); -lean_mark_persistent(l_Lean_metavarContextIsAbstractMetavarContext___closed__2); -l_Lean_metavarContextIsAbstractMetavarContext___closed__3 = _init_l_Lean_metavarContextIsAbstractMetavarContext___closed__3(); -lean_mark_persistent(l_Lean_metavarContextIsAbstractMetavarContext___closed__3); -l_Lean_metavarContextIsAbstractMetavarContext___closed__4 = _init_l_Lean_metavarContextIsAbstractMetavarContext___closed__4(); -lean_mark_persistent(l_Lean_metavarContextIsAbstractMetavarContext___closed__4); -l_Lean_metavarContextIsAbstractMetavarContext___closed__5 = _init_l_Lean_metavarContextIsAbstractMetavarContext___closed__5(); -lean_mark_persistent(l_Lean_metavarContextIsAbstractMetavarContext___closed__5); -l_Lean_metavarContextIsAbstractMetavarContext___closed__6 = _init_l_Lean_metavarContextIsAbstractMetavarContext___closed__6(); -lean_mark_persistent(l_Lean_metavarContextIsAbstractMetavarContext___closed__6); -l_Lean_metavarContextIsAbstractMetavarContext___closed__7 = _init_l_Lean_metavarContextIsAbstractMetavarContext___closed__7(); -lean_mark_persistent(l_Lean_metavarContextIsAbstractMetavarContext___closed__7); -l_Lean_metavarContextIsAbstractMetavarContext___closed__8 = _init_l_Lean_metavarContextIsAbstractMetavarContext___closed__8(); -lean_mark_persistent(l_Lean_metavarContextIsAbstractMetavarContext___closed__8); -l_Lean_metavarContextIsAbstractMetavarContext___closed__9 = _init_l_Lean_metavarContextIsAbstractMetavarContext___closed__9(); -lean_mark_persistent(l_Lean_metavarContextIsAbstractMetavarContext___closed__9); -l_Lean_metavarContextIsAbstractMetavarContext___closed__10 = _init_l_Lean_metavarContextIsAbstractMetavarContext___closed__10(); -lean_mark_persistent(l_Lean_metavarContextIsAbstractMetavarContext___closed__10); -l_Lean_metavarContextIsAbstractMetavarContext___closed__11 = _init_l_Lean_metavarContextIsAbstractMetavarContext___closed__11(); -lean_mark_persistent(l_Lean_metavarContextIsAbstractMetavarContext___closed__11); -l_Lean_metavarContextIsAbstractMetavarContext = _init_l_Lean_metavarContextIsAbstractMetavarContext(); -lean_mark_persistent(l_Lean_metavarContextIsAbstractMetavarContext); +l_Lean_typeContextNoCacheIsAbstractTCCache___closed__1 = _init_l_Lean_typeContextNoCacheIsAbstractTCCache___closed__1(); +lean_mark_persistent(l_Lean_typeContextNoCacheIsAbstractTCCache___closed__1); +l_Lean_typeContextNoCacheIsAbstractTCCache___closed__2 = _init_l_Lean_typeContextNoCacheIsAbstractTCCache___closed__2(); +lean_mark_persistent(l_Lean_typeContextNoCacheIsAbstractTCCache___closed__2); +l_Lean_typeContextNoCacheIsAbstractTCCache___closed__3 = _init_l_Lean_typeContextNoCacheIsAbstractTCCache___closed__3(); +lean_mark_persistent(l_Lean_typeContextNoCacheIsAbstractTCCache___closed__3); +l_Lean_typeContextNoCacheIsAbstractTCCache = _init_l_Lean_typeContextNoCacheIsAbstractTCCache(); +lean_mark_persistent(l_Lean_typeContextNoCacheIsAbstractTCCache); return lean_mk_io_result(lean_box(0)); } #ifdef __cplusplus