text: // Lean compiler output
  // Module: Lean.Meta.InferType
  // Imports: Init Lean.Data.LBool Lean.Meta.Basic
  #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_object* lean_expr_update_forall(lean_object*, uint8_t, lean_object*, lean_object*);
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferFVarType_match__1___rarg(lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Meta_isPropQuick_match__1(lean_object*);
  lean_object* l_Lean_throwError___at_Lean_Meta_throwUnknownMVar___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  size_t l_USize_add(size_t, size_t);
  extern lean_object* l_Lean_Name_getString_x21___closed__3;
  lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_forallTelescopeReducingAuxAux___rarg(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_throwError___at_Lean_Meta_throwTypeExcepted___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_stringToMessageData(lean_object*);
  lean_object* lean_mk_empty_array_with_capacity(lean_object*);
  lean_object* l_Lean_mkSort(lean_object*);
  lean_object* l_Lean_Meta_mkForallFVars(lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_throwError___at_Lean_Meta_whnf___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Meta_isTypeFormerType_match__1(lean_object*);
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_isArrowProposition___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_MetavarContext_instantiateLevelMVars___at_Lean_Meta_instantiateLevelMVars___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferLambdaType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  uint8_t l_USize_decEq(size_t, size_t);
  lean_object* lean_array_uget(lean_object*, size_t);
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_withLocalDecl_x27(lean_object*);
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_isPropQuickApp___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* lean_expr_update_mdata(lean_object*, lean_object*);
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferMVarType___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_throwError___at_Lean_Meta_throwFunctionExpected___spec__1(lean_object*);
  lean_object* l_Lean_Expr_instantiateBetaRevRange_visit___closed__1;
  lean_object* l_Std_PersistentHashMap_insertAux_traverse___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* lean_array_uset(lean_object*, size_t, lean_object*);
  lean_object* l_Array_mapMUnsafe_map___at_Lean_Expr_instantiateBetaRevRange_visit___spec__9___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Meta_forallTelescope___at___private_Lean_Meta_InferType_0__Lean_Meta_inferForallType___spec__2(lean_object*);
  lean_object* l_Lean_Meta_isProp_match__1___rarg(lean_object*, lean_object*, lean_object*);
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_isAlwaysZero___boxed(lean_object*);
  lean_object* l_Lean_Meta_throwTypeExcepted___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Expr_instantiateBetaRevRange_visit___closed__2;
  lean_object* l_Lean_mkMVar(lean_object*);
  size_t l_USize_sub(size_t, size_t);
  lean_object* lean_environment_find(lean_object*, lean_object*);
  lean_object* l_Lean_getConstInfo___at_Lean_Meta_mkConstWithFreshMVarLevels___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_isArrowType___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Meta_setInferTypeRef(lean_object*);
  lean_object* l_Lean_Meta_throwFunctionExpected(lean_object*);
  lean_object* lean_st_ref_get(lean_object*, lean_object*);
  lean_object* l_Lean_Meta_inferTypeImp_infer(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Std_PersistentHashMap_find_x3f___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__1(lean_object*, lean_object*);
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Meta_throwTypeExcepted___rarg___closed__1;
  lean_object* l_Lean_Expr_instantiateBetaRevRange_visit_match__1(lean_object*);
  lean_object* l_Lean_Expr_instantiateBetaRevRange_visit___closed__12;
  lean_object* l_Std_HashMapImp_find_x3f___at_Lean_Expr_instantiateBetaRevRange_visit___spec__1___boxed(lean_object*, lean_object*);
  uint8_t l_Lean_Expr_isBVar(lean_object*);
  lean_object* l_Lean_Meta_throwFunctionExpected___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Meta_inferTypeImp(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* lean_expr_instantiate1(lean_object*, lean_object*);
  lean_object* lean_array_push(lean_object*, lean_object*);
  lean_object* lean_array_get_size(lean_object*);
  lean_object* l_Std_PersistentHashMap_getCollisionNodeSize___rarg(lean_object*);
  lean_object* lean_expr_lift_loose_bvars(lean_object*, lean_object*, lean_object*);
  lean_object* lean_string_append(lean_object*, lean_object*);
  lean_object* l___private_Lean_Expr_0__Lean_Expr_withAppRevAux___at_Lean_Expr_instantiateBetaRevRange_visit___spec__10(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferFVarType_match__1(lean_object*);
  lean_object* l_Std_Range_forIn_loop___at___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType___spec__3___closed__2;
  extern lean_object* l_Lean_Expr_getAppArgs___closed__1;
  lean_object* l_Lean_getConstInfo___at___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  size_t l_USize_shiftRight(size_t, size_t);
  lean_object* l_Lean_Meta_isProp_match__1(lean_object*);
  lean_object* l_Std_HashMapImp_insert___at_Lean_Expr_instantiateBetaRevRange_visit___spec__3(lean_object*, lean_object*, lean_object*);
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_isPropQuickApp_match__1(lean_object*);
  lean_object* l_Array_foldrMUnsafe_fold___at___private_Lean_Meta_InferType_0__Lean_Meta_inferForallType___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  uint8_t l_USize_decLt(size_t, size_t);
  lean_object* l_Lean_Expr_instantiateBetaRevRange___closed__6;
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferForallType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* lean_nat_add(lean_object*, lean_object*);
  lean_object* l_Std_AssocList_foldlM___at_Lean_Expr_instantiateBetaRevRange_visit___spec__7(lean_object*, lean_object*);
  extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__2;
  lean_object* l_Lean_throwError___at___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_isArrowProp_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Std_HashMapImp_moveEntries___at_Lean_Expr_instantiateBetaRevRange_visit___spec__6(lean_object*, lean_object*, lean_object*);
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferMVarType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Meta_isPropQuick___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferAppType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Meta_throwUnknownMVar(lean_object*);
  lean_object* l_Lean_Meta_isPropQuick_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l___private_Lean_Expr_0__Lean_Expr_getAppArgsAux(lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Literal_type(lean_object*);
  lean_object* l_Lean_ConstantInfo_levelParams(lean_object*);
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_isAlwaysZero_match__1(lean_object*);
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferMVarType_match__1(lean_object*);
  lean_object* l_Std_Range_forIn_loop___at___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_isArrowProp_match__1(lean_object*);
  lean_object* l_Std_PersistentHashMap_findAux___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__2(lean_object*, size_t, lean_object*);
  lean_object* lean_array_fget(lean_object*, lean_object*);
  lean_object* l_Lean_mkProj(lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Meta_lambdaLetTelescope___at___private_Lean_Meta_InferType_0__Lean_Meta_inferLambdaType___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  uint8_t lean_nat_dec_eq(lean_object*, lean_object*);
  lean_object* l_Std_PersistentHashMap_findAux___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__2___boxed(lean_object*, lean_object*, lean_object*);
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_isArrowProposition_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Expr_instantiateBetaRevRange___closed__5;
  lean_object* lean_st_ref_take(lean_object*, lean_object*);
  extern lean_object* l_Std_PersistentHashMap_insertAux___rarg___closed__3;
  lean_object* lean_nat_sub(lean_object*, lean_object*);
  lean_object* l_Lean_Expr_instantiateBetaRevRange_visit___closed__6;
  lean_object* l_Lean_Expr_instantiateBetaRevRange___closed__3;
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferConstType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_throwError___at___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferMVarType_match__1___rarg(lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_throwError___at_Lean_Meta_throwUnknownMVar___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Expr_instantiateBetaRevRange_visit___closed__8;
  lean_object* l_Std_Range_forIn_loop___at___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType___spec__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*);
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache_match__1___rarg(lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Meta_isPropQuick(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Std_Range_forIn_loop___at___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType___spec__3___closed__1;
  lean_object* l_Std_Range_forIn_loop___at___private_Lean_Meta_InferType_0__Lean_Meta_inferAppType___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Std_HashMapImp_expand___at_Lean_Expr_instantiateBetaRevRange_visit___spec__5(lean_object*, lean_object*);
  lean_object* lean_array_get(lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Expr_instantiateBetaRevRange(lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Std_PersistentHashMap_insertAtCollisionNodeAux___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__7(lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*);
  lean_object* l_Std_mkHashMapImp___rarg(lean_object*);
  lean_object* l_Lean_getConstInfo___at___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_instInhabited___rarg(lean_object*, lean_object*);
  lean_object* lean_level_mk_imax_simp(lean_object*, lean_object*);
  lean_object* l_Lean_Expr_instantiateBetaRevRange_visit_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Std_AssocList_find_x3f___at_Lean_Expr_instantiateBetaRevRange_visit___spec__2(lean_object*, lean_object*);
  lean_object* lean_instantiate_type_lparams(lean_object*, lean_object*);
  extern lean_object* l_Lean_Meta_getMVarDecl___closed__2;
  lean_object* l_Lean_Expr_instantiateBetaRevRange_visit___closed__4;
  extern lean_object* l_Lean_Meta_inferTypeRef;
  lean_object* l_Std_AssocList_find_x3f___at_Lean_Expr_instantiateBetaRevRange_visit___spec__2___boxed(lean_object*, lean_object*);
  extern lean_object* l_Lean_Expr_instHashableExpr;
  size_t l_Lean_Expr_hash(lean_object*);
  lean_object* l_Lean_Expr_instantiateBetaRevRange_visit___closed__9;
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_isArrowProposition(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Std_PersistentHashMap_findAtAux___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_isArrowType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_throwError___at_Lean_Meta_throwTypeExcepted___spec__1(lean_object*);
  lean_object* l_Lean_Expr_instantiateBetaRevRange_visit___closed__11;
  lean_object* l_Lean_Meta_throwTypeExcepted___rarg___closed__2;
  lean_object* l_Lean_Meta_inferTypeImp_infer___closed__2;
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferFVarType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  extern lean_object* l_Lean_instInhabitedExpr;
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferAppType_match__2___rarg(lean_object*, lean_object*);
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_isPropQuickApp_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  size_t lean_usize_modn(size_t, lean_object*);
  lean_object* l_Lean_Meta_throwIncorrectNumberOfLevels___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l___private_Init_Util_0__mkPanicMessageWithDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  extern lean_object* l_Lean_KernelException_toMessageData___closed__15;
  lean_object* l_Lean_Meta_isProof(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  size_t l_USize_mul(size_t, size_t);
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_isTypeQuickApp___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Meta_setInferTypeRef___closed__1;
  lean_object* l_Lean_Meta_getLevel_match__1(lean_object*);
  lean_object* l_Lean_Meta_throwTypeExcepted(lean_object*);
  lean_object* lean_expr_update_let(lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Meta_throwIncorrectNumberOfLevels___rarg___closed__1;
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferForallType___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferFVarType___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Meta_whnf(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Meta_isTypeFormerType(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);
  extern lean_object* l_Lean_KernelException_toMessageData___closed__3;
  size_t lean_usize_of_nat(lean_object*);
  lean_object* l_instBEqProd___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Meta_getLevel_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* lean_expr_update_proj(lean_object*, lean_object*);
  lean_object* l_Lean_throwError___at_Lean_Meta_throwFunctionExpected___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  size_t l_USize_land(size_t, size_t);
  lean_object* l_Lean_Meta_throwFunctionExpected___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferLambdaType___closed__1;
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferAppType_match__1(lean_object*);
  lean_object* l_Lean_Expr_looseBVarRange(lean_object*);
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_isArrowProposition_match__1(lean_object*);
  lean_object* l_Lean_Meta_throwIncorrectNumberOfLevels(lean_object*);
  lean_object* l_Lean_Expr_instantiateBetaRevRange_visit___closed__7;
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_isProofQuickApp(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Meta_forallTelescope___at___private_Lean_Meta_InferType_0__Lean_Meta_inferForallType___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_LocalDecl_type(lean_object*);
  lean_object* lean_local_ctx_mk_local_decl(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t);
  lean_object* l_Lean_Meta_assignExprMVar(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Meta_inferTypeImp_infer_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Meta_isTypeFormerType_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Expr_getAppNumArgsAux(lean_object*, lean_object*);
  lean_object* l_Lean_Meta_isTypeQuick(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_mkLevelSucc(lean_object*);
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_isAlwaysZero_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  uint8_t lean_expr_eqv(lean_object*, lean_object*);
  uint8_t lean_expr_equal(lean_object*, lean_object*);
  uint8_t lean_nat_dec_le(lean_object*, lean_object*);
  uint8_t l_USize_decLe(size_t, size_t);
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferLambdaType___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Expr_betaRev(lean_object*, lean_object*);
  lean_object* l_Lean_Meta_throwUnknownFVar___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Std_AssocList_replace___at_Lean_Expr_instantiateBetaRevRange_visit___spec__8(lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_mkAppRev(lean_object*, lean_object*);
  lean_object* l_Lean_Meta_throwIncorrectNumberOfLevels___rarg___closed__2;
  lean_object* lean_panic_fn(lean_object*, lean_object*);
  lean_object* l_Lean_Level_normalize(lean_object*);
  uint8_t l_Bool_toLBool(uint8_t);
  lean_object* l_Array_foldrMUnsafe_fold___at___private_Lean_Meta_InferType_0__Lean_Meta_inferForallType___spec__1(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_throwError___at_Lean_Meta_throwIncorrectNumberOfLevels___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Meta_throwFunctionExpected___rarg___closed__2;
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferForallType___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Meta_throwFunctionExpected___rarg___closed__1;
  uint8_t l_Std_AssocList_contains___at_Lean_Expr_instantiateBetaRevRange_visit___spec__4(lean_object*, lean_object*);
  lean_object* l_Std_Range_forIn_loop___at___private_Lean_Meta_InferType_0__Lean_Meta_inferAppType___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_throwError___at_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1049____spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Meta_getLevel(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* lean_nat_mul(lean_object*, lean_object*);
  lean_object* l_Lean_MetavarContext_findDecl_x3f(lean_object*, lean_object*);
  lean_object* l_Lean_Expr_instantiateBetaRevRange_visit___closed__3;
  lean_object* lean_st_ref_set(lean_object*, lean_object*, lean_object*);
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_isProofQuickApp___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_addMessageContextFull___at_Lean_Meta_instAddMessageContextMetaM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_isPropQuickApp(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* lean_expr_update_lambda(lean_object*, uint8_t, lean_object*, lean_object*);
  lean_object* l_instBEq___rarg(lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Meta_inferType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Meta_throwUnknownMVar___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferConstType___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  uint8_t l_Lean_Expr_hasLooseBVars(lean_object*);
  lean_object* l_Lean_Meta_inferTypeImp_infer_match__1(lean_object*);
  lean_object* l_instHashableProd___rarg___boxed(lean_object*, lean_object*, lean_object*);
  lean_object* l_Std_PersistentHashMap_insert___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__4(lean_object*, lean_object*, lean_object*);
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferForallType___closed__1;
  extern lean_object* l_Lean_Position_lt___closed__1;
  lean_object* lean_mk_array(lean_object*, lean_object*);
  extern size_t l_Std_PersistentHashMap_insertAux___rarg___closed__2;
  lean_object* l___private_Lean_Expr_0__Lean_mkAppRangeAux(lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_instHashableNat___boxed(lean_object*);
  lean_object* l_Std_mkHashMap___at_Lean_Expr_instantiateBetaRevRange___spec__1(lean_object*);
  lean_object* l_Lean_throwError___at_Lean_Meta_throwUnknownMVar___spec__1(lean_object*);
  size_t lean_usize_mix_hash(size_t, size_t);
  extern lean_object* l_Lean_Expr_instBEqExpr;
  lean_object* l_Lean_Meta_isProofQuick___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Expr_instantiateBetaRevRange_visit___closed__5;
  lean_object* l_Lean_Meta_lambdaLetTelescope___at___private_Lean_Meta_InferType_0__Lean_Meta_inferLambdaType___spec__1(lean_object*);
  lean_object* l_Std_PersistentHashMap_insertAux_traverse___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__6(size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Std_PersistentHashMap_findAtAux___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_throwError___at_Lean_Meta_throwIncorrectNumberOfLevels___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Array_mapMUnsafe_map___at_Lean_Expr_instantiateBetaRevRange_visit___spec__9(lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*);
  lean_object* l_Std_PersistentHashMap_insertAux___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__5(lean_object*, size_t, size_t, lean_object*, lean_object*);
  lean_object* l_Lean_Meta_whnfD(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l___private_Lean_Expr_0__Lean_Expr_withAppRevAux___at_Lean_Expr_instantiateBetaRevRange_visit___spec__10___boxed__const__1;
  lean_object* l_Std_HashMapImp_find_x3f___at_Lean_Expr_instantiateBetaRevRange_visit___spec__1(lean_object*, lean_object*);
  lean_object* l_Lean_Meta_mkFreshLevelMVar___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Meta_isProp_match__2(lean_object*);
  lean_object* l_Lean_Meta_throwUnknownMVar___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_throwError___at_Lean_Meta_throwFunctionExpected___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Expr_getAppFn(lean_object*);
  lean_object* l_Lean_Expr_instantiateBetaRevRange___closed__1;
  lean_object* l_Lean_Expr_instantiateBetaRevRange_visit(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Meta_isReadOnlyOrSyntheticOpaqueExprMVar(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Expr_instantiateBetaRevRange___closed__2;
  lean_object* l_Lean_Meta_throwTypeExcepted___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Std_PersistentHashMap_find_x3f___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__1___boxed(lean_object*, lean_object*);
  lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*);
  lean_object* l_List_lengthAux___rarg(lean_object*, lean_object*);
  lean_object* lean_local_ctx_find(lean_object*, lean_object*);
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_isTypeQuickApp(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Expr_instantiateBetaRevRange_visit___closed__10;
  lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_lambdaTelescopeImp___rarg(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Meta_isTypeFormer(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_throwError___at_Lean_Meta_throwTypeExcepted___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Std_PersistentHashMap_insertAux___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Meta_throwIncorrectNumberOfLevels___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Expr_instantiateBetaRevRange___closed__4;
  lean_object* lean_usize_to_nat(size_t);
  lean_object* l_Lean_Meta_isProp(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_isArrowProp(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_indentExpr(lean_object*);
  lean_object* l_Lean_mkBVar(lean_object*);
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferAppType_match__1___rarg(lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_mkFreshId___at_Lean_Meta_mkFreshExprMVarAt___spec__1___rarg(lean_object*, lean_object*);
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_isArrowProp___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_mkConst(lean_object*, lean_object*);
  lean_object* l_Lean_Meta_isTypeQuick___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Meta_isProp_match__2___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
  uint8_t l___private_Lean_Meta_InferType_0__Lean_Meta_isAlwaysZero(lean_object*);
  lean_object* l_Lean_throwError___at_Lean_Meta_throwIncorrectNumberOfLevels___spec__1(lean_object*);
  extern lean_object* l___private_Init_Data_Format_Basic_0__Std_Format_be___closed__2;
  lean_object* l_Lean_Meta_isProp_match__2___rarg(uint8_t, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Meta_isType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Meta_isProofQuick(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_withLocalDecl_x27___rarg(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_Meta_inferTypeImp_infer___closed__1;
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache_match__1(lean_object*);
  lean_object* l_Std_AssocList_contains___at_Lean_Expr_instantiateBetaRevRange_visit___spec__4___boxed(lean_object*, lean_object*);
  lean_object* l_Std_PersistentHashMap_mkCollisionNode___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferAppType_match__2(lean_object*);
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_withLocalDecl_x27___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l___private_Lean_Expr_0__Lean_Expr_withAppRevAux___at_Lean_Expr_instantiateBetaRevRange_visit___spec__10___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  uint8_t lean_nat_dec_lt(lean_object*, lean_object*);
  lean_object* l_Lean_Expr_instantiateBetaRevRange_visit_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, 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) {
  _start:
  {
  switch (lean_obj_tag(x_1)) {
  case 0:
  {
  lean_object* x_14; uint64_t x_15; lean_object* x_16; lean_object* x_17; 
  lean_dec(x_13);
  lean_dec(x_12);
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(x_9);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_14 = lean_ctor_get(x_1, 0);
  lean_inc(x_14);
  x_15 = lean_ctor_get_uint64(x_1, sizeof(void*)*1);
  lean_dec(x_1);
  x_16 = lean_box_uint64(x_15);
  x_17 = lean_apply_2(x_8, x_14, x_16);
  return x_17;
  }
  case 1:
  {
  lean_object* x_18; uint64_t x_19; lean_object* x_20; lean_object* x_21; 
  lean_dec(x_13);
  lean_dec(x_12);
  lean_dec(x_11);
  lean_dec(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_3);
  lean_dec(x_2);
  x_18 = lean_ctor_get(x_1, 0);
  lean_inc(x_18);
  x_19 = lean_ctor_get_uint64(x_1, sizeof(void*)*1);
  lean_dec(x_1);
  x_20 = lean_box_uint64(x_19);
  x_21 = lean_apply_2(x_10, x_18, x_20);
  return x_21;
  }
  case 2:
  {
  lean_object* x_22; uint64_t x_23; lean_object* x_24; lean_object* x_25; 
  lean_dec(x_13);
  lean_dec(x_12);
  lean_dec(x_10);
  lean_dec(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_3);
  lean_dec(x_2);
  x_22 = lean_ctor_get(x_1, 0);
  lean_inc(x_22);
  x_23 = lean_ctor_get_uint64(x_1, sizeof(void*)*1);
  lean_dec(x_1);
  x_24 = lean_box_uint64(x_23);
  x_25 = lean_apply_2(x_11, x_22, x_24);
  return x_25;
  }
  case 3:
  {
  lean_object* x_26; uint64_t x_27; lean_object* x_28; lean_object* x_29; 
  lean_dec(x_13);
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(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_3);
  lean_dec(x_2);
  x_26 = lean_ctor_get(x_1, 0);
  lean_inc(x_26);
  x_27 = lean_ctor_get_uint64(x_1, sizeof(void*)*1);
  lean_dec(x_1);
  x_28 = lean_box_uint64(x_27);
  x_29 = lean_apply_2(x_12, x_26, x_28);
  return x_29;
  }
  case 4:
  {
  lean_object* x_30; lean_object* x_31; uint64_t x_32; lean_object* x_33; lean_object* x_34; 
  lean_dec(x_13);
  lean_dec(x_12);
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_30 = lean_ctor_get(x_1, 0);
  lean_inc(x_30);
  x_31 = lean_ctor_get(x_1, 1);
  lean_inc(x_31);
  x_32 = lean_ctor_get_uint64(x_1, sizeof(void*)*2);
  lean_dec(x_1);
  x_33 = lean_box_uint64(x_32);
  x_34 = lean_apply_3(x_9, x_30, x_31, x_33);
  return x_34;
  }
  case 5:
  {
  lean_object* x_35; lean_object* x_36; uint64_t x_37; lean_object* x_38; lean_object* x_39; 
  lean_dec(x_13);
  lean_dec(x_12);
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(x_9);
  lean_dec(x_8);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_35 = lean_ctor_get(x_1, 0);
  lean_inc(x_35);
  x_36 = lean_ctor_get(x_1, 1);
  lean_inc(x_36);
  x_37 = lean_ctor_get_uint64(x_1, sizeof(void*)*2);
  lean_dec(x_1);
  x_38 = lean_box_uint64(x_37);
  x_39 = lean_apply_3(x_7, x_35, x_36, x_38);
  return x_39;
  }
  case 6:
  {
  lean_object* x_40; lean_object* x_41; lean_object* x_42; uint64_t x_43; lean_object* x_44; lean_object* x_45; 
  lean_dec(x_13);
  lean_dec(x_12);
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(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);
  x_40 = lean_ctor_get(x_1, 0);
  lean_inc(x_40);
  x_41 = lean_ctor_get(x_1, 1);
  lean_inc(x_41);
  x_42 = lean_ctor_get(x_1, 2);
  lean_inc(x_42);
  x_43 = lean_ctor_get_uint64(x_1, sizeof(void*)*3);
  lean_dec(x_1);
  x_44 = lean_box_uint64(x_43);
  x_45 = lean_apply_4(x_3, x_40, x_41, x_42, x_44);
  return x_45;
  }
  case 7:
  {
  lean_object* x_46; lean_object* x_47; lean_object* x_48; uint64_t x_49; lean_object* x_50; lean_object* x_51; 
  lean_dec(x_13);
  lean_dec(x_12);
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(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_3);
  x_46 = lean_ctor_get(x_1, 0);
  lean_inc(x_46);
  x_47 = lean_ctor_get(x_1, 1);
  lean_inc(x_47);
  x_48 = lean_ctor_get(x_1, 2);
  lean_inc(x_48);
  x_49 = lean_ctor_get_uint64(x_1, sizeof(void*)*3);
  lean_dec(x_1);
  x_50 = lean_box_uint64(x_49);
  x_51 = lean_apply_4(x_2, x_46, x_47, x_48, x_50);
  return x_51;
  }
  case 8:
  {
  lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; uint64_t x_56; lean_object* x_57; lean_object* x_58; 
  lean_dec(x_13);
  lean_dec(x_12);
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(x_9);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_3);
  lean_dec(x_2);
  x_52 = lean_ctor_get(x_1, 0);
  lean_inc(x_52);
  x_53 = lean_ctor_get(x_1, 1);
  lean_inc(x_53);
  x_54 = lean_ctor_get(x_1, 2);
  lean_inc(x_54);
  x_55 = lean_ctor_get(x_1, 3);
  lean_inc(x_55);
  x_56 = lean_ctor_get_uint64(x_1, sizeof(void*)*4);
  lean_dec(x_1);
  x_57 = lean_box_uint64(x_56);
  x_58 = lean_apply_5(x_4, x_52, x_53, x_54, x_55, x_57);
  return x_58;
  }
  case 9:
  {
  lean_object* x_59; uint64_t x_60; lean_object* x_61; lean_object* x_62; 
  lean_dec(x_12);
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(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_3);
  lean_dec(x_2);
  x_59 = lean_ctor_get(x_1, 0);
  lean_inc(x_59);
  x_60 = lean_ctor_get_uint64(x_1, sizeof(void*)*1);
  lean_dec(x_1);
  x_61 = lean_box_uint64(x_60);
  x_62 = lean_apply_2(x_13, x_59, x_61);
  return x_62;
  }
  case 10:
  {
  lean_object* x_63; lean_object* x_64; uint64_t x_65; lean_object* x_66; lean_object* x_67; 
  lean_dec(x_13);
  lean_dec(x_12);
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(x_9);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_63 = lean_ctor_get(x_1, 0);
  lean_inc(x_63);
  x_64 = lean_ctor_get(x_1, 1);
  lean_inc(x_64);
  x_65 = lean_ctor_get_uint64(x_1, sizeof(void*)*2);
  lean_dec(x_1);
  x_66 = lean_box_uint64(x_65);
  x_67 = lean_apply_3(x_5, x_63, x_64, x_66);
  return x_67;
  }
  default: 
  {
  lean_object* x_68; lean_object* x_69; lean_object* x_70; uint64_t x_71; lean_object* x_72; lean_object* x_73; 
  lean_dec(x_13);
  lean_dec(x_12);
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(x_9);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  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_70 = lean_ctor_get(x_1, 2);
  lean_inc(x_70);
  x_71 = lean_ctor_get_uint64(x_1, sizeof(void*)*3);
  lean_dec(x_1);
  x_72 = lean_box_uint64(x_71);
  x_73 = lean_apply_4(x_6, x_68, x_69, x_70, x_72);
  return x_73;
  }
  }
  }
  }
  lean_object* l_Lean_Expr_instantiateBetaRevRange_visit_match__1(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = lean_alloc_closure((void*)(l_Lean_Expr_instantiateBetaRevRange_visit_match__1___rarg), 13, 0);
  return x_2;
  }
  }
  lean_object* l_Std_AssocList_find_x3f___at_Lean_Expr_instantiateBetaRevRange_visit___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; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; 
  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_ctor_get(x_4, 0);
  x_8 = lean_ctor_get(x_4, 1);
  x_9 = lean_ctor_get(x_1, 0);
  x_10 = lean_ctor_get(x_1, 1);
  x_11 = lean_expr_eqv(x_7, x_9);
  if (x_11 == 0)
  {
  x_2 = x_6;
  goto _start;
  }
  else
  {
  uint8_t x_13; 
  x_13 = lean_nat_dec_eq(x_8, x_10);
  if (x_13 == 0)
  {
  x_2 = x_6;
  goto _start;
  }
  else
  {
  lean_object* x_15; 
  lean_inc(x_5);
  x_15 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_15, 0, x_5);
  return x_15;
  }
  }
  }
  }
  }
  lean_object* l_Std_HashMapImp_find_x3f___at_Lean_Expr_instantiateBetaRevRange_visit___spec__1(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; size_t x_7; size_t x_8; size_t x_9; size_t x_10; lean_object* x_11; lean_object* x_12; 
  x_3 = lean_ctor_get(x_1, 1);
  x_4 = lean_array_get_size(x_3);
  x_5 = lean_ctor_get(x_2, 0);
  x_6 = lean_ctor_get(x_2, 1);
  x_7 = l_Lean_Expr_hash(x_5);
  x_8 = lean_usize_of_nat(x_6);
  x_9 = lean_usize_mix_hash(x_7, x_8);
  x_10 = lean_usize_modn(x_9, x_4);
  lean_dec(x_4);
  x_11 = lean_array_uget(x_3, x_10);
  x_12 = l_Std_AssocList_find_x3f___at_Lean_Expr_instantiateBetaRevRange_visit___spec__2(x_2, x_11);
  lean_dec(x_11);
  return x_12;
  }
  }
  uint8_t l_Std_AssocList_contains___at_Lean_Expr_instantiateBetaRevRange_visit___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; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; 
  x_4 = lean_ctor_get(x_2, 0);
  x_5 = lean_ctor_get(x_2, 2);
  x_6 = lean_ctor_get(x_4, 0);
  x_7 = lean_ctor_get(x_4, 1);
  x_8 = lean_ctor_get(x_1, 0);
  x_9 = lean_ctor_get(x_1, 1);
  x_10 = lean_expr_eqv(x_6, x_8);
  if (x_10 == 0)
  {
  x_2 = x_5;
  goto _start;
  }
  else
  {
  uint8_t x_12; 
  x_12 = lean_nat_dec_eq(x_7, x_9);
  if (x_12 == 0)
  {
  x_2 = x_5;
  goto _start;
  }
  else
  {
  uint8_t x_14; 
  x_14 = 1;
  return x_14;
  }
  }
  }
  }
  }
  lean_object* l_Std_AssocList_foldlM___at_Lean_Expr_instantiateBetaRevRange_visit___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; lean_object* x_7; lean_object* x_8; size_t x_9; size_t x_10; size_t x_11; size_t x_12; lean_object* x_13; lean_object* x_14; 
  x_4 = lean_ctor_get(x_2, 0);
  x_5 = lean_ctor_get(x_2, 2);
  x_6 = lean_array_get_size(x_1);
  x_7 = lean_ctor_get(x_4, 0);
  lean_inc(x_7);
  x_8 = lean_ctor_get(x_4, 1);
  lean_inc(x_8);
  x_9 = l_Lean_Expr_hash(x_7);
  lean_dec(x_7);
  x_10 = lean_usize_of_nat(x_8);
  lean_dec(x_8);
  x_11 = lean_usize_mix_hash(x_9, x_10);
  x_12 = lean_usize_modn(x_11, x_6);
  lean_dec(x_6);
  x_13 = lean_array_uget(x_1, x_12);
  lean_ctor_set(x_2, 2, x_13);
  x_14 = lean_array_uset(x_1, x_12, x_2);
  x_1 = x_14;
  x_2 = x_5;
  goto _start;
  }
  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; size_t x_22; size_t x_23; size_t x_24; size_t x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; 
  x_16 = lean_ctor_get(x_2, 0);
  x_17 = lean_ctor_get(x_2, 1);
  x_18 = lean_ctor_get(x_2, 2);
  lean_inc(x_18);
  lean_inc(x_17);
  lean_inc(x_16);
  lean_dec(x_2);
  x_19 = lean_array_get_size(x_1);
  x_20 = lean_ctor_get(x_16, 0);
  lean_inc(x_20);
  x_21 = lean_ctor_get(x_16, 1);
  lean_inc(x_21);
  x_22 = l_Lean_Expr_hash(x_20);
  lean_dec(x_20);
  x_23 = lean_usize_of_nat(x_21);
  lean_dec(x_21);
  x_24 = lean_usize_mix_hash(x_22, x_23);
  x_25 = lean_usize_modn(x_24, x_19);
  lean_dec(x_19);
  x_26 = lean_array_uget(x_1, x_25);
  x_27 = lean_alloc_ctor(1, 3, 0);
  lean_ctor_set(x_27, 0, x_16);
  lean_ctor_set(x_27, 1, x_17);
  lean_ctor_set(x_27, 2, x_26);
  x_28 = lean_array_uset(x_1, x_25, x_27);
  x_1 = x_28;
  x_2 = x_18;
  goto _start;
  }
  }
  }
  }
  lean_object* l_Std_HashMapImp_moveEntries___at_Lean_Expr_instantiateBetaRevRange_visit___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_Expr_instantiateBetaRevRange_visit___spec__7(x_3, x_6);
  x_10 = lean_unsigned_to_nat(1u);
  x_11 = lean_nat_add(x_1, x_10);
  lean_dec(x_1);
  x_1 = x_11;
  x_2 = x_8;
  x_3 = x_9;
  goto _start;
  }
  }
  }
  lean_object* l_Std_HashMapImp_expand___at_Lean_Expr_instantiateBetaRevRange_visit___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_Expr_instantiateBetaRevRange_visit___spec__6(x_8, x_2, x_7);
  x_10 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_10, 0, x_1);
  lean_ctor_set(x_10, 1, x_9);
  return x_10;
  }
  }
  lean_object* l_Std_AssocList_replace___at_Lean_Expr_instantiateBetaRevRange_visit___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; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; 
  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_ctor_get(x_6, 0);
  lean_inc(x_9);
  x_10 = lean_ctor_get(x_6, 1);
  lean_inc(x_10);
  x_11 = lean_ctor_get(x_1, 0);
  lean_inc(x_11);
  x_12 = lean_ctor_get(x_1, 1);
  lean_inc(x_12);
  x_13 = lean_expr_eqv(x_9, x_11);
  lean_dec(x_11);
  lean_dec(x_9);
  if (x_13 == 0)
  {
  lean_object* x_14; 
  lean_dec(x_12);
  lean_dec(x_10);
  x_14 = l_Std_AssocList_replace___at_Lean_Expr_instantiateBetaRevRange_visit___spec__8(x_1, x_2, x_8);
  lean_ctor_set(x_3, 2, x_14);
  return x_3;
  }
  else
  {
  uint8_t x_15; 
  x_15 = lean_nat_dec_eq(x_10, x_12);
  lean_dec(x_12);
  lean_dec(x_10);
  if (x_15 == 0)
  {
  lean_object* x_16; 
  x_16 = l_Std_AssocList_replace___at_Lean_Expr_instantiateBetaRevRange_visit___spec__8(x_1, x_2, x_8);
  lean_ctor_set(x_3, 2, x_16);
  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_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; uint8_t x_24; 
  x_17 = lean_ctor_get(x_3, 0);
  x_18 = lean_ctor_get(x_3, 1);
  x_19 = lean_ctor_get(x_3, 2);
  lean_inc(x_19);
  lean_inc(x_18);
  lean_inc(x_17);
  lean_dec(x_3);
  x_20 = lean_ctor_get(x_17, 0);
  lean_inc(x_20);
  x_21 = lean_ctor_get(x_17, 1);
  lean_inc(x_21);
  x_22 = lean_ctor_get(x_1, 0);
  lean_inc(x_22);
  x_23 = lean_ctor_get(x_1, 1);
  lean_inc(x_23);
  x_24 = lean_expr_eqv(x_20, x_22);
  lean_dec(x_22);
  lean_dec(x_20);
  if (x_24 == 0)
  {
  lean_object* x_25; lean_object* x_26; 
  lean_dec(x_23);
  lean_dec(x_21);
  x_25 = l_Std_AssocList_replace___at_Lean_Expr_instantiateBetaRevRange_visit___spec__8(x_1, x_2, x_19);
  x_26 = lean_alloc_ctor(1, 3, 0);
  lean_ctor_set(x_26, 0, x_17);
  lean_ctor_set(x_26, 1, x_18);
  lean_ctor_set(x_26, 2, x_25);
  return x_26;
  }
  else
  {
  uint8_t x_27; 
  x_27 = lean_nat_dec_eq(x_21, x_23);
  lean_dec(x_23);
  lean_dec(x_21);
  if (x_27 == 0)
  {
  lean_object* x_28; lean_object* x_29; 
  x_28 = l_Std_AssocList_replace___at_Lean_Expr_instantiateBetaRevRange_visit___spec__8(x_1, x_2, x_19);
  x_29 = lean_alloc_ctor(1, 3, 0);
  lean_ctor_set(x_29, 0, x_17);
  lean_ctor_set(x_29, 1, x_18);
  lean_ctor_set(x_29, 2, x_28);
  return x_29;
  }
  else
  {
  lean_object* x_30; 
  lean_dec(x_18);
  lean_dec(x_17);
  x_30 = lean_alloc_ctor(1, 3, 0);
  lean_ctor_set(x_30, 0, x_1);
  lean_ctor_set(x_30, 1, x_2);
  lean_ctor_set(x_30, 2, x_19);
  return x_30;
  }
  }
  }
  }
  }
  }
  lean_object* l_Std_HashMapImp_insert___at_Lean_Expr_instantiateBetaRevRange_visit___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; lean_object* x_8; lean_object* x_9; size_t x_10; size_t x_11; size_t x_12; size_t x_13; lean_object* x_14; uint8_t x_15; 
  x_5 = lean_ctor_get(x_1, 0);
  x_6 = lean_ctor_get(x_1, 1);
  x_7 = lean_array_get_size(x_6);
  x_8 = lean_ctor_get(x_2, 0);
  lean_inc(x_8);
  x_9 = lean_ctor_get(x_2, 1);
  lean_inc(x_9);
  x_10 = l_Lean_Expr_hash(x_8);
  lean_dec(x_8);
  x_11 = lean_usize_of_nat(x_9);
  lean_dec(x_9);
  x_12 = lean_usize_mix_hash(x_10, x_11);
  x_13 = lean_usize_modn(x_12, x_7);
  x_14 = lean_array_uget(x_6, x_13);
  x_15 = l_Std_AssocList_contains___at_Lean_Expr_instantiateBetaRevRange_visit___spec__4(x_2, x_14);
  if (x_15 == 0)
  {
  lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; uint8_t x_20; 
  x_16 = lean_unsigned_to_nat(1u);
  x_17 = lean_nat_add(x_5, x_16);
  lean_dec(x_5);
  x_18 = lean_alloc_ctor(1, 3, 0);
  lean_ctor_set(x_18, 0, x_2);
  lean_ctor_set(x_18, 1, x_3);
  lean_ctor_set(x_18, 2, x_14);
  x_19 = lean_array_uset(x_6, x_13, x_18);
  x_20 = lean_nat_dec_le(x_17, x_7);
  lean_dec(x_7);
  if (x_20 == 0)
  {
  lean_object* x_21; 
  lean_free_object(x_1);
  x_21 = l_Std_HashMapImp_expand___at_Lean_Expr_instantiateBetaRevRange_visit___spec__5(x_17, x_19);
  return x_21;
  }
  else
  {
  lean_ctor_set(x_1, 1, x_19);
  lean_ctor_set(x_1, 0, x_17);
  return x_1;
  }
  }
  else
  {
  lean_object* x_22; lean_object* x_23; 
  lean_dec(x_7);
  x_22 = l_Std_AssocList_replace___at_Lean_Expr_instantiateBetaRevRange_visit___spec__8(x_2, x_3, x_14);
  x_23 = lean_array_uset(x_6, x_13, x_22);
  lean_ctor_set(x_1, 1, x_23);
  return x_1;
  }
  }
  else
  {
  lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; size_t x_29; size_t x_30; size_t x_31; size_t x_32; lean_object* x_33; uint8_t x_34; 
  x_24 = lean_ctor_get(x_1, 0);
  x_25 = lean_ctor_get(x_1, 1);
  lean_inc(x_25);
  lean_inc(x_24);
  lean_dec(x_1);
  x_26 = lean_array_get_size(x_25);
  x_27 = lean_ctor_get(x_2, 0);
  lean_inc(x_27);
  x_28 = lean_ctor_get(x_2, 1);
  lean_inc(x_28);
  x_29 = l_Lean_Expr_hash(x_27);
  lean_dec(x_27);
  x_30 = lean_usize_of_nat(x_28);
  lean_dec(x_28);
  x_31 = lean_usize_mix_hash(x_29, x_30);
  x_32 = lean_usize_modn(x_31, x_26);
  x_33 = lean_array_uget(x_25, x_32);
  x_34 = l_Std_AssocList_contains___at_Lean_Expr_instantiateBetaRevRange_visit___spec__4(x_2, x_33);
  if (x_34 == 0)
  {
  lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; uint8_t x_39; 
  x_35 = lean_unsigned_to_nat(1u);
  x_36 = lean_nat_add(x_24, x_35);
  lean_dec(x_24);
  x_37 = lean_alloc_ctor(1, 3, 0);
  lean_ctor_set(x_37, 0, x_2);
  lean_ctor_set(x_37, 1, x_3);
  lean_ctor_set(x_37, 2, x_33);
  x_38 = lean_array_uset(x_25, x_32, x_37);
  x_39 = lean_nat_dec_le(x_36, x_26);
  lean_dec(x_26);
  if (x_39 == 0)
  {
  lean_object* x_40; 
  x_40 = l_Std_HashMapImp_expand___at_Lean_Expr_instantiateBetaRevRange_visit___spec__5(x_36, x_38);
  return x_40;
  }
  else
  {
  lean_object* x_41; 
  x_41 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_41, 0, x_36);
  lean_ctor_set(x_41, 1, x_38);
  return x_41;
  }
  }
  else
  {
  lean_object* x_42; lean_object* x_43; lean_object* x_44; 
  lean_dec(x_26);
  x_42 = l_Std_AssocList_replace___at_Lean_Expr_instantiateBetaRevRange_visit___spec__8(x_2, x_3, x_33);
  x_43 = lean_array_uset(x_25, x_32, x_42);
  x_44 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_44, 0, x_24);
  lean_ctor_set(x_44, 1, x_43);
  return x_44;
  }
  }
  }
  }
  lean_object* l_Array_mapMUnsafe_map___at_Lean_Expr_instantiateBetaRevRange_visit___spec__9(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, size_t x_5, size_t x_6, lean_object* x_7, lean_object* x_8) {
  _start:
  {
  uint8_t x_9; 
  x_9 = x_6 < x_5;
  if (x_9 == 0)
  {
  lean_object* x_10; lean_object* x_11; 
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_10 = x_7;
  x_11 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_11, 0, x_10);
  lean_ctor_set(x_11, 1, x_8);
  return x_11;
  }
  else
  {
  lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; size_t x_19; size_t x_20; lean_object* x_21; lean_object* x_22; 
  x_12 = lean_array_uget(x_7, x_6);
  x_13 = lean_unsigned_to_nat(0u);
  x_14 = lean_array_uset(x_7, x_6, x_13);
  x_15 = x_12;
  lean_inc(x_4);
  lean_inc(x_3);
  lean_inc(x_2);
  lean_inc(x_1);
  x_16 = l_Lean_Expr_instantiateBetaRevRange_visit(x_1, x_2, x_3, x_15, x_4, x_8);
  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 = 1;
  x_20 = x_6 + x_19;
  x_21 = x_17;
  x_22 = lean_array_uset(x_14, x_6, x_21);
  x_6 = x_20;
  x_7 = x_22;
  x_8 = x_18;
  goto _start;
  }
  }
  }
  static lean_object* _init_l___private_Lean_Expr_0__Lean_Expr_withAppRevAux___at_Lean_Expr_instantiateBetaRevRange_visit___spec__10___boxed__const__1() {
  _start:
  {
  size_t x_1; lean_object* x_2; 
  x_1 = 0;
  x_2 = lean_box_usize(x_1);
  return x_2;
  }
  }
  lean_object* l___private_Lean_Expr_0__Lean_Expr_withAppRevAux___at_Lean_Expr_instantiateBetaRevRange_visit___spec__10(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:
  {
  if (lean_obj_tag(x_7) == 5)
  {
  lean_object* x_10; lean_object* x_11; lean_object* x_12; 
  x_10 = lean_ctor_get(x_7, 0);
  lean_inc(x_10);
  x_11 = lean_ctor_get(x_7, 1);
  lean_inc(x_11);
  lean_dec(x_7);
  x_12 = lean_array_push(x_8, x_11);
  x_7 = x_10;
  x_8 = x_12;
  goto _start;
  }
  else
  {
  lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; size_t x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; uint8_t x_25; 
  lean_inc(x_4);
  lean_inc(x_7);
  lean_inc(x_3);
  lean_inc(x_2);
  lean_inc(x_1);
  x_14 = l_Lean_Expr_instantiateBetaRevRange_visit(x_1, x_2, x_3, x_7, x_4, x_9);
  x_15 = lean_ctor_get(x_14, 0);
  lean_inc(x_15);
  x_16 = lean_ctor_get(x_14, 1);
  lean_inc(x_16);
  lean_dec(x_14);
  x_17 = lean_array_get_size(x_8);
  x_18 = lean_usize_of_nat(x_17);
  lean_dec(x_17);
  x_19 = x_8;
  x_20 = lean_box_usize(x_18);
  x_21 = l___private_Lean_Expr_0__Lean_Expr_withAppRevAux___at_Lean_Expr_instantiateBetaRevRange_visit___spec__10___boxed__const__1;
  x_22 = lean_alloc_closure((void*)(l_Array_mapMUnsafe_map___at_Lean_Expr_instantiateBetaRevRange_visit___spec__9___boxed), 8, 7);
  lean_closure_set(x_22, 0, x_1);
  lean_closure_set(x_22, 1, x_2);
  lean_closure_set(x_22, 2, x_3);
  lean_closure_set(x_22, 3, x_4);
  lean_closure_set(x_22, 4, x_20);
  lean_closure_set(x_22, 5, x_21);
  lean_closure_set(x_22, 6, x_19);
  x_23 = x_22;
  x_24 = lean_apply_1(x_23, x_16);
  x_25 = !lean_is_exclusive(x_24);
  if (x_25 == 0)
  {
  lean_object* x_26; uint8_t x_27; 
  x_26 = lean_ctor_get(x_24, 0);
  x_27 = l_Lean_Expr_isBVar(x_7);
  lean_dec(x_7);
  if (x_27 == 0)
  {
  lean_object* x_28; 
  x_28 = l_Lean_mkAppRev(x_15, x_26);
  lean_dec(x_26);
  lean_ctor_set(x_24, 0, x_28);
  return x_24;
  }
  else
  {
  lean_object* x_29; 
  x_29 = l_Lean_Expr_betaRev(x_15, x_26);
  lean_dec(x_26);
  lean_dec(x_15);
  lean_ctor_set(x_24, 0, x_29);
  return x_24;
  }
  }
  else
  {
  lean_object* x_30; lean_object* x_31; uint8_t x_32; 
  x_30 = lean_ctor_get(x_24, 0);
  x_31 = lean_ctor_get(x_24, 1);
  lean_inc(x_31);
  lean_inc(x_30);
  lean_dec(x_24);
  x_32 = l_Lean_Expr_isBVar(x_7);
  lean_dec(x_7);
  if (x_32 == 0)
  {
  lean_object* x_33; lean_object* x_34; 
  x_33 = l_Lean_mkAppRev(x_15, x_30);
  lean_dec(x_30);
  x_34 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_34, 0, x_33);
  lean_ctor_set(x_34, 1, x_31);
  return x_34;
  }
  else
  {
  lean_object* x_35; lean_object* x_36; 
  x_35 = l_Lean_Expr_betaRev(x_15, x_30);
  lean_dec(x_30);
  lean_dec(x_15);
  x_36 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_36, 0, x_35);
  lean_ctor_set(x_36, 1, x_31);
  return x_36;
  }
  }
  }
  }
  }
  static lean_object* _init_l_Lean_Expr_instantiateBetaRevRange_visit___closed__1() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; 
  x_1 = l_Lean_Position_lt___closed__1;
  x_2 = lean_alloc_closure((void*)(l_instBEq___rarg), 3, 1);
  lean_closure_set(x_2, 0, x_1);
  return x_2;
  }
  }
  static lean_object* _init_l_Lean_Expr_instantiateBetaRevRange_visit___closed__2() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; 
  x_1 = l_Lean_Expr_instBEqExpr;
  x_2 = l_Lean_Expr_instantiateBetaRevRange_visit___closed__1;
  x_3 = lean_alloc_closure((void*)(l_instBEqProd___rarg), 4, 2);
  lean_closure_set(x_3, 0, x_1);
  lean_closure_set(x_3, 1, x_2);
  return x_3;
  }
  }
  static lean_object* _init_l_Lean_Expr_instantiateBetaRevRange_visit___closed__3() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_alloc_closure((void*)(l_instHashableNat___boxed), 1, 0);
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Expr_instantiateBetaRevRange_visit___closed__4() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; 
  x_1 = l_Lean_Expr_instHashableExpr;
  x_2 = l_Lean_Expr_instantiateBetaRevRange_visit___closed__3;
  x_3 = lean_alloc_closure((void*)(l_instHashableProd___rarg___boxed), 3, 2);
  lean_closure_set(x_3, 0, x_1);
  lean_closure_set(x_3, 1, x_2);
  return x_3;
  }
  }
  static lean_object* _init_l_Lean_Expr_instantiateBetaRevRange_visit___closed__5() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; 
  x_1 = l___private_Init_Data_Format_Basic_0__Std_Format_be___closed__2;
  x_2 = l_Lean_instInhabitedExpr;
  x_3 = l_instInhabited___rarg(x_1, x_2);
  return x_3;
  }
  }
  static lean_object* _init_l_Lean_Expr_instantiateBetaRevRange_visit___closed__6() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("Lean.Meta.InferType");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Expr_instantiateBetaRevRange_visit___closed__7() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("Lean.Expr.instantiateBetaRevRange.visit");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Expr_instantiateBetaRevRange_visit___closed__8() {
  _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_Expr_instantiateBetaRevRange_visit___closed__6;
  x_2 = l_Lean_Expr_instantiateBetaRevRange_visit___closed__7;
  x_3 = lean_unsigned_to_nat(62u);
  x_4 = lean_unsigned_to_nat(25u);
  x_5 = l_Lean_Name_getString_x21___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_Expr_instantiateBetaRevRange_visit___closed__9() {
  _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_Expr_instantiateBetaRevRange_visit___closed__6;
  x_2 = l_Lean_Expr_instantiateBetaRevRange_visit___closed__7;
  x_3 = lean_unsigned_to_nat(63u);
  x_4 = lean_unsigned_to_nat(25u);
  x_5 = l_Lean_Name_getString_x21___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_Expr_instantiateBetaRevRange_visit___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_Expr_instantiateBetaRevRange_visit___closed__6;
  x_2 = l_Lean_Expr_instantiateBetaRevRange_visit___closed__7;
  x_3 = lean_unsigned_to_nat(64u);
  x_4 = lean_unsigned_to_nat(25u);
  x_5 = l_Lean_Name_getString_x21___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_Expr_instantiateBetaRevRange_visit___closed__11() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; 
  x_1 = l_Lean_Expr_instantiateBetaRevRange_visit___closed__6;
  x_2 = l_Lean_Expr_instantiateBetaRevRange_visit___closed__7;
  x_3 = lean_unsigned_to_nat(61u);
  x_4 = lean_unsigned_to_nat(25u);
  x_5 = l_Lean_Name_getString_x21___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_Expr_instantiateBetaRevRange_visit___closed__12() {
  _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_Expr_instantiateBetaRevRange_visit___closed__6;
  x_2 = l_Lean_Expr_instantiateBetaRevRange_visit___closed__7;
  x_3 = lean_unsigned_to_nat(65u);
  x_4 = lean_unsigned_to_nat(25u);
  x_5 = l_Lean_Name_getString_x21___closed__3;
  x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5);
  return x_6;
  }
  }
  lean_object* l_Lean_Expr_instantiateBetaRevRange_visit(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
  _start:
  {
  lean_object* x_7; uint8_t x_8; 
  x_7 = l_Lean_Expr_looseBVarRange(x_4);
  x_8 = lean_nat_dec_le(x_7, x_5);
  lean_dec(x_7);
  if (x_8 == 0)
  {
  lean_object* x_9; lean_object* x_10; 
  lean_inc(x_5);
  lean_inc(x_4);
  x_9 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_9, 0, x_4);
  lean_ctor_set(x_9, 1, x_5);
  x_10 = l_Std_HashMapImp_find_x3f___at_Lean_Expr_instantiateBetaRevRange_visit___spec__1(x_6, x_9);
  if (lean_obj_tag(x_10) == 0)
  {
  switch (lean_obj_tag(x_4)) {
  case 0:
  {
  lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; 
  x_11 = lean_ctor_get(x_4, 0);
  lean_inc(x_11);
  lean_dec(x_4);
  x_12 = lean_nat_sub(x_2, x_1);
  lean_dec(x_1);
  x_13 = lean_nat_add(x_5, x_12);
  x_14 = lean_nat_dec_lt(x_11, x_13);
  lean_dec(x_13);
  if (x_14 == 0)
  {
  lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; 
  lean_dec(x_5);
  lean_dec(x_3);
  lean_dec(x_2);
  x_15 = lean_nat_sub(x_11, x_12);
  lean_dec(x_12);
  lean_dec(x_11);
  x_16 = l_Lean_mkBVar(x_15);
  lean_inc(x_16);
  x_17 = l_Std_HashMapImp_insert___at_Lean_Expr_instantiateBetaRevRange_visit___spec__3(x_6, x_9, x_16);
  x_18 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_18, 0, x_16);
  lean_ctor_set(x_18, 1, x_17);
  return x_18;
  }
  else
  {
  lean_object* x_19; lean_object* x_20; lean_object* x_21; 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_dec(x_12);
  x_19 = lean_nat_sub(x_11, x_5);
  lean_dec(x_11);
  x_20 = lean_nat_sub(x_2, x_19);
  lean_dec(x_19);
  lean_dec(x_2);
  x_21 = lean_unsigned_to_nat(1u);
  x_22 = lean_nat_sub(x_20, x_21);
  lean_dec(x_20);
  x_23 = l_Lean_instInhabitedExpr;
  x_24 = lean_array_get(x_23, x_3, x_22);
  lean_dec(x_22);
  lean_dec(x_3);
  x_25 = lean_unsigned_to_nat(0u);
  x_26 = lean_expr_lift_loose_bvars(x_24, x_25, x_5);
  lean_dec(x_5);
  lean_dec(x_24);
  lean_inc(x_26);
  x_27 = l_Std_HashMapImp_insert___at_Lean_Expr_instantiateBetaRevRange_visit___spec__3(x_6, x_9, x_26);
  x_28 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_28, 0, x_26);
  lean_ctor_set(x_28, 1, x_27);
  return x_28;
  }
  }
  case 1:
  {
  lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; uint8_t x_33; 
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_29 = l_Lean_Expr_instantiateBetaRevRange_visit___closed__5;
  x_30 = l_Lean_Expr_instantiateBetaRevRange_visit___closed__8;
  x_31 = lean_panic_fn(x_29, x_30);
  x_32 = lean_apply_1(x_31, x_6);
  x_33 = !lean_is_exclusive(x_32);
  if (x_33 == 0)
  {
  lean_object* x_34; lean_object* x_35; lean_object* x_36; 
  x_34 = lean_ctor_get(x_32, 0);
  x_35 = lean_ctor_get(x_32, 1);
  lean_inc(x_34);
  x_36 = l_Std_HashMapImp_insert___at_Lean_Expr_instantiateBetaRevRange_visit___spec__3(x_35, x_9, x_34);
  lean_ctor_set(x_32, 1, x_36);
  return x_32;
  }
  else
  {
  lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; 
  x_37 = lean_ctor_get(x_32, 0);
  x_38 = lean_ctor_get(x_32, 1);
  lean_inc(x_38);
  lean_inc(x_37);
  lean_dec(x_32);
  lean_inc(x_37);
  x_39 = l_Std_HashMapImp_insert___at_Lean_Expr_instantiateBetaRevRange_visit___spec__3(x_38, x_9, x_37);
  x_40 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_40, 0, x_37);
  lean_ctor_set(x_40, 1, x_39);
  return x_40;
  }
  }
  case 2:
  {
  lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; uint8_t x_45; 
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_41 = l_Lean_Expr_instantiateBetaRevRange_visit___closed__5;
  x_42 = l_Lean_Expr_instantiateBetaRevRange_visit___closed__9;
  x_43 = lean_panic_fn(x_41, x_42);
  x_44 = lean_apply_1(x_43, x_6);
  x_45 = !lean_is_exclusive(x_44);
  if (x_45 == 0)
  {
  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_46);
  x_48 = l_Std_HashMapImp_insert___at_Lean_Expr_instantiateBetaRevRange_visit___spec__3(x_47, x_9, x_46);
  lean_ctor_set(x_44, 1, x_48);
  return x_44;
  }
  else
  {
  lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; 
  x_49 = lean_ctor_get(x_44, 0);
  x_50 = lean_ctor_get(x_44, 1);
  lean_inc(x_50);
  lean_inc(x_49);
  lean_dec(x_44);
  lean_inc(x_49);
  x_51 = l_Std_HashMapImp_insert___at_Lean_Expr_instantiateBetaRevRange_visit___spec__3(x_50, x_9, x_49);
  x_52 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_52, 0, x_49);
  lean_ctor_set(x_52, 1, x_51);
  return x_52;
  }
  }
  case 3:
  {
  lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; uint8_t x_57; 
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_53 = l_Lean_Expr_instantiateBetaRevRange_visit___closed__5;
  x_54 = l_Lean_Expr_instantiateBetaRevRange_visit___closed__10;
  x_55 = lean_panic_fn(x_53, x_54);
  x_56 = lean_apply_1(x_55, x_6);
  x_57 = !lean_is_exclusive(x_56);
  if (x_57 == 0)
  {
  lean_object* x_58; lean_object* x_59; lean_object* x_60; 
  x_58 = lean_ctor_get(x_56, 0);
  x_59 = lean_ctor_get(x_56, 1);
  lean_inc(x_58);
  x_60 = l_Std_HashMapImp_insert___at_Lean_Expr_instantiateBetaRevRange_visit___spec__3(x_59, x_9, x_58);
  lean_ctor_set(x_56, 1, x_60);
  return x_56;
  }
  else
  {
  lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; 
  x_61 = lean_ctor_get(x_56, 0);
  x_62 = lean_ctor_get(x_56, 1);
  lean_inc(x_62);
  lean_inc(x_61);
  lean_dec(x_56);
  lean_inc(x_61);
  x_63 = l_Std_HashMapImp_insert___at_Lean_Expr_instantiateBetaRevRange_visit___spec__3(x_62, x_9, x_61);
  x_64 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_64, 0, x_61);
  lean_ctor_set(x_64, 1, x_63);
  return x_64;
  }
  }
  case 4:
  {
  lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; uint8_t x_69; 
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_65 = l_Lean_Expr_instantiateBetaRevRange_visit___closed__5;
  x_66 = l_Lean_Expr_instantiateBetaRevRange_visit___closed__11;
  x_67 = lean_panic_fn(x_65, x_66);
  x_68 = lean_apply_1(x_67, x_6);
  x_69 = !lean_is_exclusive(x_68);
  if (x_69 == 0)
  {
  lean_object* x_70; lean_object* x_71; lean_object* x_72; 
  x_70 = lean_ctor_get(x_68, 0);
  x_71 = lean_ctor_get(x_68, 1);
  lean_inc(x_70);
  x_72 = l_Std_HashMapImp_insert___at_Lean_Expr_instantiateBetaRevRange_visit___spec__3(x_71, x_9, x_70);
  lean_ctor_set(x_68, 1, x_72);
  return x_68;
  }
  else
  {
  lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; 
  x_73 = lean_ctor_get(x_68, 0);
  x_74 = lean_ctor_get(x_68, 1);
  lean_inc(x_74);
  lean_inc(x_73);
  lean_dec(x_68);
  lean_inc(x_73);
  x_75 = l_Std_HashMapImp_insert___at_Lean_Expr_instantiateBetaRevRange_visit___spec__3(x_74, x_9, x_73);
  x_76 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_76, 0, x_73);
  lean_ctor_set(x_76, 1, x_75);
  return x_76;
  }
  }
  case 5:
  {
  lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; uint8_t x_83; 
  x_77 = lean_unsigned_to_nat(0u);
  x_78 = l_Lean_Expr_getAppNumArgsAux(x_4, x_77);
  x_79 = lean_mk_empty_array_with_capacity(x_78);
  lean_dec(x_78);
  x_80 = l_Lean_Expr_instantiateBetaRevRange_visit___closed__2;
  x_81 = l_Lean_Expr_instantiateBetaRevRange_visit___closed__4;
  x_82 = l___private_Lean_Expr_0__Lean_Expr_withAppRevAux___at_Lean_Expr_instantiateBetaRevRange_visit___spec__10(x_1, x_2, x_3, x_5, x_80, x_81, x_4, x_79, x_6);
  x_83 = !lean_is_exclusive(x_82);
  if (x_83 == 0)
  {
  lean_object* x_84; lean_object* x_85; lean_object* x_86; 
  x_84 = lean_ctor_get(x_82, 0);
  x_85 = lean_ctor_get(x_82, 1);
  lean_inc(x_84);
  x_86 = l_Std_HashMapImp_insert___at_Lean_Expr_instantiateBetaRevRange_visit___spec__3(x_85, x_9, x_84);
  lean_ctor_set(x_82, 1, x_86);
  return x_82;
  }
  else
  {
  lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; 
  x_87 = lean_ctor_get(x_82, 0);
  x_88 = lean_ctor_get(x_82, 1);
  lean_inc(x_88);
  lean_inc(x_87);
  lean_dec(x_82);
  lean_inc(x_87);
  x_89 = l_Std_HashMapImp_insert___at_Lean_Expr_instantiateBetaRevRange_visit___spec__3(x_88, x_9, x_87);
  x_90 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_90, 0, x_87);
  lean_ctor_set(x_90, 1, x_89);
  return x_90;
  }
  }
  case 6:
  {
  uint8_t x_91; 
  x_91 = !lean_is_exclusive(x_4);
  if (x_91 == 0)
  {
  lean_object* x_92; lean_object* x_93; uint64_t 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; uint8_t x_101; 
  x_92 = lean_ctor_get(x_4, 1);
  x_93 = lean_ctor_get(x_4, 2);
  x_94 = lean_ctor_get_uint64(x_4, sizeof(void*)*3);
  lean_inc(x_5);
  lean_inc(x_92);
  lean_inc(x_3);
  lean_inc(x_2);
  lean_inc(x_1);
  x_95 = l_Lean_Expr_instantiateBetaRevRange_visit(x_1, x_2, x_3, x_92, x_5, x_6);
  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_unsigned_to_nat(1u);
  x_99 = lean_nat_add(x_5, x_98);
  lean_dec(x_5);
  lean_inc(x_93);
  x_100 = l_Lean_Expr_instantiateBetaRevRange_visit(x_1, x_2, x_3, x_93, x_99, x_97);
  x_101 = !lean_is_exclusive(x_100);
  if (x_101 == 0)
  {
  lean_object* x_102; lean_object* x_103; uint8_t x_104; lean_object* x_105; lean_object* x_106; 
  x_102 = lean_ctor_get(x_100, 0);
  x_103 = lean_ctor_get(x_100, 1);
  x_104 = (uint8_t)((x_94 << 24) >> 61);
  x_105 = lean_expr_update_lambda(x_4, x_104, x_96, x_102);
  lean_inc(x_105);
  x_106 = l_Std_HashMapImp_insert___at_Lean_Expr_instantiateBetaRevRange_visit___spec__3(x_103, x_9, x_105);
  lean_ctor_set(x_100, 1, x_106);
  lean_ctor_set(x_100, 0, x_105);
  return x_100;
  }
  else
  {
  lean_object* x_107; lean_object* x_108; uint8_t x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; 
  x_107 = lean_ctor_get(x_100, 0);
  x_108 = lean_ctor_get(x_100, 1);
  lean_inc(x_108);
  lean_inc(x_107);
  lean_dec(x_100);
  x_109 = (uint8_t)((x_94 << 24) >> 61);
  x_110 = lean_expr_update_lambda(x_4, x_109, x_96, x_107);
  lean_inc(x_110);
  x_111 = l_Std_HashMapImp_insert___at_Lean_Expr_instantiateBetaRevRange_visit___spec__3(x_108, x_9, x_110);
  x_112 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_112, 0, x_110);
  lean_ctor_set(x_112, 1, x_111);
  return x_112;
  }
  }
  else
  {
  lean_object* x_113; lean_object* x_114; lean_object* x_115; uint64_t 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; lean_object* x_124; lean_object* x_125; lean_object* x_126; uint8_t x_127; lean_object* x_128; lean_object* x_129; lean_object* x_130; 
  x_113 = lean_ctor_get(x_4, 0);
  x_114 = lean_ctor_get(x_4, 1);
  x_115 = lean_ctor_get(x_4, 2);
  x_116 = lean_ctor_get_uint64(x_4, sizeof(void*)*3);
  lean_inc(x_115);
  lean_inc(x_114);
  lean_inc(x_113);
  lean_dec(x_4);
  lean_inc(x_5);
  lean_inc(x_114);
  lean_inc(x_3);
  lean_inc(x_2);
  lean_inc(x_1);
  x_117 = l_Lean_Expr_instantiateBetaRevRange_visit(x_1, x_2, x_3, x_114, x_5, x_6);
  x_118 = lean_ctor_get(x_117, 0);
  lean_inc(x_118);
  x_119 = lean_ctor_get(x_117, 1);
  lean_inc(x_119);
  lean_dec(x_117);
  x_120 = lean_unsigned_to_nat(1u);
  x_121 = lean_nat_add(x_5, x_120);
  lean_dec(x_5);
  lean_inc(x_115);
  x_122 = l_Lean_Expr_instantiateBetaRevRange_visit(x_1, x_2, x_3, x_115, x_121, x_119);
  x_123 = lean_ctor_get(x_122, 0);
  lean_inc(x_123);
  x_124 = lean_ctor_get(x_122, 1);
  lean_inc(x_124);
  if (lean_is_exclusive(x_122)) {
   lean_ctor_release(x_122, 0);
   lean_ctor_release(x_122, 1);
   x_125 = x_122;
  } else {
   lean_dec_ref(x_122);
   x_125 = lean_box(0);
  }
  x_126 = lean_alloc_ctor(6, 3, 8);
  lean_ctor_set(x_126, 0, x_113);
  lean_ctor_set(x_126, 1, x_114);
  lean_ctor_set(x_126, 2, x_115);
  lean_ctor_set_uint64(x_126, sizeof(void*)*3, x_116);
  x_127 = (uint8_t)((x_116 << 24) >> 61);
  x_128 = lean_expr_update_lambda(x_126, x_127, x_118, x_123);
  lean_inc(x_128);
  x_129 = l_Std_HashMapImp_insert___at_Lean_Expr_instantiateBetaRevRange_visit___spec__3(x_124, x_9, x_128);
  if (lean_is_scalar(x_125)) {
   x_130 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_130 = x_125;
  }
  lean_ctor_set(x_130, 0, x_128);
  lean_ctor_set(x_130, 1, x_129);
  return x_130;
  }
  }
  case 7:
  {
  uint8_t x_131; 
  x_131 = !lean_is_exclusive(x_4);
  if (x_131 == 0)
  {
  lean_object* x_132; lean_object* x_133; uint64_t 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; uint8_t x_141; 
  x_132 = lean_ctor_get(x_4, 1);
  x_133 = lean_ctor_get(x_4, 2);
  x_134 = lean_ctor_get_uint64(x_4, sizeof(void*)*3);
  lean_inc(x_5);
  lean_inc(x_132);
  lean_inc(x_3);
  lean_inc(x_2);
  lean_inc(x_1);
  x_135 = l_Lean_Expr_instantiateBetaRevRange_visit(x_1, x_2, x_3, x_132, x_5, x_6);
  x_136 = lean_ctor_get(x_135, 0);
  lean_inc(x_136);
  x_137 = lean_ctor_get(x_135, 1);
  lean_inc(x_137);
  lean_dec(x_135);
  x_138 = lean_unsigned_to_nat(1u);
  x_139 = lean_nat_add(x_5, x_138);
  lean_dec(x_5);
  lean_inc(x_133);
  x_140 = l_Lean_Expr_instantiateBetaRevRange_visit(x_1, x_2, x_3, x_133, x_139, x_137);
  x_141 = !lean_is_exclusive(x_140);
  if (x_141 == 0)
  {
  lean_object* x_142; lean_object* x_143; uint8_t x_144; lean_object* x_145; lean_object* x_146; 
  x_142 = lean_ctor_get(x_140, 0);
  x_143 = lean_ctor_get(x_140, 1);
  x_144 = (uint8_t)((x_134 << 24) >> 61);
  x_145 = lean_expr_update_forall(x_4, x_144, x_136, x_142);
  lean_inc(x_145);
  x_146 = l_Std_HashMapImp_insert___at_Lean_Expr_instantiateBetaRevRange_visit___spec__3(x_143, x_9, x_145);
  lean_ctor_set(x_140, 1, x_146);
  lean_ctor_set(x_140, 0, x_145);
  return x_140;
  }
  else
  {
  lean_object* x_147; lean_object* x_148; uint8_t x_149; lean_object* x_150; lean_object* x_151; lean_object* x_152; 
  x_147 = lean_ctor_get(x_140, 0);
  x_148 = lean_ctor_get(x_140, 1);
  lean_inc(x_148);
  lean_inc(x_147);
  lean_dec(x_140);
  x_149 = (uint8_t)((x_134 << 24) >> 61);
  x_150 = lean_expr_update_forall(x_4, x_149, x_136, x_147);
  lean_inc(x_150);
  x_151 = l_Std_HashMapImp_insert___at_Lean_Expr_instantiateBetaRevRange_visit___spec__3(x_148, x_9, x_150);
  x_152 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_152, 0, x_150);
  lean_ctor_set(x_152, 1, x_151);
  return x_152;
  }
  }
  else
  {
  lean_object* x_153; lean_object* x_154; lean_object* x_155; uint64_t 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; uint8_t x_167; lean_object* x_168; lean_object* x_169; lean_object* x_170; 
  x_153 = lean_ctor_get(x_4, 0);
  x_154 = lean_ctor_get(x_4, 1);
  x_155 = lean_ctor_get(x_4, 2);
  x_156 = lean_ctor_get_uint64(x_4, sizeof(void*)*3);
  lean_inc(x_155);
  lean_inc(x_154);
  lean_inc(x_153);
  lean_dec(x_4);
  lean_inc(x_5);
  lean_inc(x_154);
  lean_inc(x_3);
  lean_inc(x_2);
  lean_inc(x_1);
  x_157 = l_Lean_Expr_instantiateBetaRevRange_visit(x_1, x_2, x_3, x_154, x_5, x_6);
  x_158 = lean_ctor_get(x_157, 0);
  lean_inc(x_158);
  x_159 = lean_ctor_get(x_157, 1);
  lean_inc(x_159);
  lean_dec(x_157);
  x_160 = lean_unsigned_to_nat(1u);
  x_161 = lean_nat_add(x_5, x_160);
  lean_dec(x_5);
  lean_inc(x_155);
  x_162 = l_Lean_Expr_instantiateBetaRevRange_visit(x_1, x_2, x_3, x_155, x_161, x_159);
  x_163 = lean_ctor_get(x_162, 0);
  lean_inc(x_163);
  x_164 = lean_ctor_get(x_162, 1);
  lean_inc(x_164);
  if (lean_is_exclusive(x_162)) {
   lean_ctor_release(x_162, 0);
   lean_ctor_release(x_162, 1);
   x_165 = x_162;
  } else {
   lean_dec_ref(x_162);
   x_165 = lean_box(0);
  }
  x_166 = lean_alloc_ctor(7, 3, 8);
  lean_ctor_set(x_166, 0, x_153);
  lean_ctor_set(x_166, 1, x_154);
  lean_ctor_set(x_166, 2, x_155);
  lean_ctor_set_uint64(x_166, sizeof(void*)*3, x_156);
  x_167 = (uint8_t)((x_156 << 24) >> 61);
  x_168 = lean_expr_update_forall(x_166, x_167, x_158, x_163);
  lean_inc(x_168);
  x_169 = l_Std_HashMapImp_insert___at_Lean_Expr_instantiateBetaRevRange_visit___spec__3(x_164, x_9, x_168);
  if (lean_is_scalar(x_165)) {
   x_170 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_170 = x_165;
  }
  lean_ctor_set(x_170, 0, x_168);
  lean_ctor_set(x_170, 1, x_169);
  return x_170;
  }
  }
  case 8:
  {
  uint8_t x_171; 
  x_171 = !lean_is_exclusive(x_4);
  if (x_171 == 0)
  {
  lean_object* x_172; lean_object* x_173; lean_object* x_174; lean_object* x_175; lean_object* x_176; lean_object* x_177; lean_object* x_178; lean_object* x_179; lean_object* x_180; lean_object* x_181; lean_object* x_182; lean_object* x_183; uint8_t x_184; 
  x_172 = lean_ctor_get(x_4, 1);
  x_173 = lean_ctor_get(x_4, 2);
  x_174 = lean_ctor_get(x_4, 3);
  lean_inc(x_5);
  lean_inc(x_172);
  lean_inc(x_3);
  lean_inc(x_2);
  lean_inc(x_1);
  x_175 = l_Lean_Expr_instantiateBetaRevRange_visit(x_1, x_2, x_3, x_172, x_5, x_6);
  x_176 = lean_ctor_get(x_175, 0);
  lean_inc(x_176);
  x_177 = lean_ctor_get(x_175, 1);
  lean_inc(x_177);
  lean_dec(x_175);
  lean_inc(x_5);
  lean_inc(x_173);
  lean_inc(x_3);
  lean_inc(x_2);
  lean_inc(x_1);
  x_178 = l_Lean_Expr_instantiateBetaRevRange_visit(x_1, x_2, x_3, x_173, x_5, x_177);
  x_179 = lean_ctor_get(x_178, 0);
  lean_inc(x_179);
  x_180 = lean_ctor_get(x_178, 1);
  lean_inc(x_180);
  lean_dec(x_178);
  x_181 = lean_unsigned_to_nat(1u);
  x_182 = lean_nat_add(x_5, x_181);
  lean_dec(x_5);
  lean_inc(x_174);
  x_183 = l_Lean_Expr_instantiateBetaRevRange_visit(x_1, x_2, x_3, x_174, x_182, x_180);
  x_184 = !lean_is_exclusive(x_183);
  if (x_184 == 0)
  {
  lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; 
  x_185 = lean_ctor_get(x_183, 0);
  x_186 = lean_ctor_get(x_183, 1);
  x_187 = lean_expr_update_let(x_4, x_176, x_179, x_185);
  lean_inc(x_187);
  x_188 = l_Std_HashMapImp_insert___at_Lean_Expr_instantiateBetaRevRange_visit___spec__3(x_186, x_9, x_187);
  lean_ctor_set(x_183, 1, x_188);
  lean_ctor_set(x_183, 0, x_187);
  return x_183;
  }
  else
  {
  lean_object* x_189; lean_object* x_190; lean_object* x_191; lean_object* x_192; lean_object* x_193; 
  x_189 = lean_ctor_get(x_183, 0);
  x_190 = lean_ctor_get(x_183, 1);
  lean_inc(x_190);
  lean_inc(x_189);
  lean_dec(x_183);
  x_191 = lean_expr_update_let(x_4, x_176, x_179, x_189);
  lean_inc(x_191);
  x_192 = l_Std_HashMapImp_insert___at_Lean_Expr_instantiateBetaRevRange_visit___spec__3(x_190, x_9, x_191);
  x_193 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_193, 0, x_191);
  lean_ctor_set(x_193, 1, x_192);
  return x_193;
  }
  }
  else
  {
  lean_object* x_194; lean_object* x_195; lean_object* x_196; lean_object* x_197; uint64_t 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; lean_object* x_205; lean_object* x_206; lean_object* x_207; lean_object* x_208; lean_object* x_209; lean_object* x_210; lean_object* x_211; lean_object* x_212; lean_object* x_213; lean_object* x_214; 
  x_194 = lean_ctor_get(x_4, 0);
  x_195 = lean_ctor_get(x_4, 1);
  x_196 = lean_ctor_get(x_4, 2);
  x_197 = lean_ctor_get(x_4, 3);
  x_198 = lean_ctor_get_uint64(x_4, sizeof(void*)*4);
  lean_inc(x_197);
  lean_inc(x_196);
  lean_inc(x_195);
  lean_inc(x_194);
  lean_dec(x_4);
  lean_inc(x_5);
  lean_inc(x_195);
  lean_inc(x_3);
  lean_inc(x_2);
  lean_inc(x_1);
  x_199 = l_Lean_Expr_instantiateBetaRevRange_visit(x_1, x_2, x_3, x_195, x_5, x_6);
  x_200 = lean_ctor_get(x_199, 0);
  lean_inc(x_200);
  x_201 = lean_ctor_get(x_199, 1);
  lean_inc(x_201);
  lean_dec(x_199);
  lean_inc(x_5);
  lean_inc(x_196);
  lean_inc(x_3);
  lean_inc(x_2);
  lean_inc(x_1);
  x_202 = l_Lean_Expr_instantiateBetaRevRange_visit(x_1, x_2, x_3, x_196, x_5, x_201);
  x_203 = lean_ctor_get(x_202, 0);
  lean_inc(x_203);
  x_204 = lean_ctor_get(x_202, 1);
  lean_inc(x_204);
  lean_dec(x_202);
  x_205 = lean_unsigned_to_nat(1u);
  x_206 = lean_nat_add(x_5, x_205);
  lean_dec(x_5);
  lean_inc(x_197);
  x_207 = l_Lean_Expr_instantiateBetaRevRange_visit(x_1, x_2, x_3, x_197, x_206, x_204);
  x_208 = lean_ctor_get(x_207, 0);
  lean_inc(x_208);
  x_209 = lean_ctor_get(x_207, 1);
  lean_inc(x_209);
  if (lean_is_exclusive(x_207)) {
   lean_ctor_release(x_207, 0);
   lean_ctor_release(x_207, 1);
   x_210 = x_207;
  } else {
   lean_dec_ref(x_207);
   x_210 = lean_box(0);
  }
  x_211 = lean_alloc_ctor(8, 4, 8);
  lean_ctor_set(x_211, 0, x_194);
  lean_ctor_set(x_211, 1, x_195);
  lean_ctor_set(x_211, 2, x_196);
  lean_ctor_set(x_211, 3, x_197);
  lean_ctor_set_uint64(x_211, sizeof(void*)*4, x_198);
  x_212 = lean_expr_update_let(x_211, x_200, x_203, x_208);
  lean_inc(x_212);
  x_213 = l_Std_HashMapImp_insert___at_Lean_Expr_instantiateBetaRevRange_visit___spec__3(x_209, x_9, x_212);
  if (lean_is_scalar(x_210)) {
   x_214 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_214 = x_210;
  }
  lean_ctor_set(x_214, 0, x_212);
  lean_ctor_set(x_214, 1, x_213);
  return x_214;
  }
  }
  case 9:
  {
  lean_object* x_215; lean_object* x_216; lean_object* x_217; lean_object* x_218; uint8_t x_219; 
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_215 = l_Lean_Expr_instantiateBetaRevRange_visit___closed__5;
  x_216 = l_Lean_Expr_instantiateBetaRevRange_visit___closed__12;
  x_217 = lean_panic_fn(x_215, x_216);
  x_218 = lean_apply_1(x_217, x_6);
  x_219 = !lean_is_exclusive(x_218);
  if (x_219 == 0)
  {
  lean_object* x_220; lean_object* x_221; lean_object* x_222; 
  x_220 = lean_ctor_get(x_218, 0);
  x_221 = lean_ctor_get(x_218, 1);
  lean_inc(x_220);
  x_222 = l_Std_HashMapImp_insert___at_Lean_Expr_instantiateBetaRevRange_visit___spec__3(x_221, x_9, x_220);
  lean_ctor_set(x_218, 1, x_222);
  return x_218;
  }
  else
  {
  lean_object* x_223; lean_object* x_224; lean_object* x_225; lean_object* x_226; 
  x_223 = lean_ctor_get(x_218, 0);
  x_224 = lean_ctor_get(x_218, 1);
  lean_inc(x_224);
  lean_inc(x_223);
  lean_dec(x_218);
  lean_inc(x_223);
  x_225 = l_Std_HashMapImp_insert___at_Lean_Expr_instantiateBetaRevRange_visit___spec__3(x_224, x_9, x_223);
  x_226 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_226, 0, x_223);
  lean_ctor_set(x_226, 1, x_225);
  return x_226;
  }
  }
  case 10:
  {
  uint8_t x_227; 
  x_227 = !lean_is_exclusive(x_4);
  if (x_227 == 0)
  {
  lean_object* x_228; lean_object* x_229; uint8_t x_230; 
  x_228 = lean_ctor_get(x_4, 1);
  lean_inc(x_228);
  x_229 = l_Lean_Expr_instantiateBetaRevRange_visit(x_1, x_2, x_3, x_228, x_5, x_6);
  x_230 = !lean_is_exclusive(x_229);
  if (x_230 == 0)
  {
  lean_object* x_231; lean_object* x_232; lean_object* x_233; lean_object* x_234; 
  x_231 = lean_ctor_get(x_229, 0);
  x_232 = lean_ctor_get(x_229, 1);
  x_233 = lean_expr_update_mdata(x_4, x_231);
  lean_inc(x_233);
  x_234 = l_Std_HashMapImp_insert___at_Lean_Expr_instantiateBetaRevRange_visit___spec__3(x_232, x_9, x_233);
  lean_ctor_set(x_229, 1, x_234);
  lean_ctor_set(x_229, 0, x_233);
  return x_229;
  }
  else
  {
  lean_object* x_235; lean_object* x_236; lean_object* x_237; lean_object* x_238; lean_object* x_239; 
  x_235 = lean_ctor_get(x_229, 0);
  x_236 = lean_ctor_get(x_229, 1);
  lean_inc(x_236);
  lean_inc(x_235);
  lean_dec(x_229);
  x_237 = lean_expr_update_mdata(x_4, x_235);
  lean_inc(x_237);
  x_238 = l_Std_HashMapImp_insert___at_Lean_Expr_instantiateBetaRevRange_visit___spec__3(x_236, x_9, x_237);
  x_239 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_239, 0, x_237);
  lean_ctor_set(x_239, 1, x_238);
  return x_239;
  }
  }
  else
  {
  lean_object* x_240; lean_object* x_241; uint64_t x_242; lean_object* x_243; lean_object* x_244; lean_object* x_245; lean_object* x_246; lean_object* x_247; lean_object* x_248; lean_object* x_249; lean_object* x_250; 
  x_240 = lean_ctor_get(x_4, 0);
  x_241 = lean_ctor_get(x_4, 1);
  x_242 = lean_ctor_get_uint64(x_4, sizeof(void*)*2);
  lean_inc(x_241);
  lean_inc(x_240);
  lean_dec(x_4);
  lean_inc(x_241);
  x_243 = l_Lean_Expr_instantiateBetaRevRange_visit(x_1, x_2, x_3, x_241, x_5, x_6);
  x_244 = lean_ctor_get(x_243, 0);
  lean_inc(x_244);
  x_245 = lean_ctor_get(x_243, 1);
  lean_inc(x_245);
  if (lean_is_exclusive(x_243)) {
   lean_ctor_release(x_243, 0);
   lean_ctor_release(x_243, 1);
   x_246 = x_243;
  } else {
   lean_dec_ref(x_243);
   x_246 = lean_box(0);
  }
  x_247 = lean_alloc_ctor(10, 2, 8);
  lean_ctor_set(x_247, 0, x_240);
  lean_ctor_set(x_247, 1, x_241);
  lean_ctor_set_uint64(x_247, sizeof(void*)*2, x_242);
  x_248 = lean_expr_update_mdata(x_247, x_244);
  lean_inc(x_248);
  x_249 = l_Std_HashMapImp_insert___at_Lean_Expr_instantiateBetaRevRange_visit___spec__3(x_245, x_9, x_248);
  if (lean_is_scalar(x_246)) {
   x_250 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_250 = x_246;
  }
  lean_ctor_set(x_250, 0, x_248);
  lean_ctor_set(x_250, 1, x_249);
  return x_250;
  }
  }
  default: 
  {
  uint8_t x_251; 
  x_251 = !lean_is_exclusive(x_4);
  if (x_251 == 0)
  {
  lean_object* x_252; lean_object* x_253; uint8_t x_254; 
  x_252 = lean_ctor_get(x_4, 2);
  lean_inc(x_252);
  x_253 = l_Lean_Expr_instantiateBetaRevRange_visit(x_1, x_2, x_3, x_252, x_5, x_6);
  x_254 = !lean_is_exclusive(x_253);
  if (x_254 == 0)
  {
  lean_object* x_255; lean_object* x_256; lean_object* x_257; lean_object* x_258; 
  x_255 = lean_ctor_get(x_253, 0);
  x_256 = lean_ctor_get(x_253, 1);
  x_257 = lean_expr_update_proj(x_4, x_255);
  lean_inc(x_257);
  x_258 = l_Std_HashMapImp_insert___at_Lean_Expr_instantiateBetaRevRange_visit___spec__3(x_256, x_9, x_257);
  lean_ctor_set(x_253, 1, x_258);
  lean_ctor_set(x_253, 0, x_257);
  return x_253;
  }
  else
  {
  lean_object* x_259; lean_object* x_260; lean_object* x_261; lean_object* x_262; lean_object* x_263; 
  x_259 = lean_ctor_get(x_253, 0);
  x_260 = lean_ctor_get(x_253, 1);
  lean_inc(x_260);
  lean_inc(x_259);
  lean_dec(x_253);
  x_261 = lean_expr_update_proj(x_4, x_259);
  lean_inc(x_261);
  x_262 = l_Std_HashMapImp_insert___at_Lean_Expr_instantiateBetaRevRange_visit___spec__3(x_260, x_9, x_261);
  x_263 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_263, 0, x_261);
  lean_ctor_set(x_263, 1, x_262);
  return x_263;
  }
  }
  else
  {
  lean_object* x_264; lean_object* x_265; lean_object* x_266; uint64_t 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; lean_object* x_274; lean_object* x_275; 
  x_264 = lean_ctor_get(x_4, 0);
  x_265 = lean_ctor_get(x_4, 1);
  x_266 = lean_ctor_get(x_4, 2);
  x_267 = lean_ctor_get_uint64(x_4, sizeof(void*)*3);
  lean_inc(x_266);
  lean_inc(x_265);
  lean_inc(x_264);
  lean_dec(x_4);
  lean_inc(x_266);
  x_268 = l_Lean_Expr_instantiateBetaRevRange_visit(x_1, x_2, x_3, x_266, x_5, x_6);
  x_269 = lean_ctor_get(x_268, 0);
  lean_inc(x_269);
  x_270 = lean_ctor_get(x_268, 1);
  lean_inc(x_270);
  if (lean_is_exclusive(x_268)) {
   lean_ctor_release(x_268, 0);
   lean_ctor_release(x_268, 1);
   x_271 = x_268;
  } else {
   lean_dec_ref(x_268);
   x_271 = lean_box(0);
  }
  x_272 = lean_alloc_ctor(11, 3, 8);
  lean_ctor_set(x_272, 0, x_264);
  lean_ctor_set(x_272, 1, x_265);
  lean_ctor_set(x_272, 2, x_266);
  lean_ctor_set_uint64(x_272, sizeof(void*)*3, x_267);
  x_273 = lean_expr_update_proj(x_272, x_269);
  lean_inc(x_273);
  x_274 = l_Std_HashMapImp_insert___at_Lean_Expr_instantiateBetaRevRange_visit___spec__3(x_270, x_9, x_273);
  if (lean_is_scalar(x_271)) {
   x_275 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_275 = x_271;
  }
  lean_ctor_set(x_275, 0, x_273);
  lean_ctor_set(x_275, 1, x_274);
  return x_275;
  }
  }
  }
  }
  else
  {
  lean_object* x_276; lean_object* x_277; 
  lean_dec(x_9);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_276 = lean_ctor_get(x_10, 0);
  lean_inc(x_276);
  lean_dec(x_10);
  x_277 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_277, 0, x_276);
  lean_ctor_set(x_277, 1, x_6);
  return x_277;
  }
  }
  else
  {
  lean_object* x_278; 
  lean_dec(x_5);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_278 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_278, 0, x_4);
  lean_ctor_set(x_278, 1, x_6);
  return x_278;
  }
  }
  }
  lean_object* l_Std_AssocList_find_x3f___at_Lean_Expr_instantiateBetaRevRange_visit___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_Expr_instantiateBetaRevRange_visit___spec__2(x_1, x_2);
  lean_dec(x_2);
  lean_dec(x_1);
  return x_3;
  }
  }
  lean_object* l_Std_HashMapImp_find_x3f___at_Lean_Expr_instantiateBetaRevRange_visit___spec__1___boxed(lean_object* x_1, lean_object* x_2) {
  _start:
  {
  lean_object* x_3; 
  x_3 = l_Std_HashMapImp_find_x3f___at_Lean_Expr_instantiateBetaRevRange_visit___spec__1(x_1, x_2);
  lean_dec(x_2);
  lean_dec(x_1);
  return x_3;
  }
  }
  lean_object* l_Std_AssocList_contains___at_Lean_Expr_instantiateBetaRevRange_visit___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_Expr_instantiateBetaRevRange_visit___spec__4(x_1, x_2);
  lean_dec(x_2);
  lean_dec(x_1);
  x_4 = lean_box(x_3);
  return x_4;
  }
  }
  lean_object* l_Array_mapMUnsafe_map___at_Lean_Expr_instantiateBetaRevRange_visit___spec__9___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:
  {
  size_t x_9; size_t x_10; lean_object* x_11; 
  x_9 = lean_unbox_usize(x_5);
  lean_dec(x_5);
  x_10 = lean_unbox_usize(x_6);
  lean_dec(x_6);
  x_11 = l_Array_mapMUnsafe_map___at_Lean_Expr_instantiateBetaRevRange_visit___spec__9(x_1, x_2, x_3, x_4, x_9, x_10, x_7, x_8);
  return x_11;
  }
  }
  lean_object* l___private_Lean_Expr_0__Lean_Expr_withAppRevAux___at_Lean_Expr_instantiateBetaRevRange_visit___spec__10___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:
  {
  lean_object* x_10; 
  x_10 = l___private_Lean_Expr_0__Lean_Expr_withAppRevAux___at_Lean_Expr_instantiateBetaRevRange_visit___spec__10(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9);
  lean_dec(x_6);
  lean_dec(x_5);
  return x_10;
  }
  }
  lean_object* l_Std_mkHashMap___at_Lean_Expr_instantiateBetaRevRange___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_Expr_instantiateBetaRevRange___closed__1() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("assertion violation: ");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Expr_instantiateBetaRevRange___closed__2() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("stop ≤ args.size\n    ");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Expr_instantiateBetaRevRange___closed__3() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; 
  x_1 = l_Lean_Expr_instantiateBetaRevRange___closed__1;
  x_2 = l_Lean_Expr_instantiateBetaRevRange___closed__2;
  x_3 = lean_string_append(x_1, x_2);
  return x_3;
  }
  }
  static lean_object* _init_l_Lean_Expr_instantiateBetaRevRange___closed__4() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("Lean.Expr.instantiateBetaRevRange");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Expr_instantiateBetaRevRange___closed__5() {
  _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_Expr_instantiateBetaRevRange_visit___closed__6;
  x_2 = l_Lean_Expr_instantiateBetaRevRange___closed__4;
  x_3 = lean_unsigned_to_nat(27u);
  x_4 = lean_unsigned_to_nat(4u);
  x_5 = l_Lean_Expr_instantiateBetaRevRange___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_Expr_instantiateBetaRevRange___closed__6() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; 
  x_1 = lean_unsigned_to_nat(8u);
  x_2 = l_Std_mkHashMapImp___rarg(x_1);
  return x_2;
  }
  }
  lean_object* l_Lean_Expr_instantiateBetaRevRange(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
  _start:
  {
  uint8_t x_5; 
  x_5 = l_Lean_Expr_hasLooseBVars(x_1);
  if (x_5 == 0)
  {
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  return x_1;
  }
  else
  {
  uint8_t x_6; 
  x_6 = lean_nat_dec_lt(x_2, x_3);
  if (x_6 == 0)
  {
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  return x_1;
  }
  else
  {
  lean_object* x_7; uint8_t x_8; 
  x_7 = lean_array_get_size(x_4);
  x_8 = lean_nat_dec_le(x_3, x_7);
  lean_dec(x_7);
  if (x_8 == 0)
  {
  lean_object* x_9; lean_object* x_10; lean_object* x_11; 
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_9 = l_Lean_instInhabitedExpr;
  x_10 = l_Lean_Expr_instantiateBetaRevRange___closed__5;
  x_11 = lean_panic_fn(x_9, x_10);
  return x_11;
  }
  else
  {
  lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; 
  x_12 = lean_unsigned_to_nat(0u);
  x_13 = l_Lean_Expr_instantiateBetaRevRange___closed__6;
  x_14 = l_Lean_Expr_instantiateBetaRevRange_visit(x_2, x_3, x_4, x_1, x_12, x_13);
  x_15 = lean_ctor_get(x_14, 0);
  lean_inc(x_15);
  lean_dec(x_14);
  return x_15;
  }
  }
  }
  }
  }
  lean_object* l_Lean_throwError___at_Lean_Meta_throwFunctionExpected___spec__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
  _start:
  {
  lean_object* x_7; lean_object* x_8; uint8_t x_9; 
  x_7 = lean_ctor_get(x_4, 3);
  x_8 = l_Lean_addMessageContextFull___at_Lean_Meta_instAddMessageContextMetaM___spec__1(x_1, x_2, x_3, x_4, x_5, x_6);
  x_9 = !lean_is_exclusive(x_8);
  if (x_9 == 0)
  {
  lean_object* x_10; lean_object* x_11; 
  x_10 = lean_ctor_get(x_8, 0);
  lean_inc(x_7);
  x_11 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_11, 0, x_7);
  lean_ctor_set(x_11, 1, x_10);
  lean_ctor_set_tag(x_8, 1);
  lean_ctor_set(x_8, 0, x_11);
  return x_8;
  }
  else
  {
  lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; 
  x_12 = lean_ctor_get(x_8, 0);
  x_13 = lean_ctor_get(x_8, 1);
  lean_inc(x_13);
  lean_inc(x_12);
  lean_dec(x_8);
  lean_inc(x_7);
  x_14 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_14, 0, x_7);
  lean_ctor_set(x_14, 1, x_12);
  x_15 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_15, 0, x_14);
  lean_ctor_set(x_15, 1, x_13);
  return x_15;
  }
  }
  }
  lean_object* l_Lean_throwError___at_Lean_Meta_throwFunctionExpected___spec__1(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = lean_alloc_closure((void*)(l_Lean_throwError___at_Lean_Meta_throwFunctionExpected___spec__1___rarg___boxed), 6, 0);
  return x_2;
  }
  }
  static lean_object* _init_l_Lean_Meta_throwFunctionExpected___rarg___closed__1() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("function expected");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Meta_throwFunctionExpected___rarg___closed__2() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; 
  x_1 = l_Lean_Meta_throwFunctionExpected___rarg___closed__1;
  x_2 = l_Lean_stringToMessageData(x_1);
  return x_2;
  }
  }
  lean_object* l_Lean_Meta_throwFunctionExpected___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; 
  x_7 = l_Lean_indentExpr(x_1);
  x_8 = l_Lean_Meta_throwFunctionExpected___rarg___closed__2;
  x_9 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_9, 0, x_8);
  lean_ctor_set(x_9, 1, x_7);
  x_10 = l_Lean_KernelException_toMessageData___closed__15;
  x_11 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_11, 0, x_9);
  lean_ctor_set(x_11, 1, x_10);
  x_12 = l_Lean_throwError___at_Lean_Meta_throwFunctionExpected___spec__1___rarg(x_11, x_2, x_3, x_4, x_5, x_6);
  return x_12;
  }
  }
  lean_object* l_Lean_Meta_throwFunctionExpected(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = lean_alloc_closure((void*)(l_Lean_Meta_throwFunctionExpected___rarg___boxed), 6, 0);
  return x_2;
  }
  }
  lean_object* l_Lean_throwError___at_Lean_Meta_throwFunctionExpected___spec__1___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
  _start:
  {
  lean_object* x_7; 
  x_7 = l_Lean_throwError___at_Lean_Meta_throwFunctionExpected___spec__1___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);
  return x_7;
  }
  }
  lean_object* l_Lean_Meta_throwFunctionExpected___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_throwFunctionExpected___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);
  return x_7;
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferAppType_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
  _start:
  {
  if (lean_obj_tag(x_1) == 7)
  {
  lean_object* x_4; lean_object* x_5; lean_object* x_6; uint64_t x_7; lean_object* x_8; lean_object* x_9; 
  lean_dec(x_3);
  x_4 = lean_ctor_get(x_1, 0);
  lean_inc(x_4);
  x_5 = lean_ctor_get(x_1, 1);
  lean_inc(x_5);
  x_6 = lean_ctor_get(x_1, 2);
  lean_inc(x_6);
  x_7 = lean_ctor_get_uint64(x_1, sizeof(void*)*3);
  lean_dec(x_1);
  x_8 = lean_box_uint64(x_7);
  x_9 = lean_apply_4(x_2, x_4, x_5, x_6, x_8);
  return x_9;
  }
  else
  {
  lean_object* x_10; 
  lean_dec(x_2);
  x_10 = lean_apply_1(x_3, x_1);
  return x_10;
  }
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferAppType_match__1(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = lean_alloc_closure((void*)(l___private_Lean_Meta_InferType_0__Lean_Meta_inferAppType_match__1___rarg), 3, 0);
  return x_2;
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferAppType_match__2___rarg(lean_object* x_1, lean_object* x_2) {
  _start:
  {
  lean_object* x_3; lean_object* x_4; lean_object* x_5; 
  x_3 = lean_ctor_get(x_1, 0);
  lean_inc(x_3);
  x_4 = lean_ctor_get(x_1, 1);
  lean_inc(x_4);
  lean_dec(x_1);
  x_5 = lean_apply_2(x_2, x_3, x_4);
  return x_5;
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferAppType_match__2(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = lean_alloc_closure((void*)(l___private_Lean_Meta_InferType_0__Lean_Meta_inferAppType_match__2___rarg), 2, 0);
  return x_2;
  }
  }
  lean_object* l_Std_Range_forIn_loop___at___private_Lean_Meta_InferType_0__Lean_Meta_inferAppType___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, 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; uint8_t x_13; 
  x_12 = lean_ctor_get(x_3, 1);
  x_13 = lean_nat_dec_le(x_12, x_5);
  if (x_13 == 0)
  {
  lean_object* x_14; uint8_t x_15; 
  x_14 = lean_unsigned_to_nat(0u);
  x_15 = lean_nat_dec_eq(x_4, 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_25; 
  x_16 = lean_unsigned_to_nat(1u);
  x_17 = lean_nat_sub(x_4, x_16);
  lean_dec(x_4);
  x_25 = lean_ctor_get(x_6, 1);
  lean_inc(x_25);
  if (lean_obj_tag(x_25) == 7)
  {
  uint8_t x_26; 
  x_26 = !lean_is_exclusive(x_6);
  if (x_26 == 0)
  {
  lean_object* x_27; lean_object* x_28; lean_object* x_29; 
  x_27 = lean_ctor_get(x_6, 1);
  lean_dec(x_27);
  x_28 = lean_ctor_get(x_25, 2);
  lean_inc(x_28);
  lean_dec(x_25);
  lean_ctor_set(x_6, 1, x_28);
  x_29 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_29, 0, x_6);
  x_18 = x_29;
  x_19 = x_11;
  goto block_24;
  }
  else
  {
  lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; 
  x_30 = lean_ctor_get(x_6, 0);
  lean_inc(x_30);
  lean_dec(x_6);
  x_31 = lean_ctor_get(x_25, 2);
  lean_inc(x_31);
  lean_dec(x_25);
  x_32 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_32, 0, x_30);
  lean_ctor_set(x_32, 1, x_31);
  x_33 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_33, 0, x_32);
  x_18 = x_33;
  x_19 = x_11;
  goto block_24;
  }
  }
  else
  {
  uint8_t x_34; 
  x_34 = !lean_is_exclusive(x_6);
  if (x_34 == 0)
  {
  lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; 
  x_35 = lean_ctor_get(x_6, 0);
  x_36 = lean_ctor_get(x_6, 1);
  lean_dec(x_36);
  lean_inc(x_2);
  lean_inc(x_5);
  x_37 = l_Lean_Expr_instantiateBetaRevRange(x_25, x_35, x_5, x_2);
  lean_inc(x_10);
  lean_inc(x_9);
  lean_inc(x_8);
  lean_inc(x_7);
  x_38 = l_Lean_Meta_whnf(x_37, x_7, x_8, x_9, x_10, x_11);
  if (lean_obj_tag(x_38) == 0)
  {
  lean_object* x_39; 
  x_39 = lean_ctor_get(x_38, 0);
  lean_inc(x_39);
  if (lean_obj_tag(x_39) == 7)
  {
  lean_object* x_40; lean_object* x_41; lean_object* x_42; 
  x_40 = lean_ctor_get(x_38, 1);
  lean_inc(x_40);
  lean_dec(x_38);
  x_41 = lean_ctor_get(x_39, 2);
  lean_inc(x_41);
  lean_dec(x_39);
  lean_inc(x_5);
  lean_ctor_set(x_6, 1, x_41);
  lean_ctor_set(x_6, 0, x_5);
  x_42 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_42, 0, x_6);
  x_18 = x_42;
  x_19 = x_40;
  goto block_24;
  }
  else
  {
  lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; uint8_t x_47; 
  lean_dec(x_39);
  lean_free_object(x_6);
  lean_dec(x_17);
  x_43 = lean_ctor_get(x_38, 1);
  lean_inc(x_43);
  lean_dec(x_38);
  x_44 = lean_nat_add(x_5, x_16);
  lean_dec(x_5);
  x_45 = l___private_Lean_Expr_0__Lean_mkAppRangeAux(x_44, x_2, x_14, x_1);
  lean_dec(x_2);
  lean_dec(x_44);
  x_46 = l_Lean_Meta_throwFunctionExpected___rarg(x_45, x_7, x_8, x_9, x_10, x_43);
  lean_dec(x_10);
  lean_dec(x_9);
  lean_dec(x_8);
  lean_dec(x_7);
  x_47 = !lean_is_exclusive(x_46);
  if (x_47 == 0)
  {
  return x_46;
  }
  else
  {
  lean_object* x_48; lean_object* x_49; lean_object* x_50; 
  x_48 = lean_ctor_get(x_46, 0);
  x_49 = lean_ctor_get(x_46, 1);
  lean_inc(x_49);
  lean_inc(x_48);
  lean_dec(x_46);
  x_50 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_50, 0, x_48);
  lean_ctor_set(x_50, 1, x_49);
  return x_50;
  }
  }
  }
  else
  {
  uint8_t x_51; 
  lean_free_object(x_6);
  lean_dec(x_17);
  lean_dec(x_10);
  lean_dec(x_9);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_5);
  lean_dec(x_2);
  lean_dec(x_1);
  x_51 = !lean_is_exclusive(x_38);
  if (x_51 == 0)
  {
  return x_38;
  }
  else
  {
  lean_object* x_52; lean_object* x_53; lean_object* x_54; 
  x_52 = lean_ctor_get(x_38, 0);
  x_53 = lean_ctor_get(x_38, 1);
  lean_inc(x_53);
  lean_inc(x_52);
  lean_dec(x_38);
  x_54 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_54, 0, x_52);
  lean_ctor_set(x_54, 1, x_53);
  return x_54;
  }
  }
  }
  else
  {
  lean_object* x_55; lean_object* x_56; lean_object* x_57; 
  x_55 = lean_ctor_get(x_6, 0);
  lean_inc(x_55);
  lean_dec(x_6);
  lean_inc(x_2);
  lean_inc(x_5);
  x_56 = l_Lean_Expr_instantiateBetaRevRange(x_25, x_55, x_5, x_2);
  lean_inc(x_10);
  lean_inc(x_9);
  lean_inc(x_8);
  lean_inc(x_7);
  x_57 = l_Lean_Meta_whnf(x_56, x_7, x_8, x_9, x_10, x_11);
  if (lean_obj_tag(x_57) == 0)
  {
  lean_object* x_58; 
  x_58 = lean_ctor_get(x_57, 0);
  lean_inc(x_58);
  if (lean_obj_tag(x_58) == 7)
  {
  lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; 
  x_59 = lean_ctor_get(x_57, 1);
  lean_inc(x_59);
  lean_dec(x_57);
  x_60 = lean_ctor_get(x_58, 2);
  lean_inc(x_60);
  lean_dec(x_58);
  lean_inc(x_5);
  x_61 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_61, 0, x_5);
  lean_ctor_set(x_61, 1, x_60);
  x_62 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_62, 0, x_61);
  x_18 = x_62;
  x_19 = x_59;
  goto block_24;
  }
  else
  {
  lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; 
  lean_dec(x_58);
  lean_dec(x_17);
  x_63 = lean_ctor_get(x_57, 1);
  lean_inc(x_63);
  lean_dec(x_57);
  x_64 = lean_nat_add(x_5, x_16);
  lean_dec(x_5);
  x_65 = l___private_Lean_Expr_0__Lean_mkAppRangeAux(x_64, x_2, x_14, x_1);
  lean_dec(x_2);
  lean_dec(x_64);
  x_66 = l_Lean_Meta_throwFunctionExpected___rarg(x_65, x_7, x_8, x_9, x_10, x_63);
  lean_dec(x_10);
  lean_dec(x_9);
  lean_dec(x_8);
  lean_dec(x_7);
  x_67 = lean_ctor_get(x_66, 0);
  lean_inc(x_67);
  x_68 = lean_ctor_get(x_66, 1);
  lean_inc(x_68);
  if (lean_is_exclusive(x_66)) {
   lean_ctor_release(x_66, 0);
   lean_ctor_release(x_66, 1);
   x_69 = x_66;
  } else {
   lean_dec_ref(x_66);
   x_69 = lean_box(0);
  }
  if (lean_is_scalar(x_69)) {
   x_70 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_70 = x_69;
  }
  lean_ctor_set(x_70, 0, x_67);
  lean_ctor_set(x_70, 1, x_68);
  return x_70;
  }
  }
  else
  {
  lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; 
  lean_dec(x_17);
  lean_dec(x_10);
  lean_dec(x_9);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_5);
  lean_dec(x_2);
  lean_dec(x_1);
  x_71 = lean_ctor_get(x_57, 0);
  lean_inc(x_71);
  x_72 = lean_ctor_get(x_57, 1);
  lean_inc(x_72);
  if (lean_is_exclusive(x_57)) {
   lean_ctor_release(x_57, 0);
   lean_ctor_release(x_57, 1);
   x_73 = x_57;
  } else {
   lean_dec_ref(x_57);
   x_73 = lean_box(0);
  }
  if (lean_is_scalar(x_73)) {
   x_74 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_74 = x_73;
  }
  lean_ctor_set(x_74, 0, x_71);
  lean_ctor_set(x_74, 1, x_72);
  return x_74;
  }
  }
  }
  block_24:
  {
  lean_object* x_20; lean_object* x_21; lean_object* x_22; 
  x_20 = lean_ctor_get(x_18, 0);
  lean_inc(x_20);
  lean_dec(x_18);
  x_21 = lean_ctor_get(x_3, 2);
  x_22 = lean_nat_add(x_5, x_21);
  lean_dec(x_5);
  x_4 = x_17;
  x_5 = x_22;
  x_6 = x_20;
  x_11 = x_19;
  goto _start;
  }
  }
  else
  {
  lean_object* x_75; 
  lean_dec(x_10);
  lean_dec(x_9);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_2);
  lean_dec(x_1);
  x_75 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_75, 0, x_6);
  lean_ctor_set(x_75, 1, x_11);
  return x_75;
  }
  }
  else
  {
  lean_object* x_76; 
  lean_dec(x_10);
  lean_dec(x_9);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_2);
  lean_dec(x_1);
  x_76 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_76, 0, x_6);
  lean_ctor_set(x_76, 1, x_11);
  return x_76;
  }
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferAppType(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
  _start:
  {
  lean_object* x_8; 
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_3);
  lean_inc(x_1);
  x_8 = l_Lean_Meta_inferType(x_1, x_3, x_4, x_5, x_6, x_7);
  if (lean_obj_tag(x_8) == 0)
  {
  lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; 
  x_9 = lean_ctor_get(x_8, 0);
  lean_inc(x_9);
  x_10 = lean_ctor_get(x_8, 1);
  lean_inc(x_10);
  lean_dec(x_8);
  x_11 = lean_array_get_size(x_2);
  x_12 = lean_unsigned_to_nat(0u);
  x_13 = lean_unsigned_to_nat(1u);
  lean_inc(x_11);
  x_14 = lean_alloc_ctor(0, 3, 0);
  lean_ctor_set(x_14, 0, x_12);
  lean_ctor_set(x_14, 1, x_11);
  lean_ctor_set(x_14, 2, x_13);
  x_15 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_15, 0, x_12);
  lean_ctor_set(x_15, 1, x_9);
  lean_inc(x_11);
  lean_inc(x_2);
  x_16 = l_Std_Range_forIn_loop___at___private_Lean_Meta_InferType_0__Lean_Meta_inferAppType___spec__1(x_1, x_2, x_14, x_11, x_12, x_15, x_3, x_4, x_5, x_6, x_10);
  lean_dec(x_14);
  if (lean_obj_tag(x_16) == 0)
  {
  uint8_t x_17; 
  x_17 = !lean_is_exclusive(x_16);
  if (x_17 == 0)
  {
  lean_object* x_18; 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_18, 0);
  lean_inc(x_19);
  x_20 = lean_ctor_get(x_18, 1);
  lean_inc(x_20);
  lean_dec(x_18);
  x_21 = l_Lean_Expr_instantiateBetaRevRange(x_20, x_19, x_11, x_2);
  lean_ctor_set(x_16, 0, x_21);
  return x_16;
  }
  else
  {
  lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; 
  x_22 = lean_ctor_get(x_16, 0);
  x_23 = lean_ctor_get(x_16, 1);
  lean_inc(x_23);
  lean_inc(x_22);
  lean_dec(x_16);
  x_24 = lean_ctor_get(x_22, 0);
  lean_inc(x_24);
  x_25 = lean_ctor_get(x_22, 1);
  lean_inc(x_25);
  lean_dec(x_22);
  x_26 = l_Lean_Expr_instantiateBetaRevRange(x_25, x_24, x_11, x_2);
  x_27 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_27, 0, x_26);
  lean_ctor_set(x_27, 1, x_23);
  return x_27;
  }
  }
  else
  {
  uint8_t x_28; 
  lean_dec(x_11);
  lean_dec(x_2);
  x_28 = !lean_is_exclusive(x_16);
  if (x_28 == 0)
  {
  return x_16;
  }
  else
  {
  lean_object* x_29; lean_object* x_30; lean_object* x_31; 
  x_29 = lean_ctor_get(x_16, 0);
  x_30 = lean_ctor_get(x_16, 1);
  lean_inc(x_30);
  lean_inc(x_29);
  lean_dec(x_16);
  x_31 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_31, 0, x_29);
  lean_ctor_set(x_31, 1, x_30);
  return x_31;
  }
  }
  }
  else
  {
  uint8_t x_32; 
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_32 = !lean_is_exclusive(x_8);
  if (x_32 == 0)
  {
  return x_8;
  }
  else
  {
  lean_object* x_33; lean_object* x_34; lean_object* x_35; 
  x_33 = lean_ctor_get(x_8, 0);
  x_34 = lean_ctor_get(x_8, 1);
  lean_inc(x_34);
  lean_inc(x_33);
  lean_dec(x_8);
  x_35 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_35, 0, x_33);
  lean_ctor_set(x_35, 1, x_34);
  return x_35;
  }
  }
  }
  }
  lean_object* l_Std_Range_forIn_loop___at___private_Lean_Meta_InferType_0__Lean_Meta_inferAppType___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) {
  _start:
  {
  lean_object* x_12; 
  x_12 = l_Std_Range_forIn_loop___at___private_Lean_Meta_InferType_0__Lean_Meta_inferAppType___spec__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11);
  lean_dec(x_3);
  return x_12;
  }
  }
  lean_object* l_Lean_throwError___at_Lean_Meta_throwIncorrectNumberOfLevels___spec__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
  _start:
  {
  lean_object* x_7; lean_object* x_8; uint8_t x_9; 
  x_7 = lean_ctor_get(x_4, 3);
  x_8 = l_Lean_addMessageContextFull___at_Lean_Meta_instAddMessageContextMetaM___spec__1(x_1, x_2, x_3, x_4, x_5, x_6);
  x_9 = !lean_is_exclusive(x_8);
  if (x_9 == 0)
  {
  lean_object* x_10; lean_object* x_11; 
  x_10 = lean_ctor_get(x_8, 0);
  lean_inc(x_7);
  x_11 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_11, 0, x_7);
  lean_ctor_set(x_11, 1, x_10);
  lean_ctor_set_tag(x_8, 1);
  lean_ctor_set(x_8, 0, x_11);
  return x_8;
  }
  else
  {
  lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; 
  x_12 = lean_ctor_get(x_8, 0);
  x_13 = lean_ctor_get(x_8, 1);
  lean_inc(x_13);
  lean_inc(x_12);
  lean_dec(x_8);
  lean_inc(x_7);
  x_14 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_14, 0, x_7);
  lean_ctor_set(x_14, 1, x_12);
  x_15 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_15, 0, x_14);
  lean_ctor_set(x_15, 1, x_13);
  return x_15;
  }
  }
  }
  lean_object* l_Lean_throwError___at_Lean_Meta_throwIncorrectNumberOfLevels___spec__1(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = lean_alloc_closure((void*)(l_Lean_throwError___at_Lean_Meta_throwIncorrectNumberOfLevels___spec__1___rarg___boxed), 6, 0);
  return x_2;
  }
  }
  static lean_object* _init_l_Lean_Meta_throwIncorrectNumberOfLevels___rarg___closed__1() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("incorrect number of universe levels ");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Meta_throwIncorrectNumberOfLevels___rarg___closed__2() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; 
  x_1 = l_Lean_Meta_throwIncorrectNumberOfLevels___rarg___closed__1;
  x_2 = l_Lean_stringToMessageData(x_1);
  return x_2;
  }
  }
  lean_object* l_Lean_Meta_throwIncorrectNumberOfLevels___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
  _start:
  {
  lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; 
  x_8 = l_Lean_mkConst(x_1, x_2);
  x_9 = lean_alloc_ctor(2, 1, 0);
  lean_ctor_set(x_9, 0, x_8);
  x_10 = l_Lean_Meta_throwIncorrectNumberOfLevels___rarg___closed__2;
  x_11 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_11, 0, x_10);
  lean_ctor_set(x_11, 1, x_9);
  x_12 = l_Lean_KernelException_toMessageData___closed__15;
  x_13 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_13, 0, x_11);
  lean_ctor_set(x_13, 1, x_12);
  x_14 = l_Lean_throwError___at_Lean_Meta_throwIncorrectNumberOfLevels___spec__1___rarg(x_13, x_3, x_4, x_5, x_6, x_7);
  return x_14;
  }
  }
  lean_object* l_Lean_Meta_throwIncorrectNumberOfLevels(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = lean_alloc_closure((void*)(l_Lean_Meta_throwIncorrectNumberOfLevels___rarg___boxed), 7, 0);
  return x_2;
  }
  }
  lean_object* l_Lean_throwError___at_Lean_Meta_throwIncorrectNumberOfLevels___spec__1___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
  _start:
  {
  lean_object* x_7; 
  x_7 = l_Lean_throwError___at_Lean_Meta_throwIncorrectNumberOfLevels___spec__1___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);
  return x_7;
  }
  }
  lean_object* l_Lean_Meta_throwIncorrectNumberOfLevels___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
  _start:
  {
  lean_object* x_8; 
  x_8 = l_Lean_Meta_throwIncorrectNumberOfLevels___rarg(x_1, 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);
  return x_8;
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferConstType(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
  _start:
  {
  lean_object* x_8; 
  lean_inc(x_1);
  x_8 = l_Lean_getConstInfo___at_Lean_Meta_mkConstWithFreshMVarLevels___spec__1(x_1, x_3, x_4, x_5, x_6, x_7);
  if (lean_obj_tag(x_8) == 0)
  {
  uint8_t x_9; 
  x_9 = !lean_is_exclusive(x_8);
  if (x_9 == 0)
  {
  lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; 
  x_10 = lean_ctor_get(x_8, 0);
  x_11 = lean_ctor_get(x_8, 1);
  x_12 = l_Lean_ConstantInfo_levelParams(x_10);
  x_13 = lean_unsigned_to_nat(0u);
  x_14 = l_List_lengthAux___rarg(x_12, x_13);
  lean_dec(x_12);
  x_15 = l_List_lengthAux___rarg(x_2, x_13);
  x_16 = lean_nat_dec_eq(x_14, x_15);
  lean_dec(x_15);
  lean_dec(x_14);
  if (x_16 == 0)
  {
  lean_object* x_17; 
  lean_free_object(x_8);
  lean_dec(x_10);
  x_17 = l_Lean_Meta_throwIncorrectNumberOfLevels___rarg(x_1, x_2, x_3, x_4, x_5, x_6, x_11);
  return x_17;
  }
  else
  {
  lean_object* x_18; 
  lean_dec(x_1);
  x_18 = lean_instantiate_type_lparams(x_10, x_2);
  lean_dec(x_2);
  lean_dec(x_10);
  lean_ctor_set(x_8, 0, x_18);
  return x_8;
  }
  }
  else
  {
  lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; uint8_t x_25; 
  x_19 = lean_ctor_get(x_8, 0);
  x_20 = lean_ctor_get(x_8, 1);
  lean_inc(x_20);
  lean_inc(x_19);
  lean_dec(x_8);
  x_21 = l_Lean_ConstantInfo_levelParams(x_19);
  x_22 = lean_unsigned_to_nat(0u);
  x_23 = l_List_lengthAux___rarg(x_21, x_22);
  lean_dec(x_21);
  x_24 = l_List_lengthAux___rarg(x_2, x_22);
  x_25 = lean_nat_dec_eq(x_23, x_24);
  lean_dec(x_24);
  lean_dec(x_23);
  if (x_25 == 0)
  {
  lean_object* x_26; 
  lean_dec(x_19);
  x_26 = l_Lean_Meta_throwIncorrectNumberOfLevels___rarg(x_1, x_2, x_3, x_4, x_5, x_6, x_20);
  return x_26;
  }
  else
  {
  lean_object* x_27; lean_object* x_28; 
  lean_dec(x_1);
  x_27 = lean_instantiate_type_lparams(x_19, x_2);
  lean_dec(x_2);
  lean_dec(x_19);
  x_28 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_28, 0, x_27);
  lean_ctor_set(x_28, 1, x_20);
  return x_28;
  }
  }
  }
  else
  {
  uint8_t x_29; 
  lean_dec(x_2);
  lean_dec(x_1);
  x_29 = !lean_is_exclusive(x_8);
  if (x_29 == 0)
  {
  return x_8;
  }
  else
  {
  lean_object* x_30; lean_object* x_31; lean_object* x_32; 
  x_30 = lean_ctor_get(x_8, 0);
  x_31 = lean_ctor_get(x_8, 1);
  lean_inc(x_31);
  lean_inc(x_30);
  lean_dec(x_8);
  x_32 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_32, 0, x_30);
  lean_ctor_set(x_32, 1, x_31);
  return x_32;
  }
  }
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferConstType___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
  _start:
  {
  lean_object* x_8; 
  x_8 = l___private_Lean_Meta_InferType_0__Lean_Meta_inferConstType(x_1, 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);
  return x_8;
  }
  }
  lean_object* l_Lean_throwError___at___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType___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; uint8_t x_9; 
  x_7 = lean_ctor_get(x_4, 3);
  x_8 = l_Lean_addMessageContextFull___at_Lean_Meta_instAddMessageContextMetaM___spec__1(x_1, x_2, x_3, x_4, x_5, x_6);
  x_9 = !lean_is_exclusive(x_8);
  if (x_9 == 0)
  {
  lean_object* x_10; lean_object* x_11; 
  x_10 = lean_ctor_get(x_8, 0);
  lean_inc(x_7);
  x_11 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_11, 0, x_7);
  lean_ctor_set(x_11, 1, x_10);
  lean_ctor_set_tag(x_8, 1);
  lean_ctor_set(x_8, 0, x_11);
  return x_8;
  }
  else
  {
  lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; 
  x_12 = lean_ctor_get(x_8, 0);
  x_13 = lean_ctor_get(x_8, 1);
  lean_inc(x_13);
  lean_inc(x_12);
  lean_dec(x_8);
  lean_inc(x_7);
  x_14 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_14, 0, x_7);
  lean_ctor_set(x_14, 1, x_12);
  x_15 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_15, 0, x_14);
  lean_ctor_set(x_15, 1, x_13);
  return x_15;
  }
  }
  }
  lean_object* l_Lean_getConstInfo___at___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType___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; uint8_t x_8; 
  x_7 = lean_st_ref_get(x_5, x_6);
  x_8 = !lean_is_exclusive(x_7);
  if (x_8 == 0)
  {
  lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; 
  x_9 = lean_ctor_get(x_7, 0);
  x_10 = lean_ctor_get(x_7, 1);
  x_11 = lean_ctor_get(x_9, 0);
  lean_inc(x_11);
  lean_dec(x_9);
  lean_inc(x_1);
  x_12 = lean_environment_find(x_11, x_1);
  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; lean_object* x_20; 
  lean_free_object(x_7);
  x_13 = lean_box(0);
  x_14 = l_Lean_mkConst(x_1, x_13);
  x_15 = lean_alloc_ctor(2, 1, 0);
  lean_ctor_set(x_15, 0, x_14);
  x_16 = l_Lean_throwUnknownConstant___rarg___closed__2;
  x_17 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_17, 0, x_16);
  lean_ctor_set(x_17, 1, x_15);
  x_18 = l_Lean_KernelException_toMessageData___closed__3;
  x_19 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_19, 0, x_17);
  lean_ctor_set(x_19, 1, x_18);
  x_20 = l_Lean_throwError___at___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType___spec__2(x_19, x_2, x_3, x_4, x_5, x_10);
  return x_20;
  }
  else
  {
  lean_object* x_21; 
  lean_dec(x_1);
  x_21 = lean_ctor_get(x_12, 0);
  lean_inc(x_21);
  lean_dec(x_12);
  lean_ctor_set(x_7, 0, x_21);
  return x_7;
  }
  }
  else
  {
  lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; 
  x_22 = lean_ctor_get(x_7, 0);
  x_23 = lean_ctor_get(x_7, 1);
  lean_inc(x_23);
  lean_inc(x_22);
  lean_dec(x_7);
  x_24 = lean_ctor_get(x_22, 0);
  lean_inc(x_24);
  lean_dec(x_22);
  lean_inc(x_1);
  x_25 = lean_environment_find(x_24, x_1);
  if (lean_obj_tag(x_25) == 0)
  {
  lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; 
  x_26 = lean_box(0);
  x_27 = l_Lean_mkConst(x_1, x_26);
  x_28 = lean_alloc_ctor(2, 1, 0);
  lean_ctor_set(x_28, 0, x_27);
  x_29 = l_Lean_throwUnknownConstant___rarg___closed__2;
  x_30 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_30, 0, x_29);
  lean_ctor_set(x_30, 1, x_28);
  x_31 = l_Lean_KernelException_toMessageData___closed__3;
  x_32 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_32, 0, x_30);
  lean_ctor_set(x_32, 1, x_31);
  x_33 = l_Lean_throwError___at___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType___spec__2(x_32, x_2, x_3, x_4, x_5, x_23);
  return x_33;
  }
  else
  {
  lean_object* x_34; lean_object* x_35; 
  lean_dec(x_1);
  x_34 = lean_ctor_get(x_25, 0);
  lean_inc(x_34);
  lean_dec(x_25);
  x_35 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_35, 0, x_34);
  lean_ctor_set(x_35, 1, x_23);
  return x_35;
  }
  }
  }
  }
  static lean_object* _init_l_Std_Range_forIn_loop___at___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType___spec__3___closed__1() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("invalid projection");
  return x_1;
  }
  }
  static lean_object* _init_l_Std_Range_forIn_loop___at___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType___spec__3___closed__2() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; 
  x_1 = l_Std_Range_forIn_loop___at___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType___spec__3___closed__1;
  x_2 = l_Lean_stringToMessageData(x_1);
  return x_2;
  }
  }
  lean_object* l_Std_Range_forIn_loop___at___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType___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, 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; uint8_t x_14; 
  x_13 = lean_ctor_get(x_4, 1);
  x_14 = lean_nat_dec_le(x_13, x_6);
  if (x_14 == 0)
  {
  lean_object* x_15; uint8_t x_16; 
  x_15 = lean_unsigned_to_nat(0u);
  x_16 = lean_nat_dec_eq(x_5, x_15);
  if (x_16 == 0)
  {
  lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_26; 
  x_17 = lean_unsigned_to_nat(1u);
  x_18 = lean_nat_sub(x_5, x_17);
  lean_dec(x_5);
  lean_inc(x_11);
  lean_inc(x_10);
  lean_inc(x_9);
  lean_inc(x_8);
  x_26 = l_Lean_Meta_whnf(x_7, x_8, x_9, x_10, x_11, x_12);
  if (lean_obj_tag(x_26) == 0)
  {
  lean_object* x_27; 
  x_27 = lean_ctor_get(x_26, 0);
  lean_inc(x_27);
  if (lean_obj_tag(x_27) == 7)
  {
  lean_object* x_28; lean_object* x_29; uint8_t x_30; 
  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);
  x_30 = l_Lean_Expr_hasLooseBVars(x_29);
  if (x_30 == 0)
  {
  lean_object* x_31; 
  x_31 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_31, 0, x_29);
  x_19 = x_31;
  x_20 = x_28;
  goto block_25;
  }
  else
  {
  lean_object* x_32; lean_object* x_33; lean_object* x_34; 
  lean_inc(x_3);
  lean_inc(x_6);
  lean_inc(x_1);
  x_32 = l_Lean_mkProj(x_1, x_6, x_3);
  x_33 = lean_expr_instantiate1(x_29, x_32);
  lean_dec(x_32);
  lean_dec(x_29);
  x_34 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_34, 0, x_33);
  x_19 = x_34;
  x_20 = x_28;
  goto block_25;
  }
  }
  else
  {
  lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; uint8_t x_43; 
  lean_dec(x_27);
  lean_dec(x_18);
  lean_dec(x_6);
  x_35 = lean_ctor_get(x_26, 1);
  lean_inc(x_35);
  lean_dec(x_26);
  x_36 = l_Lean_mkProj(x_1, x_2, x_3);
  x_37 = l_Lean_indentExpr(x_36);
  x_38 = l_Std_Range_forIn_loop___at___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType___spec__3___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_Lean_KernelException_toMessageData___closed__15;
  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_whnf___spec__1(x_41, x_8, x_9, x_10, x_11, x_35);
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(x_9);
  lean_dec(x_8);
  x_43 = !lean_is_exclusive(x_42);
  if (x_43 == 0)
  {
  return x_42;
  }
  else
  {
  lean_object* x_44; lean_object* x_45; lean_object* x_46; 
  x_44 = lean_ctor_get(x_42, 0);
  x_45 = lean_ctor_get(x_42, 1);
  lean_inc(x_45);
  lean_inc(x_44);
  lean_dec(x_42);
  x_46 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_46, 0, x_44);
  lean_ctor_set(x_46, 1, x_45);
  return x_46;
  }
  }
  }
  else
  {
  uint8_t x_47; 
  lean_dec(x_18);
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(x_9);
  lean_dec(x_8);
  lean_dec(x_6);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_47 = !lean_is_exclusive(x_26);
  if (x_47 == 0)
  {
  return x_26;
  }
  else
  {
  lean_object* x_48; lean_object* x_49; lean_object* x_50; 
  x_48 = lean_ctor_get(x_26, 0);
  x_49 = lean_ctor_get(x_26, 1);
  lean_inc(x_49);
  lean_inc(x_48);
  lean_dec(x_26);
  x_50 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_50, 0, x_48);
  lean_ctor_set(x_50, 1, x_49);
  return x_50;
  }
  }
  block_25:
  {
  lean_object* x_21; lean_object* x_22; lean_object* x_23; 
  x_21 = lean_ctor_get(x_19, 0);
  lean_inc(x_21);
  lean_dec(x_19);
  x_22 = lean_ctor_get(x_4, 2);
  x_23 = lean_nat_add(x_6, x_22);
  lean_dec(x_6);
  x_5 = x_18;
  x_6 = x_23;
  x_7 = x_21;
  x_12 = x_20;
  goto _start;
  }
  }
  else
  {
  lean_object* x_51; 
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(x_9);
  lean_dec(x_8);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_51 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_51, 0, x_7);
  lean_ctor_set(x_51, 1, x_12);
  return x_51;
  }
  }
  else
  {
  lean_object* x_52; 
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(x_9);
  lean_dec(x_8);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_52 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_52, 0, x_7);
  lean_ctor_set(x_52, 1, x_12);
  return x_52;
  }
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType(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_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_3);
  x_9 = l_Lean_Meta_inferType(x_3, 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; 
  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_7);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  x_12 = l_Lean_Meta_whnf(x_10, x_4, x_5, x_6, x_7, x_11);
  if (lean_obj_tag(x_12) == 0)
  {
  lean_object* x_13; lean_object* x_14; lean_object* x_15; 
  x_13 = lean_ctor_get(x_12, 0);
  lean_inc(x_13);
  x_14 = lean_ctor_get(x_12, 1);
  lean_inc(x_14);
  lean_dec(x_12);
  x_15 = l_Lean_Expr_getAppFn(x_13);
  if (lean_obj_tag(x_15) == 4)
  {
  lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; 
  x_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_14);
  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_ctor_get(x_19, 0);
  lean_inc(x_21);
  lean_dec(x_19);
  x_22 = lean_environment_find(x_21, x_16);
  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; 
  lean_dec(x_17);
  lean_dec(x_13);
  x_23 = l_Lean_mkProj(x_1, x_2, x_3);
  x_24 = l_Lean_indentExpr(x_23);
  x_25 = l_Std_Range_forIn_loop___at___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType___spec__3___closed__2;
  x_26 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_26, 0, x_25);
  lean_ctor_set(x_26, 1, x_24);
  x_27 = l_Lean_KernelException_toMessageData___closed__15;
  x_28 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_28, 0, x_26);
  lean_ctor_set(x_28, 1, x_27);
  x_29 = l_Lean_throwError___at_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1049____spec__1(x_28, x_4, x_5, x_6, x_7, x_20);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  return x_29;
  }
  else
  {
  lean_object* x_30; 
  x_30 = lean_ctor_get(x_22, 0);
  lean_inc(x_30);
  lean_dec(x_22);
  if (lean_obj_tag(x_30) == 5)
  {
  lean_object* x_31; uint8_t x_32; 
  x_31 = lean_ctor_get(x_30, 0);
  lean_inc(x_31);
  lean_dec(x_30);
  x_32 = lean_ctor_get_uint8(x_31, sizeof(void*)*5);
  if (x_32 == 0)
  {
  lean_object* x_33; 
  x_33 = lean_ctor_get(x_31, 4);
  lean_inc(x_33);
  if (lean_obj_tag(x_33) == 0)
  {
  lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; 
  lean_dec(x_31);
  lean_dec(x_17);
  lean_dec(x_13);
  x_34 = l_Lean_mkProj(x_1, x_2, x_3);
  x_35 = l_Lean_indentExpr(x_34);
  x_36 = l_Std_Range_forIn_loop___at___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType___spec__3___closed__2;
  x_37 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_37, 0, x_36);
  lean_ctor_set(x_37, 1, x_35);
  x_38 = l_Lean_KernelException_toMessageData___closed__15;
  x_39 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_39, 0, x_37);
  lean_ctor_set(x_39, 1, x_38);
  x_40 = l_Lean_throwError___at_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1049____spec__1(x_39, x_4, x_5, x_6, x_7, x_20);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  return x_40;
  }
  else
  {
  lean_object* x_41; 
  x_41 = lean_ctor_get(x_33, 1);
  lean_inc(x_41);
  if (lean_obj_tag(x_41) == 0)
  {
  lean_object* x_42; lean_object* x_43; 
  x_42 = lean_ctor_get(x_33, 0);
  lean_inc(x_42);
  lean_dec(x_33);
  x_43 = l_Lean_getConstInfo___at___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType___spec__1(x_42, x_4, x_5, x_6, x_7, x_20);
  if (lean_obj_tag(x_43) == 0)
  {
  lean_object* x_44; 
  x_44 = lean_ctor_get(x_43, 0);
  lean_inc(x_44);
  if (lean_obj_tag(x_44) == 6)
  {
  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; uint8_t x_56; 
  x_45 = lean_ctor_get(x_43, 1);
  lean_inc(x_45);
  lean_dec(x_43);
  x_46 = lean_ctor_get(x_44, 0);
  lean_inc(x_46);
  lean_dec(x_44);
  x_47 = lean_ctor_get(x_31, 1);
  lean_inc(x_47);
  lean_dec(x_31);
  x_48 = lean_unsigned_to_nat(0u);
  x_49 = l_Lean_Expr_getAppNumArgsAux(x_13, x_48);
  x_50 = l_Lean_Expr_getAppArgs___closed__1;
  lean_inc(x_49);
  x_51 = lean_mk_array(x_49, x_50);
  x_52 = lean_unsigned_to_nat(1u);
  x_53 = lean_nat_sub(x_49, x_52);
  lean_dec(x_49);
  x_54 = l___private_Lean_Expr_0__Lean_Expr_getAppArgsAux(x_13, x_51, x_53);
  x_55 = lean_array_get_size(x_54);
  x_56 = lean_nat_dec_eq(x_47, x_55);
  lean_dec(x_55);
  lean_dec(x_47);
  if (x_56 == 0)
  {
  lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; 
  lean_dec(x_54);
  lean_dec(x_46);
  lean_dec(x_17);
  x_57 = l_Lean_mkProj(x_1, x_2, x_3);
  x_58 = l_Lean_indentExpr(x_57);
  x_59 = l_Std_Range_forIn_loop___at___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType___spec__3___closed__2;
  x_60 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_60, 0, x_59);
  lean_ctor_set(x_60, 1, x_58);
  x_61 = l_Lean_KernelException_toMessageData___closed__15;
  x_62 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_62, 0, x_60);
  lean_ctor_set(x_62, 1, x_61);
  x_63 = l_Lean_throwError___at_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1049____spec__1(x_62, 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);
  return x_63;
  }
  else
  {
  lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; 
  x_64 = lean_ctor_get(x_46, 0);
  lean_inc(x_64);
  lean_dec(x_46);
  x_65 = lean_ctor_get(x_64, 0);
  lean_inc(x_65);
  lean_dec(x_64);
  x_66 = l_Lean_mkConst(x_65, x_17);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  x_67 = l___private_Lean_Meta_InferType_0__Lean_Meta_inferAppType(x_66, x_54, x_4, x_5, x_6, x_7, x_45);
  if (lean_obj_tag(x_67) == 0)
  {
  lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; 
  x_68 = lean_ctor_get(x_67, 0);
  lean_inc(x_68);
  x_69 = lean_ctor_get(x_67, 1);
  lean_inc(x_69);
  lean_dec(x_67);
  lean_inc(x_2);
  x_70 = lean_alloc_ctor(0, 3, 0);
  lean_ctor_set(x_70, 0, x_48);
  lean_ctor_set(x_70, 1, x_2);
  lean_ctor_set(x_70, 2, x_52);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_3);
  lean_inc_n(x_2, 2);
  lean_inc(x_1);
  x_71 = l_Std_Range_forIn_loop___at___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType___spec__3(x_1, x_2, x_3, x_70, x_2, x_48, x_68, x_4, x_5, x_6, x_7, x_69);
  lean_dec(x_70);
  if (lean_obj_tag(x_71) == 0)
  {
  lean_object* x_72; lean_object* x_73; lean_object* x_74; 
  x_72 = lean_ctor_get(x_71, 0);
  lean_inc(x_72);
  x_73 = lean_ctor_get(x_71, 1);
  lean_inc(x_73);
  lean_dec(x_71);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  x_74 = l_Lean_Meta_whnf(x_72, x_4, x_5, x_6, x_7, x_73);
  if (lean_obj_tag(x_74) == 0)
  {
  lean_object* x_75; 
  x_75 = lean_ctor_get(x_74, 0);
  lean_inc(x_75);
  if (lean_obj_tag(x_75) == 7)
  {
  uint8_t x_76; 
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_76 = !lean_is_exclusive(x_74);
  if (x_76 == 0)
  {
  lean_object* x_77; lean_object* x_78; 
  x_77 = lean_ctor_get(x_74, 0);
  lean_dec(x_77);
  x_78 = lean_ctor_get(x_75, 1);
  lean_inc(x_78);
  lean_dec(x_75);
  lean_ctor_set(x_74, 0, x_78);
  return x_74;
  }
  else
  {
  lean_object* x_79; lean_object* x_80; lean_object* x_81; 
  x_79 = lean_ctor_get(x_74, 1);
  lean_inc(x_79);
  lean_dec(x_74);
  x_80 = lean_ctor_get(x_75, 1);
  lean_inc(x_80);
  lean_dec(x_75);
  x_81 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_81, 0, x_80);
  lean_ctor_set(x_81, 1, x_79);
  return x_81;
  }
  }
  else
  {
  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_dec(x_75);
  x_82 = lean_ctor_get(x_74, 1);
  lean_inc(x_82);
  lean_dec(x_74);
  x_83 = l_Lean_mkProj(x_1, x_2, x_3);
  x_84 = l_Lean_indentExpr(x_83);
  x_85 = l_Std_Range_forIn_loop___at___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType___spec__3___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_Lean_KernelException_toMessageData___closed__15;
  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_initFn____x40_Lean_Meta_Basic___hyg_1049____spec__1(x_88, x_4, x_5, x_6, x_7, x_82);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  return x_89;
  }
  }
  else
  {
  uint8_t x_90; 
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_90 = !lean_is_exclusive(x_74);
  if (x_90 == 0)
  {
  return x_74;
  }
  else
  {
  lean_object* x_91; lean_object* x_92; lean_object* x_93; 
  x_91 = lean_ctor_get(x_74, 0);
  x_92 = lean_ctor_get(x_74, 1);
  lean_inc(x_92);
  lean_inc(x_91);
  lean_dec(x_74);
  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
  {
  uint8_t x_94; 
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_94 = !lean_is_exclusive(x_71);
  if (x_94 == 0)
  {
  return x_71;
  }
  else
  {
  lean_object* x_95; lean_object* x_96; lean_object* x_97; 
  x_95 = lean_ctor_get(x_71, 0);
  x_96 = lean_ctor_get(x_71, 1);
  lean_inc(x_96);
  lean_inc(x_95);
  lean_dec(x_71);
  x_97 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_97, 0, x_95);
  lean_ctor_set(x_97, 1, x_96);
  return x_97;
  }
  }
  }
  else
  {
  uint8_t x_98; 
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_98 = !lean_is_exclusive(x_67);
  if (x_98 == 0)
  {
  return x_67;
  }
  else
  {
  lean_object* x_99; lean_object* x_100; lean_object* x_101; 
  x_99 = lean_ctor_get(x_67, 0);
  x_100 = lean_ctor_get(x_67, 1);
  lean_inc(x_100);
  lean_inc(x_99);
  lean_dec(x_67);
  x_101 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_101, 0, x_99);
  lean_ctor_set(x_101, 1, x_100);
  return x_101;
  }
  }
  }
  }
  else
  {
  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_dec(x_44);
  lean_dec(x_31);
  lean_dec(x_17);
  lean_dec(x_13);
  x_102 = lean_ctor_get(x_43, 1);
  lean_inc(x_102);
  lean_dec(x_43);
  x_103 = l_Lean_mkProj(x_1, x_2, x_3);
  x_104 = l_Lean_indentExpr(x_103);
  x_105 = l_Std_Range_forIn_loop___at___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType___spec__3___closed__2;
  x_106 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_106, 0, x_105);
  lean_ctor_set(x_106, 1, x_104);
  x_107 = l_Lean_KernelException_toMessageData___closed__15;
  x_108 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_108, 0, x_106);
  lean_ctor_set(x_108, 1, x_107);
  x_109 = l_Lean_throwError___at_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1049____spec__1(x_108, x_4, x_5, x_6, x_7, x_102);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  return x_109;
  }
  }
  else
  {
  uint8_t x_110; 
  lean_dec(x_31);
  lean_dec(x_17);
  lean_dec(x_13);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_110 = !lean_is_exclusive(x_43);
  if (x_110 == 0)
  {
  return x_43;
  }
  else
  {
  lean_object* x_111; lean_object* x_112; lean_object* x_113; 
  x_111 = lean_ctor_get(x_43, 0);
  x_112 = lean_ctor_get(x_43, 1);
  lean_inc(x_112);
  lean_inc(x_111);
  lean_dec(x_43);
  x_113 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_113, 0, x_111);
  lean_ctor_set(x_113, 1, x_112);
  return x_113;
  }
  }
  }
  else
  {
  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_dec(x_41);
  lean_dec(x_33);
  lean_dec(x_31);
  lean_dec(x_17);
  lean_dec(x_13);
  x_114 = l_Lean_mkProj(x_1, x_2, x_3);
  x_115 = l_Lean_indentExpr(x_114);
  x_116 = l_Std_Range_forIn_loop___at___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType___spec__3___closed__2;
  x_117 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_117, 0, x_116);
  lean_ctor_set(x_117, 1, x_115);
  x_118 = l_Lean_KernelException_toMessageData___closed__15;
  x_119 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_119, 0, x_117);
  lean_ctor_set(x_119, 1, x_118);
  x_120 = l_Lean_throwError___at_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1049____spec__1(x_119, x_4, x_5, x_6, x_7, x_20);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  return x_120;
  }
  }
  }
  else
  {
  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_dec(x_31);
  lean_dec(x_17);
  lean_dec(x_13);
  x_121 = l_Lean_mkProj(x_1, x_2, x_3);
  x_122 = l_Lean_indentExpr(x_121);
  x_123 = l_Std_Range_forIn_loop___at___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType___spec__3___closed__2;
  x_124 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_124, 0, x_123);
  lean_ctor_set(x_124, 1, x_122);
  x_125 = l_Lean_KernelException_toMessageData___closed__15;
  x_126 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_126, 0, x_124);
  lean_ctor_set(x_126, 1, x_125);
  x_127 = l_Lean_throwError___at_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1049____spec__1(x_126, x_4, x_5, x_6, x_7, x_20);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  return x_127;
  }
  }
  else
  {
  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_dec(x_30);
  lean_dec(x_17);
  lean_dec(x_13);
  x_128 = l_Lean_mkProj(x_1, x_2, x_3);
  x_129 = l_Lean_indentExpr(x_128);
  x_130 = l_Std_Range_forIn_loop___at___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType___spec__3___closed__2;
  x_131 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_131, 0, x_130);
  lean_ctor_set(x_131, 1, x_129);
  x_132 = l_Lean_KernelException_toMessageData___closed__15;
  x_133 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_133, 0, x_131);
  lean_ctor_set(x_133, 1, x_132);
  x_134 = l_Lean_throwError___at_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1049____spec__1(x_133, x_4, x_5, x_6, x_7, x_20);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  return x_134;
  }
  }
  }
  else
  {
  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_dec(x_15);
  lean_dec(x_13);
  x_135 = l_Lean_mkProj(x_1, x_2, x_3);
  x_136 = l_Lean_indentExpr(x_135);
  x_137 = l_Std_Range_forIn_loop___at___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType___spec__3___closed__2;
  x_138 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_138, 0, x_137);
  lean_ctor_set(x_138, 1, x_136);
  x_139 = l_Lean_KernelException_toMessageData___closed__15;
  x_140 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_140, 0, x_138);
  lean_ctor_set(x_140, 1, x_139);
  x_141 = l_Lean_throwError___at_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1049____spec__1(x_140, x_4, x_5, x_6, x_7, x_14);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  return x_141;
  }
  }
  else
  {
  uint8_t x_142; 
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_142 = !lean_is_exclusive(x_12);
  if (x_142 == 0)
  {
  return x_12;
  }
  else
  {
  lean_object* x_143; lean_object* x_144; lean_object* x_145; 
  x_143 = lean_ctor_get(x_12, 0);
  x_144 = lean_ctor_get(x_12, 1);
  lean_inc(x_144);
  lean_inc(x_143);
  lean_dec(x_12);
  x_145 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_145, 0, x_143);
  lean_ctor_set(x_145, 1, x_144);
  return x_145;
  }
  }
  }
  else
  {
  uint8_t x_146; 
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_146 = !lean_is_exclusive(x_9);
  if (x_146 == 0)
  {
  return x_9;
  }
  else
  {
  lean_object* x_147; lean_object* x_148; lean_object* x_149; 
  x_147 = lean_ctor_get(x_9, 0);
  x_148 = lean_ctor_get(x_9, 1);
  lean_inc(x_148);
  lean_inc(x_147);
  lean_dec(x_9);
  x_149 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_149, 0, x_147);
  lean_ctor_set(x_149, 1, x_148);
  return x_149;
  }
  }
  }
  }
  lean_object* l_Lean_throwError___at___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType___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_throwError___at___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType___spec__2(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);
  return x_7;
  }
  }
  lean_object* l_Lean_getConstInfo___at___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType___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_getConstInfo___at___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType___spec__1(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);
  return x_7;
  }
  }
  lean_object* l_Std_Range_forIn_loop___at___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType___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, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) {
  _start:
  {
  lean_object* x_13; 
  x_13 = l_Std_Range_forIn_loop___at___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType___spec__3(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12);
  lean_dec(x_4);
  return x_13;
  }
  }
  lean_object* l_Lean_throwError___at_Lean_Meta_throwTypeExcepted___spec__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
  _start:
  {
  lean_object* x_7; lean_object* x_8; uint8_t x_9; 
  x_7 = lean_ctor_get(x_4, 3);
  x_8 = l_Lean_addMessageContextFull___at_Lean_Meta_instAddMessageContextMetaM___spec__1(x_1, x_2, x_3, x_4, x_5, x_6);
  x_9 = !lean_is_exclusive(x_8);
  if (x_9 == 0)
  {
  lean_object* x_10; lean_object* x_11; 
  x_10 = lean_ctor_get(x_8, 0);
  lean_inc(x_7);
  x_11 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_11, 0, x_7);
  lean_ctor_set(x_11, 1, x_10);
  lean_ctor_set_tag(x_8, 1);
  lean_ctor_set(x_8, 0, x_11);
  return x_8;
  }
  else
  {
  lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; 
  x_12 = lean_ctor_get(x_8, 0);
  x_13 = lean_ctor_get(x_8, 1);
  lean_inc(x_13);
  lean_inc(x_12);
  lean_dec(x_8);
  lean_inc(x_7);
  x_14 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_14, 0, x_7);
  lean_ctor_set(x_14, 1, x_12);
  x_15 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_15, 0, x_14);
  lean_ctor_set(x_15, 1, x_13);
  return x_15;
  }
  }
  }
  lean_object* l_Lean_throwError___at_Lean_Meta_throwTypeExcepted___spec__1(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = lean_alloc_closure((void*)(l_Lean_throwError___at_Lean_Meta_throwTypeExcepted___spec__1___rarg___boxed), 6, 0);
  return x_2;
  }
  }
  static lean_object* _init_l_Lean_Meta_throwTypeExcepted___rarg___closed__1() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("type expected");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Meta_throwTypeExcepted___rarg___closed__2() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; 
  x_1 = l_Lean_Meta_throwTypeExcepted___rarg___closed__1;
  x_2 = l_Lean_stringToMessageData(x_1);
  return x_2;
  }
  }
  lean_object* l_Lean_Meta_throwTypeExcepted___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; 
  x_7 = l_Lean_indentExpr(x_1);
  x_8 = l_Lean_Meta_throwTypeExcepted___rarg___closed__2;
  x_9 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_9, 0, x_8);
  lean_ctor_set(x_9, 1, x_7);
  x_10 = l_Lean_KernelException_toMessageData___closed__15;
  x_11 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_11, 0, x_9);
  lean_ctor_set(x_11, 1, x_10);
  x_12 = l_Lean_throwError___at_Lean_Meta_throwTypeExcepted___spec__1___rarg(x_11, x_2, x_3, x_4, x_5, x_6);
  return x_12;
  }
  }
  lean_object* l_Lean_Meta_throwTypeExcepted(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = lean_alloc_closure((void*)(l_Lean_Meta_throwTypeExcepted___rarg___boxed), 6, 0);
  return x_2;
  }
  }
  lean_object* l_Lean_throwError___at_Lean_Meta_throwTypeExcepted___spec__1___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
  _start:
  {
  lean_object* x_7; 
  x_7 = l_Lean_throwError___at_Lean_Meta_throwTypeExcepted___spec__1___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);
  return x_7;
  }
  }
  lean_object* l_Lean_Meta_throwTypeExcepted___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_throwTypeExcepted___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);
  return x_7;
  }
  }
  lean_object* l_Lean_Meta_getLevel_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
  _start:
  {
  switch (lean_obj_tag(x_1)) {
  case 2:
  {
  lean_object* x_5; uint64_t x_6; lean_object* x_7; lean_object* x_8; 
  lean_dec(x_4);
  lean_dec(x_2);
  x_5 = lean_ctor_get(x_1, 0);
  lean_inc(x_5);
  x_6 = lean_ctor_get_uint64(x_1, sizeof(void*)*1);
  lean_dec(x_1);
  x_7 = lean_box_uint64(x_6);
  x_8 = lean_apply_2(x_3, x_5, x_7);
  return x_8;
  }
  case 3:
  {
  lean_object* x_9; uint64_t x_10; lean_object* x_11; lean_object* x_12; 
  lean_dec(x_4);
  lean_dec(x_3);
  x_9 = lean_ctor_get(x_1, 0);
  lean_inc(x_9);
  x_10 = lean_ctor_get_uint64(x_1, sizeof(void*)*1);
  lean_dec(x_1);
  x_11 = lean_box_uint64(x_10);
  x_12 = lean_apply_2(x_2, x_9, x_11);
  return x_12;
  }
  default: 
  {
  lean_object* x_13; 
  lean_dec(x_3);
  lean_dec(x_2);
  x_13 = lean_apply_1(x_4, x_1);
  return x_13;
  }
  }
  }
  }
  lean_object* l_Lean_Meta_getLevel_match__1(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = lean_alloc_closure((void*)(l_Lean_Meta_getLevel_match__1___rarg), 4, 0);
  return x_2;
  }
  }
  lean_object* l_Lean_Meta_getLevel(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
  _start:
  {
  lean_object* x_7; 
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_3);
  lean_inc(x_2);
  lean_inc(x_1);
  x_7 = l_Lean_Meta_inferType(x_1, x_2, x_3, x_4, x_5, x_6);
  if (lean_obj_tag(x_7) == 0)
  {
  lean_object* x_8; lean_object* x_9; lean_object* x_10; 
  x_8 = lean_ctor_get(x_7, 0);
  lean_inc(x_8);
  x_9 = lean_ctor_get(x_7, 1);
  lean_inc(x_9);
  lean_dec(x_7);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_3);
  lean_inc(x_2);
  x_10 = l_Lean_Meta_whnfD(x_8, x_2, x_3, x_4, x_5, x_9);
  if (lean_obj_tag(x_10) == 0)
  {
  lean_object* x_11; 
  x_11 = lean_ctor_get(x_10, 0);
  lean_inc(x_11);
  switch (lean_obj_tag(x_11)) {
  case 2:
  {
  lean_object* x_12; lean_object* x_13; lean_object* x_14; 
  x_12 = lean_ctor_get(x_10, 1);
  lean_inc(x_12);
  lean_dec(x_10);
  x_13 = lean_ctor_get(x_11, 0);
  lean_inc(x_13);
  lean_dec(x_11);
  lean_inc(x_13);
  x_14 = l_Lean_Meta_isReadOnlyOrSyntheticOpaqueExprMVar(x_13, x_2, x_3, x_4, x_5, x_12);
  if (lean_obj_tag(x_14) == 0)
  {
  lean_object* x_15; uint8_t x_16; 
  x_15 = lean_ctor_get(x_14, 0);
  lean_inc(x_15);
  x_16 = lean_unbox(x_15);
  lean_dec(x_15);
  if (x_16 == 0)
  {
  lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; uint8_t x_23; 
  lean_dec(x_1);
  x_17 = lean_ctor_get(x_14, 1);
  lean_inc(x_17);
  lean_dec(x_14);
  x_18 = l_Lean_Meta_mkFreshLevelMVar___rarg(x_3, x_4, x_5, 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);
  lean_inc(x_19);
  x_21 = l_Lean_mkSort(x_19);
  x_22 = l_Lean_Meta_assignExprMVar(x_13, x_21, x_2, x_3, x_4, x_5, x_20);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_23 = !lean_is_exclusive(x_22);
  if (x_23 == 0)
  {
  lean_object* x_24; 
  x_24 = lean_ctor_get(x_22, 0);
  lean_dec(x_24);
  lean_ctor_set(x_22, 0, x_19);
  return x_22;
  }
  else
  {
  lean_object* x_25; lean_object* x_26; 
  x_25 = lean_ctor_get(x_22, 1);
  lean_inc(x_25);
  lean_dec(x_22);
  x_26 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_26, 0, x_19);
  lean_ctor_set(x_26, 1, x_25);
  return x_26;
  }
  }
  else
  {
  lean_object* x_27; lean_object* x_28; 
  lean_dec(x_13);
  x_27 = lean_ctor_get(x_14, 1);
  lean_inc(x_27);
  lean_dec(x_14);
  x_28 = l_Lean_Meta_throwTypeExcepted___rarg(x_1, x_2, x_3, x_4, x_5, x_27);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  return x_28;
  }
  }
  else
  {
  uint8_t x_29; 
  lean_dec(x_13);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_29 = !lean_is_exclusive(x_14);
  if (x_29 == 0)
  {
  return x_14;
  }
  else
  {
  lean_object* x_30; lean_object* x_31; lean_object* x_32; 
  x_30 = lean_ctor_get(x_14, 0);
  x_31 = lean_ctor_get(x_14, 1);
  lean_inc(x_31);
  lean_inc(x_30);
  lean_dec(x_14);
  x_32 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_32, 0, x_30);
  lean_ctor_set(x_32, 1, x_31);
  return x_32;
  }
  }
  }
  case 3:
  {
  uint8_t x_33; 
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_33 = !lean_is_exclusive(x_10);
  if (x_33 == 0)
  {
  lean_object* x_34; lean_object* x_35; 
  x_34 = lean_ctor_get(x_10, 0);
  lean_dec(x_34);
  x_35 = lean_ctor_get(x_11, 0);
  lean_inc(x_35);
  lean_dec(x_11);
  lean_ctor_set(x_10, 0, x_35);
  return x_10;
  }
  else
  {
  lean_object* x_36; lean_object* x_37; lean_object* x_38; 
  x_36 = lean_ctor_get(x_10, 1);
  lean_inc(x_36);
  lean_dec(x_10);
  x_37 = lean_ctor_get(x_11, 0);
  lean_inc(x_37);
  lean_dec(x_11);
  x_38 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_38, 0, x_37);
  lean_ctor_set(x_38, 1, x_36);
  return x_38;
  }
  }
  default: 
  {
  lean_object* x_39; lean_object* x_40; 
  lean_dec(x_11);
  x_39 = lean_ctor_get(x_10, 1);
  lean_inc(x_39);
  lean_dec(x_10);
  x_40 = l_Lean_Meta_throwTypeExcepted___rarg(x_1, x_2, x_3, x_4, x_5, x_39);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  return x_40;
  }
  }
  }
  else
  {
  uint8_t x_41; 
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_41 = !lean_is_exclusive(x_10);
  if (x_41 == 0)
  {
  return x_10;
  }
  else
  {
  lean_object* x_42; lean_object* x_43; lean_object* x_44; 
  x_42 = lean_ctor_get(x_10, 0);
  x_43 = lean_ctor_get(x_10, 1);
  lean_inc(x_43);
  lean_inc(x_42);
  lean_dec(x_10);
  x_44 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_44, 0, x_42);
  lean_ctor_set(x_44, 1, x_43);
  return x_44;
  }
  }
  }
  else
  {
  uint8_t x_45; 
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_45 = !lean_is_exclusive(x_7);
  if (x_45 == 0)
  {
  return x_7;
  }
  else
  {
  lean_object* x_46; lean_object* x_47; lean_object* x_48; 
  x_46 = lean_ctor_get(x_7, 0);
  x_47 = lean_ctor_get(x_7, 1);
  lean_inc(x_47);
  lean_inc(x_46);
  lean_dec(x_7);
  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;
  }
  }
  }
  }
  lean_object* l_Array_foldrMUnsafe_fold___at___private_Lean_Meta_InferType_0__Lean_Meta_inferForallType___spec__1(lean_object* x_1, size_t x_2, size_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:
  {
  uint8_t x_10; 
  x_10 = x_2 == x_3;
  if (x_10 == 0)
  {
  size_t x_11; size_t x_12; lean_object* x_13; lean_object* x_14; 
  x_11 = 1;
  x_12 = x_2 - x_11;
  x_13 = lean_array_uget(x_1, x_12);
  lean_inc(x_8);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  x_14 = l_Lean_Meta_inferType(x_13, x_5, x_6, x_7, x_8, x_9);
  if (lean_obj_tag(x_14) == 0)
  {
  lean_object* x_15; lean_object* x_16; lean_object* x_17; 
  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);
  lean_inc(x_8);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_inc(x_5);
  x_17 = l_Lean_Meta_getLevel(x_15, x_5, x_6, x_7, x_8, x_16);
  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);
  x_20 = lean_level_mk_imax_simp(x_18, x_4);
  x_2 = x_12;
  x_4 = x_20;
  x_9 = x_19;
  goto _start;
  }
  else
  {
  uint8_t x_22; 
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  x_22 = !lean_is_exclusive(x_17);
  if (x_22 == 0)
  {
  return x_17;
  }
  else
  {
  lean_object* x_23; lean_object* x_24; lean_object* x_25; 
  x_23 = lean_ctor_get(x_17, 0);
  x_24 = lean_ctor_get(x_17, 1);
  lean_inc(x_24);
  lean_inc(x_23);
  lean_dec(x_17);
  x_25 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_25, 0, x_23);
  lean_ctor_set(x_25, 1, x_24);
  return x_25;
  }
  }
  }
  else
  {
  uint8_t x_26; 
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  x_26 = !lean_is_exclusive(x_14);
  if (x_26 == 0)
  {
  return x_14;
  }
  else
  {
  lean_object* x_27; lean_object* x_28; lean_object* x_29; 
  x_27 = lean_ctor_get(x_14, 0);
  x_28 = lean_ctor_get(x_14, 1);
  lean_inc(x_28);
  lean_inc(x_27);
  lean_dec(x_14);
  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_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  x_30 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_30, 0, x_4);
  lean_ctor_set(x_30, 1, x_9);
  return x_30;
  }
  }
  }
  lean_object* l_Lean_Meta_forallTelescope___at___private_Lean_Meta_InferType_0__Lean_Meta_inferForallType___spec__2___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
  _start:
  {
  lean_object* x_8; uint8_t x_9; lean_object* x_10; 
  x_8 = lean_box(0);
  x_9 = 0;
  x_10 = l___private_Lean_Meta_Basic_0__Lean_Meta_forallTelescopeReducingAuxAux___rarg(x_9, x_8, x_1, x_2, x_3, x_4, x_5, x_6, x_7);
  if (lean_obj_tag(x_10) == 0)
  {
  uint8_t x_11; 
  x_11 = !lean_is_exclusive(x_10);
  if (x_11 == 0)
  {
  return x_10;
  }
  else
  {
  lean_object* x_12; lean_object* x_13; lean_object* x_14; 
  x_12 = lean_ctor_get(x_10, 0);
  x_13 = lean_ctor_get(x_10, 1);
  lean_inc(x_13);
  lean_inc(x_12);
  lean_dec(x_10);
  x_14 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_14, 0, x_12);
  lean_ctor_set(x_14, 1, x_13);
  return x_14;
  }
  }
  else
  {
  uint8_t x_15; 
  x_15 = !lean_is_exclusive(x_10);
  if (x_15 == 0)
  {
  return x_10;
  }
  else
  {
  lean_object* x_16; lean_object* x_17; lean_object* x_18; 
  x_16 = lean_ctor_get(x_10, 0);
  x_17 = lean_ctor_get(x_10, 1);
  lean_inc(x_17);
  lean_inc(x_16);
  lean_dec(x_10);
  x_18 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_18, 0, x_16);
  lean_ctor_set(x_18, 1, x_17);
  return x_18;
  }
  }
  }
  }
  lean_object* l_Lean_Meta_forallTelescope___at___private_Lean_Meta_InferType_0__Lean_Meta_inferForallType___spec__2(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = lean_alloc_closure((void*)(l_Lean_Meta_forallTelescope___at___private_Lean_Meta_InferType_0__Lean_Meta_inferForallType___spec__2___rarg), 7, 0);
  return x_2;
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferForallType___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
  _start:
  {
  lean_object* x_8; 
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_3);
  x_8 = l_Lean_Meta_getLevel(x_2, x_3, x_4, x_5, x_6, x_7);
  if (lean_obj_tag(x_8) == 0)
  {
  uint8_t x_9; 
  x_9 = !lean_is_exclusive(x_8);
  if (x_9 == 0)
  {
  lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; 
  x_10 = lean_ctor_get(x_8, 0);
  x_11 = lean_ctor_get(x_8, 1);
  x_12 = lean_array_get_size(x_1);
  x_13 = lean_unsigned_to_nat(0u);
  x_14 = lean_nat_dec_lt(x_13, x_12);
  if (x_14 == 0)
  {
  lean_object* x_15; lean_object* x_16; 
  lean_dec(x_12);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  x_15 = l_Lean_Level_normalize(x_10);
  lean_dec(x_10);
  x_16 = l_Lean_mkSort(x_15);
  lean_ctor_set(x_8, 0, x_16);
  return x_8;
  }
  else
  {
  size_t x_17; size_t x_18; lean_object* x_19; 
  lean_free_object(x_8);
  x_17 = lean_usize_of_nat(x_12);
  lean_dec(x_12);
  x_18 = 0;
  x_19 = l_Array_foldrMUnsafe_fold___at___private_Lean_Meta_InferType_0__Lean_Meta_inferForallType___spec__1(x_1, x_17, x_18, x_10, x_3, x_4, x_5, x_6, x_11);
  if (lean_obj_tag(x_19) == 0)
  {
  uint8_t x_20; 
  x_20 = !lean_is_exclusive(x_19);
  if (x_20 == 0)
  {
  lean_object* x_21; lean_object* x_22; lean_object* x_23; 
  x_21 = lean_ctor_get(x_19, 0);
  x_22 = l_Lean_Level_normalize(x_21);
  lean_dec(x_21);
  x_23 = l_Lean_mkSort(x_22);
  lean_ctor_set(x_19, 0, x_23);
  return x_19;
  }
  else
  {
  lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; 
  x_24 = lean_ctor_get(x_19, 0);
  x_25 = lean_ctor_get(x_19, 1);
  lean_inc(x_25);
  lean_inc(x_24);
  lean_dec(x_19);
  x_26 = l_Lean_Level_normalize(x_24);
  lean_dec(x_24);
  x_27 = l_Lean_mkSort(x_26);
  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
  {
  uint8_t x_29; 
  x_29 = !lean_is_exclusive(x_19);
  if (x_29 == 0)
  {
  return x_19;
  }
  else
  {
  lean_object* x_30; lean_object* x_31; lean_object* x_32; 
  x_30 = lean_ctor_get(x_19, 0);
  x_31 = lean_ctor_get(x_19, 1);
  lean_inc(x_31);
  lean_inc(x_30);
  lean_dec(x_19);
  x_32 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_32, 0, x_30);
  lean_ctor_set(x_32, 1, x_31);
  return x_32;
  }
  }
  }
  }
  else
  {
  lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; uint8_t x_37; 
  x_33 = lean_ctor_get(x_8, 0);
  x_34 = lean_ctor_get(x_8, 1);
  lean_inc(x_34);
  lean_inc(x_33);
  lean_dec(x_8);
  x_35 = lean_array_get_size(x_1);
  x_36 = lean_unsigned_to_nat(0u);
  x_37 = lean_nat_dec_lt(x_36, x_35);
  if (x_37 == 0)
  {
  lean_object* x_38; lean_object* x_39; lean_object* x_40; 
  lean_dec(x_35);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  x_38 = l_Lean_Level_normalize(x_33);
  lean_dec(x_33);
  x_39 = l_Lean_mkSort(x_38);
  x_40 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_40, 0, x_39);
  lean_ctor_set(x_40, 1, x_34);
  return x_40;
  }
  else
  {
  size_t x_41; size_t x_42; lean_object* x_43; 
  x_41 = lean_usize_of_nat(x_35);
  lean_dec(x_35);
  x_42 = 0;
  x_43 = l_Array_foldrMUnsafe_fold___at___private_Lean_Meta_InferType_0__Lean_Meta_inferForallType___spec__1(x_1, x_41, x_42, x_33, x_3, x_4, x_5, x_6, x_34);
  if (lean_obj_tag(x_43) == 0)
  {
  lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; 
  x_44 = lean_ctor_get(x_43, 0);
  lean_inc(x_44);
  x_45 = lean_ctor_get(x_43, 1);
  lean_inc(x_45);
  if (lean_is_exclusive(x_43)) {
   lean_ctor_release(x_43, 0);
   lean_ctor_release(x_43, 1);
   x_46 = x_43;
  } else {
   lean_dec_ref(x_43);
   x_46 = lean_box(0);
  }
  x_47 = l_Lean_Level_normalize(x_44);
  lean_dec(x_44);
  x_48 = l_Lean_mkSort(x_47);
  if (lean_is_scalar(x_46)) {
   x_49 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_49 = x_46;
  }
  lean_ctor_set(x_49, 0, x_48);
  lean_ctor_set(x_49, 1, x_45);
  return x_49;
  }
  else
  {
  lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; 
  x_50 = lean_ctor_get(x_43, 0);
  lean_inc(x_50);
  x_51 = lean_ctor_get(x_43, 1);
  lean_inc(x_51);
  if (lean_is_exclusive(x_43)) {
   lean_ctor_release(x_43, 0);
   lean_ctor_release(x_43, 1);
   x_52 = x_43;
  } else {
   lean_dec_ref(x_43);
   x_52 = lean_box(0);
  }
  if (lean_is_scalar(x_52)) {
   x_53 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_53 = x_52;
  }
  lean_ctor_set(x_53, 0, x_50);
  lean_ctor_set(x_53, 1, x_51);
  return x_53;
  }
  }
  }
  }
  else
  {
  uint8_t x_54; 
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  x_54 = !lean_is_exclusive(x_8);
  if (x_54 == 0)
  {
  return x_8;
  }
  else
  {
  lean_object* x_55; lean_object* x_56; lean_object* x_57; 
  x_55 = lean_ctor_get(x_8, 0);
  x_56 = lean_ctor_get(x_8, 1);
  lean_inc(x_56);
  lean_inc(x_55);
  lean_dec(x_8);
  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;
  }
  }
  }
  }
  static lean_object* _init_l___private_Lean_Meta_InferType_0__Lean_Meta_inferForallType___closed__1() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_alloc_closure((void*)(l___private_Lean_Meta_InferType_0__Lean_Meta_inferForallType___lambda__1___boxed), 7, 0);
  return x_1;
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferForallType(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; 
  x_7 = l___private_Lean_Meta_InferType_0__Lean_Meta_inferForallType___closed__1;
  x_8 = l_Lean_Meta_forallTelescope___at___private_Lean_Meta_InferType_0__Lean_Meta_inferForallType___spec__2___rarg(x_1, x_7, x_2, x_3, x_4, x_5, x_6);
  return x_8;
  }
  }
  lean_object* l_Array_foldrMUnsafe_fold___at___private_Lean_Meta_InferType_0__Lean_Meta_inferForallType___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) {
  _start:
  {
  size_t x_10; size_t x_11; lean_object* x_12; 
  x_10 = lean_unbox_usize(x_2);
  lean_dec(x_2);
  x_11 = lean_unbox_usize(x_3);
  lean_dec(x_3);
  x_12 = l_Array_foldrMUnsafe_fold___at___private_Lean_Meta_InferType_0__Lean_Meta_inferForallType___spec__1(x_1, x_10, x_11, x_4, x_5, x_6, x_7, x_8, x_9);
  lean_dec(x_1);
  return x_12;
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferForallType___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) {
  _start:
  {
  lean_object* x_8; 
  x_8 = l___private_Lean_Meta_InferType_0__Lean_Meta_inferForallType___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7);
  lean_dec(x_1);
  return x_8;
  }
  }
  lean_object* l_Lean_Meta_lambdaLetTelescope___at___private_Lean_Meta_InferType_0__Lean_Meta_inferLambdaType___spec__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
  _start:
  {
  uint8_t x_8; lean_object* x_9; 
  x_8 = 1;
  x_9 = l___private_Lean_Meta_Basic_0__Lean_Meta_lambdaTelescopeImp___rarg(x_1, x_8, x_2, x_3, x_4, x_5, x_6, x_7);
  if (lean_obj_tag(x_9) == 0)
  {
  uint8_t x_10; 
  x_10 = !lean_is_exclusive(x_9);
  if (x_10 == 0)
  {
  return x_9;
  }
  else
  {
  lean_object* x_11; lean_object* x_12; lean_object* x_13; 
  x_11 = lean_ctor_get(x_9, 0);
  x_12 = lean_ctor_get(x_9, 1);
  lean_inc(x_12);
  lean_inc(x_11);
  lean_dec(x_9);
  x_13 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_13, 0, x_11);
  lean_ctor_set(x_13, 1, x_12);
  return x_13;
  }
  }
  else
  {
  uint8_t x_14; 
  x_14 = !lean_is_exclusive(x_9);
  if (x_14 == 0)
  {
  return x_9;
  }
  else
  {
  lean_object* x_15; lean_object* x_16; lean_object* x_17; 
  x_15 = lean_ctor_get(x_9, 0);
  x_16 = lean_ctor_get(x_9, 1);
  lean_inc(x_16);
  lean_inc(x_15);
  lean_dec(x_9);
  x_17 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_17, 0, x_15);
  lean_ctor_set(x_17, 1, x_16);
  return x_17;
  }
  }
  }
  }
  lean_object* l_Lean_Meta_lambdaLetTelescope___at___private_Lean_Meta_InferType_0__Lean_Meta_inferLambdaType___spec__1(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = lean_alloc_closure((void*)(l_Lean_Meta_lambdaLetTelescope___at___private_Lean_Meta_InferType_0__Lean_Meta_inferLambdaType___spec__1___rarg), 7, 0);
  return x_2;
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferLambdaType___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
  _start:
  {
  lean_object* x_8; 
  lean_inc(x_6);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_3);
  x_8 = l_Lean_Meta_inferType(x_2, x_3, x_4, x_5, x_6, x_7);
  if (lean_obj_tag(x_8) == 0)
  {
  lean_object* x_9; lean_object* x_10; uint8_t x_11; uint8_t x_12; lean_object* x_13; 
  x_9 = lean_ctor_get(x_8, 0);
  lean_inc(x_9);
  x_10 = lean_ctor_get(x_8, 1);
  lean_inc(x_10);
  lean_dec(x_8);
  x_11 = 0;
  x_12 = 1;
  x_13 = l_Lean_Meta_mkForallFVars(x_1, x_9, x_11, x_12, x_3, x_4, x_5, x_6, x_10);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  return x_13;
  }
  else
  {
  uint8_t x_14; 
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_1);
  x_14 = !lean_is_exclusive(x_8);
  if (x_14 == 0)
  {
  return x_8;
  }
  else
  {
  lean_object* x_15; lean_object* x_16; lean_object* x_17; 
  x_15 = lean_ctor_get(x_8, 0);
  x_16 = lean_ctor_get(x_8, 1);
  lean_inc(x_16);
  lean_inc(x_15);
  lean_dec(x_8);
  x_17 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_17, 0, x_15);
  lean_ctor_set(x_17, 1, x_16);
  return x_17;
  }
  }
  }
  }
  static lean_object* _init_l___private_Lean_Meta_InferType_0__Lean_Meta_inferLambdaType___closed__1() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_alloc_closure((void*)(l___private_Lean_Meta_InferType_0__Lean_Meta_inferLambdaType___lambda__1), 7, 0);
  return x_1;
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferLambdaType(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; 
  x_7 = l___private_Lean_Meta_InferType_0__Lean_Meta_inferLambdaType___closed__1;
  x_8 = l_Lean_Meta_lambdaLetTelescope___at___private_Lean_Meta_InferType_0__Lean_Meta_inferLambdaType___spec__1___rarg(x_1, x_7, x_2, x_3, x_4, x_5, x_6);
  return x_8;
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_withLocalDecl_x27___rarg(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, lean_object* x_9) {
  _start:
  {
  lean_object* x_10; 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; uint8_t x_30; 
  x_20 = lean_st_ref_get(x_8, x_9);
  x_21 = lean_ctor_get(x_20, 1);
  lean_inc(x_21);
  lean_dec(x_20);
  x_22 = lean_st_ref_get(x_6, x_21);
  x_23 = lean_ctor_get(x_22, 0);
  lean_inc(x_23);
  x_24 = lean_ctor_get(x_22, 1);
  lean_inc(x_24);
  lean_dec(x_22);
  x_25 = lean_ctor_get(x_23, 1);
  lean_inc(x_25);
  lean_dec(x_23);
  x_26 = l_Lean_mkFreshId___at_Lean_Meta_mkFreshExprMVarAt___spec__1___rarg(x_8, x_24);
  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);
  lean_inc(x_27);
  x_29 = l_Lean_mkFVar(x_27);
  x_30 = !lean_is_exclusive(x_5);
  if (x_30 == 0)
  {
  lean_object* x_31; lean_object* x_32; lean_object* x_33; 
  x_31 = lean_ctor_get(x_5, 1);
  x_32 = lean_local_ctx_mk_local_decl(x_31, x_27, x_1, x_3, x_2);
  lean_ctor_set(x_5, 1, x_32);
  lean_inc(x_8);
  lean_inc(x_6);
  x_33 = lean_apply_6(x_4, x_29, x_5, x_6, x_7, x_8, x_28);
  if (lean_obj_tag(x_33) == 0)
  {
  lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; uint8_t x_41; 
  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_8, x_35);
  lean_dec(x_8);
  x_37 = lean_ctor_get(x_36, 1);
  lean_inc(x_37);
  lean_dec(x_36);
  x_38 = lean_st_ref_take(x_6, 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; uint8_t x_44; 
  x_42 = lean_ctor_get(x_39, 1);
  lean_dec(x_42);
  lean_ctor_set(x_39, 1, x_25);
  x_43 = lean_st_ref_set(x_6, x_39, x_40);
  lean_dec(x_6);
  x_44 = !lean_is_exclusive(x_43);
  if (x_44 == 0)
  {
  lean_object* x_45; 
  x_45 = lean_ctor_get(x_43, 0);
  lean_dec(x_45);
  lean_ctor_set(x_43, 0, x_34);
  x_10 = x_43;
  goto block_19;
  }
  else
  {
  lean_object* x_46; lean_object* x_47; 
  x_46 = lean_ctor_get(x_43, 1);
  lean_inc(x_46);
  lean_dec(x_43);
  x_47 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_47, 0, x_34);
  lean_ctor_set(x_47, 1, x_46);
  x_10 = x_47;
  goto block_19;
  }
  }
  else
  {
  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_48 = lean_ctor_get(x_39, 0);
  x_49 = lean_ctor_get(x_39, 2);
  x_50 = lean_ctor_get(x_39, 3);
  lean_inc(x_50);
  lean_inc(x_49);
  lean_inc(x_48);
  lean_dec(x_39);
  x_51 = lean_alloc_ctor(0, 4, 0);
  lean_ctor_set(x_51, 0, x_48);
  lean_ctor_set(x_51, 1, x_25);
  lean_ctor_set(x_51, 2, x_49);
  lean_ctor_set(x_51, 3, x_50);
  x_52 = lean_st_ref_set(x_6, x_51, x_40);
  lean_dec(x_6);
  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_34);
  lean_ctor_set(x_55, 1, x_53);
  x_10 = x_55;
  goto block_19;
  }
  }
  else
  {
  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; uint8_t x_63; 
  x_56 = lean_ctor_get(x_33, 0);
  lean_inc(x_56);
  x_57 = lean_ctor_get(x_33, 1);
  lean_inc(x_57);
  lean_dec(x_33);
  x_58 = lean_st_ref_get(x_8, x_57);
  lean_dec(x_8);
  x_59 = lean_ctor_get(x_58, 1);
  lean_inc(x_59);
  lean_dec(x_58);
  x_60 = lean_st_ref_take(x_6, x_59);
  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_is_exclusive(x_61);
  if (x_63 == 0)
  {
  lean_object* x_64; lean_object* x_65; uint8_t x_66; 
  x_64 = lean_ctor_get(x_61, 1);
  lean_dec(x_64);
  lean_ctor_set(x_61, 1, x_25);
  x_65 = lean_st_ref_set(x_6, x_61, x_62);
  lean_dec(x_6);
  x_66 = !lean_is_exclusive(x_65);
  if (x_66 == 0)
  {
  lean_object* x_67; 
  x_67 = lean_ctor_get(x_65, 0);
  lean_dec(x_67);
  lean_ctor_set_tag(x_65, 1);
  lean_ctor_set(x_65, 0, x_56);
  x_10 = x_65;
  goto block_19;
  }
  else
  {
  lean_object* x_68; lean_object* x_69; 
  x_68 = lean_ctor_get(x_65, 1);
  lean_inc(x_68);
  lean_dec(x_65);
  x_69 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_69, 0, x_56);
  lean_ctor_set(x_69, 1, x_68);
  x_10 = x_69;
  goto block_19;
  }
  }
  else
  {
  lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; 
  x_70 = lean_ctor_get(x_61, 0);
  x_71 = lean_ctor_get(x_61, 2);
  x_72 = lean_ctor_get(x_61, 3);
  lean_inc(x_72);
  lean_inc(x_71);
  lean_inc(x_70);
  lean_dec(x_61);
  x_73 = lean_alloc_ctor(0, 4, 0);
  lean_ctor_set(x_73, 0, x_70);
  lean_ctor_set(x_73, 1, x_25);
  lean_ctor_set(x_73, 2, x_71);
  lean_ctor_set(x_73, 3, x_72);
  x_74 = lean_st_ref_set(x_6, x_73, x_62);
  lean_dec(x_6);
  x_75 = lean_ctor_get(x_74, 1);
  lean_inc(x_75);
  if (lean_is_exclusive(x_74)) {
   lean_ctor_release(x_74, 0);
   lean_ctor_release(x_74, 1);
   x_76 = x_74;
  } else {
   lean_dec_ref(x_74);
   x_76 = lean_box(0);
  }
  if (lean_is_scalar(x_76)) {
   x_77 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_77 = x_76;
   lean_ctor_set_tag(x_77, 1);
  }
  lean_ctor_set(x_77, 0, x_56);
  lean_ctor_set(x_77, 1, x_75);
  x_10 = x_77;
  goto block_19;
  }
  }
  }
  else
  {
  lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; 
  x_78 = lean_ctor_get(x_5, 0);
  x_79 = lean_ctor_get(x_5, 1);
  x_80 = lean_ctor_get(x_5, 2);
  x_81 = lean_ctor_get(x_5, 3);
  lean_inc(x_81);
  lean_inc(x_80);
  lean_inc(x_79);
  lean_inc(x_78);
  lean_dec(x_5);
  x_82 = lean_local_ctx_mk_local_decl(x_79, x_27, x_1, x_3, x_2);
  x_83 = lean_alloc_ctor(0, 4, 0);
  lean_ctor_set(x_83, 0, x_78);
  lean_ctor_set(x_83, 1, x_82);
  lean_ctor_set(x_83, 2, x_80);
  lean_ctor_set(x_83, 3, x_81);
  lean_inc(x_8);
  lean_inc(x_6);
  x_84 = lean_apply_6(x_4, x_29, x_83, x_6, x_7, x_8, x_28);
  if (lean_obj_tag(x_84) == 0)
  {
  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; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; 
  x_85 = lean_ctor_get(x_84, 0);
  lean_inc(x_85);
  x_86 = lean_ctor_get(x_84, 1);
  lean_inc(x_86);
  lean_dec(x_84);
  x_87 = lean_st_ref_get(x_8, x_86);
  lean_dec(x_8);
  x_88 = lean_ctor_get(x_87, 1);
  lean_inc(x_88);
  lean_dec(x_87);
  x_89 = lean_st_ref_take(x_6, x_88);
  x_90 = lean_ctor_get(x_89, 0);
  lean_inc(x_90);
  x_91 = lean_ctor_get(x_89, 1);
  lean_inc(x_91);
  lean_dec(x_89);
  x_92 = lean_ctor_get(x_90, 0);
  lean_inc(x_92);
  x_93 = lean_ctor_get(x_90, 2);
  lean_inc(x_93);
  x_94 = lean_ctor_get(x_90, 3);
  lean_inc(x_94);
  if (lean_is_exclusive(x_90)) {
   lean_ctor_release(x_90, 0);
   lean_ctor_release(x_90, 1);
   lean_ctor_release(x_90, 2);
   lean_ctor_release(x_90, 3);
   x_95 = x_90;
  } else {
   lean_dec_ref(x_90);
   x_95 = lean_box(0);
  }
  if (lean_is_scalar(x_95)) {
   x_96 = lean_alloc_ctor(0, 4, 0);
  } else {
   x_96 = x_95;
  }
  lean_ctor_set(x_96, 0, x_92);
  lean_ctor_set(x_96, 1, x_25);
  lean_ctor_set(x_96, 2, x_93);
  lean_ctor_set(x_96, 3, x_94);
  x_97 = lean_st_ref_set(x_6, x_96, x_91);
  lean_dec(x_6);
  x_98 = lean_ctor_get(x_97, 1);
  lean_inc(x_98);
  if (lean_is_exclusive(x_97)) {
   lean_ctor_release(x_97, 0);
   lean_ctor_release(x_97, 1);
   x_99 = x_97;
  } else {
   lean_dec_ref(x_97);
   x_99 = lean_box(0);
  }
  if (lean_is_scalar(x_99)) {
   x_100 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_100 = x_99;
  }
  lean_ctor_set(x_100, 0, x_85);
  lean_ctor_set(x_100, 1, x_98);
  x_10 = x_100;
  goto block_19;
  }
  else
  {
  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; lean_object* x_116; 
  x_101 = lean_ctor_get(x_84, 0);
  lean_inc(x_101);
  x_102 = lean_ctor_get(x_84, 1);
  lean_inc(x_102);
  lean_dec(x_84);
  x_103 = lean_st_ref_get(x_8, x_102);
  lean_dec(x_8);
  x_104 = lean_ctor_get(x_103, 1);
  lean_inc(x_104);
  lean_dec(x_103);
  x_105 = lean_st_ref_take(x_6, x_104);
  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 = lean_ctor_get(x_106, 0);
  lean_inc(x_108);
  x_109 = lean_ctor_get(x_106, 2);
  lean_inc(x_109);
  x_110 = lean_ctor_get(x_106, 3);
  lean_inc(x_110);
  if (lean_is_exclusive(x_106)) {
   lean_ctor_release(x_106, 0);
   lean_ctor_release(x_106, 1);
   lean_ctor_release(x_106, 2);
   lean_ctor_release(x_106, 3);
   x_111 = x_106;
  } else {
   lean_dec_ref(x_106);
   x_111 = lean_box(0);
  }
  if (lean_is_scalar(x_111)) {
   x_112 = lean_alloc_ctor(0, 4, 0);
  } else {
   x_112 = x_111;
  }
  lean_ctor_set(x_112, 0, x_108);
  lean_ctor_set(x_112, 1, x_25);
  lean_ctor_set(x_112, 2, x_109);
  lean_ctor_set(x_112, 3, x_110);
  x_113 = lean_st_ref_set(x_6, x_112, x_107);
  lean_dec(x_6);
  x_114 = lean_ctor_get(x_113, 1);
  lean_inc(x_114);
  if (lean_is_exclusive(x_113)) {
   lean_ctor_release(x_113, 0);
   lean_ctor_release(x_113, 1);
   x_115 = x_113;
  } else {
   lean_dec_ref(x_113);
   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_tag(x_116, 1);
  }
  lean_ctor_set(x_116, 0, x_101);
  lean_ctor_set(x_116, 1, x_114);
  x_10 = x_116;
  goto block_19;
  }
  }
  block_19:
  {
  if (lean_obj_tag(x_10) == 0)
  {
  uint8_t x_11; 
  x_11 = !lean_is_exclusive(x_10);
  if (x_11 == 0)
  {
  return x_10;
  }
  else
  {
  lean_object* x_12; lean_object* x_13; lean_object* x_14; 
  x_12 = lean_ctor_get(x_10, 0);
  x_13 = lean_ctor_get(x_10, 1);
  lean_inc(x_13);
  lean_inc(x_12);
  lean_dec(x_10);
  x_14 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_14, 0, x_12);
  lean_ctor_set(x_14, 1, x_13);
  return x_14;
  }
  }
  else
  {
  uint8_t x_15; 
  x_15 = !lean_is_exclusive(x_10);
  if (x_15 == 0)
  {
  return x_10;
  }
  else
  {
  lean_object* x_16; lean_object* x_17; lean_object* x_18; 
  x_16 = lean_ctor_get(x_10, 0);
  x_17 = lean_ctor_get(x_10, 1);
  lean_inc(x_17);
  lean_inc(x_16);
  lean_dec(x_10);
  x_18 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_18, 0, x_16);
  lean_ctor_set(x_18, 1, x_17);
  return x_18;
  }
  }
  }
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_withLocalDecl_x27(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = lean_alloc_closure((void*)(l___private_Lean_Meta_InferType_0__Lean_Meta_withLocalDecl_x27___rarg___boxed), 9, 0);
  return x_2;
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_withLocalDecl_x27___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) {
  _start:
  {
  uint8_t x_10; lean_object* x_11; 
  x_10 = lean_unbox(x_2);
  lean_dec(x_2);
  x_11 = l___private_Lean_Meta_InferType_0__Lean_Meta_withLocalDecl_x27___rarg(x_1, x_10, x_3, x_4, x_5, x_6, x_7, x_8, x_9);
  return x_11;
  }
  }
  lean_object* l_Lean_throwError___at_Lean_Meta_throwUnknownMVar___spec__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
  _start:
  {
  lean_object* x_7; lean_object* x_8; uint8_t x_9; 
  x_7 = lean_ctor_get(x_4, 3);
  x_8 = l_Lean_addMessageContextFull___at_Lean_Meta_instAddMessageContextMetaM___spec__1(x_1, x_2, x_3, x_4, x_5, x_6);
  x_9 = !lean_is_exclusive(x_8);
  if (x_9 == 0)
  {
  lean_object* x_10; lean_object* x_11; 
  x_10 = lean_ctor_get(x_8, 0);
  lean_inc(x_7);
  x_11 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_11, 0, x_7);
  lean_ctor_set(x_11, 1, x_10);
  lean_ctor_set_tag(x_8, 1);
  lean_ctor_set(x_8, 0, x_11);
  return x_8;
  }
  else
  {
  lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; 
  x_12 = lean_ctor_get(x_8, 0);
  x_13 = lean_ctor_get(x_8, 1);
  lean_inc(x_13);
  lean_inc(x_12);
  lean_dec(x_8);
  lean_inc(x_7);
  x_14 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_14, 0, x_7);
  lean_ctor_set(x_14, 1, x_12);
  x_15 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_15, 0, x_14);
  lean_ctor_set(x_15, 1, x_13);
  return x_15;
  }
  }
  }
  lean_object* l_Lean_throwError___at_Lean_Meta_throwUnknownMVar___spec__1(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = lean_alloc_closure((void*)(l_Lean_throwError___at_Lean_Meta_throwUnknownMVar___spec__1___rarg___boxed), 6, 0);
  return x_2;
  }
  }
  lean_object* l_Lean_Meta_throwUnknownMVar___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; 
  x_7 = l_Lean_mkMVar(x_1);
  x_8 = lean_alloc_ctor(2, 1, 0);
  lean_ctor_set(x_8, 0, x_7);
  x_9 = l_Lean_Meta_getMVarDecl___closed__2;
  x_10 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_10, 0, x_9);
  lean_ctor_set(x_10, 1, x_8);
  x_11 = l_Lean_KernelException_toMessageData___closed__3;
  x_12 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_12, 0, x_10);
  lean_ctor_set(x_12, 1, x_11);
  x_13 = l_Lean_throwError___at_Lean_Meta_throwUnknownMVar___spec__1___rarg(x_12, x_2, x_3, x_4, x_5, x_6);
  return x_13;
  }
  }
  lean_object* l_Lean_Meta_throwUnknownMVar(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = lean_alloc_closure((void*)(l_Lean_Meta_throwUnknownMVar___rarg___boxed), 6, 0);
  return x_2;
  }
  }
  lean_object* l_Lean_throwError___at_Lean_Meta_throwUnknownMVar___spec__1___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
  _start:
  {
  lean_object* x_7; 
  x_7 = l_Lean_throwError___at_Lean_Meta_throwUnknownMVar___spec__1___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);
  return x_7;
  }
  }
  lean_object* l_Lean_Meta_throwUnknownMVar___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_throwUnknownMVar___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);
  return x_7;
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferMVarType_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
  _start:
  {
  if (lean_obj_tag(x_1) == 0)
  {
  lean_object* x_4; lean_object* x_5; 
  lean_dec(x_2);
  x_4 = lean_box(0);
  x_5 = lean_apply_1(x_3, x_4);
  return x_5;
  }
  else
  {
  lean_object* x_6; lean_object* x_7; 
  lean_dec(x_3);
  x_6 = lean_ctor_get(x_1, 0);
  lean_inc(x_6);
  lean_dec(x_1);
  x_7 = lean_apply_1(x_2, x_6);
  return x_7;
  }
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferMVarType_match__1(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = lean_alloc_closure((void*)(l___private_Lean_Meta_InferType_0__Lean_Meta_inferMVarType_match__1___rarg), 3, 0);
  return x_2;
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferMVarType(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; uint8_t x_10; 
  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_3, x_8);
  x_10 = !lean_is_exclusive(x_9);
  if (x_10 == 0)
  {
  lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; 
  x_11 = lean_ctor_get(x_9, 0);
  x_12 = lean_ctor_get(x_9, 1);
  x_13 = lean_ctor_get(x_11, 0);
  lean_inc(x_13);
  lean_dec(x_11);
  x_14 = l_Lean_MetavarContext_findDecl_x3f(x_13, x_1);
  if (lean_obj_tag(x_14) == 0)
  {
  lean_object* x_15; 
  lean_free_object(x_9);
  x_15 = l_Lean_Meta_throwUnknownMVar___rarg(x_1, x_2, x_3, x_4, x_5, x_12);
  return x_15;
  }
  else
  {
  lean_object* x_16; lean_object* x_17; 
  lean_dec(x_1);
  x_16 = lean_ctor_get(x_14, 0);
  lean_inc(x_16);
  lean_dec(x_14);
  x_17 = lean_ctor_get(x_16, 2);
  lean_inc(x_17);
  lean_dec(x_16);
  lean_ctor_set(x_9, 0, x_17);
  return x_9;
  }
  }
  else
  {
  lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; 
  x_18 = lean_ctor_get(x_9, 0);
  x_19 = lean_ctor_get(x_9, 1);
  lean_inc(x_19);
  lean_inc(x_18);
  lean_dec(x_9);
  x_20 = lean_ctor_get(x_18, 0);
  lean_inc(x_20);
  lean_dec(x_18);
  x_21 = l_Lean_MetavarContext_findDecl_x3f(x_20, x_1);
  if (lean_obj_tag(x_21) == 0)
  {
  lean_object* x_22; 
  x_22 = l_Lean_Meta_throwUnknownMVar___rarg(x_1, x_2, x_3, x_4, x_5, x_19);
  return x_22;
  }
  else
  {
  lean_object* x_23; lean_object* x_24; lean_object* x_25; 
  lean_dec(x_1);
  x_23 = lean_ctor_get(x_21, 0);
  lean_inc(x_23);
  lean_dec(x_21);
  x_24 = lean_ctor_get(x_23, 2);
  lean_inc(x_24);
  lean_dec(x_23);
  x_25 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_25, 0, x_24);
  lean_ctor_set(x_25, 1, x_19);
  return x_25;
  }
  }
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferMVarType___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___private_Lean_Meta_InferType_0__Lean_Meta_inferMVarType(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);
  return x_7;
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferFVarType_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
  _start:
  {
  if (lean_obj_tag(x_1) == 0)
  {
  lean_object* x_4; lean_object* x_5; 
  lean_dec(x_2);
  x_4 = lean_box(0);
  x_5 = lean_apply_1(x_3, x_4);
  return x_5;
  }
  else
  {
  lean_object* x_6; lean_object* x_7; 
  lean_dec(x_3);
  x_6 = lean_ctor_get(x_1, 0);
  lean_inc(x_6);
  lean_dec(x_1);
  x_7 = lean_apply_1(x_2, x_6);
  return x_7;
  }
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferFVarType_match__1(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = lean_alloc_closure((void*)(l___private_Lean_Meta_InferType_0__Lean_Meta_inferFVarType_match__1___rarg), 3, 0);
  return x_2;
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferFVarType(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; 
  x_7 = lean_ctor_get(x_2, 1);
  lean_inc(x_7);
  lean_inc(x_1);
  x_8 = lean_local_ctx_find(x_7, x_1);
  if (lean_obj_tag(x_8) == 0)
  {
  lean_object* x_9; 
  x_9 = l_Lean_Meta_throwUnknownFVar___rarg(x_1, x_2, x_3, x_4, x_5, x_6);
  lean_dec(x_2);
  return x_9;
  }
  else
  {
  lean_object* x_10; lean_object* x_11; lean_object* x_12; 
  lean_dec(x_2);
  lean_dec(x_1);
  x_10 = lean_ctor_get(x_8, 0);
  lean_inc(x_10);
  lean_dec(x_8);
  x_11 = l_Lean_LocalDecl_type(x_10);
  lean_dec(x_10);
  x_12 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_12, 0, x_11);
  lean_ctor_set(x_12, 1, x_6);
  return x_12;
  }
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_inferFVarType___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___private_Lean_Meta_InferType_0__Lean_Meta_inferFVarType(x_1, x_2, x_3, x_4, x_5, x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  return x_7;
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
  _start:
  {
  if (lean_obj_tag(x_1) == 0)
  {
  lean_object* x_4; lean_object* x_5; 
  lean_dec(x_2);
  x_4 = lean_box(0);
  x_5 = lean_apply_1(x_3, x_4);
  return x_5;
  }
  else
  {
  lean_object* x_6; lean_object* x_7; 
  lean_dec(x_3);
  x_6 = lean_ctor_get(x_1, 0);
  lean_inc(x_6);
  lean_dec(x_1);
  x_7 = lean_apply_1(x_2, x_6);
  return x_7;
  }
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache_match__1(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = lean_alloc_closure((void*)(l___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache_match__1___rarg), 3, 0);
  return x_2;
  }
  }
  lean_object* l_Std_PersistentHashMap_findAtAux___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
  _start:
  {
  lean_object* x_6; uint8_t x_7; 
  x_6 = lean_array_get_size(x_1);
  x_7 = lean_nat_dec_lt(x_4, x_6);
  lean_dec(x_6);
  if (x_7 == 0)
  {
  lean_object* x_8; 
  lean_dec(x_4);
  x_8 = lean_box(0);
  return x_8;
  }
  else
  {
  lean_object* x_9; uint8_t x_10; 
  x_9 = lean_array_fget(x_1, x_4);
  x_10 = lean_expr_equal(x_5, x_9);
  lean_dec(x_9);
  if (x_10 == 0)
  {
  lean_object* x_11; lean_object* x_12; 
  x_11 = lean_unsigned_to_nat(1u);
  x_12 = lean_nat_add(x_4, x_11);
  lean_dec(x_4);
  x_3 = lean_box(0);
  x_4 = x_12;
  goto _start;
  }
  else
  {
  lean_object* x_14; lean_object* x_15; 
  x_14 = lean_array_fget(x_2, x_4);
  lean_dec(x_4);
  x_15 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_15, 0, x_14);
  return x_15;
  }
  }
  }
  }
  lean_object* l_Std_PersistentHashMap_findAux___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__2(lean_object* x_1, size_t x_2, lean_object* x_3) {
  _start:
  {
  if (lean_obj_tag(x_1) == 0)
  {
  lean_object* x_4; size_t x_5; size_t x_6; size_t x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; 
  x_4 = lean_ctor_get(x_1, 0);
  lean_inc(x_4);
  lean_dec(x_1);
  x_5 = 5;
  x_6 = l_Std_PersistentHashMap_insertAux___rarg___closed__2;
  x_7 = x_2 & x_6;
  x_8 = lean_usize_to_nat(x_7);
  x_9 = lean_box(2);
  x_10 = lean_array_get(x_9, x_4, x_8);
  lean_dec(x_8);
  lean_dec(x_4);
  switch (lean_obj_tag(x_10)) {
  case 0:
  {
  lean_object* x_11; lean_object* x_12; uint8_t x_13; 
  x_11 = lean_ctor_get(x_10, 0);
  lean_inc(x_11);
  x_12 = lean_ctor_get(x_10, 1);
  lean_inc(x_12);
  lean_dec(x_10);
  x_13 = lean_expr_equal(x_3, x_11);
  lean_dec(x_11);
  if (x_13 == 0)
  {
  lean_object* x_14; 
  lean_dec(x_12);
  x_14 = lean_box(0);
  return x_14;
  }
  else
  {
  lean_object* x_15; 
  x_15 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_15, 0, x_12);
  return x_15;
  }
  }
  case 1:
  {
  lean_object* x_16; size_t x_17; 
  x_16 = lean_ctor_get(x_10, 0);
  lean_inc(x_16);
  lean_dec(x_10);
  x_17 = x_2 >> x_5 % (sizeof(size_t) * 8);
  x_1 = x_16;
  x_2 = x_17;
  goto _start;
  }
  default: 
  {
  lean_object* x_19; 
  x_19 = lean_box(0);
  return x_19;
  }
  }
  }
  else
  {
  lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; 
  x_20 = lean_ctor_get(x_1, 0);
  lean_inc(x_20);
  x_21 = lean_ctor_get(x_1, 1);
  lean_inc(x_21);
  lean_dec(x_1);
  x_22 = lean_unsigned_to_nat(0u);
  x_23 = l_Std_PersistentHashMap_findAtAux___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__3(x_20, x_21, lean_box(0), x_22, x_3);
  lean_dec(x_21);
  lean_dec(x_20);
  return x_23;
  }
  }
  }
  lean_object* l_Std_PersistentHashMap_find_x3f___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__1(lean_object* x_1, lean_object* x_2) {
  _start:
  {
  lean_object* x_3; size_t x_4; lean_object* x_5; 
  x_3 = lean_ctor_get(x_1, 0);
  lean_inc(x_3);
  lean_dec(x_1);
  x_4 = l_Lean_Expr_hash(x_2);
  x_5 = l_Std_PersistentHashMap_findAux___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__2(x_3, x_4, x_2);
  return x_5;
  }
  }
  lean_object* l_Std_PersistentHashMap_insertAux_traverse___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__6(size_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
  _start:
  {
  lean_object* x_7; uint8_t x_8; 
  x_7 = lean_array_get_size(x_2);
  x_8 = lean_nat_dec_lt(x_5, x_7);
  lean_dec(x_7);
  if (x_8 == 0)
  {
  lean_dec(x_5);
  return x_6;
  }
  else
  {
  lean_object* x_9; lean_object* x_10; size_t x_11; size_t x_12; size_t x_13; size_t x_14; size_t x_15; size_t x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; 
  x_9 = lean_array_fget(x_2, x_5);
  x_10 = lean_array_fget(x_3, x_5);
  x_11 = l_Lean_Expr_hash(x_9);
  x_12 = 1;
  x_13 = x_1 - x_12;
  x_14 = 5;
  x_15 = x_14 * x_13;
  x_16 = x_11 >> x_15 % (sizeof(size_t) * 8);
  x_17 = lean_unsigned_to_nat(1u);
  x_18 = lean_nat_add(x_5, x_17);
  lean_dec(x_5);
  x_19 = l_Std_PersistentHashMap_insertAux___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__5(x_6, x_16, x_1, x_9, x_10);
  x_4 = lean_box(0);
  x_5 = x_18;
  x_6 = x_19;
  goto _start;
  }
  }
  }
  lean_object* l_Std_PersistentHashMap_insertAtCollisionNodeAux___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__7(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
  _start:
  {
  lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8; 
  x_5 = lean_ctor_get(x_1, 0);
  lean_inc(x_5);
  x_6 = lean_ctor_get(x_1, 1);
  lean_inc(x_6);
  x_7 = lean_array_get_size(x_5);
  x_8 = lean_nat_dec_lt(x_2, x_7);
  lean_dec(x_7);
  if (x_8 == 0)
  {
  uint8_t x_9; 
  lean_dec(x_2);
  x_9 = !lean_is_exclusive(x_1);
  if (x_9 == 0)
  {
  lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; 
  x_10 = lean_ctor_get(x_1, 1);
  lean_dec(x_10);
  x_11 = lean_ctor_get(x_1, 0);
  lean_dec(x_11);
  x_12 = lean_array_push(x_5, x_3);
  x_13 = lean_array_push(x_6, x_4);
  lean_ctor_set(x_1, 1, x_13);
  lean_ctor_set(x_1, 0, x_12);
  return x_1;
  }
  else
  {
  lean_object* x_14; lean_object* x_15; lean_object* x_16; 
  lean_dec(x_1);
  x_14 = lean_array_push(x_5, x_3);
  x_15 = lean_array_push(x_6, x_4);
  x_16 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_16, 0, x_14);
  lean_ctor_set(x_16, 1, x_15);
  return x_16;
  }
  }
  else
  {
  lean_object* x_17; uint8_t x_18; 
  x_17 = lean_array_fget(x_5, x_2);
  x_18 = lean_expr_equal(x_3, x_17);
  lean_dec(x_17);
  if (x_18 == 0)
  {
  lean_object* x_19; lean_object* x_20; 
  lean_dec(x_6);
  lean_dec(x_5);
  x_19 = lean_unsigned_to_nat(1u);
  x_20 = lean_nat_add(x_2, x_19);
  lean_dec(x_2);
  x_2 = x_20;
  goto _start;
  }
  else
  {
  uint8_t x_22; 
  x_22 = !lean_is_exclusive(x_1);
  if (x_22 == 0)
  {
  lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; 
  x_23 = lean_ctor_get(x_1, 1);
  lean_dec(x_23);
  x_24 = lean_ctor_get(x_1, 0);
  lean_dec(x_24);
  x_25 = lean_array_fset(x_5, x_2, x_3);
  x_26 = lean_array_fset(x_6, x_2, x_4);
  lean_dec(x_2);
  lean_ctor_set(x_1, 1, x_26);
  lean_ctor_set(x_1, 0, x_25);
  return x_1;
  }
  else
  {
  lean_object* x_27; lean_object* x_28; lean_object* x_29; 
  lean_dec(x_1);
  x_27 = lean_array_fset(x_5, x_2, x_3);
  x_28 = lean_array_fset(x_6, x_2, x_4);
  lean_dec(x_2);
  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;
  }
  }
  }
  }
  }
  lean_object* l_Std_PersistentHashMap_insertAux___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__5(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4, lean_object* x_5) {
  _start:
  {
  if (lean_obj_tag(x_1) == 0)
  {
  uint8_t x_6; 
  x_6 = !lean_is_exclusive(x_1);
  if (x_6 == 0)
  {
  lean_object* x_7; size_t x_8; size_t x_9; size_t x_10; size_t x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; 
  x_7 = lean_ctor_get(x_1, 0);
  x_8 = 1;
  x_9 = 5;
  x_10 = l_Std_PersistentHashMap_insertAux___rarg___closed__2;
  x_11 = x_2 & x_10;
  x_12 = lean_usize_to_nat(x_11);
  x_13 = lean_array_get_size(x_7);
  x_14 = lean_nat_dec_lt(x_12, x_13);
  lean_dec(x_13);
  if (x_14 == 0)
  {
  lean_dec(x_12);
  lean_dec(x_5);
  lean_dec(x_4);
  return x_1;
  }
  else
  {
  lean_object* x_15; lean_object* x_16; lean_object* x_17; 
  x_15 = lean_array_fget(x_7, x_12);
  x_16 = lean_box(2);
  x_17 = lean_array_fset(x_7, x_12, x_16);
  switch (lean_obj_tag(x_15)) {
  case 0:
  {
  uint8_t x_18; 
  x_18 = !lean_is_exclusive(x_15);
  if (x_18 == 0)
  {
  lean_object* x_19; lean_object* x_20; uint8_t x_21; 
  x_19 = lean_ctor_get(x_15, 0);
  x_20 = lean_ctor_get(x_15, 1);
  x_21 = lean_expr_equal(x_4, x_19);
  if (x_21 == 0)
  {
  lean_object* x_22; lean_object* x_23; lean_object* x_24; 
  lean_free_object(x_15);
  x_22 = l_Std_PersistentHashMap_mkCollisionNode___rarg(x_19, x_20, x_4, x_5);
  x_23 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_23, 0, x_22);
  x_24 = lean_array_fset(x_17, x_12, x_23);
  lean_dec(x_12);
  lean_ctor_set(x_1, 0, x_24);
  return x_1;
  }
  else
  {
  lean_object* x_25; 
  lean_dec(x_20);
  lean_dec(x_19);
  lean_ctor_set(x_15, 1, x_5);
  lean_ctor_set(x_15, 0, x_4);
  x_25 = lean_array_fset(x_17, x_12, x_15);
  lean_dec(x_12);
  lean_ctor_set(x_1, 0, x_25);
  return x_1;
  }
  }
  else
  {
  lean_object* x_26; lean_object* x_27; uint8_t x_28; 
  x_26 = lean_ctor_get(x_15, 0);
  x_27 = lean_ctor_get(x_15, 1);
  lean_inc(x_27);
  lean_inc(x_26);
  lean_dec(x_15);
  x_28 = lean_expr_equal(x_4, x_26);
  if (x_28 == 0)
  {
  lean_object* x_29; lean_object* x_30; lean_object* x_31; 
  x_29 = l_Std_PersistentHashMap_mkCollisionNode___rarg(x_26, x_27, x_4, x_5);
  x_30 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_30, 0, x_29);
  x_31 = lean_array_fset(x_17, x_12, x_30);
  lean_dec(x_12);
  lean_ctor_set(x_1, 0, x_31);
  return x_1;
  }
  else
  {
  lean_object* x_32; lean_object* x_33; 
  lean_dec(x_27);
  lean_dec(x_26);
  x_32 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_32, 0, x_4);
  lean_ctor_set(x_32, 1, x_5);
  x_33 = lean_array_fset(x_17, x_12, x_32);
  lean_dec(x_12);
  lean_ctor_set(x_1, 0, x_33);
  return x_1;
  }
  }
  }
  case 1:
  {
  uint8_t x_34; 
  x_34 = !lean_is_exclusive(x_15);
  if (x_34 == 0)
  {
  lean_object* x_35; size_t x_36; size_t x_37; lean_object* x_38; lean_object* x_39; 
  x_35 = lean_ctor_get(x_15, 0);
  x_36 = x_2 >> x_9 % (sizeof(size_t) * 8);
  x_37 = x_3 + x_8;
  x_38 = l_Std_PersistentHashMap_insertAux___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__5(x_35, x_36, x_37, x_4, x_5);
  lean_ctor_set(x_15, 0, x_38);
  x_39 = lean_array_fset(x_17, x_12, x_15);
  lean_dec(x_12);
  lean_ctor_set(x_1, 0, x_39);
  return x_1;
  }
  else
  {
  lean_object* x_40; size_t x_41; size_t x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; 
  x_40 = lean_ctor_get(x_15, 0);
  lean_inc(x_40);
  lean_dec(x_15);
  x_41 = x_2 >> x_9 % (sizeof(size_t) * 8);
  x_42 = x_3 + x_8;
  x_43 = l_Std_PersistentHashMap_insertAux___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__5(x_40, x_41, x_42, x_4, x_5);
  x_44 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_44, 0, x_43);
  x_45 = lean_array_fset(x_17, x_12, x_44);
  lean_dec(x_12);
  lean_ctor_set(x_1, 0, x_45);
  return x_1;
  }
  }
  default: 
  {
  lean_object* x_46; lean_object* x_47; 
  x_46 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_46, 0, x_4);
  lean_ctor_set(x_46, 1, x_5);
  x_47 = lean_array_fset(x_17, x_12, x_46);
  lean_dec(x_12);
  lean_ctor_set(x_1, 0, x_47);
  return x_1;
  }
  }
  }
  }
  else
  {
  lean_object* x_48; size_t x_49; size_t x_50; size_t x_51; size_t x_52; lean_object* x_53; lean_object* x_54; uint8_t x_55; 
  x_48 = lean_ctor_get(x_1, 0);
  lean_inc(x_48);
  lean_dec(x_1);
  x_49 = 1;
  x_50 = 5;
  x_51 = l_Std_PersistentHashMap_insertAux___rarg___closed__2;
  x_52 = x_2 & x_51;
  x_53 = lean_usize_to_nat(x_52);
  x_54 = lean_array_get_size(x_48);
  x_55 = lean_nat_dec_lt(x_53, x_54);
  lean_dec(x_54);
  if (x_55 == 0)
  {
  lean_object* x_56; 
  lean_dec(x_53);
  lean_dec(x_5);
  lean_dec(x_4);
  x_56 = lean_alloc_ctor(0, 1, 0);
  lean_ctor_set(x_56, 0, x_48);
  return x_56;
  }
  else
  {
  lean_object* x_57; lean_object* x_58; lean_object* x_59; 
  x_57 = lean_array_fget(x_48, x_53);
  x_58 = lean_box(2);
  x_59 = lean_array_fset(x_48, x_53, x_58);
  switch (lean_obj_tag(x_57)) {
  case 0:
  {
  lean_object* x_60; lean_object* x_61; lean_object* x_62; uint8_t x_63; 
  x_60 = lean_ctor_get(x_57, 0);
  lean_inc(x_60);
  x_61 = lean_ctor_get(x_57, 1);
  lean_inc(x_61);
  if (lean_is_exclusive(x_57)) {
   lean_ctor_release(x_57, 0);
   lean_ctor_release(x_57, 1);
   x_62 = x_57;
  } else {
   lean_dec_ref(x_57);
   x_62 = lean_box(0);
  }
  x_63 = lean_expr_equal(x_4, x_60);
  if (x_63 == 0)
  {
  lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; 
  lean_dec(x_62);
  x_64 = l_Std_PersistentHashMap_mkCollisionNode___rarg(x_60, x_61, x_4, x_5);
  x_65 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_65, 0, x_64);
  x_66 = lean_array_fset(x_59, x_53, x_65);
  lean_dec(x_53);
  x_67 = lean_alloc_ctor(0, 1, 0);
  lean_ctor_set(x_67, 0, x_66);
  return x_67;
  }
  else
  {
  lean_object* x_68; lean_object* x_69; lean_object* x_70; 
  lean_dec(x_61);
  lean_dec(x_60);
  if (lean_is_scalar(x_62)) {
   x_68 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_68 = x_62;
  }
  lean_ctor_set(x_68, 0, x_4);
  lean_ctor_set(x_68, 1, x_5);
  x_69 = lean_array_fset(x_59, x_53, x_68);
  lean_dec(x_53);
  x_70 = lean_alloc_ctor(0, 1, 0);
  lean_ctor_set(x_70, 0, x_69);
  return x_70;
  }
  }
  case 1:
  {
  lean_object* x_71; lean_object* x_72; size_t x_73; size_t x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; 
  x_71 = lean_ctor_get(x_57, 0);
  lean_inc(x_71);
  if (lean_is_exclusive(x_57)) {
   lean_ctor_release(x_57, 0);
   x_72 = x_57;
  } else {
   lean_dec_ref(x_57);
   x_72 = lean_box(0);
  }
  x_73 = x_2 >> x_50 % (sizeof(size_t) * 8);
  x_74 = x_3 + x_49;
  x_75 = l_Std_PersistentHashMap_insertAux___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__5(x_71, x_73, x_74, x_4, x_5);
  if (lean_is_scalar(x_72)) {
   x_76 = lean_alloc_ctor(1, 1, 0);
  } else {
   x_76 = x_72;
  }
  lean_ctor_set(x_76, 0, x_75);
  x_77 = lean_array_fset(x_59, x_53, x_76);
  lean_dec(x_53);
  x_78 = lean_alloc_ctor(0, 1, 0);
  lean_ctor_set(x_78, 0, x_77);
  return x_78;
  }
  default: 
  {
  lean_object* x_79; lean_object* x_80; lean_object* x_81; 
  x_79 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_79, 0, x_4);
  lean_ctor_set(x_79, 1, x_5);
  x_80 = lean_array_fset(x_59, x_53, x_79);
  lean_dec(x_53);
  x_81 = lean_alloc_ctor(0, 1, 0);
  lean_ctor_set(x_81, 0, x_80);
  return x_81;
  }
  }
  }
  }
  }
  else
  {
  uint8_t x_82; 
  x_82 = !lean_is_exclusive(x_1);
  if (x_82 == 0)
  {
  lean_object* x_83; lean_object* x_84; size_t x_85; uint8_t x_86; 
  x_83 = lean_unsigned_to_nat(0u);
  x_84 = l_Std_PersistentHashMap_insertAtCollisionNodeAux___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__7(x_1, x_83, x_4, x_5);
  x_85 = 7;
  x_86 = x_85 <= x_3;
  if (x_86 == 0)
  {
  lean_object* x_87; lean_object* x_88; uint8_t x_89; 
  x_87 = l_Std_PersistentHashMap_getCollisionNodeSize___rarg(x_84);
  x_88 = lean_unsigned_to_nat(4u);
  x_89 = lean_nat_dec_lt(x_87, x_88);
  lean_dec(x_87);
  if (x_89 == 0)
  {
  lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; 
  x_90 = lean_ctor_get(x_84, 0);
  lean_inc(x_90);
  x_91 = lean_ctor_get(x_84, 1);
  lean_inc(x_91);
  lean_dec(x_84);
  x_92 = l_Std_PersistentHashMap_insertAux___rarg___closed__3;
  x_93 = l_Std_PersistentHashMap_insertAux_traverse___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__6(x_3, x_90, x_91, lean_box(0), x_83, x_92);
  lean_dec(x_91);
  lean_dec(x_90);
  return x_93;
  }
  else
  {
  return x_84;
  }
  }
  else
  {
  return x_84;
  }
  }
  else
  {
  lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; size_t x_99; uint8_t x_100; 
  x_94 = lean_ctor_get(x_1, 0);
  x_95 = lean_ctor_get(x_1, 1);
  lean_inc(x_95);
  lean_inc(x_94);
  lean_dec(x_1);
  x_96 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_96, 0, x_94);
  lean_ctor_set(x_96, 1, x_95);
  x_97 = lean_unsigned_to_nat(0u);
  x_98 = l_Std_PersistentHashMap_insertAtCollisionNodeAux___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__7(x_96, x_97, x_4, x_5);
  x_99 = 7;
  x_100 = x_99 <= x_3;
  if (x_100 == 0)
  {
  lean_object* x_101; lean_object* x_102; uint8_t x_103; 
  x_101 = l_Std_PersistentHashMap_getCollisionNodeSize___rarg(x_98);
  x_102 = lean_unsigned_to_nat(4u);
  x_103 = lean_nat_dec_lt(x_101, x_102);
  lean_dec(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_98, 0);
  lean_inc(x_104);
  x_105 = lean_ctor_get(x_98, 1);
  lean_inc(x_105);
  lean_dec(x_98);
  x_106 = l_Std_PersistentHashMap_insertAux___rarg___closed__3;
  x_107 = l_Std_PersistentHashMap_insertAux_traverse___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__6(x_3, x_104, x_105, lean_box(0), x_97, x_106);
  lean_dec(x_105);
  lean_dec(x_104);
  return x_107;
  }
  else
  {
  return x_98;
  }
  }
  else
  {
  return x_98;
  }
  }
  }
  }
  }
  lean_object* l_Std_PersistentHashMap_insert___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__4(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
  _start:
  {
  uint8_t x_4; 
  x_4 = !lean_is_exclusive(x_1);
  if (x_4 == 0)
  {
  lean_object* x_5; lean_object* x_6; size_t x_7; size_t x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; 
  x_5 = lean_ctor_get(x_1, 0);
  x_6 = lean_ctor_get(x_1, 1);
  x_7 = l_Lean_Expr_hash(x_2);
  x_8 = 1;
  x_9 = l_Std_PersistentHashMap_insertAux___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__5(x_5, x_7, x_8, x_2, x_3);
  x_10 = lean_unsigned_to_nat(1u);
  x_11 = lean_nat_add(x_6, x_10);
  lean_dec(x_6);
  lean_ctor_set(x_1, 1, x_11);
  lean_ctor_set(x_1, 0, x_9);
  return x_1;
  }
  else
  {
  lean_object* x_12; lean_object* x_13; size_t x_14; size_t x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; 
  x_12 = lean_ctor_get(x_1, 0);
  x_13 = lean_ctor_get(x_1, 1);
  lean_inc(x_13);
  lean_inc(x_12);
  lean_dec(x_1);
  x_14 = l_Lean_Expr_hash(x_2);
  x_15 = 1;
  x_16 = l_Std_PersistentHashMap_insertAux___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__5(x_12, x_14, x_15, x_2, x_3);
  x_17 = lean_unsigned_to_nat(1u);
  x_18 = lean_nat_add(x_13, x_17);
  lean_dec(x_13);
  x_19 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_19, 0, x_16);
  lean_ctor_set(x_19, 1, x_18);
  return x_19;
  }
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
  _start:
  {
  lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; 
  x_8 = lean_st_ref_get(x_6, x_7);
  x_9 = lean_ctor_get(x_8, 1);
  lean_inc(x_9);
  lean_dec(x_8);
  x_10 = lean_st_ref_get(x_4, 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; lean_object* x_15; lean_object* x_16; 
  x_12 = lean_ctor_get(x_10, 0);
  x_13 = lean_ctor_get(x_10, 1);
  x_14 = lean_ctor_get(x_12, 1);
  lean_inc(x_14);
  lean_dec(x_12);
  x_15 = lean_ctor_get(x_14, 0);
  lean_inc(x_15);
  lean_dec(x_14);
  x_16 = l_Std_PersistentHashMap_find_x3f___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__1(x_15, x_1);
  if (lean_obj_tag(x_16) == 0)
  {
  lean_object* x_17; 
  lean_free_object(x_10);
  lean_inc(x_6);
  lean_inc(x_4);
  x_17 = lean_apply_5(x_2, x_3, x_4, x_5, x_6, x_13);
  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; 
  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_st_ref_get(x_6, x_19);
  lean_dec(x_6);
  x_21 = lean_ctor_get(x_20, 1);
  lean_inc(x_21);
  lean_dec(x_20);
  x_22 = lean_st_ref_take(x_4, x_21);
  x_23 = lean_ctor_get(x_22, 0);
  lean_inc(x_23);
  x_24 = lean_ctor_get(x_23, 1);
  lean_inc(x_24);
  x_25 = lean_ctor_get(x_22, 1);
  lean_inc(x_25);
  lean_dec(x_22);
  x_26 = !lean_is_exclusive(x_23);
  if (x_26 == 0)
  {
  lean_object* x_27; uint8_t x_28; 
  x_27 = lean_ctor_get(x_23, 1);
  lean_dec(x_27);
  x_28 = !lean_is_exclusive(x_24);
  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_24, 0);
  lean_inc(x_18);
  x_30 = l_Std_PersistentHashMap_insert___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__4(x_29, x_1, x_18);
  lean_ctor_set(x_24, 0, x_30);
  x_31 = lean_st_ref_set(x_4, x_23, x_25);
  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_18);
  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_18);
  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; 
  x_36 = lean_ctor_get(x_24, 0);
  x_37 = lean_ctor_get(x_24, 1);
  x_38 = lean_ctor_get(x_24, 2);
  x_39 = lean_ctor_get(x_24, 3);
  x_40 = lean_ctor_get(x_24, 4);
  lean_inc(x_40);
  lean_inc(x_39);
  lean_inc(x_38);
  lean_inc(x_37);
  lean_inc(x_36);
  lean_dec(x_24);
  lean_inc(x_18);
  x_41 = l_Std_PersistentHashMap_insert___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__4(x_36, x_1, x_18);
  x_42 = lean_alloc_ctor(0, 5, 0);
  lean_ctor_set(x_42, 0, x_41);
  lean_ctor_set(x_42, 1, x_37);
  lean_ctor_set(x_42, 2, x_38);
  lean_ctor_set(x_42, 3, x_39);
  lean_ctor_set(x_42, 4, x_40);
  lean_ctor_set(x_23, 1, x_42);
  x_43 = lean_st_ref_set(x_4, x_23, x_25);
  lean_dec(x_4);
  x_44 = lean_ctor_get(x_43, 1);
  lean_inc(x_44);
  if (lean_is_exclusive(x_43)) {
   lean_ctor_release(x_43, 0);
   lean_ctor_release(x_43, 1);
   x_45 = x_43;
  } else {
   lean_dec_ref(x_43);
   x_45 = lean_box(0);
  }
  if (lean_is_scalar(x_45)) {
   x_46 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_46 = x_45;
  }
  lean_ctor_set(x_46, 0, x_18);
  lean_ctor_set(x_46, 1, x_44);
  return x_46;
  }
  }
  else
  {
  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; 
  x_47 = lean_ctor_get(x_23, 0);
  x_48 = lean_ctor_get(x_23, 2);
  x_49 = lean_ctor_get(x_23, 3);
  lean_inc(x_49);
  lean_inc(x_48);
  lean_inc(x_47);
  lean_dec(x_23);
  x_50 = lean_ctor_get(x_24, 0);
  lean_inc(x_50);
  x_51 = lean_ctor_get(x_24, 1);
  lean_inc(x_51);
  x_52 = lean_ctor_get(x_24, 2);
  lean_inc(x_52);
  x_53 = lean_ctor_get(x_24, 3);
  lean_inc(x_53);
  x_54 = lean_ctor_get(x_24, 4);
  lean_inc(x_54);
  if (lean_is_exclusive(x_24)) {
   lean_ctor_release(x_24, 0);
   lean_ctor_release(x_24, 1);
   lean_ctor_release(x_24, 2);
   lean_ctor_release(x_24, 3);
   lean_ctor_release(x_24, 4);
   x_55 = x_24;
  } else {
   lean_dec_ref(x_24);
   x_55 = lean_box(0);
  }
  lean_inc(x_18);
  x_56 = l_Std_PersistentHashMap_insert___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__4(x_50, x_1, x_18);
  if (lean_is_scalar(x_55)) {
   x_57 = lean_alloc_ctor(0, 5, 0);
  } else {
   x_57 = x_55;
  }
  lean_ctor_set(x_57, 0, x_56);
  lean_ctor_set(x_57, 1, x_51);
  lean_ctor_set(x_57, 2, x_52);
  lean_ctor_set(x_57, 3, x_53);
  lean_ctor_set(x_57, 4, x_54);
  x_58 = lean_alloc_ctor(0, 4, 0);
  lean_ctor_set(x_58, 0, x_47);
  lean_ctor_set(x_58, 1, x_57);
  lean_ctor_set(x_58, 2, x_48);
  lean_ctor_set(x_58, 3, x_49);
  x_59 = lean_st_ref_set(x_4, x_58, x_25);
  lean_dec(x_4);
  x_60 = lean_ctor_get(x_59, 1);
  lean_inc(x_60);
  if (lean_is_exclusive(x_59)) {
   lean_ctor_release(x_59, 0);
   lean_ctor_release(x_59, 1);
   x_61 = x_59;
  } else {
   lean_dec_ref(x_59);
   x_61 = lean_box(0);
  }
  if (lean_is_scalar(x_61)) {
   x_62 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_62 = x_61;
  }
  lean_ctor_set(x_62, 0, x_18);
  lean_ctor_set(x_62, 1, x_60);
  return x_62;
  }
  }
  else
  {
  uint8_t x_63; 
  lean_dec(x_6);
  lean_dec(x_4);
  lean_dec(x_1);
  x_63 = !lean_is_exclusive(x_17);
  if (x_63 == 0)
  {
  return x_17;
  }
  else
  {
  lean_object* x_64; lean_object* x_65; lean_object* x_66; 
  x_64 = lean_ctor_get(x_17, 0);
  x_65 = lean_ctor_get(x_17, 1);
  lean_inc(x_65);
  lean_inc(x_64);
  lean_dec(x_17);
  x_66 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_66, 0, x_64);
  lean_ctor_set(x_66, 1, x_65);
  return x_66;
  }
  }
  }
  else
  {
  lean_object* x_67; 
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_67 = lean_ctor_get(x_16, 0);
  lean_inc(x_67);
  lean_dec(x_16);
  lean_ctor_set(x_10, 0, x_67);
  return x_10;
  }
  }
  else
  {
  lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; 
  x_68 = lean_ctor_get(x_10, 0);
  x_69 = lean_ctor_get(x_10, 1);
  lean_inc(x_69);
  lean_inc(x_68);
  lean_dec(x_10);
  x_70 = lean_ctor_get(x_68, 1);
  lean_inc(x_70);
  lean_dec(x_68);
  x_71 = lean_ctor_get(x_70, 0);
  lean_inc(x_71);
  lean_dec(x_70);
  x_72 = l_Std_PersistentHashMap_find_x3f___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__1(x_71, x_1);
  if (lean_obj_tag(x_72) == 0)
  {
  lean_object* x_73; 
  lean_inc(x_6);
  lean_inc(x_4);
  x_73 = lean_apply_5(x_2, x_3, x_4, x_5, x_6, x_69);
  if (lean_obj_tag(x_73) == 0)
  {
  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; lean_object* x_97; lean_object* x_98; 
  x_74 = lean_ctor_get(x_73, 0);
  lean_inc(x_74);
  x_75 = lean_ctor_get(x_73, 1);
  lean_inc(x_75);
  lean_dec(x_73);
  x_76 = lean_st_ref_get(x_6, x_75);
  lean_dec(x_6);
  x_77 = lean_ctor_get(x_76, 1);
  lean_inc(x_77);
  lean_dec(x_76);
  x_78 = lean_st_ref_take(x_4, x_77);
  x_79 = lean_ctor_get(x_78, 0);
  lean_inc(x_79);
  x_80 = lean_ctor_get(x_79, 1);
  lean_inc(x_80);
  x_81 = lean_ctor_get(x_78, 1);
  lean_inc(x_81);
  lean_dec(x_78);
  x_82 = lean_ctor_get(x_79, 0);
  lean_inc(x_82);
  x_83 = lean_ctor_get(x_79, 2);
  lean_inc(x_83);
  x_84 = lean_ctor_get(x_79, 3);
  lean_inc(x_84);
  if (lean_is_exclusive(x_79)) {
   lean_ctor_release(x_79, 0);
   lean_ctor_release(x_79, 1);
   lean_ctor_release(x_79, 2);
   lean_ctor_release(x_79, 3);
   x_85 = x_79;
  } else {
   lean_dec_ref(x_79);
   x_85 = lean_box(0);
  }
  x_86 = lean_ctor_get(x_80, 0);
  lean_inc(x_86);
  x_87 = lean_ctor_get(x_80, 1);
  lean_inc(x_87);
  x_88 = lean_ctor_get(x_80, 2);
  lean_inc(x_88);
  x_89 = lean_ctor_get(x_80, 3);
  lean_inc(x_89);
  x_90 = lean_ctor_get(x_80, 4);
  lean_inc(x_90);
  if (lean_is_exclusive(x_80)) {
   lean_ctor_release(x_80, 0);
   lean_ctor_release(x_80, 1);
   lean_ctor_release(x_80, 2);
   lean_ctor_release(x_80, 3);
   lean_ctor_release(x_80, 4);
   x_91 = x_80;
  } else {
   lean_dec_ref(x_80);
   x_91 = lean_box(0);
  }
  lean_inc(x_74);
  x_92 = l_Std_PersistentHashMap_insert___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__4(x_86, x_1, x_74);
  if (lean_is_scalar(x_91)) {
   x_93 = lean_alloc_ctor(0, 5, 0);
  } else {
   x_93 = x_91;
  }
  lean_ctor_set(x_93, 0, x_92);
  lean_ctor_set(x_93, 1, x_87);
  lean_ctor_set(x_93, 2, x_88);
  lean_ctor_set(x_93, 3, x_89);
  lean_ctor_set(x_93, 4, x_90);
  if (lean_is_scalar(x_85)) {
   x_94 = lean_alloc_ctor(0, 4, 0);
  } else {
   x_94 = x_85;
  }
  lean_ctor_set(x_94, 0, x_82);
  lean_ctor_set(x_94, 1, x_93);
  lean_ctor_set(x_94, 2, x_83);
  lean_ctor_set(x_94, 3, x_84);
  x_95 = lean_st_ref_set(x_4, x_94, x_81);
  lean_dec(x_4);
  x_96 = lean_ctor_get(x_95, 1);
  lean_inc(x_96);
  if (lean_is_exclusive(x_95)) {
   lean_ctor_release(x_95, 0);
   lean_ctor_release(x_95, 1);
   x_97 = x_95;
  } else {
   lean_dec_ref(x_95);
   x_97 = lean_box(0);
  }
  if (lean_is_scalar(x_97)) {
   x_98 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_98 = x_97;
  }
  lean_ctor_set(x_98, 0, x_74);
  lean_ctor_set(x_98, 1, x_96);
  return x_98;
  }
  else
  {
  lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; 
  lean_dec(x_6);
  lean_dec(x_4);
  lean_dec(x_1);
  x_99 = lean_ctor_get(x_73, 0);
  lean_inc(x_99);
  x_100 = lean_ctor_get(x_73, 1);
  lean_inc(x_100);
  if (lean_is_exclusive(x_73)) {
   lean_ctor_release(x_73, 0);
   lean_ctor_release(x_73, 1);
   x_101 = x_73;
  } else {
   lean_dec_ref(x_73);
   x_101 = lean_box(0);
  }
  if (lean_is_scalar(x_101)) {
   x_102 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_102 = x_101;
  }
  lean_ctor_set(x_102, 0, x_99);
  lean_ctor_set(x_102, 1, x_100);
  return x_102;
  }
  }
  else
  {
  lean_object* x_103; lean_object* x_104; 
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_103 = lean_ctor_get(x_72, 0);
  lean_inc(x_103);
  lean_dec(x_72);
  x_104 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_104, 0, x_103);
  lean_ctor_set(x_104, 1, x_69);
  return x_104;
  }
  }
  }
  }
  lean_object* l_Std_PersistentHashMap_findAtAux___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
  _start:
  {
  lean_object* x_6; 
  x_6 = l_Std_PersistentHashMap_findAtAux___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__3(x_1, x_2, x_3, x_4, x_5);
  lean_dec(x_5);
  lean_dec(x_2);
  lean_dec(x_1);
  return x_6;
  }
  }
  lean_object* l_Std_PersistentHashMap_findAux___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
  _start:
  {
  size_t x_4; lean_object* x_5; 
  x_4 = lean_unbox_usize(x_2);
  lean_dec(x_2);
  x_5 = l_Std_PersistentHashMap_findAux___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__2(x_1, x_4, x_3);
  lean_dec(x_3);
  return x_5;
  }
  }
  lean_object* l_Std_PersistentHashMap_find_x3f___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__1___boxed(lean_object* x_1, lean_object* x_2) {
  _start:
  {
  lean_object* x_3; 
  x_3 = l_Std_PersistentHashMap_find_x3f___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__1(x_1, x_2);
  lean_dec(x_2);
  return x_3;
  }
  }
  lean_object* l_Std_PersistentHashMap_insertAux_traverse___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___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) {
  _start:
  {
  size_t x_7; lean_object* x_8; 
  x_7 = lean_unbox_usize(x_1);
  lean_dec(x_1);
  x_8 = l_Std_PersistentHashMap_insertAux_traverse___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__6(x_7, x_2, x_3, x_4, x_5, x_6);
  lean_dec(x_3);
  lean_dec(x_2);
  return x_8;
  }
  }
  lean_object* l_Std_PersistentHashMap_insertAux___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__5___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
  _start:
  {
  size_t x_6; size_t x_7; lean_object* x_8; 
  x_6 = lean_unbox_usize(x_2);
  lean_dec(x_2);
  x_7 = lean_unbox_usize(x_3);
  lean_dec(x_3);
  x_8 = l_Std_PersistentHashMap_insertAux___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__5(x_1, x_6, x_7, x_4, x_5);
  return x_8;
  }
  }
  lean_object* l_Lean_Meta_inferTypeImp_infer_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, 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) {
  _start:
  {
  switch (lean_obj_tag(x_1)) {
  case 0:
  {
  lean_object* x_15; uint64_t x_16; lean_object* x_17; lean_object* x_18; 
  lean_dec(x_14);
  lean_dec(x_13);
  lean_dec(x_12);
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(x_9);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_15 = lean_ctor_get(x_1, 0);
  lean_inc(x_15);
  x_16 = lean_ctor_get_uint64(x_1, sizeof(void*)*1);
  lean_dec(x_1);
  x_17 = lean_box_uint64(x_16);
  x_18 = lean_apply_2(x_8, x_15, x_17);
  return x_18;
  }
  case 1:
  {
  lean_object* x_19; uint64_t x_20; lean_object* x_21; lean_object* x_22; 
  lean_dec(x_14);
  lean_dec(x_13);
  lean_dec(x_12);
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(x_9);
  lean_dec(x_8);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_19 = lean_ctor_get(x_1, 0);
  lean_inc(x_19);
  x_20 = lean_ctor_get_uint64(x_1, sizeof(void*)*1);
  lean_dec(x_1);
  x_21 = lean_box_uint64(x_20);
  x_22 = lean_apply_2(x_7, x_19, x_21);
  return x_22;
  }
  case 2:
  {
  lean_object* x_23; uint64_t x_24; lean_object* x_25; lean_object* x_26; 
  lean_dec(x_14);
  lean_dec(x_13);
  lean_dec(x_12);
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(x_9);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_23 = lean_ctor_get(x_1, 0);
  lean_inc(x_23);
  x_24 = lean_ctor_get_uint64(x_1, sizeof(void*)*1);
  lean_dec(x_1);
  x_25 = lean_box_uint64(x_24);
  x_26 = lean_apply_2(x_6, x_23, x_25);
  return x_26;
  }
  case 3:
  {
  lean_object* x_27; uint64_t x_28; lean_object* x_29; lean_object* x_30; 
  lean_dec(x_14);
  lean_dec(x_13);
  lean_dec(x_12);
  lean_dec(x_10);
  lean_dec(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_3);
  lean_dec(x_2);
  x_27 = lean_ctor_get(x_1, 0);
  lean_inc(x_27);
  x_28 = lean_ctor_get_uint64(x_1, sizeof(void*)*1);
  lean_dec(x_1);
  x_29 = lean_box_uint64(x_28);
  x_30 = lean_apply_2(x_11, x_27, x_29);
  return x_30;
  }
  case 4:
  {
  lean_object* x_31; 
  lean_dec(x_14);
  lean_dec(x_13);
  lean_dec(x_12);
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(x_9);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  x_31 = lean_ctor_get(x_1, 1);
  lean_inc(x_31);
  if (lean_obj_tag(x_31) == 0)
  {
  lean_object* x_32; uint64_t x_33; lean_object* x_34; lean_object* x_35; 
  lean_dec(x_3);
  x_32 = lean_ctor_get(x_1, 0);
  lean_inc(x_32);
  x_33 = lean_ctor_get_uint64(x_1, sizeof(void*)*2);
  lean_dec(x_1);
  x_34 = lean_box_uint64(x_33);
  x_35 = lean_apply_2(x_2, x_32, x_34);
  return x_35;
  }
  else
  {
  lean_object* x_36; uint64_t x_37; lean_object* x_38; lean_object* x_39; 
  lean_dec(x_2);
  x_36 = lean_ctor_get(x_1, 0);
  lean_inc(x_36);
  x_37 = lean_ctor_get_uint64(x_1, sizeof(void*)*2);
  lean_dec(x_1);
  x_38 = lean_box_uint64(x_37);
  x_39 = lean_apply_3(x_3, x_36, x_31, x_38);
  return x_39;
  }
  }
  case 5:
  {
  lean_object* x_40; lean_object* x_41; uint64_t x_42; lean_object* x_43; lean_object* x_44; 
  lean_dec(x_14);
  lean_dec(x_13);
  lean_dec(x_12);
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(x_9);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_40 = lean_ctor_get(x_1, 0);
  lean_inc(x_40);
  x_41 = lean_ctor_get(x_1, 1);
  lean_inc(x_41);
  x_42 = lean_ctor_get_uint64(x_1, sizeof(void*)*2);
  x_43 = lean_box_uint64(x_42);
  x_44 = lean_apply_4(x_5, x_1, x_40, x_41, x_43);
  return x_44;
  }
  case 6:
  {
  lean_object* x_45; lean_object* x_46; lean_object* x_47; uint64_t x_48; lean_object* x_49; lean_object* x_50; 
  lean_dec(x_14);
  lean_dec(x_12);
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(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_3);
  lean_dec(x_2);
  x_45 = lean_ctor_get(x_1, 0);
  lean_inc(x_45);
  x_46 = lean_ctor_get(x_1, 1);
  lean_inc(x_46);
  x_47 = lean_ctor_get(x_1, 2);
  lean_inc(x_47);
  x_48 = lean_ctor_get_uint64(x_1, sizeof(void*)*3);
  x_49 = lean_box_uint64(x_48);
  x_50 = lean_apply_5(x_13, x_1, x_45, x_46, x_47, x_49);
  return x_50;
  }
  case 7:
  {
  lean_object* x_51; lean_object* x_52; lean_object* x_53; uint64_t x_54; lean_object* x_55; lean_object* x_56; 
  lean_dec(x_14);
  lean_dec(x_13);
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(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_3);
  lean_dec(x_2);
  x_51 = lean_ctor_get(x_1, 0);
  lean_inc(x_51);
  x_52 = lean_ctor_get(x_1, 1);
  lean_inc(x_52);
  x_53 = lean_ctor_get(x_1, 2);
  lean_inc(x_53);
  x_54 = lean_ctor_get_uint64(x_1, sizeof(void*)*3);
  x_55 = lean_box_uint64(x_54);
  x_56 = lean_apply_5(x_12, x_1, x_51, x_52, x_53, x_55);
  return x_56;
  }
  case 8:
  {
  lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; uint64_t x_61; lean_object* x_62; lean_object* x_63; 
  lean_dec(x_13);
  lean_dec(x_12);
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(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_3);
  lean_dec(x_2);
  x_57 = lean_ctor_get(x_1, 0);
  lean_inc(x_57);
  x_58 = lean_ctor_get(x_1, 1);
  lean_inc(x_58);
  x_59 = lean_ctor_get(x_1, 2);
  lean_inc(x_59);
  x_60 = lean_ctor_get(x_1, 3);
  lean_inc(x_60);
  x_61 = lean_ctor_get_uint64(x_1, sizeof(void*)*4);
  x_62 = lean_box_uint64(x_61);
  x_63 = lean_apply_6(x_14, x_1, x_57, x_58, x_59, x_60, x_62);
  return x_63;
  }
  case 9:
  {
  lean_object* x_64; uint64_t x_65; lean_object* x_66; lean_object* x_67; 
  lean_dec(x_14);
  lean_dec(x_13);
  lean_dec(x_12);
  lean_dec(x_11);
  lean_dec(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_3);
  lean_dec(x_2);
  x_64 = lean_ctor_get(x_1, 0);
  lean_inc(x_64);
  x_65 = lean_ctor_get_uint64(x_1, sizeof(void*)*1);
  lean_dec(x_1);
  x_66 = lean_box_uint64(x_65);
  x_67 = lean_apply_2(x_10, x_64, x_66);
  return x_67;
  }
  case 10:
  {
  lean_object* x_68; lean_object* x_69; uint64_t x_70; lean_object* x_71; lean_object* x_72; 
  lean_dec(x_14);
  lean_dec(x_13);
  lean_dec(x_12);
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  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_70 = lean_ctor_get_uint64(x_1, sizeof(void*)*2);
  lean_dec(x_1);
  x_71 = lean_box_uint64(x_70);
  x_72 = lean_apply_3(x_9, x_68, x_69, x_71);
  return x_72;
  }
  default: 
  {
  lean_object* x_73; lean_object* x_74; lean_object* x_75; uint64_t x_76; lean_object* x_77; lean_object* x_78; 
  lean_dec(x_14);
  lean_dec(x_13);
  lean_dec(x_12);
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(x_9);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_3);
  lean_dec(x_2);
  x_73 = lean_ctor_get(x_1, 0);
  lean_inc(x_73);
  x_74 = lean_ctor_get(x_1, 1);
  lean_inc(x_74);
  x_75 = lean_ctor_get(x_1, 2);
  lean_inc(x_75);
  x_76 = lean_ctor_get_uint64(x_1, sizeof(void*)*3);
  x_77 = lean_box_uint64(x_76);
  x_78 = lean_apply_5(x_4, x_1, x_73, x_74, x_75, x_77);
  return x_78;
  }
  }
  }
  }
  lean_object* l_Lean_Meta_inferTypeImp_infer_match__1(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = lean_alloc_closure((void*)(l_Lean_Meta_inferTypeImp_infer_match__1___rarg), 14, 0);
  return x_2;
  }
  }
  static lean_object* _init_l_Lean_Meta_inferTypeImp_infer___closed__1() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("unexpected bound variable ");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Meta_inferTypeImp_infer___closed__2() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; 
  x_1 = l_Lean_Meta_inferTypeImp_infer___closed__1;
  x_2 = l_Lean_stringToMessageData(x_1);
  return x_2;
  }
  }
  lean_object* l_Lean_Meta_inferTypeImp_infer(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:
  {
  switch (lean_obj_tag(x_2)) {
  case 0:
  {
  lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; 
  lean_dec(x_1);
  x_8 = lean_ctor_get(x_2, 0);
  lean_inc(x_8);
  lean_dec(x_2);
  x_9 = l_Lean_mkBVar(x_8);
  x_10 = lean_alloc_ctor(2, 1, 0);
  lean_ctor_set(x_10, 0, x_9);
  x_11 = l_Lean_Meta_inferTypeImp_infer___closed__2;
  x_12 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_12, 0, x_11);
  lean_ctor_set(x_12, 1, x_10);
  x_13 = l_Lean_KernelException_toMessageData___closed__15;
  x_14 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_14, 0, x_12);
  lean_ctor_set(x_14, 1, x_13);
  x_15 = l_Lean_throwError___at_Lean_Meta_initFn____x40_Lean_Meta_Basic___hyg_1049____spec__1(x_14, 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);
  return x_15;
  }
  case 1:
  {
  lean_object* x_16; lean_object* x_17; 
  lean_dec(x_1);
  x_16 = lean_ctor_get(x_2, 0);
  lean_inc(x_16);
  lean_dec(x_2);
  x_17 = l___private_Lean_Meta_InferType_0__Lean_Meta_inferFVarType(x_16, x_3, x_4, x_5, x_6, x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  return x_17;
  }
  case 2:
  {
  lean_object* x_18; lean_object* x_19; 
  lean_dec(x_1);
  x_18 = lean_ctor_get(x_2, 0);
  lean_inc(x_18);
  lean_dec(x_2);
  x_19 = l___private_Lean_Meta_InferType_0__Lean_Meta_inferMVarType(x_18, 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);
  return x_19;
  }
  case 3:
  {
  lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; 
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_1);
  x_20 = lean_ctor_get(x_2, 0);
  lean_inc(x_20);
  lean_dec(x_2);
  x_21 = l_Lean_mkLevelSucc(x_20);
  x_22 = l_Lean_mkSort(x_21);
  x_23 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_23, 0, x_22);
  lean_ctor_set(x_23, 1, x_7);
  return x_23;
  }
  case 4:
  {
  lean_object* x_24; 
  x_24 = lean_ctor_get(x_2, 1);
  lean_inc(x_24);
  if (lean_obj_tag(x_24) == 0)
  {
  lean_object* x_25; lean_object* x_26; lean_object* x_27; 
  lean_dec(x_1);
  x_25 = lean_ctor_get(x_2, 0);
  lean_inc(x_25);
  lean_dec(x_2);
  x_26 = lean_box(0);
  x_27 = l___private_Lean_Meta_InferType_0__Lean_Meta_inferConstType(x_25, x_26, 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);
  return x_27;
  }
  else
  {
  lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; uint8_t x_32; 
  x_28 = lean_ctor_get(x_2, 0);
  lean_inc(x_28);
  lean_dec(x_2);
  x_29 = lean_st_ref_get(x_6, x_7);
  x_30 = lean_ctor_get(x_29, 1);
  lean_inc(x_30);
  lean_dec(x_29);
  x_31 = lean_st_ref_get(x_4, x_30);
  x_32 = !lean_is_exclusive(x_31);
  if (x_32 == 0)
  {
  lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; 
  x_33 = lean_ctor_get(x_31, 0);
  x_34 = lean_ctor_get(x_31, 1);
  x_35 = lean_ctor_get(x_33, 1);
  lean_inc(x_35);
  lean_dec(x_33);
  x_36 = lean_ctor_get(x_35, 0);
  lean_inc(x_36);
  lean_dec(x_35);
  x_37 = l_Std_PersistentHashMap_find_x3f___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__1(x_36, x_1);
  if (lean_obj_tag(x_37) == 0)
  {
  lean_object* x_38; 
  lean_free_object(x_31);
  x_38 = l___private_Lean_Meta_InferType_0__Lean_Meta_inferConstType(x_28, x_24, x_3, x_4, x_5, x_6, x_34);
  lean_dec(x_5);
  lean_dec(x_3);
  if (lean_obj_tag(x_38) == 0)
  {
  lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; uint8_t x_47; 
  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_st_ref_get(x_6, x_40);
  lean_dec(x_6);
  x_42 = lean_ctor_get(x_41, 1);
  lean_inc(x_42);
  lean_dec(x_41);
  x_43 = lean_st_ref_take(x_4, x_42);
  x_44 = lean_ctor_get(x_43, 0);
  lean_inc(x_44);
  x_45 = lean_ctor_get(x_44, 1);
  lean_inc(x_45);
  x_46 = lean_ctor_get(x_43, 1);
  lean_inc(x_46);
  lean_dec(x_43);
  x_47 = !lean_is_exclusive(x_44);
  if (x_47 == 0)
  {
  lean_object* x_48; uint8_t x_49; 
  x_48 = lean_ctor_get(x_44, 1);
  lean_dec(x_48);
  x_49 = !lean_is_exclusive(x_45);
  if (x_49 == 0)
  {
  lean_object* x_50; lean_object* x_51; lean_object* x_52; uint8_t x_53; 
  x_50 = lean_ctor_get(x_45, 0);
  lean_inc(x_39);
  x_51 = l_Std_PersistentHashMap_insert___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__4(x_50, x_1, x_39);
  lean_ctor_set(x_45, 0, x_51);
  x_52 = lean_st_ref_set(x_4, x_44, x_46);
  lean_dec(x_4);
  x_53 = !lean_is_exclusive(x_52);
  if (x_53 == 0)
  {
  lean_object* x_54; 
  x_54 = lean_ctor_get(x_52, 0);
  lean_dec(x_54);
  lean_ctor_set(x_52, 0, x_39);
  return x_52;
  }
  else
  {
  lean_object* x_55; lean_object* x_56; 
  x_55 = lean_ctor_get(x_52, 1);
  lean_inc(x_55);
  lean_dec(x_52);
  x_56 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_56, 0, x_39);
  lean_ctor_set(x_56, 1, x_55);
  return x_56;
  }
  }
  else
  {
  lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; 
  x_57 = lean_ctor_get(x_45, 0);
  x_58 = lean_ctor_get(x_45, 1);
  x_59 = lean_ctor_get(x_45, 2);
  x_60 = lean_ctor_get(x_45, 3);
  x_61 = lean_ctor_get(x_45, 4);
  lean_inc(x_61);
  lean_inc(x_60);
  lean_inc(x_59);
  lean_inc(x_58);
  lean_inc(x_57);
  lean_dec(x_45);
  lean_inc(x_39);
  x_62 = l_Std_PersistentHashMap_insert___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__4(x_57, x_1, x_39);
  x_63 = lean_alloc_ctor(0, 5, 0);
  lean_ctor_set(x_63, 0, x_62);
  lean_ctor_set(x_63, 1, x_58);
  lean_ctor_set(x_63, 2, x_59);
  lean_ctor_set(x_63, 3, x_60);
  lean_ctor_set(x_63, 4, x_61);
  lean_ctor_set(x_44, 1, x_63);
  x_64 = lean_st_ref_set(x_4, x_44, x_46);
  lean_dec(x_4);
  x_65 = lean_ctor_get(x_64, 1);
  lean_inc(x_65);
  if (lean_is_exclusive(x_64)) {
   lean_ctor_release(x_64, 0);
   lean_ctor_release(x_64, 1);
   x_66 = x_64;
  } else {
   lean_dec_ref(x_64);
   x_66 = lean_box(0);
  }
  if (lean_is_scalar(x_66)) {
   x_67 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_67 = x_66;
  }
  lean_ctor_set(x_67, 0, x_39);
  lean_ctor_set(x_67, 1, x_65);
  return x_67;
  }
  }
  else
  {
  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; 
  x_68 = lean_ctor_get(x_44, 0);
  x_69 = lean_ctor_get(x_44, 2);
  x_70 = lean_ctor_get(x_44, 3);
  lean_inc(x_70);
  lean_inc(x_69);
  lean_inc(x_68);
  lean_dec(x_44);
  x_71 = lean_ctor_get(x_45, 0);
  lean_inc(x_71);
  x_72 = lean_ctor_get(x_45, 1);
  lean_inc(x_72);
  x_73 = lean_ctor_get(x_45, 2);
  lean_inc(x_73);
  x_74 = lean_ctor_get(x_45, 3);
  lean_inc(x_74);
  x_75 = lean_ctor_get(x_45, 4);
  lean_inc(x_75);
  if (lean_is_exclusive(x_45)) {
   lean_ctor_release(x_45, 0);
   lean_ctor_release(x_45, 1);
   lean_ctor_release(x_45, 2);
   lean_ctor_release(x_45, 3);
   lean_ctor_release(x_45, 4);
   x_76 = x_45;
  } else {
   lean_dec_ref(x_45);
   x_76 = lean_box(0);
  }
  lean_inc(x_39);
  x_77 = l_Std_PersistentHashMap_insert___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__4(x_71, x_1, x_39);
  if (lean_is_scalar(x_76)) {
   x_78 = lean_alloc_ctor(0, 5, 0);
  } else {
   x_78 = x_76;
  }
  lean_ctor_set(x_78, 0, x_77);
  lean_ctor_set(x_78, 1, x_72);
  lean_ctor_set(x_78, 2, x_73);
  lean_ctor_set(x_78, 3, x_74);
  lean_ctor_set(x_78, 4, x_75);
  x_79 = lean_alloc_ctor(0, 4, 0);
  lean_ctor_set(x_79, 0, x_68);
  lean_ctor_set(x_79, 1, x_78);
  lean_ctor_set(x_79, 2, x_69);
  lean_ctor_set(x_79, 3, x_70);
  x_80 = lean_st_ref_set(x_4, x_79, x_46);
  lean_dec(x_4);
  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_39);
  lean_ctor_set(x_83, 1, x_81);
  return x_83;
  }
  }
  else
  {
  uint8_t x_84; 
  lean_dec(x_6);
  lean_dec(x_4);
  lean_dec(x_1);
  x_84 = !lean_is_exclusive(x_38);
  if (x_84 == 0)
  {
  return x_38;
  }
  else
  {
  lean_object* x_85; lean_object* x_86; lean_object* x_87; 
  x_85 = lean_ctor_get(x_38, 0);
  x_86 = lean_ctor_get(x_38, 1);
  lean_inc(x_86);
  lean_inc(x_85);
  lean_dec(x_38);
  x_87 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_87, 0, x_85);
  lean_ctor_set(x_87, 1, x_86);
  return x_87;
  }
  }
  }
  else
  {
  lean_object* x_88; 
  lean_dec(x_28);
  lean_dec(x_24);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_1);
  x_88 = lean_ctor_get(x_37, 0);
  lean_inc(x_88);
  lean_dec(x_37);
  lean_ctor_set(x_31, 0, x_88);
  return x_31;
  }
  }
  else
  {
  lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; 
  x_89 = lean_ctor_get(x_31, 0);
  x_90 = lean_ctor_get(x_31, 1);
  lean_inc(x_90);
  lean_inc(x_89);
  lean_dec(x_31);
  x_91 = lean_ctor_get(x_89, 1);
  lean_inc(x_91);
  lean_dec(x_89);
  x_92 = lean_ctor_get(x_91, 0);
  lean_inc(x_92);
  lean_dec(x_91);
  x_93 = l_Std_PersistentHashMap_find_x3f___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__1(x_92, x_1);
  if (lean_obj_tag(x_93) == 0)
  {
  lean_object* x_94; 
  x_94 = l___private_Lean_Meta_InferType_0__Lean_Meta_inferConstType(x_28, x_24, x_3, x_4, x_5, x_6, x_90);
  lean_dec(x_5);
  lean_dec(x_3);
  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; 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; lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; 
  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_st_ref_get(x_6, x_96);
  lean_dec(x_6);
  x_98 = lean_ctor_get(x_97, 1);
  lean_inc(x_98);
  lean_dec(x_97);
  x_99 = lean_st_ref_take(x_4, x_98);
  x_100 = lean_ctor_get(x_99, 0);
  lean_inc(x_100);
  x_101 = lean_ctor_get(x_100, 1);
  lean_inc(x_101);
  x_102 = lean_ctor_get(x_99, 1);
  lean_inc(x_102);
  lean_dec(x_99);
  x_103 = lean_ctor_get(x_100, 0);
  lean_inc(x_103);
  x_104 = lean_ctor_get(x_100, 2);
  lean_inc(x_104);
  x_105 = lean_ctor_get(x_100, 3);
  lean_inc(x_105);
  if (lean_is_exclusive(x_100)) {
   lean_ctor_release(x_100, 0);
   lean_ctor_release(x_100, 1);
   lean_ctor_release(x_100, 2);
   lean_ctor_release(x_100, 3);
   x_106 = x_100;
  } else {
   lean_dec_ref(x_100);
   x_106 = lean_box(0);
  }
  x_107 = lean_ctor_get(x_101, 0);
  lean_inc(x_107);
  x_108 = lean_ctor_get(x_101, 1);
  lean_inc(x_108);
  x_109 = lean_ctor_get(x_101, 2);
  lean_inc(x_109);
  x_110 = lean_ctor_get(x_101, 3);
  lean_inc(x_110);
  x_111 = lean_ctor_get(x_101, 4);
  lean_inc(x_111);
  if (lean_is_exclusive(x_101)) {
   lean_ctor_release(x_101, 0);
   lean_ctor_release(x_101, 1);
   lean_ctor_release(x_101, 2);
   lean_ctor_release(x_101, 3);
   lean_ctor_release(x_101, 4);
   x_112 = x_101;
  } else {
   lean_dec_ref(x_101);
   x_112 = lean_box(0);
  }
  lean_inc(x_95);
  x_113 = l_Std_PersistentHashMap_insert___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__4(x_107, x_1, x_95);
  if (lean_is_scalar(x_112)) {
   x_114 = lean_alloc_ctor(0, 5, 0);
  } else {
   x_114 = x_112;
  }
  lean_ctor_set(x_114, 0, x_113);
  lean_ctor_set(x_114, 1, x_108);
  lean_ctor_set(x_114, 2, x_109);
  lean_ctor_set(x_114, 3, x_110);
  lean_ctor_set(x_114, 4, x_111);
  if (lean_is_scalar(x_106)) {
   x_115 = lean_alloc_ctor(0, 4, 0);
  } else {
   x_115 = x_106;
  }
  lean_ctor_set(x_115, 0, x_103);
  lean_ctor_set(x_115, 1, x_114);
  lean_ctor_set(x_115, 2, x_104);
  lean_ctor_set(x_115, 3, x_105);
  x_116 = lean_st_ref_set(x_4, x_115, x_102);
  lean_dec(x_4);
  x_117 = lean_ctor_get(x_116, 1);
  lean_inc(x_117);
  if (lean_is_exclusive(x_116)) {
   lean_ctor_release(x_116, 0);
   lean_ctor_release(x_116, 1);
   x_118 = x_116;
  } else {
   lean_dec_ref(x_116);
   x_118 = lean_box(0);
  }
  if (lean_is_scalar(x_118)) {
   x_119 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_119 = x_118;
  }
  lean_ctor_set(x_119, 0, x_95);
  lean_ctor_set(x_119, 1, x_117);
  return x_119;
  }
  else
  {
  lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; 
  lean_dec(x_6);
  lean_dec(x_4);
  lean_dec(x_1);
  x_120 = lean_ctor_get(x_94, 0);
  lean_inc(x_120);
  x_121 = lean_ctor_get(x_94, 1);
  lean_inc(x_121);
  if (lean_is_exclusive(x_94)) {
   lean_ctor_release(x_94, 0);
   lean_ctor_release(x_94, 1);
   x_122 = x_94;
  } else {
   lean_dec_ref(x_94);
   x_122 = lean_box(0);
  }
  if (lean_is_scalar(x_122)) {
   x_123 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_123 = x_122;
  }
  lean_ctor_set(x_123, 0, x_120);
  lean_ctor_set(x_123, 1, x_121);
  return x_123;
  }
  }
  else
  {
  lean_object* x_124; lean_object* x_125; 
  lean_dec(x_28);
  lean_dec(x_24);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_1);
  x_124 = lean_ctor_get(x_93, 0);
  lean_inc(x_124);
  lean_dec(x_93);
  x_125 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_125, 0, x_124);
  lean_ctor_set(x_125, 1, x_90);
  return x_125;
  }
  }
  }
  }
  case 5:
  {
  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; uint8_t x_138; 
  lean_dec(x_1);
  x_126 = lean_ctor_get(x_2, 0);
  lean_inc(x_126);
  x_127 = l_Lean_Expr_getAppFn(x_126);
  lean_dec(x_126);
  x_128 = lean_unsigned_to_nat(0u);
  x_129 = l_Lean_Expr_getAppNumArgsAux(x_2, x_128);
  x_130 = l_Lean_Expr_getAppArgs___closed__1;
  lean_inc(x_129);
  x_131 = lean_mk_array(x_129, x_130);
  x_132 = lean_unsigned_to_nat(1u);
  x_133 = lean_nat_sub(x_129, x_132);
  lean_dec(x_129);
  lean_inc(x_2);
  x_134 = l___private_Lean_Expr_0__Lean_Expr_getAppArgsAux(x_2, x_131, x_133);
  x_135 = lean_st_ref_get(x_6, x_7);
  x_136 = lean_ctor_get(x_135, 1);
  lean_inc(x_136);
  lean_dec(x_135);
  x_137 = lean_st_ref_get(x_4, x_136);
  x_138 = !lean_is_exclusive(x_137);
  if (x_138 == 0)
  {
  lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; 
  x_139 = lean_ctor_get(x_137, 0);
  x_140 = lean_ctor_get(x_137, 1);
  x_141 = lean_ctor_get(x_139, 1);
  lean_inc(x_141);
  lean_dec(x_139);
  x_142 = lean_ctor_get(x_141, 0);
  lean_inc(x_142);
  lean_dec(x_141);
  x_143 = l_Std_PersistentHashMap_find_x3f___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__1(x_142, x_2);
  if (lean_obj_tag(x_143) == 0)
  {
  lean_object* x_144; 
  lean_free_object(x_137);
  lean_inc(x_6);
  lean_inc(x_4);
  x_144 = l___private_Lean_Meta_InferType_0__Lean_Meta_inferAppType(x_127, x_134, x_3, x_4, x_5, x_6, x_140);
  if (lean_obj_tag(x_144) == 0)
  {
  lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; lean_object* x_149; lean_object* x_150; lean_object* x_151; lean_object* x_152; uint8_t x_153; 
  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_st_ref_get(x_6, x_146);
  lean_dec(x_6);
  x_148 = lean_ctor_get(x_147, 1);
  lean_inc(x_148);
  lean_dec(x_147);
  x_149 = lean_st_ref_take(x_4, x_148);
  x_150 = lean_ctor_get(x_149, 0);
  lean_inc(x_150);
  x_151 = lean_ctor_get(x_150, 1);
  lean_inc(x_151);
  x_152 = lean_ctor_get(x_149, 1);
  lean_inc(x_152);
  lean_dec(x_149);
  x_153 = !lean_is_exclusive(x_150);
  if (x_153 == 0)
  {
  lean_object* x_154; uint8_t x_155; 
  x_154 = lean_ctor_get(x_150, 1);
  lean_dec(x_154);
  x_155 = !lean_is_exclusive(x_151);
  if (x_155 == 0)
  {
  lean_object* x_156; lean_object* x_157; lean_object* x_158; uint8_t x_159; 
  x_156 = lean_ctor_get(x_151, 0);
  lean_inc(x_145);
  x_157 = l_Std_PersistentHashMap_insert___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__4(x_156, x_2, x_145);
  lean_ctor_set(x_151, 0, x_157);
  x_158 = lean_st_ref_set(x_4, x_150, x_152);
  lean_dec(x_4);
  x_159 = !lean_is_exclusive(x_158);
  if (x_159 == 0)
  {
  lean_object* x_160; 
  x_160 = lean_ctor_get(x_158, 0);
  lean_dec(x_160);
  lean_ctor_set(x_158, 0, x_145);
  return x_158;
  }
  else
  {
  lean_object* x_161; lean_object* x_162; 
  x_161 = lean_ctor_get(x_158, 1);
  lean_inc(x_161);
  lean_dec(x_158);
  x_162 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_162, 0, x_145);
  lean_ctor_set(x_162, 1, x_161);
  return x_162;
  }
  }
  else
  {
  lean_object* x_163; lean_object* x_164; lean_object* x_165; lean_object* x_166; lean_object* x_167; lean_object* x_168; lean_object* x_169; lean_object* x_170; lean_object* x_171; lean_object* x_172; lean_object* x_173; 
  x_163 = lean_ctor_get(x_151, 0);
  x_164 = lean_ctor_get(x_151, 1);
  x_165 = lean_ctor_get(x_151, 2);
  x_166 = lean_ctor_get(x_151, 3);
  x_167 = lean_ctor_get(x_151, 4);
  lean_inc(x_167);
  lean_inc(x_166);
  lean_inc(x_165);
  lean_inc(x_164);
  lean_inc(x_163);
  lean_dec(x_151);
  lean_inc(x_145);
  x_168 = l_Std_PersistentHashMap_insert___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__4(x_163, x_2, x_145);
  x_169 = lean_alloc_ctor(0, 5, 0);
  lean_ctor_set(x_169, 0, x_168);
  lean_ctor_set(x_169, 1, x_164);
  lean_ctor_set(x_169, 2, x_165);
  lean_ctor_set(x_169, 3, x_166);
  lean_ctor_set(x_169, 4, x_167);
  lean_ctor_set(x_150, 1, x_169);
  x_170 = lean_st_ref_set(x_4, x_150, x_152);
  lean_dec(x_4);
  x_171 = lean_ctor_get(x_170, 1);
  lean_inc(x_171);
  if (lean_is_exclusive(x_170)) {
   lean_ctor_release(x_170, 0);
   lean_ctor_release(x_170, 1);
   x_172 = x_170;
  } else {
   lean_dec_ref(x_170);
   x_172 = lean_box(0);
  }
  if (lean_is_scalar(x_172)) {
   x_173 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_173 = x_172;
  }
  lean_ctor_set(x_173, 0, x_145);
  lean_ctor_set(x_173, 1, x_171);
  return x_173;
  }
  }
  else
  {
  lean_object* x_174; lean_object* x_175; lean_object* x_176; lean_object* x_177; lean_object* x_178; lean_object* x_179; lean_object* x_180; lean_object* x_181; lean_object* x_182; lean_object* x_183; lean_object* x_184; lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; lean_object* x_189; 
  x_174 = lean_ctor_get(x_150, 0);
  x_175 = lean_ctor_get(x_150, 2);
  x_176 = lean_ctor_get(x_150, 3);
  lean_inc(x_176);
  lean_inc(x_175);
  lean_inc(x_174);
  lean_dec(x_150);
  x_177 = lean_ctor_get(x_151, 0);
  lean_inc(x_177);
  x_178 = lean_ctor_get(x_151, 1);
  lean_inc(x_178);
  x_179 = lean_ctor_get(x_151, 2);
  lean_inc(x_179);
  x_180 = lean_ctor_get(x_151, 3);
  lean_inc(x_180);
  x_181 = lean_ctor_get(x_151, 4);
  lean_inc(x_181);
  if (lean_is_exclusive(x_151)) {
   lean_ctor_release(x_151, 0);
   lean_ctor_release(x_151, 1);
   lean_ctor_release(x_151, 2);
   lean_ctor_release(x_151, 3);
   lean_ctor_release(x_151, 4);
   x_182 = x_151;
  } else {
   lean_dec_ref(x_151);
   x_182 = lean_box(0);
  }
  lean_inc(x_145);
  x_183 = l_Std_PersistentHashMap_insert___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__4(x_177, x_2, x_145);
  if (lean_is_scalar(x_182)) {
   x_184 = lean_alloc_ctor(0, 5, 0);
  } else {
   x_184 = x_182;
  }
  lean_ctor_set(x_184, 0, x_183);
  lean_ctor_set(x_184, 1, x_178);
  lean_ctor_set(x_184, 2, x_179);
  lean_ctor_set(x_184, 3, x_180);
  lean_ctor_set(x_184, 4, x_181);
  x_185 = lean_alloc_ctor(0, 4, 0);
  lean_ctor_set(x_185, 0, x_174);
  lean_ctor_set(x_185, 1, x_184);
  lean_ctor_set(x_185, 2, x_175);
  lean_ctor_set(x_185, 3, x_176);
  x_186 = lean_st_ref_set(x_4, x_185, x_152);
  lean_dec(x_4);
  x_187 = lean_ctor_get(x_186, 1);
  lean_inc(x_187);
  if (lean_is_exclusive(x_186)) {
   lean_ctor_release(x_186, 0);
   lean_ctor_release(x_186, 1);
   x_188 = x_186;
  } else {
   lean_dec_ref(x_186);
   x_188 = lean_box(0);
  }
  if (lean_is_scalar(x_188)) {
   x_189 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_189 = x_188;
  }
  lean_ctor_set(x_189, 0, x_145);
  lean_ctor_set(x_189, 1, x_187);
  return x_189;
  }
  }
  else
  {
  uint8_t x_190; 
  lean_dec(x_6);
  lean_dec(x_4);
  lean_dec(x_2);
  x_190 = !lean_is_exclusive(x_144);
  if (x_190 == 0)
  {
  return x_144;
  }
  else
  {
  lean_object* x_191; lean_object* x_192; lean_object* x_193; 
  x_191 = lean_ctor_get(x_144, 0);
  x_192 = lean_ctor_get(x_144, 1);
  lean_inc(x_192);
  lean_inc(x_191);
  lean_dec(x_144);
  x_193 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_193, 0, x_191);
  lean_ctor_set(x_193, 1, x_192);
  return x_193;
  }
  }
  }
  else
  {
  lean_object* x_194; 
  lean_dec(x_134);
  lean_dec(x_127);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_194 = lean_ctor_get(x_143, 0);
  lean_inc(x_194);
  lean_dec(x_143);
  lean_ctor_set(x_137, 0, x_194);
  return x_137;
  }
  }
  else
  {
  lean_object* x_195; lean_object* x_196; lean_object* x_197; lean_object* x_198; lean_object* x_199; 
  x_195 = lean_ctor_get(x_137, 0);
  x_196 = lean_ctor_get(x_137, 1);
  lean_inc(x_196);
  lean_inc(x_195);
  lean_dec(x_137);
  x_197 = lean_ctor_get(x_195, 1);
  lean_inc(x_197);
  lean_dec(x_195);
  x_198 = lean_ctor_get(x_197, 0);
  lean_inc(x_198);
  lean_dec(x_197);
  x_199 = l_Std_PersistentHashMap_find_x3f___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__1(x_198, x_2);
  if (lean_obj_tag(x_199) == 0)
  {
  lean_object* x_200; 
  lean_inc(x_6);
  lean_inc(x_4);
  x_200 = l___private_Lean_Meta_InferType_0__Lean_Meta_inferAppType(x_127, x_134, x_3, x_4, x_5, x_6, x_196);
  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; 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; 
  x_201 = lean_ctor_get(x_200, 0);
  lean_inc(x_201);
  x_202 = lean_ctor_get(x_200, 1);
  lean_inc(x_202);
  lean_dec(x_200);
  x_203 = lean_st_ref_get(x_6, x_202);
  lean_dec(x_6);
  x_204 = lean_ctor_get(x_203, 1);
  lean_inc(x_204);
  lean_dec(x_203);
  x_205 = lean_st_ref_take(x_4, x_204);
  x_206 = lean_ctor_get(x_205, 0);
  lean_inc(x_206);
  x_207 = lean_ctor_get(x_206, 1);
  lean_inc(x_207);
  x_208 = lean_ctor_get(x_205, 1);
  lean_inc(x_208);
  lean_dec(x_205);
  x_209 = lean_ctor_get(x_206, 0);
  lean_inc(x_209);
  x_210 = lean_ctor_get(x_206, 2);
  lean_inc(x_210);
  x_211 = lean_ctor_get(x_206, 3);
  lean_inc(x_211);
  if (lean_is_exclusive(x_206)) {
   lean_ctor_release(x_206, 0);
   lean_ctor_release(x_206, 1);
   lean_ctor_release(x_206, 2);
   lean_ctor_release(x_206, 3);
   x_212 = x_206;
  } else {
   lean_dec_ref(x_206);
   x_212 = lean_box(0);
  }
  x_213 = lean_ctor_get(x_207, 0);
  lean_inc(x_213);
  x_214 = lean_ctor_get(x_207, 1);
  lean_inc(x_214);
  x_215 = lean_ctor_get(x_207, 2);
  lean_inc(x_215);
  x_216 = lean_ctor_get(x_207, 3);
  lean_inc(x_216);
  x_217 = lean_ctor_get(x_207, 4);
  lean_inc(x_217);
  if (lean_is_exclusive(x_207)) {
   lean_ctor_release(x_207, 0);
   lean_ctor_release(x_207, 1);
   lean_ctor_release(x_207, 2);
   lean_ctor_release(x_207, 3);
   lean_ctor_release(x_207, 4);
   x_218 = x_207;
  } else {
   lean_dec_ref(x_207);
   x_218 = lean_box(0);
  }
  lean_inc(x_201);
  x_219 = l_Std_PersistentHashMap_insert___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__4(x_213, x_2, x_201);
  if (lean_is_scalar(x_218)) {
   x_220 = lean_alloc_ctor(0, 5, 0);
  } else {
   x_220 = x_218;
  }
  lean_ctor_set(x_220, 0, x_219);
  lean_ctor_set(x_220, 1, x_214);
  lean_ctor_set(x_220, 2, x_215);
  lean_ctor_set(x_220, 3, x_216);
  lean_ctor_set(x_220, 4, x_217);
  if (lean_is_scalar(x_212)) {
   x_221 = lean_alloc_ctor(0, 4, 0);
  } else {
   x_221 = x_212;
  }
  lean_ctor_set(x_221, 0, x_209);
  lean_ctor_set(x_221, 1, x_220);
  lean_ctor_set(x_221, 2, x_210);
  lean_ctor_set(x_221, 3, x_211);
  x_222 = lean_st_ref_set(x_4, x_221, x_208);
  lean_dec(x_4);
  x_223 = lean_ctor_get(x_222, 1);
  lean_inc(x_223);
  if (lean_is_exclusive(x_222)) {
   lean_ctor_release(x_222, 0);
   lean_ctor_release(x_222, 1);
   x_224 = x_222;
  } else {
   lean_dec_ref(x_222);
   x_224 = lean_box(0);
  }
  if (lean_is_scalar(x_224)) {
   x_225 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_225 = x_224;
  }
  lean_ctor_set(x_225, 0, x_201);
  lean_ctor_set(x_225, 1, x_223);
  return x_225;
  }
  else
  {
  lean_object* x_226; lean_object* x_227; lean_object* x_228; lean_object* x_229; 
  lean_dec(x_6);
  lean_dec(x_4);
  lean_dec(x_2);
  x_226 = lean_ctor_get(x_200, 0);
  lean_inc(x_226);
  x_227 = lean_ctor_get(x_200, 1);
  lean_inc(x_227);
  if (lean_is_exclusive(x_200)) {
   lean_ctor_release(x_200, 0);
   lean_ctor_release(x_200, 1);
   x_228 = x_200;
  } else {
   lean_dec_ref(x_200);
   x_228 = lean_box(0);
  }
  if (lean_is_scalar(x_228)) {
   x_229 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_229 = x_228;
  }
  lean_ctor_set(x_229, 0, x_226);
  lean_ctor_set(x_229, 1, x_227);
  return x_229;
  }
  }
  else
  {
  lean_object* x_230; lean_object* x_231; 
  lean_dec(x_134);
  lean_dec(x_127);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_230 = lean_ctor_get(x_199, 0);
  lean_inc(x_230);
  lean_dec(x_199);
  x_231 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_231, 0, x_230);
  lean_ctor_set(x_231, 1, x_196);
  return x_231;
  }
  }
  }
  case 7:
  {
  lean_object* x_232; lean_object* x_233; lean_object* x_234; uint8_t x_235; 
  lean_dec(x_1);
  x_232 = lean_st_ref_get(x_6, x_7);
  x_233 = lean_ctor_get(x_232, 1);
  lean_inc(x_233);
  lean_dec(x_232);
  x_234 = lean_st_ref_get(x_4, x_233);
  x_235 = !lean_is_exclusive(x_234);
  if (x_235 == 0)
  {
  lean_object* x_236; lean_object* x_237; lean_object* x_238; lean_object* x_239; lean_object* x_240; 
  x_236 = lean_ctor_get(x_234, 0);
  x_237 = lean_ctor_get(x_234, 1);
  x_238 = lean_ctor_get(x_236, 1);
  lean_inc(x_238);
  lean_dec(x_236);
  x_239 = lean_ctor_get(x_238, 0);
  lean_inc(x_239);
  lean_dec(x_238);
  x_240 = l_Std_PersistentHashMap_find_x3f___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__1(x_239, x_2);
  if (lean_obj_tag(x_240) == 0)
  {
  lean_object* x_241; lean_object* x_242; 
  lean_free_object(x_234);
  x_241 = l___private_Lean_Meta_InferType_0__Lean_Meta_inferForallType___closed__1;
  lean_inc(x_6);
  lean_inc(x_4);
  lean_inc(x_2);
  x_242 = l_Lean_Meta_forallTelescope___at___private_Lean_Meta_InferType_0__Lean_Meta_inferForallType___spec__2___rarg(x_2, x_241, x_3, x_4, x_5, x_6, x_237);
  if (lean_obj_tag(x_242) == 0)
  {
  lean_object* x_243; lean_object* x_244; lean_object* x_245; lean_object* x_246; lean_object* x_247; lean_object* x_248; lean_object* x_249; lean_object* x_250; uint8_t x_251; 
  x_243 = lean_ctor_get(x_242, 0);
  lean_inc(x_243);
  x_244 = lean_ctor_get(x_242, 1);
  lean_inc(x_244);
  lean_dec(x_242);
  x_245 = lean_st_ref_get(x_6, x_244);
  lean_dec(x_6);
  x_246 = lean_ctor_get(x_245, 1);
  lean_inc(x_246);
  lean_dec(x_245);
  x_247 = lean_st_ref_take(x_4, x_246);
  x_248 = lean_ctor_get(x_247, 0);
  lean_inc(x_248);
  x_249 = lean_ctor_get(x_248, 1);
  lean_inc(x_249);
  x_250 = lean_ctor_get(x_247, 1);
  lean_inc(x_250);
  lean_dec(x_247);
  x_251 = !lean_is_exclusive(x_248);
  if (x_251 == 0)
  {
  lean_object* x_252; uint8_t x_253; 
  x_252 = lean_ctor_get(x_248, 1);
  lean_dec(x_252);
  x_253 = !lean_is_exclusive(x_249);
  if (x_253 == 0)
  {
  lean_object* x_254; lean_object* x_255; lean_object* x_256; uint8_t x_257; 
  x_254 = lean_ctor_get(x_249, 0);
  lean_inc(x_243);
  x_255 = l_Std_PersistentHashMap_insert___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__4(x_254, x_2, x_243);
  lean_ctor_set(x_249, 0, x_255);
  x_256 = lean_st_ref_set(x_4, x_248, x_250);
  lean_dec(x_4);
  x_257 = !lean_is_exclusive(x_256);
  if (x_257 == 0)
  {
  lean_object* x_258; 
  x_258 = lean_ctor_get(x_256, 0);
  lean_dec(x_258);
  lean_ctor_set(x_256, 0, x_243);
  return x_256;
  }
  else
  {
  lean_object* x_259; lean_object* x_260; 
  x_259 = lean_ctor_get(x_256, 1);
  lean_inc(x_259);
  lean_dec(x_256);
  x_260 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_260, 0, x_243);
  lean_ctor_set(x_260, 1, x_259);
  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; 
  x_261 = lean_ctor_get(x_249, 0);
  x_262 = lean_ctor_get(x_249, 1);
  x_263 = lean_ctor_get(x_249, 2);
  x_264 = lean_ctor_get(x_249, 3);
  x_265 = lean_ctor_get(x_249, 4);
  lean_inc(x_265);
  lean_inc(x_264);
  lean_inc(x_263);
  lean_inc(x_262);
  lean_inc(x_261);
  lean_dec(x_249);
  lean_inc(x_243);
  x_266 = l_Std_PersistentHashMap_insert___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__4(x_261, x_2, x_243);
  x_267 = lean_alloc_ctor(0, 5, 0);
  lean_ctor_set(x_267, 0, x_266);
  lean_ctor_set(x_267, 1, x_262);
  lean_ctor_set(x_267, 2, x_263);
  lean_ctor_set(x_267, 3, x_264);
  lean_ctor_set(x_267, 4, x_265);
  lean_ctor_set(x_248, 1, x_267);
  x_268 = lean_st_ref_set(x_4, x_248, x_250);
  lean_dec(x_4);
  x_269 = lean_ctor_get(x_268, 1);
  lean_inc(x_269);
  if (lean_is_exclusive(x_268)) {
   lean_ctor_release(x_268, 0);
   lean_ctor_release(x_268, 1);
   x_270 = x_268;
  } else {
   lean_dec_ref(x_268);
   x_270 = lean_box(0);
  }
  if (lean_is_scalar(x_270)) {
   x_271 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_271 = x_270;
  }
  lean_ctor_set(x_271, 0, x_243);
  lean_ctor_set(x_271, 1, x_269);
  return x_271;
  }
  }
  else
  {
  lean_object* x_272; lean_object* x_273; lean_object* x_274; lean_object* x_275; lean_object* x_276; lean_object* x_277; lean_object* x_278; lean_object* x_279; lean_object* x_280; lean_object* x_281; lean_object* x_282; lean_object* x_283; lean_object* x_284; lean_object* x_285; lean_object* x_286; lean_object* x_287; 
  x_272 = lean_ctor_get(x_248, 0);
  x_273 = lean_ctor_get(x_248, 2);
  x_274 = lean_ctor_get(x_248, 3);
  lean_inc(x_274);
  lean_inc(x_273);
  lean_inc(x_272);
  lean_dec(x_248);
  x_275 = lean_ctor_get(x_249, 0);
  lean_inc(x_275);
  x_276 = lean_ctor_get(x_249, 1);
  lean_inc(x_276);
  x_277 = lean_ctor_get(x_249, 2);
  lean_inc(x_277);
  x_278 = lean_ctor_get(x_249, 3);
  lean_inc(x_278);
  x_279 = lean_ctor_get(x_249, 4);
  lean_inc(x_279);
  if (lean_is_exclusive(x_249)) {
   lean_ctor_release(x_249, 0);
   lean_ctor_release(x_249, 1);
   lean_ctor_release(x_249, 2);
   lean_ctor_release(x_249, 3);
   lean_ctor_release(x_249, 4);
   x_280 = x_249;
  } else {
   lean_dec_ref(x_249);
   x_280 = lean_box(0);
  }
  lean_inc(x_243);
  x_281 = l_Std_PersistentHashMap_insert___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__4(x_275, x_2, x_243);
  if (lean_is_scalar(x_280)) {
   x_282 = lean_alloc_ctor(0, 5, 0);
  } else {
   x_282 = x_280;
  }
  lean_ctor_set(x_282, 0, x_281);
  lean_ctor_set(x_282, 1, x_276);
  lean_ctor_set(x_282, 2, x_277);
  lean_ctor_set(x_282, 3, x_278);
  lean_ctor_set(x_282, 4, x_279);
  x_283 = lean_alloc_ctor(0, 4, 0);
  lean_ctor_set(x_283, 0, x_272);
  lean_ctor_set(x_283, 1, x_282);
  lean_ctor_set(x_283, 2, x_273);
  lean_ctor_set(x_283, 3, x_274);
  x_284 = lean_st_ref_set(x_4, x_283, x_250);
  lean_dec(x_4);
  x_285 = lean_ctor_get(x_284, 1);
  lean_inc(x_285);
  if (lean_is_exclusive(x_284)) {
   lean_ctor_release(x_284, 0);
   lean_ctor_release(x_284, 1);
   x_286 = x_284;
  } else {
   lean_dec_ref(x_284);
   x_286 = lean_box(0);
  }
  if (lean_is_scalar(x_286)) {
   x_287 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_287 = x_286;
  }
  lean_ctor_set(x_287, 0, x_243);
  lean_ctor_set(x_287, 1, x_285);
  return x_287;
  }
  }
  else
  {
  uint8_t x_288; 
  lean_dec(x_6);
  lean_dec(x_4);
  lean_dec(x_2);
  x_288 = !lean_is_exclusive(x_242);
  if (x_288 == 0)
  {
  return x_242;
  }
  else
  {
  lean_object* x_289; lean_object* x_290; lean_object* x_291; 
  x_289 = lean_ctor_get(x_242, 0);
  x_290 = lean_ctor_get(x_242, 1);
  lean_inc(x_290);
  lean_inc(x_289);
  lean_dec(x_242);
  x_291 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_291, 0, x_289);
  lean_ctor_set(x_291, 1, x_290);
  return x_291;
  }
  }
  }
  else
  {
  lean_object* x_292; 
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_292 = lean_ctor_get(x_240, 0);
  lean_inc(x_292);
  lean_dec(x_240);
  lean_ctor_set(x_234, 0, x_292);
  return x_234;
  }
  }
  else
  {
  lean_object* x_293; lean_object* x_294; lean_object* x_295; lean_object* x_296; lean_object* x_297; 
  x_293 = lean_ctor_get(x_234, 0);
  x_294 = lean_ctor_get(x_234, 1);
  lean_inc(x_294);
  lean_inc(x_293);
  lean_dec(x_234);
  x_295 = lean_ctor_get(x_293, 1);
  lean_inc(x_295);
  lean_dec(x_293);
  x_296 = lean_ctor_get(x_295, 0);
  lean_inc(x_296);
  lean_dec(x_295);
  x_297 = l_Std_PersistentHashMap_find_x3f___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__1(x_296, x_2);
  if (lean_obj_tag(x_297) == 0)
  {
  lean_object* x_298; lean_object* x_299; 
  x_298 = l___private_Lean_Meta_InferType_0__Lean_Meta_inferForallType___closed__1;
  lean_inc(x_6);
  lean_inc(x_4);
  lean_inc(x_2);
  x_299 = l_Lean_Meta_forallTelescope___at___private_Lean_Meta_InferType_0__Lean_Meta_inferForallType___spec__2___rarg(x_2, x_298, x_3, x_4, x_5, x_6, x_294);
  if (lean_obj_tag(x_299) == 0)
  {
  lean_object* x_300; lean_object* x_301; lean_object* x_302; lean_object* x_303; lean_object* x_304; lean_object* x_305; lean_object* x_306; lean_object* x_307; lean_object* x_308; lean_object* x_309; lean_object* x_310; 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; lean_object* x_322; lean_object* x_323; lean_object* x_324; 
  x_300 = lean_ctor_get(x_299, 0);
  lean_inc(x_300);
  x_301 = lean_ctor_get(x_299, 1);
  lean_inc(x_301);
  lean_dec(x_299);
  x_302 = lean_st_ref_get(x_6, x_301);
  lean_dec(x_6);
  x_303 = lean_ctor_get(x_302, 1);
  lean_inc(x_303);
  lean_dec(x_302);
  x_304 = lean_st_ref_take(x_4, x_303);
  x_305 = lean_ctor_get(x_304, 0);
  lean_inc(x_305);
  x_306 = lean_ctor_get(x_305, 1);
  lean_inc(x_306);
  x_307 = lean_ctor_get(x_304, 1);
  lean_inc(x_307);
  lean_dec(x_304);
  x_308 = lean_ctor_get(x_305, 0);
  lean_inc(x_308);
  x_309 = lean_ctor_get(x_305, 2);
  lean_inc(x_309);
  x_310 = lean_ctor_get(x_305, 3);
  lean_inc(x_310);
  if (lean_is_exclusive(x_305)) {
   lean_ctor_release(x_305, 0);
   lean_ctor_release(x_305, 1);
   lean_ctor_release(x_305, 2);
   lean_ctor_release(x_305, 3);
   x_311 = x_305;
  } else {
   lean_dec_ref(x_305);
   x_311 = lean_box(0);
  }
  x_312 = lean_ctor_get(x_306, 0);
  lean_inc(x_312);
  x_313 = lean_ctor_get(x_306, 1);
  lean_inc(x_313);
  x_314 = lean_ctor_get(x_306, 2);
  lean_inc(x_314);
  x_315 = lean_ctor_get(x_306, 3);
  lean_inc(x_315);
  x_316 = lean_ctor_get(x_306, 4);
  lean_inc(x_316);
  if (lean_is_exclusive(x_306)) {
   lean_ctor_release(x_306, 0);
   lean_ctor_release(x_306, 1);
   lean_ctor_release(x_306, 2);
   lean_ctor_release(x_306, 3);
   lean_ctor_release(x_306, 4);
   x_317 = x_306;
  } else {
   lean_dec_ref(x_306);
   x_317 = lean_box(0);
  }
  lean_inc(x_300);
  x_318 = l_Std_PersistentHashMap_insert___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__4(x_312, x_2, x_300);
  if (lean_is_scalar(x_317)) {
   x_319 = lean_alloc_ctor(0, 5, 0);
  } else {
   x_319 = x_317;
  }
  lean_ctor_set(x_319, 0, x_318);
  lean_ctor_set(x_319, 1, x_313);
  lean_ctor_set(x_319, 2, x_314);
  lean_ctor_set(x_319, 3, x_315);
  lean_ctor_set(x_319, 4, x_316);
  if (lean_is_scalar(x_311)) {
   x_320 = lean_alloc_ctor(0, 4, 0);
  } else {
   x_320 = x_311;
  }
  lean_ctor_set(x_320, 0, x_308);
  lean_ctor_set(x_320, 1, x_319);
  lean_ctor_set(x_320, 2, x_309);
  lean_ctor_set(x_320, 3, x_310);
  x_321 = lean_st_ref_set(x_4, x_320, x_307);
  lean_dec(x_4);
  x_322 = lean_ctor_get(x_321, 1);
  lean_inc(x_322);
  if (lean_is_exclusive(x_321)) {
   lean_ctor_release(x_321, 0);
   lean_ctor_release(x_321, 1);
   x_323 = x_321;
  } else {
   lean_dec_ref(x_321);
   x_323 = lean_box(0);
  }
  if (lean_is_scalar(x_323)) {
   x_324 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_324 = x_323;
  }
  lean_ctor_set(x_324, 0, x_300);
  lean_ctor_set(x_324, 1, x_322);
  return x_324;
  }
  else
  {
  lean_object* x_325; lean_object* x_326; lean_object* x_327; lean_object* x_328; 
  lean_dec(x_6);
  lean_dec(x_4);
  lean_dec(x_2);
  x_325 = lean_ctor_get(x_299, 0);
  lean_inc(x_325);
  x_326 = lean_ctor_get(x_299, 1);
  lean_inc(x_326);
  if (lean_is_exclusive(x_299)) {
   lean_ctor_release(x_299, 0);
   lean_ctor_release(x_299, 1);
   x_327 = x_299;
  } else {
   lean_dec_ref(x_299);
   x_327 = lean_box(0);
  }
  if (lean_is_scalar(x_327)) {
   x_328 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_328 = x_327;
  }
  lean_ctor_set(x_328, 0, x_325);
  lean_ctor_set(x_328, 1, x_326);
  return x_328;
  }
  }
  else
  {
  lean_object* x_329; lean_object* x_330; 
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_329 = lean_ctor_get(x_297, 0);
  lean_inc(x_329);
  lean_dec(x_297);
  x_330 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_330, 0, x_329);
  lean_ctor_set(x_330, 1, x_294);
  return x_330;
  }
  }
  }
  case 9:
  {
  lean_object* x_331; lean_object* x_332; lean_object* x_333; 
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_1);
  x_331 = lean_ctor_get(x_2, 0);
  lean_inc(x_331);
  lean_dec(x_2);
  x_332 = l_Lean_Literal_type(x_331);
  lean_dec(x_331);
  x_333 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_333, 0, x_332);
  lean_ctor_set(x_333, 1, x_7);
  return x_333;
  }
  case 10:
  {
  lean_object* x_334; 
  x_334 = lean_ctor_get(x_2, 1);
  lean_inc(x_334);
  lean_dec(x_2);
  x_2 = x_334;
  goto _start;
  }
  case 11:
  {
  lean_object* x_336; lean_object* x_337; lean_object* x_338; lean_object* x_339; lean_object* x_340; lean_object* x_341; uint8_t x_342; 
  lean_dec(x_1);
  x_336 = lean_ctor_get(x_2, 0);
  lean_inc(x_336);
  x_337 = lean_ctor_get(x_2, 1);
  lean_inc(x_337);
  x_338 = lean_ctor_get(x_2, 2);
  lean_inc(x_338);
  x_339 = lean_st_ref_get(x_6, x_7);
  x_340 = lean_ctor_get(x_339, 1);
  lean_inc(x_340);
  lean_dec(x_339);
  x_341 = lean_st_ref_get(x_4, x_340);
  x_342 = !lean_is_exclusive(x_341);
  if (x_342 == 0)
  {
  lean_object* x_343; lean_object* x_344; lean_object* x_345; lean_object* x_346; lean_object* x_347; 
  x_343 = lean_ctor_get(x_341, 0);
  x_344 = lean_ctor_get(x_341, 1);
  x_345 = lean_ctor_get(x_343, 1);
  lean_inc(x_345);
  lean_dec(x_343);
  x_346 = lean_ctor_get(x_345, 0);
  lean_inc(x_346);
  lean_dec(x_345);
  x_347 = l_Std_PersistentHashMap_find_x3f___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__1(x_346, x_2);
  if (lean_obj_tag(x_347) == 0)
  {
  lean_object* x_348; 
  lean_free_object(x_341);
  lean_inc(x_6);
  lean_inc(x_4);
  x_348 = l___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType(x_336, x_337, x_338, x_3, x_4, x_5, x_6, x_344);
  if (lean_obj_tag(x_348) == 0)
  {
  lean_object* x_349; lean_object* x_350; lean_object* x_351; lean_object* x_352; lean_object* x_353; lean_object* x_354; lean_object* x_355; lean_object* x_356; uint8_t x_357; 
  x_349 = lean_ctor_get(x_348, 0);
  lean_inc(x_349);
  x_350 = lean_ctor_get(x_348, 1);
  lean_inc(x_350);
  lean_dec(x_348);
  x_351 = lean_st_ref_get(x_6, x_350);
  lean_dec(x_6);
  x_352 = lean_ctor_get(x_351, 1);
  lean_inc(x_352);
  lean_dec(x_351);
  x_353 = lean_st_ref_take(x_4, x_352);
  x_354 = lean_ctor_get(x_353, 0);
  lean_inc(x_354);
  x_355 = lean_ctor_get(x_354, 1);
  lean_inc(x_355);
  x_356 = lean_ctor_get(x_353, 1);
  lean_inc(x_356);
  lean_dec(x_353);
  x_357 = !lean_is_exclusive(x_354);
  if (x_357 == 0)
  {
  lean_object* x_358; uint8_t x_359; 
  x_358 = lean_ctor_get(x_354, 1);
  lean_dec(x_358);
  x_359 = !lean_is_exclusive(x_355);
  if (x_359 == 0)
  {
  lean_object* x_360; lean_object* x_361; lean_object* x_362; uint8_t x_363; 
  x_360 = lean_ctor_get(x_355, 0);
  lean_inc(x_349);
  x_361 = l_Std_PersistentHashMap_insert___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__4(x_360, x_2, x_349);
  lean_ctor_set(x_355, 0, x_361);
  x_362 = lean_st_ref_set(x_4, x_354, x_356);
  lean_dec(x_4);
  x_363 = !lean_is_exclusive(x_362);
  if (x_363 == 0)
  {
  lean_object* x_364; 
  x_364 = lean_ctor_get(x_362, 0);
  lean_dec(x_364);
  lean_ctor_set(x_362, 0, x_349);
  return x_362;
  }
  else
  {
  lean_object* x_365; lean_object* x_366; 
  x_365 = lean_ctor_get(x_362, 1);
  lean_inc(x_365);
  lean_dec(x_362);
  x_366 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_366, 0, x_349);
  lean_ctor_set(x_366, 1, x_365);
  return x_366;
  }
  }
  else
  {
  lean_object* x_367; lean_object* x_368; lean_object* x_369; lean_object* x_370; lean_object* x_371; lean_object* x_372; lean_object* x_373; lean_object* x_374; lean_object* x_375; lean_object* x_376; lean_object* x_377; 
  x_367 = lean_ctor_get(x_355, 0);
  x_368 = lean_ctor_get(x_355, 1);
  x_369 = lean_ctor_get(x_355, 2);
  x_370 = lean_ctor_get(x_355, 3);
  x_371 = lean_ctor_get(x_355, 4);
  lean_inc(x_371);
  lean_inc(x_370);
  lean_inc(x_369);
  lean_inc(x_368);
  lean_inc(x_367);
  lean_dec(x_355);
  lean_inc(x_349);
  x_372 = l_Std_PersistentHashMap_insert___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__4(x_367, x_2, x_349);
  x_373 = lean_alloc_ctor(0, 5, 0);
  lean_ctor_set(x_373, 0, x_372);
  lean_ctor_set(x_373, 1, x_368);
  lean_ctor_set(x_373, 2, x_369);
  lean_ctor_set(x_373, 3, x_370);
  lean_ctor_set(x_373, 4, x_371);
  lean_ctor_set(x_354, 1, x_373);
  x_374 = lean_st_ref_set(x_4, x_354, x_356);
  lean_dec(x_4);
  x_375 = lean_ctor_get(x_374, 1);
  lean_inc(x_375);
  if (lean_is_exclusive(x_374)) {
   lean_ctor_release(x_374, 0);
   lean_ctor_release(x_374, 1);
   x_376 = x_374;
  } else {
   lean_dec_ref(x_374);
   x_376 = lean_box(0);
  }
  if (lean_is_scalar(x_376)) {
   x_377 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_377 = x_376;
  }
  lean_ctor_set(x_377, 0, x_349);
  lean_ctor_set(x_377, 1, x_375);
  return x_377;
  }
  }
  else
  {
  lean_object* x_378; lean_object* x_379; lean_object* x_380; lean_object* x_381; lean_object* x_382; lean_object* x_383; lean_object* x_384; lean_object* x_385; lean_object* x_386; lean_object* x_387; lean_object* x_388; lean_object* x_389; lean_object* x_390; lean_object* x_391; lean_object* x_392; lean_object* x_393; 
  x_378 = lean_ctor_get(x_354, 0);
  x_379 = lean_ctor_get(x_354, 2);
  x_380 = lean_ctor_get(x_354, 3);
  lean_inc(x_380);
  lean_inc(x_379);
  lean_inc(x_378);
  lean_dec(x_354);
  x_381 = lean_ctor_get(x_355, 0);
  lean_inc(x_381);
  x_382 = lean_ctor_get(x_355, 1);
  lean_inc(x_382);
  x_383 = lean_ctor_get(x_355, 2);
  lean_inc(x_383);
  x_384 = lean_ctor_get(x_355, 3);
  lean_inc(x_384);
  x_385 = lean_ctor_get(x_355, 4);
  lean_inc(x_385);
  if (lean_is_exclusive(x_355)) {
   lean_ctor_release(x_355, 0);
   lean_ctor_release(x_355, 1);
   lean_ctor_release(x_355, 2);
   lean_ctor_release(x_355, 3);
   lean_ctor_release(x_355, 4);
   x_386 = x_355;
  } else {
   lean_dec_ref(x_355);
   x_386 = lean_box(0);
  }
  lean_inc(x_349);
  x_387 = l_Std_PersistentHashMap_insert___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__4(x_381, x_2, x_349);
  if (lean_is_scalar(x_386)) {
   x_388 = lean_alloc_ctor(0, 5, 0);
  } else {
   x_388 = x_386;
  }
  lean_ctor_set(x_388, 0, x_387);
  lean_ctor_set(x_388, 1, x_382);
  lean_ctor_set(x_388, 2, x_383);
  lean_ctor_set(x_388, 3, x_384);
  lean_ctor_set(x_388, 4, x_385);
  x_389 = lean_alloc_ctor(0, 4, 0);
  lean_ctor_set(x_389, 0, x_378);
  lean_ctor_set(x_389, 1, x_388);
  lean_ctor_set(x_389, 2, x_379);
  lean_ctor_set(x_389, 3, x_380);
  x_390 = lean_st_ref_set(x_4, x_389, x_356);
  lean_dec(x_4);
  x_391 = lean_ctor_get(x_390, 1);
  lean_inc(x_391);
  if (lean_is_exclusive(x_390)) {
   lean_ctor_release(x_390, 0);
   lean_ctor_release(x_390, 1);
   x_392 = x_390;
  } else {
   lean_dec_ref(x_390);
   x_392 = lean_box(0);
  }
  if (lean_is_scalar(x_392)) {
   x_393 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_393 = x_392;
  }
  lean_ctor_set(x_393, 0, x_349);
  lean_ctor_set(x_393, 1, x_391);
  return x_393;
  }
  }
  else
  {
  uint8_t x_394; 
  lean_dec(x_6);
  lean_dec(x_4);
  lean_dec(x_2);
  x_394 = !lean_is_exclusive(x_348);
  if (x_394 == 0)
  {
  return x_348;
  }
  else
  {
  lean_object* x_395; lean_object* x_396; lean_object* x_397; 
  x_395 = lean_ctor_get(x_348, 0);
  x_396 = lean_ctor_get(x_348, 1);
  lean_inc(x_396);
  lean_inc(x_395);
  lean_dec(x_348);
  x_397 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_397, 0, x_395);
  lean_ctor_set(x_397, 1, x_396);
  return x_397;
  }
  }
  }
  else
  {
  lean_object* x_398; 
  lean_dec(x_338);
  lean_dec(x_337);
  lean_dec(x_336);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_398 = lean_ctor_get(x_347, 0);
  lean_inc(x_398);
  lean_dec(x_347);
  lean_ctor_set(x_341, 0, x_398);
  return x_341;
  }
  }
  else
  {
  lean_object* x_399; lean_object* x_400; lean_object* x_401; lean_object* x_402; lean_object* x_403; 
  x_399 = lean_ctor_get(x_341, 0);
  x_400 = lean_ctor_get(x_341, 1);
  lean_inc(x_400);
  lean_inc(x_399);
  lean_dec(x_341);
  x_401 = lean_ctor_get(x_399, 1);
  lean_inc(x_401);
  lean_dec(x_399);
  x_402 = lean_ctor_get(x_401, 0);
  lean_inc(x_402);
  lean_dec(x_401);
  x_403 = l_Std_PersistentHashMap_find_x3f___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__1(x_402, x_2);
  if (lean_obj_tag(x_403) == 0)
  {
  lean_object* x_404; 
  lean_inc(x_6);
  lean_inc(x_4);
  x_404 = l___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType(x_336, x_337, x_338, x_3, x_4, x_5, x_6, x_400);
  if (lean_obj_tag(x_404) == 0)
  {
  lean_object* x_405; lean_object* x_406; lean_object* x_407; lean_object* x_408; lean_object* x_409; lean_object* x_410; lean_object* x_411; lean_object* x_412; lean_object* x_413; lean_object* x_414; lean_object* x_415; lean_object* x_416; lean_object* x_417; lean_object* x_418; lean_object* x_419; lean_object* x_420; 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; 
  x_405 = lean_ctor_get(x_404, 0);
  lean_inc(x_405);
  x_406 = lean_ctor_get(x_404, 1);
  lean_inc(x_406);
  lean_dec(x_404);
  x_407 = lean_st_ref_get(x_6, x_406);
  lean_dec(x_6);
  x_408 = lean_ctor_get(x_407, 1);
  lean_inc(x_408);
  lean_dec(x_407);
  x_409 = lean_st_ref_take(x_4, x_408);
  x_410 = lean_ctor_get(x_409, 0);
  lean_inc(x_410);
  x_411 = lean_ctor_get(x_410, 1);
  lean_inc(x_411);
  x_412 = lean_ctor_get(x_409, 1);
  lean_inc(x_412);
  lean_dec(x_409);
  x_413 = lean_ctor_get(x_410, 0);
  lean_inc(x_413);
  x_414 = lean_ctor_get(x_410, 2);
  lean_inc(x_414);
  x_415 = lean_ctor_get(x_410, 3);
  lean_inc(x_415);
  if (lean_is_exclusive(x_410)) {
   lean_ctor_release(x_410, 0);
   lean_ctor_release(x_410, 1);
   lean_ctor_release(x_410, 2);
   lean_ctor_release(x_410, 3);
   x_416 = x_410;
  } else {
   lean_dec_ref(x_410);
   x_416 = lean_box(0);
  }
  x_417 = lean_ctor_get(x_411, 0);
  lean_inc(x_417);
  x_418 = lean_ctor_get(x_411, 1);
  lean_inc(x_418);
  x_419 = lean_ctor_get(x_411, 2);
  lean_inc(x_419);
  x_420 = lean_ctor_get(x_411, 3);
  lean_inc(x_420);
  x_421 = lean_ctor_get(x_411, 4);
  lean_inc(x_421);
  if (lean_is_exclusive(x_411)) {
   lean_ctor_release(x_411, 0);
   lean_ctor_release(x_411, 1);
   lean_ctor_release(x_411, 2);
   lean_ctor_release(x_411, 3);
   lean_ctor_release(x_411, 4);
   x_422 = x_411;
  } else {
   lean_dec_ref(x_411);
   x_422 = lean_box(0);
  }
  lean_inc(x_405);
  x_423 = l_Std_PersistentHashMap_insert___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__4(x_417, x_2, x_405);
  if (lean_is_scalar(x_422)) {
   x_424 = lean_alloc_ctor(0, 5, 0);
  } else {
   x_424 = x_422;
  }
  lean_ctor_set(x_424, 0, x_423);
  lean_ctor_set(x_424, 1, x_418);
  lean_ctor_set(x_424, 2, x_419);
  lean_ctor_set(x_424, 3, x_420);
  lean_ctor_set(x_424, 4, x_421);
  if (lean_is_scalar(x_416)) {
   x_425 = lean_alloc_ctor(0, 4, 0);
  } else {
   x_425 = x_416;
  }
  lean_ctor_set(x_425, 0, x_413);
  lean_ctor_set(x_425, 1, x_424);
  lean_ctor_set(x_425, 2, x_414);
  lean_ctor_set(x_425, 3, x_415);
  x_426 = lean_st_ref_set(x_4, x_425, x_412);
  lean_dec(x_4);
  x_427 = lean_ctor_get(x_426, 1);
  lean_inc(x_427);
  if (lean_is_exclusive(x_426)) {
   lean_ctor_release(x_426, 0);
   lean_ctor_release(x_426, 1);
   x_428 = x_426;
  } else {
   lean_dec_ref(x_426);
   x_428 = lean_box(0);
  }
  if (lean_is_scalar(x_428)) {
   x_429 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_429 = x_428;
  }
  lean_ctor_set(x_429, 0, x_405);
  lean_ctor_set(x_429, 1, x_427);
  return x_429;
  }
  else
  {
  lean_object* x_430; lean_object* x_431; lean_object* x_432; lean_object* x_433; 
  lean_dec(x_6);
  lean_dec(x_4);
  lean_dec(x_2);
  x_430 = lean_ctor_get(x_404, 0);
  lean_inc(x_430);
  x_431 = lean_ctor_get(x_404, 1);
  lean_inc(x_431);
  if (lean_is_exclusive(x_404)) {
   lean_ctor_release(x_404, 0);
   lean_ctor_release(x_404, 1);
   x_432 = x_404;
  } else {
   lean_dec_ref(x_404);
   x_432 = lean_box(0);
  }
  if (lean_is_scalar(x_432)) {
   x_433 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_433 = x_432;
  }
  lean_ctor_set(x_433, 0, x_430);
  lean_ctor_set(x_433, 1, x_431);
  return x_433;
  }
  }
  else
  {
  lean_object* x_434; lean_object* x_435; 
  lean_dec(x_338);
  lean_dec(x_337);
  lean_dec(x_336);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_434 = lean_ctor_get(x_403, 0);
  lean_inc(x_434);
  lean_dec(x_403);
  x_435 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_435, 0, x_434);
  lean_ctor_set(x_435, 1, x_400);
  return x_435;
  }
  }
  }
  default: 
  {
  lean_object* x_436; lean_object* x_437; lean_object* x_438; uint8_t x_439; 
  lean_dec(x_1);
  x_436 = lean_st_ref_get(x_6, x_7);
  x_437 = lean_ctor_get(x_436, 1);
  lean_inc(x_437);
  lean_dec(x_436);
  x_438 = lean_st_ref_get(x_4, x_437);
  x_439 = !lean_is_exclusive(x_438);
  if (x_439 == 0)
  {
  lean_object* x_440; lean_object* x_441; lean_object* x_442; lean_object* x_443; lean_object* x_444; 
  x_440 = lean_ctor_get(x_438, 0);
  x_441 = lean_ctor_get(x_438, 1);
  x_442 = lean_ctor_get(x_440, 1);
  lean_inc(x_442);
  lean_dec(x_440);
  x_443 = lean_ctor_get(x_442, 0);
  lean_inc(x_443);
  lean_dec(x_442);
  x_444 = l_Std_PersistentHashMap_find_x3f___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__1(x_443, x_2);
  if (lean_obj_tag(x_444) == 0)
  {
  lean_object* x_445; lean_object* x_446; 
  lean_free_object(x_438);
  x_445 = l___private_Lean_Meta_InferType_0__Lean_Meta_inferLambdaType___closed__1;
  lean_inc(x_6);
  lean_inc(x_4);
  lean_inc(x_2);
  x_446 = l_Lean_Meta_lambdaLetTelescope___at___private_Lean_Meta_InferType_0__Lean_Meta_inferLambdaType___spec__1___rarg(x_2, x_445, x_3, x_4, x_5, x_6, x_441);
  if (lean_obj_tag(x_446) == 0)
  {
  lean_object* x_447; lean_object* x_448; lean_object* x_449; lean_object* x_450; lean_object* x_451; lean_object* x_452; lean_object* x_453; lean_object* x_454; uint8_t x_455; 
  x_447 = lean_ctor_get(x_446, 0);
  lean_inc(x_447);
  x_448 = lean_ctor_get(x_446, 1);
  lean_inc(x_448);
  lean_dec(x_446);
  x_449 = lean_st_ref_get(x_6, x_448);
  lean_dec(x_6);
  x_450 = lean_ctor_get(x_449, 1);
  lean_inc(x_450);
  lean_dec(x_449);
  x_451 = lean_st_ref_take(x_4, x_450);
  x_452 = lean_ctor_get(x_451, 0);
  lean_inc(x_452);
  x_453 = lean_ctor_get(x_452, 1);
  lean_inc(x_453);
  x_454 = lean_ctor_get(x_451, 1);
  lean_inc(x_454);
  lean_dec(x_451);
  x_455 = !lean_is_exclusive(x_452);
  if (x_455 == 0)
  {
  lean_object* x_456; uint8_t x_457; 
  x_456 = lean_ctor_get(x_452, 1);
  lean_dec(x_456);
  x_457 = !lean_is_exclusive(x_453);
  if (x_457 == 0)
  {
  lean_object* x_458; lean_object* x_459; lean_object* x_460; uint8_t x_461; 
  x_458 = lean_ctor_get(x_453, 0);
  lean_inc(x_447);
  x_459 = l_Std_PersistentHashMap_insert___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__4(x_458, x_2, x_447);
  lean_ctor_set(x_453, 0, x_459);
  x_460 = lean_st_ref_set(x_4, x_452, x_454);
  lean_dec(x_4);
  x_461 = !lean_is_exclusive(x_460);
  if (x_461 == 0)
  {
  lean_object* x_462; 
  x_462 = lean_ctor_get(x_460, 0);
  lean_dec(x_462);
  lean_ctor_set(x_460, 0, x_447);
  return x_460;
  }
  else
  {
  lean_object* x_463; lean_object* x_464; 
  x_463 = lean_ctor_get(x_460, 1);
  lean_inc(x_463);
  lean_dec(x_460);
  x_464 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_464, 0, x_447);
  lean_ctor_set(x_464, 1, x_463);
  return x_464;
  }
  }
  else
  {
  lean_object* x_465; lean_object* x_466; lean_object* x_467; lean_object* x_468; lean_object* x_469; lean_object* x_470; lean_object* x_471; lean_object* x_472; lean_object* x_473; lean_object* x_474; lean_object* x_475; 
  x_465 = lean_ctor_get(x_453, 0);
  x_466 = lean_ctor_get(x_453, 1);
  x_467 = lean_ctor_get(x_453, 2);
  x_468 = lean_ctor_get(x_453, 3);
  x_469 = lean_ctor_get(x_453, 4);
  lean_inc(x_469);
  lean_inc(x_468);
  lean_inc(x_467);
  lean_inc(x_466);
  lean_inc(x_465);
  lean_dec(x_453);
  lean_inc(x_447);
  x_470 = l_Std_PersistentHashMap_insert___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__4(x_465, x_2, x_447);
  x_471 = lean_alloc_ctor(0, 5, 0);
  lean_ctor_set(x_471, 0, x_470);
  lean_ctor_set(x_471, 1, x_466);
  lean_ctor_set(x_471, 2, x_467);
  lean_ctor_set(x_471, 3, x_468);
  lean_ctor_set(x_471, 4, x_469);
  lean_ctor_set(x_452, 1, x_471);
  x_472 = lean_st_ref_set(x_4, x_452, x_454);
  lean_dec(x_4);
  x_473 = lean_ctor_get(x_472, 1);
  lean_inc(x_473);
  if (lean_is_exclusive(x_472)) {
   lean_ctor_release(x_472, 0);
   lean_ctor_release(x_472, 1);
   x_474 = x_472;
  } else {
   lean_dec_ref(x_472);
   x_474 = lean_box(0);
  }
  if (lean_is_scalar(x_474)) {
   x_475 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_475 = x_474;
  }
  lean_ctor_set(x_475, 0, x_447);
  lean_ctor_set(x_475, 1, x_473);
  return x_475;
  }
  }
  else
  {
  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; lean_object* x_487; lean_object* x_488; lean_object* x_489; lean_object* x_490; lean_object* x_491; 
  x_476 = lean_ctor_get(x_452, 0);
  x_477 = lean_ctor_get(x_452, 2);
  x_478 = lean_ctor_get(x_452, 3);
  lean_inc(x_478);
  lean_inc(x_477);
  lean_inc(x_476);
  lean_dec(x_452);
  x_479 = lean_ctor_get(x_453, 0);
  lean_inc(x_479);
  x_480 = lean_ctor_get(x_453, 1);
  lean_inc(x_480);
  x_481 = lean_ctor_get(x_453, 2);
  lean_inc(x_481);
  x_482 = lean_ctor_get(x_453, 3);
  lean_inc(x_482);
  x_483 = lean_ctor_get(x_453, 4);
  lean_inc(x_483);
  if (lean_is_exclusive(x_453)) {
   lean_ctor_release(x_453, 0);
   lean_ctor_release(x_453, 1);
   lean_ctor_release(x_453, 2);
   lean_ctor_release(x_453, 3);
   lean_ctor_release(x_453, 4);
   x_484 = x_453;
  } else {
   lean_dec_ref(x_453);
   x_484 = lean_box(0);
  }
  lean_inc(x_447);
  x_485 = l_Std_PersistentHashMap_insert___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__4(x_479, x_2, x_447);
  if (lean_is_scalar(x_484)) {
   x_486 = lean_alloc_ctor(0, 5, 0);
  } else {
   x_486 = x_484;
  }
  lean_ctor_set(x_486, 0, x_485);
  lean_ctor_set(x_486, 1, x_480);
  lean_ctor_set(x_486, 2, x_481);
  lean_ctor_set(x_486, 3, x_482);
  lean_ctor_set(x_486, 4, x_483);
  x_487 = lean_alloc_ctor(0, 4, 0);
  lean_ctor_set(x_487, 0, x_476);
  lean_ctor_set(x_487, 1, x_486);
  lean_ctor_set(x_487, 2, x_477);
  lean_ctor_set(x_487, 3, x_478);
  x_488 = lean_st_ref_set(x_4, x_487, x_454);
  lean_dec(x_4);
  x_489 = lean_ctor_get(x_488, 1);
  lean_inc(x_489);
  if (lean_is_exclusive(x_488)) {
   lean_ctor_release(x_488, 0);
   lean_ctor_release(x_488, 1);
   x_490 = x_488;
  } else {
   lean_dec_ref(x_488);
   x_490 = lean_box(0);
  }
  if (lean_is_scalar(x_490)) {
   x_491 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_491 = x_490;
  }
  lean_ctor_set(x_491, 0, x_447);
  lean_ctor_set(x_491, 1, x_489);
  return x_491;
  }
  }
  else
  {
  uint8_t x_492; 
  lean_dec(x_6);
  lean_dec(x_4);
  lean_dec(x_2);
  x_492 = !lean_is_exclusive(x_446);
  if (x_492 == 0)
  {
  return x_446;
  }
  else
  {
  lean_object* x_493; lean_object* x_494; lean_object* x_495; 
  x_493 = lean_ctor_get(x_446, 0);
  x_494 = lean_ctor_get(x_446, 1);
  lean_inc(x_494);
  lean_inc(x_493);
  lean_dec(x_446);
  x_495 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_495, 0, x_493);
  lean_ctor_set(x_495, 1, x_494);
  return x_495;
  }
  }
  }
  else
  {
  lean_object* x_496; 
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_496 = lean_ctor_get(x_444, 0);
  lean_inc(x_496);
  lean_dec(x_444);
  lean_ctor_set(x_438, 0, x_496);
  return x_438;
  }
  }
  else
  {
  lean_object* x_497; lean_object* x_498; lean_object* x_499; lean_object* x_500; lean_object* x_501; 
  x_497 = lean_ctor_get(x_438, 0);
  x_498 = lean_ctor_get(x_438, 1);
  lean_inc(x_498);
  lean_inc(x_497);
  lean_dec(x_438);
  x_499 = lean_ctor_get(x_497, 1);
  lean_inc(x_499);
  lean_dec(x_497);
  x_500 = lean_ctor_get(x_499, 0);
  lean_inc(x_500);
  lean_dec(x_499);
  x_501 = l_Std_PersistentHashMap_find_x3f___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__1(x_500, x_2);
  if (lean_obj_tag(x_501) == 0)
  {
  lean_object* x_502; lean_object* x_503; 
  x_502 = l___private_Lean_Meta_InferType_0__Lean_Meta_inferLambdaType___closed__1;
  lean_inc(x_6);
  lean_inc(x_4);
  lean_inc(x_2);
  x_503 = l_Lean_Meta_lambdaLetTelescope___at___private_Lean_Meta_InferType_0__Lean_Meta_inferLambdaType___spec__1___rarg(x_2, x_502, x_3, x_4, x_5, x_6, x_498);
  if (lean_obj_tag(x_503) == 0)
  {
  lean_object* x_504; lean_object* x_505; lean_object* x_506; lean_object* x_507; lean_object* x_508; lean_object* x_509; lean_object* x_510; lean_object* x_511; lean_object* x_512; lean_object* x_513; lean_object* x_514; lean_object* x_515; lean_object* x_516; lean_object* x_517; lean_object* x_518; lean_object* x_519; lean_object* x_520; lean_object* x_521; lean_object* x_522; lean_object* x_523; lean_object* x_524; lean_object* x_525; lean_object* x_526; lean_object* x_527; lean_object* x_528; 
  x_504 = lean_ctor_get(x_503, 0);
  lean_inc(x_504);
  x_505 = lean_ctor_get(x_503, 1);
  lean_inc(x_505);
  lean_dec(x_503);
  x_506 = lean_st_ref_get(x_6, x_505);
  lean_dec(x_6);
  x_507 = lean_ctor_get(x_506, 1);
  lean_inc(x_507);
  lean_dec(x_506);
  x_508 = lean_st_ref_take(x_4, x_507);
  x_509 = lean_ctor_get(x_508, 0);
  lean_inc(x_509);
  x_510 = lean_ctor_get(x_509, 1);
  lean_inc(x_510);
  x_511 = lean_ctor_get(x_508, 1);
  lean_inc(x_511);
  lean_dec(x_508);
  x_512 = lean_ctor_get(x_509, 0);
  lean_inc(x_512);
  x_513 = lean_ctor_get(x_509, 2);
  lean_inc(x_513);
  x_514 = lean_ctor_get(x_509, 3);
  lean_inc(x_514);
  if (lean_is_exclusive(x_509)) {
   lean_ctor_release(x_509, 0);
   lean_ctor_release(x_509, 1);
   lean_ctor_release(x_509, 2);
   lean_ctor_release(x_509, 3);
   x_515 = x_509;
  } else {
   lean_dec_ref(x_509);
   x_515 = lean_box(0);
  }
  x_516 = lean_ctor_get(x_510, 0);
  lean_inc(x_516);
  x_517 = lean_ctor_get(x_510, 1);
  lean_inc(x_517);
  x_518 = lean_ctor_get(x_510, 2);
  lean_inc(x_518);
  x_519 = lean_ctor_get(x_510, 3);
  lean_inc(x_519);
  x_520 = lean_ctor_get(x_510, 4);
  lean_inc(x_520);
  if (lean_is_exclusive(x_510)) {
   lean_ctor_release(x_510, 0);
   lean_ctor_release(x_510, 1);
   lean_ctor_release(x_510, 2);
   lean_ctor_release(x_510, 3);
   lean_ctor_release(x_510, 4);
   x_521 = x_510;
  } else {
   lean_dec_ref(x_510);
   x_521 = lean_box(0);
  }
  lean_inc(x_504);
  x_522 = l_Std_PersistentHashMap_insert___at___private_Lean_Meta_InferType_0__Lean_Meta_checkInferTypeCache___spec__4(x_516, x_2, x_504);
  if (lean_is_scalar(x_521)) {
   x_523 = lean_alloc_ctor(0, 5, 0);
  } else {
   x_523 = x_521;
  }
  lean_ctor_set(x_523, 0, x_522);
  lean_ctor_set(x_523, 1, x_517);
  lean_ctor_set(x_523, 2, x_518);
  lean_ctor_set(x_523, 3, x_519);
  lean_ctor_set(x_523, 4, x_520);
  if (lean_is_scalar(x_515)) {
   x_524 = lean_alloc_ctor(0, 4, 0);
  } else {
   x_524 = x_515;
  }
  lean_ctor_set(x_524, 0, x_512);
  lean_ctor_set(x_524, 1, x_523);
  lean_ctor_set(x_524, 2, x_513);
  lean_ctor_set(x_524, 3, x_514);
  x_525 = lean_st_ref_set(x_4, x_524, x_511);
  lean_dec(x_4);
  x_526 = lean_ctor_get(x_525, 1);
  lean_inc(x_526);
  if (lean_is_exclusive(x_525)) {
   lean_ctor_release(x_525, 0);
   lean_ctor_release(x_525, 1);
   x_527 = x_525;
  } else {
   lean_dec_ref(x_525);
   x_527 = lean_box(0);
  }
  if (lean_is_scalar(x_527)) {
   x_528 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_528 = x_527;
  }
  lean_ctor_set(x_528, 0, x_504);
  lean_ctor_set(x_528, 1, x_526);
  return x_528;
  }
  else
  {
  lean_object* x_529; lean_object* x_530; lean_object* x_531; lean_object* x_532; 
  lean_dec(x_6);
  lean_dec(x_4);
  lean_dec(x_2);
  x_529 = lean_ctor_get(x_503, 0);
  lean_inc(x_529);
  x_530 = lean_ctor_get(x_503, 1);
  lean_inc(x_530);
  if (lean_is_exclusive(x_503)) {
   lean_ctor_release(x_503, 0);
   lean_ctor_release(x_503, 1);
   x_531 = x_503;
  } else {
   lean_dec_ref(x_503);
   x_531 = lean_box(0);
  }
  if (lean_is_scalar(x_531)) {
   x_532 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_532 = x_531;
  }
  lean_ctor_set(x_532, 0, x_529);
  lean_ctor_set(x_532, 1, x_530);
  return x_532;
  }
  }
  else
  {
  lean_object* x_533; lean_object* x_534; 
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_533 = lean_ctor_get(x_501, 0);
  lean_inc(x_533);
  lean_dec(x_501);
  x_534 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_534, 0, x_533);
  lean_ctor_set(x_534, 1, x_498);
  return x_534;
  }
  }
  }
  }
  }
  }
  lean_object* l_Lean_Meta_inferTypeImp(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
  _start:
  {
  uint8_t x_7; 
  x_7 = !lean_is_exclusive(x_2);
  if (x_7 == 0)
  {
  lean_object* x_8; uint8_t x_9; 
  x_8 = lean_ctor_get(x_2, 0);
  x_9 = !lean_is_exclusive(x_8);
  if (x_9 == 0)
  {
  uint8_t x_10; lean_object* x_11; 
  x_10 = 1;
  lean_ctor_set_uint8(x_8, 5, x_10);
  lean_inc(x_1);
  x_11 = l_Lean_Meta_inferTypeImp_infer(x_1, x_1, x_2, x_3, x_4, x_5, x_6);
  if (lean_obj_tag(x_11) == 0)
  {
  uint8_t x_12; 
  x_12 = !lean_is_exclusive(x_11);
  if (x_12 == 0)
  {
  return x_11;
  }
  else
  {
  lean_object* x_13; lean_object* x_14; lean_object* x_15; 
  x_13 = lean_ctor_get(x_11, 0);
  x_14 = lean_ctor_get(x_11, 1);
  lean_inc(x_14);
  lean_inc(x_13);
  lean_dec(x_11);
  x_15 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_15, 0, x_13);
  lean_ctor_set(x_15, 1, x_14);
  return x_15;
  }
  }
  else
  {
  uint8_t x_16; 
  x_16 = !lean_is_exclusive(x_11);
  if (x_16 == 0)
  {
  return x_11;
  }
  else
  {
  lean_object* x_17; lean_object* x_18; lean_object* x_19; 
  x_17 = lean_ctor_get(x_11, 0);
  x_18 = lean_ctor_get(x_11, 1);
  lean_inc(x_18);
  lean_inc(x_17);
  lean_dec(x_11);
  x_19 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_19, 0, x_17);
  lean_ctor_set(x_19, 1, x_18);
  return x_19;
  }
  }
  }
  else
  {
  uint8_t x_20; uint8_t x_21; uint8_t x_22; uint8_t x_23; uint8_t x_24; uint8_t x_25; uint8_t x_26; uint8_t x_27; uint8_t x_28; lean_object* x_29; lean_object* x_30; 
  x_20 = lean_ctor_get_uint8(x_8, 0);
  x_21 = lean_ctor_get_uint8(x_8, 1);
  x_22 = lean_ctor_get_uint8(x_8, 2);
  x_23 = lean_ctor_get_uint8(x_8, 3);
  x_24 = lean_ctor_get_uint8(x_8, 4);
  x_25 = lean_ctor_get_uint8(x_8, 6);
  x_26 = lean_ctor_get_uint8(x_8, 7);
  x_27 = lean_ctor_get_uint8(x_8, 8);
  lean_dec(x_8);
  x_28 = 1;
  x_29 = lean_alloc_ctor(0, 0, 9);
  lean_ctor_set_uint8(x_29, 0, x_20);
  lean_ctor_set_uint8(x_29, 1, x_21);
  lean_ctor_set_uint8(x_29, 2, x_22);
  lean_ctor_set_uint8(x_29, 3, x_23);
  lean_ctor_set_uint8(x_29, 4, x_24);
  lean_ctor_set_uint8(x_29, 5, x_28);
  lean_ctor_set_uint8(x_29, 6, x_25);
  lean_ctor_set_uint8(x_29, 7, x_26);
  lean_ctor_set_uint8(x_29, 8, x_27);
  lean_ctor_set(x_2, 0, x_29);
  lean_inc(x_1);
  x_30 = l_Lean_Meta_inferTypeImp_infer(x_1, x_1, x_2, x_3, x_4, x_5, x_6);
  if (lean_obj_tag(x_30) == 0)
  {
  lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; 
  x_31 = lean_ctor_get(x_30, 0);
  lean_inc(x_31);
  x_32 = lean_ctor_get(x_30, 1);
  lean_inc(x_32);
  if (lean_is_exclusive(x_30)) {
   lean_ctor_release(x_30, 0);
   lean_ctor_release(x_30, 1);
   x_33 = x_30;
  } else {
   lean_dec_ref(x_30);
   x_33 = lean_box(0);
  }
  if (lean_is_scalar(x_33)) {
   x_34 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_34 = x_33;
  }
  lean_ctor_set(x_34, 0, x_31);
  lean_ctor_set(x_34, 1, x_32);
  return x_34;
  }
  else
  {
  lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; 
  x_35 = lean_ctor_get(x_30, 0);
  lean_inc(x_35);
  x_36 = lean_ctor_get(x_30, 1);
  lean_inc(x_36);
  if (lean_is_exclusive(x_30)) {
   lean_ctor_release(x_30, 0);
   lean_ctor_release(x_30, 1);
   x_37 = x_30;
  } else {
   lean_dec_ref(x_30);
   x_37 = lean_box(0);
  }
  if (lean_is_scalar(x_37)) {
   x_38 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_38 = x_37;
  }
  lean_ctor_set(x_38, 0, x_35);
  lean_ctor_set(x_38, 1, x_36);
  return x_38;
  }
  }
  }
  else
  {
  lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* 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; lean_object* x_51; uint8_t x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; 
  x_39 = lean_ctor_get(x_2, 0);
  x_40 = lean_ctor_get(x_2, 1);
  x_41 = lean_ctor_get(x_2, 2);
  x_42 = lean_ctor_get(x_2, 3);
  lean_inc(x_42);
  lean_inc(x_41);
  lean_inc(x_40);
  lean_inc(x_39);
  lean_dec(x_2);
  x_43 = lean_ctor_get_uint8(x_39, 0);
  x_44 = lean_ctor_get_uint8(x_39, 1);
  x_45 = lean_ctor_get_uint8(x_39, 2);
  x_46 = lean_ctor_get_uint8(x_39, 3);
  x_47 = lean_ctor_get_uint8(x_39, 4);
  x_48 = lean_ctor_get_uint8(x_39, 6);
  x_49 = lean_ctor_get_uint8(x_39, 7);
  x_50 = lean_ctor_get_uint8(x_39, 8);
  if (lean_is_exclusive(x_39)) {
   x_51 = x_39;
  } else {
   lean_dec_ref(x_39);
   x_51 = lean_box(0);
  }
  x_52 = 1;
  if (lean_is_scalar(x_51)) {
   x_53 = lean_alloc_ctor(0, 0, 9);
  } else {
   x_53 = x_51;
  }
  lean_ctor_set_uint8(x_53, 0, x_43);
  lean_ctor_set_uint8(x_53, 1, x_44);
  lean_ctor_set_uint8(x_53, 2, x_45);
  lean_ctor_set_uint8(x_53, 3, x_46);
  lean_ctor_set_uint8(x_53, 4, x_47);
  lean_ctor_set_uint8(x_53, 5, x_52);
  lean_ctor_set_uint8(x_53, 6, x_48);
  lean_ctor_set_uint8(x_53, 7, x_49);
  lean_ctor_set_uint8(x_53, 8, x_50);
  x_54 = lean_alloc_ctor(0, 4, 0);
  lean_ctor_set(x_54, 0, x_53);
  lean_ctor_set(x_54, 1, x_40);
  lean_ctor_set(x_54, 2, x_41);
  lean_ctor_set(x_54, 3, x_42);
  lean_inc(x_1);
  x_55 = l_Lean_Meta_inferTypeImp_infer(x_1, x_1, x_54, x_3, x_4, x_5, x_6);
  if (lean_obj_tag(x_55) == 0)
  {
  lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; 
  x_56 = lean_ctor_get(x_55, 0);
  lean_inc(x_56);
  x_57 = lean_ctor_get(x_55, 1);
  lean_inc(x_57);
  if (lean_is_exclusive(x_55)) {
   lean_ctor_release(x_55, 0);
   lean_ctor_release(x_55, 1);
   x_58 = x_55;
  } else {
   lean_dec_ref(x_55);
   x_58 = lean_box(0);
  }
  if (lean_is_scalar(x_58)) {
   x_59 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_59 = x_58;
  }
  lean_ctor_set(x_59, 0, x_56);
  lean_ctor_set(x_59, 1, x_57);
  return x_59;
  }
  else
  {
  lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; 
  x_60 = lean_ctor_get(x_55, 0);
  lean_inc(x_60);
  x_61 = lean_ctor_get(x_55, 1);
  lean_inc(x_61);
  if (lean_is_exclusive(x_55)) {
   lean_ctor_release(x_55, 0);
   lean_ctor_release(x_55, 1);
   x_62 = x_55;
  } else {
   lean_dec_ref(x_55);
   x_62 = lean_box(0);
  }
  if (lean_is_scalar(x_62)) {
   x_63 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_63 = x_62;
  }
  lean_ctor_set(x_63, 0, x_60);
  lean_ctor_set(x_63, 1, x_61);
  return x_63;
  }
  }
  }
  }
  static lean_object* _init_l_Lean_Meta_setInferTypeRef___closed__1() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_alloc_closure((void*)(l_Lean_Meta_inferTypeImp), 6, 0);
  return x_1;
  }
  }
  lean_object* l_Lean_Meta_setInferTypeRef(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; lean_object* x_3; lean_object* x_4; uint8_t x_5; 
  x_2 = l_Lean_Meta_inferTypeRef;
  x_3 = l_Lean_Meta_setInferTypeRef___closed__1;
  x_4 = lean_st_ref_set(x_2, x_3, x_1);
  x_5 = !lean_is_exclusive(x_4);
  if (x_5 == 0)
  {
  return x_4;
  }
  else
  {
  lean_object* x_6; lean_object* x_7; lean_object* x_8; 
  x_6 = lean_ctor_get(x_4, 0);
  x_7 = lean_ctor_get(x_4, 1);
  lean_inc(x_7);
  lean_inc(x_6);
  lean_dec(x_4);
  x_8 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_8, 0, x_6);
  lean_ctor_set(x_8, 1, x_7);
  return x_8;
  }
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_isAlwaysZero_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
  _start:
  {
  switch (lean_obj_tag(x_1)) {
  case 0:
  {
  uint64_t x_8; lean_object* x_9; lean_object* x_10; 
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  x_8 = lean_ctor_get_uint64(x_1, 0);
  lean_dec(x_1);
  x_9 = lean_box_uint64(x_8);
  x_10 = lean_apply_1(x_2, x_9);
  return x_10;
  }
  case 1:
  {
  lean_object* x_11; uint64_t x_12; lean_object* x_13; lean_object* x_14; 
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_11 = lean_ctor_get(x_1, 0);
  lean_inc(x_11);
  x_12 = lean_ctor_get_uint64(x_1, sizeof(void*)*1);
  lean_dec(x_1);
  x_13 = lean_box_uint64(x_12);
  x_14 = lean_apply_2(x_5, x_11, x_13);
  return x_14;
  }
  case 2:
  {
  lean_object* x_15; lean_object* x_16; uint64_t x_17; lean_object* x_18; lean_object* x_19; 
  lean_dec(x_7);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_15 = lean_ctor_get(x_1, 0);
  lean_inc(x_15);
  x_16 = lean_ctor_get(x_1, 1);
  lean_inc(x_16);
  x_17 = lean_ctor_get_uint64(x_1, sizeof(void*)*2);
  lean_dec(x_1);
  x_18 = lean_box_uint64(x_17);
  x_19 = lean_apply_3(x_6, x_15, x_16, x_18);
  return x_19;
  }
  case 3:
  {
  lean_object* x_20; lean_object* x_21; uint64_t x_22; lean_object* x_23; lean_object* x_24; 
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_20 = lean_ctor_get(x_1, 0);
  lean_inc(x_20);
  x_21 = lean_ctor_get(x_1, 1);
  lean_inc(x_21);
  x_22 = lean_ctor_get_uint64(x_1, sizeof(void*)*2);
  lean_dec(x_1);
  x_23 = lean_box_uint64(x_22);
  x_24 = lean_apply_3(x_7, x_20, x_21, x_23);
  return x_24;
  }
  case 4:
  {
  lean_object* x_25; uint64_t x_26; lean_object* x_27; lean_object* x_28; 
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_3);
  lean_dec(x_2);
  x_25 = lean_ctor_get(x_1, 0);
  lean_inc(x_25);
  x_26 = lean_ctor_get_uint64(x_1, sizeof(void*)*1);
  lean_dec(x_1);
  x_27 = lean_box_uint64(x_26);
  x_28 = lean_apply_2(x_4, x_25, x_27);
  return x_28;
  }
  default: 
  {
  lean_object* x_29; uint64_t x_30; lean_object* x_31; lean_object* x_32; 
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_2);
  x_29 = lean_ctor_get(x_1, 0);
  lean_inc(x_29);
  x_30 = lean_ctor_get_uint64(x_1, sizeof(void*)*1);
  lean_dec(x_1);
  x_31 = lean_box_uint64(x_30);
  x_32 = lean_apply_2(x_3, x_29, x_31);
  return x_32;
  }
  }
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_isAlwaysZero_match__1(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = lean_alloc_closure((void*)(l___private_Lean_Meta_InferType_0__Lean_Meta_isAlwaysZero_match__1___rarg), 7, 0);
  return x_2;
  }
  }
  uint8_t l___private_Lean_Meta_InferType_0__Lean_Meta_isAlwaysZero(lean_object* x_1) {
  _start:
  {
  switch (lean_obj_tag(x_1)) {
  case 0:
  {
  uint8_t x_2; 
  x_2 = 1;
  return x_2;
  }
  case 2:
  {
  lean_object* x_3; lean_object* x_4; uint8_t x_5; 
  x_3 = lean_ctor_get(x_1, 0);
  x_4 = lean_ctor_get(x_1, 1);
  x_5 = l___private_Lean_Meta_InferType_0__Lean_Meta_isAlwaysZero(x_3);
  if (x_5 == 0)
  {
  uint8_t x_6; 
  x_6 = 0;
  return x_6;
  }
  else
  {
  x_1 = x_4;
  goto _start;
  }
  }
  case 3:
  {
  lean_object* x_8; 
  x_8 = lean_ctor_get(x_1, 1);
  x_1 = x_8;
  goto _start;
  }
  default: 
  {
  uint8_t x_10; 
  x_10 = 0;
  return x_10;
  }
  }
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_isAlwaysZero___boxed(lean_object* x_1) {
  _start:
  {
  uint8_t x_2; lean_object* x_3; 
  x_2 = l___private_Lean_Meta_InferType_0__Lean_Meta_isAlwaysZero(x_1);
  lean_dec(x_1);
  x_3 = lean_box(x_2);
  return x_3;
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_isArrowProp_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
  _start:
  {
  switch (lean_obj_tag(x_1)) {
  case 3:
  {
  lean_object* x_9; uint64_t x_10; lean_object* x_11; uint8_t x_12; 
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  x_9 = lean_ctor_get(x_1, 0);
  lean_inc(x_9);
  x_10 = lean_ctor_get_uint64(x_1, sizeof(void*)*1);
  x_11 = lean_unsigned_to_nat(0u);
  x_12 = lean_nat_dec_eq(x_2, x_11);
  if (x_12 == 0)
  {
  lean_object* x_13; 
  lean_dec(x_9);
  lean_dec(x_3);
  x_13 = lean_apply_2(x_8, x_1, x_2);
  return x_13;
  }
  else
  {
  lean_object* x_14; lean_object* x_15; 
  lean_dec(x_8);
  lean_dec(x_2);
  lean_dec(x_1);
  x_14 = lean_box_uint64(x_10);
  x_15 = lean_apply_2(x_3, x_9, x_14);
  return x_15;
  }
  }
  case 7:
  {
  lean_object* x_16; lean_object* x_17; lean_object* x_18; uint64_t x_19; lean_object* x_20; uint8_t x_21; 
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_3);
  x_16 = lean_ctor_get(x_1, 0);
  lean_inc(x_16);
  x_17 = lean_ctor_get(x_1, 1);
  lean_inc(x_17);
  x_18 = lean_ctor_get(x_1, 2);
  lean_inc(x_18);
  x_19 = lean_ctor_get_uint64(x_1, sizeof(void*)*3);
  lean_dec(x_1);
  x_20 = lean_unsigned_to_nat(0u);
  x_21 = lean_nat_dec_eq(x_2, x_20);
  if (x_21 == 0)
  {
  lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; 
  lean_dec(x_4);
  x_22 = lean_unsigned_to_nat(1u);
  x_23 = lean_nat_sub(x_2, x_22);
  lean_dec(x_2);
  x_24 = lean_box_uint64(x_19);
  x_25 = lean_apply_5(x_5, x_16, x_17, x_18, x_24, x_23);
  return x_25;
  }
  else
  {
  lean_object* x_26; lean_object* x_27; 
  lean_dec(x_5);
  lean_dec(x_2);
  x_26 = lean_box_uint64(x_19);
  x_27 = lean_apply_4(x_4, x_16, x_17, x_18, x_26);
  return x_27;
  }
  }
  case 8:
  {
  lean_object* x_28; 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_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  x_28 = lean_ctor_get(x_1, 0);
  lean_inc(x_28);
  x_29 = lean_ctor_get(x_1, 1);
  lean_inc(x_29);
  x_30 = lean_ctor_get(x_1, 2);
  lean_inc(x_30);
  x_31 = lean_ctor_get(x_1, 3);
  lean_inc(x_31);
  x_32 = lean_ctor_get_uint64(x_1, sizeof(void*)*4);
  lean_dec(x_1);
  x_33 = lean_box_uint64(x_32);
  x_34 = lean_apply_6(x_6, x_28, x_29, x_30, x_31, x_33, x_2);
  return x_34;
  }
  case 10:
  {
  lean_object* x_35; lean_object* x_36; uint64_t x_37; lean_object* x_38; lean_object* x_39; 
  lean_dec(x_8);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  x_35 = lean_ctor_get(x_1, 0);
  lean_inc(x_35);
  x_36 = lean_ctor_get(x_1, 1);
  lean_inc(x_36);
  x_37 = lean_ctor_get_uint64(x_1, sizeof(void*)*2);
  lean_dec(x_1);
  x_38 = lean_box_uint64(x_37);
  x_39 = lean_apply_4(x_7, x_35, x_36, x_38, x_2);
  return x_39;
  }
  default: 
  {
  lean_object* x_40; 
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  x_40 = lean_apply_2(x_8, x_1, x_2);
  return x_40;
  }
  }
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_isArrowProp_match__1(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = lean_alloc_closure((void*)(l___private_Lean_Meta_InferType_0__Lean_Meta_isArrowProp_match__1___rarg), 8, 0);
  return x_2;
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_isArrowProp(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:
  {
  switch (lean_obj_tag(x_1)) {
  case 3:
  {
  lean_object* x_8; lean_object* x_9; uint8_t x_10; 
  x_8 = lean_ctor_get(x_1, 0);
  lean_inc(x_8);
  lean_dec(x_1);
  x_9 = lean_unsigned_to_nat(0u);
  x_10 = lean_nat_dec_eq(x_2, x_9);
  lean_dec(x_2);
  if (x_10 == 0)
  {
  uint8_t x_11; lean_object* x_12; lean_object* x_13; 
  lean_dec(x_8);
  x_11 = 2;
  x_12 = lean_box(x_11);
  x_13 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_13, 0, x_12);
  lean_ctor_set(x_13, 1, x_7);
  return x_13;
  }
  else
  {
  lean_object* x_14; uint8_t x_15; 
  x_14 = l_Lean_MetavarContext_instantiateLevelMVars___at_Lean_Meta_instantiateLevelMVars___spec__1(x_8, x_3, x_4, x_5, x_6, x_7);
  x_15 = !lean_is_exclusive(x_14);
  if (x_15 == 0)
  {
  lean_object* x_16; uint8_t x_17; uint8_t x_18; lean_object* x_19; 
  x_16 = lean_ctor_get(x_14, 0);
  x_17 = l___private_Lean_Meta_InferType_0__Lean_Meta_isAlwaysZero(x_16);
  lean_dec(x_16);
  x_18 = l_Bool_toLBool(x_17);
  x_19 = lean_box(x_18);
  lean_ctor_set(x_14, 0, x_19);
  return x_14;
  }
  else
  {
  lean_object* x_20; lean_object* x_21; uint8_t x_22; uint8_t x_23; lean_object* x_24; lean_object* x_25; 
  x_20 = lean_ctor_get(x_14, 0);
  x_21 = lean_ctor_get(x_14, 1);
  lean_inc(x_21);
  lean_inc(x_20);
  lean_dec(x_14);
  x_22 = l___private_Lean_Meta_InferType_0__Lean_Meta_isAlwaysZero(x_20);
  lean_dec(x_20);
  x_23 = l_Bool_toLBool(x_22);
  x_24 = lean_box(x_23);
  x_25 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_25, 0, x_24);
  lean_ctor_set(x_25, 1, x_21);
  return x_25;
  }
  }
  }
  case 7:
  {
  lean_object* x_26; lean_object* x_27; uint8_t x_28; 
  x_26 = lean_ctor_get(x_1, 2);
  lean_inc(x_26);
  lean_dec(x_1);
  x_27 = lean_unsigned_to_nat(0u);
  x_28 = lean_nat_dec_eq(x_2, x_27);
  if (x_28 == 0)
  {
  lean_object* x_29; lean_object* x_30; 
  x_29 = lean_unsigned_to_nat(1u);
  x_30 = lean_nat_sub(x_2, x_29);
  lean_dec(x_2);
  x_1 = x_26;
  x_2 = x_30;
  goto _start;
  }
  else
  {
  uint8_t x_32; lean_object* x_33; lean_object* x_34; 
  lean_dec(x_26);
  lean_dec(x_2);
  x_32 = 0;
  x_33 = lean_box(x_32);
  x_34 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_34, 0, x_33);
  lean_ctor_set(x_34, 1, x_7);
  return x_34;
  }
  }
  case 8:
  {
  lean_object* x_35; 
  x_35 = lean_ctor_get(x_1, 3);
  lean_inc(x_35);
  lean_dec(x_1);
  x_1 = x_35;
  goto _start;
  }
  case 10:
  {
  lean_object* x_37; 
  x_37 = lean_ctor_get(x_1, 1);
  lean_inc(x_37);
  lean_dec(x_1);
  x_1 = x_37;
  goto _start;
  }
  default: 
  {
  uint8_t x_39; lean_object* x_40; lean_object* x_41; 
  lean_dec(x_2);
  lean_dec(x_1);
  x_39 = 2;
  x_40 = lean_box(x_39);
  x_41 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_41, 0, x_40);
  lean_ctor_set(x_41, 1, x_7);
  return x_41;
  }
  }
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_isArrowProp___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
  _start:
  {
  lean_object* x_8; 
  x_8 = l___private_Lean_Meta_InferType_0__Lean_Meta_isArrowProp(x_1, 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);
  return x_8;
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_isPropQuickApp_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) {
  _start:
  {
  switch (lean_obj_tag(x_1)) {
  case 1:
  {
  lean_object* x_12; uint64_t x_13; lean_object* x_14; lean_object* x_15; 
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(x_9);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_3);
  x_12 = lean_ctor_get(x_1, 0);
  lean_inc(x_12);
  x_13 = lean_ctor_get_uint64(x_1, sizeof(void*)*1);
  lean_dec(x_1);
  x_14 = lean_box_uint64(x_13);
  x_15 = lean_apply_3(x_4, x_12, x_14, x_2);
  return x_15;
  }
  case 2:
  {
  lean_object* x_16; uint64_t x_17; lean_object* x_18; lean_object* x_19; 
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(x_9);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_4);
  lean_dec(x_3);
  x_16 = lean_ctor_get(x_1, 0);
  lean_inc(x_16);
  x_17 = lean_ctor_get_uint64(x_1, sizeof(void*)*1);
  lean_dec(x_1);
  x_18 = lean_box_uint64(x_17);
  x_19 = lean_apply_3(x_5, x_16, x_18, x_2);
  return x_19;
  }
  case 4:
  {
  lean_object* x_20; lean_object* x_21; uint64_t x_22; lean_object* x_23; lean_object* x_24; 
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(x_9);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  x_20 = lean_ctor_get(x_1, 0);
  lean_inc(x_20);
  x_21 = lean_ctor_get(x_1, 1);
  lean_inc(x_21);
  x_22 = lean_ctor_get_uint64(x_1, sizeof(void*)*2);
  lean_dec(x_1);
  x_23 = lean_box_uint64(x_22);
  x_24 = lean_apply_4(x_3, x_20, x_21, x_23, x_2);
  return x_24;
  }
  case 5:
  {
  lean_object* x_25; lean_object* x_26; uint64_t x_27; lean_object* x_28; lean_object* x_29; 
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(x_9);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  x_25 = lean_ctor_get(x_1, 0);
  lean_inc(x_25);
  x_26 = lean_ctor_get(x_1, 1);
  lean_inc(x_26);
  x_27 = lean_ctor_get_uint64(x_1, sizeof(void*)*2);
  lean_dec(x_1);
  x_28 = lean_box_uint64(x_27);
  x_29 = lean_apply_4(x_6, x_25, x_26, x_28, x_2);
  return x_29;
  }
  case 6:
  {
  lean_object* x_30; lean_object* x_31; lean_object* x_32; uint64_t x_33; lean_object* x_34; uint8_t x_35; 
  lean_dec(x_11);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  x_30 = lean_ctor_get(x_1, 0);
  lean_inc(x_30);
  x_31 = lean_ctor_get(x_1, 1);
  lean_inc(x_31);
  x_32 = lean_ctor_get(x_1, 2);
  lean_inc(x_32);
  x_33 = lean_ctor_get_uint64(x_1, sizeof(void*)*3);
  lean_dec(x_1);
  x_34 = lean_unsigned_to_nat(0u);
  x_35 = lean_nat_dec_eq(x_2, x_34);
  if (x_35 == 0)
  {
  lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; 
  lean_dec(x_9);
  x_36 = lean_unsigned_to_nat(1u);
  x_37 = lean_nat_sub(x_2, x_36);
  lean_dec(x_2);
  x_38 = lean_box_uint64(x_33);
  x_39 = lean_apply_5(x_10, x_30, x_31, x_32, x_38, x_37);
  return x_39;
  }
  else
  {
  lean_object* x_40; lean_object* x_41; 
  lean_dec(x_10);
  lean_dec(x_2);
  x_40 = lean_box_uint64(x_33);
  x_41 = lean_apply_4(x_9, x_30, x_31, x_32, x_40);
  return x_41;
  }
  }
  case 8:
  {
  lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; uint64_t x_46; lean_object* x_47; lean_object* x_48; 
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(x_9);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  x_42 = lean_ctor_get(x_1, 0);
  lean_inc(x_42);
  x_43 = lean_ctor_get(x_1, 1);
  lean_inc(x_43);
  x_44 = lean_ctor_get(x_1, 2);
  lean_inc(x_44);
  x_45 = lean_ctor_get(x_1, 3);
  lean_inc(x_45);
  x_46 = lean_ctor_get_uint64(x_1, sizeof(void*)*4);
  lean_dec(x_1);
  x_47 = lean_box_uint64(x_46);
  x_48 = lean_apply_6(x_8, x_42, x_43, x_44, x_45, x_47, x_2);
  return x_48;
  }
  case 10:
  {
  lean_object* x_49; lean_object* x_50; uint64_t x_51; lean_object* x_52; lean_object* x_53; 
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(x_9);
  lean_dec(x_8);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  x_49 = lean_ctor_get(x_1, 0);
  lean_inc(x_49);
  x_50 = lean_ctor_get(x_1, 1);
  lean_inc(x_50);
  x_51 = lean_ctor_get_uint64(x_1, sizeof(void*)*2);
  lean_dec(x_1);
  x_52 = lean_box_uint64(x_51);
  x_53 = lean_apply_4(x_7, x_49, x_50, x_52, x_2);
  return x_53;
  }
  default: 
  {
  lean_object* x_54; 
  lean_dec(x_10);
  lean_dec(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_3);
  x_54 = lean_apply_2(x_11, x_1, x_2);
  return x_54;
  }
  }
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_isPropQuickApp_match__1(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = lean_alloc_closure((void*)(l___private_Lean_Meta_InferType_0__Lean_Meta_isPropQuickApp_match__1___rarg), 11, 0);
  return x_2;
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_isPropQuickApp(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:
  {
  switch (lean_obj_tag(x_1)) {
  case 1:
  {
  lean_object* x_8; lean_object* x_9; 
  x_8 = lean_ctor_get(x_1, 0);
  lean_inc(x_8);
  lean_dec(x_1);
  lean_inc(x_3);
  x_9 = l___private_Lean_Meta_InferType_0__Lean_Meta_inferFVarType(x_8, x_3, x_4, x_5, x_6, x_7);
  if (lean_obj_tag(x_9) == 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);
  x_12 = l___private_Lean_Meta_InferType_0__Lean_Meta_isArrowProp(x_10, x_2, x_3, x_4, x_5, x_6, x_11);
  lean_dec(x_3);
  return x_12;
  }
  else
  {
  uint8_t x_13; 
  lean_dec(x_3);
  lean_dec(x_2);
  x_13 = !lean_is_exclusive(x_9);
  if (x_13 == 0)
  {
  return x_9;
  }
  else
  {
  lean_object* x_14; lean_object* x_15; lean_object* x_16; 
  x_14 = lean_ctor_get(x_9, 0);
  x_15 = lean_ctor_get(x_9, 1);
  lean_inc(x_15);
  lean_inc(x_14);
  lean_dec(x_9);
  x_16 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_16, 0, x_14);
  lean_ctor_set(x_16, 1, x_15);
  return x_16;
  }
  }
  }
  case 2:
  {
  lean_object* x_17; lean_object* x_18; 
  x_17 = lean_ctor_get(x_1, 0);
  lean_inc(x_17);
  lean_dec(x_1);
  x_18 = l___private_Lean_Meta_InferType_0__Lean_Meta_inferMVarType(x_17, x_3, x_4, x_5, x_6, x_7);
  if (lean_obj_tag(x_18) == 0)
  {
  lean_object* x_19; lean_object* x_20; lean_object* x_21; 
  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 = l___private_Lean_Meta_InferType_0__Lean_Meta_isArrowProp(x_19, x_2, x_3, x_4, x_5, x_6, x_20);
  lean_dec(x_3);
  return x_21;
  }
  else
  {
  uint8_t x_22; 
  lean_dec(x_3);
  lean_dec(x_2);
  x_22 = !lean_is_exclusive(x_18);
  if (x_22 == 0)
  {
  return x_18;
  }
  else
  {
  lean_object* x_23; lean_object* x_24; lean_object* x_25; 
  x_23 = lean_ctor_get(x_18, 0);
  x_24 = lean_ctor_get(x_18, 1);
  lean_inc(x_24);
  lean_inc(x_23);
  lean_dec(x_18);
  x_25 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_25, 0, x_23);
  lean_ctor_set(x_25, 1, x_24);
  return x_25;
  }
  }
  }
  case 4:
  {
  lean_object* x_26; lean_object* x_27; lean_object* x_28; 
  x_26 = lean_ctor_get(x_1, 0);
  lean_inc(x_26);
  x_27 = lean_ctor_get(x_1, 1);
  lean_inc(x_27);
  lean_dec(x_1);
  x_28 = l___private_Lean_Meta_InferType_0__Lean_Meta_inferConstType(x_26, x_27, x_3, x_4, x_5, x_6, x_7);
  if (lean_obj_tag(x_28) == 0)
  {
  lean_object* x_29; lean_object* x_30; lean_object* x_31; 
  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___private_Lean_Meta_InferType_0__Lean_Meta_isArrowProp(x_29, x_2, x_3, x_4, x_5, x_6, x_30);
  lean_dec(x_3);
  return x_31;
  }
  else
  {
  uint8_t x_32; 
  lean_dec(x_3);
  lean_dec(x_2);
  x_32 = !lean_is_exclusive(x_28);
  if (x_32 == 0)
  {
  return x_28;
  }
  else
  {
  lean_object* x_33; lean_object* x_34; lean_object* x_35; 
  x_33 = lean_ctor_get(x_28, 0);
  x_34 = lean_ctor_get(x_28, 1);
  lean_inc(x_34);
  lean_inc(x_33);
  lean_dec(x_28);
  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;
  }
  }
  }
  case 5:
  {
  lean_object* x_36; lean_object* x_37; lean_object* x_38; 
  x_36 = lean_ctor_get(x_1, 0);
  lean_inc(x_36);
  lean_dec(x_1);
  x_37 = lean_unsigned_to_nat(1u);
  x_38 = lean_nat_add(x_2, x_37);
  lean_dec(x_2);
  x_1 = x_36;
  x_2 = x_38;
  goto _start;
  }
  case 6:
  {
  lean_object* x_40; lean_object* x_41; uint8_t x_42; 
  x_40 = lean_ctor_get(x_1, 2);
  lean_inc(x_40);
  lean_dec(x_1);
  x_41 = lean_unsigned_to_nat(0u);
  x_42 = lean_nat_dec_eq(x_2, x_41);
  if (x_42 == 0)
  {
  lean_object* x_43; lean_object* x_44; 
  x_43 = lean_unsigned_to_nat(1u);
  x_44 = lean_nat_sub(x_2, x_43);
  lean_dec(x_2);
  x_1 = x_40;
  x_2 = x_44;
  goto _start;
  }
  else
  {
  uint8_t x_46; lean_object* x_47; lean_object* x_48; 
  lean_dec(x_40);
  lean_dec(x_3);
  lean_dec(x_2);
  x_46 = 0;
  x_47 = lean_box(x_46);
  x_48 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_48, 0, x_47);
  lean_ctor_set(x_48, 1, x_7);
  return x_48;
  }
  }
  case 8:
  {
  lean_object* x_49; 
  x_49 = lean_ctor_get(x_1, 3);
  lean_inc(x_49);
  lean_dec(x_1);
  x_1 = x_49;
  goto _start;
  }
  case 10:
  {
  lean_object* x_51; 
  x_51 = lean_ctor_get(x_1, 1);
  lean_inc(x_51);
  lean_dec(x_1);
  x_1 = x_51;
  goto _start;
  }
  default: 
  {
  uint8_t x_53; lean_object* x_54; lean_object* x_55; 
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_53 = 2;
  x_54 = lean_box(x_53);
  x_55 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_55, 0, x_54);
  lean_ctor_set(x_55, 1, x_7);
  return x_55;
  }
  }
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_isPropQuickApp___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
  _start:
  {
  lean_object* x_8; 
  x_8 = l___private_Lean_Meta_InferType_0__Lean_Meta_isPropQuickApp(x_1, x_2, x_3, x_4, x_5, x_6, x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  return x_8;
  }
  }
  lean_object* l_Lean_Meta_isPropQuick_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, 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) {
  _start:
  {
  switch (lean_obj_tag(x_1)) {
  case 0:
  {
  lean_object* x_14; uint64_t x_15; lean_object* x_16; lean_object* x_17; 
  lean_dec(x_13);
  lean_dec(x_12);
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(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_3);
  x_14 = lean_ctor_get(x_1, 0);
  lean_inc(x_14);
  x_15 = lean_ctor_get_uint64(x_1, sizeof(void*)*1);
  lean_dec(x_1);
  x_16 = lean_box_uint64(x_15);
  x_17 = lean_apply_2(x_2, x_14, x_16);
  return x_17;
  }
  case 1:
  {
  lean_object* x_18; uint64_t x_19; lean_object* x_20; lean_object* x_21; 
  lean_dec(x_13);
  lean_dec(x_12);
  lean_dec(x_10);
  lean_dec(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_3);
  lean_dec(x_2);
  x_18 = lean_ctor_get(x_1, 0);
  lean_inc(x_18);
  x_19 = lean_ctor_get_uint64(x_1, sizeof(void*)*1);
  lean_dec(x_1);
  x_20 = lean_box_uint64(x_19);
  x_21 = lean_apply_2(x_11, x_18, x_20);
  return x_21;
  }
  case 2:
  {
  lean_object* x_22; uint64_t x_23; lean_object* x_24; lean_object* x_25; 
  lean_dec(x_13);
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(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_3);
  lean_dec(x_2);
  x_22 = lean_ctor_get(x_1, 0);
  lean_inc(x_22);
  x_23 = lean_ctor_get_uint64(x_1, sizeof(void*)*1);
  lean_dec(x_1);
  x_24 = lean_box_uint64(x_23);
  x_25 = lean_apply_2(x_12, x_22, x_24);
  return x_25;
  }
  case 3:
  {
  lean_object* x_26; uint64_t x_27; lean_object* x_28; lean_object* x_29; 
  lean_dec(x_13);
  lean_dec(x_12);
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(x_9);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_3);
  lean_dec(x_2);
  x_26 = lean_ctor_get(x_1, 0);
  lean_inc(x_26);
  x_27 = lean_ctor_get_uint64(x_1, sizeof(void*)*1);
  lean_dec(x_1);
  x_28 = lean_box_uint64(x_27);
  x_29 = lean_apply_2(x_4, x_26, x_28);
  return x_29;
  }
  case 4:
  {
  lean_object* x_30; lean_object* x_31; uint64_t x_32; lean_object* x_33; lean_object* x_34; 
  lean_dec(x_13);
  lean_dec(x_12);
  lean_dec(x_11);
  lean_dec(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_3);
  lean_dec(x_2);
  x_30 = lean_ctor_get(x_1, 0);
  lean_inc(x_30);
  x_31 = lean_ctor_get(x_1, 1);
  lean_inc(x_31);
  x_32 = lean_ctor_get_uint64(x_1, sizeof(void*)*2);
  lean_dec(x_1);
  x_33 = lean_box_uint64(x_32);
  x_34 = lean_apply_3(x_10, x_30, x_31, x_33);
  return x_34;
  }
  case 5:
  {
  lean_object* x_35; lean_object* x_36; uint64_t x_37; lean_object* x_38; lean_object* x_39; 
  lean_dec(x_12);
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(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_3);
  lean_dec(x_2);
  x_35 = lean_ctor_get(x_1, 0);
  lean_inc(x_35);
  x_36 = lean_ctor_get(x_1, 1);
  lean_inc(x_36);
  x_37 = lean_ctor_get_uint64(x_1, sizeof(void*)*2);
  lean_dec(x_1);
  x_38 = lean_box_uint64(x_37);
  x_39 = lean_apply_3(x_13, x_35, x_36, x_38);
  return x_39;
  }
  case 6:
  {
  lean_object* x_40; lean_object* x_41; lean_object* x_42; uint64_t x_43; lean_object* x_44; lean_object* x_45; 
  lean_dec(x_13);
  lean_dec(x_12);
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(x_9);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_40 = lean_ctor_get(x_1, 0);
  lean_inc(x_40);
  x_41 = lean_ctor_get(x_1, 1);
  lean_inc(x_41);
  x_42 = lean_ctor_get(x_1, 2);
  lean_inc(x_42);
  x_43 = lean_ctor_get_uint64(x_1, sizeof(void*)*3);
  lean_dec(x_1);
  x_44 = lean_box_uint64(x_43);
  x_45 = lean_apply_4(x_5, x_40, x_41, x_42, x_44);
  return x_45;
  }
  case 7:
  {
  lean_object* x_46; lean_object* x_47; lean_object* x_48; uint64_t x_49; lean_object* x_50; lean_object* x_51; 
  lean_dec(x_13);
  lean_dec(x_12);
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(x_9);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_46 = lean_ctor_get(x_1, 0);
  lean_inc(x_46);
  x_47 = lean_ctor_get(x_1, 1);
  lean_inc(x_47);
  x_48 = lean_ctor_get(x_1, 2);
  lean_inc(x_48);
  x_49 = lean_ctor_get_uint64(x_1, sizeof(void*)*3);
  lean_dec(x_1);
  x_50 = lean_box_uint64(x_49);
  x_51 = lean_apply_4(x_8, x_46, x_47, x_48, x_50);
  return x_51;
  }
  case 8:
  {
  lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; uint64_t x_56; lean_object* x_57; lean_object* x_58; 
  lean_dec(x_13);
  lean_dec(x_12);
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(x_9);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_52 = lean_ctor_get(x_1, 0);
  lean_inc(x_52);
  x_53 = lean_ctor_get(x_1, 1);
  lean_inc(x_53);
  x_54 = lean_ctor_get(x_1, 2);
  lean_inc(x_54);
  x_55 = lean_ctor_get(x_1, 3);
  lean_inc(x_55);
  x_56 = lean_ctor_get_uint64(x_1, sizeof(void*)*4);
  lean_dec(x_1);
  x_57 = lean_box_uint64(x_56);
  x_58 = lean_apply_5(x_6, x_52, x_53, x_54, x_55, x_57);
  return x_58;
  }
  case 9:
  {
  lean_object* x_59; uint64_t x_60; lean_object* x_61; lean_object* x_62; 
  lean_dec(x_13);
  lean_dec(x_12);
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(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);
  x_59 = lean_ctor_get(x_1, 0);
  lean_inc(x_59);
  x_60 = lean_ctor_get_uint64(x_1, sizeof(void*)*1);
  lean_dec(x_1);
  x_61 = lean_box_uint64(x_60);
  x_62 = lean_apply_2(x_3, x_59, x_61);
  return x_62;
  }
  case 10:
  {
  lean_object* x_63; lean_object* x_64; uint64_t x_65; lean_object* x_66; lean_object* x_67; 
  lean_dec(x_13);
  lean_dec(x_12);
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(x_8);
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_63 = lean_ctor_get(x_1, 0);
  lean_inc(x_63);
  x_64 = lean_ctor_get(x_1, 1);
  lean_inc(x_64);
  x_65 = lean_ctor_get_uint64(x_1, sizeof(void*)*2);
  lean_dec(x_1);
  x_66 = lean_box_uint64(x_65);
  x_67 = lean_apply_3(x_9, x_63, x_64, x_66);
  return x_67;
  }
  default: 
  {
  lean_object* x_68; lean_object* x_69; lean_object* x_70; uint64_t x_71; lean_object* x_72; lean_object* x_73; 
  lean_dec(x_13);
  lean_dec(x_12);
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(x_9);
  lean_dec(x_8);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  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_70 = lean_ctor_get(x_1, 2);
  lean_inc(x_70);
  x_71 = lean_ctor_get_uint64(x_1, sizeof(void*)*3);
  lean_dec(x_1);
  x_72 = lean_box_uint64(x_71);
  x_73 = lean_apply_4(x_7, x_68, x_69, x_70, x_72);
  return x_73;
  }
  }
  }
  }
  lean_object* l_Lean_Meta_isPropQuick_match__1(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = lean_alloc_closure((void*)(l_Lean_Meta_isPropQuick_match__1___rarg), 13, 0);
  return x_2;
  }
  }
  lean_object* l_Lean_Meta_isPropQuick(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:
  {
  switch (lean_obj_tag(x_1)) {
  case 0:
  {
  uint8_t x_7; lean_object* x_8; lean_object* x_9; 
  lean_dec(x_2);
  lean_dec(x_1);
  x_7 = 2;
  x_8 = lean_box(x_7);
  x_9 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_9, 0, x_8);
  lean_ctor_set(x_9, 1, x_6);
  return x_9;
  }
  case 1:
  {
  lean_object* x_10; lean_object* x_11; 
  x_10 = lean_ctor_get(x_1, 0);
  lean_inc(x_10);
  lean_dec(x_1);
  lean_inc(x_2);
  x_11 = l___private_Lean_Meta_InferType_0__Lean_Meta_inferFVarType(x_10, x_2, x_3, x_4, x_5, x_6);
  if (lean_obj_tag(x_11) == 0)
  {
  lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; 
  x_12 = lean_ctor_get(x_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_unsigned_to_nat(0u);
  x_15 = l___private_Lean_Meta_InferType_0__Lean_Meta_isArrowProp(x_12, x_14, x_2, x_3, x_4, x_5, x_13);
  lean_dec(x_2);
  return x_15;
  }
  else
  {
  uint8_t x_16; 
  lean_dec(x_2);
  x_16 = !lean_is_exclusive(x_11);
  if (x_16 == 0)
  {
  return x_11;
  }
  else
  {
  lean_object* x_17; lean_object* x_18; lean_object* x_19; 
  x_17 = lean_ctor_get(x_11, 0);
  x_18 = lean_ctor_get(x_11, 1);
  lean_inc(x_18);
  lean_inc(x_17);
  lean_dec(x_11);
  x_19 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_19, 0, x_17);
  lean_ctor_set(x_19, 1, x_18);
  return x_19;
  }
  }
  }
  case 2:
  {
  lean_object* x_20; lean_object* x_21; 
  x_20 = lean_ctor_get(x_1, 0);
  lean_inc(x_20);
  lean_dec(x_1);
  x_21 = l___private_Lean_Meta_InferType_0__Lean_Meta_inferMVarType(x_20, x_2, x_3, x_4, x_5, x_6);
  if (lean_obj_tag(x_21) == 0)
  {
  lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; 
  x_22 = lean_ctor_get(x_21, 0);
  lean_inc(x_22);
  x_23 = lean_ctor_get(x_21, 1);
  lean_inc(x_23);
  lean_dec(x_21);
  x_24 = lean_unsigned_to_nat(0u);
  x_25 = l___private_Lean_Meta_InferType_0__Lean_Meta_isArrowProp(x_22, x_24, x_2, x_3, x_4, x_5, x_23);
  lean_dec(x_2);
  return x_25;
  }
  else
  {
  uint8_t x_26; 
  lean_dec(x_2);
  x_26 = !lean_is_exclusive(x_21);
  if (x_26 == 0)
  {
  return x_21;
  }
  else
  {
  lean_object* x_27; lean_object* x_28; lean_object* x_29; 
  x_27 = lean_ctor_get(x_21, 0);
  x_28 = lean_ctor_get(x_21, 1);
  lean_inc(x_28);
  lean_inc(x_27);
  lean_dec(x_21);
  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;
  }
  }
  }
  case 4:
  {
  lean_object* x_30; lean_object* x_31; lean_object* x_32; 
  x_30 = lean_ctor_get(x_1, 0);
  lean_inc(x_30);
  x_31 = lean_ctor_get(x_1, 1);
  lean_inc(x_31);
  lean_dec(x_1);
  x_32 = l___private_Lean_Meta_InferType_0__Lean_Meta_inferConstType(x_30, x_31, x_2, x_3, x_4, x_5, x_6);
  if (lean_obj_tag(x_32) == 0)
  {
  lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; 
  x_33 = lean_ctor_get(x_32, 0);
  lean_inc(x_33);
  x_34 = lean_ctor_get(x_32, 1);
  lean_inc(x_34);
  lean_dec(x_32);
  x_35 = lean_unsigned_to_nat(0u);
  x_36 = l___private_Lean_Meta_InferType_0__Lean_Meta_isArrowProp(x_33, x_35, x_2, x_3, x_4, x_5, x_34);
  lean_dec(x_2);
  return x_36;
  }
  else
  {
  uint8_t x_37; 
  lean_dec(x_2);
  x_37 = !lean_is_exclusive(x_32);
  if (x_37 == 0)
  {
  return x_32;
  }
  else
  {
  lean_object* x_38; lean_object* x_39; lean_object* x_40; 
  x_38 = lean_ctor_get(x_32, 0);
  x_39 = lean_ctor_get(x_32, 1);
  lean_inc(x_39);
  lean_inc(x_38);
  lean_dec(x_32);
  x_40 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_40, 0, x_38);
  lean_ctor_set(x_40, 1, x_39);
  return x_40;
  }
  }
  }
  case 5:
  {
  lean_object* x_41; lean_object* x_42; lean_object* x_43; 
  x_41 = lean_ctor_get(x_1, 0);
  lean_inc(x_41);
  lean_dec(x_1);
  x_42 = lean_unsigned_to_nat(1u);
  x_43 = l___private_Lean_Meta_InferType_0__Lean_Meta_isPropQuickApp(x_41, x_42, x_2, x_3, x_4, x_5, x_6);
  return x_43;
  }
  case 7:
  {
  lean_object* x_44; 
  x_44 = lean_ctor_get(x_1, 2);
  lean_inc(x_44);
  lean_dec(x_1);
  x_1 = x_44;
  goto _start;
  }
  case 8:
  {
  lean_object* x_46; 
  x_46 = lean_ctor_get(x_1, 3);
  lean_inc(x_46);
  lean_dec(x_1);
  x_1 = x_46;
  goto _start;
  }
  case 10:
  {
  lean_object* x_48; 
  x_48 = lean_ctor_get(x_1, 1);
  lean_inc(x_48);
  lean_dec(x_1);
  x_1 = x_48;
  goto _start;
  }
  case 11:
  {
  uint8_t x_50; lean_object* x_51; lean_object* x_52; 
  lean_dec(x_2);
  lean_dec(x_1);
  x_50 = 2;
  x_51 = lean_box(x_50);
  x_52 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_52, 0, x_51);
  lean_ctor_set(x_52, 1, x_6);
  return x_52;
  }
  default: 
  {
  uint8_t x_53; lean_object* x_54; lean_object* x_55; 
  lean_dec(x_2);
  lean_dec(x_1);
  x_53 = 0;
  x_54 = lean_box(x_53);
  x_55 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_55, 0, x_54);
  lean_ctor_set(x_55, 1, x_6);
  return x_55;
  }
  }
  }
  }
  lean_object* l_Lean_Meta_isPropQuick___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_isPropQuick(x_1, x_2, x_3, x_4, x_5, x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  return x_7;
  }
  }
  lean_object* l_Lean_Meta_isProp_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
  _start:
  {
  if (lean_obj_tag(x_1) == 3)
  {
  lean_object* x_4; uint64_t x_5; lean_object* x_6; lean_object* x_7; 
  lean_dec(x_3);
  x_4 = lean_ctor_get(x_1, 0);
  lean_inc(x_4);
  x_5 = lean_ctor_get_uint64(x_1, sizeof(void*)*1);
  lean_dec(x_1);
  x_6 = lean_box_uint64(x_5);
  x_7 = lean_apply_2(x_2, x_4, x_6);
  return x_7;
  }
  else
  {
  lean_object* x_8; 
  lean_dec(x_2);
  x_8 = lean_apply_1(x_3, x_1);
  return x_8;
  }
  }
  }
  lean_object* l_Lean_Meta_isProp_match__1(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = lean_alloc_closure((void*)(l_Lean_Meta_isProp_match__1___rarg), 3, 0);
  return x_2;
  }
  }
  lean_object* l_Lean_Meta_isProp_match__2___rarg(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
  _start:
  {
  switch (x_1) {
  case 0:
  {
  lean_object* x_5; lean_object* x_6; 
  lean_dec(x_4);
  lean_dec(x_2);
  x_5 = lean_box(0);
  x_6 = lean_apply_1(x_3, x_5);
  return x_6;
  }
  case 1:
  {
  lean_object* x_7; lean_object* x_8; 
  lean_dec(x_4);
  lean_dec(x_3);
  x_7 = lean_box(0);
  x_8 = lean_apply_1(x_2, x_7);
  return x_8;
  }
  default: 
  {
  lean_object* x_9; lean_object* x_10; 
  lean_dec(x_3);
  lean_dec(x_2);
  x_9 = lean_box(0);
  x_10 = lean_apply_1(x_4, x_9);
  return x_10;
  }
  }
  }
  }
  lean_object* l_Lean_Meta_isProp_match__2(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = lean_alloc_closure((void*)(l_Lean_Meta_isProp_match__2___rarg___boxed), 4, 0);
  return x_2;
  }
  }
  lean_object* l_Lean_Meta_isProp_match__2___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
  _start:
  {
  uint8_t x_5; lean_object* x_6; 
  x_5 = lean_unbox(x_1);
  lean_dec(x_1);
  x_6 = l_Lean_Meta_isProp_match__2___rarg(x_5, x_2, x_3, x_4);
  return x_6;
  }
  }
  lean_object* l_Lean_Meta_isProp(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
  _start:
  {
  lean_object* x_7; 
  lean_inc(x_2);
  lean_inc(x_1);
  x_7 = l_Lean_Meta_isPropQuick(x_1, x_2, x_3, x_4, x_5, x_6);
  if (lean_obj_tag(x_7) == 0)
  {
  lean_object* x_8; uint8_t x_9; 
  x_8 = lean_ctor_get(x_7, 0);
  lean_inc(x_8);
  x_9 = lean_unbox(x_8);
  lean_dec(x_8);
  switch (x_9) {
  case 0:
  {
  uint8_t x_10; 
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_10 = !lean_is_exclusive(x_7);
  if (x_10 == 0)
  {
  lean_object* x_11; uint8_t x_12; lean_object* x_13; 
  x_11 = lean_ctor_get(x_7, 0);
  lean_dec(x_11);
  x_12 = 0;
  x_13 = lean_box(x_12);
  lean_ctor_set(x_7, 0, x_13);
  return x_7;
  }
  else
  {
  lean_object* x_14; uint8_t x_15; lean_object* x_16; lean_object* x_17; 
  x_14 = lean_ctor_get(x_7, 1);
  lean_inc(x_14);
  lean_dec(x_7);
  x_15 = 0;
  x_16 = lean_box(x_15);
  x_17 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_17, 0, x_16);
  lean_ctor_set(x_17, 1, x_14);
  return x_17;
  }
  }
  case 1:
  {
  uint8_t x_18; 
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_18 = !lean_is_exclusive(x_7);
  if (x_18 == 0)
  {
  lean_object* x_19; uint8_t x_20; lean_object* x_21; 
  x_19 = lean_ctor_get(x_7, 0);
  lean_dec(x_19);
  x_20 = 1;
  x_21 = lean_box(x_20);
  lean_ctor_set(x_7, 0, x_21);
  return x_7;
  }
  else
  {
  lean_object* x_22; uint8_t x_23; lean_object* x_24; lean_object* x_25; 
  x_22 = lean_ctor_get(x_7, 1);
  lean_inc(x_22);
  lean_dec(x_7);
  x_23 = 1;
  x_24 = lean_box(x_23);
  x_25 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_25, 0, x_24);
  lean_ctor_set(x_25, 1, x_22);
  return x_25;
  }
  }
  default: 
  {
  lean_object* x_26; lean_object* x_27; 
  x_26 = lean_ctor_get(x_7, 1);
  lean_inc(x_26);
  lean_dec(x_7);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_3);
  lean_inc(x_2);
  x_27 = l_Lean_Meta_inferType(x_1, x_2, x_3, x_4, x_5, x_26);
  if (lean_obj_tag(x_27) == 0)
  {
  lean_object* x_28; lean_object* x_29; lean_object* x_30; 
  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);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_3);
  lean_inc(x_2);
  x_30 = l_Lean_Meta_whnfD(x_28, x_2, x_3, x_4, x_5, x_29);
  if (lean_obj_tag(x_30) == 0)
  {
  lean_object* x_31; 
  x_31 = lean_ctor_get(x_30, 0);
  lean_inc(x_31);
  if (lean_obj_tag(x_31) == 3)
  {
  lean_object* x_32; lean_object* x_33; lean_object* x_34; uint8_t x_35; 
  x_32 = lean_ctor_get(x_30, 1);
  lean_inc(x_32);
  lean_dec(x_30);
  x_33 = lean_ctor_get(x_31, 0);
  lean_inc(x_33);
  lean_dec(x_31);
  x_34 = l_Lean_MetavarContext_instantiateLevelMVars___at_Lean_Meta_instantiateLevelMVars___spec__1(x_33, x_2, x_3, x_4, x_5, x_32);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_35 = !lean_is_exclusive(x_34);
  if (x_35 == 0)
  {
  lean_object* x_36; uint8_t x_37; lean_object* x_38; 
  x_36 = lean_ctor_get(x_34, 0);
  x_37 = l___private_Lean_Meta_InferType_0__Lean_Meta_isAlwaysZero(x_36);
  lean_dec(x_36);
  x_38 = lean_box(x_37);
  lean_ctor_set(x_34, 0, x_38);
  return x_34;
  }
  else
  {
  lean_object* x_39; lean_object* x_40; uint8_t x_41; lean_object* x_42; lean_object* x_43; 
  x_39 = lean_ctor_get(x_34, 0);
  x_40 = lean_ctor_get(x_34, 1);
  lean_inc(x_40);
  lean_inc(x_39);
  lean_dec(x_34);
  x_41 = l___private_Lean_Meta_InferType_0__Lean_Meta_isAlwaysZero(x_39);
  lean_dec(x_39);
  x_42 = lean_box(x_41);
  x_43 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_43, 0, x_42);
  lean_ctor_set(x_43, 1, x_40);
  return x_43;
  }
  }
  else
  {
  uint8_t x_44; 
  lean_dec(x_31);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_44 = !lean_is_exclusive(x_30);
  if (x_44 == 0)
  {
  lean_object* x_45; uint8_t x_46; lean_object* x_47; 
  x_45 = lean_ctor_get(x_30, 0);
  lean_dec(x_45);
  x_46 = 0;
  x_47 = lean_box(x_46);
  lean_ctor_set(x_30, 0, x_47);
  return x_30;
  }
  else
  {
  lean_object* x_48; uint8_t x_49; lean_object* x_50; lean_object* x_51; 
  x_48 = lean_ctor_get(x_30, 1);
  lean_inc(x_48);
  lean_dec(x_30);
  x_49 = 0;
  x_50 = lean_box(x_49);
  x_51 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_51, 0, x_50);
  lean_ctor_set(x_51, 1, x_48);
  return x_51;
  }
  }
  }
  else
  {
  uint8_t x_52; 
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_52 = !lean_is_exclusive(x_30);
  if (x_52 == 0)
  {
  return x_30;
  }
  else
  {
  lean_object* x_53; lean_object* x_54; lean_object* x_55; 
  x_53 = lean_ctor_get(x_30, 0);
  x_54 = lean_ctor_get(x_30, 1);
  lean_inc(x_54);
  lean_inc(x_53);
  lean_dec(x_30);
  x_55 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_55, 0, x_53);
  lean_ctor_set(x_55, 1, x_54);
  return x_55;
  }
  }
  }
  else
  {
  uint8_t x_56; 
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_56 = !lean_is_exclusive(x_27);
  if (x_56 == 0)
  {
  return x_27;
  }
  else
  {
  lean_object* x_57; lean_object* x_58; lean_object* x_59; 
  x_57 = lean_ctor_get(x_27, 0);
  x_58 = lean_ctor_get(x_27, 1);
  lean_inc(x_58);
  lean_inc(x_57);
  lean_dec(x_27);
  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
  {
  uint8_t x_60; 
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_60 = !lean_is_exclusive(x_7);
  if (x_60 == 0)
  {
  return x_7;
  }
  else
  {
  lean_object* x_61; lean_object* x_62; lean_object* x_63; 
  x_61 = lean_ctor_get(x_7, 0);
  x_62 = lean_ctor_get(x_7, 1);
  lean_inc(x_62);
  lean_inc(x_61);
  lean_dec(x_7);
  x_63 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_63, 0, x_61);
  lean_ctor_set(x_63, 1, x_62);
  return x_63;
  }
  }
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_isArrowProposition_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
  _start:
  {
  lean_object* x_8; 
  switch (lean_obj_tag(x_1)) {
  case 7:
  {
  lean_object* x_14; lean_object* x_15; lean_object* x_16; uint64_t x_17; lean_object* x_18; uint8_t x_19; 
  lean_dec(x_7);
  lean_dec(x_5);
  lean_dec(x_4);
  x_14 = lean_ctor_get(x_1, 0);
  lean_inc(x_14);
  x_15 = lean_ctor_get(x_1, 1);
  lean_inc(x_15);
  x_16 = lean_ctor_get(x_1, 2);
  lean_inc(x_16);
  x_17 = lean_ctor_get_uint64(x_1, sizeof(void*)*3);
  x_18 = lean_unsigned_to_nat(0u);
  x_19 = lean_nat_dec_eq(x_2, x_18);
  if (x_19 == 0)
  {
  lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; 
  lean_dec(x_6);
  lean_dec(x_1);
  x_20 = lean_unsigned_to_nat(1u);
  x_21 = lean_nat_sub(x_2, x_20);
  lean_dec(x_2);
  x_22 = lean_box_uint64(x_17);
  x_23 = lean_apply_5(x_3, x_14, x_15, x_16, x_22, x_21);
  return x_23;
  }
  else
  {
  lean_object* x_24; 
  lean_dec(x_16);
  lean_dec(x_15);
  lean_dec(x_14);
  lean_dec(x_3);
  lean_dec(x_2);
  x_24 = lean_apply_1(x_6, x_1);
  return x_24;
  }
  }
  case 8:
  {
  lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; uint64_t x_29; lean_object* x_30; uint8_t x_31; 
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_3);
  x_25 = lean_ctor_get(x_1, 0);
  lean_inc(x_25);
  x_26 = lean_ctor_get(x_1, 1);
  lean_inc(x_26);
  x_27 = lean_ctor_get(x_1, 2);
  lean_inc(x_27);
  x_28 = lean_ctor_get(x_1, 3);
  lean_inc(x_28);
  x_29 = lean_ctor_get_uint64(x_1, sizeof(void*)*4);
  lean_dec(x_1);
  x_30 = lean_unsigned_to_nat(0u);
  x_31 = lean_nat_dec_eq(x_2, x_30);
  if (x_31 == 0)
  {
  lean_object* x_32; lean_object* x_33; 
  x_32 = lean_box_uint64(x_29);
  x_33 = lean_apply_6(x_4, x_25, x_26, x_27, x_28, x_32, x_2);
  return x_33;
  }
  else
  {
  lean_object* x_34; lean_object* x_35; 
  lean_dec(x_2);
  x_34 = lean_box_uint64(x_29);
  x_35 = lean_apply_6(x_4, x_25, x_26, x_27, x_28, x_34, x_30);
  return x_35;
  }
  }
  case 10:
  {
  lean_object* x_36; lean_object* x_37; uint64_t x_38; lean_object* x_39; uint8_t x_40; 
  lean_dec(x_7);
  lean_dec(x_6);
  lean_dec(x_4);
  lean_dec(x_3);
  x_36 = lean_ctor_get(x_1, 0);
  lean_inc(x_36);
  x_37 = lean_ctor_get(x_1, 1);
  lean_inc(x_37);
  x_38 = lean_ctor_get_uint64(x_1, sizeof(void*)*2);
  lean_dec(x_1);
  x_39 = lean_unsigned_to_nat(0u);
  x_40 = lean_nat_dec_eq(x_2, x_39);
  if (x_40 == 0)
  {
  lean_object* x_41; lean_object* x_42; 
  x_41 = lean_box_uint64(x_38);
  x_42 = lean_apply_4(x_5, x_36, x_37, x_41, x_2);
  return x_42;
  }
  else
  {
  lean_object* x_43; lean_object* x_44; 
  lean_dec(x_2);
  x_43 = lean_box_uint64(x_38);
  x_44 = lean_apply_4(x_5, x_36, x_37, x_43, x_39);
  return x_44;
  }
  }
  default: 
  {
  lean_object* x_45; 
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  x_45 = lean_box(0);
  x_8 = x_45;
  goto block_13;
  }
  }
  block_13:
  {
  lean_object* x_9; uint8_t x_10; 
  lean_dec(x_8);
  x_9 = lean_unsigned_to_nat(0u);
  x_10 = lean_nat_dec_eq(x_2, x_9);
  if (x_10 == 0)
  {
  lean_object* x_11; 
  lean_dec(x_6);
  x_11 = lean_apply_2(x_7, x_1, x_2);
  return x_11;
  }
  else
  {
  lean_object* x_12; 
  lean_dec(x_7);
  lean_dec(x_2);
  x_12 = lean_apply_1(x_6, x_1);
  return x_12;
  }
  }
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_isArrowProposition_match__1(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = lean_alloc_closure((void*)(l___private_Lean_Meta_InferType_0__Lean_Meta_isArrowProposition_match__1___rarg), 7, 0);
  return x_2;
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_isArrowProposition(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
  _start:
  {
  lean_object* x_8; 
  switch (lean_obj_tag(x_1)) {
  case 7:
  {
  lean_object* x_16; lean_object* x_17; uint8_t x_18; 
  x_16 = lean_ctor_get(x_1, 2);
  lean_inc(x_16);
  x_17 = lean_unsigned_to_nat(0u);
  x_18 = lean_nat_dec_eq(x_2, x_17);
  if (x_18 == 0)
  {
  lean_object* x_19; lean_object* x_20; 
  lean_dec(x_1);
  x_19 = lean_unsigned_to_nat(1u);
  x_20 = lean_nat_sub(x_2, x_19);
  lean_dec(x_2);
  x_1 = x_16;
  x_2 = x_20;
  goto _start;
  }
  else
  {
  lean_object* x_22; 
  lean_dec(x_16);
  lean_dec(x_2);
  x_22 = l_Lean_Meta_isPropQuick(x_1, x_3, x_4, x_5, x_6, x_7);
  return x_22;
  }
  }
  case 8:
  {
  lean_object* x_23; lean_object* x_24; uint8_t x_25; 
  x_23 = lean_ctor_get(x_1, 3);
  lean_inc(x_23);
  lean_dec(x_1);
  x_24 = lean_unsigned_to_nat(0u);
  x_25 = lean_nat_dec_eq(x_2, x_24);
  if (x_25 == 0)
  {
  x_1 = x_23;
  goto _start;
  }
  else
  {
  lean_dec(x_2);
  x_1 = x_23;
  x_2 = x_24;
  goto _start;
  }
  }
  case 10:
  {
  lean_object* x_28; lean_object* x_29; uint8_t x_30; 
  x_28 = lean_ctor_get(x_1, 1);
  lean_inc(x_28);
  lean_dec(x_1);
  x_29 = lean_unsigned_to_nat(0u);
  x_30 = lean_nat_dec_eq(x_2, x_29);
  if (x_30 == 0)
  {
  x_1 = x_28;
  goto _start;
  }
  else
  {
  lean_dec(x_2);
  x_1 = x_28;
  x_2 = x_29;
  goto _start;
  }
  }
  default: 
  {
  lean_object* x_33; 
  x_33 = lean_box(0);
  x_8 = x_33;
  goto block_15;
  }
  }
  block_15:
  {
  lean_object* x_9; uint8_t x_10; 
  lean_dec(x_8);
  x_9 = lean_unsigned_to_nat(0u);
  x_10 = lean_nat_dec_eq(x_2, x_9);
  lean_dec(x_2);
  if (x_10 == 0)
  {
  uint8_t x_11; lean_object* x_12; lean_object* x_13; 
  lean_dec(x_3);
  lean_dec(x_1);
  x_11 = 2;
  x_12 = lean_box(x_11);
  x_13 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_13, 0, x_12);
  lean_ctor_set(x_13, 1, x_7);
  return x_13;
  }
  else
  {
  lean_object* x_14; 
  x_14 = l_Lean_Meta_isPropQuick(x_1, x_3, x_4, x_5, x_6, x_7);
  return x_14;
  }
  }
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_isArrowProposition___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
  _start:
  {
  lean_object* x_8; 
  x_8 = l___private_Lean_Meta_InferType_0__Lean_Meta_isArrowProposition(x_1, x_2, x_3, x_4, x_5, x_6, x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  return x_8;
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_isProofQuickApp(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:
  {
  switch (lean_obj_tag(x_1)) {
  case 1:
  {
  lean_object* x_8; lean_object* x_9; 
  x_8 = lean_ctor_get(x_1, 0);
  lean_inc(x_8);
  lean_dec(x_1);
  lean_inc(x_3);
  x_9 = l___private_Lean_Meta_InferType_0__Lean_Meta_inferFVarType(x_8, x_3, x_4, x_5, x_6, x_7);
  if (lean_obj_tag(x_9) == 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);
  x_12 = l___private_Lean_Meta_InferType_0__Lean_Meta_isArrowProposition(x_10, x_2, x_3, x_4, x_5, x_6, x_11);
  return x_12;
  }
  else
  {
  uint8_t x_13; 
  lean_dec(x_3);
  lean_dec(x_2);
  x_13 = !lean_is_exclusive(x_9);
  if (x_13 == 0)
  {
  return x_9;
  }
  else
  {
  lean_object* x_14; lean_object* x_15; lean_object* x_16; 
  x_14 = lean_ctor_get(x_9, 0);
  x_15 = lean_ctor_get(x_9, 1);
  lean_inc(x_15);
  lean_inc(x_14);
  lean_dec(x_9);
  x_16 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_16, 0, x_14);
  lean_ctor_set(x_16, 1, x_15);
  return x_16;
  }
  }
  }
  case 2:
  {
  lean_object* x_17; lean_object* x_18; 
  x_17 = lean_ctor_get(x_1, 0);
  lean_inc(x_17);
  lean_dec(x_1);
  x_18 = l___private_Lean_Meta_InferType_0__Lean_Meta_inferMVarType(x_17, x_3, x_4, x_5, x_6, x_7);
  if (lean_obj_tag(x_18) == 0)
  {
  lean_object* x_19; lean_object* x_20; lean_object* x_21; 
  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 = l___private_Lean_Meta_InferType_0__Lean_Meta_isArrowProposition(x_19, x_2, x_3, x_4, x_5, x_6, x_20);
  return x_21;
  }
  else
  {
  uint8_t x_22; 
  lean_dec(x_3);
  lean_dec(x_2);
  x_22 = !lean_is_exclusive(x_18);
  if (x_22 == 0)
  {
  return x_18;
  }
  else
  {
  lean_object* x_23; lean_object* x_24; lean_object* x_25; 
  x_23 = lean_ctor_get(x_18, 0);
  x_24 = lean_ctor_get(x_18, 1);
  lean_inc(x_24);
  lean_inc(x_23);
  lean_dec(x_18);
  x_25 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_25, 0, x_23);
  lean_ctor_set(x_25, 1, x_24);
  return x_25;
  }
  }
  }
  case 4:
  {
  lean_object* x_26; lean_object* x_27; lean_object* x_28; 
  x_26 = lean_ctor_get(x_1, 0);
  lean_inc(x_26);
  x_27 = lean_ctor_get(x_1, 1);
  lean_inc(x_27);
  lean_dec(x_1);
  x_28 = l___private_Lean_Meta_InferType_0__Lean_Meta_inferConstType(x_26, x_27, x_3, x_4, x_5, x_6, x_7);
  if (lean_obj_tag(x_28) == 0)
  {
  lean_object* x_29; lean_object* x_30; lean_object* x_31; 
  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___private_Lean_Meta_InferType_0__Lean_Meta_isArrowProposition(x_29, x_2, x_3, x_4, x_5, x_6, x_30);
  return x_31;
  }
  else
  {
  uint8_t x_32; 
  lean_dec(x_3);
  lean_dec(x_2);
  x_32 = !lean_is_exclusive(x_28);
  if (x_32 == 0)
  {
  return x_28;
  }
  else
  {
  lean_object* x_33; lean_object* x_34; lean_object* x_35; 
  x_33 = lean_ctor_get(x_28, 0);
  x_34 = lean_ctor_get(x_28, 1);
  lean_inc(x_34);
  lean_inc(x_33);
  lean_dec(x_28);
  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;
  }
  }
  }
  case 5:
  {
  lean_object* x_36; lean_object* x_37; lean_object* x_38; 
  x_36 = lean_ctor_get(x_1, 0);
  lean_inc(x_36);
  lean_dec(x_1);
  x_37 = lean_unsigned_to_nat(1u);
  x_38 = lean_nat_add(x_2, x_37);
  lean_dec(x_2);
  x_1 = x_36;
  x_2 = x_38;
  goto _start;
  }
  case 6:
  {
  lean_object* x_40; lean_object* x_41; uint8_t x_42; 
  x_40 = lean_ctor_get(x_1, 2);
  lean_inc(x_40);
  lean_dec(x_1);
  x_41 = lean_unsigned_to_nat(0u);
  x_42 = lean_nat_dec_eq(x_2, x_41);
  if (x_42 == 0)
  {
  lean_object* x_43; lean_object* x_44; 
  x_43 = lean_unsigned_to_nat(1u);
  x_44 = lean_nat_sub(x_2, x_43);
  lean_dec(x_2);
  x_1 = x_40;
  x_2 = x_44;
  goto _start;
  }
  else
  {
  lean_object* x_46; 
  lean_dec(x_2);
  x_46 = l_Lean_Meta_isProofQuick(x_40, x_3, x_4, x_5, x_6, x_7);
  return x_46;
  }
  }
  case 8:
  {
  lean_object* x_47; 
  x_47 = lean_ctor_get(x_1, 3);
  lean_inc(x_47);
  lean_dec(x_1);
  x_1 = x_47;
  goto _start;
  }
  case 10:
  {
  lean_object* x_49; 
  x_49 = lean_ctor_get(x_1, 1);
  lean_inc(x_49);
  lean_dec(x_1);
  x_1 = x_49;
  goto _start;
  }
  default: 
  {
  uint8_t x_51; lean_object* x_52; lean_object* x_53; 
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_51 = 2;
  x_52 = lean_box(x_51);
  x_53 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_53, 0, x_52);
  lean_ctor_set(x_53, 1, x_7);
  return x_53;
  }
  }
  }
  }
  lean_object* l_Lean_Meta_isProofQuick(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:
  {
  switch (lean_obj_tag(x_1)) {
  case 0:
  {
  uint8_t x_7; lean_object* x_8; lean_object* x_9; 
  lean_dec(x_2);
  lean_dec(x_1);
  x_7 = 2;
  x_8 = lean_box(x_7);
  x_9 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_9, 0, x_8);
  lean_ctor_set(x_9, 1, x_6);
  return x_9;
  }
  case 1:
  {
  lean_object* x_10; lean_object* x_11; 
  x_10 = lean_ctor_get(x_1, 0);
  lean_inc(x_10);
  lean_dec(x_1);
  lean_inc(x_2);
  x_11 = l___private_Lean_Meta_InferType_0__Lean_Meta_inferFVarType(x_10, x_2, x_3, x_4, x_5, x_6);
  if (lean_obj_tag(x_11) == 0)
  {
  lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; 
  x_12 = lean_ctor_get(x_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_unsigned_to_nat(0u);
  x_15 = l___private_Lean_Meta_InferType_0__Lean_Meta_isArrowProposition(x_12, x_14, x_2, x_3, x_4, x_5, x_13);
  return x_15;
  }
  else
  {
  uint8_t x_16; 
  lean_dec(x_2);
  x_16 = !lean_is_exclusive(x_11);
  if (x_16 == 0)
  {
  return x_11;
  }
  else
  {
  lean_object* x_17; lean_object* x_18; lean_object* x_19; 
  x_17 = lean_ctor_get(x_11, 0);
  x_18 = lean_ctor_get(x_11, 1);
  lean_inc(x_18);
  lean_inc(x_17);
  lean_dec(x_11);
  x_19 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_19, 0, x_17);
  lean_ctor_set(x_19, 1, x_18);
  return x_19;
  }
  }
  }
  case 2:
  {
  lean_object* x_20; lean_object* x_21; 
  x_20 = lean_ctor_get(x_1, 0);
  lean_inc(x_20);
  lean_dec(x_1);
  x_21 = l___private_Lean_Meta_InferType_0__Lean_Meta_inferMVarType(x_20, x_2, x_3, x_4, x_5, x_6);
  if (lean_obj_tag(x_21) == 0)
  {
  lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; 
  x_22 = lean_ctor_get(x_21, 0);
  lean_inc(x_22);
  x_23 = lean_ctor_get(x_21, 1);
  lean_inc(x_23);
  lean_dec(x_21);
  x_24 = lean_unsigned_to_nat(0u);
  x_25 = l___private_Lean_Meta_InferType_0__Lean_Meta_isArrowProposition(x_22, x_24, x_2, x_3, x_4, x_5, x_23);
  return x_25;
  }
  else
  {
  uint8_t x_26; 
  lean_dec(x_2);
  x_26 = !lean_is_exclusive(x_21);
  if (x_26 == 0)
  {
  return x_21;
  }
  else
  {
  lean_object* x_27; lean_object* x_28; lean_object* x_29; 
  x_27 = lean_ctor_get(x_21, 0);
  x_28 = lean_ctor_get(x_21, 1);
  lean_inc(x_28);
  lean_inc(x_27);
  lean_dec(x_21);
  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;
  }
  }
  }
  case 4:
  {
  lean_object* x_30; lean_object* x_31; lean_object* x_32; 
  x_30 = lean_ctor_get(x_1, 0);
  lean_inc(x_30);
  x_31 = lean_ctor_get(x_1, 1);
  lean_inc(x_31);
  lean_dec(x_1);
  x_32 = l___private_Lean_Meta_InferType_0__Lean_Meta_inferConstType(x_30, x_31, x_2, x_3, x_4, x_5, x_6);
  if (lean_obj_tag(x_32) == 0)
  {
  lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; 
  x_33 = lean_ctor_get(x_32, 0);
  lean_inc(x_33);
  x_34 = lean_ctor_get(x_32, 1);
  lean_inc(x_34);
  lean_dec(x_32);
  x_35 = lean_unsigned_to_nat(0u);
  x_36 = l___private_Lean_Meta_InferType_0__Lean_Meta_isArrowProposition(x_33, x_35, x_2, x_3, x_4, x_5, x_34);
  return x_36;
  }
  else
  {
  uint8_t x_37; 
  lean_dec(x_2);
  x_37 = !lean_is_exclusive(x_32);
  if (x_37 == 0)
  {
  return x_32;
  }
  else
  {
  lean_object* x_38; lean_object* x_39; lean_object* x_40; 
  x_38 = lean_ctor_get(x_32, 0);
  x_39 = lean_ctor_get(x_32, 1);
  lean_inc(x_39);
  lean_inc(x_38);
  lean_dec(x_32);
  x_40 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_40, 0, x_38);
  lean_ctor_set(x_40, 1, x_39);
  return x_40;
  }
  }
  }
  case 5:
  {
  lean_object* x_41; lean_object* x_42; lean_object* x_43; 
  x_41 = lean_ctor_get(x_1, 0);
  lean_inc(x_41);
  lean_dec(x_1);
  x_42 = lean_unsigned_to_nat(1u);
  x_43 = l___private_Lean_Meta_InferType_0__Lean_Meta_isProofQuickApp(x_41, x_42, x_2, x_3, x_4, x_5, x_6);
  return x_43;
  }
  case 6:
  {
  lean_object* x_44; 
  x_44 = lean_ctor_get(x_1, 2);
  lean_inc(x_44);
  lean_dec(x_1);
  x_1 = x_44;
  goto _start;
  }
  case 8:
  {
  lean_object* x_46; 
  x_46 = lean_ctor_get(x_1, 3);
  lean_inc(x_46);
  lean_dec(x_1);
  x_1 = x_46;
  goto _start;
  }
  case 10:
  {
  lean_object* x_48; 
  x_48 = lean_ctor_get(x_1, 1);
  lean_inc(x_48);
  lean_dec(x_1);
  x_1 = x_48;
  goto _start;
  }
  case 11:
  {
  uint8_t x_50; lean_object* x_51; lean_object* x_52; 
  lean_dec(x_2);
  lean_dec(x_1);
  x_50 = 2;
  x_51 = lean_box(x_50);
  x_52 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_52, 0, x_51);
  lean_ctor_set(x_52, 1, x_6);
  return x_52;
  }
  default: 
  {
  uint8_t x_53; lean_object* x_54; lean_object* x_55; 
  lean_dec(x_2);
  lean_dec(x_1);
  x_53 = 0;
  x_54 = lean_box(x_53);
  x_55 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_55, 0, x_54);
  lean_ctor_set(x_55, 1, x_6);
  return x_55;
  }
  }
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_isProofQuickApp___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
  _start:
  {
  lean_object* x_8; 
  x_8 = l___private_Lean_Meta_InferType_0__Lean_Meta_isProofQuickApp(x_1, x_2, x_3, x_4, x_5, x_6, x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  return x_8;
  }
  }
  lean_object* l_Lean_Meta_isProofQuick___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_isProofQuick(x_1, x_2, x_3, x_4, x_5, x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  return x_7;
  }
  }
  lean_object* l_Lean_Meta_isProof(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
  _start:
  {
  lean_object* x_7; 
  lean_inc(x_2);
  lean_inc(x_1);
  x_7 = l_Lean_Meta_isProofQuick(x_1, x_2, x_3, x_4, x_5, x_6);
  if (lean_obj_tag(x_7) == 0)
  {
  lean_object* x_8; uint8_t x_9; 
  x_8 = lean_ctor_get(x_7, 0);
  lean_inc(x_8);
  x_9 = lean_unbox(x_8);
  lean_dec(x_8);
  switch (x_9) {
  case 0:
  {
  uint8_t x_10; 
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_10 = !lean_is_exclusive(x_7);
  if (x_10 == 0)
  {
  lean_object* x_11; uint8_t x_12; lean_object* x_13; 
  x_11 = lean_ctor_get(x_7, 0);
  lean_dec(x_11);
  x_12 = 0;
  x_13 = lean_box(x_12);
  lean_ctor_set(x_7, 0, x_13);
  return x_7;
  }
  else
  {
  lean_object* x_14; uint8_t x_15; lean_object* x_16; lean_object* x_17; 
  x_14 = lean_ctor_get(x_7, 1);
  lean_inc(x_14);
  lean_dec(x_7);
  x_15 = 0;
  x_16 = lean_box(x_15);
  x_17 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_17, 0, x_16);
  lean_ctor_set(x_17, 1, x_14);
  return x_17;
  }
  }
  case 1:
  {
  uint8_t x_18; 
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_18 = !lean_is_exclusive(x_7);
  if (x_18 == 0)
  {
  lean_object* x_19; uint8_t x_20; lean_object* x_21; 
  x_19 = lean_ctor_get(x_7, 0);
  lean_dec(x_19);
  x_20 = 1;
  x_21 = lean_box(x_20);
  lean_ctor_set(x_7, 0, x_21);
  return x_7;
  }
  else
  {
  lean_object* x_22; uint8_t x_23; lean_object* x_24; lean_object* x_25; 
  x_22 = lean_ctor_get(x_7, 1);
  lean_inc(x_22);
  lean_dec(x_7);
  x_23 = 1;
  x_24 = lean_box(x_23);
  x_25 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_25, 0, x_24);
  lean_ctor_set(x_25, 1, x_22);
  return x_25;
  }
  }
  default: 
  {
  lean_object* x_26; lean_object* x_27; 
  x_26 = lean_ctor_get(x_7, 1);
  lean_inc(x_26);
  lean_dec(x_7);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_3);
  lean_inc(x_2);
  x_27 = l_Lean_Meta_inferType(x_1, x_2, x_3, x_4, x_5, x_26);
  if (lean_obj_tag(x_27) == 0)
  {
  lean_object* x_28; lean_object* x_29; lean_object* x_30; 
  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 = l_Lean_Meta_isProp(x_28, x_2, x_3, x_4, x_5, x_29);
  return x_30;
  }
  else
  {
  uint8_t x_31; 
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_31 = !lean_is_exclusive(x_27);
  if (x_31 == 0)
  {
  return x_27;
  }
  else
  {
  lean_object* x_32; lean_object* x_33; lean_object* x_34; 
  x_32 = lean_ctor_get(x_27, 0);
  x_33 = lean_ctor_get(x_27, 1);
  lean_inc(x_33);
  lean_inc(x_32);
  lean_dec(x_27);
  x_34 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_34, 0, x_32);
  lean_ctor_set(x_34, 1, x_33);
  return x_34;
  }
  }
  }
  }
  }
  else
  {
  uint8_t x_35; 
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_35 = !lean_is_exclusive(x_7);
  if (x_35 == 0)
  {
  return x_7;
  }
  else
  {
  lean_object* x_36; lean_object* x_37; lean_object* x_38; 
  x_36 = lean_ctor_get(x_7, 0);
  x_37 = lean_ctor_get(x_7, 1);
  lean_inc(x_37);
  lean_inc(x_36);
  lean_dec(x_7);
  x_38 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_38, 0, x_36);
  lean_ctor_set(x_38, 1, x_37);
  return x_38;
  }
  }
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_isArrowType(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:
  {
  switch (lean_obj_tag(x_1)) {
  case 3:
  {
  lean_object* x_8; uint8_t x_9; 
  x_8 = lean_unsigned_to_nat(0u);
  x_9 = lean_nat_dec_eq(x_2, x_8);
  lean_dec(x_2);
  if (x_9 == 0)
  {
  uint8_t x_10; lean_object* x_11; lean_object* x_12; 
  x_10 = 2;
  x_11 = lean_box(x_10);
  x_12 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_12, 0, x_11);
  lean_ctor_set(x_12, 1, x_7);
  return x_12;
  }
  else
  {
  uint8_t x_13; lean_object* x_14; lean_object* x_15; 
  x_13 = 1;
  x_14 = lean_box(x_13);
  x_15 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_15, 0, x_14);
  lean_ctor_set(x_15, 1, x_7);
  return x_15;
  }
  }
  case 7:
  {
  lean_object* x_16; lean_object* x_17; uint8_t x_18; 
  x_16 = lean_ctor_get(x_1, 2);
  x_17 = lean_unsigned_to_nat(0u);
  x_18 = lean_nat_dec_eq(x_2, x_17);
  if (x_18 == 0)
  {
  lean_object* x_19; lean_object* x_20; 
  x_19 = lean_unsigned_to_nat(1u);
  x_20 = lean_nat_sub(x_2, x_19);
  lean_dec(x_2);
  x_1 = x_16;
  x_2 = x_20;
  goto _start;
  }
  else
  {
  uint8_t x_22; lean_object* x_23; lean_object* x_24; 
  lean_dec(x_2);
  x_22 = 0;
  x_23 = lean_box(x_22);
  x_24 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_24, 0, x_23);
  lean_ctor_set(x_24, 1, x_7);
  return x_24;
  }
  }
  case 8:
  {
  lean_object* x_25; 
  x_25 = lean_ctor_get(x_1, 3);
  x_1 = x_25;
  goto _start;
  }
  case 10:
  {
  lean_object* x_27; 
  x_27 = lean_ctor_get(x_1, 1);
  x_1 = x_27;
  goto _start;
  }
  default: 
  {
  uint8_t x_29; lean_object* x_30; lean_object* x_31; 
  lean_dec(x_2);
  x_29 = 2;
  x_30 = lean_box(x_29);
  x_31 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_31, 0, x_30);
  lean_ctor_set(x_31, 1, x_7);
  return x_31;
  }
  }
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_isArrowType___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
  _start:
  {
  lean_object* x_8; 
  x_8 = l___private_Lean_Meta_InferType_0__Lean_Meta_isArrowType(x_1, 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_1);
  return x_8;
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_isTypeQuickApp(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:
  {
  switch (lean_obj_tag(x_1)) {
  case 1:
  {
  lean_object* x_8; lean_object* x_9; 
  x_8 = lean_ctor_get(x_1, 0);
  lean_inc(x_8);
  lean_dec(x_1);
  lean_inc(x_3);
  x_9 = l___private_Lean_Meta_InferType_0__Lean_Meta_inferFVarType(x_8, x_3, x_4, x_5, x_6, x_7);
  if (lean_obj_tag(x_9) == 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);
  x_12 = l___private_Lean_Meta_InferType_0__Lean_Meta_isArrowType(x_10, x_2, x_3, x_4, x_5, x_6, x_11);
  lean_dec(x_3);
  lean_dec(x_10);
  return x_12;
  }
  else
  {
  uint8_t x_13; 
  lean_dec(x_3);
  lean_dec(x_2);
  x_13 = !lean_is_exclusive(x_9);
  if (x_13 == 0)
  {
  return x_9;
  }
  else
  {
  lean_object* x_14; lean_object* x_15; lean_object* x_16; 
  x_14 = lean_ctor_get(x_9, 0);
  x_15 = lean_ctor_get(x_9, 1);
  lean_inc(x_15);
  lean_inc(x_14);
  lean_dec(x_9);
  x_16 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_16, 0, x_14);
  lean_ctor_set(x_16, 1, x_15);
  return x_16;
  }
  }
  }
  case 2:
  {
  lean_object* x_17; lean_object* x_18; 
  x_17 = lean_ctor_get(x_1, 0);
  lean_inc(x_17);
  lean_dec(x_1);
  x_18 = l___private_Lean_Meta_InferType_0__Lean_Meta_inferMVarType(x_17, x_3, x_4, x_5, x_6, x_7);
  if (lean_obj_tag(x_18) == 0)
  {
  lean_object* x_19; lean_object* x_20; lean_object* x_21; 
  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 = l___private_Lean_Meta_InferType_0__Lean_Meta_isArrowType(x_19, x_2, x_3, x_4, x_5, x_6, x_20);
  lean_dec(x_3);
  lean_dec(x_19);
  return x_21;
  }
  else
  {
  uint8_t x_22; 
  lean_dec(x_3);
  lean_dec(x_2);
  x_22 = !lean_is_exclusive(x_18);
  if (x_22 == 0)
  {
  return x_18;
  }
  else
  {
  lean_object* x_23; lean_object* x_24; lean_object* x_25; 
  x_23 = lean_ctor_get(x_18, 0);
  x_24 = lean_ctor_get(x_18, 1);
  lean_inc(x_24);
  lean_inc(x_23);
  lean_dec(x_18);
  x_25 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_25, 0, x_23);
  lean_ctor_set(x_25, 1, x_24);
  return x_25;
  }
  }
  }
  case 4:
  {
  lean_object* x_26; lean_object* x_27; lean_object* x_28; 
  x_26 = lean_ctor_get(x_1, 0);
  lean_inc(x_26);
  x_27 = lean_ctor_get(x_1, 1);
  lean_inc(x_27);
  lean_dec(x_1);
  x_28 = l___private_Lean_Meta_InferType_0__Lean_Meta_inferConstType(x_26, x_27, x_3, x_4, x_5, x_6, x_7);
  if (lean_obj_tag(x_28) == 0)
  {
  lean_object* x_29; lean_object* x_30; lean_object* x_31; 
  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___private_Lean_Meta_InferType_0__Lean_Meta_isArrowType(x_29, x_2, x_3, x_4, x_5, x_6, x_30);
  lean_dec(x_3);
  lean_dec(x_29);
  return x_31;
  }
  else
  {
  uint8_t x_32; 
  lean_dec(x_3);
  lean_dec(x_2);
  x_32 = !lean_is_exclusive(x_28);
  if (x_32 == 0)
  {
  return x_28;
  }
  else
  {
  lean_object* x_33; lean_object* x_34; lean_object* x_35; 
  x_33 = lean_ctor_get(x_28, 0);
  x_34 = lean_ctor_get(x_28, 1);
  lean_inc(x_34);
  lean_inc(x_33);
  lean_dec(x_28);
  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;
  }
  }
  }
  case 5:
  {
  lean_object* x_36; lean_object* x_37; lean_object* x_38; 
  x_36 = lean_ctor_get(x_1, 0);
  lean_inc(x_36);
  lean_dec(x_1);
  x_37 = lean_unsigned_to_nat(1u);
  x_38 = lean_nat_add(x_2, x_37);
  lean_dec(x_2);
  x_1 = x_36;
  x_2 = x_38;
  goto _start;
  }
  case 6:
  {
  lean_object* x_40; lean_object* x_41; uint8_t x_42; 
  x_40 = lean_ctor_get(x_1, 2);
  lean_inc(x_40);
  lean_dec(x_1);
  x_41 = lean_unsigned_to_nat(0u);
  x_42 = lean_nat_dec_eq(x_2, x_41);
  if (x_42 == 0)
  {
  lean_object* x_43; lean_object* x_44; 
  x_43 = lean_unsigned_to_nat(1u);
  x_44 = lean_nat_sub(x_2, x_43);
  lean_dec(x_2);
  x_1 = x_40;
  x_2 = x_44;
  goto _start;
  }
  else
  {
  uint8_t x_46; lean_object* x_47; lean_object* x_48; 
  lean_dec(x_40);
  lean_dec(x_3);
  lean_dec(x_2);
  x_46 = 0;
  x_47 = lean_box(x_46);
  x_48 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_48, 0, x_47);
  lean_ctor_set(x_48, 1, x_7);
  return x_48;
  }
  }
  case 8:
  {
  lean_object* x_49; 
  x_49 = lean_ctor_get(x_1, 3);
  lean_inc(x_49);
  lean_dec(x_1);
  x_1 = x_49;
  goto _start;
  }
  case 10:
  {
  lean_object* x_51; 
  x_51 = lean_ctor_get(x_1, 1);
  lean_inc(x_51);
  lean_dec(x_1);
  x_1 = x_51;
  goto _start;
  }
  default: 
  {
  uint8_t x_53; lean_object* x_54; lean_object* x_55; 
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_53 = 2;
  x_54 = lean_box(x_53);
  x_55 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_55, 0, x_54);
  lean_ctor_set(x_55, 1, x_7);
  return x_55;
  }
  }
  }
  }
  lean_object* l___private_Lean_Meta_InferType_0__Lean_Meta_isTypeQuickApp___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
  _start:
  {
  lean_object* x_8; 
  x_8 = l___private_Lean_Meta_InferType_0__Lean_Meta_isTypeQuickApp(x_1, x_2, x_3, x_4, x_5, x_6, x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  return x_8;
  }
  }
  lean_object* l_Lean_Meta_isTypeQuick(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:
  {
  switch (lean_obj_tag(x_1)) {
  case 1:
  {
  lean_object* x_7; lean_object* x_8; 
  x_7 = lean_ctor_get(x_1, 0);
  lean_inc(x_7);
  lean_dec(x_1);
  lean_inc(x_2);
  x_8 = l___private_Lean_Meta_InferType_0__Lean_Meta_inferFVarType(x_7, x_2, x_3, x_4, x_5, x_6);
  if (lean_obj_tag(x_8) == 0)
  {
  lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; 
  x_9 = lean_ctor_get(x_8, 0);
  lean_inc(x_9);
  x_10 = lean_ctor_get(x_8, 1);
  lean_inc(x_10);
  lean_dec(x_8);
  x_11 = lean_unsigned_to_nat(0u);
  x_12 = l___private_Lean_Meta_InferType_0__Lean_Meta_isArrowType(x_9, x_11, x_2, x_3, x_4, x_5, x_10);
  lean_dec(x_2);
  lean_dec(x_9);
  return x_12;
  }
  else
  {
  uint8_t x_13; 
  lean_dec(x_2);
  x_13 = !lean_is_exclusive(x_8);
  if (x_13 == 0)
  {
  return x_8;
  }
  else
  {
  lean_object* x_14; lean_object* x_15; lean_object* x_16; 
  x_14 = lean_ctor_get(x_8, 0);
  x_15 = lean_ctor_get(x_8, 1);
  lean_inc(x_15);
  lean_inc(x_14);
  lean_dec(x_8);
  x_16 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_16, 0, x_14);
  lean_ctor_set(x_16, 1, x_15);
  return x_16;
  }
  }
  }
  case 2:
  {
  lean_object* x_17; lean_object* x_18; 
  x_17 = lean_ctor_get(x_1, 0);
  lean_inc(x_17);
  lean_dec(x_1);
  x_18 = l___private_Lean_Meta_InferType_0__Lean_Meta_inferMVarType(x_17, x_2, x_3, x_4, x_5, x_6);
  if (lean_obj_tag(x_18) == 0)
  {
  lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; 
  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_unsigned_to_nat(0u);
  x_22 = l___private_Lean_Meta_InferType_0__Lean_Meta_isArrowType(x_19, x_21, x_2, x_3, x_4, x_5, x_20);
  lean_dec(x_2);
  lean_dec(x_19);
  return x_22;
  }
  else
  {
  uint8_t x_23; 
  lean_dec(x_2);
  x_23 = !lean_is_exclusive(x_18);
  if (x_23 == 0)
  {
  return x_18;
  }
  else
  {
  lean_object* x_24; lean_object* x_25; lean_object* x_26; 
  x_24 = lean_ctor_get(x_18, 0);
  x_25 = lean_ctor_get(x_18, 1);
  lean_inc(x_25);
  lean_inc(x_24);
  lean_dec(x_18);
  x_26 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_26, 0, x_24);
  lean_ctor_set(x_26, 1, x_25);
  return x_26;
  }
  }
  }
  case 3:
  {
  uint8_t x_27; lean_object* x_28; lean_object* x_29; 
  lean_dec(x_2);
  lean_dec(x_1);
  x_27 = 1;
  x_28 = lean_box(x_27);
  x_29 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_29, 0, x_28);
  lean_ctor_set(x_29, 1, x_6);
  return x_29;
  }
  case 4:
  {
  lean_object* x_30; lean_object* x_31; lean_object* x_32; 
  x_30 = lean_ctor_get(x_1, 0);
  lean_inc(x_30);
  x_31 = lean_ctor_get(x_1, 1);
  lean_inc(x_31);
  lean_dec(x_1);
  x_32 = l___private_Lean_Meta_InferType_0__Lean_Meta_inferConstType(x_30, x_31, x_2, x_3, x_4, x_5, x_6);
  if (lean_obj_tag(x_32) == 0)
  {
  lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; 
  x_33 = lean_ctor_get(x_32, 0);
  lean_inc(x_33);
  x_34 = lean_ctor_get(x_32, 1);
  lean_inc(x_34);
  lean_dec(x_32);
  x_35 = lean_unsigned_to_nat(0u);
  x_36 = l___private_Lean_Meta_InferType_0__Lean_Meta_isArrowType(x_33, x_35, x_2, x_3, x_4, x_5, x_34);
  lean_dec(x_2);
  lean_dec(x_33);
  return x_36;
  }
  else
  {
  uint8_t x_37; 
  lean_dec(x_2);
  x_37 = !lean_is_exclusive(x_32);
  if (x_37 == 0)
  {
  return x_32;
  }
  else
  {
  lean_object* x_38; lean_object* x_39; lean_object* x_40; 
  x_38 = lean_ctor_get(x_32, 0);
  x_39 = lean_ctor_get(x_32, 1);
  lean_inc(x_39);
  lean_inc(x_38);
  lean_dec(x_32);
  x_40 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_40, 0, x_38);
  lean_ctor_set(x_40, 1, x_39);
  return x_40;
  }
  }
  }
  case 5:
  {
  lean_object* x_41; lean_object* x_42; lean_object* x_43; 
  x_41 = lean_ctor_get(x_1, 0);
  lean_inc(x_41);
  lean_dec(x_1);
  x_42 = lean_unsigned_to_nat(1u);
  x_43 = l___private_Lean_Meta_InferType_0__Lean_Meta_isTypeQuickApp(x_41, x_42, x_2, x_3, x_4, x_5, x_6);
  return x_43;
  }
  case 6:
  {
  uint8_t x_44; lean_object* x_45; lean_object* x_46; 
  lean_dec(x_2);
  lean_dec(x_1);
  x_44 = 0;
  x_45 = lean_box(x_44);
  x_46 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_46, 0, x_45);
  lean_ctor_set(x_46, 1, x_6);
  return x_46;
  }
  case 7:
  {
  uint8_t x_47; lean_object* x_48; lean_object* x_49; 
  lean_dec(x_2);
  lean_dec(x_1);
  x_47 = 1;
  x_48 = lean_box(x_47);
  x_49 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_49, 0, x_48);
  lean_ctor_set(x_49, 1, x_6);
  return x_49;
  }
  case 8:
  {
  lean_object* x_50; 
  x_50 = lean_ctor_get(x_1, 3);
  lean_inc(x_50);
  lean_dec(x_1);
  x_1 = x_50;
  goto _start;
  }
  case 9:
  {
  uint8_t x_52; lean_object* x_53; lean_object* x_54; 
  lean_dec(x_2);
  lean_dec(x_1);
  x_52 = 0;
  x_53 = lean_box(x_52);
  x_54 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_54, 0, x_53);
  lean_ctor_set(x_54, 1, x_6);
  return x_54;
  }
  case 10:
  {
  lean_object* x_55; 
  x_55 = lean_ctor_get(x_1, 1);
  lean_inc(x_55);
  lean_dec(x_1);
  x_1 = x_55;
  goto _start;
  }
  default: 
  {
  uint8_t x_57; lean_object* x_58; lean_object* x_59; 
  lean_dec(x_2);
  lean_dec(x_1);
  x_57 = 2;
  x_58 = lean_box(x_57);
  x_59 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_59, 0, x_58);
  lean_ctor_set(x_59, 1, x_6);
  return x_59;
  }
  }
  }
  }
  lean_object* l_Lean_Meta_isTypeQuick___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_isTypeQuick(x_1, x_2, x_3, x_4, x_5, x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  return x_7;
  }
  }
  lean_object* l_Lean_Meta_isType(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
  _start:
  {
  lean_object* x_7; 
  lean_inc(x_2);
  lean_inc(x_1);
  x_7 = l_Lean_Meta_isTypeQuick(x_1, x_2, x_3, x_4, x_5, x_6);
  if (lean_obj_tag(x_7) == 0)
  {
  lean_object* x_8; uint8_t x_9; 
  x_8 = lean_ctor_get(x_7, 0);
  lean_inc(x_8);
  x_9 = lean_unbox(x_8);
  lean_dec(x_8);
  switch (x_9) {
  case 0:
  {
  uint8_t x_10; 
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_10 = !lean_is_exclusive(x_7);
  if (x_10 == 0)
  {
  lean_object* x_11; uint8_t x_12; lean_object* x_13; 
  x_11 = lean_ctor_get(x_7, 0);
  lean_dec(x_11);
  x_12 = 0;
  x_13 = lean_box(x_12);
  lean_ctor_set(x_7, 0, x_13);
  return x_7;
  }
  else
  {
  lean_object* x_14; uint8_t x_15; lean_object* x_16; lean_object* x_17; 
  x_14 = lean_ctor_get(x_7, 1);
  lean_inc(x_14);
  lean_dec(x_7);
  x_15 = 0;
  x_16 = lean_box(x_15);
  x_17 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_17, 0, x_16);
  lean_ctor_set(x_17, 1, x_14);
  return x_17;
  }
  }
  case 1:
  {
  uint8_t x_18; 
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_18 = !lean_is_exclusive(x_7);
  if (x_18 == 0)
  {
  lean_object* x_19; uint8_t x_20; lean_object* x_21; 
  x_19 = lean_ctor_get(x_7, 0);
  lean_dec(x_19);
  x_20 = 1;
  x_21 = lean_box(x_20);
  lean_ctor_set(x_7, 0, x_21);
  return x_7;
  }
  else
  {
  lean_object* x_22; uint8_t x_23; lean_object* x_24; lean_object* x_25; 
  x_22 = lean_ctor_get(x_7, 1);
  lean_inc(x_22);
  lean_dec(x_7);
  x_23 = 1;
  x_24 = lean_box(x_23);
  x_25 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_25, 0, x_24);
  lean_ctor_set(x_25, 1, x_22);
  return x_25;
  }
  }
  default: 
  {
  lean_object* x_26; lean_object* x_27; 
  x_26 = lean_ctor_get(x_7, 1);
  lean_inc(x_26);
  lean_dec(x_7);
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_3);
  lean_inc(x_2);
  x_27 = l_Lean_Meta_inferType(x_1, x_2, x_3, x_4, x_5, x_26);
  if (lean_obj_tag(x_27) == 0)
  {
  lean_object* x_28; lean_object* x_29; lean_object* x_30; 
  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 = l_Lean_Meta_whnfD(x_28, x_2, x_3, x_4, x_5, x_29);
  if (lean_obj_tag(x_30) == 0)
  {
  lean_object* x_31; 
  x_31 = lean_ctor_get(x_30, 0);
  lean_inc(x_31);
  if (lean_obj_tag(x_31) == 3)
  {
  uint8_t x_32; 
  lean_dec(x_31);
  x_32 = !lean_is_exclusive(x_30);
  if (x_32 == 0)
  {
  lean_object* x_33; uint8_t x_34; lean_object* x_35; 
  x_33 = lean_ctor_get(x_30, 0);
  lean_dec(x_33);
  x_34 = 1;
  x_35 = lean_box(x_34);
  lean_ctor_set(x_30, 0, x_35);
  return x_30;
  }
  else
  {
  lean_object* x_36; uint8_t x_37; lean_object* x_38; lean_object* x_39; 
  x_36 = lean_ctor_get(x_30, 1);
  lean_inc(x_36);
  lean_dec(x_30);
  x_37 = 1;
  x_38 = lean_box(x_37);
  x_39 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_39, 0, x_38);
  lean_ctor_set(x_39, 1, x_36);
  return x_39;
  }
  }
  else
  {
  uint8_t x_40; 
  lean_dec(x_31);
  x_40 = !lean_is_exclusive(x_30);
  if (x_40 == 0)
  {
  lean_object* x_41; uint8_t x_42; lean_object* x_43; 
  x_41 = lean_ctor_get(x_30, 0);
  lean_dec(x_41);
  x_42 = 0;
  x_43 = lean_box(x_42);
  lean_ctor_set(x_30, 0, x_43);
  return x_30;
  }
  else
  {
  lean_object* x_44; uint8_t x_45; lean_object* x_46; lean_object* x_47; 
  x_44 = lean_ctor_get(x_30, 1);
  lean_inc(x_44);
  lean_dec(x_30);
  x_45 = 0;
  x_46 = lean_box(x_45);
  x_47 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_47, 0, x_46);
  lean_ctor_set(x_47, 1, x_44);
  return x_47;
  }
  }
  }
  else
  {
  uint8_t x_48; 
  x_48 = !lean_is_exclusive(x_30);
  if (x_48 == 0)
  {
  return x_30;
  }
  else
  {
  lean_object* x_49; lean_object* x_50; lean_object* x_51; 
  x_49 = lean_ctor_get(x_30, 0);
  x_50 = lean_ctor_get(x_30, 1);
  lean_inc(x_50);
  lean_inc(x_49);
  lean_dec(x_30);
  x_51 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_51, 0, x_49);
  lean_ctor_set(x_51, 1, x_50);
  return x_51;
  }
  }
  }
  else
  {
  uint8_t x_52; 
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_52 = !lean_is_exclusive(x_27);
  if (x_52 == 0)
  {
  return x_27;
  }
  else
  {
  lean_object* x_53; lean_object* x_54; lean_object* x_55; 
  x_53 = lean_ctor_get(x_27, 0);
  x_54 = lean_ctor_get(x_27, 1);
  lean_inc(x_54);
  lean_inc(x_53);
  lean_dec(x_27);
  x_55 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_55, 0, x_53);
  lean_ctor_set(x_55, 1, x_54);
  return x_55;
  }
  }
  }
  }
  }
  else
  {
  uint8_t x_56; 
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_56 = !lean_is_exclusive(x_7);
  if (x_56 == 0)
  {
  return x_7;
  }
  else
  {
  lean_object* x_57; lean_object* x_58; lean_object* x_59; 
  x_57 = lean_ctor_get(x_7, 0);
  x_58 = lean_ctor_get(x_7, 1);
  lean_inc(x_58);
  lean_inc(x_57);
  lean_dec(x_7);
  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;
  }
  }
  }
  }
  lean_object* l_Lean_Meta_isTypeFormerType_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
  _start:
  {
  switch (lean_obj_tag(x_1)) {
  case 3:
  {
  lean_object* x_5; uint64_t x_6; lean_object* x_7; lean_object* x_8; 
  lean_dec(x_4);
  lean_dec(x_3);
  x_5 = lean_ctor_get(x_1, 0);
  lean_inc(x_5);
  x_6 = lean_ctor_get_uint64(x_1, sizeof(void*)*1);
  lean_dec(x_1);
  x_7 = lean_box_uint64(x_6);
  x_8 = lean_apply_2(x_2, x_5, x_7);
  return x_8;
  }
  case 7:
  {
  lean_object* x_9; lean_object* x_10; lean_object* x_11; uint64_t x_12; lean_object* x_13; lean_object* x_14; 
  lean_dec(x_4);
  lean_dec(x_2);
  x_9 = lean_ctor_get(x_1, 0);
  lean_inc(x_9);
  x_10 = lean_ctor_get(x_1, 1);
  lean_inc(x_10);
  x_11 = lean_ctor_get(x_1, 2);
  lean_inc(x_11);
  x_12 = lean_ctor_get_uint64(x_1, sizeof(void*)*3);
  lean_dec(x_1);
  x_13 = lean_box_uint64(x_12);
  x_14 = lean_apply_4(x_3, x_9, x_10, x_11, x_13);
  return x_14;
  }
  default: 
  {
  lean_object* x_15; 
  lean_dec(x_3);
  lean_dec(x_2);
  x_15 = lean_apply_1(x_4, x_1);
  return x_15;
  }
  }
  }
  }
  lean_object* l_Lean_Meta_isTypeFormerType_match__1(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = lean_alloc_closure((void*)(l_Lean_Meta_isTypeFormerType_match__1___rarg), 4, 0);
  return x_2;
  }
  }
  lean_object* l_Lean_Meta_isTypeFormerType(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
  _start:
  {
  lean_object* x_7; 
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_3);
  lean_inc(x_2);
  x_7 = l_Lean_Meta_whnfD(x_1, x_2, x_3, x_4, x_5, x_6);
  if (lean_obj_tag(x_7) == 0)
  {
  lean_object* x_8; 
  x_8 = lean_ctor_get(x_7, 0);
  lean_inc(x_8);
  switch (lean_obj_tag(x_8)) {
  case 3:
  {
  uint8_t x_9; 
  lean_dec(x_8);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_9 = !lean_is_exclusive(x_7);
  if (x_9 == 0)
  {
  lean_object* x_10; uint8_t x_11; lean_object* x_12; 
  x_10 = lean_ctor_get(x_7, 0);
  lean_dec(x_10);
  x_11 = 1;
  x_12 = lean_box(x_11);
  lean_ctor_set(x_7, 0, x_12);
  return x_7;
  }
  else
  {
  lean_object* x_13; uint8_t x_14; lean_object* x_15; lean_object* x_16; 
  x_13 = lean_ctor_get(x_7, 1);
  lean_inc(x_13);
  lean_dec(x_7);
  x_14 = 1;
  x_15 = lean_box(x_14);
  x_16 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_16, 0, x_15);
  lean_ctor_set(x_16, 1, x_13);
  return x_16;
  }
  }
  case 7:
  {
  lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; uint64_t x_21; uint8_t x_22; lean_object* x_23; 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; uint8_t x_43; 
  x_17 = lean_ctor_get(x_7, 1);
  lean_inc(x_17);
  lean_dec(x_7);
  x_18 = lean_ctor_get(x_8, 0);
  lean_inc(x_18);
  x_19 = lean_ctor_get(x_8, 1);
  lean_inc(x_19);
  x_20 = lean_ctor_get(x_8, 2);
  lean_inc(x_20);
  x_21 = lean_ctor_get_uint64(x_8, sizeof(void*)*3);
  lean_dec(x_8);
  x_22 = (uint8_t)((x_21 << 24) >> 61);
  x_33 = lean_st_ref_get(x_5, x_17);
  x_34 = lean_ctor_get(x_33, 1);
  lean_inc(x_34);
  lean_dec(x_33);
  x_35 = lean_st_ref_get(x_3, x_34);
  x_36 = lean_ctor_get(x_35, 0);
  lean_inc(x_36);
  x_37 = lean_ctor_get(x_35, 1);
  lean_inc(x_37);
  lean_dec(x_35);
  x_38 = lean_ctor_get(x_36, 1);
  lean_inc(x_38);
  lean_dec(x_36);
  x_39 = l_Lean_mkFreshId___at_Lean_Meta_mkFreshExprMVarAt___spec__1___rarg(x_5, x_37);
  x_40 = lean_ctor_get(x_39, 0);
  lean_inc(x_40);
  x_41 = lean_ctor_get(x_39, 1);
  lean_inc(x_41);
  lean_dec(x_39);
  lean_inc(x_40);
  x_42 = l_Lean_mkFVar(x_40);
  x_43 = !lean_is_exclusive(x_2);
  if (x_43 == 0)
  {
  lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; 
  x_44 = lean_ctor_get(x_2, 1);
  x_45 = lean_local_ctx_mk_local_decl(x_44, x_40, x_18, x_19, x_22);
  lean_ctor_set(x_2, 1, x_45);
  x_46 = lean_expr_instantiate1(x_20, x_42);
  lean_dec(x_42);
  lean_dec(x_20);
  lean_inc(x_5);
  lean_inc(x_3);
  x_47 = l_Lean_Meta_isTypeFormerType(x_46, x_2, x_3, x_4, x_5, x_41);
  if (lean_obj_tag(x_47) == 0)
  {
  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; uint8_t x_55; 
  x_48 = lean_ctor_get(x_47, 0);
  lean_inc(x_48);
  x_49 = lean_ctor_get(x_47, 1);
  lean_inc(x_49);
  lean_dec(x_47);
  x_50 = lean_st_ref_get(x_5, x_49);
  lean_dec(x_5);
  x_51 = lean_ctor_get(x_50, 1);
  lean_inc(x_51);
  lean_dec(x_50);
  x_52 = lean_st_ref_take(x_3, x_51);
  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_is_exclusive(x_53);
  if (x_55 == 0)
  {
  lean_object* x_56; lean_object* x_57; uint8_t x_58; 
  x_56 = lean_ctor_get(x_53, 1);
  lean_dec(x_56);
  lean_ctor_set(x_53, 1, x_38);
  x_57 = lean_st_ref_set(x_3, x_53, x_54);
  lean_dec(x_3);
  x_58 = !lean_is_exclusive(x_57);
  if (x_58 == 0)
  {
  lean_object* x_59; 
  x_59 = lean_ctor_get(x_57, 0);
  lean_dec(x_59);
  lean_ctor_set(x_57, 0, x_48);
  x_23 = x_57;
  goto block_32;
  }
  else
  {
  lean_object* x_60; lean_object* x_61; 
  x_60 = lean_ctor_get(x_57, 1);
  lean_inc(x_60);
  lean_dec(x_57);
  x_61 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_61, 0, x_48);
  lean_ctor_set(x_61, 1, x_60);
  x_23 = x_61;
  goto block_32;
  }
  }
  else
  {
  lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; 
  x_62 = lean_ctor_get(x_53, 0);
  x_63 = lean_ctor_get(x_53, 2);
  x_64 = lean_ctor_get(x_53, 3);
  lean_inc(x_64);
  lean_inc(x_63);
  lean_inc(x_62);
  lean_dec(x_53);
  x_65 = lean_alloc_ctor(0, 4, 0);
  lean_ctor_set(x_65, 0, x_62);
  lean_ctor_set(x_65, 1, x_38);
  lean_ctor_set(x_65, 2, x_63);
  lean_ctor_set(x_65, 3, x_64);
  x_66 = lean_st_ref_set(x_3, x_65, x_54);
  lean_dec(x_3);
  x_67 = lean_ctor_get(x_66, 1);
  lean_inc(x_67);
  if (lean_is_exclusive(x_66)) {
   lean_ctor_release(x_66, 0);
   lean_ctor_release(x_66, 1);
   x_68 = x_66;
  } else {
   lean_dec_ref(x_66);
   x_68 = lean_box(0);
  }
  if (lean_is_scalar(x_68)) {
   x_69 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_69 = x_68;
  }
  lean_ctor_set(x_69, 0, x_48);
  lean_ctor_set(x_69, 1, x_67);
  x_23 = x_69;
  goto block_32;
  }
  }
  else
  {
  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; uint8_t x_77; 
  x_70 = lean_ctor_get(x_47, 0);
  lean_inc(x_70);
  x_71 = lean_ctor_get(x_47, 1);
  lean_inc(x_71);
  lean_dec(x_47);
  x_72 = lean_st_ref_get(x_5, x_71);
  lean_dec(x_5);
  x_73 = lean_ctor_get(x_72, 1);
  lean_inc(x_73);
  lean_dec(x_72);
  x_74 = lean_st_ref_take(x_3, x_73);
  x_75 = lean_ctor_get(x_74, 0);
  lean_inc(x_75);
  x_76 = lean_ctor_get(x_74, 1);
  lean_inc(x_76);
  lean_dec(x_74);
  x_77 = !lean_is_exclusive(x_75);
  if (x_77 == 0)
  {
  lean_object* x_78; lean_object* x_79; uint8_t x_80; 
  x_78 = lean_ctor_get(x_75, 1);
  lean_dec(x_78);
  lean_ctor_set(x_75, 1, x_38);
  x_79 = lean_st_ref_set(x_3, x_75, x_76);
  lean_dec(x_3);
  x_80 = !lean_is_exclusive(x_79);
  if (x_80 == 0)
  {
  lean_object* x_81; 
  x_81 = lean_ctor_get(x_79, 0);
  lean_dec(x_81);
  lean_ctor_set_tag(x_79, 1);
  lean_ctor_set(x_79, 0, x_70);
  x_23 = x_79;
  goto block_32;
  }
  else
  {
  lean_object* x_82; lean_object* x_83; 
  x_82 = lean_ctor_get(x_79, 1);
  lean_inc(x_82);
  lean_dec(x_79);
  x_83 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_83, 0, x_70);
  lean_ctor_set(x_83, 1, x_82);
  x_23 = x_83;
  goto block_32;
  }
  }
  else
  {
  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_84 = lean_ctor_get(x_75, 0);
  x_85 = lean_ctor_get(x_75, 2);
  x_86 = lean_ctor_get(x_75, 3);
  lean_inc(x_86);
  lean_inc(x_85);
  lean_inc(x_84);
  lean_dec(x_75);
  x_87 = lean_alloc_ctor(0, 4, 0);
  lean_ctor_set(x_87, 0, x_84);
  lean_ctor_set(x_87, 1, x_38);
  lean_ctor_set(x_87, 2, x_85);
  lean_ctor_set(x_87, 3, x_86);
  x_88 = lean_st_ref_set(x_3, x_87, x_76);
  lean_dec(x_3);
  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(1, 2, 0);
  } else {
   x_91 = x_90;
   lean_ctor_set_tag(x_91, 1);
  }
  lean_ctor_set(x_91, 0, x_70);
  lean_ctor_set(x_91, 1, x_89);
  x_23 = x_91;
  goto block_32;
  }
  }
  }
  else
  {
  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; 
  x_92 = lean_ctor_get(x_2, 0);
  x_93 = lean_ctor_get(x_2, 1);
  x_94 = lean_ctor_get(x_2, 2);
  x_95 = lean_ctor_get(x_2, 3);
  lean_inc(x_95);
  lean_inc(x_94);
  lean_inc(x_93);
  lean_inc(x_92);
  lean_dec(x_2);
  x_96 = lean_local_ctx_mk_local_decl(x_93, x_40, x_18, x_19, x_22);
  x_97 = lean_alloc_ctor(0, 4, 0);
  lean_ctor_set(x_97, 0, x_92);
  lean_ctor_set(x_97, 1, x_96);
  lean_ctor_set(x_97, 2, x_94);
  lean_ctor_set(x_97, 3, x_95);
  x_98 = lean_expr_instantiate1(x_20, x_42);
  lean_dec(x_42);
  lean_dec(x_20);
  lean_inc(x_5);
  lean_inc(x_3);
  x_99 = l_Lean_Meta_isTypeFormerType(x_98, x_97, x_3, x_4, x_5, x_41);
  if (lean_obj_tag(x_99) == 0)
  {
  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_100 = lean_ctor_get(x_99, 0);
  lean_inc(x_100);
  x_101 = lean_ctor_get(x_99, 1);
  lean_inc(x_101);
  lean_dec(x_99);
  x_102 = lean_st_ref_get(x_5, x_101);
  lean_dec(x_5);
  x_103 = lean_ctor_get(x_102, 1);
  lean_inc(x_103);
  lean_dec(x_102);
  x_104 = lean_st_ref_take(x_3, x_103);
  x_105 = lean_ctor_get(x_104, 0);
  lean_inc(x_105);
  x_106 = lean_ctor_get(x_104, 1);
  lean_inc(x_106);
  lean_dec(x_104);
  x_107 = lean_ctor_get(x_105, 0);
  lean_inc(x_107);
  x_108 = lean_ctor_get(x_105, 2);
  lean_inc(x_108);
  x_109 = lean_ctor_get(x_105, 3);
  lean_inc(x_109);
  if (lean_is_exclusive(x_105)) {
   lean_ctor_release(x_105, 0);
   lean_ctor_release(x_105, 1);
   lean_ctor_release(x_105, 2);
   lean_ctor_release(x_105, 3);
   x_110 = x_105;
  } else {
   lean_dec_ref(x_105);
   x_110 = lean_box(0);
  }
  if (lean_is_scalar(x_110)) {
   x_111 = lean_alloc_ctor(0, 4, 0);
  } else {
   x_111 = x_110;
  }
  lean_ctor_set(x_111, 0, x_107);
  lean_ctor_set(x_111, 1, x_38);
  lean_ctor_set(x_111, 2, x_108);
  lean_ctor_set(x_111, 3, x_109);
  x_112 = lean_st_ref_set(x_3, x_111, x_106);
  lean_dec(x_3);
  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_100);
  lean_ctor_set(x_115, 1, x_113);
  x_23 = x_115;
  goto block_32;
  }
  else
  {
  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; 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; 
  x_116 = lean_ctor_get(x_99, 0);
  lean_inc(x_116);
  x_117 = lean_ctor_get(x_99, 1);
  lean_inc(x_117);
  lean_dec(x_99);
  x_118 = lean_st_ref_get(x_5, x_117);
  lean_dec(x_5);
  x_119 = lean_ctor_get(x_118, 1);
  lean_inc(x_119);
  lean_dec(x_118);
  x_120 = lean_st_ref_take(x_3, x_119);
  x_121 = lean_ctor_get(x_120, 0);
  lean_inc(x_121);
  x_122 = lean_ctor_get(x_120, 1);
  lean_inc(x_122);
  lean_dec(x_120);
  x_123 = lean_ctor_get(x_121, 0);
  lean_inc(x_123);
  x_124 = lean_ctor_get(x_121, 2);
  lean_inc(x_124);
  x_125 = lean_ctor_get(x_121, 3);
  lean_inc(x_125);
  if (lean_is_exclusive(x_121)) {
   lean_ctor_release(x_121, 0);
   lean_ctor_release(x_121, 1);
   lean_ctor_release(x_121, 2);
   lean_ctor_release(x_121, 3);
   x_126 = x_121;
  } else {
   lean_dec_ref(x_121);
   x_126 = lean_box(0);
  }
  if (lean_is_scalar(x_126)) {
   x_127 = lean_alloc_ctor(0, 4, 0);
  } else {
   x_127 = x_126;
  }
  lean_ctor_set(x_127, 0, x_123);
  lean_ctor_set(x_127, 1, x_38);
  lean_ctor_set(x_127, 2, x_124);
  lean_ctor_set(x_127, 3, x_125);
  x_128 = lean_st_ref_set(x_3, x_127, x_122);
  lean_dec(x_3);
  x_129 = lean_ctor_get(x_128, 1);
  lean_inc(x_129);
  if (lean_is_exclusive(x_128)) {
   lean_ctor_release(x_128, 0);
   lean_ctor_release(x_128, 1);
   x_130 = x_128;
  } else {
   lean_dec_ref(x_128);
   x_130 = lean_box(0);
  }
  if (lean_is_scalar(x_130)) {
   x_131 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_131 = x_130;
   lean_ctor_set_tag(x_131, 1);
  }
  lean_ctor_set(x_131, 0, x_116);
  lean_ctor_set(x_131, 1, x_129);
  x_23 = x_131;
  goto block_32;
  }
  }
  block_32:
  {
  if (lean_obj_tag(x_23) == 0)
  {
  uint8_t x_24; 
  x_24 = !lean_is_exclusive(x_23);
  if (x_24 == 0)
  {
  return x_23;
  }
  else
  {
  lean_object* x_25; lean_object* x_26; lean_object* x_27; 
  x_25 = lean_ctor_get(x_23, 0);
  x_26 = lean_ctor_get(x_23, 1);
  lean_inc(x_26);
  lean_inc(x_25);
  lean_dec(x_23);
  x_27 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_27, 0, x_25);
  lean_ctor_set(x_27, 1, x_26);
  return x_27;
  }
  }
  else
  {
  uint8_t x_28; 
  x_28 = !lean_is_exclusive(x_23);
  if (x_28 == 0)
  {
  return x_23;
  }
  else
  {
  lean_object* x_29; lean_object* x_30; lean_object* x_31; 
  x_29 = lean_ctor_get(x_23, 0);
  x_30 = lean_ctor_get(x_23, 1);
  lean_inc(x_30);
  lean_inc(x_29);
  lean_dec(x_23);
  x_31 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_31, 0, x_29);
  lean_ctor_set(x_31, 1, x_30);
  return x_31;
  }
  }
  }
  }
  default: 
  {
  uint8_t x_132; 
  lean_dec(x_8);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_132 = !lean_is_exclusive(x_7);
  if (x_132 == 0)
  {
  lean_object* x_133; uint8_t x_134; lean_object* x_135; 
  x_133 = lean_ctor_get(x_7, 0);
  lean_dec(x_133);
  x_134 = 0;
  x_135 = lean_box(x_134);
  lean_ctor_set(x_7, 0, x_135);
  return x_7;
  }
  else
  {
  lean_object* x_136; uint8_t x_137; lean_object* x_138; lean_object* x_139; 
  x_136 = lean_ctor_get(x_7, 1);
  lean_inc(x_136);
  lean_dec(x_7);
  x_137 = 0;
  x_138 = lean_box(x_137);
  x_139 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_139, 0, x_138);
  lean_ctor_set(x_139, 1, x_136);
  return x_139;
  }
  }
  }
  }
  else
  {
  uint8_t x_140; 
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_140 = !lean_is_exclusive(x_7);
  if (x_140 == 0)
  {
  return x_7;
  }
  else
  {
  lean_object* x_141; lean_object* x_142; lean_object* x_143; 
  x_141 = lean_ctor_get(x_7, 0);
  x_142 = lean_ctor_get(x_7, 1);
  lean_inc(x_142);
  lean_inc(x_141);
  lean_dec(x_7);
  x_143 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_143, 0, x_141);
  lean_ctor_set(x_143, 1, x_142);
  return x_143;
  }
  }
  }
  }
  lean_object* l_Lean_Meta_isTypeFormer(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
  _start:
  {
  lean_object* x_7; 
  lean_inc(x_5);
  lean_inc(x_4);
  lean_inc(x_3);
  lean_inc(x_2);
  x_7 = l_Lean_Meta_inferType(x_1, x_2, x_3, x_4, x_5, x_6);
  if (lean_obj_tag(x_7) == 0)
  {
  lean_object* x_8; lean_object* x_9; lean_object* x_10; 
  x_8 = lean_ctor_get(x_7, 0);
  lean_inc(x_8);
  x_9 = lean_ctor_get(x_7, 1);
  lean_inc(x_9);
  lean_dec(x_7);
  x_10 = l_Lean_Meta_isTypeFormerType(x_8, x_2, x_3, x_4, x_5, x_9);
  return x_10;
  }
  else
  {
  uint8_t x_11; 
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  x_11 = !lean_is_exclusive(x_7);
  if (x_11 == 0)
  {
  return x_7;
  }
  else
  {
  lean_object* x_12; lean_object* x_13; lean_object* x_14; 
  x_12 = lean_ctor_get(x_7, 0);
  x_13 = lean_ctor_get(x_7, 1);
  lean_inc(x_13);
  lean_inc(x_12);
  lean_dec(x_7);
  x_14 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_14, 0, x_12);
  lean_ctor_set(x_14, 1, x_13);
  return x_14;
  }
  }
  }
  }
  lean_object* initialize_Init(lean_object*);
  lean_object* initialize_Lean_Data_LBool(lean_object*);
  lean_object* initialize_Lean_Meta_Basic(lean_object*);
  static bool _G_initialized = false;
  lean_object* initialize_Lean_Meta_InferType(lean_object* w) {
  lean_object * res;
  if (_G_initialized) return lean_io_result_mk_ok(lean_box(0));
  _G_initialized = true;
  res = initialize_Init(lean_io_mk_world());
  if (lean_io_result_is_error(res)) return res;
  lean_dec_ref(res);
  res = initialize_Lean_Data_LBool(lean_io_mk_world());
  if (lean_io_result_is_error(res)) return res;
  lean_dec_ref(res);
  res = initialize_Lean_Meta_Basic(lean_io_mk_world());
  if (lean_io_result_is_error(res)) return res;
  lean_dec_ref(res);
  l___private_Lean_Expr_0__Lean_Expr_withAppRevAux___at_Lean_Expr_instantiateBetaRevRange_visit___spec__10___boxed__const__1 = _init_l___private_Lean_Expr_0__Lean_Expr_withAppRevAux___at_Lean_Expr_instantiateBetaRevRange_visit___spec__10___boxed__const__1();
  lean_mark_persistent(l___private_Lean_Expr_0__Lean_Expr_withAppRevAux___at_Lean_Expr_instantiateBetaRevRange_visit___spec__10___boxed__const__1);
  l_Lean_Expr_instantiateBetaRevRange_visit___closed__1 = _init_l_Lean_Expr_instantiateBetaRevRange_visit___closed__1();
  lean_mark_persistent(l_Lean_Expr_instantiateBetaRevRange_visit___closed__1);
  l_Lean_Expr_instantiateBetaRevRange_visit___closed__2 = _init_l_Lean_Expr_instantiateBetaRevRange_visit___closed__2();
  lean_mark_persistent(l_Lean_Expr_instantiateBetaRevRange_visit___closed__2);
  l_Lean_Expr_instantiateBetaRevRange_visit___closed__3 = _init_l_Lean_Expr_instantiateBetaRevRange_visit___closed__3();
  lean_mark_persistent(l_Lean_Expr_instantiateBetaRevRange_visit___closed__3);
  l_Lean_Expr_instantiateBetaRevRange_visit___closed__4 = _init_l_Lean_Expr_instantiateBetaRevRange_visit___closed__4();
  lean_mark_persistent(l_Lean_Expr_instantiateBetaRevRange_visit___closed__4);
  l_Lean_Expr_instantiateBetaRevRange_visit___closed__5 = _init_l_Lean_Expr_instantiateBetaRevRange_visit___closed__5();
  lean_mark_persistent(l_Lean_Expr_instantiateBetaRevRange_visit___closed__5);
  l_Lean_Expr_instantiateBetaRevRange_visit___closed__6 = _init_l_Lean_Expr_instantiateBetaRevRange_visit___closed__6();
  lean_mark_persistent(l_Lean_Expr_instantiateBetaRevRange_visit___closed__6);
  l_Lean_Expr_instantiateBetaRevRange_visit___closed__7 = _init_l_Lean_Expr_instantiateBetaRevRange_visit___closed__7();
  lean_mark_persistent(l_Lean_Expr_instantiateBetaRevRange_visit___closed__7);
  l_Lean_Expr_instantiateBetaRevRange_visit___closed__8 = _init_l_Lean_Expr_instantiateBetaRevRange_visit___closed__8();
  lean_mark_persistent(l_Lean_Expr_instantiateBetaRevRange_visit___closed__8);
  l_Lean_Expr_instantiateBetaRevRange_visit___closed__9 = _init_l_Lean_Expr_instantiateBetaRevRange_visit___closed__9();
  lean_mark_persistent(l_Lean_Expr_instantiateBetaRevRange_visit___closed__9);
  l_Lean_Expr_instantiateBetaRevRange_visit___closed__10 = _init_l_Lean_Expr_instantiateBetaRevRange_visit___closed__10();
  lean_mark_persistent(l_Lean_Expr_instantiateBetaRevRange_visit___closed__10);
  l_Lean_Expr_instantiateBetaRevRange_visit___closed__11 = _init_l_Lean_Expr_instantiateBetaRevRange_visit___closed__11();
  lean_mark_persistent(l_Lean_Expr_instantiateBetaRevRange_visit___closed__11);
  l_Lean_Expr_instantiateBetaRevRange_visit___closed__12 = _init_l_Lean_Expr_instantiateBetaRevRange_visit___closed__12();
  lean_mark_persistent(l_Lean_Expr_instantiateBetaRevRange_visit___closed__12);
  l_Lean_Expr_instantiateBetaRevRange___closed__1 = _init_l_Lean_Expr_instantiateBetaRevRange___closed__1();
  lean_mark_persistent(l_Lean_Expr_instantiateBetaRevRange___closed__1);
  l_Lean_Expr_instantiateBetaRevRange___closed__2 = _init_l_Lean_Expr_instantiateBetaRevRange___closed__2();
  lean_mark_persistent(l_Lean_Expr_instantiateBetaRevRange___closed__2);
  l_Lean_Expr_instantiateBetaRevRange___closed__3 = _init_l_Lean_Expr_instantiateBetaRevRange___closed__3();
  lean_mark_persistent(l_Lean_Expr_instantiateBetaRevRange___closed__3);
  l_Lean_Expr_instantiateBetaRevRange___closed__4 = _init_l_Lean_Expr_instantiateBetaRevRange___closed__4();
  lean_mark_persistent(l_Lean_Expr_instantiateBetaRevRange___closed__4);
  l_Lean_Expr_instantiateBetaRevRange___closed__5 = _init_l_Lean_Expr_instantiateBetaRevRange___closed__5();
  lean_mark_persistent(l_Lean_Expr_instantiateBetaRevRange___closed__5);
  l_Lean_Expr_instantiateBetaRevRange___closed__6 = _init_l_Lean_Expr_instantiateBetaRevRange___closed__6();
  lean_mark_persistent(l_Lean_Expr_instantiateBetaRevRange___closed__6);
  l_Lean_Meta_throwFunctionExpected___rarg___closed__1 = _init_l_Lean_Meta_throwFunctionExpected___rarg___closed__1();
  lean_mark_persistent(l_Lean_Meta_throwFunctionExpected___rarg___closed__1);
  l_Lean_Meta_throwFunctionExpected___rarg___closed__2 = _init_l_Lean_Meta_throwFunctionExpected___rarg___closed__2();
  lean_mark_persistent(l_Lean_Meta_throwFunctionExpected___rarg___closed__2);
  l_Lean_Meta_throwIncorrectNumberOfLevels___rarg___closed__1 = _init_l_Lean_Meta_throwIncorrectNumberOfLevels___rarg___closed__1();
  lean_mark_persistent(l_Lean_Meta_throwIncorrectNumberOfLevels___rarg___closed__1);
  l_Lean_Meta_throwIncorrectNumberOfLevels___rarg___closed__2 = _init_l_Lean_Meta_throwIncorrectNumberOfLevels___rarg___closed__2();
  lean_mark_persistent(l_Lean_Meta_throwIncorrectNumberOfLevels___rarg___closed__2);
  l_Std_Range_forIn_loop___at___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType___spec__3___closed__1 = _init_l_Std_Range_forIn_loop___at___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType___spec__3___closed__1();
  lean_mark_persistent(l_Std_Range_forIn_loop___at___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType___spec__3___closed__1);
  l_Std_Range_forIn_loop___at___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType___spec__3___closed__2 = _init_l_Std_Range_forIn_loop___at___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType___spec__3___closed__2();
  lean_mark_persistent(l_Std_Range_forIn_loop___at___private_Lean_Meta_InferType_0__Lean_Meta_inferProjType___spec__3___closed__2);
  l_Lean_Meta_throwTypeExcepted___rarg___closed__1 = _init_l_Lean_Meta_throwTypeExcepted___rarg___closed__1();
  lean_mark_persistent(l_Lean_Meta_throwTypeExcepted___rarg___closed__1);
  l_Lean_Meta_throwTypeExcepted___rarg___closed__2 = _init_l_Lean_Meta_throwTypeExcepted___rarg___closed__2();
  lean_mark_persistent(l_Lean_Meta_throwTypeExcepted___rarg___closed__2);
  l___private_Lean_Meta_InferType_0__Lean_Meta_inferForallType___closed__1 = _init_l___private_Lean_Meta_InferType_0__Lean_Meta_inferForallType___closed__1();
  lean_mark_persistent(l___private_Lean_Meta_InferType_0__Lean_Meta_inferForallType___closed__1);
  l___private_Lean_Meta_InferType_0__Lean_Meta_inferLambdaType___closed__1 = _init_l___private_Lean_Meta_InferType_0__Lean_Meta_inferLambdaType___closed__1();
  lean_mark_persistent(l___private_Lean_Meta_InferType_0__Lean_Meta_inferLambdaType___closed__1);
  l_Lean_Meta_inferTypeImp_infer___closed__1 = _init_l_Lean_Meta_inferTypeImp_infer___closed__1();
  lean_mark_persistent(l_Lean_Meta_inferTypeImp_infer___closed__1);
  l_Lean_Meta_inferTypeImp_infer___closed__2 = _init_l_Lean_Meta_inferTypeImp_infer___closed__2();
  lean_mark_persistent(l_Lean_Meta_inferTypeImp_infer___closed__2);
  l_Lean_Meta_setInferTypeRef___closed__1 = _init_l_Lean_Meta_setInferTypeRef___closed__1();
  lean_mark_persistent(l_Lean_Meta_setInferTypeRef___closed__1);
  res = l_Lean_Meta_setInferTypeRef(lean_io_mk_world());
  if (lean_io_result_is_error(res)) return res;
  lean_dec_ref(res);
  return lean_io_result_mk_ok(lean_box(0));
  }
  #ifdef __cplusplus
  }
  #endif
  