text: // Lean compiler output
  // Module: Lean.Meta.Closure
  // Imports: Init Std.ShareCommon Lean.MetavarContext Lean.Environment Lean.Util.FoldConsts Lean.Meta.Basic Lean.Meta.Check
  #include <lean/lean.h>
  #if defined(__clang__)
  #pragma clang diagnostic ignored "-Wunused-parameter"
  #pragma clang diagnostic ignored "-Wunused-label"
  #elif defined(__GNUC__) && !defined(__CLANG__)
  #pragma GCC diagnostic ignored "-Wunused-parameter"
  #pragma GCC diagnostic ignored "-Wunused-label"
  #pragma GCC diagnostic ignored "-Wunused-but-set-variable"
  #endif
  #ifdef __cplusplus
  extern "C" {
  #endif
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_mkBinding(uint8_t, lean_object*, lean_object*);
  uint8_t l_Lean_isRecCore(lean_object*, lean_object*);
  static lean_object* l_Lean_Meta_Closure_collectExprAux___closed__5;
  static lean_object* l_Lean_Meta_Closure_collectExprAux___closed__18;
  lean_object* lean_expr_update_forall(lean_object*, uint8_t, lean_object*, lean_object*);
  size_t lean_usize_add(size_t, size_t);
  lean_object* l_Lean_stringToMessageData(lean_object*);
  static lean_object* l_Lean_Meta_Closure_collectExprAux___closed__14;
  lean_object* lean_mk_empty_array_with_capacity(lean_object*);
  lean_object* l___private_Std_Data_HashMap_0__Std_numBucketsForCapacity(lean_object*);
  LEAN_EXPORT lean_object* l_Nat_foldRev_loop___at_Lean_Meta_Closure_mkBinding___spec__2(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*);
  static lean_object* l_Lean_Meta_mkAuxDefinition___closed__3;
  LEAN_EXPORT lean_object* l_Std_HashMapImp_moveEntries___at_Lean_Meta_Closure_visitLevel___spec__6(lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_pushFVarArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT uint8_t l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___lambda__1(lean_object*, lean_object*);
  static lean_object* l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__1;
  LEAN_EXPORT lean_object* l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_throwError___at_Lean_Meta_setInlineAttribute___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* lean_name_mk_string(lean_object*, lean_object*);
  lean_object* lean_array_uget(lean_object*, size_t);
  lean_object* lean_expr_update_mdata(lean_object*, lean_object*);
  lean_object* l_Array_append___rarg(lean_object*, lean_object*);
  static lean_object* l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__2;
  static lean_object* l_Lean_Meta_Closure_collectLevelAux___closed__2;
  lean_object* lean_array_uset(lean_object*, size_t, lean_object*);
  static lean_object* l_Lean_Meta_Closure_collectLevelAux___closed__9;
  LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Meta_Closure_process___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  static lean_object* l_Lean_Meta_Closure_collectExprAux___closed__16;
  LEAN_EXPORT lean_object* l_Lean_Meta_mkAuxDefinitionFor___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_mkFreshFVarId___at_Lean_Meta_Closure_collectExprAux___spec__1(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  uint8_t l_Lean_isCasesOnRecursor(lean_object*, lean_object*);
  uint8_t l_Lean_Level_hasMVar(lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_State_newLocalDecls___default;
  LEAN_EXPORT lean_object* l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__8___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* lean_st_ref_get(lean_object*, lean_object*);
  LEAN_EXPORT uint8_t l_Std_AssocList_contains___at_Lean_Meta_Closure_visitLevel___spec__4(lean_object*, lean_object*);
  static lean_object* l_Lean_Meta_Closure_collectExprAux___closed__7;
  lean_object* l_Lean_LocalContext_get_x21(lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_throwKernelException___at_Lean_Meta_mkAuxDefinition___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  uint64_t l_Lean_Level_hash(lean_object*);
  LEAN_EXPORT lean_object* l___private_Lean_MonadEnv_0__Lean_checkUnsupported___at_Lean_Meta_mkAuxDefinition___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* lean_array_push(lean_object*, lean_object*);
  lean_object* lean_array_get_size(lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_State_exprFVarArgs___default;
  LEAN_EXPORT lean_object* l_Lean_mkFreshFVarId___at_Lean_Meta_Closure_collectExprAux___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_State_nextLevelIdx___default;
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_State_nextExprIdx___default;
  uint8_t l_Lean_Level_hasParam(lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_State_levelArgs___default;
  LEAN_EXPORT lean_object* l_Std_AssocList_contains___at_Lean_Meta_Closure_visitLevel___spec__4___boxed(lean_object*, lean_object*);
  uint8_t lean_usize_dec_lt(size_t, size_t);
  LEAN_EXPORT lean_object* l_Std_RBNode_findCore___at_Lean_Meta_Closure_process___spec__1(lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_mkAuxDefinitionFor(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  static lean_object* l_Lean_Meta_Closure_collectExprAux___closed__15;
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_pickNextToProcess_x3f___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  static lean_object* l_Lean_Meta_Closure_collectExprAux___closed__3;
  lean_object* lean_nat_add(lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_mkAuxDefinition(lean_object*, lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Std_AssocList_find_x3f___at_Lean_Meta_Closure_visitLevel___spec__2(lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Std_mkHashMap___at_Lean_Meta_Closure_State_visitedLevel___default___spec__1___boxed(lean_object*);
  uint32_t lean_uint32_add(uint32_t, uint32_t);
  uint8_t lean_expr_has_loose_bvar(lean_object*, lean_object*);
  lean_object* l_Lean_mkAppN(lean_object*, lean_object*);
  static lean_object* l_Lean_Meta_Closure_mkNewLevelParam___closed__1;
  size_t lean_uint64_to_usize(uint64_t);
  lean_object* l_Lean_Expr_FindImpl_findUnsafe_x3f(lean_object*, lean_object*);
  uint8_t l_Lean_Environment_hasUnsafe(lean_object*, lean_object*);
  static lean_object* l_Lean_Meta_Closure_collectExprAux___closed__2;
  static lean_object* l_Lean_Meta_Closure_collectLevelAux___closed__8;
  static lean_object* l_Lean_Meta_Closure_collectLevelAux___closed__4;
  lean_object* lean_expr_lower_loose_bvars(lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_visitExpr(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__8(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  static lean_object* l_Lean_Meta_Closure_mkNextUserName___rarg___closed__2;
  LEAN_EXPORT lean_object* l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_pushFVarArg(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_visitLevel(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* lean_array_fget(lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___lambda__1___boxed(lean_object*, lean_object*);
  uint8_t lean_nat_dec_eq(lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_addDecl___at_Lean_Meta_mkAuxDefinition___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_mkNewLevelParam___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_mkNewLevelParam(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_mkLambda(lean_object*, lean_object*);
  lean_object* lean_st_ref_take(lean_object*, lean_object*);
  uint8_t l_Lean_Expr_hasLevelParam(lean_object*);
  lean_object* l_Lean_Meta_getZetaFVarIds___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_pickNextToProcess_x3f(uint8_t);
  lean_object* lean_nat_sub(lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_List_mapM___at_Lean_Meta_Closure_collectExprAux___spec__3(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  static lean_object* l_Lean_Meta_mkAuxDefinition___lambda__3___closed__3;
  lean_object* l_Lean_KernelException_toMessageData(lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Meta_Closure_mkBinding___spec__1___boxed(lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Expr_headBeta(lean_object*);
  LEAN_EXPORT lean_object* l_Lean_mkFreshId___at_Lean_Meta_Closure_collectExprAux___spec__2___rarg___boxed(lean_object*, lean_object*);
  lean_object* l_panic___at_Lean_Level_normalize___spec__1(lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_State_newLocalDeclsForMVars___default;
  LEAN_EXPORT lean_object* l_Lean_compileDecl___at_Lean_Meta_mkAuxDefinition___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* lean_level_update_max(lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_process(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_addTrace___at_Lean_Meta_processPostponed_loop___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  static lean_object* l_Lean_Meta_Closure_collectExprAux___closed__6;
  lean_object* lean_array_get(lean_object*, lean_object*, lean_object*);
  static lean_object* l_Lean_Meta_Closure_State_levelParams___default___closed__1;
  lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Declaration_foldExprM___at_Lean_Meta_mkAuxDefinition___spec__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Std_mkHashMapImp___rarg(lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_pickNextToProcess_x3f___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* lean_name_append_index_after(lean_object*, lean_object*);
  lean_object* l_panic___at_Lean_Expr_getRevArg_x21___spec__1(lean_object*);
  uint8_t l_Lean_Name_quickCmp(lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_State_visitedLevel___default;
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_collectExprAux___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_process___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* lean_st_mk_ref(lean_object*, lean_object*);
  static lean_object* l_Lean_Meta_Closure_collectExprAux___closed__1;
  lean_object* lean_expr_abstract_range(lean_object*, lean_object*, lean_object*);
  uint8_t l_Array_contains___at_Lean_registerInternalExceptionId___spec__1(lean_object*, lean_object*);
  static lean_object* l_Lean_Meta_Closure_collectExprAux___closed__17;
  lean_object* l_Array_back___rarg(lean_object*, lean_object*);
  static lean_object* l_Lean_Meta_Closure_collectExprAux___closed__8;
  lean_object* lean_array_to_list(lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_preprocess___lambda__1(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  static lean_object* l_Lean_Meta_Closure_collectLevelAux___closed__5;
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_collectExpr(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Std_HashMap_insert___at_Lean_Meta_Closure_visitLevel___spec__3(lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_mkNextUserName(uint8_t);
  static lean_object* l_Lean_Meta_mkAuxDefinition___lambda__3___closed__4;
  size_t lean_usize_modn(size_t, lean_object*);
  lean_object* l_Lean_getMaxHeight(lean_object*, lean_object*);
  lean_object* l___private_Init_Util_0__mkPanicMessageWithDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Array_reverse___rarg(lean_object*);
  uint8_t l_Array_isEmpty___rarg(lean_object*);
  extern lean_object* l_Lean_instInhabitedLocalDecl;
  lean_object* l_Lean_LocalDecl_toExpr(lean_object*);
  static lean_object* l_Lean_Meta_mkAuxDefinition___lambda__3___closed__6;
  lean_object* l_Lean_mkLambda(lean_object*, uint8_t, lean_object*, lean_object*);
  static lean_object* l_Lean_Meta_Closure_collectExprAux___closed__11;
  lean_object* l_Std_HashMap_insert___at_Lean_MetavarContext_instantiateExprMVars___spec__3(lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_mkValueTypeClosure(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_State_exprMVarArgs___default;
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_mkBinding___boxed(lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_preprocess___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Meta_resetZetaFVarIds___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_List_mapM___at_Lean_Meta_Closure_collectExprAux___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* lean_expr_update_let(lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_preprocess___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_mkFVar(lean_object*);
  uint8_t l_Lean_Expr_Data_binderInfo(uint64_t);
  size_t lean_usize_of_nat(lean_object*);
  lean_object* l_Lean_replaceFVarIdAtLocalDecl(lean_object*, lean_object*, lean_object*);
  static lean_object* l_Lean_Meta_Closure_mkNewLevelParam___closed__2;
  lean_object* l_Lean_setEnv___at_Lean_Meta_setInlineAttribute___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_visitExpr___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_pushLocalDecl(lean_object*, lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* lean_expr_update_proj(lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_preprocess(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_mkNextUserName___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Nat_foldRev_loop___at_Lean_Meta_Closure_mkLambda___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
  static lean_object* l_Lean_Meta_Closure_collectExprAux___closed__13;
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_State_levelParams___default;
  LEAN_EXPORT lean_object* l_Lean_Meta_mkAuxDefinition___lambda__2(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  static lean_object* l_Lean_Meta_Closure_collectLevelAux___closed__7;
  static lean_object* l_Lean_Meta_Closure_collectLevelAux___closed__10;
  lean_object* l_Lean_LocalDecl_value_x3f(lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_pushLocalDecl___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_mkAuxDefinition___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  static lean_object* l_Lean_Meta_Closure_collectLevelAux___closed__1;
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_collectLevelAux___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  static lean_object* l_Lean_Meta_Closure_collectLevelAux___closed__3;
  static lean_object* l_Lean_Meta_Closure_collectExprAux___closed__9;
  LEAN_EXPORT lean_object* l_Std_AssocList_foldlM___at_Lean_Meta_Closure_visitLevel___spec__7(lean_object*, lean_object*);
  lean_object* lean_level_update_imax(lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_LocalDecl_index(lean_object*);
  LEAN_EXPORT lean_object* l_Lean_mkFreshId___at_Lean_Meta_Closure_collectExprAux___spec__2(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_mkValueTypeClosureAux(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_State_toProcess___default;
  lean_object* l_Lean_Meta_getLocalDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_State_visitedExpr___default;
  lean_object* lean_expr_update_sort(lean_object*, lean_object*);
  static lean_object* l_Lean_Meta_mkAuxDefinition___lambda__3___closed__2;
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_collectLevelAux(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  uint8_t lean_nat_dec_le(lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Std_AssocList_find_x3f___at_Lean_Meta_Closure_visitLevel___spec__2___boxed(lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__7___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  uint8_t l_Lean_Expr_hasMVar(lean_object*);
  static lean_object* l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__4;
  LEAN_EXPORT lean_object* l_Lean_Meta_mkAuxDefinition___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  static lean_object* l_Lean_Meta_mkAuxDefinition___lambda__3___closed__1;
  LEAN_EXPORT lean_object* l_Std_HashMapImp_expand___at_Lean_Meta_Closure_visitLevel___spec__5(lean_object*, lean_object*);
  static lean_object* l_Lean_Meta_Closure_mkNextUserName___rarg___closed__1;
  LEAN_EXPORT lean_object* l_Nat_foldRev_loop___at_Lean_Meta_Closure_mkForall___spec__1(lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_collectExprAux(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  uint8_t lean_is_aux_recursor(lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_mkForall(lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Std_HashMapImp_find_x3f___at_Lean_Meta_Closure_visitLevel___spec__1(lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_mkValueTypeClosureAux___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_mkAuxDefinition___lambda__3(lean_object*, lean_object*, uint8_t, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* lean_nat_mul(lean_object*, lean_object*);
  static lean_object* l_Lean_Meta_Closure_instInhabitedToProcessElement___closed__1;
  LEAN_EXPORT lean_object* l_Nat_foldRev_loop___at_Lean_Meta_Closure_mkLambda___spec__1(lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* lean_st_ref_set(lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_mkNextUserName___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Nat_foldRev_loop___at_Lean_Meta_Closure_mkBinding___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_mkForall(lean_object*, uint8_t, lean_object*, lean_object*);
  static lean_object* l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__3;
  lean_object* lean_expr_update_lambda(lean_object*, uint8_t, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_mkAuxDefinition___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* lean_name_mk_numeral(lean_object*, lean_object*);
  lean_object* lean_level_update_succ(lean_object*, lean_object*);
  lean_object* lean_infer_type(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__7(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_mkLet(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t);
  LEAN_EXPORT lean_object* l_Std_mkHashMap___at_Lean_Meta_Closure_State_visitedLevel___default___spec__1(lean_object*);
  LEAN_EXPORT lean_object* l_Lean_mkFreshId___at_Lean_Meta_Closure_collectExprAux___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Meta_getMVarDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Meta_instantiateMVars(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* lean_array_pop(lean_object*);
  lean_object* lean_mk_array(lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_throwKernelException___at_Lean_Meta_mkAuxDefinition___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* lean_expr_abstract(lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_pickNextToProcessAux(lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_pickNextToProcess_x3f___boxed(lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_mkAuxDefinition___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  static lean_object* l_Lean_Meta_mkAuxDefinition___closed__1;
  LEAN_EXPORT lean_object* l_Lean_Meta_mkAuxDefinition___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_instInhabitedToProcessElement;
  static lean_object* l_Lean_Meta_Closure_collectExprAux___closed__19;
  static lean_object* l_Lean_Meta_Closure_collectLevelAux___closed__6;
  static lean_object* l_Lean_Meta_Closure_collectExprAux___closed__4;
  LEAN_EXPORT lean_object* l_Nat_foldRev_loop___at_Lean_Meta_Closure_mkForall___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* lean_compile_decl(lean_object*, lean_object*, lean_object*);
  static lean_object* l_Lean_Meta_Closure_collectExprAux___closed__12;
  static lean_object* l_Lean_Meta_mkAuxDefinition___lambda__3___closed__5;
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_collectExpr___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Std_HashMapImp_find_x3f___at_Lean_MetavarContext_instantiateExprMVars___spec__1(lean_object*, lean_object*);
  static lean_object* l_Lean_Meta_Closure_State_visitedExpr___default___closed__1;
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_collectLevel(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_mkLevelParam(lean_object*);
  lean_object* lean_expr_update_app(lean_object*, lean_object*, lean_object*);
  uint8_t lean_level_eq(lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_State_newLetDecls___default;
  uint8_t l_Lean_Expr_hasFVar(lean_object*);
  LEAN_EXPORT lean_object* l_Std_RBNode_findCore___at_Lean_Meta_Closure_process___spec__1___boxed(lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_mkFreshId___at_Lean_Meta_Closure_collectExprAux___spec__2___rarg(lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Meta_Closure_mkBinding___spec__1(size_t, size_t, lean_object*);
  lean_object* l_Lean_mkConst(lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_addDecl___at_Lean_Meta_mkAuxDefinition___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  static lean_object* l_Lean_Meta_mkAuxDefinition___closed__4;
  LEAN_EXPORT lean_object* l_Lean_Declaration_foldExprM___at_Lean_Meta_mkAuxDefinition___spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_mkNextUserName___boxed(lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_collectLevel___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  static lean_object* l_Lean_Meta_Closure_collectExprAux___closed__10;
  extern lean_object* l___private_Lean_MonadEnv_0__Lean_supportedRecursors;
  lean_object* lean_expr_update_const(lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_pushToProcess(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Std_AssocList_replace___at_Lean_Meta_Closure_visitLevel___spec__8(lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_mkValueTypeClosure___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Meta_Closure_process___spec__2(lean_object*, lean_object*, size_t, size_t, lean_object*);
  static lean_object* l_Lean_Meta_Closure_mkValueTypeClosure___closed__1;
  lean_object* l_Lean_Meta_check(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_pushToProcess___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Meta_Basic_0__Lean_Meta_processPostponedStep___spec__13(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  uint8_t lean_nat_dec_lt(lean_object*, lean_object*);
  static lean_object* l_Lean_Meta_mkAuxDefinition___closed__2;
  lean_object* lean_add_decl(lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_visitLevel___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  static lean_object* _init_l_Lean_Meta_Closure_instInhabitedToProcessElement___closed__1() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; 
  x_1 = lean_box(0);
  x_2 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_2, 0, x_1);
  lean_ctor_set(x_2, 1, x_1);
  return x_2;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_instInhabitedToProcessElement() {
  _start:
  {
  lean_object* x_1; 
  x_1 = l_Lean_Meta_Closure_instInhabitedToProcessElement___closed__1;
  return x_1;
  }
  }
  LEAN_EXPORT lean_object* l_Std_mkHashMap___at_Lean_Meta_Closure_State_visitedLevel___default___spec__1(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = l_Std_mkHashMapImp___rarg(x_1);
  return x_2;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_State_visitedLevel___default() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; 
  x_1 = lean_unsigned_to_nat(0u);
  x_2 = l_Std_mkHashMapImp___rarg(x_1);
  return x_2;
  }
  }
  LEAN_EXPORT lean_object* l_Std_mkHashMap___at_Lean_Meta_Closure_State_visitedLevel___default___spec__1___boxed(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = l_Std_mkHashMap___at_Lean_Meta_Closure_State_visitedLevel___default___spec__1(x_1);
  lean_dec(x_1);
  return x_2;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_State_visitedExpr___default___closed__1() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; 
  x_1 = lean_unsigned_to_nat(0u);
  x_2 = l_Std_mkHashMapImp___rarg(x_1);
  return x_2;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_State_visitedExpr___default() {
  _start:
  {
  lean_object* x_1; 
  x_1 = l_Lean_Meta_Closure_State_visitedExpr___default___closed__1;
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_State_levelParams___default___closed__1() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; 
  x_1 = lean_unsigned_to_nat(0u);
  x_2 = lean_mk_empty_array_with_capacity(x_1);
  return x_2;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_State_levelParams___default() {
  _start:
  {
  lean_object* x_1; 
  x_1 = l_Lean_Meta_Closure_State_levelParams___default___closed__1;
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_State_nextLevelIdx___default() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_unsigned_to_nat(1u);
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_State_levelArgs___default() {
  _start:
  {
  lean_object* x_1; 
  x_1 = l_Lean_Meta_Closure_State_levelParams___default___closed__1;
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_State_newLocalDecls___default() {
  _start:
  {
  lean_object* x_1; 
  x_1 = l_Lean_Meta_Closure_State_levelParams___default___closed__1;
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_State_newLocalDeclsForMVars___default() {
  _start:
  {
  lean_object* x_1; 
  x_1 = l_Lean_Meta_Closure_State_levelParams___default___closed__1;
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_State_newLetDecls___default() {
  _start:
  {
  lean_object* x_1; 
  x_1 = l_Lean_Meta_Closure_State_levelParams___default___closed__1;
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_State_nextExprIdx___default() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_unsigned_to_nat(1u);
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_State_exprMVarArgs___default() {
  _start:
  {
  lean_object* x_1; 
  x_1 = l_Lean_Meta_Closure_State_levelParams___default___closed__1;
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_State_exprFVarArgs___default() {
  _start:
  {
  lean_object* x_1; 
  x_1 = l_Lean_Meta_Closure_State_levelParams___default___closed__1;
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_State_toProcess___default() {
  _start:
  {
  lean_object* x_1; 
  x_1 = l_Lean_Meta_Closure_State_levelParams___default___closed__1;
  return x_1;
  }
  }
  LEAN_EXPORT lean_object* l_Std_AssocList_find_x3f___at_Lean_Meta_Closure_visitLevel___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_level_eq(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_EXPORT lean_object* l_Std_HashMapImp_find_x3f___at_Lean_Meta_Closure_visitLevel___spec__1(lean_object* x_1, lean_object* x_2) {
  _start:
  {
  lean_object* x_3; lean_object* x_4; uint64_t x_5; size_t x_6; size_t x_7; lean_object* x_8; lean_object* x_9; 
  x_3 = lean_ctor_get(x_1, 1);
  lean_inc(x_3);
  lean_dec(x_1);
  x_4 = lean_array_get_size(x_3);
  x_5 = l_Lean_Level_hash(x_2);
  x_6 = lean_uint64_to_usize(x_5);
  x_7 = lean_usize_modn(x_6, x_4);
  lean_dec(x_4);
  x_8 = lean_array_uget(x_3, x_7);
  lean_dec(x_3);
  x_9 = l_Std_AssocList_find_x3f___at_Lean_Meta_Closure_visitLevel___spec__2(x_2, x_8);
  lean_dec(x_8);
  lean_dec(x_2);
  return x_9;
  }
  }
  LEAN_EXPORT uint8_t l_Std_AssocList_contains___at_Lean_Meta_Closure_visitLevel___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_level_eq(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_EXPORT lean_object* l_Std_AssocList_foldlM___at_Lean_Meta_Closure_visitLevel___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; uint64_t x_7; size_t x_8; size_t x_9; lean_object* x_10; lean_object* x_11; 
  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 = l_Lean_Level_hash(x_4);
  x_8 = lean_uint64_to_usize(x_7);
  x_9 = lean_usize_modn(x_8, x_6);
  lean_dec(x_6);
  x_10 = lean_array_uget(x_1, x_9);
  lean_ctor_set(x_2, 2, x_10);
  x_11 = lean_array_uset(x_1, x_9, x_2);
  x_1 = x_11;
  x_2 = x_5;
  goto _start;
  }
  else
  {
  lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; uint64_t x_17; size_t x_18; size_t x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; 
  x_13 = lean_ctor_get(x_2, 0);
  x_14 = lean_ctor_get(x_2, 1);
  x_15 = lean_ctor_get(x_2, 2);
  lean_inc(x_15);
  lean_inc(x_14);
  lean_inc(x_13);
  lean_dec(x_2);
  x_16 = lean_array_get_size(x_1);
  x_17 = l_Lean_Level_hash(x_13);
  x_18 = lean_uint64_to_usize(x_17);
  x_19 = lean_usize_modn(x_18, x_16);
  lean_dec(x_16);
  x_20 = lean_array_uget(x_1, x_19);
  x_21 = lean_alloc_ctor(1, 3, 0);
  lean_ctor_set(x_21, 0, x_13);
  lean_ctor_set(x_21, 1, x_14);
  lean_ctor_set(x_21, 2, x_20);
  x_22 = lean_array_uset(x_1, x_19, x_21);
  x_1 = x_22;
  x_2 = x_15;
  goto _start;
  }
  }
  }
  }
  LEAN_EXPORT lean_object* l_Std_HashMapImp_moveEntries___at_Lean_Meta_Closure_visitLevel___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_Std_AssocList_foldlM___at_Lean_Meta_Closure_visitLevel___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_EXPORT lean_object* l_Std_HashMapImp_expand___at_Lean_Meta_Closure_visitLevel___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_Std_HashMapImp_moveEntries___at_Lean_Meta_Closure_visitLevel___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_EXPORT lean_object* l_Std_AssocList_replace___at_Lean_Meta_Closure_visitLevel___spec__8(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
  _start:
  {
  if (lean_obj_tag(x_3) == 0)
  {
  lean_object* x_4; 
  lean_dec(x_2);
  lean_dec(x_1);
  x_4 = lean_box(0);
  return x_4;
  }
  else
  {
  uint8_t x_5; 
  x_5 = !lean_is_exclusive(x_3);
  if (x_5 == 0)
  {
  lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; 
  x_6 = lean_ctor_get(x_3, 0);
  x_7 = lean_ctor_get(x_3, 1);
  x_8 = lean_ctor_get(x_3, 2);
  x_9 = lean_level_eq(x_6, x_1);
  if (x_9 == 0)
  {
  lean_object* x_10; 
  x_10 = l_Std_AssocList_replace___at_Lean_Meta_Closure_visitLevel___spec__8(x_1, x_2, x_8);
  lean_ctor_set(x_3, 2, x_10);
  return x_3;
  }
  else
  {
  lean_dec(x_7);
  lean_dec(x_6);
  lean_ctor_set(x_3, 1, x_2);
  lean_ctor_set(x_3, 0, x_1);
  return x_3;
  }
  }
  else
  {
  lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; 
  x_11 = lean_ctor_get(x_3, 0);
  x_12 = lean_ctor_get(x_3, 1);
  x_13 = lean_ctor_get(x_3, 2);
  lean_inc(x_13);
  lean_inc(x_12);
  lean_inc(x_11);
  lean_dec(x_3);
  x_14 = lean_level_eq(x_11, x_1);
  if (x_14 == 0)
  {
  lean_object* x_15; lean_object* x_16; 
  x_15 = l_Std_AssocList_replace___at_Lean_Meta_Closure_visitLevel___spec__8(x_1, x_2, x_13);
  x_16 = lean_alloc_ctor(1, 3, 0);
  lean_ctor_set(x_16, 0, x_11);
  lean_ctor_set(x_16, 1, x_12);
  lean_ctor_set(x_16, 2, x_15);
  return x_16;
  }
  else
  {
  lean_object* x_17; 
  lean_dec(x_12);
  lean_dec(x_11);
  x_17 = lean_alloc_ctor(1, 3, 0);
  lean_ctor_set(x_17, 0, x_1);
  lean_ctor_set(x_17, 1, x_2);
  lean_ctor_set(x_17, 2, x_13);
  return x_17;
  }
  }
  }
  }
  }
  LEAN_EXPORT lean_object* l_Std_HashMap_insert___at_Lean_Meta_Closure_visitLevel___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; uint64_t x_8; size_t x_9; size_t x_10; lean_object* x_11; uint8_t x_12; 
  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 = l_Lean_Level_hash(x_2);
  x_9 = lean_uint64_to_usize(x_8);
  x_10 = lean_usize_modn(x_9, x_7);
  x_11 = lean_array_uget(x_6, x_10);
  x_12 = l_Std_AssocList_contains___at_Lean_Meta_Closure_visitLevel___spec__4(x_2, x_11);
  if (x_12 == 0)
  {
  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_13 = lean_unsigned_to_nat(1u);
  x_14 = lean_nat_add(x_5, x_13);
  lean_dec(x_5);
  x_15 = lean_alloc_ctor(1, 3, 0);
  lean_ctor_set(x_15, 0, x_2);
  lean_ctor_set(x_15, 1, x_3);
  lean_ctor_set(x_15, 2, x_11);
  x_16 = lean_array_uset(x_6, x_10, x_15);
  x_17 = l___private_Std_Data_HashMap_0__Std_numBucketsForCapacity(x_14);
  x_18 = lean_nat_dec_le(x_17, x_7);
  lean_dec(x_7);
  lean_dec(x_17);
  if (x_18 == 0)
  {
  lean_object* x_19; 
  lean_free_object(x_1);
  x_19 = l_Std_HashMapImp_expand___at_Lean_Meta_Closure_visitLevel___spec__5(x_14, x_16);
  return x_19;
  }
  else
  {
  lean_ctor_set(x_1, 1, x_16);
  lean_ctor_set(x_1, 0, x_14);
  return x_1;
  }
  }
  else
  {
  lean_object* x_20; lean_object* x_21; 
  lean_dec(x_7);
  x_20 = l_Std_AssocList_replace___at_Lean_Meta_Closure_visitLevel___spec__8(x_2, x_3, x_11);
  x_21 = lean_array_uset(x_6, x_10, x_20);
  lean_ctor_set(x_1, 1, x_21);
  return x_1;
  }
  }
  else
  {
  lean_object* x_22; lean_object* x_23; lean_object* x_24; uint64_t x_25; size_t x_26; size_t x_27; lean_object* x_28; uint8_t x_29; 
  x_22 = lean_ctor_get(x_1, 0);
  x_23 = lean_ctor_get(x_1, 1);
  lean_inc(x_23);
  lean_inc(x_22);
  lean_dec(x_1);
  x_24 = lean_array_get_size(x_23);
  x_25 = l_Lean_Level_hash(x_2);
  x_26 = lean_uint64_to_usize(x_25);
  x_27 = lean_usize_modn(x_26, x_24);
  x_28 = lean_array_uget(x_23, x_27);
  x_29 = l_Std_AssocList_contains___at_Lean_Meta_Closure_visitLevel___spec__4(x_2, x_28);
  if (x_29 == 0)
  {
  lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; uint8_t x_35; 
  x_30 = lean_unsigned_to_nat(1u);
  x_31 = lean_nat_add(x_22, x_30);
  lean_dec(x_22);
  x_32 = lean_alloc_ctor(1, 3, 0);
  lean_ctor_set(x_32, 0, x_2);
  lean_ctor_set(x_32, 1, x_3);
  lean_ctor_set(x_32, 2, x_28);
  x_33 = lean_array_uset(x_23, x_27, x_32);
  x_34 = l___private_Std_Data_HashMap_0__Std_numBucketsForCapacity(x_31);
  x_35 = lean_nat_dec_le(x_34, x_24);
  lean_dec(x_24);
  lean_dec(x_34);
  if (x_35 == 0)
  {
  lean_object* x_36; 
  x_36 = l_Std_HashMapImp_expand___at_Lean_Meta_Closure_visitLevel___spec__5(x_31, x_33);
  return x_36;
  }
  else
  {
  lean_object* x_37; 
  x_37 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_37, 0, x_31);
  lean_ctor_set(x_37, 1, x_33);
  return x_37;
  }
  }
  else
  {
  lean_object* x_38; lean_object* x_39; lean_object* x_40; 
  lean_dec(x_24);
  x_38 = l_Std_AssocList_replace___at_Lean_Meta_Closure_visitLevel___spec__8(x_2, x_3, x_28);
  x_39 = lean_array_uset(x_23, x_27, x_38);
  x_40 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_40, 0, x_22);
  lean_ctor_set(x_40, 1, x_39);
  return x_40;
  }
  }
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_visitLevel(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* x_7, lean_object* x_8, lean_object* x_9) {
  _start:
  {
  lean_object* x_10; uint8_t x_98; 
  x_98 = l_Lean_Level_hasMVar(x_2);
  if (x_98 == 0)
  {
  uint8_t x_99; 
  x_99 = l_Lean_Level_hasParam(x_2);
  if (x_99 == 0)
  {
  lean_object* x_100; 
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_1);
  x_100 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_100, 0, x_2);
  lean_ctor_set(x_100, 1, x_9);
  return x_100;
  }
  else
  {
  lean_object* x_101; 
  x_101 = lean_box(0);
  x_10 = x_101;
  goto block_97;
  }
  }
  else
  {
  lean_object* x_102; 
  x_102 = lean_box(0);
  x_10 = x_102;
  goto block_97;
  }
  block_97:
  {
  lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; 
  lean_dec(x_10);
  x_11 = lean_st_ref_get(x_8, x_9);
  x_12 = lean_ctor_get(x_11, 1);
  lean_inc(x_12);
  lean_dec(x_11);
  x_13 = lean_st_ref_get(x_4, x_12);
  x_14 = !lean_is_exclusive(x_13);
  if (x_14 == 0)
  {
  lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; 
  x_15 = lean_ctor_get(x_13, 0);
  x_16 = lean_ctor_get(x_13, 1);
  x_17 = lean_ctor_get(x_15, 0);
  lean_inc(x_17);
  lean_dec(x_15);
  lean_inc(x_2);
  x_18 = l_Std_HashMapImp_find_x3f___at_Lean_Meta_Closure_visitLevel___spec__1(x_17, x_2);
  if (lean_obj_tag(x_18) == 0)
  {
  lean_object* x_19; lean_object* x_20; 
  lean_free_object(x_13);
  x_19 = lean_box(x_3);
  lean_inc(x_8);
  lean_inc(x_4);
  lean_inc(x_2);
  x_20 = lean_apply_8(x_1, x_2, x_19, x_4, x_5, x_6, x_7, x_8, x_16);
  if (lean_obj_tag(x_20) == 0)
  {
  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; uint8_t x_28; 
  x_21 = lean_ctor_get(x_20, 0);
  lean_inc(x_21);
  x_22 = lean_ctor_get(x_20, 1);
  lean_inc(x_22);
  lean_dec(x_20);
  x_23 = lean_st_ref_get(x_8, x_22);
  lean_dec(x_8);
  x_24 = lean_ctor_get(x_23, 1);
  lean_inc(x_24);
  lean_dec(x_23);
  x_25 = lean_st_ref_take(x_4, x_24);
  x_26 = lean_ctor_get(x_25, 0);
  lean_inc(x_26);
  x_27 = lean_ctor_get(x_25, 1);
  lean_inc(x_27);
  lean_dec(x_25);
  x_28 = !lean_is_exclusive(x_26);
  if (x_28 == 0)
  {
  lean_object* x_29; lean_object* x_30; lean_object* x_31; uint8_t x_32; 
  x_29 = lean_ctor_get(x_26, 0);
  lean_inc(x_21);
  x_30 = l_Std_HashMap_insert___at_Lean_Meta_Closure_visitLevel___spec__3(x_29, x_2, x_21);
  lean_ctor_set(x_26, 0, x_30);
  x_31 = lean_st_ref_set(x_4, x_26, x_27);
  lean_dec(x_4);
  x_32 = !lean_is_exclusive(x_31);
  if (x_32 == 0)
  {
  lean_object* x_33; 
  x_33 = lean_ctor_get(x_31, 0);
  lean_dec(x_33);
  lean_ctor_set(x_31, 0, x_21);
  return x_31;
  }
  else
  {
  lean_object* x_34; lean_object* x_35; 
  x_34 = lean_ctor_get(x_31, 1);
  lean_inc(x_34);
  lean_dec(x_31);
  x_35 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_35, 0, x_21);
  lean_ctor_set(x_35, 1, x_34);
  return x_35;
  }
  }
  else
  {
  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; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; 
  x_36 = lean_ctor_get(x_26, 0);
  x_37 = lean_ctor_get(x_26, 1);
  x_38 = lean_ctor_get(x_26, 2);
  x_39 = lean_ctor_get(x_26, 3);
  x_40 = lean_ctor_get(x_26, 4);
  x_41 = lean_ctor_get(x_26, 5);
  x_42 = lean_ctor_get(x_26, 6);
  x_43 = lean_ctor_get(x_26, 7);
  x_44 = lean_ctor_get(x_26, 8);
  x_45 = lean_ctor_get(x_26, 9);
  x_46 = lean_ctor_get(x_26, 10);
  x_47 = lean_ctor_get(x_26, 11);
  lean_inc(x_47);
  lean_inc(x_46);
  lean_inc(x_45);
  lean_inc(x_44);
  lean_inc(x_43);
  lean_inc(x_42);
  lean_inc(x_41);
  lean_inc(x_40);
  lean_inc(x_39);
  lean_inc(x_38);
  lean_inc(x_37);
  lean_inc(x_36);
  lean_dec(x_26);
  lean_inc(x_21);
  x_48 = l_Std_HashMap_insert___at_Lean_Meta_Closure_visitLevel___spec__3(x_36, x_2, x_21);
  x_49 = lean_alloc_ctor(0, 12, 0);
  lean_ctor_set(x_49, 0, x_48);
  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_42);
  lean_ctor_set(x_49, 7, x_43);
  lean_ctor_set(x_49, 8, x_44);
  lean_ctor_set(x_49, 9, x_45);
  lean_ctor_set(x_49, 10, x_46);
  lean_ctor_set(x_49, 11, x_47);
  x_50 = lean_st_ref_set(x_4, x_49, x_27);
  lean_dec(x_4);
  x_51 = lean_ctor_get(x_50, 1);
  lean_inc(x_51);
  if (lean_is_exclusive(x_50)) {
   lean_ctor_release(x_50, 0);
   lean_ctor_release(x_50, 1);
   x_52 = x_50;
  } else {
   lean_dec_ref(x_50);
   x_52 = lean_box(0);
  }
  if (lean_is_scalar(x_52)) {
   x_53 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_53 = x_52;
  }
  lean_ctor_set(x_53, 0, x_21);
  lean_ctor_set(x_53, 1, x_51);
  return x_53;
  }
  }
  else
  {
  uint8_t x_54; 
  lean_dec(x_8);
  lean_dec(x_4);
  lean_dec(x_2);
  x_54 = !lean_is_exclusive(x_20);
  if (x_54 == 0)
  {
  return x_20;
  }
  else
  {
  lean_object* x_55; lean_object* x_56; lean_object* x_57; 
  x_55 = lean_ctor_get(x_20, 0);
  x_56 = lean_ctor_get(x_20, 1);
  lean_inc(x_56);
  lean_inc(x_55);
  lean_dec(x_20);
  x_57 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_57, 0, x_55);
  lean_ctor_set(x_57, 1, x_56);
  return x_57;
  }
  }
  }
  else
  {
  lean_object* x_58; 
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_2);
  lean_dec(x_1);
  x_58 = lean_ctor_get(x_18, 0);
  lean_inc(x_58);
  lean_dec(x_18);
  lean_ctor_set(x_13, 0, x_58);
  return x_13;
  }
  }
  else
  {
  lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; 
  x_59 = lean_ctor_get(x_13, 0);
  x_60 = lean_ctor_get(x_13, 1);
  lean_inc(x_60);
  lean_inc(x_59);
  lean_dec(x_13);
  x_61 = lean_ctor_get(x_59, 0);
  lean_inc(x_61);
  lean_dec(x_59);
  lean_inc(x_2);
  x_62 = l_Std_HashMapImp_find_x3f___at_Lean_Meta_Closure_visitLevel___spec__1(x_61, x_2);
  if (lean_obj_tag(x_62) == 0)
  {
  lean_object* x_63; lean_object* x_64; 
  x_63 = lean_box(x_3);
  lean_inc(x_8);
  lean_inc(x_4);
  lean_inc(x_2);
  x_64 = lean_apply_8(x_1, x_2, x_63, x_4, x_5, x_6, x_7, x_8, x_60);
  if (lean_obj_tag(x_64) == 0)
  {
  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; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; 
  x_65 = lean_ctor_get(x_64, 0);
  lean_inc(x_65);
  x_66 = lean_ctor_get(x_64, 1);
  lean_inc(x_66);
  lean_dec(x_64);
  x_67 = lean_st_ref_get(x_8, x_66);
  lean_dec(x_8);
  x_68 = lean_ctor_get(x_67, 1);
  lean_inc(x_68);
  lean_dec(x_67);
  x_69 = lean_st_ref_take(x_4, x_68);
  x_70 = lean_ctor_get(x_69, 0);
  lean_inc(x_70);
  x_71 = lean_ctor_get(x_69, 1);
  lean_inc(x_71);
  lean_dec(x_69);
  x_72 = lean_ctor_get(x_70, 0);
  lean_inc(x_72);
  x_73 = lean_ctor_get(x_70, 1);
  lean_inc(x_73);
  x_74 = lean_ctor_get(x_70, 2);
  lean_inc(x_74);
  x_75 = lean_ctor_get(x_70, 3);
  lean_inc(x_75);
  x_76 = lean_ctor_get(x_70, 4);
  lean_inc(x_76);
  x_77 = lean_ctor_get(x_70, 5);
  lean_inc(x_77);
  x_78 = lean_ctor_get(x_70, 6);
  lean_inc(x_78);
  x_79 = lean_ctor_get(x_70, 7);
  lean_inc(x_79);
  x_80 = lean_ctor_get(x_70, 8);
  lean_inc(x_80);
  x_81 = lean_ctor_get(x_70, 9);
  lean_inc(x_81);
  x_82 = lean_ctor_get(x_70, 10);
  lean_inc(x_82);
  x_83 = lean_ctor_get(x_70, 11);
  lean_inc(x_83);
  if (lean_is_exclusive(x_70)) {
   lean_ctor_release(x_70, 0);
   lean_ctor_release(x_70, 1);
   lean_ctor_release(x_70, 2);
   lean_ctor_release(x_70, 3);
   lean_ctor_release(x_70, 4);
   lean_ctor_release(x_70, 5);
   lean_ctor_release(x_70, 6);
   lean_ctor_release(x_70, 7);
   lean_ctor_release(x_70, 8);
   lean_ctor_release(x_70, 9);
   lean_ctor_release(x_70, 10);
   lean_ctor_release(x_70, 11);
   x_84 = x_70;
  } else {
   lean_dec_ref(x_70);
   x_84 = lean_box(0);
  }
  lean_inc(x_65);
  x_85 = l_Std_HashMap_insert___at_Lean_Meta_Closure_visitLevel___spec__3(x_72, x_2, x_65);
  if (lean_is_scalar(x_84)) {
   x_86 = lean_alloc_ctor(0, 12, 0);
  } else {
   x_86 = x_84;
  }
  lean_ctor_set(x_86, 0, x_85);
  lean_ctor_set(x_86, 1, x_73);
  lean_ctor_set(x_86, 2, x_74);
  lean_ctor_set(x_86, 3, x_75);
  lean_ctor_set(x_86, 4, x_76);
  lean_ctor_set(x_86, 5, x_77);
  lean_ctor_set(x_86, 6, x_78);
  lean_ctor_set(x_86, 7, x_79);
  lean_ctor_set(x_86, 8, x_80);
  lean_ctor_set(x_86, 9, x_81);
  lean_ctor_set(x_86, 10, x_82);
  lean_ctor_set(x_86, 11, x_83);
  x_87 = lean_st_ref_set(x_4, x_86, x_71);
  lean_dec(x_4);
  x_88 = lean_ctor_get(x_87, 1);
  lean_inc(x_88);
  if (lean_is_exclusive(x_87)) {
   lean_ctor_release(x_87, 0);
   lean_ctor_release(x_87, 1);
   x_89 = x_87;
  } else {
   lean_dec_ref(x_87);
   x_89 = lean_box(0);
  }
  if (lean_is_scalar(x_89)) {
   x_90 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_90 = x_89;
  }
  lean_ctor_set(x_90, 0, x_65);
  lean_ctor_set(x_90, 1, x_88);
  return x_90;
  }
  else
  {
  lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; 
  lean_dec(x_8);
  lean_dec(x_4);
  lean_dec(x_2);
  x_91 = lean_ctor_get(x_64, 0);
  lean_inc(x_91);
  x_92 = lean_ctor_get(x_64, 1);
  lean_inc(x_92);
  if (lean_is_exclusive(x_64)) {
   lean_ctor_release(x_64, 0);
   lean_ctor_release(x_64, 1);
   x_93 = x_64;
  } else {
   lean_dec_ref(x_64);
   x_93 = lean_box(0);
  }
  if (lean_is_scalar(x_93)) {
   x_94 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_94 = x_93;
  }
  lean_ctor_set(x_94, 0, x_91);
  lean_ctor_set(x_94, 1, x_92);
  return x_94;
  }
  }
  else
  {
  lean_object* x_95; lean_object* x_96; 
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_2);
  lean_dec(x_1);
  x_95 = lean_ctor_get(x_62, 0);
  lean_inc(x_95);
  lean_dec(x_62);
  x_96 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_96, 0, x_95);
  lean_ctor_set(x_96, 1, x_60);
  return x_96;
  }
  }
  }
  }
  }
  LEAN_EXPORT lean_object* l_Std_AssocList_find_x3f___at_Lean_Meta_Closure_visitLevel___spec__2___boxed(lean_object* x_1, lean_object* x_2) {
  _start:
  {
  lean_object* x_3; 
  x_3 = l_Std_AssocList_find_x3f___at_Lean_Meta_Closure_visitLevel___spec__2(x_1, x_2);
  lean_dec(x_2);
  lean_dec(x_1);
  return x_3;
  }
  }
  LEAN_EXPORT lean_object* l_Std_AssocList_contains___at_Lean_Meta_Closure_visitLevel___spec__4___boxed(lean_object* x_1, lean_object* x_2) {
  _start:
  {
  uint8_t x_3; lean_object* x_4; 
  x_3 = l_Std_AssocList_contains___at_Lean_Meta_Closure_visitLevel___spec__4(x_1, x_2);
  lean_dec(x_2);
  lean_dec(x_1);
  x_4 = lean_box(x_3);
  return x_4;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_visitLevel___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) {
  _start:
  {
  uint8_t x_10; lean_object* x_11; 
  x_10 = lean_unbox(x_3);
  lean_dec(x_3);
  x_11 = l_Lean_Meta_Closure_visitLevel(x_1, x_2, x_10, x_4, x_5, x_6, x_7, x_8, x_9);
  return x_11;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_visitExpr(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* x_7, lean_object* x_8, lean_object* x_9) {
  _start:
  {
  lean_object* x_10; uint8_t x_98; 
  x_98 = l_Lean_Expr_hasLevelParam(x_2);
  if (x_98 == 0)
  {
  uint8_t x_99; 
  x_99 = l_Lean_Expr_hasFVar(x_2);
  if (x_99 == 0)
  {
  uint8_t x_100; 
  x_100 = l_Lean_Expr_hasMVar(x_2);
  if (x_100 == 0)
  {
  lean_object* x_101; 
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_1);
  x_101 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_101, 0, x_2);
  lean_ctor_set(x_101, 1, x_9);
  return x_101;
  }
  else
  {
  lean_object* x_102; 
  x_102 = lean_box(0);
  x_10 = x_102;
  goto block_97;
  }
  }
  else
  {
  lean_object* x_103; 
  x_103 = lean_box(0);
  x_10 = x_103;
  goto block_97;
  }
  }
  else
  {
  lean_object* x_104; 
  x_104 = lean_box(0);
  x_10 = x_104;
  goto block_97;
  }
  block_97:
  {
  lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; 
  lean_dec(x_10);
  x_11 = lean_st_ref_get(x_8, x_9);
  x_12 = lean_ctor_get(x_11, 1);
  lean_inc(x_12);
  lean_dec(x_11);
  x_13 = lean_st_ref_get(x_4, x_12);
  x_14 = !lean_is_exclusive(x_13);
  if (x_14 == 0)
  {
  lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; 
  x_15 = lean_ctor_get(x_13, 0);
  x_16 = lean_ctor_get(x_13, 1);
  x_17 = lean_ctor_get(x_15, 1);
  lean_inc(x_17);
  lean_dec(x_15);
  lean_inc(x_2);
  x_18 = l_Std_HashMapImp_find_x3f___at_Lean_MetavarContext_instantiateExprMVars___spec__1(x_17, x_2);
  if (lean_obj_tag(x_18) == 0)
  {
  lean_object* x_19; lean_object* x_20; 
  lean_free_object(x_13);
  x_19 = lean_box(x_3);
  lean_inc(x_8);
  lean_inc(x_4);
  lean_inc(x_2);
  x_20 = lean_apply_8(x_1, x_2, x_19, x_4, x_5, x_6, x_7, x_8, x_16);
  if (lean_obj_tag(x_20) == 0)
  {
  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; uint8_t x_28; 
  x_21 = lean_ctor_get(x_20, 0);
  lean_inc(x_21);
  x_22 = lean_ctor_get(x_20, 1);
  lean_inc(x_22);
  lean_dec(x_20);
  x_23 = lean_st_ref_get(x_8, x_22);
  lean_dec(x_8);
  x_24 = lean_ctor_get(x_23, 1);
  lean_inc(x_24);
  lean_dec(x_23);
  x_25 = lean_st_ref_take(x_4, x_24);
  x_26 = lean_ctor_get(x_25, 0);
  lean_inc(x_26);
  x_27 = lean_ctor_get(x_25, 1);
  lean_inc(x_27);
  lean_dec(x_25);
  x_28 = !lean_is_exclusive(x_26);
  if (x_28 == 0)
  {
  lean_object* x_29; lean_object* x_30; lean_object* x_31; uint8_t x_32; 
  x_29 = lean_ctor_get(x_26, 1);
  lean_inc(x_21);
  x_30 = l_Std_HashMap_insert___at_Lean_MetavarContext_instantiateExprMVars___spec__3(x_29, x_2, x_21);
  lean_ctor_set(x_26, 1, x_30);
  x_31 = lean_st_ref_set(x_4, x_26, x_27);
  lean_dec(x_4);
  x_32 = !lean_is_exclusive(x_31);
  if (x_32 == 0)
  {
  lean_object* x_33; 
  x_33 = lean_ctor_get(x_31, 0);
  lean_dec(x_33);
  lean_ctor_set(x_31, 0, x_21);
  return x_31;
  }
  else
  {
  lean_object* x_34; lean_object* x_35; 
  x_34 = lean_ctor_get(x_31, 1);
  lean_inc(x_34);
  lean_dec(x_31);
  x_35 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_35, 0, x_21);
  lean_ctor_set(x_35, 1, x_34);
  return x_35;
  }
  }
  else
  {
  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; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; 
  x_36 = lean_ctor_get(x_26, 0);
  x_37 = lean_ctor_get(x_26, 1);
  x_38 = lean_ctor_get(x_26, 2);
  x_39 = lean_ctor_get(x_26, 3);
  x_40 = lean_ctor_get(x_26, 4);
  x_41 = lean_ctor_get(x_26, 5);
  x_42 = lean_ctor_get(x_26, 6);
  x_43 = lean_ctor_get(x_26, 7);
  x_44 = lean_ctor_get(x_26, 8);
  x_45 = lean_ctor_get(x_26, 9);
  x_46 = lean_ctor_get(x_26, 10);
  x_47 = lean_ctor_get(x_26, 11);
  lean_inc(x_47);
  lean_inc(x_46);
  lean_inc(x_45);
  lean_inc(x_44);
  lean_inc(x_43);
  lean_inc(x_42);
  lean_inc(x_41);
  lean_inc(x_40);
  lean_inc(x_39);
  lean_inc(x_38);
  lean_inc(x_37);
  lean_inc(x_36);
  lean_dec(x_26);
  lean_inc(x_21);
  x_48 = l_Std_HashMap_insert___at_Lean_MetavarContext_instantiateExprMVars___spec__3(x_37, x_2, x_21);
  x_49 = lean_alloc_ctor(0, 12, 0);
  lean_ctor_set(x_49, 0, x_36);
  lean_ctor_set(x_49, 1, x_48);
  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_42);
  lean_ctor_set(x_49, 7, x_43);
  lean_ctor_set(x_49, 8, x_44);
  lean_ctor_set(x_49, 9, x_45);
  lean_ctor_set(x_49, 10, x_46);
  lean_ctor_set(x_49, 11, x_47);
  x_50 = lean_st_ref_set(x_4, x_49, x_27);
  lean_dec(x_4);
  x_51 = lean_ctor_get(x_50, 1);
  lean_inc(x_51);
  if (lean_is_exclusive(x_50)) {
   lean_ctor_release(x_50, 0);
   lean_ctor_release(x_50, 1);
   x_52 = x_50;
  } else {
   lean_dec_ref(x_50);
   x_52 = lean_box(0);
  }
  if (lean_is_scalar(x_52)) {
   x_53 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_53 = x_52;
  }
  lean_ctor_set(x_53, 0, x_21);
  lean_ctor_set(x_53, 1, x_51);
  return x_53;
  }
  }
  else
  {
  uint8_t x_54; 
  lean_dec(x_8);
  lean_dec(x_4);
  lean_dec(x_2);
  x_54 = !lean_is_exclusive(x_20);
  if (x_54 == 0)
  {
  return x_20;
  }
  else
  {
  lean_object* x_55; lean_object* x_56; lean_object* x_57; 
  x_55 = lean_ctor_get(x_20, 0);
  x_56 = lean_ctor_get(x_20, 1);
  lean_inc(x_56);
  lean_inc(x_55);
  lean_dec(x_20);
  x_57 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_57, 0, x_55);
  lean_ctor_set(x_57, 1, x_56);
  return x_57;
  }
  }
  }
  else
  {
  lean_object* x_58; 
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_2);
  lean_dec(x_1);
  x_58 = lean_ctor_get(x_18, 0);
  lean_inc(x_58);
  lean_dec(x_18);
  lean_ctor_set(x_13, 0, x_58);
  return x_13;
  }
  }
  else
  {
  lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; 
  x_59 = lean_ctor_get(x_13, 0);
  x_60 = lean_ctor_get(x_13, 1);
  lean_inc(x_60);
  lean_inc(x_59);
  lean_dec(x_13);
  x_61 = lean_ctor_get(x_59, 1);
  lean_inc(x_61);
  lean_dec(x_59);
  lean_inc(x_2);
  x_62 = l_Std_HashMapImp_find_x3f___at_Lean_MetavarContext_instantiateExprMVars___spec__1(x_61, x_2);
  if (lean_obj_tag(x_62) == 0)
  {
  lean_object* x_63; lean_object* x_64; 
  x_63 = lean_box(x_3);
  lean_inc(x_8);
  lean_inc(x_4);
  lean_inc(x_2);
  x_64 = lean_apply_8(x_1, x_2, x_63, x_4, x_5, x_6, x_7, x_8, x_60);
  if (lean_obj_tag(x_64) == 0)
  {
  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; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; 
  x_65 = lean_ctor_get(x_64, 0);
  lean_inc(x_65);
  x_66 = lean_ctor_get(x_64, 1);
  lean_inc(x_66);
  lean_dec(x_64);
  x_67 = lean_st_ref_get(x_8, x_66);
  lean_dec(x_8);
  x_68 = lean_ctor_get(x_67, 1);
  lean_inc(x_68);
  lean_dec(x_67);
  x_69 = lean_st_ref_take(x_4, x_68);
  x_70 = lean_ctor_get(x_69, 0);
  lean_inc(x_70);
  x_71 = lean_ctor_get(x_69, 1);
  lean_inc(x_71);
  lean_dec(x_69);
  x_72 = lean_ctor_get(x_70, 0);
  lean_inc(x_72);
  x_73 = lean_ctor_get(x_70, 1);
  lean_inc(x_73);
  x_74 = lean_ctor_get(x_70, 2);
  lean_inc(x_74);
  x_75 = lean_ctor_get(x_70, 3);
  lean_inc(x_75);
  x_76 = lean_ctor_get(x_70, 4);
  lean_inc(x_76);
  x_77 = lean_ctor_get(x_70, 5);
  lean_inc(x_77);
  x_78 = lean_ctor_get(x_70, 6);
  lean_inc(x_78);
  x_79 = lean_ctor_get(x_70, 7);
  lean_inc(x_79);
  x_80 = lean_ctor_get(x_70, 8);
  lean_inc(x_80);
  x_81 = lean_ctor_get(x_70, 9);
  lean_inc(x_81);
  x_82 = lean_ctor_get(x_70, 10);
  lean_inc(x_82);
  x_83 = lean_ctor_get(x_70, 11);
  lean_inc(x_83);
  if (lean_is_exclusive(x_70)) {
   lean_ctor_release(x_70, 0);
   lean_ctor_release(x_70, 1);
   lean_ctor_release(x_70, 2);
   lean_ctor_release(x_70, 3);
   lean_ctor_release(x_70, 4);
   lean_ctor_release(x_70, 5);
   lean_ctor_release(x_70, 6);
   lean_ctor_release(x_70, 7);
   lean_ctor_release(x_70, 8);
   lean_ctor_release(x_70, 9);
   lean_ctor_release(x_70, 10);
   lean_ctor_release(x_70, 11);
   x_84 = x_70;
  } else {
   lean_dec_ref(x_70);
   x_84 = lean_box(0);
  }
  lean_inc(x_65);
  x_85 = l_Std_HashMap_insert___at_Lean_MetavarContext_instantiateExprMVars___spec__3(x_73, x_2, x_65);
  if (lean_is_scalar(x_84)) {
   x_86 = lean_alloc_ctor(0, 12, 0);
  } else {
   x_86 = x_84;
  }
  lean_ctor_set(x_86, 0, x_72);
  lean_ctor_set(x_86, 1, x_85);
  lean_ctor_set(x_86, 2, x_74);
  lean_ctor_set(x_86, 3, x_75);
  lean_ctor_set(x_86, 4, x_76);
  lean_ctor_set(x_86, 5, x_77);
  lean_ctor_set(x_86, 6, x_78);
  lean_ctor_set(x_86, 7, x_79);
  lean_ctor_set(x_86, 8, x_80);
  lean_ctor_set(x_86, 9, x_81);
  lean_ctor_set(x_86, 10, x_82);
  lean_ctor_set(x_86, 11, x_83);
  x_87 = lean_st_ref_set(x_4, x_86, x_71);
  lean_dec(x_4);
  x_88 = lean_ctor_get(x_87, 1);
  lean_inc(x_88);
  if (lean_is_exclusive(x_87)) {
   lean_ctor_release(x_87, 0);
   lean_ctor_release(x_87, 1);
   x_89 = x_87;
  } else {
   lean_dec_ref(x_87);
   x_89 = lean_box(0);
  }
  if (lean_is_scalar(x_89)) {
   x_90 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_90 = x_89;
  }
  lean_ctor_set(x_90, 0, x_65);
  lean_ctor_set(x_90, 1, x_88);
  return x_90;
  }
  else
  {
  lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; 
  lean_dec(x_8);
  lean_dec(x_4);
  lean_dec(x_2);
  x_91 = lean_ctor_get(x_64, 0);
  lean_inc(x_91);
  x_92 = lean_ctor_get(x_64, 1);
  lean_inc(x_92);
  if (lean_is_exclusive(x_64)) {
   lean_ctor_release(x_64, 0);
   lean_ctor_release(x_64, 1);
   x_93 = x_64;
  } else {
   lean_dec_ref(x_64);
   x_93 = lean_box(0);
  }
  if (lean_is_scalar(x_93)) {
   x_94 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_94 = x_93;
  }
  lean_ctor_set(x_94, 0, x_91);
  lean_ctor_set(x_94, 1, x_92);
  return x_94;
  }
  }
  else
  {
  lean_object* x_95; lean_object* x_96; 
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_2);
  lean_dec(x_1);
  x_95 = lean_ctor_get(x_62, 0);
  lean_inc(x_95);
  lean_dec(x_62);
  x_96 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_96, 0, x_95);
  lean_ctor_set(x_96, 1, x_60);
  return x_96;
  }
  }
  }
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_visitExpr___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) {
  _start:
  {
  uint8_t x_10; lean_object* x_11; 
  x_10 = lean_unbox(x_3);
  lean_dec(x_3);
  x_11 = l_Lean_Meta_Closure_visitExpr(x_1, x_2, x_10, x_4, x_5, x_6, x_7, x_8, x_9);
  return x_11;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_mkNewLevelParam___closed__1() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("u");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_mkNewLevelParam___closed__2() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; 
  x_1 = lean_box(0);
  x_2 = l_Lean_Meta_Closure_mkNewLevelParam___closed__1;
  x_3 = lean_name_mk_string(x_1, x_2);
  return x_3;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_mkNewLevelParam(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
  _start:
  {
  lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; uint8_t x_22; 
  x_9 = lean_st_ref_get(x_7, x_8);
  x_10 = lean_ctor_get(x_9, 1);
  lean_inc(x_10);
  lean_dec(x_9);
  x_11 = lean_st_ref_get(x_3, 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);
  x_14 = lean_ctor_get(x_12, 3);
  lean_inc(x_14);
  lean_dec(x_12);
  x_15 = l_Lean_Meta_Closure_mkNewLevelParam___closed__2;
  x_16 = lean_name_append_index_after(x_15, x_14);
  x_17 = lean_st_ref_get(x_7, x_13);
  x_18 = lean_ctor_get(x_17, 1);
  lean_inc(x_18);
  lean_dec(x_17);
  x_19 = lean_st_ref_take(x_3, x_18);
  x_20 = lean_ctor_get(x_19, 0);
  lean_inc(x_20);
  x_21 = lean_ctor_get(x_19, 1);
  lean_inc(x_21);
  lean_dec(x_19);
  x_22 = !lean_is_exclusive(x_20);
  if (x_22 == 0)
  {
  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; uint8_t x_31; 
  x_23 = lean_ctor_get(x_20, 2);
  x_24 = lean_ctor_get(x_20, 3);
  x_25 = lean_ctor_get(x_20, 4);
  lean_inc(x_16);
  x_26 = lean_array_push(x_23, x_16);
  x_27 = lean_unsigned_to_nat(1u);
  x_28 = lean_nat_add(x_24, x_27);
  lean_dec(x_24);
  x_29 = lean_array_push(x_25, x_1);
  lean_ctor_set(x_20, 4, x_29);
  lean_ctor_set(x_20, 3, x_28);
  lean_ctor_set(x_20, 2, x_26);
  x_30 = lean_st_ref_set(x_3, x_20, x_21);
  x_31 = !lean_is_exclusive(x_30);
  if (x_31 == 0)
  {
  lean_object* x_32; lean_object* x_33; 
  x_32 = lean_ctor_get(x_30, 0);
  lean_dec(x_32);
  x_33 = l_Lean_mkLevelParam(x_16);
  lean_ctor_set(x_30, 0, x_33);
  return x_30;
  }
  else
  {
  lean_object* x_34; lean_object* x_35; lean_object* x_36; 
  x_34 = lean_ctor_get(x_30, 1);
  lean_inc(x_34);
  lean_dec(x_30);
  x_35 = l_Lean_mkLevelParam(x_16);
  x_36 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_36, 0, x_35);
  lean_ctor_set(x_36, 1, x_34);
  return x_36;
  }
  }
  else
  {
  lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; 
  x_37 = lean_ctor_get(x_20, 0);
  x_38 = lean_ctor_get(x_20, 1);
  x_39 = lean_ctor_get(x_20, 2);
  x_40 = lean_ctor_get(x_20, 3);
  x_41 = lean_ctor_get(x_20, 4);
  x_42 = lean_ctor_get(x_20, 5);
  x_43 = lean_ctor_get(x_20, 6);
  x_44 = lean_ctor_get(x_20, 7);
  x_45 = lean_ctor_get(x_20, 8);
  x_46 = lean_ctor_get(x_20, 9);
  x_47 = lean_ctor_get(x_20, 10);
  x_48 = lean_ctor_get(x_20, 11);
  lean_inc(x_48);
  lean_inc(x_47);
  lean_inc(x_46);
  lean_inc(x_45);
  lean_inc(x_44);
  lean_inc(x_43);
  lean_inc(x_42);
  lean_inc(x_41);
  lean_inc(x_40);
  lean_inc(x_39);
  lean_inc(x_38);
  lean_inc(x_37);
  lean_dec(x_20);
  lean_inc(x_16);
  x_49 = lean_array_push(x_39, x_16);
  x_50 = lean_unsigned_to_nat(1u);
  x_51 = lean_nat_add(x_40, x_50);
  lean_dec(x_40);
  x_52 = lean_array_push(x_41, x_1);
  x_53 = lean_alloc_ctor(0, 12, 0);
  lean_ctor_set(x_53, 0, x_37);
  lean_ctor_set(x_53, 1, x_38);
  lean_ctor_set(x_53, 2, x_49);
  lean_ctor_set(x_53, 3, x_51);
  lean_ctor_set(x_53, 4, x_52);
  lean_ctor_set(x_53, 5, x_42);
  lean_ctor_set(x_53, 6, x_43);
  lean_ctor_set(x_53, 7, x_44);
  lean_ctor_set(x_53, 8, x_45);
  lean_ctor_set(x_53, 9, x_46);
  lean_ctor_set(x_53, 10, x_47);
  lean_ctor_set(x_53, 11, x_48);
  x_54 = lean_st_ref_set(x_3, x_53, x_21);
  x_55 = lean_ctor_get(x_54, 1);
  lean_inc(x_55);
  if (lean_is_exclusive(x_54)) {
   lean_ctor_release(x_54, 0);
   lean_ctor_release(x_54, 1);
   x_56 = x_54;
  } else {
   lean_dec_ref(x_54);
   x_56 = lean_box(0);
  }
  x_57 = l_Lean_mkLevelParam(x_16);
  if (lean_is_scalar(x_56)) {
   x_58 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_58 = x_56;
  }
  lean_ctor_set(x_58, 0, x_57);
  lean_ctor_set(x_58, 1, x_55);
  return x_58;
  }
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_mkNewLevelParam___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
  _start:
  {
  uint8_t x_9; lean_object* x_10; 
  x_9 = lean_unbox(x_2);
  lean_dec(x_2);
  x_10 = l_Lean_Meta_Closure_mkNewLevelParam(x_1, x_9, x_3, x_4, x_5, x_6, x_7, x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  return x_10;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_collectLevelAux___closed__1() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("Lean.Level");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_collectLevelAux___closed__2() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("Lean.Level.updateSucc!");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_collectLevelAux___closed__3() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("succ level expected");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_collectLevelAux___closed__4() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; 
  x_1 = l_Lean_Meta_Closure_collectLevelAux___closed__1;
  x_2 = l_Lean_Meta_Closure_collectLevelAux___closed__2;
  x_3 = lean_unsigned_to_nat(519u);
  x_4 = lean_unsigned_to_nat(18u);
  x_5 = l_Lean_Meta_Closure_collectLevelAux___closed__3;
  x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5);
  return x_6;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_collectLevelAux___closed__5() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("Lean.Level.updateMax!");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_collectLevelAux___closed__6() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("max level expected");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_collectLevelAux___closed__7() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; 
  x_1 = l_Lean_Meta_Closure_collectLevelAux___closed__1;
  x_2 = l_Lean_Meta_Closure_collectLevelAux___closed__5;
  x_3 = lean_unsigned_to_nat(528u);
  x_4 = lean_unsigned_to_nat(21u);
  x_5 = l_Lean_Meta_Closure_collectLevelAux___closed__6;
  x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5);
  return x_6;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_collectLevelAux___closed__8() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("Lean.Level.updateIMax!");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_collectLevelAux___closed__9() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("imax level expected");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_collectLevelAux___closed__10() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; 
  x_1 = l_Lean_Meta_Closure_collectLevelAux___closed__1;
  x_2 = l_Lean_Meta_Closure_collectLevelAux___closed__8;
  x_3 = lean_unsigned_to_nat(537u);
  x_4 = lean_unsigned_to_nat(22u);
  x_5 = l_Lean_Meta_Closure_collectLevelAux___closed__9;
  x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5);
  return x_6;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_collectLevelAux(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
  _start:
  {
  lean_object* x_9; lean_object* x_10; 
  switch (lean_obj_tag(x_1)) {
  case 0:
  {
  lean_object* x_23; 
  x_23 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_23, 0, x_1);
  lean_ctor_set(x_23, 1, x_8);
  return x_23;
  }
  case 1:
  {
  lean_object* x_24; lean_object* x_25; uint8_t x_64; 
  x_24 = lean_ctor_get(x_1, 0);
  lean_inc(x_24);
  x_64 = l_Lean_Level_hasMVar(x_24);
  if (x_64 == 0)
  {
  uint8_t x_65; 
  x_65 = l_Lean_Level_hasParam(x_24);
  if (x_65 == 0)
  {
  x_9 = x_24;
  x_10 = x_8;
  goto block_22;
  }
  else
  {
  lean_object* x_66; 
  x_66 = lean_box(0);
  x_25 = x_66;
  goto block_63;
  }
  }
  else
  {
  lean_object* x_67; 
  x_67 = lean_box(0);
  x_25 = x_67;
  goto block_63;
  }
  block_63:
  {
  lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; 
  lean_dec(x_25);
  x_26 = lean_st_ref_get(x_7, x_8);
  x_27 = lean_ctor_get(x_26, 1);
  lean_inc(x_27);
  lean_dec(x_26);
  x_28 = lean_st_ref_get(x_3, 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);
  lean_dec(x_28);
  x_31 = lean_ctor_get(x_29, 0);
  lean_inc(x_31);
  lean_dec(x_29);
  lean_inc(x_24);
  x_32 = l_Std_HashMapImp_find_x3f___at_Lean_Meta_Closure_visitLevel___spec__1(x_31, x_24);
  if (lean_obj_tag(x_32) == 0)
  {
  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; uint8_t x_41; 
  lean_inc(x_24);
  x_33 = l_Lean_Meta_Closure_collectLevelAux(x_24, x_2, x_3, x_4, x_5, x_6, x_7, x_30);
  x_34 = lean_ctor_get(x_33, 0);
  lean_inc(x_34);
  x_35 = lean_ctor_get(x_33, 1);
  lean_inc(x_35);
  lean_dec(x_33);
  x_36 = lean_st_ref_get(x_7, x_35);
  x_37 = lean_ctor_get(x_36, 1);
  lean_inc(x_37);
  lean_dec(x_36);
  x_38 = lean_st_ref_take(x_3, x_37);
  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);
  x_41 = !lean_is_exclusive(x_39);
  if (x_41 == 0)
  {
  lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; 
  x_42 = lean_ctor_get(x_39, 0);
  lean_inc(x_34);
  x_43 = l_Std_HashMap_insert___at_Lean_Meta_Closure_visitLevel___spec__3(x_42, x_24, x_34);
  lean_ctor_set(x_39, 0, x_43);
  x_44 = lean_st_ref_set(x_3, x_39, x_40);
  x_45 = lean_ctor_get(x_44, 1);
  lean_inc(x_45);
  lean_dec(x_44);
  x_9 = x_34;
  x_10 = x_45;
  goto block_22;
  }
  else
  {
  lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; 
  x_46 = lean_ctor_get(x_39, 0);
  x_47 = lean_ctor_get(x_39, 1);
  x_48 = lean_ctor_get(x_39, 2);
  x_49 = lean_ctor_get(x_39, 3);
  x_50 = lean_ctor_get(x_39, 4);
  x_51 = lean_ctor_get(x_39, 5);
  x_52 = lean_ctor_get(x_39, 6);
  x_53 = lean_ctor_get(x_39, 7);
  x_54 = lean_ctor_get(x_39, 8);
  x_55 = lean_ctor_get(x_39, 9);
  x_56 = lean_ctor_get(x_39, 10);
  x_57 = lean_ctor_get(x_39, 11);
  lean_inc(x_57);
  lean_inc(x_56);
  lean_inc(x_55);
  lean_inc(x_54);
  lean_inc(x_53);
  lean_inc(x_52);
  lean_inc(x_51);
  lean_inc(x_50);
  lean_inc(x_49);
  lean_inc(x_48);
  lean_inc(x_47);
  lean_inc(x_46);
  lean_dec(x_39);
  lean_inc(x_34);
  x_58 = l_Std_HashMap_insert___at_Lean_Meta_Closure_visitLevel___spec__3(x_46, x_24, x_34);
  x_59 = lean_alloc_ctor(0, 12, 0);
  lean_ctor_set(x_59, 0, x_58);
  lean_ctor_set(x_59, 1, x_47);
  lean_ctor_set(x_59, 2, x_48);
  lean_ctor_set(x_59, 3, x_49);
  lean_ctor_set(x_59, 4, x_50);
  lean_ctor_set(x_59, 5, x_51);
  lean_ctor_set(x_59, 6, x_52);
  lean_ctor_set(x_59, 7, x_53);
  lean_ctor_set(x_59, 8, x_54);
  lean_ctor_set(x_59, 9, x_55);
  lean_ctor_set(x_59, 10, x_56);
  lean_ctor_set(x_59, 11, x_57);
  x_60 = lean_st_ref_set(x_3, x_59, x_40);
  x_61 = lean_ctor_get(x_60, 1);
  lean_inc(x_61);
  lean_dec(x_60);
  x_9 = x_34;
  x_10 = x_61;
  goto block_22;
  }
  }
  else
  {
  lean_object* x_62; 
  lean_dec(x_24);
  x_62 = lean_ctor_get(x_32, 0);
  lean_inc(x_62);
  lean_dec(x_32);
  x_9 = x_62;
  x_10 = x_30;
  goto block_22;
  }
  }
  }
  case 2:
  {
  lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_131; uint8_t x_170; 
  x_68 = lean_ctor_get(x_1, 0);
  lean_inc(x_68);
  x_69 = lean_ctor_get(x_1, 1);
  lean_inc(x_69);
  x_170 = l_Lean_Level_hasMVar(x_68);
  if (x_170 == 0)
  {
  uint8_t x_171; 
  x_171 = l_Lean_Level_hasParam(x_68);
  if (x_171 == 0)
  {
  x_70 = x_68;
  x_71 = x_8;
  goto block_130;
  }
  else
  {
  lean_object* x_172; 
  x_172 = lean_box(0);
  x_131 = x_172;
  goto block_169;
  }
  }
  else
  {
  lean_object* x_173; 
  x_173 = lean_box(0);
  x_131 = x_173;
  goto block_169;
  }
  block_130:
  {
  lean_object* x_72; lean_object* x_73; lean_object* x_87; uint8_t x_126; 
  x_126 = l_Lean_Level_hasMVar(x_69);
  if (x_126 == 0)
  {
  uint8_t x_127; 
  x_127 = l_Lean_Level_hasParam(x_69);
  if (x_127 == 0)
  {
  x_72 = x_69;
  x_73 = x_71;
  goto block_86;
  }
  else
  {
  lean_object* x_128; 
  x_128 = lean_box(0);
  x_87 = x_128;
  goto block_125;
  }
  }
  else
  {
  lean_object* x_129; 
  x_129 = lean_box(0);
  x_87 = x_129;
  goto block_125;
  }
  block_86:
  {
  if (lean_obj_tag(x_1) == 2)
  {
  uint8_t x_74; 
  x_74 = !lean_is_exclusive(x_1);
  if (x_74 == 0)
  {
  lean_object* x_75; lean_object* x_76; 
  x_75 = lean_level_update_max(x_1, x_70, x_72);
  x_76 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_76, 0, x_75);
  lean_ctor_set(x_76, 1, x_73);
  return x_76;
  }
  else
  {
  lean_object* x_77; lean_object* x_78; uint64_t x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; 
  x_77 = lean_ctor_get(x_1, 0);
  x_78 = lean_ctor_get(x_1, 1);
  x_79 = lean_ctor_get_uint64(x_1, sizeof(void*)*2);
  lean_inc(x_78);
  lean_inc(x_77);
  lean_dec(x_1);
  x_80 = lean_alloc_ctor(2, 2, 8);
  lean_ctor_set(x_80, 0, x_77);
  lean_ctor_set(x_80, 1, x_78);
  lean_ctor_set_uint64(x_80, sizeof(void*)*2, x_79);
  x_81 = lean_level_update_max(x_80, x_70, x_72);
  x_82 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_82, 0, x_81);
  lean_ctor_set(x_82, 1, x_73);
  return x_82;
  }
  }
  else
  {
  lean_object* x_83; lean_object* x_84; lean_object* x_85; 
  lean_dec(x_72);
  lean_dec(x_70);
  lean_dec(x_1);
  x_83 = l_Lean_Meta_Closure_collectLevelAux___closed__7;
  x_84 = l_panic___at_Lean_Level_normalize___spec__1(x_83);
  x_85 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_85, 0, x_84);
  lean_ctor_set(x_85, 1, x_73);
  return x_85;
  }
  }
  block_125:
  {
  lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; 
  lean_dec(x_87);
  x_88 = lean_st_ref_get(x_7, x_71);
  x_89 = lean_ctor_get(x_88, 1);
  lean_inc(x_89);
  lean_dec(x_88);
  x_90 = lean_st_ref_get(x_3, x_89);
  x_91 = lean_ctor_get(x_90, 0);
  lean_inc(x_91);
  x_92 = lean_ctor_get(x_90, 1);
  lean_inc(x_92);
  lean_dec(x_90);
  x_93 = lean_ctor_get(x_91, 0);
  lean_inc(x_93);
  lean_dec(x_91);
  lean_inc(x_69);
  x_94 = l_Std_HashMapImp_find_x3f___at_Lean_Meta_Closure_visitLevel___spec__1(x_93, x_69);
  if (lean_obj_tag(x_94) == 0)
  {
  lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; uint8_t x_103; 
  lean_inc(x_69);
  x_95 = l_Lean_Meta_Closure_collectLevelAux(x_69, x_2, x_3, x_4, x_5, x_6, x_7, x_92);
  x_96 = lean_ctor_get(x_95, 0);
  lean_inc(x_96);
  x_97 = lean_ctor_get(x_95, 1);
  lean_inc(x_97);
  lean_dec(x_95);
  x_98 = lean_st_ref_get(x_7, x_97);
  x_99 = lean_ctor_get(x_98, 1);
  lean_inc(x_99);
  lean_dec(x_98);
  x_100 = lean_st_ref_take(x_3, x_99);
  x_101 = lean_ctor_get(x_100, 0);
  lean_inc(x_101);
  x_102 = lean_ctor_get(x_100, 1);
  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; lean_object* x_106; lean_object* x_107; 
  x_104 = lean_ctor_get(x_101, 0);
  lean_inc(x_96);
  x_105 = l_Std_HashMap_insert___at_Lean_Meta_Closure_visitLevel___spec__3(x_104, x_69, x_96);
  lean_ctor_set(x_101, 0, x_105);
  x_106 = lean_st_ref_set(x_3, x_101, x_102);
  x_107 = lean_ctor_get(x_106, 1);
  lean_inc(x_107);
  lean_dec(x_106);
  x_72 = x_96;
  x_73 = x_107;
  goto block_86;
  }
  else
  {
  lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; 
  x_108 = lean_ctor_get(x_101, 0);
  x_109 = lean_ctor_get(x_101, 1);
  x_110 = lean_ctor_get(x_101, 2);
  x_111 = lean_ctor_get(x_101, 3);
  x_112 = lean_ctor_get(x_101, 4);
  x_113 = lean_ctor_get(x_101, 5);
  x_114 = lean_ctor_get(x_101, 6);
  x_115 = lean_ctor_get(x_101, 7);
  x_116 = lean_ctor_get(x_101, 8);
  x_117 = lean_ctor_get(x_101, 9);
  x_118 = lean_ctor_get(x_101, 10);
  x_119 = lean_ctor_get(x_101, 11);
  lean_inc(x_119);
  lean_inc(x_118);
  lean_inc(x_117);
  lean_inc(x_116);
  lean_inc(x_115);
  lean_inc(x_114);
  lean_inc(x_113);
  lean_inc(x_112);
  lean_inc(x_111);
  lean_inc(x_110);
  lean_inc(x_109);
  lean_inc(x_108);
  lean_dec(x_101);
  lean_inc(x_96);
  x_120 = l_Std_HashMap_insert___at_Lean_Meta_Closure_visitLevel___spec__3(x_108, x_69, x_96);
  x_121 = lean_alloc_ctor(0, 12, 0);
  lean_ctor_set(x_121, 0, x_120);
  lean_ctor_set(x_121, 1, x_109);
  lean_ctor_set(x_121, 2, x_110);
  lean_ctor_set(x_121, 3, x_111);
  lean_ctor_set(x_121, 4, x_112);
  lean_ctor_set(x_121, 5, x_113);
  lean_ctor_set(x_121, 6, x_114);
  lean_ctor_set(x_121, 7, x_115);
  lean_ctor_set(x_121, 8, x_116);
  lean_ctor_set(x_121, 9, x_117);
  lean_ctor_set(x_121, 10, x_118);
  lean_ctor_set(x_121, 11, x_119);
  x_122 = lean_st_ref_set(x_3, x_121, x_102);
  x_123 = lean_ctor_get(x_122, 1);
  lean_inc(x_123);
  lean_dec(x_122);
  x_72 = x_96;
  x_73 = x_123;
  goto block_86;
  }
  }
  else
  {
  lean_object* x_124; 
  lean_dec(x_69);
  x_124 = lean_ctor_get(x_94, 0);
  lean_inc(x_124);
  lean_dec(x_94);
  x_72 = x_124;
  x_73 = x_92;
  goto block_86;
  }
  }
  }
  block_169:
  {
  lean_object* x_132; lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; 
  lean_dec(x_131);
  x_132 = lean_st_ref_get(x_7, x_8);
  x_133 = lean_ctor_get(x_132, 1);
  lean_inc(x_133);
  lean_dec(x_132);
  x_134 = lean_st_ref_get(x_3, x_133);
  x_135 = lean_ctor_get(x_134, 0);
  lean_inc(x_135);
  x_136 = lean_ctor_get(x_134, 1);
  lean_inc(x_136);
  lean_dec(x_134);
  x_137 = lean_ctor_get(x_135, 0);
  lean_inc(x_137);
  lean_dec(x_135);
  lean_inc(x_68);
  x_138 = l_Std_HashMapImp_find_x3f___at_Lean_Meta_Closure_visitLevel___spec__1(x_137, x_68);
  if (lean_obj_tag(x_138) == 0)
  {
  lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; uint8_t x_147; 
  lean_inc(x_68);
  x_139 = l_Lean_Meta_Closure_collectLevelAux(x_68, x_2, x_3, x_4, x_5, x_6, x_7, x_136);
  x_140 = lean_ctor_get(x_139, 0);
  lean_inc(x_140);
  x_141 = lean_ctor_get(x_139, 1);
  lean_inc(x_141);
  lean_dec(x_139);
  x_142 = lean_st_ref_get(x_7, x_141);
  x_143 = lean_ctor_get(x_142, 1);
  lean_inc(x_143);
  lean_dec(x_142);
  x_144 = lean_st_ref_take(x_3, x_143);
  x_145 = lean_ctor_get(x_144, 0);
  lean_inc(x_145);
  x_146 = lean_ctor_get(x_144, 1);
  lean_inc(x_146);
  lean_dec(x_144);
  x_147 = !lean_is_exclusive(x_145);
  if (x_147 == 0)
  {
  lean_object* x_148; lean_object* x_149; lean_object* x_150; lean_object* x_151; 
  x_148 = lean_ctor_get(x_145, 0);
  lean_inc(x_140);
  x_149 = l_Std_HashMap_insert___at_Lean_Meta_Closure_visitLevel___spec__3(x_148, x_68, x_140);
  lean_ctor_set(x_145, 0, x_149);
  x_150 = lean_st_ref_set(x_3, x_145, x_146);
  x_151 = lean_ctor_get(x_150, 1);
  lean_inc(x_151);
  lean_dec(x_150);
  x_70 = x_140;
  x_71 = x_151;
  goto block_130;
  }
  else
  {
  lean_object* x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_object* x_160; 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; 
  x_152 = lean_ctor_get(x_145, 0);
  x_153 = lean_ctor_get(x_145, 1);
  x_154 = lean_ctor_get(x_145, 2);
  x_155 = lean_ctor_get(x_145, 3);
  x_156 = lean_ctor_get(x_145, 4);
  x_157 = lean_ctor_get(x_145, 5);
  x_158 = lean_ctor_get(x_145, 6);
  x_159 = lean_ctor_get(x_145, 7);
  x_160 = lean_ctor_get(x_145, 8);
  x_161 = lean_ctor_get(x_145, 9);
  x_162 = lean_ctor_get(x_145, 10);
  x_163 = lean_ctor_get(x_145, 11);
  lean_inc(x_163);
  lean_inc(x_162);
  lean_inc(x_161);
  lean_inc(x_160);
  lean_inc(x_159);
  lean_inc(x_158);
  lean_inc(x_157);
  lean_inc(x_156);
  lean_inc(x_155);
  lean_inc(x_154);
  lean_inc(x_153);
  lean_inc(x_152);
  lean_dec(x_145);
  lean_inc(x_140);
  x_164 = l_Std_HashMap_insert___at_Lean_Meta_Closure_visitLevel___spec__3(x_152, x_68, x_140);
  x_165 = lean_alloc_ctor(0, 12, 0);
  lean_ctor_set(x_165, 0, x_164);
  lean_ctor_set(x_165, 1, x_153);
  lean_ctor_set(x_165, 2, x_154);
  lean_ctor_set(x_165, 3, x_155);
  lean_ctor_set(x_165, 4, x_156);
  lean_ctor_set(x_165, 5, x_157);
  lean_ctor_set(x_165, 6, x_158);
  lean_ctor_set(x_165, 7, x_159);
  lean_ctor_set(x_165, 8, x_160);
  lean_ctor_set(x_165, 9, x_161);
  lean_ctor_set(x_165, 10, x_162);
  lean_ctor_set(x_165, 11, x_163);
  x_166 = lean_st_ref_set(x_3, x_165, x_146);
  x_167 = lean_ctor_get(x_166, 1);
  lean_inc(x_167);
  lean_dec(x_166);
  x_70 = x_140;
  x_71 = x_167;
  goto block_130;
  }
  }
  else
  {
  lean_object* x_168; 
  lean_dec(x_68);
  x_168 = lean_ctor_get(x_138, 0);
  lean_inc(x_168);
  lean_dec(x_138);
  x_70 = x_168;
  x_71 = x_136;
  goto block_130;
  }
  }
  }
  case 3:
  {
  lean_object* x_174; lean_object* x_175; lean_object* x_176; lean_object* x_177; lean_object* x_237; uint8_t x_276; 
  x_174 = lean_ctor_get(x_1, 0);
  lean_inc(x_174);
  x_175 = lean_ctor_get(x_1, 1);
  lean_inc(x_175);
  x_276 = l_Lean_Level_hasMVar(x_174);
  if (x_276 == 0)
  {
  uint8_t x_277; 
  x_277 = l_Lean_Level_hasParam(x_174);
  if (x_277 == 0)
  {
  x_176 = x_174;
  x_177 = x_8;
  goto block_236;
  }
  else
  {
  lean_object* x_278; 
  x_278 = lean_box(0);
  x_237 = x_278;
  goto block_275;
  }
  }
  else
  {
  lean_object* x_279; 
  x_279 = lean_box(0);
  x_237 = x_279;
  goto block_275;
  }
  block_236:
  {
  lean_object* x_178; lean_object* x_179; lean_object* x_193; uint8_t x_232; 
  x_232 = l_Lean_Level_hasMVar(x_175);
  if (x_232 == 0)
  {
  uint8_t x_233; 
  x_233 = l_Lean_Level_hasParam(x_175);
  if (x_233 == 0)
  {
  x_178 = x_175;
  x_179 = x_177;
  goto block_192;
  }
  else
  {
  lean_object* x_234; 
  x_234 = lean_box(0);
  x_193 = x_234;
  goto block_231;
  }
  }
  else
  {
  lean_object* x_235; 
  x_235 = lean_box(0);
  x_193 = x_235;
  goto block_231;
  }
  block_192:
  {
  if (lean_obj_tag(x_1) == 3)
  {
  uint8_t x_180; 
  x_180 = !lean_is_exclusive(x_1);
  if (x_180 == 0)
  {
  lean_object* x_181; lean_object* x_182; 
  x_181 = lean_level_update_imax(x_1, x_176, x_178);
  x_182 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_182, 0, x_181);
  lean_ctor_set(x_182, 1, x_179);
  return x_182;
  }
  else
  {
  lean_object* x_183; lean_object* x_184; uint64_t x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; 
  x_183 = lean_ctor_get(x_1, 0);
  x_184 = lean_ctor_get(x_1, 1);
  x_185 = lean_ctor_get_uint64(x_1, sizeof(void*)*2);
  lean_inc(x_184);
  lean_inc(x_183);
  lean_dec(x_1);
  x_186 = lean_alloc_ctor(3, 2, 8);
  lean_ctor_set(x_186, 0, x_183);
  lean_ctor_set(x_186, 1, x_184);
  lean_ctor_set_uint64(x_186, sizeof(void*)*2, x_185);
  x_187 = lean_level_update_imax(x_186, x_176, x_178);
  x_188 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_188, 0, x_187);
  lean_ctor_set(x_188, 1, x_179);
  return x_188;
  }
  }
  else
  {
  lean_object* x_189; lean_object* x_190; lean_object* x_191; 
  lean_dec(x_178);
  lean_dec(x_176);
  lean_dec(x_1);
  x_189 = l_Lean_Meta_Closure_collectLevelAux___closed__10;
  x_190 = l_panic___at_Lean_Level_normalize___spec__1(x_189);
  x_191 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_191, 0, x_190);
  lean_ctor_set(x_191, 1, x_179);
  return x_191;
  }
  }
  block_231:
  {
  lean_object* x_194; lean_object* x_195; lean_object* x_196; lean_object* x_197; lean_object* x_198; lean_object* x_199; lean_object* x_200; 
  lean_dec(x_193);
  x_194 = lean_st_ref_get(x_7, x_177);
  x_195 = lean_ctor_get(x_194, 1);
  lean_inc(x_195);
  lean_dec(x_194);
  x_196 = lean_st_ref_get(x_3, x_195);
  x_197 = lean_ctor_get(x_196, 0);
  lean_inc(x_197);
  x_198 = lean_ctor_get(x_196, 1);
  lean_inc(x_198);
  lean_dec(x_196);
  x_199 = lean_ctor_get(x_197, 0);
  lean_inc(x_199);
  lean_dec(x_197);
  lean_inc(x_175);
  x_200 = l_Std_HashMapImp_find_x3f___at_Lean_Meta_Closure_visitLevel___spec__1(x_199, x_175);
  if (lean_obj_tag(x_200) == 0)
  {
  lean_object* x_201; lean_object* x_202; lean_object* x_203; lean_object* x_204; lean_object* x_205; lean_object* x_206; lean_object* x_207; lean_object* x_208; uint8_t x_209; 
  lean_inc(x_175);
  x_201 = l_Lean_Meta_Closure_collectLevelAux(x_175, x_2, x_3, x_4, x_5, x_6, x_7, x_198);
  x_202 = lean_ctor_get(x_201, 0);
  lean_inc(x_202);
  x_203 = lean_ctor_get(x_201, 1);
  lean_inc(x_203);
  lean_dec(x_201);
  x_204 = lean_st_ref_get(x_7, x_203);
  x_205 = lean_ctor_get(x_204, 1);
  lean_inc(x_205);
  lean_dec(x_204);
  x_206 = lean_st_ref_take(x_3, x_205);
  x_207 = lean_ctor_get(x_206, 0);
  lean_inc(x_207);
  x_208 = lean_ctor_get(x_206, 1);
  lean_inc(x_208);
  lean_dec(x_206);
  x_209 = !lean_is_exclusive(x_207);
  if (x_209 == 0)
  {
  lean_object* x_210; lean_object* x_211; lean_object* x_212; lean_object* x_213; 
  x_210 = lean_ctor_get(x_207, 0);
  lean_inc(x_202);
  x_211 = l_Std_HashMap_insert___at_Lean_Meta_Closure_visitLevel___spec__3(x_210, x_175, x_202);
  lean_ctor_set(x_207, 0, x_211);
  x_212 = lean_st_ref_set(x_3, x_207, x_208);
  x_213 = lean_ctor_get(x_212, 1);
  lean_inc(x_213);
  lean_dec(x_212);
  x_178 = x_202;
  x_179 = x_213;
  goto block_192;
  }
  else
  {
  lean_object* x_214; lean_object* x_215; lean_object* x_216; lean_object* x_217; lean_object* x_218; 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; lean_object* x_228; lean_object* x_229; 
  x_214 = lean_ctor_get(x_207, 0);
  x_215 = lean_ctor_get(x_207, 1);
  x_216 = lean_ctor_get(x_207, 2);
  x_217 = lean_ctor_get(x_207, 3);
  x_218 = lean_ctor_get(x_207, 4);
  x_219 = lean_ctor_get(x_207, 5);
  x_220 = lean_ctor_get(x_207, 6);
  x_221 = lean_ctor_get(x_207, 7);
  x_222 = lean_ctor_get(x_207, 8);
  x_223 = lean_ctor_get(x_207, 9);
  x_224 = lean_ctor_get(x_207, 10);
  x_225 = lean_ctor_get(x_207, 11);
  lean_inc(x_225);
  lean_inc(x_224);
  lean_inc(x_223);
  lean_inc(x_222);
  lean_inc(x_221);
  lean_inc(x_220);
  lean_inc(x_219);
  lean_inc(x_218);
  lean_inc(x_217);
  lean_inc(x_216);
  lean_inc(x_215);
  lean_inc(x_214);
  lean_dec(x_207);
  lean_inc(x_202);
  x_226 = l_Std_HashMap_insert___at_Lean_Meta_Closure_visitLevel___spec__3(x_214, x_175, x_202);
  x_227 = lean_alloc_ctor(0, 12, 0);
  lean_ctor_set(x_227, 0, x_226);
  lean_ctor_set(x_227, 1, x_215);
  lean_ctor_set(x_227, 2, x_216);
  lean_ctor_set(x_227, 3, x_217);
  lean_ctor_set(x_227, 4, x_218);
  lean_ctor_set(x_227, 5, x_219);
  lean_ctor_set(x_227, 6, x_220);
  lean_ctor_set(x_227, 7, x_221);
  lean_ctor_set(x_227, 8, x_222);
  lean_ctor_set(x_227, 9, x_223);
  lean_ctor_set(x_227, 10, x_224);
  lean_ctor_set(x_227, 11, x_225);
  x_228 = lean_st_ref_set(x_3, x_227, x_208);
  x_229 = lean_ctor_get(x_228, 1);
  lean_inc(x_229);
  lean_dec(x_228);
  x_178 = x_202;
  x_179 = x_229;
  goto block_192;
  }
  }
  else
  {
  lean_object* x_230; 
  lean_dec(x_175);
  x_230 = lean_ctor_get(x_200, 0);
  lean_inc(x_230);
  lean_dec(x_200);
  x_178 = x_230;
  x_179 = x_198;
  goto block_192;
  }
  }
  }
  block_275:
  {
  lean_object* x_238; lean_object* x_239; lean_object* x_240; lean_object* x_241; lean_object* x_242; lean_object* x_243; lean_object* x_244; 
  lean_dec(x_237);
  x_238 = lean_st_ref_get(x_7, x_8);
  x_239 = lean_ctor_get(x_238, 1);
  lean_inc(x_239);
  lean_dec(x_238);
  x_240 = lean_st_ref_get(x_3, x_239);
  x_241 = lean_ctor_get(x_240, 0);
  lean_inc(x_241);
  x_242 = lean_ctor_get(x_240, 1);
  lean_inc(x_242);
  lean_dec(x_240);
  x_243 = lean_ctor_get(x_241, 0);
  lean_inc(x_243);
  lean_dec(x_241);
  lean_inc(x_174);
  x_244 = l_Std_HashMapImp_find_x3f___at_Lean_Meta_Closure_visitLevel___spec__1(x_243, x_174);
  if (lean_obj_tag(x_244) == 0)
  {
  lean_object* x_245; lean_object* x_246; lean_object* x_247; lean_object* x_248; lean_object* x_249; lean_object* x_250; lean_object* x_251; lean_object* x_252; uint8_t x_253; 
  lean_inc(x_174);
  x_245 = l_Lean_Meta_Closure_collectLevelAux(x_174, x_2, x_3, x_4, x_5, x_6, x_7, x_242);
  x_246 = lean_ctor_get(x_245, 0);
  lean_inc(x_246);
  x_247 = lean_ctor_get(x_245, 1);
  lean_inc(x_247);
  lean_dec(x_245);
  x_248 = lean_st_ref_get(x_7, x_247);
  x_249 = lean_ctor_get(x_248, 1);
  lean_inc(x_249);
  lean_dec(x_248);
  x_250 = lean_st_ref_take(x_3, x_249);
  x_251 = lean_ctor_get(x_250, 0);
  lean_inc(x_251);
  x_252 = lean_ctor_get(x_250, 1);
  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; lean_object* x_256; lean_object* x_257; 
  x_254 = lean_ctor_get(x_251, 0);
  lean_inc(x_246);
  x_255 = l_Std_HashMap_insert___at_Lean_Meta_Closure_visitLevel___spec__3(x_254, x_174, x_246);
  lean_ctor_set(x_251, 0, x_255);
  x_256 = lean_st_ref_set(x_3, x_251, x_252);
  x_257 = lean_ctor_get(x_256, 1);
  lean_inc(x_257);
  lean_dec(x_256);
  x_176 = x_246;
  x_177 = x_257;
  goto block_236;
  }
  else
  {
  lean_object* x_258; lean_object* x_259; lean_object* x_260; lean_object* x_261; lean_object* x_262; lean_object* x_263; lean_object* x_264; lean_object* x_265; lean_object* x_266; lean_object* x_267; lean_object* x_268; lean_object* x_269; lean_object* x_270; lean_object* x_271; lean_object* x_272; lean_object* x_273; 
  x_258 = lean_ctor_get(x_251, 0);
  x_259 = lean_ctor_get(x_251, 1);
  x_260 = lean_ctor_get(x_251, 2);
  x_261 = lean_ctor_get(x_251, 3);
  x_262 = lean_ctor_get(x_251, 4);
  x_263 = lean_ctor_get(x_251, 5);
  x_264 = lean_ctor_get(x_251, 6);
  x_265 = lean_ctor_get(x_251, 7);
  x_266 = lean_ctor_get(x_251, 8);
  x_267 = lean_ctor_get(x_251, 9);
  x_268 = lean_ctor_get(x_251, 10);
  x_269 = lean_ctor_get(x_251, 11);
  lean_inc(x_269);
  lean_inc(x_268);
  lean_inc(x_267);
  lean_inc(x_266);
  lean_inc(x_265);
  lean_inc(x_264);
  lean_inc(x_263);
  lean_inc(x_262);
  lean_inc(x_261);
  lean_inc(x_260);
  lean_inc(x_259);
  lean_inc(x_258);
  lean_dec(x_251);
  lean_inc(x_246);
  x_270 = l_Std_HashMap_insert___at_Lean_Meta_Closure_visitLevel___spec__3(x_258, x_174, x_246);
  x_271 = lean_alloc_ctor(0, 12, 0);
  lean_ctor_set(x_271, 0, x_270);
  lean_ctor_set(x_271, 1, x_259);
  lean_ctor_set(x_271, 2, x_260);
  lean_ctor_set(x_271, 3, x_261);
  lean_ctor_set(x_271, 4, x_262);
  lean_ctor_set(x_271, 5, x_263);
  lean_ctor_set(x_271, 6, x_264);
  lean_ctor_set(x_271, 7, x_265);
  lean_ctor_set(x_271, 8, x_266);
  lean_ctor_set(x_271, 9, x_267);
  lean_ctor_set(x_271, 10, x_268);
  lean_ctor_set(x_271, 11, x_269);
  x_272 = lean_st_ref_set(x_3, x_271, x_252);
  x_273 = lean_ctor_get(x_272, 1);
  lean_inc(x_273);
  lean_dec(x_272);
  x_176 = x_246;
  x_177 = x_273;
  goto block_236;
  }
  }
  else
  {
  lean_object* x_274; 
  lean_dec(x_174);
  x_274 = lean_ctor_get(x_244, 0);
  lean_inc(x_274);
  lean_dec(x_244);
  x_176 = x_274;
  x_177 = x_242;
  goto block_236;
  }
  }
  }
  default: 
  {
  lean_object* x_280; 
  x_280 = l_Lean_Meta_Closure_mkNewLevelParam(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8);
  return x_280;
  }
  }
  block_22:
  {
  if (lean_obj_tag(x_1) == 1)
  {
  uint8_t x_11; 
  x_11 = !lean_is_exclusive(x_1);
  if (x_11 == 0)
  {
  lean_object* x_12; lean_object* x_13; 
  x_12 = lean_level_update_succ(x_1, x_9);
  x_13 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_13, 0, x_12);
  lean_ctor_set(x_13, 1, x_10);
  return x_13;
  }
  else
  {
  lean_object* x_14; uint64_t x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; 
  x_14 = lean_ctor_get(x_1, 0);
  x_15 = lean_ctor_get_uint64(x_1, sizeof(void*)*1);
  lean_inc(x_14);
  lean_dec(x_1);
  x_16 = lean_alloc_ctor(1, 1, 8);
  lean_ctor_set(x_16, 0, x_14);
  lean_ctor_set_uint64(x_16, sizeof(void*)*1, x_15);
  x_17 = lean_level_update_succ(x_16, x_9);
  x_18 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_18, 0, x_17);
  lean_ctor_set(x_18, 1, x_10);
  return x_18;
  }
  }
  else
  {
  lean_object* x_19; lean_object* x_20; lean_object* x_21; 
  lean_dec(x_9);
  lean_dec(x_1);
  x_19 = l_Lean_Meta_Closure_collectLevelAux___closed__4;
  x_20 = l_panic___at_Lean_Level_normalize___spec__1(x_19);
  x_21 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_21, 0, x_20);
  lean_ctor_set(x_21, 1, x_10);
  return x_21;
  }
  }
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_collectLevelAux___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
  _start:
  {
  uint8_t x_9; lean_object* x_10; 
  x_9 = lean_unbox(x_2);
  lean_dec(x_2);
  x_10 = l_Lean_Meta_Closure_collectLevelAux(x_1, x_9, x_3, x_4, x_5, x_6, x_7, x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  return x_10;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_collectLevel(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
  _start:
  {
  lean_object* x_9; uint8_t x_87; 
  x_87 = l_Lean_Level_hasMVar(x_1);
  if (x_87 == 0)
  {
  uint8_t x_88; 
  x_88 = l_Lean_Level_hasParam(x_1);
  if (x_88 == 0)
  {
  lean_object* x_89; 
  x_89 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_89, 0, x_1);
  lean_ctor_set(x_89, 1, x_8);
  return x_89;
  }
  else
  {
  lean_object* x_90; 
  x_90 = lean_box(0);
  x_9 = x_90;
  goto block_86;
  }
  }
  else
  {
  lean_object* x_91; 
  x_91 = lean_box(0);
  x_9 = x_91;
  goto block_86;
  }
  block_86:
  {
  lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; 
  lean_dec(x_9);
  x_10 = lean_st_ref_get(x_7, x_8);
  x_11 = lean_ctor_get(x_10, 1);
  lean_inc(x_11);
  lean_dec(x_10);
  x_12 = lean_st_ref_get(x_3, x_11);
  x_13 = !lean_is_exclusive(x_12);
  if (x_13 == 0)
  {
  lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; 
  x_14 = lean_ctor_get(x_12, 0);
  x_15 = lean_ctor_get(x_12, 1);
  x_16 = lean_ctor_get(x_14, 0);
  lean_inc(x_16);
  lean_dec(x_14);
  lean_inc(x_1);
  x_17 = l_Std_HashMapImp_find_x3f___at_Lean_Meta_Closure_visitLevel___spec__1(x_16, x_1);
  if (lean_obj_tag(x_17) == 0)
  {
  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; uint8_t x_26; 
  lean_free_object(x_12);
  lean_inc(x_1);
  x_18 = l_Lean_Meta_Closure_collectLevelAux(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_15);
  x_19 = lean_ctor_get(x_18, 0);
  lean_inc(x_19);
  x_20 = lean_ctor_get(x_18, 1);
  lean_inc(x_20);
  lean_dec(x_18);
  x_21 = lean_st_ref_get(x_7, x_20);
  x_22 = lean_ctor_get(x_21, 1);
  lean_inc(x_22);
  lean_dec(x_21);
  x_23 = lean_st_ref_take(x_3, x_22);
  x_24 = lean_ctor_get(x_23, 0);
  lean_inc(x_24);
  x_25 = lean_ctor_get(x_23, 1);
  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; uint8_t x_30; 
  x_27 = lean_ctor_get(x_24, 0);
  lean_inc(x_19);
  x_28 = l_Std_HashMap_insert___at_Lean_Meta_Closure_visitLevel___spec__3(x_27, x_1, x_19);
  lean_ctor_set(x_24, 0, x_28);
  x_29 = lean_st_ref_set(x_3, x_24, x_25);
  x_30 = !lean_is_exclusive(x_29);
  if (x_30 == 0)
  {
  lean_object* x_31; 
  x_31 = lean_ctor_get(x_29, 0);
  lean_dec(x_31);
  lean_ctor_set(x_29, 0, x_19);
  return x_29;
  }
  else
  {
  lean_object* x_32; lean_object* x_33; 
  x_32 = lean_ctor_get(x_29, 1);
  lean_inc(x_32);
  lean_dec(x_29);
  x_33 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_33, 0, x_19);
  lean_ctor_set(x_33, 1, x_32);
  return x_33;
  }
  }
  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; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; 
  x_34 = lean_ctor_get(x_24, 0);
  x_35 = lean_ctor_get(x_24, 1);
  x_36 = lean_ctor_get(x_24, 2);
  x_37 = lean_ctor_get(x_24, 3);
  x_38 = lean_ctor_get(x_24, 4);
  x_39 = lean_ctor_get(x_24, 5);
  x_40 = lean_ctor_get(x_24, 6);
  x_41 = lean_ctor_get(x_24, 7);
  x_42 = lean_ctor_get(x_24, 8);
  x_43 = lean_ctor_get(x_24, 9);
  x_44 = lean_ctor_get(x_24, 10);
  x_45 = lean_ctor_get(x_24, 11);
  lean_inc(x_45);
  lean_inc(x_44);
  lean_inc(x_43);
  lean_inc(x_42);
  lean_inc(x_41);
  lean_inc(x_40);
  lean_inc(x_39);
  lean_inc(x_38);
  lean_inc(x_37);
  lean_inc(x_36);
  lean_inc(x_35);
  lean_inc(x_34);
  lean_dec(x_24);
  lean_inc(x_19);
  x_46 = l_Std_HashMap_insert___at_Lean_Meta_Closure_visitLevel___spec__3(x_34, x_1, x_19);
  x_47 = lean_alloc_ctor(0, 12, 0);
  lean_ctor_set(x_47, 0, x_46);
  lean_ctor_set(x_47, 1, x_35);
  lean_ctor_set(x_47, 2, x_36);
  lean_ctor_set(x_47, 3, x_37);
  lean_ctor_set(x_47, 4, x_38);
  lean_ctor_set(x_47, 5, x_39);
  lean_ctor_set(x_47, 6, x_40);
  lean_ctor_set(x_47, 7, x_41);
  lean_ctor_set(x_47, 8, x_42);
  lean_ctor_set(x_47, 9, x_43);
  lean_ctor_set(x_47, 10, x_44);
  lean_ctor_set(x_47, 11, x_45);
  x_48 = lean_st_ref_set(x_3, x_47, x_25);
  x_49 = lean_ctor_get(x_48, 1);
  lean_inc(x_49);
  if (lean_is_exclusive(x_48)) {
   lean_ctor_release(x_48, 0);
   lean_ctor_release(x_48, 1);
   x_50 = x_48;
  } else {
   lean_dec_ref(x_48);
   x_50 = lean_box(0);
  }
  if (lean_is_scalar(x_50)) {
   x_51 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_51 = x_50;
  }
  lean_ctor_set(x_51, 0, x_19);
  lean_ctor_set(x_51, 1, x_49);
  return x_51;
  }
  }
  else
  {
  lean_object* x_52; 
  lean_dec(x_1);
  x_52 = lean_ctor_get(x_17, 0);
  lean_inc(x_52);
  lean_dec(x_17);
  lean_ctor_set(x_12, 0, x_52);
  return x_12;
  }
  }
  else
  {
  lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; 
  x_53 = lean_ctor_get(x_12, 0);
  x_54 = lean_ctor_get(x_12, 1);
  lean_inc(x_54);
  lean_inc(x_53);
  lean_dec(x_12);
  x_55 = lean_ctor_get(x_53, 0);
  lean_inc(x_55);
  lean_dec(x_53);
  lean_inc(x_1);
  x_56 = l_Std_HashMapImp_find_x3f___at_Lean_Meta_Closure_visitLevel___spec__1(x_55, x_1);
  if (lean_obj_tag(x_56) == 0)
  {
  lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_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; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; 
  lean_inc(x_1);
  x_57 = l_Lean_Meta_Closure_collectLevelAux(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_54);
  x_58 = lean_ctor_get(x_57, 0);
  lean_inc(x_58);
  x_59 = lean_ctor_get(x_57, 1);
  lean_inc(x_59);
  lean_dec(x_57);
  x_60 = lean_st_ref_get(x_7, x_59);
  x_61 = lean_ctor_get(x_60, 1);
  lean_inc(x_61);
  lean_dec(x_60);
  x_62 = lean_st_ref_take(x_3, x_61);
  x_63 = lean_ctor_get(x_62, 0);
  lean_inc(x_63);
  x_64 = lean_ctor_get(x_62, 1);
  lean_inc(x_64);
  lean_dec(x_62);
  x_65 = lean_ctor_get(x_63, 0);
  lean_inc(x_65);
  x_66 = lean_ctor_get(x_63, 1);
  lean_inc(x_66);
  x_67 = lean_ctor_get(x_63, 2);
  lean_inc(x_67);
  x_68 = lean_ctor_get(x_63, 3);
  lean_inc(x_68);
  x_69 = lean_ctor_get(x_63, 4);
  lean_inc(x_69);
  x_70 = lean_ctor_get(x_63, 5);
  lean_inc(x_70);
  x_71 = lean_ctor_get(x_63, 6);
  lean_inc(x_71);
  x_72 = lean_ctor_get(x_63, 7);
  lean_inc(x_72);
  x_73 = lean_ctor_get(x_63, 8);
  lean_inc(x_73);
  x_74 = lean_ctor_get(x_63, 9);
  lean_inc(x_74);
  x_75 = lean_ctor_get(x_63, 10);
  lean_inc(x_75);
  x_76 = lean_ctor_get(x_63, 11);
  lean_inc(x_76);
  if (lean_is_exclusive(x_63)) {
   lean_ctor_release(x_63, 0);
   lean_ctor_release(x_63, 1);
   lean_ctor_release(x_63, 2);
   lean_ctor_release(x_63, 3);
   lean_ctor_release(x_63, 4);
   lean_ctor_release(x_63, 5);
   lean_ctor_release(x_63, 6);
   lean_ctor_release(x_63, 7);
   lean_ctor_release(x_63, 8);
   lean_ctor_release(x_63, 9);
   lean_ctor_release(x_63, 10);
   lean_ctor_release(x_63, 11);
   x_77 = x_63;
  } else {
   lean_dec_ref(x_63);
   x_77 = lean_box(0);
  }
  lean_inc(x_58);
  x_78 = l_Std_HashMap_insert___at_Lean_Meta_Closure_visitLevel___spec__3(x_65, x_1, x_58);
  if (lean_is_scalar(x_77)) {
   x_79 = lean_alloc_ctor(0, 12, 0);
  } else {
   x_79 = x_77;
  }
  lean_ctor_set(x_79, 0, x_78);
  lean_ctor_set(x_79, 1, x_66);
  lean_ctor_set(x_79, 2, x_67);
  lean_ctor_set(x_79, 3, x_68);
  lean_ctor_set(x_79, 4, x_69);
  lean_ctor_set(x_79, 5, x_70);
  lean_ctor_set(x_79, 6, x_71);
  lean_ctor_set(x_79, 7, x_72);
  lean_ctor_set(x_79, 8, x_73);
  lean_ctor_set(x_79, 9, x_74);
  lean_ctor_set(x_79, 10, x_75);
  lean_ctor_set(x_79, 11, x_76);
  x_80 = lean_st_ref_set(x_3, x_79, x_64);
  x_81 = lean_ctor_get(x_80, 1);
  lean_inc(x_81);
  if (lean_is_exclusive(x_80)) {
   lean_ctor_release(x_80, 0);
   lean_ctor_release(x_80, 1);
   x_82 = x_80;
  } else {
   lean_dec_ref(x_80);
   x_82 = lean_box(0);
  }
  if (lean_is_scalar(x_82)) {
   x_83 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_83 = x_82;
  }
  lean_ctor_set(x_83, 0, x_58);
  lean_ctor_set(x_83, 1, x_81);
  return x_83;
  }
  else
  {
  lean_object* x_84; lean_object* x_85; 
  lean_dec(x_1);
  x_84 = lean_ctor_get(x_56, 0);
  lean_inc(x_84);
  lean_dec(x_56);
  x_85 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_85, 0, x_84);
  lean_ctor_set(x_85, 1, x_54);
  return x_85;
  }
  }
  }
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_collectLevel___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
  _start:
  {
  uint8_t x_9; lean_object* x_10; 
  x_9 = lean_unbox(x_2);
  lean_dec(x_2);
  x_10 = l_Lean_Meta_Closure_collectLevel(x_1, x_9, x_3, x_4, x_5, x_6, x_7, x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  return x_10;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_preprocess___lambda__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* x_7, lean_object* x_8, lean_object* x_9) {
  _start:
  {
  lean_object* x_10; 
  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_EXPORT lean_object* l_Lean_Meta_Closure_preprocess(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
  _start:
  {
  lean_object* x_9; 
  lean_inc(x_5);
  x_9 = l_Lean_Meta_instantiateMVars(x_1, x_4, x_5, x_6, x_7, x_8);
  if (x_2 == 0)
  {
  lean_object* x_10; lean_object* x_11; lean_object* x_12; 
  x_10 = lean_ctor_get(x_9, 0);
  lean_inc(x_10);
  x_11 = lean_ctor_get(x_9, 1);
  lean_inc(x_11);
  lean_dec(x_9);
  lean_inc(x_10);
  x_12 = l_Lean_Meta_check(x_10, x_4, x_5, x_6, x_7, x_11);
  if (lean_obj_tag(x_12) == 0)
  {
  uint8_t x_13; 
  x_13 = !lean_is_exclusive(x_12);
  if (x_13 == 0)
  {
  lean_object* x_14; 
  x_14 = lean_ctor_get(x_12, 0);
  lean_dec(x_14);
  lean_ctor_set(x_12, 0, x_10);
  return x_12;
  }
  else
  {
  lean_object* x_15; lean_object* x_16; 
  x_15 = lean_ctor_get(x_12, 1);
  lean_inc(x_15);
  lean_dec(x_12);
  x_16 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_16, 0, x_10);
  lean_ctor_set(x_16, 1, x_15);
  return x_16;
  }
  }
  else
  {
  uint8_t x_17; 
  lean_dec(x_10);
  x_17 = !lean_is_exclusive(x_12);
  if (x_17 == 0)
  {
  return x_12;
  }
  else
  {
  lean_object* x_18; lean_object* x_19; lean_object* x_20; 
  x_18 = lean_ctor_get(x_12, 0);
  x_19 = lean_ctor_get(x_12, 1);
  lean_inc(x_19);
  lean_inc(x_18);
  lean_dec(x_12);
  x_20 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_20, 0, x_18);
  lean_ctor_set(x_20, 1, x_19);
  return x_20;
  }
  }
  }
  else
  {
  uint8_t x_21; 
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  x_21 = !lean_is_exclusive(x_9);
  if (x_21 == 0)
  {
  return x_9;
  }
  else
  {
  lean_object* x_22; lean_object* x_23; lean_object* x_24; 
  x_22 = lean_ctor_get(x_9, 0);
  x_23 = lean_ctor_get(x_9, 1);
  lean_inc(x_23);
  lean_inc(x_22);
  lean_dec(x_9);
  x_24 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_24, 0, x_22);
  lean_ctor_set(x_24, 1, x_23);
  return x_24;
  }
  }
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_preprocess___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) {
  _start:
  {
  uint8_t x_10; lean_object* x_11; 
  x_10 = lean_unbox(x_3);
  lean_dec(x_3);
  x_11 = l_Lean_Meta_Closure_preprocess___lambda__1(x_1, x_2, x_10, x_4, x_5, x_6, x_7, x_8, x_9);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_2);
  return x_11;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_preprocess___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
  _start:
  {
  uint8_t x_9; lean_object* x_10; 
  x_9 = lean_unbox(x_2);
  lean_dec(x_2);
  x_10 = l_Lean_Meta_Closure_preprocess(x_1, x_9, x_3, x_4, x_5, x_6, x_7, x_8);
  lean_dec(x_3);
  return x_10;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_mkNextUserName___rarg___closed__1() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("_x");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_mkNextUserName___rarg___closed__2() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; 
  x_1 = lean_box(0);
  x_2 = l_Lean_Meta_Closure_mkNextUserName___rarg___closed__1;
  x_3 = lean_name_mk_string(x_1, x_2);
  return x_3;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_mkNextUserName___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; 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; uint8_t x_20; 
  x_7 = lean_st_ref_get(x_5, x_6);
  x_8 = lean_ctor_get(x_7, 1);
  lean_inc(x_8);
  lean_dec(x_7);
  x_9 = lean_st_ref_get(x_1, x_8);
  x_10 = lean_ctor_get(x_9, 0);
  lean_inc(x_10);
  x_11 = lean_ctor_get(x_9, 1);
  lean_inc(x_11);
  lean_dec(x_9);
  x_12 = lean_ctor_get(x_10, 8);
  lean_inc(x_12);
  lean_dec(x_10);
  x_13 = l_Lean_Meta_Closure_mkNextUserName___rarg___closed__2;
  x_14 = lean_name_append_index_after(x_13, x_12);
  x_15 = lean_st_ref_get(x_5, x_11);
  x_16 = lean_ctor_get(x_15, 1);
  lean_inc(x_16);
  lean_dec(x_15);
  x_17 = lean_st_ref_take(x_1, x_16);
  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);
  x_20 = !lean_is_exclusive(x_18);
  if (x_20 == 0)
  {
  lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; uint8_t x_25; 
  x_21 = lean_ctor_get(x_18, 8);
  x_22 = lean_unsigned_to_nat(1u);
  x_23 = lean_nat_add(x_21, x_22);
  lean_dec(x_21);
  lean_ctor_set(x_18, 8, x_23);
  x_24 = lean_st_ref_set(x_1, x_18, x_19);
  x_25 = !lean_is_exclusive(x_24);
  if (x_25 == 0)
  {
  lean_object* x_26; 
  x_26 = lean_ctor_get(x_24, 0);
  lean_dec(x_26);
  lean_ctor_set(x_24, 0, x_14);
  return x_24;
  }
  else
  {
  lean_object* x_27; lean_object* x_28; 
  x_27 = lean_ctor_get(x_24, 1);
  lean_inc(x_27);
  lean_dec(x_24);
  x_28 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_28, 0, x_14);
  lean_ctor_set(x_28, 1, x_27);
  return x_28;
  }
  }
  else
  {
  lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; 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_29 = lean_ctor_get(x_18, 0);
  x_30 = lean_ctor_get(x_18, 1);
  x_31 = lean_ctor_get(x_18, 2);
  x_32 = lean_ctor_get(x_18, 3);
  x_33 = lean_ctor_get(x_18, 4);
  x_34 = lean_ctor_get(x_18, 5);
  x_35 = lean_ctor_get(x_18, 6);
  x_36 = lean_ctor_get(x_18, 7);
  x_37 = lean_ctor_get(x_18, 8);
  x_38 = lean_ctor_get(x_18, 9);
  x_39 = lean_ctor_get(x_18, 10);
  x_40 = lean_ctor_get(x_18, 11);
  lean_inc(x_40);
  lean_inc(x_39);
  lean_inc(x_38);
  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_inc(x_29);
  lean_dec(x_18);
  x_41 = lean_unsigned_to_nat(1u);
  x_42 = lean_nat_add(x_37, x_41);
  lean_dec(x_37);
  x_43 = lean_alloc_ctor(0, 12, 0);
  lean_ctor_set(x_43, 0, x_29);
  lean_ctor_set(x_43, 1, x_30);
  lean_ctor_set(x_43, 2, x_31);
  lean_ctor_set(x_43, 3, x_32);
  lean_ctor_set(x_43, 4, x_33);
  lean_ctor_set(x_43, 5, x_34);
  lean_ctor_set(x_43, 6, x_35);
  lean_ctor_set(x_43, 7, x_36);
  lean_ctor_set(x_43, 8, x_42);
  lean_ctor_set(x_43, 9, x_38);
  lean_ctor_set(x_43, 10, x_39);
  lean_ctor_set(x_43, 11, x_40);
  x_44 = lean_st_ref_set(x_1, x_43, x_19);
  x_45 = lean_ctor_get(x_44, 1);
  lean_inc(x_45);
  if (lean_is_exclusive(x_44)) {
   lean_ctor_release(x_44, 0);
   lean_ctor_release(x_44, 1);
   x_46 = x_44;
  } else {
   lean_dec_ref(x_44);
   x_46 = lean_box(0);
  }
  if (lean_is_scalar(x_46)) {
   x_47 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_47 = x_46;
  }
  lean_ctor_set(x_47, 0, x_14);
  lean_ctor_set(x_47, 1, x_45);
  return x_47;
  }
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_mkNextUserName(uint8_t x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = lean_alloc_closure((void*)(l_Lean_Meta_Closure_mkNextUserName___rarg___boxed), 6, 0);
  return x_2;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_mkNextUserName___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_Meta_Closure_mkNextUserName___rarg(x_1, x_2, x_3, x_4, x_5, x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  return x_7;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_mkNextUserName___boxed(lean_object* x_1) {
  _start:
  {
  uint8_t x_2; lean_object* x_3; 
  x_2 = lean_unbox(x_1);
  lean_dec(x_1);
  x_3 = l_Lean_Meta_Closure_mkNextUserName(x_2);
  return x_3;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_pushToProcess(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
  _start:
  {
  lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; 
  x_9 = lean_st_ref_get(x_7, x_8);
  x_10 = lean_ctor_get(x_9, 1);
  lean_inc(x_10);
  lean_dec(x_9);
  x_11 = lean_st_ref_take(x_3, 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);
  x_14 = !lean_is_exclusive(x_12);
  if (x_14 == 0)
  {
  lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18; 
  x_15 = lean_ctor_get(x_12, 11);
  x_16 = lean_array_push(x_15, x_1);
  lean_ctor_set(x_12, 11, x_16);
  x_17 = lean_st_ref_set(x_3, x_12, x_13);
  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);
  lean_dec(x_19);
  x_20 = lean_box(0);
  lean_ctor_set(x_17, 0, x_20);
  return x_17;
  }
  else
  {
  lean_object* x_21; lean_object* x_22; lean_object* x_23; 
  x_21 = lean_ctor_get(x_17, 1);
  lean_inc(x_21);
  lean_dec(x_17);
  x_22 = lean_box(0);
  x_23 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_23, 0, x_22);
  lean_ctor_set(x_23, 1, x_21);
  return x_23;
  }
  }
  else
  {
  lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; 
  x_24 = lean_ctor_get(x_12, 0);
  x_25 = lean_ctor_get(x_12, 1);
  x_26 = lean_ctor_get(x_12, 2);
  x_27 = lean_ctor_get(x_12, 3);
  x_28 = lean_ctor_get(x_12, 4);
  x_29 = lean_ctor_get(x_12, 5);
  x_30 = lean_ctor_get(x_12, 6);
  x_31 = lean_ctor_get(x_12, 7);
  x_32 = lean_ctor_get(x_12, 8);
  x_33 = lean_ctor_get(x_12, 9);
  x_34 = lean_ctor_get(x_12, 10);
  x_35 = lean_ctor_get(x_12, 11);
  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_inc(x_29);
  lean_inc(x_28);
  lean_inc(x_27);
  lean_inc(x_26);
  lean_inc(x_25);
  lean_inc(x_24);
  lean_dec(x_12);
  x_36 = lean_array_push(x_35, x_1);
  x_37 = lean_alloc_ctor(0, 12, 0);
  lean_ctor_set(x_37, 0, x_24);
  lean_ctor_set(x_37, 1, x_25);
  lean_ctor_set(x_37, 2, x_26);
  lean_ctor_set(x_37, 3, x_27);
  lean_ctor_set(x_37, 4, x_28);
  lean_ctor_set(x_37, 5, x_29);
  lean_ctor_set(x_37, 6, x_30);
  lean_ctor_set(x_37, 7, x_31);
  lean_ctor_set(x_37, 8, x_32);
  lean_ctor_set(x_37, 9, x_33);
  lean_ctor_set(x_37, 10, x_34);
  lean_ctor_set(x_37, 11, x_36);
  x_38 = lean_st_ref_set(x_3, x_37, x_13);
  x_39 = lean_ctor_get(x_38, 1);
  lean_inc(x_39);
  if (lean_is_exclusive(x_38)) {
   lean_ctor_release(x_38, 0);
   lean_ctor_release(x_38, 1);
   x_40 = x_38;
  } else {
   lean_dec_ref(x_38);
   x_40 = lean_box(0);
  }
  x_41 = lean_box(0);
  if (lean_is_scalar(x_40)) {
   x_42 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_42 = x_40;
  }
  lean_ctor_set(x_42, 0, x_41);
  lean_ctor_set(x_42, 1, x_39);
  return x_42;
  }
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_pushToProcess___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
  _start:
  {
  uint8_t x_9; lean_object* x_10; 
  x_9 = lean_unbox(x_2);
  lean_dec(x_2);
  x_10 = l_Lean_Meta_Closure_pushToProcess(x_1, x_9, x_3, x_4, x_5, x_6, x_7, x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  return x_10;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_mkFreshId___at_Lean_Meta_Closure_collectExprAux___spec__2___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; uint8_t x_7; 
  x_3 = lean_st_ref_get(x_1, x_2);
  x_4 = lean_ctor_get(x_3, 0);
  lean_inc(x_4);
  x_5 = lean_ctor_get(x_4, 2);
  lean_inc(x_5);
  lean_dec(x_4);
  x_6 = lean_ctor_get(x_3, 1);
  lean_inc(x_6);
  lean_dec(x_3);
  x_7 = !lean_is_exclusive(x_5);
  if (x_7 == 0)
  {
  lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; 
  x_8 = lean_ctor_get(x_5, 0);
  x_9 = lean_ctor_get(x_5, 1);
  lean_inc(x_9);
  lean_inc(x_8);
  x_10 = lean_name_mk_numeral(x_8, x_9);
  x_11 = lean_unsigned_to_nat(1u);
  x_12 = lean_nat_add(x_9, x_11);
  lean_dec(x_9);
  lean_ctor_set(x_5, 1, x_12);
  x_13 = lean_st_ref_take(x_1, x_6);
  x_14 = lean_ctor_get(x_13, 0);
  lean_inc(x_14);
  x_15 = lean_ctor_get(x_13, 1);
  lean_inc(x_15);
  lean_dec(x_13);
  x_16 = !lean_is_exclusive(x_14);
  if (x_16 == 0)
  {
  lean_object* x_17; lean_object* x_18; uint8_t x_19; 
  x_17 = lean_ctor_get(x_14, 2);
  lean_dec(x_17);
  lean_ctor_set(x_14, 2, x_5);
  x_18 = lean_st_ref_set(x_1, x_14, x_15);
  x_19 = !lean_is_exclusive(x_18);
  if (x_19 == 0)
  {
  lean_object* x_20; 
  x_20 = lean_ctor_get(x_18, 0);
  lean_dec(x_20);
  lean_ctor_set(x_18, 0, x_10);
  return x_18;
  }
  else
  {
  lean_object* x_21; lean_object* x_22; 
  x_21 = lean_ctor_get(x_18, 1);
  lean_inc(x_21);
  lean_dec(x_18);
  x_22 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_22, 0, x_10);
  lean_ctor_set(x_22, 1, x_21);
  return x_22;
  }
  }
  else
  {
  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; 
  x_23 = lean_ctor_get(x_14, 0);
  x_24 = lean_ctor_get(x_14, 1);
  x_25 = lean_ctor_get(x_14, 3);
  lean_inc(x_25);
  lean_inc(x_24);
  lean_inc(x_23);
  lean_dec(x_14);
  x_26 = lean_alloc_ctor(0, 4, 0);
  lean_ctor_set(x_26, 0, x_23);
  lean_ctor_set(x_26, 1, x_24);
  lean_ctor_set(x_26, 2, x_5);
  lean_ctor_set(x_26, 3, x_25);
  x_27 = lean_st_ref_set(x_1, x_26, x_15);
  x_28 = lean_ctor_get(x_27, 1);
  lean_inc(x_28);
  if (lean_is_exclusive(x_27)) {
   lean_ctor_release(x_27, 0);
   lean_ctor_release(x_27, 1);
   x_29 = x_27;
  } else {
   lean_dec_ref(x_27);
   x_29 = lean_box(0);
  }
  if (lean_is_scalar(x_29)) {
   x_30 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_30 = x_29;
  }
  lean_ctor_set(x_30, 0, x_10);
  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_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; lean_object* x_48; 
  x_31 = lean_ctor_get(x_5, 0);
  x_32 = lean_ctor_get(x_5, 1);
  lean_inc(x_32);
  lean_inc(x_31);
  lean_dec(x_5);
  lean_inc(x_32);
  lean_inc(x_31);
  x_33 = lean_name_mk_numeral(x_31, x_32);
  x_34 = lean_unsigned_to_nat(1u);
  x_35 = lean_nat_add(x_32, x_34);
  lean_dec(x_32);
  x_36 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_36, 0, x_31);
  lean_ctor_set(x_36, 1, x_35);
  x_37 = lean_st_ref_take(x_1, x_6);
  x_38 = lean_ctor_get(x_37, 0);
  lean_inc(x_38);
  x_39 = lean_ctor_get(x_37, 1);
  lean_inc(x_39);
  lean_dec(x_37);
  x_40 = lean_ctor_get(x_38, 0);
  lean_inc(x_40);
  x_41 = lean_ctor_get(x_38, 1);
  lean_inc(x_41);
  x_42 = lean_ctor_get(x_38, 3);
  lean_inc(x_42);
  if (lean_is_exclusive(x_38)) {
   lean_ctor_release(x_38, 0);
   lean_ctor_release(x_38, 1);
   lean_ctor_release(x_38, 2);
   lean_ctor_release(x_38, 3);
   x_43 = x_38;
  } else {
   lean_dec_ref(x_38);
   x_43 = lean_box(0);
  }
  if (lean_is_scalar(x_43)) {
   x_44 = lean_alloc_ctor(0, 4, 0);
  } else {
   x_44 = x_43;
  }
  lean_ctor_set(x_44, 0, x_40);
  lean_ctor_set(x_44, 1, x_41);
  lean_ctor_set(x_44, 2, x_36);
  lean_ctor_set(x_44, 3, x_42);
  x_45 = lean_st_ref_set(x_1, x_44, x_39);
  x_46 = lean_ctor_get(x_45, 1);
  lean_inc(x_46);
  if (lean_is_exclusive(x_45)) {
   lean_ctor_release(x_45, 0);
   lean_ctor_release(x_45, 1);
   x_47 = x_45;
  } else {
   lean_dec_ref(x_45);
   x_47 = lean_box(0);
  }
  if (lean_is_scalar(x_47)) {
   x_48 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_48 = x_47;
  }
  lean_ctor_set(x_48, 0, x_33);
  lean_ctor_set(x_48, 1, x_46);
  return x_48;
  }
  }
  }
  LEAN_EXPORT lean_object* l_Lean_mkFreshId___at_Lean_Meta_Closure_collectExprAux___spec__2(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
  _start:
  {
  lean_object* x_6; 
  x_6 = lean_alloc_closure((void*)(l_Lean_mkFreshId___at_Lean_Meta_Closure_collectExprAux___spec__2___rarg___boxed), 2, 0);
  return x_6;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_mkFreshFVarId___at_Lean_Meta_Closure_collectExprAux___spec__1(uint8_t 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; uint8_t x_9; 
  x_8 = l_Lean_mkFreshId___at_Lean_Meta_Closure_collectExprAux___spec__2___rarg(x_6, x_7);
  x_9 = !lean_is_exclusive(x_8);
  if (x_9 == 0)
  {
  return x_8;
  }
  else
  {
  lean_object* x_10; lean_object* x_11; lean_object* x_12; 
  x_10 = lean_ctor_get(x_8, 0);
  x_11 = lean_ctor_get(x_8, 1);
  lean_inc(x_11);
  lean_inc(x_10);
  lean_dec(x_8);
  x_12 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_12, 0, x_10);
  lean_ctor_set(x_12, 1, x_11);
  return x_12;
  }
  }
  }
  LEAN_EXPORT lean_object* l_List_mapM___at_Lean_Meta_Closure_collectExprAux___spec__3(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
  _start:
  {
  if (lean_obj_tag(x_1) == 0)
  {
  lean_object* x_9; lean_object* x_10; 
  x_9 = lean_box(0);
  x_10 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_10, 0, x_9);
  lean_ctor_set(x_10, 1, x_8);
  return x_10;
  }
  else
  {
  uint8_t x_11; 
  x_11 = !lean_is_exclusive(x_1);
  if (x_11 == 0)
  {
  lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18; 
  x_12 = lean_ctor_get(x_1, 0);
  x_13 = lean_ctor_get(x_1, 1);
  x_14 = l_Lean_Meta_Closure_collectLevel(x_12, x_2, x_3, x_4, x_5, x_6, x_7, x_8);
  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_List_mapM___at_Lean_Meta_Closure_collectExprAux___spec__3(x_13, x_2, x_3, x_4, x_5, x_6, x_7, x_16);
  x_18 = !lean_is_exclusive(x_17);
  if (x_18 == 0)
  {
  lean_object* x_19; 
  x_19 = lean_ctor_get(x_17, 0);
  lean_ctor_set(x_1, 1, x_19);
  lean_ctor_set(x_1, 0, x_15);
  lean_ctor_set(x_17, 0, x_1);
  return x_17;
  }
  else
  {
  lean_object* x_20; lean_object* x_21; lean_object* x_22; 
  x_20 = lean_ctor_get(x_17, 0);
  x_21 = lean_ctor_get(x_17, 1);
  lean_inc(x_21);
  lean_inc(x_20);
  lean_dec(x_17);
  lean_ctor_set(x_1, 1, x_20);
  lean_ctor_set(x_1, 0, x_15);
  x_22 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_22, 0, x_1);
  lean_ctor_set(x_22, 1, x_21);
  return x_22;
  }
  }
  else
  {
  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; lean_object* x_33; 
  x_23 = lean_ctor_get(x_1, 0);
  x_24 = lean_ctor_get(x_1, 1);
  lean_inc(x_24);
  lean_inc(x_23);
  lean_dec(x_1);
  x_25 = l_Lean_Meta_Closure_collectLevel(x_23, x_2, x_3, x_4, x_5, x_6, x_7, x_8);
  x_26 = lean_ctor_get(x_25, 0);
  lean_inc(x_26);
  x_27 = lean_ctor_get(x_25, 1);
  lean_inc(x_27);
  lean_dec(x_25);
  x_28 = l_List_mapM___at_Lean_Meta_Closure_collectExprAux___spec__3(x_24, x_2, x_3, x_4, x_5, x_6, x_7, 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);
  }
  x_32 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_32, 0, x_26);
  lean_ctor_set(x_32, 1, x_29);
  if (lean_is_scalar(x_31)) {
   x_33 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_33 = x_31;
  }
  lean_ctor_set(x_33, 0, x_32);
  lean_ctor_set(x_33, 1, x_30);
  return x_33;
  }
  }
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_collectExprAux___closed__1() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("Lean.Expr");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_collectExprAux___closed__2() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("Lean.Expr.updateMData!");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_collectExprAux___closed__3() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("mdata expected");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_collectExprAux___closed__4() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; 
  x_1 = l_Lean_Meta_Closure_collectExprAux___closed__1;
  x_2 = l_Lean_Meta_Closure_collectExprAux___closed__2;
  x_3 = lean_unsigned_to_nat(976u);
  x_4 = lean_unsigned_to_nat(19u);
  x_5 = l_Lean_Meta_Closure_collectExprAux___closed__3;
  x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5);
  return x_6;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_collectExprAux___closed__5() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("Lean.Expr.updateProj!");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_collectExprAux___closed__6() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("proj expected");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_collectExprAux___closed__7() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; 
  x_1 = l_Lean_Meta_Closure_collectExprAux___closed__1;
  x_2 = l_Lean_Meta_Closure_collectExprAux___closed__5;
  x_3 = lean_unsigned_to_nat(981u);
  x_4 = lean_unsigned_to_nat(20u);
  x_5 = l_Lean_Meta_Closure_collectExprAux___closed__6;
  x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5);
  return x_6;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_collectExprAux___closed__8() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("Lean.Expr.updateApp!");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_collectExprAux___closed__9() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("application expected");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_collectExprAux___closed__10() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; 
  x_1 = l_Lean_Meta_Closure_collectExprAux___closed__1;
  x_2 = l_Lean_Meta_Closure_collectExprAux___closed__8;
  x_3 = lean_unsigned_to_nat(941u);
  x_4 = lean_unsigned_to_nat(20u);
  x_5 = l_Lean_Meta_Closure_collectExprAux___closed__9;
  x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5);
  return x_6;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_collectExprAux___closed__11() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("Lean.Expr.updateLambdaE!");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_collectExprAux___closed__12() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("lambda expected");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_collectExprAux___closed__13() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; 
  x_1 = l_Lean_Meta_Closure_collectExprAux___closed__1;
  x_2 = l_Lean_Meta_Closure_collectExprAux___closed__11;
  x_3 = lean_unsigned_to_nat(1009u);
  x_4 = lean_unsigned_to_nat(19u);
  x_5 = l_Lean_Meta_Closure_collectExprAux___closed__12;
  x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5);
  return x_6;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_collectExprAux___closed__14() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("Lean.Expr.updateForallE!");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_collectExprAux___closed__15() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("forall expected");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_collectExprAux___closed__16() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; 
  x_1 = l_Lean_Meta_Closure_collectExprAux___closed__1;
  x_2 = l_Lean_Meta_Closure_collectExprAux___closed__14;
  x_3 = lean_unsigned_to_nat(995u);
  x_4 = lean_unsigned_to_nat(23u);
  x_5 = l_Lean_Meta_Closure_collectExprAux___closed__15;
  x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5);
  return x_6;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_collectExprAux___closed__17() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("Lean.Expr.updateLet!");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_collectExprAux___closed__18() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("let expression expected");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_collectExprAux___closed__19() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; 
  x_1 = l_Lean_Meta_Closure_collectExprAux___closed__1;
  x_2 = l_Lean_Meta_Closure_collectExprAux___closed__17;
  x_3 = lean_unsigned_to_nat(1018u);
  x_4 = lean_unsigned_to_nat(22u);
  x_5 = l_Lean_Meta_Closure_collectExprAux___closed__18;
  x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5);
  return x_6;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_collectExprAux(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
  _start:
  {
  lean_object* x_9; lean_object* x_10; lean_object* x_24; lean_object* x_25; 
  switch (lean_obj_tag(x_1)) {
  case 1:
  {
  lean_object* x_40; lean_object* x_41; 
  x_40 = lean_ctor_get(x_1, 0);
  lean_inc(x_40);
  lean_dec(x_1);
  lean_inc(x_4);
  lean_inc(x_40);
  x_41 = l_Lean_Meta_getLocalDecl(x_40, x_4, x_5, x_6, x_7, x_8);
  if (lean_obj_tag(x_41) == 0)
  {
  if (x_2 == 0)
  {
  lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; uint8_t x_48; 
  x_42 = lean_ctor_get(x_41, 1);
  lean_inc(x_42);
  lean_dec(x_41);
  x_43 = l_Lean_mkFreshFVarId___at_Lean_Meta_Closure_collectExprAux___spec__1(x_2, x_3, x_4, x_5, x_6, x_7, x_42);
  x_44 = lean_ctor_get(x_43, 0);
  lean_inc(x_44);
  x_45 = lean_ctor_get(x_43, 1);
  lean_inc(x_45);
  lean_dec(x_43);
  lean_inc(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_44);
  x_47 = l_Lean_Meta_Closure_pushToProcess(x_46, x_2, x_3, x_4, x_5, x_6, x_7, x_45);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  x_48 = !lean_is_exclusive(x_47);
  if (x_48 == 0)
  {
  lean_object* x_49; lean_object* x_50; 
  x_49 = lean_ctor_get(x_47, 0);
  lean_dec(x_49);
  x_50 = l_Lean_mkFVar(x_44);
  lean_ctor_set(x_47, 0, x_50);
  return x_47;
  }
  else
  {
  lean_object* x_51; lean_object* x_52; lean_object* x_53; 
  x_51 = lean_ctor_get(x_47, 1);
  lean_inc(x_51);
  lean_dec(x_47);
  x_52 = l_Lean_mkFVar(x_44);
  x_53 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_53, 0, x_52);
  lean_ctor_set(x_53, 1, x_51);
  return x_53;
  }
  }
  else
  {
  lean_object* x_54; lean_object* x_55; lean_object* x_56; 
  x_54 = lean_ctor_get(x_41, 0);
  lean_inc(x_54);
  x_55 = lean_ctor_get(x_41, 1);
  lean_inc(x_55);
  lean_dec(x_41);
  x_56 = l_Lean_LocalDecl_value_x3f(x_54);
  lean_dec(x_54);
  if (lean_obj_tag(x_56) == 0)
  {
  lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; uint8_t x_62; 
  x_57 = l_Lean_mkFreshFVarId___at_Lean_Meta_Closure_collectExprAux___spec__1(x_2, x_3, x_4, x_5, x_6, x_7, x_55);
  x_58 = lean_ctor_get(x_57, 0);
  lean_inc(x_58);
  x_59 = lean_ctor_get(x_57, 1);
  lean_inc(x_59);
  lean_dec(x_57);
  lean_inc(x_58);
  x_60 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_60, 0, x_40);
  lean_ctor_set(x_60, 1, x_58);
  x_61 = l_Lean_Meta_Closure_pushToProcess(x_60, x_2, x_3, x_4, x_5, x_6, x_7, x_59);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  x_62 = !lean_is_exclusive(x_61);
  if (x_62 == 0)
  {
  lean_object* x_63; lean_object* x_64; 
  x_63 = lean_ctor_get(x_61, 0);
  lean_dec(x_63);
  x_64 = l_Lean_mkFVar(x_58);
  lean_ctor_set(x_61, 0, x_64);
  return x_61;
  }
  else
  {
  lean_object* x_65; lean_object* x_66; lean_object* x_67; 
  x_65 = lean_ctor_get(x_61, 1);
  lean_inc(x_65);
  lean_dec(x_61);
  x_66 = l_Lean_mkFVar(x_58);
  x_67 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_67, 0, x_66);
  lean_ctor_set(x_67, 1, x_65);
  return x_67;
  }
  }
  else
  {
  lean_object* x_68; lean_object* x_69; 
  lean_dec(x_40);
  x_68 = lean_ctor_get(x_56, 0);
  lean_inc(x_68);
  lean_dec(x_56);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  x_69 = l_Lean_Meta_Closure_preprocess(x_68, x_2, x_3, x_4, x_5, x_6, x_7, x_55);
  if (lean_obj_tag(x_69) == 0)
  {
  uint8_t x_70; 
  x_70 = !lean_is_exclusive(x_69);
  if (x_70 == 0)
  {
  lean_object* x_71; lean_object* x_72; lean_object* x_73; uint8_t x_159; 
  x_71 = lean_ctor_get(x_69, 0);
  x_72 = lean_ctor_get(x_69, 1);
  x_159 = l_Lean_Expr_hasLevelParam(x_71);
  if (x_159 == 0)
  {
  uint8_t x_160; 
  x_160 = l_Lean_Expr_hasFVar(x_71);
  if (x_160 == 0)
  {
  uint8_t x_161; 
  x_161 = l_Lean_Expr_hasMVar(x_71);
  if (x_161 == 0)
  {
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  return x_69;
  }
  else
  {
  lean_object* x_162; 
  lean_free_object(x_69);
  x_162 = lean_box(0);
  x_73 = x_162;
  goto block_158;
  }
  }
  else
  {
  lean_object* x_163; 
  lean_free_object(x_69);
  x_163 = lean_box(0);
  x_73 = x_163;
  goto block_158;
  }
  }
  else
  {
  lean_object* x_164; 
  lean_free_object(x_69);
  x_164 = lean_box(0);
  x_73 = x_164;
  goto block_158;
  }
  block_158:
  {
  lean_object* x_74; lean_object* x_75; lean_object* x_76; uint8_t x_77; 
  lean_dec(x_73);
  x_74 = lean_st_ref_get(x_7, x_72);
  x_75 = lean_ctor_get(x_74, 1);
  lean_inc(x_75);
  lean_dec(x_74);
  x_76 = lean_st_ref_get(x_3, x_75);
  x_77 = !lean_is_exclusive(x_76);
  if (x_77 == 0)
  {
  lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; 
  x_78 = lean_ctor_get(x_76, 0);
  x_79 = lean_ctor_get(x_76, 1);
  x_80 = lean_ctor_get(x_78, 1);
  lean_inc(x_80);
  lean_dec(x_78);
  lean_inc(x_71);
  x_81 = l_Std_HashMapImp_find_x3f___at_Lean_MetavarContext_instantiateExprMVars___spec__1(x_80, x_71);
  if (lean_obj_tag(x_81) == 0)
  {
  lean_object* x_82; 
  lean_free_object(x_76);
  lean_inc(x_7);
  lean_inc(x_71);
  x_82 = l_Lean_Meta_Closure_collectExprAux(x_71, x_2, x_3, x_4, x_5, x_6, x_7, x_79);
  if (lean_obj_tag(x_82) == 0)
  {
  lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; uint8_t x_90; 
  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_85 = lean_st_ref_get(x_7, x_84);
  lean_dec(x_7);
  x_86 = lean_ctor_get(x_85, 1);
  lean_inc(x_86);
  lean_dec(x_85);
  x_87 = lean_st_ref_take(x_3, x_86);
  x_88 = lean_ctor_get(x_87, 0);
  lean_inc(x_88);
  x_89 = lean_ctor_get(x_87, 1);
  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; lean_object* x_93; uint8_t x_94; 
  x_91 = lean_ctor_get(x_88, 1);
  lean_inc(x_83);
  x_92 = l_Std_HashMap_insert___at_Lean_MetavarContext_instantiateExprMVars___spec__3(x_91, x_71, x_83);
  lean_ctor_set(x_88, 1, x_92);
  x_93 = lean_st_ref_set(x_3, x_88, x_89);
  x_94 = !lean_is_exclusive(x_93);
  if (x_94 == 0)
  {
  lean_object* x_95; 
  x_95 = lean_ctor_get(x_93, 0);
  lean_dec(x_95);
  lean_ctor_set(x_93, 0, x_83);
  return x_93;
  }
  else
  {
  lean_object* x_96; lean_object* x_97; 
  x_96 = lean_ctor_get(x_93, 1);
  lean_inc(x_96);
  lean_dec(x_93);
  x_97 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_97, 0, x_83);
  lean_ctor_set(x_97, 1, x_96);
  return x_97;
  }
  }
  else
  {
  lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; 
  x_98 = lean_ctor_get(x_88, 0);
  x_99 = lean_ctor_get(x_88, 1);
  x_100 = lean_ctor_get(x_88, 2);
  x_101 = lean_ctor_get(x_88, 3);
  x_102 = lean_ctor_get(x_88, 4);
  x_103 = lean_ctor_get(x_88, 5);
  x_104 = lean_ctor_get(x_88, 6);
  x_105 = lean_ctor_get(x_88, 7);
  x_106 = lean_ctor_get(x_88, 8);
  x_107 = lean_ctor_get(x_88, 9);
  x_108 = lean_ctor_get(x_88, 10);
  x_109 = lean_ctor_get(x_88, 11);
  lean_inc(x_109);
  lean_inc(x_108);
  lean_inc(x_107);
  lean_inc(x_106);
  lean_inc(x_105);
  lean_inc(x_104);
  lean_inc(x_103);
  lean_inc(x_102);
  lean_inc(x_101);
  lean_inc(x_100);
  lean_inc(x_99);
  lean_inc(x_98);
  lean_dec(x_88);
  lean_inc(x_83);
  x_110 = l_Std_HashMap_insert___at_Lean_MetavarContext_instantiateExprMVars___spec__3(x_99, x_71, x_83);
  x_111 = lean_alloc_ctor(0, 12, 0);
  lean_ctor_set(x_111, 0, x_98);
  lean_ctor_set(x_111, 1, x_110);
  lean_ctor_set(x_111, 2, x_100);
  lean_ctor_set(x_111, 3, x_101);
  lean_ctor_set(x_111, 4, x_102);
  lean_ctor_set(x_111, 5, x_103);
  lean_ctor_set(x_111, 6, x_104);
  lean_ctor_set(x_111, 7, x_105);
  lean_ctor_set(x_111, 8, x_106);
  lean_ctor_set(x_111, 9, x_107);
  lean_ctor_set(x_111, 10, x_108);
  lean_ctor_set(x_111, 11, x_109);
  x_112 = lean_st_ref_set(x_3, x_111, x_89);
  x_113 = lean_ctor_get(x_112, 1);
  lean_inc(x_113);
  if (lean_is_exclusive(x_112)) {
   lean_ctor_release(x_112, 0);
   lean_ctor_release(x_112, 1);
   x_114 = x_112;
  } else {
   lean_dec_ref(x_112);
   x_114 = lean_box(0);
  }
  if (lean_is_scalar(x_114)) {
   x_115 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_115 = x_114;
  }
  lean_ctor_set(x_115, 0, x_83);
  lean_ctor_set(x_115, 1, x_113);
  return x_115;
  }
  }
  else
  {
  uint8_t x_116; 
  lean_dec(x_71);
  lean_dec(x_7);
  x_116 = !lean_is_exclusive(x_82);
  if (x_116 == 0)
  {
  return x_82;
  }
  else
  {
  lean_object* x_117; lean_object* x_118; lean_object* x_119; 
  x_117 = lean_ctor_get(x_82, 0);
  x_118 = lean_ctor_get(x_82, 1);
  lean_inc(x_118);
  lean_inc(x_117);
  lean_dec(x_82);
  x_119 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_119, 0, x_117);
  lean_ctor_set(x_119, 1, x_118);
  return x_119;
  }
  }
  }
  else
  {
  lean_object* x_120; 
  lean_dec(x_71);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  x_120 = lean_ctor_get(x_81, 0);
  lean_inc(x_120);
  lean_dec(x_81);
  lean_ctor_set(x_76, 0, x_120);
  return x_76;
  }
  }
  else
  {
  lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; 
  x_121 = lean_ctor_get(x_76, 0);
  x_122 = lean_ctor_get(x_76, 1);
  lean_inc(x_122);
  lean_inc(x_121);
  lean_dec(x_76);
  x_123 = lean_ctor_get(x_121, 1);
  lean_inc(x_123);
  lean_dec(x_121);
  lean_inc(x_71);
  x_124 = l_Std_HashMapImp_find_x3f___at_Lean_MetavarContext_instantiateExprMVars___spec__1(x_123, x_71);
  if (lean_obj_tag(x_124) == 0)
  {
  lean_object* x_125; 
  lean_inc(x_7);
  lean_inc(x_71);
  x_125 = l_Lean_Meta_Closure_collectExprAux(x_71, x_2, x_3, x_4, x_5, x_6, x_7, x_122);
  if (lean_obj_tag(x_125) == 0)
  {
  lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; lean_object* x_149; lean_object* x_150; lean_object* x_151; 
  x_126 = lean_ctor_get(x_125, 0);
  lean_inc(x_126);
  x_127 = lean_ctor_get(x_125, 1);
  lean_inc(x_127);
  lean_dec(x_125);
  x_128 = lean_st_ref_get(x_7, x_127);
  lean_dec(x_7);
  x_129 = lean_ctor_get(x_128, 1);
  lean_inc(x_129);
  lean_dec(x_128);
  x_130 = lean_st_ref_take(x_3, x_129);
  x_131 = lean_ctor_get(x_130, 0);
  lean_inc(x_131);
  x_132 = lean_ctor_get(x_130, 1);
  lean_inc(x_132);
  lean_dec(x_130);
  x_133 = lean_ctor_get(x_131, 0);
  lean_inc(x_133);
  x_134 = lean_ctor_get(x_131, 1);
  lean_inc(x_134);
  x_135 = lean_ctor_get(x_131, 2);
  lean_inc(x_135);
  x_136 = lean_ctor_get(x_131, 3);
  lean_inc(x_136);
  x_137 = lean_ctor_get(x_131, 4);
  lean_inc(x_137);
  x_138 = lean_ctor_get(x_131, 5);
  lean_inc(x_138);
  x_139 = lean_ctor_get(x_131, 6);
  lean_inc(x_139);
  x_140 = lean_ctor_get(x_131, 7);
  lean_inc(x_140);
  x_141 = lean_ctor_get(x_131, 8);
  lean_inc(x_141);
  x_142 = lean_ctor_get(x_131, 9);
  lean_inc(x_142);
  x_143 = lean_ctor_get(x_131, 10);
  lean_inc(x_143);
  x_144 = lean_ctor_get(x_131, 11);
  lean_inc(x_144);
  if (lean_is_exclusive(x_131)) {
   lean_ctor_release(x_131, 0);
   lean_ctor_release(x_131, 1);
   lean_ctor_release(x_131, 2);
   lean_ctor_release(x_131, 3);
   lean_ctor_release(x_131, 4);
   lean_ctor_release(x_131, 5);
   lean_ctor_release(x_131, 6);
   lean_ctor_release(x_131, 7);
   lean_ctor_release(x_131, 8);
   lean_ctor_release(x_131, 9);
   lean_ctor_release(x_131, 10);
   lean_ctor_release(x_131, 11);
   x_145 = x_131;
  } else {
   lean_dec_ref(x_131);
   x_145 = lean_box(0);
  }
  lean_inc(x_126);
  x_146 = l_Std_HashMap_insert___at_Lean_MetavarContext_instantiateExprMVars___spec__3(x_134, x_71, x_126);
  if (lean_is_scalar(x_145)) {
   x_147 = lean_alloc_ctor(0, 12, 0);
  } else {
   x_147 = x_145;
  }
  lean_ctor_set(x_147, 0, x_133);
  lean_ctor_set(x_147, 1, x_146);
  lean_ctor_set(x_147, 2, x_135);
  lean_ctor_set(x_147, 3, x_136);
  lean_ctor_set(x_147, 4, x_137);
  lean_ctor_set(x_147, 5, x_138);
  lean_ctor_set(x_147, 6, x_139);
  lean_ctor_set(x_147, 7, x_140);
  lean_ctor_set(x_147, 8, x_141);
  lean_ctor_set(x_147, 9, x_142);
  lean_ctor_set(x_147, 10, x_143);
  lean_ctor_set(x_147, 11, x_144);
  x_148 = lean_st_ref_set(x_3, x_147, x_132);
  x_149 = lean_ctor_get(x_148, 1);
  lean_inc(x_149);
  if (lean_is_exclusive(x_148)) {
   lean_ctor_release(x_148, 0);
   lean_ctor_release(x_148, 1);
   x_150 = x_148;
  } else {
   lean_dec_ref(x_148);
   x_150 = lean_box(0);
  }
  if (lean_is_scalar(x_150)) {
   x_151 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_151 = x_150;
  }
  lean_ctor_set(x_151, 0, x_126);
  lean_ctor_set(x_151, 1, x_149);
  return x_151;
  }
  else
  {
  lean_object* x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155; 
  lean_dec(x_71);
  lean_dec(x_7);
  x_152 = lean_ctor_get(x_125, 0);
  lean_inc(x_152);
  x_153 = lean_ctor_get(x_125, 1);
  lean_inc(x_153);
  if (lean_is_exclusive(x_125)) {
   lean_ctor_release(x_125, 0);
   lean_ctor_release(x_125, 1);
   x_154 = x_125;
  } else {
   lean_dec_ref(x_125);
   x_154 = lean_box(0);
  }
  if (lean_is_scalar(x_154)) {
   x_155 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_155 = x_154;
  }
  lean_ctor_set(x_155, 0, x_152);
  lean_ctor_set(x_155, 1, x_153);
  return x_155;
  }
  }
  else
  {
  lean_object* x_156; lean_object* x_157; 
  lean_dec(x_71);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  x_156 = lean_ctor_get(x_124, 0);
  lean_inc(x_156);
  lean_dec(x_124);
  x_157 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_157, 0, x_156);
  lean_ctor_set(x_157, 1, x_122);
  return x_157;
  }
  }
  }
  }
  else
  {
  lean_object* x_165; lean_object* x_166; lean_object* x_167; uint8_t x_210; 
  x_165 = lean_ctor_get(x_69, 0);
  x_166 = lean_ctor_get(x_69, 1);
  lean_inc(x_166);
  lean_inc(x_165);
  lean_dec(x_69);
  x_210 = l_Lean_Expr_hasLevelParam(x_165);
  if (x_210 == 0)
  {
  uint8_t x_211; 
  x_211 = l_Lean_Expr_hasFVar(x_165);
  if (x_211 == 0)
  {
  uint8_t x_212; 
  x_212 = l_Lean_Expr_hasMVar(x_165);
  if (x_212 == 0)
  {
  lean_object* x_213; 
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  x_213 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_213, 0, x_165);
  lean_ctor_set(x_213, 1, x_166);
  return x_213;
  }
  else
  {
  lean_object* x_214; 
  x_214 = lean_box(0);
  x_167 = x_214;
  goto block_209;
  }
  }
  else
  {
  lean_object* x_215; 
  x_215 = lean_box(0);
  x_167 = x_215;
  goto block_209;
  }
  }
  else
  {
  lean_object* x_216; 
  x_216 = lean_box(0);
  x_167 = x_216;
  goto block_209;
  }
  block_209:
  {
  lean_object* x_168; lean_object* x_169; lean_object* x_170; lean_object* x_171; lean_object* x_172; lean_object* x_173; lean_object* x_174; lean_object* x_175; 
  lean_dec(x_167);
  x_168 = lean_st_ref_get(x_7, x_166);
  x_169 = lean_ctor_get(x_168, 1);
  lean_inc(x_169);
  lean_dec(x_168);
  x_170 = lean_st_ref_get(x_3, x_169);
  x_171 = lean_ctor_get(x_170, 0);
  lean_inc(x_171);
  x_172 = lean_ctor_get(x_170, 1);
  lean_inc(x_172);
  if (lean_is_exclusive(x_170)) {
   lean_ctor_release(x_170, 0);
   lean_ctor_release(x_170, 1);
   x_173 = x_170;
  } else {
   lean_dec_ref(x_170);
   x_173 = lean_box(0);
  }
  x_174 = lean_ctor_get(x_171, 1);
  lean_inc(x_174);
  lean_dec(x_171);
  lean_inc(x_165);
  x_175 = l_Std_HashMapImp_find_x3f___at_Lean_MetavarContext_instantiateExprMVars___spec__1(x_174, x_165);
  if (lean_obj_tag(x_175) == 0)
  {
  lean_object* x_176; 
  lean_dec(x_173);
  lean_inc(x_7);
  lean_inc(x_165);
  x_176 = l_Lean_Meta_Closure_collectExprAux(x_165, x_2, x_3, x_4, x_5, x_6, x_7, x_172);
  if (lean_obj_tag(x_176) == 0)
  {
  lean_object* x_177; lean_object* x_178; lean_object* x_179; lean_object* x_180; lean_object* x_181; lean_object* x_182; lean_object* x_183; lean_object* x_184; lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; lean_object* x_189; lean_object* x_190; lean_object* x_191; lean_object* x_192; lean_object* x_193; lean_object* x_194; lean_object* x_195; lean_object* x_196; lean_object* x_197; lean_object* x_198; lean_object* x_199; lean_object* x_200; lean_object* x_201; lean_object* x_202; 
  x_177 = lean_ctor_get(x_176, 0);
  lean_inc(x_177);
  x_178 = lean_ctor_get(x_176, 1);
  lean_inc(x_178);
  lean_dec(x_176);
  x_179 = lean_st_ref_get(x_7, x_178);
  lean_dec(x_7);
  x_180 = lean_ctor_get(x_179, 1);
  lean_inc(x_180);
  lean_dec(x_179);
  x_181 = lean_st_ref_take(x_3, x_180);
  x_182 = lean_ctor_get(x_181, 0);
  lean_inc(x_182);
  x_183 = lean_ctor_get(x_181, 1);
  lean_inc(x_183);
  lean_dec(x_181);
  x_184 = lean_ctor_get(x_182, 0);
  lean_inc(x_184);
  x_185 = lean_ctor_get(x_182, 1);
  lean_inc(x_185);
  x_186 = lean_ctor_get(x_182, 2);
  lean_inc(x_186);
  x_187 = lean_ctor_get(x_182, 3);
  lean_inc(x_187);
  x_188 = lean_ctor_get(x_182, 4);
  lean_inc(x_188);
  x_189 = lean_ctor_get(x_182, 5);
  lean_inc(x_189);
  x_190 = lean_ctor_get(x_182, 6);
  lean_inc(x_190);
  x_191 = lean_ctor_get(x_182, 7);
  lean_inc(x_191);
  x_192 = lean_ctor_get(x_182, 8);
  lean_inc(x_192);
  x_193 = lean_ctor_get(x_182, 9);
  lean_inc(x_193);
  x_194 = lean_ctor_get(x_182, 10);
  lean_inc(x_194);
  x_195 = lean_ctor_get(x_182, 11);
  lean_inc(x_195);
  if (lean_is_exclusive(x_182)) {
   lean_ctor_release(x_182, 0);
   lean_ctor_release(x_182, 1);
   lean_ctor_release(x_182, 2);
   lean_ctor_release(x_182, 3);
   lean_ctor_release(x_182, 4);
   lean_ctor_release(x_182, 5);
   lean_ctor_release(x_182, 6);
   lean_ctor_release(x_182, 7);
   lean_ctor_release(x_182, 8);
   lean_ctor_release(x_182, 9);
   lean_ctor_release(x_182, 10);
   lean_ctor_release(x_182, 11);
   x_196 = x_182;
  } else {
   lean_dec_ref(x_182);
   x_196 = lean_box(0);
  }
  lean_inc(x_177);
  x_197 = l_Std_HashMap_insert___at_Lean_MetavarContext_instantiateExprMVars___spec__3(x_185, x_165, x_177);
  if (lean_is_scalar(x_196)) {
   x_198 = lean_alloc_ctor(0, 12, 0);
  } else {
   x_198 = x_196;
  }
  lean_ctor_set(x_198, 0, x_184);
  lean_ctor_set(x_198, 1, x_197);
  lean_ctor_set(x_198, 2, x_186);
  lean_ctor_set(x_198, 3, x_187);
  lean_ctor_set(x_198, 4, x_188);
  lean_ctor_set(x_198, 5, x_189);
  lean_ctor_set(x_198, 6, x_190);
  lean_ctor_set(x_198, 7, x_191);
  lean_ctor_set(x_198, 8, x_192);
  lean_ctor_set(x_198, 9, x_193);
  lean_ctor_set(x_198, 10, x_194);
  lean_ctor_set(x_198, 11, x_195);
  x_199 = lean_st_ref_set(x_3, x_198, x_183);
  x_200 = lean_ctor_get(x_199, 1);
  lean_inc(x_200);
  if (lean_is_exclusive(x_199)) {
   lean_ctor_release(x_199, 0);
   lean_ctor_release(x_199, 1);
   x_201 = x_199;
  } else {
   lean_dec_ref(x_199);
   x_201 = lean_box(0);
  }
  if (lean_is_scalar(x_201)) {
   x_202 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_202 = x_201;
  }
  lean_ctor_set(x_202, 0, x_177);
  lean_ctor_set(x_202, 1, x_200);
  return x_202;
  }
  else
  {
  lean_object* x_203; lean_object* x_204; lean_object* x_205; lean_object* x_206; 
  lean_dec(x_165);
  lean_dec(x_7);
  x_203 = lean_ctor_get(x_176, 0);
  lean_inc(x_203);
  x_204 = lean_ctor_get(x_176, 1);
  lean_inc(x_204);
  if (lean_is_exclusive(x_176)) {
   lean_ctor_release(x_176, 0);
   lean_ctor_release(x_176, 1);
   x_205 = x_176;
  } else {
   lean_dec_ref(x_176);
   x_205 = lean_box(0);
  }
  if (lean_is_scalar(x_205)) {
   x_206 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_206 = x_205;
  }
  lean_ctor_set(x_206, 0, x_203);
  lean_ctor_set(x_206, 1, x_204);
  return x_206;
  }
  }
  else
  {
  lean_object* x_207; lean_object* x_208; 
  lean_dec(x_165);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  x_207 = lean_ctor_get(x_175, 0);
  lean_inc(x_207);
  lean_dec(x_175);
  if (lean_is_scalar(x_173)) {
   x_208 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_208 = x_173;
  }
  lean_ctor_set(x_208, 0, x_207);
  lean_ctor_set(x_208, 1, x_172);
  return x_208;
  }
  }
  }
  }
  else
  {
  uint8_t x_217; 
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  x_217 = !lean_is_exclusive(x_69);
  if (x_217 == 0)
  {
  return x_69;
  }
  else
  {
  lean_object* x_218; lean_object* x_219; lean_object* x_220; 
  x_218 = lean_ctor_get(x_69, 0);
  x_219 = lean_ctor_get(x_69, 1);
  lean_inc(x_219);
  lean_inc(x_218);
  lean_dec(x_69);
  x_220 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_220, 0, x_218);
  lean_ctor_set(x_220, 1, x_219);
  return x_220;
  }
  }
  }
  }
  }
  else
  {
  uint8_t x_221; 
  lean_dec(x_40);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  x_221 = !lean_is_exclusive(x_41);
  if (x_221 == 0)
  {
  return x_41;
  }
  else
  {
  lean_object* x_222; lean_object* x_223; lean_object* x_224; 
  x_222 = lean_ctor_get(x_41, 0);
  x_223 = lean_ctor_get(x_41, 1);
  lean_inc(x_223);
  lean_inc(x_222);
  lean_dec(x_41);
  x_224 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_224, 0, x_222);
  lean_ctor_set(x_224, 1, x_223);
  return x_224;
  }
  }
  }
  case 2:
  {
  lean_object* x_225; lean_object* x_226; 
  x_225 = lean_ctor_get(x_1, 0);
  lean_inc(x_225);
  x_226 = l_Lean_Meta_getMVarDecl(x_225, x_4, x_5, x_6, x_7, x_8);
  if (lean_obj_tag(x_226) == 0)
  {
  lean_object* x_227; lean_object* x_228; lean_object* x_229; lean_object* x_230; 
  x_227 = lean_ctor_get(x_226, 0);
  lean_inc(x_227);
  x_228 = lean_ctor_get(x_226, 1);
  lean_inc(x_228);
  lean_dec(x_226);
  x_229 = lean_ctor_get(x_227, 2);
  lean_inc(x_229);
  lean_dec(x_227);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  x_230 = l_Lean_Meta_Closure_preprocess(x_229, x_2, x_3, x_4, x_5, x_6, x_7, x_228);
  if (lean_obj_tag(x_230) == 0)
  {
  lean_object* x_231; lean_object* x_232; lean_object* x_233; lean_object* x_234; lean_object* x_285; uint8_t x_328; 
  x_231 = lean_ctor_get(x_230, 0);
  lean_inc(x_231);
  x_232 = lean_ctor_get(x_230, 1);
  lean_inc(x_232);
  lean_dec(x_230);
  x_328 = l_Lean_Expr_hasLevelParam(x_231);
  if (x_328 == 0)
  {
  uint8_t x_329; 
  x_329 = l_Lean_Expr_hasFVar(x_231);
  if (x_329 == 0)
  {
  uint8_t x_330; 
  x_330 = l_Lean_Expr_hasMVar(x_231);
  if (x_330 == 0)
  {
  x_233 = x_231;
  x_234 = x_232;
  goto block_284;
  }
  else
  {
  lean_object* x_331; 
  x_331 = lean_box(0);
  x_285 = x_331;
  goto block_327;
  }
  }
  else
  {
  lean_object* x_332; 
  x_332 = lean_box(0);
  x_285 = x_332;
  goto block_327;
  }
  }
  else
  {
  lean_object* x_333; 
  x_333 = lean_box(0);
  x_285 = x_333;
  goto block_327;
  }
  block_284:
  {
  lean_object* x_235; lean_object* x_236; lean_object* x_237; lean_object* x_238; lean_object* x_239; lean_object* x_240; lean_object* x_241; lean_object* x_242; lean_object* x_243; lean_object* x_244; lean_object* x_245; uint8_t x_246; 
  x_235 = l_Lean_mkFreshFVarId___at_Lean_Meta_Closure_collectExprAux___spec__1(x_2, x_3, x_4, x_5, x_6, x_7, x_234);
  x_236 = lean_ctor_get(x_235, 0);
  lean_inc(x_236);
  x_237 = lean_ctor_get(x_235, 1);
  lean_inc(x_237);
  lean_dec(x_235);
  x_238 = l_Lean_Meta_Closure_mkNextUserName___rarg(x_3, x_4, x_5, x_6, x_7, x_237);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  x_239 = lean_ctor_get(x_238, 0);
  lean_inc(x_239);
  x_240 = lean_ctor_get(x_238, 1);
  lean_inc(x_240);
  lean_dec(x_238);
  x_241 = lean_st_ref_get(x_7, x_240);
  lean_dec(x_7);
  x_242 = lean_ctor_get(x_241, 1);
  lean_inc(x_242);
  lean_dec(x_241);
  x_243 = lean_st_ref_take(x_3, x_242);
  x_244 = lean_ctor_get(x_243, 0);
  lean_inc(x_244);
  x_245 = lean_ctor_get(x_243, 1);
  lean_inc(x_245);
  lean_dec(x_243);
  x_246 = !lean_is_exclusive(x_244);
  if (x_246 == 0)
  {
  lean_object* x_247; lean_object* x_248; lean_object* x_249; uint8_t x_250; lean_object* x_251; lean_object* x_252; lean_object* x_253; lean_object* x_254; uint8_t x_255; 
  x_247 = lean_ctor_get(x_244, 6);
  x_248 = lean_ctor_get(x_244, 9);
  x_249 = lean_unsigned_to_nat(0u);
  x_250 = 0;
  lean_inc(x_236);
  x_251 = lean_alloc_ctor(0, 4, 1);
  lean_ctor_set(x_251, 0, x_249);
  lean_ctor_set(x_251, 1, x_236);
  lean_ctor_set(x_251, 2, x_239);
  lean_ctor_set(x_251, 3, x_233);
  lean_ctor_set_uint8(x_251, sizeof(void*)*4, x_250);
  x_252 = lean_array_push(x_247, x_251);
  x_253 = lean_array_push(x_248, x_1);
  lean_ctor_set(x_244, 9, x_253);
  lean_ctor_set(x_244, 6, x_252);
  x_254 = lean_st_ref_set(x_3, x_244, x_245);
  x_255 = !lean_is_exclusive(x_254);
  if (x_255 == 0)
  {
  lean_object* x_256; lean_object* x_257; 
  x_256 = lean_ctor_get(x_254, 0);
  lean_dec(x_256);
  x_257 = l_Lean_mkFVar(x_236);
  lean_ctor_set(x_254, 0, x_257);
  return x_254;
  }
  else
  {
  lean_object* x_258; lean_object* x_259; lean_object* x_260; 
  x_258 = lean_ctor_get(x_254, 1);
  lean_inc(x_258);
  lean_dec(x_254);
  x_259 = l_Lean_mkFVar(x_236);
  x_260 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_260, 0, x_259);
  lean_ctor_set(x_260, 1, x_258);
  return x_260;
  }
  }
  else
  {
  lean_object* x_261; lean_object* x_262; lean_object* x_263; lean_object* x_264; lean_object* x_265; lean_object* x_266; lean_object* x_267; lean_object* x_268; lean_object* x_269; lean_object* x_270; lean_object* x_271; lean_object* x_272; lean_object* x_273; uint8_t x_274; lean_object* x_275; lean_object* x_276; lean_object* x_277; lean_object* x_278; lean_object* x_279; lean_object* x_280; lean_object* x_281; lean_object* x_282; lean_object* x_283; 
  x_261 = lean_ctor_get(x_244, 0);
  x_262 = lean_ctor_get(x_244, 1);
  x_263 = lean_ctor_get(x_244, 2);
  x_264 = lean_ctor_get(x_244, 3);
  x_265 = lean_ctor_get(x_244, 4);
  x_266 = lean_ctor_get(x_244, 5);
  x_267 = lean_ctor_get(x_244, 6);
  x_268 = lean_ctor_get(x_244, 7);
  x_269 = lean_ctor_get(x_244, 8);
  x_270 = lean_ctor_get(x_244, 9);
  x_271 = lean_ctor_get(x_244, 10);
  x_272 = lean_ctor_get(x_244, 11);
  lean_inc(x_272);
  lean_inc(x_271);
  lean_inc(x_270);
  lean_inc(x_269);
  lean_inc(x_268);
  lean_inc(x_267);
  lean_inc(x_266);
  lean_inc(x_265);
  lean_inc(x_264);
  lean_inc(x_263);
  lean_inc(x_262);
  lean_inc(x_261);
  lean_dec(x_244);
  x_273 = lean_unsigned_to_nat(0u);
  x_274 = 0;
  lean_inc(x_236);
  x_275 = lean_alloc_ctor(0, 4, 1);
  lean_ctor_set(x_275, 0, x_273);
  lean_ctor_set(x_275, 1, x_236);
  lean_ctor_set(x_275, 2, x_239);
  lean_ctor_set(x_275, 3, x_233);
  lean_ctor_set_uint8(x_275, sizeof(void*)*4, x_274);
  x_276 = lean_array_push(x_267, x_275);
  x_277 = lean_array_push(x_270, x_1);
  x_278 = lean_alloc_ctor(0, 12, 0);
  lean_ctor_set(x_278, 0, x_261);
  lean_ctor_set(x_278, 1, x_262);
  lean_ctor_set(x_278, 2, x_263);
  lean_ctor_set(x_278, 3, x_264);
  lean_ctor_set(x_278, 4, x_265);
  lean_ctor_set(x_278, 5, x_266);
  lean_ctor_set(x_278, 6, x_276);
  lean_ctor_set(x_278, 7, x_268);
  lean_ctor_set(x_278, 8, x_269);
  lean_ctor_set(x_278, 9, x_277);
  lean_ctor_set(x_278, 10, x_271);
  lean_ctor_set(x_278, 11, x_272);
  x_279 = lean_st_ref_set(x_3, x_278, x_245);
  x_280 = lean_ctor_get(x_279, 1);
  lean_inc(x_280);
  if (lean_is_exclusive(x_279)) {
   lean_ctor_release(x_279, 0);
   lean_ctor_release(x_279, 1);
   x_281 = x_279;
  } else {
   lean_dec_ref(x_279);
   x_281 = lean_box(0);
  }
  x_282 = l_Lean_mkFVar(x_236);
  if (lean_is_scalar(x_281)) {
   x_283 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_283 = x_281;
  }
  lean_ctor_set(x_283, 0, x_282);
  lean_ctor_set(x_283, 1, x_280);
  return x_283;
  }
  }
  block_327:
  {
  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_dec(x_285);
  x_286 = lean_st_ref_get(x_7, x_232);
  x_287 = lean_ctor_get(x_286, 1);
  lean_inc(x_287);
  lean_dec(x_286);
  x_288 = lean_st_ref_get(x_3, x_287);
  x_289 = lean_ctor_get(x_288, 0);
  lean_inc(x_289);
  x_290 = lean_ctor_get(x_288, 1);
  lean_inc(x_290);
  lean_dec(x_288);
  x_291 = lean_ctor_get(x_289, 1);
  lean_inc(x_291);
  lean_dec(x_289);
  lean_inc(x_231);
  x_292 = l_Std_HashMapImp_find_x3f___at_Lean_MetavarContext_instantiateExprMVars___spec__1(x_291, x_231);
  if (lean_obj_tag(x_292) == 0)
  {
  lean_object* x_293; 
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_231);
  x_293 = l_Lean_Meta_Closure_collectExprAux(x_231, x_2, x_3, x_4, x_5, x_6, x_7, x_290);
  if (lean_obj_tag(x_293) == 0)
  {
  lean_object* x_294; lean_object* x_295; lean_object* x_296; lean_object* x_297; lean_object* x_298; lean_object* x_299; lean_object* x_300; uint8_t x_301; 
  x_294 = lean_ctor_get(x_293, 0);
  lean_inc(x_294);
  x_295 = lean_ctor_get(x_293, 1);
  lean_inc(x_295);
  lean_dec(x_293);
  x_296 = lean_st_ref_get(x_7, x_295);
  x_297 = lean_ctor_get(x_296, 1);
  lean_inc(x_297);
  lean_dec(x_296);
  x_298 = lean_st_ref_take(x_3, x_297);
  x_299 = lean_ctor_get(x_298, 0);
  lean_inc(x_299);
  x_300 = lean_ctor_get(x_298, 1);
  lean_inc(x_300);
  lean_dec(x_298);
  x_301 = !lean_is_exclusive(x_299);
  if (x_301 == 0)
  {
  lean_object* x_302; lean_object* x_303; lean_object* x_304; lean_object* x_305; 
  x_302 = lean_ctor_get(x_299, 1);
  lean_inc(x_294);
  x_303 = l_Std_HashMap_insert___at_Lean_MetavarContext_instantiateExprMVars___spec__3(x_302, x_231, x_294);
  lean_ctor_set(x_299, 1, x_303);
  x_304 = lean_st_ref_set(x_3, x_299, x_300);
  x_305 = lean_ctor_get(x_304, 1);
  lean_inc(x_305);
  lean_dec(x_304);
  x_233 = x_294;
  x_234 = x_305;
  goto block_284;
  }
  else
  {
  lean_object* x_306; lean_object* x_307; lean_object* x_308; lean_object* x_309; lean_object* x_310; lean_object* x_311; lean_object* x_312; 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_306 = lean_ctor_get(x_299, 0);
  x_307 = lean_ctor_get(x_299, 1);
  x_308 = lean_ctor_get(x_299, 2);
  x_309 = lean_ctor_get(x_299, 3);
  x_310 = lean_ctor_get(x_299, 4);
  x_311 = lean_ctor_get(x_299, 5);
  x_312 = lean_ctor_get(x_299, 6);
  x_313 = lean_ctor_get(x_299, 7);
  x_314 = lean_ctor_get(x_299, 8);
  x_315 = lean_ctor_get(x_299, 9);
  x_316 = lean_ctor_get(x_299, 10);
  x_317 = lean_ctor_get(x_299, 11);
  lean_inc(x_317);
  lean_inc(x_316);
  lean_inc(x_315);
  lean_inc(x_314);
  lean_inc(x_313);
  lean_inc(x_312);
  lean_inc(x_311);
  lean_inc(x_310);
  lean_inc(x_309);
  lean_inc(x_308);
  lean_inc(x_307);
  lean_inc(x_306);
  lean_dec(x_299);
  lean_inc(x_294);
  x_318 = l_Std_HashMap_insert___at_Lean_MetavarContext_instantiateExprMVars___spec__3(x_307, x_231, x_294);
  x_319 = lean_alloc_ctor(0, 12, 0);
  lean_ctor_set(x_319, 0, x_306);
  lean_ctor_set(x_319, 1, x_318);
  lean_ctor_set(x_319, 2, x_308);
  lean_ctor_set(x_319, 3, x_309);
  lean_ctor_set(x_319, 4, x_310);
  lean_ctor_set(x_319, 5, x_311);
  lean_ctor_set(x_319, 6, x_312);
  lean_ctor_set(x_319, 7, x_313);
  lean_ctor_set(x_319, 8, x_314);
  lean_ctor_set(x_319, 9, x_315);
  lean_ctor_set(x_319, 10, x_316);
  lean_ctor_set(x_319, 11, x_317);
  x_320 = lean_st_ref_set(x_3, x_319, x_300);
  x_321 = lean_ctor_get(x_320, 1);
  lean_inc(x_321);
  lean_dec(x_320);
  x_233 = x_294;
  x_234 = x_321;
  goto block_284;
  }
  }
  else
  {
  uint8_t x_322; 
  lean_dec(x_231);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_1);
  x_322 = !lean_is_exclusive(x_293);
  if (x_322 == 0)
  {
  return x_293;
  }
  else
  {
  lean_object* x_323; lean_object* x_324; lean_object* x_325; 
  x_323 = lean_ctor_get(x_293, 0);
  x_324 = lean_ctor_get(x_293, 1);
  lean_inc(x_324);
  lean_inc(x_323);
  lean_dec(x_293);
  x_325 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_325, 0, x_323);
  lean_ctor_set(x_325, 1, x_324);
  return x_325;
  }
  }
  }
  else
  {
  lean_object* x_326; 
  lean_dec(x_231);
  x_326 = lean_ctor_get(x_292, 0);
  lean_inc(x_326);
  lean_dec(x_292);
  x_233 = x_326;
  x_234 = x_290;
  goto block_284;
  }
  }
  }
  else
  {
  uint8_t x_334; 
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_1);
  x_334 = !lean_is_exclusive(x_230);
  if (x_334 == 0)
  {
  return x_230;
  }
  else
  {
  lean_object* x_335; lean_object* x_336; lean_object* x_337; 
  x_335 = lean_ctor_get(x_230, 0);
  x_336 = lean_ctor_get(x_230, 1);
  lean_inc(x_336);
  lean_inc(x_335);
  lean_dec(x_230);
  x_337 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_337, 0, x_335);
  lean_ctor_set(x_337, 1, x_336);
  return x_337;
  }
  }
  }
  else
  {
  uint8_t x_338; 
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_1);
  x_338 = !lean_is_exclusive(x_226);
  if (x_338 == 0)
  {
  return x_226;
  }
  else
  {
  lean_object* x_339; lean_object* x_340; lean_object* x_341; 
  x_339 = lean_ctor_get(x_226, 0);
  x_340 = lean_ctor_get(x_226, 1);
  lean_inc(x_340);
  lean_inc(x_339);
  lean_dec(x_226);
  x_341 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_341, 0, x_339);
  lean_ctor_set(x_341, 1, x_340);
  return x_341;
  }
  }
  }
  case 3:
  {
  uint8_t x_342; 
  x_342 = !lean_is_exclusive(x_1);
  if (x_342 == 0)
  {
  lean_object* x_343; lean_object* x_344; uint8_t x_345; 
  x_343 = lean_ctor_get(x_1, 0);
  lean_inc(x_343);
  x_344 = l_Lean_Meta_Closure_collectLevel(x_343, x_2, x_3, x_4, x_5, x_6, x_7, x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  x_345 = !lean_is_exclusive(x_344);
  if (x_345 == 0)
  {
  lean_object* x_346; lean_object* x_347; 
  x_346 = lean_ctor_get(x_344, 0);
  x_347 = lean_expr_update_sort(x_1, x_346);
  lean_ctor_set(x_344, 0, x_347);
  return x_344;
  }
  else
  {
  lean_object* x_348; lean_object* x_349; lean_object* x_350; lean_object* x_351; 
  x_348 = lean_ctor_get(x_344, 0);
  x_349 = lean_ctor_get(x_344, 1);
  lean_inc(x_349);
  lean_inc(x_348);
  lean_dec(x_344);
  x_350 = lean_expr_update_sort(x_1, x_348);
  x_351 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_351, 0, x_350);
  lean_ctor_set(x_351, 1, x_349);
  return x_351;
  }
  }
  else
  {
  lean_object* x_352; uint64_t x_353; lean_object* x_354; lean_object* x_355; lean_object* x_356; lean_object* x_357; lean_object* x_358; lean_object* x_359; lean_object* x_360; 
  x_352 = lean_ctor_get(x_1, 0);
  x_353 = lean_ctor_get_uint64(x_1, sizeof(void*)*1);
  lean_inc(x_352);
  lean_dec(x_1);
  lean_inc(x_352);
  x_354 = l_Lean_Meta_Closure_collectLevel(x_352, x_2, x_3, x_4, x_5, x_6, x_7, x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  x_355 = lean_ctor_get(x_354, 0);
  lean_inc(x_355);
  x_356 = lean_ctor_get(x_354, 1);
  lean_inc(x_356);
  if (lean_is_exclusive(x_354)) {
   lean_ctor_release(x_354, 0);
   lean_ctor_release(x_354, 1);
   x_357 = x_354;
  } else {
   lean_dec_ref(x_354);
   x_357 = lean_box(0);
  }
  x_358 = lean_alloc_ctor(3, 1, 8);
  lean_ctor_set(x_358, 0, x_352);
  lean_ctor_set_uint64(x_358, sizeof(void*)*1, x_353);
  x_359 = lean_expr_update_sort(x_358, x_355);
  if (lean_is_scalar(x_357)) {
   x_360 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_360 = x_357;
  }
  lean_ctor_set(x_360, 0, x_359);
  lean_ctor_set(x_360, 1, x_356);
  return x_360;
  }
  }
  case 4:
  {
  uint8_t x_361; 
  x_361 = !lean_is_exclusive(x_1);
  if (x_361 == 0)
  {
  lean_object* x_362; lean_object* x_363; uint8_t x_364; 
  x_362 = lean_ctor_get(x_1, 1);
  lean_inc(x_362);
  x_363 = l_List_mapM___at_Lean_Meta_Closure_collectExprAux___spec__3(x_362, x_2, x_3, x_4, x_5, x_6, x_7, x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  x_364 = !lean_is_exclusive(x_363);
  if (x_364 == 0)
  {
  lean_object* x_365; lean_object* x_366; 
  x_365 = lean_ctor_get(x_363, 0);
  x_366 = lean_expr_update_const(x_1, x_365);
  lean_ctor_set(x_363, 0, x_366);
  return x_363;
  }
  else
  {
  lean_object* x_367; lean_object* x_368; lean_object* x_369; lean_object* x_370; 
  x_367 = lean_ctor_get(x_363, 0);
  x_368 = lean_ctor_get(x_363, 1);
  lean_inc(x_368);
  lean_inc(x_367);
  lean_dec(x_363);
  x_369 = lean_expr_update_const(x_1, x_367);
  x_370 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_370, 0, x_369);
  lean_ctor_set(x_370, 1, x_368);
  return x_370;
  }
  }
  else
  {
  lean_object* x_371; lean_object* x_372; uint64_t x_373; lean_object* x_374; lean_object* x_375; lean_object* x_376; lean_object* x_377; lean_object* x_378; lean_object* x_379; lean_object* x_380; 
  x_371 = lean_ctor_get(x_1, 0);
  x_372 = lean_ctor_get(x_1, 1);
  x_373 = lean_ctor_get_uint64(x_1, sizeof(void*)*2);
  lean_inc(x_372);
  lean_inc(x_371);
  lean_dec(x_1);
  lean_inc(x_372);
  x_374 = l_List_mapM___at_Lean_Meta_Closure_collectExprAux___spec__3(x_372, x_2, x_3, x_4, x_5, x_6, x_7, x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  x_375 = lean_ctor_get(x_374, 0);
  lean_inc(x_375);
  x_376 = lean_ctor_get(x_374, 1);
  lean_inc(x_376);
  if (lean_is_exclusive(x_374)) {
   lean_ctor_release(x_374, 0);
   lean_ctor_release(x_374, 1);
   x_377 = x_374;
  } else {
   lean_dec_ref(x_374);
   x_377 = lean_box(0);
  }
  x_378 = lean_alloc_ctor(4, 2, 8);
  lean_ctor_set(x_378, 0, x_371);
  lean_ctor_set(x_378, 1, x_372);
  lean_ctor_set_uint64(x_378, sizeof(void*)*2, x_373);
  x_379 = lean_expr_update_const(x_378, x_375);
  if (lean_is_scalar(x_377)) {
   x_380 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_380 = x_377;
  }
  lean_ctor_set(x_380, 0, x_379);
  lean_ctor_set(x_380, 1, x_376);
  return x_380;
  }
  }
  case 5:
  {
  lean_object* x_381; lean_object* x_382; lean_object* x_383; lean_object* x_384; lean_object* x_450; uint8_t x_493; 
  x_381 = lean_ctor_get(x_1, 0);
  lean_inc(x_381);
  x_382 = lean_ctor_get(x_1, 1);
  lean_inc(x_382);
  x_493 = l_Lean_Expr_hasLevelParam(x_381);
  if (x_493 == 0)
  {
  uint8_t x_494; 
  x_494 = l_Lean_Expr_hasFVar(x_381);
  if (x_494 == 0)
  {
  uint8_t x_495; 
  x_495 = l_Lean_Expr_hasMVar(x_381);
  if (x_495 == 0)
  {
  x_383 = x_381;
  x_384 = x_8;
  goto block_449;
  }
  else
  {
  lean_object* x_496; 
  x_496 = lean_box(0);
  x_450 = x_496;
  goto block_492;
  }
  }
  else
  {
  lean_object* x_497; 
  x_497 = lean_box(0);
  x_450 = x_497;
  goto block_492;
  }
  }
  else
  {
  lean_object* x_498; 
  x_498 = lean_box(0);
  x_450 = x_498;
  goto block_492;
  }
  block_449:
  {
  lean_object* x_385; lean_object* x_386; lean_object* x_400; uint8_t x_443; 
  x_443 = l_Lean_Expr_hasLevelParam(x_382);
  if (x_443 == 0)
  {
  uint8_t x_444; 
  x_444 = l_Lean_Expr_hasFVar(x_382);
  if (x_444 == 0)
  {
  uint8_t x_445; 
  x_445 = l_Lean_Expr_hasMVar(x_382);
  if (x_445 == 0)
  {
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  x_385 = x_382;
  x_386 = x_384;
  goto block_399;
  }
  else
  {
  lean_object* x_446; 
  x_446 = lean_box(0);
  x_400 = x_446;
  goto block_442;
  }
  }
  else
  {
  lean_object* x_447; 
  x_447 = lean_box(0);
  x_400 = x_447;
  goto block_442;
  }
  }
  else
  {
  lean_object* x_448; 
  x_448 = lean_box(0);
  x_400 = x_448;
  goto block_442;
  }
  block_399:
  {
  if (lean_obj_tag(x_1) == 5)
  {
  uint8_t x_387; 
  x_387 = !lean_is_exclusive(x_1);
  if (x_387 == 0)
  {
  lean_object* x_388; lean_object* x_389; 
  x_388 = lean_expr_update_app(x_1, x_383, x_385);
  x_389 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_389, 0, x_388);
  lean_ctor_set(x_389, 1, x_386);
  return x_389;
  }
  else
  {
  lean_object* x_390; lean_object* x_391; uint64_t x_392; lean_object* x_393; lean_object* x_394; lean_object* x_395; 
  x_390 = lean_ctor_get(x_1, 0);
  x_391 = lean_ctor_get(x_1, 1);
  x_392 = lean_ctor_get_uint64(x_1, sizeof(void*)*2);
  lean_inc(x_391);
  lean_inc(x_390);
  lean_dec(x_1);
  x_393 = lean_alloc_ctor(5, 2, 8);
  lean_ctor_set(x_393, 0, x_390);
  lean_ctor_set(x_393, 1, x_391);
  lean_ctor_set_uint64(x_393, sizeof(void*)*2, x_392);
  x_394 = lean_expr_update_app(x_393, x_383, x_385);
  x_395 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_395, 0, x_394);
  lean_ctor_set(x_395, 1, x_386);
  return x_395;
  }
  }
  else
  {
  lean_object* x_396; lean_object* x_397; lean_object* x_398; 
  lean_dec(x_385);
  lean_dec(x_383);
  lean_dec(x_1);
  x_396 = l_Lean_Meta_Closure_collectExprAux___closed__10;
  x_397 = l_panic___at_Lean_Expr_getRevArg_x21___spec__1(x_396);
  x_398 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_398, 0, x_397);
  lean_ctor_set(x_398, 1, x_386);
  return x_398;
  }
  }
  block_442:
  {
  lean_object* x_401; lean_object* x_402; lean_object* x_403; lean_object* x_404; lean_object* x_405; lean_object* x_406; lean_object* x_407; 
  lean_dec(x_400);
  x_401 = lean_st_ref_get(x_7, x_384);
  x_402 = lean_ctor_get(x_401, 1);
  lean_inc(x_402);
  lean_dec(x_401);
  x_403 = lean_st_ref_get(x_3, x_402);
  x_404 = lean_ctor_get(x_403, 0);
  lean_inc(x_404);
  x_405 = lean_ctor_get(x_403, 1);
  lean_inc(x_405);
  lean_dec(x_403);
  x_406 = lean_ctor_get(x_404, 1);
  lean_inc(x_406);
  lean_dec(x_404);
  lean_inc(x_382);
  x_407 = l_Std_HashMapImp_find_x3f___at_Lean_MetavarContext_instantiateExprMVars___spec__1(x_406, x_382);
  if (lean_obj_tag(x_407) == 0)
  {
  lean_object* x_408; 
  lean_inc(x_7);
  lean_inc(x_382);
  x_408 = l_Lean_Meta_Closure_collectExprAux(x_382, x_2, x_3, x_4, x_5, x_6, x_7, x_405);
  if (lean_obj_tag(x_408) == 0)
  {
  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; uint8_t x_416; 
  x_409 = lean_ctor_get(x_408, 0);
  lean_inc(x_409);
  x_410 = lean_ctor_get(x_408, 1);
  lean_inc(x_410);
  lean_dec(x_408);
  x_411 = lean_st_ref_get(x_7, x_410);
  lean_dec(x_7);
  x_412 = lean_ctor_get(x_411, 1);
  lean_inc(x_412);
  lean_dec(x_411);
  x_413 = lean_st_ref_take(x_3, x_412);
  x_414 = lean_ctor_get(x_413, 0);
  lean_inc(x_414);
  x_415 = lean_ctor_get(x_413, 1);
  lean_inc(x_415);
  lean_dec(x_413);
  x_416 = !lean_is_exclusive(x_414);
  if (x_416 == 0)
  {
  lean_object* x_417; lean_object* x_418; lean_object* x_419; lean_object* x_420; 
  x_417 = lean_ctor_get(x_414, 1);
  lean_inc(x_409);
  x_418 = l_Std_HashMap_insert___at_Lean_MetavarContext_instantiateExprMVars___spec__3(x_417, x_382, x_409);
  lean_ctor_set(x_414, 1, x_418);
  x_419 = lean_st_ref_set(x_3, x_414, x_415);
  x_420 = lean_ctor_get(x_419, 1);
  lean_inc(x_420);
  lean_dec(x_419);
  x_385 = x_409;
  x_386 = x_420;
  goto block_399;
  }
  else
  {
  lean_object* x_421; lean_object* x_422; lean_object* x_423; lean_object* x_424; lean_object* x_425; lean_object* x_426; lean_object* x_427; lean_object* x_428; lean_object* x_429; lean_object* x_430; lean_object* x_431; lean_object* x_432; lean_object* x_433; lean_object* x_434; lean_object* x_435; lean_object* x_436; 
  x_421 = lean_ctor_get(x_414, 0);
  x_422 = lean_ctor_get(x_414, 1);
  x_423 = lean_ctor_get(x_414, 2);
  x_424 = lean_ctor_get(x_414, 3);
  x_425 = lean_ctor_get(x_414, 4);
  x_426 = lean_ctor_get(x_414, 5);
  x_427 = lean_ctor_get(x_414, 6);
  x_428 = lean_ctor_get(x_414, 7);
  x_429 = lean_ctor_get(x_414, 8);
  x_430 = lean_ctor_get(x_414, 9);
  x_431 = lean_ctor_get(x_414, 10);
  x_432 = lean_ctor_get(x_414, 11);
  lean_inc(x_432);
  lean_inc(x_431);
  lean_inc(x_430);
  lean_inc(x_429);
  lean_inc(x_428);
  lean_inc(x_427);
  lean_inc(x_426);
  lean_inc(x_425);
  lean_inc(x_424);
  lean_inc(x_423);
  lean_inc(x_422);
  lean_inc(x_421);
  lean_dec(x_414);
  lean_inc(x_409);
  x_433 = l_Std_HashMap_insert___at_Lean_MetavarContext_instantiateExprMVars___spec__3(x_422, x_382, x_409);
  x_434 = lean_alloc_ctor(0, 12, 0);
  lean_ctor_set(x_434, 0, x_421);
  lean_ctor_set(x_434, 1, x_433);
  lean_ctor_set(x_434, 2, x_423);
  lean_ctor_set(x_434, 3, x_424);
  lean_ctor_set(x_434, 4, x_425);
  lean_ctor_set(x_434, 5, x_426);
  lean_ctor_set(x_434, 6, x_427);
  lean_ctor_set(x_434, 7, x_428);
  lean_ctor_set(x_434, 8, x_429);
  lean_ctor_set(x_434, 9, x_430);
  lean_ctor_set(x_434, 10, x_431);
  lean_ctor_set(x_434, 11, x_432);
  x_435 = lean_st_ref_set(x_3, x_434, x_415);
  x_436 = lean_ctor_get(x_435, 1);
  lean_inc(x_436);
  lean_dec(x_435);
  x_385 = x_409;
  x_386 = x_436;
  goto block_399;
  }
  }
  else
  {
  uint8_t x_437; 
  lean_dec(x_383);
  lean_dec(x_382);
  lean_dec(x_7);
  lean_dec(x_1);
  x_437 = !lean_is_exclusive(x_408);
  if (x_437 == 0)
  {
  return x_408;
  }
  else
  {
  lean_object* x_438; lean_object* x_439; lean_object* x_440; 
  x_438 = lean_ctor_get(x_408, 0);
  x_439 = lean_ctor_get(x_408, 1);
  lean_inc(x_439);
  lean_inc(x_438);
  lean_dec(x_408);
  x_440 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_440, 0, x_438);
  lean_ctor_set(x_440, 1, x_439);
  return x_440;
  }
  }
  }
  else
  {
  lean_object* x_441; 
  lean_dec(x_382);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  x_441 = lean_ctor_get(x_407, 0);
  lean_inc(x_441);
  lean_dec(x_407);
  x_385 = x_441;
  x_386 = x_405;
  goto block_399;
  }
  }
  }
  block_492:
  {
  lean_object* x_451; lean_object* x_452; lean_object* x_453; lean_object* x_454; lean_object* x_455; lean_object* x_456; lean_object* x_457; 
  lean_dec(x_450);
  x_451 = lean_st_ref_get(x_7, x_8);
  x_452 = lean_ctor_get(x_451, 1);
  lean_inc(x_452);
  lean_dec(x_451);
  x_453 = lean_st_ref_get(x_3, x_452);
  x_454 = lean_ctor_get(x_453, 0);
  lean_inc(x_454);
  x_455 = lean_ctor_get(x_453, 1);
  lean_inc(x_455);
  lean_dec(x_453);
  x_456 = lean_ctor_get(x_454, 1);
  lean_inc(x_456);
  lean_dec(x_454);
  lean_inc(x_381);
  x_457 = l_Std_HashMapImp_find_x3f___at_Lean_MetavarContext_instantiateExprMVars___spec__1(x_456, x_381);
  if (lean_obj_tag(x_457) == 0)
  {
  lean_object* x_458; 
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_381);
  x_458 = l_Lean_Meta_Closure_collectExprAux(x_381, x_2, x_3, x_4, x_5, x_6, x_7, x_455);
  if (lean_obj_tag(x_458) == 0)
  {
  lean_object* x_459; lean_object* x_460; lean_object* x_461; lean_object* x_462; lean_object* x_463; lean_object* x_464; lean_object* x_465; uint8_t x_466; 
  x_459 = lean_ctor_get(x_458, 0);
  lean_inc(x_459);
  x_460 = lean_ctor_get(x_458, 1);
  lean_inc(x_460);
  lean_dec(x_458);
  x_461 = lean_st_ref_get(x_7, x_460);
  x_462 = lean_ctor_get(x_461, 1);
  lean_inc(x_462);
  lean_dec(x_461);
  x_463 = lean_st_ref_take(x_3, x_462);
  x_464 = lean_ctor_get(x_463, 0);
  lean_inc(x_464);
  x_465 = lean_ctor_get(x_463, 1);
  lean_inc(x_465);
  lean_dec(x_463);
  x_466 = !lean_is_exclusive(x_464);
  if (x_466 == 0)
  {
  lean_object* x_467; lean_object* x_468; lean_object* x_469; lean_object* x_470; 
  x_467 = lean_ctor_get(x_464, 1);
  lean_inc(x_459);
  x_468 = l_Std_HashMap_insert___at_Lean_MetavarContext_instantiateExprMVars___spec__3(x_467, x_381, x_459);
  lean_ctor_set(x_464, 1, x_468);
  x_469 = lean_st_ref_set(x_3, x_464, x_465);
  x_470 = lean_ctor_get(x_469, 1);
  lean_inc(x_470);
  lean_dec(x_469);
  x_383 = x_459;
  x_384 = x_470;
  goto block_449;
  }
  else
  {
  lean_object* x_471; lean_object* x_472; lean_object* x_473; lean_object* x_474; lean_object* x_475; lean_object* x_476; lean_object* x_477; lean_object* x_478; lean_object* x_479; lean_object* x_480; lean_object* x_481; lean_object* x_482; lean_object* x_483; lean_object* x_484; lean_object* x_485; lean_object* x_486; 
  x_471 = lean_ctor_get(x_464, 0);
  x_472 = lean_ctor_get(x_464, 1);
  x_473 = lean_ctor_get(x_464, 2);
  x_474 = lean_ctor_get(x_464, 3);
  x_475 = lean_ctor_get(x_464, 4);
  x_476 = lean_ctor_get(x_464, 5);
  x_477 = lean_ctor_get(x_464, 6);
  x_478 = lean_ctor_get(x_464, 7);
  x_479 = lean_ctor_get(x_464, 8);
  x_480 = lean_ctor_get(x_464, 9);
  x_481 = lean_ctor_get(x_464, 10);
  x_482 = lean_ctor_get(x_464, 11);
  lean_inc(x_482);
  lean_inc(x_481);
  lean_inc(x_480);
  lean_inc(x_479);
  lean_inc(x_478);
  lean_inc(x_477);
  lean_inc(x_476);
  lean_inc(x_475);
  lean_inc(x_474);
  lean_inc(x_473);
  lean_inc(x_472);
  lean_inc(x_471);
  lean_dec(x_464);
  lean_inc(x_459);
  x_483 = l_Std_HashMap_insert___at_Lean_MetavarContext_instantiateExprMVars___spec__3(x_472, x_381, x_459);
  x_484 = lean_alloc_ctor(0, 12, 0);
  lean_ctor_set(x_484, 0, x_471);
  lean_ctor_set(x_484, 1, x_483);
  lean_ctor_set(x_484, 2, x_473);
  lean_ctor_set(x_484, 3, x_474);
  lean_ctor_set(x_484, 4, x_475);
  lean_ctor_set(x_484, 5, x_476);
  lean_ctor_set(x_484, 6, x_477);
  lean_ctor_set(x_484, 7, x_478);
  lean_ctor_set(x_484, 8, x_479);
  lean_ctor_set(x_484, 9, x_480);
  lean_ctor_set(x_484, 10, x_481);
  lean_ctor_set(x_484, 11, x_482);
  x_485 = lean_st_ref_set(x_3, x_484, x_465);
  x_486 = lean_ctor_get(x_485, 1);
  lean_inc(x_486);
  lean_dec(x_485);
  x_383 = x_459;
  x_384 = x_486;
  goto block_449;
  }
  }
  else
  {
  uint8_t x_487; 
  lean_dec(x_382);
  lean_dec(x_381);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_1);
  x_487 = !lean_is_exclusive(x_458);
  if (x_487 == 0)
  {
  return x_458;
  }
  else
  {
  lean_object* x_488; lean_object* x_489; lean_object* x_490; 
  x_488 = lean_ctor_get(x_458, 0);
  x_489 = lean_ctor_get(x_458, 1);
  lean_inc(x_489);
  lean_inc(x_488);
  lean_dec(x_458);
  x_490 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_490, 0, x_488);
  lean_ctor_set(x_490, 1, x_489);
  return x_490;
  }
  }
  }
  else
  {
  lean_object* x_491; 
  lean_dec(x_381);
  x_491 = lean_ctor_get(x_457, 0);
  lean_inc(x_491);
  lean_dec(x_457);
  x_383 = x_491;
  x_384 = x_455;
  goto block_449;
  }
  }
  }
  case 6:
  {
  lean_object* x_499; lean_object* x_500; lean_object* x_501; lean_object* x_502; lean_object* x_572; uint8_t x_615; 
  x_499 = lean_ctor_get(x_1, 1);
  lean_inc(x_499);
  x_500 = lean_ctor_get(x_1, 2);
  lean_inc(x_500);
  x_615 = l_Lean_Expr_hasLevelParam(x_499);
  if (x_615 == 0)
  {
  uint8_t x_616; 
  x_616 = l_Lean_Expr_hasFVar(x_499);
  if (x_616 == 0)
  {
  uint8_t x_617; 
  x_617 = l_Lean_Expr_hasMVar(x_499);
  if (x_617 == 0)
  {
  x_501 = x_499;
  x_502 = x_8;
  goto block_571;
  }
  else
  {
  lean_object* x_618; 
  x_618 = lean_box(0);
  x_572 = x_618;
  goto block_614;
  }
  }
  else
  {
  lean_object* x_619; 
  x_619 = lean_box(0);
  x_572 = x_619;
  goto block_614;
  }
  }
  else
  {
  lean_object* x_620; 
  x_620 = lean_box(0);
  x_572 = x_620;
  goto block_614;
  }
  block_571:
  {
  lean_object* x_503; lean_object* x_504; lean_object* x_522; uint8_t x_565; 
  x_565 = l_Lean_Expr_hasLevelParam(x_500);
  if (x_565 == 0)
  {
  uint8_t x_566; 
  x_566 = l_Lean_Expr_hasFVar(x_500);
  if (x_566 == 0)
  {
  uint8_t x_567; 
  x_567 = l_Lean_Expr_hasMVar(x_500);
  if (x_567 == 0)
  {
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  x_503 = x_500;
  x_504 = x_502;
  goto block_521;
  }
  else
  {
  lean_object* x_568; 
  x_568 = lean_box(0);
  x_522 = x_568;
  goto block_564;
  }
  }
  else
  {
  lean_object* x_569; 
  x_569 = lean_box(0);
  x_522 = x_569;
  goto block_564;
  }
  }
  else
  {
  lean_object* x_570; 
  x_570 = lean_box(0);
  x_522 = x_570;
  goto block_564;
  }
  block_521:
  {
  if (lean_obj_tag(x_1) == 6)
  {
  uint8_t x_505; 
  x_505 = !lean_is_exclusive(x_1);
  if (x_505 == 0)
  {
  uint64_t x_506; uint8_t x_507; lean_object* x_508; lean_object* x_509; 
  x_506 = lean_ctor_get_uint64(x_1, sizeof(void*)*3);
  x_507 = (uint8_t)((x_506 << 24) >> 61);
  x_508 = lean_expr_update_lambda(x_1, x_507, x_501, x_503);
  x_509 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_509, 0, x_508);
  lean_ctor_set(x_509, 1, x_504);
  return x_509;
  }
  else
  {
  lean_object* x_510; lean_object* x_511; lean_object* x_512; uint64_t x_513; lean_object* x_514; uint8_t x_515; lean_object* x_516; lean_object* x_517; 
  x_510 = lean_ctor_get(x_1, 0);
  x_511 = lean_ctor_get(x_1, 1);
  x_512 = lean_ctor_get(x_1, 2);
  x_513 = lean_ctor_get_uint64(x_1, sizeof(void*)*3);
  lean_inc(x_512);
  lean_inc(x_511);
  lean_inc(x_510);
  lean_dec(x_1);
  x_514 = lean_alloc_ctor(6, 3, 8);
  lean_ctor_set(x_514, 0, x_510);
  lean_ctor_set(x_514, 1, x_511);
  lean_ctor_set(x_514, 2, x_512);
  lean_ctor_set_uint64(x_514, sizeof(void*)*3, x_513);
  x_515 = (uint8_t)((x_513 << 24) >> 61);
  x_516 = lean_expr_update_lambda(x_514, x_515, x_501, x_503);
  x_517 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_517, 0, x_516);
  lean_ctor_set(x_517, 1, x_504);
  return x_517;
  }
  }
  else
  {
  lean_object* x_518; lean_object* x_519; lean_object* x_520; 
  lean_dec(x_503);
  lean_dec(x_501);
  lean_dec(x_1);
  x_518 = l_Lean_Meta_Closure_collectExprAux___closed__13;
  x_519 = l_panic___at_Lean_Expr_getRevArg_x21___spec__1(x_518);
  x_520 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_520, 0, x_519);
  lean_ctor_set(x_520, 1, x_504);
  return x_520;
  }
  }
  block_564:
  {
  lean_object* x_523; lean_object* x_524; lean_object* x_525; lean_object* x_526; lean_object* x_527; lean_object* x_528; lean_object* x_529; 
  lean_dec(x_522);
  x_523 = lean_st_ref_get(x_7, x_502);
  x_524 = lean_ctor_get(x_523, 1);
  lean_inc(x_524);
  lean_dec(x_523);
  x_525 = lean_st_ref_get(x_3, x_524);
  x_526 = lean_ctor_get(x_525, 0);
  lean_inc(x_526);
  x_527 = lean_ctor_get(x_525, 1);
  lean_inc(x_527);
  lean_dec(x_525);
  x_528 = lean_ctor_get(x_526, 1);
  lean_inc(x_528);
  lean_dec(x_526);
  lean_inc(x_500);
  x_529 = l_Std_HashMapImp_find_x3f___at_Lean_MetavarContext_instantiateExprMVars___spec__1(x_528, x_500);
  if (lean_obj_tag(x_529) == 0)
  {
  lean_object* x_530; 
  lean_inc(x_7);
  lean_inc(x_500);
  x_530 = l_Lean_Meta_Closure_collectExprAux(x_500, x_2, x_3, x_4, x_5, x_6, x_7, x_527);
  if (lean_obj_tag(x_530) == 0)
  {
  lean_object* x_531; lean_object* x_532; lean_object* x_533; lean_object* x_534; lean_object* x_535; lean_object* x_536; lean_object* x_537; uint8_t x_538; 
  x_531 = lean_ctor_get(x_530, 0);
  lean_inc(x_531);
  x_532 = lean_ctor_get(x_530, 1);
  lean_inc(x_532);
  lean_dec(x_530);
  x_533 = lean_st_ref_get(x_7, x_532);
  lean_dec(x_7);
  x_534 = lean_ctor_get(x_533, 1);
  lean_inc(x_534);
  lean_dec(x_533);
  x_535 = lean_st_ref_take(x_3, x_534);
  x_536 = lean_ctor_get(x_535, 0);
  lean_inc(x_536);
  x_537 = lean_ctor_get(x_535, 1);
  lean_inc(x_537);
  lean_dec(x_535);
  x_538 = !lean_is_exclusive(x_536);
  if (x_538 == 0)
  {
  lean_object* x_539; lean_object* x_540; lean_object* x_541; lean_object* x_542; 
  x_539 = lean_ctor_get(x_536, 1);
  lean_inc(x_531);
  x_540 = l_Std_HashMap_insert___at_Lean_MetavarContext_instantiateExprMVars___spec__3(x_539, x_500, x_531);
  lean_ctor_set(x_536, 1, x_540);
  x_541 = lean_st_ref_set(x_3, x_536, x_537);
  x_542 = lean_ctor_get(x_541, 1);
  lean_inc(x_542);
  lean_dec(x_541);
  x_503 = x_531;
  x_504 = x_542;
  goto block_521;
  }
  else
  {
  lean_object* x_543; lean_object* x_544; lean_object* x_545; lean_object* x_546; lean_object* x_547; lean_object* x_548; lean_object* x_549; lean_object* x_550; lean_object* x_551; lean_object* x_552; lean_object* x_553; lean_object* x_554; lean_object* x_555; lean_object* x_556; lean_object* x_557; lean_object* x_558; 
  x_543 = lean_ctor_get(x_536, 0);
  x_544 = lean_ctor_get(x_536, 1);
  x_545 = lean_ctor_get(x_536, 2);
  x_546 = lean_ctor_get(x_536, 3);
  x_547 = lean_ctor_get(x_536, 4);
  x_548 = lean_ctor_get(x_536, 5);
  x_549 = lean_ctor_get(x_536, 6);
  x_550 = lean_ctor_get(x_536, 7);
  x_551 = lean_ctor_get(x_536, 8);
  x_552 = lean_ctor_get(x_536, 9);
  x_553 = lean_ctor_get(x_536, 10);
  x_554 = lean_ctor_get(x_536, 11);
  lean_inc(x_554);
  lean_inc(x_553);
  lean_inc(x_552);
  lean_inc(x_551);
  lean_inc(x_550);
  lean_inc(x_549);
  lean_inc(x_548);
  lean_inc(x_547);
  lean_inc(x_546);
  lean_inc(x_545);
  lean_inc(x_544);
  lean_inc(x_543);
  lean_dec(x_536);
  lean_inc(x_531);
  x_555 = l_Std_HashMap_insert___at_Lean_MetavarContext_instantiateExprMVars___spec__3(x_544, x_500, x_531);
  x_556 = lean_alloc_ctor(0, 12, 0);
  lean_ctor_set(x_556, 0, x_543);
  lean_ctor_set(x_556, 1, x_555);
  lean_ctor_set(x_556, 2, x_545);
  lean_ctor_set(x_556, 3, x_546);
  lean_ctor_set(x_556, 4, x_547);
  lean_ctor_set(x_556, 5, x_548);
  lean_ctor_set(x_556, 6, x_549);
  lean_ctor_set(x_556, 7, x_550);
  lean_ctor_set(x_556, 8, x_551);
  lean_ctor_set(x_556, 9, x_552);
  lean_ctor_set(x_556, 10, x_553);
  lean_ctor_set(x_556, 11, x_554);
  x_557 = lean_st_ref_set(x_3, x_556, x_537);
  x_558 = lean_ctor_get(x_557, 1);
  lean_inc(x_558);
  lean_dec(x_557);
  x_503 = x_531;
  x_504 = x_558;
  goto block_521;
  }
  }
  else
  {
  uint8_t x_559; 
  lean_dec(x_501);
  lean_dec(x_500);
  lean_dec(x_7);
  lean_dec(x_1);
  x_559 = !lean_is_exclusive(x_530);
  if (x_559 == 0)
  {
  return x_530;
  }
  else
  {
  lean_object* x_560; lean_object* x_561; lean_object* x_562; 
  x_560 = lean_ctor_get(x_530, 0);
  x_561 = lean_ctor_get(x_530, 1);
  lean_inc(x_561);
  lean_inc(x_560);
  lean_dec(x_530);
  x_562 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_562, 0, x_560);
  lean_ctor_set(x_562, 1, x_561);
  return x_562;
  }
  }
  }
  else
  {
  lean_object* x_563; 
  lean_dec(x_500);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  x_563 = lean_ctor_get(x_529, 0);
  lean_inc(x_563);
  lean_dec(x_529);
  x_503 = x_563;
  x_504 = x_527;
  goto block_521;
  }
  }
  }
  block_614:
  {
  lean_object* x_573; lean_object* x_574; lean_object* x_575; lean_object* x_576; lean_object* x_577; lean_object* x_578; lean_object* x_579; 
  lean_dec(x_572);
  x_573 = lean_st_ref_get(x_7, x_8);
  x_574 = lean_ctor_get(x_573, 1);
  lean_inc(x_574);
  lean_dec(x_573);
  x_575 = lean_st_ref_get(x_3, x_574);
  x_576 = lean_ctor_get(x_575, 0);
  lean_inc(x_576);
  x_577 = lean_ctor_get(x_575, 1);
  lean_inc(x_577);
  lean_dec(x_575);
  x_578 = lean_ctor_get(x_576, 1);
  lean_inc(x_578);
  lean_dec(x_576);
  lean_inc(x_499);
  x_579 = l_Std_HashMapImp_find_x3f___at_Lean_MetavarContext_instantiateExprMVars___spec__1(x_578, x_499);
  if (lean_obj_tag(x_579) == 0)
  {
  lean_object* x_580; 
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_499);
  x_580 = l_Lean_Meta_Closure_collectExprAux(x_499, x_2, x_3, x_4, x_5, x_6, x_7, x_577);
  if (lean_obj_tag(x_580) == 0)
  {
  lean_object* x_581; lean_object* x_582; lean_object* x_583; lean_object* x_584; lean_object* x_585; lean_object* x_586; lean_object* x_587; uint8_t x_588; 
  x_581 = lean_ctor_get(x_580, 0);
  lean_inc(x_581);
  x_582 = lean_ctor_get(x_580, 1);
  lean_inc(x_582);
  lean_dec(x_580);
  x_583 = lean_st_ref_get(x_7, x_582);
  x_584 = lean_ctor_get(x_583, 1);
  lean_inc(x_584);
  lean_dec(x_583);
  x_585 = lean_st_ref_take(x_3, x_584);
  x_586 = lean_ctor_get(x_585, 0);
  lean_inc(x_586);
  x_587 = lean_ctor_get(x_585, 1);
  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; lean_object* x_591; lean_object* x_592; 
  x_589 = lean_ctor_get(x_586, 1);
  lean_inc(x_581);
  x_590 = l_Std_HashMap_insert___at_Lean_MetavarContext_instantiateExprMVars___spec__3(x_589, x_499, x_581);
  lean_ctor_set(x_586, 1, x_590);
  x_591 = lean_st_ref_set(x_3, x_586, x_587);
  x_592 = lean_ctor_get(x_591, 1);
  lean_inc(x_592);
  lean_dec(x_591);
  x_501 = x_581;
  x_502 = x_592;
  goto block_571;
  }
  else
  {
  lean_object* x_593; lean_object* x_594; lean_object* x_595; lean_object* x_596; lean_object* x_597; lean_object* x_598; lean_object* x_599; lean_object* x_600; lean_object* x_601; lean_object* x_602; lean_object* x_603; lean_object* x_604; lean_object* x_605; lean_object* x_606; lean_object* x_607; lean_object* x_608; 
  x_593 = lean_ctor_get(x_586, 0);
  x_594 = lean_ctor_get(x_586, 1);
  x_595 = lean_ctor_get(x_586, 2);
  x_596 = lean_ctor_get(x_586, 3);
  x_597 = lean_ctor_get(x_586, 4);
  x_598 = lean_ctor_get(x_586, 5);
  x_599 = lean_ctor_get(x_586, 6);
  x_600 = lean_ctor_get(x_586, 7);
  x_601 = lean_ctor_get(x_586, 8);
  x_602 = lean_ctor_get(x_586, 9);
  x_603 = lean_ctor_get(x_586, 10);
  x_604 = lean_ctor_get(x_586, 11);
  lean_inc(x_604);
  lean_inc(x_603);
  lean_inc(x_602);
  lean_inc(x_601);
  lean_inc(x_600);
  lean_inc(x_599);
  lean_inc(x_598);
  lean_inc(x_597);
  lean_inc(x_596);
  lean_inc(x_595);
  lean_inc(x_594);
  lean_inc(x_593);
  lean_dec(x_586);
  lean_inc(x_581);
  x_605 = l_Std_HashMap_insert___at_Lean_MetavarContext_instantiateExprMVars___spec__3(x_594, x_499, x_581);
  x_606 = lean_alloc_ctor(0, 12, 0);
  lean_ctor_set(x_606, 0, x_593);
  lean_ctor_set(x_606, 1, x_605);
  lean_ctor_set(x_606, 2, x_595);
  lean_ctor_set(x_606, 3, x_596);
  lean_ctor_set(x_606, 4, x_597);
  lean_ctor_set(x_606, 5, x_598);
  lean_ctor_set(x_606, 6, x_599);
  lean_ctor_set(x_606, 7, x_600);
  lean_ctor_set(x_606, 8, x_601);
  lean_ctor_set(x_606, 9, x_602);
  lean_ctor_set(x_606, 10, x_603);
  lean_ctor_set(x_606, 11, x_604);
  x_607 = lean_st_ref_set(x_3, x_606, x_587);
  x_608 = lean_ctor_get(x_607, 1);
  lean_inc(x_608);
  lean_dec(x_607);
  x_501 = x_581;
  x_502 = x_608;
  goto block_571;
  }
  }
  else
  {
  uint8_t x_609; 
  lean_dec(x_500);
  lean_dec(x_499);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_1);
  x_609 = !lean_is_exclusive(x_580);
  if (x_609 == 0)
  {
  return x_580;
  }
  else
  {
  lean_object* x_610; lean_object* x_611; lean_object* x_612; 
  x_610 = lean_ctor_get(x_580, 0);
  x_611 = lean_ctor_get(x_580, 1);
  lean_inc(x_611);
  lean_inc(x_610);
  lean_dec(x_580);
  x_612 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_612, 0, x_610);
  lean_ctor_set(x_612, 1, x_611);
  return x_612;
  }
  }
  }
  else
  {
  lean_object* x_613; 
  lean_dec(x_499);
  x_613 = lean_ctor_get(x_579, 0);
  lean_inc(x_613);
  lean_dec(x_579);
  x_501 = x_613;
  x_502 = x_577;
  goto block_571;
  }
  }
  }
  case 7:
  {
  lean_object* x_621; lean_object* x_622; lean_object* x_623; lean_object* x_624; lean_object* x_694; uint8_t x_737; 
  x_621 = lean_ctor_get(x_1, 1);
  lean_inc(x_621);
  x_622 = lean_ctor_get(x_1, 2);
  lean_inc(x_622);
  x_737 = l_Lean_Expr_hasLevelParam(x_621);
  if (x_737 == 0)
  {
  uint8_t x_738; 
  x_738 = l_Lean_Expr_hasFVar(x_621);
  if (x_738 == 0)
  {
  uint8_t x_739; 
  x_739 = l_Lean_Expr_hasMVar(x_621);
  if (x_739 == 0)
  {
  x_623 = x_621;
  x_624 = x_8;
  goto block_693;
  }
  else
  {
  lean_object* x_740; 
  x_740 = lean_box(0);
  x_694 = x_740;
  goto block_736;
  }
  }
  else
  {
  lean_object* x_741; 
  x_741 = lean_box(0);
  x_694 = x_741;
  goto block_736;
  }
  }
  else
  {
  lean_object* x_742; 
  x_742 = lean_box(0);
  x_694 = x_742;
  goto block_736;
  }
  block_693:
  {
  lean_object* x_625; lean_object* x_626; lean_object* x_644; uint8_t x_687; 
  x_687 = l_Lean_Expr_hasLevelParam(x_622);
  if (x_687 == 0)
  {
  uint8_t x_688; 
  x_688 = l_Lean_Expr_hasFVar(x_622);
  if (x_688 == 0)
  {
  uint8_t x_689; 
  x_689 = l_Lean_Expr_hasMVar(x_622);
  if (x_689 == 0)
  {
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  x_625 = x_622;
  x_626 = x_624;
  goto block_643;
  }
  else
  {
  lean_object* x_690; 
  x_690 = lean_box(0);
  x_644 = x_690;
  goto block_686;
  }
  }
  else
  {
  lean_object* x_691; 
  x_691 = lean_box(0);
  x_644 = x_691;
  goto block_686;
  }
  }
  else
  {
  lean_object* x_692; 
  x_692 = lean_box(0);
  x_644 = x_692;
  goto block_686;
  }
  block_643:
  {
  if (lean_obj_tag(x_1) == 7)
  {
  uint8_t x_627; 
  x_627 = !lean_is_exclusive(x_1);
  if (x_627 == 0)
  {
  uint64_t x_628; uint8_t x_629; lean_object* x_630; lean_object* x_631; 
  x_628 = lean_ctor_get_uint64(x_1, sizeof(void*)*3);
  x_629 = (uint8_t)((x_628 << 24) >> 61);
  x_630 = lean_expr_update_forall(x_1, x_629, x_623, x_625);
  x_631 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_631, 0, x_630);
  lean_ctor_set(x_631, 1, x_626);
  return x_631;
  }
  else
  {
  lean_object* x_632; lean_object* x_633; lean_object* x_634; uint64_t x_635; lean_object* x_636; uint8_t x_637; lean_object* x_638; lean_object* x_639; 
  x_632 = lean_ctor_get(x_1, 0);
  x_633 = lean_ctor_get(x_1, 1);
  x_634 = lean_ctor_get(x_1, 2);
  x_635 = lean_ctor_get_uint64(x_1, sizeof(void*)*3);
  lean_inc(x_634);
  lean_inc(x_633);
  lean_inc(x_632);
  lean_dec(x_1);
  x_636 = lean_alloc_ctor(7, 3, 8);
  lean_ctor_set(x_636, 0, x_632);
  lean_ctor_set(x_636, 1, x_633);
  lean_ctor_set(x_636, 2, x_634);
  lean_ctor_set_uint64(x_636, sizeof(void*)*3, x_635);
  x_637 = (uint8_t)((x_635 << 24) >> 61);
  x_638 = lean_expr_update_forall(x_636, x_637, x_623, x_625);
  x_639 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_639, 0, x_638);
  lean_ctor_set(x_639, 1, x_626);
  return x_639;
  }
  }
  else
  {
  lean_object* x_640; lean_object* x_641; lean_object* x_642; 
  lean_dec(x_625);
  lean_dec(x_623);
  lean_dec(x_1);
  x_640 = l_Lean_Meta_Closure_collectExprAux___closed__16;
  x_641 = l_panic___at_Lean_Expr_getRevArg_x21___spec__1(x_640);
  x_642 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_642, 0, x_641);
  lean_ctor_set(x_642, 1, x_626);
  return x_642;
  }
  }
  block_686:
  {
  lean_object* x_645; lean_object* x_646; lean_object* x_647; lean_object* x_648; lean_object* x_649; lean_object* x_650; lean_object* x_651; 
  lean_dec(x_644);
  x_645 = lean_st_ref_get(x_7, x_624);
  x_646 = lean_ctor_get(x_645, 1);
  lean_inc(x_646);
  lean_dec(x_645);
  x_647 = lean_st_ref_get(x_3, x_646);
  x_648 = lean_ctor_get(x_647, 0);
  lean_inc(x_648);
  x_649 = lean_ctor_get(x_647, 1);
  lean_inc(x_649);
  lean_dec(x_647);
  x_650 = lean_ctor_get(x_648, 1);
  lean_inc(x_650);
  lean_dec(x_648);
  lean_inc(x_622);
  x_651 = l_Std_HashMapImp_find_x3f___at_Lean_MetavarContext_instantiateExprMVars___spec__1(x_650, x_622);
  if (lean_obj_tag(x_651) == 0)
  {
  lean_object* x_652; 
  lean_inc(x_7);
  lean_inc(x_622);
  x_652 = l_Lean_Meta_Closure_collectExprAux(x_622, x_2, x_3, x_4, x_5, x_6, x_7, x_649);
  if (lean_obj_tag(x_652) == 0)
  {
  lean_object* x_653; lean_object* x_654; lean_object* x_655; lean_object* x_656; lean_object* x_657; lean_object* x_658; lean_object* x_659; uint8_t x_660; 
  x_653 = lean_ctor_get(x_652, 0);
  lean_inc(x_653);
  x_654 = lean_ctor_get(x_652, 1);
  lean_inc(x_654);
  lean_dec(x_652);
  x_655 = lean_st_ref_get(x_7, x_654);
  lean_dec(x_7);
  x_656 = lean_ctor_get(x_655, 1);
  lean_inc(x_656);
  lean_dec(x_655);
  x_657 = lean_st_ref_take(x_3, x_656);
  x_658 = lean_ctor_get(x_657, 0);
  lean_inc(x_658);
  x_659 = lean_ctor_get(x_657, 1);
  lean_inc(x_659);
  lean_dec(x_657);
  x_660 = !lean_is_exclusive(x_658);
  if (x_660 == 0)
  {
  lean_object* x_661; lean_object* x_662; lean_object* x_663; lean_object* x_664; 
  x_661 = lean_ctor_get(x_658, 1);
  lean_inc(x_653);
  x_662 = l_Std_HashMap_insert___at_Lean_MetavarContext_instantiateExprMVars___spec__3(x_661, x_622, x_653);
  lean_ctor_set(x_658, 1, x_662);
  x_663 = lean_st_ref_set(x_3, x_658, x_659);
  x_664 = lean_ctor_get(x_663, 1);
  lean_inc(x_664);
  lean_dec(x_663);
  x_625 = x_653;
  x_626 = x_664;
  goto block_643;
  }
  else
  {
  lean_object* x_665; lean_object* x_666; lean_object* x_667; lean_object* x_668; lean_object* x_669; lean_object* x_670; lean_object* x_671; lean_object* x_672; lean_object* x_673; lean_object* x_674; lean_object* x_675; lean_object* x_676; lean_object* x_677; lean_object* x_678; lean_object* x_679; lean_object* x_680; 
  x_665 = lean_ctor_get(x_658, 0);
  x_666 = lean_ctor_get(x_658, 1);
  x_667 = lean_ctor_get(x_658, 2);
  x_668 = lean_ctor_get(x_658, 3);
  x_669 = lean_ctor_get(x_658, 4);
  x_670 = lean_ctor_get(x_658, 5);
  x_671 = lean_ctor_get(x_658, 6);
  x_672 = lean_ctor_get(x_658, 7);
  x_673 = lean_ctor_get(x_658, 8);
  x_674 = lean_ctor_get(x_658, 9);
  x_675 = lean_ctor_get(x_658, 10);
  x_676 = lean_ctor_get(x_658, 11);
  lean_inc(x_676);
  lean_inc(x_675);
  lean_inc(x_674);
  lean_inc(x_673);
  lean_inc(x_672);
  lean_inc(x_671);
  lean_inc(x_670);
  lean_inc(x_669);
  lean_inc(x_668);
  lean_inc(x_667);
  lean_inc(x_666);
  lean_inc(x_665);
  lean_dec(x_658);
  lean_inc(x_653);
  x_677 = l_Std_HashMap_insert___at_Lean_MetavarContext_instantiateExprMVars___spec__3(x_666, x_622, x_653);
  x_678 = lean_alloc_ctor(0, 12, 0);
  lean_ctor_set(x_678, 0, x_665);
  lean_ctor_set(x_678, 1, x_677);
  lean_ctor_set(x_678, 2, x_667);
  lean_ctor_set(x_678, 3, x_668);
  lean_ctor_set(x_678, 4, x_669);
  lean_ctor_set(x_678, 5, x_670);
  lean_ctor_set(x_678, 6, x_671);
  lean_ctor_set(x_678, 7, x_672);
  lean_ctor_set(x_678, 8, x_673);
  lean_ctor_set(x_678, 9, x_674);
  lean_ctor_set(x_678, 10, x_675);
  lean_ctor_set(x_678, 11, x_676);
  x_679 = lean_st_ref_set(x_3, x_678, x_659);
  x_680 = lean_ctor_get(x_679, 1);
  lean_inc(x_680);
  lean_dec(x_679);
  x_625 = x_653;
  x_626 = x_680;
  goto block_643;
  }
  }
  else
  {
  uint8_t x_681; 
  lean_dec(x_623);
  lean_dec(x_622);
  lean_dec(x_7);
  lean_dec(x_1);
  x_681 = !lean_is_exclusive(x_652);
  if (x_681 == 0)
  {
  return x_652;
  }
  else
  {
  lean_object* x_682; lean_object* x_683; lean_object* x_684; 
  x_682 = lean_ctor_get(x_652, 0);
  x_683 = lean_ctor_get(x_652, 1);
  lean_inc(x_683);
  lean_inc(x_682);
  lean_dec(x_652);
  x_684 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_684, 0, x_682);
  lean_ctor_set(x_684, 1, x_683);
  return x_684;
  }
  }
  }
  else
  {
  lean_object* x_685; 
  lean_dec(x_622);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  x_685 = lean_ctor_get(x_651, 0);
  lean_inc(x_685);
  lean_dec(x_651);
  x_625 = x_685;
  x_626 = x_649;
  goto block_643;
  }
  }
  }
  block_736:
  {
  lean_object* x_695; lean_object* x_696; lean_object* x_697; lean_object* x_698; lean_object* x_699; lean_object* x_700; lean_object* x_701; 
  lean_dec(x_694);
  x_695 = lean_st_ref_get(x_7, x_8);
  x_696 = lean_ctor_get(x_695, 1);
  lean_inc(x_696);
  lean_dec(x_695);
  x_697 = lean_st_ref_get(x_3, x_696);
  x_698 = lean_ctor_get(x_697, 0);
  lean_inc(x_698);
  x_699 = lean_ctor_get(x_697, 1);
  lean_inc(x_699);
  lean_dec(x_697);
  x_700 = lean_ctor_get(x_698, 1);
  lean_inc(x_700);
  lean_dec(x_698);
  lean_inc(x_621);
  x_701 = l_Std_HashMapImp_find_x3f___at_Lean_MetavarContext_instantiateExprMVars___spec__1(x_700, x_621);
  if (lean_obj_tag(x_701) == 0)
  {
  lean_object* x_702; 
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_621);
  x_702 = l_Lean_Meta_Closure_collectExprAux(x_621, x_2, x_3, x_4, x_5, x_6, x_7, x_699);
  if (lean_obj_tag(x_702) == 0)
  {
  lean_object* x_703; lean_object* x_704; lean_object* x_705; lean_object* x_706; lean_object* x_707; lean_object* x_708; lean_object* x_709; uint8_t x_710; 
  x_703 = lean_ctor_get(x_702, 0);
  lean_inc(x_703);
  x_704 = lean_ctor_get(x_702, 1);
  lean_inc(x_704);
  lean_dec(x_702);
  x_705 = lean_st_ref_get(x_7, x_704);
  x_706 = lean_ctor_get(x_705, 1);
  lean_inc(x_706);
  lean_dec(x_705);
  x_707 = lean_st_ref_take(x_3, x_706);
  x_708 = lean_ctor_get(x_707, 0);
  lean_inc(x_708);
  x_709 = lean_ctor_get(x_707, 1);
  lean_inc(x_709);
  lean_dec(x_707);
  x_710 = !lean_is_exclusive(x_708);
  if (x_710 == 0)
  {
  lean_object* x_711; lean_object* x_712; lean_object* x_713; lean_object* x_714; 
  x_711 = lean_ctor_get(x_708, 1);
  lean_inc(x_703);
  x_712 = l_Std_HashMap_insert___at_Lean_MetavarContext_instantiateExprMVars___spec__3(x_711, x_621, x_703);
  lean_ctor_set(x_708, 1, x_712);
  x_713 = lean_st_ref_set(x_3, x_708, x_709);
  x_714 = lean_ctor_get(x_713, 1);
  lean_inc(x_714);
  lean_dec(x_713);
  x_623 = x_703;
  x_624 = x_714;
  goto block_693;
  }
  else
  {
  lean_object* x_715; lean_object* x_716; lean_object* x_717; lean_object* x_718; lean_object* x_719; lean_object* x_720; lean_object* x_721; lean_object* x_722; lean_object* x_723; lean_object* x_724; lean_object* x_725; lean_object* x_726; lean_object* x_727; lean_object* x_728; lean_object* x_729; lean_object* x_730; 
  x_715 = lean_ctor_get(x_708, 0);
  x_716 = lean_ctor_get(x_708, 1);
  x_717 = lean_ctor_get(x_708, 2);
  x_718 = lean_ctor_get(x_708, 3);
  x_719 = lean_ctor_get(x_708, 4);
  x_720 = lean_ctor_get(x_708, 5);
  x_721 = lean_ctor_get(x_708, 6);
  x_722 = lean_ctor_get(x_708, 7);
  x_723 = lean_ctor_get(x_708, 8);
  x_724 = lean_ctor_get(x_708, 9);
  x_725 = lean_ctor_get(x_708, 10);
  x_726 = lean_ctor_get(x_708, 11);
  lean_inc(x_726);
  lean_inc(x_725);
  lean_inc(x_724);
  lean_inc(x_723);
  lean_inc(x_722);
  lean_inc(x_721);
  lean_inc(x_720);
  lean_inc(x_719);
  lean_inc(x_718);
  lean_inc(x_717);
  lean_inc(x_716);
  lean_inc(x_715);
  lean_dec(x_708);
  lean_inc(x_703);
  x_727 = l_Std_HashMap_insert___at_Lean_MetavarContext_instantiateExprMVars___spec__3(x_716, x_621, x_703);
  x_728 = lean_alloc_ctor(0, 12, 0);
  lean_ctor_set(x_728, 0, x_715);
  lean_ctor_set(x_728, 1, x_727);
  lean_ctor_set(x_728, 2, x_717);
  lean_ctor_set(x_728, 3, x_718);
  lean_ctor_set(x_728, 4, x_719);
  lean_ctor_set(x_728, 5, x_720);
  lean_ctor_set(x_728, 6, x_721);
  lean_ctor_set(x_728, 7, x_722);
  lean_ctor_set(x_728, 8, x_723);
  lean_ctor_set(x_728, 9, x_724);
  lean_ctor_set(x_728, 10, x_725);
  lean_ctor_set(x_728, 11, x_726);
  x_729 = lean_st_ref_set(x_3, x_728, x_709);
  x_730 = lean_ctor_get(x_729, 1);
  lean_inc(x_730);
  lean_dec(x_729);
  x_623 = x_703;
  x_624 = x_730;
  goto block_693;
  }
  }
  else
  {
  uint8_t x_731; 
  lean_dec(x_622);
  lean_dec(x_621);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_1);
  x_731 = !lean_is_exclusive(x_702);
  if (x_731 == 0)
  {
  return x_702;
  }
  else
  {
  lean_object* x_732; lean_object* x_733; lean_object* x_734; 
  x_732 = lean_ctor_get(x_702, 0);
  x_733 = lean_ctor_get(x_702, 1);
  lean_inc(x_733);
  lean_inc(x_732);
  lean_dec(x_702);
  x_734 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_734, 0, x_732);
  lean_ctor_set(x_734, 1, x_733);
  return x_734;
  }
  }
  }
  else
  {
  lean_object* x_735; 
  lean_dec(x_621);
  x_735 = lean_ctor_get(x_701, 0);
  lean_inc(x_735);
  lean_dec(x_701);
  x_623 = x_735;
  x_624 = x_699;
  goto block_693;
  }
  }
  }
  case 8:
  {
  lean_object* x_743; lean_object* x_744; lean_object* x_745; lean_object* x_746; lean_object* x_747; lean_object* x_867; uint8_t x_910; 
  x_743 = lean_ctor_get(x_1, 1);
  lean_inc(x_743);
  x_744 = lean_ctor_get(x_1, 2);
  lean_inc(x_744);
  x_745 = lean_ctor_get(x_1, 3);
  lean_inc(x_745);
  x_910 = l_Lean_Expr_hasLevelParam(x_743);
  if (x_910 == 0)
  {
  uint8_t x_911; 
  x_911 = l_Lean_Expr_hasFVar(x_743);
  if (x_911 == 0)
  {
  uint8_t x_912; 
  x_912 = l_Lean_Expr_hasMVar(x_743);
  if (x_912 == 0)
  {
  x_746 = x_743;
  x_747 = x_8;
  goto block_866;
  }
  else
  {
  lean_object* x_913; 
  x_913 = lean_box(0);
  x_867 = x_913;
  goto block_909;
  }
  }
  else
  {
  lean_object* x_914; 
  x_914 = lean_box(0);
  x_867 = x_914;
  goto block_909;
  }
  }
  else
  {
  lean_object* x_915; 
  x_915 = lean_box(0);
  x_867 = x_915;
  goto block_909;
  }
  block_866:
  {
  lean_object* x_748; lean_object* x_749; lean_object* x_817; uint8_t x_860; 
  x_860 = l_Lean_Expr_hasLevelParam(x_744);
  if (x_860 == 0)
  {
  uint8_t x_861; 
  x_861 = l_Lean_Expr_hasFVar(x_744);
  if (x_861 == 0)
  {
  uint8_t x_862; 
  x_862 = l_Lean_Expr_hasMVar(x_744);
  if (x_862 == 0)
  {
  x_748 = x_744;
  x_749 = x_747;
  goto block_816;
  }
  else
  {
  lean_object* x_863; 
  x_863 = lean_box(0);
  x_817 = x_863;
  goto block_859;
  }
  }
  else
  {
  lean_object* x_864; 
  x_864 = lean_box(0);
  x_817 = x_864;
  goto block_859;
  }
  }
  else
  {
  lean_object* x_865; 
  x_865 = lean_box(0);
  x_817 = x_865;
  goto block_859;
  }
  block_816:
  {
  lean_object* x_750; lean_object* x_751; lean_object* x_767; uint8_t x_810; 
  x_810 = l_Lean_Expr_hasLevelParam(x_745);
  if (x_810 == 0)
  {
  uint8_t x_811; 
  x_811 = l_Lean_Expr_hasFVar(x_745);
  if (x_811 == 0)
  {
  uint8_t x_812; 
  x_812 = l_Lean_Expr_hasMVar(x_745);
  if (x_812 == 0)
  {
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  x_750 = x_745;
  x_751 = x_749;
  goto block_766;
  }
  else
  {
  lean_object* x_813; 
  x_813 = lean_box(0);
  x_767 = x_813;
  goto block_809;
  }
  }
  else
  {
  lean_object* x_814; 
  x_814 = lean_box(0);
  x_767 = x_814;
  goto block_809;
  }
  }
  else
  {
  lean_object* x_815; 
  x_815 = lean_box(0);
  x_767 = x_815;
  goto block_809;
  }
  block_766:
  {
  if (lean_obj_tag(x_1) == 8)
  {
  uint8_t x_752; 
  x_752 = !lean_is_exclusive(x_1);
  if (x_752 == 0)
  {
  lean_object* x_753; lean_object* x_754; 
  x_753 = lean_expr_update_let(x_1, x_746, x_748, x_750);
  x_754 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_754, 0, x_753);
  lean_ctor_set(x_754, 1, x_751);
  return x_754;
  }
  else
  {
  lean_object* x_755; lean_object* x_756; lean_object* x_757; lean_object* x_758; uint64_t x_759; lean_object* x_760; lean_object* x_761; lean_object* x_762; 
  x_755 = lean_ctor_get(x_1, 0);
  x_756 = lean_ctor_get(x_1, 1);
  x_757 = lean_ctor_get(x_1, 2);
  x_758 = lean_ctor_get(x_1, 3);
  x_759 = lean_ctor_get_uint64(x_1, sizeof(void*)*4);
  lean_inc(x_758);
  lean_inc(x_757);
  lean_inc(x_756);
  lean_inc(x_755);
  lean_dec(x_1);
  x_760 = lean_alloc_ctor(8, 4, 8);
  lean_ctor_set(x_760, 0, x_755);
  lean_ctor_set(x_760, 1, x_756);
  lean_ctor_set(x_760, 2, x_757);
  lean_ctor_set(x_760, 3, x_758);
  lean_ctor_set_uint64(x_760, sizeof(void*)*4, x_759);
  x_761 = lean_expr_update_let(x_760, x_746, x_748, x_750);
  x_762 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_762, 0, x_761);
  lean_ctor_set(x_762, 1, x_751);
  return x_762;
  }
  }
  else
  {
  lean_object* x_763; lean_object* x_764; lean_object* x_765; 
  lean_dec(x_750);
  lean_dec(x_748);
  lean_dec(x_746);
  lean_dec(x_1);
  x_763 = l_Lean_Meta_Closure_collectExprAux___closed__19;
  x_764 = l_panic___at_Lean_Expr_getRevArg_x21___spec__1(x_763);
  x_765 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_765, 0, x_764);
  lean_ctor_set(x_765, 1, x_751);
  return x_765;
  }
  }
  block_809:
  {
  lean_object* x_768; lean_object* x_769; lean_object* x_770; lean_object* x_771; lean_object* x_772; lean_object* x_773; lean_object* x_774; 
  lean_dec(x_767);
  x_768 = lean_st_ref_get(x_7, x_749);
  x_769 = lean_ctor_get(x_768, 1);
  lean_inc(x_769);
  lean_dec(x_768);
  x_770 = lean_st_ref_get(x_3, x_769);
  x_771 = lean_ctor_get(x_770, 0);
  lean_inc(x_771);
  x_772 = lean_ctor_get(x_770, 1);
  lean_inc(x_772);
  lean_dec(x_770);
  x_773 = lean_ctor_get(x_771, 1);
  lean_inc(x_773);
  lean_dec(x_771);
  lean_inc(x_745);
  x_774 = l_Std_HashMapImp_find_x3f___at_Lean_MetavarContext_instantiateExprMVars___spec__1(x_773, x_745);
  if (lean_obj_tag(x_774) == 0)
  {
  lean_object* x_775; 
  lean_inc(x_7);
  lean_inc(x_745);
  x_775 = l_Lean_Meta_Closure_collectExprAux(x_745, x_2, x_3, x_4, x_5, x_6, x_7, x_772);
  if (lean_obj_tag(x_775) == 0)
  {
  lean_object* x_776; lean_object* x_777; lean_object* x_778; lean_object* x_779; lean_object* x_780; lean_object* x_781; lean_object* x_782; uint8_t x_783; 
  x_776 = lean_ctor_get(x_775, 0);
  lean_inc(x_776);
  x_777 = lean_ctor_get(x_775, 1);
  lean_inc(x_777);
  lean_dec(x_775);
  x_778 = lean_st_ref_get(x_7, x_777);
  lean_dec(x_7);
  x_779 = lean_ctor_get(x_778, 1);
  lean_inc(x_779);
  lean_dec(x_778);
  x_780 = lean_st_ref_take(x_3, x_779);
  x_781 = lean_ctor_get(x_780, 0);
  lean_inc(x_781);
  x_782 = lean_ctor_get(x_780, 1);
  lean_inc(x_782);
  lean_dec(x_780);
  x_783 = !lean_is_exclusive(x_781);
  if (x_783 == 0)
  {
  lean_object* x_784; lean_object* x_785; lean_object* x_786; lean_object* x_787; 
  x_784 = lean_ctor_get(x_781, 1);
  lean_inc(x_776);
  x_785 = l_Std_HashMap_insert___at_Lean_MetavarContext_instantiateExprMVars___spec__3(x_784, x_745, x_776);
  lean_ctor_set(x_781, 1, x_785);
  x_786 = lean_st_ref_set(x_3, x_781, x_782);
  x_787 = lean_ctor_get(x_786, 1);
  lean_inc(x_787);
  lean_dec(x_786);
  x_750 = x_776;
  x_751 = x_787;
  goto block_766;
  }
  else
  {
  lean_object* x_788; lean_object* x_789; lean_object* x_790; lean_object* x_791; lean_object* x_792; lean_object* x_793; lean_object* x_794; lean_object* x_795; lean_object* x_796; lean_object* x_797; lean_object* x_798; lean_object* x_799; lean_object* x_800; lean_object* x_801; lean_object* x_802; lean_object* x_803; 
  x_788 = lean_ctor_get(x_781, 0);
  x_789 = lean_ctor_get(x_781, 1);
  x_790 = lean_ctor_get(x_781, 2);
  x_791 = lean_ctor_get(x_781, 3);
  x_792 = lean_ctor_get(x_781, 4);
  x_793 = lean_ctor_get(x_781, 5);
  x_794 = lean_ctor_get(x_781, 6);
  x_795 = lean_ctor_get(x_781, 7);
  x_796 = lean_ctor_get(x_781, 8);
  x_797 = lean_ctor_get(x_781, 9);
  x_798 = lean_ctor_get(x_781, 10);
  x_799 = lean_ctor_get(x_781, 11);
  lean_inc(x_799);
  lean_inc(x_798);
  lean_inc(x_797);
  lean_inc(x_796);
  lean_inc(x_795);
  lean_inc(x_794);
  lean_inc(x_793);
  lean_inc(x_792);
  lean_inc(x_791);
  lean_inc(x_790);
  lean_inc(x_789);
  lean_inc(x_788);
  lean_dec(x_781);
  lean_inc(x_776);
  x_800 = l_Std_HashMap_insert___at_Lean_MetavarContext_instantiateExprMVars___spec__3(x_789, x_745, x_776);
  x_801 = lean_alloc_ctor(0, 12, 0);
  lean_ctor_set(x_801, 0, x_788);
  lean_ctor_set(x_801, 1, x_800);
  lean_ctor_set(x_801, 2, x_790);
  lean_ctor_set(x_801, 3, x_791);
  lean_ctor_set(x_801, 4, x_792);
  lean_ctor_set(x_801, 5, x_793);
  lean_ctor_set(x_801, 6, x_794);
  lean_ctor_set(x_801, 7, x_795);
  lean_ctor_set(x_801, 8, x_796);
  lean_ctor_set(x_801, 9, x_797);
  lean_ctor_set(x_801, 10, x_798);
  lean_ctor_set(x_801, 11, x_799);
  x_802 = lean_st_ref_set(x_3, x_801, x_782);
  x_803 = lean_ctor_get(x_802, 1);
  lean_inc(x_803);
  lean_dec(x_802);
  x_750 = x_776;
  x_751 = x_803;
  goto block_766;
  }
  }
  else
  {
  uint8_t x_804; 
  lean_dec(x_748);
  lean_dec(x_746);
  lean_dec(x_745);
  lean_dec(x_7);
  lean_dec(x_1);
  x_804 = !lean_is_exclusive(x_775);
  if (x_804 == 0)
  {
  return x_775;
  }
  else
  {
  lean_object* x_805; lean_object* x_806; lean_object* x_807; 
  x_805 = lean_ctor_get(x_775, 0);
  x_806 = lean_ctor_get(x_775, 1);
  lean_inc(x_806);
  lean_inc(x_805);
  lean_dec(x_775);
  x_807 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_807, 0, x_805);
  lean_ctor_set(x_807, 1, x_806);
  return x_807;
  }
  }
  }
  else
  {
  lean_object* x_808; 
  lean_dec(x_745);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  x_808 = lean_ctor_get(x_774, 0);
  lean_inc(x_808);
  lean_dec(x_774);
  x_750 = x_808;
  x_751 = x_772;
  goto block_766;
  }
  }
  }
  block_859:
  {
  lean_object* x_818; lean_object* x_819; lean_object* x_820; lean_object* x_821; lean_object* x_822; lean_object* x_823; lean_object* x_824; 
  lean_dec(x_817);
  x_818 = lean_st_ref_get(x_7, x_747);
  x_819 = lean_ctor_get(x_818, 1);
  lean_inc(x_819);
  lean_dec(x_818);
  x_820 = lean_st_ref_get(x_3, x_819);
  x_821 = lean_ctor_get(x_820, 0);
  lean_inc(x_821);
  x_822 = lean_ctor_get(x_820, 1);
  lean_inc(x_822);
  lean_dec(x_820);
  x_823 = lean_ctor_get(x_821, 1);
  lean_inc(x_823);
  lean_dec(x_821);
  lean_inc(x_744);
  x_824 = l_Std_HashMapImp_find_x3f___at_Lean_MetavarContext_instantiateExprMVars___spec__1(x_823, x_744);
  if (lean_obj_tag(x_824) == 0)
  {
  lean_object* x_825; 
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_744);
  x_825 = l_Lean_Meta_Closure_collectExprAux(x_744, x_2, x_3, x_4, x_5, x_6, x_7, x_822);
  if (lean_obj_tag(x_825) == 0)
  {
  lean_object* x_826; lean_object* x_827; lean_object* x_828; lean_object* x_829; lean_object* x_830; lean_object* x_831; lean_object* x_832; uint8_t x_833; 
  x_826 = lean_ctor_get(x_825, 0);
  lean_inc(x_826);
  x_827 = lean_ctor_get(x_825, 1);
  lean_inc(x_827);
  lean_dec(x_825);
  x_828 = lean_st_ref_get(x_7, x_827);
  x_829 = lean_ctor_get(x_828, 1);
  lean_inc(x_829);
  lean_dec(x_828);
  x_830 = lean_st_ref_take(x_3, x_829);
  x_831 = lean_ctor_get(x_830, 0);
  lean_inc(x_831);
  x_832 = lean_ctor_get(x_830, 1);
  lean_inc(x_832);
  lean_dec(x_830);
  x_833 = !lean_is_exclusive(x_831);
  if (x_833 == 0)
  {
  lean_object* x_834; lean_object* x_835; lean_object* x_836; lean_object* x_837; 
  x_834 = lean_ctor_get(x_831, 1);
  lean_inc(x_826);
  x_835 = l_Std_HashMap_insert___at_Lean_MetavarContext_instantiateExprMVars___spec__3(x_834, x_744, x_826);
  lean_ctor_set(x_831, 1, x_835);
  x_836 = lean_st_ref_set(x_3, x_831, x_832);
  x_837 = lean_ctor_get(x_836, 1);
  lean_inc(x_837);
  lean_dec(x_836);
  x_748 = x_826;
  x_749 = x_837;
  goto block_816;
  }
  else
  {
  lean_object* x_838; lean_object* x_839; lean_object* x_840; lean_object* x_841; lean_object* x_842; lean_object* x_843; lean_object* x_844; lean_object* x_845; lean_object* x_846; lean_object* x_847; lean_object* x_848; lean_object* x_849; lean_object* x_850; lean_object* x_851; lean_object* x_852; lean_object* x_853; 
  x_838 = lean_ctor_get(x_831, 0);
  x_839 = lean_ctor_get(x_831, 1);
  x_840 = lean_ctor_get(x_831, 2);
  x_841 = lean_ctor_get(x_831, 3);
  x_842 = lean_ctor_get(x_831, 4);
  x_843 = lean_ctor_get(x_831, 5);
  x_844 = lean_ctor_get(x_831, 6);
  x_845 = lean_ctor_get(x_831, 7);
  x_846 = lean_ctor_get(x_831, 8);
  x_847 = lean_ctor_get(x_831, 9);
  x_848 = lean_ctor_get(x_831, 10);
  x_849 = lean_ctor_get(x_831, 11);
  lean_inc(x_849);
  lean_inc(x_848);
  lean_inc(x_847);
  lean_inc(x_846);
  lean_inc(x_845);
  lean_inc(x_844);
  lean_inc(x_843);
  lean_inc(x_842);
  lean_inc(x_841);
  lean_inc(x_840);
  lean_inc(x_839);
  lean_inc(x_838);
  lean_dec(x_831);
  lean_inc(x_826);
  x_850 = l_Std_HashMap_insert___at_Lean_MetavarContext_instantiateExprMVars___spec__3(x_839, x_744, x_826);
  x_851 = lean_alloc_ctor(0, 12, 0);
  lean_ctor_set(x_851, 0, x_838);
  lean_ctor_set(x_851, 1, x_850);
  lean_ctor_set(x_851, 2, x_840);
  lean_ctor_set(x_851, 3, x_841);
  lean_ctor_set(x_851, 4, x_842);
  lean_ctor_set(x_851, 5, x_843);
  lean_ctor_set(x_851, 6, x_844);
  lean_ctor_set(x_851, 7, x_845);
  lean_ctor_set(x_851, 8, x_846);
  lean_ctor_set(x_851, 9, x_847);
  lean_ctor_set(x_851, 10, x_848);
  lean_ctor_set(x_851, 11, x_849);
  x_852 = lean_st_ref_set(x_3, x_851, x_832);
  x_853 = lean_ctor_get(x_852, 1);
  lean_inc(x_853);
  lean_dec(x_852);
  x_748 = x_826;
  x_749 = x_853;
  goto block_816;
  }
  }
  else
  {
  uint8_t x_854; 
  lean_dec(x_746);
  lean_dec(x_745);
  lean_dec(x_744);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_1);
  x_854 = !lean_is_exclusive(x_825);
  if (x_854 == 0)
  {
  return x_825;
  }
  else
  {
  lean_object* x_855; lean_object* x_856; lean_object* x_857; 
  x_855 = lean_ctor_get(x_825, 0);
  x_856 = lean_ctor_get(x_825, 1);
  lean_inc(x_856);
  lean_inc(x_855);
  lean_dec(x_825);
  x_857 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_857, 0, x_855);
  lean_ctor_set(x_857, 1, x_856);
  return x_857;
  }
  }
  }
  else
  {
  lean_object* x_858; 
  lean_dec(x_744);
  x_858 = lean_ctor_get(x_824, 0);
  lean_inc(x_858);
  lean_dec(x_824);
  x_748 = x_858;
  x_749 = x_822;
  goto block_816;
  }
  }
  }
  block_909:
  {
  lean_object* x_868; lean_object* x_869; lean_object* x_870; lean_object* x_871; lean_object* x_872; lean_object* x_873; lean_object* x_874; 
  lean_dec(x_867);
  x_868 = lean_st_ref_get(x_7, x_8);
  x_869 = lean_ctor_get(x_868, 1);
  lean_inc(x_869);
  lean_dec(x_868);
  x_870 = lean_st_ref_get(x_3, x_869);
  x_871 = lean_ctor_get(x_870, 0);
  lean_inc(x_871);
  x_872 = lean_ctor_get(x_870, 1);
  lean_inc(x_872);
  lean_dec(x_870);
  x_873 = lean_ctor_get(x_871, 1);
  lean_inc(x_873);
  lean_dec(x_871);
  lean_inc(x_743);
  x_874 = l_Std_HashMapImp_find_x3f___at_Lean_MetavarContext_instantiateExprMVars___spec__1(x_873, x_743);
  if (lean_obj_tag(x_874) == 0)
  {
  lean_object* x_875; 
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_743);
  x_875 = l_Lean_Meta_Closure_collectExprAux(x_743, x_2, x_3, x_4, x_5, x_6, x_7, x_872);
  if (lean_obj_tag(x_875) == 0)
  {
  lean_object* x_876; lean_object* x_877; lean_object* x_878; lean_object* x_879; lean_object* x_880; lean_object* x_881; lean_object* x_882; uint8_t x_883; 
  x_876 = lean_ctor_get(x_875, 0);
  lean_inc(x_876);
  x_877 = lean_ctor_get(x_875, 1);
  lean_inc(x_877);
  lean_dec(x_875);
  x_878 = lean_st_ref_get(x_7, x_877);
  x_879 = lean_ctor_get(x_878, 1);
  lean_inc(x_879);
  lean_dec(x_878);
  x_880 = lean_st_ref_take(x_3, x_879);
  x_881 = lean_ctor_get(x_880, 0);
  lean_inc(x_881);
  x_882 = lean_ctor_get(x_880, 1);
  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; lean_object* x_886; lean_object* x_887; 
  x_884 = lean_ctor_get(x_881, 1);
  lean_inc(x_876);
  x_885 = l_Std_HashMap_insert___at_Lean_MetavarContext_instantiateExprMVars___spec__3(x_884, x_743, x_876);
  lean_ctor_set(x_881, 1, x_885);
  x_886 = lean_st_ref_set(x_3, x_881, x_882);
  x_887 = lean_ctor_get(x_886, 1);
  lean_inc(x_887);
  lean_dec(x_886);
  x_746 = x_876;
  x_747 = x_887;
  goto block_866;
  }
  else
  {
  lean_object* x_888; lean_object* x_889; lean_object* x_890; lean_object* x_891; lean_object* x_892; lean_object* x_893; lean_object* x_894; lean_object* x_895; lean_object* x_896; lean_object* x_897; lean_object* x_898; lean_object* x_899; lean_object* x_900; lean_object* x_901; lean_object* x_902; lean_object* x_903; 
  x_888 = lean_ctor_get(x_881, 0);
  x_889 = lean_ctor_get(x_881, 1);
  x_890 = lean_ctor_get(x_881, 2);
  x_891 = lean_ctor_get(x_881, 3);
  x_892 = lean_ctor_get(x_881, 4);
  x_893 = lean_ctor_get(x_881, 5);
  x_894 = lean_ctor_get(x_881, 6);
  x_895 = lean_ctor_get(x_881, 7);
  x_896 = lean_ctor_get(x_881, 8);
  x_897 = lean_ctor_get(x_881, 9);
  x_898 = lean_ctor_get(x_881, 10);
  x_899 = lean_ctor_get(x_881, 11);
  lean_inc(x_899);
  lean_inc(x_898);
  lean_inc(x_897);
  lean_inc(x_896);
  lean_inc(x_895);
  lean_inc(x_894);
  lean_inc(x_893);
  lean_inc(x_892);
  lean_inc(x_891);
  lean_inc(x_890);
  lean_inc(x_889);
  lean_inc(x_888);
  lean_dec(x_881);
  lean_inc(x_876);
  x_900 = l_Std_HashMap_insert___at_Lean_MetavarContext_instantiateExprMVars___spec__3(x_889, x_743, x_876);
  x_901 = lean_alloc_ctor(0, 12, 0);
  lean_ctor_set(x_901, 0, x_888);
  lean_ctor_set(x_901, 1, x_900);
  lean_ctor_set(x_901, 2, x_890);
  lean_ctor_set(x_901, 3, x_891);
  lean_ctor_set(x_901, 4, x_892);
  lean_ctor_set(x_901, 5, x_893);
  lean_ctor_set(x_901, 6, x_894);
  lean_ctor_set(x_901, 7, x_895);
  lean_ctor_set(x_901, 8, x_896);
  lean_ctor_set(x_901, 9, x_897);
  lean_ctor_set(x_901, 10, x_898);
  lean_ctor_set(x_901, 11, x_899);
  x_902 = lean_st_ref_set(x_3, x_901, x_882);
  x_903 = lean_ctor_get(x_902, 1);
  lean_inc(x_903);
  lean_dec(x_902);
  x_746 = x_876;
  x_747 = x_903;
  goto block_866;
  }
  }
  else
  {
  uint8_t x_904; 
  lean_dec(x_745);
  lean_dec(x_744);
  lean_dec(x_743);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_1);
  x_904 = !lean_is_exclusive(x_875);
  if (x_904 == 0)
  {
  return x_875;
  }
  else
  {
  lean_object* x_905; lean_object* x_906; lean_object* x_907; 
  x_905 = lean_ctor_get(x_875, 0);
  x_906 = lean_ctor_get(x_875, 1);
  lean_inc(x_906);
  lean_inc(x_905);
  lean_dec(x_875);
  x_907 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_907, 0, x_905);
  lean_ctor_set(x_907, 1, x_906);
  return x_907;
  }
  }
  }
  else
  {
  lean_object* x_908; 
  lean_dec(x_743);
  x_908 = lean_ctor_get(x_874, 0);
  lean_inc(x_908);
  lean_dec(x_874);
  x_746 = x_908;
  x_747 = x_872;
  goto block_866;
  }
  }
  }
  case 10:
  {
  lean_object* x_916; lean_object* x_917; uint8_t x_960; 
  x_916 = lean_ctor_get(x_1, 1);
  lean_inc(x_916);
  x_960 = l_Lean_Expr_hasLevelParam(x_916);
  if (x_960 == 0)
  {
  uint8_t x_961; 
  x_961 = l_Lean_Expr_hasFVar(x_916);
  if (x_961 == 0)
  {
  uint8_t x_962; 
  x_962 = l_Lean_Expr_hasMVar(x_916);
  if (x_962 == 0)
  {
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  x_9 = x_916;
  x_10 = x_8;
  goto block_23;
  }
  else
  {
  lean_object* x_963; 
  x_963 = lean_box(0);
  x_917 = x_963;
  goto block_959;
  }
  }
  else
  {
  lean_object* x_964; 
  x_964 = lean_box(0);
  x_917 = x_964;
  goto block_959;
  }
  }
  else
  {
  lean_object* x_965; 
  x_965 = lean_box(0);
  x_917 = x_965;
  goto block_959;
  }
  block_959:
  {
  lean_object* x_918; lean_object* x_919; lean_object* x_920; lean_object* x_921; lean_object* x_922; lean_object* x_923; lean_object* x_924; 
  lean_dec(x_917);
  x_918 = lean_st_ref_get(x_7, x_8);
  x_919 = lean_ctor_get(x_918, 1);
  lean_inc(x_919);
  lean_dec(x_918);
  x_920 = lean_st_ref_get(x_3, x_919);
  x_921 = lean_ctor_get(x_920, 0);
  lean_inc(x_921);
  x_922 = lean_ctor_get(x_920, 1);
  lean_inc(x_922);
  lean_dec(x_920);
  x_923 = lean_ctor_get(x_921, 1);
  lean_inc(x_923);
  lean_dec(x_921);
  lean_inc(x_916);
  x_924 = l_Std_HashMapImp_find_x3f___at_Lean_MetavarContext_instantiateExprMVars___spec__1(x_923, x_916);
  if (lean_obj_tag(x_924) == 0)
  {
  lean_object* x_925; 
  lean_inc(x_7);
  lean_inc(x_916);
  x_925 = l_Lean_Meta_Closure_collectExprAux(x_916, x_2, x_3, x_4, x_5, x_6, x_7, x_922);
  if (lean_obj_tag(x_925) == 0)
  {
  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; uint8_t x_933; 
  x_926 = lean_ctor_get(x_925, 0);
  lean_inc(x_926);
  x_927 = lean_ctor_get(x_925, 1);
  lean_inc(x_927);
  lean_dec(x_925);
  x_928 = lean_st_ref_get(x_7, x_927);
  lean_dec(x_7);
  x_929 = lean_ctor_get(x_928, 1);
  lean_inc(x_929);
  lean_dec(x_928);
  x_930 = lean_st_ref_take(x_3, x_929);
  x_931 = lean_ctor_get(x_930, 0);
  lean_inc(x_931);
  x_932 = lean_ctor_get(x_930, 1);
  lean_inc(x_932);
  lean_dec(x_930);
  x_933 = !lean_is_exclusive(x_931);
  if (x_933 == 0)
  {
  lean_object* x_934; lean_object* x_935; lean_object* x_936; lean_object* x_937; 
  x_934 = lean_ctor_get(x_931, 1);
  lean_inc(x_926);
  x_935 = l_Std_HashMap_insert___at_Lean_MetavarContext_instantiateExprMVars___spec__3(x_934, x_916, x_926);
  lean_ctor_set(x_931, 1, x_935);
  x_936 = lean_st_ref_set(x_3, x_931, x_932);
  x_937 = lean_ctor_get(x_936, 1);
  lean_inc(x_937);
  lean_dec(x_936);
  x_9 = x_926;
  x_10 = x_937;
  goto block_23;
  }
  else
  {
  lean_object* x_938; lean_object* x_939; lean_object* x_940; lean_object* x_941; lean_object* x_942; lean_object* x_943; lean_object* x_944; lean_object* x_945; lean_object* x_946; lean_object* x_947; lean_object* x_948; lean_object* x_949; lean_object* x_950; lean_object* x_951; lean_object* x_952; lean_object* x_953; 
  x_938 = lean_ctor_get(x_931, 0);
  x_939 = lean_ctor_get(x_931, 1);
  x_940 = lean_ctor_get(x_931, 2);
  x_941 = lean_ctor_get(x_931, 3);
  x_942 = lean_ctor_get(x_931, 4);
  x_943 = lean_ctor_get(x_931, 5);
  x_944 = lean_ctor_get(x_931, 6);
  x_945 = lean_ctor_get(x_931, 7);
  x_946 = lean_ctor_get(x_931, 8);
  x_947 = lean_ctor_get(x_931, 9);
  x_948 = lean_ctor_get(x_931, 10);
  x_949 = lean_ctor_get(x_931, 11);
  lean_inc(x_949);
  lean_inc(x_948);
  lean_inc(x_947);
  lean_inc(x_946);
  lean_inc(x_945);
  lean_inc(x_944);
  lean_inc(x_943);
  lean_inc(x_942);
  lean_inc(x_941);
  lean_inc(x_940);
  lean_inc(x_939);
  lean_inc(x_938);
  lean_dec(x_931);
  lean_inc(x_926);
  x_950 = l_Std_HashMap_insert___at_Lean_MetavarContext_instantiateExprMVars___spec__3(x_939, x_916, x_926);
  x_951 = lean_alloc_ctor(0, 12, 0);
  lean_ctor_set(x_951, 0, x_938);
  lean_ctor_set(x_951, 1, x_950);
  lean_ctor_set(x_951, 2, x_940);
  lean_ctor_set(x_951, 3, x_941);
  lean_ctor_set(x_951, 4, x_942);
  lean_ctor_set(x_951, 5, x_943);
  lean_ctor_set(x_951, 6, x_944);
  lean_ctor_set(x_951, 7, x_945);
  lean_ctor_set(x_951, 8, x_946);
  lean_ctor_set(x_951, 9, x_947);
  lean_ctor_set(x_951, 10, x_948);
  lean_ctor_set(x_951, 11, x_949);
  x_952 = lean_st_ref_set(x_3, x_951, x_932);
  x_953 = lean_ctor_get(x_952, 1);
  lean_inc(x_953);
  lean_dec(x_952);
  x_9 = x_926;
  x_10 = x_953;
  goto block_23;
  }
  }
  else
  {
  uint8_t x_954; 
  lean_dec(x_916);
  lean_dec(x_7);
  lean_dec(x_1);
  x_954 = !lean_is_exclusive(x_925);
  if (x_954 == 0)
  {
  return x_925;
  }
  else
  {
  lean_object* x_955; lean_object* x_956; lean_object* x_957; 
  x_955 = lean_ctor_get(x_925, 0);
  x_956 = lean_ctor_get(x_925, 1);
  lean_inc(x_956);
  lean_inc(x_955);
  lean_dec(x_925);
  x_957 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_957, 0, x_955);
  lean_ctor_set(x_957, 1, x_956);
  return x_957;
  }
  }
  }
  else
  {
  lean_object* x_958; 
  lean_dec(x_916);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  x_958 = lean_ctor_get(x_924, 0);
  lean_inc(x_958);
  lean_dec(x_924);
  x_9 = x_958;
  x_10 = x_922;
  goto block_23;
  }
  }
  }
  case 11:
  {
  lean_object* x_966; lean_object* x_967; uint8_t x_1010; 
  x_966 = lean_ctor_get(x_1, 2);
  lean_inc(x_966);
  x_1010 = l_Lean_Expr_hasLevelParam(x_966);
  if (x_1010 == 0)
  {
  uint8_t x_1011; 
  x_1011 = l_Lean_Expr_hasFVar(x_966);
  if (x_1011 == 0)
  {
  uint8_t x_1012; 
  x_1012 = l_Lean_Expr_hasMVar(x_966);
  if (x_1012 == 0)
  {
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  x_24 = x_966;
  x_25 = x_8;
  goto block_39;
  }
  else
  {
  lean_object* x_1013; 
  x_1013 = lean_box(0);
  x_967 = x_1013;
  goto block_1009;
  }
  }
  else
  {
  lean_object* x_1014; 
  x_1014 = lean_box(0);
  x_967 = x_1014;
  goto block_1009;
  }
  }
  else
  {
  lean_object* x_1015; 
  x_1015 = lean_box(0);
  x_967 = x_1015;
  goto block_1009;
  }
  block_1009:
  {
  lean_object* x_968; lean_object* x_969; lean_object* x_970; lean_object* x_971; lean_object* x_972; lean_object* x_973; lean_object* x_974; 
  lean_dec(x_967);
  x_968 = lean_st_ref_get(x_7, x_8);
  x_969 = lean_ctor_get(x_968, 1);
  lean_inc(x_969);
  lean_dec(x_968);
  x_970 = lean_st_ref_get(x_3, x_969);
  x_971 = lean_ctor_get(x_970, 0);
  lean_inc(x_971);
  x_972 = lean_ctor_get(x_970, 1);
  lean_inc(x_972);
  lean_dec(x_970);
  x_973 = lean_ctor_get(x_971, 1);
  lean_inc(x_973);
  lean_dec(x_971);
  lean_inc(x_966);
  x_974 = l_Std_HashMapImp_find_x3f___at_Lean_MetavarContext_instantiateExprMVars___spec__1(x_973, x_966);
  if (lean_obj_tag(x_974) == 0)
  {
  lean_object* x_975; 
  lean_inc(x_7);
  lean_inc(x_966);
  x_975 = l_Lean_Meta_Closure_collectExprAux(x_966, x_2, x_3, x_4, x_5, x_6, x_7, x_972);
  if (lean_obj_tag(x_975) == 0)
  {
  lean_object* x_976; lean_object* x_977; lean_object* x_978; lean_object* x_979; lean_object* x_980; lean_object* x_981; lean_object* x_982; uint8_t x_983; 
  x_976 = lean_ctor_get(x_975, 0);
  lean_inc(x_976);
  x_977 = lean_ctor_get(x_975, 1);
  lean_inc(x_977);
  lean_dec(x_975);
  x_978 = lean_st_ref_get(x_7, x_977);
  lean_dec(x_7);
  x_979 = lean_ctor_get(x_978, 1);
  lean_inc(x_979);
  lean_dec(x_978);
  x_980 = lean_st_ref_take(x_3, x_979);
  x_981 = lean_ctor_get(x_980, 0);
  lean_inc(x_981);
  x_982 = lean_ctor_get(x_980, 1);
  lean_inc(x_982);
  lean_dec(x_980);
  x_983 = !lean_is_exclusive(x_981);
  if (x_983 == 0)
  {
  lean_object* x_984; lean_object* x_985; lean_object* x_986; lean_object* x_987; 
  x_984 = lean_ctor_get(x_981, 1);
  lean_inc(x_976);
  x_985 = l_Std_HashMap_insert___at_Lean_MetavarContext_instantiateExprMVars___spec__3(x_984, x_966, x_976);
  lean_ctor_set(x_981, 1, x_985);
  x_986 = lean_st_ref_set(x_3, x_981, x_982);
  x_987 = lean_ctor_get(x_986, 1);
  lean_inc(x_987);
  lean_dec(x_986);
  x_24 = x_976;
  x_25 = x_987;
  goto block_39;
  }
  else
  {
  lean_object* x_988; lean_object* x_989; lean_object* x_990; lean_object* x_991; lean_object* x_992; lean_object* x_993; lean_object* x_994; lean_object* x_995; lean_object* x_996; lean_object* x_997; lean_object* x_998; lean_object* x_999; lean_object* x_1000; lean_object* x_1001; lean_object* x_1002; lean_object* x_1003; 
  x_988 = lean_ctor_get(x_981, 0);
  x_989 = lean_ctor_get(x_981, 1);
  x_990 = lean_ctor_get(x_981, 2);
  x_991 = lean_ctor_get(x_981, 3);
  x_992 = lean_ctor_get(x_981, 4);
  x_993 = lean_ctor_get(x_981, 5);
  x_994 = lean_ctor_get(x_981, 6);
  x_995 = lean_ctor_get(x_981, 7);
  x_996 = lean_ctor_get(x_981, 8);
  x_997 = lean_ctor_get(x_981, 9);
  x_998 = lean_ctor_get(x_981, 10);
  x_999 = lean_ctor_get(x_981, 11);
  lean_inc(x_999);
  lean_inc(x_998);
  lean_inc(x_997);
  lean_inc(x_996);
  lean_inc(x_995);
  lean_inc(x_994);
  lean_inc(x_993);
  lean_inc(x_992);
  lean_inc(x_991);
  lean_inc(x_990);
  lean_inc(x_989);
  lean_inc(x_988);
  lean_dec(x_981);
  lean_inc(x_976);
  x_1000 = l_Std_HashMap_insert___at_Lean_MetavarContext_instantiateExprMVars___spec__3(x_989, x_966, x_976);
  x_1001 = lean_alloc_ctor(0, 12, 0);
  lean_ctor_set(x_1001, 0, x_988);
  lean_ctor_set(x_1001, 1, x_1000);
  lean_ctor_set(x_1001, 2, x_990);
  lean_ctor_set(x_1001, 3, x_991);
  lean_ctor_set(x_1001, 4, x_992);
  lean_ctor_set(x_1001, 5, x_993);
  lean_ctor_set(x_1001, 6, x_994);
  lean_ctor_set(x_1001, 7, x_995);
  lean_ctor_set(x_1001, 8, x_996);
  lean_ctor_set(x_1001, 9, x_997);
  lean_ctor_set(x_1001, 10, x_998);
  lean_ctor_set(x_1001, 11, x_999);
  x_1002 = lean_st_ref_set(x_3, x_1001, x_982);
  x_1003 = lean_ctor_get(x_1002, 1);
  lean_inc(x_1003);
  lean_dec(x_1002);
  x_24 = x_976;
  x_25 = x_1003;
  goto block_39;
  }
  }
  else
  {
  uint8_t x_1004; 
  lean_dec(x_966);
  lean_dec(x_7);
  lean_dec(x_1);
  x_1004 = !lean_is_exclusive(x_975);
  if (x_1004 == 0)
  {
  return x_975;
  }
  else
  {
  lean_object* x_1005; lean_object* x_1006; lean_object* x_1007; 
  x_1005 = lean_ctor_get(x_975, 0);
  x_1006 = lean_ctor_get(x_975, 1);
  lean_inc(x_1006);
  lean_inc(x_1005);
  lean_dec(x_975);
  x_1007 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_1007, 0, x_1005);
  lean_ctor_set(x_1007, 1, x_1006);
  return x_1007;
  }
  }
  }
  else
  {
  lean_object* x_1008; 
  lean_dec(x_966);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  x_1008 = lean_ctor_get(x_974, 0);
  lean_inc(x_1008);
  lean_dec(x_974);
  x_24 = x_1008;
  x_25 = x_972;
  goto block_39;
  }
  }
  }
  default: 
  {
  lean_object* x_1016; 
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  x_1016 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_1016, 0, x_1);
  lean_ctor_set(x_1016, 1, x_8);
  return x_1016;
  }
  }
  block_23:
  {
  if (lean_obj_tag(x_1) == 10)
  {
  uint8_t x_11; 
  x_11 = !lean_is_exclusive(x_1);
  if (x_11 == 0)
  {
  lean_object* x_12; lean_object* x_13; 
  x_12 = lean_expr_update_mdata(x_1, x_9);
  x_13 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_13, 0, x_12);
  lean_ctor_set(x_13, 1, x_10);
  return x_13;
  }
  else
  {
  lean_object* x_14; lean_object* x_15; uint64_t x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; 
  x_14 = lean_ctor_get(x_1, 0);
  x_15 = lean_ctor_get(x_1, 1);
  x_16 = lean_ctor_get_uint64(x_1, sizeof(void*)*2);
  lean_inc(x_15);
  lean_inc(x_14);
  lean_dec(x_1);
  x_17 = lean_alloc_ctor(10, 2, 8);
  lean_ctor_set(x_17, 0, x_14);
  lean_ctor_set(x_17, 1, x_15);
  lean_ctor_set_uint64(x_17, sizeof(void*)*2, x_16);
  x_18 = lean_expr_update_mdata(x_17, x_9);
  x_19 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_19, 0, x_18);
  lean_ctor_set(x_19, 1, x_10);
  return x_19;
  }
  }
  else
  {
  lean_object* x_20; lean_object* x_21; lean_object* x_22; 
  lean_dec(x_9);
  lean_dec(x_1);
  x_20 = l_Lean_Meta_Closure_collectExprAux___closed__4;
  x_21 = l_panic___at_Lean_Expr_getRevArg_x21___spec__1(x_20);
  x_22 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_22, 0, x_21);
  lean_ctor_set(x_22, 1, x_10);
  return x_22;
  }
  }
  block_39:
  {
  if (lean_obj_tag(x_1) == 11)
  {
  uint8_t x_26; 
  x_26 = !lean_is_exclusive(x_1);
  if (x_26 == 0)
  {
  lean_object* x_27; lean_object* x_28; 
  x_27 = lean_expr_update_proj(x_1, x_24);
  x_28 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_28, 0, x_27);
  lean_ctor_set(x_28, 1, x_25);
  return x_28;
  }
  else
  {
  lean_object* x_29; lean_object* x_30; lean_object* x_31; uint64_t x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; 
  x_29 = lean_ctor_get(x_1, 0);
  x_30 = lean_ctor_get(x_1, 1);
  x_31 = lean_ctor_get(x_1, 2);
  x_32 = lean_ctor_get_uint64(x_1, sizeof(void*)*3);
  lean_inc(x_31);
  lean_inc(x_30);
  lean_inc(x_29);
  lean_dec(x_1);
  x_33 = lean_alloc_ctor(11, 3, 8);
  lean_ctor_set(x_33, 0, x_29);
  lean_ctor_set(x_33, 1, x_30);
  lean_ctor_set(x_33, 2, x_31);
  lean_ctor_set_uint64(x_33, sizeof(void*)*3, x_32);
  x_34 = lean_expr_update_proj(x_33, x_24);
  x_35 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_35, 0, x_34);
  lean_ctor_set(x_35, 1, x_25);
  return x_35;
  }
  }
  else
  {
  lean_object* x_36; lean_object* x_37; lean_object* x_38; 
  lean_dec(x_24);
  lean_dec(x_1);
  x_36 = l_Lean_Meta_Closure_collectExprAux___closed__7;
  x_37 = l_panic___at_Lean_Expr_getRevArg_x21___spec__1(x_36);
  x_38 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_38, 0, x_37);
  lean_ctor_set(x_38, 1, x_25);
  return x_38;
  }
  }
  }
  }
  LEAN_EXPORT lean_object* l_Lean_mkFreshId___at_Lean_Meta_Closure_collectExprAux___spec__2___rarg___boxed(lean_object* x_1, lean_object* x_2) {
  _start:
  {
  lean_object* x_3; 
  x_3 = l_Lean_mkFreshId___at_Lean_Meta_Closure_collectExprAux___spec__2___rarg(x_1, x_2);
  lean_dec(x_1);
  return x_3;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_mkFreshId___at_Lean_Meta_Closure_collectExprAux___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
  _start:
  {
  uint8_t x_6; lean_object* x_7; 
  x_6 = lean_unbox(x_1);
  lean_dec(x_1);
  x_7 = l_Lean_mkFreshId___at_Lean_Meta_Closure_collectExprAux___spec__2(x_6, x_2, x_3, x_4, x_5);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  return x_7;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_mkFreshFVarId___at_Lean_Meta_Closure_collectExprAux___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
  _start:
  {
  uint8_t x_8; lean_object* x_9; 
  x_8 = lean_unbox(x_1);
  lean_dec(x_1);
  x_9 = l_Lean_mkFreshFVarId___at_Lean_Meta_Closure_collectExprAux___spec__1(x_8, x_2, x_3, x_4, x_5, x_6, x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  return x_9;
  }
  }
  LEAN_EXPORT lean_object* l_List_mapM___at_Lean_Meta_Closure_collectExprAux___spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
  _start:
  {
  uint8_t x_9; lean_object* x_10; 
  x_9 = lean_unbox(x_2);
  lean_dec(x_2);
  x_10 = l_List_mapM___at_Lean_Meta_Closure_collectExprAux___spec__3(x_1, x_9, x_3, x_4, x_5, x_6, x_7, x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  return x_10;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_collectExprAux___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
  _start:
  {
  uint8_t x_9; lean_object* x_10; 
  x_9 = lean_unbox(x_2);
  lean_dec(x_2);
  x_10 = l_Lean_Meta_Closure_collectExprAux(x_1, x_9, x_3, x_4, x_5, x_6, x_7, x_8);
  lean_dec(x_3);
  return x_10;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_collectExpr(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
  _start:
  {
  lean_object* x_9; 
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  x_9 = l_Lean_Meta_Closure_preprocess(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8);
  if (lean_obj_tag(x_9) == 0)
  {
  uint8_t x_10; 
  x_10 = !lean_is_exclusive(x_9);
  if (x_10 == 0)
  {
  lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_99; 
  x_11 = lean_ctor_get(x_9, 0);
  x_12 = lean_ctor_get(x_9, 1);
  x_99 = l_Lean_Expr_hasLevelParam(x_11);
  if (x_99 == 0)
  {
  uint8_t x_100; 
  x_100 = l_Lean_Expr_hasFVar(x_11);
  if (x_100 == 0)
  {
  uint8_t x_101; 
  x_101 = l_Lean_Expr_hasMVar(x_11);
  if (x_101 == 0)
  {
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  return x_9;
  }
  else
  {
  lean_object* x_102; 
  lean_free_object(x_9);
  x_102 = lean_box(0);
  x_13 = x_102;
  goto block_98;
  }
  }
  else
  {
  lean_object* x_103; 
  lean_free_object(x_9);
  x_103 = lean_box(0);
  x_13 = x_103;
  goto block_98;
  }
  }
  else
  {
  lean_object* x_104; 
  lean_free_object(x_9);
  x_104 = lean_box(0);
  x_13 = x_104;
  goto block_98;
  }
  block_98:
  {
  lean_object* x_14; lean_object* x_15; lean_object* x_16; uint8_t x_17; 
  lean_dec(x_13);
  x_14 = lean_st_ref_get(x_7, x_12);
  x_15 = lean_ctor_get(x_14, 1);
  lean_inc(x_15);
  lean_dec(x_14);
  x_16 = lean_st_ref_get(x_3, x_15);
  x_17 = !lean_is_exclusive(x_16);
  if (x_17 == 0)
  {
  lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; 
  x_18 = lean_ctor_get(x_16, 0);
  x_19 = lean_ctor_get(x_16, 1);
  x_20 = lean_ctor_get(x_18, 1);
  lean_inc(x_20);
  lean_dec(x_18);
  lean_inc(x_11);
  x_21 = l_Std_HashMapImp_find_x3f___at_Lean_MetavarContext_instantiateExprMVars___spec__1(x_20, x_11);
  if (lean_obj_tag(x_21) == 0)
  {
  lean_object* x_22; 
  lean_free_object(x_16);
  lean_inc(x_7);
  lean_inc(x_11);
  x_22 = l_Lean_Meta_Closure_collectExprAux(x_11, x_2, x_3, x_4, x_5, x_6, x_7, x_19);
  if (lean_obj_tag(x_22) == 0)
  {
  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; uint8_t x_30; 
  x_23 = lean_ctor_get(x_22, 0);
  lean_inc(x_23);
  x_24 = lean_ctor_get(x_22, 1);
  lean_inc(x_24);
  lean_dec(x_22);
  x_25 = lean_st_ref_get(x_7, x_24);
  lean_dec(x_7);
  x_26 = lean_ctor_get(x_25, 1);
  lean_inc(x_26);
  lean_dec(x_25);
  x_27 = lean_st_ref_take(x_3, x_26);
  x_28 = lean_ctor_get(x_27, 0);
  lean_inc(x_28);
  x_29 = lean_ctor_get(x_27, 1);
  lean_inc(x_29);
  lean_dec(x_27);
  x_30 = !lean_is_exclusive(x_28);
  if (x_30 == 0)
  {
  lean_object* x_31; lean_object* x_32; lean_object* x_33; uint8_t x_34; 
  x_31 = lean_ctor_get(x_28, 1);
  lean_inc(x_23);
  x_32 = l_Std_HashMap_insert___at_Lean_MetavarContext_instantiateExprMVars___spec__3(x_31, x_11, x_23);
  lean_ctor_set(x_28, 1, x_32);
  x_33 = lean_st_ref_set(x_3, x_28, x_29);
  x_34 = !lean_is_exclusive(x_33);
  if (x_34 == 0)
  {
  lean_object* x_35; 
  x_35 = lean_ctor_get(x_33, 0);
  lean_dec(x_35);
  lean_ctor_set(x_33, 0, x_23);
  return x_33;
  }
  else
  {
  lean_object* x_36; lean_object* x_37; 
  x_36 = lean_ctor_get(x_33, 1);
  lean_inc(x_36);
  lean_dec(x_33);
  x_37 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_37, 0, x_23);
  lean_ctor_set(x_37, 1, x_36);
  return x_37;
  }
  }
  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; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; 
  x_38 = lean_ctor_get(x_28, 0);
  x_39 = lean_ctor_get(x_28, 1);
  x_40 = lean_ctor_get(x_28, 2);
  x_41 = lean_ctor_get(x_28, 3);
  x_42 = lean_ctor_get(x_28, 4);
  x_43 = lean_ctor_get(x_28, 5);
  x_44 = lean_ctor_get(x_28, 6);
  x_45 = lean_ctor_get(x_28, 7);
  x_46 = lean_ctor_get(x_28, 8);
  x_47 = lean_ctor_get(x_28, 9);
  x_48 = lean_ctor_get(x_28, 10);
  x_49 = lean_ctor_get(x_28, 11);
  lean_inc(x_49);
  lean_inc(x_48);
  lean_inc(x_47);
  lean_inc(x_46);
  lean_inc(x_45);
  lean_inc(x_44);
  lean_inc(x_43);
  lean_inc(x_42);
  lean_inc(x_41);
  lean_inc(x_40);
  lean_inc(x_39);
  lean_inc(x_38);
  lean_dec(x_28);
  lean_inc(x_23);
  x_50 = l_Std_HashMap_insert___at_Lean_MetavarContext_instantiateExprMVars___spec__3(x_39, x_11, x_23);
  x_51 = lean_alloc_ctor(0, 12, 0);
  lean_ctor_set(x_51, 0, x_38);
  lean_ctor_set(x_51, 1, x_50);
  lean_ctor_set(x_51, 2, x_40);
  lean_ctor_set(x_51, 3, x_41);
  lean_ctor_set(x_51, 4, x_42);
  lean_ctor_set(x_51, 5, x_43);
  lean_ctor_set(x_51, 6, x_44);
  lean_ctor_set(x_51, 7, x_45);
  lean_ctor_set(x_51, 8, x_46);
  lean_ctor_set(x_51, 9, x_47);
  lean_ctor_set(x_51, 10, x_48);
  lean_ctor_set(x_51, 11, x_49);
  x_52 = lean_st_ref_set(x_3, x_51, x_29);
  x_53 = lean_ctor_get(x_52, 1);
  lean_inc(x_53);
  if (lean_is_exclusive(x_52)) {
   lean_ctor_release(x_52, 0);
   lean_ctor_release(x_52, 1);
   x_54 = x_52;
  } else {
   lean_dec_ref(x_52);
   x_54 = lean_box(0);
  }
  if (lean_is_scalar(x_54)) {
   x_55 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_55 = x_54;
  }
  lean_ctor_set(x_55, 0, x_23);
  lean_ctor_set(x_55, 1, x_53);
  return x_55;
  }
  }
  else
  {
  uint8_t x_56; 
  lean_dec(x_11);
  lean_dec(x_7);
  x_56 = !lean_is_exclusive(x_22);
  if (x_56 == 0)
  {
  return x_22;
  }
  else
  {
  lean_object* x_57; lean_object* x_58; lean_object* x_59; 
  x_57 = lean_ctor_get(x_22, 0);
  x_58 = lean_ctor_get(x_22, 1);
  lean_inc(x_58);
  lean_inc(x_57);
  lean_dec(x_22);
  x_59 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_59, 0, x_57);
  lean_ctor_set(x_59, 1, x_58);
  return x_59;
  }
  }
  }
  else
  {
  lean_object* x_60; 
  lean_dec(x_11);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  x_60 = lean_ctor_get(x_21, 0);
  lean_inc(x_60);
  lean_dec(x_21);
  lean_ctor_set(x_16, 0, x_60);
  return x_16;
  }
  }
  else
  {
  lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; 
  x_61 = lean_ctor_get(x_16, 0);
  x_62 = lean_ctor_get(x_16, 1);
  lean_inc(x_62);
  lean_inc(x_61);
  lean_dec(x_16);
  x_63 = lean_ctor_get(x_61, 1);
  lean_inc(x_63);
  lean_dec(x_61);
  lean_inc(x_11);
  x_64 = l_Std_HashMapImp_find_x3f___at_Lean_MetavarContext_instantiateExprMVars___spec__1(x_63, x_11);
  if (lean_obj_tag(x_64) == 0)
  {
  lean_object* x_65; 
  lean_inc(x_7);
  lean_inc(x_11);
  x_65 = l_Lean_Meta_Closure_collectExprAux(x_11, x_2, x_3, x_4, x_5, x_6, x_7, x_62);
  if (lean_obj_tag(x_65) == 0)
  {
  lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; 
  x_66 = lean_ctor_get(x_65, 0);
  lean_inc(x_66);
  x_67 = lean_ctor_get(x_65, 1);
  lean_inc(x_67);
  lean_dec(x_65);
  x_68 = lean_st_ref_get(x_7, x_67);
  lean_dec(x_7);
  x_69 = lean_ctor_get(x_68, 1);
  lean_inc(x_69);
  lean_dec(x_68);
  x_70 = lean_st_ref_take(x_3, x_69);
  x_71 = lean_ctor_get(x_70, 0);
  lean_inc(x_71);
  x_72 = lean_ctor_get(x_70, 1);
  lean_inc(x_72);
  lean_dec(x_70);
  x_73 = lean_ctor_get(x_71, 0);
  lean_inc(x_73);
  x_74 = lean_ctor_get(x_71, 1);
  lean_inc(x_74);
  x_75 = lean_ctor_get(x_71, 2);
  lean_inc(x_75);
  x_76 = lean_ctor_get(x_71, 3);
  lean_inc(x_76);
  x_77 = lean_ctor_get(x_71, 4);
  lean_inc(x_77);
  x_78 = lean_ctor_get(x_71, 5);
  lean_inc(x_78);
  x_79 = lean_ctor_get(x_71, 6);
  lean_inc(x_79);
  x_80 = lean_ctor_get(x_71, 7);
  lean_inc(x_80);
  x_81 = lean_ctor_get(x_71, 8);
  lean_inc(x_81);
  x_82 = lean_ctor_get(x_71, 9);
  lean_inc(x_82);
  x_83 = lean_ctor_get(x_71, 10);
  lean_inc(x_83);
  x_84 = lean_ctor_get(x_71, 11);
  lean_inc(x_84);
  if (lean_is_exclusive(x_71)) {
   lean_ctor_release(x_71, 0);
   lean_ctor_release(x_71, 1);
   lean_ctor_release(x_71, 2);
   lean_ctor_release(x_71, 3);
   lean_ctor_release(x_71, 4);
   lean_ctor_release(x_71, 5);
   lean_ctor_release(x_71, 6);
   lean_ctor_release(x_71, 7);
   lean_ctor_release(x_71, 8);
   lean_ctor_release(x_71, 9);
   lean_ctor_release(x_71, 10);
   lean_ctor_release(x_71, 11);
   x_85 = x_71;
  } else {
   lean_dec_ref(x_71);
   x_85 = lean_box(0);
  }
  lean_inc(x_66);
  x_86 = l_Std_HashMap_insert___at_Lean_MetavarContext_instantiateExprMVars___spec__3(x_74, x_11, x_66);
  if (lean_is_scalar(x_85)) {
   x_87 = lean_alloc_ctor(0, 12, 0);
  } else {
   x_87 = x_85;
  }
  lean_ctor_set(x_87, 0, x_73);
  lean_ctor_set(x_87, 1, x_86);
  lean_ctor_set(x_87, 2, x_75);
  lean_ctor_set(x_87, 3, x_76);
  lean_ctor_set(x_87, 4, x_77);
  lean_ctor_set(x_87, 5, x_78);
  lean_ctor_set(x_87, 6, x_79);
  lean_ctor_set(x_87, 7, x_80);
  lean_ctor_set(x_87, 8, x_81);
  lean_ctor_set(x_87, 9, x_82);
  lean_ctor_set(x_87, 10, x_83);
  lean_ctor_set(x_87, 11, x_84);
  x_88 = lean_st_ref_set(x_3, x_87, x_72);
  x_89 = lean_ctor_get(x_88, 1);
  lean_inc(x_89);
  if (lean_is_exclusive(x_88)) {
   lean_ctor_release(x_88, 0);
   lean_ctor_release(x_88, 1);
   x_90 = x_88;
  } else {
   lean_dec_ref(x_88);
   x_90 = lean_box(0);
  }
  if (lean_is_scalar(x_90)) {
   x_91 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_91 = x_90;
  }
  lean_ctor_set(x_91, 0, x_66);
  lean_ctor_set(x_91, 1, x_89);
  return x_91;
  }
  else
  {
  lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; 
  lean_dec(x_11);
  lean_dec(x_7);
  x_92 = lean_ctor_get(x_65, 0);
  lean_inc(x_92);
  x_93 = lean_ctor_get(x_65, 1);
  lean_inc(x_93);
  if (lean_is_exclusive(x_65)) {
   lean_ctor_release(x_65, 0);
   lean_ctor_release(x_65, 1);
   x_94 = x_65;
  } else {
   lean_dec_ref(x_65);
   x_94 = lean_box(0);
  }
  if (lean_is_scalar(x_94)) {
   x_95 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_95 = x_94;
  }
  lean_ctor_set(x_95, 0, x_92);
  lean_ctor_set(x_95, 1, x_93);
  return x_95;
  }
  }
  else
  {
  lean_object* x_96; lean_object* x_97; 
  lean_dec(x_11);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  x_96 = lean_ctor_get(x_64, 0);
  lean_inc(x_96);
  lean_dec(x_64);
  x_97 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_97, 0, x_96);
  lean_ctor_set(x_97, 1, x_62);
  return x_97;
  }
  }
  }
  }
  else
  {
  lean_object* x_105; lean_object* x_106; lean_object* x_107; uint8_t x_150; 
  x_105 = lean_ctor_get(x_9, 0);
  x_106 = lean_ctor_get(x_9, 1);
  lean_inc(x_106);
  lean_inc(x_105);
  lean_dec(x_9);
  x_150 = l_Lean_Expr_hasLevelParam(x_105);
  if (x_150 == 0)
  {
  uint8_t x_151; 
  x_151 = l_Lean_Expr_hasFVar(x_105);
  if (x_151 == 0)
  {
  uint8_t x_152; 
  x_152 = l_Lean_Expr_hasMVar(x_105);
  if (x_152 == 0)
  {
  lean_object* x_153; 
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  x_153 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_153, 0, x_105);
  lean_ctor_set(x_153, 1, x_106);
  return x_153;
  }
  else
  {
  lean_object* x_154; 
  x_154 = lean_box(0);
  x_107 = x_154;
  goto block_149;
  }
  }
  else
  {
  lean_object* x_155; 
  x_155 = lean_box(0);
  x_107 = x_155;
  goto block_149;
  }
  }
  else
  {
  lean_object* x_156; 
  x_156 = lean_box(0);
  x_107 = x_156;
  goto block_149;
  }
  block_149:
  {
  lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; 
  lean_dec(x_107);
  x_108 = lean_st_ref_get(x_7, x_106);
  x_109 = lean_ctor_get(x_108, 1);
  lean_inc(x_109);
  lean_dec(x_108);
  x_110 = lean_st_ref_get(x_3, x_109);
  x_111 = lean_ctor_get(x_110, 0);
  lean_inc(x_111);
  x_112 = lean_ctor_get(x_110, 1);
  lean_inc(x_112);
  if (lean_is_exclusive(x_110)) {
   lean_ctor_release(x_110, 0);
   lean_ctor_release(x_110, 1);
   x_113 = x_110;
  } else {
   lean_dec_ref(x_110);
   x_113 = lean_box(0);
  }
  x_114 = lean_ctor_get(x_111, 1);
  lean_inc(x_114);
  lean_dec(x_111);
  lean_inc(x_105);
  x_115 = l_Std_HashMapImp_find_x3f___at_Lean_MetavarContext_instantiateExprMVars___spec__1(x_114, x_105);
  if (lean_obj_tag(x_115) == 0)
  {
  lean_object* x_116; 
  lean_dec(x_113);
  lean_inc(x_7);
  lean_inc(x_105);
  x_116 = l_Lean_Meta_Closure_collectExprAux(x_105, x_2, x_3, x_4, x_5, x_6, x_7, x_112);
  if (lean_obj_tag(x_116) == 0)
  {
  lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_125; lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; 
  x_117 = lean_ctor_get(x_116, 0);
  lean_inc(x_117);
  x_118 = lean_ctor_get(x_116, 1);
  lean_inc(x_118);
  lean_dec(x_116);
  x_119 = lean_st_ref_get(x_7, x_118);
  lean_dec(x_7);
  x_120 = lean_ctor_get(x_119, 1);
  lean_inc(x_120);
  lean_dec(x_119);
  x_121 = lean_st_ref_take(x_3, x_120);
  x_122 = lean_ctor_get(x_121, 0);
  lean_inc(x_122);
  x_123 = lean_ctor_get(x_121, 1);
  lean_inc(x_123);
  lean_dec(x_121);
  x_124 = lean_ctor_get(x_122, 0);
  lean_inc(x_124);
  x_125 = lean_ctor_get(x_122, 1);
  lean_inc(x_125);
  x_126 = lean_ctor_get(x_122, 2);
  lean_inc(x_126);
  x_127 = lean_ctor_get(x_122, 3);
  lean_inc(x_127);
  x_128 = lean_ctor_get(x_122, 4);
  lean_inc(x_128);
  x_129 = lean_ctor_get(x_122, 5);
  lean_inc(x_129);
  x_130 = lean_ctor_get(x_122, 6);
  lean_inc(x_130);
  x_131 = lean_ctor_get(x_122, 7);
  lean_inc(x_131);
  x_132 = lean_ctor_get(x_122, 8);
  lean_inc(x_132);
  x_133 = lean_ctor_get(x_122, 9);
  lean_inc(x_133);
  x_134 = lean_ctor_get(x_122, 10);
  lean_inc(x_134);
  x_135 = lean_ctor_get(x_122, 11);
  lean_inc(x_135);
  if (lean_is_exclusive(x_122)) {
   lean_ctor_release(x_122, 0);
   lean_ctor_release(x_122, 1);
   lean_ctor_release(x_122, 2);
   lean_ctor_release(x_122, 3);
   lean_ctor_release(x_122, 4);
   lean_ctor_release(x_122, 5);
   lean_ctor_release(x_122, 6);
   lean_ctor_release(x_122, 7);
   lean_ctor_release(x_122, 8);
   lean_ctor_release(x_122, 9);
   lean_ctor_release(x_122, 10);
   lean_ctor_release(x_122, 11);
   x_136 = x_122;
  } else {
   lean_dec_ref(x_122);
   x_136 = lean_box(0);
  }
  lean_inc(x_117);
  x_137 = l_Std_HashMap_insert___at_Lean_MetavarContext_instantiateExprMVars___spec__3(x_125, x_105, x_117);
  if (lean_is_scalar(x_136)) {
   x_138 = lean_alloc_ctor(0, 12, 0);
  } else {
   x_138 = x_136;
  }
  lean_ctor_set(x_138, 0, x_124);
  lean_ctor_set(x_138, 1, x_137);
  lean_ctor_set(x_138, 2, x_126);
  lean_ctor_set(x_138, 3, x_127);
  lean_ctor_set(x_138, 4, x_128);
  lean_ctor_set(x_138, 5, x_129);
  lean_ctor_set(x_138, 6, x_130);
  lean_ctor_set(x_138, 7, x_131);
  lean_ctor_set(x_138, 8, x_132);
  lean_ctor_set(x_138, 9, x_133);
  lean_ctor_set(x_138, 10, x_134);
  lean_ctor_set(x_138, 11, x_135);
  x_139 = lean_st_ref_set(x_3, x_138, x_123);
  x_140 = lean_ctor_get(x_139, 1);
  lean_inc(x_140);
  if (lean_is_exclusive(x_139)) {
   lean_ctor_release(x_139, 0);
   lean_ctor_release(x_139, 1);
   x_141 = x_139;
  } else {
   lean_dec_ref(x_139);
   x_141 = lean_box(0);
  }
  if (lean_is_scalar(x_141)) {
   x_142 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_142 = x_141;
  }
  lean_ctor_set(x_142, 0, x_117);
  lean_ctor_set(x_142, 1, x_140);
  return x_142;
  }
  else
  {
  lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; 
  lean_dec(x_105);
  lean_dec(x_7);
  x_143 = lean_ctor_get(x_116, 0);
  lean_inc(x_143);
  x_144 = lean_ctor_get(x_116, 1);
  lean_inc(x_144);
  if (lean_is_exclusive(x_116)) {
   lean_ctor_release(x_116, 0);
   lean_ctor_release(x_116, 1);
   x_145 = x_116;
  } else {
   lean_dec_ref(x_116);
   x_145 = lean_box(0);
  }
  if (lean_is_scalar(x_145)) {
   x_146 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_146 = x_145;
  }
  lean_ctor_set(x_146, 0, x_143);
  lean_ctor_set(x_146, 1, x_144);
  return x_146;
  }
  }
  else
  {
  lean_object* x_147; lean_object* x_148; 
  lean_dec(x_105);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  x_147 = lean_ctor_get(x_115, 0);
  lean_inc(x_147);
  lean_dec(x_115);
  if (lean_is_scalar(x_113)) {
   x_148 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_148 = x_113;
  }
  lean_ctor_set(x_148, 0, x_147);
  lean_ctor_set(x_148, 1, x_112);
  return x_148;
  }
  }
  }
  }
  else
  {
  uint8_t x_157; 
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  x_157 = !lean_is_exclusive(x_9);
  if (x_157 == 0)
  {
  return x_9;
  }
  else
  {
  lean_object* x_158; lean_object* x_159; lean_object* x_160; 
  x_158 = lean_ctor_get(x_9, 0);
  x_159 = lean_ctor_get(x_9, 1);
  lean_inc(x_159);
  lean_inc(x_158);
  lean_dec(x_9);
  x_160 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_160, 0, x_158);
  lean_ctor_set(x_160, 1, x_159);
  return x_160;
  }
  }
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_collectExpr___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
  _start:
  {
  uint8_t x_9; lean_object* x_10; 
  x_9 = lean_unbox(x_2);
  lean_dec(x_2);
  x_10 = l_Lean_Meta_Closure_collectExpr(x_1, x_9, x_3, x_4, x_5, x_6, x_7, x_8);
  lean_dec(x_3);
  return x_10;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_pickNextToProcessAux(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_dec(x_2);
  lean_dec(x_1);
  x_7 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_7, 0, x_4);
  lean_ctor_set(x_7, 1, x_3);
  return x_7;
  }
  else
  {
  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_array_fget(x_3, x_2);
  x_9 = lean_ctor_get(x_4, 0);
  lean_inc(x_9);
  lean_inc(x_1);
  x_10 = l_Lean_LocalContext_get_x21(x_1, x_9);
  x_11 = l_Lean_LocalDecl_index(x_10);
  lean_dec(x_10);
  x_12 = lean_ctor_get(x_8, 0);
  lean_inc(x_12);
  lean_inc(x_1);
  x_13 = l_Lean_LocalContext_get_x21(x_1, x_12);
  x_14 = l_Lean_LocalDecl_index(x_13);
  lean_dec(x_13);
  x_15 = lean_nat_dec_lt(x_11, x_14);
  lean_dec(x_14);
  lean_dec(x_11);
  if (x_15 == 0)
  {
  lean_object* x_16; lean_object* x_17; 
  lean_dec(x_8);
  x_16 = lean_unsigned_to_nat(1u);
  x_17 = lean_nat_add(x_2, x_16);
  lean_dec(x_2);
  x_2 = x_17;
  goto _start;
  }
  else
  {
  lean_object* x_19; lean_object* x_20; lean_object* x_21; 
  x_19 = lean_unsigned_to_nat(1u);
  x_20 = lean_nat_add(x_2, x_19);
  x_21 = lean_array_fset(x_3, x_2, x_4);
  lean_dec(x_2);
  x_2 = x_20;
  x_3 = x_21;
  x_4 = x_8;
  goto _start;
  }
  }
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_pickNextToProcess_x3f___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; lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; 
  x_7 = lean_ctor_get(x_2, 1);
  lean_inc(x_7);
  lean_dec(x_2);
  x_8 = lean_st_ref_get(x_5, x_6);
  x_9 = lean_ctor_get(x_8, 1);
  lean_inc(x_9);
  lean_dec(x_8);
  x_10 = lean_st_ref_get(x_1, x_9);
  x_11 = !lean_is_exclusive(x_10);
  if (x_11 == 0)
  {
  lean_object* x_12; lean_object* x_13; lean_object* x_14; uint8_t x_15; 
  x_12 = lean_ctor_get(x_10, 0);
  x_13 = lean_ctor_get(x_10, 1);
  x_14 = lean_ctor_get(x_12, 11);
  lean_inc(x_14);
  lean_dec(x_12);
  x_15 = l_Array_isEmpty___rarg(x_14);
  lean_dec(x_14);
  if (x_15 == 0)
  {
  lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; uint8_t x_21; 
  lean_free_object(x_10);
  x_16 = lean_st_ref_get(x_5, x_13);
  x_17 = lean_ctor_get(x_16, 1);
  lean_inc(x_17);
  lean_dec(x_16);
  x_18 = lean_st_ref_take(x_1, x_17);
  x_19 = lean_ctor_get(x_18, 0);
  lean_inc(x_19);
  x_20 = lean_ctor_get(x_18, 1);
  lean_inc(x_20);
  lean_dec(x_18);
  x_21 = !lean_is_exclusive(x_19);
  if (x_21 == 0)
  {
  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; uint8_t x_32; 
  x_22 = lean_ctor_get(x_19, 11);
  x_23 = l_Lean_Meta_Closure_instInhabitedToProcessElement;
  x_24 = l_Array_back___rarg(x_23, x_22);
  x_25 = lean_array_pop(x_22);
  x_26 = lean_unsigned_to_nat(0u);
  x_27 = l_Lean_Meta_Closure_pickNextToProcessAux(x_7, x_26, x_25, x_24);
  x_28 = lean_ctor_get(x_27, 0);
  lean_inc(x_28);
  x_29 = lean_ctor_get(x_27, 1);
  lean_inc(x_29);
  lean_dec(x_27);
  x_30 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_30, 0, x_28);
  lean_ctor_set(x_19, 11, x_29);
  x_31 = lean_st_ref_set(x_1, x_19, x_20);
  x_32 = !lean_is_exclusive(x_31);
  if (x_32 == 0)
  {
  lean_object* x_33; 
  x_33 = lean_ctor_get(x_31, 0);
  lean_dec(x_33);
  lean_ctor_set(x_31, 0, x_30);
  return x_31;
  }
  else
  {
  lean_object* x_34; lean_object* x_35; 
  x_34 = lean_ctor_get(x_31, 1);
  lean_inc(x_34);
  lean_dec(x_31);
  x_35 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_35, 0, x_30);
  lean_ctor_set(x_35, 1, x_34);
  return x_35;
  }
  }
  else
  {
  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; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; 
  x_36 = lean_ctor_get(x_19, 0);
  x_37 = lean_ctor_get(x_19, 1);
  x_38 = lean_ctor_get(x_19, 2);
  x_39 = lean_ctor_get(x_19, 3);
  x_40 = lean_ctor_get(x_19, 4);
  x_41 = lean_ctor_get(x_19, 5);
  x_42 = lean_ctor_get(x_19, 6);
  x_43 = lean_ctor_get(x_19, 7);
  x_44 = lean_ctor_get(x_19, 8);
  x_45 = lean_ctor_get(x_19, 9);
  x_46 = lean_ctor_get(x_19, 10);
  x_47 = lean_ctor_get(x_19, 11);
  lean_inc(x_47);
  lean_inc(x_46);
  lean_inc(x_45);
  lean_inc(x_44);
  lean_inc(x_43);
  lean_inc(x_42);
  lean_inc(x_41);
  lean_inc(x_40);
  lean_inc(x_39);
  lean_inc(x_38);
  lean_inc(x_37);
  lean_inc(x_36);
  lean_dec(x_19);
  x_48 = l_Lean_Meta_Closure_instInhabitedToProcessElement;
  x_49 = l_Array_back___rarg(x_48, x_47);
  x_50 = lean_array_pop(x_47);
  x_51 = lean_unsigned_to_nat(0u);
  x_52 = l_Lean_Meta_Closure_pickNextToProcessAux(x_7, x_51, x_50, x_49);
  x_53 = lean_ctor_get(x_52, 0);
  lean_inc(x_53);
  x_54 = lean_ctor_get(x_52, 1);
  lean_inc(x_54);
  lean_dec(x_52);
  x_55 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_55, 0, x_53);
  x_56 = lean_alloc_ctor(0, 12, 0);
  lean_ctor_set(x_56, 0, x_36);
  lean_ctor_set(x_56, 1, x_37);
  lean_ctor_set(x_56, 2, x_38);
  lean_ctor_set(x_56, 3, x_39);
  lean_ctor_set(x_56, 4, x_40);
  lean_ctor_set(x_56, 5, x_41);
  lean_ctor_set(x_56, 6, x_42);
  lean_ctor_set(x_56, 7, x_43);
  lean_ctor_set(x_56, 8, x_44);
  lean_ctor_set(x_56, 9, x_45);
  lean_ctor_set(x_56, 10, x_46);
  lean_ctor_set(x_56, 11, x_54);
  x_57 = lean_st_ref_set(x_1, x_56, x_20);
  x_58 = lean_ctor_get(x_57, 1);
  lean_inc(x_58);
  if (lean_is_exclusive(x_57)) {
   lean_ctor_release(x_57, 0);
   lean_ctor_release(x_57, 1);
   x_59 = x_57;
  } else {
   lean_dec_ref(x_57);
   x_59 = lean_box(0);
  }
  if (lean_is_scalar(x_59)) {
   x_60 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_60 = x_59;
  }
  lean_ctor_set(x_60, 0, x_55);
  lean_ctor_set(x_60, 1, x_58);
  return x_60;
  }
  }
  else
  {
  lean_object* x_61; 
  lean_dec(x_7);
  x_61 = lean_box(0);
  lean_ctor_set(x_10, 0, x_61);
  return x_10;
  }
  }
  else
  {
  lean_object* x_62; lean_object* x_63; lean_object* x_64; uint8_t x_65; 
  x_62 = lean_ctor_get(x_10, 0);
  x_63 = lean_ctor_get(x_10, 1);
  lean_inc(x_63);
  lean_inc(x_62);
  lean_dec(x_10);
  x_64 = lean_ctor_get(x_62, 11);
  lean_inc(x_64);
  lean_dec(x_62);
  x_65 = l_Array_isEmpty___rarg(x_64);
  lean_dec(x_64);
  if (x_65 == 0)
  {
  lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; 
  x_66 = lean_st_ref_get(x_5, x_63);
  x_67 = lean_ctor_get(x_66, 1);
  lean_inc(x_67);
  lean_dec(x_66);
  x_68 = lean_st_ref_take(x_1, x_67);
  x_69 = lean_ctor_get(x_68, 0);
  lean_inc(x_69);
  x_70 = lean_ctor_get(x_68, 1);
  lean_inc(x_70);
  lean_dec(x_68);
  x_71 = lean_ctor_get(x_69, 0);
  lean_inc(x_71);
  x_72 = lean_ctor_get(x_69, 1);
  lean_inc(x_72);
  x_73 = lean_ctor_get(x_69, 2);
  lean_inc(x_73);
  x_74 = lean_ctor_get(x_69, 3);
  lean_inc(x_74);
  x_75 = lean_ctor_get(x_69, 4);
  lean_inc(x_75);
  x_76 = lean_ctor_get(x_69, 5);
  lean_inc(x_76);
  x_77 = lean_ctor_get(x_69, 6);
  lean_inc(x_77);
  x_78 = lean_ctor_get(x_69, 7);
  lean_inc(x_78);
  x_79 = lean_ctor_get(x_69, 8);
  lean_inc(x_79);
  x_80 = lean_ctor_get(x_69, 9);
  lean_inc(x_80);
  x_81 = lean_ctor_get(x_69, 10);
  lean_inc(x_81);
  x_82 = lean_ctor_get(x_69, 11);
  lean_inc(x_82);
  if (lean_is_exclusive(x_69)) {
   lean_ctor_release(x_69, 0);
   lean_ctor_release(x_69, 1);
   lean_ctor_release(x_69, 2);
   lean_ctor_release(x_69, 3);
   lean_ctor_release(x_69, 4);
   lean_ctor_release(x_69, 5);
   lean_ctor_release(x_69, 6);
   lean_ctor_release(x_69, 7);
   lean_ctor_release(x_69, 8);
   lean_ctor_release(x_69, 9);
   lean_ctor_release(x_69, 10);
   lean_ctor_release(x_69, 11);
   x_83 = x_69;
  } else {
   lean_dec_ref(x_69);
   x_83 = lean_box(0);
  }
  x_84 = l_Lean_Meta_Closure_instInhabitedToProcessElement;
  x_85 = l_Array_back___rarg(x_84, x_82);
  x_86 = lean_array_pop(x_82);
  x_87 = lean_unsigned_to_nat(0u);
  x_88 = l_Lean_Meta_Closure_pickNextToProcessAux(x_7, x_87, x_86, x_85);
  x_89 = lean_ctor_get(x_88, 0);
  lean_inc(x_89);
  x_90 = lean_ctor_get(x_88, 1);
  lean_inc(x_90);
  lean_dec(x_88);
  x_91 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_91, 0, x_89);
  if (lean_is_scalar(x_83)) {
   x_92 = lean_alloc_ctor(0, 12, 0);
  } else {
   x_92 = x_83;
  }
  lean_ctor_set(x_92, 0, x_71);
  lean_ctor_set(x_92, 1, x_72);
  lean_ctor_set(x_92, 2, x_73);
  lean_ctor_set(x_92, 3, x_74);
  lean_ctor_set(x_92, 4, x_75);
  lean_ctor_set(x_92, 5, x_76);
  lean_ctor_set(x_92, 6, x_77);
  lean_ctor_set(x_92, 7, x_78);
  lean_ctor_set(x_92, 8, x_79);
  lean_ctor_set(x_92, 9, x_80);
  lean_ctor_set(x_92, 10, x_81);
  lean_ctor_set(x_92, 11, x_90);
  x_93 = lean_st_ref_set(x_1, x_92, x_70);
  x_94 = lean_ctor_get(x_93, 1);
  lean_inc(x_94);
  if (lean_is_exclusive(x_93)) {
   lean_ctor_release(x_93, 0);
   lean_ctor_release(x_93, 1);
   x_95 = x_93;
  } else {
   lean_dec_ref(x_93);
   x_95 = lean_box(0);
  }
  if (lean_is_scalar(x_95)) {
   x_96 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_96 = x_95;
  }
  lean_ctor_set(x_96, 0, x_91);
  lean_ctor_set(x_96, 1, x_94);
  return x_96;
  }
  else
  {
  lean_object* x_97; lean_object* x_98; 
  lean_dec(x_7);
  x_97 = lean_box(0);
  x_98 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_98, 0, x_97);
  lean_ctor_set(x_98, 1, x_63);
  return x_98;
  }
  }
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_pickNextToProcess_x3f(uint8_t x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = lean_alloc_closure((void*)(l_Lean_Meta_Closure_pickNextToProcess_x3f___rarg___boxed), 6, 0);
  return x_2;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_pickNextToProcess_x3f___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_Meta_Closure_pickNextToProcess_x3f___rarg(x_1, x_2, x_3, x_4, x_5, x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_1);
  return x_7;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_pickNextToProcess_x3f___boxed(lean_object* x_1) {
  _start:
  {
  uint8_t x_2; lean_object* x_3; 
  x_2 = lean_unbox(x_1);
  lean_dec(x_1);
  x_3 = l_Lean_Meta_Closure_pickNextToProcess_x3f(x_2);
  return x_3;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_pushFVarArg(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
  _start:
  {
  lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; 
  x_9 = lean_st_ref_get(x_7, x_8);
  x_10 = lean_ctor_get(x_9, 1);
  lean_inc(x_10);
  lean_dec(x_9);
  x_11 = lean_st_ref_take(x_3, 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);
  x_14 = !lean_is_exclusive(x_12);
  if (x_14 == 0)
  {
  lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18; 
  x_15 = lean_ctor_get(x_12, 10);
  x_16 = lean_array_push(x_15, x_1);
  lean_ctor_set(x_12, 10, x_16);
  x_17 = lean_st_ref_set(x_3, x_12, x_13);
  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);
  lean_dec(x_19);
  x_20 = lean_box(0);
  lean_ctor_set(x_17, 0, x_20);
  return x_17;
  }
  else
  {
  lean_object* x_21; lean_object* x_22; lean_object* x_23; 
  x_21 = lean_ctor_get(x_17, 1);
  lean_inc(x_21);
  lean_dec(x_17);
  x_22 = lean_box(0);
  x_23 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_23, 0, x_22);
  lean_ctor_set(x_23, 1, x_21);
  return x_23;
  }
  }
  else
  {
  lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; 
  x_24 = lean_ctor_get(x_12, 0);
  x_25 = lean_ctor_get(x_12, 1);
  x_26 = lean_ctor_get(x_12, 2);
  x_27 = lean_ctor_get(x_12, 3);
  x_28 = lean_ctor_get(x_12, 4);
  x_29 = lean_ctor_get(x_12, 5);
  x_30 = lean_ctor_get(x_12, 6);
  x_31 = lean_ctor_get(x_12, 7);
  x_32 = lean_ctor_get(x_12, 8);
  x_33 = lean_ctor_get(x_12, 9);
  x_34 = lean_ctor_get(x_12, 10);
  x_35 = lean_ctor_get(x_12, 11);
  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_inc(x_29);
  lean_inc(x_28);
  lean_inc(x_27);
  lean_inc(x_26);
  lean_inc(x_25);
  lean_inc(x_24);
  lean_dec(x_12);
  x_36 = lean_array_push(x_34, x_1);
  x_37 = lean_alloc_ctor(0, 12, 0);
  lean_ctor_set(x_37, 0, x_24);
  lean_ctor_set(x_37, 1, x_25);
  lean_ctor_set(x_37, 2, x_26);
  lean_ctor_set(x_37, 3, x_27);
  lean_ctor_set(x_37, 4, x_28);
  lean_ctor_set(x_37, 5, x_29);
  lean_ctor_set(x_37, 6, x_30);
  lean_ctor_set(x_37, 7, x_31);
  lean_ctor_set(x_37, 8, x_32);
  lean_ctor_set(x_37, 9, x_33);
  lean_ctor_set(x_37, 10, x_36);
  lean_ctor_set(x_37, 11, x_35);
  x_38 = lean_st_ref_set(x_3, x_37, x_13);
  x_39 = lean_ctor_get(x_38, 1);
  lean_inc(x_39);
  if (lean_is_exclusive(x_38)) {
   lean_ctor_release(x_38, 0);
   lean_ctor_release(x_38, 1);
   x_40 = x_38;
  } else {
   lean_dec_ref(x_38);
   x_40 = lean_box(0);
  }
  x_41 = lean_box(0);
  if (lean_is_scalar(x_40)) {
   x_42 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_42 = x_40;
  }
  lean_ctor_set(x_42, 0, x_41);
  lean_ctor_set(x_42, 1, x_39);
  return x_42;
  }
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_pushFVarArg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
  _start:
  {
  uint8_t x_9; lean_object* x_10; 
  x_9 = lean_unbox(x_2);
  lean_dec(x_2);
  x_10 = l_Lean_Meta_Closure_pushFVarArg(x_1, x_9, x_3, x_4, x_5, x_6, x_7, x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  return x_10;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_pushLocalDecl(lean_object* x_1, lean_object* x_2, lean_object* x_3, uint8_t x_4, uint8_t x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) {
  _start:
  {
  lean_object* x_12; 
  lean_inc(x_10);
  x_12 = l_Lean_Meta_Closure_collectExpr(x_3, x_5, x_6, x_7, x_8, x_9, x_10, 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_object* x_18; lean_object* x_19; uint8_t x_20; 
  x_13 = lean_ctor_get(x_12, 0);
  lean_inc(x_13);
  x_14 = lean_ctor_get(x_12, 1);
  lean_inc(x_14);
  lean_dec(x_12);
  x_15 = lean_st_ref_get(x_10, x_14);
  lean_dec(x_10);
  x_16 = lean_ctor_get(x_15, 1);
  lean_inc(x_16);
  lean_dec(x_15);
  x_17 = lean_st_ref_take(x_6, x_16);
  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);
  x_20 = !lean_is_exclusive(x_18);
  if (x_20 == 0)
  {
  lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; uint8_t x_26; 
  x_21 = lean_ctor_get(x_18, 5);
  x_22 = lean_unsigned_to_nat(0u);
  x_23 = lean_alloc_ctor(0, 4, 1);
  lean_ctor_set(x_23, 0, x_22);
  lean_ctor_set(x_23, 1, x_1);
  lean_ctor_set(x_23, 2, x_2);
  lean_ctor_set(x_23, 3, x_13);
  lean_ctor_set_uint8(x_23, sizeof(void*)*4, x_4);
  x_24 = lean_array_push(x_21, x_23);
  lean_ctor_set(x_18, 5, x_24);
  x_25 = lean_st_ref_set(x_6, x_18, x_19);
  x_26 = !lean_is_exclusive(x_25);
  if (x_26 == 0)
  {
  lean_object* x_27; lean_object* x_28; 
  x_27 = lean_ctor_get(x_25, 0);
  lean_dec(x_27);
  x_28 = lean_box(0);
  lean_ctor_set(x_25, 0, x_28);
  return x_25;
  }
  else
  {
  lean_object* x_29; lean_object* x_30; lean_object* x_31; 
  x_29 = lean_ctor_get(x_25, 1);
  lean_inc(x_29);
  lean_dec(x_25);
  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_29);
  return x_31;
  }
  }
  else
  {
  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; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; 
  x_32 = lean_ctor_get(x_18, 0);
  x_33 = lean_ctor_get(x_18, 1);
  x_34 = lean_ctor_get(x_18, 2);
  x_35 = lean_ctor_get(x_18, 3);
  x_36 = lean_ctor_get(x_18, 4);
  x_37 = lean_ctor_get(x_18, 5);
  x_38 = lean_ctor_get(x_18, 6);
  x_39 = lean_ctor_get(x_18, 7);
  x_40 = lean_ctor_get(x_18, 8);
  x_41 = lean_ctor_get(x_18, 9);
  x_42 = lean_ctor_get(x_18, 10);
  x_43 = lean_ctor_get(x_18, 11);
  lean_inc(x_43);
  lean_inc(x_42);
  lean_inc(x_41);
  lean_inc(x_40);
  lean_inc(x_39);
  lean_inc(x_38);
  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_dec(x_18);
  x_44 = lean_unsigned_to_nat(0u);
  x_45 = lean_alloc_ctor(0, 4, 1);
  lean_ctor_set(x_45, 0, x_44);
  lean_ctor_set(x_45, 1, x_1);
  lean_ctor_set(x_45, 2, x_2);
  lean_ctor_set(x_45, 3, x_13);
  lean_ctor_set_uint8(x_45, sizeof(void*)*4, x_4);
  x_46 = lean_array_push(x_37, x_45);
  x_47 = lean_alloc_ctor(0, 12, 0);
  lean_ctor_set(x_47, 0, x_32);
  lean_ctor_set(x_47, 1, x_33);
  lean_ctor_set(x_47, 2, x_34);
  lean_ctor_set(x_47, 3, x_35);
  lean_ctor_set(x_47, 4, x_36);
  lean_ctor_set(x_47, 5, x_46);
  lean_ctor_set(x_47, 6, x_38);
  lean_ctor_set(x_47, 7, x_39);
  lean_ctor_set(x_47, 8, x_40);
  lean_ctor_set(x_47, 9, x_41);
  lean_ctor_set(x_47, 10, x_42);
  lean_ctor_set(x_47, 11, x_43);
  x_48 = lean_st_ref_set(x_6, x_47, x_19);
  x_49 = lean_ctor_get(x_48, 1);
  lean_inc(x_49);
  if (lean_is_exclusive(x_48)) {
   lean_ctor_release(x_48, 0);
   lean_ctor_release(x_48, 1);
   x_50 = x_48;
  } else {
   lean_dec_ref(x_48);
   x_50 = lean_box(0);
  }
  x_51 = lean_box(0);
  if (lean_is_scalar(x_50)) {
   x_52 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_52 = x_50;
  }
  lean_ctor_set(x_52, 0, x_51);
  lean_ctor_set(x_52, 1, x_49);
  return x_52;
  }
  }
  else
  {
  uint8_t x_53; 
  lean_dec(x_10);
  lean_dec(x_2);
  lean_dec(x_1);
  x_53 = !lean_is_exclusive(x_12);
  if (x_53 == 0)
  {
  return x_12;
  }
  else
  {
  lean_object* x_54; lean_object* x_55; lean_object* x_56; 
  x_54 = lean_ctor_get(x_12, 0);
  x_55 = lean_ctor_get(x_12, 1);
  lean_inc(x_55);
  lean_inc(x_54);
  lean_dec(x_12);
  x_56 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_56, 0, x_54);
  lean_ctor_set(x_56, 1, x_55);
  return x_56;
  }
  }
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_pushLocalDecl___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) {
  _start:
  {
  uint8_t x_12; uint8_t x_13; lean_object* x_14; 
  x_12 = lean_unbox(x_4);
  lean_dec(x_4);
  x_13 = lean_unbox(x_5);
  lean_dec(x_5);
  x_14 = l_Lean_Meta_Closure_pushLocalDecl(x_1, x_2, x_3, x_12, x_13, x_6, x_7, x_8, x_9, x_10, x_11);
  lean_dec(x_6);
  return x_14;
  }
  }
  LEAN_EXPORT lean_object* l_Std_RBNode_findCore___at_Lean_Meta_Closure_process___spec__1(lean_object* x_1, lean_object* x_2) {
  _start:
  {
  if (lean_obj_tag(x_1) == 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; lean_object* x_7; uint8_t x_8; 
  x_4 = lean_ctor_get(x_1, 0);
  x_5 = lean_ctor_get(x_1, 1);
  x_6 = lean_ctor_get(x_1, 2);
  x_7 = lean_ctor_get(x_1, 3);
  x_8 = l_Lean_Name_quickCmp(x_2, x_5);
  switch (x_8) {
  case 0:
  {
  x_1 = x_4;
  goto _start;
  }
  case 1:
  {
  lean_object* x_10; lean_object* x_11; 
  lean_inc(x_6);
  lean_inc(x_5);
  x_10 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_10, 0, x_5);
  lean_ctor_set(x_10, 1, x_6);
  x_11 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_11, 0, x_10);
  return x_11;
  }
  default: 
  {
  x_1 = x_7;
  goto _start;
  }
  }
  }
  }
  }
  LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Meta_Closure_process___spec__2(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4, lean_object* x_5) {
  _start:
  {
  uint8_t x_6; 
  x_6 = lean_usize_dec_lt(x_4, x_3);
  if (x_6 == 0)
  {
  lean_dec(x_1);
  return x_5;
  }
  else
  {
  lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; size_t x_11; size_t x_12; lean_object* x_13; 
  x_7 = lean_array_uget(x_5, x_4);
  x_8 = lean_unsigned_to_nat(0u);
  x_9 = lean_array_uset(x_5, x_4, x_8);
  lean_inc(x_1);
  x_10 = l_Lean_replaceFVarIdAtLocalDecl(x_1, x_2, x_7);
  x_11 = 1;
  x_12 = lean_usize_add(x_4, x_11);
  x_13 = lean_array_uset(x_9, x_4, x_10);
  x_4 = x_12;
  x_5 = x_13;
  goto _start;
  }
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_process(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
  _start:
  {
  lean_object* x_8; lean_object* x_9; 
  lean_inc(x_3);
  x_8 = l_Lean_Meta_Closure_pickNextToProcess_x3f___rarg(x_2, x_3, x_4, x_5, x_6, x_7);
  x_9 = lean_ctor_get(x_8, 0);
  lean_inc(x_9);
  if (lean_obj_tag(x_9) == 0)
  {
  uint8_t x_10; 
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  x_10 = !lean_is_exclusive(x_8);
  if (x_10 == 0)
  {
  lean_object* x_11; lean_object* x_12; 
  x_11 = lean_ctor_get(x_8, 0);
  lean_dec(x_11);
  x_12 = lean_box(0);
  lean_ctor_set(x_8, 0, x_12);
  return x_8;
  }
  else
  {
  lean_object* x_13; lean_object* x_14; lean_object* x_15; 
  x_13 = lean_ctor_get(x_8, 1);
  lean_inc(x_13);
  lean_dec(x_8);
  x_14 = lean_box(0);
  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;
  }
  }
  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);
  lean_inc(x_16);
  lean_dec(x_9);
  x_17 = lean_ctor_get(x_8, 1);
  lean_inc(x_17);
  lean_dec(x_8);
  x_18 = lean_ctor_get(x_16, 0);
  lean_inc(x_18);
  x_19 = lean_ctor_get(x_16, 1);
  lean_inc(x_19);
  lean_dec(x_16);
  lean_inc(x_3);
  lean_inc(x_18);
  x_20 = l_Lean_Meta_getLocalDecl(x_18, x_3, x_4, x_5, x_6, x_17);
  if (lean_obj_tag(x_20) == 0)
  {
  lean_object* x_21; 
  x_21 = lean_ctor_get(x_20, 0);
  lean_inc(x_21);
  if (lean_obj_tag(x_21) == 0)
  {
  lean_object* x_22; lean_object* x_23; lean_object* x_24; uint8_t x_25; lean_object* x_26; 
  x_22 = lean_ctor_get(x_20, 1);
  lean_inc(x_22);
  lean_dec(x_20);
  x_23 = lean_ctor_get(x_21, 2);
  lean_inc(x_23);
  x_24 = lean_ctor_get(x_21, 3);
  lean_inc(x_24);
  x_25 = lean_ctor_get_uint8(x_21, sizeof(void*)*4);
  lean_dec(x_21);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_3);
  x_26 = l_Lean_Meta_Closure_pushLocalDecl(x_19, x_23, x_24, x_25, x_1, x_2, x_3, x_4, x_5, x_6, x_22);
  if (lean_obj_tag(x_26) == 0)
  {
  lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; 
  x_27 = lean_ctor_get(x_26, 1);
  lean_inc(x_27);
  lean_dec(x_26);
  x_28 = l_Lean_mkFVar(x_18);
  x_29 = l_Lean_Meta_Closure_pushFVarArg(x_28, x_1, x_2, x_3, x_4, x_5, x_6, x_27);
  x_30 = lean_ctor_get(x_29, 1);
  lean_inc(x_30);
  lean_dec(x_29);
  x_7 = x_30;
  goto _start;
  }
  else
  {
  uint8_t x_32; 
  lean_dec(x_18);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  x_32 = !lean_is_exclusive(x_26);
  if (x_32 == 0)
  {
  return x_26;
  }
  else
  {
  lean_object* x_33; lean_object* x_34; lean_object* x_35; 
  x_33 = lean_ctor_get(x_26, 0);
  x_34 = lean_ctor_get(x_26, 1);
  lean_inc(x_34);
  lean_inc(x_33);
  lean_dec(x_26);
  x_35 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_35, 0, x_33);
  lean_ctor_set(x_35, 1, x_34);
  return x_35;
  }
  }
  }
  else
  {
  lean_object* x_36; uint8_t x_37; 
  x_36 = lean_ctor_get(x_20, 1);
  lean_inc(x_36);
  lean_dec(x_20);
  x_37 = !lean_is_exclusive(x_21);
  if (x_37 == 0)
  {
  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; 
  x_38 = lean_ctor_get(x_21, 2);
  x_39 = lean_ctor_get(x_21, 3);
  x_40 = lean_ctor_get(x_21, 4);
  x_41 = lean_ctor_get(x_21, 1);
  lean_dec(x_41);
  x_42 = lean_ctor_get(x_21, 0);
  lean_dec(x_42);
  x_43 = l_Lean_Meta_getZetaFVarIds___rarg(x_4, x_5, x_6, x_36);
  x_44 = lean_ctor_get(x_43, 0);
  lean_inc(x_44);
  x_45 = lean_ctor_get(x_43, 1);
  lean_inc(x_45);
  lean_dec(x_43);
  x_46 = l_Std_RBNode_findCore___at_Lean_Meta_Closure_process___spec__1(x_44, x_18);
  lean_dec(x_44);
  if (lean_obj_tag(x_46) == 0)
  {
  uint8_t x_47; lean_object* x_48; 
  lean_free_object(x_21);
  lean_dec(x_40);
  x_47 = 0;
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_3);
  x_48 = l_Lean_Meta_Closure_pushLocalDecl(x_19, x_38, x_39, x_47, x_1, x_2, x_3, x_4, x_5, x_6, x_45);
  if (lean_obj_tag(x_48) == 0)
  {
  lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; 
  x_49 = lean_ctor_get(x_48, 1);
  lean_inc(x_49);
  lean_dec(x_48);
  x_50 = l_Lean_mkFVar(x_18);
  x_51 = l_Lean_Meta_Closure_pushFVarArg(x_50, x_1, x_2, x_3, x_4, x_5, x_6, x_49);
  x_52 = lean_ctor_get(x_51, 1);
  lean_inc(x_52);
  lean_dec(x_51);
  x_7 = x_52;
  goto _start;
  }
  else
  {
  uint8_t x_54; 
  lean_dec(x_18);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  x_54 = !lean_is_exclusive(x_48);
  if (x_54 == 0)
  {
  return x_48;
  }
  else
  {
  lean_object* x_55; lean_object* x_56; lean_object* x_57; 
  x_55 = lean_ctor_get(x_48, 0);
  x_56 = lean_ctor_get(x_48, 1);
  lean_inc(x_56);
  lean_inc(x_55);
  lean_dec(x_48);
  x_57 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_57, 0, x_55);
  lean_ctor_set(x_57, 1, x_56);
  return x_57;
  }
  }
  }
  else
  {
  lean_object* x_58; 
  lean_dec(x_46);
  lean_dec(x_18);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_3);
  x_58 = l_Lean_Meta_Closure_collectExpr(x_39, x_1, x_2, x_3, x_4, x_5, x_6, x_45);
  if (lean_obj_tag(x_58) == 0)
  {
  lean_object* x_59; lean_object* x_60; lean_object* x_61; 
  x_59 = lean_ctor_get(x_58, 0);
  lean_inc(x_59);
  x_60 = lean_ctor_get(x_58, 1);
  lean_inc(x_60);
  lean_dec(x_58);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_3);
  x_61 = l_Lean_Meta_Closure_collectExpr(x_40, x_1, x_2, x_3, x_4, x_5, x_6, x_60);
  if (lean_obj_tag(x_61) == 0)
  {
  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; uint8_t x_69; 
  x_62 = lean_ctor_get(x_61, 0);
  lean_inc(x_62);
  x_63 = lean_ctor_get(x_61, 1);
  lean_inc(x_63);
  lean_dec(x_61);
  x_64 = lean_st_ref_get(x_6, x_63);
  x_65 = lean_ctor_get(x_64, 1);
  lean_inc(x_65);
  lean_dec(x_64);
  x_66 = lean_st_ref_take(x_2, x_65);
  x_67 = lean_ctor_get(x_66, 0);
  lean_inc(x_67);
  x_68 = lean_ctor_get(x_66, 1);
  lean_inc(x_68);
  lean_dec(x_66);
  x_69 = !lean_is_exclusive(x_67);
  if (x_69 == 0)
  {
  lean_object* x_70; lean_object* x_71; uint8_t x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; uint8_t x_81; 
  x_70 = lean_ctor_get(x_67, 7);
  x_71 = lean_unsigned_to_nat(0u);
  x_72 = 0;
  lean_inc(x_62);
  lean_inc(x_19);
  lean_ctor_set(x_21, 4, x_62);
  lean_ctor_set(x_21, 3, x_59);
  lean_ctor_set(x_21, 1, x_19);
  lean_ctor_set(x_21, 0, x_71);
  lean_ctor_set_uint8(x_21, sizeof(void*)*5, x_72);
  x_73 = lean_array_push(x_70, x_21);
  lean_ctor_set(x_67, 7, x_73);
  x_74 = lean_st_ref_set(x_2, x_67, x_68);
  x_75 = lean_ctor_get(x_74, 1);
  lean_inc(x_75);
  lean_dec(x_74);
  x_76 = lean_st_ref_get(x_6, x_75);
  x_77 = lean_ctor_get(x_76, 1);
  lean_inc(x_77);
  lean_dec(x_76);
  x_78 = lean_st_ref_take(x_2, x_77);
  x_79 = lean_ctor_get(x_78, 0);
  lean_inc(x_79);
  x_80 = lean_ctor_get(x_78, 1);
  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; size_t x_84; size_t x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; 
  x_82 = lean_ctor_get(x_79, 5);
  x_83 = lean_array_get_size(x_82);
  x_84 = lean_usize_of_nat(x_83);
  lean_dec(x_83);
  x_85 = 0;
  x_86 = l_Array_mapMUnsafe_map___at_Lean_Meta_Closure_process___spec__2(x_19, x_62, x_84, x_85, x_82);
  lean_dec(x_62);
  lean_ctor_set(x_79, 5, x_86);
  x_87 = lean_st_ref_set(x_2, x_79, x_80);
  x_88 = lean_ctor_get(x_87, 1);
  lean_inc(x_88);
  lean_dec(x_87);
  x_7 = x_88;
  goto _start;
  }
  else
  {
  lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; size_t x_103; size_t x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; 
  x_90 = lean_ctor_get(x_79, 0);
  x_91 = lean_ctor_get(x_79, 1);
  x_92 = lean_ctor_get(x_79, 2);
  x_93 = lean_ctor_get(x_79, 3);
  x_94 = lean_ctor_get(x_79, 4);
  x_95 = lean_ctor_get(x_79, 5);
  x_96 = lean_ctor_get(x_79, 6);
  x_97 = lean_ctor_get(x_79, 7);
  x_98 = lean_ctor_get(x_79, 8);
  x_99 = lean_ctor_get(x_79, 9);
  x_100 = lean_ctor_get(x_79, 10);
  x_101 = lean_ctor_get(x_79, 11);
  lean_inc(x_101);
  lean_inc(x_100);
  lean_inc(x_99);
  lean_inc(x_98);
  lean_inc(x_97);
  lean_inc(x_96);
  lean_inc(x_95);
  lean_inc(x_94);
  lean_inc(x_93);
  lean_inc(x_92);
  lean_inc(x_91);
  lean_inc(x_90);
  lean_dec(x_79);
  x_102 = lean_array_get_size(x_95);
  x_103 = lean_usize_of_nat(x_102);
  lean_dec(x_102);
  x_104 = 0;
  x_105 = l_Array_mapMUnsafe_map___at_Lean_Meta_Closure_process___spec__2(x_19, x_62, x_103, x_104, x_95);
  lean_dec(x_62);
  x_106 = lean_alloc_ctor(0, 12, 0);
  lean_ctor_set(x_106, 0, x_90);
  lean_ctor_set(x_106, 1, x_91);
  lean_ctor_set(x_106, 2, x_92);
  lean_ctor_set(x_106, 3, x_93);
  lean_ctor_set(x_106, 4, x_94);
  lean_ctor_set(x_106, 5, x_105);
  lean_ctor_set(x_106, 6, x_96);
  lean_ctor_set(x_106, 7, x_97);
  lean_ctor_set(x_106, 8, x_98);
  lean_ctor_set(x_106, 9, x_99);
  lean_ctor_set(x_106, 10, x_100);
  lean_ctor_set(x_106, 11, x_101);
  x_107 = lean_st_ref_set(x_2, x_106, x_80);
  x_108 = lean_ctor_get(x_107, 1);
  lean_inc(x_108);
  lean_dec(x_107);
  x_7 = x_108;
  goto _start;
  }
  }
  else
  {
  lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; uint8_t x_123; lean_object* x_124; lean_object* x_125; lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; size_t x_147; size_t x_148; lean_object* x_149; lean_object* x_150; lean_object* x_151; lean_object* x_152; 
  x_110 = lean_ctor_get(x_67, 0);
  x_111 = lean_ctor_get(x_67, 1);
  x_112 = lean_ctor_get(x_67, 2);
  x_113 = lean_ctor_get(x_67, 3);
  x_114 = lean_ctor_get(x_67, 4);
  x_115 = lean_ctor_get(x_67, 5);
  x_116 = lean_ctor_get(x_67, 6);
  x_117 = lean_ctor_get(x_67, 7);
  x_118 = lean_ctor_get(x_67, 8);
  x_119 = lean_ctor_get(x_67, 9);
  x_120 = lean_ctor_get(x_67, 10);
  x_121 = lean_ctor_get(x_67, 11);
  lean_inc(x_121);
  lean_inc(x_120);
  lean_inc(x_119);
  lean_inc(x_118);
  lean_inc(x_117);
  lean_inc(x_116);
  lean_inc(x_115);
  lean_inc(x_114);
  lean_inc(x_113);
  lean_inc(x_112);
  lean_inc(x_111);
  lean_inc(x_110);
  lean_dec(x_67);
  x_122 = lean_unsigned_to_nat(0u);
  x_123 = 0;
  lean_inc(x_62);
  lean_inc(x_19);
  lean_ctor_set(x_21, 4, x_62);
  lean_ctor_set(x_21, 3, x_59);
  lean_ctor_set(x_21, 1, x_19);
  lean_ctor_set(x_21, 0, x_122);
  lean_ctor_set_uint8(x_21, sizeof(void*)*5, x_123);
  x_124 = lean_array_push(x_117, x_21);
  x_125 = lean_alloc_ctor(0, 12, 0);
  lean_ctor_set(x_125, 0, x_110);
  lean_ctor_set(x_125, 1, x_111);
  lean_ctor_set(x_125, 2, x_112);
  lean_ctor_set(x_125, 3, x_113);
  lean_ctor_set(x_125, 4, x_114);
  lean_ctor_set(x_125, 5, x_115);
  lean_ctor_set(x_125, 6, x_116);
  lean_ctor_set(x_125, 7, x_124);
  lean_ctor_set(x_125, 8, x_118);
  lean_ctor_set(x_125, 9, x_119);
  lean_ctor_set(x_125, 10, x_120);
  lean_ctor_set(x_125, 11, x_121);
  x_126 = lean_st_ref_set(x_2, x_125, x_68);
  x_127 = lean_ctor_get(x_126, 1);
  lean_inc(x_127);
  lean_dec(x_126);
  x_128 = lean_st_ref_get(x_6, x_127);
  x_129 = lean_ctor_get(x_128, 1);
  lean_inc(x_129);
  lean_dec(x_128);
  x_130 = lean_st_ref_take(x_2, x_129);
  x_131 = lean_ctor_get(x_130, 0);
  lean_inc(x_131);
  x_132 = lean_ctor_get(x_130, 1);
  lean_inc(x_132);
  lean_dec(x_130);
  x_133 = lean_ctor_get(x_131, 0);
  lean_inc(x_133);
  x_134 = lean_ctor_get(x_131, 1);
  lean_inc(x_134);
  x_135 = lean_ctor_get(x_131, 2);
  lean_inc(x_135);
  x_136 = lean_ctor_get(x_131, 3);
  lean_inc(x_136);
  x_137 = lean_ctor_get(x_131, 4);
  lean_inc(x_137);
  x_138 = lean_ctor_get(x_131, 5);
  lean_inc(x_138);
  x_139 = lean_ctor_get(x_131, 6);
  lean_inc(x_139);
  x_140 = lean_ctor_get(x_131, 7);
  lean_inc(x_140);
  x_141 = lean_ctor_get(x_131, 8);
  lean_inc(x_141);
  x_142 = lean_ctor_get(x_131, 9);
  lean_inc(x_142);
  x_143 = lean_ctor_get(x_131, 10);
  lean_inc(x_143);
  x_144 = lean_ctor_get(x_131, 11);
  lean_inc(x_144);
  if (lean_is_exclusive(x_131)) {
   lean_ctor_release(x_131, 0);
   lean_ctor_release(x_131, 1);
   lean_ctor_release(x_131, 2);
   lean_ctor_release(x_131, 3);
   lean_ctor_release(x_131, 4);
   lean_ctor_release(x_131, 5);
   lean_ctor_release(x_131, 6);
   lean_ctor_release(x_131, 7);
   lean_ctor_release(x_131, 8);
   lean_ctor_release(x_131, 9);
   lean_ctor_release(x_131, 10);
   lean_ctor_release(x_131, 11);
   x_145 = x_131;
  } else {
   lean_dec_ref(x_131);
   x_145 = lean_box(0);
  }
  x_146 = lean_array_get_size(x_138);
  x_147 = lean_usize_of_nat(x_146);
  lean_dec(x_146);
  x_148 = 0;
  x_149 = l_Array_mapMUnsafe_map___at_Lean_Meta_Closure_process___spec__2(x_19, x_62, x_147, x_148, x_138);
  lean_dec(x_62);
  if (lean_is_scalar(x_145)) {
   x_150 = lean_alloc_ctor(0, 12, 0);
  } else {
   x_150 = x_145;
  }
  lean_ctor_set(x_150, 0, x_133);
  lean_ctor_set(x_150, 1, x_134);
  lean_ctor_set(x_150, 2, x_135);
  lean_ctor_set(x_150, 3, x_136);
  lean_ctor_set(x_150, 4, x_137);
  lean_ctor_set(x_150, 5, x_149);
  lean_ctor_set(x_150, 6, x_139);
  lean_ctor_set(x_150, 7, x_140);
  lean_ctor_set(x_150, 8, x_141);
  lean_ctor_set(x_150, 9, x_142);
  lean_ctor_set(x_150, 10, x_143);
  lean_ctor_set(x_150, 11, x_144);
  x_151 = lean_st_ref_set(x_2, x_150, x_132);
  x_152 = lean_ctor_get(x_151, 1);
  lean_inc(x_152);
  lean_dec(x_151);
  x_7 = x_152;
  goto _start;
  }
  }
  else
  {
  uint8_t x_154; 
  lean_dec(x_59);
  lean_free_object(x_21);
  lean_dec(x_38);
  lean_dec(x_19);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  x_154 = !lean_is_exclusive(x_61);
  if (x_154 == 0)
  {
  return x_61;
  }
  else
  {
  lean_object* x_155; lean_object* x_156; lean_object* x_157; 
  x_155 = lean_ctor_get(x_61, 0);
  x_156 = lean_ctor_get(x_61, 1);
  lean_inc(x_156);
  lean_inc(x_155);
  lean_dec(x_61);
  x_157 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_157, 0, x_155);
  lean_ctor_set(x_157, 1, x_156);
  return x_157;
  }
  }
  }
  else
  {
  uint8_t x_158; 
  lean_free_object(x_21);
  lean_dec(x_40);
  lean_dec(x_38);
  lean_dec(x_19);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  x_158 = !lean_is_exclusive(x_58);
  if (x_158 == 0)
  {
  return x_58;
  }
  else
  {
  lean_object* x_159; lean_object* x_160; lean_object* x_161; 
  x_159 = lean_ctor_get(x_58, 0);
  x_160 = lean_ctor_get(x_58, 1);
  lean_inc(x_160);
  lean_inc(x_159);
  lean_dec(x_58);
  x_161 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_161, 0, x_159);
  lean_ctor_set(x_161, 1, x_160);
  return x_161;
  }
  }
  }
  }
  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; 
  x_162 = lean_ctor_get(x_21, 2);
  x_163 = lean_ctor_get(x_21, 3);
  x_164 = lean_ctor_get(x_21, 4);
  lean_inc(x_164);
  lean_inc(x_163);
  lean_inc(x_162);
  lean_dec(x_21);
  x_165 = l_Lean_Meta_getZetaFVarIds___rarg(x_4, x_5, x_6, x_36);
  x_166 = lean_ctor_get(x_165, 0);
  lean_inc(x_166);
  x_167 = lean_ctor_get(x_165, 1);
  lean_inc(x_167);
  lean_dec(x_165);
  x_168 = l_Std_RBNode_findCore___at_Lean_Meta_Closure_process___spec__1(x_166, x_18);
  lean_dec(x_166);
  if (lean_obj_tag(x_168) == 0)
  {
  uint8_t x_169; lean_object* x_170; 
  lean_dec(x_164);
  x_169 = 0;
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_3);
  x_170 = l_Lean_Meta_Closure_pushLocalDecl(x_19, x_162, x_163, x_169, x_1, x_2, x_3, x_4, x_5, x_6, x_167);
  if (lean_obj_tag(x_170) == 0)
  {
  lean_object* x_171; lean_object* x_172; lean_object* x_173; lean_object* x_174; 
  x_171 = lean_ctor_get(x_170, 1);
  lean_inc(x_171);
  lean_dec(x_170);
  x_172 = l_Lean_mkFVar(x_18);
  x_173 = l_Lean_Meta_Closure_pushFVarArg(x_172, x_1, x_2, x_3, x_4, x_5, x_6, x_171);
  x_174 = lean_ctor_get(x_173, 1);
  lean_inc(x_174);
  lean_dec(x_173);
  x_7 = x_174;
  goto _start;
  }
  else
  {
  lean_object* x_176; lean_object* x_177; lean_object* x_178; lean_object* x_179; 
  lean_dec(x_18);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  x_176 = lean_ctor_get(x_170, 0);
  lean_inc(x_176);
  x_177 = lean_ctor_get(x_170, 1);
  lean_inc(x_177);
  if (lean_is_exclusive(x_170)) {
   lean_ctor_release(x_170, 0);
   lean_ctor_release(x_170, 1);
   x_178 = x_170;
  } else {
   lean_dec_ref(x_170);
   x_178 = lean_box(0);
  }
  if (lean_is_scalar(x_178)) {
   x_179 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_179 = x_178;
  }
  lean_ctor_set(x_179, 0, x_176);
  lean_ctor_set(x_179, 1, x_177);
  return x_179;
  }
  }
  else
  {
  lean_object* x_180; 
  lean_dec(x_168);
  lean_dec(x_18);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_3);
  x_180 = l_Lean_Meta_Closure_collectExpr(x_163, x_1, x_2, x_3, x_4, x_5, x_6, x_167);
  if (lean_obj_tag(x_180) == 0)
  {
  lean_object* x_181; lean_object* x_182; lean_object* x_183; 
  x_181 = lean_ctor_get(x_180, 0);
  lean_inc(x_181);
  x_182 = lean_ctor_get(x_180, 1);
  lean_inc(x_182);
  lean_dec(x_180);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_3);
  x_183 = l_Lean_Meta_Closure_collectExpr(x_164, x_1, x_2, x_3, x_4, x_5, x_6, x_182);
  if (lean_obj_tag(x_183) == 0)
  {
  lean_object* x_184; lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; lean_object* x_189; lean_object* x_190; lean_object* x_191; lean_object* x_192; lean_object* x_193; lean_object* x_194; lean_object* x_195; lean_object* x_196; lean_object* x_197; lean_object* x_198; lean_object* x_199; lean_object* x_200; lean_object* x_201; lean_object* x_202; lean_object* x_203; lean_object* x_204; uint8_t x_205; lean_object* x_206; lean_object* x_207; lean_object* x_208; lean_object* x_209; lean_object* x_210; lean_object* x_211; lean_object* x_212; lean_object* x_213; lean_object* x_214; lean_object* x_215; lean_object* x_216; lean_object* x_217; lean_object* x_218; 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; lean_object* x_228; lean_object* x_229; size_t x_230; size_t x_231; lean_object* x_232; lean_object* x_233; lean_object* x_234; lean_object* x_235; 
  x_184 = lean_ctor_get(x_183, 0);
  lean_inc(x_184);
  x_185 = lean_ctor_get(x_183, 1);
  lean_inc(x_185);
  lean_dec(x_183);
  x_186 = lean_st_ref_get(x_6, x_185);
  x_187 = lean_ctor_get(x_186, 1);
  lean_inc(x_187);
  lean_dec(x_186);
  x_188 = lean_st_ref_take(x_2, x_187);
  x_189 = lean_ctor_get(x_188, 0);
  lean_inc(x_189);
  x_190 = lean_ctor_get(x_188, 1);
  lean_inc(x_190);
  lean_dec(x_188);
  x_191 = lean_ctor_get(x_189, 0);
  lean_inc(x_191);
  x_192 = lean_ctor_get(x_189, 1);
  lean_inc(x_192);
  x_193 = lean_ctor_get(x_189, 2);
  lean_inc(x_193);
  x_194 = lean_ctor_get(x_189, 3);
  lean_inc(x_194);
  x_195 = lean_ctor_get(x_189, 4);
  lean_inc(x_195);
  x_196 = lean_ctor_get(x_189, 5);
  lean_inc(x_196);
  x_197 = lean_ctor_get(x_189, 6);
  lean_inc(x_197);
  x_198 = lean_ctor_get(x_189, 7);
  lean_inc(x_198);
  x_199 = lean_ctor_get(x_189, 8);
  lean_inc(x_199);
  x_200 = lean_ctor_get(x_189, 9);
  lean_inc(x_200);
  x_201 = lean_ctor_get(x_189, 10);
  lean_inc(x_201);
  x_202 = lean_ctor_get(x_189, 11);
  lean_inc(x_202);
  if (lean_is_exclusive(x_189)) {
   lean_ctor_release(x_189, 0);
   lean_ctor_release(x_189, 1);
   lean_ctor_release(x_189, 2);
   lean_ctor_release(x_189, 3);
   lean_ctor_release(x_189, 4);
   lean_ctor_release(x_189, 5);
   lean_ctor_release(x_189, 6);
   lean_ctor_release(x_189, 7);
   lean_ctor_release(x_189, 8);
   lean_ctor_release(x_189, 9);
   lean_ctor_release(x_189, 10);
   lean_ctor_release(x_189, 11);
   x_203 = x_189;
  } else {
   lean_dec_ref(x_189);
   x_203 = lean_box(0);
  }
  x_204 = lean_unsigned_to_nat(0u);
  x_205 = 0;
  lean_inc(x_184);
  lean_inc(x_19);
  x_206 = lean_alloc_ctor(1, 5, 1);
  lean_ctor_set(x_206, 0, x_204);
  lean_ctor_set(x_206, 1, x_19);
  lean_ctor_set(x_206, 2, x_162);
  lean_ctor_set(x_206, 3, x_181);
  lean_ctor_set(x_206, 4, x_184);
  lean_ctor_set_uint8(x_206, sizeof(void*)*5, x_205);
  x_207 = lean_array_push(x_198, x_206);
  if (lean_is_scalar(x_203)) {
   x_208 = lean_alloc_ctor(0, 12, 0);
  } else {
   x_208 = x_203;
  }
  lean_ctor_set(x_208, 0, x_191);
  lean_ctor_set(x_208, 1, x_192);
  lean_ctor_set(x_208, 2, x_193);
  lean_ctor_set(x_208, 3, x_194);
  lean_ctor_set(x_208, 4, x_195);
  lean_ctor_set(x_208, 5, x_196);
  lean_ctor_set(x_208, 6, x_197);
  lean_ctor_set(x_208, 7, x_207);
  lean_ctor_set(x_208, 8, x_199);
  lean_ctor_set(x_208, 9, x_200);
  lean_ctor_set(x_208, 10, x_201);
  lean_ctor_set(x_208, 11, x_202);
  x_209 = lean_st_ref_set(x_2, x_208, x_190);
  x_210 = lean_ctor_get(x_209, 1);
  lean_inc(x_210);
  lean_dec(x_209);
  x_211 = lean_st_ref_get(x_6, x_210);
  x_212 = lean_ctor_get(x_211, 1);
  lean_inc(x_212);
  lean_dec(x_211);
  x_213 = lean_st_ref_take(x_2, x_212);
  x_214 = lean_ctor_get(x_213, 0);
  lean_inc(x_214);
  x_215 = lean_ctor_get(x_213, 1);
  lean_inc(x_215);
  lean_dec(x_213);
  x_216 = lean_ctor_get(x_214, 0);
  lean_inc(x_216);
  x_217 = lean_ctor_get(x_214, 1);
  lean_inc(x_217);
  x_218 = lean_ctor_get(x_214, 2);
  lean_inc(x_218);
  x_219 = lean_ctor_get(x_214, 3);
  lean_inc(x_219);
  x_220 = lean_ctor_get(x_214, 4);
  lean_inc(x_220);
  x_221 = lean_ctor_get(x_214, 5);
  lean_inc(x_221);
  x_222 = lean_ctor_get(x_214, 6);
  lean_inc(x_222);
  x_223 = lean_ctor_get(x_214, 7);
  lean_inc(x_223);
  x_224 = lean_ctor_get(x_214, 8);
  lean_inc(x_224);
  x_225 = lean_ctor_get(x_214, 9);
  lean_inc(x_225);
  x_226 = lean_ctor_get(x_214, 10);
  lean_inc(x_226);
  x_227 = lean_ctor_get(x_214, 11);
  lean_inc(x_227);
  if (lean_is_exclusive(x_214)) {
   lean_ctor_release(x_214, 0);
   lean_ctor_release(x_214, 1);
   lean_ctor_release(x_214, 2);
   lean_ctor_release(x_214, 3);
   lean_ctor_release(x_214, 4);
   lean_ctor_release(x_214, 5);
   lean_ctor_release(x_214, 6);
   lean_ctor_release(x_214, 7);
   lean_ctor_release(x_214, 8);
   lean_ctor_release(x_214, 9);
   lean_ctor_release(x_214, 10);
   lean_ctor_release(x_214, 11);
   x_228 = x_214;
  } else {
   lean_dec_ref(x_214);
   x_228 = lean_box(0);
  }
  x_229 = lean_array_get_size(x_221);
  x_230 = lean_usize_of_nat(x_229);
  lean_dec(x_229);
  x_231 = 0;
  x_232 = l_Array_mapMUnsafe_map___at_Lean_Meta_Closure_process___spec__2(x_19, x_184, x_230, x_231, x_221);
  lean_dec(x_184);
  if (lean_is_scalar(x_228)) {
   x_233 = lean_alloc_ctor(0, 12, 0);
  } else {
   x_233 = x_228;
  }
  lean_ctor_set(x_233, 0, x_216);
  lean_ctor_set(x_233, 1, x_217);
  lean_ctor_set(x_233, 2, x_218);
  lean_ctor_set(x_233, 3, x_219);
  lean_ctor_set(x_233, 4, x_220);
  lean_ctor_set(x_233, 5, x_232);
  lean_ctor_set(x_233, 6, x_222);
  lean_ctor_set(x_233, 7, x_223);
  lean_ctor_set(x_233, 8, x_224);
  lean_ctor_set(x_233, 9, x_225);
  lean_ctor_set(x_233, 10, x_226);
  lean_ctor_set(x_233, 11, x_227);
  x_234 = lean_st_ref_set(x_2, x_233, x_215);
  x_235 = lean_ctor_get(x_234, 1);
  lean_inc(x_235);
  lean_dec(x_234);
  x_7 = x_235;
  goto _start;
  }
  else
  {
  lean_object* x_237; lean_object* x_238; lean_object* x_239; lean_object* x_240; 
  lean_dec(x_181);
  lean_dec(x_162);
  lean_dec(x_19);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  x_237 = lean_ctor_get(x_183, 0);
  lean_inc(x_237);
  x_238 = lean_ctor_get(x_183, 1);
  lean_inc(x_238);
  if (lean_is_exclusive(x_183)) {
   lean_ctor_release(x_183, 0);
   lean_ctor_release(x_183, 1);
   x_239 = x_183;
  } else {
   lean_dec_ref(x_183);
   x_239 = lean_box(0);
  }
  if (lean_is_scalar(x_239)) {
   x_240 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_240 = x_239;
  }
  lean_ctor_set(x_240, 0, x_237);
  lean_ctor_set(x_240, 1, x_238);
  return x_240;
  }
  }
  else
  {
  lean_object* x_241; lean_object* x_242; lean_object* x_243; lean_object* x_244; 
  lean_dec(x_164);
  lean_dec(x_162);
  lean_dec(x_19);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  x_241 = lean_ctor_get(x_180, 0);
  lean_inc(x_241);
  x_242 = lean_ctor_get(x_180, 1);
  lean_inc(x_242);
  if (lean_is_exclusive(x_180)) {
   lean_ctor_release(x_180, 0);
   lean_ctor_release(x_180, 1);
   x_243 = x_180;
  } else {
   lean_dec_ref(x_180);
   x_243 = lean_box(0);
  }
  if (lean_is_scalar(x_243)) {
   x_244 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_244 = x_243;
  }
  lean_ctor_set(x_244, 0, x_241);
  lean_ctor_set(x_244, 1, x_242);
  return x_244;
  }
  }
  }
  }
  }
  else
  {
  uint8_t x_245; 
  lean_dec(x_19);
  lean_dec(x_18);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  x_245 = !lean_is_exclusive(x_20);
  if (x_245 == 0)
  {
  return x_20;
  }
  else
  {
  lean_object* x_246; lean_object* x_247; lean_object* x_248; 
  x_246 = lean_ctor_get(x_20, 0);
  x_247 = lean_ctor_get(x_20, 1);
  lean_inc(x_247);
  lean_inc(x_246);
  lean_dec(x_20);
  x_248 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_248, 0, x_246);
  lean_ctor_set(x_248, 1, x_247);
  return x_248;
  }
  }
  }
  }
  }
  LEAN_EXPORT lean_object* l_Std_RBNode_findCore___at_Lean_Meta_Closure_process___spec__1___boxed(lean_object* x_1, lean_object* x_2) {
  _start:
  {
  lean_object* x_3; 
  x_3 = l_Std_RBNode_findCore___at_Lean_Meta_Closure_process___spec__1(x_1, x_2);
  lean_dec(x_2);
  lean_dec(x_1);
  return x_3;
  }
  }
  LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Meta_Closure_process___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
  _start:
  {
  size_t x_6; size_t x_7; lean_object* x_8; 
  x_6 = lean_unbox_usize(x_3);
  lean_dec(x_3);
  x_7 = lean_unbox_usize(x_4);
  lean_dec(x_4);
  x_8 = l_Array_mapMUnsafe_map___at_Lean_Meta_Closure_process___spec__2(x_1, x_2, x_6, x_7, x_5);
  lean_dec(x_2);
  return x_8;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_process___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
  _start:
  {
  uint8_t x_8; lean_object* x_9; 
  x_8 = lean_unbox(x_1);
  lean_dec(x_1);
  x_9 = l_Lean_Meta_Closure_process(x_8, x_2, x_3, x_4, x_5, x_6, x_7);
  lean_dec(x_2);
  return x_9;
  }
  }
  LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Meta_Closure_mkBinding___spec__1(size_t x_1, size_t x_2, lean_object* x_3) {
  _start:
  {
  uint8_t x_4; 
  x_4 = lean_usize_dec_lt(x_2, x_1);
  if (x_4 == 0)
  {
  return x_3;
  }
  else
  {
  lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; size_t x_9; size_t x_10; lean_object* x_11; 
  x_5 = lean_array_uget(x_3, x_2);
  x_6 = lean_unsigned_to_nat(0u);
  x_7 = lean_array_uset(x_3, x_2, x_6);
  x_8 = l_Lean_LocalDecl_toExpr(x_5);
  lean_dec(x_5);
  x_9 = 1;
  x_10 = lean_usize_add(x_2, x_9);
  x_11 = lean_array_uset(x_7, x_2, x_8);
  x_2 = x_10;
  x_3 = x_11;
  goto _start;
  }
  }
  }
  LEAN_EXPORT lean_object* l_Nat_foldRev_loop___at_Lean_Meta_Closure_mkBinding___spec__2(uint8_t 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_4, 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_4, x_8);
  lean_dec(x_4);
  x_10 = l_Lean_instInhabitedLocalDecl;
  x_11 = lean_array_get(x_10, x_2, x_9);
  if (lean_obj_tag(x_11) == 0)
  {
  lean_object* x_12; lean_object* x_13; uint8_t x_14; lean_object* x_15; 
  x_12 = lean_ctor_get(x_11, 2);
  lean_inc(x_12);
  x_13 = lean_ctor_get(x_11, 3);
  lean_inc(x_13);
  x_14 = lean_ctor_get_uint8(x_11, sizeof(void*)*4);
  lean_dec(x_11);
  x_15 = lean_expr_abstract_range(x_13, x_9, x_3);
  lean_dec(x_13);
  if (x_1 == 0)
  {
  lean_object* x_16; 
  x_16 = l_Lean_mkForall(x_12, x_14, x_15, x_5);
  x_4 = x_9;
  x_5 = x_16;
  goto _start;
  }
  else
  {
  lean_object* x_18; 
  x_18 = l_Lean_mkLambda(x_12, x_14, x_15, x_5);
  x_4 = x_9;
  x_5 = x_18;
  goto _start;
  }
  }
  else
  {
  lean_object* x_20; lean_object* x_21; lean_object* x_22; uint8_t x_23; uint8_t x_24; 
  x_20 = lean_ctor_get(x_11, 2);
  lean_inc(x_20);
  x_21 = lean_ctor_get(x_11, 3);
  lean_inc(x_21);
  x_22 = lean_ctor_get(x_11, 4);
  lean_inc(x_22);
  x_23 = lean_ctor_get_uint8(x_11, sizeof(void*)*5);
  lean_dec(x_11);
  x_24 = lean_expr_has_loose_bvar(x_5, x_6);
  if (x_24 == 0)
  {
  lean_object* x_25; 
  lean_dec(x_22);
  lean_dec(x_21);
  lean_dec(x_20);
  x_25 = lean_expr_lower_loose_bvars(x_5, x_8, x_8);
  lean_dec(x_5);
  x_4 = x_9;
  x_5 = x_25;
  goto _start;
  }
  else
  {
  lean_object* x_27; lean_object* x_28; lean_object* x_29; 
  x_27 = lean_expr_abstract_range(x_21, x_9, x_3);
  lean_dec(x_21);
  x_28 = lean_expr_abstract_range(x_22, x_9, x_3);
  lean_dec(x_22);
  x_29 = l_Lean_mkLet(x_20, x_27, x_28, x_5, x_23);
  x_4 = x_9;
  x_5 = x_29;
  goto _start;
  }
  }
  }
  else
  {
  lean_dec(x_4);
  return x_5;
  }
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_mkBinding(uint8_t x_1, lean_object* x_2, lean_object* x_3) {
  _start:
  {
  lean_object* x_4; size_t x_5; size_t x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; 
  x_4 = lean_array_get_size(x_2);
  x_5 = lean_usize_of_nat(x_4);
  x_6 = 0;
  lean_inc(x_2);
  x_7 = l_Array_mapMUnsafe_map___at_Lean_Meta_Closure_mkBinding___spec__1(x_5, x_6, x_2);
  x_8 = lean_expr_abstract(x_3, x_7);
  lean_dec(x_3);
  x_9 = l_Nat_foldRev_loop___at_Lean_Meta_Closure_mkBinding___spec__2(x_1, x_2, x_7, x_4, x_8);
  lean_dec(x_7);
  lean_dec(x_2);
  return x_9;
  }
  }
  LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Meta_Closure_mkBinding___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
  _start:
  {
  size_t x_4; size_t x_5; lean_object* x_6; 
  x_4 = lean_unbox_usize(x_1);
  lean_dec(x_1);
  x_5 = lean_unbox_usize(x_2);
  lean_dec(x_2);
  x_6 = l_Array_mapMUnsafe_map___at_Lean_Meta_Closure_mkBinding___spec__1(x_4, x_5, x_3);
  return x_6;
  }
  }
  LEAN_EXPORT lean_object* l_Nat_foldRev_loop___at_Lean_Meta_Closure_mkBinding___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
  _start:
  {
  uint8_t x_6; lean_object* x_7; 
  x_6 = lean_unbox(x_1);
  lean_dec(x_1);
  x_7 = l_Nat_foldRev_loop___at_Lean_Meta_Closure_mkBinding___spec__2(x_6, x_2, x_3, x_4, x_5);
  lean_dec(x_3);
  lean_dec(x_2);
  return x_7;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_mkBinding___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_1);
  lean_dec(x_1);
  x_5 = l_Lean_Meta_Closure_mkBinding(x_4, x_2, x_3);
  return x_5;
  }
  }
  LEAN_EXPORT lean_object* l_Nat_foldRev_loop___at_Lean_Meta_Closure_mkLambda___spec__1(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_unsigned_to_nat(0u);
  x_6 = lean_nat_dec_eq(x_3, x_5);
  if (x_6 == 0)
  {
  lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; 
  x_7 = lean_unsigned_to_nat(1u);
  x_8 = lean_nat_sub(x_3, x_7);
  lean_dec(x_3);
  x_9 = l_Lean_instInhabitedLocalDecl;
  x_10 = lean_array_get(x_9, x_1, x_8);
  if (lean_obj_tag(x_10) == 0)
  {
  lean_object* x_11; lean_object* x_12; uint8_t x_13; lean_object* x_14; lean_object* x_15; 
  x_11 = lean_ctor_get(x_10, 2);
  lean_inc(x_11);
  x_12 = lean_ctor_get(x_10, 3);
  lean_inc(x_12);
  x_13 = lean_ctor_get_uint8(x_10, sizeof(void*)*4);
  lean_dec(x_10);
  x_14 = lean_expr_abstract_range(x_12, x_8, x_2);
  lean_dec(x_12);
  x_15 = l_Lean_mkLambda(x_11, x_13, x_14, x_4);
  x_3 = x_8;
  x_4 = x_15;
  goto _start;
  }
  else
  {
  lean_object* x_17; lean_object* x_18; lean_object* x_19; uint8_t x_20; uint8_t x_21; 
  x_17 = lean_ctor_get(x_10, 2);
  lean_inc(x_17);
  x_18 = lean_ctor_get(x_10, 3);
  lean_inc(x_18);
  x_19 = lean_ctor_get(x_10, 4);
  lean_inc(x_19);
  x_20 = lean_ctor_get_uint8(x_10, sizeof(void*)*5);
  lean_dec(x_10);
  x_21 = lean_expr_has_loose_bvar(x_4, x_5);
  if (x_21 == 0)
  {
  lean_object* x_22; 
  lean_dec(x_19);
  lean_dec(x_18);
  lean_dec(x_17);
  x_22 = lean_expr_lower_loose_bvars(x_4, x_7, x_7);
  lean_dec(x_4);
  x_3 = x_8;
  x_4 = x_22;
  goto _start;
  }
  else
  {
  lean_object* x_24; lean_object* x_25; lean_object* x_26; 
  x_24 = lean_expr_abstract_range(x_18, x_8, x_2);
  lean_dec(x_18);
  x_25 = lean_expr_abstract_range(x_19, x_8, x_2);
  lean_dec(x_19);
  x_26 = l_Lean_mkLet(x_17, x_24, x_25, x_4, x_20);
  x_3 = x_8;
  x_4 = x_26;
  goto _start;
  }
  }
  }
  else
  {
  lean_dec(x_3);
  return x_4;
  }
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_mkLambda(lean_object* x_1, lean_object* x_2) {
  _start:
  {
  lean_object* x_3; size_t x_4; size_t x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; 
  x_3 = lean_array_get_size(x_1);
  x_4 = lean_usize_of_nat(x_3);
  x_5 = 0;
  lean_inc(x_1);
  x_6 = l_Array_mapMUnsafe_map___at_Lean_Meta_Closure_mkBinding___spec__1(x_4, x_5, x_1);
  x_7 = lean_expr_abstract(x_2, x_6);
  lean_dec(x_2);
  x_8 = l_Nat_foldRev_loop___at_Lean_Meta_Closure_mkLambda___spec__1(x_1, x_6, x_3, x_7);
  lean_dec(x_6);
  lean_dec(x_1);
  return x_8;
  }
  }
  LEAN_EXPORT lean_object* l_Nat_foldRev_loop___at_Lean_Meta_Closure_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_foldRev_loop___at_Lean_Meta_Closure_mkLambda___spec__1(x_1, x_2, x_3, x_4);
  lean_dec(x_2);
  lean_dec(x_1);
  return x_5;
  }
  }
  LEAN_EXPORT lean_object* l_Nat_foldRev_loop___at_Lean_Meta_Closure_mkForall___spec__1(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_unsigned_to_nat(0u);
  x_6 = lean_nat_dec_eq(x_3, x_5);
  if (x_6 == 0)
  {
  lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; 
  x_7 = lean_unsigned_to_nat(1u);
  x_8 = lean_nat_sub(x_3, x_7);
  lean_dec(x_3);
  x_9 = l_Lean_instInhabitedLocalDecl;
  x_10 = lean_array_get(x_9, x_1, x_8);
  if (lean_obj_tag(x_10) == 0)
  {
  lean_object* x_11; lean_object* x_12; uint8_t x_13; lean_object* x_14; lean_object* x_15; 
  x_11 = lean_ctor_get(x_10, 2);
  lean_inc(x_11);
  x_12 = lean_ctor_get(x_10, 3);
  lean_inc(x_12);
  x_13 = lean_ctor_get_uint8(x_10, sizeof(void*)*4);
  lean_dec(x_10);
  x_14 = lean_expr_abstract_range(x_12, x_8, x_2);
  lean_dec(x_12);
  x_15 = l_Lean_mkForall(x_11, x_13, x_14, x_4);
  x_3 = x_8;
  x_4 = x_15;
  goto _start;
  }
  else
  {
  lean_object* x_17; lean_object* x_18; lean_object* x_19; uint8_t x_20; uint8_t x_21; 
  x_17 = lean_ctor_get(x_10, 2);
  lean_inc(x_17);
  x_18 = lean_ctor_get(x_10, 3);
  lean_inc(x_18);
  x_19 = lean_ctor_get(x_10, 4);
  lean_inc(x_19);
  x_20 = lean_ctor_get_uint8(x_10, sizeof(void*)*5);
  lean_dec(x_10);
  x_21 = lean_expr_has_loose_bvar(x_4, x_5);
  if (x_21 == 0)
  {
  lean_object* x_22; 
  lean_dec(x_19);
  lean_dec(x_18);
  lean_dec(x_17);
  x_22 = lean_expr_lower_loose_bvars(x_4, x_7, x_7);
  lean_dec(x_4);
  x_3 = x_8;
  x_4 = x_22;
  goto _start;
  }
  else
  {
  lean_object* x_24; lean_object* x_25; lean_object* x_26; 
  x_24 = lean_expr_abstract_range(x_18, x_8, x_2);
  lean_dec(x_18);
  x_25 = lean_expr_abstract_range(x_19, x_8, x_2);
  lean_dec(x_19);
  x_26 = l_Lean_mkLet(x_17, x_24, x_25, x_4, x_20);
  x_3 = x_8;
  x_4 = x_26;
  goto _start;
  }
  }
  }
  else
  {
  lean_dec(x_3);
  return x_4;
  }
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_mkForall(lean_object* x_1, lean_object* x_2) {
  _start:
  {
  lean_object* x_3; size_t x_4; size_t x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; 
  x_3 = lean_array_get_size(x_1);
  x_4 = lean_usize_of_nat(x_3);
  x_5 = 0;
  lean_inc(x_1);
  x_6 = l_Array_mapMUnsafe_map___at_Lean_Meta_Closure_mkBinding___spec__1(x_4, x_5, x_1);
  x_7 = lean_expr_abstract(x_2, x_6);
  lean_dec(x_2);
  x_8 = l_Nat_foldRev_loop___at_Lean_Meta_Closure_mkForall___spec__1(x_1, x_6, x_3, x_7);
  lean_dec(x_6);
  lean_dec(x_1);
  return x_8;
  }
  }
  LEAN_EXPORT lean_object* l_Nat_foldRev_loop___at_Lean_Meta_Closure_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_foldRev_loop___at_Lean_Meta_Closure_mkForall___spec__1(x_1, x_2, x_3, x_4);
  lean_dec(x_2);
  lean_dec(x_1);
  return x_5;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_mkValueTypeClosureAux(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* x_7, lean_object* x_8, lean_object* x_9) {
  _start:
  {
  lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; 
  x_10 = l_Lean_Meta_resetZetaFVarIds___rarg(x_6, x_7, x_8, x_9);
  x_11 = lean_ctor_get(x_5, 0);
  lean_inc(x_11);
  x_12 = lean_ctor_get(x_10, 1);
  lean_inc(x_12);
  lean_dec(x_10);
  x_13 = !lean_is_exclusive(x_5);
  if (x_13 == 0)
  {
  lean_object* x_14; uint8_t x_15; 
  x_14 = lean_ctor_get(x_5, 0);
  lean_dec(x_14);
  x_15 = !lean_is_exclusive(x_11);
  if (x_15 == 0)
  {
  uint8_t x_16; lean_object* x_17; 
  x_16 = 1;
  lean_ctor_set_uint8(x_11, 7, x_16);
  lean_inc(x_8);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  x_17 = l_Lean_Meta_Closure_collectExpr(x_1, x_3, x_4, x_5, x_6, x_7, x_8, x_12);
  if (lean_obj_tag(x_17) == 0)
  {
  lean_object* x_18; lean_object* x_19; lean_object* x_20; 
  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_inc(x_8);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  x_20 = l_Lean_Meta_Closure_collectExpr(x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_19);
  if (lean_obj_tag(x_20) == 0)
  {
  lean_object* x_21; lean_object* x_22; lean_object* x_23; 
  x_21 = lean_ctor_get(x_20, 0);
  lean_inc(x_21);
  x_22 = lean_ctor_get(x_20, 1);
  lean_inc(x_22);
  lean_dec(x_20);
  x_23 = l_Lean_Meta_Closure_process(x_3, x_4, x_5, x_6, x_7, x_8, x_22);
  if (lean_obj_tag(x_23) == 0)
  {
  uint8_t x_24; 
  x_24 = !lean_is_exclusive(x_23);
  if (x_24 == 0)
  {
  lean_object* x_25; lean_object* x_26; 
  x_25 = lean_ctor_get(x_23, 0);
  lean_dec(x_25);
  x_26 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_26, 0, x_18);
  lean_ctor_set(x_26, 1, x_21);
  lean_ctor_set(x_23, 0, x_26);
  return x_23;
  }
  else
  {
  lean_object* x_27; lean_object* x_28; lean_object* x_29; 
  x_27 = lean_ctor_get(x_23, 1);
  lean_inc(x_27);
  lean_dec(x_23);
  x_28 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_28, 0, x_18);
  lean_ctor_set(x_28, 1, x_21);
  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
  {
  uint8_t x_30; 
  lean_dec(x_21);
  lean_dec(x_18);
  x_30 = !lean_is_exclusive(x_23);
  if (x_30 == 0)
  {
  return x_23;
  }
  else
  {
  lean_object* x_31; lean_object* x_32; lean_object* x_33; 
  x_31 = lean_ctor_get(x_23, 0);
  x_32 = lean_ctor_get(x_23, 1);
  lean_inc(x_32);
  lean_inc(x_31);
  lean_dec(x_23);
  x_33 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_33, 0, x_31);
  lean_ctor_set(x_33, 1, x_32);
  return x_33;
  }
  }
  }
  else
  {
  uint8_t x_34; 
  lean_dec(x_18);
  lean_dec(x_5);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  x_34 = !lean_is_exclusive(x_20);
  if (x_34 == 0)
  {
  return x_20;
  }
  else
  {
  lean_object* x_35; lean_object* x_36; lean_object* x_37; 
  x_35 = lean_ctor_get(x_20, 0);
  x_36 = lean_ctor_get(x_20, 1);
  lean_inc(x_36);
  lean_inc(x_35);
  lean_dec(x_20);
  x_37 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_37, 0, x_35);
  lean_ctor_set(x_37, 1, x_36);
  return x_37;
  }
  }
  }
  else
  {
  uint8_t x_38; 
  lean_dec(x_5);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_2);
  x_38 = !lean_is_exclusive(x_17);
  if (x_38 == 0)
  {
  return x_17;
  }
  else
  {
  lean_object* x_39; lean_object* x_40; lean_object* x_41; 
  x_39 = lean_ctor_get(x_17, 0);
  x_40 = lean_ctor_get(x_17, 1);
  lean_inc(x_40);
  lean_inc(x_39);
  lean_dec(x_17);
  x_41 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_41, 0, x_39);
  lean_ctor_set(x_41, 1, x_40);
  return x_41;
  }
  }
  }
  else
  {
  uint8_t x_42; uint8_t x_43; uint8_t x_44; uint8_t x_45; uint8_t x_46; uint8_t x_47; uint8_t x_48; uint8_t x_49; uint8_t x_50; uint8_t x_51; uint8_t x_52; uint8_t x_53; uint8_t x_54; uint8_t x_55; lean_object* x_56; lean_object* x_57; 
  x_42 = lean_ctor_get_uint8(x_11, 0);
  x_43 = lean_ctor_get_uint8(x_11, 1);
  x_44 = lean_ctor_get_uint8(x_11, 2);
  x_45 = lean_ctor_get_uint8(x_11, 3);
  x_46 = lean_ctor_get_uint8(x_11, 4);
  x_47 = lean_ctor_get_uint8(x_11, 5);
  x_48 = lean_ctor_get_uint8(x_11, 6);
  x_49 = lean_ctor_get_uint8(x_11, 8);
  x_50 = lean_ctor_get_uint8(x_11, 9);
  x_51 = lean_ctor_get_uint8(x_11, 10);
  x_52 = lean_ctor_get_uint8(x_11, 11);
  x_53 = lean_ctor_get_uint8(x_11, 12);
  x_54 = lean_ctor_get_uint8(x_11, 13);
  lean_dec(x_11);
  x_55 = 1;
  x_56 = lean_alloc_ctor(0, 0, 14);
  lean_ctor_set_uint8(x_56, 0, x_42);
  lean_ctor_set_uint8(x_56, 1, x_43);
  lean_ctor_set_uint8(x_56, 2, x_44);
  lean_ctor_set_uint8(x_56, 3, x_45);
  lean_ctor_set_uint8(x_56, 4, x_46);
  lean_ctor_set_uint8(x_56, 5, x_47);
  lean_ctor_set_uint8(x_56, 6, x_48);
  lean_ctor_set_uint8(x_56, 7, x_55);
  lean_ctor_set_uint8(x_56, 8, x_49);
  lean_ctor_set_uint8(x_56, 9, x_50);
  lean_ctor_set_uint8(x_56, 10, x_51);
  lean_ctor_set_uint8(x_56, 11, x_52);
  lean_ctor_set_uint8(x_56, 12, x_53);
  lean_ctor_set_uint8(x_56, 13, x_54);
  lean_ctor_set(x_5, 0, x_56);
  lean_inc(x_8);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  x_57 = l_Lean_Meta_Closure_collectExpr(x_1, x_3, x_4, x_5, x_6, x_7, x_8, x_12);
  if (lean_obj_tag(x_57) == 0)
  {
  lean_object* x_58; lean_object* x_59; lean_object* x_60; 
  x_58 = lean_ctor_get(x_57, 0);
  lean_inc(x_58);
  x_59 = lean_ctor_get(x_57, 1);
  lean_inc(x_59);
  lean_dec(x_57);
  lean_inc(x_8);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  x_60 = l_Lean_Meta_Closure_collectExpr(x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_59);
  if (lean_obj_tag(x_60) == 0)
  {
  lean_object* x_61; lean_object* x_62; lean_object* x_63; 
  x_61 = lean_ctor_get(x_60, 0);
  lean_inc(x_61);
  x_62 = lean_ctor_get(x_60, 1);
  lean_inc(x_62);
  lean_dec(x_60);
  x_63 = l_Lean_Meta_Closure_process(x_3, x_4, x_5, x_6, x_7, x_8, x_62);
  if (lean_obj_tag(x_63) == 0)
  {
  lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; 
  x_64 = lean_ctor_get(x_63, 1);
  lean_inc(x_64);
  if (lean_is_exclusive(x_63)) {
   lean_ctor_release(x_63, 0);
   lean_ctor_release(x_63, 1);
   x_65 = x_63;
  } else {
   lean_dec_ref(x_63);
   x_65 = lean_box(0);
  }
  x_66 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_66, 0, x_58);
  lean_ctor_set(x_66, 1, x_61);
  if (lean_is_scalar(x_65)) {
   x_67 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_67 = x_65;
  }
  lean_ctor_set(x_67, 0, x_66);
  lean_ctor_set(x_67, 1, x_64);
  return x_67;
  }
  else
  {
  lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; 
  lean_dec(x_61);
  lean_dec(x_58);
  x_68 = lean_ctor_get(x_63, 0);
  lean_inc(x_68);
  x_69 = lean_ctor_get(x_63, 1);
  lean_inc(x_69);
  if (lean_is_exclusive(x_63)) {
   lean_ctor_release(x_63, 0);
   lean_ctor_release(x_63, 1);
   x_70 = x_63;
  } else {
   lean_dec_ref(x_63);
   x_70 = lean_box(0);
  }
  if (lean_is_scalar(x_70)) {
   x_71 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_71 = x_70;
  }
  lean_ctor_set(x_71, 0, x_68);
  lean_ctor_set(x_71, 1, x_69);
  return x_71;
  }
  }
  else
  {
  lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; 
  lean_dec(x_58);
  lean_dec(x_5);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  x_72 = lean_ctor_get(x_60, 0);
  lean_inc(x_72);
  x_73 = lean_ctor_get(x_60, 1);
  lean_inc(x_73);
  if (lean_is_exclusive(x_60)) {
   lean_ctor_release(x_60, 0);
   lean_ctor_release(x_60, 1);
   x_74 = x_60;
  } else {
   lean_dec_ref(x_60);
   x_74 = lean_box(0);
  }
  if (lean_is_scalar(x_74)) {
   x_75 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_75 = x_74;
  }
  lean_ctor_set(x_75, 0, x_72);
  lean_ctor_set(x_75, 1, x_73);
  return x_75;
  }
  }
  else
  {
  lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; 
  lean_dec(x_5);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_2);
  x_76 = lean_ctor_get(x_57, 0);
  lean_inc(x_76);
  x_77 = lean_ctor_get(x_57, 1);
  lean_inc(x_77);
  if (lean_is_exclusive(x_57)) {
   lean_ctor_release(x_57, 0);
   lean_ctor_release(x_57, 1);
   x_78 = x_57;
  } else {
   lean_dec_ref(x_57);
   x_78 = lean_box(0);
  }
  if (lean_is_scalar(x_78)) {
   x_79 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_79 = x_78;
  }
  lean_ctor_set(x_79, 0, x_76);
  lean_ctor_set(x_79, 1, x_77);
  return x_79;
  }
  }
  }
  else
  {
  lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; uint8_t x_85; uint8_t x_86; uint8_t x_87; uint8_t x_88; uint8_t x_89; uint8_t x_90; uint8_t x_91; uint8_t x_92; uint8_t x_93; uint8_t x_94; uint8_t x_95; uint8_t x_96; uint8_t x_97; lean_object* x_98; uint8_t x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; 
  x_80 = lean_ctor_get(x_5, 1);
  x_81 = lean_ctor_get(x_5, 2);
  x_82 = lean_ctor_get(x_5, 3);
  x_83 = lean_ctor_get(x_5, 4);
  x_84 = lean_ctor_get(x_5, 5);
  lean_inc(x_84);
  lean_inc(x_83);
  lean_inc(x_82);
  lean_inc(x_81);
  lean_inc(x_80);
  lean_dec(x_5);
  x_85 = lean_ctor_get_uint8(x_11, 0);
  x_86 = lean_ctor_get_uint8(x_11, 1);
  x_87 = lean_ctor_get_uint8(x_11, 2);
  x_88 = lean_ctor_get_uint8(x_11, 3);
  x_89 = lean_ctor_get_uint8(x_11, 4);
  x_90 = lean_ctor_get_uint8(x_11, 5);
  x_91 = lean_ctor_get_uint8(x_11, 6);
  x_92 = lean_ctor_get_uint8(x_11, 8);
  x_93 = lean_ctor_get_uint8(x_11, 9);
  x_94 = lean_ctor_get_uint8(x_11, 10);
  x_95 = lean_ctor_get_uint8(x_11, 11);
  x_96 = lean_ctor_get_uint8(x_11, 12);
  x_97 = lean_ctor_get_uint8(x_11, 13);
  if (lean_is_exclusive(x_11)) {
   x_98 = x_11;
  } else {
   lean_dec_ref(x_11);
   x_98 = lean_box(0);
  }
  x_99 = 1;
  if (lean_is_scalar(x_98)) {
   x_100 = lean_alloc_ctor(0, 0, 14);
  } else {
   x_100 = x_98;
  }
  lean_ctor_set_uint8(x_100, 0, x_85);
  lean_ctor_set_uint8(x_100, 1, x_86);
  lean_ctor_set_uint8(x_100, 2, x_87);
  lean_ctor_set_uint8(x_100, 3, x_88);
  lean_ctor_set_uint8(x_100, 4, x_89);
  lean_ctor_set_uint8(x_100, 5, x_90);
  lean_ctor_set_uint8(x_100, 6, x_91);
  lean_ctor_set_uint8(x_100, 7, x_99);
  lean_ctor_set_uint8(x_100, 8, x_92);
  lean_ctor_set_uint8(x_100, 9, x_93);
  lean_ctor_set_uint8(x_100, 10, x_94);
  lean_ctor_set_uint8(x_100, 11, x_95);
  lean_ctor_set_uint8(x_100, 12, x_96);
  lean_ctor_set_uint8(x_100, 13, x_97);
  x_101 = lean_alloc_ctor(0, 6, 0);
  lean_ctor_set(x_101, 0, x_100);
  lean_ctor_set(x_101, 1, x_80);
  lean_ctor_set(x_101, 2, x_81);
  lean_ctor_set(x_101, 3, x_82);
  lean_ctor_set(x_101, 4, x_83);
  lean_ctor_set(x_101, 5, x_84);
  lean_inc(x_8);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_101);
  x_102 = l_Lean_Meta_Closure_collectExpr(x_1, x_3, x_4, x_101, x_6, x_7, x_8, x_12);
  if (lean_obj_tag(x_102) == 0)
  {
  lean_object* x_103; lean_object* x_104; lean_object* x_105; 
  x_103 = lean_ctor_get(x_102, 0);
  lean_inc(x_103);
  x_104 = lean_ctor_get(x_102, 1);
  lean_inc(x_104);
  lean_dec(x_102);
  lean_inc(x_8);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_101);
  x_105 = l_Lean_Meta_Closure_collectExpr(x_2, x_3, x_4, x_101, x_6, x_7, x_8, x_104);
  if (lean_obj_tag(x_105) == 0)
  {
  lean_object* x_106; lean_object* x_107; lean_object* x_108; 
  x_106 = lean_ctor_get(x_105, 0);
  lean_inc(x_106);
  x_107 = lean_ctor_get(x_105, 1);
  lean_inc(x_107);
  lean_dec(x_105);
  x_108 = l_Lean_Meta_Closure_process(x_3, x_4, x_101, x_6, x_7, x_8, x_107);
  if (lean_obj_tag(x_108) == 0)
  {
  lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; 
  x_109 = lean_ctor_get(x_108, 1);
  lean_inc(x_109);
  if (lean_is_exclusive(x_108)) {
   lean_ctor_release(x_108, 0);
   lean_ctor_release(x_108, 1);
   x_110 = x_108;
  } else {
   lean_dec_ref(x_108);
   x_110 = lean_box(0);
  }
  x_111 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_111, 0, x_103);
  lean_ctor_set(x_111, 1, x_106);
  if (lean_is_scalar(x_110)) {
   x_112 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_112 = x_110;
  }
  lean_ctor_set(x_112, 0, x_111);
  lean_ctor_set(x_112, 1, x_109);
  return x_112;
  }
  else
  {
  lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; 
  lean_dec(x_106);
  lean_dec(x_103);
  x_113 = lean_ctor_get(x_108, 0);
  lean_inc(x_113);
  x_114 = lean_ctor_get(x_108, 1);
  lean_inc(x_114);
  if (lean_is_exclusive(x_108)) {
   lean_ctor_release(x_108, 0);
   lean_ctor_release(x_108, 1);
   x_115 = x_108;
  } else {
   lean_dec_ref(x_108);
   x_115 = lean_box(0);
  }
  if (lean_is_scalar(x_115)) {
   x_116 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_116 = x_115;
  }
  lean_ctor_set(x_116, 0, x_113);
  lean_ctor_set(x_116, 1, x_114);
  return x_116;
  }
  }
  else
  {
  lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; 
  lean_dec(x_103);
  lean_dec(x_101);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  x_117 = lean_ctor_get(x_105, 0);
  lean_inc(x_117);
  x_118 = lean_ctor_get(x_105, 1);
  lean_inc(x_118);
  if (lean_is_exclusive(x_105)) {
   lean_ctor_release(x_105, 0);
   lean_ctor_release(x_105, 1);
   x_119 = x_105;
  } else {
   lean_dec_ref(x_105);
   x_119 = lean_box(0);
  }
  if (lean_is_scalar(x_119)) {
   x_120 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_120 = x_119;
  }
  lean_ctor_set(x_120, 0, x_117);
  lean_ctor_set(x_120, 1, x_118);
  return x_120;
  }
  }
  else
  {
  lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; 
  lean_dec(x_101);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_2);
  x_121 = lean_ctor_get(x_102, 0);
  lean_inc(x_121);
  x_122 = lean_ctor_get(x_102, 1);
  lean_inc(x_122);
  if (lean_is_exclusive(x_102)) {
   lean_ctor_release(x_102, 0);
   lean_ctor_release(x_102, 1);
   x_123 = x_102;
  } else {
   lean_dec_ref(x_102);
   x_123 = lean_box(0);
  }
  if (lean_is_scalar(x_123)) {
   x_124 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_124 = x_123;
  }
  lean_ctor_set(x_124, 0, x_121);
  lean_ctor_set(x_124, 1, x_122);
  return x_124;
  }
  }
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_mkValueTypeClosureAux___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) {
  _start:
  {
  uint8_t x_10; lean_object* x_11; 
  x_10 = lean_unbox(x_3);
  lean_dec(x_3);
  x_11 = l_Lean_Meta_Closure_mkValueTypeClosureAux(x_1, x_2, x_10, x_4, x_5, x_6, x_7, x_8, x_9);
  lean_dec(x_4);
  return x_11;
  }
  }
  static lean_object* _init_l_Lean_Meta_Closure_mkValueTypeClosure___closed__1() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; 
  x_1 = l_Lean_Meta_Closure_State_visitedExpr___default___closed__1;
  x_2 = l_Lean_Meta_Closure_State_levelParams___default___closed__1;
  x_3 = lean_unsigned_to_nat(1u);
  x_4 = lean_alloc_ctor(0, 12, 0);
  lean_ctor_set(x_4, 0, x_1);
  lean_ctor_set(x_4, 1, x_1);
  lean_ctor_set(x_4, 2, x_2);
  lean_ctor_set(x_4, 3, x_3);
  lean_ctor_set(x_4, 4, x_2);
  lean_ctor_set(x_4, 5, x_2);
  lean_ctor_set(x_4, 6, x_2);
  lean_ctor_set(x_4, 7, x_2);
  lean_ctor_set(x_4, 8, x_3);
  lean_ctor_set(x_4, 9, x_2);
  lean_ctor_set(x_4, 10, x_2);
  lean_ctor_set(x_4, 11, x_2);
  return x_4;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_mkValueTypeClosure(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* x_7, lean_object* x_8) {
  _start:
  {
  lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; 
  x_9 = lean_st_ref_get(x_7, x_8);
  x_10 = lean_ctor_get(x_9, 1);
  lean_inc(x_10);
  lean_dec(x_9);
  x_11 = l_Lean_Meta_Closure_mkValueTypeClosure___closed__1;
  x_12 = lean_st_mk_ref(x_11, x_10);
  x_13 = lean_ctor_get(x_12, 0);
  lean_inc(x_13);
  x_14 = lean_ctor_get(x_12, 1);
  lean_inc(x_14);
  lean_dec(x_12);
  lean_inc(x_7);
  x_15 = l_Lean_Meta_Closure_mkValueTypeClosureAux(x_1, x_2, x_3, x_13, x_4, x_5, x_6, x_7, x_14);
  if (lean_obj_tag(x_15) == 0)
  {
  lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; uint8_t x_21; 
  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 = lean_st_ref_get(x_7, x_17);
  lean_dec(x_7);
  x_19 = lean_ctor_get(x_18, 1);
  lean_inc(x_19);
  lean_dec(x_18);
  x_20 = lean_st_ref_get(x_13, x_19);
  lean_dec(x_13);
  x_21 = !lean_is_exclusive(x_20);
  if (x_21 == 0)
  {
  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; 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; 
  x_22 = lean_ctor_get(x_20, 0);
  x_23 = lean_ctor_get(x_16, 0);
  lean_inc(x_23);
  x_24 = lean_ctor_get(x_16, 1);
  lean_inc(x_24);
  lean_dec(x_16);
  x_25 = lean_ctor_get(x_22, 5);
  lean_inc(x_25);
  x_26 = l_Array_reverse___rarg(x_25);
  x_27 = lean_ctor_get(x_22, 6);
  lean_inc(x_27);
  x_28 = l_Array_append___rarg(x_26, x_27);
  x_29 = lean_ctor_get(x_22, 7);
  lean_inc(x_29);
  x_30 = l_Array_reverse___rarg(x_29);
  lean_inc(x_30);
  x_31 = l_Lean_Meta_Closure_mkForall(x_30, x_23);
  lean_inc(x_28);
  x_32 = l_Lean_Meta_Closure_mkForall(x_28, x_31);
  x_33 = l_Lean_Meta_Closure_mkLambda(x_30, x_24);
  x_34 = l_Lean_Meta_Closure_mkLambda(x_28, x_33);
  x_35 = lean_ctor_get(x_22, 2);
  lean_inc(x_35);
  x_36 = lean_ctor_get(x_22, 4);
  lean_inc(x_36);
  x_37 = lean_ctor_get(x_22, 10);
  lean_inc(x_37);
  x_38 = l_Array_reverse___rarg(x_37);
  x_39 = lean_ctor_get(x_22, 9);
  lean_inc(x_39);
  lean_dec(x_22);
  x_40 = l_Array_append___rarg(x_38, x_39);
  x_41 = lean_alloc_ctor(0, 5, 0);
  lean_ctor_set(x_41, 0, x_35);
  lean_ctor_set(x_41, 1, x_32);
  lean_ctor_set(x_41, 2, x_34);
  lean_ctor_set(x_41, 3, x_36);
  lean_ctor_set(x_41, 4, x_40);
  lean_ctor_set(x_20, 0, x_41);
  return x_20;
  }
  else
  {
  lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; 
  x_42 = lean_ctor_get(x_20, 0);
  x_43 = lean_ctor_get(x_20, 1);
  lean_inc(x_43);
  lean_inc(x_42);
  lean_dec(x_20);
  x_44 = lean_ctor_get(x_16, 0);
  lean_inc(x_44);
  x_45 = lean_ctor_get(x_16, 1);
  lean_inc(x_45);
  lean_dec(x_16);
  x_46 = lean_ctor_get(x_42, 5);
  lean_inc(x_46);
  x_47 = l_Array_reverse___rarg(x_46);
  x_48 = lean_ctor_get(x_42, 6);
  lean_inc(x_48);
  x_49 = l_Array_append___rarg(x_47, x_48);
  x_50 = lean_ctor_get(x_42, 7);
  lean_inc(x_50);
  x_51 = l_Array_reverse___rarg(x_50);
  lean_inc(x_51);
  x_52 = l_Lean_Meta_Closure_mkForall(x_51, x_44);
  lean_inc(x_49);
  x_53 = l_Lean_Meta_Closure_mkForall(x_49, x_52);
  x_54 = l_Lean_Meta_Closure_mkLambda(x_51, x_45);
  x_55 = l_Lean_Meta_Closure_mkLambda(x_49, x_54);
  x_56 = lean_ctor_get(x_42, 2);
  lean_inc(x_56);
  x_57 = lean_ctor_get(x_42, 4);
  lean_inc(x_57);
  x_58 = lean_ctor_get(x_42, 10);
  lean_inc(x_58);
  x_59 = l_Array_reverse___rarg(x_58);
  x_60 = lean_ctor_get(x_42, 9);
  lean_inc(x_60);
  lean_dec(x_42);
  x_61 = l_Array_append___rarg(x_59, x_60);
  x_62 = lean_alloc_ctor(0, 5, 0);
  lean_ctor_set(x_62, 0, x_56);
  lean_ctor_set(x_62, 1, x_53);
  lean_ctor_set(x_62, 2, x_55);
  lean_ctor_set(x_62, 3, x_57);
  lean_ctor_set(x_62, 4, x_61);
  x_63 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_63, 0, x_62);
  lean_ctor_set(x_63, 1, x_43);
  return x_63;
  }
  }
  else
  {
  uint8_t x_64; 
  lean_dec(x_13);
  lean_dec(x_7);
  x_64 = !lean_is_exclusive(x_15);
  if (x_64 == 0)
  {
  return x_15;
  }
  else
  {
  lean_object* x_65; lean_object* x_66; lean_object* x_67; 
  x_65 = lean_ctor_get(x_15, 0);
  x_66 = lean_ctor_get(x_15, 1);
  lean_inc(x_66);
  lean_inc(x_65);
  lean_dec(x_15);
  x_67 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_67, 0, x_65);
  lean_ctor_set(x_67, 1, x_66);
  return x_67;
  }
  }
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_Closure_mkValueTypeClosure___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
  _start:
  {
  uint8_t x_9; lean_object* x_10; 
  x_9 = lean_unbox(x_3);
  lean_dec(x_3);
  x_10 = l_Lean_Meta_Closure_mkValueTypeClosure(x_1, x_2, x_9, x_4, x_5, x_6, x_7, x_8);
  return x_10;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_throwKernelException___at_Lean_Meta_mkAuxDefinition___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
  _start:
  {
  lean_object* x_7; lean_object* x_8; lean_object* x_9; 
  x_7 = lean_ctor_get(x_4, 0);
  lean_inc(x_7);
  x_8 = l_Lean_KernelException_toMessageData(x_1, x_7);
  x_9 = l_Lean_throwError___at_Lean_Meta_setInlineAttribute___spec__1(x_8, x_2, x_3, x_4, x_5, x_6);
  lean_dec(x_4);
  return x_9;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_addDecl___at_Lean_Meta_mkAuxDefinition___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
  _start:
  {
  lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; 
  x_7 = lean_st_ref_get(x_5, x_6);
  x_8 = lean_ctor_get(x_7, 0);
  lean_inc(x_8);
  x_9 = lean_ctor_get(x_7, 1);
  lean_inc(x_9);
  lean_dec(x_7);
  x_10 = lean_ctor_get(x_8, 0);
  lean_inc(x_10);
  lean_dec(x_8);
  x_11 = lean_add_decl(x_10, x_1);
  lean_dec(x_1);
  if (lean_obj_tag(x_11) == 0)
  {
  lean_object* x_12; lean_object* x_13; 
  x_12 = lean_ctor_get(x_11, 0);
  lean_inc(x_12);
  lean_dec(x_11);
  x_13 = l_Lean_throwKernelException___at_Lean_Meta_mkAuxDefinition___spec__2(x_12, x_2, x_3, x_4, x_5, x_9);
  return x_13;
  }
  else
  {
  lean_object* x_14; lean_object* x_15; 
  x_14 = lean_ctor_get(x_11, 0);
  lean_inc(x_14);
  lean_dec(x_11);
  x_15 = l_Lean_setEnv___at_Lean_Meta_setInlineAttribute___spec__2(x_14, x_2, x_3, x_4, x_5, x_9);
  lean_dec(x_4);
  return x_15;
  }
  }
  }
  LEAN_EXPORT uint8_t l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___lambda__1(lean_object* x_1, lean_object* x_2) {
  _start:
  {
  if (lean_obj_tag(x_2) == 4)
  {
  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);
  lean_inc(x_1);
  x_4 = lean_is_aux_recursor(x_1, x_3);
  if (x_4 == 0)
  {
  uint8_t x_5; 
  lean_inc(x_3);
  x_5 = l_Lean_isRecCore(x_1, x_3);
  if (x_5 == 0)
  {
  uint8_t x_6; 
  lean_dec(x_3);
  x_6 = 0;
  return x_6;
  }
  else
  {
  lean_object* x_7; uint8_t x_8; 
  x_7 = l___private_Lean_MonadEnv_0__Lean_supportedRecursors;
  x_8 = l_Array_contains___at_Lean_registerInternalExceptionId___spec__1(x_7, x_3);
  lean_dec(x_3);
  if (x_8 == 0)
  {
  uint8_t x_9; 
  x_9 = 1;
  return x_9;
  }
  else
  {
  uint8_t x_10; 
  x_10 = 0;
  return x_10;
  }
  }
  }
  else
  {
  uint8_t x_11; 
  lean_inc(x_3);
  lean_inc(x_1);
  x_11 = l_Lean_isCasesOnRecursor(x_1, x_3);
  if (x_11 == 0)
  {
  lean_object* x_12; uint8_t x_13; 
  lean_dec(x_1);
  x_12 = l___private_Lean_MonadEnv_0__Lean_supportedRecursors;
  x_13 = l_Array_contains___at_Lean_registerInternalExceptionId___spec__1(x_12, x_3);
  lean_dec(x_3);
  if (x_13 == 0)
  {
  uint8_t x_14; 
  x_14 = 1;
  return x_14;
  }
  else
  {
  uint8_t x_15; 
  x_15 = 0;
  return x_15;
  }
  }
  else
  {
  uint8_t x_16; 
  lean_inc(x_3);
  x_16 = l_Lean_isRecCore(x_1, x_3);
  if (x_16 == 0)
  {
  uint8_t x_17; 
  lean_dec(x_3);
  x_17 = 0;
  return x_17;
  }
  else
  {
  lean_object* x_18; uint8_t x_19; 
  x_18 = l___private_Lean_MonadEnv_0__Lean_supportedRecursors;
  x_19 = l_Array_contains___at_Lean_registerInternalExceptionId___spec__1(x_18, x_3);
  lean_dec(x_3);
  if (x_19 == 0)
  {
  uint8_t x_20; 
  x_20 = 1;
  return x_20;
  }
  else
  {
  uint8_t x_21; 
  x_21 = 0;
  return x_21;
  }
  }
  }
  }
  }
  else
  {
  uint8_t x_22; 
  lean_dec(x_2);
  lean_dec(x_1);
  x_22 = 0;
  return x_22;
  }
  }
  }
  static lean_object* _init_l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__1() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("code generator does not support recursor '");
  return x_1;
  }
  }
  static lean_object* _init_l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__2() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; 
  x_1 = l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__1;
  x_2 = l_Lean_stringToMessageData(x_1);
  return x_2;
  }
  }
  static lean_object* _init_l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__3() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("' yet, consider using 'match ... with' and/or structural recursion");
  return x_1;
  }
  }
  static lean_object* _init_l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__4() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; 
  x_1 = l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__3;
  x_2 = l_Lean_stringToMessageData(x_1);
  return x_2;
  }
  }
  LEAN_EXPORT lean_object* l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
  _start:
  {
  if (lean_obj_tag(x_3) == 0)
  {
  lean_object* x_9; 
  lean_dec(x_1);
  x_9 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_9, 0, x_2);
  lean_ctor_set(x_9, 1, x_8);
  return x_9;
  }
  else
  {
  lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; 
  lean_dec(x_2);
  x_10 = lean_ctor_get(x_3, 0);
  lean_inc(x_10);
  x_11 = lean_ctor_get(x_3, 1);
  lean_inc(x_11);
  lean_dec(x_3);
  x_33 = lean_ctor_get(x_10, 0);
  lean_inc(x_33);
  x_34 = lean_ctor_get(x_33, 2);
  lean_inc(x_34);
  lean_dec(x_33);
  lean_inc(x_1);
  x_35 = lean_alloc_closure((void*)(l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___lambda__1___boxed), 2, 1);
  lean_closure_set(x_35, 0, x_1);
  x_36 = l_Lean_Expr_FindImpl_findUnsafe_x3f(x_35, x_34);
  if (lean_obj_tag(x_36) == 0)
  {
  x_12 = x_8;
  goto block_32;
  }
  else
  {
  lean_object* x_37; 
  x_37 = lean_ctor_get(x_36, 0);
  lean_inc(x_37);
  lean_dec(x_36);
  if (lean_obj_tag(x_37) == 4)
  {
  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; uint8_t x_45; 
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(x_1);
  x_38 = lean_ctor_get(x_37, 0);
  lean_inc(x_38);
  lean_dec(x_37);
  x_39 = lean_alloc_ctor(4, 1, 0);
  lean_ctor_set(x_39, 0, x_38);
  x_40 = l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__2;
  x_41 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_41, 0, x_40);
  lean_ctor_set(x_41, 1, x_39);
  x_42 = l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__4;
  x_43 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_43, 0, x_41);
  lean_ctor_set(x_43, 1, x_42);
  x_44 = l_Lean_throwError___at_Lean_Meta_setInlineAttribute___spec__1(x_43, x_4, x_5, x_6, x_7, x_8);
  x_45 = !lean_is_exclusive(x_44);
  if (x_45 == 0)
  {
  return x_44;
  }
  else
  {
  lean_object* x_46; lean_object* x_47; lean_object* x_48; 
  x_46 = lean_ctor_get(x_44, 0);
  x_47 = lean_ctor_get(x_44, 1);
  lean_inc(x_47);
  lean_inc(x_46);
  lean_dec(x_44);
  x_48 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_48, 0, x_46);
  lean_ctor_set(x_48, 1, x_47);
  return x_48;
  }
  }
  else
  {
  lean_dec(x_37);
  x_12 = x_8;
  goto block_32;
  }
  }
  block_32:
  {
  lean_object* x_13; lean_object* x_14; lean_object* x_15; 
  x_13 = lean_ctor_get(x_10, 1);
  lean_inc(x_13);
  lean_dec(x_10);
  lean_inc(x_1);
  x_14 = lean_alloc_closure((void*)(l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___lambda__1___boxed), 2, 1);
  lean_closure_set(x_14, 0, x_1);
  x_15 = l_Lean_Expr_FindImpl_findUnsafe_x3f(x_14, x_13);
  if (lean_obj_tag(x_15) == 0)
  {
  lean_object* x_16; 
  x_16 = lean_box(0);
  x_2 = x_16;
  x_3 = x_11;
  x_8 = x_12;
  goto _start;
  }
  else
  {
  lean_object* x_18; 
  x_18 = lean_ctor_get(x_15, 0);
  lean_inc(x_18);
  lean_dec(x_15);
  if (lean_obj_tag(x_18) == 4)
  {
  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; uint8_t x_26; 
  lean_dec(x_11);
  lean_dec(x_1);
  x_19 = lean_ctor_get(x_18, 0);
  lean_inc(x_19);
  lean_dec(x_18);
  x_20 = lean_alloc_ctor(4, 1, 0);
  lean_ctor_set(x_20, 0, x_19);
  x_21 = l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__2;
  x_22 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_22, 0, x_21);
  lean_ctor_set(x_22, 1, x_20);
  x_23 = l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__4;
  x_24 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_24, 0, x_22);
  lean_ctor_set(x_24, 1, x_23);
  x_25 = l_Lean_throwError___at_Lean_Meta_setInlineAttribute___spec__1(x_24, x_4, x_5, x_6, x_7, x_12);
  x_26 = !lean_is_exclusive(x_25);
  if (x_26 == 0)
  {
  return x_25;
  }
  else
  {
  lean_object* x_27; lean_object* x_28; lean_object* x_29; 
  x_27 = lean_ctor_get(x_25, 0);
  x_28 = lean_ctor_get(x_25, 1);
  lean_inc(x_28);
  lean_inc(x_27);
  lean_dec(x_25);
  x_29 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_29, 0, x_27);
  lean_ctor_set(x_29, 1, x_28);
  return x_29;
  }
  }
  else
  {
  lean_object* x_30; 
  lean_dec(x_18);
  x_30 = lean_box(0);
  x_2 = x_30;
  x_3 = x_11;
  x_8 = x_12;
  goto _start;
  }
  }
  }
  }
  }
  }
  LEAN_EXPORT lean_object* l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__7(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
  _start:
  {
  if (lean_obj_tag(x_3) == 0)
  {
  lean_object* x_9; 
  lean_dec(x_1);
  x_9 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_9, 0, x_2);
  lean_ctor_set(x_9, 1, x_8);
  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_dec(x_2);
  x_10 = lean_ctor_get(x_3, 0);
  lean_inc(x_10);
  x_11 = lean_ctor_get(x_3, 1);
  lean_inc(x_11);
  lean_dec(x_3);
  x_12 = lean_ctor_get(x_10, 1);
  lean_inc(x_12);
  lean_dec(x_10);
  lean_inc(x_1);
  x_13 = lean_alloc_closure((void*)(l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___lambda__1___boxed), 2, 1);
  lean_closure_set(x_13, 0, x_1);
  x_14 = l_Lean_Expr_FindImpl_findUnsafe_x3f(x_13, x_12);
  if (lean_obj_tag(x_14) == 0)
  {
  lean_object* x_15; 
  x_15 = lean_box(0);
  x_2 = x_15;
  x_3 = x_11;
  goto _start;
  }
  else
  {
  lean_object* x_17; 
  x_17 = lean_ctor_get(x_14, 0);
  lean_inc(x_17);
  lean_dec(x_14);
  if (lean_obj_tag(x_17) == 4)
  {
  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; uint8_t x_25; 
  lean_dec(x_11);
  lean_dec(x_1);
  x_18 = lean_ctor_get(x_17, 0);
  lean_inc(x_18);
  lean_dec(x_17);
  x_19 = lean_alloc_ctor(4, 1, 0);
  lean_ctor_set(x_19, 0, x_18);
  x_20 = l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__2;
  x_21 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_21, 0, x_20);
  lean_ctor_set(x_21, 1, x_19);
  x_22 = l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__4;
  x_23 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_23, 0, x_21);
  lean_ctor_set(x_23, 1, x_22);
  x_24 = l_Lean_throwError___at_Lean_Meta_setInlineAttribute___spec__1(x_23, x_4, x_5, x_6, x_7, x_8);
  x_25 = !lean_is_exclusive(x_24);
  if (x_25 == 0)
  {
  return x_24;
  }
  else
  {
  lean_object* x_26; lean_object* x_27; lean_object* x_28; 
  x_26 = lean_ctor_get(x_24, 0);
  x_27 = lean_ctor_get(x_24, 1);
  lean_inc(x_27);
  lean_inc(x_26);
  lean_dec(x_24);
  x_28 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_28, 0, x_26);
  lean_ctor_set(x_28, 1, x_27);
  return x_28;
  }
  }
  else
  {
  lean_object* x_29; 
  lean_dec(x_17);
  x_29 = lean_box(0);
  x_2 = x_29;
  x_3 = x_11;
  goto _start;
  }
  }
  }
  }
  }
  LEAN_EXPORT lean_object* l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__8(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
  _start:
  {
  if (lean_obj_tag(x_3) == 0)
  {
  lean_object* x_9; 
  lean_dec(x_1);
  x_9 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_9, 0, x_2);
  lean_ctor_set(x_9, 1, x_8);
  return x_9;
  }
  else
  {
  lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_21; lean_object* x_22; lean_object* x_23; 
  lean_dec(x_2);
  x_10 = lean_ctor_get(x_3, 0);
  lean_inc(x_10);
  x_11 = lean_ctor_get(x_3, 1);
  lean_inc(x_11);
  lean_dec(x_3);
  x_21 = lean_ctor_get(x_10, 1);
  lean_inc(x_21);
  lean_inc(x_1);
  x_22 = lean_alloc_closure((void*)(l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___lambda__1___boxed), 2, 1);
  lean_closure_set(x_22, 0, x_1);
  x_23 = l_Lean_Expr_FindImpl_findUnsafe_x3f(x_22, x_21);
  if (lean_obj_tag(x_23) == 0)
  {
  lean_object* x_24; lean_object* x_25; lean_object* x_26; 
  x_24 = lean_ctor_get(x_10, 2);
  lean_inc(x_24);
  lean_dec(x_10);
  x_25 = lean_box(0);
  lean_inc(x_1);
  x_26 = l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__7(x_1, x_25, x_24, x_4, x_5, x_6, x_7, x_8);
  x_12 = x_26;
  goto block_20;
  }
  else
  {
  lean_object* x_27; 
  x_27 = lean_ctor_get(x_23, 0);
  lean_inc(x_27);
  lean_dec(x_23);
  if (lean_obj_tag(x_27) == 4)
  {
  lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; uint8_t x_35; 
  lean_dec(x_10);
  x_28 = lean_ctor_get(x_27, 0);
  lean_inc(x_28);
  lean_dec(x_27);
  x_29 = lean_alloc_ctor(4, 1, 0);
  lean_ctor_set(x_29, 0, x_28);
  x_30 = l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__2;
  x_31 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_31, 0, x_30);
  lean_ctor_set(x_31, 1, x_29);
  x_32 = l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__4;
  x_33 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_33, 0, x_31);
  lean_ctor_set(x_33, 1, x_32);
  x_34 = l_Lean_throwError___at_Lean_Meta_setInlineAttribute___spec__1(x_33, x_4, x_5, x_6, x_7, x_8);
  x_35 = !lean_is_exclusive(x_34);
  if (x_35 == 0)
  {
  x_12 = x_34;
  goto block_20;
  }
  else
  {
  lean_object* x_36; lean_object* x_37; lean_object* x_38; 
  x_36 = lean_ctor_get(x_34, 0);
  x_37 = lean_ctor_get(x_34, 1);
  lean_inc(x_37);
  lean_inc(x_36);
  lean_dec(x_34);
  x_38 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_38, 0, x_36);
  lean_ctor_set(x_38, 1, x_37);
  x_12 = x_38;
  goto block_20;
  }
  }
  else
  {
  lean_object* x_39; lean_object* x_40; lean_object* x_41; 
  lean_dec(x_27);
  x_39 = lean_ctor_get(x_10, 2);
  lean_inc(x_39);
  lean_dec(x_10);
  x_40 = lean_box(0);
  lean_inc(x_1);
  x_41 = l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__7(x_1, x_40, x_39, x_4, x_5, x_6, x_7, x_8);
  x_12 = x_41;
  goto block_20;
  }
  }
  block_20:
  {
  if (lean_obj_tag(x_12) == 0)
  {
  lean_object* x_13; lean_object* x_14; 
  x_13 = lean_ctor_get(x_12, 0);
  lean_inc(x_13);
  x_14 = lean_ctor_get(x_12, 1);
  lean_inc(x_14);
  lean_dec(x_12);
  x_2 = x_13;
  x_3 = x_11;
  x_8 = x_14;
  goto _start;
  }
  else
  {
  uint8_t x_16; 
  lean_dec(x_11);
  lean_dec(x_1);
  x_16 = !lean_is_exclusive(x_12);
  if (x_16 == 0)
  {
  return x_12;
  }
  else
  {
  lean_object* x_17; lean_object* x_18; lean_object* x_19; 
  x_17 = lean_ctor_get(x_12, 0);
  x_18 = lean_ctor_get(x_12, 1);
  lean_inc(x_18);
  lean_inc(x_17);
  lean_dec(x_12);
  x_19 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_19, 0, x_17);
  lean_ctor_set(x_19, 1, x_18);
  return x_19;
  }
  }
  }
  }
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Declaration_foldExprM___at_Lean_Meta_mkAuxDefinition___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
  _start:
  {
  switch (lean_obj_tag(x_2)) {
  case 0:
  {
  lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; 
  lean_dec(x_3);
  x_9 = lean_ctor_get(x_2, 0);
  lean_inc(x_9);
  lean_dec(x_2);
  x_10 = lean_ctor_get(x_9, 0);
  lean_inc(x_10);
  lean_dec(x_9);
  x_11 = lean_ctor_get(x_10, 2);
  lean_inc(x_11);
  lean_dec(x_10);
  x_12 = lean_alloc_closure((void*)(l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___lambda__1___boxed), 2, 1);
  lean_closure_set(x_12, 0, x_1);
  x_13 = l_Lean_Expr_FindImpl_findUnsafe_x3f(x_12, x_11);
  if (lean_obj_tag(x_13) == 0)
  {
  lean_object* x_14; lean_object* x_15; 
  x_14 = lean_box(0);
  x_15 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_15, 0, x_14);
  lean_ctor_set(x_15, 1, x_8);
  return x_15;
  }
  else
  {
  lean_object* x_16; 
  x_16 = lean_ctor_get(x_13, 0);
  lean_inc(x_16);
  lean_dec(x_13);
  if (lean_obj_tag(x_16) == 4)
  {
  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_17 = lean_ctor_get(x_16, 0);
  lean_inc(x_17);
  lean_dec(x_16);
  x_18 = lean_alloc_ctor(4, 1, 0);
  lean_ctor_set(x_18, 0, x_17);
  x_19 = l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__2;
  x_20 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_20, 0, x_19);
  lean_ctor_set(x_20, 1, x_18);
  x_21 = l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__4;
  x_22 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_22, 0, x_20);
  lean_ctor_set(x_22, 1, x_21);
  x_23 = l_Lean_throwError___at_Lean_Meta_setInlineAttribute___spec__1(x_22, x_4, x_5, x_6, x_7, x_8);
  return x_23;
  }
  else
  {
  lean_object* x_24; lean_object* x_25; 
  lean_dec(x_16);
  x_24 = lean_box(0);
  x_25 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_25, 0, x_24);
  lean_ctor_set(x_25, 1, x_8);
  return x_25;
  }
  }
  }
  case 1:
  {
  lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_46; lean_object* x_47; 
  lean_dec(x_3);
  x_26 = lean_ctor_get(x_2, 0);
  lean_inc(x_26);
  lean_dec(x_2);
  x_27 = lean_ctor_get(x_26, 0);
  lean_inc(x_27);
  x_28 = lean_ctor_get(x_26, 1);
  lean_inc(x_28);
  lean_dec(x_26);
  x_29 = lean_ctor_get(x_27, 2);
  lean_inc(x_29);
  lean_dec(x_27);
  lean_inc(x_1);
  x_46 = lean_alloc_closure((void*)(l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___lambda__1___boxed), 2, 1);
  lean_closure_set(x_46, 0, x_1);
  x_47 = l_Lean_Expr_FindImpl_findUnsafe_x3f(x_46, x_29);
  if (lean_obj_tag(x_47) == 0)
  {
  x_30 = x_8;
  goto block_45;
  }
  else
  {
  lean_object* x_48; 
  x_48 = lean_ctor_get(x_47, 0);
  lean_inc(x_48);
  lean_dec(x_47);
  if (lean_obj_tag(x_48) == 4)
  {
  lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; uint8_t x_56; 
  lean_dec(x_28);
  lean_dec(x_1);
  x_49 = lean_ctor_get(x_48, 0);
  lean_inc(x_49);
  lean_dec(x_48);
  x_50 = lean_alloc_ctor(4, 1, 0);
  lean_ctor_set(x_50, 0, x_49);
  x_51 = l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__2;
  x_52 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_52, 0, x_51);
  lean_ctor_set(x_52, 1, x_50);
  x_53 = l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__4;
  x_54 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_54, 0, x_52);
  lean_ctor_set(x_54, 1, x_53);
  x_55 = l_Lean_throwError___at_Lean_Meta_setInlineAttribute___spec__1(x_54, x_4, x_5, x_6, x_7, x_8);
  x_56 = !lean_is_exclusive(x_55);
  if (x_56 == 0)
  {
  return x_55;
  }
  else
  {
  lean_object* x_57; lean_object* x_58; lean_object* x_59; 
  x_57 = lean_ctor_get(x_55, 0);
  x_58 = lean_ctor_get(x_55, 1);
  lean_inc(x_58);
  lean_inc(x_57);
  lean_dec(x_55);
  x_59 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_59, 0, x_57);
  lean_ctor_set(x_59, 1, x_58);
  return x_59;
  }
  }
  else
  {
  lean_dec(x_48);
  x_30 = x_8;
  goto block_45;
  }
  }
  block_45:
  {
  lean_object* x_31; lean_object* x_32; 
  x_31 = lean_alloc_closure((void*)(l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___lambda__1___boxed), 2, 1);
  lean_closure_set(x_31, 0, x_1);
  x_32 = l_Lean_Expr_FindImpl_findUnsafe_x3f(x_31, x_28);
  if (lean_obj_tag(x_32) == 0)
  {
  lean_object* x_33; lean_object* x_34; 
  x_33 = lean_box(0);
  x_34 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_34, 0, x_33);
  lean_ctor_set(x_34, 1, x_30);
  return x_34;
  }
  else
  {
  lean_object* x_35; 
  x_35 = lean_ctor_get(x_32, 0);
  lean_inc(x_35);
  lean_dec(x_32);
  if (lean_obj_tag(x_35) == 4)
  {
  lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; 
  x_36 = lean_ctor_get(x_35, 0);
  lean_inc(x_36);
  lean_dec(x_35);
  x_37 = lean_alloc_ctor(4, 1, 0);
  lean_ctor_set(x_37, 0, x_36);
  x_38 = l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__2;
  x_39 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_39, 0, x_38);
  lean_ctor_set(x_39, 1, x_37);
  x_40 = l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__4;
  x_41 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_41, 0, x_39);
  lean_ctor_set(x_41, 1, x_40);
  x_42 = l_Lean_throwError___at_Lean_Meta_setInlineAttribute___spec__1(x_41, x_4, x_5, x_6, x_7, x_30);
  return x_42;
  }
  else
  {
  lean_object* x_43; lean_object* x_44; 
  lean_dec(x_35);
  x_43 = lean_box(0);
  x_44 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_44, 0, x_43);
  lean_ctor_set(x_44, 1, x_30);
  return x_44;
  }
  }
  }
  }
  case 2:
  {
  lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_80; lean_object* x_81; 
  lean_dec(x_3);
  x_60 = lean_ctor_get(x_2, 0);
  lean_inc(x_60);
  lean_dec(x_2);
  x_61 = lean_ctor_get(x_60, 0);
  lean_inc(x_61);
  x_62 = lean_ctor_get(x_60, 1);
  lean_inc(x_62);
  lean_dec(x_60);
  x_63 = lean_ctor_get(x_61, 2);
  lean_inc(x_63);
  lean_dec(x_61);
  lean_inc(x_1);
  x_80 = lean_alloc_closure((void*)(l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___lambda__1___boxed), 2, 1);
  lean_closure_set(x_80, 0, x_1);
  x_81 = l_Lean_Expr_FindImpl_findUnsafe_x3f(x_80, x_63);
  if (lean_obj_tag(x_81) == 0)
  {
  x_64 = x_8;
  goto block_79;
  }
  else
  {
  lean_object* x_82; 
  x_82 = lean_ctor_get(x_81, 0);
  lean_inc(x_82);
  lean_dec(x_81);
  if (lean_obj_tag(x_82) == 4)
  {
  lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; uint8_t x_90; 
  lean_dec(x_62);
  lean_dec(x_1);
  x_83 = lean_ctor_get(x_82, 0);
  lean_inc(x_83);
  lean_dec(x_82);
  x_84 = lean_alloc_ctor(4, 1, 0);
  lean_ctor_set(x_84, 0, x_83);
  x_85 = l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__2;
  x_86 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_86, 0, x_85);
  lean_ctor_set(x_86, 1, x_84);
  x_87 = l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__4;
  x_88 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_88, 0, x_86);
  lean_ctor_set(x_88, 1, x_87);
  x_89 = l_Lean_throwError___at_Lean_Meta_setInlineAttribute___spec__1(x_88, x_4, x_5, x_6, x_7, x_8);
  x_90 = !lean_is_exclusive(x_89);
  if (x_90 == 0)
  {
  return x_89;
  }
  else
  {
  lean_object* x_91; lean_object* x_92; lean_object* x_93; 
  x_91 = lean_ctor_get(x_89, 0);
  x_92 = lean_ctor_get(x_89, 1);
  lean_inc(x_92);
  lean_inc(x_91);
  lean_dec(x_89);
  x_93 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_93, 0, x_91);
  lean_ctor_set(x_93, 1, x_92);
  return x_93;
  }
  }
  else
  {
  lean_dec(x_82);
  x_64 = x_8;
  goto block_79;
  }
  }
  block_79:
  {
  lean_object* x_65; lean_object* x_66; 
  x_65 = lean_alloc_closure((void*)(l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___lambda__1___boxed), 2, 1);
  lean_closure_set(x_65, 0, x_1);
  x_66 = l_Lean_Expr_FindImpl_findUnsafe_x3f(x_65, x_62);
  if (lean_obj_tag(x_66) == 0)
  {
  lean_object* x_67; lean_object* x_68; 
  x_67 = lean_box(0);
  x_68 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_68, 0, x_67);
  lean_ctor_set(x_68, 1, x_64);
  return x_68;
  }
  else
  {
  lean_object* x_69; 
  x_69 = lean_ctor_get(x_66, 0);
  lean_inc(x_69);
  lean_dec(x_66);
  if (lean_obj_tag(x_69) == 4)
  {
  lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; 
  x_70 = lean_ctor_get(x_69, 0);
  lean_inc(x_70);
  lean_dec(x_69);
  x_71 = lean_alloc_ctor(4, 1, 0);
  lean_ctor_set(x_71, 0, x_70);
  x_72 = l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__2;
  x_73 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_73, 0, x_72);
  lean_ctor_set(x_73, 1, x_71);
  x_74 = l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__4;
  x_75 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_75, 0, x_73);
  lean_ctor_set(x_75, 1, x_74);
  x_76 = l_Lean_throwError___at_Lean_Meta_setInlineAttribute___spec__1(x_75, x_4, x_5, x_6, x_7, x_64);
  return x_76;
  }
  else
  {
  lean_object* x_77; lean_object* x_78; 
  lean_dec(x_69);
  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_64);
  return x_78;
  }
  }
  }
  }
  case 3:
  {
  lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_114; lean_object* x_115; 
  lean_dec(x_3);
  x_94 = lean_ctor_get(x_2, 0);
  lean_inc(x_94);
  lean_dec(x_2);
  x_95 = lean_ctor_get(x_94, 0);
  lean_inc(x_95);
  x_96 = lean_ctor_get(x_94, 1);
  lean_inc(x_96);
  lean_dec(x_94);
  x_97 = lean_ctor_get(x_95, 2);
  lean_inc(x_97);
  lean_dec(x_95);
  lean_inc(x_1);
  x_114 = lean_alloc_closure((void*)(l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___lambda__1___boxed), 2, 1);
  lean_closure_set(x_114, 0, x_1);
  x_115 = l_Lean_Expr_FindImpl_findUnsafe_x3f(x_114, x_97);
  if (lean_obj_tag(x_115) == 0)
  {
  x_98 = x_8;
  goto block_113;
  }
  else
  {
  lean_object* x_116; 
  x_116 = lean_ctor_get(x_115, 0);
  lean_inc(x_116);
  lean_dec(x_115);
  if (lean_obj_tag(x_116) == 4)
  {
  lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; uint8_t x_124; 
  lean_dec(x_96);
  lean_dec(x_1);
  x_117 = lean_ctor_get(x_116, 0);
  lean_inc(x_117);
  lean_dec(x_116);
  x_118 = lean_alloc_ctor(4, 1, 0);
  lean_ctor_set(x_118, 0, x_117);
  x_119 = l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__2;
  x_120 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_120, 0, x_119);
  lean_ctor_set(x_120, 1, x_118);
  x_121 = l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__4;
  x_122 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_122, 0, x_120);
  lean_ctor_set(x_122, 1, x_121);
  x_123 = l_Lean_throwError___at_Lean_Meta_setInlineAttribute___spec__1(x_122, x_4, x_5, x_6, x_7, x_8);
  x_124 = !lean_is_exclusive(x_123);
  if (x_124 == 0)
  {
  return x_123;
  }
  else
  {
  lean_object* x_125; lean_object* x_126; lean_object* x_127; 
  x_125 = lean_ctor_get(x_123, 0);
  x_126 = lean_ctor_get(x_123, 1);
  lean_inc(x_126);
  lean_inc(x_125);
  lean_dec(x_123);
  x_127 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_127, 0, x_125);
  lean_ctor_set(x_127, 1, x_126);
  return x_127;
  }
  }
  else
  {
  lean_dec(x_116);
  x_98 = x_8;
  goto block_113;
  }
  }
  block_113:
  {
  lean_object* x_99; lean_object* x_100; 
  x_99 = lean_alloc_closure((void*)(l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___lambda__1___boxed), 2, 1);
  lean_closure_set(x_99, 0, x_1);
  x_100 = l_Lean_Expr_FindImpl_findUnsafe_x3f(x_99, x_96);
  if (lean_obj_tag(x_100) == 0)
  {
  lean_object* x_101; lean_object* x_102; 
  x_101 = lean_box(0);
  x_102 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_102, 0, x_101);
  lean_ctor_set(x_102, 1, x_98);
  return x_102;
  }
  else
  {
  lean_object* x_103; 
  x_103 = lean_ctor_get(x_100, 0);
  lean_inc(x_103);
  lean_dec(x_100);
  if (lean_obj_tag(x_103) == 4)
  {
  lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; 
  x_104 = lean_ctor_get(x_103, 0);
  lean_inc(x_104);
  lean_dec(x_103);
  x_105 = lean_alloc_ctor(4, 1, 0);
  lean_ctor_set(x_105, 0, x_104);
  x_106 = l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__2;
  x_107 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_107, 0, x_106);
  lean_ctor_set(x_107, 1, x_105);
  x_108 = l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__4;
  x_109 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_109, 0, x_107);
  lean_ctor_set(x_109, 1, x_108);
  x_110 = l_Lean_throwError___at_Lean_Meta_setInlineAttribute___spec__1(x_109, x_4, x_5, x_6, x_7, x_98);
  return x_110;
  }
  else
  {
  lean_object* x_111; lean_object* x_112; 
  lean_dec(x_103);
  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_98);
  return x_112;
  }
  }
  }
  }
  case 4:
  {
  lean_object* x_128; 
  lean_dec(x_1);
  x_128 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_128, 0, x_3);
  lean_ctor_set(x_128, 1, x_8);
  return x_128;
  }
  case 5:
  {
  lean_object* x_129; lean_object* x_130; 
  x_129 = lean_ctor_get(x_2, 0);
  lean_inc(x_129);
  lean_dec(x_2);
  x_130 = l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6(x_1, x_3, x_129, x_4, x_5, x_6, x_7, x_8);
  return x_130;
  }
  default: 
  {
  lean_object* x_131; lean_object* x_132; 
  x_131 = lean_ctor_get(x_2, 2);
  lean_inc(x_131);
  lean_dec(x_2);
  x_132 = l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__8(x_1, x_3, x_131, x_4, x_5, x_6, x_7, x_8);
  return x_132;
  }
  }
  }
  }
  LEAN_EXPORT lean_object* l___private_Lean_MonadEnv_0__Lean_checkUnsupported___at_Lean_Meta_mkAuxDefinition___spec__4(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
  _start:
  {
  lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; 
  x_7 = lean_st_ref_get(x_5, x_6);
  x_8 = lean_ctor_get(x_7, 0);
  lean_inc(x_8);
  x_9 = lean_ctor_get(x_7, 1);
  lean_inc(x_9);
  lean_dec(x_7);
  x_10 = lean_ctor_get(x_8, 0);
  lean_inc(x_10);
  lean_dec(x_8);
  x_11 = lean_box(0);
  x_12 = l_Lean_Declaration_foldExprM___at_Lean_Meta_mkAuxDefinition___spec__5(x_10, x_1, x_11, x_2, x_3, x_4, x_5, x_9);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  return x_12;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_compileDecl___at_Lean_Meta_mkAuxDefinition___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
  _start:
  {
  lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; 
  x_7 = lean_st_ref_get(x_5, x_6);
  x_8 = lean_ctor_get(x_7, 0);
  lean_inc(x_8);
  x_9 = lean_ctor_get(x_7, 1);
  lean_inc(x_9);
  lean_dec(x_7);
  x_10 = lean_ctor_get(x_8, 0);
  lean_inc(x_10);
  lean_dec(x_8);
  x_11 = lean_ctor_get(x_4, 0);
  lean_inc(x_11);
  x_12 = lean_compile_decl(x_10, x_11, x_1);
  lean_dec(x_11);
  if (lean_obj_tag(x_12) == 0)
  {
  lean_object* x_13; 
  x_13 = lean_ctor_get(x_12, 0);
  lean_inc(x_13);
  lean_dec(x_12);
  if (lean_obj_tag(x_13) == 11)
  {
  lean_object* x_14; lean_object* x_15; 
  x_14 = lean_ctor_get(x_13, 0);
  lean_inc(x_14);
  lean_dec(x_13);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_3);
  lean_inc(x_2);
  x_15 = l___private_Lean_MonadEnv_0__Lean_checkUnsupported___at_Lean_Meta_mkAuxDefinition___spec__4(x_1, x_2, x_3, x_4, x_5, x_9);
  if (lean_obj_tag(x_15) == 0)
  {
  lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; 
  x_16 = lean_ctor_get(x_15, 1);
  lean_inc(x_16);
  lean_dec(x_15);
  x_17 = lean_alloc_ctor(2, 1, 0);
  lean_ctor_set(x_17, 0, x_14);
  x_18 = lean_alloc_ctor(0, 1, 0);
  lean_ctor_set(x_18, 0, x_17);
  x_19 = l_Lean_throwError___at_Lean_Meta_setInlineAttribute___spec__1(x_18, x_2, x_3, x_4, x_5, x_16);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  return x_19;
  }
  else
  {
  uint8_t x_20; 
  lean_dec(x_14);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_20 = !lean_is_exclusive(x_15);
  if (x_20 == 0)
  {
  return x_15;
  }
  else
  {
  lean_object* x_21; lean_object* x_22; lean_object* x_23; 
  x_21 = lean_ctor_get(x_15, 0);
  x_22 = lean_ctor_get(x_15, 1);
  lean_inc(x_22);
  lean_inc(x_21);
  lean_dec(x_15);
  x_23 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_23, 0, x_21);
  lean_ctor_set(x_23, 1, x_22);
  return x_23;
  }
  }
  }
  else
  {
  lean_object* x_24; 
  lean_dec(x_1);
  x_24 = l_Lean_throwKernelException___at_Lean_Meta_mkAuxDefinition___spec__2(x_13, x_2, x_3, x_4, x_5, x_9);
  lean_dec(x_5);
  lean_dec(x_3);
  lean_dec(x_2);
  return x_24;
  }
  }
  else
  {
  lean_object* x_25; lean_object* x_26; 
  lean_dec(x_1);
  x_25 = lean_ctor_get(x_12, 0);
  lean_inc(x_25);
  lean_dec(x_12);
  x_26 = l_Lean_setEnv___at_Lean_Meta_setInlineAttribute___spec__2(x_25, x_2, x_3, x_4, x_5, x_9);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  return x_26;
  }
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_mkAuxDefinition___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
  _start:
  {
  lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; 
  x_9 = lean_ctor_get(x_1, 3);
  lean_inc(x_9);
  x_10 = lean_array_to_list(lean_box(0), x_9);
  x_11 = l_Lean_mkConst(x_2, x_10);
  x_12 = lean_ctor_get(x_1, 4);
  lean_inc(x_12);
  lean_dec(x_1);
  x_13 = l_Lean_mkAppN(x_11, x_12);
  x_14 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_14, 0, x_13);
  lean_ctor_set(x_14, 1, x_8);
  return x_14;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_mkAuxDefinition___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, uint8_t 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) {
  _start:
  {
  lean_object* x_11; 
  lean_dec(x_5);
  lean_inc(x_8);
  lean_inc(x_1);
  x_11 = l_Lean_addDecl___at_Lean_Meta_mkAuxDefinition___spec__1(x_1, x_6, x_7, x_8, x_9, x_10);
  if (lean_obj_tag(x_11) == 0)
  {
  if (x_4 == 0)
  {
  lean_object* x_12; lean_object* x_13; lean_object* x_14; 
  lean_dec(x_1);
  x_12 = lean_ctor_get(x_11, 1);
  lean_inc(x_12);
  lean_dec(x_11);
  x_13 = lean_box(0);
  x_14 = l_Lean_Meta_mkAuxDefinition___lambda__1(x_2, x_3, x_13, x_6, x_7, x_8, x_9, x_12);
  lean_dec(x_9);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  return x_14;
  }
  else
  {
  lean_object* x_15; lean_object* x_16; 
  x_15 = lean_ctor_get(x_11, 1);
  lean_inc(x_15);
  lean_dec(x_11);
  lean_inc(x_9);
  lean_inc(x_8);
  lean_inc(x_7);
  lean_inc(x_6);
  x_16 = l_Lean_compileDecl___at_Lean_Meta_mkAuxDefinition___spec__3(x_1, x_6, x_7, x_8, x_9, x_15);
  if (lean_obj_tag(x_16) == 0)
  {
  lean_object* x_17; lean_object* x_18; lean_object* x_19; 
  x_17 = lean_ctor_get(x_16, 0);
  lean_inc(x_17);
  x_18 = lean_ctor_get(x_16, 1);
  lean_inc(x_18);
  lean_dec(x_16);
  x_19 = l_Lean_Meta_mkAuxDefinition___lambda__1(x_2, x_3, x_17, x_6, x_7, x_8, x_9, x_18);
  lean_dec(x_9);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_17);
  return x_19;
  }
  else
  {
  uint8_t x_20; 
  lean_dec(x_9);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_3);
  lean_dec(x_2);
  x_20 = !lean_is_exclusive(x_16);
  if (x_20 == 0)
  {
  return x_16;
  }
  else
  {
  lean_object* x_21; lean_object* x_22; lean_object* x_23; 
  x_21 = lean_ctor_get(x_16, 0);
  x_22 = lean_ctor_get(x_16, 1);
  lean_inc(x_22);
  lean_inc(x_21);
  lean_dec(x_16);
  x_23 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_23, 0, x_21);
  lean_ctor_set(x_23, 1, x_22);
  return x_23;
  }
  }
  }
  }
  else
  {
  uint8_t x_24; 
  lean_dec(x_9);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_24 = !lean_is_exclusive(x_11);
  if (x_24 == 0)
  {
  return x_11;
  }
  else
  {
  lean_object* x_25; lean_object* x_26; lean_object* x_27; 
  x_25 = lean_ctor_get(x_11, 0);
  x_26 = lean_ctor_get(x_11, 1);
  lean_inc(x_26);
  lean_inc(x_25);
  lean_dec(x_11);
  x_27 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_27, 0, x_25);
  lean_ctor_set(x_27, 1, x_26);
  return x_27;
  }
  }
  }
  }
  static lean_object* _init_l_Lean_Meta_mkAuxDefinition___lambda__3___closed__1() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Meta_mkAuxDefinition___lambda__3___closed__2() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; 
  x_1 = l_Lean_Meta_mkAuxDefinition___lambda__3___closed__1;
  x_2 = l_Lean_stringToMessageData(x_1);
  return x_2;
  }
  }
  static lean_object* _init_l_Lean_Meta_mkAuxDefinition___lambda__3___closed__3() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string(" : ");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Meta_mkAuxDefinition___lambda__3___closed__4() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; 
  x_1 = l_Lean_Meta_mkAuxDefinition___lambda__3___closed__3;
  x_2 = l_Lean_stringToMessageData(x_1);
  return x_2;
  }
  }
  static lean_object* _init_l_Lean_Meta_mkAuxDefinition___lambda__3___closed__5() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string(" := ");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Meta_mkAuxDefinition___lambda__3___closed__6() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; 
  x_1 = l_Lean_Meta_mkAuxDefinition___lambda__3___closed__5;
  x_2 = l_Lean_stringToMessageData(x_1);
  return x_2;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_mkAuxDefinition___lambda__3(lean_object* x_1, lean_object* x_2, uint8_t x_3, lean_object* x_4, uint8_t x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) {
  _start:
  {
  lean_object* x_13; 
  lean_dec(x_7);
  lean_inc(x_11);
  lean_inc(x_10);
  lean_inc(x_9);
  lean_inc(x_8);
  x_13 = l_Lean_Meta_Closure_mkValueTypeClosure(x_1, x_2, x_3, x_8, x_9, x_10, x_11, 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_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; uint32_t x_26; uint32_t x_27; uint32_t x_28; lean_object* x_29; uint8_t x_30; lean_object* x_31; uint8_t x_32; 
  x_14 = lean_ctor_get(x_13, 0);
  lean_inc(x_14);
  x_15 = lean_ctor_get(x_13, 1);
  lean_inc(x_15);
  lean_dec(x_13);
  x_16 = lean_st_ref_get(x_11, x_15);
  x_17 = lean_ctor_get(x_16, 0);
  lean_inc(x_17);
  x_18 = lean_ctor_get(x_16, 1);
  lean_inc(x_18);
  lean_dec(x_16);
  x_19 = lean_ctor_get(x_17, 0);
  lean_inc(x_19);
  lean_dec(x_17);
  x_20 = lean_ctor_get(x_14, 0);
  lean_inc(x_20);
  x_21 = lean_array_to_list(lean_box(0), x_20);
  x_22 = lean_ctor_get(x_14, 1);
  lean_inc(x_22);
  lean_inc(x_22);
  lean_inc(x_4);
  x_23 = lean_alloc_ctor(0, 3, 0);
  lean_ctor_set(x_23, 0, x_4);
  lean_ctor_set(x_23, 1, x_21);
  lean_ctor_set(x_23, 2, x_22);
  x_24 = lean_ctor_get(x_14, 2);
  lean_inc(x_24);
  lean_inc(x_24);
  lean_inc(x_19);
  x_25 = l_Lean_getMaxHeight(x_19, x_24);
  x_26 = lean_unbox_uint32(x_25);
  lean_dec(x_25);
  x_27 = 1;
  x_28 = lean_uint32_add(x_26, x_27);
  x_29 = lean_alloc_ctor(2, 0, 4);
  lean_ctor_set_uint32(x_29, 0, x_28);
  lean_inc(x_22);
  lean_inc(x_19);
  x_30 = l_Lean_Environment_hasUnsafe(x_19, x_22);
  x_31 = lean_st_ref_get(x_11, x_18);
  if (x_30 == 0)
  {
  uint8_t x_67; 
  lean_inc(x_24);
  x_67 = l_Lean_Environment_hasUnsafe(x_19, x_24);
  if (x_67 == 0)
  {
  uint8_t x_68; 
  x_68 = 1;
  x_32 = x_68;
  goto block_66;
  }
  else
  {
  uint8_t x_69; 
  x_69 = 0;
  x_32 = x_69;
  goto block_66;
  }
  }
  else
  {
  uint8_t x_70; 
  lean_dec(x_19);
  x_70 = 0;
  x_32 = x_70;
  goto block_66;
  }
  block_66:
  {
  lean_object* x_33; lean_object* x_34; uint8_t x_35; lean_object* x_36; lean_object* x_56; lean_object* x_57; uint8_t x_58; 
  lean_inc(x_24);
  x_33 = lean_alloc_ctor(0, 3, 1);
  lean_ctor_set(x_33, 0, x_23);
  lean_ctor_set(x_33, 1, x_24);
  lean_ctor_set(x_33, 2, x_29);
  lean_ctor_set_uint8(x_33, sizeof(void*)*3, x_32);
  x_34 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_34, 0, x_33);
  x_56 = lean_ctor_get(x_31, 0);
  lean_inc(x_56);
  x_57 = lean_ctor_get(x_56, 3);
  lean_inc(x_57);
  lean_dec(x_56);
  x_58 = lean_ctor_get_uint8(x_57, sizeof(void*)*1);
  lean_dec(x_57);
  if (x_58 == 0)
  {
  lean_object* x_59; uint8_t x_60; 
  x_59 = lean_ctor_get(x_31, 1);
  lean_inc(x_59);
  lean_dec(x_31);
  x_60 = 0;
  x_35 = x_60;
  x_36 = x_59;
  goto block_55;
  }
  else
  {
  lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; uint8_t x_65; 
  x_61 = lean_ctor_get(x_31, 1);
  lean_inc(x_61);
  lean_dec(x_31);
  lean_inc(x_6);
  x_62 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Meta_Basic_0__Lean_Meta_processPostponedStep___spec__13(x_6, x_8, x_9, x_10, x_11, x_61);
  x_63 = lean_ctor_get(x_62, 0);
  lean_inc(x_63);
  x_64 = lean_ctor_get(x_62, 1);
  lean_inc(x_64);
  lean_dec(x_62);
  x_65 = lean_unbox(x_63);
  lean_dec(x_63);
  x_35 = x_65;
  x_36 = x_64;
  goto block_55;
  }
  block_55:
  {
  if (x_35 == 0)
  {
  lean_object* x_37; lean_object* x_38; 
  lean_dec(x_24);
  lean_dec(x_22);
  lean_dec(x_6);
  x_37 = lean_box(0);
  x_38 = l_Lean_Meta_mkAuxDefinition___lambda__2(x_34, x_14, x_4, x_5, x_37, x_8, x_9, x_10, x_11, x_36);
  return x_38;
  }
  else
  {
  lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; 
  lean_inc(x_4);
  x_39 = lean_alloc_ctor(4, 1, 0);
  lean_ctor_set(x_39, 0, x_4);
  x_40 = l_Lean_Meta_mkAuxDefinition___lambda__3___closed__2;
  x_41 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_41, 0, x_40);
  lean_ctor_set(x_41, 1, x_39);
  x_42 = l_Lean_Meta_mkAuxDefinition___lambda__3___closed__4;
  x_43 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_43, 0, x_41);
  lean_ctor_set(x_43, 1, x_42);
  x_44 = lean_alloc_ctor(2, 1, 0);
  lean_ctor_set(x_44, 0, x_22);
  x_45 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_45, 0, x_43);
  lean_ctor_set(x_45, 1, x_44);
  x_46 = l_Lean_Meta_mkAuxDefinition___lambda__3___closed__6;
  x_47 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_47, 0, x_45);
  lean_ctor_set(x_47, 1, x_46);
  x_48 = lean_alloc_ctor(2, 1, 0);
  lean_ctor_set(x_48, 0, x_24);
  x_49 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_49, 0, x_47);
  lean_ctor_set(x_49, 1, x_48);
  x_50 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_50, 0, x_49);
  lean_ctor_set(x_50, 1, x_40);
  x_51 = l_Lean_addTrace___at_Lean_Meta_processPostponed_loop___spec__1(x_6, x_50, x_8, x_9, x_10, x_11, x_36);
  x_52 = lean_ctor_get(x_51, 0);
  lean_inc(x_52);
  x_53 = lean_ctor_get(x_51, 1);
  lean_inc(x_53);
  lean_dec(x_51);
  x_54 = l_Lean_Meta_mkAuxDefinition___lambda__2(x_34, x_14, x_4, x_5, x_52, x_8, x_9, x_10, x_11, x_53);
  return x_54;
  }
  }
  }
  }
  else
  {
  uint8_t x_71; 
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(x_9);
  lean_dec(x_8);
  lean_dec(x_6);
  lean_dec(x_4);
  x_71 = !lean_is_exclusive(x_13);
  if (x_71 == 0)
  {
  return x_13;
  }
  else
  {
  lean_object* x_72; lean_object* x_73; lean_object* x_74; 
  x_72 = lean_ctor_get(x_13, 0);
  x_73 = lean_ctor_get(x_13, 1);
  lean_inc(x_73);
  lean_inc(x_72);
  lean_dec(x_13);
  x_74 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_74, 0, x_72);
  lean_ctor_set(x_74, 1, x_73);
  return x_74;
  }
  }
  }
  }
  static lean_object* _init_l_Lean_Meta_mkAuxDefinition___closed__1() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("Meta");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Meta_mkAuxDefinition___closed__2() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; 
  x_1 = lean_box(0);
  x_2 = l_Lean_Meta_mkAuxDefinition___closed__1;
  x_3 = lean_name_mk_string(x_1, x_2);
  return x_3;
  }
  }
  static lean_object* _init_l_Lean_Meta_mkAuxDefinition___closed__3() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("debug");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Meta_mkAuxDefinition___closed__4() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; 
  x_1 = l_Lean_Meta_mkAuxDefinition___closed__2;
  x_2 = l_Lean_Meta_mkAuxDefinition___closed__3;
  x_3 = lean_name_mk_string(x_1, x_2);
  return x_3;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_mkAuxDefinition(lean_object* x_1, lean_object* x_2, lean_object* x_3, uint8_t x_4, uint8_t x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) {
  _start:
  {
  lean_object* x_11; uint8_t x_12; lean_object* x_13; lean_object* x_33; lean_object* x_34; lean_object* x_35; uint8_t x_36; 
  x_11 = l_Lean_Meta_mkAuxDefinition___closed__4;
  x_33 = lean_st_ref_get(x_9, x_10);
  x_34 = lean_ctor_get(x_33, 0);
  lean_inc(x_34);
  x_35 = lean_ctor_get(x_34, 3);
  lean_inc(x_35);
  lean_dec(x_34);
  x_36 = lean_ctor_get_uint8(x_35, sizeof(void*)*1);
  lean_dec(x_35);
  if (x_36 == 0)
  {
  lean_object* x_37; uint8_t x_38; 
  x_37 = lean_ctor_get(x_33, 1);
  lean_inc(x_37);
  lean_dec(x_33);
  x_38 = 0;
  x_12 = x_38;
  x_13 = x_37;
  goto block_32;
  }
  else
  {
  lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; uint8_t x_43; 
  x_39 = lean_ctor_get(x_33, 1);
  lean_inc(x_39);
  lean_dec(x_33);
  x_40 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Meta_Basic_0__Lean_Meta_processPostponedStep___spec__13(x_11, x_6, x_7, x_8, x_9, x_39);
  x_41 = lean_ctor_get(x_40, 0);
  lean_inc(x_41);
  x_42 = lean_ctor_get(x_40, 1);
  lean_inc(x_42);
  lean_dec(x_40);
  x_43 = lean_unbox(x_41);
  lean_dec(x_41);
  x_12 = x_43;
  x_13 = x_42;
  goto block_32;
  }
  block_32:
  {
  if (x_12 == 0)
  {
  lean_object* x_14; lean_object* x_15; 
  x_14 = lean_box(0);
  x_15 = l_Lean_Meta_mkAuxDefinition___lambda__3(x_2, x_3, x_4, x_1, x_5, x_11, x_14, x_6, x_7, x_8, x_9, x_13);
  return x_15;
  }
  else
  {
  lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; 
  lean_inc(x_1);
  x_16 = lean_alloc_ctor(4, 1, 0);
  lean_ctor_set(x_16, 0, x_1);
  x_17 = l_Lean_Meta_mkAuxDefinition___lambda__3___closed__2;
  x_18 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_18, 0, x_17);
  lean_ctor_set(x_18, 1, x_16);
  x_19 = l_Lean_Meta_mkAuxDefinition___lambda__3___closed__4;
  x_20 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_20, 0, x_18);
  lean_ctor_set(x_20, 1, x_19);
  lean_inc(x_2);
  x_21 = lean_alloc_ctor(2, 1, 0);
  lean_ctor_set(x_21, 0, x_2);
  x_22 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_22, 0, x_20);
  lean_ctor_set(x_22, 1, x_21);
  x_23 = l_Lean_Meta_mkAuxDefinition___lambda__3___closed__6;
  x_24 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_24, 0, x_22);
  lean_ctor_set(x_24, 1, x_23);
  lean_inc(x_3);
  x_25 = lean_alloc_ctor(2, 1, 0);
  lean_ctor_set(x_25, 0, x_3);
  x_26 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_26, 0, x_24);
  lean_ctor_set(x_26, 1, x_25);
  x_27 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_27, 0, x_26);
  lean_ctor_set(x_27, 1, x_17);
  x_28 = l_Lean_addTrace___at_Lean_Meta_processPostponed_loop___spec__1(x_11, x_27, x_6, x_7, x_8, x_9, x_13);
  x_29 = lean_ctor_get(x_28, 0);
  lean_inc(x_29);
  x_30 = lean_ctor_get(x_28, 1);
  lean_inc(x_30);
  lean_dec(x_28);
  x_31 = l_Lean_Meta_mkAuxDefinition___lambda__3(x_2, x_3, x_4, x_1, x_5, x_11, x_29, x_6, x_7, x_8, x_9, x_30);
  return x_31;
  }
  }
  }
  }
  LEAN_EXPORT lean_object* l_Lean_throwKernelException___at_Lean_Meta_mkAuxDefinition___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
  _start:
  {
  lean_object* x_7; 
  x_7 = l_Lean_throwKernelException___at_Lean_Meta_mkAuxDefinition___spec__2(x_1, x_2, x_3, x_4, x_5, x_6);
  lean_dec(x_5);
  lean_dec(x_3);
  lean_dec(x_2);
  return x_7;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_addDecl___at_Lean_Meta_mkAuxDefinition___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:
  {
  lean_object* x_7; 
  x_7 = l_Lean_addDecl___at_Lean_Meta_mkAuxDefinition___spec__1(x_1, x_2, x_3, x_4, x_5, x_6);
  lean_dec(x_5);
  lean_dec(x_3);
  lean_dec(x_2);
  return x_7;
  }
  }
  LEAN_EXPORT lean_object* l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___lambda__1___boxed(lean_object* x_1, lean_object* x_2) {
  _start:
  {
  uint8_t x_3; lean_object* x_4; 
  x_3 = l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___lambda__1(x_1, x_2);
  x_4 = lean_box(x_3);
  return x_4;
  }
  }
  LEAN_EXPORT lean_object* l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
  _start:
  {
  lean_object* x_9; 
  x_9 = l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  return x_9;
  }
  }
  LEAN_EXPORT lean_object* l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__7___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
  _start:
  {
  lean_object* x_9; 
  x_9 = l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__7(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  return x_9;
  }
  }
  LEAN_EXPORT lean_object* l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__8___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
  _start:
  {
  lean_object* x_9; 
  x_9 = l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__8(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  return x_9;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Declaration_foldExprM___at_Lean_Meta_mkAuxDefinition___spec__5___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
  _start:
  {
  lean_object* x_9; 
  x_9 = l_Lean_Declaration_foldExprM___at_Lean_Meta_mkAuxDefinition___spec__5(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  return x_9;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_mkAuxDefinition___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
  _start:
  {
  lean_object* x_9; 
  x_9 = l_Lean_Meta_mkAuxDefinition___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  return x_9;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_mkAuxDefinition___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) {
  _start:
  {
  uint8_t x_11; lean_object* x_12; 
  x_11 = lean_unbox(x_4);
  lean_dec(x_4);
  x_12 = l_Lean_Meta_mkAuxDefinition___lambda__2(x_1, x_2, x_3, x_11, x_5, x_6, x_7, x_8, x_9, x_10);
  return x_12;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_mkAuxDefinition___lambda__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) {
  _start:
  {
  uint8_t x_13; uint8_t x_14; lean_object* x_15; 
  x_13 = lean_unbox(x_3);
  lean_dec(x_3);
  x_14 = lean_unbox(x_5);
  lean_dec(x_5);
  x_15 = l_Lean_Meta_mkAuxDefinition___lambda__3(x_1, x_2, x_13, x_4, x_14, x_6, x_7, x_8, x_9, x_10, x_11, x_12);
  return x_15;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_mkAuxDefinition___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) {
  _start:
  {
  uint8_t x_11; uint8_t x_12; lean_object* x_13; 
  x_11 = lean_unbox(x_4);
  lean_dec(x_4);
  x_12 = lean_unbox(x_5);
  lean_dec(x_5);
  x_13 = l_Lean_Meta_mkAuxDefinition(x_1, x_2, x_3, x_11, x_12, x_6, x_7, x_8, x_9, x_10);
  return x_13;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_mkAuxDefinitionFor(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* x_7, lean_object* x_8) {
  _start:
  {
  lean_object* x_9; 
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_2);
  x_9 = lean_infer_type(x_2, x_4, x_5, x_6, x_7, x_8);
  if (lean_obj_tag(x_9) == 0)
  {
  lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; lean_object* x_14; 
  x_10 = lean_ctor_get(x_9, 0);
  lean_inc(x_10);
  x_11 = lean_ctor_get(x_9, 1);
  lean_inc(x_11);
  lean_dec(x_9);
  x_12 = l_Lean_Expr_headBeta(x_10);
  x_13 = 1;
  x_14 = l_Lean_Meta_mkAuxDefinition(x_1, x_12, x_2, x_3, x_13, x_4, x_5, x_6, x_7, x_11);
  return x_14;
  }
  else
  {
  uint8_t x_15; 
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_2);
  lean_dec(x_1);
  x_15 = !lean_is_exclusive(x_9);
  if (x_15 == 0)
  {
  return x_9;
  }
  else
  {
  lean_object* x_16; lean_object* x_17; lean_object* x_18; 
  x_16 = lean_ctor_get(x_9, 0);
  x_17 = lean_ctor_get(x_9, 1);
  lean_inc(x_17);
  lean_inc(x_16);
  lean_dec(x_9);
  x_18 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_18, 0, x_16);
  lean_ctor_set(x_18, 1, x_17);
  return x_18;
  }
  }
  }
  }
  LEAN_EXPORT lean_object* l_Lean_Meta_mkAuxDefinitionFor___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
  _start:
  {
  uint8_t x_9; lean_object* x_10; 
  x_9 = lean_unbox(x_3);
  lean_dec(x_3);
  x_10 = l_Lean_Meta_mkAuxDefinitionFor(x_1, x_2, x_9, x_4, x_5, x_6, x_7, x_8);
  return x_10;
  }
  }
  lean_object* initialize_Init(uint8_t builtin, lean_object*);
  lean_object* initialize_Std_ShareCommon(uint8_t builtin, lean_object*);
  lean_object* initialize_Lean_MetavarContext(uint8_t builtin, lean_object*);
  lean_object* initialize_Lean_Environment(uint8_t builtin, lean_object*);
  lean_object* initialize_Lean_Util_FoldConsts(uint8_t builtin, lean_object*);
  lean_object* initialize_Lean_Meta_Basic(uint8_t builtin, lean_object*);
  lean_object* initialize_Lean_Meta_Check(uint8_t builtin, lean_object*);
  static bool _G_initialized = false;
  LEAN_EXPORT lean_object* initialize_Lean_Meta_Closure(uint8_t builtin, lean_object* w) {
  lean_object * res;
  if (_G_initialized) return lean_io_result_mk_ok(lean_box(0));
  _G_initialized = true;
  res = initialize_Init(builtin, lean_io_mk_world());
  if (lean_io_result_is_error(res)) return res;
  lean_dec_ref(res);
  res = initialize_Std_ShareCommon(builtin, lean_io_mk_world());
  if (lean_io_result_is_error(res)) return res;
  lean_dec_ref(res);
  res = initialize_Lean_MetavarContext(builtin, lean_io_mk_world());
  if (lean_io_result_is_error(res)) return res;
  lean_dec_ref(res);
  res = initialize_Lean_Environment(builtin, lean_io_mk_world());
  if (lean_io_result_is_error(res)) return res;
  lean_dec_ref(res);
  res = initialize_Lean_Util_FoldConsts(builtin, lean_io_mk_world());
  if (lean_io_result_is_error(res)) return res;
  lean_dec_ref(res);
  res = initialize_Lean_Meta_Basic(builtin, lean_io_mk_world());
  if (lean_io_result_is_error(res)) return res;
  lean_dec_ref(res);
  res = initialize_Lean_Meta_Check(builtin, lean_io_mk_world());
  if (lean_io_result_is_error(res)) return res;
  lean_dec_ref(res);
  l_Lean_Meta_Closure_instInhabitedToProcessElement___closed__1 = _init_l_Lean_Meta_Closure_instInhabitedToProcessElement___closed__1();
  lean_mark_persistent(l_Lean_Meta_Closure_instInhabitedToProcessElement___closed__1);
  l_Lean_Meta_Closure_instInhabitedToProcessElement = _init_l_Lean_Meta_Closure_instInhabitedToProcessElement();
  lean_mark_persistent(l_Lean_Meta_Closure_instInhabitedToProcessElement);
  l_Lean_Meta_Closure_State_visitedLevel___default = _init_l_Lean_Meta_Closure_State_visitedLevel___default();
  lean_mark_persistent(l_Lean_Meta_Closure_State_visitedLevel___default);
  l_Lean_Meta_Closure_State_visitedExpr___default___closed__1 = _init_l_Lean_Meta_Closure_State_visitedExpr___default___closed__1();
  lean_mark_persistent(l_Lean_Meta_Closure_State_visitedExpr___default___closed__1);
  l_Lean_Meta_Closure_State_visitedExpr___default = _init_l_Lean_Meta_Closure_State_visitedExpr___default();
  lean_mark_persistent(l_Lean_Meta_Closure_State_visitedExpr___default);
  l_Lean_Meta_Closure_State_levelParams___default___closed__1 = _init_l_Lean_Meta_Closure_State_levelParams___default___closed__1();
  lean_mark_persistent(l_Lean_Meta_Closure_State_levelParams___default___closed__1);
  l_Lean_Meta_Closure_State_levelParams___default = _init_l_Lean_Meta_Closure_State_levelParams___default();
  lean_mark_persistent(l_Lean_Meta_Closure_State_levelParams___default);
  l_Lean_Meta_Closure_State_nextLevelIdx___default = _init_l_Lean_Meta_Closure_State_nextLevelIdx___default();
  lean_mark_persistent(l_Lean_Meta_Closure_State_nextLevelIdx___default);
  l_Lean_Meta_Closure_State_levelArgs___default = _init_l_Lean_Meta_Closure_State_levelArgs___default();
  lean_mark_persistent(l_Lean_Meta_Closure_State_levelArgs___default);
  l_Lean_Meta_Closure_State_newLocalDecls___default = _init_l_Lean_Meta_Closure_State_newLocalDecls___default();
  lean_mark_persistent(l_Lean_Meta_Closure_State_newLocalDecls___default);
  l_Lean_Meta_Closure_State_newLocalDeclsForMVars___default = _init_l_Lean_Meta_Closure_State_newLocalDeclsForMVars___default();
  lean_mark_persistent(l_Lean_Meta_Closure_State_newLocalDeclsForMVars___default);
  l_Lean_Meta_Closure_State_newLetDecls___default = _init_l_Lean_Meta_Closure_State_newLetDecls___default();
  lean_mark_persistent(l_Lean_Meta_Closure_State_newLetDecls___default);
  l_Lean_Meta_Closure_State_nextExprIdx___default = _init_l_Lean_Meta_Closure_State_nextExprIdx___default();
  lean_mark_persistent(l_Lean_Meta_Closure_State_nextExprIdx___default);
  l_Lean_Meta_Closure_State_exprMVarArgs___default = _init_l_Lean_Meta_Closure_State_exprMVarArgs___default();
  lean_mark_persistent(l_Lean_Meta_Closure_State_exprMVarArgs___default);
  l_Lean_Meta_Closure_State_exprFVarArgs___default = _init_l_Lean_Meta_Closure_State_exprFVarArgs___default();
  lean_mark_persistent(l_Lean_Meta_Closure_State_exprFVarArgs___default);
  l_Lean_Meta_Closure_State_toProcess___default = _init_l_Lean_Meta_Closure_State_toProcess___default();
  lean_mark_persistent(l_Lean_Meta_Closure_State_toProcess___default);
  l_Lean_Meta_Closure_mkNewLevelParam___closed__1 = _init_l_Lean_Meta_Closure_mkNewLevelParam___closed__1();
  lean_mark_persistent(l_Lean_Meta_Closure_mkNewLevelParam___closed__1);
  l_Lean_Meta_Closure_mkNewLevelParam___closed__2 = _init_l_Lean_Meta_Closure_mkNewLevelParam___closed__2();
  lean_mark_persistent(l_Lean_Meta_Closure_mkNewLevelParam___closed__2);
  l_Lean_Meta_Closure_collectLevelAux___closed__1 = _init_l_Lean_Meta_Closure_collectLevelAux___closed__1();
  lean_mark_persistent(l_Lean_Meta_Closure_collectLevelAux___closed__1);
  l_Lean_Meta_Closure_collectLevelAux___closed__2 = _init_l_Lean_Meta_Closure_collectLevelAux___closed__2();
  lean_mark_persistent(l_Lean_Meta_Closure_collectLevelAux___closed__2);
  l_Lean_Meta_Closure_collectLevelAux___closed__3 = _init_l_Lean_Meta_Closure_collectLevelAux___closed__3();
  lean_mark_persistent(l_Lean_Meta_Closure_collectLevelAux___closed__3);
  l_Lean_Meta_Closure_collectLevelAux___closed__4 = _init_l_Lean_Meta_Closure_collectLevelAux___closed__4();
  lean_mark_persistent(l_Lean_Meta_Closure_collectLevelAux___closed__4);
  l_Lean_Meta_Closure_collectLevelAux___closed__5 = _init_l_Lean_Meta_Closure_collectLevelAux___closed__5();
  lean_mark_persistent(l_Lean_Meta_Closure_collectLevelAux___closed__5);
  l_Lean_Meta_Closure_collectLevelAux___closed__6 = _init_l_Lean_Meta_Closure_collectLevelAux___closed__6();
  lean_mark_persistent(l_Lean_Meta_Closure_collectLevelAux___closed__6);
  l_Lean_Meta_Closure_collectLevelAux___closed__7 = _init_l_Lean_Meta_Closure_collectLevelAux___closed__7();
  lean_mark_persistent(l_Lean_Meta_Closure_collectLevelAux___closed__7);
  l_Lean_Meta_Closure_collectLevelAux___closed__8 = _init_l_Lean_Meta_Closure_collectLevelAux___closed__8();
  lean_mark_persistent(l_Lean_Meta_Closure_collectLevelAux___closed__8);
  l_Lean_Meta_Closure_collectLevelAux___closed__9 = _init_l_Lean_Meta_Closure_collectLevelAux___closed__9();
  lean_mark_persistent(l_Lean_Meta_Closure_collectLevelAux___closed__9);
  l_Lean_Meta_Closure_collectLevelAux___closed__10 = _init_l_Lean_Meta_Closure_collectLevelAux___closed__10();
  lean_mark_persistent(l_Lean_Meta_Closure_collectLevelAux___closed__10);
  l_Lean_Meta_Closure_mkNextUserName___rarg___closed__1 = _init_l_Lean_Meta_Closure_mkNextUserName___rarg___closed__1();
  lean_mark_persistent(l_Lean_Meta_Closure_mkNextUserName___rarg___closed__1);
  l_Lean_Meta_Closure_mkNextUserName___rarg___closed__2 = _init_l_Lean_Meta_Closure_mkNextUserName___rarg___closed__2();
  lean_mark_persistent(l_Lean_Meta_Closure_mkNextUserName___rarg___closed__2);
  l_Lean_Meta_Closure_collectExprAux___closed__1 = _init_l_Lean_Meta_Closure_collectExprAux___closed__1();
  lean_mark_persistent(l_Lean_Meta_Closure_collectExprAux___closed__1);
  l_Lean_Meta_Closure_collectExprAux___closed__2 = _init_l_Lean_Meta_Closure_collectExprAux___closed__2();
  lean_mark_persistent(l_Lean_Meta_Closure_collectExprAux___closed__2);
  l_Lean_Meta_Closure_collectExprAux___closed__3 = _init_l_Lean_Meta_Closure_collectExprAux___closed__3();
  lean_mark_persistent(l_Lean_Meta_Closure_collectExprAux___closed__3);
  l_Lean_Meta_Closure_collectExprAux___closed__4 = _init_l_Lean_Meta_Closure_collectExprAux___closed__4();
  lean_mark_persistent(l_Lean_Meta_Closure_collectExprAux___closed__4);
  l_Lean_Meta_Closure_collectExprAux___closed__5 = _init_l_Lean_Meta_Closure_collectExprAux___closed__5();
  lean_mark_persistent(l_Lean_Meta_Closure_collectExprAux___closed__5);
  l_Lean_Meta_Closure_collectExprAux___closed__6 = _init_l_Lean_Meta_Closure_collectExprAux___closed__6();
  lean_mark_persistent(l_Lean_Meta_Closure_collectExprAux___closed__6);
  l_Lean_Meta_Closure_collectExprAux___closed__7 = _init_l_Lean_Meta_Closure_collectExprAux___closed__7();
  lean_mark_persistent(l_Lean_Meta_Closure_collectExprAux___closed__7);
  l_Lean_Meta_Closure_collectExprAux___closed__8 = _init_l_Lean_Meta_Closure_collectExprAux___closed__8();
  lean_mark_persistent(l_Lean_Meta_Closure_collectExprAux___closed__8);
  l_Lean_Meta_Closure_collectExprAux___closed__9 = _init_l_Lean_Meta_Closure_collectExprAux___closed__9();
  lean_mark_persistent(l_Lean_Meta_Closure_collectExprAux___closed__9);
  l_Lean_Meta_Closure_collectExprAux___closed__10 = _init_l_Lean_Meta_Closure_collectExprAux___closed__10();
  lean_mark_persistent(l_Lean_Meta_Closure_collectExprAux___closed__10);
  l_Lean_Meta_Closure_collectExprAux___closed__11 = _init_l_Lean_Meta_Closure_collectExprAux___closed__11();
  lean_mark_persistent(l_Lean_Meta_Closure_collectExprAux___closed__11);
  l_Lean_Meta_Closure_collectExprAux___closed__12 = _init_l_Lean_Meta_Closure_collectExprAux___closed__12();
  lean_mark_persistent(l_Lean_Meta_Closure_collectExprAux___closed__12);
  l_Lean_Meta_Closure_collectExprAux___closed__13 = _init_l_Lean_Meta_Closure_collectExprAux___closed__13();
  lean_mark_persistent(l_Lean_Meta_Closure_collectExprAux___closed__13);
  l_Lean_Meta_Closure_collectExprAux___closed__14 = _init_l_Lean_Meta_Closure_collectExprAux___closed__14();
  lean_mark_persistent(l_Lean_Meta_Closure_collectExprAux___closed__14);
  l_Lean_Meta_Closure_collectExprAux___closed__15 = _init_l_Lean_Meta_Closure_collectExprAux___closed__15();
  lean_mark_persistent(l_Lean_Meta_Closure_collectExprAux___closed__15);
  l_Lean_Meta_Closure_collectExprAux___closed__16 = _init_l_Lean_Meta_Closure_collectExprAux___closed__16();
  lean_mark_persistent(l_Lean_Meta_Closure_collectExprAux___closed__16);
  l_Lean_Meta_Closure_collectExprAux___closed__17 = _init_l_Lean_Meta_Closure_collectExprAux___closed__17();
  lean_mark_persistent(l_Lean_Meta_Closure_collectExprAux___closed__17);
  l_Lean_Meta_Closure_collectExprAux___closed__18 = _init_l_Lean_Meta_Closure_collectExprAux___closed__18();
  lean_mark_persistent(l_Lean_Meta_Closure_collectExprAux___closed__18);
  l_Lean_Meta_Closure_collectExprAux___closed__19 = _init_l_Lean_Meta_Closure_collectExprAux___closed__19();
  lean_mark_persistent(l_Lean_Meta_Closure_collectExprAux___closed__19);
  l_Lean_Meta_Closure_mkValueTypeClosure___closed__1 = _init_l_Lean_Meta_Closure_mkValueTypeClosure___closed__1();
  lean_mark_persistent(l_Lean_Meta_Closure_mkValueTypeClosure___closed__1);
  l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__1 = _init_l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__1();
  lean_mark_persistent(l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__1);
  l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__2 = _init_l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__2();
  lean_mark_persistent(l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__2);
  l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__3 = _init_l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__3();
  lean_mark_persistent(l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__3);
  l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__4 = _init_l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__4();
  lean_mark_persistent(l_List_foldlM___at_Lean_Meta_mkAuxDefinition___spec__6___closed__4);
  l_Lean_Meta_mkAuxDefinition___lambda__3___closed__1 = _init_l_Lean_Meta_mkAuxDefinition___lambda__3___closed__1();
  lean_mark_persistent(l_Lean_Meta_mkAuxDefinition___lambda__3___closed__1);
  l_Lean_Meta_mkAuxDefinition___lambda__3___closed__2 = _init_l_Lean_Meta_mkAuxDefinition___lambda__3___closed__2();
  lean_mark_persistent(l_Lean_Meta_mkAuxDefinition___lambda__3___closed__2);
  l_Lean_Meta_mkAuxDefinition___lambda__3___closed__3 = _init_l_Lean_Meta_mkAuxDefinition___lambda__3___closed__3();
  lean_mark_persistent(l_Lean_Meta_mkAuxDefinition___lambda__3___closed__3);
  l_Lean_Meta_mkAuxDefinition___lambda__3___closed__4 = _init_l_Lean_Meta_mkAuxDefinition___lambda__3___closed__4();
  lean_mark_persistent(l_Lean_Meta_mkAuxDefinition___lambda__3___closed__4);
  l_Lean_Meta_mkAuxDefinition___lambda__3___closed__5 = _init_l_Lean_Meta_mkAuxDefinition___lambda__3___closed__5();
  lean_mark_persistent(l_Lean_Meta_mkAuxDefinition___lambda__3___closed__5);
  l_Lean_Meta_mkAuxDefinition___lambda__3___closed__6 = _init_l_Lean_Meta_mkAuxDefinition___lambda__3___closed__6();
  lean_mark_persistent(l_Lean_Meta_mkAuxDefinition___lambda__3___closed__6);
  l_Lean_Meta_mkAuxDefinition___closed__1 = _init_l_Lean_Meta_mkAuxDefinition___closed__1();
  lean_mark_persistent(l_Lean_Meta_mkAuxDefinition___closed__1);
  l_Lean_Meta_mkAuxDefinition___closed__2 = _init_l_Lean_Meta_mkAuxDefinition___closed__2();
  lean_mark_persistent(l_Lean_Meta_mkAuxDefinition___closed__2);
  l_Lean_Meta_mkAuxDefinition___closed__3 = _init_l_Lean_Meta_mkAuxDefinition___closed__3();
  lean_mark_persistent(l_Lean_Meta_mkAuxDefinition___closed__3);
  l_Lean_Meta_mkAuxDefinition___closed__4 = _init_l_Lean_Meta_mkAuxDefinition___closed__4();
  lean_mark_persistent(l_Lean_Meta_mkAuxDefinition___closed__4);
  return lean_io_result_mk_ok(lean_box(0));
  }
  #ifdef __cplusplus
  }
  #endif
  