// Lean compiler output
// Module: Lean.Elab.Deriving.Basic
// Imports: public import Lean.Elab.App public import Lean.Elab.DeclNameGen import Lean.Compiler.NoncomputableAttr
#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_string_utf8_byte_size(lean_object*);
uint8_t lean_nat_dec_eq(lean_object*, lean_object*);
lean_object* l_String_Slice_Pattern_ForwardSliceSearcher_buildTable(lean_object*);
lean_object* l_String_Slice_slice_x21(lean_object*, lean_object*, lean_object*);
lean_object* lean_string_utf8_extract(lean_object*, lean_object*, lean_object*);
lean_object* lean_string_append(lean_object*, lean_object*);
lean_object* lean_nat_sub(lean_object*, lean_object*);
lean_object* lean_nat_add(lean_object*, lean_object*);
lean_object* lean_string_utf8_next_fast(lean_object*, lean_object*);
uint8_t lean_nat_dec_le(lean_object*, lean_object*);
uint8_t lean_nat_dec_lt(lean_object*, lean_object*);
lean_object* l_String_Slice_pos_x21(lean_object*, lean_object*);
uint8_t lean_string_get_byte_fast(lean_object*, lean_object*);
uint8_t lean_uint8_dec_eq(uint8_t, uint8_t);
lean_object* lean_array_fget_borrowed(lean_object*, lean_object*);
lean_object* l_String_Slice_posGE___redArg(lean_object*, lean_object*);
uint64_t l_Lean_instHashableMVarId_hash(lean_object*);
size_t lean_uint64_to_usize(uint64_t);
size_t lean_usize_shift_left(size_t, size_t);
size_t lean_usize_sub(size_t, size_t);
size_t lean_usize_land(size_t, size_t);
lean_object* lean_usize_to_nat(size_t);
lean_object* lean_array_get_size(lean_object*);
lean_object* lean_array_fget(lean_object*, lean_object*);
lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*);
uint8_t l_Lean_instBEqMVarId_beq(lean_object*, lean_object*);
lean_object* l_Lean_PersistentHashMap_mkCollisionNode___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
size_t lean_usize_shift_right(size_t, size_t);
size_t lean_usize_add(size_t, size_t);
lean_object* lean_array_push(lean_object*, lean_object*);
lean_object* l_Lean_PersistentHashMap_mkEmptyEntries(lean_object*, lean_object*);
size_t lean_usize_mul(size_t, size_t);
uint8_t lean_usize_dec_le(size_t, size_t);
lean_object* l_Lean_PersistentHashMap_getCollisionNodeSize___redArg(lean_object*);
lean_object* l_Lean_Meta_whnfCore(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Expr_getAppFn(lean_object*);
lean_object* lean_st_ref_get(lean_object*);
lean_object* l_Lean_Environment_setExporting(lean_object*, uint8_t);
lean_object* l_Lean_mkAppN(lean_object*, lean_object*);
lean_object* lean_infer_type(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Meta_forallMetaTelescopeReducing(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Expr_sort___override(lean_object*);
lean_object* l_Lean_Expr_getAppNumArgs(lean_object*);
lean_object* lean_mk_array(lean_object*, lean_object*);
lean_object* l___private_Lean_Expr_0__Lean_Expr_getAppArgsAux(lean_object*, lean_object*, lean_object*);
lean_object* l_Array_toSubarray___redArg(lean_object*, lean_object*, lean_object*);
size_t lean_array_size(lean_object*);
uint8_t lean_usize_dec_lt(size_t, size_t);
lean_object* lean_array_uget_borrowed(lean_object*, size_t);
lean_object* l_Lean_Expr_mvarId_x21(lean_object*);
lean_object* lean_st_ref_take(lean_object*);
lean_object* lean_st_ref_set(lean_object*, lean_object*);
lean_object* l_Lean_Meta_isClass_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* lean_mk_empty_array_with_capacity(lean_object*);
lean_object* lean_array_get(lean_object*, lean_object*, lean_object*);
uint8_t l_Lean_BinderInfo_isInstImplicit(uint8_t);
lean_object* l_Lean_MVarId_setKind___redArg(lean_object*, uint8_t, lean_object*);
lean_object* l_Lean_Meta_mkFreshExprMVar(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_stringToMessageData(lean_object*);
lean_object* l_Lean_indentExpr(lean_object*);
lean_object* l_Lean_MessageData_ofFormat(lean_object*);
lean_object* l_Lean_MessageData_ofConstName(lean_object*, uint8_t);
lean_object* l_Lean_Core_getMessageLog___redArg(lean_object*);
lean_object* l_Lean_MessageLog_append(lean_object*, lean_object*);
lean_object* l_Lean_Core_setMessageLog___redArg(lean_object*, lean_object*);
lean_object* l_Lean_MessageData_note(lean_object*);
uint8_t l_Lean_MessageLog_hasErrors(lean_object*);
lean_object* l_Lean_Core_resetMessageLog___redArg(lean_object*);
uint8_t l_Lean_Exception_isInterrupt(lean_object*);
uint8_t l_Lean_Exception_isRuntime(lean_object*);
lean_object* l_Lean_Name_mkStr2(lean_object*, lean_object*);
lean_object* lean_io_get_num_heartbeats();
double lean_float_of_nat(lean_object*);
lean_object* l_Lean_replaceRef(lean_object*, lean_object*);
lean_object* l_Lean_PersistentArray_toArray___redArg(lean_object*);
lean_object* lean_array_uset(lean_object*, size_t, lean_object*);
lean_object* l_Lean_PersistentArray_push___redArg(lean_object*, lean_object*);
extern lean_object* l_Lean_trace_profiler;
lean_object* l_Std_DTreeMap_Internal_Impl_Const_get_x3f___at___00Lean_NameMap_find_x3f_spec__0___redArg(lean_object*, lean_object*);
lean_object* l_Lean_TraceResult_toEmoji(uint8_t);
lean_object* l_Lean_PersistentArray_append___redArg(lean_object*, lean_object*);
double lean_float_sub(double, double);
uint8_t lean_float_decLt(double, double);
extern lean_object* l_Lean_trace_profiler_useHeartbeats;
extern lean_object* l_Lean_trace_profiler_threshold;
double lean_float_div(double, double);
lean_object* lean_io_mono_nanos_now();
lean_object* l_Lean_Elab_Term_saveState___redArg(lean_object*, lean_object*, lean_object*);
extern lean_object* l_Lean_NameSet_empty;
uint8_t l_Lean_BinderInfo_isExplicit(uint8_t);
lean_object* l_Lean_MVarId_getDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
uint8_t lean_is_out_param(lean_object*);
lean_object* l_Lean_Elab_Term_isMVarApp___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_Term_SavedState_restore(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* lean_array_set(lean_object*, lean_object*, lean_object*);
extern lean_object* l_Lean_instInhabitedExpr;
lean_object* lean_array_get_borrowed(lean_object*, lean_object*, lean_object*);
uint8_t l_Lean_Expr_hasMVar(lean_object*);
lean_object* l_Lean_instantiateMVarsCore(lean_object*, lean_object*);
uint8_t lean_expr_eqv(lean_object*, lean_object*);
lean_object* lean_replace_expr(lean_object*, lean_object*);
lean_object* l_Lean_Meta_synthInstance_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Meta_isExprDefEq(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Name_mkStr1(lean_object*);
lean_object* l_Lean_Name_append(lean_object*, lean_object*);
uint8_t l___private_Lean_Util_Trace_0__Lean_checkTraceOption_go(lean_object*, lean_object*, lean_object*);
lean_object* l_Nat_reprFast(lean_object*);
lean_object* l_Lean_MessageLog_add(lean_object*, lean_object*);
lean_object* l___private_Lean_Log_0__Lean_MessageData_appendDescriptionWidgetIfNamed(lean_object*);
lean_object* l_Lean_FileMap_toPosition(lean_object*, lean_object*);
uint8_t l_Lean_MessageData_hasTag(lean_object*, lean_object*);
lean_object* l_Lean_Syntax_getTailPos_x3f(lean_object*, uint8_t);
lean_object* l_Lean_Syntax_getPos_x3f(lean_object*, uint8_t);
uint8_t lean_string_dec_eq(lean_object*, lean_object*);
uint8_t l_Lean_instBEqMessageSeverity_beq(uint8_t, uint8_t);
extern lean_object* l_Lean_warningAsError;
uint8_t l_Lean_MessageData_hasSyntheticSorry(lean_object*);
lean_object* l_Lean_InternalExceptionId_getName(lean_object*);
lean_object* l_Lean_MessageData_ofName(lean_object*);
lean_object* lean_io_error_to_string(lean_object*);
uint8_t l_Lean_Elab_isAbortExceptionId(lean_object*);
lean_object* l_Lean_Elab_Term_synthesizeAppInstMVars(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_Term_synthesizeSyntheticMVarsNoPostponing(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Meta_isExprDefEqGuarded(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Meta_unfoldDefinition_x3f(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_MessageData_ofExpr(lean_object*);
lean_object* l_Lean_Elab_getBetterRef(lean_object*, lean_object*);
extern lean_object* l_Lean_Elab_pp_macroStack;
lean_object* l_Lean_MessageData_ofSyntax(lean_object*);
lean_object* l_Lean_indentD(lean_object*);
lean_object* l_Lean_Meta_Closure_mkValueTypeClosure(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_Term_elabTerm(lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_Term_synthesizeSyntheticMVars(uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_forallTelescopeReducingAuxAux(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*);
extern lean_object* l_Lean_Elab_abortTermExceptionId;
size_t lean_usize_of_nat(lean_object*);
uint8_t lean_usize_dec_eq(size_t, size_t);
lean_object* l_Lean_Expr_fvarId_x21(lean_object*);
lean_object* l_Lean_LocalDecl_userName(lean_object*);
lean_object* l_Lean_Core_mkFreshUserName(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_LocalContext_setUserName(lean_object*, lean_object*, lean_object*);
lean_object* lean_local_ctx_find(lean_object*, lean_object*);
lean_object* l_mkPanicMessageWithDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
extern lean_object* l_Lean_instInhabitedLocalDecl_default;
lean_object* lean_panic_fn(lean_object*, lean_object*);
lean_object* l_Lean_Elab_Term_withoutErrToSorryImp___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Meta_registerInstance(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Syntax_getRange_x3f(lean_object*, uint8_t);
lean_object* l_Lean_DeclarationRange_ofStringPositions(lean_object*, lean_object*, lean_object*);
uint8_t l_Lean_Name_isAnonymous(lean_object*);
extern lean_object* l_Lean_declRangeExt;
lean_object* l_Lean_MapDeclarationExtension_insert___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_PersistentHashMap_mkEmptyEntriesArray(lean_object*, lean_object*);
lean_object* l_Lean_addDecl(lean_object*, uint8_t, lean_object*, lean_object*);
lean_object* l_Lean_addNoncomputable(lean_object*, lean_object*);
lean_object* l_Lean_addAndCompile(lean_object*, uint8_t, lean_object*, lean_object*);
lean_object* l_Lean_Environment_find_x3f(lean_object*, lean_object*, uint8_t);
uint8_t l_Lean_Environment_contains(lean_object*, lean_object*, uint8_t);
extern lean_object* l_Lean_Options_empty;
lean_object* l_Lean_Environment_getModuleIdxFor_x3f(lean_object*, lean_object*);
lean_object* l_Lean_Environment_header(lean_object*);
lean_object* l_Lean_EnvironmentHeader_moduleNames(lean_object*);
uint8_t l_Lean_isPrivateName(lean_object*);
extern lean_object* l_Lean_unknownIdentifierMessageTag;
lean_object* l_Lean_Expr_beta(lean_object*, lean_object*);
lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_lambdaTelescopeImp(lean_object*, lean_object*, uint8_t, uint8_t, uint8_t, uint8_t, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_Command_NameGen_mkBaseNameWithSuffix(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_mkUnusedBaseName(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_expandMacroImpl_x3f(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_mkPrivateName(lean_object*, lean_object*);
lean_object* l_Lean_privateToUserName(lean_object*);
lean_object* l_Lean_ResolveName_resolveNamespace(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_ResolveName_resolveGlobalName(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
extern lean_object* l_Lean_instInhabitedEffectiveImport_default;
lean_object* l_Lean_instHashableExtraModUse_hash___boxed(lean_object*);
lean_object* l_Lean_instBEqExtraModUse_beq___boxed(lean_object*, lean_object*);
lean_object* l_Lean_PersistentHashMap_empty(lean_object*, lean_object*, lean_object*, lean_object*);
extern lean_object* l___private_Lean_ExtraModUses_0__Lean_extraModUses;
lean_object* l_Lean_PersistentEnvExtension_addEntry___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_SimplePersistentEnvExtension_getState___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
uint64_t l_Lean_instHashableExtraModUse_hash(lean_object*);
uint8_t l_Lean_instBEqExtraModUse_beq(lean_object*, lean_object*);
lean_object* l_Lean_Name_hash___override___boxed(lean_object*);
lean_object* l_Lean_Name_beq___boxed(lean_object*, lean_object*);
lean_object* l_Std_HashMap_instInhabited(lean_object*, lean_object*, lean_object*, lean_object*);
extern lean_object* l_Lean_indirectModUseExt;
uint64_t lean_uint64_shift_right(uint64_t, uint64_t);
uint64_t lean_uint64_xor(uint64_t, uint64_t);
uint8_t lean_name_eq(lean_object*, lean_object*);
uint64_t lean_uint64_of_nat(lean_object*);
uint8_t l_Lean_isMarkedMeta(lean_object*, lean_object*);
lean_object* l_List_reverse___redArg(lean_object*);
extern lean_object* l_Lean_maxRecDepthErrorMessage;
extern lean_object* l_Lean_Elab_unsupportedSyntaxExceptionId;
uint32_t l_Lean_getMaxHeight(lean_object*, lean_object*);
uint32_t lean_uint32_add(uint32_t, uint32_t);
lean_object* lean_array_to_list(lean_object*);
uint8_t l_Lean_Environment_hasUnsafe(lean_object*, lean_object*);
lean_object* l_Lean_Meta_isProp(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
uint8_t l_Lean_isNoncomputable(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_mkPtrSet___redArg(lean_object*);
lean_object* l___private_Lean_Util_FoldConsts_0__Lean_Expr_FoldConstsImpl_fold_visit(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Syntax_reprint(lean_object*);
lean_object* l_String_Slice_trimAscii(lean_object*);
uint8_t l_Lean_ConstantInfo_hasValue(lean_object*, uint8_t);
extern lean_object* l_Lean_Elab_Command_commandElabAttribute;
lean_object* l_Lean_Name_mkStr4(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Name_mkStr3(lean_object*, lean_object*, lean_object*);
uint8_t l_Lean_Syntax_isIdent(lean_object*);
lean_object* l_Lean_Elab_Term_elabTermAndSynthesize(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_realizeGlobalConstNoOverload(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Environment_findConstVal_x3f(lean_object*, lean_object*, uint8_t);
lean_object* l_Lean_mkLevelParam(lean_object*);
lean_object* l_Lean_mkConst(lean_object*, lean_object*);
uint8_t l_Lean_ConstantInfo_isDefinition(lean_object*);
lean_object* l_Lean_Elab_Command_runTermElabM___redArg(lean_object*, lean_object*, lean_object*);
uint8_t l_Lean_Syntax_isOfKind(lean_object*, lean_object*);
lean_object* l_Lean_Elab_realizeGlobalConstNoOverloadWithInfo(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_Command_getRef___redArg(lean_object*);
lean_object* l_Lean_Elab_Command_liftCoreM___redArg(lean_object*, lean_object*, lean_object*);
lean_object* l_Std_DTreeMap_Internal_Impl_insert___at___00Lean_NameMap_insert_spec__0___redArg(lean_object*, lean_object*, lean_object*);
uint8_t l_Lean_Name_isPrefixOf(lean_object*, lean_object*);
lean_object* l_Array_mkArray0(lean_object*);
lean_object* l_Lean_SourceInfo_fromRef(lean_object*, uint8_t);
extern lean_object* l_Lean_firstFrontendMacroScope;
lean_object* l_Lean_addMacroScope(lean_object*, lean_object*, lean_object*);
lean_object* l_String_toRawSubstring_x27(lean_object*);
lean_object* l_Lean_Syntax_node2(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Syntax_node1(lean_object*, lean_object*, lean_object*);
lean_object* lean_st_mk_ref(lean_object*);
extern lean_object* l_Lean_Elab_Command_instInhabitedScope_default;
lean_object* l_List_head_x21___redArg(lean_object*, lean_object*);
lean_object* l_Lean_MessageData_andList(lean_object*);
extern lean_object* l_Lean_inheritedTraceOptions;
lean_object* l_Lean_Elab_Command_withScope___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*);
uint8_t l_Lean_Syntax_isNone(lean_object*);
uint8_t l_Lean_Syntax_matchesNull(lean_object*, lean_object*);
lean_object* lean_array_uget(lean_object*, size_t);
lean_object* l_Lean_Syntax_getArgs(lean_object*);
lean_object* lean_mk_empty_array_with_capacity(lean_object*);
lean_object* l_Lean_KeyedDeclsAttribute_addBuiltin___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Name_str___override(lean_object*, lean_object*);
lean_object* l_Lean_Name_num___override(lean_object*, lean_object*);
lean_object* l_Lean_registerTraceClass(lean_object*, uint8_t, lean_object*);
lean_object* l_Lean_addBuiltinDeclarationRanges(lean_object*, lean_object*);
lean_object* l_Lean_initializing();
lean_object* lean_mk_io_user_error(lean_object*);
lean_object* l_Lean_Elab_Term_registerDerivableClass(lean_object*);
LEAN_EXPORT lean_object* l_Lean_addMessageContextFull___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure_spec__0_spec__0(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_addMessageContextFull___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure_spec__0_spec__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure_spec__0___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure_spec__0___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static const lean_string_object l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 25, .m_capacity = 25, .m_length = 24, .m_data = "Failed to delta derive `"};
static const lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__0 = (const lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__0_value;
static lean_once_cell_t l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__1_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__1;
static const lean_string_object l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__2_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 17, .m_capacity = 17, .m_length = 16, .m_data = "` instance for `"};
static const lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__2 = (const lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__2_value;
static lean_once_cell_t l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__3_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__3;
static const lean_string_object l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__4_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 2, .m_capacity = 2, .m_length = 1, .m_data = "`"};
static const lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__4 = (const lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__4_value;
static lean_once_cell_t l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__5_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__5;
static const lean_string_object l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__6_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 3, .m_capacity = 3, .m_length = 2, .m_data = ", "};
static const lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__6 = (const lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__6_value;
static lean_once_cell_t l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__7_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__7;
static const lean_string_object l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__8_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 2, .m_capacity = 2, .m_length = 1, .m_data = "."};
static const lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__8 = (const lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__8_value;
static lean_once_cell_t l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__9_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__9;
LEAN_EXPORT lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure_spec__0(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure_spec__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_instantiateMVars___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__0___redArg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_instantiateMVars___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__0___redArg___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_instantiateMVars___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__0(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_instantiateMVars___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static const lean_string_object l_Lean_isTracingEnabledFor___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__2___redArg___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 6, .m_capacity = 6, .m_length = 5, .m_data = "trace"};
static const lean_object* l_Lean_isTracingEnabledFor___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__2___redArg___closed__0 = (const lean_object*)&l_Lean_isTracingEnabledFor___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__2___redArg___closed__0_value;
static const lean_ctor_object l_Lean_isTracingEnabledFor___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__2___redArg___closed__1_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)&l_Lean_isTracingEnabledFor___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__2___redArg___closed__0_value),LEAN_SCALAR_PTR_LITERAL(212, 145, 141, 177, 67, 149, 127, 197)}};
static const lean_object* l_Lean_isTracingEnabledFor___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__2___redArg___closed__1 = (const lean_object*)&l_Lean_isTracingEnabledFor___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__2___redArg___closed__1_value;
LEAN_EXPORT lean_object* l_Lean_isTracingEnabledFor___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__2___redArg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_isTracingEnabledFor___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__2___redArg___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_isTracingEnabledFor___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_isTracingEnabledFor___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_once_cell_t l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__6___redArg___closed__0_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__6___redArg___closed__0;
static lean_once_cell_t l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__6___redArg___closed__1_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__6___redArg___closed__1;
LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__6___redArg(lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__6___redArg___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT uint8_t l_Lean_Option_get___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__7(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Option_get___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__7___boxed(lean_object*, lean_object*);
static const lean_string_object l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___lam__0___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 19, .m_capacity = 19, .m_length = 18, .m_data = "Unfolded value to "};
static const lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___lam__0___closed__0 = (const lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___lam__0___closed__0_value;
static lean_once_cell_t l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___lam__0___closed__1_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___lam__0___closed__1;
LEAN_EXPORT lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___lam__0(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___lam__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_once_cell_t l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg___closed__0_once = LEAN_ONCE_CELL_INITIALIZER;
static double l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg___closed__0;
static const lean_string_object l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg___closed__1_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 1, .m_capacity = 1, .m_length = 0, .m_data = ""};
static const lean_object* l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg___closed__1 = (const lean_object*)&l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg___closed__1_value;
static const lean_array_object l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg___closed__2_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_array_object) + sizeof(void*)*0, .m_other = 0, .m_tag = 246}, .m_size = 0, .m_capacity = 0, .m_data = {}};
static const lean_object* l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg___closed__2 = (const lean_object*)&l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg___closed__2_value;
LEAN_EXPORT lean_object* l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___lam__0(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___lam__0___boxed(lean_object*, lean_object*, lean_object*);
static const lean_string_object l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 51, .m_capacity = 51, .m_length = 50, .m_data = "instance diamond: the instance for the target type"};
static const lean_object* l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___closed__0 = (const lean_object*)&l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___closed__0_value;
static lean_once_cell_t l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___closed__1_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___closed__1;
static const lean_string_object l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___closed__2_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 69, .m_capacity = 69, .m_length = 68, .m_data = "\nis not definitionally equal to the instance for the underlying type"};
static const lean_object* l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___closed__2 = (const lean_object*)&l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___closed__2_value;
static lean_once_cell_t l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___closed__3_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___closed__3;
static const lean_string_object l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___closed__4_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 5, .m_capacity = 5, .m_length = 4, .m_data = "\nfor"};
static const lean_object* l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___closed__4 = (const lean_object*)&l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___closed__4_value;
static lean_once_cell_t l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___closed__5_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___closed__5;
static const lean_ctor_object l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___closed__6_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*1 + 0, .m_other = 1, .m_tag = 3}, .m_objs = {((lean_object*)&l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg___closed__1_value)}};
static const lean_object* l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___closed__6 = (const lean_object*)&l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___closed__6_value;
static lean_once_cell_t l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___closed__7_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___closed__7;
LEAN_EXPORT lean_object* l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg(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_EXPORT lean_object* l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___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*, lean_object*, lean_object*);
static const lean_string_object l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg___lam__0___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 5, .m_capacity = 5, .m_length = 4, .m_data = "Elab"};
static const lean_object* l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg___lam__0___closed__0 = (const lean_object*)&l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg___lam__0___closed__0_value;
static const lean_string_object l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg___lam__0___closed__1_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 7, .m_capacity = 7, .m_length = 6, .m_data = "Tactic"};
static const lean_object* l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg___lam__0___closed__1 = (const lean_object*)&l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg___lam__0___closed__1_value;
static const lean_string_object l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg___lam__0___closed__2_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 14, .m_capacity = 14, .m_length = 13, .m_data = "unsolvedGoals"};
static const lean_object* l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg___lam__0___closed__2 = (const lean_object*)&l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg___lam__0___closed__2_value;
static const lean_string_object l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg___lam__0___closed__3_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 17, .m_capacity = 17, .m_length = 16, .m_data = "synthPlaceholder"};
static const lean_object* l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg___lam__0___closed__3 = (const lean_object*)&l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg___lam__0___closed__3_value;
static const lean_string_object l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg___lam__0___closed__4_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 5, .m_capacity = 5, .m_length = 4, .m_data = "lean"};
static const lean_object* l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg___lam__0___closed__4 = (const lean_object*)&l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg___lam__0___closed__4_value;
static const lean_string_object l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg___lam__0___closed__5_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 20, .m_capacity = 20, .m_length = 19, .m_data = "inductionWithNoAlts"};
static const lean_object* l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg___lam__0___closed__5 = (const lean_object*)&l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg___lam__0___closed__5_value;
static const lean_string_object l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg___lam__0___closed__6_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 12, .m_capacity = 12, .m_length = 11, .m_data = "_namedError"};
static const lean_object* l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg___lam__0___closed__6 = (const lean_object*)&l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg___lam__0___closed__6_value;
LEAN_EXPORT uint8_t l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg___lam__0(uint8_t, uint8_t, lean_object*);
LEAN_EXPORT lean_object* l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg___lam__0___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg(lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_log___at___00Lean_logError___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__5_spec__9(lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_log___at___00Lean_logError___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__5_spec__9___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_logError___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_logError___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static const lean_string_object l_Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 21, .m_capacity = 21, .m_length = 20, .m_data = "internal exception: "};
static const lean_object* l_Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4___closed__0 = (const lean_object*)&l_Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4___closed__0_value;
static lean_once_cell_t l_Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4___closed__1_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4___closed__1;
LEAN_EXPORT lean_object* l_Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___lam__0(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___lam__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static const lean_string_object l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 9, .m_capacity = 9, .m_length = 8, .m_data = "Deriving"};
static const lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__0 = (const lean_object*)&l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__0_value;
static const lean_ctor_object l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__1_value_aux_0 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)&l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg___lam__0___closed__0_value),LEAN_SCALAR_PTR_LITERAL(13, 84, 199, 228, 250, 36, 60, 178)}};
static const lean_ctor_object l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__1_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__1_value_aux_0),((lean_object*)&l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__0_value),LEAN_SCALAR_PTR_LITERAL(195, 196, 35, 37, 101, 57, 52, 43)}};
static const lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__1 = (const lean_object*)&l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__1_value;
static const lean_string_object l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__2_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 10, .m_capacity = 10, .m_length = 9, .m_data = "Argument "};
static const lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__2 = (const lean_object*)&l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__2_value;
static lean_once_cell_t l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__3_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__3;
static const lean_string_object l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__4_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 18, .m_capacity = 18, .m_length = 17, .m_data = " option succeeded"};
static const lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__4 = (const lean_object*)&l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__4_value;
static lean_once_cell_t l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__5_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__5;
static const lean_string_object l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__6_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 21, .m_capacity = 21, .m_length = 20, .m_data = "Option for argument "};
static const lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__6 = (const lean_object*)&l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__6_value;
static lean_once_cell_t l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__7_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__7;
static const lean_string_object l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__8_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 23, .m_capacity = 23, .m_length = 22, .m_data = " failed, logged errors"};
static const lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__8 = (const lean_object*)&l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__8_value;
static lean_once_cell_t l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__9_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__9;
static const lean_string_object l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__10_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 8, .m_capacity = 8, .m_length = 7, .m_data = " failed"};
static const lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__10 = (const lean_object*)&l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__10_value;
static lean_once_cell_t l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__11_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__11;
static const lean_string_object l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__12_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 14, .m_capacity = 14, .m_length = 13, .m_data = " gives option"};
static const lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__12 = (const lean_object*)&l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__12_value;
static lean_once_cell_t l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__13_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__13;
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5(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*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___boxed(lean_object**);
LEAN_EXPORT lean_object* l_MonadExcept_ofExcept___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__12___redArg(lean_object*);
LEAN_EXPORT lean_object* l_MonadExcept_ofExcept___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__12___redArg___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Option_get___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__13(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Option_get___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__13___boxed(lean_object*, lean_object*);
LEAN_EXPORT uint8_t l_Except_toTraceResult___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__10(lean_object*);
LEAN_EXPORT lean_object* l_Except_toTraceResult___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__10___boxed(lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Util_Trace_0__Lean_addTraceNode___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__11_spec__14(size_t, size_t, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Util_Trace_0__Lean_addTraceNode___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__11_spec__14___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_addTraceNode___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__11___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_addTraceNode___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__11___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static const lean_string_object l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 2, .m_capacity = 2, .m_length = 1, .m_data = " "};
static const lean_object* l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__0 = (const lean_object*)&l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__0_value;
static lean_once_cell_t l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__1_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__1;
static const lean_string_object l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__2_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 54, .m_capacity = 54, .m_length = 53, .m_data = "<exception thrown while producing trace node message>"};
static const lean_object* l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__2 = (const lean_object*)&l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__2_value;
static lean_once_cell_t l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__3_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__3;
static lean_once_cell_t l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__4_once = LEAN_ONCE_CELL_INITIALIZER;
static double l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__4;
LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8(lean_object*, uint8_t, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___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*, lean_object*, lean_object*);
static const lean_string_object l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 57, .m_capacity = 57, .m_length = 56, .m_data = "the class has no explicit non-out-param parameters where"};
static const lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__0 = (const lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__0_value;
static lean_once_cell_t l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__1_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__1;
static const lean_string_object l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__2_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 18, .m_capacity = 18, .m_length = 17, .m_data = "\ncan be inserted."};
static const lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__2 = (const lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__2_value;
static lean_once_cell_t l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__3_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__3;
static const lean_string_object l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__4_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 169, .m_capacity = 169, .m_length = 168, .m_data = "Delta deriving tries the following strategies: (1) inserting the definition into each explicit non-out-param parameter of a class and (2) unfolding definitions further."};
static const lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__4 = (const lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__4_value;
static lean_once_cell_t l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__5_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__5;
static lean_once_cell_t l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__6_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__6;
static lean_once_cell_t l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__7_once = LEAN_ONCE_CELL_INITIALIZER;
static double l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__7;
static lean_once_cell_t l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__8_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__8;
static lean_once_cell_t l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__9_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__9;
static lean_once_cell_t l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__10_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__10;
static const lean_ctor_object l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__11_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*1 + 0, .m_other = 1, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1))}};
static const lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__11 = (const lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__11_value;
static const lean_string_object l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__12_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 27, .m_capacity = 27, .m_length = 26, .m_data = "Looking for arguments to `"};
static const lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__12 = (const lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__12_value;
static lean_once_cell_t l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__13_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__13;
static const lean_string_object l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__14_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 33, .m_capacity = 33, .m_length = 32, .m_data = "` that can be used for the value"};
static const lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__14 = (const lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__14_value;
static lean_once_cell_t l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__15_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__15;
LEAN_EXPORT lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go(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*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___boxed(lean_object**);
LEAN_EXPORT lean_object* l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_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*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___boxed(lean_object**);
LEAN_EXPORT lean_object* l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_MonadExcept_ofExcept___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__12(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_MonadExcept_ofExcept___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__12___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_addTraceNode___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__11(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_addTraceNode___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__11___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7(lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_once_cell_t l_List_foldl___at___00Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6_spec__9___closed__0_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_List_foldl___at___00Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6_spec__9___closed__0;
static const lean_string_object l_List_foldl___at___00Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6_spec__9___closed__1_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 16, .m_capacity = 16, .m_length = 15, .m_data = "while expanding"};
static const lean_object* l_List_foldl___at___00Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6_spec__9___closed__1 = (const lean_object*)&l_List_foldl___at___00Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6_spec__9___closed__1_value;
static const lean_ctor_object l_List_foldl___at___00Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6_spec__9___closed__2_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*1 + 0, .m_other = 1, .m_tag = 3}, .m_objs = {((lean_object*)&l_List_foldl___at___00Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6_spec__9___closed__1_value)}};
static const lean_object* l_List_foldl___at___00Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6_spec__9___closed__2 = (const lean_object*)&l_List_foldl___at___00Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6_spec__9___closed__2_value;
static lean_once_cell_t l_List_foldl___at___00Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6_spec__9___closed__3_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_List_foldl___at___00Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6_spec__9___closed__3;
LEAN_EXPORT lean_object* l_List_foldl___at___00Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6_spec__9(lean_object*, lean_object*);
static const lean_string_object l_Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6___redArg___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 25, .m_capacity = 25, .m_length = 24, .m_data = "with resulting expansion"};
static const lean_object* l_Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6___redArg___closed__0 = (const lean_object*)&l_Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6___redArg___closed__0_value;
static const lean_ctor_object l_Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6___redArg___closed__1_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*1 + 0, .m_other = 1, .m_tag = 3}, .m_objs = {((lean_object*)&l_Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6___redArg___closed__0_value)}};
static const lean_object* l_Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6___redArg___closed__1 = (const lean_object*)&l_Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6___redArg___closed__1_value;
static lean_once_cell_t l_Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6___redArg___closed__2_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6___redArg___closed__2;
LEAN_EXPORT lean_object* l_Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6___redArg(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insertAtCollisionNodeAux___at___00Lean_PersistentHashMap_insertAtCollisionNode___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4_spec__9_spec__11___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insertAtCollisionNode___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4_spec__9___redArg(lean_object*, lean_object*, lean_object*);
static lean_once_cell_t l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4___redArg___closed__0_once = LEAN_ONCE_CELL_INITIALIZER;
static size_t l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4___redArg___closed__0;
static lean_once_cell_t l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4___redArg___closed__1_once = LEAN_ONCE_CELL_INITIALIZER;
static size_t l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4___redArg___closed__1;
static lean_once_cell_t l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4___redArg___closed__2_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4___redArg___closed__2;
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4___redArg(lean_object*, size_t, size_t, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Data_PersistentHashMap_0__Lean_PersistentHashMap_insertAux_traverse___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4_spec__10___redArg(size_t, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Data_PersistentHashMap_0__Lean_PersistentHashMap_insertAux_traverse___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4_spec__10___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2___redArg(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1___redArg(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__2(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT uint8_t l_Lean_PersistentHashMap_containsAtAux___at___00Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0_spec__0_spec__1_spec__6___redArg(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_containsAtAux___at___00Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0_spec__0_spec__1_spec__6___redArg___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT uint8_t l_Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0_spec__0_spec__1___redArg(lean_object*, size_t, lean_object*);
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0_spec__0_spec__1___redArg___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT uint8_t l_Lean_PersistentHashMap_contains___at___00Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0_spec__0___redArg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_contains___at___00Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0_spec__0___redArg___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0___redArg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0___redArg___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__3(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_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*);
static lean_once_cell_t l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst___closed__0_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst___closed__0;
static const lean_array_object l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst___closed__1_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_array_object) + sizeof(void*)*0, .m_other = 0, .m_tag = 246}, .m_size = 0, .m_capacity = 0, .m_data = {}};
static const lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst___closed__1 = (const lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst___closed__1_value;
static const lean_string_object l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst___closed__2_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 38, .m_capacity = 38, .m_length = 37, .m_data = "Failed to delta derive instance for `"};
static const lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst___closed__2 = (const lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst___closed__2_value;
static lean_once_cell_t l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst___closed__3_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst___closed__3;
static const lean_string_object l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst___closed__4_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 16, .m_capacity = 16, .m_length = 15, .m_data = "`, not a class:"};
static const lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst___closed__4 = (const lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst___closed__4_value;
static lean_once_cell_t l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst___closed__5_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst___closed__5;
LEAN_EXPORT lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT uint8_t l_Lean_PersistentHashMap_contains___at___00Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0_spec__0(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_contains___at___00Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0_spec__0___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT uint8_t l_Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0_spec__0_spec__1(lean_object*, lean_object*, size_t, lean_object*);
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0_spec__0_spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT uint8_t l_Lean_PersistentHashMap_containsAtAux___at___00Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0_spec__0_spec__1_spec__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_containsAtAux___at___00Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0_spec__0_spec__1_spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insertAtCollisionNode___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4_spec__9(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Data_PersistentHashMap_0__Lean_PersistentHashMap_insertAux_traverse___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4_spec__10(lean_object*, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Data_PersistentHashMap_0__Lean_PersistentHashMap_insertAux_traverse___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4_spec__10___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insertAtCollisionNodeAux___at___00Lean_PersistentHashMap_insertAtCollisionNode___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4_spec__9_spec__11(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_panic___at___00Lean_Elab_Term_processDefDeriving_spec__0(lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_forallTelescope___at___00Lean_Elab_Term_processDefDeriving_spec__1___redArg___lam__0(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_forallTelescope___at___00Lean_Elab_Term_processDefDeriving_spec__1___redArg___lam__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_forallTelescope___at___00Lean_Elab_Term_processDefDeriving_spec__1___redArg(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_forallTelescope___at___00Lean_Elab_Term_processDefDeriving_spec__1___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_forallTelescope___at___00Lean_Elab_Term_processDefDeriving_spec__1(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_forallTelescope___at___00Lean_Elab_Term_processDefDeriving_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*);
static lean_once_cell_t l_Lean_Elab_throwAbortTerm___at___00Lean_Elab_Term_processDefDeriving_spec__2___redArg___closed__0_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_Elab_throwAbortTerm___at___00Lean_Elab_Term_processDefDeriving_spec__2___redArg___closed__0;
LEAN_EXPORT lean_object* l_Lean_Elab_throwAbortTerm___at___00Lean_Elab_Term_processDefDeriving_spec__2___redArg();
LEAN_EXPORT lean_object* l_Lean_Elab_throwAbortTerm___at___00Lean_Elab_Term_processDefDeriving_spec__2___redArg___boxed(lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_throwAbortTerm___at___00Lean_Elab_Term_processDefDeriving_spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_throwAbortTerm___at___00Lean_Elab_Term_processDefDeriving_spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_withLCtx_x27___at___00Lean_Elab_Term_processDefDeriving_spec__3___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_withLCtx_x27___at___00Lean_Elab_Term_processDefDeriving_spec__3___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_withLCtx_x27___at___00Lean_Elab_Term_processDefDeriving_spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_withLCtx_x27___at___00Lean_Elab_Term_processDefDeriving_spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Term_withoutErrToSorry___at___00Lean_Elab_Term_processDefDeriving_spec__5___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Term_withoutErrToSorry___at___00Lean_Elab_Term_processDefDeriving_spec__5___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Term_withoutErrToSorry___at___00Lean_Elab_Term_processDefDeriving_spec__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Term_withoutErrToSorry___at___00Lean_Elab_Term_processDefDeriving_spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_lambdaTelescope___at___00Lean_Elab_Term_processDefDeriving_spec__7___redArg(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_lambdaTelescope___at___00Lean_Elab_Term_processDefDeriving_spec__7___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_lambdaTelescope___at___00Lean_Elab_Term_processDefDeriving_spec__7(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_lambdaTelescope___at___00Lean_Elab_Term_processDefDeriving_spec__7___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_mkDefinitionValInferringUnsafe___at___00Lean_Elab_Term_processDefDeriving_spec__10___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_mkDefinitionValInferringUnsafe___at___00Lean_Elab_Term_processDefDeriving_spec__10___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_mkDefinitionValInferringUnsafe___at___00Lean_Elab_Term_processDefDeriving_spec__10(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_mkDefinitionValInferringUnsafe___at___00Lean_Elab_Term_processDefDeriving_spec__10___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_EXPORT lean_object* l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___lam__0(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___lam__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_once_cell_t l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__0_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__0;
static lean_once_cell_t l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__1_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__1;
static lean_once_cell_t l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__2_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__2;
static lean_once_cell_t l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__3_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__3;
LEAN_EXPORT lean_object* l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Term_processDefDeriving___lam__0(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Term_processDefDeriving___lam__0___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*);
LEAN_EXPORT lean_object* l_Lean_Elab_Term_processDefDeriving___lam__1(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Term_processDefDeriving___lam__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Term_processDefDeriving___lam__2(lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Term_processDefDeriving___lam__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static const lean_string_object l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Elab_Term_processDefDeriving_spec__4___redArg___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 26, .m_capacity = 26, .m_length = 25, .m_data = "Init.Data.Option.BasicAux"};
static const lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Elab_Term_processDefDeriving_spec__4___redArg___closed__0 = (const lean_object*)&l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Elab_Term_processDefDeriving_spec__4___redArg___closed__0_value;
static const lean_string_object l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Elab_Term_processDefDeriving_spec__4___redArg___closed__1_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 12, .m_capacity = 12, .m_length = 11, .m_data = "Option.get!"};
static const lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Elab_Term_processDefDeriving_spec__4___redArg___closed__1 = (const lean_object*)&l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Elab_Term_processDefDeriving_spec__4___redArg___closed__1_value;
static const lean_string_object l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Elab_Term_processDefDeriving_spec__4___redArg___closed__2_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 14, .m_capacity = 14, .m_length = 13, .m_data = "value is none"};
static const lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Elab_Term_processDefDeriving_spec__4___redArg___closed__2 = (const lean_object*)&l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Elab_Term_processDefDeriving_spec__4___redArg___closed__2_value;
static lean_once_cell_t l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Elab_Term_processDefDeriving_spec__4___redArg___closed__3_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Elab_Term_processDefDeriving_spec__4___redArg___closed__3;
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Elab_Term_processDefDeriving_spec__4___redArg(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Elab_Term_processDefDeriving_spec__4___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Term_processDefDeriving___lam__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Term_processDefDeriving___lam__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Term_processDefDeriving___lam__4(lean_object*, lean_object*, uint8_t, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Term_processDefDeriving___lam__4___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*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Term_processDefDeriving___lam__5(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Term_processDefDeriving___lam__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_getDeclarationRange_x3f___at___00Lean_Elab_addDeclarationRangesFromSyntax___at___00Lean_Elab_Term_processDefDeriving_spec__9_spec__17___redArg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_getDeclarationRange_x3f___at___00Lean_Elab_addDeclarationRangesFromSyntax___at___00Lean_Elab_Term_processDefDeriving_spec__9_spec__17___redArg___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_addDeclarationRanges___at___00Lean_Elab_addDeclarationRangesFromSyntax___at___00Lean_Elab_Term_processDefDeriving_spec__9_spec__18___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_addDeclarationRanges___at___00Lean_Elab_addDeclarationRangesFromSyntax___at___00Lean_Elab_Term_processDefDeriving_spec__9_spec__18___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_addDeclarationRangesFromSyntax___at___00Lean_Elab_Term_processDefDeriving_spec__9(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_addDeclarationRangesFromSyntax___at___00Lean_Elab_Term_processDefDeriving_spec__9___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwErrorAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__13___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwErrorAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__13___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_once_cell_t l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__0_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__0;
static lean_once_cell_t l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__1_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__1;
static lean_once_cell_t l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__2_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__2;
static lean_once_cell_t l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__3_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__3;
static lean_once_cell_t l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__4_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__4;
static lean_once_cell_t l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__5_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__5;
static const lean_string_object l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__6_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 24, .m_capacity = 24, .m_length = 23, .m_data = "A private declaration `"};
static const lean_object* l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__6 = (const lean_object*)&l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__6_value;
static lean_once_cell_t l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__7_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__7;
static const lean_string_object l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__8_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 79, .m_capacity = 79, .m_length = 78, .m_data = "` (from the current module) exists but would need to be public to access here."};
static const lean_object* l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__8 = (const lean_object*)&l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__8_value;
static lean_once_cell_t l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__9_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__9;
static const lean_string_object l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__10_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 23, .m_capacity = 23, .m_length = 22, .m_data = "A public declaration `"};
static const lean_object* l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__10 = (const lean_object*)&l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__10_value;
static lean_once_cell_t l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__11_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__11;
static const lean_string_object l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__12_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 68, .m_capacity = 68, .m_length = 67, .m_data = "` exists but is imported privately; consider adding `public import "};
static const lean_object* l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__12 = (const lean_object*)&l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__12_value;
static lean_once_cell_t l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__13_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__13;
static const lean_string_object l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__14_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 3, .m_capacity = 3, .m_length = 2, .m_data = "`."};
static const lean_object* l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__14 = (const lean_object*)&l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__14_value;
static lean_once_cell_t l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__15_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__15;
static const lean_string_object l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__16_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 10, .m_capacity = 10, .m_length = 9, .m_data = "` (from `"};
static const lean_object* l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__16 = (const lean_object*)&l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__16_value;
static lean_once_cell_t l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__17_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__17;
static const lean_string_object l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__18_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 54, .m_capacity = 54, .m_length = 53, .m_data = "`) exists but would need to be public to access here."};
static const lean_object* l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__18 = (const lean_object*)&l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__18_value;
static lean_once_cell_t l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__19_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__19;
LEAN_EXPORT lean_object* l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static const lean_string_object l_Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10___redArg___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 19, .m_capacity = 19, .m_length = 18, .m_data = "Unknown constant `"};
static const lean_object* l_Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10___redArg___closed__0 = (const lean_object*)&l_Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10___redArg___closed__0_value;
static lean_once_cell_t l_Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10___redArg___closed__1_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10___redArg___closed__1;
LEAN_EXPORT lean_object* l_Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_logInfoAt___at___00Lean_Elab_Term_processDefDeriving_spec__12___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_logInfoAt___at___00Lean_Elab_Term_processDefDeriving_spec__12___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_WellFounded_opaqueFix_u2083___at___00String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11_spec__21___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_WellFounded_opaqueFix_u2083___at___00String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11_spec__21___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
static const lean_string_object l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 19, .m_capacity = 19, .m_length = 18, .m_data = "deriving instance "};
static const lean_object* l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__0 = (const lean_object*)&l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__0_value;
static lean_once_cell_t l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__1_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__1;
static lean_once_cell_t l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__2_once = LEAN_ONCE_CELL_INITIALIZER;
static uint8_t l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__2;
static lean_once_cell_t l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__3_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__3;
static lean_once_cell_t l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__4_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__4;
static lean_once_cell_t l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__5_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__5;
static const lean_ctor_object l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__6_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*1 + 0, .m_other = 1, .m_tag = 0}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1))}};
static const lean_object* l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__6 = (const lean_object*)&l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__6_value;
LEAN_EXPORT lean_object* l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_liftExcept___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__9___redArg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_liftExcept___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__9___redArg___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8___redArg___lam__0(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8___redArg___lam__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8___redArg___lam__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8___redArg___lam__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static const lean_string_object l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14___redArg___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 8, .m_capacity = 8, .m_length = 7, .m_data = "runtime"};
static const lean_object* l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14___redArg___closed__0 = (const lean_object*)&l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14___redArg___closed__0_value;
static const lean_string_object l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14___redArg___closed__1_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 12, .m_capacity = 12, .m_length = 11, .m_data = "maxRecDepth"};
static const lean_object* l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14___redArg___closed__1 = (const lean_object*)&l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14___redArg___closed__1_value;
static const lean_ctor_object l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14___redArg___closed__2_value_aux_0 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)&l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14___redArg___closed__0_value),LEAN_SCALAR_PTR_LITERAL(2, 128, 123, 132, 117, 90, 116, 101)}};
static const lean_ctor_object l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14___redArg___closed__2_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14___redArg___closed__2_value_aux_0),((lean_object*)&l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14___redArg___closed__1_value),LEAN_SCALAR_PTR_LITERAL(88, 230, 219, 180, 63, 89, 202, 3)}};
static const lean_object* l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14___redArg___closed__2 = (const lean_object*)&l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14___redArg___closed__2_value;
static lean_once_cell_t l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14___redArg___closed__3_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14___redArg___closed__3;
static lean_once_cell_t l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14___redArg___closed__4_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14___redArg___closed__4;
static lean_once_cell_t l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14___redArg___closed__5_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14___redArg___closed__5;
LEAN_EXPORT lean_object* l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14___redArg(lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14___redArg___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8___redArg___lam__1(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8___redArg___lam__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Std_DHashMap_Internal_AssocList_get_x3f___at___00Std_DHashMap_Internal_Raw_u2080_Const_get_x3f___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__16_spec__26___redArg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Std_DHashMap_Internal_AssocList_get_x3f___at___00Std_DHashMap_Internal_Raw_u2080_Const_get_x3f___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__16_spec__26___redArg___boxed(lean_object*, lean_object*);
static lean_once_cell_t l_Std_DHashMap_Internal_Raw_u2080_Const_get_x3f___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__16___redArg___closed__0_once = LEAN_ONCE_CELL_INITIALIZER;
static uint64_t l_Std_DHashMap_Internal_Raw_u2080_Const_get_x3f___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__16___redArg___closed__0;
LEAN_EXPORT lean_object* l_Std_DHashMap_Internal_Raw_u2080_Const_get_x3f___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__16___redArg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Std_DHashMap_Internal_Raw_u2080_Const_get_x3f___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__16___redArg___boxed(lean_object*, lean_object*);
LEAN_EXPORT uint8_t l_Lean_PersistentHashMap_containsAtAux___at___00Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00__private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14_spec__23_spec__29_spec__33___redArg(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_containsAtAux___at___00Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00__private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14_spec__23_spec__29_spec__33___redArg___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT uint8_t l_Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00__private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14_spec__23_spec__29___redArg(lean_object*, size_t, lean_object*);
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00__private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14_spec__23_spec__29___redArg___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT uint8_t l_Lean_PersistentHashMap_contains___at___00__private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14_spec__23___redArg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_contains___at___00__private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14_spec__23___redArg___boxed(lean_object*, lean_object*);
static const lean_closure_object l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_closure_object) + sizeof(void*)*0, .m_other = 0, .m_tag = 245}, .m_fun = (void*)l_Lean_instBEqExtraModUse_beq___boxed, .m_arity = 2, .m_num_fixed = 0, .m_objs = {} };
static const lean_object* l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__0 = (const lean_object*)&l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__0_value;
static const lean_closure_object l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__1_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_closure_object) + sizeof(void*)*0, .m_other = 0, .m_tag = 245}, .m_fun = (void*)l_Lean_instHashableExtraModUse_hash___boxed, .m_arity = 1, .m_num_fixed = 0, .m_objs = {} };
static const lean_object* l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__1 = (const lean_object*)&l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__1_value;
static lean_once_cell_t l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__2_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__2;
static const lean_string_object l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__3_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 13, .m_capacity = 13, .m_length = 12, .m_data = "extraModUses"};
static const lean_object* l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__3 = (const lean_object*)&l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__3_value;
static const lean_ctor_object l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__4_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)&l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__3_value),LEAN_SCALAR_PTR_LITERAL(27, 95, 70, 98, 97, 66, 56, 109)}};
static const lean_object* l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__4 = (const lean_object*)&l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__4_value;
static const lean_string_object l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__5_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 16, .m_capacity = 16, .m_length = 15, .m_data = " extra mod use "};
static const lean_object* l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__5 = (const lean_object*)&l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__5_value;
static lean_once_cell_t l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__6_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__6;
static const lean_string_object l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__7_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 5, .m_capacity = 5, .m_length = 4, .m_data = " of "};
static const lean_object* l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__7 = (const lean_object*)&l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__7_value;
static lean_once_cell_t l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__8_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__8;
static lean_once_cell_t l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__9_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__9;
static const lean_string_object l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__10_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 11, .m_capacity = 11, .m_length = 10, .m_data = "recording "};
static const lean_object* l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__10 = (const lean_object*)&l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__10_value;
static lean_once_cell_t l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__11_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__11;
static const lean_string_object l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__12_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 8, .m_capacity = 8, .m_length = 7, .m_data = "regular"};
static const lean_object* l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__12 = (const lean_object*)&l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__12_value;
static const lean_string_object l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__13_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 5, .m_capacity = 5, .m_length = 4, .m_data = "meta"};
static const lean_object* l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__13 = (const lean_object*)&l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__13_value;
static const lean_string_object l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__14_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 8, .m_capacity = 8, .m_length = 7, .m_data = "private"};
static const lean_object* l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__14 = (const lean_object*)&l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__14_value;
static const lean_string_object l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__15_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 7, .m_capacity = 7, .m_length = 6, .m_data = "public"};
static const lean_object* l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__15 = (const lean_object*)&l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__15_value;
LEAN_EXPORT lean_object* l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__15(lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__15___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*);
static const lean_closure_object l_Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_closure_object) + sizeof(void*)*0, .m_other = 0, .m_tag = 245}, .m_fun = (void*)l_Lean_Name_beq___boxed, .m_arity = 2, .m_num_fixed = 0, .m_objs = {} };
static const lean_object* l_Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10___closed__0 = (const lean_object*)&l_Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10___closed__0_value;
static const lean_closure_object l_Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10___closed__1_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_closure_object) + sizeof(void*)*0, .m_other = 0, .m_tag = 245}, .m_fun = (void*)l_Lean_Name_hash___override___boxed, .m_arity = 1, .m_num_fixed = 0, .m_objs = {} };
static const lean_object* l_Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10___closed__1 = (const lean_object*)&l_Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10___closed__1_value;
static lean_once_cell_t l_Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10___closed__2_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10___closed__2;
static const lean_array_object l_Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10___closed__3_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_array_object) + sizeof(void*)*0, .m_other = 0, .m_tag = 246}, .m_size = 0, .m_capacity = 0, .m_data = {}};
static const lean_object* l_Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10___closed__3 = (const lean_object*)&l_Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10___closed__3_value;
LEAN_EXPORT lean_object* l_Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__11___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__11___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8___redArg___lam__3(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8___redArg___lam__3___boxed(lean_object*, lean_object*, lean_object*);
static lean_once_cell_t l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__15___redArg___closed__0_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__15___redArg___closed__0;
LEAN_EXPORT lean_object* l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__15___redArg();
LEAN_EXPORT lean_object* l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__15___redArg___boxed(lean_object*);
LEAN_EXPORT lean_object* l_List_forM___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__12___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_List_forM___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__12___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8___redArg___lam__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8___redArg___lam__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static const lean_string_object l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8___redArg___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 158, .m_capacity = 158, .m_length = 157, .m_data = "maximum recursion depth has been reached\nuse `set_option maxRecDepth <num>` to increase limit\nuse `set_option diagnostics true` to get diagnostic information"};
static const lean_object* l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8___redArg___closed__0 = (const lean_object*)&l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8___redArg___closed__0_value;
LEAN_EXPORT lean_object* l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static const lean_string_object l_Lean_Elab_Term_processDefDeriving___lam__6___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 19, .m_capacity = 19, .m_length = 18, .m_data = "Derived instance `"};
static const lean_object* l_Lean_Elab_Term_processDefDeriving___lam__6___closed__0 = (const lean_object*)&l_Lean_Elab_Term_processDefDeriving___lam__6___closed__0_value;
static lean_once_cell_t l_Lean_Elab_Term_processDefDeriving___lam__6___closed__1_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_Elab_Term_processDefDeriving___lam__6___closed__1;
static const lean_string_object l_Lean_Elab_Term_processDefDeriving___lam__6___closed__2_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 50, .m_capacity = 50, .m_length = 49, .m_data = "failed to derive instance because it depends on `"};
static const lean_object* l_Lean_Elab_Term_processDefDeriving___lam__6___closed__2 = (const lean_object*)&l_Lean_Elab_Term_processDefDeriving___lam__6___closed__2_value;
static lean_once_cell_t l_Lean_Elab_Term_processDefDeriving___lam__6___closed__3_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_Elab_Term_processDefDeriving___lam__6___closed__3;
static const lean_string_object l_Lean_Elab_Term_processDefDeriving___lam__6___closed__4_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 26, .m_capacity = 26, .m_length = 25, .m_data = "`, which is noncomputable"};
static const lean_object* l_Lean_Elab_Term_processDefDeriving___lam__6___closed__4 = (const lean_object*)&l_Lean_Elab_Term_processDefDeriving___lam__6___closed__4_value;
static lean_once_cell_t l_Lean_Elab_Term_processDefDeriving___lam__6___closed__5_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_Elab_Term_processDefDeriving___lam__6___closed__5;
static const lean_string_object l_Lean_Elab_Term_processDefDeriving___lam__6___closed__6_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 5, .m_capacity = 5, .m_length = 4, .m_data = "inst"};
static const lean_object* l_Lean_Elab_Term_processDefDeriving___lam__6___closed__6 = (const lean_object*)&l_Lean_Elab_Term_processDefDeriving___lam__6___closed__6_value;
static lean_once_cell_t l_Lean_Elab_Term_processDefDeriving___lam__6___closed__7_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_Elab_Term_processDefDeriving___lam__6___closed__7;
static lean_once_cell_t l_Lean_Elab_Term_processDefDeriving___lam__6___closed__8_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_Elab_Term_processDefDeriving___lam__6___closed__8;
static lean_once_cell_t l_Lean_Elab_Term_processDefDeriving___lam__6___closed__9_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_Elab_Term_processDefDeriving___lam__6___closed__9;
static lean_once_cell_t l_Lean_Elab_Term_processDefDeriving___lam__6___closed__10_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_Elab_Term_processDefDeriving___lam__6___closed__10;
static const lean_string_object l_Lean_Elab_Term_processDefDeriving___lam__6___closed__11_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 33, .m_capacity = 33, .m_length = 32, .m_data = "deriving noncomputable instance "};
static const lean_object* l_Lean_Elab_Term_processDefDeriving___lam__6___closed__11 = (const lean_object*)&l_Lean_Elab_Term_processDefDeriving___lam__6___closed__11_value;
static const lean_string_object l_Lean_Elab_Term_processDefDeriving___lam__6___closed__12_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 11, .m_capacity = 11, .m_length = 10, .m_data = "Try this: "};
static const lean_object* l_Lean_Elab_Term_processDefDeriving___lam__6___closed__12 = (const lean_object*)&l_Lean_Elab_Term_processDefDeriving___lam__6___closed__12_value;
static lean_once_cell_t l_Lean_Elab_Term_processDefDeriving___lam__6___closed__13_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_Elab_Term_processDefDeriving___lam__6___closed__13;
static const lean_string_object l_Lean_Elab_Term_processDefDeriving___lam__6___closed__14_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 35, .m_capacity = 35, .m_length = 34, .m_data = "Failed to delta derive instance, `"};
static const lean_object* l_Lean_Elab_Term_processDefDeriving___lam__6___closed__14 = (const lean_object*)&l_Lean_Elab_Term_processDefDeriving___lam__6___closed__14_value;
static lean_once_cell_t l_Lean_Elab_Term_processDefDeriving___lam__6___closed__15_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_Elab_Term_processDefDeriving___lam__6___closed__15;
static const lean_string_object l_Lean_Elab_Term_processDefDeriving___lam__6___closed__16_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 23, .m_capacity = 23, .m_length = 22, .m_data = "` is not a definition."};
static const lean_object* l_Lean_Elab_Term_processDefDeriving___lam__6___closed__16 = (const lean_object*)&l_Lean_Elab_Term_processDefDeriving___lam__6___closed__16_value;
static lean_once_cell_t l_Lean_Elab_Term_processDefDeriving___lam__6___closed__17_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_Elab_Term_processDefDeriving___lam__6___closed__17;
LEAN_EXPORT lean_object* l_Lean_Elab_Term_processDefDeriving___lam__6(lean_object*, lean_object*, lean_object*, uint8_t, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Term_processDefDeriving___lam__6___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*, lean_object*);
static const lean_string_object l_Lean_Elab_Term_processDefDeriving___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 101, .m_capacity = 101, .m_length = 100, .m_data = "Failed to delta derive instance, expecting a term of the form `C ...` where `C` is a constant, given"};
static const lean_object* l_Lean_Elab_Term_processDefDeriving___closed__0 = (const lean_object*)&l_Lean_Elab_Term_processDefDeriving___closed__0_value;
static lean_once_cell_t l_Lean_Elab_Term_processDefDeriving___closed__1_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_Elab_Term_processDefDeriving___closed__1;
LEAN_EXPORT lean_object* l_Lean_Elab_Term_processDefDeriving(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Term_processDefDeriving___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Elab_Term_processDefDeriving_spec__4(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Elab_Term_processDefDeriving_spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_liftExcept___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__9(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_liftExcept___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__9___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__15(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__15___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_getDeclarationRange_x3f___at___00Lean_Elab_addDeclarationRangesFromSyntax___at___00Lean_Elab_Term_processDefDeriving_spec__9_spec__17(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_getDeclarationRange_x3f___at___00Lean_Elab_addDeclarationRangesFromSyntax___at___00Lean_Elab_Term_processDefDeriving_spec__9_spec__17___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_addDeclarationRanges___at___00Lean_Elab_addDeclarationRangesFromSyntax___at___00Lean_Elab_Term_processDefDeriving_spec__9_spec__18(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_addDeclarationRanges___at___00Lean_Elab_addDeclarationRangesFromSyntax___at___00Lean_Elab_Term_processDefDeriving_spec__9_spec__18___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_logInfoAt___at___00Lean_Elab_Term_processDefDeriving_spec__12(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_logInfoAt___at___00Lean_Elab_Term_processDefDeriving_spec__12___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__11(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__11___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_List_forM___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__12(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_List_forM___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__12___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwErrorAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__13(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwErrorAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__13___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_WellFounded_opaqueFix_u2083___at___00String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11_spec__21(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_WellFounded_opaqueFix_u2083___at___00String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11_spec__21___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Std_DHashMap_Internal_Raw_u2080_Const_get_x3f___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__16(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Std_DHashMap_Internal_Raw_u2080_Const_get_x3f___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__16___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT uint8_t l_Lean_PersistentHashMap_contains___at___00__private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14_spec__23(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_contains___at___00__private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14_spec__23___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Std_DHashMap_Internal_AssocList_get_x3f___at___00Std_DHashMap_Internal_Raw_u2080_Const_get_x3f___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__16_spec__26(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Std_DHashMap_Internal_AssocList_get_x3f___at___00Std_DHashMap_Internal_Raw_u2080_Const_get_x3f___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__16_spec__26___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT uint8_t l_Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00__private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14_spec__23_spec__29(lean_object*, lean_object*, size_t, lean_object*);
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00__private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14_spec__23_spec__29___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT uint8_t l_Lean_PersistentHashMap_containsAtAux___at___00Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00__private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14_spec__23_spec__29_spec__33(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_containsAtAux___at___00Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00__private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14_spec__23_spec__29_spec__33___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_initFn_00___x40_Lean_Elab_Deriving_Basic_393575330____hygCtx___hyg_2_();
LEAN_EXPORT lean_object* l_Lean_Elab_initFn_00___x40_Lean_Elab_Deriving_Basic_393575330____hygCtx___hyg_2____boxed(lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_derivingHandlersRef;
static const lean_string_object l_Lean_Elab_registerDerivingHandler___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 85, .m_capacity = 85, .m_length = 84, .m_data = "failed to register deriving handler, it can only be registered during initialization"};
static const lean_object* l_Lean_Elab_registerDerivingHandler___closed__0 = (const lean_object*)&l_Lean_Elab_registerDerivingHandler___closed__0_value;
static lean_once_cell_t l_Lean_Elab_registerDerivingHandler___closed__1_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_Elab_registerDerivingHandler___closed__1;
LEAN_EXPORT lean_object* l_Lean_Elab_registerDerivingHandler(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_registerDerivingHandler___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Options_set___at___00Lean_Elab_applyDerivingHandlers_spec__0(lean_object*, lean_object*, uint8_t);
LEAN_EXPORT lean_object* l_Lean_Options_set___at___00Lean_Elab_applyDerivingHandlers_spec__0___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_isTracingEnabledFor___at___00Lean_Elab_applyDerivingHandlers_spec__5___redArg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_isTracingEnabledFor___at___00Lean_Elab_applyDerivingHandlers_spec__5___redArg___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_isTracingEnabledFor___at___00Lean_Elab_applyDerivingHandlers_spec__5(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_isTracingEnabledFor___at___00Lean_Elab_applyDerivingHandlers_spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___00Lean_Elab_applyDerivingHandlers_spec__6___redArg(lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___00Lean_Elab_applyDerivingHandlers_spec__6___redArg___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___00Lean_Elab_applyDerivingHandlers_spec__6(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___00Lean_Elab_applyDerivingHandlers_spec__6___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT uint8_t l___private_Init_Data_Array_Basic_0__Array_anyMUnsafe_any___at___00Lean_Elab_applyDerivingHandlers_spec__1(lean_object*, size_t, size_t);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_anyMUnsafe_any___at___00Lean_Elab_applyDerivingHandlers_spec__1___boxed(lean_object*, lean_object*, lean_object*);
static const lean_string_object l_Lean_Elab_applyDerivingHandlers___lam__0___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 5, .m_capacity = 5, .m_length = 4, .m_data = "warn"};
static const lean_object* l_Lean_Elab_applyDerivingHandlers___lam__0___closed__0 = (const lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__0_value;
static const lean_string_object l_Lean_Elab_applyDerivingHandlers___lam__0___closed__1_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 16, .m_capacity = 16, .m_length = 15, .m_data = "exposeOnPrivate"};
static const lean_object* l_Lean_Elab_applyDerivingHandlers___lam__0___closed__1 = (const lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__1_value;
static const lean_ctor_object l_Lean_Elab_applyDerivingHandlers___lam__0___closed__2_value_aux_0 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__0_value),LEAN_SCALAR_PTR_LITERAL(187, 250, 156, 61, 219, 107, 141, 135)}};
static const lean_ctor_object l_Lean_Elab_applyDerivingHandlers___lam__0___closed__2_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__2_value_aux_0),((lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__1_value),LEAN_SCALAR_PTR_LITERAL(44, 29, 228, 210, 174, 32, 72, 82)}};
static const lean_object* l_Lean_Elab_applyDerivingHandlers___lam__0___closed__2 = (const lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__2_value;
static lean_once_cell_t l_Lean_Elab_applyDerivingHandlers___lam__0___closed__3_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_Elab_applyDerivingHandlers___lam__0___closed__3;
static const lean_string_object l_Lean_Elab_applyDerivingHandlers___lam__0___closed__4_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 15, .m_capacity = 15, .m_length = 14, .m_data = "UnhygienicMain"};
static const lean_object* l_Lean_Elab_applyDerivingHandlers___lam__0___closed__4 = (const lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__4_value;
static const lean_ctor_object l_Lean_Elab_applyDerivingHandlers___lam__0___closed__5_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__4_value),LEAN_SCALAR_PTR_LITERAL(124, 169, 242, 144, 140, 56, 85, 78)}};
static const lean_object* l_Lean_Elab_applyDerivingHandlers___lam__0___closed__5 = (const lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__5_value;
static const lean_string_object l_Lean_Elab_applyDerivingHandlers___lam__0___closed__6_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 5, .m_capacity = 5, .m_length = 4, .m_data = "Lean"};
static const lean_object* l_Lean_Elab_applyDerivingHandlers___lam__0___closed__6 = (const lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__6_value;
static const lean_string_object l_Lean_Elab_applyDerivingHandlers___lam__0___closed__7_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 7, .m_capacity = 7, .m_length = 6, .m_data = "Parser"};
static const lean_object* l_Lean_Elab_applyDerivingHandlers___lam__0___closed__7 = (const lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__7_value;
static const lean_string_object l_Lean_Elab_applyDerivingHandlers___lam__0___closed__8_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 5, .m_capacity = 5, .m_length = 4, .m_data = "Term"};
static const lean_object* l_Lean_Elab_applyDerivingHandlers___lam__0___closed__8 = (const lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__8_value;
static const lean_string_object l_Lean_Elab_applyDerivingHandlers___lam__0___closed__9_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 13, .m_capacity = 13, .m_length = 12, .m_data = "attrInstance"};
static const lean_object* l_Lean_Elab_applyDerivingHandlers___lam__0___closed__9 = (const lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__9_value;
static const lean_ctor_object l_Lean_Elab_applyDerivingHandlers___lam__0___closed__10_value_aux_0 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__6_value),LEAN_SCALAR_PTR_LITERAL(70, 193, 83, 126, 233, 67, 208, 165)}};
static const lean_ctor_object l_Lean_Elab_applyDerivingHandlers___lam__0___closed__10_value_aux_1 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__10_value_aux_0),((lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__7_value),LEAN_SCALAR_PTR_LITERAL(103, 136, 125, 166, 167, 98, 71, 111)}};
static const lean_ctor_object l_Lean_Elab_applyDerivingHandlers___lam__0___closed__10_value_aux_2 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__10_value_aux_1),((lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__8_value),LEAN_SCALAR_PTR_LITERAL(75, 170, 162, 138, 136, 204, 251, 229)}};
static const lean_ctor_object l_Lean_Elab_applyDerivingHandlers___lam__0___closed__10_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__10_value_aux_2),((lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__9_value),LEAN_SCALAR_PTR_LITERAL(241, 75, 242, 110, 47, 5, 20, 104)}};
static const lean_object* l_Lean_Elab_applyDerivingHandlers___lam__0___closed__10 = (const lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__10_value;
static const lean_string_object l_Lean_Elab_applyDerivingHandlers___lam__0___closed__11_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 9, .m_capacity = 9, .m_length = 8, .m_data = "attrKind"};
static const lean_object* l_Lean_Elab_applyDerivingHandlers___lam__0___closed__11 = (const lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__11_value;
static const lean_ctor_object l_Lean_Elab_applyDerivingHandlers___lam__0___closed__12_value_aux_0 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__6_value),LEAN_SCALAR_PTR_LITERAL(70, 193, 83, 126, 233, 67, 208, 165)}};
static const lean_ctor_object l_Lean_Elab_applyDerivingHandlers___lam__0___closed__12_value_aux_1 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__12_value_aux_0),((lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__7_value),LEAN_SCALAR_PTR_LITERAL(103, 136, 125, 166, 167, 98, 71, 111)}};
static const lean_ctor_object l_Lean_Elab_applyDerivingHandlers___lam__0___closed__12_value_aux_2 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__12_value_aux_1),((lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__8_value),LEAN_SCALAR_PTR_LITERAL(75, 170, 162, 138, 136, 204, 251, 229)}};
static const lean_ctor_object l_Lean_Elab_applyDerivingHandlers___lam__0___closed__12_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__12_value_aux_2),((lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__11_value),LEAN_SCALAR_PTR_LITERAL(32, 164, 20, 104, 12, 221, 204, 110)}};
static const lean_object* l_Lean_Elab_applyDerivingHandlers___lam__0___closed__12 = (const lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__12_value;
static const lean_string_object l_Lean_Elab_applyDerivingHandlers___lam__0___closed__13_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 5, .m_capacity = 5, .m_length = 4, .m_data = "null"};
static const lean_object* l_Lean_Elab_applyDerivingHandlers___lam__0___closed__13 = (const lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__13_value;
static const lean_ctor_object l_Lean_Elab_applyDerivingHandlers___lam__0___closed__14_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__13_value),LEAN_SCALAR_PTR_LITERAL(24, 58, 49, 223, 146, 207, 197, 136)}};
static const lean_object* l_Lean_Elab_applyDerivingHandlers___lam__0___closed__14 = (const lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__14_value;
static lean_once_cell_t l_Lean_Elab_applyDerivingHandlers___lam__0___closed__15_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_Elab_applyDerivingHandlers___lam__0___closed__15;
static lean_once_cell_t l_Lean_Elab_applyDerivingHandlers___lam__0___closed__16_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_Elab_applyDerivingHandlers___lam__0___closed__16;
static lean_once_cell_t l_Lean_Elab_applyDerivingHandlers___lam__0___closed__17_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_Elab_applyDerivingHandlers___lam__0___closed__17;
static const lean_string_object l_Lean_Elab_applyDerivingHandlers___lam__0___closed__18_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 5, .m_capacity = 5, .m_length = 4, .m_data = "Attr"};
static const lean_object* l_Lean_Elab_applyDerivingHandlers___lam__0___closed__18 = (const lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__18_value;
static const lean_string_object l_Lean_Elab_applyDerivingHandlers___lam__0___closed__19_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 7, .m_capacity = 7, .m_length = 6, .m_data = "simple"};
static const lean_object* l_Lean_Elab_applyDerivingHandlers___lam__0___closed__19 = (const lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__19_value;
static const lean_ctor_object l_Lean_Elab_applyDerivingHandlers___lam__0___closed__20_value_aux_0 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__6_value),LEAN_SCALAR_PTR_LITERAL(70, 193, 83, 126, 233, 67, 208, 165)}};
static const lean_ctor_object l_Lean_Elab_applyDerivingHandlers___lam__0___closed__20_value_aux_1 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__20_value_aux_0),((lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__7_value),LEAN_SCALAR_PTR_LITERAL(103, 136, 125, 166, 167, 98, 71, 111)}};
static const lean_ctor_object l_Lean_Elab_applyDerivingHandlers___lam__0___closed__20_value_aux_2 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__20_value_aux_1),((lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__18_value),LEAN_SCALAR_PTR_LITERAL(7, 175, 252, 195, 22, 42, 161, 63)}};
static const lean_ctor_object l_Lean_Elab_applyDerivingHandlers___lam__0___closed__20_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__20_value_aux_2),((lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__19_value),LEAN_SCALAR_PTR_LITERAL(107, 67, 254, 234, 65, 174, 209, 53)}};
static const lean_object* l_Lean_Elab_applyDerivingHandlers___lam__0___closed__20 = (const lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__20_value;
static const lean_string_object l_Lean_Elab_applyDerivingHandlers___lam__0___closed__21_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 7, .m_capacity = 7, .m_length = 6, .m_data = "expose"};
static const lean_object* l_Lean_Elab_applyDerivingHandlers___lam__0___closed__21 = (const lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__21_value;
static lean_once_cell_t l_Lean_Elab_applyDerivingHandlers___lam__0___closed__22_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_Elab_applyDerivingHandlers___lam__0___closed__22;
static const lean_ctor_object l_Lean_Elab_applyDerivingHandlers___lam__0___closed__23_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__21_value),LEAN_SCALAR_PTR_LITERAL(170, 113, 233, 77, 243, 78, 243, 129)}};
static const lean_object* l_Lean_Elab_applyDerivingHandlers___lam__0___closed__23 = (const lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__23_value;
static lean_once_cell_t l_Lean_Elab_applyDerivingHandlers___lam__0___closed__24_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_Elab_applyDerivingHandlers___lam__0___closed__24;
static lean_once_cell_t l_Lean_Elab_applyDerivingHandlers___lam__0___closed__25_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_Elab_applyDerivingHandlers___lam__0___closed__25;
static lean_once_cell_t l_Lean_Elab_applyDerivingHandlers___lam__0___closed__26_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_Elab_applyDerivingHandlers___lam__0___closed__26;
static lean_once_cell_t l_Lean_Elab_applyDerivingHandlers___lam__0___closed__27_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_Elab_applyDerivingHandlers___lam__0___closed__27;
LEAN_EXPORT lean_object* l_Lean_Elab_applyDerivingHandlers___lam__0(uint8_t, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_applyDerivingHandlers___lam__0___boxed(lean_object*, lean_object*, lean_object*);
static const lean_string_object l_Lean_Elab_applyDerivingHandlers___lam__1___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 32, .m_capacity = 32, .m_length = 31, .m_data = "running deriving handlers for `"};
static const lean_object* l_Lean_Elab_applyDerivingHandlers___lam__1___closed__0 = (const lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__1___closed__0_value;
static lean_once_cell_t l_Lean_Elab_applyDerivingHandlers___lam__1___closed__1_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_Elab_applyDerivingHandlers___lam__1___closed__1;
LEAN_EXPORT lean_object* l_Lean_Elab_applyDerivingHandlers___lam__1(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_applyDerivingHandlers___lam__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_List_mapTR_loop___at___00Lean_Elab_applyDerivingHandlers_spec__8(lean_object*, lean_object*);
LEAN_EXPORT uint8_t l_Except_toTraceResult___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00Lean_Elab_applyDerivingHandlers_spec__7_spec__9(lean_object*);
LEAN_EXPORT lean_object* l_Except_toTraceResult___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00Lean_Elab_applyDerivingHandlers_spec__7_spec__9___boxed(lean_object*);
LEAN_EXPORT lean_object* l_MonadExcept_ofExcept___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00Lean_Elab_applyDerivingHandlers_spec__7_spec__11___redArg(lean_object*);
LEAN_EXPORT lean_object* l_MonadExcept_ofExcept___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00Lean_Elab_applyDerivingHandlers_spec__7_spec__11___redArg___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_addMessageContextPartial___at___00Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2_spec__2___redArg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_addMessageContextPartial___at___00Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2_spec__2___redArg___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_addTraceNode___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00Lean_Elab_applyDerivingHandlers_spec__7_spec__10(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_addTraceNode___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00Lean_Elab_applyDerivingHandlers_spec__7_spec__10___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00Lean_Elab_applyDerivingHandlers_spec__7(lean_object*, uint8_t, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00Lean_Elab_applyDerivingHandlers_spec__7___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static const lean_ctor_object l_List_forIn_x27_loop___at___00Lean_Elab_applyDerivingHandlers_spec__3___redArg___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 0, .m_other = 2, .m_tag = 0}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)(((size_t)(0) << 1) | 1))}};
static const lean_object* l_List_forIn_x27_loop___at___00Lean_Elab_applyDerivingHandlers_spec__3___redArg___closed__0 = (const lean_object*)&l_List_forIn_x27_loop___at___00Lean_Elab_applyDerivingHandlers_spec__3___redArg___closed__0_value;
static const lean_ctor_object l_List_forIn_x27_loop___at___00Lean_Elab_applyDerivingHandlers_spec__3___redArg___closed__1_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*1 + 0, .m_other = 1, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1))}};
static const lean_object* l_List_forIn_x27_loop___at___00Lean_Elab_applyDerivingHandlers_spec__3___redArg___closed__1 = (const lean_object*)&l_List_forIn_x27_loop___at___00Lean_Elab_applyDerivingHandlers_spec__3___redArg___closed__1_value;
static const lean_ctor_object l_List_forIn_x27_loop___at___00Lean_Elab_applyDerivingHandlers_spec__3___redArg___closed__2_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 0, .m_other = 2, .m_tag = 0}, .m_objs = {((lean_object*)&l_List_forIn_x27_loop___at___00Lean_Elab_applyDerivingHandlers_spec__3___redArg___closed__1_value),((lean_object*)(((size_t)(0) << 1) | 1))}};
static const lean_object* l_List_forIn_x27_loop___at___00Lean_Elab_applyDerivingHandlers_spec__3___redArg___closed__2 = (const lean_object*)&l_List_forIn_x27_loop___at___00Lean_Elab_applyDerivingHandlers_spec__3___redArg___closed__2_value;
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00Lean_Elab_applyDerivingHandlers_spec__3___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00Lean_Elab_applyDerivingHandlers_spec__3___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_addMacroStack___at___00Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2_spec__3___redArg(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_addMacroStack___at___00Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2_spec__3___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2___redArg(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_List_mapTR_loop___at___00Lean_Elab_applyDerivingHandlers_spec__4(uint8_t, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_List_mapTR_loop___at___00Lean_Elab_applyDerivingHandlers_spec__4___boxed(lean_object*, lean_object*, lean_object*);
static const lean_string_object l_Lean_Elab_applyDerivingHandlers___lam__2___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 55, .m_capacity = 55, .m_length = 54, .m_data = "No deriving handlers have been implemented for class `"};
static const lean_object* l_Lean_Elab_applyDerivingHandlers___lam__2___closed__0 = (const lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__2___closed__0_value;
static lean_once_cell_t l_Lean_Elab_applyDerivingHandlers___lam__2___closed__1_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_Elab_applyDerivingHandlers___lam__2___closed__1;
static const lean_string_object l_Lean_Elab_applyDerivingHandlers___lam__2___closed__2_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 42, .m_capacity = 42, .m_length = 41, .m_data = "None of the deriving handlers for class `"};
static const lean_object* l_Lean_Elab_applyDerivingHandlers___lam__2___closed__2 = (const lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__2___closed__2_value;
static lean_once_cell_t l_Lean_Elab_applyDerivingHandlers___lam__2___closed__3_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_Elab_applyDerivingHandlers___lam__2___closed__3;
static const lean_string_object l_Lean_Elab_applyDerivingHandlers___lam__2___closed__4_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 14, .m_capacity = 14, .m_length = 13, .m_data = "` applied to "};
static const lean_object* l_Lean_Elab_applyDerivingHandlers___lam__2___closed__4 = (const lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__2___closed__4_value;
static lean_once_cell_t l_Lean_Elab_applyDerivingHandlers___lam__2___closed__5_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l_Lean_Elab_applyDerivingHandlers___lam__2___closed__5;
LEAN_EXPORT lean_object* l_Lean_Elab_applyDerivingHandlers___lam__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_applyDerivingHandlers___lam__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_applyDerivingHandlers(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_applyDerivingHandlers___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_addMessageContextPartial___at___00Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2_spec__2(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_addMessageContextPartial___at___00Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2_spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00Lean_Elab_applyDerivingHandlers_spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00Lean_Elab_applyDerivingHandlers_spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_MonadExcept_ofExcept___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00Lean_Elab_applyDerivingHandlers_spec__7_spec__11(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_MonadExcept_ofExcept___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00Lean_Elab_applyDerivingHandlers_spec__7_spec__11___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_addMacroStack___at___00Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2_spec__3(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_addMacroStack___at___00Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2_spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_DerivingClassView_getClassName(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_DerivingClassView_getClassName___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_DerivingClassView_ofSyntax_spec__0___redArg();
LEAN_EXPORT lean_object* l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_DerivingClassView_ofSyntax_spec__0___redArg___boxed(lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_DerivingClassView_ofSyntax_spec__0(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_DerivingClassView_ofSyntax_spec__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
static const lean_string_object l_Lean_Elab_DerivingClassView_ofSyntax___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 8, .m_capacity = 8, .m_length = 7, .m_data = "Command"};
static const lean_object* l_Lean_Elab_DerivingClassView_ofSyntax___closed__0 = (const lean_object*)&l_Lean_Elab_DerivingClassView_ofSyntax___closed__0_value;
static const lean_string_object l_Lean_Elab_DerivingClassView_ofSyntax___closed__1_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 14, .m_capacity = 14, .m_length = 13, .m_data = "derivingClass"};
static const lean_object* l_Lean_Elab_DerivingClassView_ofSyntax___closed__1 = (const lean_object*)&l_Lean_Elab_DerivingClassView_ofSyntax___closed__1_value;
static const lean_ctor_object l_Lean_Elab_DerivingClassView_ofSyntax___closed__2_value_aux_0 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__6_value),LEAN_SCALAR_PTR_LITERAL(70, 193, 83, 126, 233, 67, 208, 165)}};
static const lean_ctor_object l_Lean_Elab_DerivingClassView_ofSyntax___closed__2_value_aux_1 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_Elab_DerivingClassView_ofSyntax___closed__2_value_aux_0),((lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__7_value),LEAN_SCALAR_PTR_LITERAL(103, 136, 125, 166, 167, 98, 71, 111)}};
static const lean_ctor_object l_Lean_Elab_DerivingClassView_ofSyntax___closed__2_value_aux_2 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_Elab_DerivingClassView_ofSyntax___closed__2_value_aux_1),((lean_object*)&l_Lean_Elab_DerivingClassView_ofSyntax___closed__0_value),LEAN_SCALAR_PTR_LITERAL(214, 208, 105, 11, 221, 56, 173, 240)}};
static const lean_ctor_object l_Lean_Elab_DerivingClassView_ofSyntax___closed__2_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_Elab_DerivingClassView_ofSyntax___closed__2_value_aux_2),((lean_object*)&l_Lean_Elab_DerivingClassView_ofSyntax___closed__1_value),LEAN_SCALAR_PTR_LITERAL(71, 164, 144, 68, 145, 86, 212, 243)}};
static const lean_object* l_Lean_Elab_DerivingClassView_ofSyntax___closed__2 = (const lean_object*)&l_Lean_Elab_DerivingClassView_ofSyntax___closed__2_value;
LEAN_EXPORT lean_object* l_Lean_Elab_DerivingClassView_ofSyntax(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_DerivingClassView_ofSyntax___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Elab_getOptDerivingClasses_spec__0(size_t, size_t, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Elab_getOptDerivingClasses_spec__0___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Elab_getOptDerivingClasses_spec__1(size_t, size_t, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Elab_getOptDerivingClasses_spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Elab_getOptDerivingClasses_spec__2(uint8_t, lean_object*, size_t, size_t, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Elab_getOptDerivingClasses_spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static const lean_string_object l_Lean_Elab_getOptDerivingClasses___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 12, .m_capacity = 12, .m_length = 11, .m_data = "optDeriving"};
static const lean_object* l_Lean_Elab_getOptDerivingClasses___closed__0 = (const lean_object*)&l_Lean_Elab_getOptDerivingClasses___closed__0_value;
static const lean_ctor_object l_Lean_Elab_getOptDerivingClasses___closed__1_value_aux_0 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__6_value),LEAN_SCALAR_PTR_LITERAL(70, 193, 83, 126, 233, 67, 208, 165)}};
static const lean_ctor_object l_Lean_Elab_getOptDerivingClasses___closed__1_value_aux_1 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_Elab_getOptDerivingClasses___closed__1_value_aux_0),((lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__7_value),LEAN_SCALAR_PTR_LITERAL(103, 136, 125, 166, 167, 98, 71, 111)}};
static const lean_ctor_object l_Lean_Elab_getOptDerivingClasses___closed__1_value_aux_2 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_Elab_getOptDerivingClasses___closed__1_value_aux_1),((lean_object*)&l_Lean_Elab_DerivingClassView_ofSyntax___closed__0_value),LEAN_SCALAR_PTR_LITERAL(214, 208, 105, 11, 221, 56, 173, 240)}};
static const lean_ctor_object l_Lean_Elab_getOptDerivingClasses___closed__1_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_Elab_getOptDerivingClasses___closed__1_value_aux_2),((lean_object*)&l_Lean_Elab_getOptDerivingClasses___closed__0_value),LEAN_SCALAR_PTR_LITERAL(215, 163, 253, 206, 79, 89, 101, 240)}};
static const lean_object* l_Lean_Elab_getOptDerivingClasses___closed__1 = (const lean_object*)&l_Lean_Elab_getOptDerivingClasses___closed__1_value;
static const lean_array_object l_Lean_Elab_getOptDerivingClasses___closed__2_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_array_object) + sizeof(void*)*0, .m_other = 0, .m_tag = 246}, .m_size = 0, .m_capacity = 0, .m_data = {}};
static const lean_object* l_Lean_Elab_getOptDerivingClasses___closed__2 = (const lean_object*)&l_Lean_Elab_getOptDerivingClasses___closed__2_value;
static const lean_array_object l_Lean_Elab_getOptDerivingClasses___closed__3_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_array_object) + sizeof(void*)*0, .m_other = 0, .m_tag = 246}, .m_size = 0, .m_capacity = 0, .m_data = {}};
static const lean_object* l_Lean_Elab_getOptDerivingClasses___closed__3 = (const lean_object*)&l_Lean_Elab_getOptDerivingClasses___closed__3_value;
LEAN_EXPORT lean_object* l_Lean_Elab_getOptDerivingClasses(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_getOptDerivingClasses___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT uint8_t l___private_Init_Data_Array_Basic_0__Array_anyMUnsafe_any___at___00Lean_Elab_DerivingClassView_applyHandlers_spec__0(lean_object*, uint8_t, lean_object*, size_t, size_t);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_anyMUnsafe_any___at___00Lean_Elab_DerivingClassView_applyHandlers_spec__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_DerivingClassView_applyHandlers___lam__0(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_DerivingClassView_applyHandlers___lam__0___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_DerivingClassView_applyHandlers___lam__1(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_DerivingClassView_applyHandlers___lam__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_DerivingClassView_applyHandlers(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_DerivingClassView_applyHandlers___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_List_mapTR_loop___at___00Lean_mkConstWithLevelParams___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__3_spec__4(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_getConstVal___at___00Lean_mkConstWithLevelParams___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__3_spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_getConstVal___at___00Lean_mkConstWithLevelParams___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__3_spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_mkConstWithLevelParams___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_mkConstWithLevelParams___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static const lean_string_object l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4___lam__1___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 14, .m_capacity = 14, .m_length = 13, .m_data = "Declaration `"};
static const lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4___lam__1___closed__0 = (const lean_object*)&l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4___lam__1___closed__0_value;
static lean_once_cell_t l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4___lam__1___closed__1_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4___lam__1___closed__1;
static const lean_string_object l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4___lam__1___closed__2_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 187, .m_capacity = 187, .m_length = 186, .m_data = "When any declaration is a definition, this command goes into delta deriving mode, which applies only to definitions. Delta deriving unfolds definitions and infers pre-existing instances."};
static const lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4___lam__1___closed__2 = (const lean_object*)&l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4___lam__1___closed__2_value;
static lean_once_cell_t l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4___lam__1___closed__3_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4___lam__1___closed__3;
static lean_once_cell_t l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4___lam__1___closed__4_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4___lam__1___closed__4;
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4___lam__1(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4___lam__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static const lean_string_object l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__2___lam__0___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 37, .m_capacity = 37, .m_length = 36, .m_data = "running delta deriving handler for `"};
static const lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__2___lam__0___closed__0 = (const lean_object*)&l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__2___lam__0___closed__0_value;
static lean_once_cell_t l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__2___lam__0___closed__1_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__2___lam__0___closed__1;
static const lean_string_object l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__2___lam__0___closed__2_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 19, .m_capacity = 19, .m_length = 18, .m_data = "` and definition `"};
static const lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__2___lam__0___closed__2 = (const lean_object*)&l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__2___lam__0___closed__2_value;
static lean_once_cell_t l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__2___lam__0___closed__3_once = LEAN_ONCE_CELL_INITIALIZER;
static lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__2___lam__0___closed__3;
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__2___lam__0(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__2___lam__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__0(lean_object*, uint8_t, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__0___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*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__2___lam__1(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__2___lam__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*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_withLogging___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_withLogging___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__2(lean_object*, uint8_t, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__2___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*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4___lam__0(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4___lam__0___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_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4_spec__6(lean_object*, uint8_t, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4_spec__6___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*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4(uint8_t, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4___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*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving___lam__0(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving___lam__0___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_EXPORT lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_elabDeriving_spec__0___redArg();
LEAN_EXPORT lean_object* l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_elabDeriving_spec__0___redArg___boxed(lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_elabDeriving_spec__0(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_elabDeriving_spec__0___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_elabDeriving___lam__0(uint8_t, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_elabDeriving___lam__0___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Elab_elabDeriving_spec__5(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Elab_elabDeriving_spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_elabDeriving___lam__1(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_elabDeriving___lam__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT uint8_t l___private_Init_Data_Array_Basic_0__Array_anyMUnsafe_any___at___00Lean_Elab_elabDeriving_spec__7(uint8_t, lean_object*, size_t, size_t);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_anyMUnsafe_any___at___00Lean_Elab_elabDeriving_spec__7___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Elab_elabDeriving_spec__2(size_t, size_t, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Elab_elabDeriving_spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwErrorAt___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4_spec__9_spec__11___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwErrorAt___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4_spec__9_spec__11___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4_spec__9_spec__10_spec__11___redArg(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4_spec__9_spec__10_spec__11___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4_spec__9_spec__10(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4_spec__9_spec__10___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4_spec__9___redArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4_spec__9___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4___redArg(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3___redArg(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Elab_elabDeriving_spec__4(size_t, size_t, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Elab_elabDeriving_spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Elab_elabDeriving_spec__1(size_t, size_t, lean_object*);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Elab_elabDeriving_spec__1___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT uint8_t l___private_Init_Data_Array_Basic_0__Array_anyMUnsafe_any___at___00Lean_Elab_elabDeriving_spec__6(lean_object*, size_t, size_t);
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_anyMUnsafe_any___at___00Lean_Elab_elabDeriving_spec__6___boxed(lean_object*, lean_object*, lean_object*);
static const lean_string_object l_Lean_Elab_elabDeriving___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 9, .m_capacity = 9, .m_length = 8, .m_data = "deriving"};
static const lean_object* l_Lean_Elab_elabDeriving___closed__0 = (const lean_object*)&l_Lean_Elab_elabDeriving___closed__0_value;
static const lean_ctor_object l_Lean_Elab_elabDeriving___closed__1_value_aux_0 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__6_value),LEAN_SCALAR_PTR_LITERAL(70, 193, 83, 126, 233, 67, 208, 165)}};
static const lean_ctor_object l_Lean_Elab_elabDeriving___closed__1_value_aux_1 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_Elab_elabDeriving___closed__1_value_aux_0),((lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__7_value),LEAN_SCALAR_PTR_LITERAL(103, 136, 125, 166, 167, 98, 71, 111)}};
static const lean_ctor_object l_Lean_Elab_elabDeriving___closed__1_value_aux_2 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_Elab_elabDeriving___closed__1_value_aux_1),((lean_object*)&l_Lean_Elab_DerivingClassView_ofSyntax___closed__0_value),LEAN_SCALAR_PTR_LITERAL(214, 208, 105, 11, 221, 56, 173, 240)}};
static const lean_ctor_object l_Lean_Elab_elabDeriving___closed__1_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_Elab_elabDeriving___closed__1_value_aux_2),((lean_object*)&l_Lean_Elab_elabDeriving___closed__0_value),LEAN_SCALAR_PTR_LITERAL(159, 83, 233, 194, 173, 217, 144, 234)}};
static const lean_object* l_Lean_Elab_elabDeriving___closed__1 = (const lean_object*)&l_Lean_Elab_elabDeriving___closed__1_value;
LEAN_EXPORT lean_object* l_Lean_Elab_elabDeriving(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_elabDeriving___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4_spec__9(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4_spec__9___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4_spec__9_spec__10_spec__11(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4_spec__9_spec__10_spec__11___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwErrorAt___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4_spec__9_spec__11(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwErrorAt___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4_spec__9_spec__11___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static const lean_string_object l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving__1___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 13, .m_capacity = 13, .m_length = 12, .m_data = "elabDeriving"};
static const lean_object* l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving__1___closed__0 = (const lean_object*)&l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving__1___closed__0_value;
static const lean_ctor_object l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving__1___closed__1_value_aux_0 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__6_value),LEAN_SCALAR_PTR_LITERAL(70, 193, 83, 126, 233, 67, 208, 165)}};
static const lean_ctor_object l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving__1___closed__1_value_aux_1 = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving__1___closed__1_value_aux_0),((lean_object*)&l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg___lam__0___closed__0_value),LEAN_SCALAR_PTR_LITERAL(52, 247, 248, 201, 92, 23, 188, 159)}};
static const lean_ctor_object l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving__1___closed__1_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving__1___closed__1_value_aux_1),((lean_object*)&l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving__1___closed__0_value),LEAN_SCALAR_PTR_LITERAL(140, 138, 13, 0, 84, 200, 14, 81)}};
static const lean_object* l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving__1___closed__1 = (const lean_object*)&l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving__1___closed__1_value;
LEAN_EXPORT lean_object* l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving__1();
LEAN_EXPORT lean_object* l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving__1___boxed(lean_object*);
static const lean_ctor_object l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving_declRange__3___closed__0_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 0, .m_other = 2, .m_tag = 0}, .m_objs = {((lean_object*)(((size_t)(101) << 1) | 1)),((lean_object*)(((size_t)(35) << 1) | 1))}};
static const lean_object* l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving_declRange__3___closed__0 = (const lean_object*)&l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving_declRange__3___closed__0_value;
static const lean_ctor_object l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving_declRange__3___closed__1_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 0, .m_other = 2, .m_tag = 0}, .m_objs = {((lean_object*)(((size_t)(114) << 1) | 1)),((lean_object*)(((size_t)(31) << 1) | 1))}};
static const lean_object* l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving_declRange__3___closed__1 = (const lean_object*)&l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving_declRange__3___closed__1_value;
static const lean_ctor_object l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving_declRange__3___closed__2_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*4 + 0, .m_other = 4, .m_tag = 0}, .m_objs = {((lean_object*)&l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving_declRange__3___closed__0_value),((lean_object*)(((size_t)(35) << 1) | 1)),((lean_object*)&l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving_declRange__3___closed__1_value),((lean_object*)(((size_t)(31) << 1) | 1))}};
static const lean_object* l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving_declRange__3___closed__2 = (const lean_object*)&l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving_declRange__3___closed__2_value;
static const lean_ctor_object l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving_declRange__3___closed__3_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 0, .m_other = 2, .m_tag = 0}, .m_objs = {((lean_object*)(((size_t)(101) << 1) | 1)),((lean_object*)(((size_t)(39) << 1) | 1))}};
static const lean_object* l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving_declRange__3___closed__3 = (const lean_object*)&l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving_declRange__3___closed__3_value;
static const lean_ctor_object l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving_declRange__3___closed__4_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 0, .m_other = 2, .m_tag = 0}, .m_objs = {((lean_object*)(((size_t)(101) << 1) | 1)),((lean_object*)(((size_t)(51) << 1) | 1))}};
static const lean_object* l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving_declRange__3___closed__4 = (const lean_object*)&l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving_declRange__3___closed__4_value;
static const lean_ctor_object l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving_declRange__3___closed__5_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*4 + 0, .m_other = 4, .m_tag = 0}, .m_objs = {((lean_object*)&l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving_declRange__3___closed__3_value),((lean_object*)(((size_t)(39) << 1) | 1)),((lean_object*)&l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving_declRange__3___closed__4_value),((lean_object*)(((size_t)(51) << 1) | 1))}};
static const lean_object* l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving_declRange__3___closed__5 = (const lean_object*)&l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving_declRange__3___closed__5_value;
static const lean_ctor_object l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving_declRange__3___closed__6_value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 0, .m_other = 2, .m_tag = 0}, .m_objs = {((lean_object*)&l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving_declRange__3___closed__2_value),((lean_object*)&l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving_declRange__3___closed__5_value)}};
static const lean_object* l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving_declRange__3___closed__6 = (const lean_object*)&l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving_declRange__3___closed__6_value;
LEAN_EXPORT lean_object* l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving_declRange__3();
LEAN_EXPORT lean_object* l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving_declRange__3___boxed(lean_object*);
static const lean_string_object l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__0_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 9, .m_capacity = 9, .m_length = 8, .m_data = "_private"};
static const lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__0_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2_ = (const lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__0_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value;
static const lean_ctor_object l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__1_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)(((size_t)(0) << 1) | 1)),((lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__0_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value),LEAN_SCALAR_PTR_LITERAL(103, 214, 75, 80, 34, 198, 193, 153)}};
static const lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__1_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2_ = (const lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__1_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value;
static const lean_ctor_object l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__2_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__1_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value),((lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__6_value),LEAN_SCALAR_PTR_LITERAL(90, 18, 126, 130, 18, 214, 172, 143)}};
static const lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__2_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2_ = (const lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__2_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value;
static const lean_ctor_object l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__3_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__2_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value),((lean_object*)&l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg___lam__0___closed__0_value),LEAN_SCALAR_PTR_LITERAL(216, 59, 67, 7, 118, 215, 141, 75)}};
static const lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__3_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2_ = (const lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__3_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value;
static const lean_ctor_object l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__4_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__3_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value),((lean_object*)&l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__0_value),LEAN_SCALAR_PTR_LITERAL(202, 58, 65, 192, 197, 114, 188, 72)}};
static const lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__4_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2_ = (const lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__4_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value;
static const lean_string_object l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__5_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 6, .m_capacity = 6, .m_length = 5, .m_data = "Basic"};
static const lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__5_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2_ = (const lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__5_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value;
static const lean_ctor_object l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__6_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__4_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value),((lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__5_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value),LEAN_SCALAR_PTR_LITERAL(169, 178, 82, 186, 60, 135, 4, 34)}};
static const lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__6_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2_ = (const lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__6_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value;
static const lean_ctor_object l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__7_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 2}, .m_objs = {((lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__6_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value),((lean_object*)(((size_t)(0) << 1) | 1)),LEAN_SCALAR_PTR_LITERAL(236, 181, 121, 159, 190, 111, 21, 13)}};
static const lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__7_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2_ = (const lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__7_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value;
static const lean_ctor_object l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__8_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__7_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value),((lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__6_value),LEAN_SCALAR_PTR_LITERAL(237, 10, 142, 116, 221, 26, 0, 40)}};
static const lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__8_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2_ = (const lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__8_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value;
static const lean_ctor_object l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__9_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__8_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value),((lean_object*)&l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg___lam__0___closed__0_value),LEAN_SCALAR_PTR_LITERAL(123, 149, 175, 136, 240, 69, 160, 160)}};
static const lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__9_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2_ = (const lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__9_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value;
static const lean_string_object l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__10_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 7, .m_capacity = 7, .m_length = 6, .m_data = "initFn"};
static const lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__10_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2_ = (const lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__10_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value;
static const lean_ctor_object l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__11_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__9_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value),((lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__10_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value),LEAN_SCALAR_PTR_LITERAL(202, 8, 136, 99, 233, 73, 30, 195)}};
static const lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__11_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2_ = (const lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__11_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value;
static const lean_string_object l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__12_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 3, .m_capacity = 3, .m_length = 2, .m_data = "_@"};
static const lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__12_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2_ = (const lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__12_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value;
static const lean_ctor_object l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__13_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__11_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value),((lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__12_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value),LEAN_SCALAR_PTR_LITERAL(35, 1, 22, 47, 227, 1, 177, 129)}};
static const lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__13_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2_ = (const lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__13_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value;
static const lean_ctor_object l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__14_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__13_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value),((lean_object*)&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__6_value),LEAN_SCALAR_PTR_LITERAL(110, 90, 144, 208, 34, 14, 18, 176)}};
static const lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__14_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2_ = (const lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__14_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value;
static const lean_ctor_object l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__15_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__14_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value),((lean_object*)&l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg___lam__0___closed__0_value),LEAN_SCALAR_PTR_LITERAL(60, 126, 200, 69, 14, 151, 241, 101)}};
static const lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__15_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2_ = (const lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__15_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value;
static const lean_ctor_object l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__16_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__15_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value),((lean_object*)&l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__0_value),LEAN_SCALAR_PTR_LITERAL(62, 221, 195, 192, 254, 175, 246, 3)}};
static const lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__16_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2_ = (const lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__16_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value;
static const lean_ctor_object l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__17_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__16_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value),((lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__5_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value),LEAN_SCALAR_PTR_LITERAL(133, 53, 29, 135, 7, 158, 253, 216)}};
static const lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__17_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2_ = (const lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__17_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value;
static const lean_ctor_object l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__18_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 2}, .m_objs = {((lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__17_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value),((lean_object*)(((size_t)(1443173927) << 1) | 1)),LEAN_SCALAR_PTR_LITERAL(104, 71, 57, 90, 84, 76, 95, 37)}};
static const lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__18_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2_ = (const lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__18_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value;
static const lean_string_object l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__19_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 8, .m_capacity = 8, .m_length = 7, .m_data = "_hygCtx"};
static const lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__19_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2_ = (const lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__19_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value;
static const lean_ctor_object l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__20_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__18_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value),((lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__19_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value),LEAN_SCALAR_PTR_LITERAL(207, 98, 101, 105, 71, 254, 228, 96)}};
static const lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__20_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2_ = (const lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__20_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value;
static const lean_string_object l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__21_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value = {.m_header = {.m_rc = 0, .m_cs_sz = 0, .m_other = 0, .m_tag = 249}, .m_size = 5, .m_capacity = 5, .m_length = 4, .m_data = "_hyg"};
static const lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__21_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2_ = (const lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__21_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value;
static const lean_ctor_object l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__22_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 1}, .m_objs = {((lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__20_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value),((lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__21_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value),LEAN_SCALAR_PTR_LITERAL(55, 140, 75, 250, 115, 220, 157, 20)}};
static const lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__22_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2_ = (const lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__22_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value;
static const lean_ctor_object l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__23_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value = {.m_header = {.m_rc = 0, .m_cs_sz = sizeof(lean_ctor_object) + sizeof(void*)*2 + 8, .m_other = 2, .m_tag = 2}, .m_objs = {((lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__22_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value),((lean_object*)(((size_t)(2) << 1) | 1)),LEAN_SCALAR_PTR_LITERAL(34, 213, 217, 66, 228, 19, 109, 67)}};
static const lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__23_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2_ = (const lean_object*)&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__23_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2__value;
LEAN_EXPORT lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2_();
LEAN_EXPORT lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2____boxed(lean_object*);
LEAN_EXPORT lean_object* l_Lean_addMessageContextFull___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure_spec__0_spec__0(lean_object* v_msgData_1_, lean_object* v___y_2_, lean_object* v___y_3_, lean_object* v___y_4_, lean_object* v___y_5_){
_start:
{
lean_object* v___x_7_; lean_object* v_env_8_; lean_object* v___x_9_; lean_object* v_mctx_10_; lean_object* v_lctx_11_; lean_object* v_options_12_; lean_object* v___x_13_; lean_object* v___x_14_; lean_object* v___x_15_; 
v___x_7_ = lean_st_ref_get(v___y_5_);
v_env_8_ = lean_ctor_get(v___x_7_, 0);
lean_inc_ref(v_env_8_);
lean_dec(v___x_7_);
v___x_9_ = lean_st_ref_get(v___y_3_);
v_mctx_10_ = lean_ctor_get(v___x_9_, 0);
lean_inc_ref(v_mctx_10_);
lean_dec(v___x_9_);
v_lctx_11_ = lean_ctor_get(v___y_2_, 2);
v_options_12_ = lean_ctor_get(v___y_4_, 2);
lean_inc_ref(v_options_12_);
lean_inc_ref(v_lctx_11_);
v___x_13_ = lean_alloc_ctor(0, 4, 0);
lean_ctor_set(v___x_13_, 0, v_env_8_);
lean_ctor_set(v___x_13_, 1, v_mctx_10_);
lean_ctor_set(v___x_13_, 2, v_lctx_11_);
lean_ctor_set(v___x_13_, 3, v_options_12_);
v___x_14_ = lean_alloc_ctor(3, 2, 0);
lean_ctor_set(v___x_14_, 0, v___x_13_);
lean_ctor_set(v___x_14_, 1, v_msgData_1_);
v___x_15_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_15_, 0, v___x_14_);
return v___x_15_;
}
}
LEAN_EXPORT lean_object* l_Lean_addMessageContextFull___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure_spec__0_spec__0___boxed(lean_object* v_msgData_16_, lean_object* v___y_17_, lean_object* v___y_18_, lean_object* v___y_19_, lean_object* v___y_20_, lean_object* v___y_21_){
_start:
{
lean_object* v_res_22_; 
v_res_22_ = l_Lean_addMessageContextFull___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure_spec__0_spec__0(v_msgData_16_, v___y_17_, v___y_18_, v___y_19_, v___y_20_);
lean_dec(v___y_20_);
lean_dec_ref(v___y_19_);
lean_dec(v___y_18_);
lean_dec_ref(v___y_17_);
return v_res_22_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure_spec__0___redArg(lean_object* v_msg_23_, lean_object* v___y_24_, lean_object* v___y_25_, lean_object* v___y_26_, lean_object* v___y_27_){
_start:
{
lean_object* v_ref_29_; lean_object* v___x_30_; lean_object* v_a_31_; lean_object* v___x_33_; uint8_t v_isShared_34_; uint8_t v_isSharedCheck_39_; 
v_ref_29_ = lean_ctor_get(v___y_26_, 5);
v___x_30_ = l_Lean_addMessageContextFull___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure_spec__0_spec__0(v_msg_23_, v___y_24_, v___y_25_, v___y_26_, v___y_27_);
v_a_31_ = lean_ctor_get(v___x_30_, 0);
v_isSharedCheck_39_ = !lean_is_exclusive(v___x_30_);
if (v_isSharedCheck_39_ == 0)
{
v___x_33_ = v___x_30_;
v_isShared_34_ = v_isSharedCheck_39_;
goto v_resetjp_32_;
}
else
{
lean_inc(v_a_31_);
lean_dec(v___x_30_);
v___x_33_ = lean_box(0);
v_isShared_34_ = v_isSharedCheck_39_;
goto v_resetjp_32_;
}
v_resetjp_32_:
{
lean_object* v___x_35_; lean_object* v___x_37_; 
lean_inc(v_ref_29_);
v___x_35_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_35_, 0, v_ref_29_);
lean_ctor_set(v___x_35_, 1, v_a_31_);
if (v_isShared_34_ == 0)
{
lean_ctor_set_tag(v___x_33_, 1);
lean_ctor_set(v___x_33_, 0, v___x_35_);
v___x_37_ = v___x_33_;
goto v_reusejp_36_;
}
else
{
lean_object* v_reuseFailAlloc_38_; 
v_reuseFailAlloc_38_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_38_, 0, v___x_35_);
v___x_37_ = v_reuseFailAlloc_38_;
goto v_reusejp_36_;
}
v_reusejp_36_:
{
return v___x_37_;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure_spec__0___redArg___boxed(lean_object* v_msg_40_, lean_object* v___y_41_, lean_object* v___y_42_, lean_object* v___y_43_, lean_object* v___y_44_, lean_object* v___y_45_){
_start:
{
lean_object* v_res_46_; 
v_res_46_ = l_Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure_spec__0___redArg(v_msg_40_, v___y_41_, v___y_42_, v___y_43_, v___y_44_);
lean_dec(v___y_44_);
lean_dec_ref(v___y_43_);
lean_dec(v___y_42_);
lean_dec_ref(v___y_41_);
return v_res_46_;
}
}
static lean_object* _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__1(void){
_start:
{
lean_object* v___x_48_; lean_object* v___x_49_; 
v___x_48_ = ((lean_object*)(l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__0));
v___x_49_ = l_Lean_stringToMessageData(v___x_48_);
return v___x_49_;
}
}
static lean_object* _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__3(void){
_start:
{
lean_object* v___x_51_; lean_object* v___x_52_; 
v___x_51_ = ((lean_object*)(l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__2));
v___x_52_ = l_Lean_stringToMessageData(v___x_51_);
return v___x_52_;
}
}
static lean_object* _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__5(void){
_start:
{
lean_object* v___x_54_; lean_object* v___x_55_; 
v___x_54_ = ((lean_object*)(l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__4));
v___x_55_ = l_Lean_stringToMessageData(v___x_54_);
return v___x_55_;
}
}
static lean_object* _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__7(void){
_start:
{
lean_object* v___x_57_; lean_object* v___x_58_; 
v___x_57_ = ((lean_object*)(l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__6));
v___x_58_ = l_Lean_stringToMessageData(v___x_57_);
return v___x_58_;
}
}
static lean_object* _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__9(void){
_start:
{
lean_object* v___x_60_; lean_object* v___x_61_; 
v___x_60_ = ((lean_object*)(l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__8));
v___x_61_ = l_Lean_stringToMessageData(v___x_60_);
return v___x_61_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg(lean_object* v_className_62_, lean_object* v_declName_63_, lean_object* v_msg_x3f_64_, lean_object* v_suffix_65_, lean_object* v_a_66_, lean_object* v_a_67_, lean_object* v_a_68_, lean_object* v_a_69_){
_start:
{
lean_object* v___y_72_; 
if (lean_obj_tag(v_msg_x3f_64_) == 1)
{
lean_object* v_val_85_; lean_object* v___x_86_; lean_object* v___x_87_; lean_object* v___x_88_; 
v_val_85_ = lean_ctor_get(v_msg_x3f_64_, 0);
v___x_86_ = lean_obj_once(&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__7, &l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__7_once, _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__7);
lean_inc(v_val_85_);
v___x_87_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_87_, 0, v___x_86_);
lean_ctor_set(v___x_87_, 1, v_val_85_);
v___x_88_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_88_, 0, v___x_87_);
lean_ctor_set(v___x_88_, 1, v_suffix_65_);
v___y_72_ = v___x_88_;
goto v___jp_71_;
}
else
{
lean_object* v___x_89_; lean_object* v___x_90_; 
v___x_89_ = lean_obj_once(&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__9, &l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__9_once, _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__9);
v___x_90_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_90_, 0, v___x_89_);
lean_ctor_set(v___x_90_, 1, v_suffix_65_);
v___y_72_ = v___x_90_;
goto v___jp_71_;
}
v___jp_71_:
{
lean_object* v___x_73_; uint8_t v___x_74_; lean_object* v___x_75_; lean_object* v___x_76_; lean_object* v___x_77_; lean_object* v___x_78_; lean_object* v___x_79_; lean_object* v___x_80_; lean_object* v___x_81_; lean_object* v___x_82_; lean_object* v___x_83_; lean_object* v___x_84_; 
v___x_73_ = lean_obj_once(&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__1, &l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__1_once, _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__1);
v___x_74_ = 0;
v___x_75_ = l_Lean_MessageData_ofConstName(v_className_62_, v___x_74_);
v___x_76_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_76_, 0, v___x_73_);
lean_ctor_set(v___x_76_, 1, v___x_75_);
v___x_77_ = lean_obj_once(&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__3, &l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__3_once, _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__3);
v___x_78_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_78_, 0, v___x_76_);
lean_ctor_set(v___x_78_, 1, v___x_77_);
v___x_79_ = l_Lean_MessageData_ofConstName(v_declName_63_, v___x_74_);
v___x_80_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_80_, 0, v___x_78_);
lean_ctor_set(v___x_80_, 1, v___x_79_);
v___x_81_ = lean_obj_once(&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__5, &l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__5_once, _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__5);
v___x_82_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_82_, 0, v___x_80_);
lean_ctor_set(v___x_82_, 1, v___x_81_);
v___x_83_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_83_, 0, v___x_82_);
lean_ctor_set(v___x_83_, 1, v___y_72_);
v___x_84_ = l_Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure_spec__0___redArg(v___x_83_, v_a_66_, v_a_67_, v_a_68_, v_a_69_);
return v___x_84_;
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___boxed(lean_object* v_className_91_, lean_object* v_declName_92_, lean_object* v_msg_x3f_93_, lean_object* v_suffix_94_, lean_object* v_a_95_, lean_object* v_a_96_, lean_object* v_a_97_, lean_object* v_a_98_, lean_object* v_a_99_){
_start:
{
lean_object* v_res_100_; 
v_res_100_ = l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg(v_className_91_, v_declName_92_, v_msg_x3f_93_, v_suffix_94_, v_a_95_, v_a_96_, v_a_97_, v_a_98_);
lean_dec(v_a_98_);
lean_dec_ref(v_a_97_);
lean_dec(v_a_96_);
lean_dec_ref(v_a_95_);
lean_dec(v_msg_x3f_93_);
return v_res_100_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure(lean_object* v_00_u03b1_101_, lean_object* v_className_102_, lean_object* v_declName_103_, lean_object* v_msg_x3f_104_, lean_object* v_suffix_105_, lean_object* v_a_106_, lean_object* v_a_107_, lean_object* v_a_108_, lean_object* v_a_109_){
_start:
{
lean_object* v___x_111_; 
v___x_111_ = l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg(v_className_102_, v_declName_103_, v_msg_x3f_104_, v_suffix_105_, v_a_106_, v_a_107_, v_a_108_, v_a_109_);
return v___x_111_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___boxed(lean_object* v_00_u03b1_112_, lean_object* v_className_113_, lean_object* v_declName_114_, lean_object* v_msg_x3f_115_, lean_object* v_suffix_116_, lean_object* v_a_117_, lean_object* v_a_118_, lean_object* v_a_119_, lean_object* v_a_120_, lean_object* v_a_121_){
_start:
{
lean_object* v_res_122_; 
v_res_122_ = l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure(v_00_u03b1_112_, v_className_113_, v_declName_114_, v_msg_x3f_115_, v_suffix_116_, v_a_117_, v_a_118_, v_a_119_, v_a_120_);
lean_dec(v_a_120_);
lean_dec_ref(v_a_119_);
lean_dec(v_a_118_);
lean_dec_ref(v_a_117_);
lean_dec(v_msg_x3f_115_);
return v_res_122_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure_spec__0(lean_object* v_00_u03b1_123_, lean_object* v_msg_124_, lean_object* v___y_125_, lean_object* v___y_126_, lean_object* v___y_127_, lean_object* v___y_128_){
_start:
{
lean_object* v___x_130_; 
v___x_130_ = l_Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure_spec__0___redArg(v_msg_124_, v___y_125_, v___y_126_, v___y_127_, v___y_128_);
return v___x_130_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure_spec__0___boxed(lean_object* v_00_u03b1_131_, lean_object* v_msg_132_, lean_object* v___y_133_, lean_object* v___y_134_, lean_object* v___y_135_, lean_object* v___y_136_, lean_object* v___y_137_){
_start:
{
lean_object* v_res_138_; 
v_res_138_ = l_Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure_spec__0(v_00_u03b1_131_, v_msg_132_, v___y_133_, v___y_134_, v___y_135_, v___y_136_);
lean_dec(v___y_136_);
lean_dec_ref(v___y_135_);
lean_dec(v___y_134_);
lean_dec_ref(v___y_133_);
return v_res_138_;
}
}
LEAN_EXPORT lean_object* l_Lean_instantiateMVars___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__0___redArg(lean_object* v_e_139_, lean_object* v___y_140_){
_start:
{
uint8_t v___x_142_; 
v___x_142_ = l_Lean_Expr_hasMVar(v_e_139_);
if (v___x_142_ == 0)
{
lean_object* v___x_143_; 
v___x_143_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_143_, 0, v_e_139_);
return v___x_143_;
}
else
{
lean_object* v___x_144_; lean_object* v_mctx_145_; lean_object* v___x_146_; lean_object* v_fst_147_; lean_object* v_snd_148_; lean_object* v___x_149_; lean_object* v_cache_150_; lean_object* v_zetaDeltaFVarIds_151_; lean_object* v_postponed_152_; lean_object* v_diag_153_; lean_object* v___x_155_; uint8_t v_isShared_156_; uint8_t v_isSharedCheck_162_; 
v___x_144_ = lean_st_ref_get(v___y_140_);
v_mctx_145_ = lean_ctor_get(v___x_144_, 0);
lean_inc_ref(v_mctx_145_);
lean_dec(v___x_144_);
v___x_146_ = l_Lean_instantiateMVarsCore(v_mctx_145_, v_e_139_);
v_fst_147_ = lean_ctor_get(v___x_146_, 0);
lean_inc(v_fst_147_);
v_snd_148_ = lean_ctor_get(v___x_146_, 1);
lean_inc(v_snd_148_);
lean_dec_ref(v___x_146_);
v___x_149_ = lean_st_ref_take(v___y_140_);
v_cache_150_ = lean_ctor_get(v___x_149_, 1);
v_zetaDeltaFVarIds_151_ = lean_ctor_get(v___x_149_, 2);
v_postponed_152_ = lean_ctor_get(v___x_149_, 3);
v_diag_153_ = lean_ctor_get(v___x_149_, 4);
v_isSharedCheck_162_ = !lean_is_exclusive(v___x_149_);
if (v_isSharedCheck_162_ == 0)
{
lean_object* v_unused_163_; 
v_unused_163_ = lean_ctor_get(v___x_149_, 0);
lean_dec(v_unused_163_);
v___x_155_ = v___x_149_;
v_isShared_156_ = v_isSharedCheck_162_;
goto v_resetjp_154_;
}
else
{
lean_inc(v_diag_153_);
lean_inc(v_postponed_152_);
lean_inc(v_zetaDeltaFVarIds_151_);
lean_inc(v_cache_150_);
lean_dec(v___x_149_);
v___x_155_ = lean_box(0);
v_isShared_156_ = v_isSharedCheck_162_;
goto v_resetjp_154_;
}
v_resetjp_154_:
{
lean_object* v___x_158_; 
if (v_isShared_156_ == 0)
{
lean_ctor_set(v___x_155_, 0, v_snd_148_);
v___x_158_ = v___x_155_;
goto v_reusejp_157_;
}
else
{
lean_object* v_reuseFailAlloc_161_; 
v_reuseFailAlloc_161_ = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(v_reuseFailAlloc_161_, 0, v_snd_148_);
lean_ctor_set(v_reuseFailAlloc_161_, 1, v_cache_150_);
lean_ctor_set(v_reuseFailAlloc_161_, 2, v_zetaDeltaFVarIds_151_);
lean_ctor_set(v_reuseFailAlloc_161_, 3, v_postponed_152_);
lean_ctor_set(v_reuseFailAlloc_161_, 4, v_diag_153_);
v___x_158_ = v_reuseFailAlloc_161_;
goto v_reusejp_157_;
}
v_reusejp_157_:
{
lean_object* v___x_159_; lean_object* v___x_160_; 
v___x_159_ = lean_st_ref_set(v___y_140_, v___x_158_);
v___x_160_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_160_, 0, v_fst_147_);
return v___x_160_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_instantiateMVars___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__0___redArg___boxed(lean_object* v_e_164_, lean_object* v___y_165_, lean_object* v___y_166_){
_start:
{
lean_object* v_res_167_; 
v_res_167_ = l_Lean_instantiateMVars___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__0___redArg(v_e_164_, v___y_165_);
lean_dec(v___y_165_);
return v_res_167_;
}
}
LEAN_EXPORT lean_object* l_Lean_instantiateMVars___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__0(lean_object* v_e_168_, lean_object* v___y_169_, lean_object* v___y_170_, lean_object* v___y_171_, lean_object* v___y_172_, lean_object* v___y_173_, lean_object* v___y_174_){
_start:
{
lean_object* v___x_176_; 
v___x_176_ = l_Lean_instantiateMVars___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__0___redArg(v_e_168_, v___y_172_);
return v___x_176_;
}
}
LEAN_EXPORT lean_object* l_Lean_instantiateMVars___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__0___boxed(lean_object* v_e_177_, lean_object* v___y_178_, lean_object* v___y_179_, lean_object* v___y_180_, lean_object* v___y_181_, lean_object* v___y_182_, lean_object* v___y_183_, lean_object* v___y_184_){
_start:
{
lean_object* v_res_185_; 
v_res_185_ = l_Lean_instantiateMVars___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__0(v_e_177_, v___y_178_, v___y_179_, v___y_180_, v___y_181_, v___y_182_, v___y_183_);
lean_dec(v___y_183_);
lean_dec_ref(v___y_182_);
lean_dec(v___y_181_);
lean_dec_ref(v___y_180_);
lean_dec(v___y_179_);
lean_dec_ref(v___y_178_);
return v_res_185_;
}
}
LEAN_EXPORT lean_object* l_Lean_isTracingEnabledFor___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__2___redArg(lean_object* v_cls_189_, lean_object* v___y_190_){
_start:
{
lean_object* v_options_192_; uint8_t v_hasTrace_193_; 
v_options_192_ = lean_ctor_get(v___y_190_, 2);
v_hasTrace_193_ = lean_ctor_get_uint8(v_options_192_, sizeof(void*)*1);
if (v_hasTrace_193_ == 0)
{
lean_object* v___x_194_; lean_object* v___x_195_; 
lean_dec(v_cls_189_);
v___x_194_ = lean_box(v_hasTrace_193_);
v___x_195_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_195_, 0, v___x_194_);
return v___x_195_;
}
else
{
lean_object* v_inheritedTraceOptions_196_; lean_object* v___x_197_; lean_object* v___x_198_; uint8_t v___x_199_; lean_object* v___x_200_; lean_object* v___x_201_; 
v_inheritedTraceOptions_196_ = lean_ctor_get(v___y_190_, 13);
v___x_197_ = ((lean_object*)(l_Lean_isTracingEnabledFor___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__2___redArg___closed__1));
v___x_198_ = l_Lean_Name_append(v___x_197_, v_cls_189_);
v___x_199_ = l___private_Lean_Util_Trace_0__Lean_checkTraceOption_go(v_inheritedTraceOptions_196_, v_options_192_, v___x_198_);
lean_dec(v___x_198_);
v___x_200_ = lean_box(v___x_199_);
v___x_201_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_201_, 0, v___x_200_);
return v___x_201_;
}
}
}
LEAN_EXPORT lean_object* l_Lean_isTracingEnabledFor___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__2___redArg___boxed(lean_object* v_cls_202_, lean_object* v___y_203_, lean_object* v___y_204_){
_start:
{
lean_object* v_res_205_; 
v_res_205_ = l_Lean_isTracingEnabledFor___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__2___redArg(v_cls_202_, v___y_203_);
lean_dec_ref(v___y_203_);
return v_res_205_;
}
}
LEAN_EXPORT lean_object* l_Lean_isTracingEnabledFor___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__2(lean_object* v_cls_206_, lean_object* v___y_207_, lean_object* v___y_208_, lean_object* v___y_209_, lean_object* v___y_210_, lean_object* v___y_211_, lean_object* v___y_212_){
_start:
{
lean_object* v___x_214_; 
v___x_214_ = l_Lean_isTracingEnabledFor___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__2___redArg(v_cls_206_, v___y_211_);
return v___x_214_;
}
}
LEAN_EXPORT lean_object* l_Lean_isTracingEnabledFor___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__2___boxed(lean_object* v_cls_215_, lean_object* v___y_216_, lean_object* v___y_217_, lean_object* v___y_218_, lean_object* v___y_219_, lean_object* v___y_220_, lean_object* v___y_221_, lean_object* v___y_222_){
_start:
{
lean_object* v_res_223_; 
v_res_223_ = l_Lean_isTracingEnabledFor___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__2(v_cls_215_, v___y_216_, v___y_217_, v___y_218_, v___y_219_, v___y_220_, v___y_221_);
lean_dec(v___y_221_);
lean_dec_ref(v___y_220_);
lean_dec(v___y_219_);
lean_dec_ref(v___y_218_);
lean_dec(v___y_217_);
lean_dec_ref(v___y_216_);
return v_res_223_;
}
}
static lean_object* _init_l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__6___redArg___closed__0(void){
_start:
{
lean_object* v___x_224_; lean_object* v___x_225_; lean_object* v___x_226_; 
v___x_224_ = lean_unsigned_to_nat(32u);
v___x_225_ = lean_mk_empty_array_with_capacity(v___x_224_);
v___x_226_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_226_, 0, v___x_225_);
return v___x_226_;
}
}
static lean_object* _init_l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__6___redArg___closed__1(void){
_start:
{
size_t v___x_227_; lean_object* v___x_228_; lean_object* v___x_229_; lean_object* v___x_230_; lean_object* v___x_231_; lean_object* v___x_232_; 
v___x_227_ = ((size_t)5ULL);
v___x_228_ = lean_unsigned_to_nat(0u);
v___x_229_ = lean_unsigned_to_nat(32u);
v___x_230_ = lean_mk_empty_array_with_capacity(v___x_229_);
v___x_231_ = lean_obj_once(&l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__6___redArg___closed__0, &l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__6___redArg___closed__0_once, _init_l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__6___redArg___closed__0);
v___x_232_ = lean_alloc_ctor(0, 4, sizeof(size_t)*1);
lean_ctor_set(v___x_232_, 0, v___x_231_);
lean_ctor_set(v___x_232_, 1, v___x_230_);
lean_ctor_set(v___x_232_, 2, v___x_228_);
lean_ctor_set(v___x_232_, 3, v___x_228_);
lean_ctor_set_usize(v___x_232_, 4, v___x_227_);
return v___x_232_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__6___redArg(lean_object* v___y_233_){
_start:
{
lean_object* v___x_235_; lean_object* v_traceState_236_; lean_object* v_traces_237_; lean_object* v___x_238_; lean_object* v_traceState_239_; lean_object* v_env_240_; lean_object* v_nextMacroScope_241_; lean_object* v_ngen_242_; lean_object* v_auxDeclNGen_243_; lean_object* v_cache_244_; lean_object* v_messages_245_; lean_object* v_infoState_246_; lean_object* v_snapshotTasks_247_; lean_object* v___x_249_; uint8_t v_isShared_250_; uint8_t v_isSharedCheck_266_; 
v___x_235_ = lean_st_ref_get(v___y_233_);
v_traceState_236_ = lean_ctor_get(v___x_235_, 4);
lean_inc_ref(v_traceState_236_);
lean_dec(v___x_235_);
v_traces_237_ = lean_ctor_get(v_traceState_236_, 0);
lean_inc_ref(v_traces_237_);
lean_dec_ref(v_traceState_236_);
v___x_238_ = lean_st_ref_take(v___y_233_);
v_traceState_239_ = lean_ctor_get(v___x_238_, 4);
v_env_240_ = lean_ctor_get(v___x_238_, 0);
v_nextMacroScope_241_ = lean_ctor_get(v___x_238_, 1);
v_ngen_242_ = lean_ctor_get(v___x_238_, 2);
v_auxDeclNGen_243_ = lean_ctor_get(v___x_238_, 3);
v_cache_244_ = lean_ctor_get(v___x_238_, 5);
v_messages_245_ = lean_ctor_get(v___x_238_, 6);
v_infoState_246_ = lean_ctor_get(v___x_238_, 7);
v_snapshotTasks_247_ = lean_ctor_get(v___x_238_, 8);
v_isSharedCheck_266_ = !lean_is_exclusive(v___x_238_);
if (v_isSharedCheck_266_ == 0)
{
v___x_249_ = v___x_238_;
v_isShared_250_ = v_isSharedCheck_266_;
goto v_resetjp_248_;
}
else
{
lean_inc(v_snapshotTasks_247_);
lean_inc(v_infoState_246_);
lean_inc(v_messages_245_);
lean_inc(v_cache_244_);
lean_inc(v_traceState_239_);
lean_inc(v_auxDeclNGen_243_);
lean_inc(v_ngen_242_);
lean_inc(v_nextMacroScope_241_);
lean_inc(v_env_240_);
lean_dec(v___x_238_);
v___x_249_ = lean_box(0);
v_isShared_250_ = v_isSharedCheck_266_;
goto v_resetjp_248_;
}
v_resetjp_248_:
{
uint64_t v_tid_251_; lean_object* v___x_253_; uint8_t v_isShared_254_; uint8_t v_isSharedCheck_264_; 
v_tid_251_ = lean_ctor_get_uint64(v_traceState_239_, sizeof(void*)*1);
v_isSharedCheck_264_ = !lean_is_exclusive(v_traceState_239_);
if (v_isSharedCheck_264_ == 0)
{
lean_object* v_unused_265_; 
v_unused_265_ = lean_ctor_get(v_traceState_239_, 0);
lean_dec(v_unused_265_);
v___x_253_ = v_traceState_239_;
v_isShared_254_ = v_isSharedCheck_264_;
goto v_resetjp_252_;
}
else
{
lean_dec(v_traceState_239_);
v___x_253_ = lean_box(0);
v_isShared_254_ = v_isSharedCheck_264_;
goto v_resetjp_252_;
}
v_resetjp_252_:
{
lean_object* v___x_255_; lean_object* v___x_257_; 
v___x_255_ = lean_obj_once(&l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__6___redArg___closed__1, &l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__6___redArg___closed__1_once, _init_l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__6___redArg___closed__1);
if (v_isShared_254_ == 0)
{
lean_ctor_set(v___x_253_, 0, v___x_255_);
v___x_257_ = v___x_253_;
goto v_reusejp_256_;
}
else
{
lean_object* v_reuseFailAlloc_263_; 
v_reuseFailAlloc_263_ = lean_alloc_ctor(0, 1, 8);
lean_ctor_set(v_reuseFailAlloc_263_, 0, v___x_255_);
lean_ctor_set_uint64(v_reuseFailAlloc_263_, sizeof(void*)*1, v_tid_251_);
v___x_257_ = v_reuseFailAlloc_263_;
goto v_reusejp_256_;
}
v_reusejp_256_:
{
lean_object* v___x_259_; 
if (v_isShared_250_ == 0)
{
lean_ctor_set(v___x_249_, 4, v___x_257_);
v___x_259_ = v___x_249_;
goto v_reusejp_258_;
}
else
{
lean_object* v_reuseFailAlloc_262_; 
v_reuseFailAlloc_262_ = lean_alloc_ctor(0, 9, 0);
lean_ctor_set(v_reuseFailAlloc_262_, 0, v_env_240_);
lean_ctor_set(v_reuseFailAlloc_262_, 1, v_nextMacroScope_241_);
lean_ctor_set(v_reuseFailAlloc_262_, 2, v_ngen_242_);
lean_ctor_set(v_reuseFailAlloc_262_, 3, v_auxDeclNGen_243_);
lean_ctor_set(v_reuseFailAlloc_262_, 4, v___x_257_);
lean_ctor_set(v_reuseFailAlloc_262_, 5, v_cache_244_);
lean_ctor_set(v_reuseFailAlloc_262_, 6, v_messages_245_);
lean_ctor_set(v_reuseFailAlloc_262_, 7, v_infoState_246_);
lean_ctor_set(v_reuseFailAlloc_262_, 8, v_snapshotTasks_247_);
v___x_259_ = v_reuseFailAlloc_262_;
goto v_reusejp_258_;
}
v_reusejp_258_:
{
lean_object* v___x_260_; lean_object* v___x_261_; 
v___x_260_ = lean_st_ref_set(v___y_233_, v___x_259_);
v___x_261_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_261_, 0, v_traces_237_);
return v___x_261_;
}
}
}
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__6___redArg___boxed(lean_object* v___y_267_, lean_object* v___y_268_){
_start:
{
lean_object* v_res_269_; 
v_res_269_ = l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__6___redArg(v___y_267_);
lean_dec(v___y_267_);
return v_res_269_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__6(lean_object* v___y_270_, lean_object* v___y_271_, lean_object* v___y_272_, lean_object* v___y_273_, lean_object* v___y_274_, lean_object* v___y_275_){
_start:
{
lean_object* v___x_277_; 
v___x_277_ = l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__6___redArg(v___y_275_);
return v___x_277_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__6___boxed(lean_object* v___y_278_, lean_object* v___y_279_, lean_object* v___y_280_, lean_object* v___y_281_, lean_object* v___y_282_, lean_object* v___y_283_, lean_object* v___y_284_){
_start:
{
lean_object* v_res_285_; 
v_res_285_ = l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__6(v___y_278_, v___y_279_, v___y_280_, v___y_281_, v___y_282_, v___y_283_);
lean_dec(v___y_283_);
lean_dec_ref(v___y_282_);
lean_dec(v___y_281_);
lean_dec_ref(v___y_280_);
lean_dec(v___y_279_);
lean_dec_ref(v___y_278_);
return v_res_285_;
}
}
LEAN_EXPORT uint8_t l_Lean_Option_get___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__7(lean_object* v_opts_286_, lean_object* v_opt_287_){
_start:
{
lean_object* v_name_288_; lean_object* v_defValue_289_; lean_object* v_map_290_; lean_object* v___x_291_; 
v_name_288_ = lean_ctor_get(v_opt_287_, 0);
v_defValue_289_ = lean_ctor_get(v_opt_287_, 1);
v_map_290_ = lean_ctor_get(v_opts_286_, 0);
v___x_291_ = l_Std_DTreeMap_Internal_Impl_Const_get_x3f___at___00Lean_NameMap_find_x3f_spec__0___redArg(v_map_290_, v_name_288_);
if (lean_obj_tag(v___x_291_) == 0)
{
uint8_t v___x_292_; 
v___x_292_ = lean_unbox(v_defValue_289_);
return v___x_292_;
}
else
{
lean_object* v_val_293_; 
v_val_293_ = lean_ctor_get(v___x_291_, 0);
lean_inc(v_val_293_);
lean_dec_ref(v___x_291_);
if (lean_obj_tag(v_val_293_) == 1)
{
uint8_t v_v_294_; 
v_v_294_ = lean_ctor_get_uint8(v_val_293_, 0);
lean_dec_ref(v_val_293_);
return v_v_294_;
}
else
{
uint8_t v___x_295_; 
lean_dec(v_val_293_);
v___x_295_ = lean_unbox(v_defValue_289_);
return v___x_295_;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Option_get___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__7___boxed(lean_object* v_opts_296_, lean_object* v_opt_297_){
_start:
{
uint8_t v_res_298_; lean_object* v_r_299_; 
v_res_298_ = l_Lean_Option_get___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__7(v_opts_296_, v_opt_297_);
lean_dec_ref(v_opt_297_);
lean_dec_ref(v_opts_296_);
v_r_299_ = lean_box(v_res_298_);
return v_r_299_;
}
}
static lean_object* _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___lam__0___closed__1(void){
_start:
{
lean_object* v___x_301_; lean_object* v___x_302_; 
v___x_301_ = ((lean_object*)(l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___lam__0___closed__0));
v___x_302_ = l_Lean_stringToMessageData(v___x_301_);
return v___x_302_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___lam__0(lean_object* v_val_303_, lean_object* v_x_304_, lean_object* v___y_305_, lean_object* v___y_306_, lean_object* v___y_307_, lean_object* v___y_308_, lean_object* v___y_309_, lean_object* v___y_310_){
_start:
{
lean_object* v___x_312_; lean_object* v___x_313_; lean_object* v___x_314_; lean_object* v___x_315_; 
v___x_312_ = lean_obj_once(&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___lam__0___closed__1, &l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___lam__0___closed__1_once, _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___lam__0___closed__1);
v___x_313_ = l_Lean_MessageData_ofExpr(v_val_303_);
v___x_314_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_314_, 0, v___x_312_);
lean_ctor_set(v___x_314_, 1, v___x_313_);
v___x_315_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_315_, 0, v___x_314_);
return v___x_315_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___lam__0___boxed(lean_object* v_val_316_, lean_object* v_x_317_, lean_object* v___y_318_, lean_object* v___y_319_, lean_object* v___y_320_, lean_object* v___y_321_, lean_object* v___y_322_, lean_object* v___y_323_, lean_object* v___y_324_){
_start:
{
lean_object* v_res_325_; 
v_res_325_ = l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___lam__0(v_val_316_, v_x_317_, v___y_318_, v___y_319_, v___y_320_, v___y_321_, v___y_322_, v___y_323_);
lean_dec(v___y_323_);
lean_dec_ref(v___y_322_);
lean_dec(v___y_321_);
lean_dec_ref(v___y_320_);
lean_dec(v___y_319_);
lean_dec_ref(v___y_318_);
lean_dec_ref(v_x_317_);
return v_res_325_;
}
}
static double _init_l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg___closed__0(void){
_start:
{
lean_object* v___x_326_; double v___x_327_; 
v___x_326_ = lean_unsigned_to_nat(0u);
v___x_327_ = lean_float_of_nat(v___x_326_);
return v___x_327_;
}
}
LEAN_EXPORT lean_object* l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg(lean_object* v_cls_331_, lean_object* v_msg_332_, lean_object* v___y_333_, lean_object* v___y_334_, lean_object* v___y_335_, lean_object* v___y_336_){
_start:
{
lean_object* v_ref_338_; lean_object* v___x_339_; lean_object* v_a_340_; lean_object* v___x_342_; uint8_t v_isShared_343_; uint8_t v_isSharedCheck_384_; 
v_ref_338_ = lean_ctor_get(v___y_335_, 5);
v___x_339_ = l_Lean_addMessageContextFull___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure_spec__0_spec__0(v_msg_332_, v___y_333_, v___y_334_, v___y_335_, v___y_336_);
v_a_340_ = lean_ctor_get(v___x_339_, 0);
v_isSharedCheck_384_ = !lean_is_exclusive(v___x_339_);
if (v_isSharedCheck_384_ == 0)
{
v___x_342_ = v___x_339_;
v_isShared_343_ = v_isSharedCheck_384_;
goto v_resetjp_341_;
}
else
{
lean_inc(v_a_340_);
lean_dec(v___x_339_);
v___x_342_ = lean_box(0);
v_isShared_343_ = v_isSharedCheck_384_;
goto v_resetjp_341_;
}
v_resetjp_341_:
{
lean_object* v___x_344_; lean_object* v_traceState_345_; lean_object* v_env_346_; lean_object* v_nextMacroScope_347_; lean_object* v_ngen_348_; lean_object* v_auxDeclNGen_349_; lean_object* v_cache_350_; lean_object* v_messages_351_; lean_object* v_infoState_352_; lean_object* v_snapshotTasks_353_; lean_object* v___x_355_; uint8_t v_isShared_356_; uint8_t v_isSharedCheck_383_; 
v___x_344_ = lean_st_ref_take(v___y_336_);
v_traceState_345_ = lean_ctor_get(v___x_344_, 4);
v_env_346_ = lean_ctor_get(v___x_344_, 0);
v_nextMacroScope_347_ = lean_ctor_get(v___x_344_, 1);
v_ngen_348_ = lean_ctor_get(v___x_344_, 2);
v_auxDeclNGen_349_ = lean_ctor_get(v___x_344_, 3);
v_cache_350_ = lean_ctor_get(v___x_344_, 5);
v_messages_351_ = lean_ctor_get(v___x_344_, 6);
v_infoState_352_ = lean_ctor_get(v___x_344_, 7);
v_snapshotTasks_353_ = lean_ctor_get(v___x_344_, 8);
v_isSharedCheck_383_ = !lean_is_exclusive(v___x_344_);
if (v_isSharedCheck_383_ == 0)
{
v___x_355_ = v___x_344_;
v_isShared_356_ = v_isSharedCheck_383_;
goto v_resetjp_354_;
}
else
{
lean_inc(v_snapshotTasks_353_);
lean_inc(v_infoState_352_);
lean_inc(v_messages_351_);
lean_inc(v_cache_350_);
lean_inc(v_traceState_345_);
lean_inc(v_auxDeclNGen_349_);
lean_inc(v_ngen_348_);
lean_inc(v_nextMacroScope_347_);
lean_inc(v_env_346_);
lean_dec(v___x_344_);
v___x_355_ = lean_box(0);
v_isShared_356_ = v_isSharedCheck_383_;
goto v_resetjp_354_;
}
v_resetjp_354_:
{
uint64_t v_tid_357_; lean_object* v_traces_358_; lean_object* v___x_360_; uint8_t v_isShared_361_; uint8_t v_isSharedCheck_382_; 
v_tid_357_ = lean_ctor_get_uint64(v_traceState_345_, sizeof(void*)*1);
v_traces_358_ = lean_ctor_get(v_traceState_345_, 0);
v_isSharedCheck_382_ = !lean_is_exclusive(v_traceState_345_);
if (v_isSharedCheck_382_ == 0)
{
v___x_360_ = v_traceState_345_;
v_isShared_361_ = v_isSharedCheck_382_;
goto v_resetjp_359_;
}
else
{
lean_inc(v_traces_358_);
lean_dec(v_traceState_345_);
v___x_360_ = lean_box(0);
v_isShared_361_ = v_isSharedCheck_382_;
goto v_resetjp_359_;
}
v_resetjp_359_:
{
lean_object* v___x_362_; double v___x_363_; uint8_t v___x_364_; lean_object* v___x_365_; lean_object* v___x_366_; lean_object* v___x_367_; lean_object* v___x_368_; lean_object* v___x_369_; lean_object* v___x_370_; lean_object* v___x_372_; 
v___x_362_ = lean_box(0);
v___x_363_ = lean_float_once(&l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg___closed__0, &l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg___closed__0_once, _init_l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg___closed__0);
v___x_364_ = 0;
v___x_365_ = ((lean_object*)(l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg___closed__1));
v___x_366_ = lean_alloc_ctor(0, 3, 17);
lean_ctor_set(v___x_366_, 0, v_cls_331_);
lean_ctor_set(v___x_366_, 1, v___x_362_);
lean_ctor_set(v___x_366_, 2, v___x_365_);
lean_ctor_set_float(v___x_366_, sizeof(void*)*3, v___x_363_);
lean_ctor_set_float(v___x_366_, sizeof(void*)*3 + 8, v___x_363_);
lean_ctor_set_uint8(v___x_366_, sizeof(void*)*3 + 16, v___x_364_);
v___x_367_ = ((lean_object*)(l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg___closed__2));
v___x_368_ = lean_alloc_ctor(9, 3, 0);
lean_ctor_set(v___x_368_, 0, v___x_366_);
lean_ctor_set(v___x_368_, 1, v_a_340_);
lean_ctor_set(v___x_368_, 2, v___x_367_);
lean_inc(v_ref_338_);
v___x_369_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_369_, 0, v_ref_338_);
lean_ctor_set(v___x_369_, 1, v___x_368_);
v___x_370_ = l_Lean_PersistentArray_push___redArg(v_traces_358_, v___x_369_);
if (v_isShared_361_ == 0)
{
lean_ctor_set(v___x_360_, 0, v___x_370_);
v___x_372_ = v___x_360_;
goto v_reusejp_371_;
}
else
{
lean_object* v_reuseFailAlloc_381_; 
v_reuseFailAlloc_381_ = lean_alloc_ctor(0, 1, 8);
lean_ctor_set(v_reuseFailAlloc_381_, 0, v___x_370_);
lean_ctor_set_uint64(v_reuseFailAlloc_381_, sizeof(void*)*1, v_tid_357_);
v___x_372_ = v_reuseFailAlloc_381_;
goto v_reusejp_371_;
}
v_reusejp_371_:
{
lean_object* v___x_374_; 
if (v_isShared_356_ == 0)
{
lean_ctor_set(v___x_355_, 4, v___x_372_);
v___x_374_ = v___x_355_;
goto v_reusejp_373_;
}
else
{
lean_object* v_reuseFailAlloc_380_; 
v_reuseFailAlloc_380_ = lean_alloc_ctor(0, 9, 0);
lean_ctor_set(v_reuseFailAlloc_380_, 0, v_env_346_);
lean_ctor_set(v_reuseFailAlloc_380_, 1, v_nextMacroScope_347_);
lean_ctor_set(v_reuseFailAlloc_380_, 2, v_ngen_348_);
lean_ctor_set(v_reuseFailAlloc_380_, 3, v_auxDeclNGen_349_);
lean_ctor_set(v_reuseFailAlloc_380_, 4, v___x_372_);
lean_ctor_set(v_reuseFailAlloc_380_, 5, v_cache_350_);
lean_ctor_set(v_reuseFailAlloc_380_, 6, v_messages_351_);
lean_ctor_set(v_reuseFailAlloc_380_, 7, v_infoState_352_);
lean_ctor_set(v_reuseFailAlloc_380_, 8, v_snapshotTasks_353_);
v___x_374_ = v_reuseFailAlloc_380_;
goto v_reusejp_373_;
}
v_reusejp_373_:
{
lean_object* v___x_375_; lean_object* v___x_376_; lean_object* v___x_378_; 
v___x_375_ = lean_st_ref_set(v___y_336_, v___x_374_);
v___x_376_ = lean_box(0);
if (v_isShared_343_ == 0)
{
lean_ctor_set(v___x_342_, 0, v___x_376_);
v___x_378_ = v___x_342_;
goto v_reusejp_377_;
}
else
{
lean_object* v_reuseFailAlloc_379_; 
v_reuseFailAlloc_379_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_379_, 0, v___x_376_);
v___x_378_ = v_reuseFailAlloc_379_;
goto v_reusejp_377_;
}
v_reusejp_377_:
{
return v___x_378_;
}
}
}
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg___boxed(lean_object* v_cls_385_, lean_object* v_msg_386_, lean_object* v___y_387_, lean_object* v___y_388_, lean_object* v___y_389_, lean_object* v___y_390_, lean_object* v___y_391_){
_start:
{
lean_object* v_res_392_; 
v_res_392_ = l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg(v_cls_385_, v_msg_386_, v___y_387_, v___y_388_, v___y_389_, v___y_390_);
lean_dec(v___y_390_);
lean_dec_ref(v___y_389_);
lean_dec(v___y_388_);
lean_dec_ref(v___y_387_);
return v_res_392_;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___lam__0(lean_object* v_a_393_, lean_object* v_declVal_394_, lean_object* v_e_395_){
_start:
{
uint8_t v___x_396_; 
v___x_396_ = lean_expr_eqv(v_e_395_, v_a_393_);
if (v___x_396_ == 0)
{
lean_object* v___x_397_; 
lean_dec_ref(v_declVal_394_);
v___x_397_ = lean_box(0);
return v___x_397_;
}
else
{
lean_object* v___x_398_; 
v___x_398_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_398_, 0, v_declVal_394_);
return v___x_398_;
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___lam__0___boxed(lean_object* v_a_399_, lean_object* v_declVal_400_, lean_object* v_e_401_){
_start:
{
lean_object* v_res_402_; 
v_res_402_ = l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___lam__0(v_a_399_, v_declVal_400_, v_e_401_);
lean_dec_ref(v_e_401_);
lean_dec_ref(v_a_399_);
return v_res_402_;
}
}
static lean_object* _init_l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___closed__1(void){
_start:
{
lean_object* v___x_404_; lean_object* v___x_405_; 
v___x_404_ = ((lean_object*)(l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___closed__0));
v___x_405_ = l_Lean_stringToMessageData(v___x_404_);
return v___x_405_;
}
}
static lean_object* _init_l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___closed__3(void){
_start:
{
lean_object* v___x_407_; lean_object* v___x_408_; 
v___x_407_ = ((lean_object*)(l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___closed__2));
v___x_408_ = l_Lean_stringToMessageData(v___x_407_);
return v___x_408_;
}
}
static lean_object* _init_l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___closed__5(void){
_start:
{
lean_object* v___x_410_; lean_object* v___x_411_; 
v___x_410_ = ((lean_object*)(l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___closed__4));
v___x_411_ = l_Lean_stringToMessageData(v___x_410_);
return v___x_411_;
}
}
static lean_object* _init_l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___closed__7(void){
_start:
{
lean_object* v___x_414_; lean_object* v___x_415_; 
v___x_414_ = ((lean_object*)(l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___closed__6));
v___x_415_ = l_Lean_MessageData_ofFormat(v___x_414_);
return v___x_415_;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg(lean_object* v_xs_416_, lean_object* v_a_417_, lean_object* v_declVal_418_, lean_object* v_className_419_, lean_object* v_declName_420_, lean_object* v_range_421_, lean_object* v_b_422_, lean_object* v_i_423_, lean_object* v___y_424_, lean_object* v___y_425_, lean_object* v___y_426_, lean_object* v___y_427_, lean_object* v___y_428_, lean_object* v___y_429_){
_start:
{
lean_object* v_stop_431_; lean_object* v_step_432_; lean_object* v_a_434_; uint8_t v___x_437_; 
v_stop_431_ = lean_ctor_get(v_range_421_, 1);
v_step_432_ = lean_ctor_get(v_range_421_, 2);
v___x_437_ = lean_nat_dec_lt(v_i_423_, v_stop_431_);
if (v___x_437_ == 0)
{
lean_object* v___x_438_; 
lean_dec(v___y_429_);
lean_dec_ref(v___y_428_);
lean_dec(v___y_427_);
lean_dec_ref(v___y_426_);
lean_dec(v_i_423_);
lean_dec(v_declName_420_);
lean_dec(v_className_419_);
lean_dec_ref(v_declVal_418_);
lean_dec_ref(v_a_417_);
v___x_438_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_438_, 0, v_b_422_);
return v___x_438_;
}
else
{
lean_object* v_snd_439_; lean_object* v_fst_440_; lean_object* v___x_442_; uint8_t v_isShared_443_; uint8_t v_isSharedCheck_547_; 
v_snd_439_ = lean_ctor_get(v_b_422_, 1);
v_fst_440_ = lean_ctor_get(v_b_422_, 0);
v_isSharedCheck_547_ = !lean_is_exclusive(v_b_422_);
if (v_isSharedCheck_547_ == 0)
{
v___x_442_ = v_b_422_;
v_isShared_443_ = v_isSharedCheck_547_;
goto v_resetjp_441_;
}
else
{
lean_inc(v_snd_439_);
lean_inc(v_fst_440_);
lean_dec(v_b_422_);
v___x_442_ = lean_box(0);
v_isShared_443_ = v_isSharedCheck_547_;
goto v_resetjp_441_;
}
v_resetjp_441_:
{
lean_object* v_array_444_; lean_object* v_start_445_; lean_object* v_stop_446_; uint8_t v___x_447_; 
v_array_444_ = lean_ctor_get(v_snd_439_, 0);
v_start_445_ = lean_ctor_get(v_snd_439_, 1);
v_stop_446_ = lean_ctor_get(v_snd_439_, 2);
v___x_447_ = lean_nat_dec_lt(v_start_445_, v_stop_446_);
if (v___x_447_ == 0)
{
lean_object* v___x_449_; 
lean_dec(v___y_429_);
lean_dec_ref(v___y_428_);
lean_dec(v___y_427_);
lean_dec_ref(v___y_426_);
lean_dec(v_i_423_);
lean_dec(v_declName_420_);
lean_dec(v_className_419_);
lean_dec_ref(v_declVal_418_);
lean_dec_ref(v_a_417_);
if (v_isShared_443_ == 0)
{
v___x_449_ = v___x_442_;
goto v_reusejp_448_;
}
else
{
lean_object* v_reuseFailAlloc_451_; 
v_reuseFailAlloc_451_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v_reuseFailAlloc_451_, 0, v_fst_440_);
lean_ctor_set(v_reuseFailAlloc_451_, 1, v_snd_439_);
v___x_449_ = v_reuseFailAlloc_451_;
goto v_reusejp_448_;
}
v_reusejp_448_:
{
lean_object* v___x_450_; 
v___x_450_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_450_, 0, v___x_449_);
return v___x_450_;
}
}
else
{
lean_object* v___x_453_; uint8_t v_isShared_454_; uint8_t v_isSharedCheck_543_; 
lean_inc(v_stop_446_);
lean_inc(v_start_445_);
lean_inc_ref(v_array_444_);
v_isSharedCheck_543_ = !lean_is_exclusive(v_snd_439_);
if (v_isSharedCheck_543_ == 0)
{
lean_object* v_unused_544_; lean_object* v_unused_545_; lean_object* v_unused_546_; 
v_unused_544_ = lean_ctor_get(v_snd_439_, 2);
lean_dec(v_unused_544_);
v_unused_545_ = lean_ctor_get(v_snd_439_, 1);
lean_dec(v_unused_545_);
v_unused_546_ = lean_ctor_get(v_snd_439_, 0);
lean_dec(v_unused_546_);
v___x_453_ = v_snd_439_;
v_isShared_454_ = v_isSharedCheck_543_;
goto v_resetjp_452_;
}
else
{
lean_dec(v_snd_439_);
v___x_453_ = lean_box(0);
v_isShared_454_ = v_isSharedCheck_543_;
goto v_resetjp_452_;
}
v_resetjp_452_:
{
lean_object* v___x_455_; lean_object* v___x_456_; lean_object* v___x_457_; lean_object* v___x_459_; 
v___x_455_ = lean_array_fget(v_array_444_, v_start_445_);
v___x_456_ = lean_unsigned_to_nat(1u);
v___x_457_ = lean_nat_add(v_start_445_, v___x_456_);
lean_dec(v_start_445_);
if (v_isShared_454_ == 0)
{
lean_ctor_set(v___x_453_, 1, v___x_457_);
v___x_459_ = v___x_453_;
goto v_reusejp_458_;
}
else
{
lean_object* v_reuseFailAlloc_542_; 
v_reuseFailAlloc_542_ = lean_alloc_ctor(0, 3, 0);
lean_ctor_set(v_reuseFailAlloc_542_, 0, v_array_444_);
lean_ctor_set(v_reuseFailAlloc_542_, 1, v___x_457_);
lean_ctor_set(v_reuseFailAlloc_542_, 2, v_stop_446_);
v___x_459_ = v_reuseFailAlloc_542_;
goto v_reusejp_458_;
}
v_reusejp_458_:
{
uint8_t v___x_460_; uint8_t v___x_461_; 
v___x_460_ = lean_unbox(v___x_455_);
lean_dec(v___x_455_);
v___x_461_ = l_Lean_BinderInfo_isInstImplicit(v___x_460_);
if (v___x_461_ == 0)
{
lean_object* v___x_463_; 
if (v_isShared_443_ == 0)
{
lean_ctor_set(v___x_442_, 1, v___x_459_);
v___x_463_ = v___x_442_;
goto v_reusejp_462_;
}
else
{
lean_object* v_reuseFailAlloc_464_; 
v_reuseFailAlloc_464_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v_reuseFailAlloc_464_, 0, v_fst_440_);
lean_ctor_set(v_reuseFailAlloc_464_, 1, v___x_459_);
v___x_463_ = v_reuseFailAlloc_464_;
goto v_reusejp_462_;
}
v_reusejp_462_:
{
v_a_434_ = v___x_463_;
goto v___jp_433_;
}
}
else
{
lean_object* v___x_465_; lean_object* v___x_466_; lean_object* v___x_467_; lean_object* v_a_468_; lean_object* v___x_469_; 
v___x_465_ = l_Lean_instInhabitedExpr;
v___x_466_ = lean_array_get_borrowed(v___x_465_, v_xs_416_, v_i_423_);
lean_inc(v___x_466_);
v___x_467_ = l_Lean_instantiateMVars___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__0___redArg(v___x_466_, v___y_427_);
v_a_468_ = lean_ctor_get(v___x_467_, 0);
lean_inc(v_a_468_);
lean_dec_ref(v___x_467_);
lean_inc(v___y_429_);
lean_inc_ref(v___y_428_);
lean_inc(v___y_427_);
lean_inc_ref(v___y_426_);
lean_inc(v___x_466_);
v___x_469_ = lean_infer_type(v___x_466_, v___y_426_, v___y_427_, v___y_428_, v___y_429_);
if (lean_obj_tag(v___x_469_) == 0)
{
lean_object* v_a_470_; lean_object* v___x_471_; lean_object* v_a_472_; lean_object* v___f_473_; lean_object* v___x_474_; lean_object* v___x_475_; lean_object* v___x_476_; 
v_a_470_ = lean_ctor_get(v___x_469_, 0);
lean_inc(v_a_470_);
lean_dec_ref(v___x_469_);
v___x_471_ = l_Lean_instantiateMVars___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__0___redArg(v_a_470_, v___y_427_);
v_a_472_ = lean_ctor_get(v___x_471_, 0);
lean_inc(v_a_472_);
lean_dec_ref(v___x_471_);
lean_inc_ref(v_declVal_418_);
lean_inc_ref(v_a_417_);
v___f_473_ = lean_alloc_closure((void*)(l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___lam__0___boxed), 3, 2);
lean_closure_set(v___f_473_, 0, v_a_417_);
lean_closure_set(v___f_473_, 1, v_declVal_418_);
v___x_474_ = lean_replace_expr(v___f_473_, v_a_472_);
lean_dec(v_a_472_);
lean_dec_ref(v___f_473_);
v___x_475_ = lean_box(0);
lean_inc(v___y_429_);
lean_inc_ref(v___y_428_);
lean_inc(v___y_427_);
lean_inc_ref(v___y_426_);
lean_inc_ref(v___x_474_);
v___x_476_ = l_Lean_Meta_synthInstance_x3f(v___x_474_, v___x_475_, v___y_426_, v___y_427_, v___y_428_, v___y_429_);
if (lean_obj_tag(v___x_476_) == 0)
{
lean_object* v_a_477_; 
v_a_477_ = lean_ctor_get(v___x_476_, 0);
lean_inc(v_a_477_);
lean_dec_ref(v___x_476_);
if (lean_obj_tag(v_a_477_) == 1)
{
lean_object* v_val_478_; lean_object* v___x_480_; uint8_t v_isShared_481_; uint8_t v_isSharedCheck_522_; 
v_val_478_ = lean_ctor_get(v_a_477_, 0);
v_isSharedCheck_522_ = !lean_is_exclusive(v_a_477_);
if (v_isSharedCheck_522_ == 0)
{
v___x_480_ = v_a_477_;
v_isShared_481_ = v_isSharedCheck_522_;
goto v_resetjp_479_;
}
else
{
lean_inc(v_val_478_);
lean_dec(v_a_477_);
v___x_480_ = lean_box(0);
v_isShared_481_ = v_isSharedCheck_522_;
goto v_resetjp_479_;
}
v_resetjp_479_:
{
lean_object* v___x_487_; 
lean_inc(v___y_429_);
lean_inc_ref(v___y_428_);
lean_inc(v___y_427_);
lean_inc_ref(v___y_426_);
lean_inc(v_val_478_);
lean_inc(v_a_468_);
v___x_487_ = l_Lean_Meta_isExprDefEq(v_a_468_, v_val_478_, v___y_426_, v___y_427_, v___y_428_, v___y_429_);
if (lean_obj_tag(v___x_487_) == 0)
{
lean_object* v_a_488_; uint8_t v___x_489_; 
v_a_488_ = lean_ctor_get(v___x_487_, 0);
lean_inc(v_a_488_);
lean_dec_ref(v___x_487_);
v___x_489_ = lean_unbox(v_a_488_);
lean_dec(v_a_488_);
if (v___x_489_ == 0)
{
lean_object* v___x_490_; lean_object* v___x_491_; lean_object* v___x_492_; lean_object* v___x_493_; lean_object* v___x_494_; lean_object* v___x_495_; lean_object* v___x_496_; lean_object* v___x_497_; lean_object* v___x_498_; lean_object* v___x_499_; lean_object* v___x_500_; lean_object* v___x_502_; 
lean_dec_ref(v___x_459_);
lean_del_object(v___x_442_);
lean_dec(v_fst_440_);
lean_dec(v_i_423_);
lean_dec_ref(v_declVal_418_);
lean_dec_ref(v_a_417_);
v___x_490_ = lean_obj_once(&l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___closed__1, &l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___closed__1_once, _init_l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___closed__1);
v___x_491_ = l_Lean_indentExpr(v_val_478_);
v___x_492_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_492_, 0, v___x_490_);
lean_ctor_set(v___x_492_, 1, v___x_491_);
v___x_493_ = lean_obj_once(&l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___closed__3, &l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___closed__3_once, _init_l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___closed__3);
v___x_494_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_494_, 0, v___x_492_);
lean_ctor_set(v___x_494_, 1, v___x_493_);
v___x_495_ = l_Lean_indentExpr(v_a_468_);
v___x_496_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_496_, 0, v___x_494_);
lean_ctor_set(v___x_496_, 1, v___x_495_);
v___x_497_ = lean_obj_once(&l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___closed__5, &l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___closed__5_once, _init_l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___closed__5);
v___x_498_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_498_, 0, v___x_496_);
lean_ctor_set(v___x_498_, 1, v___x_497_);
v___x_499_ = l_Lean_indentExpr(v___x_474_);
v___x_500_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_500_, 0, v___x_498_);
lean_ctor_set(v___x_500_, 1, v___x_499_);
if (v_isShared_481_ == 0)
{
lean_ctor_set(v___x_480_, 0, v___x_500_);
v___x_502_ = v___x_480_;
goto v_reusejp_501_;
}
else
{
lean_object* v_reuseFailAlloc_513_; 
v_reuseFailAlloc_513_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_513_, 0, v___x_500_);
v___x_502_ = v_reuseFailAlloc_513_;
goto v_reusejp_501_;
}
v_reusejp_501_:
{
lean_object* v___x_503_; lean_object* v___x_504_; lean_object* v_a_505_; lean_object* v___x_507_; uint8_t v_isShared_508_; uint8_t v_isSharedCheck_512_; 
v___x_503_ = lean_obj_once(&l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___closed__7, &l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___closed__7_once, _init_l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___closed__7);
v___x_504_ = l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg(v_className_419_, v_declName_420_, v___x_502_, v___x_503_, v___y_426_, v___y_427_, v___y_428_, v___y_429_);
lean_dec(v___y_429_);
lean_dec_ref(v___y_428_);
lean_dec(v___y_427_);
lean_dec_ref(v___y_426_);
lean_dec_ref(v___x_502_);
v_a_505_ = lean_ctor_get(v___x_504_, 0);
v_isSharedCheck_512_ = !lean_is_exclusive(v___x_504_);
if (v_isSharedCheck_512_ == 0)
{
v___x_507_ = v___x_504_;
v_isShared_508_ = v_isSharedCheck_512_;
goto v_resetjp_506_;
}
else
{
lean_inc(v_a_505_);
lean_dec(v___x_504_);
v___x_507_ = lean_box(0);
v_isShared_508_ = v_isSharedCheck_512_;
goto v_resetjp_506_;
}
v_resetjp_506_:
{
lean_object* v___x_510_; 
if (v_isShared_508_ == 0)
{
v___x_510_ = v___x_507_;
goto v_reusejp_509_;
}
else
{
lean_object* v_reuseFailAlloc_511_; 
v_reuseFailAlloc_511_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_511_, 0, v_a_505_);
v___x_510_ = v_reuseFailAlloc_511_;
goto v_reusejp_509_;
}
v_reusejp_509_:
{
return v___x_510_;
}
}
}
}
else
{
lean_del_object(v___x_480_);
lean_dec_ref(v___x_474_);
lean_dec(v_a_468_);
goto v___jp_482_;
}
}
else
{
lean_object* v_a_514_; lean_object* v___x_516_; uint8_t v_isShared_517_; uint8_t v_isSharedCheck_521_; 
lean_del_object(v___x_480_);
lean_dec(v_val_478_);
lean_dec_ref(v___x_474_);
lean_dec(v_a_468_);
lean_dec_ref(v___x_459_);
lean_del_object(v___x_442_);
lean_dec(v_fst_440_);
lean_dec(v___y_429_);
lean_dec_ref(v___y_428_);
lean_dec(v___y_427_);
lean_dec_ref(v___y_426_);
lean_dec(v_i_423_);
lean_dec(v_declName_420_);
lean_dec(v_className_419_);
lean_dec_ref(v_declVal_418_);
lean_dec_ref(v_a_417_);
v_a_514_ = lean_ctor_get(v___x_487_, 0);
v_isSharedCheck_521_ = !lean_is_exclusive(v___x_487_);
if (v_isSharedCheck_521_ == 0)
{
v___x_516_ = v___x_487_;
v_isShared_517_ = v_isSharedCheck_521_;
goto v_resetjp_515_;
}
else
{
lean_inc(v_a_514_);
lean_dec(v___x_487_);
v___x_516_ = lean_box(0);
v_isShared_517_ = v_isSharedCheck_521_;
goto v_resetjp_515_;
}
v_resetjp_515_:
{
lean_object* v___x_519_; 
if (v_isShared_517_ == 0)
{
v___x_519_ = v___x_516_;
goto v_reusejp_518_;
}
else
{
lean_object* v_reuseFailAlloc_520_; 
v_reuseFailAlloc_520_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_520_, 0, v_a_514_);
v___x_519_ = v_reuseFailAlloc_520_;
goto v_reusejp_518_;
}
v_reusejp_518_:
{
return v___x_519_;
}
}
}
v___jp_482_:
{
lean_object* v___x_483_; lean_object* v___x_485_; 
v___x_483_ = lean_array_set(v_fst_440_, v_i_423_, v_val_478_);
if (v_isShared_443_ == 0)
{
lean_ctor_set(v___x_442_, 1, v___x_459_);
lean_ctor_set(v___x_442_, 0, v___x_483_);
v___x_485_ = v___x_442_;
goto v_reusejp_484_;
}
else
{
lean_object* v_reuseFailAlloc_486_; 
v_reuseFailAlloc_486_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v_reuseFailAlloc_486_, 0, v___x_483_);
lean_ctor_set(v_reuseFailAlloc_486_, 1, v___x_459_);
v___x_485_ = v_reuseFailAlloc_486_;
goto v_reusejp_484_;
}
v_reusejp_484_:
{
v_a_434_ = v___x_485_;
goto v___jp_433_;
}
}
}
}
else
{
lean_object* v___x_524_; 
lean_dec(v_a_477_);
lean_dec_ref(v___x_474_);
lean_dec(v_a_468_);
if (v_isShared_443_ == 0)
{
lean_ctor_set(v___x_442_, 1, v___x_459_);
v___x_524_ = v___x_442_;
goto v_reusejp_523_;
}
else
{
lean_object* v_reuseFailAlloc_525_; 
v_reuseFailAlloc_525_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v_reuseFailAlloc_525_, 0, v_fst_440_);
lean_ctor_set(v_reuseFailAlloc_525_, 1, v___x_459_);
v___x_524_ = v_reuseFailAlloc_525_;
goto v_reusejp_523_;
}
v_reusejp_523_:
{
v_a_434_ = v___x_524_;
goto v___jp_433_;
}
}
}
else
{
lean_object* v_a_526_; lean_object* v___x_528_; uint8_t v_isShared_529_; uint8_t v_isSharedCheck_533_; 
lean_dec_ref(v___x_474_);
lean_dec(v_a_468_);
lean_dec_ref(v___x_459_);
lean_del_object(v___x_442_);
lean_dec(v_fst_440_);
lean_dec(v___y_429_);
lean_dec_ref(v___y_428_);
lean_dec(v___y_427_);
lean_dec_ref(v___y_426_);
lean_dec(v_i_423_);
lean_dec(v_declName_420_);
lean_dec(v_className_419_);
lean_dec_ref(v_declVal_418_);
lean_dec_ref(v_a_417_);
v_a_526_ = lean_ctor_get(v___x_476_, 0);
v_isSharedCheck_533_ = !lean_is_exclusive(v___x_476_);
if (v_isSharedCheck_533_ == 0)
{
v___x_528_ = v___x_476_;
v_isShared_529_ = v_isSharedCheck_533_;
goto v_resetjp_527_;
}
else
{
lean_inc(v_a_526_);
lean_dec(v___x_476_);
v___x_528_ = lean_box(0);
v_isShared_529_ = v_isSharedCheck_533_;
goto v_resetjp_527_;
}
v_resetjp_527_:
{
lean_object* v___x_531_; 
if (v_isShared_529_ == 0)
{
v___x_531_ = v___x_528_;
goto v_reusejp_530_;
}
else
{
lean_object* v_reuseFailAlloc_532_; 
v_reuseFailAlloc_532_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_532_, 0, v_a_526_);
v___x_531_ = v_reuseFailAlloc_532_;
goto v_reusejp_530_;
}
v_reusejp_530_:
{
return v___x_531_;
}
}
}
}
else
{
lean_object* v_a_534_; lean_object* v___x_536_; uint8_t v_isShared_537_; uint8_t v_isSharedCheck_541_; 
lean_dec(v_a_468_);
lean_dec_ref(v___x_459_);
lean_del_object(v___x_442_);
lean_dec(v_fst_440_);
lean_dec(v___y_429_);
lean_dec_ref(v___y_428_);
lean_dec(v___y_427_);
lean_dec_ref(v___y_426_);
lean_dec(v_i_423_);
lean_dec(v_declName_420_);
lean_dec(v_className_419_);
lean_dec_ref(v_declVal_418_);
lean_dec_ref(v_a_417_);
v_a_534_ = lean_ctor_get(v___x_469_, 0);
v_isSharedCheck_541_ = !lean_is_exclusive(v___x_469_);
if (v_isSharedCheck_541_ == 0)
{
v___x_536_ = v___x_469_;
v_isShared_537_ = v_isSharedCheck_541_;
goto v_resetjp_535_;
}
else
{
lean_inc(v_a_534_);
lean_dec(v___x_469_);
v___x_536_ = lean_box(0);
v_isShared_537_ = v_isSharedCheck_541_;
goto v_resetjp_535_;
}
v_resetjp_535_:
{
lean_object* v___x_539_; 
if (v_isShared_537_ == 0)
{
v___x_539_ = v___x_536_;
goto v_reusejp_538_;
}
else
{
lean_object* v_reuseFailAlloc_540_; 
v_reuseFailAlloc_540_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_540_, 0, v_a_534_);
v___x_539_ = v_reuseFailAlloc_540_;
goto v_reusejp_538_;
}
v_reusejp_538_:
{
return v___x_539_;
}
}
}
}
}
}
}
}
}
v___jp_433_:
{
lean_object* v___x_435_; 
v___x_435_ = lean_nat_add(v_i_423_, v_step_432_);
lean_dec(v_i_423_);
v_b_422_ = v_a_434_;
v_i_423_ = v___x_435_;
goto _start;
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___boxed(lean_object* v_xs_548_, lean_object* v_a_549_, lean_object* v_declVal_550_, lean_object* v_className_551_, lean_object* v_declName_552_, lean_object* v_range_553_, lean_object* v_b_554_, lean_object* v_i_555_, lean_object* v___y_556_, lean_object* v___y_557_, lean_object* v___y_558_, lean_object* v___y_559_, lean_object* v___y_560_, lean_object* v___y_561_, lean_object* v___y_562_){
_start:
{
lean_object* v_res_563_; 
v_res_563_ = l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg(v_xs_548_, v_a_549_, v_declVal_550_, v_className_551_, v_declName_552_, v_range_553_, v_b_554_, v_i_555_, v___y_556_, v___y_557_, v___y_558_, v___y_559_, v___y_560_, v___y_561_);
lean_dec(v___y_557_);
lean_dec_ref(v___y_556_);
lean_dec_ref(v_range_553_);
lean_dec_ref(v_xs_548_);
return v_res_563_;
}
}
LEAN_EXPORT uint8_t l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg___lam__0(uint8_t v___y_571_, uint8_t v_suppressElabErrors_572_, lean_object* v_x_573_){
_start:
{
if (lean_obj_tag(v_x_573_) == 1)
{
lean_object* v_pre_574_; 
v_pre_574_ = lean_ctor_get(v_x_573_, 0);
switch(lean_obj_tag(v_pre_574_))
{
case 1:
{
lean_object* v_pre_575_; 
v_pre_575_ = lean_ctor_get(v_pre_574_, 0);
switch(lean_obj_tag(v_pre_575_))
{
case 0:
{
lean_object* v_str_576_; lean_object* v_str_577_; lean_object* v___x_578_; uint8_t v___x_579_; 
v_str_576_ = lean_ctor_get(v_x_573_, 1);
v_str_577_ = lean_ctor_get(v_pre_574_, 1);
v___x_578_ = ((lean_object*)(l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg___lam__0___closed__0));
v___x_579_ = lean_string_dec_eq(v_str_577_, v___x_578_);
if (v___x_579_ == 0)
{
lean_object* v___x_580_; uint8_t v___x_581_; 
v___x_580_ = ((lean_object*)(l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg___lam__0___closed__1));
v___x_581_ = lean_string_dec_eq(v_str_577_, v___x_580_);
if (v___x_581_ == 0)
{
return v___y_571_;
}
else
{
lean_object* v___x_582_; uint8_t v___x_583_; 
v___x_582_ = ((lean_object*)(l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg___lam__0___closed__2));
v___x_583_ = lean_string_dec_eq(v_str_576_, v___x_582_);
if (v___x_583_ == 0)
{
return v___y_571_;
}
else
{
return v_suppressElabErrors_572_;
}
}
}
else
{
lean_object* v___x_584_; uint8_t v___x_585_; 
v___x_584_ = ((lean_object*)(l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg___lam__0___closed__3));
v___x_585_ = lean_string_dec_eq(v_str_576_, v___x_584_);
if (v___x_585_ == 0)
{
return v___y_571_;
}
else
{
return v_suppressElabErrors_572_;
}
}
}
case 1:
{
lean_object* v_pre_586_; 
v_pre_586_ = lean_ctor_get(v_pre_575_, 0);
if (lean_obj_tag(v_pre_586_) == 0)
{
lean_object* v_str_587_; lean_object* v_str_588_; lean_object* v_str_589_; lean_object* v___x_590_; uint8_t v___x_591_; 
v_str_587_ = lean_ctor_get(v_x_573_, 1);
v_str_588_ = lean_ctor_get(v_pre_574_, 1);
v_str_589_ = lean_ctor_get(v_pre_575_, 1);
v___x_590_ = ((lean_object*)(l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg___lam__0___closed__4));
v___x_591_ = lean_string_dec_eq(v_str_589_, v___x_590_);
if (v___x_591_ == 0)
{
return v___y_571_;
}
else
{
lean_object* v___x_592_; uint8_t v___x_593_; 
v___x_592_ = ((lean_object*)(l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg___lam__0___closed__5));
v___x_593_ = lean_string_dec_eq(v_str_588_, v___x_592_);
if (v___x_593_ == 0)
{
return v___y_571_;
}
else
{
lean_object* v___x_594_; uint8_t v___x_595_; 
v___x_594_ = ((lean_object*)(l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg___lam__0___closed__6));
v___x_595_ = lean_string_dec_eq(v_str_587_, v___x_594_);
if (v___x_595_ == 0)
{
return v___y_571_;
}
else
{
return v_suppressElabErrors_572_;
}
}
}
}
else
{
return v___y_571_;
}
}
default: 
{
return v___y_571_;
}
}
}
case 0:
{
lean_object* v_str_596_; lean_object* v___x_597_; uint8_t v___x_598_; 
v_str_596_ = lean_ctor_get(v_x_573_, 1);
v___x_597_ = ((lean_object*)(l_Lean_isTracingEnabledFor___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__2___redArg___closed__0));
v___x_598_ = lean_string_dec_eq(v_str_596_, v___x_597_);
if (v___x_598_ == 0)
{
return v___y_571_;
}
else
{
return v_suppressElabErrors_572_;
}
}
default: 
{
return v___y_571_;
}
}
}
else
{
return v___y_571_;
}
}
}
LEAN_EXPORT lean_object* l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg___lam__0___boxed(lean_object* v___y_599_, lean_object* v_suppressElabErrors_600_, lean_object* v_x_601_){
_start:
{
uint8_t v___y_55863__boxed_602_; uint8_t v_suppressElabErrors_boxed_603_; uint8_t v_res_604_; lean_object* v_r_605_; 
v___y_55863__boxed_602_ = lean_unbox(v___y_599_);
v_suppressElabErrors_boxed_603_ = lean_unbox(v_suppressElabErrors_600_);
v_res_604_ = l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg___lam__0(v___y_55863__boxed_602_, v_suppressElabErrors_boxed_603_, v_x_601_);
lean_dec(v_x_601_);
v_r_605_ = lean_box(v_res_604_);
return v_r_605_;
}
}
LEAN_EXPORT lean_object* l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg(lean_object* v_ref_606_, lean_object* v_msgData_607_, uint8_t v_severity_608_, uint8_t v_isSilent_609_, lean_object* v___y_610_, lean_object* v___y_611_, lean_object* v___y_612_, lean_object* v___y_613_){
_start:
{
lean_object* v___y_616_; lean_object* v___y_617_; lean_object* v___y_618_; lean_object* v___y_619_; uint8_t v___y_620_; lean_object* v___y_621_; uint8_t v___y_622_; lean_object* v___y_623_; lean_object* v___y_624_; lean_object* v___y_652_; lean_object* v___y_653_; lean_object* v___y_654_; uint8_t v___y_655_; uint8_t v___y_656_; lean_object* v___y_657_; uint8_t v___y_658_; lean_object* v___y_659_; lean_object* v___y_677_; lean_object* v___y_678_; uint8_t v___y_679_; uint8_t v___y_680_; lean_object* v___y_681_; lean_object* v___y_682_; uint8_t v___y_683_; lean_object* v___y_684_; lean_object* v___y_688_; lean_object* v___y_689_; lean_object* v___y_690_; uint8_t v___y_691_; lean_object* v___y_692_; uint8_t v___y_693_; uint8_t v___y_694_; uint8_t v___x_699_; lean_object* v___y_701_; lean_object* v___y_702_; lean_object* v___y_703_; uint8_t v___y_704_; lean_object* v___y_705_; uint8_t v___y_706_; uint8_t v___y_707_; uint8_t v___y_709_; uint8_t v___x_724_; 
v___x_699_ = 2;
v___x_724_ = l_Lean_instBEqMessageSeverity_beq(v_severity_608_, v___x_699_);
if (v___x_724_ == 0)
{
v___y_709_ = v___x_724_;
goto v___jp_708_;
}
else
{
uint8_t v___x_725_; 
lean_inc_ref(v_msgData_607_);
v___x_725_ = l_Lean_MessageData_hasSyntheticSorry(v_msgData_607_);
v___y_709_ = v___x_725_;
goto v___jp_708_;
}
v___jp_615_:
{
lean_object* v___x_625_; lean_object* v_currNamespace_626_; lean_object* v_openDecls_627_; lean_object* v_env_628_; lean_object* v_nextMacroScope_629_; lean_object* v_ngen_630_; lean_object* v_auxDeclNGen_631_; lean_object* v_traceState_632_; lean_object* v_cache_633_; lean_object* v_messages_634_; lean_object* v_infoState_635_; lean_object* v_snapshotTasks_636_; lean_object* v___x_638_; uint8_t v_isShared_639_; uint8_t v_isSharedCheck_650_; 
v___x_625_ = lean_st_ref_take(v___y_624_);
v_currNamespace_626_ = lean_ctor_get(v___y_623_, 6);
lean_inc(v_currNamespace_626_);
v_openDecls_627_ = lean_ctor_get(v___y_623_, 7);
lean_inc(v_openDecls_627_);
lean_dec_ref(v___y_623_);
v_env_628_ = lean_ctor_get(v___x_625_, 0);
v_nextMacroScope_629_ = lean_ctor_get(v___x_625_, 1);
v_ngen_630_ = lean_ctor_get(v___x_625_, 2);
v_auxDeclNGen_631_ = lean_ctor_get(v___x_625_, 3);
v_traceState_632_ = lean_ctor_get(v___x_625_, 4);
v_cache_633_ = lean_ctor_get(v___x_625_, 5);
v_messages_634_ = lean_ctor_get(v___x_625_, 6);
v_infoState_635_ = lean_ctor_get(v___x_625_, 7);
v_snapshotTasks_636_ = lean_ctor_get(v___x_625_, 8);
v_isSharedCheck_650_ = !lean_is_exclusive(v___x_625_);
if (v_isSharedCheck_650_ == 0)
{
v___x_638_ = v___x_625_;
v_isShared_639_ = v_isSharedCheck_650_;
goto v_resetjp_637_;
}
else
{
lean_inc(v_snapshotTasks_636_);
lean_inc(v_infoState_635_);
lean_inc(v_messages_634_);
lean_inc(v_cache_633_);
lean_inc(v_traceState_632_);
lean_inc(v_auxDeclNGen_631_);
lean_inc(v_ngen_630_);
lean_inc(v_nextMacroScope_629_);
lean_inc(v_env_628_);
lean_dec(v___x_625_);
v___x_638_ = lean_box(0);
v_isShared_639_ = v_isSharedCheck_650_;
goto v_resetjp_637_;
}
v_resetjp_637_:
{
lean_object* v___x_640_; lean_object* v___x_641_; lean_object* v___x_642_; lean_object* v___x_643_; lean_object* v___x_645_; 
v___x_640_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_640_, 0, v_currNamespace_626_);
lean_ctor_set(v___x_640_, 1, v_openDecls_627_);
v___x_641_ = lean_alloc_ctor(4, 2, 0);
lean_ctor_set(v___x_641_, 0, v___x_640_);
lean_ctor_set(v___x_641_, 1, v___y_621_);
v___x_642_ = lean_alloc_ctor(0, 5, 3);
lean_ctor_set(v___x_642_, 0, v___y_619_);
lean_ctor_set(v___x_642_, 1, v___y_616_);
lean_ctor_set(v___x_642_, 2, v___y_618_);
lean_ctor_set(v___x_642_, 3, v___y_617_);
lean_ctor_set(v___x_642_, 4, v___x_641_);
lean_ctor_set_uint8(v___x_642_, sizeof(void*)*5, v___y_622_);
lean_ctor_set_uint8(v___x_642_, sizeof(void*)*5 + 1, v___y_620_);
lean_ctor_set_uint8(v___x_642_, sizeof(void*)*5 + 2, v_isSilent_609_);
v___x_643_ = l_Lean_MessageLog_add(v___x_642_, v_messages_634_);
if (v_isShared_639_ == 0)
{
lean_ctor_set(v___x_638_, 6, v___x_643_);
v___x_645_ = v___x_638_;
goto v_reusejp_644_;
}
else
{
lean_object* v_reuseFailAlloc_649_; 
v_reuseFailAlloc_649_ = lean_alloc_ctor(0, 9, 0);
lean_ctor_set(v_reuseFailAlloc_649_, 0, v_env_628_);
lean_ctor_set(v_reuseFailAlloc_649_, 1, v_nextMacroScope_629_);
lean_ctor_set(v_reuseFailAlloc_649_, 2, v_ngen_630_);
lean_ctor_set(v_reuseFailAlloc_649_, 3, v_auxDeclNGen_631_);
lean_ctor_set(v_reuseFailAlloc_649_, 4, v_traceState_632_);
lean_ctor_set(v_reuseFailAlloc_649_, 5, v_cache_633_);
lean_ctor_set(v_reuseFailAlloc_649_, 6, v___x_643_);
lean_ctor_set(v_reuseFailAlloc_649_, 7, v_infoState_635_);
lean_ctor_set(v_reuseFailAlloc_649_, 8, v_snapshotTasks_636_);
v___x_645_ = v_reuseFailAlloc_649_;
goto v_reusejp_644_;
}
v_reusejp_644_:
{
lean_object* v___x_646_; lean_object* v___x_647_; lean_object* v___x_648_; 
v___x_646_ = lean_st_ref_set(v___y_624_, v___x_645_);
v___x_647_ = lean_box(0);
v___x_648_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_648_, 0, v___x_647_);
return v___x_648_;
}
}
}
v___jp_651_:
{
lean_object* v___x_660_; lean_object* v___x_661_; lean_object* v_a_662_; lean_object* v___x_664_; uint8_t v_isShared_665_; uint8_t v_isSharedCheck_675_; 
v___x_660_ = l___private_Lean_Log_0__Lean_MessageData_appendDescriptionWidgetIfNamed(v_msgData_607_);
v___x_661_ = l_Lean_addMessageContextFull___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure_spec__0_spec__0(v___x_660_, v___y_610_, v___y_611_, v___y_612_, v___y_613_);
v_a_662_ = lean_ctor_get(v___x_661_, 0);
v_isSharedCheck_675_ = !lean_is_exclusive(v___x_661_);
if (v_isSharedCheck_675_ == 0)
{
v___x_664_ = v___x_661_;
v_isShared_665_ = v_isSharedCheck_675_;
goto v_resetjp_663_;
}
else
{
lean_inc(v_a_662_);
lean_dec(v___x_661_);
v___x_664_ = lean_box(0);
v_isShared_665_ = v_isSharedCheck_675_;
goto v_resetjp_663_;
}
v_resetjp_663_:
{
lean_object* v___x_666_; lean_object* v___x_667_; lean_object* v___x_668_; lean_object* v___x_669_; 
lean_inc_ref(v___y_657_);
v___x_666_ = l_Lean_FileMap_toPosition(v___y_657_, v___y_653_);
lean_dec(v___y_653_);
v___x_667_ = l_Lean_FileMap_toPosition(v___y_657_, v___y_659_);
lean_dec(v___y_659_);
v___x_668_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_668_, 0, v___x_667_);
v___x_669_ = ((lean_object*)(l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg___closed__1));
if (v___y_656_ == 0)
{
lean_del_object(v___x_664_);
lean_dec_ref(v___y_652_);
v___y_616_ = v___x_666_;
v___y_617_ = v___x_669_;
v___y_618_ = v___x_668_;
v___y_619_ = v___y_654_;
v___y_620_ = v___y_655_;
v___y_621_ = v_a_662_;
v___y_622_ = v___y_658_;
v___y_623_ = v___y_612_;
v___y_624_ = v___y_613_;
goto v___jp_615_;
}
else
{
uint8_t v___x_670_; 
lean_inc(v_a_662_);
v___x_670_ = l_Lean_MessageData_hasTag(v___y_652_, v_a_662_);
if (v___x_670_ == 0)
{
lean_object* v___x_671_; lean_object* v___x_673_; 
lean_dec_ref(v___x_668_);
lean_dec_ref(v___x_666_);
lean_dec(v_a_662_);
lean_dec_ref(v___y_654_);
lean_dec_ref(v___y_612_);
v___x_671_ = lean_box(0);
if (v_isShared_665_ == 0)
{
lean_ctor_set(v___x_664_, 0, v___x_671_);
v___x_673_ = v___x_664_;
goto v_reusejp_672_;
}
else
{
lean_object* v_reuseFailAlloc_674_; 
v_reuseFailAlloc_674_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_674_, 0, v___x_671_);
v___x_673_ = v_reuseFailAlloc_674_;
goto v_reusejp_672_;
}
v_reusejp_672_:
{
return v___x_673_;
}
}
else
{
lean_del_object(v___x_664_);
v___y_616_ = v___x_666_;
v___y_617_ = v___x_669_;
v___y_618_ = v___x_668_;
v___y_619_ = v___y_654_;
v___y_620_ = v___y_655_;
v___y_621_ = v_a_662_;
v___y_622_ = v___y_658_;
v___y_623_ = v___y_612_;
v___y_624_ = v___y_613_;
goto v___jp_615_;
}
}
}
}
v___jp_676_:
{
lean_object* v___x_685_; 
v___x_685_ = l_Lean_Syntax_getTailPos_x3f(v___y_681_, v___y_683_);
lean_dec(v___y_681_);
if (lean_obj_tag(v___x_685_) == 0)
{
lean_inc(v___y_684_);
v___y_652_ = v___y_677_;
v___y_653_ = v___y_684_;
v___y_654_ = v___y_678_;
v___y_655_ = v___y_679_;
v___y_656_ = v___y_680_;
v___y_657_ = v___y_682_;
v___y_658_ = v___y_683_;
v___y_659_ = v___y_684_;
goto v___jp_651_;
}
else
{
lean_object* v_val_686_; 
v_val_686_ = lean_ctor_get(v___x_685_, 0);
lean_inc(v_val_686_);
lean_dec_ref(v___x_685_);
v___y_652_ = v___y_677_;
v___y_653_ = v___y_684_;
v___y_654_ = v___y_678_;
v___y_655_ = v___y_679_;
v___y_656_ = v___y_680_;
v___y_657_ = v___y_682_;
v___y_658_ = v___y_683_;
v___y_659_ = v_val_686_;
goto v___jp_651_;
}
}
v___jp_687_:
{
lean_object* v_ref_695_; lean_object* v___x_696_; 
v_ref_695_ = l_Lean_replaceRef(v_ref_606_, v___y_689_);
lean_dec(v___y_689_);
v___x_696_ = l_Lean_Syntax_getPos_x3f(v_ref_695_, v___y_693_);
if (lean_obj_tag(v___x_696_) == 0)
{
lean_object* v___x_697_; 
v___x_697_ = lean_unsigned_to_nat(0u);
v___y_677_ = v___y_688_;
v___y_678_ = v___y_690_;
v___y_679_ = v___y_694_;
v___y_680_ = v___y_691_;
v___y_681_ = v_ref_695_;
v___y_682_ = v___y_692_;
v___y_683_ = v___y_693_;
v___y_684_ = v___x_697_;
goto v___jp_676_;
}
else
{
lean_object* v_val_698_; 
v_val_698_ = lean_ctor_get(v___x_696_, 0);
lean_inc(v_val_698_);
lean_dec_ref(v___x_696_);
v___y_677_ = v___y_688_;
v___y_678_ = v___y_690_;
v___y_679_ = v___y_694_;
v___y_680_ = v___y_691_;
v___y_681_ = v_ref_695_;
v___y_682_ = v___y_692_;
v___y_683_ = v___y_693_;
v___y_684_ = v_val_698_;
goto v___jp_676_;
}
}
v___jp_700_:
{
if (v___y_707_ == 0)
{
v___y_688_ = v___y_703_;
v___y_689_ = v___y_701_;
v___y_690_ = v___y_702_;
v___y_691_ = v___y_704_;
v___y_692_ = v___y_705_;
v___y_693_ = v___y_706_;
v___y_694_ = v_severity_608_;
goto v___jp_687_;
}
else
{
v___y_688_ = v___y_703_;
v___y_689_ = v___y_701_;
v___y_690_ = v___y_702_;
v___y_691_ = v___y_704_;
v___y_692_ = v___y_705_;
v___y_693_ = v___y_706_;
v___y_694_ = v___x_699_;
goto v___jp_687_;
}
}
v___jp_708_:
{
if (v___y_709_ == 0)
{
lean_object* v_fileName_710_; lean_object* v_fileMap_711_; lean_object* v_options_712_; lean_object* v_ref_713_; uint8_t v_suppressElabErrors_714_; lean_object* v___x_715_; lean_object* v___x_716_; lean_object* v___f_717_; uint8_t v___x_718_; uint8_t v___x_719_; 
v_fileName_710_ = lean_ctor_get(v___y_612_, 0);
v_fileMap_711_ = lean_ctor_get(v___y_612_, 1);
v_options_712_ = lean_ctor_get(v___y_612_, 2);
v_ref_713_ = lean_ctor_get(v___y_612_, 5);
v_suppressElabErrors_714_ = lean_ctor_get_uint8(v___y_612_, sizeof(void*)*14 + 1);
v___x_715_ = lean_box(v___y_709_);
v___x_716_ = lean_box(v_suppressElabErrors_714_);
v___f_717_ = lean_alloc_closure((void*)(l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg___lam__0___boxed), 3, 2);
lean_closure_set(v___f_717_, 0, v___x_715_);
lean_closure_set(v___f_717_, 1, v___x_716_);
v___x_718_ = 1;
v___x_719_ = l_Lean_instBEqMessageSeverity_beq(v_severity_608_, v___x_718_);
if (v___x_719_ == 0)
{
lean_inc_ref(v_fileMap_711_);
lean_inc_ref(v_fileName_710_);
lean_inc(v_ref_713_);
v___y_701_ = v_ref_713_;
v___y_702_ = v_fileName_710_;
v___y_703_ = v___f_717_;
v___y_704_ = v_suppressElabErrors_714_;
v___y_705_ = v_fileMap_711_;
v___y_706_ = v___y_709_;
v___y_707_ = v___x_719_;
goto v___jp_700_;
}
else
{
lean_object* v___x_720_; uint8_t v___x_721_; 
v___x_720_ = l_Lean_warningAsError;
v___x_721_ = l_Lean_Option_get___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__7(v_options_712_, v___x_720_);
lean_inc_ref(v_fileMap_711_);
lean_inc_ref(v_fileName_710_);
lean_inc(v_ref_713_);
v___y_701_ = v_ref_713_;
v___y_702_ = v_fileName_710_;
v___y_703_ = v___f_717_;
v___y_704_ = v_suppressElabErrors_714_;
v___y_705_ = v_fileMap_711_;
v___y_706_ = v___y_709_;
v___y_707_ = v___x_721_;
goto v___jp_700_;
}
}
else
{
lean_object* v___x_722_; lean_object* v___x_723_; 
lean_dec_ref(v___y_612_);
lean_dec_ref(v_msgData_607_);
v___x_722_ = lean_box(0);
v___x_723_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_723_, 0, v___x_722_);
return v___x_723_;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg___boxed(lean_object* v_ref_726_, lean_object* v_msgData_727_, lean_object* v_severity_728_, lean_object* v_isSilent_729_, lean_object* v___y_730_, lean_object* v___y_731_, lean_object* v___y_732_, lean_object* v___y_733_, lean_object* v___y_734_){
_start:
{
uint8_t v_severity_boxed_735_; uint8_t v_isSilent_boxed_736_; lean_object* v_res_737_; 
v_severity_boxed_735_ = lean_unbox(v_severity_728_);
v_isSilent_boxed_736_ = lean_unbox(v_isSilent_729_);
v_res_737_ = l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg(v_ref_726_, v_msgData_727_, v_severity_boxed_735_, v_isSilent_boxed_736_, v___y_730_, v___y_731_, v___y_732_, v___y_733_);
lean_dec(v___y_733_);
lean_dec(v___y_731_);
lean_dec_ref(v___y_730_);
lean_dec(v_ref_726_);
return v_res_737_;
}
}
LEAN_EXPORT lean_object* l_Lean_log___at___00Lean_logError___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__5_spec__9(lean_object* v_msgData_738_, uint8_t v_severity_739_, uint8_t v_isSilent_740_, lean_object* v___y_741_, lean_object* v___y_742_, lean_object* v___y_743_, lean_object* v___y_744_, lean_object* v___y_745_, lean_object* v___y_746_){
_start:
{
lean_object* v_ref_748_; lean_object* v___x_749_; 
v_ref_748_ = lean_ctor_get(v___y_745_, 5);
lean_inc(v_ref_748_);
v___x_749_ = l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg(v_ref_748_, v_msgData_738_, v_severity_739_, v_isSilent_740_, v___y_743_, v___y_744_, v___y_745_, v___y_746_);
lean_dec(v_ref_748_);
return v___x_749_;
}
}
LEAN_EXPORT lean_object* l_Lean_log___at___00Lean_logError___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__5_spec__9___boxed(lean_object* v_msgData_750_, lean_object* v_severity_751_, lean_object* v_isSilent_752_, lean_object* v___y_753_, lean_object* v___y_754_, lean_object* v___y_755_, lean_object* v___y_756_, lean_object* v___y_757_, lean_object* v___y_758_, lean_object* v___y_759_){
_start:
{
uint8_t v_severity_boxed_760_; uint8_t v_isSilent_boxed_761_; lean_object* v_res_762_; 
v_severity_boxed_760_ = lean_unbox(v_severity_751_);
v_isSilent_boxed_761_ = lean_unbox(v_isSilent_752_);
v_res_762_ = l_Lean_log___at___00Lean_logError___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__5_spec__9(v_msgData_750_, v_severity_boxed_760_, v_isSilent_boxed_761_, v___y_753_, v___y_754_, v___y_755_, v___y_756_, v___y_757_, v___y_758_);
lean_dec(v___y_758_);
lean_dec(v___y_756_);
lean_dec_ref(v___y_755_);
lean_dec(v___y_754_);
lean_dec_ref(v___y_753_);
return v_res_762_;
}
}
LEAN_EXPORT lean_object* l_Lean_logError___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__5(lean_object* v_msgData_763_, lean_object* v___y_764_, lean_object* v___y_765_, lean_object* v___y_766_, lean_object* v___y_767_, lean_object* v___y_768_, lean_object* v___y_769_){
_start:
{
uint8_t v___x_771_; uint8_t v___x_772_; lean_object* v___x_773_; 
v___x_771_ = 2;
v___x_772_ = 0;
v___x_773_ = l_Lean_log___at___00Lean_logError___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__5_spec__9(v_msgData_763_, v___x_771_, v___x_772_, v___y_764_, v___y_765_, v___y_766_, v___y_767_, v___y_768_, v___y_769_);
return v___x_773_;
}
}
LEAN_EXPORT lean_object* l_Lean_logError___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__5___boxed(lean_object* v_msgData_774_, lean_object* v___y_775_, lean_object* v___y_776_, lean_object* v___y_777_, lean_object* v___y_778_, lean_object* v___y_779_, lean_object* v___y_780_, lean_object* v___y_781_){
_start:
{
lean_object* v_res_782_; 
v_res_782_ = l_Lean_logError___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__5(v_msgData_774_, v___y_775_, v___y_776_, v___y_777_, v___y_778_, v___y_779_, v___y_780_);
lean_dec(v___y_780_);
lean_dec(v___y_778_);
lean_dec_ref(v___y_777_);
lean_dec(v___y_776_);
lean_dec_ref(v___y_775_);
return v_res_782_;
}
}
LEAN_EXPORT lean_object* l_Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4(lean_object* v_ref_783_, lean_object* v_msgData_784_, lean_object* v___y_785_, lean_object* v___y_786_, lean_object* v___y_787_, lean_object* v___y_788_, lean_object* v___y_789_, lean_object* v___y_790_){
_start:
{
uint8_t v___x_792_; uint8_t v___x_793_; lean_object* v___x_794_; 
v___x_792_ = 2;
v___x_793_ = 0;
v___x_794_ = l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg(v_ref_783_, v_msgData_784_, v___x_792_, v___x_793_, v___y_787_, v___y_788_, v___y_789_, v___y_790_);
return v___x_794_;
}
}
LEAN_EXPORT lean_object* l_Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4___boxed(lean_object* v_ref_795_, lean_object* v_msgData_796_, lean_object* v___y_797_, lean_object* v___y_798_, lean_object* v___y_799_, lean_object* v___y_800_, lean_object* v___y_801_, lean_object* v___y_802_, lean_object* v___y_803_){
_start:
{
lean_object* v_res_804_; 
v_res_804_ = l_Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4(v_ref_795_, v_msgData_796_, v___y_797_, v___y_798_, v___y_799_, v___y_800_, v___y_801_, v___y_802_);
lean_dec(v___y_802_);
lean_dec(v___y_800_);
lean_dec_ref(v___y_799_);
lean_dec(v___y_798_);
lean_dec_ref(v___y_797_);
lean_dec(v_ref_795_);
return v_res_804_;
}
}
static lean_object* _init_l_Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4___closed__1(void){
_start:
{
lean_object* v___x_806_; lean_object* v___x_807_; 
v___x_806_ = ((lean_object*)(l_Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4___closed__0));
v___x_807_ = l_Lean_stringToMessageData(v___x_806_);
return v___x_807_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4(lean_object* v_ex_808_, lean_object* v___y_809_, lean_object* v___y_810_, lean_object* v___y_811_, lean_object* v___y_812_, lean_object* v___y_813_, lean_object* v___y_814_){
_start:
{
if (lean_obj_tag(v_ex_808_) == 0)
{
lean_object* v_ref_816_; lean_object* v_msg_817_; lean_object* v___x_818_; 
v_ref_816_ = lean_ctor_get(v_ex_808_, 0);
lean_inc(v_ref_816_);
v_msg_817_ = lean_ctor_get(v_ex_808_, 1);
lean_inc_ref(v_msg_817_);
lean_dec_ref(v_ex_808_);
v___x_818_ = l_Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4(v_ref_816_, v_msg_817_, v___y_809_, v___y_810_, v___y_811_, v___y_812_, v___y_813_, v___y_814_);
lean_dec(v_ref_816_);
return v___x_818_;
}
else
{
lean_object* v_id_819_; uint8_t v___y_821_; uint8_t v___x_843_; 
v_id_819_ = lean_ctor_get(v_ex_808_, 0);
lean_inc(v_id_819_);
v___x_843_ = l_Lean_Elab_isAbortExceptionId(v_id_819_);
if (v___x_843_ == 0)
{
uint8_t v___x_844_; 
v___x_844_ = l_Lean_Exception_isInterrupt(v_ex_808_);
lean_dec_ref(v_ex_808_);
v___y_821_ = v___x_844_;
goto v___jp_820_;
}
else
{
lean_dec_ref(v_ex_808_);
v___y_821_ = v___x_843_;
goto v___jp_820_;
}
v___jp_820_:
{
if (v___y_821_ == 0)
{
lean_object* v___x_822_; 
v___x_822_ = l_Lean_InternalExceptionId_getName(v_id_819_);
lean_dec(v_id_819_);
if (lean_obj_tag(v___x_822_) == 0)
{
lean_object* v_a_823_; lean_object* v___x_824_; lean_object* v___x_825_; lean_object* v___x_826_; lean_object* v___x_827_; 
v_a_823_ = lean_ctor_get(v___x_822_, 0);
lean_inc(v_a_823_);
lean_dec_ref(v___x_822_);
v___x_824_ = lean_obj_once(&l_Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4___closed__1, &l_Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4___closed__1_once, _init_l_Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4___closed__1);
v___x_825_ = l_Lean_MessageData_ofName(v_a_823_);
v___x_826_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_826_, 0, v___x_824_);
lean_ctor_set(v___x_826_, 1, v___x_825_);
v___x_827_ = l_Lean_logError___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__5(v___x_826_, v___y_809_, v___y_810_, v___y_811_, v___y_812_, v___y_813_, v___y_814_);
return v___x_827_;
}
else
{
lean_object* v_a_828_; lean_object* v___x_830_; uint8_t v_isShared_831_; uint8_t v_isSharedCheck_840_; 
v_a_828_ = lean_ctor_get(v___x_822_, 0);
v_isSharedCheck_840_ = !lean_is_exclusive(v___x_822_);
if (v_isSharedCheck_840_ == 0)
{
v___x_830_ = v___x_822_;
v_isShared_831_ = v_isSharedCheck_840_;
goto v_resetjp_829_;
}
else
{
lean_inc(v_a_828_);
lean_dec(v___x_822_);
v___x_830_ = lean_box(0);
v_isShared_831_ = v_isSharedCheck_840_;
goto v_resetjp_829_;
}
v_resetjp_829_:
{
lean_object* v_ref_832_; lean_object* v___x_833_; lean_object* v___x_834_; lean_object* v___x_835_; lean_object* v___x_836_; lean_object* v___x_838_; 
v_ref_832_ = lean_ctor_get(v___y_813_, 5);
lean_inc(v_ref_832_);
lean_dec_ref(v___y_813_);
v___x_833_ = lean_io_error_to_string(v_a_828_);
v___x_834_ = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(v___x_834_, 0, v___x_833_);
v___x_835_ = l_Lean_MessageData_ofFormat(v___x_834_);
v___x_836_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_836_, 0, v_ref_832_);
lean_ctor_set(v___x_836_, 1, v___x_835_);
if (v_isShared_831_ == 0)
{
lean_ctor_set(v___x_830_, 0, v___x_836_);
v___x_838_ = v___x_830_;
goto v_reusejp_837_;
}
else
{
lean_object* v_reuseFailAlloc_839_; 
v_reuseFailAlloc_839_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_839_, 0, v___x_836_);
v___x_838_ = v_reuseFailAlloc_839_;
goto v_reusejp_837_;
}
v_reusejp_837_:
{
return v___x_838_;
}
}
}
}
else
{
lean_object* v___x_841_; lean_object* v___x_842_; 
lean_dec(v_id_819_);
lean_dec_ref(v___y_813_);
v___x_841_ = lean_box(0);
v___x_842_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_842_, 0, v___x_841_);
return v___x_842_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4___boxed(lean_object* v_ex_845_, lean_object* v___y_846_, lean_object* v___y_847_, lean_object* v___y_848_, lean_object* v___y_849_, lean_object* v___y_850_, lean_object* v___y_851_, lean_object* v___y_852_){
_start:
{
lean_object* v_res_853_; 
v_res_853_ = l_Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4(v_ex_845_, v___y_846_, v___y_847_, v___y_848_, v___y_849_, v___y_850_, v___y_851_);
lean_dec(v___y_851_);
lean_dec(v___y_849_);
lean_dec_ref(v___y_848_);
lean_dec(v___y_847_);
lean_dec_ref(v___y_846_);
return v_res_853_;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___lam__0(lean_object* v_a_854_, lean_object* v_a_855_, uint8_t v___y_856_, lean_object* v_fst_857_, lean_object* v_____r_858_, lean_object* v___y_859_, lean_object* v___y_860_, lean_object* v___y_861_, lean_object* v___y_862_, lean_object* v___y_863_, lean_object* v___y_864_){
_start:
{
lean_object* v___x_866_; 
lean_inc_ref(v___y_863_);
v___x_866_ = l_Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4(v_a_854_, v___y_859_, v___y_860_, v___y_861_, v___y_862_, v___y_863_, v___y_864_);
if (lean_obj_tag(v___x_866_) == 0)
{
lean_object* v___x_867_; 
lean_dec_ref(v___x_866_);
v___x_867_ = l_Lean_Core_getMessageLog___redArg(v___y_864_);
if (lean_obj_tag(v___x_867_) == 0)
{
lean_object* v_a_868_; lean_object* v___x_869_; 
v_a_868_ = lean_ctor_get(v___x_867_, 0);
lean_inc(v_a_868_);
lean_dec_ref(v___x_867_);
v___x_869_ = l_Lean_Elab_Term_SavedState_restore(v_a_855_, v___y_856_, v___y_859_, v___y_860_, v___y_861_, v___y_862_, v___y_863_, v___y_864_);
lean_dec_ref(v___y_863_);
if (lean_obj_tag(v___x_869_) == 0)
{
lean_object* v___x_871_; uint8_t v_isShared_872_; uint8_t v_isSharedCheck_879_; 
v_isSharedCheck_879_ = !lean_is_exclusive(v___x_869_);
if (v_isSharedCheck_879_ == 0)
{
lean_object* v_unused_880_; 
v_unused_880_ = lean_ctor_get(v___x_869_, 0);
lean_dec(v_unused_880_);
v___x_871_ = v___x_869_;
v_isShared_872_ = v_isSharedCheck_879_;
goto v_resetjp_870_;
}
else
{
lean_dec(v___x_869_);
v___x_871_ = lean_box(0);
v_isShared_872_ = v_isSharedCheck_879_;
goto v_resetjp_870_;
}
v_resetjp_870_:
{
lean_object* v___x_873_; lean_object* v___x_874_; lean_object* v___x_875_; lean_object* v___x_877_; 
v___x_873_ = l_Lean_MessageLog_append(v_fst_857_, v_a_868_);
v___x_874_ = lean_box(0);
v___x_875_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_875_, 0, v___x_874_);
lean_ctor_set(v___x_875_, 1, v___x_873_);
if (v_isShared_872_ == 0)
{
lean_ctor_set(v___x_871_, 0, v___x_875_);
v___x_877_ = v___x_871_;
goto v_reusejp_876_;
}
else
{
lean_object* v_reuseFailAlloc_878_; 
v_reuseFailAlloc_878_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_878_, 0, v___x_875_);
v___x_877_ = v_reuseFailAlloc_878_;
goto v_reusejp_876_;
}
v_reusejp_876_:
{
return v___x_877_;
}
}
}
else
{
lean_object* v_a_881_; lean_object* v___x_883_; uint8_t v_isShared_884_; uint8_t v_isSharedCheck_888_; 
lean_dec(v_a_868_);
lean_dec(v_fst_857_);
v_a_881_ = lean_ctor_get(v___x_869_, 0);
v_isSharedCheck_888_ = !lean_is_exclusive(v___x_869_);
if (v_isSharedCheck_888_ == 0)
{
v___x_883_ = v___x_869_;
v_isShared_884_ = v_isSharedCheck_888_;
goto v_resetjp_882_;
}
else
{
lean_inc(v_a_881_);
lean_dec(v___x_869_);
v___x_883_ = lean_box(0);
v_isShared_884_ = v_isSharedCheck_888_;
goto v_resetjp_882_;
}
v_resetjp_882_:
{
lean_object* v___x_886_; 
if (v_isShared_884_ == 0)
{
v___x_886_ = v___x_883_;
goto v_reusejp_885_;
}
else
{
lean_object* v_reuseFailAlloc_887_; 
v_reuseFailAlloc_887_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_887_, 0, v_a_881_);
v___x_886_ = v_reuseFailAlloc_887_;
goto v_reusejp_885_;
}
v_reusejp_885_:
{
return v___x_886_;
}
}
}
}
else
{
lean_object* v_a_889_; lean_object* v___x_891_; uint8_t v_isShared_892_; uint8_t v_isSharedCheck_896_; 
lean_dec_ref(v___y_863_);
lean_dec(v_fst_857_);
lean_dec_ref(v_a_855_);
v_a_889_ = lean_ctor_get(v___x_867_, 0);
v_isSharedCheck_896_ = !lean_is_exclusive(v___x_867_);
if (v_isSharedCheck_896_ == 0)
{
v___x_891_ = v___x_867_;
v_isShared_892_ = v_isSharedCheck_896_;
goto v_resetjp_890_;
}
else
{
lean_inc(v_a_889_);
lean_dec(v___x_867_);
v___x_891_ = lean_box(0);
v_isShared_892_ = v_isSharedCheck_896_;
goto v_resetjp_890_;
}
v_resetjp_890_:
{
lean_object* v___x_894_; 
if (v_isShared_892_ == 0)
{
v___x_894_ = v___x_891_;
goto v_reusejp_893_;
}
else
{
lean_object* v_reuseFailAlloc_895_; 
v_reuseFailAlloc_895_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_895_, 0, v_a_889_);
v___x_894_ = v_reuseFailAlloc_895_;
goto v_reusejp_893_;
}
v_reusejp_893_:
{
return v___x_894_;
}
}
}
}
else
{
lean_object* v_a_897_; lean_object* v___x_899_; uint8_t v_isShared_900_; uint8_t v_isSharedCheck_904_; 
lean_dec_ref(v___y_863_);
lean_dec(v_fst_857_);
lean_dec_ref(v_a_855_);
v_a_897_ = lean_ctor_get(v___x_866_, 0);
v_isSharedCheck_904_ = !lean_is_exclusive(v___x_866_);
if (v_isSharedCheck_904_ == 0)
{
v___x_899_ = v___x_866_;
v_isShared_900_ = v_isSharedCheck_904_;
goto v_resetjp_898_;
}
else
{
lean_inc(v_a_897_);
lean_dec(v___x_866_);
v___x_899_ = lean_box(0);
v_isShared_900_ = v_isSharedCheck_904_;
goto v_resetjp_898_;
}
v_resetjp_898_:
{
lean_object* v___x_902_; 
if (v_isShared_900_ == 0)
{
v___x_902_ = v___x_899_;
goto v_reusejp_901_;
}
else
{
lean_object* v_reuseFailAlloc_903_; 
v_reuseFailAlloc_903_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_903_, 0, v_a_897_);
v___x_902_ = v_reuseFailAlloc_903_;
goto v_reusejp_901_;
}
v_reusejp_901_:
{
return v___x_902_;
}
}
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___lam__0___boxed(lean_object* v_a_905_, lean_object* v_a_906_, lean_object* v___y_907_, lean_object* v_fst_908_, lean_object* v_____r_909_, lean_object* v___y_910_, lean_object* v___y_911_, lean_object* v___y_912_, lean_object* v___y_913_, lean_object* v___y_914_, lean_object* v___y_915_, lean_object* v___y_916_){
_start:
{
uint8_t v___y_56305__boxed_917_; lean_object* v_res_918_; 
v___y_56305__boxed_917_ = lean_unbox(v___y_907_);
v_res_918_ = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___lam__0(v_a_905_, v_a_906_, v___y_56305__boxed_917_, v_fst_908_, v_____r_909_, v___y_910_, v___y_911_, v___y_912_, v___y_913_, v___y_914_, v___y_915_);
lean_dec(v___y_915_);
lean_dec(v___y_913_);
lean_dec_ref(v___y_912_);
lean_dec(v___y_911_);
lean_dec_ref(v___y_910_);
return v_res_918_;
}
}
static lean_object* _init_l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__3(void){
_start:
{
lean_object* v___x_924_; lean_object* v___x_925_; 
v___x_924_ = ((lean_object*)(l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__2));
v___x_925_ = l_Lean_stringToMessageData(v___x_924_);
return v___x_925_;
}
}
static lean_object* _init_l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__5(void){
_start:
{
lean_object* v___x_927_; lean_object* v___x_928_; 
v___x_927_ = ((lean_object*)(l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__4));
v___x_928_ = l_Lean_stringToMessageData(v___x_927_);
return v___x_928_;
}
}
static lean_object* _init_l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__7(void){
_start:
{
lean_object* v___x_930_; lean_object* v___x_931_; 
v___x_930_ = ((lean_object*)(l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__6));
v___x_931_ = l_Lean_stringToMessageData(v___x_930_);
return v___x_931_;
}
}
static lean_object* _init_l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__9(void){
_start:
{
lean_object* v___x_933_; lean_object* v___x_934_; 
v___x_933_ = ((lean_object*)(l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__8));
v___x_934_ = l_Lean_stringToMessageData(v___x_933_);
return v___x_934_;
}
}
static lean_object* _init_l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__11(void){
_start:
{
lean_object* v___x_936_; lean_object* v___x_937_; 
v___x_936_ = ((lean_object*)(l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__10));
v___x_937_ = l_Lean_stringToMessageData(v___x_936_);
return v___x_937_;
}
}
static lean_object* _init_l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__13(void){
_start:
{
lean_object* v___x_939_; lean_object* v___x_940_; 
v___x_939_ = ((lean_object*)(l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__12));
v___x_940_ = l_Lean_stringToMessageData(v___x_939_);
return v___x_940_;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5(lean_object* v_a_941_, lean_object* v_xs_942_, lean_object* v_declVal_943_, lean_object* v___x_944_, lean_object* v_a_945_, lean_object* v_className_946_, lean_object* v_declName_947_, lean_object* v_cls_948_, lean_object* v_instVal_949_, lean_object* v_classExpr_950_, lean_object* v_instMVars_951_, lean_object* v_a_952_, lean_object* v_as_953_, size_t v_sz_954_, size_t v_i_955_, lean_object* v_b_956_, lean_object* v___y_957_, lean_object* v___y_958_, lean_object* v___y_959_, lean_object* v___y_960_, lean_object* v___y_961_, lean_object* v___y_962_){
_start:
{
lean_object* v_a_965_; uint8_t v___x_969_; 
v___x_969_ = lean_usize_dec_lt(v_i_955_, v_sz_954_);
if (v___x_969_ == 0)
{
lean_object* v___x_970_; 
lean_dec(v___y_962_);
lean_dec_ref(v___y_961_);
lean_dec(v___y_960_);
lean_dec_ref(v___y_959_);
lean_dec(v___y_958_);
lean_dec_ref(v___y_957_);
lean_dec_ref(v_a_952_);
lean_dec_ref(v_classExpr_950_);
lean_dec_ref(v_instVal_949_);
lean_dec_ref(v_cls_948_);
lean_dec(v_declName_947_);
lean_dec(v_className_946_);
lean_dec_ref(v_a_945_);
lean_dec_ref(v___x_944_);
lean_dec_ref(v_declVal_943_);
lean_dec_ref(v_xs_942_);
lean_dec_ref(v_a_941_);
v___x_970_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_970_, 0, v_b_956_);
return v___x_970_;
}
else
{
lean_object* v_snd_971_; lean_object* v___x_973_; uint8_t v_isShared_974_; uint8_t v_isSharedCheck_1396_; 
v_snd_971_ = lean_ctor_get(v_b_956_, 1);
v_isSharedCheck_1396_ = !lean_is_exclusive(v_b_956_);
if (v_isSharedCheck_1396_ == 0)
{
lean_object* v_unused_1397_; 
v_unused_1397_ = lean_ctor_get(v_b_956_, 0);
lean_dec(v_unused_1397_);
v___x_973_ = v_b_956_;
v_isShared_974_ = v_isSharedCheck_1396_;
goto v_resetjp_972_;
}
else
{
lean_inc(v_snd_971_);
lean_dec(v_b_956_);
v___x_973_ = lean_box(0);
v_isShared_974_ = v_isSharedCheck_1396_;
goto v_resetjp_972_;
}
v_resetjp_972_:
{
lean_object* v_snd_975_; lean_object* v_snd_976_; lean_object* v_snd_977_; lean_object* v_fst_978_; lean_object* v___x_980_; uint8_t v_isShared_981_; uint8_t v_isSharedCheck_1394_; 
v_snd_975_ = lean_ctor_get(v_snd_971_, 1);
lean_inc(v_snd_975_);
v_snd_976_ = lean_ctor_get(v_snd_975_, 1);
lean_inc(v_snd_976_);
v_snd_977_ = lean_ctor_get(v_snd_976_, 1);
lean_inc(v_snd_977_);
v_fst_978_ = lean_ctor_get(v_snd_971_, 0);
v_isSharedCheck_1394_ = !lean_is_exclusive(v_snd_971_);
if (v_isSharedCheck_1394_ == 0)
{
lean_object* v_unused_1395_; 
v_unused_1395_ = lean_ctor_get(v_snd_971_, 1);
lean_dec(v_unused_1395_);
v___x_980_ = v_snd_971_;
v_isShared_981_ = v_isSharedCheck_1394_;
goto v_resetjp_979_;
}
else
{
lean_inc(v_fst_978_);
lean_dec(v_snd_971_);
v___x_980_ = lean_box(0);
v_isShared_981_ = v_isSharedCheck_1394_;
goto v_resetjp_979_;
}
v_resetjp_979_:
{
lean_object* v_fst_982_; lean_object* v___x_984_; uint8_t v_isShared_985_; uint8_t v_isSharedCheck_1392_; 
v_fst_982_ = lean_ctor_get(v_snd_975_, 0);
v_isSharedCheck_1392_ = !lean_is_exclusive(v_snd_975_);
if (v_isSharedCheck_1392_ == 0)
{
lean_object* v_unused_1393_; 
v_unused_1393_ = lean_ctor_get(v_snd_975_, 1);
lean_dec(v_unused_1393_);
v___x_984_ = v_snd_975_;
v_isShared_985_ = v_isSharedCheck_1392_;
goto v_resetjp_983_;
}
else
{
lean_inc(v_fst_982_);
lean_dec(v_snd_975_);
v___x_984_ = lean_box(0);
v_isShared_985_ = v_isSharedCheck_1392_;
goto v_resetjp_983_;
}
v_resetjp_983_:
{
lean_object* v_fst_986_; lean_object* v___x_988_; uint8_t v_isShared_989_; uint8_t v_isSharedCheck_1390_; 
v_fst_986_ = lean_ctor_get(v_snd_976_, 0);
v_isSharedCheck_1390_ = !lean_is_exclusive(v_snd_976_);
if (v_isSharedCheck_1390_ == 0)
{
lean_object* v_unused_1391_; 
v_unused_1391_ = lean_ctor_get(v_snd_976_, 1);
lean_dec(v_unused_1391_);
v___x_988_ = v_snd_976_;
v_isShared_989_ = v_isSharedCheck_1390_;
goto v_resetjp_987_;
}
else
{
lean_inc(v_fst_986_);
lean_dec(v_snd_976_);
v___x_988_ = lean_box(0);
v_isShared_989_ = v_isSharedCheck_1390_;
goto v_resetjp_987_;
}
v_resetjp_987_:
{
lean_object* v_next_990_; lean_object* v_upperBound_991_; lean_object* v___x_992_; 
v_next_990_ = lean_ctor_get(v_snd_977_, 0);
lean_inc(v_next_990_);
v_upperBound_991_ = lean_ctor_get(v_snd_977_, 1);
v___x_992_ = lean_box(0);
if (lean_obj_tag(v_next_990_) == 0)
{
lean_dec(v___y_962_);
lean_dec_ref(v___y_961_);
lean_dec(v___y_960_);
lean_dec_ref(v___y_959_);
lean_dec(v___y_958_);
lean_dec_ref(v___y_957_);
lean_dec_ref(v_a_952_);
lean_dec_ref(v_classExpr_950_);
lean_dec_ref(v_instVal_949_);
lean_dec_ref(v_cls_948_);
lean_dec(v_declName_947_);
lean_dec(v_className_946_);
lean_dec_ref(v_a_945_);
lean_dec_ref(v___x_944_);
lean_dec_ref(v_declVal_943_);
lean_dec_ref(v_xs_942_);
lean_dec_ref(v_a_941_);
goto v___jp_993_;
}
else
{
lean_object* v_val_1007_; lean_object* v___x_1009_; uint8_t v_isShared_1010_; uint8_t v_isSharedCheck_1389_; 
v_val_1007_ = lean_ctor_get(v_next_990_, 0);
v_isSharedCheck_1389_ = !lean_is_exclusive(v_next_990_);
if (v_isSharedCheck_1389_ == 0)
{
v___x_1009_ = v_next_990_;
v_isShared_1010_ = v_isSharedCheck_1389_;
goto v_resetjp_1008_;
}
else
{
lean_inc(v_val_1007_);
lean_dec(v_next_990_);
v___x_1009_ = lean_box(0);
v_isShared_1010_ = v_isSharedCheck_1389_;
goto v_resetjp_1008_;
}
v_resetjp_1008_:
{
uint8_t v___x_1011_; 
v___x_1011_ = lean_nat_dec_lt(v_val_1007_, v_upperBound_991_);
if (v___x_1011_ == 0)
{
lean_del_object(v___x_1009_);
lean_dec(v_val_1007_);
lean_dec(v___y_962_);
lean_dec_ref(v___y_961_);
lean_dec(v___y_960_);
lean_dec_ref(v___y_959_);
lean_dec(v___y_958_);
lean_dec_ref(v___y_957_);
lean_dec_ref(v_a_952_);
lean_dec_ref(v_classExpr_950_);
lean_dec_ref(v_instVal_949_);
lean_dec_ref(v_cls_948_);
lean_dec(v_declName_947_);
lean_dec(v_className_946_);
lean_dec_ref(v_a_945_);
lean_dec_ref(v___x_944_);
lean_dec_ref(v_declVal_943_);
lean_dec_ref(v_xs_942_);
lean_dec_ref(v_a_941_);
goto v___jp_993_;
}
else
{
lean_object* v___x_1013_; uint8_t v_isShared_1014_; uint8_t v_isSharedCheck_1386_; 
lean_inc(v_upperBound_991_);
lean_del_object(v___x_988_);
lean_del_object(v___x_984_);
lean_del_object(v___x_980_);
lean_del_object(v___x_973_);
v_isSharedCheck_1386_ = !lean_is_exclusive(v_snd_977_);
if (v_isSharedCheck_1386_ == 0)
{
lean_object* v_unused_1387_; lean_object* v_unused_1388_; 
v_unused_1387_ = lean_ctor_get(v_snd_977_, 1);
lean_dec(v_unused_1387_);
v_unused_1388_ = lean_ctor_get(v_snd_977_, 0);
lean_dec(v_unused_1388_);
v___x_1013_ = v_snd_977_;
v_isShared_1014_ = v_isSharedCheck_1386_;
goto v_resetjp_1012_;
}
else
{
lean_dec(v_snd_977_);
v___x_1013_ = lean_box(0);
v_isShared_1014_ = v_isSharedCheck_1386_;
goto v_resetjp_1012_;
}
v_resetjp_1012_:
{
lean_object* v_array_1015_; lean_object* v_start_1016_; lean_object* v_stop_1017_; lean_object* v___x_1018_; lean_object* v___x_1019_; lean_object* v___x_1021_; 
v_array_1015_ = lean_ctor_get(v_fst_986_, 0);
v_start_1016_ = lean_ctor_get(v_fst_986_, 1);
v_stop_1017_ = lean_ctor_get(v_fst_986_, 2);
v___x_1018_ = lean_unsigned_to_nat(1u);
v___x_1019_ = lean_nat_add(v_val_1007_, v___x_1018_);
if (v_isShared_1010_ == 0)
{
lean_ctor_set(v___x_1009_, 0, v___x_1019_);
v___x_1021_ = v___x_1009_;
goto v_reusejp_1020_;
}
else
{
lean_object* v_reuseFailAlloc_1385_; 
v_reuseFailAlloc_1385_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1385_, 0, v___x_1019_);
v___x_1021_ = v_reuseFailAlloc_1385_;
goto v_reusejp_1020_;
}
v_reusejp_1020_:
{
lean_object* v___x_1023_; 
if (v_isShared_1014_ == 0)
{
lean_ctor_set(v___x_1013_, 0, v___x_1021_);
v___x_1023_ = v___x_1013_;
goto v_reusejp_1022_;
}
else
{
lean_object* v_reuseFailAlloc_1384_; 
v_reuseFailAlloc_1384_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v_reuseFailAlloc_1384_, 0, v___x_1021_);
lean_ctor_set(v_reuseFailAlloc_1384_, 1, v_upperBound_991_);
v___x_1023_ = v_reuseFailAlloc_1384_;
goto v_reusejp_1022_;
}
v_reusejp_1022_:
{
uint8_t v___x_1024_; 
v___x_1024_ = lean_nat_dec_lt(v_start_1016_, v_stop_1017_);
if (v___x_1024_ == 0)
{
lean_object* v___x_1025_; lean_object* v___x_1026_; lean_object* v___x_1027_; lean_object* v___x_1028_; lean_object* v___x_1029_; 
lean_dec(v_val_1007_);
lean_dec(v___y_962_);
lean_dec_ref(v___y_961_);
lean_dec(v___y_960_);
lean_dec_ref(v___y_959_);
lean_dec(v___y_958_);
lean_dec_ref(v___y_957_);
lean_dec_ref(v_a_952_);
lean_dec_ref(v_classExpr_950_);
lean_dec_ref(v_instVal_949_);
lean_dec_ref(v_cls_948_);
lean_dec(v_declName_947_);
lean_dec(v_className_946_);
lean_dec_ref(v_a_945_);
lean_dec_ref(v___x_944_);
lean_dec_ref(v_declVal_943_);
lean_dec_ref(v_xs_942_);
lean_dec_ref(v_a_941_);
v___x_1025_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_1025_, 0, v_fst_986_);
lean_ctor_set(v___x_1025_, 1, v___x_1023_);
v___x_1026_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_1026_, 0, v_fst_982_);
lean_ctor_set(v___x_1026_, 1, v___x_1025_);
v___x_1027_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_1027_, 0, v_fst_978_);
lean_ctor_set(v___x_1027_, 1, v___x_1026_);
v___x_1028_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_1028_, 0, v___x_992_);
lean_ctor_set(v___x_1028_, 1, v___x_1027_);
v___x_1029_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_1029_, 0, v___x_1028_);
return v___x_1029_;
}
else
{
lean_object* v___x_1031_; uint8_t v_isShared_1032_; uint8_t v_isSharedCheck_1380_; 
lean_inc(v_stop_1017_);
lean_inc(v_start_1016_);
lean_inc_ref(v_array_1015_);
v_isSharedCheck_1380_ = !lean_is_exclusive(v_fst_986_);
if (v_isSharedCheck_1380_ == 0)
{
lean_object* v_unused_1381_; lean_object* v_unused_1382_; lean_object* v_unused_1383_; 
v_unused_1381_ = lean_ctor_get(v_fst_986_, 2);
lean_dec(v_unused_1381_);
v_unused_1382_ = lean_ctor_get(v_fst_986_, 1);
lean_dec(v_unused_1382_);
v_unused_1383_ = lean_ctor_get(v_fst_986_, 0);
lean_dec(v_unused_1383_);
v___x_1031_ = v_fst_986_;
v_isShared_1032_ = v_isSharedCheck_1380_;
goto v_resetjp_1030_;
}
else
{
lean_dec(v_fst_986_);
v___x_1031_ = lean_box(0);
v_isShared_1032_ = v_isSharedCheck_1380_;
goto v_resetjp_1030_;
}
v_resetjp_1030_:
{
lean_object* v___x_1033_; lean_object* v___x_1034_; lean_object* v___x_1036_; 
v___x_1033_ = lean_array_fget(v_array_1015_, v_start_1016_);
v___x_1034_ = lean_nat_add(v_start_1016_, v___x_1018_);
lean_dec(v_start_1016_);
if (v_isShared_1032_ == 0)
{
lean_ctor_set(v___x_1031_, 1, v___x_1034_);
v___x_1036_ = v___x_1031_;
goto v_reusejp_1035_;
}
else
{
lean_object* v_reuseFailAlloc_1379_; 
v_reuseFailAlloc_1379_ = lean_alloc_ctor(0, 3, 0);
lean_ctor_set(v_reuseFailAlloc_1379_, 0, v_array_1015_);
lean_ctor_set(v_reuseFailAlloc_1379_, 1, v___x_1034_);
lean_ctor_set(v_reuseFailAlloc_1379_, 2, v_stop_1017_);
v___x_1036_ = v_reuseFailAlloc_1379_;
goto v_reusejp_1035_;
}
v_reusejp_1035_:
{
uint8_t v___x_1037_; uint8_t v___x_1038_; 
v___x_1037_ = lean_unbox(v___x_1033_);
lean_dec(v___x_1033_);
v___x_1038_ = l_Lean_BinderInfo_isExplicit(v___x_1037_);
if (v___x_1038_ == 0)
{
lean_object* v___x_1039_; lean_object* v___x_1040_; lean_object* v___x_1041_; lean_object* v___x_1042_; 
lean_dec(v_val_1007_);
v___x_1039_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_1039_, 0, v___x_1036_);
lean_ctor_set(v___x_1039_, 1, v___x_1023_);
v___x_1040_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_1040_, 0, v_fst_982_);
lean_ctor_set(v___x_1040_, 1, v___x_1039_);
v___x_1041_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_1041_, 0, v_fst_978_);
lean_ctor_set(v___x_1041_, 1, v___x_1040_);
v___x_1042_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_1042_, 0, v___x_992_);
lean_ctor_set(v___x_1042_, 1, v___x_1041_);
v_a_965_ = v___x_1042_;
goto v___jp_964_;
}
else
{
lean_object* v_a_1043_; lean_object* v___x_1044_; lean_object* v___x_1045_; 
v_a_1043_ = lean_array_uget_borrowed(v_as_953_, v_i_955_);
v___x_1044_ = l_Lean_Expr_mvarId_x21(v_a_1043_);
v___x_1045_ = l_Lean_MVarId_getDecl(v___x_1044_, v___y_959_, v___y_960_, v___y_961_, v___y_962_);
if (lean_obj_tag(v___x_1045_) == 0)
{
lean_object* v_a_1046_; lean_object* v_type_1047_; uint8_t v___x_1048_; 
v_a_1046_ = lean_ctor_get(v___x_1045_, 0);
lean_inc(v_a_1046_);
lean_dec_ref(v___x_1045_);
v_type_1047_ = lean_ctor_get(v_a_1046_, 2);
lean_inc_ref(v_type_1047_);
lean_dec(v_a_1046_);
lean_inc_ref(v_type_1047_);
v___x_1048_ = lean_is_out_param(v_type_1047_);
if (v___x_1048_ == 0)
{
lean_object* v___x_1049_; 
lean_inc(v___y_962_);
lean_inc_ref(v___y_961_);
lean_inc(v___y_960_);
lean_inc_ref(v___y_959_);
lean_inc(v_a_1043_);
v___x_1049_ = l_Lean_Elab_Term_isMVarApp___redArg(v_a_1043_, v___y_959_, v___y_960_, v___y_961_, v___y_962_);
if (lean_obj_tag(v___x_1049_) == 0)
{
lean_object* v_a_1050_; lean_object* v___x_1052_; uint8_t v_isShared_1053_; uint8_t v_isSharedCheck_1358_; 
v_a_1050_ = lean_ctor_get(v___x_1049_, 0);
v_isSharedCheck_1358_ = !lean_is_exclusive(v___x_1049_);
if (v_isSharedCheck_1358_ == 0)
{
v___x_1052_ = v___x_1049_;
v_isShared_1053_ = v_isSharedCheck_1358_;
goto v_resetjp_1051_;
}
else
{
lean_inc(v_a_1050_);
lean_dec(v___x_1049_);
v___x_1052_ = lean_box(0);
v_isShared_1053_ = v_isSharedCheck_1358_;
goto v_resetjp_1051_;
}
v_resetjp_1051_:
{
lean_object* v___y_1055_; lean_object* v___y_1056_; lean_object* v___y_1057_; lean_object* v___y_1058_; lean_object* v___y_1059_; lean_object* v___y_1060_; lean_object* v___y_1061_; uint8_t v___x_1086_; 
v___x_1086_ = lean_unbox(v_a_1050_);
if (v___x_1086_ == 0)
{
lean_object* v___x_1087_; lean_object* v___x_1088_; lean_object* v___x_1089_; lean_object* v___x_1090_; 
lean_del_object(v___x_1052_);
lean_dec(v_a_1050_);
lean_dec_ref(v_type_1047_);
lean_dec(v_val_1007_);
v___x_1087_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_1087_, 0, v___x_1036_);
lean_ctor_set(v___x_1087_, 1, v___x_1023_);
v___x_1088_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_1088_, 0, v_fst_982_);
lean_ctor_set(v___x_1088_, 1, v___x_1087_);
v___x_1089_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_1089_, 0, v_fst_978_);
lean_ctor_set(v___x_1089_, 1, v___x_1088_);
v___x_1090_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_1090_, 0, v___x_992_);
lean_ctor_set(v___x_1090_, 1, v___x_1089_);
v_a_965_ = v___x_1090_;
goto v___jp_964_;
}
else
{
lean_object* v___x_1091_; lean_object* v___y_1093_; lean_object* v___y_1094_; lean_object* v___y_1095_; lean_object* v___y_1096_; lean_object* v___y_1097_; lean_object* v___y_1098_; lean_object* v___y_1099_; lean_object* v___x_1136_; lean_object* v___y_1138_; lean_object* v___y_1139_; lean_object* v___y_1140_; lean_object* v___y_1141_; lean_object* v___y_1142_; lean_object* v___y_1143_; lean_object* v_snd_1144_; lean_object* v___y_1205_; lean_object* v___y_1206_; lean_object* v___y_1207_; lean_object* v___y_1208_; lean_object* v___y_1209_; lean_object* v___y_1210_; lean_object* v___y_1211_; lean_object* v___y_1236_; lean_object* v___y_1237_; lean_object* v___y_1238_; lean_object* v___y_1239_; lean_object* v___y_1240_; lean_object* v___y_1241_; lean_object* v___y_1242_; uint8_t v___y_1243_; lean_object* v___y_1279_; lean_object* v___y_1280_; lean_object* v___y_1281_; lean_object* v___y_1282_; lean_object* v___y_1283_; lean_object* v___y_1284_; lean_object* v_a_1285_; lean_object* v___y_1289_; lean_object* v___y_1290_; lean_object* v___y_1291_; lean_object* v___y_1292_; lean_object* v___y_1293_; lean_object* v___y_1294_; lean_object* v___y_1300_; lean_object* v___x_1354_; 
v___x_1091_ = lean_unsigned_to_nat(0u);
v___x_1136_ = ((lean_object*)(l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__1));
lean_inc(v___y_962_);
lean_inc_ref(v___y_961_);
lean_inc(v___y_960_);
lean_inc_ref(v___y_959_);
lean_inc_ref(v_a_952_);
v___x_1354_ = l_Lean_Meta_isExprDefEqGuarded(v_type_1047_, v_a_952_, v___y_959_, v___y_960_, v___y_961_, v___y_962_);
if (lean_obj_tag(v___x_1354_) == 0)
{
lean_object* v_a_1355_; uint8_t v___x_1356_; 
v_a_1355_ = lean_ctor_get(v___x_1354_, 0);
lean_inc(v_a_1355_);
v___x_1356_ = lean_unbox(v_a_1355_);
lean_dec(v_a_1355_);
if (v___x_1356_ == 0)
{
v___y_1300_ = v___x_1354_;
goto v___jp_1299_;
}
else
{
lean_object* v___x_1357_; 
lean_dec_ref(v___x_1354_);
lean_inc(v___y_962_);
lean_inc_ref(v___y_961_);
lean_inc(v___y_960_);
lean_inc_ref(v___y_959_);
lean_inc_ref(v_a_945_);
lean_inc(v_a_1043_);
v___x_1357_ = l_Lean_Meta_isExprDefEqGuarded(v_a_1043_, v_a_945_, v___y_959_, v___y_960_, v___y_961_, v___y_962_);
v___y_1300_ = v___x_1357_;
goto v___jp_1299_;
}
}
else
{
v___y_1300_ = v___x_1354_;
goto v___jp_1299_;
}
v___jp_1092_:
{
lean_object* v___x_1100_; lean_object* v___x_1101_; lean_object* v___x_1102_; lean_object* v___x_1103_; lean_object* v___x_1104_; 
lean_inc_ref(v_declVal_943_);
lean_inc_ref(v_xs_942_);
v___x_1100_ = lean_array_set(v_xs_942_, v_val_1007_, v_declVal_943_);
lean_dec(v_val_1007_);
v___x_1101_ = lean_array_get_size(v___x_1100_);
v___x_1102_ = lean_alloc_ctor(0, 3, 0);
lean_ctor_set(v___x_1102_, 0, v___x_1091_);
lean_ctor_set(v___x_1102_, 1, v___x_1101_);
lean_ctor_set(v___x_1102_, 2, v___x_1018_);
v___x_1103_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_1103_, 0, v___x_1100_);
lean_ctor_set(v___x_1103_, 1, v___x_944_);
v___x_1104_ = l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg(v_xs_942_, v_a_945_, v_declVal_943_, v_className_946_, v_declName_947_, v___x_1102_, v___x_1103_, v___x_1091_, v___y_1094_, v___y_1095_, v___y_1096_, v___y_1097_, v___y_1098_, v___y_1099_);
lean_dec(v___y_1095_);
lean_dec_ref(v___y_1094_);
lean_dec_ref(v___x_1102_);
lean_dec_ref(v_xs_942_);
if (lean_obj_tag(v___x_1104_) == 0)
{
lean_object* v_a_1105_; lean_object* v___x_1107_; uint8_t v_isShared_1108_; uint8_t v_isSharedCheck_1127_; 
v_a_1105_ = lean_ctor_get(v___x_1104_, 0);
v_isSharedCheck_1127_ = !lean_is_exclusive(v___x_1104_);
if (v_isSharedCheck_1127_ == 0)
{
v___x_1107_ = v___x_1104_;
v_isShared_1108_ = v_isSharedCheck_1127_;
goto v_resetjp_1106_;
}
else
{
lean_inc(v_a_1105_);
lean_dec(v___x_1104_);
v___x_1107_ = lean_box(0);
v_isShared_1108_ = v_isSharedCheck_1127_;
goto v_resetjp_1106_;
}
v_resetjp_1106_:
{
lean_object* v_fst_1109_; lean_object* v___x_1111_; uint8_t v_isShared_1112_; uint8_t v_isSharedCheck_1125_; 
v_fst_1109_ = lean_ctor_get(v_a_1105_, 0);
v_isSharedCheck_1125_ = !lean_is_exclusive(v_a_1105_);
if (v_isSharedCheck_1125_ == 0)
{
lean_object* v_unused_1126_; 
v_unused_1126_ = lean_ctor_get(v_a_1105_, 1);
lean_dec(v_unused_1126_);
v___x_1111_ = v_a_1105_;
v_isShared_1112_ = v_isSharedCheck_1125_;
goto v_resetjp_1110_;
}
else
{
lean_inc(v_fst_1109_);
lean_dec(v_a_1105_);
v___x_1111_ = lean_box(0);
v_isShared_1112_ = v_isSharedCheck_1125_;
goto v_resetjp_1110_;
}
v_resetjp_1110_:
{
lean_object* v___x_1113_; lean_object* v___x_1114_; lean_object* v___x_1115_; lean_object* v___x_1117_; 
v___x_1113_ = l_Lean_mkAppN(v_cls_948_, v_fst_1109_);
lean_dec(v_fst_1109_);
v___x_1114_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_1114_, 0, v___x_1113_);
lean_ctor_set(v___x_1114_, 1, v_instVal_949_);
v___x_1115_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_1115_, 0, v___x_1114_);
if (v_isShared_1112_ == 0)
{
lean_ctor_set(v___x_1111_, 1, v___x_1023_);
lean_ctor_set(v___x_1111_, 0, v___x_1036_);
v___x_1117_ = v___x_1111_;
goto v_reusejp_1116_;
}
else
{
lean_object* v_reuseFailAlloc_1124_; 
v_reuseFailAlloc_1124_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v_reuseFailAlloc_1124_, 0, v___x_1036_);
lean_ctor_set(v_reuseFailAlloc_1124_, 1, v___x_1023_);
v___x_1117_ = v_reuseFailAlloc_1124_;
goto v_reusejp_1116_;
}
v_reusejp_1116_:
{
lean_object* v___x_1118_; lean_object* v___x_1119_; lean_object* v___x_1120_; lean_object* v___x_1122_; 
v___x_1118_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_1118_, 0, v___y_1093_);
lean_ctor_set(v___x_1118_, 1, v___x_1117_);
v___x_1119_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_1119_, 0, v_a_1050_);
lean_ctor_set(v___x_1119_, 1, v___x_1118_);
v___x_1120_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_1120_, 0, v___x_1115_);
lean_ctor_set(v___x_1120_, 1, v___x_1119_);
if (v_isShared_1108_ == 0)
{
lean_ctor_set(v___x_1107_, 0, v___x_1120_);
v___x_1122_ = v___x_1107_;
goto v_reusejp_1121_;
}
else
{
lean_object* v_reuseFailAlloc_1123_; 
v_reuseFailAlloc_1123_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1123_, 0, v___x_1120_);
v___x_1122_ = v_reuseFailAlloc_1123_;
goto v_reusejp_1121_;
}
v_reusejp_1121_:
{
return v___x_1122_;
}
}
}
}
}
else
{
lean_object* v_a_1128_; lean_object* v___x_1130_; uint8_t v_isShared_1131_; uint8_t v_isSharedCheck_1135_; 
lean_dec(v___y_1093_);
lean_dec(v_a_1050_);
lean_dec_ref(v___x_1036_);
lean_dec_ref(v___x_1023_);
lean_dec_ref(v_instVal_949_);
lean_dec_ref(v_cls_948_);
v_a_1128_ = lean_ctor_get(v___x_1104_, 0);
v_isSharedCheck_1135_ = !lean_is_exclusive(v___x_1104_);
if (v_isSharedCheck_1135_ == 0)
{
v___x_1130_ = v___x_1104_;
v_isShared_1131_ = v_isSharedCheck_1135_;
goto v_resetjp_1129_;
}
else
{
lean_inc(v_a_1128_);
lean_dec(v___x_1104_);
v___x_1130_ = lean_box(0);
v_isShared_1131_ = v_isSharedCheck_1135_;
goto v_resetjp_1129_;
}
v_resetjp_1129_:
{
lean_object* v___x_1133_; 
if (v_isShared_1131_ == 0)
{
v___x_1133_ = v___x_1130_;
goto v_reusejp_1132_;
}
else
{
lean_object* v_reuseFailAlloc_1134_; 
v_reuseFailAlloc_1134_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1134_, 0, v_a_1128_);
v___x_1133_ = v_reuseFailAlloc_1134_;
goto v_reusejp_1132_;
}
v_reusejp_1132_:
{
return v___x_1133_;
}
}
}
}
v___jp_1137_:
{
lean_object* v___x_1145_; lean_object* v_messages_1146_; uint8_t v___x_1147_; 
v___x_1145_ = lean_st_ref_get(v___y_1141_);
v_messages_1146_ = lean_ctor_get(v___x_1145_, 6);
lean_inc_ref(v_messages_1146_);
lean_dec(v___x_1145_);
v___x_1147_ = l_Lean_MessageLog_hasErrors(v_messages_1146_);
lean_dec_ref(v_messages_1146_);
if (v___x_1147_ == 0)
{
lean_object* v___x_1148_; 
lean_dec(v___y_962_);
lean_dec_ref(v___y_961_);
lean_dec(v___y_960_);
lean_dec_ref(v___y_959_);
lean_dec(v___y_958_);
lean_dec_ref(v___y_957_);
lean_dec_ref(v_a_952_);
lean_dec_ref(v_a_941_);
v___x_1148_ = l_Lean_isTracingEnabledFor___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__2___redArg(v___x_1136_, v___y_1140_);
if (lean_obj_tag(v___x_1148_) == 0)
{
lean_object* v_a_1149_; uint8_t v___x_1150_; 
v_a_1149_ = lean_ctor_get(v___x_1148_, 0);
lean_inc(v_a_1149_);
lean_dec_ref(v___x_1148_);
v___x_1150_ = lean_unbox(v_a_1149_);
lean_dec(v_a_1149_);
if (v___x_1150_ == 0)
{
lean_dec_ref(v_classExpr_950_);
v___y_1093_ = v_snd_1144_;
v___y_1094_ = v___y_1142_;
v___y_1095_ = v___y_1138_;
v___y_1096_ = v___y_1143_;
v___y_1097_ = v___y_1139_;
v___y_1098_ = v___y_1140_;
v___y_1099_ = v___y_1141_;
goto v___jp_1092_;
}
else
{
lean_object* v___x_1151_; lean_object* v___x_1152_; lean_object* v___x_1153_; lean_object* v___x_1154_; lean_object* v___x_1155_; lean_object* v___x_1156_; lean_object* v___x_1157_; lean_object* v___x_1158_; lean_object* v___x_1159_; lean_object* v___x_1160_; 
v___x_1151_ = lean_obj_once(&l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__3, &l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__3_once, _init_l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__3);
lean_inc(v_val_1007_);
v___x_1152_ = l_Nat_reprFast(v_val_1007_);
v___x_1153_ = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(v___x_1153_, 0, v___x_1152_);
v___x_1154_ = l_Lean_MessageData_ofFormat(v___x_1153_);
v___x_1155_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_1155_, 0, v___x_1151_);
lean_ctor_set(v___x_1155_, 1, v___x_1154_);
v___x_1156_ = lean_obj_once(&l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__5, &l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__5_once, _init_l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__5);
v___x_1157_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_1157_, 0, v___x_1155_);
lean_ctor_set(v___x_1157_, 1, v___x_1156_);
v___x_1158_ = l_Lean_indentExpr(v_classExpr_950_);
v___x_1159_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_1159_, 0, v___x_1157_);
lean_ctor_set(v___x_1159_, 1, v___x_1158_);
v___x_1160_ = l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg(v___x_1136_, v___x_1159_, v___y_1143_, v___y_1139_, v___y_1140_, v___y_1141_);
if (lean_obj_tag(v___x_1160_) == 0)
{
lean_dec_ref(v___x_1160_);
v___y_1093_ = v_snd_1144_;
v___y_1094_ = v___y_1142_;
v___y_1095_ = v___y_1138_;
v___y_1096_ = v___y_1143_;
v___y_1097_ = v___y_1139_;
v___y_1098_ = v___y_1140_;
v___y_1099_ = v___y_1141_;
goto v___jp_1092_;
}
else
{
lean_object* v_a_1161_; lean_object* v___x_1163_; uint8_t v_isShared_1164_; uint8_t v_isSharedCheck_1168_; 
lean_dec(v_snd_1144_);
lean_dec_ref(v___y_1143_);
lean_dec_ref(v___y_1142_);
lean_dec(v___y_1141_);
lean_dec_ref(v___y_1140_);
lean_dec(v___y_1139_);
lean_dec(v___y_1138_);
lean_dec(v_a_1050_);
lean_dec_ref(v___x_1036_);
lean_dec_ref(v___x_1023_);
lean_dec(v_val_1007_);
lean_dec_ref(v_instVal_949_);
lean_dec_ref(v_cls_948_);
lean_dec(v_declName_947_);
lean_dec(v_className_946_);
lean_dec_ref(v_a_945_);
lean_dec_ref(v___x_944_);
lean_dec_ref(v_declVal_943_);
lean_dec_ref(v_xs_942_);
v_a_1161_ = lean_ctor_get(v___x_1160_, 0);
v_isSharedCheck_1168_ = !lean_is_exclusive(v___x_1160_);
if (v_isSharedCheck_1168_ == 0)
{
v___x_1163_ = v___x_1160_;
v_isShared_1164_ = v_isSharedCheck_1168_;
goto v_resetjp_1162_;
}
else
{
lean_inc(v_a_1161_);
lean_dec(v___x_1160_);
v___x_1163_ = lean_box(0);
v_isShared_1164_ = v_isSharedCheck_1168_;
goto v_resetjp_1162_;
}
v_resetjp_1162_:
{
lean_object* v___x_1166_; 
if (v_isShared_1164_ == 0)
{
v___x_1166_ = v___x_1163_;
goto v_reusejp_1165_;
}
else
{
lean_object* v_reuseFailAlloc_1167_; 
v_reuseFailAlloc_1167_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1167_, 0, v_a_1161_);
v___x_1166_ = v_reuseFailAlloc_1167_;
goto v_reusejp_1165_;
}
v_reusejp_1165_:
{
return v___x_1166_;
}
}
}
}
}
else
{
lean_object* v_a_1169_; lean_object* v___x_1171_; uint8_t v_isShared_1172_; uint8_t v_isSharedCheck_1176_; 
lean_dec(v_snd_1144_);
lean_dec_ref(v___y_1143_);
lean_dec_ref(v___y_1142_);
lean_dec(v___y_1141_);
lean_dec_ref(v___y_1140_);
lean_dec(v___y_1139_);
lean_dec(v___y_1138_);
lean_dec(v_a_1050_);
lean_dec_ref(v___x_1036_);
lean_dec_ref(v___x_1023_);
lean_dec(v_val_1007_);
lean_dec_ref(v_classExpr_950_);
lean_dec_ref(v_instVal_949_);
lean_dec_ref(v_cls_948_);
lean_dec(v_declName_947_);
lean_dec(v_className_946_);
lean_dec_ref(v_a_945_);
lean_dec_ref(v___x_944_);
lean_dec_ref(v_declVal_943_);
lean_dec_ref(v_xs_942_);
v_a_1169_ = lean_ctor_get(v___x_1148_, 0);
v_isSharedCheck_1176_ = !lean_is_exclusive(v___x_1148_);
if (v_isSharedCheck_1176_ == 0)
{
v___x_1171_ = v___x_1148_;
v_isShared_1172_ = v_isSharedCheck_1176_;
goto v_resetjp_1170_;
}
else
{
lean_inc(v_a_1169_);
lean_dec(v___x_1148_);
v___x_1171_ = lean_box(0);
v_isShared_1172_ = v_isSharedCheck_1176_;
goto v_resetjp_1170_;
}
v_resetjp_1170_:
{
lean_object* v___x_1174_; 
if (v_isShared_1172_ == 0)
{
v___x_1174_ = v___x_1171_;
goto v_reusejp_1173_;
}
else
{
lean_object* v_reuseFailAlloc_1175_; 
v_reuseFailAlloc_1175_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1175_, 0, v_a_1169_);
v___x_1174_ = v_reuseFailAlloc_1175_;
goto v_reusejp_1173_;
}
v_reusejp_1173_:
{
return v___x_1174_;
}
}
}
}
else
{
lean_object* v___x_1177_; 
v___x_1177_ = l_Lean_isTracingEnabledFor___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__2___redArg(v___x_1136_, v___y_1140_);
if (lean_obj_tag(v___x_1177_) == 0)
{
lean_object* v_a_1178_; uint8_t v___x_1179_; 
v_a_1178_ = lean_ctor_get(v___x_1177_, 0);
lean_inc(v_a_1178_);
lean_dec_ref(v___x_1177_);
v___x_1179_ = lean_unbox(v_a_1178_);
lean_dec(v_a_1178_);
if (v___x_1179_ == 0)
{
lean_dec(v_val_1007_);
v___y_1055_ = v_snd_1144_;
v___y_1056_ = v___y_1142_;
v___y_1057_ = v___y_1138_;
v___y_1058_ = v___y_1143_;
v___y_1059_ = v___y_1139_;
v___y_1060_ = v___y_1140_;
v___y_1061_ = v___y_1141_;
goto v___jp_1054_;
}
else
{
lean_object* v___x_1180_; lean_object* v___x_1181_; lean_object* v___x_1182_; lean_object* v___x_1183_; lean_object* v___x_1184_; lean_object* v___x_1185_; lean_object* v___x_1186_; lean_object* v___x_1187_; 
v___x_1180_ = lean_obj_once(&l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__7, &l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__7_once, _init_l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__7);
v___x_1181_ = l_Nat_reprFast(v_val_1007_);
v___x_1182_ = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(v___x_1182_, 0, v___x_1181_);
v___x_1183_ = l_Lean_MessageData_ofFormat(v___x_1182_);
v___x_1184_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_1184_, 0, v___x_1180_);
lean_ctor_set(v___x_1184_, 1, v___x_1183_);
v___x_1185_ = lean_obj_once(&l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__9, &l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__9_once, _init_l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__9);
v___x_1186_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_1186_, 0, v___x_1184_);
lean_ctor_set(v___x_1186_, 1, v___x_1185_);
v___x_1187_ = l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg(v___x_1136_, v___x_1186_, v___y_1143_, v___y_1139_, v___y_1140_, v___y_1141_);
if (lean_obj_tag(v___x_1187_) == 0)
{
lean_dec_ref(v___x_1187_);
v___y_1055_ = v_snd_1144_;
v___y_1056_ = v___y_1142_;
v___y_1057_ = v___y_1138_;
v___y_1058_ = v___y_1143_;
v___y_1059_ = v___y_1139_;
v___y_1060_ = v___y_1140_;
v___y_1061_ = v___y_1141_;
goto v___jp_1054_;
}
else
{
lean_object* v_a_1188_; lean_object* v___x_1190_; uint8_t v_isShared_1191_; uint8_t v_isSharedCheck_1195_; 
lean_dec(v_snd_1144_);
lean_dec_ref(v___y_1143_);
lean_dec_ref(v___y_1142_);
lean_dec(v___y_1141_);
lean_dec_ref(v___y_1140_);
lean_dec(v___y_1139_);
lean_dec(v___y_1138_);
lean_dec(v_a_1050_);
lean_dec_ref(v___x_1036_);
lean_dec_ref(v___x_1023_);
lean_dec(v___y_962_);
lean_dec_ref(v___y_961_);
lean_dec(v___y_960_);
lean_dec_ref(v___y_959_);
lean_dec(v___y_958_);
lean_dec_ref(v___y_957_);
lean_dec_ref(v_a_952_);
lean_dec_ref(v_classExpr_950_);
lean_dec_ref(v_instVal_949_);
lean_dec_ref(v_cls_948_);
lean_dec(v_declName_947_);
lean_dec(v_className_946_);
lean_dec_ref(v_a_945_);
lean_dec_ref(v___x_944_);
lean_dec_ref(v_declVal_943_);
lean_dec_ref(v_xs_942_);
lean_dec_ref(v_a_941_);
v_a_1188_ = lean_ctor_get(v___x_1187_, 0);
v_isSharedCheck_1195_ = !lean_is_exclusive(v___x_1187_);
if (v_isSharedCheck_1195_ == 0)
{
v___x_1190_ = v___x_1187_;
v_isShared_1191_ = v_isSharedCheck_1195_;
goto v_resetjp_1189_;
}
else
{
lean_inc(v_a_1188_);
lean_dec(v___x_1187_);
v___x_1190_ = lean_box(0);
v_isShared_1191_ = v_isSharedCheck_1195_;
goto v_resetjp_1189_;
}
v_resetjp_1189_:
{
lean_object* v___x_1193_; 
if (v_isShared_1191_ == 0)
{
v___x_1193_ = v___x_1190_;
goto v_reusejp_1192_;
}
else
{
lean_object* v_reuseFailAlloc_1194_; 
v_reuseFailAlloc_1194_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1194_, 0, v_a_1188_);
v___x_1193_ = v_reuseFailAlloc_1194_;
goto v_reusejp_1192_;
}
v_reusejp_1192_:
{
return v___x_1193_;
}
}
}
}
}
else
{
lean_object* v_a_1196_; lean_object* v___x_1198_; uint8_t v_isShared_1199_; uint8_t v_isSharedCheck_1203_; 
lean_dec(v_snd_1144_);
lean_dec_ref(v___y_1143_);
lean_dec_ref(v___y_1142_);
lean_dec(v___y_1141_);
lean_dec_ref(v___y_1140_);
lean_dec(v___y_1139_);
lean_dec(v___y_1138_);
lean_dec(v_a_1050_);
lean_dec_ref(v___x_1036_);
lean_dec_ref(v___x_1023_);
lean_dec(v_val_1007_);
lean_dec(v___y_962_);
lean_dec_ref(v___y_961_);
lean_dec(v___y_960_);
lean_dec_ref(v___y_959_);
lean_dec(v___y_958_);
lean_dec_ref(v___y_957_);
lean_dec_ref(v_a_952_);
lean_dec_ref(v_classExpr_950_);
lean_dec_ref(v_instVal_949_);
lean_dec_ref(v_cls_948_);
lean_dec(v_declName_947_);
lean_dec(v_className_946_);
lean_dec_ref(v_a_945_);
lean_dec_ref(v___x_944_);
lean_dec_ref(v_declVal_943_);
lean_dec_ref(v_xs_942_);
lean_dec_ref(v_a_941_);
v_a_1196_ = lean_ctor_get(v___x_1177_, 0);
v_isSharedCheck_1203_ = !lean_is_exclusive(v___x_1177_);
if (v_isSharedCheck_1203_ == 0)
{
v___x_1198_ = v___x_1177_;
v_isShared_1199_ = v_isSharedCheck_1203_;
goto v_resetjp_1197_;
}
else
{
lean_inc(v_a_1196_);
lean_dec(v___x_1177_);
v___x_1198_ = lean_box(0);
v_isShared_1199_ = v_isSharedCheck_1203_;
goto v_resetjp_1197_;
}
v_resetjp_1197_:
{
lean_object* v___x_1201_; 
if (v_isShared_1199_ == 0)
{
v___x_1201_ = v___x_1198_;
goto v_reusejp_1200_;
}
else
{
lean_object* v_reuseFailAlloc_1202_; 
v_reuseFailAlloc_1202_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1202_, 0, v_a_1196_);
v___x_1201_ = v_reuseFailAlloc_1202_;
goto v_reusejp_1200_;
}
v_reusejp_1200_:
{
return v___x_1201_;
}
}
}
}
}
v___jp_1204_:
{
if (lean_obj_tag(v___y_1211_) == 0)
{
lean_object* v_a_1212_; lean_object* v_fst_1213_; 
v_a_1212_ = lean_ctor_get(v___y_1211_, 0);
lean_inc(v_a_1212_);
lean_dec_ref(v___y_1211_);
v_fst_1213_ = lean_ctor_get(v_a_1212_, 0);
if (lean_obj_tag(v_fst_1213_) == 0)
{
lean_object* v_snd_1214_; lean_object* v___x_1216_; uint8_t v_isShared_1217_; uint8_t v_isSharedCheck_1224_; 
lean_dec_ref(v___y_1210_);
lean_dec_ref(v___y_1209_);
lean_dec(v___y_1208_);
lean_dec_ref(v___y_1207_);
lean_dec(v___y_1206_);
lean_dec(v___y_1205_);
lean_dec(v_val_1007_);
v_snd_1214_ = lean_ctor_get(v_a_1212_, 1);
v_isSharedCheck_1224_ = !lean_is_exclusive(v_a_1212_);
if (v_isSharedCheck_1224_ == 0)
{
lean_object* v_unused_1225_; 
v_unused_1225_ = lean_ctor_get(v_a_1212_, 0);
lean_dec(v_unused_1225_);
v___x_1216_ = v_a_1212_;
v_isShared_1217_ = v_isSharedCheck_1224_;
goto v_resetjp_1215_;
}
else
{
lean_inc(v_snd_1214_);
lean_dec(v_a_1212_);
v___x_1216_ = lean_box(0);
v_isShared_1217_ = v_isSharedCheck_1224_;
goto v_resetjp_1215_;
}
v_resetjp_1215_:
{
lean_object* v___x_1219_; 
if (v_isShared_1217_ == 0)
{
lean_ctor_set(v___x_1216_, 1, v___x_1023_);
lean_ctor_set(v___x_1216_, 0, v___x_1036_);
v___x_1219_ = v___x_1216_;
goto v_reusejp_1218_;
}
else
{
lean_object* v_reuseFailAlloc_1223_; 
v_reuseFailAlloc_1223_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v_reuseFailAlloc_1223_, 0, v___x_1036_);
lean_ctor_set(v_reuseFailAlloc_1223_, 1, v___x_1023_);
v___x_1219_ = v_reuseFailAlloc_1223_;
goto v_reusejp_1218_;
}
v_reusejp_1218_:
{
lean_object* v___x_1220_; lean_object* v___x_1221_; lean_object* v___x_1222_; 
v___x_1220_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_1220_, 0, v_snd_1214_);
lean_ctor_set(v___x_1220_, 1, v___x_1219_);
v___x_1221_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_1221_, 0, v_a_1050_);
lean_ctor_set(v___x_1221_, 1, v___x_1220_);
v___x_1222_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_1222_, 0, v___x_992_);
lean_ctor_set(v___x_1222_, 1, v___x_1221_);
v_a_965_ = v___x_1222_;
goto v___jp_964_;
}
}
}
else
{
lean_object* v_snd_1226_; 
v_snd_1226_ = lean_ctor_get(v_a_1212_, 1);
lean_inc(v_snd_1226_);
lean_dec(v_a_1212_);
v___y_1138_ = v___y_1205_;
v___y_1139_ = v___y_1206_;
v___y_1140_ = v___y_1207_;
v___y_1141_ = v___y_1208_;
v___y_1142_ = v___y_1209_;
v___y_1143_ = v___y_1210_;
v_snd_1144_ = v_snd_1226_;
goto v___jp_1137_;
}
}
else
{
lean_object* v_a_1227_; lean_object* v___x_1229_; uint8_t v_isShared_1230_; uint8_t v_isSharedCheck_1234_; 
lean_dec_ref(v___y_1210_);
lean_dec_ref(v___y_1209_);
lean_dec(v___y_1208_);
lean_dec_ref(v___y_1207_);
lean_dec(v___y_1206_);
lean_dec(v___y_1205_);
lean_dec(v_a_1050_);
lean_dec_ref(v___x_1036_);
lean_dec_ref(v___x_1023_);
lean_dec(v_val_1007_);
lean_dec(v___y_962_);
lean_dec_ref(v___y_961_);
lean_dec(v___y_960_);
lean_dec_ref(v___y_959_);
lean_dec(v___y_958_);
lean_dec_ref(v___y_957_);
lean_dec_ref(v_a_952_);
lean_dec_ref(v_classExpr_950_);
lean_dec_ref(v_instVal_949_);
lean_dec_ref(v_cls_948_);
lean_dec(v_declName_947_);
lean_dec(v_className_946_);
lean_dec_ref(v_a_945_);
lean_dec_ref(v___x_944_);
lean_dec_ref(v_declVal_943_);
lean_dec_ref(v_xs_942_);
lean_dec_ref(v_a_941_);
v_a_1227_ = lean_ctor_get(v___y_1211_, 0);
v_isSharedCheck_1234_ = !lean_is_exclusive(v___y_1211_);
if (v_isSharedCheck_1234_ == 0)
{
v___x_1229_ = v___y_1211_;
v_isShared_1230_ = v_isSharedCheck_1234_;
goto v_resetjp_1228_;
}
else
{
lean_inc(v_a_1227_);
lean_dec(v___y_1211_);
v___x_1229_ = lean_box(0);
v_isShared_1230_ = v_isSharedCheck_1234_;
goto v_resetjp_1228_;
}
v_resetjp_1228_:
{
lean_object* v___x_1232_; 
if (v_isShared_1230_ == 0)
{
v___x_1232_ = v___x_1229_;
goto v_reusejp_1231_;
}
else
{
lean_object* v_reuseFailAlloc_1233_; 
v_reuseFailAlloc_1233_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1233_, 0, v_a_1227_);
v___x_1232_ = v_reuseFailAlloc_1233_;
goto v_reusejp_1231_;
}
v_reusejp_1231_:
{
return v___x_1232_;
}
}
}
}
v___jp_1235_:
{
if (v___y_1243_ == 0)
{
lean_object* v___x_1244_; 
lean_del_object(v___x_1052_);
v___x_1244_ = l_Lean_isTracingEnabledFor___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__2___redArg(v___x_1136_, v___y_1238_);
if (lean_obj_tag(v___x_1244_) == 0)
{
lean_object* v_a_1245_; uint8_t v___x_1246_; 
v_a_1245_ = lean_ctor_get(v___x_1244_, 0);
lean_inc(v_a_1245_);
lean_dec_ref(v___x_1244_);
v___x_1246_ = lean_unbox(v_a_1245_);
lean_dec(v_a_1245_);
if (v___x_1246_ == 0)
{
lean_object* v___x_1247_; lean_object* v___x_1248_; 
v___x_1247_ = lean_box(0);
lean_inc_ref(v___y_1238_);
lean_inc_ref(v_a_941_);
v___x_1248_ = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___lam__0(v___y_1237_, v_a_941_, v___y_1243_, v_fst_982_, v___x_1247_, v___y_1240_, v___y_1241_, v___y_1239_, v___y_1242_, v___y_1238_, v___y_1236_);
v___y_1205_ = v___y_1241_;
v___y_1206_ = v___y_1242_;
v___y_1207_ = v___y_1238_;
v___y_1208_ = v___y_1236_;
v___y_1209_ = v___y_1240_;
v___y_1210_ = v___y_1239_;
v___y_1211_ = v___x_1248_;
goto v___jp_1204_;
}
else
{
lean_object* v___x_1249_; lean_object* v___x_1250_; lean_object* v___x_1251_; lean_object* v___x_1252_; lean_object* v___x_1253_; lean_object* v___x_1254_; lean_object* v___x_1255_; lean_object* v___x_1256_; 
v___x_1249_ = lean_obj_once(&l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__7, &l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__7_once, _init_l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__7);
lean_inc(v_val_1007_);
v___x_1250_ = l_Nat_reprFast(v_val_1007_);
v___x_1251_ = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(v___x_1251_, 0, v___x_1250_);
v___x_1252_ = l_Lean_MessageData_ofFormat(v___x_1251_);
v___x_1253_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_1253_, 0, v___x_1249_);
lean_ctor_set(v___x_1253_, 1, v___x_1252_);
v___x_1254_ = lean_obj_once(&l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__11, &l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__11_once, _init_l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__11);
v___x_1255_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_1255_, 0, v___x_1253_);
lean_ctor_set(v___x_1255_, 1, v___x_1254_);
v___x_1256_ = l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg(v___x_1136_, v___x_1255_, v___y_1239_, v___y_1242_, v___y_1238_, v___y_1236_);
if (lean_obj_tag(v___x_1256_) == 0)
{
lean_object* v_a_1257_; lean_object* v___x_1258_; 
v_a_1257_ = lean_ctor_get(v___x_1256_, 0);
lean_inc(v_a_1257_);
lean_dec_ref(v___x_1256_);
lean_inc_ref(v___y_1238_);
lean_inc_ref(v_a_941_);
v___x_1258_ = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___lam__0(v___y_1237_, v_a_941_, v___y_1243_, v_fst_982_, v_a_1257_, v___y_1240_, v___y_1241_, v___y_1239_, v___y_1242_, v___y_1238_, v___y_1236_);
v___y_1205_ = v___y_1241_;
v___y_1206_ = v___y_1242_;
v___y_1207_ = v___y_1238_;
v___y_1208_ = v___y_1236_;
v___y_1209_ = v___y_1240_;
v___y_1210_ = v___y_1239_;
v___y_1211_ = v___x_1258_;
goto v___jp_1204_;
}
else
{
lean_object* v_a_1259_; lean_object* v___x_1261_; uint8_t v_isShared_1262_; uint8_t v_isSharedCheck_1266_; 
lean_dec(v___y_1242_);
lean_dec(v___y_1241_);
lean_dec_ref(v___y_1240_);
lean_dec_ref(v___y_1239_);
lean_dec_ref(v___y_1238_);
lean_dec_ref(v___y_1237_);
lean_dec(v___y_1236_);
lean_dec(v_a_1050_);
lean_dec_ref(v___x_1036_);
lean_dec_ref(v___x_1023_);
lean_dec(v_val_1007_);
lean_dec(v_fst_982_);
lean_dec(v___y_962_);
lean_dec_ref(v___y_961_);
lean_dec(v___y_960_);
lean_dec_ref(v___y_959_);
lean_dec(v___y_958_);
lean_dec_ref(v___y_957_);
lean_dec_ref(v_a_952_);
lean_dec_ref(v_classExpr_950_);
lean_dec_ref(v_instVal_949_);
lean_dec_ref(v_cls_948_);
lean_dec(v_declName_947_);
lean_dec(v_className_946_);
lean_dec_ref(v_a_945_);
lean_dec_ref(v___x_944_);
lean_dec_ref(v_declVal_943_);
lean_dec_ref(v_xs_942_);
lean_dec_ref(v_a_941_);
v_a_1259_ = lean_ctor_get(v___x_1256_, 0);
v_isSharedCheck_1266_ = !lean_is_exclusive(v___x_1256_);
if (v_isSharedCheck_1266_ == 0)
{
v___x_1261_ = v___x_1256_;
v_isShared_1262_ = v_isSharedCheck_1266_;
goto v_resetjp_1260_;
}
else
{
lean_inc(v_a_1259_);
lean_dec(v___x_1256_);
v___x_1261_ = lean_box(0);
v_isShared_1262_ = v_isSharedCheck_1266_;
goto v_resetjp_1260_;
}
v_resetjp_1260_:
{
lean_object* v___x_1264_; 
if (v_isShared_1262_ == 0)
{
v___x_1264_ = v___x_1261_;
goto v_reusejp_1263_;
}
else
{
lean_object* v_reuseFailAlloc_1265_; 
v_reuseFailAlloc_1265_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1265_, 0, v_a_1259_);
v___x_1264_ = v_reuseFailAlloc_1265_;
goto v_reusejp_1263_;
}
v_reusejp_1263_:
{
return v___x_1264_;
}
}
}
}
}
else
{
lean_object* v_a_1267_; lean_object* v___x_1269_; uint8_t v_isShared_1270_; uint8_t v_isSharedCheck_1274_; 
lean_dec(v___y_1242_);
lean_dec(v___y_1241_);
lean_dec_ref(v___y_1240_);
lean_dec_ref(v___y_1239_);
lean_dec_ref(v___y_1238_);
lean_dec_ref(v___y_1237_);
lean_dec(v___y_1236_);
lean_dec(v_a_1050_);
lean_dec_ref(v___x_1036_);
lean_dec_ref(v___x_1023_);
lean_dec(v_val_1007_);
lean_dec(v_fst_982_);
lean_dec(v___y_962_);
lean_dec_ref(v___y_961_);
lean_dec(v___y_960_);
lean_dec_ref(v___y_959_);
lean_dec(v___y_958_);
lean_dec_ref(v___y_957_);
lean_dec_ref(v_a_952_);
lean_dec_ref(v_classExpr_950_);
lean_dec_ref(v_instVal_949_);
lean_dec_ref(v_cls_948_);
lean_dec(v_declName_947_);
lean_dec(v_className_946_);
lean_dec_ref(v_a_945_);
lean_dec_ref(v___x_944_);
lean_dec_ref(v_declVal_943_);
lean_dec_ref(v_xs_942_);
lean_dec_ref(v_a_941_);
v_a_1267_ = lean_ctor_get(v___x_1244_, 0);
v_isSharedCheck_1274_ = !lean_is_exclusive(v___x_1244_);
if (v_isSharedCheck_1274_ == 0)
{
v___x_1269_ = v___x_1244_;
v_isShared_1270_ = v_isSharedCheck_1274_;
goto v_resetjp_1268_;
}
else
{
lean_inc(v_a_1267_);
lean_dec(v___x_1244_);
v___x_1269_ = lean_box(0);
v_isShared_1270_ = v_isSharedCheck_1274_;
goto v_resetjp_1268_;
}
v_resetjp_1268_:
{
lean_object* v___x_1272_; 
if (v_isShared_1270_ == 0)
{
v___x_1272_ = v___x_1269_;
goto v_reusejp_1271_;
}
else
{
lean_object* v_reuseFailAlloc_1273_; 
v_reuseFailAlloc_1273_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1273_, 0, v_a_1267_);
v___x_1272_ = v_reuseFailAlloc_1273_;
goto v_reusejp_1271_;
}
v_reusejp_1271_:
{
return v___x_1272_;
}
}
}
}
else
{
lean_object* v___x_1276_; 
lean_dec(v___y_1242_);
lean_dec(v___y_1241_);
lean_dec_ref(v___y_1240_);
lean_dec_ref(v___y_1239_);
lean_dec_ref(v___y_1238_);
lean_dec(v___y_1236_);
lean_dec(v_a_1050_);
lean_dec_ref(v___x_1036_);
lean_dec_ref(v___x_1023_);
lean_dec(v_val_1007_);
lean_dec(v_fst_982_);
lean_dec(v___y_962_);
lean_dec_ref(v___y_961_);
lean_dec(v___y_960_);
lean_dec_ref(v___y_959_);
lean_dec(v___y_958_);
lean_dec_ref(v___y_957_);
lean_dec_ref(v_a_952_);
lean_dec_ref(v_classExpr_950_);
lean_dec_ref(v_instVal_949_);
lean_dec_ref(v_cls_948_);
lean_dec(v_declName_947_);
lean_dec(v_className_946_);
lean_dec_ref(v_a_945_);
lean_dec_ref(v___x_944_);
lean_dec_ref(v_declVal_943_);
lean_dec_ref(v_xs_942_);
lean_dec_ref(v_a_941_);
if (v_isShared_1053_ == 0)
{
lean_ctor_set_tag(v___x_1052_, 1);
lean_ctor_set(v___x_1052_, 0, v___y_1237_);
v___x_1276_ = v___x_1052_;
goto v_reusejp_1275_;
}
else
{
lean_object* v_reuseFailAlloc_1277_; 
v_reuseFailAlloc_1277_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1277_, 0, v___y_1237_);
v___x_1276_ = v_reuseFailAlloc_1277_;
goto v_reusejp_1275_;
}
v_reusejp_1275_:
{
return v___x_1276_;
}
}
}
v___jp_1278_:
{
uint8_t v___x_1286_; 
v___x_1286_ = l_Lean_Exception_isInterrupt(v_a_1285_);
if (v___x_1286_ == 0)
{
uint8_t v___x_1287_; 
lean_inc_ref(v_a_1285_);
v___x_1287_ = l_Lean_Exception_isRuntime(v_a_1285_);
v___y_1236_ = v___y_1282_;
v___y_1237_ = v_a_1285_;
v___y_1238_ = v___y_1281_;
v___y_1239_ = v___y_1284_;
v___y_1240_ = v___y_1283_;
v___y_1241_ = v___y_1279_;
v___y_1242_ = v___y_1280_;
v___y_1243_ = v___x_1287_;
goto v___jp_1235_;
}
else
{
v___y_1236_ = v___y_1282_;
v___y_1237_ = v_a_1285_;
v___y_1238_ = v___y_1281_;
v___y_1239_ = v___y_1284_;
v___y_1240_ = v___y_1283_;
v___y_1241_ = v___y_1279_;
v___y_1242_ = v___y_1280_;
v___y_1243_ = v___x_1286_;
goto v___jp_1235_;
}
}
v___jp_1288_:
{
lean_object* v___x_1295_; 
lean_inc(v___y_1294_);
lean_inc_ref(v___y_1293_);
lean_inc(v___y_1292_);
lean_inc_ref(v___y_1291_);
lean_inc_ref(v___y_1289_);
lean_inc_ref(v_classExpr_950_);
v___x_1295_ = l_Lean_Elab_Term_synthesizeAppInstMVars(v_instMVars_951_, v_classExpr_950_, v___y_1289_, v___y_1290_, v___y_1291_, v___y_1292_, v___y_1293_, v___y_1294_);
if (lean_obj_tag(v___x_1295_) == 0)
{
lean_object* v___x_1296_; 
lean_dec_ref(v___x_1295_);
lean_inc(v___y_1294_);
lean_inc_ref(v___y_1293_);
lean_inc(v___y_1292_);
lean_inc_ref(v___y_1291_);
lean_inc(v___y_1290_);
lean_inc_ref(v___y_1289_);
v___x_1296_ = l_Lean_Elab_Term_synthesizeSyntheticMVarsNoPostponing(v___x_1048_, v___y_1289_, v___y_1290_, v___y_1291_, v___y_1292_, v___y_1293_, v___y_1294_);
if (lean_obj_tag(v___x_1296_) == 0)
{
lean_dec_ref(v___x_1296_);
lean_del_object(v___x_1052_);
v___y_1138_ = v___y_1290_;
v___y_1139_ = v___y_1292_;
v___y_1140_ = v___y_1293_;
v___y_1141_ = v___y_1294_;
v___y_1142_ = v___y_1289_;
v___y_1143_ = v___y_1291_;
v_snd_1144_ = v_fst_982_;
goto v___jp_1137_;
}
else
{
lean_object* v_a_1297_; 
v_a_1297_ = lean_ctor_get(v___x_1296_, 0);
lean_inc(v_a_1297_);
lean_dec_ref(v___x_1296_);
v___y_1279_ = v___y_1290_;
v___y_1280_ = v___y_1292_;
v___y_1281_ = v___y_1293_;
v___y_1282_ = v___y_1294_;
v___y_1283_ = v___y_1289_;
v___y_1284_ = v___y_1291_;
v_a_1285_ = v_a_1297_;
goto v___jp_1278_;
}
}
else
{
lean_object* v_a_1298_; 
v_a_1298_ = lean_ctor_get(v___x_1295_, 0);
lean_inc(v_a_1298_);
lean_dec_ref(v___x_1295_);
v___y_1279_ = v___y_1290_;
v___y_1280_ = v___y_1292_;
v___y_1281_ = v___y_1293_;
v___y_1282_ = v___y_1294_;
v___y_1283_ = v___y_1289_;
v___y_1284_ = v___y_1291_;
v_a_1285_ = v_a_1298_;
goto v___jp_1278_;
}
}
v___jp_1299_:
{
if (lean_obj_tag(v___y_1300_) == 0)
{
lean_object* v_a_1301_; uint8_t v___x_1302_; 
v_a_1301_ = lean_ctor_get(v___y_1300_, 0);
lean_inc(v_a_1301_);
lean_dec_ref(v___y_1300_);
v___x_1302_ = lean_unbox(v_a_1301_);
if (v___x_1302_ == 0)
{
uint8_t v___x_1303_; lean_object* v___x_1304_; 
lean_del_object(v___x_1052_);
lean_dec(v_a_1050_);
lean_dec(v_val_1007_);
v___x_1303_ = lean_unbox(v_a_1301_);
lean_dec(v_a_1301_);
lean_inc_ref(v_a_941_);
v___x_1304_ = l_Lean_Elab_Term_SavedState_restore(v_a_941_, v___x_1303_, v___y_957_, v___y_958_, v___y_959_, v___y_960_, v___y_961_, v___y_962_);
if (lean_obj_tag(v___x_1304_) == 0)
{
lean_object* v___x_1305_; lean_object* v___x_1306_; lean_object* v___x_1307_; lean_object* v___x_1308_; 
lean_dec_ref(v___x_1304_);
v___x_1305_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_1305_, 0, v___x_1036_);
lean_ctor_set(v___x_1305_, 1, v___x_1023_);
v___x_1306_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_1306_, 0, v_fst_982_);
lean_ctor_set(v___x_1306_, 1, v___x_1305_);
v___x_1307_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_1307_, 0, v_fst_978_);
lean_ctor_set(v___x_1307_, 1, v___x_1306_);
v___x_1308_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_1308_, 0, v___x_992_);
lean_ctor_set(v___x_1308_, 1, v___x_1307_);
v_a_965_ = v___x_1308_;
goto v___jp_964_;
}
else
{
lean_object* v_a_1309_; lean_object* v___x_1311_; uint8_t v_isShared_1312_; uint8_t v_isSharedCheck_1316_; 
lean_dec_ref(v___x_1036_);
lean_dec_ref(v___x_1023_);
lean_dec(v_fst_982_);
lean_dec(v_fst_978_);
lean_dec(v___y_962_);
lean_dec_ref(v___y_961_);
lean_dec(v___y_960_);
lean_dec_ref(v___y_959_);
lean_dec(v___y_958_);
lean_dec_ref(v___y_957_);
lean_dec_ref(v_a_952_);
lean_dec_ref(v_classExpr_950_);
lean_dec_ref(v_instVal_949_);
lean_dec_ref(v_cls_948_);
lean_dec(v_declName_947_);
lean_dec(v_className_946_);
lean_dec_ref(v_a_945_);
lean_dec_ref(v___x_944_);
lean_dec_ref(v_declVal_943_);
lean_dec_ref(v_xs_942_);
lean_dec_ref(v_a_941_);
v_a_1309_ = lean_ctor_get(v___x_1304_, 0);
v_isSharedCheck_1316_ = !lean_is_exclusive(v___x_1304_);
if (v_isSharedCheck_1316_ == 0)
{
v___x_1311_ = v___x_1304_;
v_isShared_1312_ = v_isSharedCheck_1316_;
goto v_resetjp_1310_;
}
else
{
lean_inc(v_a_1309_);
lean_dec(v___x_1304_);
v___x_1311_ = lean_box(0);
v_isShared_1312_ = v_isSharedCheck_1316_;
goto v_resetjp_1310_;
}
v_resetjp_1310_:
{
lean_object* v___x_1314_; 
if (v_isShared_1312_ == 0)
{
v___x_1314_ = v___x_1311_;
goto v_reusejp_1313_;
}
else
{
lean_object* v_reuseFailAlloc_1315_; 
v_reuseFailAlloc_1315_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1315_, 0, v_a_1309_);
v___x_1314_ = v_reuseFailAlloc_1315_;
goto v_reusejp_1313_;
}
v_reusejp_1313_:
{
return v___x_1314_;
}
}
}
}
else
{
lean_object* v___x_1317_; 
lean_dec(v_a_1301_);
lean_dec(v_fst_978_);
v___x_1317_ = l_Lean_isTracingEnabledFor___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__2___redArg(v___x_1136_, v___y_961_);
if (lean_obj_tag(v___x_1317_) == 0)
{
lean_object* v_a_1318_; uint8_t v___x_1319_; 
v_a_1318_ = lean_ctor_get(v___x_1317_, 0);
lean_inc(v_a_1318_);
lean_dec_ref(v___x_1317_);
v___x_1319_ = lean_unbox(v_a_1318_);
lean_dec(v_a_1318_);
if (v___x_1319_ == 0)
{
lean_inc(v___y_962_);
lean_inc_ref(v___y_961_);
lean_inc(v___y_960_);
lean_inc_ref(v___y_959_);
lean_inc(v___y_958_);
lean_inc_ref(v___y_957_);
v___y_1289_ = v___y_957_;
v___y_1290_ = v___y_958_;
v___y_1291_ = v___y_959_;
v___y_1292_ = v___y_960_;
v___y_1293_ = v___y_961_;
v___y_1294_ = v___y_962_;
goto v___jp_1288_;
}
else
{
lean_object* v___x_1320_; lean_object* v___x_1321_; lean_object* v___x_1322_; lean_object* v___x_1323_; lean_object* v___x_1324_; lean_object* v___x_1325_; lean_object* v___x_1326_; lean_object* v___x_1327_; lean_object* v___x_1328_; lean_object* v___x_1329_; 
v___x_1320_ = lean_obj_once(&l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__3, &l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__3_once, _init_l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__3);
lean_inc(v_val_1007_);
v___x_1321_ = l_Nat_reprFast(v_val_1007_);
v___x_1322_ = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(v___x_1322_, 0, v___x_1321_);
v___x_1323_ = l_Lean_MessageData_ofFormat(v___x_1322_);
v___x_1324_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_1324_, 0, v___x_1320_);
lean_ctor_set(v___x_1324_, 1, v___x_1323_);
v___x_1325_ = lean_obj_once(&l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__13, &l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__13_once, _init_l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__13);
v___x_1326_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_1326_, 0, v___x_1324_);
lean_ctor_set(v___x_1326_, 1, v___x_1325_);
lean_inc_ref(v_classExpr_950_);
v___x_1327_ = l_Lean_indentExpr(v_classExpr_950_);
v___x_1328_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_1328_, 0, v___x_1326_);
lean_ctor_set(v___x_1328_, 1, v___x_1327_);
v___x_1329_ = l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg(v___x_1136_, v___x_1328_, v___y_959_, v___y_960_, v___y_961_, v___y_962_);
if (lean_obj_tag(v___x_1329_) == 0)
{
lean_dec_ref(v___x_1329_);
lean_inc(v___y_962_);
lean_inc_ref(v___y_961_);
lean_inc(v___y_960_);
lean_inc_ref(v___y_959_);
lean_inc(v___y_958_);
lean_inc_ref(v___y_957_);
v___y_1289_ = v___y_957_;
v___y_1290_ = v___y_958_;
v___y_1291_ = v___y_959_;
v___y_1292_ = v___y_960_;
v___y_1293_ = v___y_961_;
v___y_1294_ = v___y_962_;
goto v___jp_1288_;
}
else
{
lean_object* v_a_1330_; lean_object* v___x_1332_; uint8_t v_isShared_1333_; uint8_t v_isSharedCheck_1337_; 
lean_del_object(v___x_1052_);
lean_dec(v_a_1050_);
lean_dec_ref(v___x_1036_);
lean_dec_ref(v___x_1023_);
lean_dec(v_val_1007_);
lean_dec(v_fst_982_);
lean_dec(v___y_962_);
lean_dec_ref(v___y_961_);
lean_dec(v___y_960_);
lean_dec_ref(v___y_959_);
lean_dec(v___y_958_);
lean_dec_ref(v___y_957_);
lean_dec_ref(v_a_952_);
lean_dec_ref(v_classExpr_950_);
lean_dec_ref(v_instVal_949_);
lean_dec_ref(v_cls_948_);
lean_dec(v_declName_947_);
lean_dec(v_className_946_);
lean_dec_ref(v_a_945_);
lean_dec_ref(v___x_944_);
lean_dec_ref(v_declVal_943_);
lean_dec_ref(v_xs_942_);
lean_dec_ref(v_a_941_);
v_a_1330_ = lean_ctor_get(v___x_1329_, 0);
v_isSharedCheck_1337_ = !lean_is_exclusive(v___x_1329_);
if (v_isSharedCheck_1337_ == 0)
{
v___x_1332_ = v___x_1329_;
v_isShared_1333_ = v_isSharedCheck_1337_;
goto v_resetjp_1331_;
}
else
{
lean_inc(v_a_1330_);
lean_dec(v___x_1329_);
v___x_1332_ = lean_box(0);
v_isShared_1333_ = v_isSharedCheck_1337_;
goto v_resetjp_1331_;
}
v_resetjp_1331_:
{
lean_object* v___x_1335_; 
if (v_isShared_1333_ == 0)
{
v___x_1335_ = v___x_1332_;
goto v_reusejp_1334_;
}
else
{
lean_object* v_reuseFailAlloc_1336_; 
v_reuseFailAlloc_1336_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1336_, 0, v_a_1330_);
v___x_1335_ = v_reuseFailAlloc_1336_;
goto v_reusejp_1334_;
}
v_reusejp_1334_:
{
return v___x_1335_;
}
}
}
}
}
else
{
lean_object* v_a_1338_; lean_object* v___x_1340_; uint8_t v_isShared_1341_; uint8_t v_isSharedCheck_1345_; 
lean_del_object(v___x_1052_);
lean_dec(v_a_1050_);
lean_dec_ref(v___x_1036_);
lean_dec_ref(v___x_1023_);
lean_dec(v_val_1007_);
lean_dec(v_fst_982_);
lean_dec(v___y_962_);
lean_dec_ref(v___y_961_);
lean_dec(v___y_960_);
lean_dec_ref(v___y_959_);
lean_dec(v___y_958_);
lean_dec_ref(v___y_957_);
lean_dec_ref(v_a_952_);
lean_dec_ref(v_classExpr_950_);
lean_dec_ref(v_instVal_949_);
lean_dec_ref(v_cls_948_);
lean_dec(v_declName_947_);
lean_dec(v_className_946_);
lean_dec_ref(v_a_945_);
lean_dec_ref(v___x_944_);
lean_dec_ref(v_declVal_943_);
lean_dec_ref(v_xs_942_);
lean_dec_ref(v_a_941_);
v_a_1338_ = lean_ctor_get(v___x_1317_, 0);
v_isSharedCheck_1345_ = !lean_is_exclusive(v___x_1317_);
if (v_isSharedCheck_1345_ == 0)
{
v___x_1340_ = v___x_1317_;
v_isShared_1341_ = v_isSharedCheck_1345_;
goto v_resetjp_1339_;
}
else
{
lean_inc(v_a_1338_);
lean_dec(v___x_1317_);
v___x_1340_ = lean_box(0);
v_isShared_1341_ = v_isSharedCheck_1345_;
goto v_resetjp_1339_;
}
v_resetjp_1339_:
{
lean_object* v___x_1343_; 
if (v_isShared_1341_ == 0)
{
v___x_1343_ = v___x_1340_;
goto v_reusejp_1342_;
}
else
{
lean_object* v_reuseFailAlloc_1344_; 
v_reuseFailAlloc_1344_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1344_, 0, v_a_1338_);
v___x_1343_ = v_reuseFailAlloc_1344_;
goto v_reusejp_1342_;
}
v_reusejp_1342_:
{
return v___x_1343_;
}
}
}
}
}
else
{
lean_object* v_a_1346_; lean_object* v___x_1348_; uint8_t v_isShared_1349_; uint8_t v_isSharedCheck_1353_; 
lean_del_object(v___x_1052_);
lean_dec(v_a_1050_);
lean_dec_ref(v___x_1036_);
lean_dec_ref(v___x_1023_);
lean_dec(v_val_1007_);
lean_dec(v_fst_982_);
lean_dec(v_fst_978_);
lean_dec(v___y_962_);
lean_dec_ref(v___y_961_);
lean_dec(v___y_960_);
lean_dec_ref(v___y_959_);
lean_dec(v___y_958_);
lean_dec_ref(v___y_957_);
lean_dec_ref(v_a_952_);
lean_dec_ref(v_classExpr_950_);
lean_dec_ref(v_instVal_949_);
lean_dec_ref(v_cls_948_);
lean_dec(v_declName_947_);
lean_dec(v_className_946_);
lean_dec_ref(v_a_945_);
lean_dec_ref(v___x_944_);
lean_dec_ref(v_declVal_943_);
lean_dec_ref(v_xs_942_);
lean_dec_ref(v_a_941_);
v_a_1346_ = lean_ctor_get(v___y_1300_, 0);
v_isSharedCheck_1353_ = !lean_is_exclusive(v___y_1300_);
if (v_isSharedCheck_1353_ == 0)
{
v___x_1348_ = v___y_1300_;
v_isShared_1349_ = v_isSharedCheck_1353_;
goto v_resetjp_1347_;
}
else
{
lean_inc(v_a_1346_);
lean_dec(v___y_1300_);
v___x_1348_ = lean_box(0);
v_isShared_1349_ = v_isSharedCheck_1353_;
goto v_resetjp_1347_;
}
v_resetjp_1347_:
{
lean_object* v___x_1351_; 
if (v_isShared_1349_ == 0)
{
v___x_1351_ = v___x_1348_;
goto v_reusejp_1350_;
}
else
{
lean_object* v_reuseFailAlloc_1352_; 
v_reuseFailAlloc_1352_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1352_, 0, v_a_1346_);
v___x_1351_ = v_reuseFailAlloc_1352_;
goto v_reusejp_1350_;
}
v_reusejp_1350_:
{
return v___x_1351_;
}
}
}
}
}
v___jp_1054_:
{
lean_object* v___x_1062_; 
v___x_1062_ = l_Lean_Core_getMessageLog___redArg(v___y_1061_);
if (lean_obj_tag(v___x_1062_) == 0)
{
lean_object* v_a_1063_; lean_object* v___x_1064_; 
v_a_1063_ = lean_ctor_get(v___x_1062_, 0);
lean_inc(v_a_1063_);
lean_dec_ref(v___x_1062_);
lean_inc_ref(v_a_941_);
v___x_1064_ = l_Lean_Elab_Term_SavedState_restore(v_a_941_, v___x_1048_, v___y_1056_, v___y_1057_, v___y_1058_, v___y_1059_, v___y_1060_, v___y_1061_);
lean_dec(v___y_1061_);
lean_dec_ref(v___y_1060_);
lean_dec(v___y_1059_);
lean_dec_ref(v___y_1058_);
lean_dec(v___y_1057_);
lean_dec_ref(v___y_1056_);
if (lean_obj_tag(v___x_1064_) == 0)
{
lean_object* v___x_1065_; lean_object* v___x_1066_; lean_object* v___x_1067_; lean_object* v___x_1068_; lean_object* v___x_1069_; 
lean_dec_ref(v___x_1064_);
v___x_1065_ = l_Lean_MessageLog_append(v___y_1055_, v_a_1063_);
v___x_1066_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_1066_, 0, v___x_1036_);
lean_ctor_set(v___x_1066_, 1, v___x_1023_);
v___x_1067_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_1067_, 0, v___x_1065_);
lean_ctor_set(v___x_1067_, 1, v___x_1066_);
v___x_1068_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_1068_, 0, v_a_1050_);
lean_ctor_set(v___x_1068_, 1, v___x_1067_);
v___x_1069_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_1069_, 0, v___x_992_);
lean_ctor_set(v___x_1069_, 1, v___x_1068_);
v_a_965_ = v___x_1069_;
goto v___jp_964_;
}
else
{
lean_object* v_a_1070_; lean_object* v___x_1072_; uint8_t v_isShared_1073_; uint8_t v_isSharedCheck_1077_; 
lean_dec(v_a_1063_);
lean_dec(v___y_1055_);
lean_dec(v_a_1050_);
lean_dec_ref(v___x_1036_);
lean_dec_ref(v___x_1023_);
lean_dec(v___y_962_);
lean_dec_ref(v___y_961_);
lean_dec(v___y_960_);
lean_dec_ref(v___y_959_);
lean_dec(v___y_958_);
lean_dec_ref(v___y_957_);
lean_dec_ref(v_a_952_);
lean_dec_ref(v_classExpr_950_);
lean_dec_ref(v_instVal_949_);
lean_dec_ref(v_cls_948_);
lean_dec(v_declName_947_);
lean_dec(v_className_946_);
lean_dec_ref(v_a_945_);
lean_dec_ref(v___x_944_);
lean_dec_ref(v_declVal_943_);
lean_dec_ref(v_xs_942_);
lean_dec_ref(v_a_941_);
v_a_1070_ = lean_ctor_get(v___x_1064_, 0);
v_isSharedCheck_1077_ = !lean_is_exclusive(v___x_1064_);
if (v_isSharedCheck_1077_ == 0)
{
v___x_1072_ = v___x_1064_;
v_isShared_1073_ = v_isSharedCheck_1077_;
goto v_resetjp_1071_;
}
else
{
lean_inc(v_a_1070_);
lean_dec(v___x_1064_);
v___x_1072_ = lean_box(0);
v_isShared_1073_ = v_isSharedCheck_1077_;
goto v_resetjp_1071_;
}
v_resetjp_1071_:
{
lean_object* v___x_1075_; 
if (v_isShared_1073_ == 0)
{
v___x_1075_ = v___x_1072_;
goto v_reusejp_1074_;
}
else
{
lean_object* v_reuseFailAlloc_1076_; 
v_reuseFailAlloc_1076_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1076_, 0, v_a_1070_);
v___x_1075_ = v_reuseFailAlloc_1076_;
goto v_reusejp_1074_;
}
v_reusejp_1074_:
{
return v___x_1075_;
}
}
}
}
else
{
lean_object* v_a_1078_; lean_object* v___x_1080_; uint8_t v_isShared_1081_; uint8_t v_isSharedCheck_1085_; 
lean_dec(v___y_1061_);
lean_dec_ref(v___y_1060_);
lean_dec(v___y_1059_);
lean_dec_ref(v___y_1058_);
lean_dec(v___y_1057_);
lean_dec_ref(v___y_1056_);
lean_dec(v___y_1055_);
lean_dec(v_a_1050_);
lean_dec_ref(v___x_1036_);
lean_dec_ref(v___x_1023_);
lean_dec(v___y_962_);
lean_dec_ref(v___y_961_);
lean_dec(v___y_960_);
lean_dec_ref(v___y_959_);
lean_dec(v___y_958_);
lean_dec_ref(v___y_957_);
lean_dec_ref(v_a_952_);
lean_dec_ref(v_classExpr_950_);
lean_dec_ref(v_instVal_949_);
lean_dec_ref(v_cls_948_);
lean_dec(v_declName_947_);
lean_dec(v_className_946_);
lean_dec_ref(v_a_945_);
lean_dec_ref(v___x_944_);
lean_dec_ref(v_declVal_943_);
lean_dec_ref(v_xs_942_);
lean_dec_ref(v_a_941_);
v_a_1078_ = lean_ctor_get(v___x_1062_, 0);
v_isSharedCheck_1085_ = !lean_is_exclusive(v___x_1062_);
if (v_isSharedCheck_1085_ == 0)
{
v___x_1080_ = v___x_1062_;
v_isShared_1081_ = v_isSharedCheck_1085_;
goto v_resetjp_1079_;
}
else
{
lean_inc(v_a_1078_);
lean_dec(v___x_1062_);
v___x_1080_ = lean_box(0);
v_isShared_1081_ = v_isSharedCheck_1085_;
goto v_resetjp_1079_;
}
v_resetjp_1079_:
{
lean_object* v___x_1083_; 
if (v_isShared_1081_ == 0)
{
v___x_1083_ = v___x_1080_;
goto v_reusejp_1082_;
}
else
{
lean_object* v_reuseFailAlloc_1084_; 
v_reuseFailAlloc_1084_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1084_, 0, v_a_1078_);
v___x_1083_ = v_reuseFailAlloc_1084_;
goto v_reusejp_1082_;
}
v_reusejp_1082_:
{
return v___x_1083_;
}
}
}
}
}
}
else
{
lean_object* v_a_1359_; lean_object* v___x_1361_; uint8_t v_isShared_1362_; uint8_t v_isSharedCheck_1366_; 
lean_dec_ref(v_type_1047_);
lean_dec_ref(v___x_1036_);
lean_dec_ref(v___x_1023_);
lean_dec(v_val_1007_);
lean_dec(v_fst_982_);
lean_dec(v_fst_978_);
lean_dec(v___y_962_);
lean_dec_ref(v___y_961_);
lean_dec(v___y_960_);
lean_dec_ref(v___y_959_);
lean_dec(v___y_958_);
lean_dec_ref(v___y_957_);
lean_dec_ref(v_a_952_);
lean_dec_ref(v_classExpr_950_);
lean_dec_ref(v_instVal_949_);
lean_dec_ref(v_cls_948_);
lean_dec(v_declName_947_);
lean_dec(v_className_946_);
lean_dec_ref(v_a_945_);
lean_dec_ref(v___x_944_);
lean_dec_ref(v_declVal_943_);
lean_dec_ref(v_xs_942_);
lean_dec_ref(v_a_941_);
v_a_1359_ = lean_ctor_get(v___x_1049_, 0);
v_isSharedCheck_1366_ = !lean_is_exclusive(v___x_1049_);
if (v_isSharedCheck_1366_ == 0)
{
v___x_1361_ = v___x_1049_;
v_isShared_1362_ = v_isSharedCheck_1366_;
goto v_resetjp_1360_;
}
else
{
lean_inc(v_a_1359_);
lean_dec(v___x_1049_);
v___x_1361_ = lean_box(0);
v_isShared_1362_ = v_isSharedCheck_1366_;
goto v_resetjp_1360_;
}
v_resetjp_1360_:
{
lean_object* v___x_1364_; 
if (v_isShared_1362_ == 0)
{
v___x_1364_ = v___x_1361_;
goto v_reusejp_1363_;
}
else
{
lean_object* v_reuseFailAlloc_1365_; 
v_reuseFailAlloc_1365_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1365_, 0, v_a_1359_);
v___x_1364_ = v_reuseFailAlloc_1365_;
goto v_reusejp_1363_;
}
v_reusejp_1363_:
{
return v___x_1364_;
}
}
}
}
else
{
lean_object* v___x_1367_; lean_object* v___x_1368_; lean_object* v___x_1369_; lean_object* v___x_1370_; 
lean_dec_ref(v_type_1047_);
lean_dec(v_val_1007_);
v___x_1367_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_1367_, 0, v___x_1036_);
lean_ctor_set(v___x_1367_, 1, v___x_1023_);
v___x_1368_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_1368_, 0, v_fst_982_);
lean_ctor_set(v___x_1368_, 1, v___x_1367_);
v___x_1369_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_1369_, 0, v_fst_978_);
lean_ctor_set(v___x_1369_, 1, v___x_1368_);
v___x_1370_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_1370_, 0, v___x_992_);
lean_ctor_set(v___x_1370_, 1, v___x_1369_);
v_a_965_ = v___x_1370_;
goto v___jp_964_;
}
}
else
{
lean_object* v_a_1371_; lean_object* v___x_1373_; uint8_t v_isShared_1374_; uint8_t v_isSharedCheck_1378_; 
lean_dec_ref(v___x_1036_);
lean_dec_ref(v___x_1023_);
lean_dec(v_val_1007_);
lean_dec(v_fst_982_);
lean_dec(v_fst_978_);
lean_dec(v___y_962_);
lean_dec_ref(v___y_961_);
lean_dec(v___y_960_);
lean_dec_ref(v___y_959_);
lean_dec(v___y_958_);
lean_dec_ref(v___y_957_);
lean_dec_ref(v_a_952_);
lean_dec_ref(v_classExpr_950_);
lean_dec_ref(v_instVal_949_);
lean_dec_ref(v_cls_948_);
lean_dec(v_declName_947_);
lean_dec(v_className_946_);
lean_dec_ref(v_a_945_);
lean_dec_ref(v___x_944_);
lean_dec_ref(v_declVal_943_);
lean_dec_ref(v_xs_942_);
lean_dec_ref(v_a_941_);
v_a_1371_ = lean_ctor_get(v___x_1045_, 0);
v_isSharedCheck_1378_ = !lean_is_exclusive(v___x_1045_);
if (v_isSharedCheck_1378_ == 0)
{
v___x_1373_ = v___x_1045_;
v_isShared_1374_ = v_isSharedCheck_1378_;
goto v_resetjp_1372_;
}
else
{
lean_inc(v_a_1371_);
lean_dec(v___x_1045_);
v___x_1373_ = lean_box(0);
v_isShared_1374_ = v_isSharedCheck_1378_;
goto v_resetjp_1372_;
}
v_resetjp_1372_:
{
lean_object* v___x_1376_; 
if (v_isShared_1374_ == 0)
{
v___x_1376_ = v___x_1373_;
goto v_reusejp_1375_;
}
else
{
lean_object* v_reuseFailAlloc_1377_; 
v_reuseFailAlloc_1377_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1377_, 0, v_a_1371_);
v___x_1376_ = v_reuseFailAlloc_1377_;
goto v_reusejp_1375_;
}
v_reusejp_1375_:
{
return v___x_1376_;
}
}
}
}
}
}
}
}
}
}
}
}
}
v___jp_993_:
{
lean_object* v___x_995_; 
if (v_isShared_989_ == 0)
{
v___x_995_ = v___x_988_;
goto v_reusejp_994_;
}
else
{
lean_object* v_reuseFailAlloc_1006_; 
v_reuseFailAlloc_1006_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v_reuseFailAlloc_1006_, 0, v_fst_986_);
lean_ctor_set(v_reuseFailAlloc_1006_, 1, v_snd_977_);
v___x_995_ = v_reuseFailAlloc_1006_;
goto v_reusejp_994_;
}
v_reusejp_994_:
{
lean_object* v___x_997_; 
if (v_isShared_985_ == 0)
{
lean_ctor_set(v___x_984_, 1, v___x_995_);
v___x_997_ = v___x_984_;
goto v_reusejp_996_;
}
else
{
lean_object* v_reuseFailAlloc_1005_; 
v_reuseFailAlloc_1005_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v_reuseFailAlloc_1005_, 0, v_fst_982_);
lean_ctor_set(v_reuseFailAlloc_1005_, 1, v___x_995_);
v___x_997_ = v_reuseFailAlloc_1005_;
goto v_reusejp_996_;
}
v_reusejp_996_:
{
lean_object* v___x_999_; 
if (v_isShared_981_ == 0)
{
lean_ctor_set(v___x_980_, 1, v___x_997_);
v___x_999_ = v___x_980_;
goto v_reusejp_998_;
}
else
{
lean_object* v_reuseFailAlloc_1004_; 
v_reuseFailAlloc_1004_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v_reuseFailAlloc_1004_, 0, v_fst_978_);
lean_ctor_set(v_reuseFailAlloc_1004_, 1, v___x_997_);
v___x_999_ = v_reuseFailAlloc_1004_;
goto v_reusejp_998_;
}
v_reusejp_998_:
{
lean_object* v___x_1001_; 
if (v_isShared_974_ == 0)
{
lean_ctor_set(v___x_973_, 1, v___x_999_);
lean_ctor_set(v___x_973_, 0, v___x_992_);
v___x_1001_ = v___x_973_;
goto v_reusejp_1000_;
}
else
{
lean_object* v_reuseFailAlloc_1003_; 
v_reuseFailAlloc_1003_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v_reuseFailAlloc_1003_, 0, v___x_992_);
lean_ctor_set(v_reuseFailAlloc_1003_, 1, v___x_999_);
v___x_1001_ = v_reuseFailAlloc_1003_;
goto v_reusejp_1000_;
}
v_reusejp_1000_:
{
lean_object* v___x_1002_; 
v___x_1002_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_1002_, 0, v___x_1001_);
return v___x_1002_;
}
}
}
}
}
}
}
}
}
}
v___jp_964_:
{
size_t v___x_966_; size_t v___x_967_; 
v___x_966_ = ((size_t)1ULL);
v___x_967_ = lean_usize_add(v_i_955_, v___x_966_);
v_i_955_ = v___x_967_;
v_b_956_ = v_a_965_;
goto _start;
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___boxed(lean_object** _args){
lean_object* v_a_1398_ = _args[0];
lean_object* v_xs_1399_ = _args[1];
lean_object* v_declVal_1400_ = _args[2];
lean_object* v___x_1401_ = _args[3];
lean_object* v_a_1402_ = _args[4];
lean_object* v_className_1403_ = _args[5];
lean_object* v_declName_1404_ = _args[6];
lean_object* v_cls_1405_ = _args[7];
lean_object* v_instVal_1406_ = _args[8];
lean_object* v_classExpr_1407_ = _args[9];
lean_object* v_instMVars_1408_ = _args[10];
lean_object* v_a_1409_ = _args[11];
lean_object* v_as_1410_ = _args[12];
lean_object* v_sz_1411_ = _args[13];
lean_object* v_i_1412_ = _args[14];
lean_object* v_b_1413_ = _args[15];
lean_object* v___y_1414_ = _args[16];
lean_object* v___y_1415_ = _args[17];
lean_object* v___y_1416_ = _args[18];
lean_object* v___y_1417_ = _args[19];
lean_object* v___y_1418_ = _args[20];
lean_object* v___y_1419_ = _args[21];
lean_object* v___y_1420_ = _args[22];
_start:
{
size_t v_sz_boxed_1421_; size_t v_i_boxed_1422_; lean_object* v_res_1423_; 
v_sz_boxed_1421_ = lean_unbox_usize(v_sz_1411_);
lean_dec(v_sz_1411_);
v_i_boxed_1422_ = lean_unbox_usize(v_i_1412_);
lean_dec(v_i_1412_);
v_res_1423_ = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5(v_a_1398_, v_xs_1399_, v_declVal_1400_, v___x_1401_, v_a_1402_, v_className_1403_, v_declName_1404_, v_cls_1405_, v_instVal_1406_, v_classExpr_1407_, v_instMVars_1408_, v_a_1409_, v_as_1410_, v_sz_boxed_1421_, v_i_boxed_1422_, v_b_1413_, v___y_1414_, v___y_1415_, v___y_1416_, v___y_1417_, v___y_1418_, v___y_1419_);
lean_dec_ref(v_as_1410_);
lean_dec_ref(v_instMVars_1408_);
return v_res_1423_;
}
}
LEAN_EXPORT lean_object* l_MonadExcept_ofExcept___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__12___redArg(lean_object* v_x_1424_){
_start:
{
if (lean_obj_tag(v_x_1424_) == 0)
{
lean_object* v_a_1426_; lean_object* v___x_1428_; uint8_t v_isShared_1429_; uint8_t v_isSharedCheck_1433_; 
v_a_1426_ = lean_ctor_get(v_x_1424_, 0);
v_isSharedCheck_1433_ = !lean_is_exclusive(v_x_1424_);
if (v_isSharedCheck_1433_ == 0)
{
v___x_1428_ = v_x_1424_;
v_isShared_1429_ = v_isSharedCheck_1433_;
goto v_resetjp_1427_;
}
else
{
lean_inc(v_a_1426_);
lean_dec(v_x_1424_);
v___x_1428_ = lean_box(0);
v_isShared_1429_ = v_isSharedCheck_1433_;
goto v_resetjp_1427_;
}
v_resetjp_1427_:
{
lean_object* v___x_1431_; 
if (v_isShared_1429_ == 0)
{
lean_ctor_set_tag(v___x_1428_, 1);
v___x_1431_ = v___x_1428_;
goto v_reusejp_1430_;
}
else
{
lean_object* v_reuseFailAlloc_1432_; 
v_reuseFailAlloc_1432_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1432_, 0, v_a_1426_);
v___x_1431_ = v_reuseFailAlloc_1432_;
goto v_reusejp_1430_;
}
v_reusejp_1430_:
{
return v___x_1431_;
}
}
}
else
{
lean_object* v_a_1434_; lean_object* v___x_1436_; uint8_t v_isShared_1437_; uint8_t v_isSharedCheck_1441_; 
v_a_1434_ = lean_ctor_get(v_x_1424_, 0);
v_isSharedCheck_1441_ = !lean_is_exclusive(v_x_1424_);
if (v_isSharedCheck_1441_ == 0)
{
v___x_1436_ = v_x_1424_;
v_isShared_1437_ = v_isSharedCheck_1441_;
goto v_resetjp_1435_;
}
else
{
lean_inc(v_a_1434_);
lean_dec(v_x_1424_);
v___x_1436_ = lean_box(0);
v_isShared_1437_ = v_isSharedCheck_1441_;
goto v_resetjp_1435_;
}
v_resetjp_1435_:
{
lean_object* v___x_1439_; 
if (v_isShared_1437_ == 0)
{
lean_ctor_set_tag(v___x_1436_, 0);
v___x_1439_ = v___x_1436_;
goto v_reusejp_1438_;
}
else
{
lean_object* v_reuseFailAlloc_1440_; 
v_reuseFailAlloc_1440_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1440_, 0, v_a_1434_);
v___x_1439_ = v_reuseFailAlloc_1440_;
goto v_reusejp_1438_;
}
v_reusejp_1438_:
{
return v___x_1439_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_MonadExcept_ofExcept___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__12___redArg___boxed(lean_object* v_x_1442_, lean_object* v___y_1443_){
_start:
{
lean_object* v_res_1444_; 
v_res_1444_ = l_MonadExcept_ofExcept___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__12___redArg(v_x_1442_);
return v_res_1444_;
}
}
LEAN_EXPORT lean_object* l_Lean_Option_get___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__13(lean_object* v_opts_1445_, lean_object* v_opt_1446_){
_start:
{
lean_object* v_name_1447_; lean_object* v_defValue_1448_; lean_object* v_map_1449_; lean_object* v___x_1450_; 
v_name_1447_ = lean_ctor_get(v_opt_1446_, 0);
v_defValue_1448_ = lean_ctor_get(v_opt_1446_, 1);
v_map_1449_ = lean_ctor_get(v_opts_1445_, 0);
v___x_1450_ = l_Std_DTreeMap_Internal_Impl_Const_get_x3f___at___00Lean_NameMap_find_x3f_spec__0___redArg(v_map_1449_, v_name_1447_);
if (lean_obj_tag(v___x_1450_) == 0)
{
lean_inc(v_defValue_1448_);
return v_defValue_1448_;
}
else
{
lean_object* v_val_1451_; 
v_val_1451_ = lean_ctor_get(v___x_1450_, 0);
lean_inc(v_val_1451_);
lean_dec_ref(v___x_1450_);
if (lean_obj_tag(v_val_1451_) == 3)
{
lean_object* v_v_1452_; 
v_v_1452_ = lean_ctor_get(v_val_1451_, 0);
lean_inc(v_v_1452_);
lean_dec_ref(v_val_1451_);
return v_v_1452_;
}
else
{
lean_dec(v_val_1451_);
lean_inc(v_defValue_1448_);
return v_defValue_1448_;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Option_get___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__13___boxed(lean_object* v_opts_1453_, lean_object* v_opt_1454_){
_start:
{
lean_object* v_res_1455_; 
v_res_1455_ = l_Lean_Option_get___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__13(v_opts_1453_, v_opt_1454_);
lean_dec_ref(v_opt_1454_);
lean_dec_ref(v_opts_1453_);
return v_res_1455_;
}
}
LEAN_EXPORT uint8_t l_Except_toTraceResult___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__10(lean_object* v_e_1456_){
_start:
{
if (lean_obj_tag(v_e_1456_) == 0)
{
uint8_t v___x_1457_; 
v___x_1457_ = 2;
return v___x_1457_;
}
else
{
uint8_t v___x_1458_; 
v___x_1458_ = 0;
return v___x_1458_;
}
}
}
LEAN_EXPORT lean_object* l_Except_toTraceResult___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__10___boxed(lean_object* v_e_1459_){
_start:
{
uint8_t v_res_1460_; lean_object* v_r_1461_; 
v_res_1460_ = l_Except_toTraceResult___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__10(v_e_1459_);
lean_dec_ref(v_e_1459_);
v_r_1461_ = lean_box(v_res_1460_);
return v_r_1461_;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Util_Trace_0__Lean_addTraceNode___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__11_spec__14(size_t v_sz_1462_, size_t v_i_1463_, lean_object* v_bs_1464_){
_start:
{
uint8_t v___x_1465_; 
v___x_1465_ = lean_usize_dec_lt(v_i_1463_, v_sz_1462_);
if (v___x_1465_ == 0)
{
return v_bs_1464_;
}
else
{
lean_object* v_v_1466_; lean_object* v_msg_1467_; lean_object* v___x_1468_; lean_object* v_bs_x27_1469_; size_t v___x_1470_; size_t v___x_1471_; lean_object* v___x_1472_; 
v_v_1466_ = lean_array_uget_borrowed(v_bs_1464_, v_i_1463_);
v_msg_1467_ = lean_ctor_get(v_v_1466_, 1);
lean_inc_ref(v_msg_1467_);
v___x_1468_ = lean_unsigned_to_nat(0u);
v_bs_x27_1469_ = lean_array_uset(v_bs_1464_, v_i_1463_, v___x_1468_);
v___x_1470_ = ((size_t)1ULL);
v___x_1471_ = lean_usize_add(v_i_1463_, v___x_1470_);
v___x_1472_ = lean_array_uset(v_bs_x27_1469_, v_i_1463_, v_msg_1467_);
v_i_1463_ = v___x_1471_;
v_bs_1464_ = v___x_1472_;
goto _start;
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Util_Trace_0__Lean_addTraceNode___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__11_spec__14___boxed(lean_object* v_sz_1474_, lean_object* v_i_1475_, lean_object* v_bs_1476_){
_start:
{
size_t v_sz_boxed_1477_; size_t v_i_boxed_1478_; lean_object* v_res_1479_; 
v_sz_boxed_1477_ = lean_unbox_usize(v_sz_1474_);
lean_dec(v_sz_1474_);
v_i_boxed_1478_ = lean_unbox_usize(v_i_1475_);
lean_dec(v_i_1475_);
v_res_1479_ = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Util_Trace_0__Lean_addTraceNode___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__11_spec__14(v_sz_boxed_1477_, v_i_boxed_1478_, v_bs_1476_);
return v_res_1479_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_addTraceNode___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__11___redArg(lean_object* v_oldTraces_1480_, lean_object* v_data_1481_, lean_object* v_ref_1482_, lean_object* v_msg_1483_, lean_object* v___y_1484_, lean_object* v___y_1485_, lean_object* v___y_1486_, lean_object* v___y_1487_){
_start:
{
lean_object* v_fileName_1489_; lean_object* v_fileMap_1490_; lean_object* v_options_1491_; lean_object* v_currRecDepth_1492_; lean_object* v_maxRecDepth_1493_; lean_object* v_ref_1494_; lean_object* v_currNamespace_1495_; lean_object* v_openDecls_1496_; lean_object* v_initHeartbeats_1497_; lean_object* v_maxHeartbeats_1498_; lean_object* v_quotContext_1499_; lean_object* v_currMacroScope_1500_; uint8_t v_diag_1501_; lean_object* v_cancelTk_x3f_1502_; uint8_t v_suppressElabErrors_1503_; lean_object* v_inheritedTraceOptions_1504_; lean_object* v___x_1506_; uint8_t v_isShared_1507_; uint8_t v_isSharedCheck_1559_; 
v_fileName_1489_ = lean_ctor_get(v___y_1486_, 0);
v_fileMap_1490_ = lean_ctor_get(v___y_1486_, 1);
v_options_1491_ = lean_ctor_get(v___y_1486_, 2);
v_currRecDepth_1492_ = lean_ctor_get(v___y_1486_, 3);
v_maxRecDepth_1493_ = lean_ctor_get(v___y_1486_, 4);
v_ref_1494_ = lean_ctor_get(v___y_1486_, 5);
v_currNamespace_1495_ = lean_ctor_get(v___y_1486_, 6);
v_openDecls_1496_ = lean_ctor_get(v___y_1486_, 7);
v_initHeartbeats_1497_ = lean_ctor_get(v___y_1486_, 8);
v_maxHeartbeats_1498_ = lean_ctor_get(v___y_1486_, 9);
v_quotContext_1499_ = lean_ctor_get(v___y_1486_, 10);
v_currMacroScope_1500_ = lean_ctor_get(v___y_1486_, 11);
v_diag_1501_ = lean_ctor_get_uint8(v___y_1486_, sizeof(void*)*14);
v_cancelTk_x3f_1502_ = lean_ctor_get(v___y_1486_, 12);
v_suppressElabErrors_1503_ = lean_ctor_get_uint8(v___y_1486_, sizeof(void*)*14 + 1);
v_inheritedTraceOptions_1504_ = lean_ctor_get(v___y_1486_, 13);
v_isSharedCheck_1559_ = !lean_is_exclusive(v___y_1486_);
if (v_isSharedCheck_1559_ == 0)
{
v___x_1506_ = v___y_1486_;
v_isShared_1507_ = v_isSharedCheck_1559_;
goto v_resetjp_1505_;
}
else
{
lean_inc(v_inheritedTraceOptions_1504_);
lean_inc(v_cancelTk_x3f_1502_);
lean_inc(v_currMacroScope_1500_);
lean_inc(v_quotContext_1499_);
lean_inc(v_maxHeartbeats_1498_);
lean_inc(v_initHeartbeats_1497_);
lean_inc(v_openDecls_1496_);
lean_inc(v_currNamespace_1495_);
lean_inc(v_ref_1494_);
lean_inc(v_maxRecDepth_1493_);
lean_inc(v_currRecDepth_1492_);
lean_inc(v_options_1491_);
lean_inc(v_fileMap_1490_);
lean_inc(v_fileName_1489_);
lean_dec(v___y_1486_);
v___x_1506_ = lean_box(0);
v_isShared_1507_ = v_isSharedCheck_1559_;
goto v_resetjp_1505_;
}
v_resetjp_1505_:
{
lean_object* v___x_1508_; lean_object* v_traceState_1509_; lean_object* v_traces_1510_; lean_object* v_ref_1511_; lean_object* v___x_1513_; 
v___x_1508_ = lean_st_ref_get(v___y_1487_);
v_traceState_1509_ = lean_ctor_get(v___x_1508_, 4);
lean_inc_ref(v_traceState_1509_);
lean_dec(v___x_1508_);
v_traces_1510_ = lean_ctor_get(v_traceState_1509_, 0);
lean_inc_ref(v_traces_1510_);
lean_dec_ref(v_traceState_1509_);
v_ref_1511_ = l_Lean_replaceRef(v_ref_1482_, v_ref_1494_);
lean_dec(v_ref_1494_);
if (v_isShared_1507_ == 0)
{
lean_ctor_set(v___x_1506_, 5, v_ref_1511_);
v___x_1513_ = v___x_1506_;
goto v_reusejp_1512_;
}
else
{
lean_object* v_reuseFailAlloc_1558_; 
v_reuseFailAlloc_1558_ = lean_alloc_ctor(0, 14, 2);
lean_ctor_set(v_reuseFailAlloc_1558_, 0, v_fileName_1489_);
lean_ctor_set(v_reuseFailAlloc_1558_, 1, v_fileMap_1490_);
lean_ctor_set(v_reuseFailAlloc_1558_, 2, v_options_1491_);
lean_ctor_set(v_reuseFailAlloc_1558_, 3, v_currRecDepth_1492_);
lean_ctor_set(v_reuseFailAlloc_1558_, 4, v_maxRecDepth_1493_);
lean_ctor_set(v_reuseFailAlloc_1558_, 5, v_ref_1511_);
lean_ctor_set(v_reuseFailAlloc_1558_, 6, v_currNamespace_1495_);
lean_ctor_set(v_reuseFailAlloc_1558_, 7, v_openDecls_1496_);
lean_ctor_set(v_reuseFailAlloc_1558_, 8, v_initHeartbeats_1497_);
lean_ctor_set(v_reuseFailAlloc_1558_, 9, v_maxHeartbeats_1498_);
lean_ctor_set(v_reuseFailAlloc_1558_, 10, v_quotContext_1499_);
lean_ctor_set(v_reuseFailAlloc_1558_, 11, v_currMacroScope_1500_);
lean_ctor_set(v_reuseFailAlloc_1558_, 12, v_cancelTk_x3f_1502_);
lean_ctor_set(v_reuseFailAlloc_1558_, 13, v_inheritedTraceOptions_1504_);
lean_ctor_set_uint8(v_reuseFailAlloc_1558_, sizeof(void*)*14, v_diag_1501_);
lean_ctor_set_uint8(v_reuseFailAlloc_1558_, sizeof(void*)*14 + 1, v_suppressElabErrors_1503_);
v___x_1513_ = v_reuseFailAlloc_1558_;
goto v_reusejp_1512_;
}
v_reusejp_1512_:
{
lean_object* v___x_1514_; size_t v_sz_1515_; size_t v___x_1516_; lean_object* v___x_1517_; lean_object* v_msg_1518_; lean_object* v___x_1519_; lean_object* v_a_1520_; lean_object* v___x_1522_; uint8_t v_isShared_1523_; uint8_t v_isSharedCheck_1557_; 
v___x_1514_ = l_Lean_PersistentArray_toArray___redArg(v_traces_1510_);
lean_dec_ref(v_traces_1510_);
v_sz_1515_ = lean_array_size(v___x_1514_);
v___x_1516_ = ((size_t)0ULL);
v___x_1517_ = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Util_Trace_0__Lean_addTraceNode___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__11_spec__14(v_sz_1515_, v___x_1516_, v___x_1514_);
v_msg_1518_ = lean_alloc_ctor(9, 3, 0);
lean_ctor_set(v_msg_1518_, 0, v_data_1481_);
lean_ctor_set(v_msg_1518_, 1, v_msg_1483_);
lean_ctor_set(v_msg_1518_, 2, v___x_1517_);
v___x_1519_ = l_Lean_addMessageContextFull___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure_spec__0_spec__0(v_msg_1518_, v___y_1484_, v___y_1485_, v___x_1513_, v___y_1487_);
lean_dec_ref(v___x_1513_);
v_a_1520_ = lean_ctor_get(v___x_1519_, 0);
v_isSharedCheck_1557_ = !lean_is_exclusive(v___x_1519_);
if (v_isSharedCheck_1557_ == 0)
{
v___x_1522_ = v___x_1519_;
v_isShared_1523_ = v_isSharedCheck_1557_;
goto v_resetjp_1521_;
}
else
{
lean_inc(v_a_1520_);
lean_dec(v___x_1519_);
v___x_1522_ = lean_box(0);
v_isShared_1523_ = v_isSharedCheck_1557_;
goto v_resetjp_1521_;
}
v_resetjp_1521_:
{
lean_object* v___x_1524_; lean_object* v_traceState_1525_; lean_object* v_env_1526_; lean_object* v_nextMacroScope_1527_; lean_object* v_ngen_1528_; lean_object* v_auxDeclNGen_1529_; lean_object* v_cache_1530_; lean_object* v_messages_1531_; lean_object* v_infoState_1532_; lean_object* v_snapshotTasks_1533_; lean_object* v___x_1535_; uint8_t v_isShared_1536_; uint8_t v_isSharedCheck_1556_; 
v___x_1524_ = lean_st_ref_take(v___y_1487_);
v_traceState_1525_ = lean_ctor_get(v___x_1524_, 4);
v_env_1526_ = lean_ctor_get(v___x_1524_, 0);
v_nextMacroScope_1527_ = lean_ctor_get(v___x_1524_, 1);
v_ngen_1528_ = lean_ctor_get(v___x_1524_, 2);
v_auxDeclNGen_1529_ = lean_ctor_get(v___x_1524_, 3);
v_cache_1530_ = lean_ctor_get(v___x_1524_, 5);
v_messages_1531_ = lean_ctor_get(v___x_1524_, 6);
v_infoState_1532_ = lean_ctor_get(v___x_1524_, 7);
v_snapshotTasks_1533_ = lean_ctor_get(v___x_1524_, 8);
v_isSharedCheck_1556_ = !lean_is_exclusive(v___x_1524_);
if (v_isSharedCheck_1556_ == 0)
{
v___x_1535_ = v___x_1524_;
v_isShared_1536_ = v_isSharedCheck_1556_;
goto v_resetjp_1534_;
}
else
{
lean_inc(v_snapshotTasks_1533_);
lean_inc(v_infoState_1532_);
lean_inc(v_messages_1531_);
lean_inc(v_cache_1530_);
lean_inc(v_traceState_1525_);
lean_inc(v_auxDeclNGen_1529_);
lean_inc(v_ngen_1528_);
lean_inc(v_nextMacroScope_1527_);
lean_inc(v_env_1526_);
lean_dec(v___x_1524_);
v___x_1535_ = lean_box(0);
v_isShared_1536_ = v_isSharedCheck_1556_;
goto v_resetjp_1534_;
}
v_resetjp_1534_:
{
uint64_t v_tid_1537_; lean_object* v___x_1539_; uint8_t v_isShared_1540_; uint8_t v_isSharedCheck_1554_; 
v_tid_1537_ = lean_ctor_get_uint64(v_traceState_1525_, sizeof(void*)*1);
v_isSharedCheck_1554_ = !lean_is_exclusive(v_traceState_1525_);
if (v_isSharedCheck_1554_ == 0)
{
lean_object* v_unused_1555_; 
v_unused_1555_ = lean_ctor_get(v_traceState_1525_, 0);
lean_dec(v_unused_1555_);
v___x_1539_ = v_traceState_1525_;
v_isShared_1540_ = v_isSharedCheck_1554_;
goto v_resetjp_1538_;
}
else
{
lean_dec(v_traceState_1525_);
v___x_1539_ = lean_box(0);
v_isShared_1540_ = v_isSharedCheck_1554_;
goto v_resetjp_1538_;
}
v_resetjp_1538_:
{
lean_object* v___x_1541_; lean_object* v___x_1542_; lean_object* v___x_1544_; 
v___x_1541_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_1541_, 0, v_ref_1482_);
lean_ctor_set(v___x_1541_, 1, v_a_1520_);
v___x_1542_ = l_Lean_PersistentArray_push___redArg(v_oldTraces_1480_, v___x_1541_);
if (v_isShared_1540_ == 0)
{
lean_ctor_set(v___x_1539_, 0, v___x_1542_);
v___x_1544_ = v___x_1539_;
goto v_reusejp_1543_;
}
else
{
lean_object* v_reuseFailAlloc_1553_; 
v_reuseFailAlloc_1553_ = lean_alloc_ctor(0, 1, 8);
lean_ctor_set(v_reuseFailAlloc_1553_, 0, v___x_1542_);
lean_ctor_set_uint64(v_reuseFailAlloc_1553_, sizeof(void*)*1, v_tid_1537_);
v___x_1544_ = v_reuseFailAlloc_1553_;
goto v_reusejp_1543_;
}
v_reusejp_1543_:
{
lean_object* v___x_1546_; 
if (v_isShared_1536_ == 0)
{
lean_ctor_set(v___x_1535_, 4, v___x_1544_);
v___x_1546_ = v___x_1535_;
goto v_reusejp_1545_;
}
else
{
lean_object* v_reuseFailAlloc_1552_; 
v_reuseFailAlloc_1552_ = lean_alloc_ctor(0, 9, 0);
lean_ctor_set(v_reuseFailAlloc_1552_, 0, v_env_1526_);
lean_ctor_set(v_reuseFailAlloc_1552_, 1, v_nextMacroScope_1527_);
lean_ctor_set(v_reuseFailAlloc_1552_, 2, v_ngen_1528_);
lean_ctor_set(v_reuseFailAlloc_1552_, 3, v_auxDeclNGen_1529_);
lean_ctor_set(v_reuseFailAlloc_1552_, 4, v___x_1544_);
lean_ctor_set(v_reuseFailAlloc_1552_, 5, v_cache_1530_);
lean_ctor_set(v_reuseFailAlloc_1552_, 6, v_messages_1531_);
lean_ctor_set(v_reuseFailAlloc_1552_, 7, v_infoState_1532_);
lean_ctor_set(v_reuseFailAlloc_1552_, 8, v_snapshotTasks_1533_);
v___x_1546_ = v_reuseFailAlloc_1552_;
goto v_reusejp_1545_;
}
v_reusejp_1545_:
{
lean_object* v___x_1547_; lean_object* v___x_1548_; lean_object* v___x_1550_; 
v___x_1547_ = lean_st_ref_set(v___y_1487_, v___x_1546_);
v___x_1548_ = lean_box(0);
if (v_isShared_1523_ == 0)
{
lean_ctor_set(v___x_1522_, 0, v___x_1548_);
v___x_1550_ = v___x_1522_;
goto v_reusejp_1549_;
}
else
{
lean_object* v_reuseFailAlloc_1551_; 
v_reuseFailAlloc_1551_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1551_, 0, v___x_1548_);
v___x_1550_ = v_reuseFailAlloc_1551_;
goto v_reusejp_1549_;
}
v_reusejp_1549_:
{
return v___x_1550_;
}
}
}
}
}
}
}
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_addTraceNode___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__11___redArg___boxed(lean_object* v_oldTraces_1560_, lean_object* v_data_1561_, lean_object* v_ref_1562_, lean_object* v_msg_1563_, lean_object* v___y_1564_, lean_object* v___y_1565_, lean_object* v___y_1566_, lean_object* v___y_1567_, lean_object* v___y_1568_){
_start:
{
lean_object* v_res_1569_; 
v_res_1569_ = l___private_Lean_Util_Trace_0__Lean_addTraceNode___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__11___redArg(v_oldTraces_1560_, v_data_1561_, v_ref_1562_, v_msg_1563_, v___y_1564_, v___y_1565_, v___y_1566_, v___y_1567_);
lean_dec(v___y_1567_);
lean_dec(v___y_1565_);
lean_dec_ref(v___y_1564_);
return v_res_1569_;
}
}
static lean_object* _init_l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__1(void){
_start:
{
lean_object* v___x_1571_; lean_object* v___x_1572_; 
v___x_1571_ = ((lean_object*)(l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__0));
v___x_1572_ = l_Lean_stringToMessageData(v___x_1571_);
return v___x_1572_;
}
}
static lean_object* _init_l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__3(void){
_start:
{
lean_object* v___x_1574_; lean_object* v___x_1575_; 
v___x_1574_ = ((lean_object*)(l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__2));
v___x_1575_ = l_Lean_stringToMessageData(v___x_1574_);
return v___x_1575_;
}
}
static double _init_l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__4(void){
_start:
{
lean_object* v___x_1576_; double v___x_1577_; 
v___x_1576_ = lean_unsigned_to_nat(1000u);
v___x_1577_ = lean_float_of_nat(v___x_1576_);
return v___x_1577_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8(lean_object* v_cls_1578_, uint8_t v_collapsed_1579_, lean_object* v_tag_1580_, lean_object* v_opts_1581_, uint8_t v_clsEnabled_1582_, lean_object* v_oldTraces_1583_, lean_object* v_msg_1584_, lean_object* v_resStartStop_1585_, lean_object* v___y_1586_, lean_object* v___y_1587_, lean_object* v___y_1588_, lean_object* v___y_1589_, lean_object* v___y_1590_, lean_object* v___y_1591_){
_start:
{
lean_object* v_fst_1593_; lean_object* v_snd_1594_; lean_object* v___x_1596_; uint8_t v_isShared_1597_; uint8_t v_isSharedCheck_1692_; 
v_fst_1593_ = lean_ctor_get(v_resStartStop_1585_, 0);
v_snd_1594_ = lean_ctor_get(v_resStartStop_1585_, 1);
v_isSharedCheck_1692_ = !lean_is_exclusive(v_resStartStop_1585_);
if (v_isSharedCheck_1692_ == 0)
{
v___x_1596_ = v_resStartStop_1585_;
v_isShared_1597_ = v_isSharedCheck_1692_;
goto v_resetjp_1595_;
}
else
{
lean_inc(v_snd_1594_);
lean_inc(v_fst_1593_);
lean_dec(v_resStartStop_1585_);
v___x_1596_ = lean_box(0);
v_isShared_1597_ = v_isSharedCheck_1692_;
goto v_resetjp_1595_;
}
v_resetjp_1595_:
{
lean_object* v___y_1599_; lean_object* v___y_1600_; lean_object* v_data_1601_; lean_object* v_fst_1612_; lean_object* v_snd_1613_; lean_object* v___x_1615_; uint8_t v_isShared_1616_; uint8_t v_isSharedCheck_1691_; 
v_fst_1612_ = lean_ctor_get(v_snd_1594_, 0);
v_snd_1613_ = lean_ctor_get(v_snd_1594_, 1);
v_isSharedCheck_1691_ = !lean_is_exclusive(v_snd_1594_);
if (v_isSharedCheck_1691_ == 0)
{
v___x_1615_ = v_snd_1594_;
v_isShared_1616_ = v_isSharedCheck_1691_;
goto v_resetjp_1614_;
}
else
{
lean_inc(v_snd_1613_);
lean_inc(v_fst_1612_);
lean_dec(v_snd_1594_);
v___x_1615_ = lean_box(0);
v_isShared_1616_ = v_isSharedCheck_1691_;
goto v_resetjp_1614_;
}
v___jp_1598_:
{
lean_object* v___x_1602_; 
v___x_1602_ = l___private_Lean_Util_Trace_0__Lean_addTraceNode___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__11___redArg(v_oldTraces_1583_, v_data_1601_, v___y_1599_, v___y_1600_, v___y_1588_, v___y_1589_, v___y_1590_, v___y_1591_);
lean_dec(v___y_1591_);
lean_dec(v___y_1589_);
lean_dec_ref(v___y_1588_);
if (lean_obj_tag(v___x_1602_) == 0)
{
lean_object* v___x_1603_; 
lean_dec_ref(v___x_1602_);
v___x_1603_ = l_MonadExcept_ofExcept___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__12___redArg(v_fst_1593_);
return v___x_1603_;
}
else
{
lean_object* v_a_1604_; lean_object* v___x_1606_; uint8_t v_isShared_1607_; uint8_t v_isSharedCheck_1611_; 
lean_dec(v_fst_1593_);
v_a_1604_ = lean_ctor_get(v___x_1602_, 0);
v_isSharedCheck_1611_ = !lean_is_exclusive(v___x_1602_);
if (v_isSharedCheck_1611_ == 0)
{
v___x_1606_ = v___x_1602_;
v_isShared_1607_ = v_isSharedCheck_1611_;
goto v_resetjp_1605_;
}
else
{
lean_inc(v_a_1604_);
lean_dec(v___x_1602_);
v___x_1606_ = lean_box(0);
v_isShared_1607_ = v_isSharedCheck_1611_;
goto v_resetjp_1605_;
}
v_resetjp_1605_:
{
lean_object* v___x_1609_; 
if (v_isShared_1607_ == 0)
{
v___x_1609_ = v___x_1606_;
goto v_reusejp_1608_;
}
else
{
lean_object* v_reuseFailAlloc_1610_; 
v_reuseFailAlloc_1610_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1610_, 0, v_a_1604_);
v___x_1609_ = v_reuseFailAlloc_1610_;
goto v_reusejp_1608_;
}
v_reusejp_1608_:
{
return v___x_1609_;
}
}
}
}
v_resetjp_1614_:
{
lean_object* v___x_1617_; uint8_t v___x_1618_; lean_object* v___y_1620_; lean_object* v_a_1621_; uint8_t v___y_1645_; double v___y_1676_; 
v___x_1617_ = l_Lean_trace_profiler;
v___x_1618_ = l_Lean_Option_get___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__7(v_opts_1581_, v___x_1617_);
if (v___x_1618_ == 0)
{
v___y_1645_ = v___x_1618_;
goto v___jp_1644_;
}
else
{
lean_object* v___x_1681_; uint8_t v___x_1682_; 
v___x_1681_ = l_Lean_trace_profiler_useHeartbeats;
v___x_1682_ = l_Lean_Option_get___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__7(v_opts_1581_, v___x_1681_);
if (v___x_1682_ == 0)
{
lean_object* v___x_1683_; lean_object* v___x_1684_; double v___x_1685_; double v___x_1686_; double v___x_1687_; 
v___x_1683_ = l_Lean_trace_profiler_threshold;
v___x_1684_ = l_Lean_Option_get___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__13(v_opts_1581_, v___x_1683_);
v___x_1685_ = lean_float_of_nat(v___x_1684_);
v___x_1686_ = lean_float_once(&l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__4, &l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__4_once, _init_l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__4);
v___x_1687_ = lean_float_div(v___x_1685_, v___x_1686_);
v___y_1676_ = v___x_1687_;
goto v___jp_1675_;
}
else
{
lean_object* v___x_1688_; lean_object* v___x_1689_; double v___x_1690_; 
v___x_1688_ = l_Lean_trace_profiler_threshold;
v___x_1689_ = l_Lean_Option_get___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__13(v_opts_1581_, v___x_1688_);
v___x_1690_ = lean_float_of_nat(v___x_1689_);
v___y_1676_ = v___x_1690_;
goto v___jp_1675_;
}
}
v___jp_1619_:
{
uint8_t v_result_1622_; lean_object* v___x_1623_; lean_object* v___x_1624_; lean_object* v___x_1625_; lean_object* v___x_1627_; 
v_result_1622_ = l_Except_toTraceResult___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__10(v_fst_1593_);
v___x_1623_ = l_Lean_TraceResult_toEmoji(v_result_1622_);
v___x_1624_ = l_Lean_stringToMessageData(v___x_1623_);
v___x_1625_ = lean_obj_once(&l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__1, &l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__1_once, _init_l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__1);
if (v_isShared_1616_ == 0)
{
lean_ctor_set_tag(v___x_1615_, 7);
lean_ctor_set(v___x_1615_, 1, v___x_1625_);
lean_ctor_set(v___x_1615_, 0, v___x_1624_);
v___x_1627_ = v___x_1615_;
goto v_reusejp_1626_;
}
else
{
lean_object* v_reuseFailAlloc_1638_; 
v_reuseFailAlloc_1638_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v_reuseFailAlloc_1638_, 0, v___x_1624_);
lean_ctor_set(v_reuseFailAlloc_1638_, 1, v___x_1625_);
v___x_1627_ = v_reuseFailAlloc_1638_;
goto v_reusejp_1626_;
}
v_reusejp_1626_:
{
lean_object* v_m_1629_; 
if (v_isShared_1597_ == 0)
{
lean_ctor_set_tag(v___x_1596_, 7);
lean_ctor_set(v___x_1596_, 1, v_a_1621_);
lean_ctor_set(v___x_1596_, 0, v___x_1627_);
v_m_1629_ = v___x_1596_;
goto v_reusejp_1628_;
}
else
{
lean_object* v_reuseFailAlloc_1637_; 
v_reuseFailAlloc_1637_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v_reuseFailAlloc_1637_, 0, v___x_1627_);
lean_ctor_set(v_reuseFailAlloc_1637_, 1, v_a_1621_);
v_m_1629_ = v_reuseFailAlloc_1637_;
goto v_reusejp_1628_;
}
v_reusejp_1628_:
{
lean_object* v___x_1630_; lean_object* v___x_1631_; double v___x_1632_; lean_object* v_data_1633_; 
v___x_1630_ = lean_box(v_result_1622_);
v___x_1631_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_1631_, 0, v___x_1630_);
v___x_1632_ = lean_float_once(&l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg___closed__0, &l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg___closed__0_once, _init_l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg___closed__0);
lean_inc_ref(v_tag_1580_);
lean_inc_ref(v___x_1631_);
lean_inc(v_cls_1578_);
v_data_1633_ = lean_alloc_ctor(0, 3, 17);
lean_ctor_set(v_data_1633_, 0, v_cls_1578_);
lean_ctor_set(v_data_1633_, 1, v___x_1631_);
lean_ctor_set(v_data_1633_, 2, v_tag_1580_);
lean_ctor_set_float(v_data_1633_, sizeof(void*)*3, v___x_1632_);
lean_ctor_set_float(v_data_1633_, sizeof(void*)*3 + 8, v___x_1632_);
lean_ctor_set_uint8(v_data_1633_, sizeof(void*)*3 + 16, v_collapsed_1579_);
if (v___x_1618_ == 0)
{
lean_dec_ref(v___x_1631_);
lean_dec(v_snd_1613_);
lean_dec(v_fst_1612_);
lean_dec_ref(v_tag_1580_);
lean_dec(v_cls_1578_);
v___y_1599_ = v___y_1620_;
v___y_1600_ = v_m_1629_;
v_data_1601_ = v_data_1633_;
goto v___jp_1598_;
}
else
{
lean_object* v_data_1634_; double v___x_1635_; double v___x_1636_; 
lean_dec_ref(v_data_1633_);
v_data_1634_ = lean_alloc_ctor(0, 3, 17);
lean_ctor_set(v_data_1634_, 0, v_cls_1578_);
lean_ctor_set(v_data_1634_, 1, v___x_1631_);
lean_ctor_set(v_data_1634_, 2, v_tag_1580_);
v___x_1635_ = lean_unbox_float(v_fst_1612_);
lean_dec(v_fst_1612_);
lean_ctor_set_float(v_data_1634_, sizeof(void*)*3, v___x_1635_);
v___x_1636_ = lean_unbox_float(v_snd_1613_);
lean_dec(v_snd_1613_);
lean_ctor_set_float(v_data_1634_, sizeof(void*)*3 + 8, v___x_1636_);
lean_ctor_set_uint8(v_data_1634_, sizeof(void*)*3 + 16, v_collapsed_1579_);
v___y_1599_ = v___y_1620_;
v___y_1600_ = v_m_1629_;
v_data_1601_ = v_data_1634_;
goto v___jp_1598_;
}
}
}
}
v___jp_1639_:
{
lean_object* v_ref_1640_; lean_object* v___x_1641_; 
v_ref_1640_ = lean_ctor_get(v___y_1590_, 5);
lean_inc(v___y_1591_);
lean_inc_ref(v___y_1590_);
lean_inc(v___y_1589_);
lean_inc_ref(v___y_1588_);
lean_inc(v_fst_1593_);
v___x_1641_ = lean_apply_8(v_msg_1584_, v_fst_1593_, v___y_1586_, v___y_1587_, v___y_1588_, v___y_1589_, v___y_1590_, v___y_1591_, lean_box(0));
if (lean_obj_tag(v___x_1641_) == 0)
{
lean_object* v_a_1642_; 
v_a_1642_ = lean_ctor_get(v___x_1641_, 0);
lean_inc(v_a_1642_);
lean_dec_ref(v___x_1641_);
lean_inc(v_ref_1640_);
v___y_1620_ = v_ref_1640_;
v_a_1621_ = v_a_1642_;
goto v___jp_1619_;
}
else
{
lean_object* v___x_1643_; 
lean_dec_ref(v___x_1641_);
v___x_1643_ = lean_obj_once(&l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__3, &l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__3_once, _init_l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__3);
lean_inc(v_ref_1640_);
v___y_1620_ = v_ref_1640_;
v_a_1621_ = v___x_1643_;
goto v___jp_1619_;
}
}
v___jp_1644_:
{
if (v_clsEnabled_1582_ == 0)
{
if (v___y_1645_ == 0)
{
lean_object* v___x_1646_; lean_object* v_traceState_1647_; lean_object* v_env_1648_; lean_object* v_nextMacroScope_1649_; lean_object* v_ngen_1650_; lean_object* v_auxDeclNGen_1651_; lean_object* v_cache_1652_; lean_object* v_messages_1653_; lean_object* v_infoState_1654_; lean_object* v_snapshotTasks_1655_; lean_object* v___x_1657_; uint8_t v_isShared_1658_; uint8_t v_isSharedCheck_1674_; 
lean_del_object(v___x_1615_);
lean_dec(v_snd_1613_);
lean_dec(v_fst_1612_);
lean_del_object(v___x_1596_);
lean_dec_ref(v___y_1590_);
lean_dec(v___y_1589_);
lean_dec_ref(v___y_1588_);
lean_dec(v___y_1587_);
lean_dec_ref(v___y_1586_);
lean_dec_ref(v_msg_1584_);
lean_dec_ref(v_tag_1580_);
lean_dec(v_cls_1578_);
v___x_1646_ = lean_st_ref_take(v___y_1591_);
v_traceState_1647_ = lean_ctor_get(v___x_1646_, 4);
v_env_1648_ = lean_ctor_get(v___x_1646_, 0);
v_nextMacroScope_1649_ = lean_ctor_get(v___x_1646_, 1);
v_ngen_1650_ = lean_ctor_get(v___x_1646_, 2);
v_auxDeclNGen_1651_ = lean_ctor_get(v___x_1646_, 3);
v_cache_1652_ = lean_ctor_get(v___x_1646_, 5);
v_messages_1653_ = lean_ctor_get(v___x_1646_, 6);
v_infoState_1654_ = lean_ctor_get(v___x_1646_, 7);
v_snapshotTasks_1655_ = lean_ctor_get(v___x_1646_, 8);
v_isSharedCheck_1674_ = !lean_is_exclusive(v___x_1646_);
if (v_isSharedCheck_1674_ == 0)
{
v___x_1657_ = v___x_1646_;
v_isShared_1658_ = v_isSharedCheck_1674_;
goto v_resetjp_1656_;
}
else
{
lean_inc(v_snapshotTasks_1655_);
lean_inc(v_infoState_1654_);
lean_inc(v_messages_1653_);
lean_inc(v_cache_1652_);
lean_inc(v_traceState_1647_);
lean_inc(v_auxDeclNGen_1651_);
lean_inc(v_ngen_1650_);
lean_inc(v_nextMacroScope_1649_);
lean_inc(v_env_1648_);
lean_dec(v___x_1646_);
v___x_1657_ = lean_box(0);
v_isShared_1658_ = v_isSharedCheck_1674_;
goto v_resetjp_1656_;
}
v_resetjp_1656_:
{
uint64_t v_tid_1659_; lean_object* v_traces_1660_; lean_object* v___x_1662_; uint8_t v_isShared_1663_; uint8_t v_isSharedCheck_1673_; 
v_tid_1659_ = lean_ctor_get_uint64(v_traceState_1647_, sizeof(void*)*1);
v_traces_1660_ = lean_ctor_get(v_traceState_1647_, 0);
v_isSharedCheck_1673_ = !lean_is_exclusive(v_traceState_1647_);
if (v_isSharedCheck_1673_ == 0)
{
v___x_1662_ = v_traceState_1647_;
v_isShared_1663_ = v_isSharedCheck_1673_;
goto v_resetjp_1661_;
}
else
{
lean_inc(v_traces_1660_);
lean_dec(v_traceState_1647_);
v___x_1662_ = lean_box(0);
v_isShared_1663_ = v_isSharedCheck_1673_;
goto v_resetjp_1661_;
}
v_resetjp_1661_:
{
lean_object* v___x_1664_; lean_object* v___x_1666_; 
v___x_1664_ = l_Lean_PersistentArray_append___redArg(v_oldTraces_1583_, v_traces_1660_);
lean_dec_ref(v_traces_1660_);
if (v_isShared_1663_ == 0)
{
lean_ctor_set(v___x_1662_, 0, v___x_1664_);
v___x_1666_ = v___x_1662_;
goto v_reusejp_1665_;
}
else
{
lean_object* v_reuseFailAlloc_1672_; 
v_reuseFailAlloc_1672_ = lean_alloc_ctor(0, 1, 8);
lean_ctor_set(v_reuseFailAlloc_1672_, 0, v___x_1664_);
lean_ctor_set_uint64(v_reuseFailAlloc_1672_, sizeof(void*)*1, v_tid_1659_);
v___x_1666_ = v_reuseFailAlloc_1672_;
goto v_reusejp_1665_;
}
v_reusejp_1665_:
{
lean_object* v___x_1668_; 
if (v_isShared_1658_ == 0)
{
lean_ctor_set(v___x_1657_, 4, v___x_1666_);
v___x_1668_ = v___x_1657_;
goto v_reusejp_1667_;
}
else
{
lean_object* v_reuseFailAlloc_1671_; 
v_reuseFailAlloc_1671_ = lean_alloc_ctor(0, 9, 0);
lean_ctor_set(v_reuseFailAlloc_1671_, 0, v_env_1648_);
lean_ctor_set(v_reuseFailAlloc_1671_, 1, v_nextMacroScope_1649_);
lean_ctor_set(v_reuseFailAlloc_1671_, 2, v_ngen_1650_);
lean_ctor_set(v_reuseFailAlloc_1671_, 3, v_auxDeclNGen_1651_);
lean_ctor_set(v_reuseFailAlloc_1671_, 4, v___x_1666_);
lean_ctor_set(v_reuseFailAlloc_1671_, 5, v_cache_1652_);
lean_ctor_set(v_reuseFailAlloc_1671_, 6, v_messages_1653_);
lean_ctor_set(v_reuseFailAlloc_1671_, 7, v_infoState_1654_);
lean_ctor_set(v_reuseFailAlloc_1671_, 8, v_snapshotTasks_1655_);
v___x_1668_ = v_reuseFailAlloc_1671_;
goto v_reusejp_1667_;
}
v_reusejp_1667_:
{
lean_object* v___x_1669_; lean_object* v___x_1670_; 
v___x_1669_ = lean_st_ref_set(v___y_1591_, v___x_1668_);
lean_dec(v___y_1591_);
v___x_1670_ = l_MonadExcept_ofExcept___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__12___redArg(v_fst_1593_);
return v___x_1670_;
}
}
}
}
}
else
{
goto v___jp_1639_;
}
}
else
{
goto v___jp_1639_;
}
}
v___jp_1675_:
{
double v___x_1677_; double v___x_1678_; double v___x_1679_; uint8_t v___x_1680_; 
v___x_1677_ = lean_unbox_float(v_snd_1613_);
v___x_1678_ = lean_unbox_float(v_fst_1612_);
v___x_1679_ = lean_float_sub(v___x_1677_, v___x_1678_);
v___x_1680_ = lean_float_decLt(v___y_1676_, v___x_1679_);
v___y_1645_ = v___x_1680_;
goto v___jp_1644_;
}
}
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___boxed(lean_object* v_cls_1693_, lean_object* v_collapsed_1694_, lean_object* v_tag_1695_, lean_object* v_opts_1696_, lean_object* v_clsEnabled_1697_, lean_object* v_oldTraces_1698_, lean_object* v_msg_1699_, lean_object* v_resStartStop_1700_, lean_object* v___y_1701_, lean_object* v___y_1702_, lean_object* v___y_1703_, lean_object* v___y_1704_, lean_object* v___y_1705_, lean_object* v___y_1706_, lean_object* v___y_1707_){
_start:
{
uint8_t v_collapsed_boxed_1708_; uint8_t v_clsEnabled_boxed_1709_; lean_object* v_res_1710_; 
v_collapsed_boxed_1708_ = lean_unbox(v_collapsed_1694_);
v_clsEnabled_boxed_1709_ = lean_unbox(v_clsEnabled_1697_);
v_res_1710_ = l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8(v_cls_1693_, v_collapsed_boxed_1708_, v_tag_1695_, v_opts_1696_, v_clsEnabled_boxed_1709_, v_oldTraces_1698_, v_msg_1699_, v_resStartStop_1700_, v___y_1701_, v___y_1702_, v___y_1703_, v___y_1704_, v___y_1705_, v___y_1706_);
lean_dec_ref(v_opts_1696_);
return v_res_1710_;
}
}
static lean_object* _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__1(void){
_start:
{
lean_object* v___x_1712_; lean_object* v___x_1713_; 
v___x_1712_ = ((lean_object*)(l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__0));
v___x_1713_ = l_Lean_stringToMessageData(v___x_1712_);
return v___x_1713_;
}
}
static lean_object* _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__3(void){
_start:
{
lean_object* v___x_1715_; lean_object* v___x_1716_; 
v___x_1715_ = ((lean_object*)(l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__2));
v___x_1716_ = l_Lean_stringToMessageData(v___x_1715_);
return v___x_1716_;
}
}
static lean_object* _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__5(void){
_start:
{
lean_object* v___x_1718_; lean_object* v___x_1719_; 
v___x_1718_ = ((lean_object*)(l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__4));
v___x_1719_ = l_Lean_stringToMessageData(v___x_1718_);
return v___x_1719_;
}
}
static lean_object* _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__6(void){
_start:
{
lean_object* v___x_1720_; lean_object* v___x_1721_; 
v___x_1720_ = lean_obj_once(&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__5, &l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__5_once, _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__5);
v___x_1721_ = l_Lean_MessageData_note(v___x_1720_);
return v___x_1721_;
}
}
static double _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__7(void){
_start:
{
lean_object* v___x_1722_; double v___x_1723_; 
v___x_1722_ = lean_unsigned_to_nat(1000000000u);
v___x_1723_ = lean_float_of_nat(v___x_1722_);
return v___x_1723_;
}
}
static lean_object* _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__8(void){
_start:
{
lean_object* v___x_1724_; lean_object* v___x_1725_; lean_object* v___x_1726_; 
v___x_1724_ = lean_unsigned_to_nat(32u);
v___x_1725_ = lean_mk_empty_array_with_capacity(v___x_1724_);
v___x_1726_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_1726_, 0, v___x_1725_);
return v___x_1726_;
}
}
static lean_object* _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__9(void){
_start:
{
size_t v___x_1727_; lean_object* v___x_1728_; lean_object* v___x_1729_; lean_object* v___x_1730_; lean_object* v___x_1731_; lean_object* v___x_1732_; 
v___x_1727_ = ((size_t)5ULL);
v___x_1728_ = lean_unsigned_to_nat(0u);
v___x_1729_ = lean_unsigned_to_nat(32u);
v___x_1730_ = lean_mk_empty_array_with_capacity(v___x_1729_);
v___x_1731_ = lean_obj_once(&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__8, &l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__8_once, _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__8);
v___x_1732_ = lean_alloc_ctor(0, 4, sizeof(size_t)*1);
lean_ctor_set(v___x_1732_, 0, v___x_1731_);
lean_ctor_set(v___x_1732_, 1, v___x_1730_);
lean_ctor_set(v___x_1732_, 2, v___x_1728_);
lean_ctor_set(v___x_1732_, 3, v___x_1728_);
lean_ctor_set_usize(v___x_1732_, 4, v___x_1727_);
return v___x_1732_;
}
}
static lean_object* _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__10(void){
_start:
{
lean_object* v___x_1733_; lean_object* v___x_1734_; lean_object* v___x_1735_; 
v___x_1733_ = l_Lean_NameSet_empty;
v___x_1734_ = lean_obj_once(&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__9, &l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__9_once, _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__9);
v___x_1735_ = lean_alloc_ctor(0, 3, 0);
lean_ctor_set(v___x_1735_, 0, v___x_1734_);
lean_ctor_set(v___x_1735_, 1, v___x_1734_);
lean_ctor_set(v___x_1735_, 2, v___x_1733_);
return v___x_1735_;
}
}
static lean_object* _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__13(void){
_start:
{
lean_object* v___x_1739_; lean_object* v___x_1740_; 
v___x_1739_ = ((lean_object*)(l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__12));
v___x_1740_ = l_Lean_stringToMessageData(v___x_1739_);
return v___x_1740_;
}
}
static lean_object* _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__15(void){
_start:
{
lean_object* v___x_1742_; lean_object* v___x_1743_; 
v___x_1742_ = ((lean_object*)(l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__14));
v___x_1743_ = l_Lean_stringToMessageData(v___x_1742_);
return v___x_1743_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go(lean_object* v_declName_1744_, lean_object* v_declVal_1745_, lean_object* v_cls_1746_, lean_object* v_xs_1747_, lean_object* v_bis_1748_, lean_object* v_classExpr_1749_, lean_object* v_className_1750_, lean_object* v_instVal_1751_, lean_object* v_instMVars_1752_, lean_object* v_val_1753_, lean_object* v_a_1754_, lean_object* v_a_1755_, lean_object* v_a_1756_, lean_object* v_a_1757_, lean_object* v_a_1758_, lean_object* v_a_1759_){
_start:
{
lean_object* v___y_1762_; lean_object* v___y_1763_; lean_object* v___y_1764_; lean_object* v___y_1765_; lean_object* v___y_1766_; lean_object* v___y_1767_; lean_object* v___y_1801_; lean_object* v___y_1802_; lean_object* v___y_1803_; lean_object* v___y_1804_; lean_object* v___y_1805_; lean_object* v___y_1806_; lean_object* v___y_1807_; uint8_t v___y_1808_; lean_object* v___y_1822_; lean_object* v___y_1823_; lean_object* v___y_1824_; lean_object* v___y_1825_; lean_object* v___y_1826_; lean_object* v___y_1827_; lean_object* v_a_1828_; lean_object* v___y_1832_; lean_object* v___y_1833_; lean_object* v___y_1834_; lean_object* v___y_1835_; lean_object* v___y_1836_; lean_object* v___y_1837_; lean_object* v___y_1838_; lean_object* v___x_1840_; 
lean_inc(v_a_1759_);
lean_inc_ref(v_a_1758_);
lean_inc(v_a_1757_);
lean_inc_ref(v_a_1756_);
v___x_1840_ = l_Lean_Meta_whnfCore(v_val_1753_, v_a_1756_, v_a_1757_, v_a_1758_, v_a_1759_);
if (lean_obj_tag(v___x_1840_) == 0)
{
lean_object* v_a_1841_; lean_object* v___x_1842_; uint8_t v___y_1844_; lean_object* v___y_1845_; lean_object* v___y_1846_; lean_object* v___y_1847_; lean_object* v___y_1848_; uint8_t v___y_1849_; lean_object* v___y_1850_; lean_object* v___y_1851_; lean_object* v___y_1852_; lean_object* v___y_1853_; lean_object* v___y_1854_; lean_object* v___y_1855_; lean_object* v___y_1856_; lean_object* v___y_1857_; lean_object* v___y_1858_; lean_object* v_a_1859_; uint8_t v___y_1869_; lean_object* v___y_1870_; lean_object* v___y_1871_; lean_object* v___y_1872_; lean_object* v___y_1873_; lean_object* v___y_1874_; uint8_t v___y_1875_; lean_object* v___y_1876_; lean_object* v___y_1877_; lean_object* v___y_1878_; lean_object* v___y_1879_; lean_object* v___y_1880_; lean_object* v___y_1881_; lean_object* v___y_1882_; lean_object* v___y_1883_; lean_object* v_a_1884_; lean_object* v___y_1897_; uint8_t v___y_1898_; lean_object* v___y_1899_; lean_object* v___y_1900_; lean_object* v___y_1901_; uint8_t v___y_1902_; lean_object* v___y_1903_; lean_object* v___y_1904_; lean_object* v___y_1905_; lean_object* v___y_1906_; lean_object* v___y_1907_; lean_object* v___y_1908_; lean_object* v___y_1909_; lean_object* v___y_1910_; lean_object* v___y_1953_; lean_object* v___y_1954_; lean_object* v___y_1955_; lean_object* v___y_1956_; lean_object* v___y_1957_; lean_object* v___y_1958_; lean_object* v___x_2037_; 
v_a_1841_ = lean_ctor_get(v___x_1840_, 0);
lean_inc(v_a_1841_);
lean_dec_ref(v___x_1840_);
v___x_1842_ = ((lean_object*)(l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__1));
v___x_2037_ = l_Lean_isTracingEnabledFor___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__2___redArg(v___x_1842_, v_a_1758_);
if (lean_obj_tag(v___x_2037_) == 0)
{
lean_object* v_a_2038_; uint8_t v___x_2039_; 
v_a_2038_ = lean_ctor_get(v___x_2037_, 0);
lean_inc(v_a_2038_);
lean_dec_ref(v___x_2037_);
v___x_2039_ = lean_unbox(v_a_2038_);
lean_dec(v_a_2038_);
if (v___x_2039_ == 0)
{
v___y_1953_ = v_a_1754_;
v___y_1954_ = v_a_1755_;
v___y_1955_ = v_a_1756_;
v___y_1956_ = v_a_1757_;
v___y_1957_ = v_a_1758_;
v___y_1958_ = v_a_1759_;
goto v___jp_1952_;
}
else
{
lean_object* v___x_2040_; lean_object* v___x_2041_; lean_object* v___x_2042_; lean_object* v___x_2043_; lean_object* v___x_2044_; lean_object* v___x_2045_; lean_object* v___x_2046_; lean_object* v___x_2047_; 
v___x_2040_ = lean_obj_once(&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__13, &l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__13_once, _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__13);
lean_inc_ref(v_classExpr_1749_);
v___x_2041_ = l_Lean_MessageData_ofExpr(v_classExpr_1749_);
v___x_2042_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_2042_, 0, v___x_2040_);
lean_ctor_set(v___x_2042_, 1, v___x_2041_);
v___x_2043_ = lean_obj_once(&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__15, &l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__15_once, _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__15);
v___x_2044_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_2044_, 0, v___x_2042_);
lean_ctor_set(v___x_2044_, 1, v___x_2043_);
lean_inc(v_a_1841_);
v___x_2045_ = l_Lean_indentExpr(v_a_1841_);
v___x_2046_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_2046_, 0, v___x_2044_);
lean_ctor_set(v___x_2046_, 1, v___x_2045_);
v___x_2047_ = l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg(v___x_1842_, v___x_2046_, v_a_1756_, v_a_1757_, v_a_1758_, v_a_1759_);
if (lean_obj_tag(v___x_2047_) == 0)
{
lean_dec_ref(v___x_2047_);
v___y_1953_ = v_a_1754_;
v___y_1954_ = v_a_1755_;
v___y_1955_ = v_a_1756_;
v___y_1956_ = v_a_1757_;
v___y_1957_ = v_a_1758_;
v___y_1958_ = v_a_1759_;
goto v___jp_1952_;
}
else
{
lean_object* v_a_2048_; lean_object* v___x_2050_; uint8_t v_isShared_2051_; uint8_t v_isSharedCheck_2055_; 
lean_dec(v_a_1841_);
lean_dec(v_a_1759_);
lean_dec_ref(v_a_1758_);
lean_dec(v_a_1757_);
lean_dec_ref(v_a_1756_);
lean_dec(v_a_1755_);
lean_dec_ref(v_a_1754_);
lean_dec_ref(v_instVal_1751_);
lean_dec(v_className_1750_);
lean_dec_ref(v_classExpr_1749_);
lean_dec_ref(v_bis_1748_);
lean_dec_ref(v_xs_1747_);
lean_dec_ref(v_cls_1746_);
lean_dec_ref(v_declVal_1745_);
lean_dec(v_declName_1744_);
v_a_2048_ = lean_ctor_get(v___x_2047_, 0);
v_isSharedCheck_2055_ = !lean_is_exclusive(v___x_2047_);
if (v_isSharedCheck_2055_ == 0)
{
v___x_2050_ = v___x_2047_;
v_isShared_2051_ = v_isSharedCheck_2055_;
goto v_resetjp_2049_;
}
else
{
lean_inc(v_a_2048_);
lean_dec(v___x_2047_);
v___x_2050_ = lean_box(0);
v_isShared_2051_ = v_isSharedCheck_2055_;
goto v_resetjp_2049_;
}
v_resetjp_2049_:
{
lean_object* v___x_2053_; 
if (v_isShared_2051_ == 0)
{
v___x_2053_ = v___x_2050_;
goto v_reusejp_2052_;
}
else
{
lean_object* v_reuseFailAlloc_2054_; 
v_reuseFailAlloc_2054_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2054_, 0, v_a_2048_);
v___x_2053_ = v_reuseFailAlloc_2054_;
goto v_reusejp_2052_;
}
v_reusejp_2052_:
{
return v___x_2053_;
}
}
}
}
}
else
{
lean_object* v_a_2056_; lean_object* v___x_2058_; uint8_t v_isShared_2059_; uint8_t v_isSharedCheck_2063_; 
lean_dec(v_a_1841_);
lean_dec(v_a_1759_);
lean_dec_ref(v_a_1758_);
lean_dec(v_a_1757_);
lean_dec_ref(v_a_1756_);
lean_dec(v_a_1755_);
lean_dec_ref(v_a_1754_);
lean_dec_ref(v_instVal_1751_);
lean_dec(v_className_1750_);
lean_dec_ref(v_classExpr_1749_);
lean_dec_ref(v_bis_1748_);
lean_dec_ref(v_xs_1747_);
lean_dec_ref(v_cls_1746_);
lean_dec_ref(v_declVal_1745_);
lean_dec(v_declName_1744_);
v_a_2056_ = lean_ctor_get(v___x_2037_, 0);
v_isSharedCheck_2063_ = !lean_is_exclusive(v___x_2037_);
if (v_isSharedCheck_2063_ == 0)
{
v___x_2058_ = v___x_2037_;
v_isShared_2059_ = v_isSharedCheck_2063_;
goto v_resetjp_2057_;
}
else
{
lean_inc(v_a_2056_);
lean_dec(v___x_2037_);
v___x_2058_ = lean_box(0);
v_isShared_2059_ = v_isSharedCheck_2063_;
goto v_resetjp_2057_;
}
v_resetjp_2057_:
{
lean_object* v___x_2061_; 
if (v_isShared_2059_ == 0)
{
v___x_2061_ = v___x_2058_;
goto v_reusejp_2060_;
}
else
{
lean_object* v_reuseFailAlloc_2062_; 
v_reuseFailAlloc_2062_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2062_, 0, v_a_2056_);
v___x_2061_ = v_reuseFailAlloc_2062_;
goto v_reusejp_2060_;
}
v_reusejp_2060_:
{
return v___x_2061_;
}
}
}
v___jp_1843_:
{
lean_object* v___x_1860_; double v___x_1861_; double v___x_1862_; lean_object* v___x_1863_; lean_object* v___x_1864_; lean_object* v___x_1865_; lean_object* v___x_1866_; lean_object* v___x_1867_; 
v___x_1860_ = lean_io_get_num_heartbeats();
v___x_1861_ = lean_float_of_nat(v___y_1850_);
v___x_1862_ = lean_float_of_nat(v___x_1860_);
v___x_1863_ = lean_box_float(v___x_1861_);
v___x_1864_ = lean_box_float(v___x_1862_);
v___x_1865_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_1865_, 0, v___x_1863_);
lean_ctor_set(v___x_1865_, 1, v___x_1864_);
v___x_1866_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_1866_, 0, v_a_1859_);
lean_ctor_set(v___x_1866_, 1, v___x_1865_);
lean_inc(v___y_1857_);
lean_inc_ref(v___y_1853_);
lean_inc(v___y_1858_);
lean_inc_ref(v___y_1847_);
v___x_1867_ = l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8(v___x_1842_, v___y_1849_, v___y_1852_, v___y_1848_, v___y_1844_, v___y_1855_, v___y_1851_, v___x_1866_, v___y_1845_, v___y_1846_, v___y_1847_, v___y_1858_, v___y_1853_, v___y_1857_);
lean_dec_ref(v___y_1848_);
v___y_1832_ = v___y_1853_;
v___y_1833_ = v___y_1854_;
v___y_1834_ = v___y_1847_;
v___y_1835_ = v___y_1856_;
v___y_1836_ = v___y_1857_;
v___y_1837_ = v___y_1858_;
v___y_1838_ = v___x_1867_;
goto v___jp_1831_;
}
v___jp_1868_:
{
lean_object* v___x_1885_; double v___x_1886_; double v___x_1887_; double v___x_1888_; double v___x_1889_; double v___x_1890_; lean_object* v___x_1891_; lean_object* v___x_1892_; lean_object* v___x_1893_; lean_object* v___x_1894_; lean_object* v___x_1895_; 
v___x_1885_ = lean_io_mono_nanos_now();
v___x_1886_ = lean_float_of_nat(v___y_1873_);
v___x_1887_ = lean_float_once(&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__7, &l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__7_once, _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__7);
v___x_1888_ = lean_float_div(v___x_1886_, v___x_1887_);
v___x_1889_ = lean_float_of_nat(v___x_1885_);
v___x_1890_ = lean_float_div(v___x_1889_, v___x_1887_);
v___x_1891_ = lean_box_float(v___x_1888_);
v___x_1892_ = lean_box_float(v___x_1890_);
v___x_1893_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_1893_, 0, v___x_1891_);
lean_ctor_set(v___x_1893_, 1, v___x_1892_);
v___x_1894_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_1894_, 0, v_a_1884_);
lean_ctor_set(v___x_1894_, 1, v___x_1893_);
lean_inc(v___y_1882_);
lean_inc_ref(v___y_1878_);
lean_inc(v___y_1883_);
lean_inc_ref(v___y_1872_);
v___x_1895_ = l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8(v___x_1842_, v___y_1875_, v___y_1877_, v___y_1874_, v___y_1869_, v___y_1880_, v___y_1876_, v___x_1894_, v___y_1870_, v___y_1871_, v___y_1872_, v___y_1883_, v___y_1878_, v___y_1882_);
lean_dec_ref(v___y_1874_);
v___y_1832_ = v___y_1878_;
v___y_1833_ = v___y_1879_;
v___y_1834_ = v___y_1872_;
v___y_1835_ = v___y_1881_;
v___y_1836_ = v___y_1882_;
v___y_1837_ = v___y_1883_;
v___y_1838_ = v___x_1895_;
goto v___jp_1831_;
}
v___jp_1896_:
{
lean_object* v___x_1911_; 
v___x_1911_ = l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__6___redArg(v___y_1909_);
if (lean_obj_tag(v___x_1911_) == 0)
{
lean_object* v_a_1912_; lean_object* v___x_1913_; uint8_t v___x_1914_; 
v_a_1912_ = lean_ctor_get(v___x_1911_, 0);
lean_inc(v_a_1912_);
lean_dec_ref(v___x_1911_);
v___x_1913_ = l_Lean_trace_profiler_useHeartbeats;
v___x_1914_ = l_Lean_Option_get___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__7(v___y_1901_, v___x_1913_);
if (v___x_1914_ == 0)
{
lean_object* v___x_1915_; lean_object* v___x_1916_; 
v___x_1915_ = lean_io_mono_nanos_now();
lean_inc(v___y_1909_);
lean_inc_ref(v___y_1906_);
lean_inc(v___y_1910_);
lean_inc_ref(v___y_1900_);
lean_inc(v___y_1899_);
lean_inc_ref(v___y_1897_);
lean_inc(v_className_1750_);
lean_inc_ref(v_declVal_1745_);
lean_inc(v_declName_1744_);
v___x_1916_ = l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go(v_declName_1744_, v_declVal_1745_, v_cls_1746_, v_xs_1747_, v_bis_1748_, v_classExpr_1749_, v_className_1750_, v_instVal_1751_, v_instMVars_1752_, v___y_1903_, v___y_1897_, v___y_1899_, v___y_1900_, v___y_1910_, v___y_1906_, v___y_1909_);
if (lean_obj_tag(v___x_1916_) == 0)
{
lean_object* v_a_1917_; lean_object* v___x_1919_; uint8_t v_isShared_1920_; uint8_t v_isSharedCheck_1924_; 
v_a_1917_ = lean_ctor_get(v___x_1916_, 0);
v_isSharedCheck_1924_ = !lean_is_exclusive(v___x_1916_);
if (v_isSharedCheck_1924_ == 0)
{
v___x_1919_ = v___x_1916_;
v_isShared_1920_ = v_isSharedCheck_1924_;
goto v_resetjp_1918_;
}
else
{
lean_inc(v_a_1917_);
lean_dec(v___x_1916_);
v___x_1919_ = lean_box(0);
v_isShared_1920_ = v_isSharedCheck_1924_;
goto v_resetjp_1918_;
}
v_resetjp_1918_:
{
lean_object* v___x_1922_; 
if (v_isShared_1920_ == 0)
{
lean_ctor_set_tag(v___x_1919_, 1);
v___x_1922_ = v___x_1919_;
goto v_reusejp_1921_;
}
else
{
lean_object* v_reuseFailAlloc_1923_; 
v_reuseFailAlloc_1923_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1923_, 0, v_a_1917_);
v___x_1922_ = v_reuseFailAlloc_1923_;
goto v_reusejp_1921_;
}
v_reusejp_1921_:
{
v___y_1869_ = v___y_1898_;
v___y_1870_ = v___y_1897_;
v___y_1871_ = v___y_1899_;
v___y_1872_ = v___y_1900_;
v___y_1873_ = v___x_1915_;
v___y_1874_ = v___y_1901_;
v___y_1875_ = v___y_1902_;
v___y_1876_ = v___y_1904_;
v___y_1877_ = v___y_1905_;
v___y_1878_ = v___y_1906_;
v___y_1879_ = v___y_1907_;
v___y_1880_ = v_a_1912_;
v___y_1881_ = v___y_1908_;
v___y_1882_ = v___y_1909_;
v___y_1883_ = v___y_1910_;
v_a_1884_ = v___x_1922_;
goto v___jp_1868_;
}
}
}
else
{
lean_object* v_a_1925_; lean_object* v___x_1927_; uint8_t v_isShared_1928_; uint8_t v_isSharedCheck_1932_; 
v_a_1925_ = lean_ctor_get(v___x_1916_, 0);
v_isSharedCheck_1932_ = !lean_is_exclusive(v___x_1916_);
if (v_isSharedCheck_1932_ == 0)
{
v___x_1927_ = v___x_1916_;
v_isShared_1928_ = v_isSharedCheck_1932_;
goto v_resetjp_1926_;
}
else
{
lean_inc(v_a_1925_);
lean_dec(v___x_1916_);
v___x_1927_ = lean_box(0);
v_isShared_1928_ = v_isSharedCheck_1932_;
goto v_resetjp_1926_;
}
v_resetjp_1926_:
{
lean_object* v___x_1930_; 
if (v_isShared_1928_ == 0)
{
lean_ctor_set_tag(v___x_1927_, 0);
v___x_1930_ = v___x_1927_;
goto v_reusejp_1929_;
}
else
{
lean_object* v_reuseFailAlloc_1931_; 
v_reuseFailAlloc_1931_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1931_, 0, v_a_1925_);
v___x_1930_ = v_reuseFailAlloc_1931_;
goto v_reusejp_1929_;
}
v_reusejp_1929_:
{
v___y_1869_ = v___y_1898_;
v___y_1870_ = v___y_1897_;
v___y_1871_ = v___y_1899_;
v___y_1872_ = v___y_1900_;
v___y_1873_ = v___x_1915_;
v___y_1874_ = v___y_1901_;
v___y_1875_ = v___y_1902_;
v___y_1876_ = v___y_1904_;
v___y_1877_ = v___y_1905_;
v___y_1878_ = v___y_1906_;
v___y_1879_ = v___y_1907_;
v___y_1880_ = v_a_1912_;
v___y_1881_ = v___y_1908_;
v___y_1882_ = v___y_1909_;
v___y_1883_ = v___y_1910_;
v_a_1884_ = v___x_1930_;
goto v___jp_1868_;
}
}
}
}
else
{
lean_object* v___x_1933_; lean_object* v___x_1934_; 
v___x_1933_ = lean_io_get_num_heartbeats();
lean_inc(v___y_1909_);
lean_inc_ref(v___y_1906_);
lean_inc(v___y_1910_);
lean_inc_ref(v___y_1900_);
lean_inc(v___y_1899_);
lean_inc_ref(v___y_1897_);
lean_inc(v_className_1750_);
lean_inc_ref(v_declVal_1745_);
lean_inc(v_declName_1744_);
v___x_1934_ = l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go(v_declName_1744_, v_declVal_1745_, v_cls_1746_, v_xs_1747_, v_bis_1748_, v_classExpr_1749_, v_className_1750_, v_instVal_1751_, v_instMVars_1752_, v___y_1903_, v___y_1897_, v___y_1899_, v___y_1900_, v___y_1910_, v___y_1906_, v___y_1909_);
if (lean_obj_tag(v___x_1934_) == 0)
{
lean_object* v_a_1935_; lean_object* v___x_1937_; uint8_t v_isShared_1938_; uint8_t v_isSharedCheck_1942_; 
v_a_1935_ = lean_ctor_get(v___x_1934_, 0);
v_isSharedCheck_1942_ = !lean_is_exclusive(v___x_1934_);
if (v_isSharedCheck_1942_ == 0)
{
v___x_1937_ = v___x_1934_;
v_isShared_1938_ = v_isSharedCheck_1942_;
goto v_resetjp_1936_;
}
else
{
lean_inc(v_a_1935_);
lean_dec(v___x_1934_);
v___x_1937_ = lean_box(0);
v_isShared_1938_ = v_isSharedCheck_1942_;
goto v_resetjp_1936_;
}
v_resetjp_1936_:
{
lean_object* v___x_1940_; 
if (v_isShared_1938_ == 0)
{
lean_ctor_set_tag(v___x_1937_, 1);
v___x_1940_ = v___x_1937_;
goto v_reusejp_1939_;
}
else
{
lean_object* v_reuseFailAlloc_1941_; 
v_reuseFailAlloc_1941_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1941_, 0, v_a_1935_);
v___x_1940_ = v_reuseFailAlloc_1941_;
goto v_reusejp_1939_;
}
v_reusejp_1939_:
{
v___y_1844_ = v___y_1898_;
v___y_1845_ = v___y_1897_;
v___y_1846_ = v___y_1899_;
v___y_1847_ = v___y_1900_;
v___y_1848_ = v___y_1901_;
v___y_1849_ = v___y_1902_;
v___y_1850_ = v___x_1933_;
v___y_1851_ = v___y_1904_;
v___y_1852_ = v___y_1905_;
v___y_1853_ = v___y_1906_;
v___y_1854_ = v___y_1907_;
v___y_1855_ = v_a_1912_;
v___y_1856_ = v___y_1908_;
v___y_1857_ = v___y_1909_;
v___y_1858_ = v___y_1910_;
v_a_1859_ = v___x_1940_;
goto v___jp_1843_;
}
}
}
else
{
lean_object* v_a_1943_; lean_object* v___x_1945_; uint8_t v_isShared_1946_; uint8_t v_isSharedCheck_1950_; 
v_a_1943_ = lean_ctor_get(v___x_1934_, 0);
v_isSharedCheck_1950_ = !lean_is_exclusive(v___x_1934_);
if (v_isSharedCheck_1950_ == 0)
{
v___x_1945_ = v___x_1934_;
v_isShared_1946_ = v_isSharedCheck_1950_;
goto v_resetjp_1944_;
}
else
{
lean_inc(v_a_1943_);
lean_dec(v___x_1934_);
v___x_1945_ = lean_box(0);
v_isShared_1946_ = v_isSharedCheck_1950_;
goto v_resetjp_1944_;
}
v_resetjp_1944_:
{
lean_object* v___x_1948_; 
if (v_isShared_1946_ == 0)
{
lean_ctor_set_tag(v___x_1945_, 0);
v___x_1948_ = v___x_1945_;
goto v_reusejp_1947_;
}
else
{
lean_object* v_reuseFailAlloc_1949_; 
v_reuseFailAlloc_1949_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1949_, 0, v_a_1943_);
v___x_1948_ = v_reuseFailAlloc_1949_;
goto v_reusejp_1947_;
}
v_reusejp_1947_:
{
v___y_1844_ = v___y_1898_;
v___y_1845_ = v___y_1897_;
v___y_1846_ = v___y_1899_;
v___y_1847_ = v___y_1900_;
v___y_1848_ = v___y_1901_;
v___y_1849_ = v___y_1902_;
v___y_1850_ = v___x_1933_;
v___y_1851_ = v___y_1904_;
v___y_1852_ = v___y_1905_;
v___y_1853_ = v___y_1906_;
v___y_1854_ = v___y_1907_;
v___y_1855_ = v_a_1912_;
v___y_1856_ = v___y_1908_;
v___y_1857_ = v___y_1909_;
v___y_1858_ = v___y_1910_;
v_a_1859_ = v___x_1948_;
goto v___jp_1843_;
}
}
}
}
}
else
{
lean_object* v_a_1951_; 
lean_dec_ref(v___y_1905_);
lean_dec_ref(v___y_1904_);
lean_dec_ref(v___y_1903_);
lean_dec_ref(v___y_1901_);
lean_dec(v___y_1899_);
lean_dec_ref(v___y_1897_);
lean_dec_ref(v_instVal_1751_);
lean_dec_ref(v_classExpr_1749_);
lean_dec_ref(v_bis_1748_);
lean_dec_ref(v_xs_1747_);
lean_dec_ref(v_cls_1746_);
v_a_1951_ = lean_ctor_get(v___x_1911_, 0);
lean_inc(v_a_1951_);
lean_dec_ref(v___x_1911_);
v___y_1822_ = v___y_1906_;
v___y_1823_ = v___y_1907_;
v___y_1824_ = v___y_1900_;
v___y_1825_ = v___y_1908_;
v___y_1826_ = v___y_1909_;
v___y_1827_ = v___y_1910_;
v_a_1828_ = v_a_1951_;
goto v___jp_1821_;
}
}
v___jp_1952_:
{
lean_object* v___x_1959_; 
v___x_1959_ = l_Lean_Elab_Term_saveState___redArg(v___y_1954_, v___y_1956_, v___y_1958_);
if (lean_obj_tag(v___x_1959_) == 0)
{
lean_object* v_a_1960_; lean_object* v___x_1961_; 
v_a_1960_ = lean_ctor_get(v___x_1959_, 0);
lean_inc(v_a_1960_);
lean_dec_ref(v___x_1959_);
lean_inc(v___y_1958_);
lean_inc_ref(v___y_1957_);
lean_inc(v___y_1956_);
lean_inc_ref(v___y_1955_);
lean_inc(v_a_1841_);
v___x_1961_ = lean_infer_type(v_a_1841_, v___y_1955_, v___y_1956_, v___y_1957_, v___y_1958_);
if (lean_obj_tag(v___x_1961_) == 0)
{
lean_object* v_a_1962_; uint8_t v___x_1963_; lean_object* v___x_1964_; lean_object* v___x_1965_; lean_object* v___x_1966_; lean_object* v___x_1967_; lean_object* v___x_1968_; lean_object* v___x_1969_; lean_object* v___x_1970_; lean_object* v___x_1971_; lean_object* v___x_1972_; lean_object* v___x_1973_; lean_object* v___x_1974_; lean_object* v___x_1975_; lean_object* v___x_1976_; size_t v_sz_1977_; size_t v___x_1978_; lean_object* v___x_1979_; 
v_a_1962_ = lean_ctor_get(v___x_1961_, 0);
lean_inc(v_a_1962_);
lean_dec_ref(v___x_1961_);
v___x_1963_ = 0;
v___x_1964_ = lean_unsigned_to_nat(0u);
v___x_1965_ = lean_obj_once(&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__10, &l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__10_once, _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__10);
v___x_1966_ = lean_array_get_size(v_bis_1748_);
lean_inc_ref(v_bis_1748_);
v___x_1967_ = l_Array_toSubarray___redArg(v_bis_1748_, v___x_1964_, v___x_1966_);
v___x_1968_ = lean_array_get_size(v_xs_1747_);
v___x_1969_ = ((lean_object*)(l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__11));
v___x_1970_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_1970_, 0, v___x_1969_);
lean_ctor_set(v___x_1970_, 1, v___x_1968_);
v___x_1971_ = lean_box(0);
lean_inc_ref(v___x_1967_);
v___x_1972_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_1972_, 0, v___x_1967_);
lean_ctor_set(v___x_1972_, 1, v___x_1970_);
v___x_1973_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_1973_, 0, v___x_1965_);
lean_ctor_set(v___x_1973_, 1, v___x_1972_);
v___x_1974_ = lean_box(v___x_1963_);
v___x_1975_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_1975_, 0, v___x_1974_);
lean_ctor_set(v___x_1975_, 1, v___x_1973_);
v___x_1976_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_1976_, 0, v___x_1971_);
lean_ctor_set(v___x_1976_, 1, v___x_1975_);
v_sz_1977_ = lean_array_size(v_xs_1747_);
v___x_1978_ = ((size_t)0ULL);
lean_inc(v___y_1958_);
lean_inc_ref(v___y_1957_);
lean_inc(v___y_1956_);
lean_inc_ref(v___y_1955_);
lean_inc(v___y_1954_);
lean_inc_ref(v___y_1953_);
lean_inc_ref(v_classExpr_1749_);
lean_inc_ref(v_instVal_1751_);
lean_inc_ref(v_cls_1746_);
lean_inc(v_declName_1744_);
lean_inc(v_className_1750_);
lean_inc(v_a_1841_);
lean_inc_ref(v_declVal_1745_);
lean_inc_ref(v_xs_1747_);
v___x_1979_ = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5(v_a_1960_, v_xs_1747_, v_declVal_1745_, v___x_1967_, v_a_1841_, v_className_1750_, v_declName_1744_, v_cls_1746_, v_instVal_1751_, v_classExpr_1749_, v_instMVars_1752_, v_a_1962_, v_xs_1747_, v_sz_1977_, v___x_1978_, v___x_1976_, v___y_1953_, v___y_1954_, v___y_1955_, v___y_1956_, v___y_1957_, v___y_1958_);
if (lean_obj_tag(v___x_1979_) == 0)
{
lean_object* v_a_1980_; lean_object* v___x_1982_; uint8_t v_isShared_1983_; uint8_t v_isSharedCheck_2012_; 
v_a_1980_ = lean_ctor_get(v___x_1979_, 0);
v_isSharedCheck_2012_ = !lean_is_exclusive(v___x_1979_);
if (v_isSharedCheck_2012_ == 0)
{
v___x_1982_ = v___x_1979_;
v_isShared_1983_ = v_isSharedCheck_2012_;
goto v_resetjp_1981_;
}
else
{
lean_inc(v_a_1980_);
lean_dec(v___x_1979_);
v___x_1982_ = lean_box(0);
v_isShared_1983_ = v_isSharedCheck_2012_;
goto v_resetjp_1981_;
}
v_resetjp_1981_:
{
lean_object* v_fst_1984_; 
v_fst_1984_ = lean_ctor_get(v_a_1980_, 0);
if (lean_obj_tag(v_fst_1984_) == 0)
{
lean_object* v_snd_1985_; lean_object* v_snd_1986_; lean_object* v_fst_1987_; lean_object* v_fst_1988_; lean_object* v___x_1989_; 
lean_del_object(v___x_1982_);
v_snd_1985_ = lean_ctor_get(v_a_1980_, 1);
lean_inc(v_snd_1985_);
lean_dec(v_a_1980_);
v_snd_1986_ = lean_ctor_get(v_snd_1985_, 1);
lean_inc(v_snd_1986_);
v_fst_1987_ = lean_ctor_get(v_snd_1985_, 0);
lean_inc(v_fst_1987_);
lean_dec(v_snd_1985_);
v_fst_1988_ = lean_ctor_get(v_snd_1986_, 0);
lean_inc(v_fst_1988_);
lean_dec(v_snd_1986_);
lean_inc(v___y_1958_);
lean_inc_ref(v___y_1957_);
lean_inc(v___y_1956_);
lean_inc_ref(v___y_1955_);
v___x_1989_ = l_Lean_Meta_unfoldDefinition_x3f(v_a_1841_, v___x_1963_, v___y_1955_, v___y_1956_, v___y_1957_, v___y_1958_);
if (lean_obj_tag(v___x_1989_) == 0)
{
lean_object* v_a_1990_; 
v_a_1990_ = lean_ctor_get(v___x_1989_, 0);
lean_inc(v_a_1990_);
lean_dec_ref(v___x_1989_);
if (lean_obj_tag(v_a_1990_) == 1)
{
lean_object* v_options_1991_; uint8_t v_hasTrace_1992_; 
v_options_1991_ = lean_ctor_get(v___y_1957_, 2);
v_hasTrace_1992_ = lean_ctor_get_uint8(v_options_1991_, sizeof(void*)*1);
if (v_hasTrace_1992_ == 0)
{
lean_object* v_val_1993_; lean_object* v___x_1994_; 
v_val_1993_ = lean_ctor_get(v_a_1990_, 0);
lean_inc(v_val_1993_);
lean_dec_ref(v_a_1990_);
lean_inc(v___y_1958_);
lean_inc_ref(v___y_1957_);
lean_inc(v___y_1956_);
lean_inc_ref(v___y_1955_);
lean_inc(v_className_1750_);
lean_inc_ref(v_declVal_1745_);
lean_inc(v_declName_1744_);
v___x_1994_ = l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go(v_declName_1744_, v_declVal_1745_, v_cls_1746_, v_xs_1747_, v_bis_1748_, v_classExpr_1749_, v_className_1750_, v_instVal_1751_, v_instMVars_1752_, v_val_1993_, v___y_1953_, v___y_1954_, v___y_1955_, v___y_1956_, v___y_1957_, v___y_1958_);
v___y_1832_ = v___y_1957_;
v___y_1833_ = v_fst_1987_;
v___y_1834_ = v___y_1955_;
v___y_1835_ = v_fst_1988_;
v___y_1836_ = v___y_1958_;
v___y_1837_ = v___y_1956_;
v___y_1838_ = v___x_1994_;
goto v___jp_1831_;
}
else
{
lean_object* v_val_1995_; lean_object* v___x_1996_; 
v_val_1995_ = lean_ctor_get(v_a_1990_, 0);
lean_inc(v_val_1995_);
lean_dec_ref(v_a_1990_);
v___x_1996_ = l_Lean_isTracingEnabledFor___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__2___redArg(v___x_1842_, v___y_1957_);
if (lean_obj_tag(v___x_1996_) == 0)
{
lean_object* v_a_1997_; lean_object* v___f_1998_; lean_object* v___x_1999_; uint8_t v___x_2000_; 
v_a_1997_ = lean_ctor_get(v___x_1996_, 0);
lean_inc(v_a_1997_);
lean_dec_ref(v___x_1996_);
lean_inc(v_val_1995_);
v___f_1998_ = lean_alloc_closure((void*)(l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___lam__0___boxed), 9, 1);
lean_closure_set(v___f_1998_, 0, v_val_1995_);
v___x_1999_ = ((lean_object*)(l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg___closed__1));
v___x_2000_ = lean_unbox(v_a_1997_);
if (v___x_2000_ == 0)
{
lean_object* v___x_2001_; uint8_t v___x_2002_; 
v___x_2001_ = l_Lean_trace_profiler;
v___x_2002_ = l_Lean_Option_get___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__7(v_options_1991_, v___x_2001_);
if (v___x_2002_ == 0)
{
lean_object* v___x_2003_; 
lean_dec_ref(v___f_1998_);
lean_dec(v_a_1997_);
lean_inc(v___y_1958_);
lean_inc_ref(v___y_1957_);
lean_inc(v___y_1956_);
lean_inc_ref(v___y_1955_);
lean_inc(v_className_1750_);
lean_inc_ref(v_declVal_1745_);
lean_inc(v_declName_1744_);
v___x_2003_ = l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go(v_declName_1744_, v_declVal_1745_, v_cls_1746_, v_xs_1747_, v_bis_1748_, v_classExpr_1749_, v_className_1750_, v_instVal_1751_, v_instMVars_1752_, v_val_1995_, v___y_1953_, v___y_1954_, v___y_1955_, v___y_1956_, v___y_1957_, v___y_1958_);
v___y_1832_ = v___y_1957_;
v___y_1833_ = v_fst_1987_;
v___y_1834_ = v___y_1955_;
v___y_1835_ = v_fst_1988_;
v___y_1836_ = v___y_1958_;
v___y_1837_ = v___y_1956_;
v___y_1838_ = v___x_2003_;
goto v___jp_1831_;
}
else
{
uint8_t v___x_2004_; 
lean_inc_ref(v_options_1991_);
v___x_2004_ = lean_unbox(v_a_1997_);
lean_dec(v_a_1997_);
v___y_1897_ = v___y_1953_;
v___y_1898_ = v___x_2004_;
v___y_1899_ = v___y_1954_;
v___y_1900_ = v___y_1955_;
v___y_1901_ = v_options_1991_;
v___y_1902_ = v_hasTrace_1992_;
v___y_1903_ = v_val_1995_;
v___y_1904_ = v___f_1998_;
v___y_1905_ = v___x_1999_;
v___y_1906_ = v___y_1957_;
v___y_1907_ = v_fst_1987_;
v___y_1908_ = v_fst_1988_;
v___y_1909_ = v___y_1958_;
v___y_1910_ = v___y_1956_;
goto v___jp_1896_;
}
}
else
{
uint8_t v___x_2005_; 
lean_inc_ref(v_options_1991_);
v___x_2005_ = lean_unbox(v_a_1997_);
lean_dec(v_a_1997_);
v___y_1897_ = v___y_1953_;
v___y_1898_ = v___x_2005_;
v___y_1899_ = v___y_1954_;
v___y_1900_ = v___y_1955_;
v___y_1901_ = v_options_1991_;
v___y_1902_ = v_hasTrace_1992_;
v___y_1903_ = v_val_1995_;
v___y_1904_ = v___f_1998_;
v___y_1905_ = v___x_1999_;
v___y_1906_ = v___y_1957_;
v___y_1907_ = v_fst_1987_;
v___y_1908_ = v_fst_1988_;
v___y_1909_ = v___y_1958_;
v___y_1910_ = v___y_1956_;
goto v___jp_1896_;
}
}
else
{
lean_object* v_a_2006_; 
lean_dec(v_val_1995_);
lean_dec(v___y_1954_);
lean_dec_ref(v___y_1953_);
lean_dec_ref(v_instVal_1751_);
lean_dec_ref(v_classExpr_1749_);
lean_dec_ref(v_bis_1748_);
lean_dec_ref(v_xs_1747_);
lean_dec_ref(v_cls_1746_);
v_a_2006_ = lean_ctor_get(v___x_1996_, 0);
lean_inc(v_a_2006_);
lean_dec_ref(v___x_1996_);
v___y_1822_ = v___y_1957_;
v___y_1823_ = v_fst_1987_;
v___y_1824_ = v___y_1955_;
v___y_1825_ = v_fst_1988_;
v___y_1826_ = v___y_1958_;
v___y_1827_ = v___y_1956_;
v_a_1828_ = v_a_2006_;
goto v___jp_1821_;
}
}
}
else
{
lean_dec(v_a_1990_);
lean_dec(v___y_1954_);
lean_dec_ref(v___y_1953_);
lean_dec_ref(v_instVal_1751_);
lean_dec_ref(v_classExpr_1749_);
lean_dec_ref(v_bis_1748_);
lean_dec_ref(v_xs_1747_);
lean_dec_ref(v_cls_1746_);
v___y_1762_ = v___y_1957_;
v___y_1763_ = v_fst_1987_;
v___y_1764_ = v___y_1955_;
v___y_1765_ = v_fst_1988_;
v___y_1766_ = v___y_1958_;
v___y_1767_ = v___y_1956_;
goto v___jp_1761_;
}
}
else
{
lean_object* v_a_2007_; 
lean_dec(v___y_1954_);
lean_dec_ref(v___y_1953_);
lean_dec_ref(v_instVal_1751_);
lean_dec_ref(v_classExpr_1749_);
lean_dec_ref(v_bis_1748_);
lean_dec_ref(v_xs_1747_);
lean_dec_ref(v_cls_1746_);
v_a_2007_ = lean_ctor_get(v___x_1989_, 0);
lean_inc(v_a_2007_);
lean_dec_ref(v___x_1989_);
v___y_1822_ = v___y_1957_;
v___y_1823_ = v_fst_1987_;
v___y_1824_ = v___y_1955_;
v___y_1825_ = v_fst_1988_;
v___y_1826_ = v___y_1958_;
v___y_1827_ = v___y_1956_;
v_a_1828_ = v_a_2007_;
goto v___jp_1821_;
}
}
else
{
lean_object* v_val_2008_; lean_object* v___x_2010_; 
lean_inc_ref(v_fst_1984_);
lean_dec(v_a_1980_);
lean_dec(v___y_1958_);
lean_dec_ref(v___y_1957_);
lean_dec(v___y_1956_);
lean_dec_ref(v___y_1955_);
lean_dec(v___y_1954_);
lean_dec_ref(v___y_1953_);
lean_dec(v_a_1841_);
lean_dec_ref(v_instVal_1751_);
lean_dec(v_className_1750_);
lean_dec_ref(v_classExpr_1749_);
lean_dec_ref(v_bis_1748_);
lean_dec_ref(v_xs_1747_);
lean_dec_ref(v_cls_1746_);
lean_dec_ref(v_declVal_1745_);
lean_dec(v_declName_1744_);
v_val_2008_ = lean_ctor_get(v_fst_1984_, 0);
lean_inc(v_val_2008_);
lean_dec_ref(v_fst_1984_);
if (v_isShared_1983_ == 0)
{
lean_ctor_set(v___x_1982_, 0, v_val_2008_);
v___x_2010_ = v___x_1982_;
goto v_reusejp_2009_;
}
else
{
lean_object* v_reuseFailAlloc_2011_; 
v_reuseFailAlloc_2011_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2011_, 0, v_val_2008_);
v___x_2010_ = v_reuseFailAlloc_2011_;
goto v_reusejp_2009_;
}
v_reusejp_2009_:
{
return v___x_2010_;
}
}
}
}
else
{
lean_object* v_a_2013_; lean_object* v___x_2015_; uint8_t v_isShared_2016_; uint8_t v_isSharedCheck_2020_; 
lean_dec(v___y_1958_);
lean_dec_ref(v___y_1957_);
lean_dec(v___y_1956_);
lean_dec_ref(v___y_1955_);
lean_dec(v___y_1954_);
lean_dec_ref(v___y_1953_);
lean_dec(v_a_1841_);
lean_dec_ref(v_instVal_1751_);
lean_dec(v_className_1750_);
lean_dec_ref(v_classExpr_1749_);
lean_dec_ref(v_bis_1748_);
lean_dec_ref(v_xs_1747_);
lean_dec_ref(v_cls_1746_);
lean_dec_ref(v_declVal_1745_);
lean_dec(v_declName_1744_);
v_a_2013_ = lean_ctor_get(v___x_1979_, 0);
v_isSharedCheck_2020_ = !lean_is_exclusive(v___x_1979_);
if (v_isSharedCheck_2020_ == 0)
{
v___x_2015_ = v___x_1979_;
v_isShared_2016_ = v_isSharedCheck_2020_;
goto v_resetjp_2014_;
}
else
{
lean_inc(v_a_2013_);
lean_dec(v___x_1979_);
v___x_2015_ = lean_box(0);
v_isShared_2016_ = v_isSharedCheck_2020_;
goto v_resetjp_2014_;
}
v_resetjp_2014_:
{
lean_object* v___x_2018_; 
if (v_isShared_2016_ == 0)
{
v___x_2018_ = v___x_2015_;
goto v_reusejp_2017_;
}
else
{
lean_object* v_reuseFailAlloc_2019_; 
v_reuseFailAlloc_2019_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2019_, 0, v_a_2013_);
v___x_2018_ = v_reuseFailAlloc_2019_;
goto v_reusejp_2017_;
}
v_reusejp_2017_:
{
return v___x_2018_;
}
}
}
}
else
{
lean_object* v_a_2021_; lean_object* v___x_2023_; uint8_t v_isShared_2024_; uint8_t v_isSharedCheck_2028_; 
lean_dec(v_a_1960_);
lean_dec(v___y_1958_);
lean_dec_ref(v___y_1957_);
lean_dec(v___y_1956_);
lean_dec_ref(v___y_1955_);
lean_dec(v___y_1954_);
lean_dec_ref(v___y_1953_);
lean_dec(v_a_1841_);
lean_dec_ref(v_instVal_1751_);
lean_dec(v_className_1750_);
lean_dec_ref(v_classExpr_1749_);
lean_dec_ref(v_bis_1748_);
lean_dec_ref(v_xs_1747_);
lean_dec_ref(v_cls_1746_);
lean_dec_ref(v_declVal_1745_);
lean_dec(v_declName_1744_);
v_a_2021_ = lean_ctor_get(v___x_1961_, 0);
v_isSharedCheck_2028_ = !lean_is_exclusive(v___x_1961_);
if (v_isSharedCheck_2028_ == 0)
{
v___x_2023_ = v___x_1961_;
v_isShared_2024_ = v_isSharedCheck_2028_;
goto v_resetjp_2022_;
}
else
{
lean_inc(v_a_2021_);
lean_dec(v___x_1961_);
v___x_2023_ = lean_box(0);
v_isShared_2024_ = v_isSharedCheck_2028_;
goto v_resetjp_2022_;
}
v_resetjp_2022_:
{
lean_object* v___x_2026_; 
if (v_isShared_2024_ == 0)
{
v___x_2026_ = v___x_2023_;
goto v_reusejp_2025_;
}
else
{
lean_object* v_reuseFailAlloc_2027_; 
v_reuseFailAlloc_2027_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2027_, 0, v_a_2021_);
v___x_2026_ = v_reuseFailAlloc_2027_;
goto v_reusejp_2025_;
}
v_reusejp_2025_:
{
return v___x_2026_;
}
}
}
}
else
{
lean_object* v_a_2029_; lean_object* v___x_2031_; uint8_t v_isShared_2032_; uint8_t v_isSharedCheck_2036_; 
lean_dec(v___y_1958_);
lean_dec_ref(v___y_1957_);
lean_dec(v___y_1956_);
lean_dec_ref(v___y_1955_);
lean_dec(v___y_1954_);
lean_dec_ref(v___y_1953_);
lean_dec(v_a_1841_);
lean_dec_ref(v_instVal_1751_);
lean_dec(v_className_1750_);
lean_dec_ref(v_classExpr_1749_);
lean_dec_ref(v_bis_1748_);
lean_dec_ref(v_xs_1747_);
lean_dec_ref(v_cls_1746_);
lean_dec_ref(v_declVal_1745_);
lean_dec(v_declName_1744_);
v_a_2029_ = lean_ctor_get(v___x_1959_, 0);
v_isSharedCheck_2036_ = !lean_is_exclusive(v___x_1959_);
if (v_isSharedCheck_2036_ == 0)
{
v___x_2031_ = v___x_1959_;
v_isShared_2032_ = v_isSharedCheck_2036_;
goto v_resetjp_2030_;
}
else
{
lean_inc(v_a_2029_);
lean_dec(v___x_1959_);
v___x_2031_ = lean_box(0);
v_isShared_2032_ = v_isSharedCheck_2036_;
goto v_resetjp_2030_;
}
v_resetjp_2030_:
{
lean_object* v___x_2034_; 
if (v_isShared_2032_ == 0)
{
v___x_2034_ = v___x_2031_;
goto v_reusejp_2033_;
}
else
{
lean_object* v_reuseFailAlloc_2035_; 
v_reuseFailAlloc_2035_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2035_, 0, v_a_2029_);
v___x_2034_ = v_reuseFailAlloc_2035_;
goto v_reusejp_2033_;
}
v_reusejp_2033_:
{
return v___x_2034_;
}
}
}
}
}
else
{
lean_object* v_a_2064_; lean_object* v___x_2066_; uint8_t v_isShared_2067_; uint8_t v_isSharedCheck_2071_; 
lean_dec(v_a_1759_);
lean_dec_ref(v_a_1758_);
lean_dec(v_a_1757_);
lean_dec_ref(v_a_1756_);
lean_dec(v_a_1755_);
lean_dec_ref(v_a_1754_);
lean_dec_ref(v_instVal_1751_);
lean_dec(v_className_1750_);
lean_dec_ref(v_classExpr_1749_);
lean_dec_ref(v_bis_1748_);
lean_dec_ref(v_xs_1747_);
lean_dec_ref(v_cls_1746_);
lean_dec_ref(v_declVal_1745_);
lean_dec(v_declName_1744_);
v_a_2064_ = lean_ctor_get(v___x_1840_, 0);
v_isSharedCheck_2071_ = !lean_is_exclusive(v___x_1840_);
if (v_isSharedCheck_2071_ == 0)
{
v___x_2066_ = v___x_1840_;
v_isShared_2067_ = v_isSharedCheck_2071_;
goto v_resetjp_2065_;
}
else
{
lean_inc(v_a_2064_);
lean_dec(v___x_1840_);
v___x_2066_ = lean_box(0);
v_isShared_2067_ = v_isSharedCheck_2071_;
goto v_resetjp_2065_;
}
v_resetjp_2065_:
{
lean_object* v___x_2069_; 
if (v_isShared_2067_ == 0)
{
v___x_2069_ = v___x_2066_;
goto v_reusejp_2068_;
}
else
{
lean_object* v_reuseFailAlloc_2070_; 
v_reuseFailAlloc_2070_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2070_, 0, v_a_2064_);
v___x_2069_ = v_reuseFailAlloc_2070_;
goto v_reusejp_2068_;
}
v_reusejp_2068_:
{
return v___x_2069_;
}
}
}
v___jp_1761_:
{
uint8_t v___x_1768_; 
v___x_1768_ = lean_unbox(v___y_1763_);
lean_dec(v___y_1763_);
if (v___x_1768_ == 0)
{
lean_object* v___x_1769_; lean_object* v___x_1770_; lean_object* v___x_1771_; lean_object* v___x_1772_; lean_object* v___x_1773_; lean_object* v___x_1774_; lean_object* v___x_1775_; lean_object* v___x_1776_; 
lean_dec(v___y_1765_);
v___x_1769_ = lean_obj_once(&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__1, &l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__1_once, _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__1);
v___x_1770_ = l_Lean_indentExpr(v_declVal_1745_);
v___x_1771_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_1771_, 0, v___x_1769_);
lean_ctor_set(v___x_1771_, 1, v___x_1770_);
v___x_1772_ = lean_obj_once(&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__3, &l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__3_once, _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__3);
v___x_1773_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_1773_, 0, v___x_1771_);
lean_ctor_set(v___x_1773_, 1, v___x_1772_);
v___x_1774_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_1774_, 0, v___x_1773_);
v___x_1775_ = lean_obj_once(&l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___closed__7, &l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___closed__7_once, _init_l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg___closed__7);
v___x_1776_ = l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg(v_className_1750_, v_declName_1744_, v___x_1774_, v___x_1775_, v___y_1764_, v___y_1767_, v___y_1762_, v___y_1766_);
lean_dec(v___y_1766_);
lean_dec_ref(v___y_1762_);
lean_dec(v___y_1767_);
lean_dec_ref(v___y_1764_);
lean_dec_ref(v___x_1774_);
return v___x_1776_;
}
else
{
lean_object* v___x_1777_; 
lean_dec_ref(v_declVal_1745_);
v___x_1777_ = l_Lean_Core_getMessageLog___redArg(v___y_1766_);
if (lean_obj_tag(v___x_1777_) == 0)
{
lean_object* v_a_1778_; lean_object* v___x_1779_; lean_object* v___x_1780_; 
v_a_1778_ = lean_ctor_get(v___x_1777_, 0);
lean_inc(v_a_1778_);
lean_dec_ref(v___x_1777_);
v___x_1779_ = l_Lean_MessageLog_append(v___y_1765_, v_a_1778_);
v___x_1780_ = l_Lean_Core_setMessageLog___redArg(v___x_1779_, v___y_1766_);
if (lean_obj_tag(v___x_1780_) == 0)
{
lean_object* v___x_1781_; lean_object* v___x_1782_; lean_object* v___x_1783_; 
lean_dec_ref(v___x_1780_);
v___x_1781_ = lean_box(0);
v___x_1782_ = lean_obj_once(&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__6, &l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__6_once, _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__6);
v___x_1783_ = l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg(v_className_1750_, v_declName_1744_, v___x_1781_, v___x_1782_, v___y_1764_, v___y_1767_, v___y_1762_, v___y_1766_);
lean_dec(v___y_1766_);
lean_dec_ref(v___y_1762_);
lean_dec(v___y_1767_);
lean_dec_ref(v___y_1764_);
return v___x_1783_;
}
else
{
lean_object* v_a_1784_; lean_object* v___x_1786_; uint8_t v_isShared_1787_; uint8_t v_isSharedCheck_1791_; 
lean_dec(v___y_1767_);
lean_dec(v___y_1766_);
lean_dec_ref(v___y_1764_);
lean_dec_ref(v___y_1762_);
lean_dec(v_className_1750_);
lean_dec(v_declName_1744_);
v_a_1784_ = lean_ctor_get(v___x_1780_, 0);
v_isSharedCheck_1791_ = !lean_is_exclusive(v___x_1780_);
if (v_isSharedCheck_1791_ == 0)
{
v___x_1786_ = v___x_1780_;
v_isShared_1787_ = v_isSharedCheck_1791_;
goto v_resetjp_1785_;
}
else
{
lean_inc(v_a_1784_);
lean_dec(v___x_1780_);
v___x_1786_ = lean_box(0);
v_isShared_1787_ = v_isSharedCheck_1791_;
goto v_resetjp_1785_;
}
v_resetjp_1785_:
{
lean_object* v___x_1789_; 
if (v_isShared_1787_ == 0)
{
v___x_1789_ = v___x_1786_;
goto v_reusejp_1788_;
}
else
{
lean_object* v_reuseFailAlloc_1790_; 
v_reuseFailAlloc_1790_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1790_, 0, v_a_1784_);
v___x_1789_ = v_reuseFailAlloc_1790_;
goto v_reusejp_1788_;
}
v_reusejp_1788_:
{
return v___x_1789_;
}
}
}
}
else
{
lean_object* v_a_1792_; lean_object* v___x_1794_; uint8_t v_isShared_1795_; uint8_t v_isSharedCheck_1799_; 
lean_dec(v___y_1767_);
lean_dec(v___y_1766_);
lean_dec(v___y_1765_);
lean_dec_ref(v___y_1764_);
lean_dec_ref(v___y_1762_);
lean_dec(v_className_1750_);
lean_dec(v_declName_1744_);
v_a_1792_ = lean_ctor_get(v___x_1777_, 0);
v_isSharedCheck_1799_ = !lean_is_exclusive(v___x_1777_);
if (v_isSharedCheck_1799_ == 0)
{
v___x_1794_ = v___x_1777_;
v_isShared_1795_ = v_isSharedCheck_1799_;
goto v_resetjp_1793_;
}
else
{
lean_inc(v_a_1792_);
lean_dec(v___x_1777_);
v___x_1794_ = lean_box(0);
v_isShared_1795_ = v_isSharedCheck_1799_;
goto v_resetjp_1793_;
}
v_resetjp_1793_:
{
lean_object* v___x_1797_; 
if (v_isShared_1795_ == 0)
{
v___x_1797_ = v___x_1794_;
goto v_reusejp_1796_;
}
else
{
lean_object* v_reuseFailAlloc_1798_; 
v_reuseFailAlloc_1798_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1798_, 0, v_a_1792_);
v___x_1797_ = v_reuseFailAlloc_1798_;
goto v_reusejp_1796_;
}
v_reusejp_1796_:
{
return v___x_1797_;
}
}
}
}
}
v___jp_1800_:
{
if (v___y_1808_ == 0)
{
uint8_t v___x_1809_; 
v___x_1809_ = l_Lean_MessageLog_hasErrors(v___y_1805_);
if (v___x_1809_ == 0)
{
lean_object* v___x_1810_; 
lean_dec(v___y_1807_);
lean_dec(v___y_1806_);
lean_dec(v___y_1805_);
lean_dec_ref(v___y_1803_);
lean_dec(v___y_1802_);
lean_dec_ref(v___y_1801_);
lean_dec(v_className_1750_);
lean_dec_ref(v_declVal_1745_);
lean_dec(v_declName_1744_);
v___x_1810_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_1810_, 0, v___y_1804_);
return v___x_1810_;
}
else
{
lean_object* v___x_1811_; 
lean_dec_ref(v___y_1804_);
v___x_1811_ = l_Lean_Core_resetMessageLog___redArg(v___y_1806_);
if (lean_obj_tag(v___x_1811_) == 0)
{
lean_dec_ref(v___x_1811_);
v___y_1762_ = v___y_1801_;
v___y_1763_ = v___y_1802_;
v___y_1764_ = v___y_1803_;
v___y_1765_ = v___y_1805_;
v___y_1766_ = v___y_1806_;
v___y_1767_ = v___y_1807_;
goto v___jp_1761_;
}
else
{
lean_object* v_a_1812_; lean_object* v___x_1814_; uint8_t v_isShared_1815_; uint8_t v_isSharedCheck_1819_; 
lean_dec(v___y_1807_);
lean_dec(v___y_1806_);
lean_dec(v___y_1805_);
lean_dec_ref(v___y_1803_);
lean_dec(v___y_1802_);
lean_dec_ref(v___y_1801_);
lean_dec(v_className_1750_);
lean_dec_ref(v_declVal_1745_);
lean_dec(v_declName_1744_);
v_a_1812_ = lean_ctor_get(v___x_1811_, 0);
v_isSharedCheck_1819_ = !lean_is_exclusive(v___x_1811_);
if (v_isSharedCheck_1819_ == 0)
{
v___x_1814_ = v___x_1811_;
v_isShared_1815_ = v_isSharedCheck_1819_;
goto v_resetjp_1813_;
}
else
{
lean_inc(v_a_1812_);
lean_dec(v___x_1811_);
v___x_1814_ = lean_box(0);
v_isShared_1815_ = v_isSharedCheck_1819_;
goto v_resetjp_1813_;
}
v_resetjp_1813_:
{
lean_object* v___x_1817_; 
if (v_isShared_1815_ == 0)
{
v___x_1817_ = v___x_1814_;
goto v_reusejp_1816_;
}
else
{
lean_object* v_reuseFailAlloc_1818_; 
v_reuseFailAlloc_1818_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_1818_, 0, v_a_1812_);
v___x_1817_ = v_reuseFailAlloc_1818_;
goto v_reusejp_1816_;
}
v_reusejp_1816_:
{
return v___x_1817_;
}
}
}
}
}
else
{
lean_object* v___x_1820_; 
lean_dec(v___y_1807_);
lean_dec(v___y_1806_);
lean_dec(v___y_1805_);
lean_dec_ref(v___y_1803_);
lean_dec(v___y_1802_);
lean_dec_ref(v___y_1801_);
lean_dec(v_className_1750_);
lean_dec_ref(v_declVal_1745_);
lean_dec(v_declName_1744_);
v___x_1820_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_1820_, 0, v___y_1804_);
return v___x_1820_;
}
}
v___jp_1821_:
{
uint8_t v___x_1829_; 
v___x_1829_ = l_Lean_Exception_isInterrupt(v_a_1828_);
if (v___x_1829_ == 0)
{
uint8_t v___x_1830_; 
lean_inc_ref(v_a_1828_);
v___x_1830_ = l_Lean_Exception_isRuntime(v_a_1828_);
v___y_1801_ = v___y_1822_;
v___y_1802_ = v___y_1823_;
v___y_1803_ = v___y_1824_;
v___y_1804_ = v_a_1828_;
v___y_1805_ = v___y_1825_;
v___y_1806_ = v___y_1826_;
v___y_1807_ = v___y_1827_;
v___y_1808_ = v___x_1830_;
goto v___jp_1800_;
}
else
{
v___y_1801_ = v___y_1822_;
v___y_1802_ = v___y_1823_;
v___y_1803_ = v___y_1824_;
v___y_1804_ = v_a_1828_;
v___y_1805_ = v___y_1825_;
v___y_1806_ = v___y_1826_;
v___y_1807_ = v___y_1827_;
v___y_1808_ = v___x_1829_;
goto v___jp_1800_;
}
}
v___jp_1831_:
{
if (lean_obj_tag(v___y_1838_) == 0)
{
lean_dec(v___y_1837_);
lean_dec(v___y_1836_);
lean_dec(v___y_1835_);
lean_dec_ref(v___y_1834_);
lean_dec(v___y_1833_);
lean_dec_ref(v___y_1832_);
lean_dec(v_className_1750_);
lean_dec_ref(v_declVal_1745_);
lean_dec(v_declName_1744_);
return v___y_1838_;
}
else
{
lean_object* v_a_1839_; 
v_a_1839_ = lean_ctor_get(v___y_1838_, 0);
lean_inc(v_a_1839_);
lean_dec_ref(v___y_1838_);
v___y_1822_ = v___y_1832_;
v___y_1823_ = v___y_1833_;
v___y_1824_ = v___y_1834_;
v___y_1825_ = v___y_1835_;
v___y_1826_ = v___y_1836_;
v___y_1827_ = v___y_1837_;
v_a_1828_ = v_a_1839_;
goto v___jp_1821_;
}
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___boxed(lean_object** _args){
lean_object* v_declName_2072_ = _args[0];
lean_object* v_declVal_2073_ = _args[1];
lean_object* v_cls_2074_ = _args[2];
lean_object* v_xs_2075_ = _args[3];
lean_object* v_bis_2076_ = _args[4];
lean_object* v_classExpr_2077_ = _args[5];
lean_object* v_className_2078_ = _args[6];
lean_object* v_instVal_2079_ = _args[7];
lean_object* v_instMVars_2080_ = _args[8];
lean_object* v_val_2081_ = _args[9];
lean_object* v_a_2082_ = _args[10];
lean_object* v_a_2083_ = _args[11];
lean_object* v_a_2084_ = _args[12];
lean_object* v_a_2085_ = _args[13];
lean_object* v_a_2086_ = _args[14];
lean_object* v_a_2087_ = _args[15];
lean_object* v_a_2088_ = _args[16];
_start:
{
lean_object* v_res_2089_; 
v_res_2089_ = l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go(v_declName_2072_, v_declVal_2073_, v_cls_2074_, v_xs_2075_, v_bis_2076_, v_classExpr_2077_, v_className_2078_, v_instVal_2079_, v_instMVars_2080_, v_val_2081_, v_a_2082_, v_a_2083_, v_a_2084_, v_a_2085_, v_a_2086_, v_a_2087_);
lean_dec_ref(v_instMVars_2080_);
return v_res_2089_;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1(lean_object* v_xs_2090_, lean_object* v_a_2091_, lean_object* v_declVal_2092_, lean_object* v_className_2093_, lean_object* v_declName_2094_, lean_object* v_range_2095_, lean_object* v_b_2096_, lean_object* v_i_2097_, lean_object* v_hs_2098_, lean_object* v_hl_2099_, lean_object* v___y_2100_, lean_object* v___y_2101_, lean_object* v___y_2102_, lean_object* v___y_2103_, lean_object* v___y_2104_, lean_object* v___y_2105_){
_start:
{
lean_object* v___x_2107_; 
v___x_2107_ = l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___redArg(v_xs_2090_, v_a_2091_, v_declVal_2092_, v_className_2093_, v_declName_2094_, v_range_2095_, v_b_2096_, v_i_2097_, v___y_2100_, v___y_2101_, v___y_2102_, v___y_2103_, v___y_2104_, v___y_2105_);
return v___x_2107_;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1___boxed(lean_object** _args){
lean_object* v_xs_2108_ = _args[0];
lean_object* v_a_2109_ = _args[1];
lean_object* v_declVal_2110_ = _args[2];
lean_object* v_className_2111_ = _args[3];
lean_object* v_declName_2112_ = _args[4];
lean_object* v_range_2113_ = _args[5];
lean_object* v_b_2114_ = _args[6];
lean_object* v_i_2115_ = _args[7];
lean_object* v_hs_2116_ = _args[8];
lean_object* v_hl_2117_ = _args[9];
lean_object* v___y_2118_ = _args[10];
lean_object* v___y_2119_ = _args[11];
lean_object* v___y_2120_ = _args[12];
lean_object* v___y_2121_ = _args[13];
lean_object* v___y_2122_ = _args[14];
lean_object* v___y_2123_ = _args[15];
lean_object* v___y_2124_ = _args[16];
_start:
{
lean_object* v_res_2125_; 
v_res_2125_ = l___private_Init_Data_Range_Basic_0__Std_Legacy_Range_forIn_x27_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__1(v_xs_2108_, v_a_2109_, v_declVal_2110_, v_className_2111_, v_declName_2112_, v_range_2113_, v_b_2114_, v_i_2115_, v_hs_2116_, v_hl_2117_, v___y_2118_, v___y_2119_, v___y_2120_, v___y_2121_, v___y_2122_, v___y_2123_);
lean_dec(v___y_2119_);
lean_dec_ref(v___y_2118_);
lean_dec_ref(v_range_2113_);
lean_dec_ref(v_xs_2108_);
return v_res_2125_;
}
}
LEAN_EXPORT lean_object* l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3(lean_object* v_cls_2126_, lean_object* v_msg_2127_, lean_object* v___y_2128_, lean_object* v___y_2129_, lean_object* v___y_2130_, lean_object* v___y_2131_, lean_object* v___y_2132_, lean_object* v___y_2133_){
_start:
{
lean_object* v___x_2135_; 
v___x_2135_ = l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg(v_cls_2126_, v_msg_2127_, v___y_2130_, v___y_2131_, v___y_2132_, v___y_2133_);
return v___x_2135_;
}
}
LEAN_EXPORT lean_object* l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___boxed(lean_object* v_cls_2136_, lean_object* v_msg_2137_, lean_object* v___y_2138_, lean_object* v___y_2139_, lean_object* v___y_2140_, lean_object* v___y_2141_, lean_object* v___y_2142_, lean_object* v___y_2143_, lean_object* v___y_2144_){
_start:
{
lean_object* v_res_2145_; 
v_res_2145_ = l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3(v_cls_2136_, v_msg_2137_, v___y_2138_, v___y_2139_, v___y_2140_, v___y_2141_, v___y_2142_, v___y_2143_);
lean_dec(v___y_2143_);
lean_dec_ref(v___y_2142_);
lean_dec(v___y_2141_);
lean_dec_ref(v___y_2140_);
lean_dec(v___y_2139_);
lean_dec_ref(v___y_2138_);
return v_res_2145_;
}
}
LEAN_EXPORT lean_object* l_MonadExcept_ofExcept___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__12(lean_object* v_00_u03b1_2146_, lean_object* v_x_2147_, lean_object* v___y_2148_, lean_object* v___y_2149_, lean_object* v___y_2150_, lean_object* v___y_2151_, lean_object* v___y_2152_, lean_object* v___y_2153_){
_start:
{
lean_object* v___x_2155_; 
v___x_2155_ = l_MonadExcept_ofExcept___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__12___redArg(v_x_2147_);
return v___x_2155_;
}
}
LEAN_EXPORT lean_object* l_MonadExcept_ofExcept___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__12___boxed(lean_object* v_00_u03b1_2156_, lean_object* v_x_2157_, lean_object* v___y_2158_, lean_object* v___y_2159_, lean_object* v___y_2160_, lean_object* v___y_2161_, lean_object* v___y_2162_, lean_object* v___y_2163_, lean_object* v___y_2164_){
_start:
{
lean_object* v_res_2165_; 
v_res_2165_ = l_MonadExcept_ofExcept___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__12(v_00_u03b1_2156_, v_x_2157_, v___y_2158_, v___y_2159_, v___y_2160_, v___y_2161_, v___y_2162_, v___y_2163_);
lean_dec(v___y_2163_);
lean_dec_ref(v___y_2162_);
lean_dec(v___y_2161_);
lean_dec_ref(v___y_2160_);
lean_dec(v___y_2159_);
lean_dec_ref(v___y_2158_);
return v_res_2165_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_addTraceNode___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__11(lean_object* v_oldTraces_2166_, lean_object* v_data_2167_, lean_object* v_ref_2168_, lean_object* v_msg_2169_, lean_object* v___y_2170_, lean_object* v___y_2171_, lean_object* v___y_2172_, lean_object* v___y_2173_, lean_object* v___y_2174_, lean_object* v___y_2175_){
_start:
{
lean_object* v___x_2177_; 
v___x_2177_ = l___private_Lean_Util_Trace_0__Lean_addTraceNode___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__11___redArg(v_oldTraces_2166_, v_data_2167_, v_ref_2168_, v_msg_2169_, v___y_2172_, v___y_2173_, v___y_2174_, v___y_2175_);
return v___x_2177_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_addTraceNode___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__11___boxed(lean_object* v_oldTraces_2178_, lean_object* v_data_2179_, lean_object* v_ref_2180_, lean_object* v_msg_2181_, lean_object* v___y_2182_, lean_object* v___y_2183_, lean_object* v___y_2184_, lean_object* v___y_2185_, lean_object* v___y_2186_, lean_object* v___y_2187_, lean_object* v___y_2188_){
_start:
{
lean_object* v_res_2189_; 
v_res_2189_ = l___private_Lean_Util_Trace_0__Lean_addTraceNode___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__11(v_oldTraces_2178_, v_data_2179_, v_ref_2180_, v_msg_2181_, v___y_2182_, v___y_2183_, v___y_2184_, v___y_2185_, v___y_2186_, v___y_2187_);
lean_dec(v___y_2187_);
lean_dec(v___y_2185_);
lean_dec_ref(v___y_2184_);
lean_dec(v___y_2183_);
lean_dec_ref(v___y_2182_);
return v_res_2189_;
}
}
LEAN_EXPORT lean_object* l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7(lean_object* v_ref_2190_, lean_object* v_msgData_2191_, uint8_t v_severity_2192_, uint8_t v_isSilent_2193_, lean_object* v___y_2194_, lean_object* v___y_2195_, lean_object* v___y_2196_, lean_object* v___y_2197_, lean_object* v___y_2198_, lean_object* v___y_2199_){
_start:
{
lean_object* v___x_2201_; 
v___x_2201_ = l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg(v_ref_2190_, v_msgData_2191_, v_severity_2192_, v_isSilent_2193_, v___y_2196_, v___y_2197_, v___y_2198_, v___y_2199_);
return v___x_2201_;
}
}
LEAN_EXPORT lean_object* l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___boxed(lean_object* v_ref_2202_, lean_object* v_msgData_2203_, lean_object* v_severity_2204_, lean_object* v_isSilent_2205_, lean_object* v___y_2206_, lean_object* v___y_2207_, lean_object* v___y_2208_, lean_object* v___y_2209_, lean_object* v___y_2210_, lean_object* v___y_2211_, lean_object* v___y_2212_){
_start:
{
uint8_t v_severity_boxed_2213_; uint8_t v_isSilent_boxed_2214_; lean_object* v_res_2215_; 
v_severity_boxed_2213_ = lean_unbox(v_severity_2204_);
v_isSilent_boxed_2214_ = lean_unbox(v_isSilent_2205_);
v_res_2215_ = l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7(v_ref_2202_, v_msgData_2203_, v_severity_boxed_2213_, v_isSilent_boxed_2214_, v___y_2206_, v___y_2207_, v___y_2208_, v___y_2209_, v___y_2210_, v___y_2211_);
lean_dec(v___y_2211_);
lean_dec(v___y_2209_);
lean_dec_ref(v___y_2208_);
lean_dec(v___y_2207_);
lean_dec_ref(v___y_2206_);
lean_dec(v_ref_2202_);
return v_res_2215_;
}
}
static lean_object* _init_l_List_foldl___at___00Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6_spec__9___closed__0(void){
_start:
{
lean_object* v___x_2216_; lean_object* v___x_2217_; 
v___x_2216_ = lean_box(1);
v___x_2217_ = l_Lean_MessageData_ofFormat(v___x_2216_);
return v___x_2217_;
}
}
static lean_object* _init_l_List_foldl___at___00Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6_spec__9___closed__3(void){
_start:
{
lean_object* v___x_2221_; lean_object* v___x_2222_; 
v___x_2221_ = ((lean_object*)(l_List_foldl___at___00Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6_spec__9___closed__2));
v___x_2222_ = l_Lean_MessageData_ofFormat(v___x_2221_);
return v___x_2222_;
}
}
LEAN_EXPORT lean_object* l_List_foldl___at___00Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6_spec__9(lean_object* v_x_2223_, lean_object* v_x_2224_){
_start:
{
if (lean_obj_tag(v_x_2224_) == 0)
{
return v_x_2223_;
}
else
{
lean_object* v_head_2225_; lean_object* v_tail_2226_; lean_object* v___x_2228_; uint8_t v_isShared_2229_; uint8_t v_isSharedCheck_2248_; 
v_head_2225_ = lean_ctor_get(v_x_2224_, 0);
v_tail_2226_ = lean_ctor_get(v_x_2224_, 1);
v_isSharedCheck_2248_ = !lean_is_exclusive(v_x_2224_);
if (v_isSharedCheck_2248_ == 0)
{
v___x_2228_ = v_x_2224_;
v_isShared_2229_ = v_isSharedCheck_2248_;
goto v_resetjp_2227_;
}
else
{
lean_inc(v_tail_2226_);
lean_inc(v_head_2225_);
lean_dec(v_x_2224_);
v___x_2228_ = lean_box(0);
v_isShared_2229_ = v_isSharedCheck_2248_;
goto v_resetjp_2227_;
}
v_resetjp_2227_:
{
lean_object* v_before_2230_; lean_object* v___x_2232_; uint8_t v_isShared_2233_; uint8_t v_isSharedCheck_2246_; 
v_before_2230_ = lean_ctor_get(v_head_2225_, 0);
v_isSharedCheck_2246_ = !lean_is_exclusive(v_head_2225_);
if (v_isSharedCheck_2246_ == 0)
{
lean_object* v_unused_2247_; 
v_unused_2247_ = lean_ctor_get(v_head_2225_, 1);
lean_dec(v_unused_2247_);
v___x_2232_ = v_head_2225_;
v_isShared_2233_ = v_isSharedCheck_2246_;
goto v_resetjp_2231_;
}
else
{
lean_inc(v_before_2230_);
lean_dec(v_head_2225_);
v___x_2232_ = lean_box(0);
v_isShared_2233_ = v_isSharedCheck_2246_;
goto v_resetjp_2231_;
}
v_resetjp_2231_:
{
lean_object* v___x_2234_; lean_object* v___x_2236_; 
v___x_2234_ = lean_obj_once(&l_List_foldl___at___00Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6_spec__9___closed__0, &l_List_foldl___at___00Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6_spec__9___closed__0_once, _init_l_List_foldl___at___00Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6_spec__9___closed__0);
if (v_isShared_2233_ == 0)
{
lean_ctor_set_tag(v___x_2232_, 7);
lean_ctor_set(v___x_2232_, 1, v___x_2234_);
lean_ctor_set(v___x_2232_, 0, v_x_2223_);
v___x_2236_ = v___x_2232_;
goto v_reusejp_2235_;
}
else
{
lean_object* v_reuseFailAlloc_2245_; 
v_reuseFailAlloc_2245_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v_reuseFailAlloc_2245_, 0, v_x_2223_);
lean_ctor_set(v_reuseFailAlloc_2245_, 1, v___x_2234_);
v___x_2236_ = v_reuseFailAlloc_2245_;
goto v_reusejp_2235_;
}
v_reusejp_2235_:
{
lean_object* v___x_2237_; lean_object* v___x_2239_; 
v___x_2237_ = lean_obj_once(&l_List_foldl___at___00Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6_spec__9___closed__3, &l_List_foldl___at___00Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6_spec__9___closed__3_once, _init_l_List_foldl___at___00Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6_spec__9___closed__3);
if (v_isShared_2229_ == 0)
{
lean_ctor_set_tag(v___x_2228_, 7);
lean_ctor_set(v___x_2228_, 1, v___x_2237_);
lean_ctor_set(v___x_2228_, 0, v___x_2236_);
v___x_2239_ = v___x_2228_;
goto v_reusejp_2238_;
}
else
{
lean_object* v_reuseFailAlloc_2244_; 
v_reuseFailAlloc_2244_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v_reuseFailAlloc_2244_, 0, v___x_2236_);
lean_ctor_set(v_reuseFailAlloc_2244_, 1, v___x_2237_);
v___x_2239_ = v_reuseFailAlloc_2244_;
goto v_reusejp_2238_;
}
v_reusejp_2238_:
{
lean_object* v___x_2240_; lean_object* v___x_2241_; lean_object* v___x_2242_; 
v___x_2240_ = l_Lean_MessageData_ofSyntax(v_before_2230_);
v___x_2241_ = l_Lean_indentD(v___x_2240_);
v___x_2242_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_2242_, 0, v___x_2239_);
lean_ctor_set(v___x_2242_, 1, v___x_2241_);
v_x_2223_ = v___x_2242_;
v_x_2224_ = v_tail_2226_;
goto _start;
}
}
}
}
}
}
}
static lean_object* _init_l_Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6___redArg___closed__2(void){
_start:
{
lean_object* v___x_2252_; lean_object* v___x_2253_; 
v___x_2252_ = ((lean_object*)(l_Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6___redArg___closed__1));
v___x_2253_ = l_Lean_MessageData_ofFormat(v___x_2252_);
return v___x_2253_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6___redArg(lean_object* v_msgData_2254_, lean_object* v_macroStack_2255_, lean_object* v___y_2256_){
_start:
{
lean_object* v_options_2258_; lean_object* v___x_2259_; uint8_t v___x_2260_; 
v_options_2258_ = lean_ctor_get(v___y_2256_, 2);
v___x_2259_ = l_Lean_Elab_pp_macroStack;
v___x_2260_ = l_Lean_Option_get___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__7(v_options_2258_, v___x_2259_);
if (v___x_2260_ == 0)
{
lean_object* v___x_2261_; 
lean_dec(v_macroStack_2255_);
v___x_2261_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_2261_, 0, v_msgData_2254_);
return v___x_2261_;
}
else
{
if (lean_obj_tag(v_macroStack_2255_) == 0)
{
lean_object* v___x_2262_; 
v___x_2262_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_2262_, 0, v_msgData_2254_);
return v___x_2262_;
}
else
{
lean_object* v_head_2263_; lean_object* v_after_2264_; lean_object* v___x_2266_; uint8_t v_isShared_2267_; uint8_t v_isSharedCheck_2279_; 
v_head_2263_ = lean_ctor_get(v_macroStack_2255_, 0);
lean_inc(v_head_2263_);
v_after_2264_ = lean_ctor_get(v_head_2263_, 1);
v_isSharedCheck_2279_ = !lean_is_exclusive(v_head_2263_);
if (v_isSharedCheck_2279_ == 0)
{
lean_object* v_unused_2280_; 
v_unused_2280_ = lean_ctor_get(v_head_2263_, 0);
lean_dec(v_unused_2280_);
v___x_2266_ = v_head_2263_;
v_isShared_2267_ = v_isSharedCheck_2279_;
goto v_resetjp_2265_;
}
else
{
lean_inc(v_after_2264_);
lean_dec(v_head_2263_);
v___x_2266_ = lean_box(0);
v_isShared_2267_ = v_isSharedCheck_2279_;
goto v_resetjp_2265_;
}
v_resetjp_2265_:
{
lean_object* v___x_2268_; lean_object* v___x_2270_; 
v___x_2268_ = lean_obj_once(&l_List_foldl___at___00Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6_spec__9___closed__0, &l_List_foldl___at___00Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6_spec__9___closed__0_once, _init_l_List_foldl___at___00Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6_spec__9___closed__0);
if (v_isShared_2267_ == 0)
{
lean_ctor_set_tag(v___x_2266_, 7);
lean_ctor_set(v___x_2266_, 1, v___x_2268_);
lean_ctor_set(v___x_2266_, 0, v_msgData_2254_);
v___x_2270_ = v___x_2266_;
goto v_reusejp_2269_;
}
else
{
lean_object* v_reuseFailAlloc_2278_; 
v_reuseFailAlloc_2278_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v_reuseFailAlloc_2278_, 0, v_msgData_2254_);
lean_ctor_set(v_reuseFailAlloc_2278_, 1, v___x_2268_);
v___x_2270_ = v_reuseFailAlloc_2278_;
goto v_reusejp_2269_;
}
v_reusejp_2269_:
{
lean_object* v___x_2271_; lean_object* v___x_2272_; lean_object* v___x_2273_; lean_object* v___x_2274_; lean_object* v_msgData_2275_; lean_object* v___x_2276_; lean_object* v___x_2277_; 
v___x_2271_ = lean_obj_once(&l_Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6___redArg___closed__2, &l_Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6___redArg___closed__2_once, _init_l_Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6___redArg___closed__2);
v___x_2272_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_2272_, 0, v___x_2270_);
lean_ctor_set(v___x_2272_, 1, v___x_2271_);
v___x_2273_ = l_Lean_MessageData_ofSyntax(v_after_2264_);
v___x_2274_ = l_Lean_indentD(v___x_2273_);
v_msgData_2275_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v_msgData_2275_, 0, v___x_2272_);
lean_ctor_set(v_msgData_2275_, 1, v___x_2274_);
v___x_2276_ = l_List_foldl___at___00Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6_spec__9(v_msgData_2275_, v_macroStack_2255_);
v___x_2277_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_2277_, 0, v___x_2276_);
return v___x_2277_;
}
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6___redArg___boxed(lean_object* v_msgData_2281_, lean_object* v_macroStack_2282_, lean_object* v___y_2283_, lean_object* v___y_2284_){
_start:
{
lean_object* v_res_2285_; 
v_res_2285_ = l_Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6___redArg(v_msgData_2281_, v_macroStack_2282_, v___y_2283_);
lean_dec_ref(v___y_2283_);
return v_res_2285_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4___redArg(lean_object* v_msg_2286_, lean_object* v___y_2287_, lean_object* v___y_2288_, lean_object* v___y_2289_, lean_object* v___y_2290_, lean_object* v___y_2291_, lean_object* v___y_2292_){
_start:
{
lean_object* v_ref_2294_; lean_object* v___x_2295_; lean_object* v_a_2296_; lean_object* v_macroStack_2297_; lean_object* v___x_2298_; lean_object* v___x_2299_; lean_object* v_a_2300_; lean_object* v___x_2302_; uint8_t v_isShared_2303_; uint8_t v_isSharedCheck_2308_; 
v_ref_2294_ = lean_ctor_get(v___y_2291_, 5);
v___x_2295_ = l_Lean_addMessageContextFull___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure_spec__0_spec__0(v_msg_2286_, v___y_2289_, v___y_2290_, v___y_2291_, v___y_2292_);
v_a_2296_ = lean_ctor_get(v___x_2295_, 0);
lean_inc(v_a_2296_);
lean_dec_ref(v___x_2295_);
v_macroStack_2297_ = lean_ctor_get(v___y_2287_, 1);
lean_inc(v_macroStack_2297_);
lean_dec_ref(v___y_2287_);
lean_inc(v_macroStack_2297_);
v___x_2298_ = l_Lean_Elab_getBetterRef(v_ref_2294_, v_macroStack_2297_);
v___x_2299_ = l_Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6___redArg(v_a_2296_, v_macroStack_2297_, v___y_2291_);
v_a_2300_ = lean_ctor_get(v___x_2299_, 0);
v_isSharedCheck_2308_ = !lean_is_exclusive(v___x_2299_);
if (v_isSharedCheck_2308_ == 0)
{
v___x_2302_ = v___x_2299_;
v_isShared_2303_ = v_isSharedCheck_2308_;
goto v_resetjp_2301_;
}
else
{
lean_inc(v_a_2300_);
lean_dec(v___x_2299_);
v___x_2302_ = lean_box(0);
v_isShared_2303_ = v_isSharedCheck_2308_;
goto v_resetjp_2301_;
}
v_resetjp_2301_:
{
lean_object* v___x_2304_; lean_object* v___x_2306_; 
v___x_2304_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_2304_, 0, v___x_2298_);
lean_ctor_set(v___x_2304_, 1, v_a_2300_);
if (v_isShared_2303_ == 0)
{
lean_ctor_set_tag(v___x_2302_, 1);
lean_ctor_set(v___x_2302_, 0, v___x_2304_);
v___x_2306_ = v___x_2302_;
goto v_reusejp_2305_;
}
else
{
lean_object* v_reuseFailAlloc_2307_; 
v_reuseFailAlloc_2307_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2307_, 0, v___x_2304_);
v___x_2306_ = v_reuseFailAlloc_2307_;
goto v_reusejp_2305_;
}
v_reusejp_2305_:
{
return v___x_2306_;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4___redArg___boxed(lean_object* v_msg_2309_, lean_object* v___y_2310_, lean_object* v___y_2311_, lean_object* v___y_2312_, lean_object* v___y_2313_, lean_object* v___y_2314_, lean_object* v___y_2315_, lean_object* v___y_2316_){
_start:
{
lean_object* v_res_2317_; 
v_res_2317_ = l_Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4___redArg(v_msg_2309_, v___y_2310_, v___y_2311_, v___y_2312_, v___y_2313_, v___y_2314_, v___y_2315_);
lean_dec(v___y_2315_);
lean_dec_ref(v___y_2314_);
lean_dec(v___y_2313_);
lean_dec_ref(v___y_2312_);
lean_dec(v___y_2311_);
return v_res_2317_;
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insertAtCollisionNodeAux___at___00Lean_PersistentHashMap_insertAtCollisionNode___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4_spec__9_spec__11___redArg(lean_object* v_x_2318_, lean_object* v_x_2319_, lean_object* v_x_2320_, lean_object* v_x_2321_){
_start:
{
lean_object* v_ks_2322_; lean_object* v_vs_2323_; lean_object* v___x_2325_; uint8_t v_isShared_2326_; uint8_t v_isSharedCheck_2347_; 
v_ks_2322_ = lean_ctor_get(v_x_2318_, 0);
v_vs_2323_ = lean_ctor_get(v_x_2318_, 1);
v_isSharedCheck_2347_ = !lean_is_exclusive(v_x_2318_);
if (v_isSharedCheck_2347_ == 0)
{
v___x_2325_ = v_x_2318_;
v_isShared_2326_ = v_isSharedCheck_2347_;
goto v_resetjp_2324_;
}
else
{
lean_inc(v_vs_2323_);
lean_inc(v_ks_2322_);
lean_dec(v_x_2318_);
v___x_2325_ = lean_box(0);
v_isShared_2326_ = v_isSharedCheck_2347_;
goto v_resetjp_2324_;
}
v_resetjp_2324_:
{
lean_object* v___x_2327_; uint8_t v___x_2328_; 
v___x_2327_ = lean_array_get_size(v_ks_2322_);
v___x_2328_ = lean_nat_dec_lt(v_x_2319_, v___x_2327_);
if (v___x_2328_ == 0)
{
lean_object* v___x_2329_; lean_object* v___x_2330_; lean_object* v___x_2332_; 
lean_dec(v_x_2319_);
v___x_2329_ = lean_array_push(v_ks_2322_, v_x_2320_);
v___x_2330_ = lean_array_push(v_vs_2323_, v_x_2321_);
if (v_isShared_2326_ == 0)
{
lean_ctor_set(v___x_2325_, 1, v___x_2330_);
lean_ctor_set(v___x_2325_, 0, v___x_2329_);
v___x_2332_ = v___x_2325_;
goto v_reusejp_2331_;
}
else
{
lean_object* v_reuseFailAlloc_2333_; 
v_reuseFailAlloc_2333_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v_reuseFailAlloc_2333_, 0, v___x_2329_);
lean_ctor_set(v_reuseFailAlloc_2333_, 1, v___x_2330_);
v___x_2332_ = v_reuseFailAlloc_2333_;
goto v_reusejp_2331_;
}
v_reusejp_2331_:
{
return v___x_2332_;
}
}
else
{
lean_object* v_k_x27_2334_; uint8_t v___x_2335_; 
v_k_x27_2334_ = lean_array_fget_borrowed(v_ks_2322_, v_x_2319_);
v___x_2335_ = l_Lean_instBEqMVarId_beq(v_x_2320_, v_k_x27_2334_);
if (v___x_2335_ == 0)
{
lean_object* v___x_2337_; 
if (v_isShared_2326_ == 0)
{
v___x_2337_ = v___x_2325_;
goto v_reusejp_2336_;
}
else
{
lean_object* v_reuseFailAlloc_2341_; 
v_reuseFailAlloc_2341_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v_reuseFailAlloc_2341_, 0, v_ks_2322_);
lean_ctor_set(v_reuseFailAlloc_2341_, 1, v_vs_2323_);
v___x_2337_ = v_reuseFailAlloc_2341_;
goto v_reusejp_2336_;
}
v_reusejp_2336_:
{
lean_object* v___x_2338_; lean_object* v___x_2339_; 
v___x_2338_ = lean_unsigned_to_nat(1u);
v___x_2339_ = lean_nat_add(v_x_2319_, v___x_2338_);
lean_dec(v_x_2319_);
v_x_2318_ = v___x_2337_;
v_x_2319_ = v___x_2339_;
goto _start;
}
}
else
{
lean_object* v___x_2342_; lean_object* v___x_2343_; lean_object* v___x_2345_; 
v___x_2342_ = lean_array_fset(v_ks_2322_, v_x_2319_, v_x_2320_);
v___x_2343_ = lean_array_fset(v_vs_2323_, v_x_2319_, v_x_2321_);
lean_dec(v_x_2319_);
if (v_isShared_2326_ == 0)
{
lean_ctor_set(v___x_2325_, 1, v___x_2343_);
lean_ctor_set(v___x_2325_, 0, v___x_2342_);
v___x_2345_ = v___x_2325_;
goto v_reusejp_2344_;
}
else
{
lean_object* v_reuseFailAlloc_2346_; 
v_reuseFailAlloc_2346_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v_reuseFailAlloc_2346_, 0, v___x_2342_);
lean_ctor_set(v_reuseFailAlloc_2346_, 1, v___x_2343_);
v___x_2345_ = v_reuseFailAlloc_2346_;
goto v_reusejp_2344_;
}
v_reusejp_2344_:
{
return v___x_2345_;
}
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insertAtCollisionNode___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4_spec__9___redArg(lean_object* v_n_2348_, lean_object* v_k_2349_, lean_object* v_v_2350_){
_start:
{
lean_object* v___x_2351_; lean_object* v___x_2352_; 
v___x_2351_ = lean_unsigned_to_nat(0u);
v___x_2352_ = l_Lean_PersistentHashMap_insertAtCollisionNodeAux___at___00Lean_PersistentHashMap_insertAtCollisionNode___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4_spec__9_spec__11___redArg(v_n_2348_, v___x_2351_, v_k_2349_, v_v_2350_);
return v___x_2352_;
}
}
static size_t _init_l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4___redArg___closed__0(void){
_start:
{
size_t v___x_2353_; size_t v___x_2354_; size_t v___x_2355_; 
v___x_2353_ = ((size_t)5ULL);
v___x_2354_ = ((size_t)1ULL);
v___x_2355_ = lean_usize_shift_left(v___x_2354_, v___x_2353_);
return v___x_2355_;
}
}
static size_t _init_l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4___redArg___closed__1(void){
_start:
{
size_t v___x_2356_; size_t v___x_2357_; size_t v___x_2358_; 
v___x_2356_ = ((size_t)1ULL);
v___x_2357_ = lean_usize_once(&l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4___redArg___closed__0, &l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4___redArg___closed__0_once, _init_l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4___redArg___closed__0);
v___x_2358_ = lean_usize_sub(v___x_2357_, v___x_2356_);
return v___x_2358_;
}
}
static lean_object* _init_l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4___redArg___closed__2(void){
_start:
{
lean_object* v___x_2359_; 
v___x_2359_ = l_Lean_PersistentHashMap_mkEmptyEntries(lean_box(0), lean_box(0));
return v___x_2359_;
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4___redArg(lean_object* v_x_2360_, size_t v_x_2361_, size_t v_x_2362_, lean_object* v_x_2363_, lean_object* v_x_2364_){
_start:
{
if (lean_obj_tag(v_x_2360_) == 0)
{
lean_object* v_es_2365_; size_t v___x_2366_; size_t v___x_2367_; size_t v___x_2368_; size_t v___x_2369_; lean_object* v_j_2370_; lean_object* v___x_2371_; uint8_t v___x_2372_; 
v_es_2365_ = lean_ctor_get(v_x_2360_, 0);
v___x_2366_ = ((size_t)5ULL);
v___x_2367_ = ((size_t)1ULL);
v___x_2368_ = lean_usize_once(&l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4___redArg___closed__1, &l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4___redArg___closed__1_once, _init_l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4___redArg___closed__1);
v___x_2369_ = lean_usize_land(v_x_2361_, v___x_2368_);
v_j_2370_ = lean_usize_to_nat(v___x_2369_);
v___x_2371_ = lean_array_get_size(v_es_2365_);
v___x_2372_ = lean_nat_dec_lt(v_j_2370_, v___x_2371_);
if (v___x_2372_ == 0)
{
lean_dec(v_j_2370_);
lean_dec(v_x_2364_);
lean_dec(v_x_2363_);
return v_x_2360_;
}
else
{
lean_object* v___x_2374_; uint8_t v_isShared_2375_; uint8_t v_isSharedCheck_2409_; 
lean_inc_ref(v_es_2365_);
v_isSharedCheck_2409_ = !lean_is_exclusive(v_x_2360_);
if (v_isSharedCheck_2409_ == 0)
{
lean_object* v_unused_2410_; 
v_unused_2410_ = lean_ctor_get(v_x_2360_, 0);
lean_dec(v_unused_2410_);
v___x_2374_ = v_x_2360_;
v_isShared_2375_ = v_isSharedCheck_2409_;
goto v_resetjp_2373_;
}
else
{
lean_dec(v_x_2360_);
v___x_2374_ = lean_box(0);
v_isShared_2375_ = v_isSharedCheck_2409_;
goto v_resetjp_2373_;
}
v_resetjp_2373_:
{
lean_object* v_v_2376_; lean_object* v___x_2377_; lean_object* v_xs_x27_2378_; lean_object* v___y_2380_; 
v_v_2376_ = lean_array_fget(v_es_2365_, v_j_2370_);
v___x_2377_ = lean_box(0);
v_xs_x27_2378_ = lean_array_fset(v_es_2365_, v_j_2370_, v___x_2377_);
switch(lean_obj_tag(v_v_2376_))
{
case 0:
{
lean_object* v_key_2385_; lean_object* v_val_2386_; lean_object* v___x_2388_; uint8_t v_isShared_2389_; uint8_t v_isSharedCheck_2396_; 
v_key_2385_ = lean_ctor_get(v_v_2376_, 0);
v_val_2386_ = lean_ctor_get(v_v_2376_, 1);
v_isSharedCheck_2396_ = !lean_is_exclusive(v_v_2376_);
if (v_isSharedCheck_2396_ == 0)
{
v___x_2388_ = v_v_2376_;
v_isShared_2389_ = v_isSharedCheck_2396_;
goto v_resetjp_2387_;
}
else
{
lean_inc(v_val_2386_);
lean_inc(v_key_2385_);
lean_dec(v_v_2376_);
v___x_2388_ = lean_box(0);
v_isShared_2389_ = v_isSharedCheck_2396_;
goto v_resetjp_2387_;
}
v_resetjp_2387_:
{
uint8_t v___x_2390_; 
v___x_2390_ = l_Lean_instBEqMVarId_beq(v_x_2363_, v_key_2385_);
if (v___x_2390_ == 0)
{
lean_object* v___x_2391_; lean_object* v___x_2392_; 
lean_del_object(v___x_2388_);
v___x_2391_ = l_Lean_PersistentHashMap_mkCollisionNode___redArg(v_key_2385_, v_val_2386_, v_x_2363_, v_x_2364_);
v___x_2392_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_2392_, 0, v___x_2391_);
v___y_2380_ = v___x_2392_;
goto v___jp_2379_;
}
else
{
lean_object* v___x_2394_; 
lean_dec(v_val_2386_);
lean_dec(v_key_2385_);
if (v_isShared_2389_ == 0)
{
lean_ctor_set(v___x_2388_, 1, v_x_2364_);
lean_ctor_set(v___x_2388_, 0, v_x_2363_);
v___x_2394_ = v___x_2388_;
goto v_reusejp_2393_;
}
else
{
lean_object* v_reuseFailAlloc_2395_; 
v_reuseFailAlloc_2395_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v_reuseFailAlloc_2395_, 0, v_x_2363_);
lean_ctor_set(v_reuseFailAlloc_2395_, 1, v_x_2364_);
v___x_2394_ = v_reuseFailAlloc_2395_;
goto v_reusejp_2393_;
}
v_reusejp_2393_:
{
v___y_2380_ = v___x_2394_;
goto v___jp_2379_;
}
}
}
}
case 1:
{
lean_object* v_node_2397_; lean_object* v___x_2399_; uint8_t v_isShared_2400_; uint8_t v_isSharedCheck_2407_; 
v_node_2397_ = lean_ctor_get(v_v_2376_, 0);
v_isSharedCheck_2407_ = !lean_is_exclusive(v_v_2376_);
if (v_isSharedCheck_2407_ == 0)
{
v___x_2399_ = v_v_2376_;
v_isShared_2400_ = v_isSharedCheck_2407_;
goto v_resetjp_2398_;
}
else
{
lean_inc(v_node_2397_);
lean_dec(v_v_2376_);
v___x_2399_ = lean_box(0);
v_isShared_2400_ = v_isSharedCheck_2407_;
goto v_resetjp_2398_;
}
v_resetjp_2398_:
{
size_t v___x_2401_; size_t v___x_2402_; lean_object* v___x_2403_; lean_object* v___x_2405_; 
v___x_2401_ = lean_usize_shift_right(v_x_2361_, v___x_2366_);
v___x_2402_ = lean_usize_add(v_x_2362_, v___x_2367_);
v___x_2403_ = l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4___redArg(v_node_2397_, v___x_2401_, v___x_2402_, v_x_2363_, v_x_2364_);
if (v_isShared_2400_ == 0)
{
lean_ctor_set(v___x_2399_, 0, v___x_2403_);
v___x_2405_ = v___x_2399_;
goto v_reusejp_2404_;
}
else
{
lean_object* v_reuseFailAlloc_2406_; 
v_reuseFailAlloc_2406_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2406_, 0, v___x_2403_);
v___x_2405_ = v_reuseFailAlloc_2406_;
goto v_reusejp_2404_;
}
v_reusejp_2404_:
{
v___y_2380_ = v___x_2405_;
goto v___jp_2379_;
}
}
}
default: 
{
lean_object* v___x_2408_; 
v___x_2408_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_2408_, 0, v_x_2363_);
lean_ctor_set(v___x_2408_, 1, v_x_2364_);
v___y_2380_ = v___x_2408_;
goto v___jp_2379_;
}
}
v___jp_2379_:
{
lean_object* v___x_2381_; lean_object* v___x_2383_; 
v___x_2381_ = lean_array_fset(v_xs_x27_2378_, v_j_2370_, v___y_2380_);
lean_dec(v_j_2370_);
if (v_isShared_2375_ == 0)
{
lean_ctor_set(v___x_2374_, 0, v___x_2381_);
v___x_2383_ = v___x_2374_;
goto v_reusejp_2382_;
}
else
{
lean_object* v_reuseFailAlloc_2384_; 
v_reuseFailAlloc_2384_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2384_, 0, v___x_2381_);
v___x_2383_ = v_reuseFailAlloc_2384_;
goto v_reusejp_2382_;
}
v_reusejp_2382_:
{
return v___x_2383_;
}
}
}
}
}
else
{
lean_object* v_ks_2411_; lean_object* v_vs_2412_; lean_object* v___x_2414_; uint8_t v_isShared_2415_; uint8_t v_isSharedCheck_2432_; 
v_ks_2411_ = lean_ctor_get(v_x_2360_, 0);
v_vs_2412_ = lean_ctor_get(v_x_2360_, 1);
v_isSharedCheck_2432_ = !lean_is_exclusive(v_x_2360_);
if (v_isSharedCheck_2432_ == 0)
{
v___x_2414_ = v_x_2360_;
v_isShared_2415_ = v_isSharedCheck_2432_;
goto v_resetjp_2413_;
}
else
{
lean_inc(v_vs_2412_);
lean_inc(v_ks_2411_);
lean_dec(v_x_2360_);
v___x_2414_ = lean_box(0);
v_isShared_2415_ = v_isSharedCheck_2432_;
goto v_resetjp_2413_;
}
v_resetjp_2413_:
{
lean_object* v___x_2417_; 
if (v_isShared_2415_ == 0)
{
v___x_2417_ = v___x_2414_;
goto v_reusejp_2416_;
}
else
{
lean_object* v_reuseFailAlloc_2431_; 
v_reuseFailAlloc_2431_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v_reuseFailAlloc_2431_, 0, v_ks_2411_);
lean_ctor_set(v_reuseFailAlloc_2431_, 1, v_vs_2412_);
v___x_2417_ = v_reuseFailAlloc_2431_;
goto v_reusejp_2416_;
}
v_reusejp_2416_:
{
lean_object* v_newNode_2418_; uint8_t v___y_2420_; size_t v___x_2426_; uint8_t v___x_2427_; 
v_newNode_2418_ = l_Lean_PersistentHashMap_insertAtCollisionNode___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4_spec__9___redArg(v___x_2417_, v_x_2363_, v_x_2364_);
v___x_2426_ = ((size_t)7ULL);
v___x_2427_ = lean_usize_dec_le(v___x_2426_, v_x_2362_);
if (v___x_2427_ == 0)
{
lean_object* v___x_2428_; lean_object* v___x_2429_; uint8_t v___x_2430_; 
v___x_2428_ = l_Lean_PersistentHashMap_getCollisionNodeSize___redArg(v_newNode_2418_);
v___x_2429_ = lean_unsigned_to_nat(4u);
v___x_2430_ = lean_nat_dec_lt(v___x_2428_, v___x_2429_);
lean_dec(v___x_2428_);
v___y_2420_ = v___x_2430_;
goto v___jp_2419_;
}
else
{
v___y_2420_ = v___x_2427_;
goto v___jp_2419_;
}
v___jp_2419_:
{
if (v___y_2420_ == 0)
{
lean_object* v_ks_2421_; lean_object* v_vs_2422_; lean_object* v___x_2423_; lean_object* v___x_2424_; lean_object* v___x_2425_; 
v_ks_2421_ = lean_ctor_get(v_newNode_2418_, 0);
lean_inc_ref(v_ks_2421_);
v_vs_2422_ = lean_ctor_get(v_newNode_2418_, 1);
lean_inc_ref(v_vs_2422_);
lean_dec_ref(v_newNode_2418_);
v___x_2423_ = lean_unsigned_to_nat(0u);
v___x_2424_ = lean_obj_once(&l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4___redArg___closed__2, &l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4___redArg___closed__2_once, _init_l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4___redArg___closed__2);
v___x_2425_ = l___private_Lean_Data_PersistentHashMap_0__Lean_PersistentHashMap_insertAux_traverse___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4_spec__10___redArg(v_x_2362_, v_ks_2421_, v_vs_2422_, v___x_2423_, v___x_2424_);
lean_dec_ref(v_vs_2422_);
lean_dec_ref(v_ks_2421_);
return v___x_2425_;
}
else
{
return v_newNode_2418_;
}
}
}
}
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Data_PersistentHashMap_0__Lean_PersistentHashMap_insertAux_traverse___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4_spec__10___redArg(size_t v_depth_2433_, lean_object* v_keys_2434_, lean_object* v_vals_2435_, lean_object* v_i_2436_, lean_object* v_entries_2437_){
_start:
{
lean_object* v___x_2438_; uint8_t v___x_2439_; 
v___x_2438_ = lean_array_get_size(v_keys_2434_);
v___x_2439_ = lean_nat_dec_lt(v_i_2436_, v___x_2438_);
if (v___x_2439_ == 0)
{
lean_dec(v_i_2436_);
return v_entries_2437_;
}
else
{
lean_object* v_k_2440_; lean_object* v_v_2441_; uint64_t v___x_2442_; size_t v_h_2443_; size_t v___x_2444_; lean_object* v___x_2445_; size_t v___x_2446_; size_t v___x_2447_; size_t v___x_2448_; size_t v_h_2449_; lean_object* v___x_2450_; lean_object* v___x_2451_; 
v_k_2440_ = lean_array_fget_borrowed(v_keys_2434_, v_i_2436_);
v_v_2441_ = lean_array_fget_borrowed(v_vals_2435_, v_i_2436_);
v___x_2442_ = l_Lean_instHashableMVarId_hash(v_k_2440_);
v_h_2443_ = lean_uint64_to_usize(v___x_2442_);
v___x_2444_ = ((size_t)5ULL);
v___x_2445_ = lean_unsigned_to_nat(1u);
v___x_2446_ = ((size_t)1ULL);
v___x_2447_ = lean_usize_sub(v_depth_2433_, v___x_2446_);
v___x_2448_ = lean_usize_mul(v___x_2444_, v___x_2447_);
v_h_2449_ = lean_usize_shift_right(v_h_2443_, v___x_2448_);
v___x_2450_ = lean_nat_add(v_i_2436_, v___x_2445_);
lean_dec(v_i_2436_);
lean_inc(v_v_2441_);
lean_inc(v_k_2440_);
v___x_2451_ = l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4___redArg(v_entries_2437_, v_h_2449_, v_depth_2433_, v_k_2440_, v_v_2441_);
v_i_2436_ = v___x_2450_;
v_entries_2437_ = v___x_2451_;
goto _start;
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Data_PersistentHashMap_0__Lean_PersistentHashMap_insertAux_traverse___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4_spec__10___redArg___boxed(lean_object* v_depth_2453_, lean_object* v_keys_2454_, lean_object* v_vals_2455_, lean_object* v_i_2456_, lean_object* v_entries_2457_){
_start:
{
size_t v_depth_boxed_2458_; lean_object* v_res_2459_; 
v_depth_boxed_2458_ = lean_unbox_usize(v_depth_2453_);
lean_dec(v_depth_2453_);
v_res_2459_ = l___private_Lean_Data_PersistentHashMap_0__Lean_PersistentHashMap_insertAux_traverse___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4_spec__10___redArg(v_depth_boxed_2458_, v_keys_2454_, v_vals_2455_, v_i_2456_, v_entries_2457_);
lean_dec_ref(v_vals_2455_);
lean_dec_ref(v_keys_2454_);
return v_res_2459_;
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4___redArg___boxed(lean_object* v_x_2460_, lean_object* v_x_2461_, lean_object* v_x_2462_, lean_object* v_x_2463_, lean_object* v_x_2464_){
_start:
{
size_t v_x_7635__boxed_2465_; size_t v_x_7636__boxed_2466_; lean_object* v_res_2467_; 
v_x_7635__boxed_2465_ = lean_unbox_usize(v_x_2461_);
lean_dec(v_x_2461_);
v_x_7636__boxed_2466_ = lean_unbox_usize(v_x_2462_);
lean_dec(v_x_2462_);
v_res_2467_ = l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4___redArg(v_x_2460_, v_x_7635__boxed_2465_, v_x_7636__boxed_2466_, v_x_2463_, v_x_2464_);
return v_res_2467_;
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2___redArg(lean_object* v_x_2468_, lean_object* v_x_2469_, lean_object* v_x_2470_){
_start:
{
uint64_t v___x_2471_; size_t v___x_2472_; size_t v___x_2473_; lean_object* v___x_2474_; 
v___x_2471_ = l_Lean_instHashableMVarId_hash(v_x_2469_);
v___x_2472_ = lean_uint64_to_usize(v___x_2471_);
v___x_2473_ = ((size_t)1ULL);
v___x_2474_ = l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4___redArg(v_x_2468_, v___x_2472_, v___x_2473_, v_x_2469_, v_x_2470_);
return v___x_2474_;
}
}
LEAN_EXPORT lean_object* l_Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1___redArg(lean_object* v_mvarId_2475_, lean_object* v_val_2476_, lean_object* v___y_2477_){
_start:
{
lean_object* v___x_2479_; lean_object* v_mctx_2480_; lean_object* v_cache_2481_; lean_object* v_zetaDeltaFVarIds_2482_; lean_object* v_postponed_2483_; lean_object* v_diag_2484_; lean_object* v___x_2486_; uint8_t v_isShared_2487_; uint8_t v_isSharedCheck_2511_; 
v___x_2479_ = lean_st_ref_take(v___y_2477_);
v_mctx_2480_ = lean_ctor_get(v___x_2479_, 0);
v_cache_2481_ = lean_ctor_get(v___x_2479_, 1);
v_zetaDeltaFVarIds_2482_ = lean_ctor_get(v___x_2479_, 2);
v_postponed_2483_ = lean_ctor_get(v___x_2479_, 3);
v_diag_2484_ = lean_ctor_get(v___x_2479_, 4);
v_isSharedCheck_2511_ = !lean_is_exclusive(v___x_2479_);
if (v_isSharedCheck_2511_ == 0)
{
v___x_2486_ = v___x_2479_;
v_isShared_2487_ = v_isSharedCheck_2511_;
goto v_resetjp_2485_;
}
else
{
lean_inc(v_diag_2484_);
lean_inc(v_postponed_2483_);
lean_inc(v_zetaDeltaFVarIds_2482_);
lean_inc(v_cache_2481_);
lean_inc(v_mctx_2480_);
lean_dec(v___x_2479_);
v___x_2486_ = lean_box(0);
v_isShared_2487_ = v_isSharedCheck_2511_;
goto v_resetjp_2485_;
}
v_resetjp_2485_:
{
lean_object* v_depth_2488_; lean_object* v_levelAssignDepth_2489_; lean_object* v_mvarCounter_2490_; lean_object* v_lDepth_2491_; lean_object* v_decls_2492_; lean_object* v_userNames_2493_; lean_object* v_lAssignment_2494_; lean_object* v_eAssignment_2495_; lean_object* v_dAssignment_2496_; lean_object* v___x_2498_; uint8_t v_isShared_2499_; uint8_t v_isSharedCheck_2510_; 
v_depth_2488_ = lean_ctor_get(v_mctx_2480_, 0);
v_levelAssignDepth_2489_ = lean_ctor_get(v_mctx_2480_, 1);
v_mvarCounter_2490_ = lean_ctor_get(v_mctx_2480_, 2);
v_lDepth_2491_ = lean_ctor_get(v_mctx_2480_, 3);
v_decls_2492_ = lean_ctor_get(v_mctx_2480_, 4);
v_userNames_2493_ = lean_ctor_get(v_mctx_2480_, 5);
v_lAssignment_2494_ = lean_ctor_get(v_mctx_2480_, 6);
v_eAssignment_2495_ = lean_ctor_get(v_mctx_2480_, 7);
v_dAssignment_2496_ = lean_ctor_get(v_mctx_2480_, 8);
v_isSharedCheck_2510_ = !lean_is_exclusive(v_mctx_2480_);
if (v_isSharedCheck_2510_ == 0)
{
v___x_2498_ = v_mctx_2480_;
v_isShared_2499_ = v_isSharedCheck_2510_;
goto v_resetjp_2497_;
}
else
{
lean_inc(v_dAssignment_2496_);
lean_inc(v_eAssignment_2495_);
lean_inc(v_lAssignment_2494_);
lean_inc(v_userNames_2493_);
lean_inc(v_decls_2492_);
lean_inc(v_lDepth_2491_);
lean_inc(v_mvarCounter_2490_);
lean_inc(v_levelAssignDepth_2489_);
lean_inc(v_depth_2488_);
lean_dec(v_mctx_2480_);
v___x_2498_ = lean_box(0);
v_isShared_2499_ = v_isSharedCheck_2510_;
goto v_resetjp_2497_;
}
v_resetjp_2497_:
{
lean_object* v___x_2500_; lean_object* v___x_2502_; 
v___x_2500_ = l_Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2___redArg(v_eAssignment_2495_, v_mvarId_2475_, v_val_2476_);
if (v_isShared_2499_ == 0)
{
lean_ctor_set(v___x_2498_, 7, v___x_2500_);
v___x_2502_ = v___x_2498_;
goto v_reusejp_2501_;
}
else
{
lean_object* v_reuseFailAlloc_2509_; 
v_reuseFailAlloc_2509_ = lean_alloc_ctor(0, 9, 0);
lean_ctor_set(v_reuseFailAlloc_2509_, 0, v_depth_2488_);
lean_ctor_set(v_reuseFailAlloc_2509_, 1, v_levelAssignDepth_2489_);
lean_ctor_set(v_reuseFailAlloc_2509_, 2, v_mvarCounter_2490_);
lean_ctor_set(v_reuseFailAlloc_2509_, 3, v_lDepth_2491_);
lean_ctor_set(v_reuseFailAlloc_2509_, 4, v_decls_2492_);
lean_ctor_set(v_reuseFailAlloc_2509_, 5, v_userNames_2493_);
lean_ctor_set(v_reuseFailAlloc_2509_, 6, v_lAssignment_2494_);
lean_ctor_set(v_reuseFailAlloc_2509_, 7, v___x_2500_);
lean_ctor_set(v_reuseFailAlloc_2509_, 8, v_dAssignment_2496_);
v___x_2502_ = v_reuseFailAlloc_2509_;
goto v_reusejp_2501_;
}
v_reusejp_2501_:
{
lean_object* v___x_2504_; 
if (v_isShared_2487_ == 0)
{
lean_ctor_set(v___x_2486_, 0, v___x_2502_);
v___x_2504_ = v___x_2486_;
goto v_reusejp_2503_;
}
else
{
lean_object* v_reuseFailAlloc_2508_; 
v_reuseFailAlloc_2508_ = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(v_reuseFailAlloc_2508_, 0, v___x_2502_);
lean_ctor_set(v_reuseFailAlloc_2508_, 1, v_cache_2481_);
lean_ctor_set(v_reuseFailAlloc_2508_, 2, v_zetaDeltaFVarIds_2482_);
lean_ctor_set(v_reuseFailAlloc_2508_, 3, v_postponed_2483_);
lean_ctor_set(v_reuseFailAlloc_2508_, 4, v_diag_2484_);
v___x_2504_ = v_reuseFailAlloc_2508_;
goto v_reusejp_2503_;
}
v_reusejp_2503_:
{
lean_object* v___x_2505_; lean_object* v___x_2506_; lean_object* v___x_2507_; 
v___x_2505_ = lean_st_ref_set(v___y_2477_, v___x_2504_);
v___x_2506_ = lean_box(0);
v___x_2507_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_2507_, 0, v___x_2506_);
return v___x_2507_;
}
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1___redArg___boxed(lean_object* v_mvarId_2512_, lean_object* v_val_2513_, lean_object* v___y_2514_, lean_object* v___y_2515_){
_start:
{
lean_object* v_res_2516_; 
v_res_2516_ = l_Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1___redArg(v_mvarId_2512_, v_val_2513_, v___y_2514_);
lean_dec(v___y_2514_);
return v_res_2516_;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__2(lean_object* v_as_2517_, size_t v_sz_2518_, size_t v_i_2519_, lean_object* v_b_2520_, lean_object* v___y_2521_, lean_object* v___y_2522_, lean_object* v___y_2523_, lean_object* v___y_2524_, lean_object* v___y_2525_, lean_object* v___y_2526_){
_start:
{
uint8_t v___x_2528_; 
v___x_2528_ = lean_usize_dec_lt(v_i_2519_, v_sz_2518_);
if (v___x_2528_ == 0)
{
lean_object* v___x_2529_; 
v___x_2529_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_2529_, 0, v_b_2520_);
return v___x_2529_;
}
else
{
lean_object* v_array_2530_; lean_object* v_start_2531_; lean_object* v_stop_2532_; uint8_t v___x_2533_; 
v_array_2530_ = lean_ctor_get(v_b_2520_, 0);
v_start_2531_ = lean_ctor_get(v_b_2520_, 1);
v_stop_2532_ = lean_ctor_get(v_b_2520_, 2);
v___x_2533_ = lean_nat_dec_lt(v_start_2531_, v_stop_2532_);
if (v___x_2533_ == 0)
{
lean_object* v___x_2534_; 
v___x_2534_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_2534_, 0, v_b_2520_);
return v___x_2534_;
}
else
{
lean_object* v___x_2536_; uint8_t v_isShared_2537_; uint8_t v_isSharedCheck_2558_; 
lean_inc(v_stop_2532_);
lean_inc(v_start_2531_);
lean_inc_ref(v_array_2530_);
v_isSharedCheck_2558_ = !lean_is_exclusive(v_b_2520_);
if (v_isSharedCheck_2558_ == 0)
{
lean_object* v_unused_2559_; lean_object* v_unused_2560_; lean_object* v_unused_2561_; 
v_unused_2559_ = lean_ctor_get(v_b_2520_, 2);
lean_dec(v_unused_2559_);
v_unused_2560_ = lean_ctor_get(v_b_2520_, 1);
lean_dec(v_unused_2560_);
v_unused_2561_ = lean_ctor_get(v_b_2520_, 0);
lean_dec(v_unused_2561_);
v___x_2536_ = v_b_2520_;
v_isShared_2537_ = v_isSharedCheck_2558_;
goto v_resetjp_2535_;
}
else
{
lean_dec(v_b_2520_);
v___x_2536_ = lean_box(0);
v_isShared_2537_ = v_isSharedCheck_2558_;
goto v_resetjp_2535_;
}
v_resetjp_2535_:
{
lean_object* v_a_2538_; lean_object* v___x_2539_; lean_object* v___x_2540_; lean_object* v___x_2541_; 
v_a_2538_ = lean_array_uget_borrowed(v_as_2517_, v_i_2519_);
v___x_2539_ = lean_array_fget_borrowed(v_array_2530_, v_start_2531_);
v___x_2540_ = l_Lean_Expr_mvarId_x21(v_a_2538_);
lean_inc(v___x_2539_);
v___x_2541_ = l_Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1___redArg(v___x_2540_, v___x_2539_, v___y_2524_);
if (lean_obj_tag(v___x_2541_) == 0)
{
lean_object* v___x_2542_; lean_object* v___x_2543_; lean_object* v___x_2545_; 
lean_dec_ref(v___x_2541_);
v___x_2542_ = lean_unsigned_to_nat(1u);
v___x_2543_ = lean_nat_add(v_start_2531_, v___x_2542_);
lean_dec(v_start_2531_);
if (v_isShared_2537_ == 0)
{
lean_ctor_set(v___x_2536_, 1, v___x_2543_);
v___x_2545_ = v___x_2536_;
goto v_reusejp_2544_;
}
else
{
lean_object* v_reuseFailAlloc_2549_; 
v_reuseFailAlloc_2549_ = lean_alloc_ctor(0, 3, 0);
lean_ctor_set(v_reuseFailAlloc_2549_, 0, v_array_2530_);
lean_ctor_set(v_reuseFailAlloc_2549_, 1, v___x_2543_);
lean_ctor_set(v_reuseFailAlloc_2549_, 2, v_stop_2532_);
v___x_2545_ = v_reuseFailAlloc_2549_;
goto v_reusejp_2544_;
}
v_reusejp_2544_:
{
size_t v___x_2546_; size_t v___x_2547_; 
v___x_2546_ = ((size_t)1ULL);
v___x_2547_ = lean_usize_add(v_i_2519_, v___x_2546_);
v_i_2519_ = v___x_2547_;
v_b_2520_ = v___x_2545_;
goto _start;
}
}
else
{
lean_object* v_a_2550_; lean_object* v___x_2552_; uint8_t v_isShared_2553_; uint8_t v_isSharedCheck_2557_; 
lean_del_object(v___x_2536_);
lean_dec(v_stop_2532_);
lean_dec(v_start_2531_);
lean_dec_ref(v_array_2530_);
v_a_2550_ = lean_ctor_get(v___x_2541_, 0);
v_isSharedCheck_2557_ = !lean_is_exclusive(v___x_2541_);
if (v_isSharedCheck_2557_ == 0)
{
v___x_2552_ = v___x_2541_;
v_isShared_2553_ = v_isSharedCheck_2557_;
goto v_resetjp_2551_;
}
else
{
lean_inc(v_a_2550_);
lean_dec(v___x_2541_);
v___x_2552_ = lean_box(0);
v_isShared_2553_ = v_isSharedCheck_2557_;
goto v_resetjp_2551_;
}
v_resetjp_2551_:
{
lean_object* v___x_2555_; 
if (v_isShared_2553_ == 0)
{
v___x_2555_ = v___x_2552_;
goto v_reusejp_2554_;
}
else
{
lean_object* v_reuseFailAlloc_2556_; 
v_reuseFailAlloc_2556_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2556_, 0, v_a_2550_);
v___x_2555_ = v_reuseFailAlloc_2556_;
goto v_reusejp_2554_;
}
v_reusejp_2554_:
{
return v___x_2555_;
}
}
}
}
}
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__2___boxed(lean_object* v_as_2562_, lean_object* v_sz_2563_, lean_object* v_i_2564_, lean_object* v_b_2565_, lean_object* v___y_2566_, lean_object* v___y_2567_, lean_object* v___y_2568_, lean_object* v___y_2569_, lean_object* v___y_2570_, lean_object* v___y_2571_, lean_object* v___y_2572_){
_start:
{
size_t v_sz_boxed_2573_; size_t v_i_boxed_2574_; lean_object* v_res_2575_; 
v_sz_boxed_2573_ = lean_unbox_usize(v_sz_2563_);
lean_dec(v_sz_2563_);
v_i_boxed_2574_ = lean_unbox_usize(v_i_2564_);
lean_dec(v_i_2564_);
v_res_2575_ = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__2(v_as_2562_, v_sz_boxed_2573_, v_i_boxed_2574_, v_b_2565_, v___y_2566_, v___y_2567_, v___y_2568_, v___y_2569_, v___y_2570_, v___y_2571_);
lean_dec(v___y_2571_);
lean_dec_ref(v___y_2570_);
lean_dec(v___y_2569_);
lean_dec_ref(v___y_2568_);
lean_dec(v___y_2567_);
lean_dec_ref(v___y_2566_);
lean_dec_ref(v_as_2562_);
return v_res_2575_;
}
}
LEAN_EXPORT uint8_t l_Lean_PersistentHashMap_containsAtAux___at___00Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0_spec__0_spec__1_spec__6___redArg(lean_object* v_keys_2576_, lean_object* v_i_2577_, lean_object* v_k_2578_){
_start:
{
lean_object* v___x_2579_; uint8_t v___x_2580_; 
v___x_2579_ = lean_array_get_size(v_keys_2576_);
v___x_2580_ = lean_nat_dec_lt(v_i_2577_, v___x_2579_);
if (v___x_2580_ == 0)
{
lean_dec(v_i_2577_);
return v___x_2580_;
}
else
{
lean_object* v_k_x27_2581_; uint8_t v___x_2582_; 
v_k_x27_2581_ = lean_array_fget_borrowed(v_keys_2576_, v_i_2577_);
v___x_2582_ = l_Lean_instBEqMVarId_beq(v_k_2578_, v_k_x27_2581_);
if (v___x_2582_ == 0)
{
lean_object* v___x_2583_; lean_object* v___x_2584_; 
v___x_2583_ = lean_unsigned_to_nat(1u);
v___x_2584_ = lean_nat_add(v_i_2577_, v___x_2583_);
lean_dec(v_i_2577_);
v_i_2577_ = v___x_2584_;
goto _start;
}
else
{
lean_dec(v_i_2577_);
return v___x_2582_;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_containsAtAux___at___00Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0_spec__0_spec__1_spec__6___redArg___boxed(lean_object* v_keys_2586_, lean_object* v_i_2587_, lean_object* v_k_2588_){
_start:
{
uint8_t v_res_2589_; lean_object* v_r_2590_; 
v_res_2589_ = l_Lean_PersistentHashMap_containsAtAux___at___00Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0_spec__0_spec__1_spec__6___redArg(v_keys_2586_, v_i_2587_, v_k_2588_);
lean_dec(v_k_2588_);
lean_dec_ref(v_keys_2586_);
v_r_2590_ = lean_box(v_res_2589_);
return v_r_2590_;
}
}
LEAN_EXPORT uint8_t l_Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0_spec__0_spec__1___redArg(lean_object* v_x_2591_, size_t v_x_2592_, lean_object* v_x_2593_){
_start:
{
if (lean_obj_tag(v_x_2591_) == 0)
{
lean_object* v_es_2594_; lean_object* v___x_2595_; size_t v___x_2596_; size_t v___x_2597_; size_t v___x_2598_; lean_object* v_j_2599_; lean_object* v___x_2600_; 
v_es_2594_ = lean_ctor_get(v_x_2591_, 0);
lean_inc_ref(v_es_2594_);
lean_dec_ref(v_x_2591_);
v___x_2595_ = lean_box(2);
v___x_2596_ = ((size_t)5ULL);
v___x_2597_ = lean_usize_once(&l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4___redArg___closed__1, &l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4___redArg___closed__1_once, _init_l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4___redArg___closed__1);
v___x_2598_ = lean_usize_land(v_x_2592_, v___x_2597_);
v_j_2599_ = lean_usize_to_nat(v___x_2598_);
v___x_2600_ = lean_array_get(v___x_2595_, v_es_2594_, v_j_2599_);
lean_dec(v_j_2599_);
lean_dec_ref(v_es_2594_);
switch(lean_obj_tag(v___x_2600_))
{
case 0:
{
lean_object* v_key_2601_; uint8_t v___x_2602_; 
v_key_2601_ = lean_ctor_get(v___x_2600_, 0);
lean_inc(v_key_2601_);
lean_dec_ref(v___x_2600_);
v___x_2602_ = l_Lean_instBEqMVarId_beq(v_x_2593_, v_key_2601_);
lean_dec(v_key_2601_);
return v___x_2602_;
}
case 1:
{
lean_object* v_node_2603_; size_t v___x_2604_; 
v_node_2603_ = lean_ctor_get(v___x_2600_, 0);
lean_inc(v_node_2603_);
lean_dec_ref(v___x_2600_);
v___x_2604_ = lean_usize_shift_right(v_x_2592_, v___x_2596_);
v_x_2591_ = v_node_2603_;
v_x_2592_ = v___x_2604_;
goto _start;
}
default: 
{
uint8_t v___x_2606_; 
v___x_2606_ = 0;
return v___x_2606_;
}
}
}
else
{
lean_object* v_ks_2607_; lean_object* v___x_2608_; uint8_t v___x_2609_; 
v_ks_2607_ = lean_ctor_get(v_x_2591_, 0);
lean_inc_ref(v_ks_2607_);
lean_dec_ref(v_x_2591_);
v___x_2608_ = lean_unsigned_to_nat(0u);
v___x_2609_ = l_Lean_PersistentHashMap_containsAtAux___at___00Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0_spec__0_spec__1_spec__6___redArg(v_ks_2607_, v___x_2608_, v_x_2593_);
lean_dec_ref(v_ks_2607_);
return v___x_2609_;
}
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0_spec__0_spec__1___redArg___boxed(lean_object* v_x_2610_, lean_object* v_x_2611_, lean_object* v_x_2612_){
_start:
{
size_t v_x_7955__boxed_2613_; uint8_t v_res_2614_; lean_object* v_r_2615_; 
v_x_7955__boxed_2613_ = lean_unbox_usize(v_x_2611_);
lean_dec(v_x_2611_);
v_res_2614_ = l_Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0_spec__0_spec__1___redArg(v_x_2610_, v_x_7955__boxed_2613_, v_x_2612_);
lean_dec(v_x_2612_);
v_r_2615_ = lean_box(v_res_2614_);
return v_r_2615_;
}
}
LEAN_EXPORT uint8_t l_Lean_PersistentHashMap_contains___at___00Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0_spec__0___redArg(lean_object* v_x_2616_, lean_object* v_x_2617_){
_start:
{
uint64_t v___x_2618_; size_t v___x_2619_; uint8_t v___x_2620_; 
v___x_2618_ = l_Lean_instHashableMVarId_hash(v_x_2617_);
v___x_2619_ = lean_uint64_to_usize(v___x_2618_);
v___x_2620_ = l_Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0_spec__0_spec__1___redArg(v_x_2616_, v___x_2619_, v_x_2617_);
return v___x_2620_;
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_contains___at___00Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0_spec__0___redArg___boxed(lean_object* v_x_2621_, lean_object* v_x_2622_){
_start:
{
uint8_t v_res_2623_; lean_object* v_r_2624_; 
v_res_2623_ = l_Lean_PersistentHashMap_contains___at___00Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0_spec__0___redArg(v_x_2621_, v_x_2622_);
lean_dec(v_x_2622_);
v_r_2624_ = lean_box(v_res_2623_);
return v_r_2624_;
}
}
LEAN_EXPORT lean_object* l_Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0___redArg(lean_object* v_mvarId_2625_, lean_object* v___y_2626_){
_start:
{
lean_object* v___x_2628_; lean_object* v_mctx_2629_; lean_object* v_eAssignment_2630_; uint8_t v___x_2631_; lean_object* v___x_2632_; lean_object* v___x_2633_; 
v___x_2628_ = lean_st_ref_get(v___y_2626_);
v_mctx_2629_ = lean_ctor_get(v___x_2628_, 0);
lean_inc_ref(v_mctx_2629_);
lean_dec(v___x_2628_);
v_eAssignment_2630_ = lean_ctor_get(v_mctx_2629_, 7);
lean_inc_ref(v_eAssignment_2630_);
lean_dec_ref(v_mctx_2629_);
v___x_2631_ = l_Lean_PersistentHashMap_contains___at___00Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0_spec__0___redArg(v_eAssignment_2630_, v_mvarId_2625_);
v___x_2632_ = lean_box(v___x_2631_);
v___x_2633_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_2633_, 0, v___x_2632_);
return v___x_2633_;
}
}
LEAN_EXPORT lean_object* l_Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0___redArg___boxed(lean_object* v_mvarId_2634_, lean_object* v___y_2635_, lean_object* v___y_2636_){
_start:
{
lean_object* v_res_2637_; 
v_res_2637_ = l_Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0___redArg(v_mvarId_2634_, v___y_2635_);
lean_dec(v___y_2635_);
lean_dec(v_mvarId_2634_);
return v_res_2637_;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__3(lean_object* v_as_2638_, size_t v_sz_2639_, size_t v_i_2640_, lean_object* v_b_2641_, lean_object* v___y_2642_, lean_object* v___y_2643_, lean_object* v___y_2644_, lean_object* v___y_2645_, lean_object* v___y_2646_, lean_object* v___y_2647_){
_start:
{
lean_object* v_a_2650_; uint8_t v___x_2654_; 
v___x_2654_ = lean_usize_dec_lt(v_i_2640_, v_sz_2639_);
if (v___x_2654_ == 0)
{
lean_object* v___x_2655_; 
v___x_2655_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_2655_, 0, v_b_2641_);
return v___x_2655_;
}
else
{
lean_object* v_snd_2656_; lean_object* v_fst_2657_; lean_object* v___x_2659_; uint8_t v_isShared_2660_; uint8_t v_isSharedCheck_2717_; 
v_snd_2656_ = lean_ctor_get(v_b_2641_, 1);
v_fst_2657_ = lean_ctor_get(v_b_2641_, 0);
v_isSharedCheck_2717_ = !lean_is_exclusive(v_b_2641_);
if (v_isSharedCheck_2717_ == 0)
{
v___x_2659_ = v_b_2641_;
v_isShared_2660_ = v_isSharedCheck_2717_;
goto v_resetjp_2658_;
}
else
{
lean_inc(v_snd_2656_);
lean_inc(v_fst_2657_);
lean_dec(v_b_2641_);
v___x_2659_ = lean_box(0);
v_isShared_2660_ = v_isSharedCheck_2717_;
goto v_resetjp_2658_;
}
v_resetjp_2658_:
{
lean_object* v_array_2661_; lean_object* v_start_2662_; lean_object* v_stop_2663_; uint8_t v___x_2664_; 
v_array_2661_ = lean_ctor_get(v_snd_2656_, 0);
v_start_2662_ = lean_ctor_get(v_snd_2656_, 1);
v_stop_2663_ = lean_ctor_get(v_snd_2656_, 2);
v___x_2664_ = lean_nat_dec_lt(v_start_2662_, v_stop_2663_);
if (v___x_2664_ == 0)
{
lean_object* v___x_2666_; 
if (v_isShared_2660_ == 0)
{
v___x_2666_ = v___x_2659_;
goto v_reusejp_2665_;
}
else
{
lean_object* v_reuseFailAlloc_2668_; 
v_reuseFailAlloc_2668_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v_reuseFailAlloc_2668_, 0, v_fst_2657_);
lean_ctor_set(v_reuseFailAlloc_2668_, 1, v_snd_2656_);
v___x_2666_ = v_reuseFailAlloc_2668_;
goto v_reusejp_2665_;
}
v_reusejp_2665_:
{
lean_object* v___x_2667_; 
v___x_2667_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_2667_, 0, v___x_2666_);
return v___x_2667_;
}
}
else
{
lean_object* v___x_2670_; uint8_t v_isShared_2671_; uint8_t v_isSharedCheck_2713_; 
lean_inc(v_stop_2663_);
lean_inc(v_start_2662_);
lean_inc_ref(v_array_2661_);
v_isSharedCheck_2713_ = !lean_is_exclusive(v_snd_2656_);
if (v_isSharedCheck_2713_ == 0)
{
lean_object* v_unused_2714_; lean_object* v_unused_2715_; lean_object* v_unused_2716_; 
v_unused_2714_ = lean_ctor_get(v_snd_2656_, 2);
lean_dec(v_unused_2714_);
v_unused_2715_ = lean_ctor_get(v_snd_2656_, 1);
lean_dec(v_unused_2715_);
v_unused_2716_ = lean_ctor_get(v_snd_2656_, 0);
lean_dec(v_unused_2716_);
v___x_2670_ = v_snd_2656_;
v_isShared_2671_ = v_isSharedCheck_2713_;
goto v_resetjp_2669_;
}
else
{
lean_dec(v_snd_2656_);
v___x_2670_ = lean_box(0);
v_isShared_2671_ = v_isSharedCheck_2713_;
goto v_resetjp_2669_;
}
v_resetjp_2669_:
{
lean_object* v_a_2672_; lean_object* v___x_2673_; lean_object* v___x_2674_; 
v_a_2672_ = lean_array_uget_borrowed(v_as_2638_, v_i_2640_);
v___x_2673_ = l_Lean_Expr_mvarId_x21(v_a_2672_);
v___x_2674_ = l_Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0___redArg(v___x_2673_, v___y_2645_);
if (lean_obj_tag(v___x_2674_) == 0)
{
lean_object* v_a_2675_; lean_object* v___x_2676_; lean_object* v___x_2677_; lean_object* v___x_2678_; lean_object* v___x_2680_; 
v_a_2675_ = lean_ctor_get(v___x_2674_, 0);
lean_inc(v_a_2675_);
lean_dec_ref(v___x_2674_);
v___x_2676_ = lean_array_fget(v_array_2661_, v_start_2662_);
v___x_2677_ = lean_unsigned_to_nat(1u);
v___x_2678_ = lean_nat_add(v_start_2662_, v___x_2677_);
lean_dec(v_start_2662_);
if (v_isShared_2671_ == 0)
{
lean_ctor_set(v___x_2670_, 1, v___x_2678_);
v___x_2680_ = v___x_2670_;
goto v_reusejp_2679_;
}
else
{
lean_object* v_reuseFailAlloc_2704_; 
v_reuseFailAlloc_2704_ = lean_alloc_ctor(0, 3, 0);
lean_ctor_set(v_reuseFailAlloc_2704_, 0, v_array_2661_);
lean_ctor_set(v_reuseFailAlloc_2704_, 1, v___x_2678_);
lean_ctor_set(v_reuseFailAlloc_2704_, 2, v_stop_2663_);
v___x_2680_ = v_reuseFailAlloc_2704_;
goto v_reusejp_2679_;
}
v_reusejp_2679_:
{
uint8_t v___x_2681_; 
v___x_2681_ = lean_unbox(v_a_2675_);
lean_dec(v_a_2675_);
if (v___x_2681_ == 0)
{
uint8_t v___x_2682_; uint8_t v___x_2683_; 
v___x_2682_ = lean_unbox(v___x_2676_);
lean_dec(v___x_2676_);
v___x_2683_ = l_Lean_BinderInfo_isInstImplicit(v___x_2682_);
if (v___x_2683_ == 0)
{
lean_object* v___x_2685_; 
lean_dec(v___x_2673_);
if (v_isShared_2660_ == 0)
{
lean_ctor_set(v___x_2659_, 1, v___x_2680_);
v___x_2685_ = v___x_2659_;
goto v_reusejp_2684_;
}
else
{
lean_object* v_reuseFailAlloc_2686_; 
v_reuseFailAlloc_2686_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v_reuseFailAlloc_2686_, 0, v_fst_2657_);
lean_ctor_set(v_reuseFailAlloc_2686_, 1, v___x_2680_);
v___x_2685_ = v_reuseFailAlloc_2686_;
goto v_reusejp_2684_;
}
v_reusejp_2684_:
{
v_a_2650_ = v___x_2685_;
goto v___jp_2649_;
}
}
else
{
uint8_t v___x_2687_; lean_object* v___x_2688_; 
v___x_2687_ = 1;
lean_inc(v___x_2673_);
v___x_2688_ = l_Lean_MVarId_setKind___redArg(v___x_2673_, v___x_2687_, v___y_2645_);
if (lean_obj_tag(v___x_2688_) == 0)
{
lean_object* v___x_2689_; lean_object* v___x_2691_; 
lean_dec_ref(v___x_2688_);
v___x_2689_ = lean_array_push(v_fst_2657_, v___x_2673_);
if (v_isShared_2660_ == 0)
{
lean_ctor_set(v___x_2659_, 1, v___x_2680_);
lean_ctor_set(v___x_2659_, 0, v___x_2689_);
v___x_2691_ = v___x_2659_;
goto v_reusejp_2690_;
}
else
{
lean_object* v_reuseFailAlloc_2692_; 
v_reuseFailAlloc_2692_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v_reuseFailAlloc_2692_, 0, v___x_2689_);
lean_ctor_set(v_reuseFailAlloc_2692_, 1, v___x_2680_);
v___x_2691_ = v_reuseFailAlloc_2692_;
goto v_reusejp_2690_;
}
v_reusejp_2690_:
{
v_a_2650_ = v___x_2691_;
goto v___jp_2649_;
}
}
else
{
lean_object* v_a_2693_; lean_object* v___x_2695_; uint8_t v_isShared_2696_; uint8_t v_isSharedCheck_2700_; 
lean_dec_ref(v___x_2680_);
lean_dec(v___x_2673_);
lean_del_object(v___x_2659_);
lean_dec(v_fst_2657_);
v_a_2693_ = lean_ctor_get(v___x_2688_, 0);
v_isSharedCheck_2700_ = !lean_is_exclusive(v___x_2688_);
if (v_isSharedCheck_2700_ == 0)
{
v___x_2695_ = v___x_2688_;
v_isShared_2696_ = v_isSharedCheck_2700_;
goto v_resetjp_2694_;
}
else
{
lean_inc(v_a_2693_);
lean_dec(v___x_2688_);
v___x_2695_ = lean_box(0);
v_isShared_2696_ = v_isSharedCheck_2700_;
goto v_resetjp_2694_;
}
v_resetjp_2694_:
{
lean_object* v___x_2698_; 
if (v_isShared_2696_ == 0)
{
v___x_2698_ = v___x_2695_;
goto v_reusejp_2697_;
}
else
{
lean_object* v_reuseFailAlloc_2699_; 
v_reuseFailAlloc_2699_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2699_, 0, v_a_2693_);
v___x_2698_ = v_reuseFailAlloc_2699_;
goto v_reusejp_2697_;
}
v_reusejp_2697_:
{
return v___x_2698_;
}
}
}
}
}
else
{
lean_object* v___x_2702_; 
lean_dec(v___x_2676_);
lean_dec(v___x_2673_);
if (v_isShared_2660_ == 0)
{
lean_ctor_set(v___x_2659_, 1, v___x_2680_);
v___x_2702_ = v___x_2659_;
goto v_reusejp_2701_;
}
else
{
lean_object* v_reuseFailAlloc_2703_; 
v_reuseFailAlloc_2703_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v_reuseFailAlloc_2703_, 0, v_fst_2657_);
lean_ctor_set(v_reuseFailAlloc_2703_, 1, v___x_2680_);
v___x_2702_ = v_reuseFailAlloc_2703_;
goto v_reusejp_2701_;
}
v_reusejp_2701_:
{
v_a_2650_ = v___x_2702_;
goto v___jp_2649_;
}
}
}
}
else
{
lean_object* v_a_2705_; lean_object* v___x_2707_; uint8_t v_isShared_2708_; uint8_t v_isSharedCheck_2712_; 
lean_dec(v___x_2673_);
lean_del_object(v___x_2670_);
lean_dec(v_stop_2663_);
lean_dec(v_start_2662_);
lean_dec_ref(v_array_2661_);
lean_del_object(v___x_2659_);
lean_dec(v_fst_2657_);
v_a_2705_ = lean_ctor_get(v___x_2674_, 0);
v_isSharedCheck_2712_ = !lean_is_exclusive(v___x_2674_);
if (v_isSharedCheck_2712_ == 0)
{
v___x_2707_ = v___x_2674_;
v_isShared_2708_ = v_isSharedCheck_2712_;
goto v_resetjp_2706_;
}
else
{
lean_inc(v_a_2705_);
lean_dec(v___x_2674_);
v___x_2707_ = lean_box(0);
v_isShared_2708_ = v_isSharedCheck_2712_;
goto v_resetjp_2706_;
}
v_resetjp_2706_:
{
lean_object* v___x_2710_; 
if (v_isShared_2708_ == 0)
{
v___x_2710_ = v___x_2707_;
goto v_reusejp_2709_;
}
else
{
lean_object* v_reuseFailAlloc_2711_; 
v_reuseFailAlloc_2711_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2711_, 0, v_a_2705_);
v___x_2710_ = v_reuseFailAlloc_2711_;
goto v_reusejp_2709_;
}
v_reusejp_2709_:
{
return v___x_2710_;
}
}
}
}
}
}
}
v___jp_2649_:
{
size_t v___x_2651_; size_t v___x_2652_; 
v___x_2651_ = ((size_t)1ULL);
v___x_2652_ = lean_usize_add(v_i_2640_, v___x_2651_);
v_i_2640_ = v___x_2652_;
v_b_2641_ = v_a_2650_;
goto _start;
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__3___boxed(lean_object* v_as_2718_, lean_object* v_sz_2719_, lean_object* v_i_2720_, lean_object* v_b_2721_, lean_object* v___y_2722_, lean_object* v___y_2723_, lean_object* v___y_2724_, lean_object* v___y_2725_, lean_object* v___y_2726_, lean_object* v___y_2727_, lean_object* v___y_2728_){
_start:
{
size_t v_sz_boxed_2729_; size_t v_i_boxed_2730_; lean_object* v_res_2731_; 
v_sz_boxed_2729_ = lean_unbox_usize(v_sz_2719_);
lean_dec(v_sz_2719_);
v_i_boxed_2730_ = lean_unbox_usize(v_i_2720_);
lean_dec(v_i_2720_);
v_res_2731_ = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__3(v_as_2718_, v_sz_boxed_2729_, v_i_boxed_2730_, v_b_2721_, v___y_2722_, v___y_2723_, v___y_2724_, v___y_2725_, v___y_2726_, v___y_2727_);
lean_dec(v___y_2727_);
lean_dec_ref(v___y_2726_);
lean_dec(v___y_2725_);
lean_dec_ref(v___y_2724_);
lean_dec(v___y_2723_);
lean_dec_ref(v___y_2722_);
lean_dec_ref(v_as_2718_);
return v_res_2731_;
}
}
static lean_object* _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst___closed__0(void){
_start:
{
lean_object* v___x_2732_; lean_object* v_dummy_2733_; 
v___x_2732_ = lean_box(0);
v_dummy_2733_ = l_Lean_Expr_sort___override(v___x_2732_);
return v_dummy_2733_;
}
}
static lean_object* _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst___closed__3(void){
_start:
{
lean_object* v___x_2737_; lean_object* v___x_2738_; 
v___x_2737_ = ((lean_object*)(l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst___closed__2));
v___x_2738_ = l_Lean_stringToMessageData(v___x_2737_);
return v___x_2738_;
}
}
static lean_object* _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst___closed__5(void){
_start:
{
lean_object* v___x_2740_; lean_object* v___x_2741_; 
v___x_2740_ = ((lean_object*)(l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst___closed__4));
v___x_2741_ = l_Lean_stringToMessageData(v___x_2740_);
return v___x_2741_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst(lean_object* v_classExpr_2742_, lean_object* v_declName_2743_, lean_object* v_declVal_2744_, lean_object* v_val_2745_, lean_object* v_a_2746_, lean_object* v_a_2747_, lean_object* v_a_2748_, lean_object* v_a_2749_, lean_object* v_a_2750_, lean_object* v_a_2751_){
_start:
{
lean_object* v___x_2753_; 
lean_inc(v_a_2751_);
lean_inc_ref(v_a_2750_);
lean_inc(v_a_2749_);
lean_inc_ref(v_a_2748_);
v___x_2753_ = l_Lean_Meta_whnfCore(v_classExpr_2742_, v_a_2748_, v_a_2749_, v_a_2750_, v_a_2751_);
if (lean_obj_tag(v___x_2753_) == 0)
{
lean_object* v_a_2754_; lean_object* v___x_2755_; lean_object* v___x_2756_; 
v_a_2754_ = lean_ctor_get(v___x_2753_, 0);
lean_inc(v_a_2754_);
lean_dec_ref(v___x_2753_);
v___x_2755_ = l_Lean_Expr_getAppFn(v_a_2754_);
lean_inc(v_a_2751_);
lean_inc_ref(v_a_2750_);
lean_inc(v_a_2749_);
lean_inc_ref(v_a_2748_);
lean_inc_ref(v___x_2755_);
v___x_2756_ = lean_infer_type(v___x_2755_, v_a_2748_, v_a_2749_, v_a_2750_, v_a_2751_);
if (lean_obj_tag(v___x_2756_) == 0)
{
lean_object* v_a_2757_; lean_object* v___x_2758_; uint8_t v___x_2759_; lean_object* v___x_2760_; 
v_a_2757_ = lean_ctor_get(v___x_2756_, 0);
lean_inc(v_a_2757_);
lean_dec_ref(v___x_2756_);
v___x_2758_ = lean_box(0);
v___x_2759_ = 0;
lean_inc(v_a_2751_);
lean_inc_ref(v_a_2750_);
lean_inc(v_a_2749_);
lean_inc_ref(v_a_2748_);
v___x_2760_ = l_Lean_Meta_forallMetaTelescopeReducing(v_a_2757_, v___x_2758_, v___x_2759_, v_a_2748_, v_a_2749_, v_a_2750_, v_a_2751_);
if (lean_obj_tag(v___x_2760_) == 0)
{
lean_object* v_a_2761_; lean_object* v_snd_2762_; lean_object* v_fst_2763_; lean_object* v___x_2765_; uint8_t v_isShared_2766_; uint8_t v_isSharedCheck_2855_; 
v_a_2761_ = lean_ctor_get(v___x_2760_, 0);
lean_inc(v_a_2761_);
lean_dec_ref(v___x_2760_);
v_snd_2762_ = lean_ctor_get(v_a_2761_, 1);
v_fst_2763_ = lean_ctor_get(v_a_2761_, 0);
v_isSharedCheck_2855_ = !lean_is_exclusive(v_a_2761_);
if (v_isSharedCheck_2855_ == 0)
{
v___x_2765_ = v_a_2761_;
v_isShared_2766_ = v_isSharedCheck_2855_;
goto v_resetjp_2764_;
}
else
{
lean_inc(v_snd_2762_);
lean_inc(v_fst_2763_);
lean_dec(v_a_2761_);
v___x_2765_ = lean_box(0);
v_isShared_2766_ = v_isSharedCheck_2855_;
goto v_resetjp_2764_;
}
v_resetjp_2764_:
{
lean_object* v_fst_2767_; lean_object* v___x_2769_; uint8_t v_isShared_2770_; uint8_t v_isSharedCheck_2853_; 
v_fst_2767_ = lean_ctor_get(v_snd_2762_, 0);
v_isSharedCheck_2853_ = !lean_is_exclusive(v_snd_2762_);
if (v_isSharedCheck_2853_ == 0)
{
lean_object* v_unused_2854_; 
v_unused_2854_ = lean_ctor_get(v_snd_2762_, 1);
lean_dec(v_unused_2854_);
v___x_2769_ = v_snd_2762_;
v_isShared_2770_ = v_isSharedCheck_2853_;
goto v_resetjp_2768_;
}
else
{
lean_inc(v_fst_2767_);
lean_dec(v_snd_2762_);
v___x_2769_ = lean_box(0);
v_isShared_2770_ = v_isSharedCheck_2853_;
goto v_resetjp_2768_;
}
v_resetjp_2768_:
{
lean_object* v_dummy_2771_; lean_object* v_nargs_2772_; lean_object* v___x_2773_; lean_object* v___x_2774_; lean_object* v___x_2775_; lean_object* v___x_2776_; lean_object* v___x_2777_; lean_object* v___x_2778_; lean_object* v___x_2779_; size_t v_sz_2780_; size_t v___x_2781_; lean_object* v___x_2782_; 
v_dummy_2771_ = lean_obj_once(&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst___closed__0, &l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst___closed__0_once, _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst___closed__0);
v_nargs_2772_ = l_Lean_Expr_getAppNumArgs(v_a_2754_);
lean_inc(v_nargs_2772_);
v___x_2773_ = lean_mk_array(v_nargs_2772_, v_dummy_2771_);
v___x_2774_ = lean_unsigned_to_nat(1u);
v___x_2775_ = lean_nat_sub(v_nargs_2772_, v___x_2774_);
lean_dec(v_nargs_2772_);
v___x_2776_ = l___private_Lean_Expr_0__Lean_Expr_getAppArgsAux(v_a_2754_, v___x_2773_, v___x_2775_);
v___x_2777_ = lean_unsigned_to_nat(0u);
v___x_2778_ = lean_array_get_size(v___x_2776_);
v___x_2779_ = l_Array_toSubarray___redArg(v___x_2776_, v___x_2777_, v___x_2778_);
v_sz_2780_ = lean_array_size(v_fst_2763_);
v___x_2781_ = ((size_t)0ULL);
v___x_2782_ = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__2(v_fst_2763_, v_sz_2780_, v___x_2781_, v___x_2779_, v_a_2746_, v_a_2747_, v_a_2748_, v_a_2749_, v_a_2750_, v_a_2751_);
if (lean_obj_tag(v___x_2782_) == 0)
{
lean_object* v___x_2783_; lean_object* v___x_2784_; 
lean_dec_ref(v___x_2782_);
lean_inc_ref(v___x_2755_);
v___x_2783_ = l_Lean_mkAppN(v___x_2755_, v_fst_2763_);
lean_inc(v_a_2751_);
lean_inc_ref(v_a_2750_);
lean_inc(v_a_2749_);
lean_inc_ref(v_a_2748_);
lean_inc_ref(v___x_2783_);
v___x_2784_ = l_Lean_Meta_isClass_x3f(v___x_2783_, v_a_2748_, v_a_2749_, v_a_2750_, v_a_2751_);
if (lean_obj_tag(v___x_2784_) == 0)
{
lean_object* v_a_2785_; 
v_a_2785_ = lean_ctor_get(v___x_2784_, 0);
lean_inc(v_a_2785_);
lean_dec_ref(v___x_2784_);
if (lean_obj_tag(v_a_2785_) == 1)
{
lean_object* v_val_2786_; lean_object* v___x_2788_; uint8_t v_isShared_2789_; uint8_t v_isSharedCheck_2825_; 
lean_del_object(v___x_2765_);
v_val_2786_ = lean_ctor_get(v_a_2785_, 0);
v_isSharedCheck_2825_ = !lean_is_exclusive(v_a_2785_);
if (v_isSharedCheck_2825_ == 0)
{
v___x_2788_ = v_a_2785_;
v_isShared_2789_ = v_isSharedCheck_2825_;
goto v_resetjp_2787_;
}
else
{
lean_inc(v_val_2786_);
lean_dec(v_a_2785_);
v___x_2788_ = lean_box(0);
v_isShared_2789_ = v_isSharedCheck_2825_;
goto v_resetjp_2787_;
}
v_resetjp_2787_:
{
lean_object* v___x_2790_; lean_object* v___x_2791_; lean_object* v___x_2792_; lean_object* v___x_2794_; 
v___x_2790_ = ((lean_object*)(l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst___closed__1));
v___x_2791_ = lean_array_get_size(v_fst_2767_);
lean_inc(v_fst_2767_);
v___x_2792_ = l_Array_toSubarray___redArg(v_fst_2767_, v___x_2777_, v___x_2791_);
if (v_isShared_2770_ == 0)
{
lean_ctor_set(v___x_2769_, 1, v___x_2792_);
lean_ctor_set(v___x_2769_, 0, v___x_2790_);
v___x_2794_ = v___x_2769_;
goto v_reusejp_2793_;
}
else
{
lean_object* v_reuseFailAlloc_2824_; 
v_reuseFailAlloc_2824_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v_reuseFailAlloc_2824_, 0, v___x_2790_);
lean_ctor_set(v_reuseFailAlloc_2824_, 1, v___x_2792_);
v___x_2794_ = v_reuseFailAlloc_2824_;
goto v_reusejp_2793_;
}
v_reusejp_2793_:
{
lean_object* v___x_2795_; 
v___x_2795_ = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__3(v_fst_2763_, v_sz_2780_, v___x_2781_, v___x_2794_, v_a_2746_, v_a_2747_, v_a_2748_, v_a_2749_, v_a_2750_, v_a_2751_);
if (lean_obj_tag(v___x_2795_) == 0)
{
lean_object* v_a_2796_; lean_object* v___x_2798_; 
v_a_2796_ = lean_ctor_get(v___x_2795_, 0);
lean_inc(v_a_2796_);
lean_dec_ref(v___x_2795_);
lean_inc_ref(v___x_2783_);
if (v_isShared_2789_ == 0)
{
lean_ctor_set(v___x_2788_, 0, v___x_2783_);
v___x_2798_ = v___x_2788_;
goto v_reusejp_2797_;
}
else
{
lean_object* v_reuseFailAlloc_2815_; 
v_reuseFailAlloc_2815_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2815_, 0, v___x_2783_);
v___x_2798_ = v_reuseFailAlloc_2815_;
goto v_reusejp_2797_;
}
v_reusejp_2797_:
{
uint8_t v___x_2799_; lean_object* v___x_2800_; lean_object* v___x_2801_; 
v___x_2799_ = 1;
v___x_2800_ = lean_box(0);
lean_inc_ref(v_a_2748_);
v___x_2801_ = l_Lean_Meta_mkFreshExprMVar(v___x_2798_, v___x_2799_, v___x_2800_, v_a_2748_, v_a_2749_, v_a_2750_, v_a_2751_);
if (lean_obj_tag(v___x_2801_) == 0)
{
lean_object* v_a_2802_; lean_object* v_fst_2803_; lean_object* v___x_2804_; lean_object* v___x_2805_; lean_object* v___x_2806_; 
v_a_2802_ = lean_ctor_get(v___x_2801_, 0);
lean_inc(v_a_2802_);
lean_dec_ref(v___x_2801_);
v_fst_2803_ = lean_ctor_get(v_a_2796_, 0);
lean_inc(v_fst_2803_);
lean_dec(v_a_2796_);
v___x_2804_ = l_Lean_Expr_mvarId_x21(v_a_2802_);
v___x_2805_ = lean_array_push(v_fst_2803_, v___x_2804_);
v___x_2806_ = l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go(v_declName_2743_, v_declVal_2744_, v___x_2755_, v_fst_2763_, v_fst_2767_, v___x_2783_, v_val_2786_, v_a_2802_, v___x_2805_, v_val_2745_, v_a_2746_, v_a_2747_, v_a_2748_, v_a_2749_, v_a_2750_, v_a_2751_);
lean_dec_ref(v___x_2805_);
return v___x_2806_;
}
else
{
lean_object* v_a_2807_; lean_object* v___x_2809_; uint8_t v_isShared_2810_; uint8_t v_isSharedCheck_2814_; 
lean_dec(v_a_2796_);
lean_dec(v_val_2786_);
lean_dec_ref(v___x_2783_);
lean_dec(v_fst_2767_);
lean_dec(v_fst_2763_);
lean_dec_ref(v___x_2755_);
lean_dec(v_a_2751_);
lean_dec_ref(v_a_2750_);
lean_dec(v_a_2749_);
lean_dec_ref(v_a_2748_);
lean_dec(v_a_2747_);
lean_dec_ref(v_a_2746_);
lean_dec_ref(v_val_2745_);
lean_dec_ref(v_declVal_2744_);
lean_dec(v_declName_2743_);
v_a_2807_ = lean_ctor_get(v___x_2801_, 0);
v_isSharedCheck_2814_ = !lean_is_exclusive(v___x_2801_);
if (v_isSharedCheck_2814_ == 0)
{
v___x_2809_ = v___x_2801_;
v_isShared_2810_ = v_isSharedCheck_2814_;
goto v_resetjp_2808_;
}
else
{
lean_inc(v_a_2807_);
lean_dec(v___x_2801_);
v___x_2809_ = lean_box(0);
v_isShared_2810_ = v_isSharedCheck_2814_;
goto v_resetjp_2808_;
}
v_resetjp_2808_:
{
lean_object* v___x_2812_; 
if (v_isShared_2810_ == 0)
{
v___x_2812_ = v___x_2809_;
goto v_reusejp_2811_;
}
else
{
lean_object* v_reuseFailAlloc_2813_; 
v_reuseFailAlloc_2813_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2813_, 0, v_a_2807_);
v___x_2812_ = v_reuseFailAlloc_2813_;
goto v_reusejp_2811_;
}
v_reusejp_2811_:
{
return v___x_2812_;
}
}
}
}
}
else
{
lean_object* v_a_2816_; lean_object* v___x_2818_; uint8_t v_isShared_2819_; uint8_t v_isSharedCheck_2823_; 
lean_del_object(v___x_2788_);
lean_dec(v_val_2786_);
lean_dec_ref(v___x_2783_);
lean_dec(v_fst_2767_);
lean_dec(v_fst_2763_);
lean_dec_ref(v___x_2755_);
lean_dec(v_a_2751_);
lean_dec_ref(v_a_2750_);
lean_dec(v_a_2749_);
lean_dec_ref(v_a_2748_);
lean_dec(v_a_2747_);
lean_dec_ref(v_a_2746_);
lean_dec_ref(v_val_2745_);
lean_dec_ref(v_declVal_2744_);
lean_dec(v_declName_2743_);
v_a_2816_ = lean_ctor_get(v___x_2795_, 0);
v_isSharedCheck_2823_ = !lean_is_exclusive(v___x_2795_);
if (v_isSharedCheck_2823_ == 0)
{
v___x_2818_ = v___x_2795_;
v_isShared_2819_ = v_isSharedCheck_2823_;
goto v_resetjp_2817_;
}
else
{
lean_inc(v_a_2816_);
lean_dec(v___x_2795_);
v___x_2818_ = lean_box(0);
v_isShared_2819_ = v_isSharedCheck_2823_;
goto v_resetjp_2817_;
}
v_resetjp_2817_:
{
lean_object* v___x_2821_; 
if (v_isShared_2819_ == 0)
{
v___x_2821_ = v___x_2818_;
goto v_reusejp_2820_;
}
else
{
lean_object* v_reuseFailAlloc_2822_; 
v_reuseFailAlloc_2822_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2822_, 0, v_a_2816_);
v___x_2821_ = v_reuseFailAlloc_2822_;
goto v_reusejp_2820_;
}
v_reusejp_2820_:
{
return v___x_2821_;
}
}
}
}
}
}
else
{
lean_object* v___x_2826_; uint8_t v___x_2827_; lean_object* v___x_2828_; lean_object* v___x_2830_; 
lean_dec(v_a_2785_);
lean_del_object(v___x_2769_);
lean_dec(v_fst_2767_);
lean_dec(v_fst_2763_);
lean_dec_ref(v___x_2755_);
lean_dec_ref(v_val_2745_);
lean_dec_ref(v_declVal_2744_);
v___x_2826_ = lean_obj_once(&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst___closed__3, &l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst___closed__3_once, _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst___closed__3);
v___x_2827_ = 0;
v___x_2828_ = l_Lean_MessageData_ofConstName(v_declName_2743_, v___x_2827_);
if (v_isShared_2766_ == 0)
{
lean_ctor_set_tag(v___x_2765_, 7);
lean_ctor_set(v___x_2765_, 1, v___x_2828_);
lean_ctor_set(v___x_2765_, 0, v___x_2826_);
v___x_2830_ = v___x_2765_;
goto v_reusejp_2829_;
}
else
{
lean_object* v_reuseFailAlloc_2836_; 
v_reuseFailAlloc_2836_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v_reuseFailAlloc_2836_, 0, v___x_2826_);
lean_ctor_set(v_reuseFailAlloc_2836_, 1, v___x_2828_);
v___x_2830_ = v_reuseFailAlloc_2836_;
goto v_reusejp_2829_;
}
v_reusejp_2829_:
{
lean_object* v___x_2831_; lean_object* v___x_2832_; lean_object* v___x_2833_; lean_object* v___x_2834_; lean_object* v___x_2835_; 
v___x_2831_ = lean_obj_once(&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst___closed__5, &l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst___closed__5_once, _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst___closed__5);
v___x_2832_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_2832_, 0, v___x_2830_);
lean_ctor_set(v___x_2832_, 1, v___x_2831_);
v___x_2833_ = l_Lean_indentExpr(v___x_2783_);
v___x_2834_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_2834_, 0, v___x_2832_);
lean_ctor_set(v___x_2834_, 1, v___x_2833_);
v___x_2835_ = l_Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4___redArg(v___x_2834_, v_a_2746_, v_a_2747_, v_a_2748_, v_a_2749_, v_a_2750_, v_a_2751_);
lean_dec(v_a_2751_);
lean_dec_ref(v_a_2750_);
lean_dec(v_a_2749_);
lean_dec_ref(v_a_2748_);
lean_dec(v_a_2747_);
return v___x_2835_;
}
}
}
else
{
lean_object* v_a_2837_; lean_object* v___x_2839_; uint8_t v_isShared_2840_; uint8_t v_isSharedCheck_2844_; 
lean_dec_ref(v___x_2783_);
lean_del_object(v___x_2769_);
lean_dec(v_fst_2767_);
lean_del_object(v___x_2765_);
lean_dec(v_fst_2763_);
lean_dec_ref(v___x_2755_);
lean_dec(v_a_2751_);
lean_dec_ref(v_a_2750_);
lean_dec(v_a_2749_);
lean_dec_ref(v_a_2748_);
lean_dec(v_a_2747_);
lean_dec_ref(v_a_2746_);
lean_dec_ref(v_val_2745_);
lean_dec_ref(v_declVal_2744_);
lean_dec(v_declName_2743_);
v_a_2837_ = lean_ctor_get(v___x_2784_, 0);
v_isSharedCheck_2844_ = !lean_is_exclusive(v___x_2784_);
if (v_isSharedCheck_2844_ == 0)
{
v___x_2839_ = v___x_2784_;
v_isShared_2840_ = v_isSharedCheck_2844_;
goto v_resetjp_2838_;
}
else
{
lean_inc(v_a_2837_);
lean_dec(v___x_2784_);
v___x_2839_ = lean_box(0);
v_isShared_2840_ = v_isSharedCheck_2844_;
goto v_resetjp_2838_;
}
v_resetjp_2838_:
{
lean_object* v___x_2842_; 
if (v_isShared_2840_ == 0)
{
v___x_2842_ = v___x_2839_;
goto v_reusejp_2841_;
}
else
{
lean_object* v_reuseFailAlloc_2843_; 
v_reuseFailAlloc_2843_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2843_, 0, v_a_2837_);
v___x_2842_ = v_reuseFailAlloc_2843_;
goto v_reusejp_2841_;
}
v_reusejp_2841_:
{
return v___x_2842_;
}
}
}
}
else
{
lean_object* v_a_2845_; lean_object* v___x_2847_; uint8_t v_isShared_2848_; uint8_t v_isSharedCheck_2852_; 
lean_del_object(v___x_2769_);
lean_dec(v_fst_2767_);
lean_del_object(v___x_2765_);
lean_dec(v_fst_2763_);
lean_dec_ref(v___x_2755_);
lean_dec(v_a_2751_);
lean_dec_ref(v_a_2750_);
lean_dec(v_a_2749_);
lean_dec_ref(v_a_2748_);
lean_dec(v_a_2747_);
lean_dec_ref(v_a_2746_);
lean_dec_ref(v_val_2745_);
lean_dec_ref(v_declVal_2744_);
lean_dec(v_declName_2743_);
v_a_2845_ = lean_ctor_get(v___x_2782_, 0);
v_isSharedCheck_2852_ = !lean_is_exclusive(v___x_2782_);
if (v_isSharedCheck_2852_ == 0)
{
v___x_2847_ = v___x_2782_;
v_isShared_2848_ = v_isSharedCheck_2852_;
goto v_resetjp_2846_;
}
else
{
lean_inc(v_a_2845_);
lean_dec(v___x_2782_);
v___x_2847_ = lean_box(0);
v_isShared_2848_ = v_isSharedCheck_2852_;
goto v_resetjp_2846_;
}
v_resetjp_2846_:
{
lean_object* v___x_2850_; 
if (v_isShared_2848_ == 0)
{
v___x_2850_ = v___x_2847_;
goto v_reusejp_2849_;
}
else
{
lean_object* v_reuseFailAlloc_2851_; 
v_reuseFailAlloc_2851_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2851_, 0, v_a_2845_);
v___x_2850_ = v_reuseFailAlloc_2851_;
goto v_reusejp_2849_;
}
v_reusejp_2849_:
{
return v___x_2850_;
}
}
}
}
}
}
else
{
lean_object* v_a_2856_; lean_object* v___x_2858_; uint8_t v_isShared_2859_; uint8_t v_isSharedCheck_2863_; 
lean_dec_ref(v___x_2755_);
lean_dec(v_a_2754_);
lean_dec(v_a_2751_);
lean_dec_ref(v_a_2750_);
lean_dec(v_a_2749_);
lean_dec_ref(v_a_2748_);
lean_dec(v_a_2747_);
lean_dec_ref(v_a_2746_);
lean_dec_ref(v_val_2745_);
lean_dec_ref(v_declVal_2744_);
lean_dec(v_declName_2743_);
v_a_2856_ = lean_ctor_get(v___x_2760_, 0);
v_isSharedCheck_2863_ = !lean_is_exclusive(v___x_2760_);
if (v_isSharedCheck_2863_ == 0)
{
v___x_2858_ = v___x_2760_;
v_isShared_2859_ = v_isSharedCheck_2863_;
goto v_resetjp_2857_;
}
else
{
lean_inc(v_a_2856_);
lean_dec(v___x_2760_);
v___x_2858_ = lean_box(0);
v_isShared_2859_ = v_isSharedCheck_2863_;
goto v_resetjp_2857_;
}
v_resetjp_2857_:
{
lean_object* v___x_2861_; 
if (v_isShared_2859_ == 0)
{
v___x_2861_ = v___x_2858_;
goto v_reusejp_2860_;
}
else
{
lean_object* v_reuseFailAlloc_2862_; 
v_reuseFailAlloc_2862_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2862_, 0, v_a_2856_);
v___x_2861_ = v_reuseFailAlloc_2862_;
goto v_reusejp_2860_;
}
v_reusejp_2860_:
{
return v___x_2861_;
}
}
}
}
else
{
lean_object* v_a_2864_; lean_object* v___x_2866_; uint8_t v_isShared_2867_; uint8_t v_isSharedCheck_2871_; 
lean_dec_ref(v___x_2755_);
lean_dec(v_a_2754_);
lean_dec(v_a_2751_);
lean_dec_ref(v_a_2750_);
lean_dec(v_a_2749_);
lean_dec_ref(v_a_2748_);
lean_dec(v_a_2747_);
lean_dec_ref(v_a_2746_);
lean_dec_ref(v_val_2745_);
lean_dec_ref(v_declVal_2744_);
lean_dec(v_declName_2743_);
v_a_2864_ = lean_ctor_get(v___x_2756_, 0);
v_isSharedCheck_2871_ = !lean_is_exclusive(v___x_2756_);
if (v_isSharedCheck_2871_ == 0)
{
v___x_2866_ = v___x_2756_;
v_isShared_2867_ = v_isSharedCheck_2871_;
goto v_resetjp_2865_;
}
else
{
lean_inc(v_a_2864_);
lean_dec(v___x_2756_);
v___x_2866_ = lean_box(0);
v_isShared_2867_ = v_isSharedCheck_2871_;
goto v_resetjp_2865_;
}
v_resetjp_2865_:
{
lean_object* v___x_2869_; 
if (v_isShared_2867_ == 0)
{
v___x_2869_ = v___x_2866_;
goto v_reusejp_2868_;
}
else
{
lean_object* v_reuseFailAlloc_2870_; 
v_reuseFailAlloc_2870_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2870_, 0, v_a_2864_);
v___x_2869_ = v_reuseFailAlloc_2870_;
goto v_reusejp_2868_;
}
v_reusejp_2868_:
{
return v___x_2869_;
}
}
}
}
else
{
lean_object* v_a_2872_; lean_object* v___x_2874_; uint8_t v_isShared_2875_; uint8_t v_isSharedCheck_2879_; 
lean_dec(v_a_2751_);
lean_dec_ref(v_a_2750_);
lean_dec(v_a_2749_);
lean_dec_ref(v_a_2748_);
lean_dec(v_a_2747_);
lean_dec_ref(v_a_2746_);
lean_dec_ref(v_val_2745_);
lean_dec_ref(v_declVal_2744_);
lean_dec(v_declName_2743_);
v_a_2872_ = lean_ctor_get(v___x_2753_, 0);
v_isSharedCheck_2879_ = !lean_is_exclusive(v___x_2753_);
if (v_isSharedCheck_2879_ == 0)
{
v___x_2874_ = v___x_2753_;
v_isShared_2875_ = v_isSharedCheck_2879_;
goto v_resetjp_2873_;
}
else
{
lean_inc(v_a_2872_);
lean_dec(v___x_2753_);
v___x_2874_ = lean_box(0);
v_isShared_2875_ = v_isSharedCheck_2879_;
goto v_resetjp_2873_;
}
v_resetjp_2873_:
{
lean_object* v___x_2877_; 
if (v_isShared_2875_ == 0)
{
v___x_2877_ = v___x_2874_;
goto v_reusejp_2876_;
}
else
{
lean_object* v_reuseFailAlloc_2878_; 
v_reuseFailAlloc_2878_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_2878_, 0, v_a_2872_);
v___x_2877_ = v_reuseFailAlloc_2878_;
goto v_reusejp_2876_;
}
v_reusejp_2876_:
{
return v___x_2877_;
}
}
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst___boxed(lean_object* v_classExpr_2880_, lean_object* v_declName_2881_, lean_object* v_declVal_2882_, lean_object* v_val_2883_, lean_object* v_a_2884_, lean_object* v_a_2885_, lean_object* v_a_2886_, lean_object* v_a_2887_, lean_object* v_a_2888_, lean_object* v_a_2889_, lean_object* v_a_2890_){
_start:
{
lean_object* v_res_2891_; 
v_res_2891_ = l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst(v_classExpr_2880_, v_declName_2881_, v_declVal_2882_, v_val_2883_, v_a_2884_, v_a_2885_, v_a_2886_, v_a_2887_, v_a_2888_, v_a_2889_);
return v_res_2891_;
}
}
LEAN_EXPORT lean_object* l_Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0(lean_object* v_mvarId_2892_, lean_object* v___y_2893_, lean_object* v___y_2894_, lean_object* v___y_2895_, lean_object* v___y_2896_, lean_object* v___y_2897_, lean_object* v___y_2898_){
_start:
{
lean_object* v___x_2900_; 
v___x_2900_ = l_Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0___redArg(v_mvarId_2892_, v___y_2896_);
return v___x_2900_;
}
}
LEAN_EXPORT lean_object* l_Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0___boxed(lean_object* v_mvarId_2901_, lean_object* v___y_2902_, lean_object* v___y_2903_, lean_object* v___y_2904_, lean_object* v___y_2905_, lean_object* v___y_2906_, lean_object* v___y_2907_, lean_object* v___y_2908_){
_start:
{
lean_object* v_res_2909_; 
v_res_2909_ = l_Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0(v_mvarId_2901_, v___y_2902_, v___y_2903_, v___y_2904_, v___y_2905_, v___y_2906_, v___y_2907_);
lean_dec(v___y_2907_);
lean_dec_ref(v___y_2906_);
lean_dec(v___y_2905_);
lean_dec_ref(v___y_2904_);
lean_dec(v___y_2903_);
lean_dec_ref(v___y_2902_);
lean_dec(v_mvarId_2901_);
return v_res_2909_;
}
}
LEAN_EXPORT lean_object* l_Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1(lean_object* v_mvarId_2910_, lean_object* v_val_2911_, lean_object* v___y_2912_, lean_object* v___y_2913_, lean_object* v___y_2914_, lean_object* v___y_2915_, lean_object* v___y_2916_, lean_object* v___y_2917_){
_start:
{
lean_object* v___x_2919_; 
v___x_2919_ = l_Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1___redArg(v_mvarId_2910_, v_val_2911_, v___y_2915_);
return v___x_2919_;
}
}
LEAN_EXPORT lean_object* l_Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1___boxed(lean_object* v_mvarId_2920_, lean_object* v_val_2921_, lean_object* v___y_2922_, lean_object* v___y_2923_, lean_object* v___y_2924_, lean_object* v___y_2925_, lean_object* v___y_2926_, lean_object* v___y_2927_, lean_object* v___y_2928_){
_start:
{
lean_object* v_res_2929_; 
v_res_2929_ = l_Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1(v_mvarId_2920_, v_val_2921_, v___y_2922_, v___y_2923_, v___y_2924_, v___y_2925_, v___y_2926_, v___y_2927_);
lean_dec(v___y_2927_);
lean_dec_ref(v___y_2926_);
lean_dec(v___y_2925_);
lean_dec_ref(v___y_2924_);
lean_dec(v___y_2923_);
lean_dec_ref(v___y_2922_);
return v_res_2929_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4(lean_object* v_00_u03b1_2930_, lean_object* v_msg_2931_, lean_object* v___y_2932_, lean_object* v___y_2933_, lean_object* v___y_2934_, lean_object* v___y_2935_, lean_object* v___y_2936_, lean_object* v___y_2937_){
_start:
{
lean_object* v___x_2939_; 
v___x_2939_ = l_Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4___redArg(v_msg_2931_, v___y_2932_, v___y_2933_, v___y_2934_, v___y_2935_, v___y_2936_, v___y_2937_);
return v___x_2939_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4___boxed(lean_object* v_00_u03b1_2940_, lean_object* v_msg_2941_, lean_object* v___y_2942_, lean_object* v___y_2943_, lean_object* v___y_2944_, lean_object* v___y_2945_, lean_object* v___y_2946_, lean_object* v___y_2947_, lean_object* v___y_2948_){
_start:
{
lean_object* v_res_2949_; 
v_res_2949_ = l_Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4(v_00_u03b1_2940_, v_msg_2941_, v___y_2942_, v___y_2943_, v___y_2944_, v___y_2945_, v___y_2946_, v___y_2947_);
lean_dec(v___y_2947_);
lean_dec_ref(v___y_2946_);
lean_dec(v___y_2945_);
lean_dec_ref(v___y_2944_);
lean_dec(v___y_2943_);
return v_res_2949_;
}
}
LEAN_EXPORT uint8_t l_Lean_PersistentHashMap_contains___at___00Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0_spec__0(lean_object* v_00_u03b2_2950_, lean_object* v_x_2951_, lean_object* v_x_2952_){
_start:
{
uint8_t v___x_2953_; 
v___x_2953_ = l_Lean_PersistentHashMap_contains___at___00Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0_spec__0___redArg(v_x_2951_, v_x_2952_);
return v___x_2953_;
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_contains___at___00Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0_spec__0___boxed(lean_object* v_00_u03b2_2954_, lean_object* v_x_2955_, lean_object* v_x_2956_){
_start:
{
uint8_t v_res_2957_; lean_object* v_r_2958_; 
v_res_2957_ = l_Lean_PersistentHashMap_contains___at___00Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0_spec__0(v_00_u03b2_2954_, v_x_2955_, v_x_2956_);
lean_dec(v_x_2956_);
v_r_2958_ = lean_box(v_res_2957_);
return v_r_2958_;
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2(lean_object* v_00_u03b2_2959_, lean_object* v_x_2960_, lean_object* v_x_2961_, lean_object* v_x_2962_){
_start:
{
lean_object* v___x_2963_; 
v___x_2963_ = l_Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2___redArg(v_x_2960_, v_x_2961_, v_x_2962_);
return v___x_2963_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6(lean_object* v_msgData_2964_, lean_object* v_macroStack_2965_, lean_object* v___y_2966_, lean_object* v___y_2967_, lean_object* v___y_2968_, lean_object* v___y_2969_, lean_object* v___y_2970_, lean_object* v___y_2971_){
_start:
{
lean_object* v___x_2973_; 
v___x_2973_ = l_Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6___redArg(v_msgData_2964_, v_macroStack_2965_, v___y_2970_);
return v___x_2973_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6___boxed(lean_object* v_msgData_2974_, lean_object* v_macroStack_2975_, lean_object* v___y_2976_, lean_object* v___y_2977_, lean_object* v___y_2978_, lean_object* v___y_2979_, lean_object* v___y_2980_, lean_object* v___y_2981_, lean_object* v___y_2982_){
_start:
{
lean_object* v_res_2983_; 
v_res_2983_ = l_Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6(v_msgData_2974_, v_macroStack_2975_, v___y_2976_, v___y_2977_, v___y_2978_, v___y_2979_, v___y_2980_, v___y_2981_);
lean_dec(v___y_2981_);
lean_dec_ref(v___y_2980_);
lean_dec(v___y_2979_);
lean_dec_ref(v___y_2978_);
lean_dec(v___y_2977_);
lean_dec_ref(v___y_2976_);
return v_res_2983_;
}
}
LEAN_EXPORT uint8_t l_Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0_spec__0_spec__1(lean_object* v_00_u03b2_2984_, lean_object* v_x_2985_, size_t v_x_2986_, lean_object* v_x_2987_){
_start:
{
uint8_t v___x_2988_; 
v___x_2988_ = l_Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0_spec__0_spec__1___redArg(v_x_2985_, v_x_2986_, v_x_2987_);
return v___x_2988_;
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0_spec__0_spec__1___boxed(lean_object* v_00_u03b2_2989_, lean_object* v_x_2990_, lean_object* v_x_2991_, lean_object* v_x_2992_){
_start:
{
size_t v_x_8576__boxed_2993_; uint8_t v_res_2994_; lean_object* v_r_2995_; 
v_x_8576__boxed_2993_ = lean_unbox_usize(v_x_2991_);
lean_dec(v_x_2991_);
v_res_2994_ = l_Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0_spec__0_spec__1(v_00_u03b2_2989_, v_x_2990_, v_x_8576__boxed_2993_, v_x_2992_);
lean_dec(v_x_2992_);
v_r_2995_ = lean_box(v_res_2994_);
return v_r_2995_;
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4(lean_object* v_00_u03b2_2996_, lean_object* v_x_2997_, size_t v_x_2998_, size_t v_x_2999_, lean_object* v_x_3000_, lean_object* v_x_3001_){
_start:
{
lean_object* v___x_3002_; 
v___x_3002_ = l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4___redArg(v_x_2997_, v_x_2998_, v_x_2999_, v_x_3000_, v_x_3001_);
return v___x_3002_;
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4___boxed(lean_object* v_00_u03b2_3003_, lean_object* v_x_3004_, lean_object* v_x_3005_, lean_object* v_x_3006_, lean_object* v_x_3007_, lean_object* v_x_3008_){
_start:
{
size_t v_x_8587__boxed_3009_; size_t v_x_8588__boxed_3010_; lean_object* v_res_3011_; 
v_x_8587__boxed_3009_ = lean_unbox_usize(v_x_3005_);
lean_dec(v_x_3005_);
v_x_8588__boxed_3010_ = lean_unbox_usize(v_x_3006_);
lean_dec(v_x_3006_);
v_res_3011_ = l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4(v_00_u03b2_3003_, v_x_3004_, v_x_8587__boxed_3009_, v_x_8588__boxed_3010_, v_x_3007_, v_x_3008_);
return v_res_3011_;
}
}
LEAN_EXPORT uint8_t l_Lean_PersistentHashMap_containsAtAux___at___00Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0_spec__0_spec__1_spec__6(lean_object* v_00_u03b2_3012_, lean_object* v_keys_3013_, lean_object* v_vals_3014_, lean_object* v_heq_3015_, lean_object* v_i_3016_, lean_object* v_k_3017_){
_start:
{
uint8_t v___x_3018_; 
v___x_3018_ = l_Lean_PersistentHashMap_containsAtAux___at___00Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0_spec__0_spec__1_spec__6___redArg(v_keys_3013_, v_i_3016_, v_k_3017_);
return v___x_3018_;
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_containsAtAux___at___00Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0_spec__0_spec__1_spec__6___boxed(lean_object* v_00_u03b2_3019_, lean_object* v_keys_3020_, lean_object* v_vals_3021_, lean_object* v_heq_3022_, lean_object* v_i_3023_, lean_object* v_k_3024_){
_start:
{
uint8_t v_res_3025_; lean_object* v_r_3026_; 
v_res_3025_ = l_Lean_PersistentHashMap_containsAtAux___at___00Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00Lean_MVarId_isAssigned___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__0_spec__0_spec__1_spec__6(v_00_u03b2_3019_, v_keys_3020_, v_vals_3021_, v_heq_3022_, v_i_3023_, v_k_3024_);
lean_dec(v_k_3024_);
lean_dec_ref(v_vals_3021_);
lean_dec_ref(v_keys_3020_);
v_r_3026_ = lean_box(v_res_3025_);
return v_r_3026_;
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insertAtCollisionNode___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4_spec__9(lean_object* v_00_u03b2_3027_, lean_object* v_n_3028_, lean_object* v_k_3029_, lean_object* v_v_3030_){
_start:
{
lean_object* v___x_3031_; 
v___x_3031_ = l_Lean_PersistentHashMap_insertAtCollisionNode___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4_spec__9___redArg(v_n_3028_, v_k_3029_, v_v_3030_);
return v___x_3031_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Data_PersistentHashMap_0__Lean_PersistentHashMap_insertAux_traverse___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4_spec__10(lean_object* v_00_u03b2_3032_, size_t v_depth_3033_, lean_object* v_keys_3034_, lean_object* v_vals_3035_, lean_object* v_heq_3036_, lean_object* v_i_3037_, lean_object* v_entries_3038_){
_start:
{
lean_object* v___x_3039_; 
v___x_3039_ = l___private_Lean_Data_PersistentHashMap_0__Lean_PersistentHashMap_insertAux_traverse___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4_spec__10___redArg(v_depth_3033_, v_keys_3034_, v_vals_3035_, v_i_3037_, v_entries_3038_);
return v___x_3039_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Data_PersistentHashMap_0__Lean_PersistentHashMap_insertAux_traverse___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4_spec__10___boxed(lean_object* v_00_u03b2_3040_, lean_object* v_depth_3041_, lean_object* v_keys_3042_, lean_object* v_vals_3043_, lean_object* v_heq_3044_, lean_object* v_i_3045_, lean_object* v_entries_3046_){
_start:
{
size_t v_depth_boxed_3047_; lean_object* v_res_3048_; 
v_depth_boxed_3047_ = lean_unbox_usize(v_depth_3041_);
lean_dec(v_depth_3041_);
v_res_3048_ = l___private_Lean_Data_PersistentHashMap_0__Lean_PersistentHashMap_insertAux_traverse___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4_spec__10(v_00_u03b2_3040_, v_depth_boxed_3047_, v_keys_3042_, v_vals_3043_, v_heq_3044_, v_i_3045_, v_entries_3046_);
lean_dec_ref(v_vals_3043_);
lean_dec_ref(v_keys_3042_);
return v_res_3048_;
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insertAtCollisionNodeAux___at___00Lean_PersistentHashMap_insertAtCollisionNode___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4_spec__9_spec__11(lean_object* v_00_u03b2_3049_, lean_object* v_x_3050_, lean_object* v_x_3051_, lean_object* v_x_3052_, lean_object* v_x_3053_){
_start:
{
lean_object* v___x_3054_; 
v___x_3054_ = l_Lean_PersistentHashMap_insertAtCollisionNodeAux___at___00Lean_PersistentHashMap_insertAtCollisionNode___at___00Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4_spec__9_spec__11___redArg(v_x_3050_, v_x_3051_, v_x_3052_, v_x_3053_);
return v___x_3054_;
}
}
LEAN_EXPORT lean_object* l_panic___at___00Lean_Elab_Term_processDefDeriving_spec__0(lean_object* v_msg_3055_){
_start:
{
lean_object* v___x_3056_; lean_object* v___x_3057_; 
v___x_3056_ = l_Lean_instInhabitedLocalDecl_default;
v___x_3057_ = lean_panic_fn(v___x_3056_, v_msg_3055_);
return v___x_3057_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_forallTelescope___at___00Lean_Elab_Term_processDefDeriving_spec__1___redArg___lam__0(lean_object* v_k_3058_, lean_object* v___y_3059_, lean_object* v___y_3060_, lean_object* v_b_3061_, lean_object* v_c_3062_, lean_object* v___y_3063_, lean_object* v___y_3064_, lean_object* v___y_3065_, lean_object* v___y_3066_){
_start:
{
lean_object* v___x_3068_; 
v___x_3068_ = lean_apply_9(v_k_3058_, v_b_3061_, v_c_3062_, v___y_3059_, v___y_3060_, v___y_3063_, v___y_3064_, v___y_3065_, v___y_3066_, lean_box(0));
return v___x_3068_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_forallTelescope___at___00Lean_Elab_Term_processDefDeriving_spec__1___redArg___lam__0___boxed(lean_object* v_k_3069_, lean_object* v___y_3070_, lean_object* v___y_3071_, lean_object* v_b_3072_, lean_object* v_c_3073_, lean_object* v___y_3074_, lean_object* v___y_3075_, lean_object* v___y_3076_, lean_object* v___y_3077_, lean_object* v___y_3078_){
_start:
{
lean_object* v_res_3079_; 
v_res_3079_ = l_Lean_Meta_forallTelescope___at___00Lean_Elab_Term_processDefDeriving_spec__1___redArg___lam__0(v_k_3069_, v___y_3070_, v___y_3071_, v_b_3072_, v_c_3073_, v___y_3074_, v___y_3075_, v___y_3076_, v___y_3077_);
return v_res_3079_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_forallTelescope___at___00Lean_Elab_Term_processDefDeriving_spec__1___redArg(lean_object* v_type_3080_, lean_object* v_k_3081_, uint8_t v_cleanupAnnotations_3082_, lean_object* v___y_3083_, lean_object* v___y_3084_, lean_object* v___y_3085_, lean_object* v___y_3086_, lean_object* v___y_3087_, lean_object* v___y_3088_){
_start:
{
lean_object* v___f_3090_; uint8_t v___x_3091_; lean_object* v___x_3092_; lean_object* v___x_3093_; 
v___f_3090_ = lean_alloc_closure((void*)(l_Lean_Meta_forallTelescope___at___00Lean_Elab_Term_processDefDeriving_spec__1___redArg___lam__0___boxed), 10, 3);
lean_closure_set(v___f_3090_, 0, v_k_3081_);
lean_closure_set(v___f_3090_, 1, v___y_3083_);
lean_closure_set(v___f_3090_, 2, v___y_3084_);
v___x_3091_ = 0;
v___x_3092_ = lean_box(0);
v___x_3093_ = l___private_Lean_Meta_Basic_0__Lean_Meta_forallTelescopeReducingAuxAux(lean_box(0), v___x_3091_, v___x_3092_, v_type_3080_, v___f_3090_, v_cleanupAnnotations_3082_, v___x_3091_, v___y_3085_, v___y_3086_, v___y_3087_, v___y_3088_);
if (lean_obj_tag(v___x_3093_) == 0)
{
return v___x_3093_;
}
else
{
lean_object* v_a_3094_; lean_object* v___x_3096_; uint8_t v_isShared_3097_; uint8_t v_isSharedCheck_3101_; 
v_a_3094_ = lean_ctor_get(v___x_3093_, 0);
v_isSharedCheck_3101_ = !lean_is_exclusive(v___x_3093_);
if (v_isSharedCheck_3101_ == 0)
{
v___x_3096_ = v___x_3093_;
v_isShared_3097_ = v_isSharedCheck_3101_;
goto v_resetjp_3095_;
}
else
{
lean_inc(v_a_3094_);
lean_dec(v___x_3093_);
v___x_3096_ = lean_box(0);
v_isShared_3097_ = v_isSharedCheck_3101_;
goto v_resetjp_3095_;
}
v_resetjp_3095_:
{
lean_object* v___x_3099_; 
if (v_isShared_3097_ == 0)
{
v___x_3099_ = v___x_3096_;
goto v_reusejp_3098_;
}
else
{
lean_object* v_reuseFailAlloc_3100_; 
v_reuseFailAlloc_3100_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3100_, 0, v_a_3094_);
v___x_3099_ = v_reuseFailAlloc_3100_;
goto v_reusejp_3098_;
}
v_reusejp_3098_:
{
return v___x_3099_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_forallTelescope___at___00Lean_Elab_Term_processDefDeriving_spec__1___redArg___boxed(lean_object* v_type_3102_, lean_object* v_k_3103_, lean_object* v_cleanupAnnotations_3104_, lean_object* v___y_3105_, lean_object* v___y_3106_, lean_object* v___y_3107_, lean_object* v___y_3108_, lean_object* v___y_3109_, lean_object* v___y_3110_, lean_object* v___y_3111_){
_start:
{
uint8_t v_cleanupAnnotations_boxed_3112_; lean_object* v_res_3113_; 
v_cleanupAnnotations_boxed_3112_ = lean_unbox(v_cleanupAnnotations_3104_);
v_res_3113_ = l_Lean_Meta_forallTelescope___at___00Lean_Elab_Term_processDefDeriving_spec__1___redArg(v_type_3102_, v_k_3103_, v_cleanupAnnotations_boxed_3112_, v___y_3105_, v___y_3106_, v___y_3107_, v___y_3108_, v___y_3109_, v___y_3110_);
return v_res_3113_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_forallTelescope___at___00Lean_Elab_Term_processDefDeriving_spec__1(lean_object* v_00_u03b1_3114_, lean_object* v_type_3115_, lean_object* v_k_3116_, uint8_t v_cleanupAnnotations_3117_, lean_object* v___y_3118_, lean_object* v___y_3119_, lean_object* v___y_3120_, lean_object* v___y_3121_, lean_object* v___y_3122_, lean_object* v___y_3123_){
_start:
{
lean_object* v___x_3125_; 
v___x_3125_ = l_Lean_Meta_forallTelescope___at___00Lean_Elab_Term_processDefDeriving_spec__1___redArg(v_type_3115_, v_k_3116_, v_cleanupAnnotations_3117_, v___y_3118_, v___y_3119_, v___y_3120_, v___y_3121_, v___y_3122_, v___y_3123_);
return v___x_3125_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_forallTelescope___at___00Lean_Elab_Term_processDefDeriving_spec__1___boxed(lean_object* v_00_u03b1_3126_, lean_object* v_type_3127_, lean_object* v_k_3128_, lean_object* v_cleanupAnnotations_3129_, lean_object* v___y_3130_, lean_object* v___y_3131_, lean_object* v___y_3132_, lean_object* v___y_3133_, lean_object* v___y_3134_, lean_object* v___y_3135_, lean_object* v___y_3136_){
_start:
{
uint8_t v_cleanupAnnotations_boxed_3137_; lean_object* v_res_3138_; 
v_cleanupAnnotations_boxed_3137_ = lean_unbox(v_cleanupAnnotations_3129_);
v_res_3138_ = l_Lean_Meta_forallTelescope___at___00Lean_Elab_Term_processDefDeriving_spec__1(v_00_u03b1_3126_, v_type_3127_, v_k_3128_, v_cleanupAnnotations_boxed_3137_, v___y_3130_, v___y_3131_, v___y_3132_, v___y_3133_, v___y_3134_, v___y_3135_);
return v_res_3138_;
}
}
static lean_object* _init_l_Lean_Elab_throwAbortTerm___at___00Lean_Elab_Term_processDefDeriving_spec__2___redArg___closed__0(void){
_start:
{
lean_object* v___x_3139_; lean_object* v___x_3140_; lean_object* v___x_3141_; 
v___x_3139_ = lean_box(0);
v___x_3140_ = l_Lean_Elab_abortTermExceptionId;
v___x_3141_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_3141_, 0, v___x_3140_);
lean_ctor_set(v___x_3141_, 1, v___x_3139_);
return v___x_3141_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_throwAbortTerm___at___00Lean_Elab_Term_processDefDeriving_spec__2___redArg(){
_start:
{
lean_object* v___x_3143_; lean_object* v___x_3144_; 
v___x_3143_ = lean_obj_once(&l_Lean_Elab_throwAbortTerm___at___00Lean_Elab_Term_processDefDeriving_spec__2___redArg___closed__0, &l_Lean_Elab_throwAbortTerm___at___00Lean_Elab_Term_processDefDeriving_spec__2___redArg___closed__0_once, _init_l_Lean_Elab_throwAbortTerm___at___00Lean_Elab_Term_processDefDeriving_spec__2___redArg___closed__0);
v___x_3144_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_3144_, 0, v___x_3143_);
return v___x_3144_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_throwAbortTerm___at___00Lean_Elab_Term_processDefDeriving_spec__2___redArg___boxed(lean_object* v___y_3145_){
_start:
{
lean_object* v_res_3146_; 
v_res_3146_ = l_Lean_Elab_throwAbortTerm___at___00Lean_Elab_Term_processDefDeriving_spec__2___redArg();
return v_res_3146_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_throwAbortTerm___at___00Lean_Elab_Term_processDefDeriving_spec__2(lean_object* v_00_u03b1_3147_, lean_object* v___y_3148_, lean_object* v___y_3149_, lean_object* v___y_3150_, lean_object* v___y_3151_, lean_object* v___y_3152_, lean_object* v___y_3153_){
_start:
{
lean_object* v___x_3155_; 
v___x_3155_ = l_Lean_Elab_throwAbortTerm___at___00Lean_Elab_Term_processDefDeriving_spec__2___redArg();
return v___x_3155_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_throwAbortTerm___at___00Lean_Elab_Term_processDefDeriving_spec__2___boxed(lean_object* v_00_u03b1_3156_, lean_object* v___y_3157_, lean_object* v___y_3158_, lean_object* v___y_3159_, lean_object* v___y_3160_, lean_object* v___y_3161_, lean_object* v___y_3162_, lean_object* v___y_3163_){
_start:
{
lean_object* v_res_3164_; 
v_res_3164_ = l_Lean_Elab_throwAbortTerm___at___00Lean_Elab_Term_processDefDeriving_spec__2(v_00_u03b1_3156_, v___y_3157_, v___y_3158_, v___y_3159_, v___y_3160_, v___y_3161_, v___y_3162_);
lean_dec(v___y_3162_);
lean_dec_ref(v___y_3161_);
lean_dec(v___y_3160_);
lean_dec_ref(v___y_3159_);
lean_dec(v___y_3158_);
lean_dec_ref(v___y_3157_);
return v_res_3164_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_withLCtx_x27___at___00Lean_Elab_Term_processDefDeriving_spec__3___redArg(lean_object* v_lctx_3165_, lean_object* v_x_3166_, lean_object* v___y_3167_, lean_object* v___y_3168_, lean_object* v___y_3169_, lean_object* v___y_3170_, lean_object* v___y_3171_, lean_object* v___y_3172_){
_start:
{
lean_object* v_keyedConfig_3174_; uint8_t v_trackZetaDelta_3175_; lean_object* v_zetaDeltaSet_3176_; lean_object* v_localInstances_3177_; lean_object* v_defEqCtx_x3f_3178_; lean_object* v_synthPendingDepth_3179_; lean_object* v_canUnfold_x3f_3180_; uint8_t v_univApprox_3181_; uint8_t v_inTypeClassResolution_3182_; uint8_t v_cacheInferType_3183_; lean_object* v___x_3185_; uint8_t v_isShared_3186_; uint8_t v_isSharedCheck_3199_; 
v_keyedConfig_3174_ = lean_ctor_get(v___y_3169_, 0);
v_trackZetaDelta_3175_ = lean_ctor_get_uint8(v___y_3169_, sizeof(void*)*7);
v_zetaDeltaSet_3176_ = lean_ctor_get(v___y_3169_, 1);
v_localInstances_3177_ = lean_ctor_get(v___y_3169_, 3);
v_defEqCtx_x3f_3178_ = lean_ctor_get(v___y_3169_, 4);
v_synthPendingDepth_3179_ = lean_ctor_get(v___y_3169_, 5);
v_canUnfold_x3f_3180_ = lean_ctor_get(v___y_3169_, 6);
v_univApprox_3181_ = lean_ctor_get_uint8(v___y_3169_, sizeof(void*)*7 + 1);
v_inTypeClassResolution_3182_ = lean_ctor_get_uint8(v___y_3169_, sizeof(void*)*7 + 2);
v_cacheInferType_3183_ = lean_ctor_get_uint8(v___y_3169_, sizeof(void*)*7 + 3);
v_isSharedCheck_3199_ = !lean_is_exclusive(v___y_3169_);
if (v_isSharedCheck_3199_ == 0)
{
lean_object* v_unused_3200_; 
v_unused_3200_ = lean_ctor_get(v___y_3169_, 2);
lean_dec(v_unused_3200_);
v___x_3185_ = v___y_3169_;
v_isShared_3186_ = v_isSharedCheck_3199_;
goto v_resetjp_3184_;
}
else
{
lean_inc(v_canUnfold_x3f_3180_);
lean_inc(v_synthPendingDepth_3179_);
lean_inc(v_defEqCtx_x3f_3178_);
lean_inc(v_localInstances_3177_);
lean_inc(v_zetaDeltaSet_3176_);
lean_inc(v_keyedConfig_3174_);
lean_dec(v___y_3169_);
v___x_3185_ = lean_box(0);
v_isShared_3186_ = v_isSharedCheck_3199_;
goto v_resetjp_3184_;
}
v_resetjp_3184_:
{
lean_object* v___x_3188_; 
if (v_isShared_3186_ == 0)
{
lean_ctor_set(v___x_3185_, 2, v_lctx_3165_);
v___x_3188_ = v___x_3185_;
goto v_reusejp_3187_;
}
else
{
lean_object* v_reuseFailAlloc_3198_; 
v_reuseFailAlloc_3198_ = lean_alloc_ctor(0, 7, 4);
lean_ctor_set(v_reuseFailAlloc_3198_, 0, v_keyedConfig_3174_);
lean_ctor_set(v_reuseFailAlloc_3198_, 1, v_zetaDeltaSet_3176_);
lean_ctor_set(v_reuseFailAlloc_3198_, 2, v_lctx_3165_);
lean_ctor_set(v_reuseFailAlloc_3198_, 3, v_localInstances_3177_);
lean_ctor_set(v_reuseFailAlloc_3198_, 4, v_defEqCtx_x3f_3178_);
lean_ctor_set(v_reuseFailAlloc_3198_, 5, v_synthPendingDepth_3179_);
lean_ctor_set(v_reuseFailAlloc_3198_, 6, v_canUnfold_x3f_3180_);
lean_ctor_set_uint8(v_reuseFailAlloc_3198_, sizeof(void*)*7, v_trackZetaDelta_3175_);
lean_ctor_set_uint8(v_reuseFailAlloc_3198_, sizeof(void*)*7 + 1, v_univApprox_3181_);
lean_ctor_set_uint8(v_reuseFailAlloc_3198_, sizeof(void*)*7 + 2, v_inTypeClassResolution_3182_);
lean_ctor_set_uint8(v_reuseFailAlloc_3198_, sizeof(void*)*7 + 3, v_cacheInferType_3183_);
v___x_3188_ = v_reuseFailAlloc_3198_;
goto v_reusejp_3187_;
}
v_reusejp_3187_:
{
lean_object* v___x_3189_; 
v___x_3189_ = lean_apply_7(v_x_3166_, v___y_3167_, v___y_3168_, v___x_3188_, v___y_3170_, v___y_3171_, v___y_3172_, lean_box(0));
if (lean_obj_tag(v___x_3189_) == 0)
{
lean_object* v_a_3190_; lean_object* v___x_3192_; uint8_t v_isShared_3193_; uint8_t v_isSharedCheck_3197_; 
v_a_3190_ = lean_ctor_get(v___x_3189_, 0);
v_isSharedCheck_3197_ = !lean_is_exclusive(v___x_3189_);
if (v_isSharedCheck_3197_ == 0)
{
v___x_3192_ = v___x_3189_;
v_isShared_3193_ = v_isSharedCheck_3197_;
goto v_resetjp_3191_;
}
else
{
lean_inc(v_a_3190_);
lean_dec(v___x_3189_);
v___x_3192_ = lean_box(0);
v_isShared_3193_ = v_isSharedCheck_3197_;
goto v_resetjp_3191_;
}
v_resetjp_3191_:
{
lean_object* v___x_3195_; 
if (v_isShared_3193_ == 0)
{
v___x_3195_ = v___x_3192_;
goto v_reusejp_3194_;
}
else
{
lean_object* v_reuseFailAlloc_3196_; 
v_reuseFailAlloc_3196_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3196_, 0, v_a_3190_);
v___x_3195_ = v_reuseFailAlloc_3196_;
goto v_reusejp_3194_;
}
v_reusejp_3194_:
{
return v___x_3195_;
}
}
}
else
{
return v___x_3189_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_withLCtx_x27___at___00Lean_Elab_Term_processDefDeriving_spec__3___redArg___boxed(lean_object* v_lctx_3201_, lean_object* v_x_3202_, lean_object* v___y_3203_, lean_object* v___y_3204_, lean_object* v___y_3205_, lean_object* v___y_3206_, lean_object* v___y_3207_, lean_object* v___y_3208_, lean_object* v___y_3209_){
_start:
{
lean_object* v_res_3210_; 
v_res_3210_ = l_Lean_Meta_withLCtx_x27___at___00Lean_Elab_Term_processDefDeriving_spec__3___redArg(v_lctx_3201_, v_x_3202_, v___y_3203_, v___y_3204_, v___y_3205_, v___y_3206_, v___y_3207_, v___y_3208_);
return v_res_3210_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_withLCtx_x27___at___00Lean_Elab_Term_processDefDeriving_spec__3(lean_object* v_00_u03b1_3211_, lean_object* v_lctx_3212_, lean_object* v_x_3213_, lean_object* v___y_3214_, lean_object* v___y_3215_, lean_object* v___y_3216_, lean_object* v___y_3217_, lean_object* v___y_3218_, lean_object* v___y_3219_){
_start:
{
lean_object* v___x_3221_; 
v___x_3221_ = l_Lean_Meta_withLCtx_x27___at___00Lean_Elab_Term_processDefDeriving_spec__3___redArg(v_lctx_3212_, v_x_3213_, v___y_3214_, v___y_3215_, v___y_3216_, v___y_3217_, v___y_3218_, v___y_3219_);
return v___x_3221_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_withLCtx_x27___at___00Lean_Elab_Term_processDefDeriving_spec__3___boxed(lean_object* v_00_u03b1_3222_, lean_object* v_lctx_3223_, lean_object* v_x_3224_, lean_object* v___y_3225_, lean_object* v___y_3226_, lean_object* v___y_3227_, lean_object* v___y_3228_, lean_object* v___y_3229_, lean_object* v___y_3230_, lean_object* v___y_3231_){
_start:
{
lean_object* v_res_3232_; 
v_res_3232_ = l_Lean_Meta_withLCtx_x27___at___00Lean_Elab_Term_processDefDeriving_spec__3(v_00_u03b1_3222_, v_lctx_3223_, v_x_3224_, v___y_3225_, v___y_3226_, v___y_3227_, v___y_3228_, v___y_3229_, v___y_3230_);
return v_res_3232_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_Term_withoutErrToSorry___at___00Lean_Elab_Term_processDefDeriving_spec__5___redArg(lean_object* v_a_3233_, lean_object* v___y_3234_, lean_object* v___y_3235_, lean_object* v___y_3236_, lean_object* v___y_3237_, lean_object* v___y_3238_, lean_object* v___y_3239_){
_start:
{
lean_object* v___x_3241_; 
v___x_3241_ = l_Lean_Elab_Term_withoutErrToSorryImp___redArg(v_a_3233_, v___y_3234_, v___y_3235_, v___y_3236_, v___y_3237_, v___y_3238_, v___y_3239_);
return v___x_3241_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_Term_withoutErrToSorry___at___00Lean_Elab_Term_processDefDeriving_spec__5___redArg___boxed(lean_object* v_a_3242_, lean_object* v___y_3243_, lean_object* v___y_3244_, lean_object* v___y_3245_, lean_object* v___y_3246_, lean_object* v___y_3247_, lean_object* v___y_3248_, lean_object* v___y_3249_){
_start:
{
lean_object* v_res_3250_; 
v_res_3250_ = l_Lean_Elab_Term_withoutErrToSorry___at___00Lean_Elab_Term_processDefDeriving_spec__5___redArg(v_a_3242_, v___y_3243_, v___y_3244_, v___y_3245_, v___y_3246_, v___y_3247_, v___y_3248_);
return v_res_3250_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_Term_withoutErrToSorry___at___00Lean_Elab_Term_processDefDeriving_spec__5(lean_object* v_00_u03b1_3251_, lean_object* v_a_3252_, lean_object* v___y_3253_, lean_object* v___y_3254_, lean_object* v___y_3255_, lean_object* v___y_3256_, lean_object* v___y_3257_, lean_object* v___y_3258_){
_start:
{
lean_object* v___x_3260_; 
v___x_3260_ = l_Lean_Elab_Term_withoutErrToSorryImp___redArg(v_a_3252_, v___y_3253_, v___y_3254_, v___y_3255_, v___y_3256_, v___y_3257_, v___y_3258_);
return v___x_3260_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_Term_withoutErrToSorry___at___00Lean_Elab_Term_processDefDeriving_spec__5___boxed(lean_object* v_00_u03b1_3261_, lean_object* v_a_3262_, lean_object* v___y_3263_, lean_object* v___y_3264_, lean_object* v___y_3265_, lean_object* v___y_3266_, lean_object* v___y_3267_, lean_object* v___y_3268_, lean_object* v___y_3269_){
_start:
{
lean_object* v_res_3270_; 
v_res_3270_ = l_Lean_Elab_Term_withoutErrToSorry___at___00Lean_Elab_Term_processDefDeriving_spec__5(v_00_u03b1_3261_, v_a_3262_, v___y_3263_, v___y_3264_, v___y_3265_, v___y_3266_, v___y_3267_, v___y_3268_);
return v_res_3270_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_lambdaTelescope___at___00Lean_Elab_Term_processDefDeriving_spec__7___redArg(lean_object* v_e_3271_, lean_object* v_k_3272_, uint8_t v_cleanupAnnotations_3273_, lean_object* v___y_3274_, lean_object* v___y_3275_, lean_object* v___y_3276_, lean_object* v___y_3277_, lean_object* v___y_3278_, lean_object* v___y_3279_){
_start:
{
lean_object* v___f_3281_; uint8_t v___x_3282_; uint8_t v___x_3283_; lean_object* v___x_3284_; lean_object* v___x_3285_; 
v___f_3281_ = lean_alloc_closure((void*)(l_Lean_Meta_forallTelescope___at___00Lean_Elab_Term_processDefDeriving_spec__1___redArg___lam__0___boxed), 10, 3);
lean_closure_set(v___f_3281_, 0, v_k_3272_);
lean_closure_set(v___f_3281_, 1, v___y_3274_);
lean_closure_set(v___f_3281_, 2, v___y_3275_);
v___x_3282_ = 1;
v___x_3283_ = 0;
v___x_3284_ = lean_box(0);
v___x_3285_ = l___private_Lean_Meta_Basic_0__Lean_Meta_lambdaTelescopeImp(lean_box(0), v_e_3271_, v___x_3282_, v___x_3283_, v___x_3282_, v___x_3283_, v___x_3284_, v___f_3281_, v_cleanupAnnotations_3273_, v___y_3276_, v___y_3277_, v___y_3278_, v___y_3279_);
if (lean_obj_tag(v___x_3285_) == 0)
{
return v___x_3285_;
}
else
{
lean_object* v_a_3286_; lean_object* v___x_3288_; uint8_t v_isShared_3289_; uint8_t v_isSharedCheck_3293_; 
v_a_3286_ = lean_ctor_get(v___x_3285_, 0);
v_isSharedCheck_3293_ = !lean_is_exclusive(v___x_3285_);
if (v_isSharedCheck_3293_ == 0)
{
v___x_3288_ = v___x_3285_;
v_isShared_3289_ = v_isSharedCheck_3293_;
goto v_resetjp_3287_;
}
else
{
lean_inc(v_a_3286_);
lean_dec(v___x_3285_);
v___x_3288_ = lean_box(0);
v_isShared_3289_ = v_isSharedCheck_3293_;
goto v_resetjp_3287_;
}
v_resetjp_3287_:
{
lean_object* v___x_3291_; 
if (v_isShared_3289_ == 0)
{
v___x_3291_ = v___x_3288_;
goto v_reusejp_3290_;
}
else
{
lean_object* v_reuseFailAlloc_3292_; 
v_reuseFailAlloc_3292_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3292_, 0, v_a_3286_);
v___x_3291_ = v_reuseFailAlloc_3292_;
goto v_reusejp_3290_;
}
v_reusejp_3290_:
{
return v___x_3291_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_lambdaTelescope___at___00Lean_Elab_Term_processDefDeriving_spec__7___redArg___boxed(lean_object* v_e_3294_, lean_object* v_k_3295_, lean_object* v_cleanupAnnotations_3296_, lean_object* v___y_3297_, lean_object* v___y_3298_, lean_object* v___y_3299_, lean_object* v___y_3300_, lean_object* v___y_3301_, lean_object* v___y_3302_, lean_object* v___y_3303_){
_start:
{
uint8_t v_cleanupAnnotations_boxed_3304_; lean_object* v_res_3305_; 
v_cleanupAnnotations_boxed_3304_ = lean_unbox(v_cleanupAnnotations_3296_);
v_res_3305_ = l_Lean_Meta_lambdaTelescope___at___00Lean_Elab_Term_processDefDeriving_spec__7___redArg(v_e_3294_, v_k_3295_, v_cleanupAnnotations_boxed_3304_, v___y_3297_, v___y_3298_, v___y_3299_, v___y_3300_, v___y_3301_, v___y_3302_);
return v_res_3305_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_lambdaTelescope___at___00Lean_Elab_Term_processDefDeriving_spec__7(lean_object* v_00_u03b1_3306_, lean_object* v_e_3307_, lean_object* v_k_3308_, uint8_t v_cleanupAnnotations_3309_, lean_object* v___y_3310_, lean_object* v___y_3311_, lean_object* v___y_3312_, lean_object* v___y_3313_, lean_object* v___y_3314_, lean_object* v___y_3315_){
_start:
{
lean_object* v___x_3317_; 
v___x_3317_ = l_Lean_Meta_lambdaTelescope___at___00Lean_Elab_Term_processDefDeriving_spec__7___redArg(v_e_3307_, v_k_3308_, v_cleanupAnnotations_3309_, v___y_3310_, v___y_3311_, v___y_3312_, v___y_3313_, v___y_3314_, v___y_3315_);
return v___x_3317_;
}
}
LEAN_EXPORT lean_object* l_Lean_Meta_lambdaTelescope___at___00Lean_Elab_Term_processDefDeriving_spec__7___boxed(lean_object* v_00_u03b1_3318_, lean_object* v_e_3319_, lean_object* v_k_3320_, lean_object* v_cleanupAnnotations_3321_, lean_object* v___y_3322_, lean_object* v___y_3323_, lean_object* v___y_3324_, lean_object* v___y_3325_, lean_object* v___y_3326_, lean_object* v___y_3327_, lean_object* v___y_3328_){
_start:
{
uint8_t v_cleanupAnnotations_boxed_3329_; lean_object* v_res_3330_; 
v_cleanupAnnotations_boxed_3329_ = lean_unbox(v_cleanupAnnotations_3321_);
v_res_3330_ = l_Lean_Meta_lambdaTelescope___at___00Lean_Elab_Term_processDefDeriving_spec__7(v_00_u03b1_3318_, v_e_3319_, v_k_3320_, v_cleanupAnnotations_boxed_3329_, v___y_3322_, v___y_3323_, v___y_3324_, v___y_3325_, v___y_3326_, v___y_3327_);
return v_res_3330_;
}
}
LEAN_EXPORT lean_object* l_Lean_mkDefinitionValInferringUnsafe___at___00Lean_Elab_Term_processDefDeriving_spec__10___redArg(lean_object* v_name_3331_, lean_object* v_levelParams_3332_, lean_object* v_type_3333_, lean_object* v_value_3334_, lean_object* v_hints_3335_, lean_object* v___y_3336_){
_start:
{
lean_object* v___x_3338_; uint8_t v___y_3340_; uint8_t v___y_3347_; lean_object* v_env_3350_; uint8_t v___x_3351_; 
v___x_3338_ = lean_st_ref_get(v___y_3336_);
v_env_3350_ = lean_ctor_get(v___x_3338_, 0);
lean_inc_ref(v_env_3350_);
lean_dec(v___x_3338_);
lean_inc_ref(v_env_3350_);
v___x_3351_ = l_Lean_Environment_hasUnsafe(v_env_3350_, v_type_3333_);
if (v___x_3351_ == 0)
{
uint8_t v___x_3352_; 
v___x_3352_ = l_Lean_Environment_hasUnsafe(v_env_3350_, v_value_3334_);
v___y_3347_ = v___x_3352_;
goto v___jp_3346_;
}
else
{
lean_dec_ref(v_env_3350_);
v___y_3347_ = v___x_3351_;
goto v___jp_3346_;
}
v___jp_3339_:
{
lean_object* v___x_3341_; lean_object* v___x_3342_; lean_object* v___x_3343_; lean_object* v___x_3344_; lean_object* v___x_3345_; 
lean_inc(v_name_3331_);
v___x_3341_ = lean_alloc_ctor(0, 3, 0);
lean_ctor_set(v___x_3341_, 0, v_name_3331_);
lean_ctor_set(v___x_3341_, 1, v_levelParams_3332_);
lean_ctor_set(v___x_3341_, 2, v_type_3333_);
v___x_3342_ = lean_box(0);
v___x_3343_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_3343_, 0, v_name_3331_);
lean_ctor_set(v___x_3343_, 1, v___x_3342_);
v___x_3344_ = lean_alloc_ctor(0, 4, 1);
lean_ctor_set(v___x_3344_, 0, v___x_3341_);
lean_ctor_set(v___x_3344_, 1, v_value_3334_);
lean_ctor_set(v___x_3344_, 2, v_hints_3335_);
lean_ctor_set(v___x_3344_, 3, v___x_3343_);
lean_ctor_set_uint8(v___x_3344_, sizeof(void*)*4, v___y_3340_);
v___x_3345_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_3345_, 0, v___x_3344_);
return v___x_3345_;
}
v___jp_3346_:
{
if (v___y_3347_ == 0)
{
uint8_t v___x_3348_; 
v___x_3348_ = 1;
v___y_3340_ = v___x_3348_;
goto v___jp_3339_;
}
else
{
uint8_t v___x_3349_; 
v___x_3349_ = 0;
v___y_3340_ = v___x_3349_;
goto v___jp_3339_;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_mkDefinitionValInferringUnsafe___at___00Lean_Elab_Term_processDefDeriving_spec__10___redArg___boxed(lean_object* v_name_3353_, lean_object* v_levelParams_3354_, lean_object* v_type_3355_, lean_object* v_value_3356_, lean_object* v_hints_3357_, lean_object* v___y_3358_, lean_object* v___y_3359_){
_start:
{
lean_object* v_res_3360_; 
v_res_3360_ = l_Lean_mkDefinitionValInferringUnsafe___at___00Lean_Elab_Term_processDefDeriving_spec__10___redArg(v_name_3353_, v_levelParams_3354_, v_type_3355_, v_value_3356_, v_hints_3357_, v___y_3358_);
lean_dec(v___y_3358_);
return v_res_3360_;
}
}
LEAN_EXPORT lean_object* l_Lean_mkDefinitionValInferringUnsafe___at___00Lean_Elab_Term_processDefDeriving_spec__10(lean_object* v_name_3361_, lean_object* v_levelParams_3362_, lean_object* v_type_3363_, lean_object* v_value_3364_, lean_object* v_hints_3365_, lean_object* v___y_3366_, lean_object* v___y_3367_, lean_object* v___y_3368_, lean_object* v___y_3369_, lean_object* v___y_3370_, lean_object* v___y_3371_){
_start:
{
lean_object* v___x_3373_; 
v___x_3373_ = l_Lean_mkDefinitionValInferringUnsafe___at___00Lean_Elab_Term_processDefDeriving_spec__10___redArg(v_name_3361_, v_levelParams_3362_, v_type_3363_, v_value_3364_, v_hints_3365_, v___y_3371_);
return v___x_3373_;
}
}
LEAN_EXPORT lean_object* l_Lean_mkDefinitionValInferringUnsafe___at___00Lean_Elab_Term_processDefDeriving_spec__10___boxed(lean_object* v_name_3374_, lean_object* v_levelParams_3375_, lean_object* v_type_3376_, lean_object* v_value_3377_, lean_object* v_hints_3378_, lean_object* v___y_3379_, lean_object* v___y_3380_, lean_object* v___y_3381_, lean_object* v___y_3382_, lean_object* v___y_3383_, lean_object* v___y_3384_, lean_object* v___y_3385_){
_start:
{
lean_object* v_res_3386_; 
v_res_3386_ = l_Lean_mkDefinitionValInferringUnsafe___at___00Lean_Elab_Term_processDefDeriving_spec__10(v_name_3374_, v_levelParams_3375_, v_type_3376_, v_value_3377_, v_hints_3378_, v___y_3379_, v___y_3380_, v___y_3381_, v___y_3382_, v___y_3383_, v___y_3384_);
lean_dec(v___y_3384_);
lean_dec_ref(v___y_3383_);
lean_dec(v___y_3382_);
lean_dec_ref(v___y_3381_);
lean_dec(v___y_3380_);
lean_dec_ref(v___y_3379_);
return v_res_3386_;
}
}
LEAN_EXPORT lean_object* l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___lam__0(lean_object* v___y_3387_, uint8_t v_isExporting_3388_, lean_object* v___x_3389_, lean_object* v___y_3390_, lean_object* v___x_3391_, lean_object* v_a_x3f_3392_){
_start:
{
lean_object* v___x_3394_; lean_object* v_env_3395_; lean_object* v_nextMacroScope_3396_; lean_object* v_ngen_3397_; lean_object* v_auxDeclNGen_3398_; lean_object* v_traceState_3399_; lean_object* v_messages_3400_; lean_object* v_infoState_3401_; lean_object* v_snapshotTasks_3402_; lean_object* v___x_3404_; uint8_t v_isShared_3405_; uint8_t v_isSharedCheck_3427_; 
v___x_3394_ = lean_st_ref_take(v___y_3387_);
v_env_3395_ = lean_ctor_get(v___x_3394_, 0);
v_nextMacroScope_3396_ = lean_ctor_get(v___x_3394_, 1);
v_ngen_3397_ = lean_ctor_get(v___x_3394_, 2);
v_auxDeclNGen_3398_ = lean_ctor_get(v___x_3394_, 3);
v_traceState_3399_ = lean_ctor_get(v___x_3394_, 4);
v_messages_3400_ = lean_ctor_get(v___x_3394_, 6);
v_infoState_3401_ = lean_ctor_get(v___x_3394_, 7);
v_snapshotTasks_3402_ = lean_ctor_get(v___x_3394_, 8);
v_isSharedCheck_3427_ = !lean_is_exclusive(v___x_3394_);
if (v_isSharedCheck_3427_ == 0)
{
lean_object* v_unused_3428_; 
v_unused_3428_ = lean_ctor_get(v___x_3394_, 5);
lean_dec(v_unused_3428_);
v___x_3404_ = v___x_3394_;
v_isShared_3405_ = v_isSharedCheck_3427_;
goto v_resetjp_3403_;
}
else
{
lean_inc(v_snapshotTasks_3402_);
lean_inc(v_infoState_3401_);
lean_inc(v_messages_3400_);
lean_inc(v_traceState_3399_);
lean_inc(v_auxDeclNGen_3398_);
lean_inc(v_ngen_3397_);
lean_inc(v_nextMacroScope_3396_);
lean_inc(v_env_3395_);
lean_dec(v___x_3394_);
v___x_3404_ = lean_box(0);
v_isShared_3405_ = v_isSharedCheck_3427_;
goto v_resetjp_3403_;
}
v_resetjp_3403_:
{
lean_object* v___x_3406_; lean_object* v___x_3408_; 
v___x_3406_ = l_Lean_Environment_setExporting(v_env_3395_, v_isExporting_3388_);
if (v_isShared_3405_ == 0)
{
lean_ctor_set(v___x_3404_, 5, v___x_3389_);
lean_ctor_set(v___x_3404_, 0, v___x_3406_);
v___x_3408_ = v___x_3404_;
goto v_reusejp_3407_;
}
else
{
lean_object* v_reuseFailAlloc_3426_; 
v_reuseFailAlloc_3426_ = lean_alloc_ctor(0, 9, 0);
lean_ctor_set(v_reuseFailAlloc_3426_, 0, v___x_3406_);
lean_ctor_set(v_reuseFailAlloc_3426_, 1, v_nextMacroScope_3396_);
lean_ctor_set(v_reuseFailAlloc_3426_, 2, v_ngen_3397_);
lean_ctor_set(v_reuseFailAlloc_3426_, 3, v_auxDeclNGen_3398_);
lean_ctor_set(v_reuseFailAlloc_3426_, 4, v_traceState_3399_);
lean_ctor_set(v_reuseFailAlloc_3426_, 5, v___x_3389_);
lean_ctor_set(v_reuseFailAlloc_3426_, 6, v_messages_3400_);
lean_ctor_set(v_reuseFailAlloc_3426_, 7, v_infoState_3401_);
lean_ctor_set(v_reuseFailAlloc_3426_, 8, v_snapshotTasks_3402_);
v___x_3408_ = v_reuseFailAlloc_3426_;
goto v_reusejp_3407_;
}
v_reusejp_3407_:
{
lean_object* v___x_3409_; lean_object* v___x_3410_; lean_object* v_mctx_3411_; lean_object* v_zetaDeltaFVarIds_3412_; lean_object* v_postponed_3413_; lean_object* v_diag_3414_; lean_object* v___x_3416_; uint8_t v_isShared_3417_; uint8_t v_isSharedCheck_3424_; 
v___x_3409_ = lean_st_ref_set(v___y_3387_, v___x_3408_);
v___x_3410_ = lean_st_ref_take(v___y_3390_);
v_mctx_3411_ = lean_ctor_get(v___x_3410_, 0);
v_zetaDeltaFVarIds_3412_ = lean_ctor_get(v___x_3410_, 2);
v_postponed_3413_ = lean_ctor_get(v___x_3410_, 3);
v_diag_3414_ = lean_ctor_get(v___x_3410_, 4);
v_isSharedCheck_3424_ = !lean_is_exclusive(v___x_3410_);
if (v_isSharedCheck_3424_ == 0)
{
lean_object* v_unused_3425_; 
v_unused_3425_ = lean_ctor_get(v___x_3410_, 1);
lean_dec(v_unused_3425_);
v___x_3416_ = v___x_3410_;
v_isShared_3417_ = v_isSharedCheck_3424_;
goto v_resetjp_3415_;
}
else
{
lean_inc(v_diag_3414_);
lean_inc(v_postponed_3413_);
lean_inc(v_zetaDeltaFVarIds_3412_);
lean_inc(v_mctx_3411_);
lean_dec(v___x_3410_);
v___x_3416_ = lean_box(0);
v_isShared_3417_ = v_isSharedCheck_3424_;
goto v_resetjp_3415_;
}
v_resetjp_3415_:
{
lean_object* v___x_3419_; 
if (v_isShared_3417_ == 0)
{
lean_ctor_set(v___x_3416_, 1, v___x_3391_);
v___x_3419_ = v___x_3416_;
goto v_reusejp_3418_;
}
else
{
lean_object* v_reuseFailAlloc_3423_; 
v_reuseFailAlloc_3423_ = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(v_reuseFailAlloc_3423_, 0, v_mctx_3411_);
lean_ctor_set(v_reuseFailAlloc_3423_, 1, v___x_3391_);
lean_ctor_set(v_reuseFailAlloc_3423_, 2, v_zetaDeltaFVarIds_3412_);
lean_ctor_set(v_reuseFailAlloc_3423_, 3, v_postponed_3413_);
lean_ctor_set(v_reuseFailAlloc_3423_, 4, v_diag_3414_);
v___x_3419_ = v_reuseFailAlloc_3423_;
goto v_reusejp_3418_;
}
v_reusejp_3418_:
{
lean_object* v___x_3420_; lean_object* v___x_3421_; lean_object* v___x_3422_; 
v___x_3420_ = lean_st_ref_set(v___y_3390_, v___x_3419_);
v___x_3421_ = lean_box(0);
v___x_3422_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_3422_, 0, v___x_3421_);
return v___x_3422_;
}
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___lam__0___boxed(lean_object* v___y_3429_, lean_object* v_isExporting_3430_, lean_object* v___x_3431_, lean_object* v___y_3432_, lean_object* v___x_3433_, lean_object* v_a_x3f_3434_, lean_object* v___y_3435_){
_start:
{
uint8_t v_isExporting_boxed_3436_; lean_object* v_res_3437_; 
v_isExporting_boxed_3436_ = lean_unbox(v_isExporting_3430_);
v_res_3437_ = l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___lam__0(v___y_3429_, v_isExporting_boxed_3436_, v___x_3431_, v___y_3432_, v___x_3433_, v_a_x3f_3434_);
lean_dec(v_a_x3f_3434_);
lean_dec(v___y_3432_);
lean_dec(v___y_3429_);
return v_res_3437_;
}
}
static lean_object* _init_l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__0(void){
_start:
{
lean_object* v___x_3438_; 
v___x_3438_ = l_Lean_PersistentHashMap_mkEmptyEntriesArray(lean_box(0), lean_box(0));
return v___x_3438_;
}
}
static lean_object* _init_l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__1(void){
_start:
{
lean_object* v___x_3439_; lean_object* v___x_3440_; 
v___x_3439_ = lean_obj_once(&l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__0, &l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__0_once, _init_l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__0);
v___x_3440_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_3440_, 0, v___x_3439_);
return v___x_3440_;
}
}
static lean_object* _init_l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__2(void){
_start:
{
lean_object* v___x_3441_; lean_object* v___x_3442_; 
v___x_3441_ = lean_obj_once(&l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__1, &l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__1_once, _init_l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__1);
v___x_3442_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_3442_, 0, v___x_3441_);
lean_ctor_set(v___x_3442_, 1, v___x_3441_);
return v___x_3442_;
}
}
static lean_object* _init_l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__3(void){
_start:
{
lean_object* v___x_3443_; lean_object* v___x_3444_; 
v___x_3443_ = lean_obj_once(&l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__1, &l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__1_once, _init_l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__1);
v___x_3444_ = lean_alloc_ctor(0, 6, 0);
lean_ctor_set(v___x_3444_, 0, v___x_3443_);
lean_ctor_set(v___x_3444_, 1, v___x_3443_);
lean_ctor_set(v___x_3444_, 2, v___x_3443_);
lean_ctor_set(v___x_3444_, 3, v___x_3443_);
lean_ctor_set(v___x_3444_, 4, v___x_3443_);
lean_ctor_set(v___x_3444_, 5, v___x_3443_);
return v___x_3444_;
}
}
LEAN_EXPORT lean_object* l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg(lean_object* v_x_3445_, uint8_t v_isExporting_3446_, lean_object* v___y_3447_, lean_object* v___y_3448_, lean_object* v___y_3449_, lean_object* v___y_3450_, lean_object* v___y_3451_, lean_object* v___y_3452_){
_start:
{
lean_object* v___x_3454_; lean_object* v_env_3455_; uint8_t v_isExporting_3456_; lean_object* v___x_3457_; lean_object* v_env_3458_; lean_object* v_nextMacroScope_3459_; lean_object* v_ngen_3460_; lean_object* v_auxDeclNGen_3461_; lean_object* v_traceState_3462_; lean_object* v_messages_3463_; lean_object* v_infoState_3464_; lean_object* v_snapshotTasks_3465_; lean_object* v___x_3467_; uint8_t v_isShared_3468_; uint8_t v_isSharedCheck_3519_; 
v___x_3454_ = lean_st_ref_get(v___y_3452_);
v_env_3455_ = lean_ctor_get(v___x_3454_, 0);
lean_inc_ref(v_env_3455_);
lean_dec(v___x_3454_);
v_isExporting_3456_ = lean_ctor_get_uint8(v_env_3455_, sizeof(void*)*8);
lean_dec_ref(v_env_3455_);
v___x_3457_ = lean_st_ref_take(v___y_3452_);
v_env_3458_ = lean_ctor_get(v___x_3457_, 0);
v_nextMacroScope_3459_ = lean_ctor_get(v___x_3457_, 1);
v_ngen_3460_ = lean_ctor_get(v___x_3457_, 2);
v_auxDeclNGen_3461_ = lean_ctor_get(v___x_3457_, 3);
v_traceState_3462_ = lean_ctor_get(v___x_3457_, 4);
v_messages_3463_ = lean_ctor_get(v___x_3457_, 6);
v_infoState_3464_ = lean_ctor_get(v___x_3457_, 7);
v_snapshotTasks_3465_ = lean_ctor_get(v___x_3457_, 8);
v_isSharedCheck_3519_ = !lean_is_exclusive(v___x_3457_);
if (v_isSharedCheck_3519_ == 0)
{
lean_object* v_unused_3520_; 
v_unused_3520_ = lean_ctor_get(v___x_3457_, 5);
lean_dec(v_unused_3520_);
v___x_3467_ = v___x_3457_;
v_isShared_3468_ = v_isSharedCheck_3519_;
goto v_resetjp_3466_;
}
else
{
lean_inc(v_snapshotTasks_3465_);
lean_inc(v_infoState_3464_);
lean_inc(v_messages_3463_);
lean_inc(v_traceState_3462_);
lean_inc(v_auxDeclNGen_3461_);
lean_inc(v_ngen_3460_);
lean_inc(v_nextMacroScope_3459_);
lean_inc(v_env_3458_);
lean_dec(v___x_3457_);
v___x_3467_ = lean_box(0);
v_isShared_3468_ = v_isSharedCheck_3519_;
goto v_resetjp_3466_;
}
v_resetjp_3466_:
{
lean_object* v___x_3469_; lean_object* v___x_3470_; lean_object* v___x_3472_; 
v___x_3469_ = l_Lean_Environment_setExporting(v_env_3458_, v_isExporting_3446_);
v___x_3470_ = lean_obj_once(&l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__2, &l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__2_once, _init_l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__2);
if (v_isShared_3468_ == 0)
{
lean_ctor_set(v___x_3467_, 5, v___x_3470_);
lean_ctor_set(v___x_3467_, 0, v___x_3469_);
v___x_3472_ = v___x_3467_;
goto v_reusejp_3471_;
}
else
{
lean_object* v_reuseFailAlloc_3518_; 
v_reuseFailAlloc_3518_ = lean_alloc_ctor(0, 9, 0);
lean_ctor_set(v_reuseFailAlloc_3518_, 0, v___x_3469_);
lean_ctor_set(v_reuseFailAlloc_3518_, 1, v_nextMacroScope_3459_);
lean_ctor_set(v_reuseFailAlloc_3518_, 2, v_ngen_3460_);
lean_ctor_set(v_reuseFailAlloc_3518_, 3, v_auxDeclNGen_3461_);
lean_ctor_set(v_reuseFailAlloc_3518_, 4, v_traceState_3462_);
lean_ctor_set(v_reuseFailAlloc_3518_, 5, v___x_3470_);
lean_ctor_set(v_reuseFailAlloc_3518_, 6, v_messages_3463_);
lean_ctor_set(v_reuseFailAlloc_3518_, 7, v_infoState_3464_);
lean_ctor_set(v_reuseFailAlloc_3518_, 8, v_snapshotTasks_3465_);
v___x_3472_ = v_reuseFailAlloc_3518_;
goto v_reusejp_3471_;
}
v_reusejp_3471_:
{
lean_object* v___x_3473_; lean_object* v___x_3474_; lean_object* v_mctx_3475_; lean_object* v_zetaDeltaFVarIds_3476_; lean_object* v_postponed_3477_; lean_object* v_diag_3478_; lean_object* v___x_3480_; uint8_t v_isShared_3481_; uint8_t v_isSharedCheck_3516_; 
v___x_3473_ = lean_st_ref_set(v___y_3452_, v___x_3472_);
v___x_3474_ = lean_st_ref_take(v___y_3450_);
v_mctx_3475_ = lean_ctor_get(v___x_3474_, 0);
v_zetaDeltaFVarIds_3476_ = lean_ctor_get(v___x_3474_, 2);
v_postponed_3477_ = lean_ctor_get(v___x_3474_, 3);
v_diag_3478_ = lean_ctor_get(v___x_3474_, 4);
v_isSharedCheck_3516_ = !lean_is_exclusive(v___x_3474_);
if (v_isSharedCheck_3516_ == 0)
{
lean_object* v_unused_3517_; 
v_unused_3517_ = lean_ctor_get(v___x_3474_, 1);
lean_dec(v_unused_3517_);
v___x_3480_ = v___x_3474_;
v_isShared_3481_ = v_isSharedCheck_3516_;
goto v_resetjp_3479_;
}
else
{
lean_inc(v_diag_3478_);
lean_inc(v_postponed_3477_);
lean_inc(v_zetaDeltaFVarIds_3476_);
lean_inc(v_mctx_3475_);
lean_dec(v___x_3474_);
v___x_3480_ = lean_box(0);
v_isShared_3481_ = v_isSharedCheck_3516_;
goto v_resetjp_3479_;
}
v_resetjp_3479_:
{
lean_object* v___x_3482_; lean_object* v___x_3484_; 
v___x_3482_ = lean_obj_once(&l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__3, &l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__3_once, _init_l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__3);
if (v_isShared_3481_ == 0)
{
lean_ctor_set(v___x_3480_, 1, v___x_3482_);
v___x_3484_ = v___x_3480_;
goto v_reusejp_3483_;
}
else
{
lean_object* v_reuseFailAlloc_3515_; 
v_reuseFailAlloc_3515_ = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(v_reuseFailAlloc_3515_, 0, v_mctx_3475_);
lean_ctor_set(v_reuseFailAlloc_3515_, 1, v___x_3482_);
lean_ctor_set(v_reuseFailAlloc_3515_, 2, v_zetaDeltaFVarIds_3476_);
lean_ctor_set(v_reuseFailAlloc_3515_, 3, v_postponed_3477_);
lean_ctor_set(v_reuseFailAlloc_3515_, 4, v_diag_3478_);
v___x_3484_ = v_reuseFailAlloc_3515_;
goto v_reusejp_3483_;
}
v_reusejp_3483_:
{
lean_object* v___x_3485_; lean_object* v_r_3486_; 
v___x_3485_ = lean_st_ref_set(v___y_3450_, v___x_3484_);
lean_inc(v___y_3452_);
lean_inc(v___y_3450_);
v_r_3486_ = lean_apply_7(v_x_3445_, v___y_3447_, v___y_3448_, v___y_3449_, v___y_3450_, v___y_3451_, v___y_3452_, lean_box(0));
if (lean_obj_tag(v_r_3486_) == 0)
{
lean_object* v_a_3487_; lean_object* v___x_3489_; uint8_t v_isShared_3490_; uint8_t v_isSharedCheck_3503_; 
v_a_3487_ = lean_ctor_get(v_r_3486_, 0);
v_isSharedCheck_3503_ = !lean_is_exclusive(v_r_3486_);
if (v_isSharedCheck_3503_ == 0)
{
v___x_3489_ = v_r_3486_;
v_isShared_3490_ = v_isSharedCheck_3503_;
goto v_resetjp_3488_;
}
else
{
lean_inc(v_a_3487_);
lean_dec(v_r_3486_);
v___x_3489_ = lean_box(0);
v_isShared_3490_ = v_isSharedCheck_3503_;
goto v_resetjp_3488_;
}
v_resetjp_3488_:
{
lean_object* v___x_3492_; 
lean_inc(v_a_3487_);
if (v_isShared_3490_ == 0)
{
lean_ctor_set_tag(v___x_3489_, 1);
v___x_3492_ = v___x_3489_;
goto v_reusejp_3491_;
}
else
{
lean_object* v_reuseFailAlloc_3502_; 
v_reuseFailAlloc_3502_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3502_, 0, v_a_3487_);
v___x_3492_ = v_reuseFailAlloc_3502_;
goto v_reusejp_3491_;
}
v_reusejp_3491_:
{
lean_object* v___x_3493_; lean_object* v___x_3495_; uint8_t v_isShared_3496_; uint8_t v_isSharedCheck_3500_; 
v___x_3493_ = l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___lam__0(v___y_3452_, v_isExporting_3456_, v___x_3470_, v___y_3450_, v___x_3482_, v___x_3492_);
lean_dec_ref(v___x_3492_);
lean_dec(v___y_3450_);
lean_dec(v___y_3452_);
v_isSharedCheck_3500_ = !lean_is_exclusive(v___x_3493_);
if (v_isSharedCheck_3500_ == 0)
{
lean_object* v_unused_3501_; 
v_unused_3501_ = lean_ctor_get(v___x_3493_, 0);
lean_dec(v_unused_3501_);
v___x_3495_ = v___x_3493_;
v_isShared_3496_ = v_isSharedCheck_3500_;
goto v_resetjp_3494_;
}
else
{
lean_dec(v___x_3493_);
v___x_3495_ = lean_box(0);
v_isShared_3496_ = v_isSharedCheck_3500_;
goto v_resetjp_3494_;
}
v_resetjp_3494_:
{
lean_object* v___x_3498_; 
if (v_isShared_3496_ == 0)
{
lean_ctor_set(v___x_3495_, 0, v_a_3487_);
v___x_3498_ = v___x_3495_;
goto v_reusejp_3497_;
}
else
{
lean_object* v_reuseFailAlloc_3499_; 
v_reuseFailAlloc_3499_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3499_, 0, v_a_3487_);
v___x_3498_ = v_reuseFailAlloc_3499_;
goto v_reusejp_3497_;
}
v_reusejp_3497_:
{
return v___x_3498_;
}
}
}
}
}
else
{
lean_object* v_a_3504_; lean_object* v___x_3505_; lean_object* v___x_3506_; lean_object* v___x_3508_; uint8_t v_isShared_3509_; uint8_t v_isSharedCheck_3513_; 
v_a_3504_ = lean_ctor_get(v_r_3486_, 0);
lean_inc(v_a_3504_);
lean_dec_ref(v_r_3486_);
v___x_3505_ = lean_box(0);
v___x_3506_ = l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___lam__0(v___y_3452_, v_isExporting_3456_, v___x_3470_, v___y_3450_, v___x_3482_, v___x_3505_);
lean_dec(v___y_3450_);
lean_dec(v___y_3452_);
v_isSharedCheck_3513_ = !lean_is_exclusive(v___x_3506_);
if (v_isSharedCheck_3513_ == 0)
{
lean_object* v_unused_3514_; 
v_unused_3514_ = lean_ctor_get(v___x_3506_, 0);
lean_dec(v_unused_3514_);
v___x_3508_ = v___x_3506_;
v_isShared_3509_ = v_isSharedCheck_3513_;
goto v_resetjp_3507_;
}
else
{
lean_dec(v___x_3506_);
v___x_3508_ = lean_box(0);
v_isShared_3509_ = v_isSharedCheck_3513_;
goto v_resetjp_3507_;
}
v_resetjp_3507_:
{
lean_object* v___x_3511_; 
if (v_isShared_3509_ == 0)
{
lean_ctor_set_tag(v___x_3508_, 1);
lean_ctor_set(v___x_3508_, 0, v_a_3504_);
v___x_3511_ = v___x_3508_;
goto v_reusejp_3510_;
}
else
{
lean_object* v_reuseFailAlloc_3512_; 
v_reuseFailAlloc_3512_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3512_, 0, v_a_3504_);
v___x_3511_ = v_reuseFailAlloc_3512_;
goto v_reusejp_3510_;
}
v_reusejp_3510_:
{
return v___x_3511_;
}
}
}
}
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___boxed(lean_object* v_x_3521_, lean_object* v_isExporting_3522_, lean_object* v___y_3523_, lean_object* v___y_3524_, lean_object* v___y_3525_, lean_object* v___y_3526_, lean_object* v___y_3527_, lean_object* v___y_3528_, lean_object* v___y_3529_){
_start:
{
uint8_t v_isExporting_boxed_3530_; lean_object* v_res_3531_; 
v_isExporting_boxed_3530_ = lean_unbox(v_isExporting_3522_);
v_res_3531_ = l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg(v_x_3521_, v_isExporting_boxed_3530_, v___y_3523_, v___y_3524_, v___y_3525_, v___y_3526_, v___y_3527_, v___y_3528_);
return v_res_3531_;
}
}
LEAN_EXPORT lean_object* l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13(lean_object* v_00_u03b1_3532_, lean_object* v_x_3533_, uint8_t v_isExporting_3534_, lean_object* v___y_3535_, lean_object* v___y_3536_, lean_object* v___y_3537_, lean_object* v___y_3538_, lean_object* v___y_3539_, lean_object* v___y_3540_){
_start:
{
lean_object* v___x_3542_; 
v___x_3542_ = l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg(v_x_3533_, v_isExporting_3534_, v___y_3535_, v___y_3536_, v___y_3537_, v___y_3538_, v___y_3539_, v___y_3540_);
return v___x_3542_;
}
}
LEAN_EXPORT lean_object* l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___boxed(lean_object* v_00_u03b1_3543_, lean_object* v_x_3544_, lean_object* v_isExporting_3545_, lean_object* v___y_3546_, lean_object* v___y_3547_, lean_object* v___y_3548_, lean_object* v___y_3549_, lean_object* v___y_3550_, lean_object* v___y_3551_, lean_object* v___y_3552_){
_start:
{
uint8_t v_isExporting_boxed_3553_; lean_object* v_res_3554_; 
v_isExporting_boxed_3553_ = lean_unbox(v_isExporting_3545_);
v_res_3554_ = l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13(v_00_u03b1_3543_, v_x_3544_, v_isExporting_boxed_3553_, v___y_3546_, v___y_3547_, v___y_3548_, v___y_3549_, v___y_3550_, v___y_3551_);
return v_res_3554_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_Term_processDefDeriving___lam__0(lean_object* v_declName_3555_, lean_object* v___x_3556_, lean_object* v_value_3557_, uint8_t v___x_3558_, lean_object* v_x_3559_, lean_object* v_classExpr_3560_, lean_object* v___y_3561_, lean_object* v___y_3562_, lean_object* v___y_3563_, lean_object* v___y_3564_, lean_object* v___y_3565_, lean_object* v___y_3566_){
_start:
{
lean_object* v___x_3568_; 
lean_inc(v___y_3566_);
lean_inc_ref(v___y_3565_);
lean_inc(v___y_3564_);
lean_inc_ref(v___y_3563_);
v___x_3568_ = l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst(v_classExpr_3560_, v_declName_3555_, v___x_3556_, v_value_3557_, v___y_3561_, v___y_3562_, v___y_3563_, v___y_3564_, v___y_3565_, v___y_3566_);
if (lean_obj_tag(v___x_3568_) == 0)
{
lean_object* v_a_3569_; lean_object* v_instType_3570_; lean_object* v_instVal_3571_; lean_object* v___x_3572_; 
v_a_3569_ = lean_ctor_get(v___x_3568_, 0);
lean_inc(v_a_3569_);
lean_dec_ref(v___x_3568_);
v_instType_3570_ = lean_ctor_get(v_a_3569_, 0);
lean_inc_ref(v_instType_3570_);
v_instVal_3571_ = lean_ctor_get(v_a_3569_, 1);
lean_inc_ref(v_instVal_3571_);
lean_dec(v_a_3569_);
v___x_3572_ = l_Lean_Meta_Closure_mkValueTypeClosure(v_instType_3570_, v_instVal_3571_, v___x_3558_, v___y_3563_, v___y_3564_, v___y_3565_, v___y_3566_);
return v___x_3572_;
}
else
{
lean_object* v_a_3573_; lean_object* v___x_3575_; uint8_t v_isShared_3576_; uint8_t v_isSharedCheck_3580_; 
lean_dec(v___y_3566_);
lean_dec_ref(v___y_3565_);
lean_dec(v___y_3564_);
lean_dec_ref(v___y_3563_);
v_a_3573_ = lean_ctor_get(v___x_3568_, 0);
v_isSharedCheck_3580_ = !lean_is_exclusive(v___x_3568_);
if (v_isSharedCheck_3580_ == 0)
{
v___x_3575_ = v___x_3568_;
v_isShared_3576_ = v_isSharedCheck_3580_;
goto v_resetjp_3574_;
}
else
{
lean_inc(v_a_3573_);
lean_dec(v___x_3568_);
v___x_3575_ = lean_box(0);
v_isShared_3576_ = v_isSharedCheck_3580_;
goto v_resetjp_3574_;
}
v_resetjp_3574_:
{
lean_object* v___x_3578_; 
if (v_isShared_3576_ == 0)
{
v___x_3578_ = v___x_3575_;
goto v_reusejp_3577_;
}
else
{
lean_object* v_reuseFailAlloc_3579_; 
v_reuseFailAlloc_3579_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3579_, 0, v_a_3573_);
v___x_3578_ = v_reuseFailAlloc_3579_;
goto v_reusejp_3577_;
}
v_reusejp_3577_:
{
return v___x_3578_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_Term_processDefDeriving___lam__0___boxed(lean_object* v_declName_3581_, lean_object* v___x_3582_, lean_object* v_value_3583_, lean_object* v___x_3584_, lean_object* v_x_3585_, lean_object* v_classExpr_3586_, lean_object* v___y_3587_, lean_object* v___y_3588_, lean_object* v___y_3589_, lean_object* v___y_3590_, lean_object* v___y_3591_, lean_object* v___y_3592_, lean_object* v___y_3593_){
_start:
{
uint8_t v___x_43763__boxed_3594_; lean_object* v_res_3595_; 
v___x_43763__boxed_3594_ = lean_unbox(v___x_3584_);
v_res_3595_ = l_Lean_Elab_Term_processDefDeriving___lam__0(v_declName_3581_, v___x_3582_, v_value_3583_, v___x_43763__boxed_3594_, v_x_3585_, v_classExpr_3586_, v___y_3587_, v___y_3588_, v___y_3589_, v___y_3590_, v___y_3591_, v___y_3592_);
lean_dec_ref(v_x_3585_);
return v_res_3595_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_Term_processDefDeriving___lam__1(lean_object* v___y_3596_, lean_object* v_a_3597_, lean_object* v_a_x3f_3598_){
_start:
{
lean_object* v___x_3600_; 
v___x_3600_ = l_Lean_Core_getMessageLog___redArg(v___y_3596_);
if (lean_obj_tag(v___x_3600_) == 0)
{
lean_object* v_a_3601_; lean_object* v___x_3602_; lean_object* v___x_3603_; 
v_a_3601_ = lean_ctor_get(v___x_3600_, 0);
lean_inc(v_a_3601_);
lean_dec_ref(v___x_3600_);
v___x_3602_ = l_Lean_MessageLog_append(v_a_3597_, v_a_3601_);
v___x_3603_ = l_Lean_Core_setMessageLog___redArg(v___x_3602_, v___y_3596_);
return v___x_3603_;
}
else
{
lean_object* v_a_3604_; lean_object* v___x_3606_; uint8_t v_isShared_3607_; uint8_t v_isSharedCheck_3611_; 
lean_dec_ref(v_a_3597_);
v_a_3604_ = lean_ctor_get(v___x_3600_, 0);
v_isSharedCheck_3611_ = !lean_is_exclusive(v___x_3600_);
if (v_isSharedCheck_3611_ == 0)
{
v___x_3606_ = v___x_3600_;
v_isShared_3607_ = v_isSharedCheck_3611_;
goto v_resetjp_3605_;
}
else
{
lean_inc(v_a_3604_);
lean_dec(v___x_3600_);
v___x_3606_ = lean_box(0);
v_isShared_3607_ = v_isSharedCheck_3611_;
goto v_resetjp_3605_;
}
v_resetjp_3605_:
{
lean_object* v___x_3609_; 
if (v_isShared_3607_ == 0)
{
v___x_3609_ = v___x_3606_;
goto v_reusejp_3608_;
}
else
{
lean_object* v_reuseFailAlloc_3610_; 
v_reuseFailAlloc_3610_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3610_, 0, v_a_3604_);
v___x_3609_ = v_reuseFailAlloc_3610_;
goto v_reusejp_3608_;
}
v_reusejp_3608_:
{
return v___x_3609_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_Term_processDefDeriving___lam__1___boxed(lean_object* v___y_3612_, lean_object* v_a_3613_, lean_object* v_a_x3f_3614_, lean_object* v___y_3615_){
_start:
{
lean_object* v_res_3616_; 
v_res_3616_ = l_Lean_Elab_Term_processDefDeriving___lam__1(v___y_3612_, v_a_3613_, v_a_x3f_3614_);
lean_dec(v_a_x3f_3614_);
lean_dec(v___y_3612_);
return v_res_3616_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_Term_processDefDeriving___lam__2(lean_object* v_cls_3617_, uint8_t v___x_3618_, uint8_t v___x_3619_, lean_object* v___f_3620_, lean_object* v___y_3621_, lean_object* v___y_3622_, lean_object* v___y_3623_, lean_object* v___y_3624_, lean_object* v___y_3625_, lean_object* v___y_3626_){
_start:
{
lean_object* v___x_3628_; 
v___x_3628_ = l_Lean_Core_getMessageLog___redArg(v___y_3626_);
if (lean_obj_tag(v___x_3628_) == 0)
{
lean_object* v_a_3629_; lean_object* v___x_3630_; 
v_a_3629_ = lean_ctor_get(v___x_3628_, 0);
lean_inc(v_a_3629_);
lean_dec_ref(v___x_3628_);
v___x_3630_ = l_Lean_Core_resetMessageLog___redArg(v___y_3626_);
if (lean_obj_tag(v___x_3630_) == 0)
{
lean_object* v_a_3632_; lean_object* v___y_3652_; lean_object* v___x_3679_; lean_object* v___x_3680_; 
lean_dec_ref(v___x_3630_);
v___x_3679_ = lean_box(0);
lean_inc(v___y_3626_);
lean_inc_ref(v___y_3625_);
lean_inc(v___y_3624_);
lean_inc_ref(v___y_3623_);
lean_inc(v___y_3622_);
lean_inc_ref(v___y_3621_);
v___x_3680_ = l_Lean_Elab_Term_elabTerm(v_cls_3617_, v___x_3679_, v___x_3618_, v___x_3618_, v___y_3621_, v___y_3622_, v___y_3623_, v___y_3624_, v___y_3625_, v___y_3626_);
if (lean_obj_tag(v___x_3680_) == 0)
{
lean_object* v_a_3681_; uint8_t v___x_3682_; lean_object* v___x_3683_; 
v_a_3681_ = lean_ctor_get(v___x_3680_, 0);
lean_inc(v_a_3681_);
lean_dec_ref(v___x_3680_);
v___x_3682_ = 2;
lean_inc(v___y_3626_);
lean_inc_ref(v___y_3625_);
lean_inc(v___y_3624_);
lean_inc_ref(v___y_3623_);
lean_inc(v___y_3622_);
lean_inc_ref(v___y_3621_);
v___x_3683_ = l_Lean_Elab_Term_synthesizeSyntheticMVars(v___x_3682_, v___x_3619_, v___y_3621_, v___y_3622_, v___y_3623_, v___y_3624_, v___y_3625_, v___y_3626_);
if (lean_obj_tag(v___x_3683_) == 0)
{
lean_object* v___x_3684_; lean_object* v_messages_3685_; uint8_t v___x_3686_; 
lean_dec_ref(v___x_3683_);
v___x_3684_ = lean_st_ref_get(v___y_3626_);
v_messages_3685_ = lean_ctor_get(v___x_3684_, 6);
lean_inc_ref(v_messages_3685_);
lean_dec(v___x_3684_);
v___x_3686_ = l_Lean_MessageLog_hasErrors(v_messages_3685_);
lean_dec_ref(v_messages_3685_);
if (v___x_3686_ == 0)
{
lean_object* v___x_3687_; 
lean_inc(v___y_3626_);
v___x_3687_ = l_Lean_Meta_forallTelescope___at___00Lean_Elab_Term_processDefDeriving_spec__1___redArg(v_a_3681_, v___f_3620_, v___x_3619_, v___y_3621_, v___y_3622_, v___y_3623_, v___y_3624_, v___y_3625_, v___y_3626_);
v___y_3652_ = v___x_3687_;
goto v___jp_3651_;
}
else
{
lean_object* v___x_3688_; lean_object* v_a_3689_; 
lean_dec(v_a_3681_);
lean_dec_ref(v___y_3625_);
lean_dec(v___y_3624_);
lean_dec_ref(v___y_3623_);
lean_dec(v___y_3622_);
lean_dec_ref(v___y_3621_);
lean_dec_ref(v___f_3620_);
v___x_3688_ = l_Lean_Elab_throwAbortTerm___at___00Lean_Elab_Term_processDefDeriving_spec__2___redArg();
v_a_3689_ = lean_ctor_get(v___x_3688_, 0);
lean_inc(v_a_3689_);
lean_dec_ref(v___x_3688_);
v_a_3632_ = v_a_3689_;
goto v___jp_3631_;
}
}
else
{
lean_object* v_a_3690_; 
lean_dec(v_a_3681_);
lean_dec_ref(v___y_3625_);
lean_dec(v___y_3624_);
lean_dec_ref(v___y_3623_);
lean_dec(v___y_3622_);
lean_dec_ref(v___y_3621_);
lean_dec_ref(v___f_3620_);
v_a_3690_ = lean_ctor_get(v___x_3683_, 0);
lean_inc(v_a_3690_);
lean_dec_ref(v___x_3683_);
v_a_3632_ = v_a_3690_;
goto v___jp_3631_;
}
}
else
{
lean_object* v_a_3691_; 
lean_dec_ref(v___y_3625_);
lean_dec(v___y_3624_);
lean_dec_ref(v___y_3623_);
lean_dec(v___y_3622_);
lean_dec_ref(v___y_3621_);
lean_dec_ref(v___f_3620_);
v_a_3691_ = lean_ctor_get(v___x_3680_, 0);
lean_inc(v_a_3691_);
lean_dec_ref(v___x_3680_);
v_a_3632_ = v_a_3691_;
goto v___jp_3631_;
}
v___jp_3631_:
{
lean_object* v___x_3633_; lean_object* v___x_3634_; 
v___x_3633_ = lean_box(0);
v___x_3634_ = l_Lean_Elab_Term_processDefDeriving___lam__1(v___y_3626_, v_a_3629_, v___x_3633_);
lean_dec(v___y_3626_);
if (lean_obj_tag(v___x_3634_) == 0)
{
lean_object* v___x_3636_; uint8_t v_isShared_3637_; uint8_t v_isSharedCheck_3641_; 
v_isSharedCheck_3641_ = !lean_is_exclusive(v___x_3634_);
if (v_isSharedCheck_3641_ == 0)
{
lean_object* v_unused_3642_; 
v_unused_3642_ = lean_ctor_get(v___x_3634_, 0);
lean_dec(v_unused_3642_);
v___x_3636_ = v___x_3634_;
v_isShared_3637_ = v_isSharedCheck_3641_;
goto v_resetjp_3635_;
}
else
{
lean_dec(v___x_3634_);
v___x_3636_ = lean_box(0);
v_isShared_3637_ = v_isSharedCheck_3641_;
goto v_resetjp_3635_;
}
v_resetjp_3635_:
{
lean_object* v___x_3639_; 
if (v_isShared_3637_ == 0)
{
lean_ctor_set_tag(v___x_3636_, 1);
lean_ctor_set(v___x_3636_, 0, v_a_3632_);
v___x_3639_ = v___x_3636_;
goto v_reusejp_3638_;
}
else
{
lean_object* v_reuseFailAlloc_3640_; 
v_reuseFailAlloc_3640_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3640_, 0, v_a_3632_);
v___x_3639_ = v_reuseFailAlloc_3640_;
goto v_reusejp_3638_;
}
v_reusejp_3638_:
{
return v___x_3639_;
}
}
}
else
{
lean_object* v_a_3643_; lean_object* v___x_3645_; uint8_t v_isShared_3646_; uint8_t v_isSharedCheck_3650_; 
lean_dec_ref(v_a_3632_);
v_a_3643_ = lean_ctor_get(v___x_3634_, 0);
v_isSharedCheck_3650_ = !lean_is_exclusive(v___x_3634_);
if (v_isSharedCheck_3650_ == 0)
{
v___x_3645_ = v___x_3634_;
v_isShared_3646_ = v_isSharedCheck_3650_;
goto v_resetjp_3644_;
}
else
{
lean_inc(v_a_3643_);
lean_dec(v___x_3634_);
v___x_3645_ = lean_box(0);
v_isShared_3646_ = v_isSharedCheck_3650_;
goto v_resetjp_3644_;
}
v_resetjp_3644_:
{
lean_object* v___x_3648_; 
if (v_isShared_3646_ == 0)
{
v___x_3648_ = v___x_3645_;
goto v_reusejp_3647_;
}
else
{
lean_object* v_reuseFailAlloc_3649_; 
v_reuseFailAlloc_3649_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3649_, 0, v_a_3643_);
v___x_3648_ = v_reuseFailAlloc_3649_;
goto v_reusejp_3647_;
}
v_reusejp_3647_:
{
return v___x_3648_;
}
}
}
}
v___jp_3651_:
{
if (lean_obj_tag(v___y_3652_) == 0)
{
lean_object* v_a_3653_; lean_object* v___x_3655_; uint8_t v_isShared_3656_; uint8_t v_isSharedCheck_3677_; 
v_a_3653_ = lean_ctor_get(v___y_3652_, 0);
v_isSharedCheck_3677_ = !lean_is_exclusive(v___y_3652_);
if (v_isSharedCheck_3677_ == 0)
{
v___x_3655_ = v___y_3652_;
v_isShared_3656_ = v_isSharedCheck_3677_;
goto v_resetjp_3654_;
}
else
{
lean_inc(v_a_3653_);
lean_dec(v___y_3652_);
v___x_3655_ = lean_box(0);
v_isShared_3656_ = v_isSharedCheck_3677_;
goto v_resetjp_3654_;
}
v_resetjp_3654_:
{
lean_object* v___x_3658_; 
lean_inc(v_a_3653_);
if (v_isShared_3656_ == 0)
{
lean_ctor_set_tag(v___x_3655_, 1);
v___x_3658_ = v___x_3655_;
goto v_reusejp_3657_;
}
else
{
lean_object* v_reuseFailAlloc_3676_; 
v_reuseFailAlloc_3676_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3676_, 0, v_a_3653_);
v___x_3658_ = v_reuseFailAlloc_3676_;
goto v_reusejp_3657_;
}
v_reusejp_3657_:
{
lean_object* v___x_3659_; 
v___x_3659_ = l_Lean_Elab_Term_processDefDeriving___lam__1(v___y_3626_, v_a_3629_, v___x_3658_);
lean_dec_ref(v___x_3658_);
lean_dec(v___y_3626_);
if (lean_obj_tag(v___x_3659_) == 0)
{
lean_object* v___x_3661_; uint8_t v_isShared_3662_; uint8_t v_isSharedCheck_3666_; 
v_isSharedCheck_3666_ = !lean_is_exclusive(v___x_3659_);
if (v_isSharedCheck_3666_ == 0)
{
lean_object* v_unused_3667_; 
v_unused_3667_ = lean_ctor_get(v___x_3659_, 0);
lean_dec(v_unused_3667_);
v___x_3661_ = v___x_3659_;
v_isShared_3662_ = v_isSharedCheck_3666_;
goto v_resetjp_3660_;
}
else
{
lean_dec(v___x_3659_);
v___x_3661_ = lean_box(0);
v_isShared_3662_ = v_isSharedCheck_3666_;
goto v_resetjp_3660_;
}
v_resetjp_3660_:
{
lean_object* v___x_3664_; 
if (v_isShared_3662_ == 0)
{
lean_ctor_set(v___x_3661_, 0, v_a_3653_);
v___x_3664_ = v___x_3661_;
goto v_reusejp_3663_;
}
else
{
lean_object* v_reuseFailAlloc_3665_; 
v_reuseFailAlloc_3665_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3665_, 0, v_a_3653_);
v___x_3664_ = v_reuseFailAlloc_3665_;
goto v_reusejp_3663_;
}
v_reusejp_3663_:
{
return v___x_3664_;
}
}
}
else
{
lean_object* v_a_3668_; lean_object* v___x_3670_; uint8_t v_isShared_3671_; uint8_t v_isSharedCheck_3675_; 
lean_dec(v_a_3653_);
v_a_3668_ = lean_ctor_get(v___x_3659_, 0);
v_isSharedCheck_3675_ = !lean_is_exclusive(v___x_3659_);
if (v_isSharedCheck_3675_ == 0)
{
v___x_3670_ = v___x_3659_;
v_isShared_3671_ = v_isSharedCheck_3675_;
goto v_resetjp_3669_;
}
else
{
lean_inc(v_a_3668_);
lean_dec(v___x_3659_);
v___x_3670_ = lean_box(0);
v_isShared_3671_ = v_isSharedCheck_3675_;
goto v_resetjp_3669_;
}
v_resetjp_3669_:
{
lean_object* v___x_3673_; 
if (v_isShared_3671_ == 0)
{
v___x_3673_ = v___x_3670_;
goto v_reusejp_3672_;
}
else
{
lean_object* v_reuseFailAlloc_3674_; 
v_reuseFailAlloc_3674_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3674_, 0, v_a_3668_);
v___x_3673_ = v_reuseFailAlloc_3674_;
goto v_reusejp_3672_;
}
v_reusejp_3672_:
{
return v___x_3673_;
}
}
}
}
}
}
else
{
lean_object* v_a_3678_; 
v_a_3678_ = lean_ctor_get(v___y_3652_, 0);
lean_inc(v_a_3678_);
lean_dec_ref(v___y_3652_);
v_a_3632_ = v_a_3678_;
goto v___jp_3631_;
}
}
}
else
{
lean_object* v_a_3692_; lean_object* v___x_3694_; uint8_t v_isShared_3695_; uint8_t v_isSharedCheck_3699_; 
lean_dec(v_a_3629_);
lean_dec(v___y_3626_);
lean_dec_ref(v___y_3625_);
lean_dec(v___y_3624_);
lean_dec_ref(v___y_3623_);
lean_dec(v___y_3622_);
lean_dec_ref(v___y_3621_);
lean_dec_ref(v___f_3620_);
lean_dec(v_cls_3617_);
v_a_3692_ = lean_ctor_get(v___x_3630_, 0);
v_isSharedCheck_3699_ = !lean_is_exclusive(v___x_3630_);
if (v_isSharedCheck_3699_ == 0)
{
v___x_3694_ = v___x_3630_;
v_isShared_3695_ = v_isSharedCheck_3699_;
goto v_resetjp_3693_;
}
else
{
lean_inc(v_a_3692_);
lean_dec(v___x_3630_);
v___x_3694_ = lean_box(0);
v_isShared_3695_ = v_isSharedCheck_3699_;
goto v_resetjp_3693_;
}
v_resetjp_3693_:
{
lean_object* v___x_3697_; 
if (v_isShared_3695_ == 0)
{
v___x_3697_ = v___x_3694_;
goto v_reusejp_3696_;
}
else
{
lean_object* v_reuseFailAlloc_3698_; 
v_reuseFailAlloc_3698_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3698_, 0, v_a_3692_);
v___x_3697_ = v_reuseFailAlloc_3698_;
goto v_reusejp_3696_;
}
v_reusejp_3696_:
{
return v___x_3697_;
}
}
}
}
else
{
lean_object* v_a_3700_; lean_object* v___x_3702_; uint8_t v_isShared_3703_; uint8_t v_isSharedCheck_3707_; 
lean_dec(v___y_3626_);
lean_dec_ref(v___y_3625_);
lean_dec(v___y_3624_);
lean_dec_ref(v___y_3623_);
lean_dec(v___y_3622_);
lean_dec_ref(v___y_3621_);
lean_dec_ref(v___f_3620_);
lean_dec(v_cls_3617_);
v_a_3700_ = lean_ctor_get(v___x_3628_, 0);
v_isSharedCheck_3707_ = !lean_is_exclusive(v___x_3628_);
if (v_isSharedCheck_3707_ == 0)
{
v___x_3702_ = v___x_3628_;
v_isShared_3703_ = v_isSharedCheck_3707_;
goto v_resetjp_3701_;
}
else
{
lean_inc(v_a_3700_);
lean_dec(v___x_3628_);
v___x_3702_ = lean_box(0);
v_isShared_3703_ = v_isSharedCheck_3707_;
goto v_resetjp_3701_;
}
v_resetjp_3701_:
{
lean_object* v___x_3705_; 
if (v_isShared_3703_ == 0)
{
v___x_3705_ = v___x_3702_;
goto v_reusejp_3704_;
}
else
{
lean_object* v_reuseFailAlloc_3706_; 
v_reuseFailAlloc_3706_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3706_, 0, v_a_3700_);
v___x_3705_ = v_reuseFailAlloc_3706_;
goto v_reusejp_3704_;
}
v_reusejp_3704_:
{
return v___x_3705_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_Term_processDefDeriving___lam__2___boxed(lean_object* v_cls_3708_, lean_object* v___x_3709_, lean_object* v___x_3710_, lean_object* v___f_3711_, lean_object* v___y_3712_, lean_object* v___y_3713_, lean_object* v___y_3714_, lean_object* v___y_3715_, lean_object* v___y_3716_, lean_object* v___y_3717_, lean_object* v___y_3718_){
_start:
{
uint8_t v___x_43850__boxed_3719_; uint8_t v___x_43851__boxed_3720_; lean_object* v_res_3721_; 
v___x_43850__boxed_3719_ = lean_unbox(v___x_3709_);
v___x_43851__boxed_3720_ = lean_unbox(v___x_3710_);
v_res_3721_ = l_Lean_Elab_Term_processDefDeriving___lam__2(v_cls_3708_, v___x_43850__boxed_3719_, v___x_43851__boxed_3720_, v___f_3711_, v___y_3712_, v___y_3713_, v___y_3714_, v___y_3715_, v___y_3716_, v___y_3717_);
return v_res_3721_;
}
}
static lean_object* _init_l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Elab_Term_processDefDeriving_spec__4___redArg___closed__3(void){
_start:
{
lean_object* v___x_3725_; lean_object* v___x_3726_; lean_object* v___x_3727_; lean_object* v___x_3728_; lean_object* v___x_3729_; lean_object* v___x_3730_; 
v___x_3725_ = ((lean_object*)(l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Elab_Term_processDefDeriving_spec__4___redArg___closed__2));
v___x_3726_ = lean_unsigned_to_nat(14u);
v___x_3727_ = lean_unsigned_to_nat(22u);
v___x_3728_ = ((lean_object*)(l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Elab_Term_processDefDeriving_spec__4___redArg___closed__1));
v___x_3729_ = ((lean_object*)(l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Elab_Term_processDefDeriving_spec__4___redArg___closed__0));
v___x_3730_ = l_mkPanicMessageWithDecl(v___x_3729_, v___x_3728_, v___x_3727_, v___x_3726_, v___x_3725_);
return v___x_3730_;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Elab_Term_processDefDeriving_spec__4___redArg(lean_object* v_as_3731_, size_t v_i_3732_, size_t v_stop_3733_, lean_object* v_b_3734_, lean_object* v___y_3735_, lean_object* v___y_3736_){
_start:
{
uint8_t v___x_3738_; 
v___x_3738_ = lean_usize_dec_eq(v_i_3732_, v_stop_3733_);
if (v___x_3738_ == 0)
{
lean_object* v___x_3739_; lean_object* v___x_3740_; lean_object* v___y_3742_; lean_object* v___x_3758_; 
v___x_3739_ = lean_array_uget_borrowed(v_as_3731_, v_i_3732_);
v___x_3740_ = l_Lean_Expr_fvarId_x21(v___x_3739_);
lean_inc(v___x_3740_);
lean_inc_ref(v_b_3734_);
v___x_3758_ = lean_local_ctx_find(v_b_3734_, v___x_3740_);
if (lean_obj_tag(v___x_3758_) == 0)
{
lean_object* v___x_3759_; lean_object* v___x_3760_; 
v___x_3759_ = lean_obj_once(&l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Elab_Term_processDefDeriving_spec__4___redArg___closed__3, &l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Elab_Term_processDefDeriving_spec__4___redArg___closed__3_once, _init_l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Elab_Term_processDefDeriving_spec__4___redArg___closed__3);
v___x_3760_ = l_panic___at___00Lean_Elab_Term_processDefDeriving_spec__0(v___x_3759_);
v___y_3742_ = v___x_3760_;
goto v___jp_3741_;
}
else
{
lean_object* v_val_3761_; 
v_val_3761_ = lean_ctor_get(v___x_3758_, 0);
lean_inc(v_val_3761_);
lean_dec_ref(v___x_3758_);
v___y_3742_ = v_val_3761_;
goto v___jp_3741_;
}
v___jp_3741_:
{
lean_object* v___x_3743_; lean_object* v___x_3744_; 
v___x_3743_ = l_Lean_LocalDecl_userName(v___y_3742_);
lean_dec_ref(v___y_3742_);
lean_inc(v___y_3736_);
lean_inc_ref(v___y_3735_);
v___x_3744_ = l_Lean_Core_mkFreshUserName(v___x_3743_, v___y_3735_, v___y_3736_);
if (lean_obj_tag(v___x_3744_) == 0)
{
lean_object* v_a_3745_; lean_object* v___x_3746_; size_t v___x_3747_; size_t v___x_3748_; 
v_a_3745_ = lean_ctor_get(v___x_3744_, 0);
lean_inc(v_a_3745_);
lean_dec_ref(v___x_3744_);
v___x_3746_ = l_Lean_LocalContext_setUserName(v_b_3734_, v___x_3740_, v_a_3745_);
v___x_3747_ = ((size_t)1ULL);
v___x_3748_ = lean_usize_add(v_i_3732_, v___x_3747_);
v_i_3732_ = v___x_3748_;
v_b_3734_ = v___x_3746_;
goto _start;
}
else
{
lean_object* v_a_3750_; lean_object* v___x_3752_; uint8_t v_isShared_3753_; uint8_t v_isSharedCheck_3757_; 
lean_dec(v___x_3740_);
lean_dec(v___y_3736_);
lean_dec_ref(v___y_3735_);
lean_dec_ref(v_b_3734_);
v_a_3750_ = lean_ctor_get(v___x_3744_, 0);
v_isSharedCheck_3757_ = !lean_is_exclusive(v___x_3744_);
if (v_isSharedCheck_3757_ == 0)
{
v___x_3752_ = v___x_3744_;
v_isShared_3753_ = v_isSharedCheck_3757_;
goto v_resetjp_3751_;
}
else
{
lean_inc(v_a_3750_);
lean_dec(v___x_3744_);
v___x_3752_ = lean_box(0);
v_isShared_3753_ = v_isSharedCheck_3757_;
goto v_resetjp_3751_;
}
v_resetjp_3751_:
{
lean_object* v___x_3755_; 
if (v_isShared_3753_ == 0)
{
v___x_3755_ = v___x_3752_;
goto v_reusejp_3754_;
}
else
{
lean_object* v_reuseFailAlloc_3756_; 
v_reuseFailAlloc_3756_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3756_, 0, v_a_3750_);
v___x_3755_ = v_reuseFailAlloc_3756_;
goto v_reusejp_3754_;
}
v_reusejp_3754_:
{
return v___x_3755_;
}
}
}
}
}
else
{
lean_object* v___x_3762_; 
lean_dec(v___y_3736_);
lean_dec_ref(v___y_3735_);
v___x_3762_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_3762_, 0, v_b_3734_);
return v___x_3762_;
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Elab_Term_processDefDeriving_spec__4___redArg___boxed(lean_object* v_as_3763_, lean_object* v_i_3764_, lean_object* v_stop_3765_, lean_object* v_b_3766_, lean_object* v___y_3767_, lean_object* v___y_3768_, lean_object* v___y_3769_){
_start:
{
size_t v_i_boxed_3770_; size_t v_stop_boxed_3771_; lean_object* v_res_3772_; 
v_i_boxed_3770_ = lean_unbox_usize(v_i_3764_);
lean_dec(v_i_3764_);
v_stop_boxed_3771_ = lean_unbox_usize(v_stop_3765_);
lean_dec(v_stop_3765_);
v_res_3772_ = l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Elab_Term_processDefDeriving_spec__4___redArg(v_as_3763_, v_i_boxed_3770_, v_stop_boxed_3771_, v_b_3766_, v___y_3767_, v___y_3768_);
lean_dec_ref(v_as_3763_);
return v_res_3772_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_Term_processDefDeriving___lam__3(lean_object* v_xs_3773_, lean_object* v___f_3774_, lean_object* v___y_3775_, lean_object* v___y_3776_, lean_object* v___y_3777_, lean_object* v___y_3778_, lean_object* v___y_3779_, lean_object* v___y_3780_){
_start:
{
lean_object* v___y_3783_; lean_object* v_lctx_3794_; lean_object* v___x_3795_; lean_object* v___x_3796_; uint8_t v___x_3797_; 
v_lctx_3794_ = lean_ctor_get(v___y_3777_, 2);
v___x_3795_ = lean_unsigned_to_nat(0u);
v___x_3796_ = lean_array_get_size(v_xs_3773_);
v___x_3797_ = lean_nat_dec_lt(v___x_3795_, v___x_3796_);
if (v___x_3797_ == 0)
{
lean_object* v___x_3798_; 
lean_inc_ref(v_lctx_3794_);
v___x_3798_ = l_Lean_Meta_withLCtx_x27___at___00Lean_Elab_Term_processDefDeriving_spec__3___redArg(v_lctx_3794_, v___f_3774_, v___y_3775_, v___y_3776_, v___y_3777_, v___y_3778_, v___y_3779_, v___y_3780_);
return v___x_3798_;
}
else
{
uint8_t v___x_3799_; 
v___x_3799_ = lean_nat_dec_le(v___x_3796_, v___x_3796_);
if (v___x_3799_ == 0)
{
if (v___x_3797_ == 0)
{
lean_object* v___x_3800_; 
lean_inc_ref(v_lctx_3794_);
v___x_3800_ = l_Lean_Meta_withLCtx_x27___at___00Lean_Elab_Term_processDefDeriving_spec__3___redArg(v_lctx_3794_, v___f_3774_, v___y_3775_, v___y_3776_, v___y_3777_, v___y_3778_, v___y_3779_, v___y_3780_);
return v___x_3800_;
}
else
{
size_t v___x_3801_; size_t v___x_3802_; lean_object* v___x_3803_; 
v___x_3801_ = ((size_t)0ULL);
v___x_3802_ = lean_usize_of_nat(v___x_3796_);
lean_inc(v___y_3780_);
lean_inc_ref(v___y_3779_);
lean_inc_ref(v_lctx_3794_);
v___x_3803_ = l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Elab_Term_processDefDeriving_spec__4___redArg(v_xs_3773_, v___x_3801_, v___x_3802_, v_lctx_3794_, v___y_3779_, v___y_3780_);
v___y_3783_ = v___x_3803_;
goto v___jp_3782_;
}
}
else
{
size_t v___x_3804_; size_t v___x_3805_; lean_object* v___x_3806_; 
v___x_3804_ = ((size_t)0ULL);
v___x_3805_ = lean_usize_of_nat(v___x_3796_);
lean_inc(v___y_3780_);
lean_inc_ref(v___y_3779_);
lean_inc_ref(v_lctx_3794_);
v___x_3806_ = l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Elab_Term_processDefDeriving_spec__4___redArg(v_xs_3773_, v___x_3804_, v___x_3805_, v_lctx_3794_, v___y_3779_, v___y_3780_);
v___y_3783_ = v___x_3806_;
goto v___jp_3782_;
}
}
v___jp_3782_:
{
if (lean_obj_tag(v___y_3783_) == 0)
{
lean_object* v_a_3784_; lean_object* v___x_3785_; 
v_a_3784_ = lean_ctor_get(v___y_3783_, 0);
lean_inc(v_a_3784_);
lean_dec_ref(v___y_3783_);
v___x_3785_ = l_Lean_Meta_withLCtx_x27___at___00Lean_Elab_Term_processDefDeriving_spec__3___redArg(v_a_3784_, v___f_3774_, v___y_3775_, v___y_3776_, v___y_3777_, v___y_3778_, v___y_3779_, v___y_3780_);
return v___x_3785_;
}
else
{
lean_object* v_a_3786_; lean_object* v___x_3788_; uint8_t v_isShared_3789_; uint8_t v_isSharedCheck_3793_; 
lean_dec(v___y_3780_);
lean_dec_ref(v___y_3779_);
lean_dec(v___y_3778_);
lean_dec_ref(v___y_3777_);
lean_dec(v___y_3776_);
lean_dec_ref(v___y_3775_);
lean_dec_ref(v___f_3774_);
v_a_3786_ = lean_ctor_get(v___y_3783_, 0);
v_isSharedCheck_3793_ = !lean_is_exclusive(v___y_3783_);
if (v_isSharedCheck_3793_ == 0)
{
v___x_3788_ = v___y_3783_;
v_isShared_3789_ = v_isSharedCheck_3793_;
goto v_resetjp_3787_;
}
else
{
lean_inc(v_a_3786_);
lean_dec(v___y_3783_);
v___x_3788_ = lean_box(0);
v_isShared_3789_ = v_isSharedCheck_3793_;
goto v_resetjp_3787_;
}
v_resetjp_3787_:
{
lean_object* v___x_3791_; 
if (v_isShared_3789_ == 0)
{
v___x_3791_ = v___x_3788_;
goto v_reusejp_3790_;
}
else
{
lean_object* v_reuseFailAlloc_3792_; 
v_reuseFailAlloc_3792_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3792_, 0, v_a_3786_);
v___x_3791_ = v_reuseFailAlloc_3792_;
goto v_reusejp_3790_;
}
v_reusejp_3790_:
{
return v___x_3791_;
}
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_Term_processDefDeriving___lam__3___boxed(lean_object* v_xs_3807_, lean_object* v___f_3808_, lean_object* v___y_3809_, lean_object* v___y_3810_, lean_object* v___y_3811_, lean_object* v___y_3812_, lean_object* v___y_3813_, lean_object* v___y_3814_, lean_object* v___y_3815_){
_start:
{
lean_object* v_res_3816_; 
v_res_3816_ = l_Lean_Elab_Term_processDefDeriving___lam__3(v_xs_3807_, v___f_3808_, v___y_3809_, v___y_3810_, v___y_3811_, v___y_3812_, v___y_3813_, v___y_3814_);
lean_dec_ref(v_xs_3807_);
return v_res_3816_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_Term_processDefDeriving___lam__4(lean_object* v_a_3817_, lean_object* v_declName_3818_, uint8_t v___x_3819_, lean_object* v_cls_3820_, uint8_t v___x_3821_, lean_object* v_xs_3822_, lean_object* v_value_3823_, lean_object* v___y_3824_, lean_object* v___y_3825_, lean_object* v___y_3826_, lean_object* v___y_3827_, lean_object* v___y_3828_, lean_object* v___y_3829_){
_start:
{
lean_object* v___x_3831_; lean_object* v___x_3832_; lean_object* v___f_3833_; lean_object* v___x_3834_; lean_object* v___x_3835_; lean_object* v___f_3836_; lean_object* v___f_3837_; lean_object* v___x_3838_; 
v___x_3831_ = l_Lean_mkAppN(v_a_3817_, v_xs_3822_);
v___x_3832_ = lean_box(v___x_3819_);
v___f_3833_ = lean_alloc_closure((void*)(l_Lean_Elab_Term_processDefDeriving___lam__0___boxed), 13, 4);
lean_closure_set(v___f_3833_, 0, v_declName_3818_);
lean_closure_set(v___f_3833_, 1, v___x_3831_);
lean_closure_set(v___f_3833_, 2, v_value_3823_);
lean_closure_set(v___f_3833_, 3, v___x_3832_);
v___x_3834_ = lean_box(v___x_3819_);
v___x_3835_ = lean_box(v___x_3821_);
v___f_3836_ = lean_alloc_closure((void*)(l_Lean_Elab_Term_processDefDeriving___lam__2___boxed), 11, 4);
lean_closure_set(v___f_3836_, 0, v_cls_3820_);
lean_closure_set(v___f_3836_, 1, v___x_3834_);
lean_closure_set(v___f_3836_, 2, v___x_3835_);
lean_closure_set(v___f_3836_, 3, v___f_3833_);
v___f_3837_ = lean_alloc_closure((void*)(l_Lean_Elab_Term_processDefDeriving___lam__3___boxed), 9, 2);
lean_closure_set(v___f_3837_, 0, v_xs_3822_);
lean_closure_set(v___f_3837_, 1, v___f_3836_);
v___x_3838_ = l_Lean_Elab_Term_withoutErrToSorryImp___redArg(v___f_3837_, v___y_3824_, v___y_3825_, v___y_3826_, v___y_3827_, v___y_3828_, v___y_3829_);
return v___x_3838_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_Term_processDefDeriving___lam__4___boxed(lean_object* v_a_3839_, lean_object* v_declName_3840_, lean_object* v___x_3841_, lean_object* v_cls_3842_, lean_object* v___x_3843_, lean_object* v_xs_3844_, lean_object* v_value_3845_, lean_object* v___y_3846_, lean_object* v___y_3847_, lean_object* v___y_3848_, lean_object* v___y_3849_, lean_object* v___y_3850_, lean_object* v___y_3851_, lean_object* v___y_3852_){
_start:
{
uint8_t v___x_44205__boxed_3853_; uint8_t v___x_44207__boxed_3854_; lean_object* v_res_3855_; 
v___x_44205__boxed_3853_ = lean_unbox(v___x_3841_);
v___x_44207__boxed_3854_ = lean_unbox(v___x_3843_);
v_res_3855_ = l_Lean_Elab_Term_processDefDeriving___lam__4(v_a_3839_, v_declName_3840_, v___x_44205__boxed_3853_, v_cls_3842_, v___x_44207__boxed_3854_, v_xs_3844_, v_value_3845_, v___y_3846_, v___y_3847_, v___y_3848_, v___y_3849_, v___y_3850_, v___y_3851_);
return v_res_3855_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_Term_processDefDeriving___lam__5(lean_object* v_env_3856_, lean_object* v___x_3857_, lean_object* v_n_3858_, lean_object* v_acc_3859_){
_start:
{
if (lean_obj_tag(v_acc_3859_) == 0)
{
lean_object* v___x_3860_; uint8_t v___x_3861_; 
v___x_3860_ = lean_box(1);
lean_inc(v_n_3858_);
v___x_3861_ = l_Lean_isNoncomputable(v_env_3856_, v_n_3858_, v___x_3860_);
if (v___x_3861_ == 0)
{
lean_dec(v_n_3858_);
lean_inc(v___x_3857_);
return v___x_3857_;
}
else
{
lean_object* v___x_3862_; 
v___x_3862_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_3862_, 0, v_n_3858_);
return v___x_3862_;
}
}
else
{
lean_dec(v_n_3858_);
lean_dec_ref(v_env_3856_);
lean_inc_ref(v_acc_3859_);
return v_acc_3859_;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_Term_processDefDeriving___lam__5___boxed(lean_object* v_env_3863_, lean_object* v___x_3864_, lean_object* v_n_3865_, lean_object* v_acc_3866_){
_start:
{
lean_object* v_res_3867_; 
v_res_3867_ = l_Lean_Elab_Term_processDefDeriving___lam__5(v_env_3863_, v___x_3864_, v_n_3865_, v_acc_3866_);
lean_dec(v_acc_3866_);
lean_dec(v___x_3864_);
return v_res_3867_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_getDeclarationRange_x3f___at___00Lean_Elab_addDeclarationRangesFromSyntax___at___00Lean_Elab_Term_processDefDeriving_spec__9_spec__17___redArg(lean_object* v_stx_3868_, lean_object* v___y_3869_){
_start:
{
uint8_t v___x_3871_; lean_object* v___x_3872_; 
v___x_3871_ = 0;
v___x_3872_ = l_Lean_Syntax_getRange_x3f(v_stx_3868_, v___x_3871_);
if (lean_obj_tag(v___x_3872_) == 1)
{
lean_object* v_val_3873_; lean_object* v___x_3875_; uint8_t v_isShared_3876_; uint8_t v_isSharedCheck_3885_; 
v_val_3873_ = lean_ctor_get(v___x_3872_, 0);
v_isSharedCheck_3885_ = !lean_is_exclusive(v___x_3872_);
if (v_isSharedCheck_3885_ == 0)
{
v___x_3875_ = v___x_3872_;
v_isShared_3876_ = v_isSharedCheck_3885_;
goto v_resetjp_3874_;
}
else
{
lean_inc(v_val_3873_);
lean_dec(v___x_3872_);
v___x_3875_ = lean_box(0);
v_isShared_3876_ = v_isSharedCheck_3885_;
goto v_resetjp_3874_;
}
v_resetjp_3874_:
{
lean_object* v_fileMap_3877_; lean_object* v_start_3878_; lean_object* v_stop_3879_; lean_object* v___x_3880_; lean_object* v___x_3882_; 
v_fileMap_3877_ = lean_ctor_get(v___y_3869_, 1);
lean_inc_ref(v_fileMap_3877_);
lean_dec_ref(v___y_3869_);
v_start_3878_ = lean_ctor_get(v_val_3873_, 0);
lean_inc(v_start_3878_);
v_stop_3879_ = lean_ctor_get(v_val_3873_, 1);
lean_inc(v_stop_3879_);
lean_dec(v_val_3873_);
v___x_3880_ = l_Lean_DeclarationRange_ofStringPositions(v_fileMap_3877_, v_start_3878_, v_stop_3879_);
lean_dec(v_stop_3879_);
lean_dec(v_start_3878_);
if (v_isShared_3876_ == 0)
{
lean_ctor_set(v___x_3875_, 0, v___x_3880_);
v___x_3882_ = v___x_3875_;
goto v_reusejp_3881_;
}
else
{
lean_object* v_reuseFailAlloc_3884_; 
v_reuseFailAlloc_3884_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3884_, 0, v___x_3880_);
v___x_3882_ = v_reuseFailAlloc_3884_;
goto v_reusejp_3881_;
}
v_reusejp_3881_:
{
lean_object* v___x_3883_; 
v___x_3883_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_3883_, 0, v___x_3882_);
return v___x_3883_;
}
}
}
else
{
lean_object* v___x_3886_; lean_object* v___x_3887_; 
lean_dec(v___x_3872_);
lean_dec_ref(v___y_3869_);
v___x_3886_ = lean_box(0);
v___x_3887_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_3887_, 0, v___x_3886_);
return v___x_3887_;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_getDeclarationRange_x3f___at___00Lean_Elab_addDeclarationRangesFromSyntax___at___00Lean_Elab_Term_processDefDeriving_spec__9_spec__17___redArg___boxed(lean_object* v_stx_3888_, lean_object* v___y_3889_, lean_object* v___y_3890_){
_start:
{
lean_object* v_res_3891_; 
v_res_3891_ = l_Lean_Elab_getDeclarationRange_x3f___at___00Lean_Elab_addDeclarationRangesFromSyntax___at___00Lean_Elab_Term_processDefDeriving_spec__9_spec__17___redArg(v_stx_3888_, v___y_3889_);
lean_dec(v_stx_3888_);
return v_res_3891_;
}
}
LEAN_EXPORT lean_object* l_Lean_addDeclarationRanges___at___00Lean_Elab_addDeclarationRangesFromSyntax___at___00Lean_Elab_Term_processDefDeriving_spec__9_spec__18___redArg(lean_object* v_declName_3892_, lean_object* v_declRanges_3893_, lean_object* v___y_3894_, lean_object* v___y_3895_){
_start:
{
uint8_t v___x_3897_; 
v___x_3897_ = l_Lean_Name_isAnonymous(v_declName_3892_);
if (v___x_3897_ == 0)
{
lean_object* v___x_3898_; lean_object* v_env_3899_; lean_object* v_nextMacroScope_3900_; lean_object* v_ngen_3901_; lean_object* v_auxDeclNGen_3902_; lean_object* v_traceState_3903_; lean_object* v_messages_3904_; lean_object* v_infoState_3905_; lean_object* v_snapshotTasks_3906_; lean_object* v___x_3908_; uint8_t v_isShared_3909_; uint8_t v_isSharedCheck_3934_; 
v___x_3898_ = lean_st_ref_take(v___y_3895_);
v_env_3899_ = lean_ctor_get(v___x_3898_, 0);
v_nextMacroScope_3900_ = lean_ctor_get(v___x_3898_, 1);
v_ngen_3901_ = lean_ctor_get(v___x_3898_, 2);
v_auxDeclNGen_3902_ = lean_ctor_get(v___x_3898_, 3);
v_traceState_3903_ = lean_ctor_get(v___x_3898_, 4);
v_messages_3904_ = lean_ctor_get(v___x_3898_, 6);
v_infoState_3905_ = lean_ctor_get(v___x_3898_, 7);
v_snapshotTasks_3906_ = lean_ctor_get(v___x_3898_, 8);
v_isSharedCheck_3934_ = !lean_is_exclusive(v___x_3898_);
if (v_isSharedCheck_3934_ == 0)
{
lean_object* v_unused_3935_; 
v_unused_3935_ = lean_ctor_get(v___x_3898_, 5);
lean_dec(v_unused_3935_);
v___x_3908_ = v___x_3898_;
v_isShared_3909_ = v_isSharedCheck_3934_;
goto v_resetjp_3907_;
}
else
{
lean_inc(v_snapshotTasks_3906_);
lean_inc(v_infoState_3905_);
lean_inc(v_messages_3904_);
lean_inc(v_traceState_3903_);
lean_inc(v_auxDeclNGen_3902_);
lean_inc(v_ngen_3901_);
lean_inc(v_nextMacroScope_3900_);
lean_inc(v_env_3899_);
lean_dec(v___x_3898_);
v___x_3908_ = lean_box(0);
v_isShared_3909_ = v_isSharedCheck_3934_;
goto v_resetjp_3907_;
}
v_resetjp_3907_:
{
lean_object* v___x_3910_; lean_object* v___x_3911_; lean_object* v___x_3912_; lean_object* v___x_3914_; 
v___x_3910_ = l_Lean_declRangeExt;
v___x_3911_ = l_Lean_MapDeclarationExtension_insert___redArg(v___x_3910_, v_env_3899_, v_declName_3892_, v_declRanges_3893_);
v___x_3912_ = lean_obj_once(&l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__2, &l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__2_once, _init_l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__2);
if (v_isShared_3909_ == 0)
{
lean_ctor_set(v___x_3908_, 5, v___x_3912_);
lean_ctor_set(v___x_3908_, 0, v___x_3911_);
v___x_3914_ = v___x_3908_;
goto v_reusejp_3913_;
}
else
{
lean_object* v_reuseFailAlloc_3933_; 
v_reuseFailAlloc_3933_ = lean_alloc_ctor(0, 9, 0);
lean_ctor_set(v_reuseFailAlloc_3933_, 0, v___x_3911_);
lean_ctor_set(v_reuseFailAlloc_3933_, 1, v_nextMacroScope_3900_);
lean_ctor_set(v_reuseFailAlloc_3933_, 2, v_ngen_3901_);
lean_ctor_set(v_reuseFailAlloc_3933_, 3, v_auxDeclNGen_3902_);
lean_ctor_set(v_reuseFailAlloc_3933_, 4, v_traceState_3903_);
lean_ctor_set(v_reuseFailAlloc_3933_, 5, v___x_3912_);
lean_ctor_set(v_reuseFailAlloc_3933_, 6, v_messages_3904_);
lean_ctor_set(v_reuseFailAlloc_3933_, 7, v_infoState_3905_);
lean_ctor_set(v_reuseFailAlloc_3933_, 8, v_snapshotTasks_3906_);
v___x_3914_ = v_reuseFailAlloc_3933_;
goto v_reusejp_3913_;
}
v_reusejp_3913_:
{
lean_object* v___x_3915_; lean_object* v___x_3916_; lean_object* v_mctx_3917_; lean_object* v_zetaDeltaFVarIds_3918_; lean_object* v_postponed_3919_; lean_object* v_diag_3920_; lean_object* v___x_3922_; uint8_t v_isShared_3923_; uint8_t v_isSharedCheck_3931_; 
v___x_3915_ = lean_st_ref_set(v___y_3895_, v___x_3914_);
v___x_3916_ = lean_st_ref_take(v___y_3894_);
v_mctx_3917_ = lean_ctor_get(v___x_3916_, 0);
v_zetaDeltaFVarIds_3918_ = lean_ctor_get(v___x_3916_, 2);
v_postponed_3919_ = lean_ctor_get(v___x_3916_, 3);
v_diag_3920_ = lean_ctor_get(v___x_3916_, 4);
v_isSharedCheck_3931_ = !lean_is_exclusive(v___x_3916_);
if (v_isSharedCheck_3931_ == 0)
{
lean_object* v_unused_3932_; 
v_unused_3932_ = lean_ctor_get(v___x_3916_, 1);
lean_dec(v_unused_3932_);
v___x_3922_ = v___x_3916_;
v_isShared_3923_ = v_isSharedCheck_3931_;
goto v_resetjp_3921_;
}
else
{
lean_inc(v_diag_3920_);
lean_inc(v_postponed_3919_);
lean_inc(v_zetaDeltaFVarIds_3918_);
lean_inc(v_mctx_3917_);
lean_dec(v___x_3916_);
v___x_3922_ = lean_box(0);
v_isShared_3923_ = v_isSharedCheck_3931_;
goto v_resetjp_3921_;
}
v_resetjp_3921_:
{
lean_object* v___x_3924_; lean_object* v___x_3926_; 
v___x_3924_ = lean_obj_once(&l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__3, &l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__3_once, _init_l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__3);
if (v_isShared_3923_ == 0)
{
lean_ctor_set(v___x_3922_, 1, v___x_3924_);
v___x_3926_ = v___x_3922_;
goto v_reusejp_3925_;
}
else
{
lean_object* v_reuseFailAlloc_3930_; 
v_reuseFailAlloc_3930_ = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(v_reuseFailAlloc_3930_, 0, v_mctx_3917_);
lean_ctor_set(v_reuseFailAlloc_3930_, 1, v___x_3924_);
lean_ctor_set(v_reuseFailAlloc_3930_, 2, v_zetaDeltaFVarIds_3918_);
lean_ctor_set(v_reuseFailAlloc_3930_, 3, v_postponed_3919_);
lean_ctor_set(v_reuseFailAlloc_3930_, 4, v_diag_3920_);
v___x_3926_ = v_reuseFailAlloc_3930_;
goto v_reusejp_3925_;
}
v_reusejp_3925_:
{
lean_object* v___x_3927_; lean_object* v___x_3928_; lean_object* v___x_3929_; 
v___x_3927_ = lean_st_ref_set(v___y_3894_, v___x_3926_);
v___x_3928_ = lean_box(0);
v___x_3929_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_3929_, 0, v___x_3928_);
return v___x_3929_;
}
}
}
}
}
else
{
lean_object* v___x_3936_; lean_object* v___x_3937_; 
lean_dec_ref(v_declRanges_3893_);
lean_dec(v_declName_3892_);
v___x_3936_ = lean_box(0);
v___x_3937_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_3937_, 0, v___x_3936_);
return v___x_3937_;
}
}
}
LEAN_EXPORT lean_object* l_Lean_addDeclarationRanges___at___00Lean_Elab_addDeclarationRangesFromSyntax___at___00Lean_Elab_Term_processDefDeriving_spec__9_spec__18___redArg___boxed(lean_object* v_declName_3938_, lean_object* v_declRanges_3939_, lean_object* v___y_3940_, lean_object* v___y_3941_, lean_object* v___y_3942_){
_start:
{
lean_object* v_res_3943_; 
v_res_3943_ = l_Lean_addDeclarationRanges___at___00Lean_Elab_addDeclarationRangesFromSyntax___at___00Lean_Elab_Term_processDefDeriving_spec__9_spec__18___redArg(v_declName_3938_, v_declRanges_3939_, v___y_3940_, v___y_3941_);
lean_dec(v___y_3941_);
lean_dec(v___y_3940_);
return v_res_3943_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_addDeclarationRangesFromSyntax___at___00Lean_Elab_Term_processDefDeriving_spec__9(lean_object* v_declName_3944_, lean_object* v_rangeStx_3945_, lean_object* v_selectionRangeStx_3946_, lean_object* v___y_3947_, lean_object* v___y_3948_, lean_object* v___y_3949_, lean_object* v___y_3950_, lean_object* v___y_3951_, lean_object* v___y_3952_){
_start:
{
lean_object* v___x_3954_; lean_object* v_a_3955_; lean_object* v___x_3957_; uint8_t v_isShared_3958_; uint8_t v_isSharedCheck_3971_; 
lean_inc_ref(v___y_3951_);
v___x_3954_ = l_Lean_Elab_getDeclarationRange_x3f___at___00Lean_Elab_addDeclarationRangesFromSyntax___at___00Lean_Elab_Term_processDefDeriving_spec__9_spec__17___redArg(v_rangeStx_3945_, v___y_3951_);
v_a_3955_ = lean_ctor_get(v___x_3954_, 0);
v_isSharedCheck_3971_ = !lean_is_exclusive(v___x_3954_);
if (v_isSharedCheck_3971_ == 0)
{
v___x_3957_ = v___x_3954_;
v_isShared_3958_ = v_isSharedCheck_3971_;
goto v_resetjp_3956_;
}
else
{
lean_inc(v_a_3955_);
lean_dec(v___x_3954_);
v___x_3957_ = lean_box(0);
v_isShared_3958_ = v_isSharedCheck_3971_;
goto v_resetjp_3956_;
}
v_resetjp_3956_:
{
if (lean_obj_tag(v_a_3955_) == 1)
{
lean_object* v_val_3959_; lean_object* v___x_3960_; lean_object* v_a_3961_; lean_object* v_a_3963_; 
lean_del_object(v___x_3957_);
v_val_3959_ = lean_ctor_get(v_a_3955_, 0);
lean_inc(v_val_3959_);
lean_dec_ref(v_a_3955_);
v___x_3960_ = l_Lean_Elab_getDeclarationRange_x3f___at___00Lean_Elab_addDeclarationRangesFromSyntax___at___00Lean_Elab_Term_processDefDeriving_spec__9_spec__17___redArg(v_selectionRangeStx_3946_, v___y_3951_);
v_a_3961_ = lean_ctor_get(v___x_3960_, 0);
lean_inc(v_a_3961_);
lean_dec_ref(v___x_3960_);
if (lean_obj_tag(v_a_3961_) == 0)
{
lean_inc(v_val_3959_);
v_a_3963_ = v_val_3959_;
goto v___jp_3962_;
}
else
{
lean_object* v_val_3966_; 
v_val_3966_ = lean_ctor_get(v_a_3961_, 0);
lean_inc(v_val_3966_);
lean_dec_ref(v_a_3961_);
v_a_3963_ = v_val_3966_;
goto v___jp_3962_;
}
v___jp_3962_:
{
lean_object* v___x_3964_; lean_object* v___x_3965_; 
v___x_3964_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_3964_, 0, v_val_3959_);
lean_ctor_set(v___x_3964_, 1, v_a_3963_);
v___x_3965_ = l_Lean_addDeclarationRanges___at___00Lean_Elab_addDeclarationRangesFromSyntax___at___00Lean_Elab_Term_processDefDeriving_spec__9_spec__18___redArg(v_declName_3944_, v___x_3964_, v___y_3950_, v___y_3952_);
return v___x_3965_;
}
}
else
{
lean_object* v___x_3967_; lean_object* v___x_3969_; 
lean_dec(v_a_3955_);
lean_dec_ref(v___y_3951_);
lean_dec(v_declName_3944_);
v___x_3967_ = lean_box(0);
if (v_isShared_3958_ == 0)
{
lean_ctor_set(v___x_3957_, 0, v___x_3967_);
v___x_3969_ = v___x_3957_;
goto v_reusejp_3968_;
}
else
{
lean_object* v_reuseFailAlloc_3970_; 
v_reuseFailAlloc_3970_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_3970_, 0, v___x_3967_);
v___x_3969_ = v_reuseFailAlloc_3970_;
goto v_reusejp_3968_;
}
v_reusejp_3968_:
{
return v___x_3969_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_addDeclarationRangesFromSyntax___at___00Lean_Elab_Term_processDefDeriving_spec__9___boxed(lean_object* v_declName_3972_, lean_object* v_rangeStx_3973_, lean_object* v_selectionRangeStx_3974_, lean_object* v___y_3975_, lean_object* v___y_3976_, lean_object* v___y_3977_, lean_object* v___y_3978_, lean_object* v___y_3979_, lean_object* v___y_3980_, lean_object* v___y_3981_){
_start:
{
lean_object* v_res_3982_; 
v_res_3982_ = l_Lean_Elab_addDeclarationRangesFromSyntax___at___00Lean_Elab_Term_processDefDeriving_spec__9(v_declName_3972_, v_rangeStx_3973_, v_selectionRangeStx_3974_, v___y_3975_, v___y_3976_, v___y_3977_, v___y_3978_, v___y_3979_, v___y_3980_);
lean_dec(v___y_3980_);
lean_dec(v___y_3978_);
lean_dec_ref(v___y_3977_);
lean_dec(v___y_3976_);
lean_dec_ref(v___y_3975_);
lean_dec(v_selectionRangeStx_3974_);
lean_dec(v_rangeStx_3973_);
return v_res_3982_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwErrorAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__13___redArg(lean_object* v_ref_3983_, lean_object* v_msg_3984_, lean_object* v___y_3985_, lean_object* v___y_3986_, lean_object* v___y_3987_, lean_object* v___y_3988_, lean_object* v___y_3989_, lean_object* v___y_3990_){
_start:
{
lean_object* v_fileName_3992_; lean_object* v_fileMap_3993_; lean_object* v_options_3994_; lean_object* v_currRecDepth_3995_; lean_object* v_maxRecDepth_3996_; lean_object* v_ref_3997_; lean_object* v_currNamespace_3998_; lean_object* v_openDecls_3999_; lean_object* v_initHeartbeats_4000_; lean_object* v_maxHeartbeats_4001_; lean_object* v_quotContext_4002_; lean_object* v_currMacroScope_4003_; uint8_t v_diag_4004_; lean_object* v_cancelTk_x3f_4005_; uint8_t v_suppressElabErrors_4006_; lean_object* v_inheritedTraceOptions_4007_; lean_object* v___x_4009_; uint8_t v_isShared_4010_; uint8_t v_isSharedCheck_4016_; 
v_fileName_3992_ = lean_ctor_get(v___y_3989_, 0);
v_fileMap_3993_ = lean_ctor_get(v___y_3989_, 1);
v_options_3994_ = lean_ctor_get(v___y_3989_, 2);
v_currRecDepth_3995_ = lean_ctor_get(v___y_3989_, 3);
v_maxRecDepth_3996_ = lean_ctor_get(v___y_3989_, 4);
v_ref_3997_ = lean_ctor_get(v___y_3989_, 5);
v_currNamespace_3998_ = lean_ctor_get(v___y_3989_, 6);
v_openDecls_3999_ = lean_ctor_get(v___y_3989_, 7);
v_initHeartbeats_4000_ = lean_ctor_get(v___y_3989_, 8);
v_maxHeartbeats_4001_ = lean_ctor_get(v___y_3989_, 9);
v_quotContext_4002_ = lean_ctor_get(v___y_3989_, 10);
v_currMacroScope_4003_ = lean_ctor_get(v___y_3989_, 11);
v_diag_4004_ = lean_ctor_get_uint8(v___y_3989_, sizeof(void*)*14);
v_cancelTk_x3f_4005_ = lean_ctor_get(v___y_3989_, 12);
v_suppressElabErrors_4006_ = lean_ctor_get_uint8(v___y_3989_, sizeof(void*)*14 + 1);
v_inheritedTraceOptions_4007_ = lean_ctor_get(v___y_3989_, 13);
v_isSharedCheck_4016_ = !lean_is_exclusive(v___y_3989_);
if (v_isSharedCheck_4016_ == 0)
{
v___x_4009_ = v___y_3989_;
v_isShared_4010_ = v_isSharedCheck_4016_;
goto v_resetjp_4008_;
}
else
{
lean_inc(v_inheritedTraceOptions_4007_);
lean_inc(v_cancelTk_x3f_4005_);
lean_inc(v_currMacroScope_4003_);
lean_inc(v_quotContext_4002_);
lean_inc(v_maxHeartbeats_4001_);
lean_inc(v_initHeartbeats_4000_);
lean_inc(v_openDecls_3999_);
lean_inc(v_currNamespace_3998_);
lean_inc(v_ref_3997_);
lean_inc(v_maxRecDepth_3996_);
lean_inc(v_currRecDepth_3995_);
lean_inc(v_options_3994_);
lean_inc(v_fileMap_3993_);
lean_inc(v_fileName_3992_);
lean_dec(v___y_3989_);
v___x_4009_ = lean_box(0);
v_isShared_4010_ = v_isSharedCheck_4016_;
goto v_resetjp_4008_;
}
v_resetjp_4008_:
{
lean_object* v_ref_4011_; lean_object* v___x_4013_; 
v_ref_4011_ = l_Lean_replaceRef(v_ref_3983_, v_ref_3997_);
lean_dec(v_ref_3997_);
if (v_isShared_4010_ == 0)
{
lean_ctor_set(v___x_4009_, 5, v_ref_4011_);
v___x_4013_ = v___x_4009_;
goto v_reusejp_4012_;
}
else
{
lean_object* v_reuseFailAlloc_4015_; 
v_reuseFailAlloc_4015_ = lean_alloc_ctor(0, 14, 2);
lean_ctor_set(v_reuseFailAlloc_4015_, 0, v_fileName_3992_);
lean_ctor_set(v_reuseFailAlloc_4015_, 1, v_fileMap_3993_);
lean_ctor_set(v_reuseFailAlloc_4015_, 2, v_options_3994_);
lean_ctor_set(v_reuseFailAlloc_4015_, 3, v_currRecDepth_3995_);
lean_ctor_set(v_reuseFailAlloc_4015_, 4, v_maxRecDepth_3996_);
lean_ctor_set(v_reuseFailAlloc_4015_, 5, v_ref_4011_);
lean_ctor_set(v_reuseFailAlloc_4015_, 6, v_currNamespace_3998_);
lean_ctor_set(v_reuseFailAlloc_4015_, 7, v_openDecls_3999_);
lean_ctor_set(v_reuseFailAlloc_4015_, 8, v_initHeartbeats_4000_);
lean_ctor_set(v_reuseFailAlloc_4015_, 9, v_maxHeartbeats_4001_);
lean_ctor_set(v_reuseFailAlloc_4015_, 10, v_quotContext_4002_);
lean_ctor_set(v_reuseFailAlloc_4015_, 11, v_currMacroScope_4003_);
lean_ctor_set(v_reuseFailAlloc_4015_, 12, v_cancelTk_x3f_4005_);
lean_ctor_set(v_reuseFailAlloc_4015_, 13, v_inheritedTraceOptions_4007_);
lean_ctor_set_uint8(v_reuseFailAlloc_4015_, sizeof(void*)*14, v_diag_4004_);
lean_ctor_set_uint8(v_reuseFailAlloc_4015_, sizeof(void*)*14 + 1, v_suppressElabErrors_4006_);
v___x_4013_ = v_reuseFailAlloc_4015_;
goto v_reusejp_4012_;
}
v_reusejp_4012_:
{
lean_object* v___x_4014_; 
v___x_4014_ = l_Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4___redArg(v_msg_3984_, v___y_3985_, v___y_3986_, v___y_3987_, v___y_3988_, v___x_4013_, v___y_3990_);
lean_dec_ref(v___x_4013_);
return v___x_4014_;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_throwErrorAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__13___redArg___boxed(lean_object* v_ref_4017_, lean_object* v_msg_4018_, lean_object* v___y_4019_, lean_object* v___y_4020_, lean_object* v___y_4021_, lean_object* v___y_4022_, lean_object* v___y_4023_, lean_object* v___y_4024_, lean_object* v___y_4025_){
_start:
{
lean_object* v_res_4026_; 
v_res_4026_ = l_Lean_throwErrorAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__13___redArg(v_ref_4017_, v_msg_4018_, v___y_4019_, v___y_4020_, v___y_4021_, v___y_4022_, v___y_4023_, v___y_4024_);
lean_dec(v___y_4024_);
lean_dec(v___y_4022_);
lean_dec_ref(v___y_4021_);
lean_dec(v___y_4020_);
lean_dec(v_ref_4017_);
return v_res_4026_;
}
}
static lean_object* _init_l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__0(void){
_start:
{
lean_object* v___x_4027_; 
v___x_4027_ = l_Lean_PersistentHashMap_mkEmptyEntriesArray(lean_box(0), lean_box(0));
return v___x_4027_;
}
}
static lean_object* _init_l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__1(void){
_start:
{
lean_object* v___x_4028_; lean_object* v___x_4029_; 
v___x_4028_ = lean_obj_once(&l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__0, &l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__0_once, _init_l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__0);
v___x_4029_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_4029_, 0, v___x_4028_);
return v___x_4029_;
}
}
static lean_object* _init_l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__2(void){
_start:
{
lean_object* v___x_4030_; lean_object* v___x_4031_; lean_object* v___x_4032_; 
v___x_4030_ = lean_obj_once(&l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__1, &l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__1_once, _init_l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__1);
v___x_4031_ = lean_unsigned_to_nat(0u);
v___x_4032_ = lean_alloc_ctor(0, 9, 0);
lean_ctor_set(v___x_4032_, 0, v___x_4031_);
lean_ctor_set(v___x_4032_, 1, v___x_4031_);
lean_ctor_set(v___x_4032_, 2, v___x_4031_);
lean_ctor_set(v___x_4032_, 3, v___x_4030_);
lean_ctor_set(v___x_4032_, 4, v___x_4030_);
lean_ctor_set(v___x_4032_, 5, v___x_4030_);
lean_ctor_set(v___x_4032_, 6, v___x_4030_);
lean_ctor_set(v___x_4032_, 7, v___x_4030_);
lean_ctor_set(v___x_4032_, 8, v___x_4030_);
return v___x_4032_;
}
}
static lean_object* _init_l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__3(void){
_start:
{
lean_object* v___x_4033_; lean_object* v___x_4034_; lean_object* v___x_4035_; 
v___x_4033_ = lean_unsigned_to_nat(32u);
v___x_4034_ = lean_mk_empty_array_with_capacity(v___x_4033_);
v___x_4035_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_4035_, 0, v___x_4034_);
return v___x_4035_;
}
}
static lean_object* _init_l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__4(void){
_start:
{
size_t v___x_4036_; lean_object* v___x_4037_; lean_object* v___x_4038_; lean_object* v___x_4039_; lean_object* v___x_4040_; lean_object* v___x_4041_; 
v___x_4036_ = ((size_t)5ULL);
v___x_4037_ = lean_unsigned_to_nat(0u);
v___x_4038_ = lean_unsigned_to_nat(32u);
v___x_4039_ = lean_mk_empty_array_with_capacity(v___x_4038_);
v___x_4040_ = lean_obj_once(&l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__3, &l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__3_once, _init_l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__3);
v___x_4041_ = lean_alloc_ctor(0, 4, sizeof(size_t)*1);
lean_ctor_set(v___x_4041_, 0, v___x_4040_);
lean_ctor_set(v___x_4041_, 1, v___x_4039_);
lean_ctor_set(v___x_4041_, 2, v___x_4037_);
lean_ctor_set(v___x_4041_, 3, v___x_4037_);
lean_ctor_set_usize(v___x_4041_, 4, v___x_4036_);
return v___x_4041_;
}
}
static lean_object* _init_l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__5(void){
_start:
{
lean_object* v___x_4042_; lean_object* v___x_4043_; lean_object* v___x_4044_; lean_object* v___x_4045_; 
v___x_4042_ = lean_box(1);
v___x_4043_ = lean_obj_once(&l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__4, &l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__4_once, _init_l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__4);
v___x_4044_ = lean_obj_once(&l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__1, &l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__1_once, _init_l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__1);
v___x_4045_ = lean_alloc_ctor(0, 3, 0);
lean_ctor_set(v___x_4045_, 0, v___x_4044_);
lean_ctor_set(v___x_4045_, 1, v___x_4043_);
lean_ctor_set(v___x_4045_, 2, v___x_4042_);
return v___x_4045_;
}
}
static lean_object* _init_l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__7(void){
_start:
{
lean_object* v___x_4047_; lean_object* v___x_4048_; 
v___x_4047_ = ((lean_object*)(l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__6));
v___x_4048_ = l_Lean_stringToMessageData(v___x_4047_);
return v___x_4048_;
}
}
static lean_object* _init_l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__9(void){
_start:
{
lean_object* v___x_4050_; lean_object* v___x_4051_; 
v___x_4050_ = ((lean_object*)(l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__8));
v___x_4051_ = l_Lean_stringToMessageData(v___x_4050_);
return v___x_4051_;
}
}
static lean_object* _init_l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__11(void){
_start:
{
lean_object* v___x_4053_; lean_object* v___x_4054_; 
v___x_4053_ = ((lean_object*)(l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__10));
v___x_4054_ = l_Lean_stringToMessageData(v___x_4053_);
return v___x_4054_;
}
}
static lean_object* _init_l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__13(void){
_start:
{
lean_object* v___x_4056_; lean_object* v___x_4057_; 
v___x_4056_ = ((lean_object*)(l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__12));
v___x_4057_ = l_Lean_stringToMessageData(v___x_4056_);
return v___x_4057_;
}
}
static lean_object* _init_l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__15(void){
_start:
{
lean_object* v___x_4059_; lean_object* v___x_4060_; 
v___x_4059_ = ((lean_object*)(l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__14));
v___x_4060_ = l_Lean_stringToMessageData(v___x_4059_);
return v___x_4060_;
}
}
static lean_object* _init_l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__17(void){
_start:
{
lean_object* v___x_4062_; lean_object* v___x_4063_; 
v___x_4062_ = ((lean_object*)(l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__16));
v___x_4063_ = l_Lean_stringToMessageData(v___x_4062_);
return v___x_4063_;
}
}
static lean_object* _init_l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__19(void){
_start:
{
lean_object* v___x_4065_; lean_object* v___x_4066_; 
v___x_4065_ = ((lean_object*)(l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__18));
v___x_4066_ = l_Lean_stringToMessageData(v___x_4065_);
return v___x_4066_;
}
}
LEAN_EXPORT lean_object* l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg(lean_object* v_msg_4067_, lean_object* v_declHint_4068_, lean_object* v___y_4069_){
_start:
{
lean_object* v___x_4071_; lean_object* v_env_4072_; uint8_t v___x_4073_; 
v___x_4071_ = lean_st_ref_get(v___y_4069_);
v_env_4072_ = lean_ctor_get(v___x_4071_, 0);
lean_inc_ref(v_env_4072_);
lean_dec(v___x_4071_);
v___x_4073_ = l_Lean_Name_isAnonymous(v_declHint_4068_);
if (v___x_4073_ == 0)
{
uint8_t v_isExporting_4074_; 
v_isExporting_4074_ = lean_ctor_get_uint8(v_env_4072_, sizeof(void*)*8);
if (v_isExporting_4074_ == 0)
{
lean_object* v___x_4075_; 
lean_dec_ref(v_env_4072_);
lean_dec(v_declHint_4068_);
v___x_4075_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_4075_, 0, v_msg_4067_);
return v___x_4075_;
}
else
{
lean_object* v___x_4076_; uint8_t v___x_4077_; 
lean_inc_ref(v_env_4072_);
v___x_4076_ = l_Lean_Environment_setExporting(v_env_4072_, v___x_4073_);
lean_inc(v_declHint_4068_);
lean_inc_ref(v___x_4076_);
v___x_4077_ = l_Lean_Environment_contains(v___x_4076_, v_declHint_4068_, v_isExporting_4074_);
if (v___x_4077_ == 0)
{
lean_object* v___x_4078_; 
lean_dec_ref(v___x_4076_);
lean_dec_ref(v_env_4072_);
lean_dec(v_declHint_4068_);
v___x_4078_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_4078_, 0, v_msg_4067_);
return v___x_4078_;
}
else
{
lean_object* v___x_4079_; lean_object* v___x_4080_; lean_object* v___x_4081_; lean_object* v___x_4082_; lean_object* v___x_4083_; lean_object* v_c_4084_; lean_object* v___x_4085_; 
v___x_4079_ = lean_obj_once(&l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__2, &l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__2_once, _init_l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__2);
v___x_4080_ = lean_obj_once(&l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__5, &l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__5_once, _init_l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__5);
v___x_4081_ = l_Lean_Options_empty;
v___x_4082_ = lean_alloc_ctor(0, 4, 0);
lean_ctor_set(v___x_4082_, 0, v___x_4076_);
lean_ctor_set(v___x_4082_, 1, v___x_4079_);
lean_ctor_set(v___x_4082_, 2, v___x_4080_);
lean_ctor_set(v___x_4082_, 3, v___x_4081_);
lean_inc(v_declHint_4068_);
v___x_4083_ = l_Lean_MessageData_ofConstName(v_declHint_4068_, v___x_4073_);
v_c_4084_ = lean_alloc_ctor(3, 2, 0);
lean_ctor_set(v_c_4084_, 0, v___x_4082_);
lean_ctor_set(v_c_4084_, 1, v___x_4083_);
v___x_4085_ = l_Lean_Environment_getModuleIdxFor_x3f(v_env_4072_, v_declHint_4068_);
if (lean_obj_tag(v___x_4085_) == 0)
{
lean_object* v___x_4086_; lean_object* v___x_4087_; lean_object* v___x_4088_; lean_object* v___x_4089_; lean_object* v___x_4090_; lean_object* v___x_4091_; lean_object* v___x_4092_; 
lean_dec_ref(v_env_4072_);
lean_dec(v_declHint_4068_);
v___x_4086_ = lean_obj_once(&l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__7, &l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__7_once, _init_l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__7);
v___x_4087_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_4087_, 0, v___x_4086_);
lean_ctor_set(v___x_4087_, 1, v_c_4084_);
v___x_4088_ = lean_obj_once(&l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__9, &l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__9_once, _init_l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__9);
v___x_4089_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_4089_, 0, v___x_4087_);
lean_ctor_set(v___x_4089_, 1, v___x_4088_);
v___x_4090_ = l_Lean_MessageData_note(v___x_4089_);
v___x_4091_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_4091_, 0, v_msg_4067_);
lean_ctor_set(v___x_4091_, 1, v___x_4090_);
v___x_4092_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_4092_, 0, v___x_4091_);
return v___x_4092_;
}
else
{
lean_object* v_val_4093_; lean_object* v___x_4095_; uint8_t v_isShared_4096_; uint8_t v_isSharedCheck_4128_; 
v_val_4093_ = lean_ctor_get(v___x_4085_, 0);
v_isSharedCheck_4128_ = !lean_is_exclusive(v___x_4085_);
if (v_isSharedCheck_4128_ == 0)
{
v___x_4095_ = v___x_4085_;
v_isShared_4096_ = v_isSharedCheck_4128_;
goto v_resetjp_4094_;
}
else
{
lean_inc(v_val_4093_);
lean_dec(v___x_4085_);
v___x_4095_ = lean_box(0);
v_isShared_4096_ = v_isSharedCheck_4128_;
goto v_resetjp_4094_;
}
v_resetjp_4094_:
{
lean_object* v___x_4097_; lean_object* v___x_4098_; lean_object* v___x_4099_; lean_object* v_mod_4100_; uint8_t v___x_4101_; 
v___x_4097_ = lean_box(0);
v___x_4098_ = l_Lean_Environment_header(v_env_4072_);
lean_dec_ref(v_env_4072_);
v___x_4099_ = l_Lean_EnvironmentHeader_moduleNames(v___x_4098_);
v_mod_4100_ = lean_array_get(v___x_4097_, v___x_4099_, v_val_4093_);
lean_dec(v_val_4093_);
lean_dec_ref(v___x_4099_);
v___x_4101_ = l_Lean_isPrivateName(v_declHint_4068_);
lean_dec(v_declHint_4068_);
if (v___x_4101_ == 0)
{
lean_object* v___x_4102_; lean_object* v___x_4103_; lean_object* v___x_4104_; lean_object* v___x_4105_; lean_object* v___x_4106_; lean_object* v___x_4107_; lean_object* v___x_4108_; lean_object* v___x_4109_; lean_object* v___x_4110_; lean_object* v___x_4111_; lean_object* v___x_4113_; 
v___x_4102_ = lean_obj_once(&l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__11, &l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__11_once, _init_l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__11);
v___x_4103_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_4103_, 0, v___x_4102_);
lean_ctor_set(v___x_4103_, 1, v_c_4084_);
v___x_4104_ = lean_obj_once(&l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__13, &l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__13_once, _init_l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__13);
v___x_4105_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_4105_, 0, v___x_4103_);
lean_ctor_set(v___x_4105_, 1, v___x_4104_);
v___x_4106_ = l_Lean_MessageData_ofName(v_mod_4100_);
v___x_4107_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_4107_, 0, v___x_4105_);
lean_ctor_set(v___x_4107_, 1, v___x_4106_);
v___x_4108_ = lean_obj_once(&l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__15, &l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__15_once, _init_l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__15);
v___x_4109_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_4109_, 0, v___x_4107_);
lean_ctor_set(v___x_4109_, 1, v___x_4108_);
v___x_4110_ = l_Lean_MessageData_note(v___x_4109_);
v___x_4111_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_4111_, 0, v_msg_4067_);
lean_ctor_set(v___x_4111_, 1, v___x_4110_);
if (v_isShared_4096_ == 0)
{
lean_ctor_set_tag(v___x_4095_, 0);
lean_ctor_set(v___x_4095_, 0, v___x_4111_);
v___x_4113_ = v___x_4095_;
goto v_reusejp_4112_;
}
else
{
lean_object* v_reuseFailAlloc_4114_; 
v_reuseFailAlloc_4114_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_4114_, 0, v___x_4111_);
v___x_4113_ = v_reuseFailAlloc_4114_;
goto v_reusejp_4112_;
}
v_reusejp_4112_:
{
return v___x_4113_;
}
}
else
{
lean_object* v___x_4115_; lean_object* v___x_4116_; lean_object* v___x_4117_; lean_object* v___x_4118_; lean_object* v___x_4119_; lean_object* v___x_4120_; lean_object* v___x_4121_; lean_object* v___x_4122_; lean_object* v___x_4123_; lean_object* v___x_4124_; lean_object* v___x_4126_; 
v___x_4115_ = lean_obj_once(&l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__7, &l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__7_once, _init_l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__7);
v___x_4116_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_4116_, 0, v___x_4115_);
lean_ctor_set(v___x_4116_, 1, v_c_4084_);
v___x_4117_ = lean_obj_once(&l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__17, &l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__17_once, _init_l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__17);
v___x_4118_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_4118_, 0, v___x_4116_);
lean_ctor_set(v___x_4118_, 1, v___x_4117_);
v___x_4119_ = l_Lean_MessageData_ofName(v_mod_4100_);
v___x_4120_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_4120_, 0, v___x_4118_);
lean_ctor_set(v___x_4120_, 1, v___x_4119_);
v___x_4121_ = lean_obj_once(&l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__19, &l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__19_once, _init_l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__19);
v___x_4122_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_4122_, 0, v___x_4120_);
lean_ctor_set(v___x_4122_, 1, v___x_4121_);
v___x_4123_ = l_Lean_MessageData_note(v___x_4122_);
v___x_4124_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_4124_, 0, v_msg_4067_);
lean_ctor_set(v___x_4124_, 1, v___x_4123_);
if (v_isShared_4096_ == 0)
{
lean_ctor_set_tag(v___x_4095_, 0);
lean_ctor_set(v___x_4095_, 0, v___x_4124_);
v___x_4126_ = v___x_4095_;
goto v_reusejp_4125_;
}
else
{
lean_object* v_reuseFailAlloc_4127_; 
v_reuseFailAlloc_4127_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_4127_, 0, v___x_4124_);
v___x_4126_ = v_reuseFailAlloc_4127_;
goto v_reusejp_4125_;
}
v_reusejp_4125_:
{
return v___x_4126_;
}
}
}
}
}
}
}
else
{
lean_object* v___x_4129_; 
lean_dec_ref(v_env_4072_);
lean_dec(v_declHint_4068_);
v___x_4129_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_4129_, 0, v_msg_4067_);
return v___x_4129_;
}
}
}
LEAN_EXPORT lean_object* l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___boxed(lean_object* v_msg_4130_, lean_object* v_declHint_4131_, lean_object* v___y_4132_, lean_object* v___y_4133_){
_start:
{
lean_object* v_res_4134_; 
v_res_4134_ = l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg(v_msg_4130_, v_declHint_4131_, v___y_4132_);
lean_dec(v___y_4132_);
return v_res_4134_;
}
}
LEAN_EXPORT lean_object* l_Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26(lean_object* v_msg_4135_, lean_object* v_declHint_4136_, lean_object* v___y_4137_, lean_object* v___y_4138_, lean_object* v___y_4139_, lean_object* v___y_4140_, lean_object* v___y_4141_, lean_object* v___y_4142_){
_start:
{
lean_object* v___x_4144_; lean_object* v_a_4145_; lean_object* v___x_4147_; uint8_t v_isShared_4148_; uint8_t v_isSharedCheck_4154_; 
v___x_4144_ = l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg(v_msg_4135_, v_declHint_4136_, v___y_4142_);
v_a_4145_ = lean_ctor_get(v___x_4144_, 0);
v_isSharedCheck_4154_ = !lean_is_exclusive(v___x_4144_);
if (v_isSharedCheck_4154_ == 0)
{
v___x_4147_ = v___x_4144_;
v_isShared_4148_ = v_isSharedCheck_4154_;
goto v_resetjp_4146_;
}
else
{
lean_inc(v_a_4145_);
lean_dec(v___x_4144_);
v___x_4147_ = lean_box(0);
v_isShared_4148_ = v_isSharedCheck_4154_;
goto v_resetjp_4146_;
}
v_resetjp_4146_:
{
lean_object* v___x_4149_; lean_object* v___x_4150_; lean_object* v___x_4152_; 
v___x_4149_ = l_Lean_unknownIdentifierMessageTag;
v___x_4150_ = lean_alloc_ctor(8, 2, 0);
lean_ctor_set(v___x_4150_, 0, v___x_4149_);
lean_ctor_set(v___x_4150_, 1, v_a_4145_);
if (v_isShared_4148_ == 0)
{
lean_ctor_set(v___x_4147_, 0, v___x_4150_);
v___x_4152_ = v___x_4147_;
goto v_reusejp_4151_;
}
else
{
lean_object* v_reuseFailAlloc_4153_; 
v_reuseFailAlloc_4153_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_4153_, 0, v___x_4150_);
v___x_4152_ = v_reuseFailAlloc_4153_;
goto v_reusejp_4151_;
}
v_reusejp_4151_:
{
return v___x_4152_;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26___boxed(lean_object* v_msg_4155_, lean_object* v_declHint_4156_, lean_object* v___y_4157_, lean_object* v___y_4158_, lean_object* v___y_4159_, lean_object* v___y_4160_, lean_object* v___y_4161_, lean_object* v___y_4162_, lean_object* v___y_4163_){
_start:
{
lean_object* v_res_4164_; 
v_res_4164_ = l_Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26(v_msg_4155_, v_declHint_4156_, v___y_4157_, v___y_4158_, v___y_4159_, v___y_4160_, v___y_4161_, v___y_4162_);
lean_dec(v___y_4162_);
lean_dec_ref(v___y_4161_);
lean_dec(v___y_4160_);
lean_dec_ref(v___y_4159_);
lean_dec(v___y_4158_);
lean_dec_ref(v___y_4157_);
return v_res_4164_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20___redArg(lean_object* v_ref_4165_, lean_object* v_msg_4166_, lean_object* v_declHint_4167_, lean_object* v___y_4168_, lean_object* v___y_4169_, lean_object* v___y_4170_, lean_object* v___y_4171_, lean_object* v___y_4172_, lean_object* v___y_4173_){
_start:
{
lean_object* v___x_4175_; lean_object* v_a_4176_; lean_object* v___x_4177_; 
v___x_4175_ = l_Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26(v_msg_4166_, v_declHint_4167_, v___y_4168_, v___y_4169_, v___y_4170_, v___y_4171_, v___y_4172_, v___y_4173_);
v_a_4176_ = lean_ctor_get(v___x_4175_, 0);
lean_inc(v_a_4176_);
lean_dec_ref(v___x_4175_);
v___x_4177_ = l_Lean_throwErrorAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__13___redArg(v_ref_4165_, v_a_4176_, v___y_4168_, v___y_4169_, v___y_4170_, v___y_4171_, v___y_4172_, v___y_4173_);
return v___x_4177_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20___redArg___boxed(lean_object* v_ref_4178_, lean_object* v_msg_4179_, lean_object* v_declHint_4180_, lean_object* v___y_4181_, lean_object* v___y_4182_, lean_object* v___y_4183_, lean_object* v___y_4184_, lean_object* v___y_4185_, lean_object* v___y_4186_, lean_object* v___y_4187_){
_start:
{
lean_object* v_res_4188_; 
v_res_4188_ = l_Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20___redArg(v_ref_4178_, v_msg_4179_, v_declHint_4180_, v___y_4181_, v___y_4182_, v___y_4183_, v___y_4184_, v___y_4185_, v___y_4186_);
lean_dec(v___y_4186_);
lean_dec(v___y_4184_);
lean_dec_ref(v___y_4183_);
lean_dec(v___y_4182_);
lean_dec(v_ref_4178_);
return v_res_4188_;
}
}
static lean_object* _init_l_Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10___redArg___closed__1(void){
_start:
{
lean_object* v___x_4190_; lean_object* v___x_4191_; 
v___x_4190_ = ((lean_object*)(l_Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10___redArg___closed__0));
v___x_4191_ = l_Lean_stringToMessageData(v___x_4190_);
return v___x_4191_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10___redArg(lean_object* v_ref_4192_, lean_object* v_constName_4193_, lean_object* v___y_4194_, lean_object* v___y_4195_, lean_object* v___y_4196_, lean_object* v___y_4197_, lean_object* v___y_4198_, lean_object* v___y_4199_){
_start:
{
lean_object* v___x_4201_; uint8_t v___x_4202_; lean_object* v___x_4203_; lean_object* v___x_4204_; lean_object* v___x_4205_; lean_object* v___x_4206_; lean_object* v___x_4207_; 
v___x_4201_ = lean_obj_once(&l_Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10___redArg___closed__1, &l_Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10___redArg___closed__1_once, _init_l_Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10___redArg___closed__1);
v___x_4202_ = 0;
lean_inc(v_constName_4193_);
v___x_4203_ = l_Lean_MessageData_ofConstName(v_constName_4193_, v___x_4202_);
v___x_4204_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_4204_, 0, v___x_4201_);
lean_ctor_set(v___x_4204_, 1, v___x_4203_);
v___x_4205_ = lean_obj_once(&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__5, &l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__5_once, _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__5);
v___x_4206_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_4206_, 0, v___x_4204_);
lean_ctor_set(v___x_4206_, 1, v___x_4205_);
v___x_4207_ = l_Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20___redArg(v_ref_4192_, v___x_4206_, v_constName_4193_, v___y_4194_, v___y_4195_, v___y_4196_, v___y_4197_, v___y_4198_, v___y_4199_);
return v___x_4207_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10___redArg___boxed(lean_object* v_ref_4208_, lean_object* v_constName_4209_, lean_object* v___y_4210_, lean_object* v___y_4211_, lean_object* v___y_4212_, lean_object* v___y_4213_, lean_object* v___y_4214_, lean_object* v___y_4215_, lean_object* v___y_4216_){
_start:
{
lean_object* v_res_4217_; 
v_res_4217_ = l_Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10___redArg(v_ref_4208_, v_constName_4209_, v___y_4210_, v___y_4211_, v___y_4212_, v___y_4213_, v___y_4214_, v___y_4215_);
lean_dec(v___y_4215_);
lean_dec(v___y_4213_);
lean_dec_ref(v___y_4212_);
lean_dec(v___y_4211_);
lean_dec(v_ref_4208_);
return v_res_4217_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6___redArg(lean_object* v_constName_4218_, lean_object* v___y_4219_, lean_object* v___y_4220_, lean_object* v___y_4221_, lean_object* v___y_4222_, lean_object* v___y_4223_, lean_object* v___y_4224_){
_start:
{
lean_object* v_ref_4226_; lean_object* v___x_4227_; 
v_ref_4226_ = lean_ctor_get(v___y_4223_, 5);
lean_inc(v_ref_4226_);
v___x_4227_ = l_Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10___redArg(v_ref_4226_, v_constName_4218_, v___y_4219_, v___y_4220_, v___y_4221_, v___y_4222_, v___y_4223_, v___y_4224_);
lean_dec(v_ref_4226_);
return v___x_4227_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6___redArg___boxed(lean_object* v_constName_4228_, lean_object* v___y_4229_, lean_object* v___y_4230_, lean_object* v___y_4231_, lean_object* v___y_4232_, lean_object* v___y_4233_, lean_object* v___y_4234_, lean_object* v___y_4235_){
_start:
{
lean_object* v_res_4236_; 
v_res_4236_ = l_Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6___redArg(v_constName_4228_, v___y_4229_, v___y_4230_, v___y_4231_, v___y_4232_, v___y_4233_, v___y_4234_);
lean_dec(v___y_4234_);
lean_dec(v___y_4232_);
lean_dec_ref(v___y_4231_);
lean_dec(v___y_4230_);
return v_res_4236_;
}
}
LEAN_EXPORT lean_object* l_Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6(lean_object* v_constName_4237_, lean_object* v___y_4238_, lean_object* v___y_4239_, lean_object* v___y_4240_, lean_object* v___y_4241_, lean_object* v___y_4242_, lean_object* v___y_4243_){
_start:
{
lean_object* v___x_4245_; lean_object* v_env_4246_; uint8_t v___x_4247_; lean_object* v___x_4248_; 
v___x_4245_ = lean_st_ref_get(v___y_4243_);
v_env_4246_ = lean_ctor_get(v___x_4245_, 0);
lean_inc_ref(v_env_4246_);
lean_dec(v___x_4245_);
v___x_4247_ = 0;
lean_inc(v_constName_4237_);
v___x_4248_ = l_Lean_Environment_find_x3f(v_env_4246_, v_constName_4237_, v___x_4247_);
if (lean_obj_tag(v___x_4248_) == 0)
{
lean_object* v___x_4249_; 
v___x_4249_ = l_Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6___redArg(v_constName_4237_, v___y_4238_, v___y_4239_, v___y_4240_, v___y_4241_, v___y_4242_, v___y_4243_);
return v___x_4249_;
}
else
{
lean_object* v_val_4250_; lean_object* v___x_4252_; uint8_t v_isShared_4253_; uint8_t v_isSharedCheck_4257_; 
lean_dec_ref(v___y_4242_);
lean_dec_ref(v___y_4238_);
lean_dec(v_constName_4237_);
v_val_4250_ = lean_ctor_get(v___x_4248_, 0);
v_isSharedCheck_4257_ = !lean_is_exclusive(v___x_4248_);
if (v_isSharedCheck_4257_ == 0)
{
v___x_4252_ = v___x_4248_;
v_isShared_4253_ = v_isSharedCheck_4257_;
goto v_resetjp_4251_;
}
else
{
lean_inc(v_val_4250_);
lean_dec(v___x_4248_);
v___x_4252_ = lean_box(0);
v_isShared_4253_ = v_isSharedCheck_4257_;
goto v_resetjp_4251_;
}
v_resetjp_4251_:
{
lean_object* v___x_4255_; 
if (v_isShared_4253_ == 0)
{
lean_ctor_set_tag(v___x_4252_, 0);
v___x_4255_ = v___x_4252_;
goto v_reusejp_4254_;
}
else
{
lean_object* v_reuseFailAlloc_4256_; 
v_reuseFailAlloc_4256_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_4256_, 0, v_val_4250_);
v___x_4255_ = v_reuseFailAlloc_4256_;
goto v_reusejp_4254_;
}
v_reusejp_4254_:
{
return v___x_4255_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6___boxed(lean_object* v_constName_4258_, lean_object* v___y_4259_, lean_object* v___y_4260_, lean_object* v___y_4261_, lean_object* v___y_4262_, lean_object* v___y_4263_, lean_object* v___y_4264_, lean_object* v___y_4265_){
_start:
{
lean_object* v_res_4266_; 
v_res_4266_ = l_Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6(v_constName_4258_, v___y_4259_, v___y_4260_, v___y_4261_, v___y_4262_, v___y_4263_, v___y_4264_);
lean_dec(v___y_4264_);
lean_dec(v___y_4262_);
lean_dec_ref(v___y_4261_);
lean_dec(v___y_4260_);
return v_res_4266_;
}
}
LEAN_EXPORT lean_object* l_Lean_logInfoAt___at___00Lean_Elab_Term_processDefDeriving_spec__12___redArg(lean_object* v_ref_4267_, lean_object* v_msgData_4268_, lean_object* v___y_4269_, lean_object* v___y_4270_, lean_object* v___y_4271_, lean_object* v___y_4272_){
_start:
{
uint8_t v___x_4274_; uint8_t v___x_4275_; lean_object* v___x_4276_; 
v___x_4274_ = 0;
v___x_4275_ = 0;
v___x_4276_ = l_Lean_logAt___at___00Lean_logErrorAt___at___00Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4_spec__4_spec__7___redArg(v_ref_4267_, v_msgData_4268_, v___x_4274_, v___x_4275_, v___y_4269_, v___y_4270_, v___y_4271_, v___y_4272_);
return v___x_4276_;
}
}
LEAN_EXPORT lean_object* l_Lean_logInfoAt___at___00Lean_Elab_Term_processDefDeriving_spec__12___redArg___boxed(lean_object* v_ref_4277_, lean_object* v_msgData_4278_, lean_object* v___y_4279_, lean_object* v___y_4280_, lean_object* v___y_4281_, lean_object* v___y_4282_, lean_object* v___y_4283_){
_start:
{
lean_object* v_res_4284_; 
v_res_4284_ = l_Lean_logInfoAt___at___00Lean_Elab_Term_processDefDeriving_spec__12___redArg(v_ref_4277_, v_msgData_4278_, v___y_4279_, v___y_4280_, v___y_4281_, v___y_4282_);
lean_dec(v___y_4282_);
lean_dec(v___y_4280_);
lean_dec_ref(v___y_4279_);
lean_dec(v_ref_4277_);
return v_res_4284_;
}
}
LEAN_EXPORT lean_object* l_WellFounded_opaqueFix_u2083___at___00String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11_spec__21___redArg(lean_object* v_s_4285_, lean_object* v_replacement_4286_, lean_object* v_a_4287_, lean_object* v_b_4288_){
_start:
{
lean_object* v_it_4290_; lean_object* v_startPos_4291_; lean_object* v_endPos_4292_; lean_object* v_it_4301_; 
switch(lean_obj_tag(v_a_4287_))
{
case 0:
{
lean_object* v_pos_4307_; lean_object* v___x_4309_; uint8_t v_isShared_4310_; uint8_t v_isSharedCheck_4319_; 
v_pos_4307_ = lean_ctor_get(v_a_4287_, 0);
v_isSharedCheck_4319_ = !lean_is_exclusive(v_a_4287_);
if (v_isSharedCheck_4319_ == 0)
{
v___x_4309_ = v_a_4287_;
v_isShared_4310_ = v_isSharedCheck_4319_;
goto v_resetjp_4308_;
}
else
{
lean_inc(v_pos_4307_);
lean_dec(v_a_4287_);
v___x_4309_ = lean_box(0);
v_isShared_4310_ = v_isSharedCheck_4319_;
goto v_resetjp_4308_;
}
v_resetjp_4308_:
{
lean_object* v_startInclusive_4311_; lean_object* v_endExclusive_4312_; lean_object* v___x_4313_; uint8_t v___x_4314_; 
v_startInclusive_4311_ = lean_ctor_get(v_s_4285_, 1);
v_endExclusive_4312_ = lean_ctor_get(v_s_4285_, 2);
v___x_4313_ = lean_nat_sub(v_endExclusive_4312_, v_startInclusive_4311_);
v___x_4314_ = lean_nat_dec_eq(v_pos_4307_, v___x_4313_);
lean_dec(v___x_4313_);
if (v___x_4314_ == 0)
{
lean_object* v___x_4316_; 
if (v_isShared_4310_ == 0)
{
lean_ctor_set_tag(v___x_4309_, 1);
v___x_4316_ = v___x_4309_;
goto v_reusejp_4315_;
}
else
{
lean_object* v_reuseFailAlloc_4317_; 
v_reuseFailAlloc_4317_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_4317_, 0, v_pos_4307_);
v___x_4316_ = v_reuseFailAlloc_4317_;
goto v_reusejp_4315_;
}
v_reusejp_4315_:
{
v_it_4301_ = v___x_4316_;
goto v___jp_4300_;
}
}
else
{
lean_object* v___x_4318_; 
lean_del_object(v___x_4309_);
lean_dec(v_pos_4307_);
v___x_4318_ = lean_box(3);
v_it_4301_ = v___x_4318_;
goto v___jp_4300_;
}
}
}
case 1:
{
lean_object* v_pos_4320_; lean_object* v___x_4322_; uint8_t v_isShared_4323_; uint8_t v_isSharedCheck_4332_; 
v_pos_4320_ = lean_ctor_get(v_a_4287_, 0);
v_isSharedCheck_4332_ = !lean_is_exclusive(v_a_4287_);
if (v_isSharedCheck_4332_ == 0)
{
v___x_4322_ = v_a_4287_;
v_isShared_4323_ = v_isSharedCheck_4332_;
goto v_resetjp_4321_;
}
else
{
lean_inc(v_pos_4320_);
lean_dec(v_a_4287_);
v___x_4322_ = lean_box(0);
v_isShared_4323_ = v_isSharedCheck_4332_;
goto v_resetjp_4321_;
}
v_resetjp_4321_:
{
lean_object* v_str_4324_; lean_object* v_startInclusive_4325_; lean_object* v___x_4326_; lean_object* v___x_4327_; lean_object* v___x_4328_; lean_object* v___x_4330_; 
v_str_4324_ = lean_ctor_get(v_s_4285_, 0);
v_startInclusive_4325_ = lean_ctor_get(v_s_4285_, 1);
v___x_4326_ = lean_nat_add(v_startInclusive_4325_, v_pos_4320_);
v___x_4327_ = lean_string_utf8_next_fast(v_str_4324_, v___x_4326_);
lean_dec(v___x_4326_);
v___x_4328_ = lean_nat_sub(v___x_4327_, v_startInclusive_4325_);
lean_inc(v___x_4328_);
if (v_isShared_4323_ == 0)
{
lean_ctor_set_tag(v___x_4322_, 0);
lean_ctor_set(v___x_4322_, 0, v___x_4328_);
v___x_4330_ = v___x_4322_;
goto v_reusejp_4329_;
}
else
{
lean_object* v_reuseFailAlloc_4331_; 
v_reuseFailAlloc_4331_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_4331_, 0, v___x_4328_);
v___x_4330_ = v_reuseFailAlloc_4331_;
goto v_reusejp_4329_;
}
v_reusejp_4329_:
{
v_it_4290_ = v___x_4330_;
v_startPos_4291_ = v_pos_4320_;
v_endPos_4292_ = v___x_4328_;
goto v___jp_4289_;
}
}
}
case 2:
{
lean_object* v_needle_4333_; lean_object* v_table_4334_; lean_object* v_stackPos_4335_; lean_object* v_needlePos_4336_; lean_object* v___x_4338_; uint8_t v_isShared_4339_; uint8_t v_isSharedCheck_4395_; 
v_needle_4333_ = lean_ctor_get(v_a_4287_, 0);
v_table_4334_ = lean_ctor_get(v_a_4287_, 1);
v_stackPos_4335_ = lean_ctor_get(v_a_4287_, 2);
v_needlePos_4336_ = lean_ctor_get(v_a_4287_, 3);
v_isSharedCheck_4395_ = !lean_is_exclusive(v_a_4287_);
if (v_isSharedCheck_4395_ == 0)
{
v___x_4338_ = v_a_4287_;
v_isShared_4339_ = v_isSharedCheck_4395_;
goto v_resetjp_4337_;
}
else
{
lean_inc(v_needlePos_4336_);
lean_inc(v_stackPos_4335_);
lean_inc(v_table_4334_);
lean_inc(v_needle_4333_);
lean_dec(v_a_4287_);
v___x_4338_ = lean_box(0);
v_isShared_4339_ = v_isSharedCheck_4395_;
goto v_resetjp_4337_;
}
v_resetjp_4337_:
{
lean_object* v_str_4340_; lean_object* v_startInclusive_4341_; lean_object* v_endExclusive_4342_; lean_object* v_str_4343_; lean_object* v_startInclusive_4344_; lean_object* v_endExclusive_4345_; lean_object* v_basePos_4346_; lean_object* v___x_4347_; lean_object* v___x_4348_; lean_object* v___x_4349_; uint8_t v___x_4350_; 
v_str_4340_ = lean_ctor_get(v_needle_4333_, 0);
v_startInclusive_4341_ = lean_ctor_get(v_needle_4333_, 1);
v_endExclusive_4342_ = lean_ctor_get(v_needle_4333_, 2);
v_str_4343_ = lean_ctor_get(v_s_4285_, 0);
v_startInclusive_4344_ = lean_ctor_get(v_s_4285_, 1);
v_endExclusive_4345_ = lean_ctor_get(v_s_4285_, 2);
v_basePos_4346_ = lean_nat_sub(v_stackPos_4335_, v_needlePos_4336_);
v___x_4347_ = lean_nat_sub(v_endExclusive_4342_, v_startInclusive_4341_);
v___x_4348_ = lean_nat_add(v_basePos_4346_, v___x_4347_);
v___x_4349_ = lean_nat_sub(v_endExclusive_4345_, v_startInclusive_4344_);
v___x_4350_ = lean_nat_dec_le(v___x_4348_, v___x_4349_);
lean_dec(v___x_4348_);
if (v___x_4350_ == 0)
{
uint8_t v___x_4351_; 
lean_dec(v___x_4347_);
lean_del_object(v___x_4338_);
lean_dec(v_needlePos_4336_);
lean_dec(v_stackPos_4335_);
lean_dec_ref(v_table_4334_);
lean_dec_ref(v_needle_4333_);
v___x_4351_ = lean_nat_dec_lt(v_basePos_4346_, v___x_4349_);
if (v___x_4351_ == 0)
{
lean_dec(v___x_4349_);
lean_dec(v_basePos_4346_);
lean_dec_ref(v_s_4285_);
return v_b_4288_;
}
else
{
lean_object* v___x_4352_; lean_object* v___x_4353_; 
v___x_4352_ = l_String_Slice_pos_x21(v_s_4285_, v_basePos_4346_);
lean_dec(v_basePos_4346_);
v___x_4353_ = lean_box(3);
v_it_4290_ = v___x_4353_;
v_startPos_4291_ = v___x_4352_;
v_endPos_4292_ = v___x_4349_;
goto v___jp_4289_;
}
}
else
{
lean_object* v___x_4354_; uint8_t v_stackByte_4355_; lean_object* v___x_4356_; uint8_t v_patByte_4357_; uint8_t v___x_4358_; 
lean_dec(v___x_4349_);
v___x_4354_ = lean_nat_add(v_startInclusive_4344_, v_stackPos_4335_);
v_stackByte_4355_ = lean_string_get_byte_fast(v_str_4343_, v___x_4354_);
v___x_4356_ = lean_nat_add(v_startInclusive_4341_, v_needlePos_4336_);
v_patByte_4357_ = lean_string_get_byte_fast(v_str_4340_, v___x_4356_);
v___x_4358_ = lean_uint8_dec_eq(v_stackByte_4355_, v_patByte_4357_);
if (v___x_4358_ == 0)
{
lean_object* v___x_4359_; uint8_t v___x_4360_; 
lean_dec(v___x_4347_);
v___x_4359_ = lean_unsigned_to_nat(0u);
v___x_4360_ = lean_nat_dec_eq(v_needlePos_4336_, v___x_4359_);
if (v___x_4360_ == 0)
{
lean_object* v___x_4361_; lean_object* v___x_4362_; lean_object* v_newNeedlePos_4363_; uint8_t v___x_4364_; 
v___x_4361_ = lean_unsigned_to_nat(1u);
v___x_4362_ = lean_nat_sub(v_needlePos_4336_, v___x_4361_);
lean_dec(v_needlePos_4336_);
v_newNeedlePos_4363_ = lean_array_fget_borrowed(v_table_4334_, v___x_4362_);
lean_dec(v___x_4362_);
v___x_4364_ = lean_nat_dec_eq(v_newNeedlePos_4363_, v___x_4359_);
if (v___x_4364_ == 0)
{
lean_object* v_oldBasePos_4365_; lean_object* v___x_4366_; lean_object* v_newBasePos_4367_; lean_object* v___x_4369_; 
lean_inc(v_newNeedlePos_4363_);
v_oldBasePos_4365_ = l_String_Slice_pos_x21(v_s_4285_, v_basePos_4346_);
lean_dec(v_basePos_4346_);
v___x_4366_ = lean_nat_sub(v_stackPos_4335_, v_newNeedlePos_4363_);
v_newBasePos_4367_ = l_String_Slice_pos_x21(v_s_4285_, v___x_4366_);
lean_dec(v___x_4366_);
if (v_isShared_4339_ == 0)
{
lean_ctor_set(v___x_4338_, 3, v_newNeedlePos_4363_);
v___x_4369_ = v___x_4338_;
goto v_reusejp_4368_;
}
else
{
lean_object* v_reuseFailAlloc_4370_; 
v_reuseFailAlloc_4370_ = lean_alloc_ctor(2, 4, 0);
lean_ctor_set(v_reuseFailAlloc_4370_, 0, v_needle_4333_);
lean_ctor_set(v_reuseFailAlloc_4370_, 1, v_table_4334_);
lean_ctor_set(v_reuseFailAlloc_4370_, 2, v_stackPos_4335_);
lean_ctor_set(v_reuseFailAlloc_4370_, 3, v_newNeedlePos_4363_);
v___x_4369_ = v_reuseFailAlloc_4370_;
goto v_reusejp_4368_;
}
v_reusejp_4368_:
{
v_it_4290_ = v___x_4369_;
v_startPos_4291_ = v_oldBasePos_4365_;
v_endPos_4292_ = v_newBasePos_4367_;
goto v___jp_4289_;
}
}
else
{
lean_object* v_basePos_4371_; lean_object* v_nextStackPos_4372_; lean_object* v___x_4374_; 
v_basePos_4371_ = l_String_Slice_pos_x21(v_s_4285_, v_basePos_4346_);
lean_dec(v_basePos_4346_);
v_nextStackPos_4372_ = l_String_Slice_posGE___redArg(v_s_4285_, v_stackPos_4335_);
lean_inc(v_nextStackPos_4372_);
if (v_isShared_4339_ == 0)
{
lean_ctor_set(v___x_4338_, 3, v___x_4359_);
lean_ctor_set(v___x_4338_, 2, v_nextStackPos_4372_);
v___x_4374_ = v___x_4338_;
goto v_reusejp_4373_;
}
else
{
lean_object* v_reuseFailAlloc_4375_; 
v_reuseFailAlloc_4375_ = lean_alloc_ctor(2, 4, 0);
lean_ctor_set(v_reuseFailAlloc_4375_, 0, v_needle_4333_);
lean_ctor_set(v_reuseFailAlloc_4375_, 1, v_table_4334_);
lean_ctor_set(v_reuseFailAlloc_4375_, 2, v_nextStackPos_4372_);
lean_ctor_set(v_reuseFailAlloc_4375_, 3, v___x_4359_);
v___x_4374_ = v_reuseFailAlloc_4375_;
goto v_reusejp_4373_;
}
v_reusejp_4373_:
{
v_it_4290_ = v___x_4374_;
v_startPos_4291_ = v_basePos_4371_;
v_endPos_4292_ = v_nextStackPos_4372_;
goto v___jp_4289_;
}
}
}
else
{
lean_object* v_basePos_4376_; lean_object* v___x_4377_; lean_object* v___x_4378_; lean_object* v_nextStackPos_4379_; lean_object* v___x_4381_; 
lean_dec(v_basePos_4346_);
lean_dec(v_needlePos_4336_);
v_basePos_4376_ = l_String_Slice_pos_x21(v_s_4285_, v_stackPos_4335_);
v___x_4377_ = lean_unsigned_to_nat(1u);
v___x_4378_ = lean_nat_add(v_stackPos_4335_, v___x_4377_);
lean_dec(v_stackPos_4335_);
v_nextStackPos_4379_ = l_String_Slice_posGE___redArg(v_s_4285_, v___x_4378_);
lean_inc(v_nextStackPos_4379_);
if (v_isShared_4339_ == 0)
{
lean_ctor_set(v___x_4338_, 3, v___x_4359_);
lean_ctor_set(v___x_4338_, 2, v_nextStackPos_4379_);
v___x_4381_ = v___x_4338_;
goto v_reusejp_4380_;
}
else
{
lean_object* v_reuseFailAlloc_4382_; 
v_reuseFailAlloc_4382_ = lean_alloc_ctor(2, 4, 0);
lean_ctor_set(v_reuseFailAlloc_4382_, 0, v_needle_4333_);
lean_ctor_set(v_reuseFailAlloc_4382_, 1, v_table_4334_);
lean_ctor_set(v_reuseFailAlloc_4382_, 2, v_nextStackPos_4379_);
lean_ctor_set(v_reuseFailAlloc_4382_, 3, v___x_4359_);
v___x_4381_ = v_reuseFailAlloc_4382_;
goto v_reusejp_4380_;
}
v_reusejp_4380_:
{
v_it_4290_ = v___x_4381_;
v_startPos_4291_ = v_basePos_4376_;
v_endPos_4292_ = v_nextStackPos_4379_;
goto v___jp_4289_;
}
}
}
else
{
lean_object* v___x_4383_; lean_object* v_nextStackPos_4384_; lean_object* v_nextNeedlePos_4385_; uint8_t v___x_4386_; 
lean_dec(v_basePos_4346_);
v___x_4383_ = lean_unsigned_to_nat(1u);
v_nextStackPos_4384_ = lean_nat_add(v_stackPos_4335_, v___x_4383_);
lean_dec(v_stackPos_4335_);
v_nextNeedlePos_4385_ = lean_nat_add(v_needlePos_4336_, v___x_4383_);
lean_dec(v_needlePos_4336_);
v___x_4386_ = lean_nat_dec_eq(v_nextNeedlePos_4385_, v___x_4347_);
lean_dec(v___x_4347_);
if (v___x_4386_ == 0)
{
lean_object* v___x_4388_; 
if (v_isShared_4339_ == 0)
{
lean_ctor_set(v___x_4338_, 3, v_nextNeedlePos_4385_);
lean_ctor_set(v___x_4338_, 2, v_nextStackPos_4384_);
v___x_4388_ = v___x_4338_;
goto v_reusejp_4387_;
}
else
{
lean_object* v_reuseFailAlloc_4390_; 
v_reuseFailAlloc_4390_ = lean_alloc_ctor(2, 4, 0);
lean_ctor_set(v_reuseFailAlloc_4390_, 0, v_needle_4333_);
lean_ctor_set(v_reuseFailAlloc_4390_, 1, v_table_4334_);
lean_ctor_set(v_reuseFailAlloc_4390_, 2, v_nextStackPos_4384_);
lean_ctor_set(v_reuseFailAlloc_4390_, 3, v_nextNeedlePos_4385_);
v___x_4388_ = v_reuseFailAlloc_4390_;
goto v_reusejp_4387_;
}
v_reusejp_4387_:
{
v_a_4287_ = v___x_4388_;
goto _start;
}
}
else
{
lean_object* v___x_4391_; lean_object* v___x_4393_; 
lean_dec(v_nextNeedlePos_4385_);
v___x_4391_ = lean_unsigned_to_nat(0u);
if (v_isShared_4339_ == 0)
{
lean_ctor_set(v___x_4338_, 3, v___x_4391_);
lean_ctor_set(v___x_4338_, 2, v_nextStackPos_4384_);
v___x_4393_ = v___x_4338_;
goto v_reusejp_4392_;
}
else
{
lean_object* v_reuseFailAlloc_4394_; 
v_reuseFailAlloc_4394_ = lean_alloc_ctor(2, 4, 0);
lean_ctor_set(v_reuseFailAlloc_4394_, 0, v_needle_4333_);
lean_ctor_set(v_reuseFailAlloc_4394_, 1, v_table_4334_);
lean_ctor_set(v_reuseFailAlloc_4394_, 2, v_nextStackPos_4384_);
lean_ctor_set(v_reuseFailAlloc_4394_, 3, v___x_4391_);
v___x_4393_ = v_reuseFailAlloc_4394_;
goto v_reusejp_4392_;
}
v_reusejp_4392_:
{
v_it_4301_ = v___x_4393_;
goto v___jp_4300_;
}
}
}
}
}
}
default: 
{
lean_dec_ref(v_s_4285_);
return v_b_4288_;
}
}
v___jp_4289_:
{
lean_object* v___x_4293_; lean_object* v_str_4294_; lean_object* v_startInclusive_4295_; lean_object* v_endExclusive_4296_; lean_object* v___x_4297_; lean_object* v___x_4298_; 
lean_inc_ref(v_s_4285_);
v___x_4293_ = l_String_Slice_slice_x21(v_s_4285_, v_startPos_4291_, v_endPos_4292_);
lean_dec(v_endPos_4292_);
lean_dec(v_startPos_4291_);
v_str_4294_ = lean_ctor_get(v___x_4293_, 0);
lean_inc_ref(v_str_4294_);
v_startInclusive_4295_ = lean_ctor_get(v___x_4293_, 1);
lean_inc(v_startInclusive_4295_);
v_endExclusive_4296_ = lean_ctor_get(v___x_4293_, 2);
lean_inc(v_endExclusive_4296_);
lean_dec_ref(v___x_4293_);
v___x_4297_ = lean_string_utf8_extract(v_str_4294_, v_startInclusive_4295_, v_endExclusive_4296_);
lean_dec(v_endExclusive_4296_);
lean_dec(v_startInclusive_4295_);
lean_dec_ref(v_str_4294_);
v___x_4298_ = lean_string_append(v_b_4288_, v___x_4297_);
lean_dec_ref(v___x_4297_);
v_a_4287_ = v_it_4290_;
v_b_4288_ = v___x_4298_;
goto _start;
}
v___jp_4300_:
{
lean_object* v___x_4302_; lean_object* v___x_4303_; lean_object* v___x_4304_; lean_object* v___x_4305_; 
v___x_4302_ = lean_unsigned_to_nat(0u);
v___x_4303_ = lean_string_utf8_byte_size(v_replacement_4286_);
v___x_4304_ = lean_string_utf8_extract(v_replacement_4286_, v___x_4302_, v___x_4303_);
v___x_4305_ = lean_string_append(v_b_4288_, v___x_4304_);
lean_dec_ref(v___x_4304_);
v_a_4287_ = v_it_4301_;
v_b_4288_ = v___x_4305_;
goto _start;
}
}
}
LEAN_EXPORT lean_object* l_WellFounded_opaqueFix_u2083___at___00String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11_spec__21___redArg___boxed(lean_object* v_s_4396_, lean_object* v_replacement_4397_, lean_object* v_a_4398_, lean_object* v_b_4399_){
_start:
{
lean_object* v_res_4400_; 
v_res_4400_ = l_WellFounded_opaqueFix_u2083___at___00String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11_spec__21___redArg(v_s_4396_, v_replacement_4397_, v_a_4398_, v_b_4399_);
lean_dec_ref(v_replacement_4397_);
return v_res_4400_;
}
}
static lean_object* _init_l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__1(void){
_start:
{
lean_object* v___x_4402_; lean_object* v___x_4403_; 
v___x_4402_ = ((lean_object*)(l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__0));
v___x_4403_ = lean_string_utf8_byte_size(v___x_4402_);
return v___x_4403_;
}
}
static uint8_t _init_l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__2(void){
_start:
{
lean_object* v___x_4404_; lean_object* v___x_4405_; uint8_t v___x_4406_; 
v___x_4404_ = lean_unsigned_to_nat(0u);
v___x_4405_ = lean_obj_once(&l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__1, &l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__1_once, _init_l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__1);
v___x_4406_ = lean_nat_dec_eq(v___x_4405_, v___x_4404_);
return v___x_4406_;
}
}
static lean_object* _init_l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__3(void){
_start:
{
lean_object* v___x_4407_; lean_object* v___x_4408_; lean_object* v___x_4409_; lean_object* v___x_4410_; 
v___x_4407_ = lean_obj_once(&l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__1, &l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__1_once, _init_l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__1);
v___x_4408_ = lean_unsigned_to_nat(0u);
v___x_4409_ = ((lean_object*)(l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__0));
v___x_4410_ = lean_alloc_ctor(0, 3, 0);
lean_ctor_set(v___x_4410_, 0, v___x_4409_);
lean_ctor_set(v___x_4410_, 1, v___x_4408_);
lean_ctor_set(v___x_4410_, 2, v___x_4407_);
return v___x_4410_;
}
}
static lean_object* _init_l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__4(void){
_start:
{
lean_object* v___x_4411_; lean_object* v___x_4412_; 
v___x_4411_ = lean_obj_once(&l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__3, &l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__3_once, _init_l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__3);
v___x_4412_ = l_String_Slice_Pattern_ForwardSliceSearcher_buildTable(v___x_4411_);
return v___x_4412_;
}
}
static lean_object* _init_l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__5(void){
_start:
{
lean_object* v___x_4413_; lean_object* v___x_4414_; lean_object* v___x_4415_; lean_object* v___x_4416_; 
v___x_4413_ = lean_unsigned_to_nat(0u);
v___x_4414_ = lean_obj_once(&l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__4, &l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__4_once, _init_l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__4);
v___x_4415_ = lean_obj_once(&l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__3, &l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__3_once, _init_l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__3);
v___x_4416_ = lean_alloc_ctor(2, 4, 0);
lean_ctor_set(v___x_4416_, 0, v___x_4415_);
lean_ctor_set(v___x_4416_, 1, v___x_4414_);
lean_ctor_set(v___x_4416_, 2, v___x_4413_);
lean_ctor_set(v___x_4416_, 3, v___x_4413_);
return v___x_4416_;
}
}
LEAN_EXPORT lean_object* l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg(lean_object* v_s_4419_, lean_object* v_replacement_4420_){
_start:
{
lean_object* v___x_4421_; uint8_t v___x_4422_; 
v___x_4421_ = ((lean_object*)(l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg___closed__1));
v___x_4422_ = lean_uint8_once(&l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__2, &l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__2_once, _init_l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__2);
if (v___x_4422_ == 0)
{
lean_object* v___x_4423_; lean_object* v___x_4424_; 
v___x_4423_ = lean_obj_once(&l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__5, &l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__5_once, _init_l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__5);
v___x_4424_ = l_WellFounded_opaqueFix_u2083___at___00String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11_spec__21___redArg(v_s_4419_, v_replacement_4420_, v___x_4423_, v___x_4421_);
return v___x_4424_;
}
else
{
lean_object* v___x_4425_; lean_object* v___x_4426_; 
v___x_4425_ = ((lean_object*)(l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___closed__6));
v___x_4426_ = l_WellFounded_opaqueFix_u2083___at___00String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11_spec__21___redArg(v_s_4419_, v_replacement_4420_, v___x_4425_, v___x_4421_);
return v___x_4426_;
}
}
}
LEAN_EXPORT lean_object* l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg___boxed(lean_object* v_s_4427_, lean_object* v_replacement_4428_){
_start:
{
lean_object* v_res_4429_; 
v_res_4429_ = l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg(v_s_4427_, v_replacement_4428_);
lean_dec_ref(v_replacement_4428_);
return v_res_4429_;
}
}
LEAN_EXPORT lean_object* l_liftExcept___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__9___redArg(lean_object* v_x_4430_, lean_object* v___y_4431_){
_start:
{
if (lean_obj_tag(v_x_4430_) == 0)
{
lean_object* v_a_4432_; lean_object* v___x_4433_; 
v_a_4432_ = lean_ctor_get(v_x_4430_, 0);
lean_inc(v_a_4432_);
v___x_4433_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_4433_, 0, v_a_4432_);
lean_ctor_set(v___x_4433_, 1, v___y_4431_);
return v___x_4433_;
}
else
{
lean_object* v_a_4434_; lean_object* v___x_4435_; 
v_a_4434_ = lean_ctor_get(v_x_4430_, 0);
lean_inc(v_a_4434_);
v___x_4435_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_4435_, 0, v_a_4434_);
lean_ctor_set(v___x_4435_, 1, v___y_4431_);
return v___x_4435_;
}
}
}
LEAN_EXPORT lean_object* l_liftExcept___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__9___redArg___boxed(lean_object* v_x_4436_, lean_object* v___y_4437_){
_start:
{
lean_object* v_res_4438_; 
v_res_4438_ = l_liftExcept___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__9___redArg(v_x_4436_, v___y_4437_);
lean_dec_ref(v_x_4436_);
return v_res_4438_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8___redArg___lam__0(lean_object* v_env_4439_, lean_object* v_stx_4440_, lean_object* v___y_4441_, lean_object* v___y_4442_){
_start:
{
lean_object* v___x_4443_; 
v___x_4443_ = l_Lean_Elab_expandMacroImpl_x3f(v_env_4439_, v_stx_4440_, v___y_4441_, v___y_4442_);
if (lean_obj_tag(v___x_4443_) == 0)
{
lean_object* v_a_4444_; 
v_a_4444_ = lean_ctor_get(v___x_4443_, 0);
lean_inc(v_a_4444_);
if (lean_obj_tag(v_a_4444_) == 0)
{
lean_object* v_a_4445_; lean_object* v___x_4447_; uint8_t v_isShared_4448_; uint8_t v_isSharedCheck_4453_; 
v_a_4445_ = lean_ctor_get(v___x_4443_, 1);
v_isSharedCheck_4453_ = !lean_is_exclusive(v___x_4443_);
if (v_isSharedCheck_4453_ == 0)
{
lean_object* v_unused_4454_; 
v_unused_4454_ = lean_ctor_get(v___x_4443_, 0);
lean_dec(v_unused_4454_);
v___x_4447_ = v___x_4443_;
v_isShared_4448_ = v_isSharedCheck_4453_;
goto v_resetjp_4446_;
}
else
{
lean_inc(v_a_4445_);
lean_dec(v___x_4443_);
v___x_4447_ = lean_box(0);
v_isShared_4448_ = v_isSharedCheck_4453_;
goto v_resetjp_4446_;
}
v_resetjp_4446_:
{
lean_object* v___x_4449_; lean_object* v___x_4451_; 
v___x_4449_ = lean_box(0);
if (v_isShared_4448_ == 0)
{
lean_ctor_set(v___x_4447_, 0, v___x_4449_);
v___x_4451_ = v___x_4447_;
goto v_reusejp_4450_;
}
else
{
lean_object* v_reuseFailAlloc_4452_; 
v_reuseFailAlloc_4452_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v_reuseFailAlloc_4452_, 0, v___x_4449_);
lean_ctor_set(v_reuseFailAlloc_4452_, 1, v_a_4445_);
v___x_4451_ = v_reuseFailAlloc_4452_;
goto v_reusejp_4450_;
}
v_reusejp_4450_:
{
return v___x_4451_;
}
}
}
else
{
lean_object* v_val_4455_; lean_object* v___x_4457_; uint8_t v_isShared_4458_; uint8_t v_isSharedCheck_4483_; 
v_val_4455_ = lean_ctor_get(v_a_4444_, 0);
v_isSharedCheck_4483_ = !lean_is_exclusive(v_a_4444_);
if (v_isSharedCheck_4483_ == 0)
{
v___x_4457_ = v_a_4444_;
v_isShared_4458_ = v_isSharedCheck_4483_;
goto v_resetjp_4456_;
}
else
{
lean_inc(v_val_4455_);
lean_dec(v_a_4444_);
v___x_4457_ = lean_box(0);
v_isShared_4458_ = v_isSharedCheck_4483_;
goto v_resetjp_4456_;
}
v_resetjp_4456_:
{
lean_object* v_snd_4459_; 
v_snd_4459_ = lean_ctor_get(v_val_4455_, 1);
lean_inc(v_snd_4459_);
lean_dec(v_val_4455_);
if (lean_obj_tag(v_snd_4459_) == 0)
{
lean_object* v_a_4460_; lean_object* v_a_4461_; lean_object* v___x_4463_; uint8_t v_isShared_4464_; uint8_t v_isSharedCheck_4469_; 
lean_del_object(v___x_4457_);
v_a_4460_ = lean_ctor_get(v___x_4443_, 1);
lean_inc(v_a_4460_);
lean_dec_ref(v___x_4443_);
v_a_4461_ = lean_ctor_get(v_snd_4459_, 0);
v_isSharedCheck_4469_ = !lean_is_exclusive(v_snd_4459_);
if (v_isSharedCheck_4469_ == 0)
{
v___x_4463_ = v_snd_4459_;
v_isShared_4464_ = v_isSharedCheck_4469_;
goto v_resetjp_4462_;
}
else
{
lean_inc(v_a_4461_);
lean_dec(v_snd_4459_);
v___x_4463_ = lean_box(0);
v_isShared_4464_ = v_isSharedCheck_4469_;
goto v_resetjp_4462_;
}
v_resetjp_4462_:
{
lean_object* v___x_4466_; 
if (v_isShared_4464_ == 0)
{
v___x_4466_ = v___x_4463_;
goto v_reusejp_4465_;
}
else
{
lean_object* v_reuseFailAlloc_4468_; 
v_reuseFailAlloc_4468_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_4468_, 0, v_a_4461_);
v___x_4466_ = v_reuseFailAlloc_4468_;
goto v_reusejp_4465_;
}
v_reusejp_4465_:
{
lean_object* v___x_4467_; 
v___x_4467_ = l_liftExcept___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__9___redArg(v___x_4466_, v_a_4460_);
lean_dec_ref(v___x_4466_);
return v___x_4467_;
}
}
}
else
{
lean_object* v_a_4470_; lean_object* v_a_4471_; lean_object* v___x_4473_; uint8_t v_isShared_4474_; uint8_t v_isSharedCheck_4482_; 
v_a_4470_ = lean_ctor_get(v___x_4443_, 1);
lean_inc(v_a_4470_);
lean_dec_ref(v___x_4443_);
v_a_4471_ = lean_ctor_get(v_snd_4459_, 0);
v_isSharedCheck_4482_ = !lean_is_exclusive(v_snd_4459_);
if (v_isSharedCheck_4482_ == 0)
{
v___x_4473_ = v_snd_4459_;
v_isShared_4474_ = v_isSharedCheck_4482_;
goto v_resetjp_4472_;
}
else
{
lean_inc(v_a_4471_);
lean_dec(v_snd_4459_);
v___x_4473_ = lean_box(0);
v_isShared_4474_ = v_isSharedCheck_4482_;
goto v_resetjp_4472_;
}
v_resetjp_4472_:
{
lean_object* v___x_4476_; 
if (v_isShared_4458_ == 0)
{
lean_ctor_set(v___x_4457_, 0, v_a_4471_);
v___x_4476_ = v___x_4457_;
goto v_reusejp_4475_;
}
else
{
lean_object* v_reuseFailAlloc_4481_; 
v_reuseFailAlloc_4481_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_4481_, 0, v_a_4471_);
v___x_4476_ = v_reuseFailAlloc_4481_;
goto v_reusejp_4475_;
}
v_reusejp_4475_:
{
lean_object* v___x_4478_; 
if (v_isShared_4474_ == 0)
{
lean_ctor_set(v___x_4473_, 0, v___x_4476_);
v___x_4478_ = v___x_4473_;
goto v_reusejp_4477_;
}
else
{
lean_object* v_reuseFailAlloc_4480_; 
v_reuseFailAlloc_4480_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_4480_, 0, v___x_4476_);
v___x_4478_ = v_reuseFailAlloc_4480_;
goto v_reusejp_4477_;
}
v_reusejp_4477_:
{
lean_object* v___x_4479_; 
v___x_4479_ = l_liftExcept___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__9___redArg(v___x_4478_, v_a_4470_);
lean_dec_ref(v___x_4478_);
return v___x_4479_;
}
}
}
}
}
}
}
else
{
lean_object* v_a_4484_; lean_object* v_a_4485_; lean_object* v___x_4487_; uint8_t v_isShared_4488_; uint8_t v_isSharedCheck_4492_; 
v_a_4484_ = lean_ctor_get(v___x_4443_, 0);
v_a_4485_ = lean_ctor_get(v___x_4443_, 1);
v_isSharedCheck_4492_ = !lean_is_exclusive(v___x_4443_);
if (v_isSharedCheck_4492_ == 0)
{
v___x_4487_ = v___x_4443_;
v_isShared_4488_ = v_isSharedCheck_4492_;
goto v_resetjp_4486_;
}
else
{
lean_inc(v_a_4485_);
lean_inc(v_a_4484_);
lean_dec(v___x_4443_);
v___x_4487_ = lean_box(0);
v_isShared_4488_ = v_isSharedCheck_4492_;
goto v_resetjp_4486_;
}
v_resetjp_4486_:
{
lean_object* v___x_4490_; 
if (v_isShared_4488_ == 0)
{
v___x_4490_ = v___x_4487_;
goto v_reusejp_4489_;
}
else
{
lean_object* v_reuseFailAlloc_4491_; 
v_reuseFailAlloc_4491_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v_reuseFailAlloc_4491_, 0, v_a_4484_);
lean_ctor_set(v_reuseFailAlloc_4491_, 1, v_a_4485_);
v___x_4490_ = v_reuseFailAlloc_4491_;
goto v_reusejp_4489_;
}
v_reusejp_4489_:
{
return v___x_4490_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8___redArg___lam__0___boxed(lean_object* v_env_4493_, lean_object* v_stx_4494_, lean_object* v___y_4495_, lean_object* v___y_4496_){
_start:
{
lean_object* v_res_4497_; 
v_res_4497_ = l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8___redArg___lam__0(v_env_4493_, v_stx_4494_, v___y_4495_, v___y_4496_);
lean_dec_ref(v___y_4495_);
return v_res_4497_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8___redArg___lam__4(lean_object* v_env_4498_, lean_object* v_options_4499_, lean_object* v_currNamespace_4500_, lean_object* v_openDecls_4501_, lean_object* v_n_4502_, lean_object* v___y_4503_, lean_object* v___y_4504_){
_start:
{
lean_object* v___x_4505_; lean_object* v___x_4506_; 
v___x_4505_ = l_Lean_ResolveName_resolveGlobalName(v_env_4498_, v_options_4499_, v_currNamespace_4500_, v_openDecls_4501_, v_n_4502_);
v___x_4506_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_4506_, 0, v___x_4505_);
lean_ctor_set(v___x_4506_, 1, v___y_4504_);
return v___x_4506_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8___redArg___lam__4___boxed(lean_object* v_env_4507_, lean_object* v_options_4508_, lean_object* v_currNamespace_4509_, lean_object* v_openDecls_4510_, lean_object* v_n_4511_, lean_object* v___y_4512_, lean_object* v___y_4513_){
_start:
{
lean_object* v_res_4514_; 
v_res_4514_ = l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8___redArg___lam__4(v_env_4507_, v_options_4508_, v_currNamespace_4509_, v_openDecls_4510_, v_n_4511_, v___y_4512_, v___y_4513_);
lean_dec_ref(v___y_4512_);
lean_dec_ref(v_options_4508_);
return v_res_4514_;
}
}
static lean_object* _init_l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14___redArg___closed__3(void){
_start:
{
lean_object* v___x_4520_; lean_object* v___x_4521_; 
v___x_4520_ = l_Lean_maxRecDepthErrorMessage;
v___x_4521_ = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(v___x_4521_, 0, v___x_4520_);
return v___x_4521_;
}
}
static lean_object* _init_l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14___redArg___closed__4(void){
_start:
{
lean_object* v___x_4522_; lean_object* v___x_4523_; 
v___x_4522_ = lean_obj_once(&l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14___redArg___closed__3, &l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14___redArg___closed__3_once, _init_l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14___redArg___closed__3);
v___x_4523_ = l_Lean_MessageData_ofFormat(v___x_4522_);
return v___x_4523_;
}
}
static lean_object* _init_l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14___redArg___closed__5(void){
_start:
{
lean_object* v___x_4524_; lean_object* v___x_4525_; lean_object* v___x_4526_; 
v___x_4524_ = lean_obj_once(&l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14___redArg___closed__4, &l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14___redArg___closed__4_once, _init_l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14___redArg___closed__4);
v___x_4525_ = ((lean_object*)(l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14___redArg___closed__2));
v___x_4526_ = lean_alloc_ctor(8, 2, 0);
lean_ctor_set(v___x_4526_, 0, v___x_4525_);
lean_ctor_set(v___x_4526_, 1, v___x_4524_);
return v___x_4526_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14___redArg(lean_object* v_ref_4527_){
_start:
{
lean_object* v___x_4529_; lean_object* v___x_4530_; lean_object* v___x_4531_; 
v___x_4529_ = lean_obj_once(&l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14___redArg___closed__5, &l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14___redArg___closed__5_once, _init_l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14___redArg___closed__5);
v___x_4530_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_4530_, 0, v_ref_4527_);
lean_ctor_set(v___x_4530_, 1, v___x_4529_);
v___x_4531_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_4531_, 0, v___x_4530_);
return v___x_4531_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14___redArg___boxed(lean_object* v_ref_4532_, lean_object* v___y_4533_){
_start:
{
lean_object* v_res_4534_; 
v_res_4534_ = l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14___redArg(v_ref_4532_);
return v_res_4534_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8___redArg___lam__1(lean_object* v_env_4535_, lean_object* v_declName_4536_, lean_object* v___y_4537_, lean_object* v___y_4538_){
_start:
{
uint8_t v___x_4539_; lean_object* v_env_4540_; lean_object* v___x_4541_; uint8_t v___x_4542_; uint8_t v___x_4543_; 
v___x_4539_ = 0;
v_env_4540_ = l_Lean_Environment_setExporting(v_env_4535_, v___x_4539_);
lean_inc(v_declName_4536_);
v___x_4541_ = l_Lean_mkPrivateName(v_env_4540_, v_declName_4536_);
v___x_4542_ = 1;
lean_inc_ref(v_env_4540_);
v___x_4543_ = l_Lean_Environment_contains(v_env_4540_, v___x_4541_, v___x_4542_);
if (v___x_4543_ == 0)
{
lean_object* v___x_4544_; uint8_t v___x_4545_; lean_object* v___x_4546_; lean_object* v___x_4547_; 
v___x_4544_ = l_Lean_privateToUserName(v_declName_4536_);
v___x_4545_ = l_Lean_Environment_contains(v_env_4540_, v___x_4544_, v___x_4542_);
v___x_4546_ = lean_box(v___x_4545_);
v___x_4547_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_4547_, 0, v___x_4546_);
lean_ctor_set(v___x_4547_, 1, v___y_4538_);
return v___x_4547_;
}
else
{
lean_object* v___x_4548_; lean_object* v___x_4549_; 
lean_dec_ref(v_env_4540_);
lean_dec(v_declName_4536_);
v___x_4548_ = lean_box(v___x_4543_);
v___x_4549_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_4549_, 0, v___x_4548_);
lean_ctor_set(v___x_4549_, 1, v___y_4538_);
return v___x_4549_;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8___redArg___lam__1___boxed(lean_object* v_env_4550_, lean_object* v_declName_4551_, lean_object* v___y_4552_, lean_object* v___y_4553_){
_start:
{
lean_object* v_res_4554_; 
v_res_4554_ = l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8___redArg___lam__1(v_env_4550_, v_declName_4551_, v___y_4552_, v___y_4553_);
lean_dec_ref(v___y_4552_);
return v_res_4554_;
}
}
LEAN_EXPORT lean_object* l_Std_DHashMap_Internal_AssocList_get_x3f___at___00Std_DHashMap_Internal_Raw_u2080_Const_get_x3f___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__16_spec__26___redArg(lean_object* v_a_4555_, lean_object* v_x_4556_){
_start:
{
if (lean_obj_tag(v_x_4556_) == 0)
{
lean_object* v___x_4557_; 
v___x_4557_ = lean_box(0);
return v___x_4557_;
}
else
{
lean_object* v_key_4558_; lean_object* v_value_4559_; lean_object* v_tail_4560_; uint8_t v___x_4561_; 
v_key_4558_ = lean_ctor_get(v_x_4556_, 0);
v_value_4559_ = lean_ctor_get(v_x_4556_, 1);
v_tail_4560_ = lean_ctor_get(v_x_4556_, 2);
v___x_4561_ = lean_name_eq(v_key_4558_, v_a_4555_);
if (v___x_4561_ == 0)
{
v_x_4556_ = v_tail_4560_;
goto _start;
}
else
{
lean_object* v___x_4563_; 
lean_inc(v_value_4559_);
v___x_4563_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_4563_, 0, v_value_4559_);
return v___x_4563_;
}
}
}
}
LEAN_EXPORT lean_object* l_Std_DHashMap_Internal_AssocList_get_x3f___at___00Std_DHashMap_Internal_Raw_u2080_Const_get_x3f___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__16_spec__26___redArg___boxed(lean_object* v_a_4564_, lean_object* v_x_4565_){
_start:
{
lean_object* v_res_4566_; 
v_res_4566_ = l_Std_DHashMap_Internal_AssocList_get_x3f___at___00Std_DHashMap_Internal_Raw_u2080_Const_get_x3f___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__16_spec__26___redArg(v_a_4564_, v_x_4565_);
lean_dec(v_x_4565_);
lean_dec(v_a_4564_);
return v_res_4566_;
}
}
static uint64_t _init_l_Std_DHashMap_Internal_Raw_u2080_Const_get_x3f___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__16___redArg___closed__0(void){
_start:
{
lean_object* v___x_4567_; uint64_t v___x_4568_; 
v___x_4567_ = lean_unsigned_to_nat(1723u);
v___x_4568_ = lean_uint64_of_nat(v___x_4567_);
return v___x_4568_;
}
}
LEAN_EXPORT lean_object* l_Std_DHashMap_Internal_Raw_u2080_Const_get_x3f___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__16___redArg(lean_object* v_m_4569_, lean_object* v_a_4570_){
_start:
{
lean_object* v_buckets_4571_; lean_object* v___x_4572_; uint64_t v___y_4574_; 
v_buckets_4571_ = lean_ctor_get(v_m_4569_, 1);
v___x_4572_ = lean_array_get_size(v_buckets_4571_);
if (lean_obj_tag(v_a_4570_) == 0)
{
uint64_t v___x_4588_; 
v___x_4588_ = lean_uint64_once(&l_Std_DHashMap_Internal_Raw_u2080_Const_get_x3f___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__16___redArg___closed__0, &l_Std_DHashMap_Internal_Raw_u2080_Const_get_x3f___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__16___redArg___closed__0_once, _init_l_Std_DHashMap_Internal_Raw_u2080_Const_get_x3f___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__16___redArg___closed__0);
v___y_4574_ = v___x_4588_;
goto v___jp_4573_;
}
else
{
uint64_t v_hash_4589_; 
v_hash_4589_ = lean_ctor_get_uint64(v_a_4570_, sizeof(void*)*2);
v___y_4574_ = v_hash_4589_;
goto v___jp_4573_;
}
v___jp_4573_:
{
uint64_t v___x_4575_; uint64_t v___x_4576_; uint64_t v_fold_4577_; uint64_t v___x_4578_; uint64_t v___x_4579_; uint64_t v___x_4580_; size_t v___x_4581_; size_t v___x_4582_; size_t v___x_4583_; size_t v___x_4584_; size_t v___x_4585_; lean_object* v___x_4586_; lean_object* v___x_4587_; 
v___x_4575_ = 32ULL;
v___x_4576_ = lean_uint64_shift_right(v___y_4574_, v___x_4575_);
v_fold_4577_ = lean_uint64_xor(v___y_4574_, v___x_4576_);
v___x_4578_ = 16ULL;
v___x_4579_ = lean_uint64_shift_right(v_fold_4577_, v___x_4578_);
v___x_4580_ = lean_uint64_xor(v_fold_4577_, v___x_4579_);
v___x_4581_ = lean_uint64_to_usize(v___x_4580_);
v___x_4582_ = lean_usize_of_nat(v___x_4572_);
v___x_4583_ = ((size_t)1ULL);
v___x_4584_ = lean_usize_sub(v___x_4582_, v___x_4583_);
v___x_4585_ = lean_usize_land(v___x_4581_, v___x_4584_);
v___x_4586_ = lean_array_uget_borrowed(v_buckets_4571_, v___x_4585_);
v___x_4587_ = l_Std_DHashMap_Internal_AssocList_get_x3f___at___00Std_DHashMap_Internal_Raw_u2080_Const_get_x3f___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__16_spec__26___redArg(v_a_4570_, v___x_4586_);
return v___x_4587_;
}
}
}
LEAN_EXPORT lean_object* l_Std_DHashMap_Internal_Raw_u2080_Const_get_x3f___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__16___redArg___boxed(lean_object* v_m_4590_, lean_object* v_a_4591_){
_start:
{
lean_object* v_res_4592_; 
v_res_4592_ = l_Std_DHashMap_Internal_Raw_u2080_Const_get_x3f___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__16___redArg(v_m_4590_, v_a_4591_);
lean_dec(v_a_4591_);
lean_dec_ref(v_m_4590_);
return v_res_4592_;
}
}
LEAN_EXPORT uint8_t l_Lean_PersistentHashMap_containsAtAux___at___00Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00__private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14_spec__23_spec__29_spec__33___redArg(lean_object* v_keys_4593_, lean_object* v_i_4594_, lean_object* v_k_4595_){
_start:
{
lean_object* v___x_4596_; uint8_t v___x_4597_; 
v___x_4596_ = lean_array_get_size(v_keys_4593_);
v___x_4597_ = lean_nat_dec_lt(v_i_4594_, v___x_4596_);
if (v___x_4597_ == 0)
{
lean_dec(v_i_4594_);
return v___x_4597_;
}
else
{
lean_object* v_k_x27_4598_; uint8_t v___x_4599_; 
v_k_x27_4598_ = lean_array_fget_borrowed(v_keys_4593_, v_i_4594_);
v___x_4599_ = l_Lean_instBEqExtraModUse_beq(v_k_4595_, v_k_x27_4598_);
if (v___x_4599_ == 0)
{
lean_object* v___x_4600_; lean_object* v___x_4601_; 
v___x_4600_ = lean_unsigned_to_nat(1u);
v___x_4601_ = lean_nat_add(v_i_4594_, v___x_4600_);
lean_dec(v_i_4594_);
v_i_4594_ = v___x_4601_;
goto _start;
}
else
{
lean_dec(v_i_4594_);
return v___x_4599_;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_containsAtAux___at___00Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00__private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14_spec__23_spec__29_spec__33___redArg___boxed(lean_object* v_keys_4603_, lean_object* v_i_4604_, lean_object* v_k_4605_){
_start:
{
uint8_t v_res_4606_; lean_object* v_r_4607_; 
v_res_4606_ = l_Lean_PersistentHashMap_containsAtAux___at___00Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00__private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14_spec__23_spec__29_spec__33___redArg(v_keys_4603_, v_i_4604_, v_k_4605_);
lean_dec_ref(v_k_4605_);
lean_dec_ref(v_keys_4603_);
v_r_4607_ = lean_box(v_res_4606_);
return v_r_4607_;
}
}
LEAN_EXPORT uint8_t l_Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00__private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14_spec__23_spec__29___redArg(lean_object* v_x_4608_, size_t v_x_4609_, lean_object* v_x_4610_){
_start:
{
if (lean_obj_tag(v_x_4608_) == 0)
{
lean_object* v_es_4611_; lean_object* v___x_4612_; size_t v___x_4613_; size_t v___x_4614_; size_t v___x_4615_; lean_object* v_j_4616_; lean_object* v___x_4617_; 
v_es_4611_ = lean_ctor_get(v_x_4608_, 0);
lean_inc_ref(v_es_4611_);
lean_dec_ref(v_x_4608_);
v___x_4612_ = lean_box(2);
v___x_4613_ = ((size_t)5ULL);
v___x_4614_ = lean_usize_once(&l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4___redArg___closed__1, &l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4___redArg___closed__1_once, _init_l_Lean_PersistentHashMap_insertAux___at___00Lean_PersistentHashMap_insert___at___00Lean_MVarId_assign___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__1_spec__2_spec__4___redArg___closed__1);
v___x_4615_ = lean_usize_land(v_x_4609_, v___x_4614_);
v_j_4616_ = lean_usize_to_nat(v___x_4615_);
v___x_4617_ = lean_array_get(v___x_4612_, v_es_4611_, v_j_4616_);
lean_dec(v_j_4616_);
lean_dec_ref(v_es_4611_);
switch(lean_obj_tag(v___x_4617_))
{
case 0:
{
lean_object* v_key_4618_; uint8_t v___x_4619_; 
v_key_4618_ = lean_ctor_get(v___x_4617_, 0);
lean_inc(v_key_4618_);
lean_dec_ref(v___x_4617_);
v___x_4619_ = l_Lean_instBEqExtraModUse_beq(v_x_4610_, v_key_4618_);
lean_dec(v_key_4618_);
return v___x_4619_;
}
case 1:
{
lean_object* v_node_4620_; size_t v___x_4621_; 
v_node_4620_ = lean_ctor_get(v___x_4617_, 0);
lean_inc(v_node_4620_);
lean_dec_ref(v___x_4617_);
v___x_4621_ = lean_usize_shift_right(v_x_4609_, v___x_4613_);
v_x_4608_ = v_node_4620_;
v_x_4609_ = v___x_4621_;
goto _start;
}
default: 
{
uint8_t v___x_4623_; 
v___x_4623_ = 0;
return v___x_4623_;
}
}
}
else
{
lean_object* v_ks_4624_; lean_object* v___x_4625_; uint8_t v___x_4626_; 
v_ks_4624_ = lean_ctor_get(v_x_4608_, 0);
lean_inc_ref(v_ks_4624_);
lean_dec_ref(v_x_4608_);
v___x_4625_ = lean_unsigned_to_nat(0u);
v___x_4626_ = l_Lean_PersistentHashMap_containsAtAux___at___00Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00__private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14_spec__23_spec__29_spec__33___redArg(v_ks_4624_, v___x_4625_, v_x_4610_);
lean_dec_ref(v_ks_4624_);
return v___x_4626_;
}
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00__private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14_spec__23_spec__29___redArg___boxed(lean_object* v_x_4627_, lean_object* v_x_4628_, lean_object* v_x_4629_){
_start:
{
size_t v_x_45451__boxed_4630_; uint8_t v_res_4631_; lean_object* v_r_4632_; 
v_x_45451__boxed_4630_ = lean_unbox_usize(v_x_4628_);
lean_dec(v_x_4628_);
v_res_4631_ = l_Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00__private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14_spec__23_spec__29___redArg(v_x_4627_, v_x_45451__boxed_4630_, v_x_4629_);
lean_dec_ref(v_x_4629_);
v_r_4632_ = lean_box(v_res_4631_);
return v_r_4632_;
}
}
LEAN_EXPORT uint8_t l_Lean_PersistentHashMap_contains___at___00__private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14_spec__23___redArg(lean_object* v_x_4633_, lean_object* v_x_4634_){
_start:
{
uint64_t v___x_4635_; size_t v___x_4636_; uint8_t v___x_4637_; 
v___x_4635_ = l_Lean_instHashableExtraModUse_hash(v_x_4634_);
v___x_4636_ = lean_uint64_to_usize(v___x_4635_);
v___x_4637_ = l_Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00__private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14_spec__23_spec__29___redArg(v_x_4633_, v___x_4636_, v_x_4634_);
return v___x_4637_;
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_contains___at___00__private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14_spec__23___redArg___boxed(lean_object* v_x_4638_, lean_object* v_x_4639_){
_start:
{
uint8_t v_res_4640_; lean_object* v_r_4641_; 
v_res_4640_ = l_Lean_PersistentHashMap_contains___at___00__private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14_spec__23___redArg(v_x_4638_, v_x_4639_);
lean_dec_ref(v_x_4639_);
v_r_4641_ = lean_box(v_res_4640_);
return v_r_4641_;
}
}
static lean_object* _init_l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__2(void){
_start:
{
lean_object* v___x_4644_; lean_object* v___x_4645_; lean_object* v___x_4646_; 
v___x_4644_ = ((lean_object*)(l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__1));
v___x_4645_ = ((lean_object*)(l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__0));
v___x_4646_ = l_Lean_PersistentHashMap_empty(lean_box(0), lean_box(0), v___x_4645_, v___x_4644_);
return v___x_4646_;
}
}
static lean_object* _init_l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__6(void){
_start:
{
lean_object* v___x_4651_; lean_object* v___x_4652_; 
v___x_4651_ = ((lean_object*)(l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__5));
v___x_4652_ = l_Lean_stringToMessageData(v___x_4651_);
return v___x_4652_;
}
}
static lean_object* _init_l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__8(void){
_start:
{
lean_object* v___x_4654_; lean_object* v___x_4655_; 
v___x_4654_ = ((lean_object*)(l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__7));
v___x_4655_ = l_Lean_stringToMessageData(v___x_4654_);
return v___x_4655_;
}
}
static lean_object* _init_l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__9(void){
_start:
{
lean_object* v___x_4656_; lean_object* v___x_4657_; 
v___x_4656_ = ((lean_object*)(l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg___closed__1));
v___x_4657_ = l_Lean_stringToMessageData(v___x_4656_);
return v___x_4657_;
}
}
static lean_object* _init_l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__11(void){
_start:
{
lean_object* v___x_4659_; lean_object* v___x_4660_; 
v___x_4659_ = ((lean_object*)(l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__10));
v___x_4660_ = l_Lean_stringToMessageData(v___x_4659_);
return v___x_4660_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg(lean_object* v_mod_4665_, uint8_t v_isMeta_4666_, lean_object* v_hint_4667_, lean_object* v___y_4668_, lean_object* v___y_4669_, lean_object* v___y_4670_, lean_object* v___y_4671_){
_start:
{
lean_object* v___x_4673_; lean_object* v_env_4674_; uint8_t v_isExporting_4675_; lean_object* v___x_4676_; lean_object* v_env_4677_; lean_object* v___x_4678_; lean_object* v_entry_4679_; lean_object* v___x_4680_; lean_object* v___x_4681_; lean_object* v___x_4682_; lean_object* v___y_4684_; lean_object* v___y_4685_; lean_object* v___x_4725_; uint8_t v___x_4726_; 
v___x_4673_ = lean_st_ref_get(v___y_4671_);
v_env_4674_ = lean_ctor_get(v___x_4673_, 0);
lean_inc_ref(v_env_4674_);
lean_dec(v___x_4673_);
v_isExporting_4675_ = lean_ctor_get_uint8(v_env_4674_, sizeof(void*)*8);
lean_dec_ref(v_env_4674_);
v___x_4676_ = lean_st_ref_get(v___y_4671_);
v_env_4677_ = lean_ctor_get(v___x_4676_, 0);
lean_inc_ref(v_env_4677_);
lean_dec(v___x_4676_);
v___x_4678_ = lean_obj_once(&l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__2, &l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__2_once, _init_l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__2);
lean_inc(v_mod_4665_);
v_entry_4679_ = lean_alloc_ctor(0, 1, 2);
lean_ctor_set(v_entry_4679_, 0, v_mod_4665_);
lean_ctor_set_uint8(v_entry_4679_, sizeof(void*)*1, v_isExporting_4675_);
lean_ctor_set_uint8(v_entry_4679_, sizeof(void*)*1 + 1, v_isMeta_4666_);
v___x_4680_ = l___private_Lean_ExtraModUses_0__Lean_extraModUses;
v___x_4681_ = lean_box(1);
v___x_4682_ = lean_box(0);
v___x_4725_ = l_Lean_SimplePersistentEnvExtension_getState___redArg(v___x_4678_, v___x_4680_, v_env_4677_, v___x_4681_, v___x_4682_);
v___x_4726_ = l_Lean_PersistentHashMap_contains___at___00__private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14_spec__23___redArg(v___x_4725_, v_entry_4679_);
if (v___x_4726_ == 0)
{
lean_object* v_cls_4727_; lean_object* v___x_4728_; lean_object* v_a_4729_; lean_object* v___y_4731_; lean_object* v___y_4732_; lean_object* v___y_4736_; lean_object* v___y_4737_; uint8_t v___x_4749_; 
v_cls_4727_ = ((lean_object*)(l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__4));
v___x_4728_ = l_Lean_isTracingEnabledFor___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__2___redArg(v_cls_4727_, v___y_4670_);
v_a_4729_ = lean_ctor_get(v___x_4728_, 0);
lean_inc(v_a_4729_);
lean_dec_ref(v___x_4728_);
v___x_4749_ = lean_unbox(v_a_4729_);
lean_dec(v_a_4729_);
if (v___x_4749_ == 0)
{
lean_dec(v_hint_4667_);
lean_dec(v_mod_4665_);
v___y_4684_ = v___y_4669_;
v___y_4685_ = v___y_4671_;
goto v___jp_4683_;
}
else
{
lean_object* v___x_4750_; lean_object* v___y_4752_; 
v___x_4750_ = lean_obj_once(&l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__11, &l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__11_once, _init_l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__11);
if (v_isExporting_4675_ == 0)
{
lean_object* v___x_4759_; 
v___x_4759_ = ((lean_object*)(l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__14));
v___y_4752_ = v___x_4759_;
goto v___jp_4751_;
}
else
{
lean_object* v___x_4760_; 
v___x_4760_ = ((lean_object*)(l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__15));
v___y_4752_ = v___x_4760_;
goto v___jp_4751_;
}
v___jp_4751_:
{
lean_object* v___x_4753_; lean_object* v___x_4754_; lean_object* v___x_4755_; lean_object* v___x_4756_; 
v___x_4753_ = l_Lean_stringToMessageData(v___y_4752_);
v___x_4754_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_4754_, 0, v___x_4750_);
lean_ctor_set(v___x_4754_, 1, v___x_4753_);
v___x_4755_ = lean_obj_once(&l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__1, &l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__1_once, _init_l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__1);
v___x_4756_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_4756_, 0, v___x_4754_);
lean_ctor_set(v___x_4756_, 1, v___x_4755_);
if (v_isMeta_4666_ == 0)
{
lean_object* v___x_4757_; 
v___x_4757_ = ((lean_object*)(l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__12));
v___y_4736_ = v___x_4756_;
v___y_4737_ = v___x_4757_;
goto v___jp_4735_;
}
else
{
lean_object* v___x_4758_; 
v___x_4758_ = ((lean_object*)(l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__13));
v___y_4736_ = v___x_4756_;
v___y_4737_ = v___x_4758_;
goto v___jp_4735_;
}
}
}
v___jp_4730_:
{
lean_object* v___x_4733_; lean_object* v___x_4734_; 
v___x_4733_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_4733_, 0, v___y_4731_);
lean_ctor_set(v___x_4733_, 1, v___y_4732_);
v___x_4734_ = l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg(v_cls_4727_, v___x_4733_, v___y_4668_, v___y_4669_, v___y_4670_, v___y_4671_);
if (lean_obj_tag(v___x_4734_) == 0)
{
lean_dec_ref(v___x_4734_);
v___y_4684_ = v___y_4669_;
v___y_4685_ = v___y_4671_;
goto v___jp_4683_;
}
else
{
lean_dec_ref(v_entry_4679_);
return v___x_4734_;
}
}
v___jp_4735_:
{
lean_object* v___x_4738_; lean_object* v___x_4739_; lean_object* v___x_4740_; lean_object* v___x_4741_; lean_object* v___x_4742_; lean_object* v___x_4743_; uint8_t v___x_4744_; 
v___x_4738_ = l_Lean_stringToMessageData(v___y_4737_);
v___x_4739_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_4739_, 0, v___y_4736_);
lean_ctor_set(v___x_4739_, 1, v___x_4738_);
v___x_4740_ = lean_obj_once(&l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__6, &l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__6_once, _init_l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__6);
v___x_4741_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_4741_, 0, v___x_4739_);
lean_ctor_set(v___x_4741_, 1, v___x_4740_);
v___x_4742_ = l_Lean_MessageData_ofName(v_mod_4665_);
v___x_4743_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_4743_, 0, v___x_4741_);
lean_ctor_set(v___x_4743_, 1, v___x_4742_);
v___x_4744_ = l_Lean_Name_isAnonymous(v_hint_4667_);
if (v___x_4744_ == 0)
{
lean_object* v___x_4745_; lean_object* v___x_4746_; lean_object* v___x_4747_; 
v___x_4745_ = lean_obj_once(&l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__8, &l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__8_once, _init_l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__8);
v___x_4746_ = l_Lean_MessageData_ofName(v_hint_4667_);
v___x_4747_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_4747_, 0, v___x_4745_);
lean_ctor_set(v___x_4747_, 1, v___x_4746_);
v___y_4731_ = v___x_4743_;
v___y_4732_ = v___x_4747_;
goto v___jp_4730_;
}
else
{
lean_object* v___x_4748_; 
lean_dec(v_hint_4667_);
v___x_4748_ = lean_obj_once(&l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__9, &l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__9_once, _init_l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___closed__9);
v___y_4731_ = v___x_4743_;
v___y_4732_ = v___x_4748_;
goto v___jp_4730_;
}
}
}
else
{
lean_object* v___x_4761_; lean_object* v___x_4762_; 
lean_dec_ref(v_entry_4679_);
lean_dec(v_hint_4667_);
lean_dec(v_mod_4665_);
v___x_4761_ = lean_box(0);
v___x_4762_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_4762_, 0, v___x_4761_);
return v___x_4762_;
}
v___jp_4683_:
{
lean_object* v___x_4686_; lean_object* v_toEnvExtension_4687_; lean_object* v_env_4688_; lean_object* v_nextMacroScope_4689_; lean_object* v_ngen_4690_; lean_object* v_auxDeclNGen_4691_; lean_object* v_traceState_4692_; lean_object* v_messages_4693_; lean_object* v_infoState_4694_; lean_object* v_snapshotTasks_4695_; lean_object* v___x_4697_; uint8_t v_isShared_4698_; uint8_t v_isSharedCheck_4723_; 
v___x_4686_ = lean_st_ref_take(v___y_4685_);
v_toEnvExtension_4687_ = lean_ctor_get(v___x_4680_, 0);
lean_inc_ref(v_toEnvExtension_4687_);
v_env_4688_ = lean_ctor_get(v___x_4686_, 0);
v_nextMacroScope_4689_ = lean_ctor_get(v___x_4686_, 1);
v_ngen_4690_ = lean_ctor_get(v___x_4686_, 2);
v_auxDeclNGen_4691_ = lean_ctor_get(v___x_4686_, 3);
v_traceState_4692_ = lean_ctor_get(v___x_4686_, 4);
v_messages_4693_ = lean_ctor_get(v___x_4686_, 6);
v_infoState_4694_ = lean_ctor_get(v___x_4686_, 7);
v_snapshotTasks_4695_ = lean_ctor_get(v___x_4686_, 8);
v_isSharedCheck_4723_ = !lean_is_exclusive(v___x_4686_);
if (v_isSharedCheck_4723_ == 0)
{
lean_object* v_unused_4724_; 
v_unused_4724_ = lean_ctor_get(v___x_4686_, 5);
lean_dec(v_unused_4724_);
v___x_4697_ = v___x_4686_;
v_isShared_4698_ = v_isSharedCheck_4723_;
goto v_resetjp_4696_;
}
else
{
lean_inc(v_snapshotTasks_4695_);
lean_inc(v_infoState_4694_);
lean_inc(v_messages_4693_);
lean_inc(v_traceState_4692_);
lean_inc(v_auxDeclNGen_4691_);
lean_inc(v_ngen_4690_);
lean_inc(v_nextMacroScope_4689_);
lean_inc(v_env_4688_);
lean_dec(v___x_4686_);
v___x_4697_ = lean_box(0);
v_isShared_4698_ = v_isSharedCheck_4723_;
goto v_resetjp_4696_;
}
v_resetjp_4696_:
{
lean_object* v_asyncMode_4699_; lean_object* v___x_4700_; lean_object* v___x_4701_; lean_object* v___x_4703_; 
v_asyncMode_4699_ = lean_ctor_get(v_toEnvExtension_4687_, 2);
lean_inc(v_asyncMode_4699_);
lean_dec_ref(v_toEnvExtension_4687_);
v___x_4700_ = l_Lean_PersistentEnvExtension_addEntry___redArg(v___x_4680_, v_env_4688_, v_entry_4679_, v_asyncMode_4699_, v___x_4682_);
lean_dec(v_asyncMode_4699_);
v___x_4701_ = lean_obj_once(&l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__2, &l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__2_once, _init_l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__2);
if (v_isShared_4698_ == 0)
{
lean_ctor_set(v___x_4697_, 5, v___x_4701_);
lean_ctor_set(v___x_4697_, 0, v___x_4700_);
v___x_4703_ = v___x_4697_;
goto v_reusejp_4702_;
}
else
{
lean_object* v_reuseFailAlloc_4722_; 
v_reuseFailAlloc_4722_ = lean_alloc_ctor(0, 9, 0);
lean_ctor_set(v_reuseFailAlloc_4722_, 0, v___x_4700_);
lean_ctor_set(v_reuseFailAlloc_4722_, 1, v_nextMacroScope_4689_);
lean_ctor_set(v_reuseFailAlloc_4722_, 2, v_ngen_4690_);
lean_ctor_set(v_reuseFailAlloc_4722_, 3, v_auxDeclNGen_4691_);
lean_ctor_set(v_reuseFailAlloc_4722_, 4, v_traceState_4692_);
lean_ctor_set(v_reuseFailAlloc_4722_, 5, v___x_4701_);
lean_ctor_set(v_reuseFailAlloc_4722_, 6, v_messages_4693_);
lean_ctor_set(v_reuseFailAlloc_4722_, 7, v_infoState_4694_);
lean_ctor_set(v_reuseFailAlloc_4722_, 8, v_snapshotTasks_4695_);
v___x_4703_ = v_reuseFailAlloc_4722_;
goto v_reusejp_4702_;
}
v_reusejp_4702_:
{
lean_object* v___x_4704_; lean_object* v___x_4705_; lean_object* v_mctx_4706_; lean_object* v_zetaDeltaFVarIds_4707_; lean_object* v_postponed_4708_; lean_object* v_diag_4709_; lean_object* v___x_4711_; uint8_t v_isShared_4712_; uint8_t v_isSharedCheck_4720_; 
v___x_4704_ = lean_st_ref_set(v___y_4685_, v___x_4703_);
v___x_4705_ = lean_st_ref_take(v___y_4684_);
v_mctx_4706_ = lean_ctor_get(v___x_4705_, 0);
v_zetaDeltaFVarIds_4707_ = lean_ctor_get(v___x_4705_, 2);
v_postponed_4708_ = lean_ctor_get(v___x_4705_, 3);
v_diag_4709_ = lean_ctor_get(v___x_4705_, 4);
v_isSharedCheck_4720_ = !lean_is_exclusive(v___x_4705_);
if (v_isSharedCheck_4720_ == 0)
{
lean_object* v_unused_4721_; 
v_unused_4721_ = lean_ctor_get(v___x_4705_, 1);
lean_dec(v_unused_4721_);
v___x_4711_ = v___x_4705_;
v_isShared_4712_ = v_isSharedCheck_4720_;
goto v_resetjp_4710_;
}
else
{
lean_inc(v_diag_4709_);
lean_inc(v_postponed_4708_);
lean_inc(v_zetaDeltaFVarIds_4707_);
lean_inc(v_mctx_4706_);
lean_dec(v___x_4705_);
v___x_4711_ = lean_box(0);
v_isShared_4712_ = v_isSharedCheck_4720_;
goto v_resetjp_4710_;
}
v_resetjp_4710_:
{
lean_object* v___x_4713_; lean_object* v___x_4715_; 
v___x_4713_ = lean_obj_once(&l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__3, &l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__3_once, _init_l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__3);
if (v_isShared_4712_ == 0)
{
lean_ctor_set(v___x_4711_, 1, v___x_4713_);
v___x_4715_ = v___x_4711_;
goto v_reusejp_4714_;
}
else
{
lean_object* v_reuseFailAlloc_4719_; 
v_reuseFailAlloc_4719_ = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(v_reuseFailAlloc_4719_, 0, v_mctx_4706_);
lean_ctor_set(v_reuseFailAlloc_4719_, 1, v___x_4713_);
lean_ctor_set(v_reuseFailAlloc_4719_, 2, v_zetaDeltaFVarIds_4707_);
lean_ctor_set(v_reuseFailAlloc_4719_, 3, v_postponed_4708_);
lean_ctor_set(v_reuseFailAlloc_4719_, 4, v_diag_4709_);
v___x_4715_ = v_reuseFailAlloc_4719_;
goto v_reusejp_4714_;
}
v_reusejp_4714_:
{
lean_object* v___x_4716_; lean_object* v___x_4717_; lean_object* v___x_4718_; 
v___x_4716_ = lean_st_ref_set(v___y_4684_, v___x_4715_);
v___x_4717_ = lean_box(0);
v___x_4718_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_4718_, 0, v___x_4717_);
return v___x_4718_;
}
}
}
}
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg___boxed(lean_object* v_mod_4763_, lean_object* v_isMeta_4764_, lean_object* v_hint_4765_, lean_object* v___y_4766_, lean_object* v___y_4767_, lean_object* v___y_4768_, lean_object* v___y_4769_, lean_object* v___y_4770_){
_start:
{
uint8_t v_isMeta_boxed_4771_; lean_object* v_res_4772_; 
v_isMeta_boxed_4771_ = lean_unbox(v_isMeta_4764_);
v_res_4772_ = l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg(v_mod_4763_, v_isMeta_boxed_4771_, v_hint_4765_, v___y_4766_, v___y_4767_, v___y_4768_, v___y_4769_);
lean_dec(v___y_4769_);
lean_dec_ref(v___y_4768_);
lean_dec(v___y_4767_);
lean_dec_ref(v___y_4766_);
return v_res_4772_;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__15(lean_object* v___x_4773_, lean_object* v_declName_4774_, lean_object* v_as_4775_, size_t v_sz_4776_, size_t v_i_4777_, lean_object* v_b_4778_, lean_object* v___y_4779_, lean_object* v___y_4780_, lean_object* v___y_4781_, lean_object* v___y_4782_, lean_object* v___y_4783_, lean_object* v___y_4784_){
_start:
{
uint8_t v___x_4786_; 
v___x_4786_ = lean_usize_dec_lt(v_i_4777_, v_sz_4776_);
if (v___x_4786_ == 0)
{
lean_object* v___x_4787_; 
lean_dec(v_declName_4774_);
v___x_4787_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_4787_, 0, v_b_4778_);
return v___x_4787_;
}
else
{
lean_object* v___x_4788_; lean_object* v_modules_4789_; lean_object* v___x_4790_; lean_object* v_a_4791_; lean_object* v___x_4792_; lean_object* v_toImport_4793_; lean_object* v_module_4794_; uint8_t v___x_4795_; lean_object* v___x_4796_; 
v___x_4788_ = l_Lean_Environment_header(v___x_4773_);
v_modules_4789_ = lean_ctor_get(v___x_4788_, 3);
lean_inc_ref(v_modules_4789_);
lean_dec_ref(v___x_4788_);
v___x_4790_ = l_Lean_instInhabitedEffectiveImport_default;
v_a_4791_ = lean_array_uget_borrowed(v_as_4775_, v_i_4777_);
v___x_4792_ = lean_array_get(v___x_4790_, v_modules_4789_, v_a_4791_);
lean_dec_ref(v_modules_4789_);
v_toImport_4793_ = lean_ctor_get(v___x_4792_, 0);
lean_inc_ref(v_toImport_4793_);
lean_dec(v___x_4792_);
v_module_4794_ = lean_ctor_get(v_toImport_4793_, 0);
lean_inc(v_module_4794_);
lean_dec_ref(v_toImport_4793_);
v___x_4795_ = 0;
lean_inc(v_declName_4774_);
v___x_4796_ = l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg(v_module_4794_, v___x_4795_, v_declName_4774_, v___y_4781_, v___y_4782_, v___y_4783_, v___y_4784_);
if (lean_obj_tag(v___x_4796_) == 0)
{
lean_object* v___x_4797_; size_t v___x_4798_; size_t v___x_4799_; 
lean_dec_ref(v___x_4796_);
v___x_4797_ = lean_box(0);
v___x_4798_ = ((size_t)1ULL);
v___x_4799_ = lean_usize_add(v_i_4777_, v___x_4798_);
v_i_4777_ = v___x_4799_;
v_b_4778_ = v___x_4797_;
goto _start;
}
else
{
lean_dec(v_declName_4774_);
return v___x_4796_;
}
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__15___boxed(lean_object* v___x_4801_, lean_object* v_declName_4802_, lean_object* v_as_4803_, lean_object* v_sz_4804_, lean_object* v_i_4805_, lean_object* v_b_4806_, lean_object* v___y_4807_, lean_object* v___y_4808_, lean_object* v___y_4809_, lean_object* v___y_4810_, lean_object* v___y_4811_, lean_object* v___y_4812_, lean_object* v___y_4813_){
_start:
{
size_t v_sz_boxed_4814_; size_t v_i_boxed_4815_; lean_object* v_res_4816_; 
v_sz_boxed_4814_ = lean_unbox_usize(v_sz_4804_);
lean_dec(v_sz_4804_);
v_i_boxed_4815_ = lean_unbox_usize(v_i_4805_);
lean_dec(v_i_4805_);
v_res_4816_ = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__15(v___x_4801_, v_declName_4802_, v_as_4803_, v_sz_boxed_4814_, v_i_boxed_4815_, v_b_4806_, v___y_4807_, v___y_4808_, v___y_4809_, v___y_4810_, v___y_4811_, v___y_4812_);
lean_dec(v___y_4812_);
lean_dec_ref(v___y_4811_);
lean_dec(v___y_4810_);
lean_dec_ref(v___y_4809_);
lean_dec(v___y_4808_);
lean_dec_ref(v___y_4807_);
lean_dec_ref(v_as_4803_);
lean_dec_ref(v___x_4801_);
return v_res_4816_;
}
}
static lean_object* _init_l_Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10___closed__2(void){
_start:
{
lean_object* v___x_4819_; lean_object* v___x_4820_; lean_object* v___x_4821_; 
v___x_4819_ = ((lean_object*)(l_Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10___closed__1));
v___x_4820_ = ((lean_object*)(l_Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10___closed__0));
v___x_4821_ = l_Std_HashMap_instInhabited(lean_box(0), lean_box(0), v___x_4820_, v___x_4819_);
return v___x_4821_;
}
}
LEAN_EXPORT lean_object* l_Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10(lean_object* v_declName_4824_, uint8_t v_isMeta_4825_, lean_object* v___y_4826_, lean_object* v___y_4827_, lean_object* v___y_4828_, lean_object* v___y_4829_, lean_object* v___y_4830_, lean_object* v___y_4831_){
_start:
{
lean_object* v___x_4833_; lean_object* v_env_4837_; lean_object* v___y_4839_; lean_object* v___x_4852_; 
v___x_4833_ = lean_st_ref_get(v___y_4831_);
v_env_4837_ = lean_ctor_get(v___x_4833_, 0);
lean_inc_ref(v_env_4837_);
lean_dec(v___x_4833_);
v___x_4852_ = l_Lean_Environment_getModuleIdxFor_x3f(v_env_4837_, v_declName_4824_);
if (lean_obj_tag(v___x_4852_) == 0)
{
lean_dec_ref(v_env_4837_);
lean_dec(v_declName_4824_);
goto v___jp_4834_;
}
else
{
lean_object* v_val_4853_; lean_object* v___x_4854_; lean_object* v_modules_4855_; lean_object* v___x_4856_; uint8_t v___x_4857_; 
v_val_4853_ = lean_ctor_get(v___x_4852_, 0);
lean_inc(v_val_4853_);
lean_dec_ref(v___x_4852_);
v___x_4854_ = l_Lean_Environment_header(v_env_4837_);
v_modules_4855_ = lean_ctor_get(v___x_4854_, 3);
lean_inc_ref(v_modules_4855_);
lean_dec_ref(v___x_4854_);
v___x_4856_ = lean_array_get_size(v_modules_4855_);
v___x_4857_ = lean_nat_dec_lt(v_val_4853_, v___x_4856_);
if (v___x_4857_ == 0)
{
lean_dec_ref(v_modules_4855_);
lean_dec(v_val_4853_);
lean_dec_ref(v_env_4837_);
lean_dec(v_declName_4824_);
goto v___jp_4834_;
}
else
{
lean_object* v___x_4858_; lean_object* v_env_4859_; lean_object* v___x_4860_; lean_object* v___x_4861_; uint8_t v___y_4863_; 
v___x_4858_ = lean_st_ref_get(v___y_4831_);
v_env_4859_ = lean_ctor_get(v___x_4858_, 0);
lean_inc_ref(v_env_4859_);
lean_dec(v___x_4858_);
v___x_4860_ = lean_obj_once(&l_Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10___closed__2, &l_Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10___closed__2_once, _init_l_Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10___closed__2);
v___x_4861_ = lean_array_fget(v_modules_4855_, v_val_4853_);
lean_dec(v_val_4853_);
lean_dec_ref(v_modules_4855_);
if (v_isMeta_4825_ == 0)
{
lean_dec_ref(v_env_4859_);
v___y_4863_ = v_isMeta_4825_;
goto v___jp_4862_;
}
else
{
uint8_t v___x_4874_; 
lean_inc(v_declName_4824_);
v___x_4874_ = l_Lean_isMarkedMeta(v_env_4859_, v_declName_4824_);
if (v___x_4874_ == 0)
{
v___y_4863_ = v_isMeta_4825_;
goto v___jp_4862_;
}
else
{
uint8_t v___x_4875_; 
v___x_4875_ = 0;
v___y_4863_ = v___x_4875_;
goto v___jp_4862_;
}
}
v___jp_4862_:
{
lean_object* v_toImport_4864_; lean_object* v_module_4865_; lean_object* v___x_4866_; 
v_toImport_4864_ = lean_ctor_get(v___x_4861_, 0);
lean_inc_ref(v_toImport_4864_);
lean_dec(v___x_4861_);
v_module_4865_ = lean_ctor_get(v_toImport_4864_, 0);
lean_inc(v_module_4865_);
lean_dec_ref(v_toImport_4864_);
lean_inc(v_declName_4824_);
v___x_4866_ = l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg(v_module_4865_, v___y_4863_, v_declName_4824_, v___y_4828_, v___y_4829_, v___y_4830_, v___y_4831_);
if (lean_obj_tag(v___x_4866_) == 0)
{
lean_object* v___x_4867_; lean_object* v___x_4868_; lean_object* v___x_4869_; lean_object* v___x_4870_; lean_object* v___x_4871_; 
lean_dec_ref(v___x_4866_);
v___x_4867_ = l_Lean_indirectModUseExt;
v___x_4868_ = lean_box(1);
v___x_4869_ = lean_box(0);
lean_inc_ref(v_env_4837_);
v___x_4870_ = l_Lean_SimplePersistentEnvExtension_getState___redArg(v___x_4860_, v___x_4867_, v_env_4837_, v___x_4868_, v___x_4869_);
v___x_4871_ = l_Std_DHashMap_Internal_Raw_u2080_Const_get_x3f___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__16___redArg(v___x_4870_, v_declName_4824_);
lean_dec(v___x_4870_);
if (lean_obj_tag(v___x_4871_) == 0)
{
lean_object* v___x_4872_; 
v___x_4872_ = ((lean_object*)(l_Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10___closed__3));
v___y_4839_ = v___x_4872_;
goto v___jp_4838_;
}
else
{
lean_object* v_val_4873_; 
v_val_4873_ = lean_ctor_get(v___x_4871_, 0);
lean_inc(v_val_4873_);
lean_dec_ref(v___x_4871_);
v___y_4839_ = v_val_4873_;
goto v___jp_4838_;
}
}
else
{
lean_dec_ref(v_env_4837_);
lean_dec(v_declName_4824_);
return v___x_4866_;
}
}
}
}
v___jp_4834_:
{
lean_object* v___x_4835_; lean_object* v___x_4836_; 
v___x_4835_ = lean_box(0);
v___x_4836_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_4836_, 0, v___x_4835_);
return v___x_4836_;
}
v___jp_4838_:
{
lean_object* v___x_4840_; size_t v_sz_4841_; size_t v___x_4842_; lean_object* v___x_4843_; 
v___x_4840_ = lean_box(0);
v_sz_4841_ = lean_array_size(v___y_4839_);
v___x_4842_ = ((size_t)0ULL);
v___x_4843_ = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__15(v_env_4837_, v_declName_4824_, v___y_4839_, v_sz_4841_, v___x_4842_, v___x_4840_, v___y_4826_, v___y_4827_, v___y_4828_, v___y_4829_, v___y_4830_, v___y_4831_);
lean_dec_ref(v___y_4839_);
lean_dec_ref(v_env_4837_);
if (lean_obj_tag(v___x_4843_) == 0)
{
lean_object* v___x_4845_; uint8_t v_isShared_4846_; uint8_t v_isSharedCheck_4850_; 
v_isSharedCheck_4850_ = !lean_is_exclusive(v___x_4843_);
if (v_isSharedCheck_4850_ == 0)
{
lean_object* v_unused_4851_; 
v_unused_4851_ = lean_ctor_get(v___x_4843_, 0);
lean_dec(v_unused_4851_);
v___x_4845_ = v___x_4843_;
v_isShared_4846_ = v_isSharedCheck_4850_;
goto v_resetjp_4844_;
}
else
{
lean_dec(v___x_4843_);
v___x_4845_ = lean_box(0);
v_isShared_4846_ = v_isSharedCheck_4850_;
goto v_resetjp_4844_;
}
v_resetjp_4844_:
{
lean_object* v___x_4848_; 
if (v_isShared_4846_ == 0)
{
lean_ctor_set(v___x_4845_, 0, v___x_4840_);
v___x_4848_ = v___x_4845_;
goto v_reusejp_4847_;
}
else
{
lean_object* v_reuseFailAlloc_4849_; 
v_reuseFailAlloc_4849_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_4849_, 0, v___x_4840_);
v___x_4848_ = v_reuseFailAlloc_4849_;
goto v_reusejp_4847_;
}
v_reusejp_4847_:
{
return v___x_4848_;
}
}
}
else
{
return v___x_4843_;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10___boxed(lean_object* v_declName_4876_, lean_object* v_isMeta_4877_, lean_object* v___y_4878_, lean_object* v___y_4879_, lean_object* v___y_4880_, lean_object* v___y_4881_, lean_object* v___y_4882_, lean_object* v___y_4883_, lean_object* v___y_4884_){
_start:
{
uint8_t v_isMeta_boxed_4885_; lean_object* v_res_4886_; 
v_isMeta_boxed_4885_ = lean_unbox(v_isMeta_4877_);
v_res_4886_ = l_Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10(v_declName_4876_, v_isMeta_boxed_4885_, v___y_4878_, v___y_4879_, v___y_4880_, v___y_4881_, v___y_4882_, v___y_4883_);
lean_dec(v___y_4883_);
lean_dec_ref(v___y_4882_);
lean_dec(v___y_4881_);
lean_dec_ref(v___y_4880_);
lean_dec(v___y_4879_);
lean_dec_ref(v___y_4878_);
return v_res_4886_;
}
}
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__11___redArg(lean_object* v_as_x27_4887_, lean_object* v_b_4888_, lean_object* v___y_4889_, lean_object* v___y_4890_, lean_object* v___y_4891_, lean_object* v___y_4892_, lean_object* v___y_4893_, lean_object* v___y_4894_){
_start:
{
if (lean_obj_tag(v_as_x27_4887_) == 0)
{
lean_object* v___x_4896_; 
v___x_4896_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_4896_, 0, v_b_4888_);
return v___x_4896_;
}
else
{
lean_object* v_head_4897_; lean_object* v_tail_4898_; uint8_t v___x_4899_; lean_object* v___x_4900_; 
v_head_4897_ = lean_ctor_get(v_as_x27_4887_, 0);
lean_inc(v_head_4897_);
v_tail_4898_ = lean_ctor_get(v_as_x27_4887_, 1);
lean_inc(v_tail_4898_);
lean_dec_ref(v_as_x27_4887_);
v___x_4899_ = 1;
v___x_4900_ = l_Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10(v_head_4897_, v___x_4899_, v___y_4889_, v___y_4890_, v___y_4891_, v___y_4892_, v___y_4893_, v___y_4894_);
if (lean_obj_tag(v___x_4900_) == 0)
{
lean_object* v___x_4901_; 
lean_dec_ref(v___x_4900_);
v___x_4901_ = lean_box(0);
v_as_x27_4887_ = v_tail_4898_;
v_b_4888_ = v___x_4901_;
goto _start;
}
else
{
lean_dec(v_tail_4898_);
return v___x_4900_;
}
}
}
}
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__11___redArg___boxed(lean_object* v_as_x27_4903_, lean_object* v_b_4904_, lean_object* v___y_4905_, lean_object* v___y_4906_, lean_object* v___y_4907_, lean_object* v___y_4908_, lean_object* v___y_4909_, lean_object* v___y_4910_, lean_object* v___y_4911_){
_start:
{
lean_object* v_res_4912_; 
v_res_4912_ = l_List_forIn_x27_loop___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__11___redArg(v_as_x27_4903_, v_b_4904_, v___y_4905_, v___y_4906_, v___y_4907_, v___y_4908_, v___y_4909_, v___y_4910_);
lean_dec(v___y_4910_);
lean_dec_ref(v___y_4909_);
lean_dec(v___y_4908_);
lean_dec_ref(v___y_4907_);
lean_dec(v___y_4906_);
lean_dec_ref(v___y_4905_);
return v_res_4912_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8___redArg___lam__3(lean_object* v_currNamespace_4913_, lean_object* v___y_4914_, lean_object* v___y_4915_){
_start:
{
lean_object* v___x_4916_; 
v___x_4916_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_4916_, 0, v_currNamespace_4913_);
lean_ctor_set(v___x_4916_, 1, v___y_4915_);
return v___x_4916_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8___redArg___lam__3___boxed(lean_object* v_currNamespace_4917_, lean_object* v___y_4918_, lean_object* v___y_4919_){
_start:
{
lean_object* v_res_4920_; 
v_res_4920_ = l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8___redArg___lam__3(v_currNamespace_4917_, v___y_4918_, v___y_4919_);
lean_dec_ref(v___y_4918_);
return v_res_4920_;
}
}
static lean_object* _init_l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__15___redArg___closed__0(void){
_start:
{
lean_object* v___x_4921_; lean_object* v___x_4922_; lean_object* v___x_4923_; 
v___x_4921_ = lean_box(0);
v___x_4922_ = l_Lean_Elab_unsupportedSyntaxExceptionId;
v___x_4923_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_4923_, 0, v___x_4922_);
lean_ctor_set(v___x_4923_, 1, v___x_4921_);
return v___x_4923_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__15___redArg(){
_start:
{
lean_object* v___x_4925_; lean_object* v___x_4926_; 
v___x_4925_ = lean_obj_once(&l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__15___redArg___closed__0, &l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__15___redArg___closed__0_once, _init_l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__15___redArg___closed__0);
v___x_4926_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_4926_, 0, v___x_4925_);
return v___x_4926_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__15___redArg___boxed(lean_object* v___y_4927_){
_start:
{
lean_object* v_res_4928_; 
v_res_4928_ = l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__15___redArg();
return v_res_4928_;
}
}
LEAN_EXPORT lean_object* l_List_forM___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__12___redArg(lean_object* v_as_4929_, lean_object* v___y_4930_, lean_object* v___y_4931_, lean_object* v___y_4932_, lean_object* v___y_4933_){
_start:
{
if (lean_obj_tag(v_as_4929_) == 0)
{
lean_object* v___x_4935_; lean_object* v___x_4936_; 
v___x_4935_ = lean_box(0);
v___x_4936_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_4936_, 0, v___x_4935_);
return v___x_4936_;
}
else
{
lean_object* v_head_4937_; lean_object* v_tail_4938_; lean_object* v_fst_4939_; lean_object* v_snd_4940_; lean_object* v___x_4941_; lean_object* v_a_4942_; lean_object* v___x_4944_; uint8_t v_isShared_4945_; uint8_t v_isSharedCheck_4954_; 
v_head_4937_ = lean_ctor_get(v_as_4929_, 0);
lean_inc(v_head_4937_);
v_tail_4938_ = lean_ctor_get(v_as_4929_, 1);
lean_inc(v_tail_4938_);
lean_dec_ref(v_as_4929_);
v_fst_4939_ = lean_ctor_get(v_head_4937_, 0);
lean_inc(v_fst_4939_);
v_snd_4940_ = lean_ctor_get(v_head_4937_, 1);
lean_inc(v_snd_4940_);
lean_dec(v_head_4937_);
lean_inc(v_fst_4939_);
v___x_4941_ = l_Lean_isTracingEnabledFor___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__2___redArg(v_fst_4939_, v___y_4932_);
v_a_4942_ = lean_ctor_get(v___x_4941_, 0);
v_isSharedCheck_4954_ = !lean_is_exclusive(v___x_4941_);
if (v_isSharedCheck_4954_ == 0)
{
v___x_4944_ = v___x_4941_;
v_isShared_4945_ = v_isSharedCheck_4954_;
goto v_resetjp_4943_;
}
else
{
lean_inc(v_a_4942_);
lean_dec(v___x_4941_);
v___x_4944_ = lean_box(0);
v_isShared_4945_ = v_isSharedCheck_4954_;
goto v_resetjp_4943_;
}
v_resetjp_4943_:
{
uint8_t v___x_4946_; 
v___x_4946_ = lean_unbox(v_a_4942_);
lean_dec(v_a_4942_);
if (v___x_4946_ == 0)
{
lean_del_object(v___x_4944_);
lean_dec(v_snd_4940_);
lean_dec(v_fst_4939_);
v_as_4929_ = v_tail_4938_;
goto _start;
}
else
{
lean_object* v___x_4949_; 
if (v_isShared_4945_ == 0)
{
lean_ctor_set_tag(v___x_4944_, 3);
lean_ctor_set(v___x_4944_, 0, v_snd_4940_);
v___x_4949_ = v___x_4944_;
goto v_reusejp_4948_;
}
else
{
lean_object* v_reuseFailAlloc_4953_; 
v_reuseFailAlloc_4953_ = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(v_reuseFailAlloc_4953_, 0, v_snd_4940_);
v___x_4949_ = v_reuseFailAlloc_4953_;
goto v_reusejp_4948_;
}
v_reusejp_4948_:
{
lean_object* v___x_4950_; lean_object* v___x_4951_; 
v___x_4950_ = l_Lean_MessageData_ofFormat(v___x_4949_);
v___x_4951_ = l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg(v_fst_4939_, v___x_4950_, v___y_4930_, v___y_4931_, v___y_4932_, v___y_4933_);
if (lean_obj_tag(v___x_4951_) == 0)
{
lean_dec_ref(v___x_4951_);
v_as_4929_ = v_tail_4938_;
goto _start;
}
else
{
lean_dec(v_tail_4938_);
return v___x_4951_;
}
}
}
}
}
}
}
LEAN_EXPORT lean_object* l_List_forM___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__12___redArg___boxed(lean_object* v_as_4955_, lean_object* v___y_4956_, lean_object* v___y_4957_, lean_object* v___y_4958_, lean_object* v___y_4959_, lean_object* v___y_4960_){
_start:
{
lean_object* v_res_4961_; 
v_res_4961_ = l_List_forM___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__12___redArg(v_as_4955_, v___y_4956_, v___y_4957_, v___y_4958_, v___y_4959_);
lean_dec(v___y_4959_);
lean_dec_ref(v___y_4958_);
lean_dec(v___y_4957_);
lean_dec_ref(v___y_4956_);
return v_res_4961_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8___redArg___lam__2(lean_object* v_env_4962_, lean_object* v_currNamespace_4963_, lean_object* v_openDecls_4964_, lean_object* v_n_4965_, lean_object* v___y_4966_, lean_object* v___y_4967_){
_start:
{
lean_object* v___x_4968_; lean_object* v___x_4969_; 
v___x_4968_ = l_Lean_ResolveName_resolveNamespace(v_env_4962_, v_currNamespace_4963_, v_openDecls_4964_, v_n_4965_);
v___x_4969_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_4969_, 0, v___x_4968_);
lean_ctor_set(v___x_4969_, 1, v___y_4967_);
return v___x_4969_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8___redArg___lam__2___boxed(lean_object* v_env_4970_, lean_object* v_currNamespace_4971_, lean_object* v_openDecls_4972_, lean_object* v_n_4973_, lean_object* v___y_4974_, lean_object* v___y_4975_){
_start:
{
lean_object* v_res_4976_; 
v_res_4976_ = l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8___redArg___lam__2(v_env_4970_, v_currNamespace_4971_, v_openDecls_4972_, v_n_4973_, v___y_4974_, v___y_4975_);
lean_dec_ref(v___y_4974_);
return v_res_4976_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8___redArg(lean_object* v_x_4978_, lean_object* v___y_4979_, lean_object* v___y_4980_, lean_object* v___y_4981_, lean_object* v___y_4982_, lean_object* v___y_4983_, lean_object* v___y_4984_){
_start:
{
lean_object* v___x_4986_; lean_object* v_env_4987_; lean_object* v_options_4988_; lean_object* v_currRecDepth_4989_; lean_object* v_maxRecDepth_4990_; lean_object* v_ref_4991_; lean_object* v_currNamespace_4992_; lean_object* v_openDecls_4993_; lean_object* v_quotContext_4994_; lean_object* v_currMacroScope_4995_; lean_object* v___x_4996_; lean_object* v_nextMacroScope_4997_; lean_object* v___f_4998_; lean_object* v___f_4999_; lean_object* v___f_5000_; lean_object* v___f_5001_; lean_object* v___f_5002_; lean_object* v_methods_5003_; lean_object* v___x_5004_; lean_object* v___x_5005_; lean_object* v___x_5006_; lean_object* v___x_5007_; 
v___x_4986_ = lean_st_ref_get(v___y_4984_);
v_env_4987_ = lean_ctor_get(v___x_4986_, 0);
lean_inc_ref(v_env_4987_);
lean_dec(v___x_4986_);
v_options_4988_ = lean_ctor_get(v___y_4983_, 2);
v_currRecDepth_4989_ = lean_ctor_get(v___y_4983_, 3);
v_maxRecDepth_4990_ = lean_ctor_get(v___y_4983_, 4);
v_ref_4991_ = lean_ctor_get(v___y_4983_, 5);
v_currNamespace_4992_ = lean_ctor_get(v___y_4983_, 6);
v_openDecls_4993_ = lean_ctor_get(v___y_4983_, 7);
v_quotContext_4994_ = lean_ctor_get(v___y_4983_, 10);
v_currMacroScope_4995_ = lean_ctor_get(v___y_4983_, 11);
v___x_4996_ = lean_st_ref_get(v___y_4984_);
v_nextMacroScope_4997_ = lean_ctor_get(v___x_4996_, 1);
lean_inc(v_nextMacroScope_4997_);
lean_dec(v___x_4996_);
lean_inc_ref(v_env_4987_);
v___f_4998_ = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8___redArg___lam__0___boxed), 4, 1);
lean_closure_set(v___f_4998_, 0, v_env_4987_);
lean_inc_ref(v_env_4987_);
v___f_4999_ = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8___redArg___lam__1___boxed), 4, 1);
lean_closure_set(v___f_4999_, 0, v_env_4987_);
lean_inc(v_openDecls_4993_);
lean_inc(v_currNamespace_4992_);
lean_inc_ref(v_env_4987_);
v___f_5000_ = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8___redArg___lam__2___boxed), 6, 3);
lean_closure_set(v___f_5000_, 0, v_env_4987_);
lean_closure_set(v___f_5000_, 1, v_currNamespace_4992_);
lean_closure_set(v___f_5000_, 2, v_openDecls_4993_);
lean_inc(v_currNamespace_4992_);
v___f_5001_ = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8___redArg___lam__3___boxed), 3, 1);
lean_closure_set(v___f_5001_, 0, v_currNamespace_4992_);
lean_inc(v_openDecls_4993_);
lean_inc(v_currNamespace_4992_);
lean_inc_ref(v_options_4988_);
v___f_5002_ = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8___redArg___lam__4___boxed), 7, 4);
lean_closure_set(v___f_5002_, 0, v_env_4987_);
lean_closure_set(v___f_5002_, 1, v_options_4988_);
lean_closure_set(v___f_5002_, 2, v_currNamespace_4992_);
lean_closure_set(v___f_5002_, 3, v_openDecls_4993_);
v_methods_5003_ = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(v_methods_5003_, 0, v___f_4998_);
lean_ctor_set(v_methods_5003_, 1, v___f_5001_);
lean_ctor_set(v_methods_5003_, 2, v___f_4999_);
lean_ctor_set(v_methods_5003_, 3, v___f_5000_);
lean_ctor_set(v_methods_5003_, 4, v___f_5002_);
lean_inc(v_ref_4991_);
lean_inc(v_maxRecDepth_4990_);
lean_inc(v_currRecDepth_4989_);
lean_inc(v_currMacroScope_4995_);
lean_inc(v_quotContext_4994_);
v___x_5004_ = lean_alloc_ctor(0, 6, 0);
lean_ctor_set(v___x_5004_, 0, v_methods_5003_);
lean_ctor_set(v___x_5004_, 1, v_quotContext_4994_);
lean_ctor_set(v___x_5004_, 2, v_currMacroScope_4995_);
lean_ctor_set(v___x_5004_, 3, v_currRecDepth_4989_);
lean_ctor_set(v___x_5004_, 4, v_maxRecDepth_4990_);
lean_ctor_set(v___x_5004_, 5, v_ref_4991_);
v___x_5005_ = lean_box(0);
v___x_5006_ = lean_alloc_ctor(0, 3, 0);
lean_ctor_set(v___x_5006_, 0, v_nextMacroScope_4997_);
lean_ctor_set(v___x_5006_, 1, v___x_5005_);
lean_ctor_set(v___x_5006_, 2, v___x_5005_);
v___x_5007_ = lean_apply_2(v_x_4978_, v___x_5004_, v___x_5006_);
if (lean_obj_tag(v___x_5007_) == 0)
{
lean_object* v_a_5008_; lean_object* v_a_5009_; lean_object* v_macroScope_5010_; lean_object* v_traceMsgs_5011_; lean_object* v_expandedMacroDecls_5012_; lean_object* v___x_5013_; lean_object* v___x_5014_; 
v_a_5008_ = lean_ctor_get(v___x_5007_, 1);
lean_inc(v_a_5008_);
v_a_5009_ = lean_ctor_get(v___x_5007_, 0);
lean_inc(v_a_5009_);
lean_dec_ref(v___x_5007_);
v_macroScope_5010_ = lean_ctor_get(v_a_5008_, 0);
lean_inc(v_macroScope_5010_);
v_traceMsgs_5011_ = lean_ctor_get(v_a_5008_, 1);
lean_inc(v_traceMsgs_5011_);
v_expandedMacroDecls_5012_ = lean_ctor_get(v_a_5008_, 2);
lean_inc(v_expandedMacroDecls_5012_);
lean_dec(v_a_5008_);
v___x_5013_ = lean_box(0);
v___x_5014_ = l_List_forIn_x27_loop___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__11___redArg(v_expandedMacroDecls_5012_, v___x_5013_, v___y_4979_, v___y_4980_, v___y_4981_, v___y_4982_, v___y_4983_, v___y_4984_);
lean_dec_ref(v___y_4979_);
if (lean_obj_tag(v___x_5014_) == 0)
{
lean_object* v___x_5015_; lean_object* v_env_5016_; lean_object* v_ngen_5017_; lean_object* v_auxDeclNGen_5018_; lean_object* v_traceState_5019_; lean_object* v_cache_5020_; lean_object* v_messages_5021_; lean_object* v_infoState_5022_; lean_object* v_snapshotTasks_5023_; lean_object* v___x_5025_; uint8_t v_isShared_5026_; uint8_t v_isSharedCheck_5049_; 
lean_dec_ref(v___x_5014_);
v___x_5015_ = lean_st_ref_take(v___y_4984_);
v_env_5016_ = lean_ctor_get(v___x_5015_, 0);
v_ngen_5017_ = lean_ctor_get(v___x_5015_, 2);
v_auxDeclNGen_5018_ = lean_ctor_get(v___x_5015_, 3);
v_traceState_5019_ = lean_ctor_get(v___x_5015_, 4);
v_cache_5020_ = lean_ctor_get(v___x_5015_, 5);
v_messages_5021_ = lean_ctor_get(v___x_5015_, 6);
v_infoState_5022_ = lean_ctor_get(v___x_5015_, 7);
v_snapshotTasks_5023_ = lean_ctor_get(v___x_5015_, 8);
v_isSharedCheck_5049_ = !lean_is_exclusive(v___x_5015_);
if (v_isSharedCheck_5049_ == 0)
{
lean_object* v_unused_5050_; 
v_unused_5050_ = lean_ctor_get(v___x_5015_, 1);
lean_dec(v_unused_5050_);
v___x_5025_ = v___x_5015_;
v_isShared_5026_ = v_isSharedCheck_5049_;
goto v_resetjp_5024_;
}
else
{
lean_inc(v_snapshotTasks_5023_);
lean_inc(v_infoState_5022_);
lean_inc(v_messages_5021_);
lean_inc(v_cache_5020_);
lean_inc(v_traceState_5019_);
lean_inc(v_auxDeclNGen_5018_);
lean_inc(v_ngen_5017_);
lean_inc(v_env_5016_);
lean_dec(v___x_5015_);
v___x_5025_ = lean_box(0);
v_isShared_5026_ = v_isSharedCheck_5049_;
goto v_resetjp_5024_;
}
v_resetjp_5024_:
{
lean_object* v___x_5028_; 
if (v_isShared_5026_ == 0)
{
lean_ctor_set(v___x_5025_, 1, v_macroScope_5010_);
v___x_5028_ = v___x_5025_;
goto v_reusejp_5027_;
}
else
{
lean_object* v_reuseFailAlloc_5048_; 
v_reuseFailAlloc_5048_ = lean_alloc_ctor(0, 9, 0);
lean_ctor_set(v_reuseFailAlloc_5048_, 0, v_env_5016_);
lean_ctor_set(v_reuseFailAlloc_5048_, 1, v_macroScope_5010_);
lean_ctor_set(v_reuseFailAlloc_5048_, 2, v_ngen_5017_);
lean_ctor_set(v_reuseFailAlloc_5048_, 3, v_auxDeclNGen_5018_);
lean_ctor_set(v_reuseFailAlloc_5048_, 4, v_traceState_5019_);
lean_ctor_set(v_reuseFailAlloc_5048_, 5, v_cache_5020_);
lean_ctor_set(v_reuseFailAlloc_5048_, 6, v_messages_5021_);
lean_ctor_set(v_reuseFailAlloc_5048_, 7, v_infoState_5022_);
lean_ctor_set(v_reuseFailAlloc_5048_, 8, v_snapshotTasks_5023_);
v___x_5028_ = v_reuseFailAlloc_5048_;
goto v_reusejp_5027_;
}
v_reusejp_5027_:
{
lean_object* v___x_5029_; lean_object* v___x_5030_; lean_object* v___x_5031_; 
v___x_5029_ = lean_st_ref_set(v___y_4984_, v___x_5028_);
v___x_5030_ = l_List_reverse___redArg(v_traceMsgs_5011_);
v___x_5031_ = l_List_forM___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__12___redArg(v___x_5030_, v___y_4981_, v___y_4982_, v___y_4983_, v___y_4984_);
lean_dec_ref(v___y_4983_);
if (lean_obj_tag(v___x_5031_) == 0)
{
lean_object* v___x_5033_; uint8_t v_isShared_5034_; uint8_t v_isSharedCheck_5038_; 
v_isSharedCheck_5038_ = !lean_is_exclusive(v___x_5031_);
if (v_isSharedCheck_5038_ == 0)
{
lean_object* v_unused_5039_; 
v_unused_5039_ = lean_ctor_get(v___x_5031_, 0);
lean_dec(v_unused_5039_);
v___x_5033_ = v___x_5031_;
v_isShared_5034_ = v_isSharedCheck_5038_;
goto v_resetjp_5032_;
}
else
{
lean_dec(v___x_5031_);
v___x_5033_ = lean_box(0);
v_isShared_5034_ = v_isSharedCheck_5038_;
goto v_resetjp_5032_;
}
v_resetjp_5032_:
{
lean_object* v___x_5036_; 
if (v_isShared_5034_ == 0)
{
lean_ctor_set(v___x_5033_, 0, v_a_5009_);
v___x_5036_ = v___x_5033_;
goto v_reusejp_5035_;
}
else
{
lean_object* v_reuseFailAlloc_5037_; 
v_reuseFailAlloc_5037_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5037_, 0, v_a_5009_);
v___x_5036_ = v_reuseFailAlloc_5037_;
goto v_reusejp_5035_;
}
v_reusejp_5035_:
{
return v___x_5036_;
}
}
}
else
{
lean_object* v_a_5040_; lean_object* v___x_5042_; uint8_t v_isShared_5043_; uint8_t v_isSharedCheck_5047_; 
lean_dec(v_a_5009_);
v_a_5040_ = lean_ctor_get(v___x_5031_, 0);
v_isSharedCheck_5047_ = !lean_is_exclusive(v___x_5031_);
if (v_isSharedCheck_5047_ == 0)
{
v___x_5042_ = v___x_5031_;
v_isShared_5043_ = v_isSharedCheck_5047_;
goto v_resetjp_5041_;
}
else
{
lean_inc(v_a_5040_);
lean_dec(v___x_5031_);
v___x_5042_ = lean_box(0);
v_isShared_5043_ = v_isSharedCheck_5047_;
goto v_resetjp_5041_;
}
v_resetjp_5041_:
{
lean_object* v___x_5045_; 
if (v_isShared_5043_ == 0)
{
v___x_5045_ = v___x_5042_;
goto v_reusejp_5044_;
}
else
{
lean_object* v_reuseFailAlloc_5046_; 
v_reuseFailAlloc_5046_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5046_, 0, v_a_5040_);
v___x_5045_ = v_reuseFailAlloc_5046_;
goto v_reusejp_5044_;
}
v_reusejp_5044_:
{
return v___x_5045_;
}
}
}
}
}
}
else
{
lean_object* v_a_5051_; lean_object* v___x_5053_; uint8_t v_isShared_5054_; uint8_t v_isSharedCheck_5058_; 
lean_dec(v_traceMsgs_5011_);
lean_dec(v_macroScope_5010_);
lean_dec(v_a_5009_);
lean_dec_ref(v___y_4983_);
v_a_5051_ = lean_ctor_get(v___x_5014_, 0);
v_isSharedCheck_5058_ = !lean_is_exclusive(v___x_5014_);
if (v_isSharedCheck_5058_ == 0)
{
v___x_5053_ = v___x_5014_;
v_isShared_5054_ = v_isSharedCheck_5058_;
goto v_resetjp_5052_;
}
else
{
lean_inc(v_a_5051_);
lean_dec(v___x_5014_);
v___x_5053_ = lean_box(0);
v_isShared_5054_ = v_isSharedCheck_5058_;
goto v_resetjp_5052_;
}
v_resetjp_5052_:
{
lean_object* v___x_5056_; 
if (v_isShared_5054_ == 0)
{
v___x_5056_ = v___x_5053_;
goto v_reusejp_5055_;
}
else
{
lean_object* v_reuseFailAlloc_5057_; 
v_reuseFailAlloc_5057_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5057_, 0, v_a_5051_);
v___x_5056_ = v_reuseFailAlloc_5057_;
goto v_reusejp_5055_;
}
v_reusejp_5055_:
{
return v___x_5056_;
}
}
}
}
else
{
lean_object* v_a_5059_; 
v_a_5059_ = lean_ctor_get(v___x_5007_, 0);
lean_inc(v_a_5059_);
lean_dec_ref(v___x_5007_);
if (lean_obj_tag(v_a_5059_) == 0)
{
lean_object* v_a_5060_; lean_object* v_a_5061_; lean_object* v___x_5062_; uint8_t v___x_5063_; 
v_a_5060_ = lean_ctor_get(v_a_5059_, 0);
lean_inc(v_a_5060_);
v_a_5061_ = lean_ctor_get(v_a_5059_, 1);
lean_inc_ref(v_a_5061_);
lean_dec_ref(v_a_5059_);
v___x_5062_ = ((lean_object*)(l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8___redArg___closed__0));
v___x_5063_ = lean_string_dec_eq(v_a_5061_, v___x_5062_);
if (v___x_5063_ == 0)
{
lean_object* v___x_5064_; lean_object* v___x_5065_; lean_object* v___x_5066_; 
v___x_5064_ = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(v___x_5064_, 0, v_a_5061_);
v___x_5065_ = l_Lean_MessageData_ofFormat(v___x_5064_);
v___x_5066_ = l_Lean_throwErrorAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__13___redArg(v_a_5060_, v___x_5065_, v___y_4979_, v___y_4980_, v___y_4981_, v___y_4982_, v___y_4983_, v___y_4984_);
lean_dec(v_a_5060_);
return v___x_5066_;
}
else
{
lean_object* v___x_5067_; 
lean_dec_ref(v_a_5061_);
lean_dec_ref(v___y_4983_);
lean_dec_ref(v___y_4979_);
v___x_5067_ = l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14___redArg(v_a_5060_);
return v___x_5067_;
}
}
else
{
lean_object* v___x_5068_; 
lean_dec_ref(v___y_4983_);
lean_dec_ref(v___y_4979_);
v___x_5068_ = l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__15___redArg();
return v___x_5068_;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8___redArg___boxed(lean_object* v_x_5069_, lean_object* v___y_5070_, lean_object* v___y_5071_, lean_object* v___y_5072_, lean_object* v___y_5073_, lean_object* v___y_5074_, lean_object* v___y_5075_, lean_object* v___y_5076_){
_start:
{
lean_object* v_res_5077_; 
v_res_5077_ = l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8___redArg(v_x_5069_, v___y_5070_, v___y_5071_, v___y_5072_, v___y_5073_, v___y_5074_, v___y_5075_);
lean_dec(v___y_5075_);
lean_dec(v___y_5073_);
lean_dec_ref(v___y_5072_);
lean_dec(v___y_5071_);
return v_res_5077_;
}
}
static lean_object* _init_l_Lean_Elab_Term_processDefDeriving___lam__6___closed__1(void){
_start:
{
lean_object* v___x_5079_; lean_object* v___x_5080_; 
v___x_5079_ = ((lean_object*)(l_Lean_Elab_Term_processDefDeriving___lam__6___closed__0));
v___x_5080_ = l_Lean_stringToMessageData(v___x_5079_);
return v___x_5080_;
}
}
static lean_object* _init_l_Lean_Elab_Term_processDefDeriving___lam__6___closed__3(void){
_start:
{
lean_object* v___x_5082_; lean_object* v___x_5083_; 
v___x_5082_ = ((lean_object*)(l_Lean_Elab_Term_processDefDeriving___lam__6___closed__2));
v___x_5083_ = l_Lean_stringToMessageData(v___x_5082_);
return v___x_5083_;
}
}
static lean_object* _init_l_Lean_Elab_Term_processDefDeriving___lam__6___closed__5(void){
_start:
{
lean_object* v___x_5085_; lean_object* v___x_5086_; 
v___x_5085_ = ((lean_object*)(l_Lean_Elab_Term_processDefDeriving___lam__6___closed__4));
v___x_5086_ = l_Lean_stringToMessageData(v___x_5085_);
return v___x_5086_;
}
}
static lean_object* _init_l_Lean_Elab_Term_processDefDeriving___lam__6___closed__7(void){
_start:
{
lean_object* v___x_5088_; lean_object* v___x_5089_; 
v___x_5088_ = lean_unsigned_to_nat(64u);
v___x_5089_ = l_Lean_mkPtrSet___redArg(v___x_5088_);
return v___x_5089_;
}
}
static lean_object* _init_l_Lean_Elab_Term_processDefDeriving___lam__6___closed__8(void){
_start:
{
lean_object* v___x_5090_; lean_object* v___x_5091_; lean_object* v___x_5092_; 
v___x_5090_ = lean_box(0);
v___x_5091_ = lean_unsigned_to_nat(16u);
v___x_5092_ = lean_mk_array(v___x_5091_, v___x_5090_);
return v___x_5092_;
}
}
static lean_object* _init_l_Lean_Elab_Term_processDefDeriving___lam__6___closed__9(void){
_start:
{
lean_object* v___x_5093_; lean_object* v___x_5094_; lean_object* v___x_5095_; 
v___x_5093_ = lean_obj_once(&l_Lean_Elab_Term_processDefDeriving___lam__6___closed__8, &l_Lean_Elab_Term_processDefDeriving___lam__6___closed__8_once, _init_l_Lean_Elab_Term_processDefDeriving___lam__6___closed__8);
v___x_5094_ = lean_unsigned_to_nat(0u);
v___x_5095_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_5095_, 0, v___x_5094_);
lean_ctor_set(v___x_5095_, 1, v___x_5093_);
return v___x_5095_;
}
}
static lean_object* _init_l_Lean_Elab_Term_processDefDeriving___lam__6___closed__10(void){
_start:
{
lean_object* v___x_5096_; lean_object* v___x_5097_; lean_object* v___x_5098_; 
v___x_5096_ = lean_obj_once(&l_Lean_Elab_Term_processDefDeriving___lam__6___closed__9, &l_Lean_Elab_Term_processDefDeriving___lam__6___closed__9_once, _init_l_Lean_Elab_Term_processDefDeriving___lam__6___closed__9);
v___x_5097_ = lean_obj_once(&l_Lean_Elab_Term_processDefDeriving___lam__6___closed__7, &l_Lean_Elab_Term_processDefDeriving___lam__6___closed__7_once, _init_l_Lean_Elab_Term_processDefDeriving___lam__6___closed__7);
v___x_5098_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_5098_, 0, v___x_5097_);
lean_ctor_set(v___x_5098_, 1, v___x_5096_);
return v___x_5098_;
}
}
static lean_object* _init_l_Lean_Elab_Term_processDefDeriving___lam__6___closed__13(void){
_start:
{
lean_object* v___x_5101_; lean_object* v___x_5102_; 
v___x_5101_ = ((lean_object*)(l_Lean_Elab_Term_processDefDeriving___lam__6___closed__12));
v___x_5102_ = l_Lean_stringToMessageData(v___x_5101_);
return v___x_5102_;
}
}
static lean_object* _init_l_Lean_Elab_Term_processDefDeriving___lam__6___closed__15(void){
_start:
{
lean_object* v___x_5104_; lean_object* v___x_5105_; 
v___x_5104_ = ((lean_object*)(l_Lean_Elab_Term_processDefDeriving___lam__6___closed__14));
v___x_5105_ = l_Lean_stringToMessageData(v___x_5104_);
return v___x_5105_;
}
}
static lean_object* _init_l_Lean_Elab_Term_processDefDeriving___lam__6___closed__17(void){
_start:
{
lean_object* v___x_5107_; lean_object* v___x_5108_; 
v___x_5107_ = ((lean_object*)(l_Lean_Elab_Term_processDefDeriving___lam__6___closed__16));
v___x_5108_ = l_Lean_stringToMessageData(v___x_5107_);
return v___x_5108_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_Term_processDefDeriving___lam__6(lean_object* v_declName_5109_, lean_object* v_a_5110_, lean_object* v___f_5111_, uint8_t v___x_5112_, uint8_t v_isNoncomputable_5113_, uint8_t v___x_5114_, lean_object* v_cmdRef_x3f_5115_, lean_object* v___y_5116_, lean_object* v___y_5117_, lean_object* v___y_5118_, lean_object* v___y_5119_, lean_object* v___y_5120_, lean_object* v___y_5121_){
_start:
{
lean_object* v___y_5124_; lean_object* v___y_5125_; lean_object* v___y_5126_; lean_object* v___y_5127_; lean_object* v___y_5128_; lean_object* v___y_5129_; lean_object* v___y_5130_; lean_object* v___y_5138_; lean_object* v___y_5139_; lean_object* v___y_5140_; lean_object* v___y_5141_; lean_object* v___y_5142_; lean_object* v___y_5143_; lean_object* v___y_5144_; lean_object* v___y_5156_; lean_object* v___y_5157_; lean_object* v___y_5158_; lean_object* v___y_5159_; lean_object* v___y_5160_; lean_object* v___y_5161_; lean_object* v___y_5162_; lean_object* v___y_5163_; lean_object* v___y_5202_; lean_object* v___y_5203_; lean_object* v___y_5204_; lean_object* v___y_5205_; lean_object* v___y_5206_; lean_object* v___y_5207_; lean_object* v___y_5208_; lean_object* v___y_5209_; lean_object* v___y_5214_; lean_object* v___y_5215_; lean_object* v___y_5216_; lean_object* v___y_5217_; lean_object* v___y_5218_; lean_object* v___y_5219_; lean_object* v___y_5220_; lean_object* v___y_5221_; lean_object* v___y_5222_; lean_object* v___x_5229_; 
lean_inc_ref(v___y_5120_);
lean_inc_ref(v___y_5116_);
lean_inc(v_declName_5109_);
v___x_5229_ = l_Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6(v_declName_5109_, v___y_5116_, v___y_5117_, v___y_5118_, v___y_5119_, v___y_5120_, v___y_5121_);
if (lean_obj_tag(v___x_5229_) == 0)
{
lean_object* v_a_5230_; 
v_a_5230_ = lean_ctor_get(v___x_5229_, 0);
lean_inc(v_a_5230_);
lean_dec_ref(v___x_5229_);
if (lean_obj_tag(v_a_5230_) == 1)
{
lean_object* v_val_5231_; lean_object* v_value_5232_; lean_object* v_dummy_5233_; lean_object* v_nargs_5234_; lean_object* v___x_5235_; lean_object* v___x_5236_; lean_object* v___x_5237_; lean_object* v___x_5238_; lean_object* v___x_5239_; lean_object* v___x_5240_; 
v_val_5231_ = lean_ctor_get(v_a_5230_, 0);
lean_inc_ref(v_val_5231_);
lean_dec_ref(v_a_5230_);
v_value_5232_ = lean_ctor_get(v_val_5231_, 1);
lean_inc_ref(v_value_5232_);
lean_dec_ref(v_val_5231_);
v_dummy_5233_ = lean_obj_once(&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst___closed__0, &l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst___closed__0_once, _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst___closed__0);
v_nargs_5234_ = l_Lean_Expr_getAppNumArgs(v_a_5110_);
lean_inc(v_nargs_5234_);
v___x_5235_ = lean_mk_array(v_nargs_5234_, v_dummy_5233_);
v___x_5236_ = lean_unsigned_to_nat(1u);
v___x_5237_ = lean_nat_sub(v_nargs_5234_, v___x_5236_);
lean_dec(v_nargs_5234_);
v___x_5238_ = l___private_Lean_Expr_0__Lean_Expr_getAppArgsAux(v_a_5110_, v___x_5235_, v___x_5237_);
v___x_5239_ = l_Lean_Expr_beta(v_value_5232_, v___x_5238_);
lean_inc(v___y_5121_);
lean_inc_ref(v___y_5120_);
lean_inc(v___y_5119_);
lean_inc_ref(v___y_5118_);
lean_inc(v___y_5117_);
lean_inc_ref(v___y_5116_);
v___x_5240_ = l_Lean_Meta_lambdaTelescope___at___00Lean_Elab_Term_processDefDeriving_spec__7___redArg(v___x_5239_, v___f_5111_, v___x_5112_, v___y_5116_, v___y_5117_, v___y_5118_, v___y_5119_, v___y_5120_, v___y_5121_);
if (lean_obj_tag(v___x_5240_) == 0)
{
lean_object* v_a_5241_; lean_object* v___x_5242_; lean_object* v_currNamespace_5243_; lean_object* v_levelParams_5244_; lean_object* v_type_5245_; lean_object* v_value_5246_; lean_object* v___x_5247_; lean_object* v___x_5248_; 
v_a_5241_ = lean_ctor_get(v___x_5240_, 0);
lean_inc(v_a_5241_);
lean_dec_ref(v___x_5240_);
v___x_5242_ = lean_st_ref_get(v___y_5121_);
v_currNamespace_5243_ = lean_ctor_get(v___y_5120_, 6);
v_levelParams_5244_ = lean_ctor_get(v_a_5241_, 0);
lean_inc_ref(v_levelParams_5244_);
v_type_5245_ = lean_ctor_get(v_a_5241_, 1);
lean_inc_ref(v_type_5245_);
v_value_5246_ = lean_ctor_get(v_a_5241_, 2);
lean_inc_ref(v_value_5246_);
lean_dec(v_a_5241_);
v___x_5247_ = ((lean_object*)(l_Lean_Elab_Term_processDefDeriving___lam__6___closed__6));
lean_inc(v___y_5121_);
lean_inc_ref(v___y_5120_);
lean_inc(v___y_5119_);
lean_inc_ref(v___y_5118_);
lean_inc_ref(v_type_5245_);
v___x_5248_ = l_Lean_Elab_Command_NameGen_mkBaseNameWithSuffix(v___x_5247_, v_type_5245_, v___y_5118_, v___y_5119_, v___y_5120_, v___y_5121_);
if (lean_obj_tag(v___x_5248_) == 0)
{
lean_object* v_a_5249_; lean_object* v___x_5250_; lean_object* v___x_5251_; lean_object* v___x_5252_; 
v_a_5249_ = lean_ctor_get(v___x_5248_, 0);
lean_inc(v_a_5249_);
lean_dec_ref(v___x_5248_);
lean_inc(v_currNamespace_5243_);
v___x_5250_ = l_Lean_Name_append(v_currNamespace_5243_, v_a_5249_);
v___x_5251_ = lean_alloc_closure((void*)(l_Lean_Elab_mkUnusedBaseName), 3, 1);
lean_closure_set(v___x_5251_, 0, v___x_5250_);
lean_inc_ref(v___y_5120_);
lean_inc_ref(v___y_5116_);
v___x_5252_ = l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8___redArg(v___x_5251_, v___y_5116_, v___y_5117_, v___y_5118_, v___y_5119_, v___y_5120_, v___y_5121_);
if (lean_obj_tag(v___x_5252_) == 0)
{
lean_object* v_a_5253_; lean_object* v_env_5254_; lean_object* v_instName_5256_; lean_object* v___y_5257_; lean_object* v___y_5258_; lean_object* v___y_5259_; lean_object* v___y_5260_; lean_object* v___y_5261_; lean_object* v___y_5262_; uint8_t v___x_5322_; 
v_a_5253_ = lean_ctor_get(v___x_5252_, 0);
lean_inc(v_a_5253_);
lean_dec_ref(v___x_5252_);
v_env_5254_ = lean_ctor_get(v___x_5242_, 0);
lean_inc_ref(v_env_5254_);
lean_dec(v___x_5242_);
v___x_5322_ = l_Lean_isPrivateName(v_declName_5109_);
lean_dec(v_declName_5109_);
if (v___x_5322_ == 0)
{
v_instName_5256_ = v_a_5253_;
v___y_5257_ = v___y_5116_;
v___y_5258_ = v___y_5117_;
v___y_5259_ = v___y_5118_;
v___y_5260_ = v___y_5119_;
v___y_5261_ = v___y_5120_;
v___y_5262_ = v___y_5121_;
goto v___jp_5255_;
}
else
{
lean_object* v___x_5323_; 
v___x_5323_ = l_Lean_mkPrivateName(v_env_5254_, v_a_5253_);
v_instName_5256_ = v___x_5323_;
v___y_5257_ = v___y_5116_;
v___y_5258_ = v___y_5117_;
v___y_5259_ = v___y_5118_;
v___y_5260_ = v___y_5119_;
v___y_5261_ = v___y_5120_;
v___y_5262_ = v___y_5121_;
goto v___jp_5255_;
}
v___jp_5255_:
{
uint32_t v___x_5263_; uint32_t v___x_5264_; uint32_t v___x_5265_; lean_object* v___x_5266_; lean_object* v___x_5267_; lean_object* v___x_5268_; lean_object* v_a_5269_; lean_object* v___x_5270_; 
lean_inc_ref(v_value_5246_);
lean_inc_ref(v_env_5254_);
v___x_5263_ = l_Lean_getMaxHeight(v_env_5254_, v_value_5246_);
v___x_5264_ = 1;
v___x_5265_ = lean_uint32_add(v___x_5263_, v___x_5264_);
v___x_5266_ = lean_alloc_ctor(2, 0, 4);
lean_ctor_set_uint32(v___x_5266_, 0, v___x_5265_);
v___x_5267_ = lean_array_to_list(v_levelParams_5244_);
lean_inc_ref(v_value_5246_);
lean_inc_ref(v_type_5245_);
lean_inc(v_instName_5256_);
v___x_5268_ = l_Lean_mkDefinitionValInferringUnsafe___at___00Lean_Elab_Term_processDefDeriving_spec__10___redArg(v_instName_5256_, v___x_5267_, v_type_5245_, v_value_5246_, v___x_5266_, v___y_5262_);
v_a_5269_ = lean_ctor_get(v___x_5268_, 0);
lean_inc(v_a_5269_);
lean_dec_ref(v___x_5268_);
lean_inc(v___y_5262_);
lean_inc_ref(v___y_5261_);
lean_inc(v___y_5260_);
lean_inc_ref(v___y_5259_);
v___x_5270_ = l_Lean_Meta_isProp(v_type_5245_, v___y_5259_, v___y_5260_, v___y_5261_, v___y_5262_);
if (lean_obj_tag(v___x_5270_) == 0)
{
if (v_isNoncomputable_5113_ == 0)
{
uint8_t v_isNoncomputableSection_5271_; 
v_isNoncomputableSection_5271_ = lean_ctor_get_uint8(v___y_5257_, sizeof(void*)*8 + 4);
if (v_isNoncomputableSection_5271_ == 0)
{
lean_object* v_a_5272_; uint8_t v___x_5273_; 
v_a_5272_ = lean_ctor_get(v___x_5270_, 0);
lean_inc(v_a_5272_);
lean_dec_ref(v___x_5270_);
v___x_5273_ = lean_unbox(v_a_5272_);
lean_dec(v_a_5272_);
if (v___x_5273_ == 0)
{
lean_object* v___x_5274_; lean_object* v___f_5275_; lean_object* v___x_5276_; lean_object* v___x_5277_; lean_object* v___x_5278_; lean_object* v_fst_5279_; lean_object* v___x_5281_; uint8_t v_isShared_5282_; uint8_t v_isSharedCheck_5312_; 
v___x_5274_ = lean_box(0);
v___f_5275_ = lean_alloc_closure((void*)(l_Lean_Elab_Term_processDefDeriving___lam__5___boxed), 4, 2);
lean_closure_set(v___f_5275_, 0, v_env_5254_);
lean_closure_set(v___f_5275_, 1, v___x_5274_);
v___x_5276_ = lean_unsigned_to_nat(0u);
v___x_5277_ = lean_obj_once(&l_Lean_Elab_Term_processDefDeriving___lam__6___closed__10, &l_Lean_Elab_Term_processDefDeriving___lam__6___closed__10_once, _init_l_Lean_Elab_Term_processDefDeriving___lam__6___closed__10);
v___x_5278_ = l___private_Lean_Util_FoldConsts_0__Lean_Expr_FoldConstsImpl_fold_visit(lean_box(0), v___f_5275_, v_value_5246_, v___x_5274_, v___x_5277_);
v_fst_5279_ = lean_ctor_get(v___x_5278_, 0);
v_isSharedCheck_5312_ = !lean_is_exclusive(v___x_5278_);
if (v_isSharedCheck_5312_ == 0)
{
lean_object* v_unused_5313_; 
v_unused_5313_ = lean_ctor_get(v___x_5278_, 1);
lean_dec(v_unused_5313_);
v___x_5281_ = v___x_5278_;
v_isShared_5282_ = v_isSharedCheck_5312_;
goto v_resetjp_5280_;
}
else
{
lean_inc(v_fst_5279_);
lean_dec(v___x_5278_);
v___x_5281_ = lean_box(0);
v_isShared_5282_ = v_isSharedCheck_5312_;
goto v_resetjp_5280_;
}
v_resetjp_5280_:
{
if (lean_obj_tag(v_fst_5279_) == 1)
{
if (lean_obj_tag(v_cmdRef_x3f_5115_) == 1)
{
lean_object* v_val_5283_; lean_object* v_val_5284_; lean_object* v___x_5285_; 
v_val_5283_ = lean_ctor_get(v_fst_5279_, 0);
lean_inc(v_val_5283_);
lean_dec_ref(v_fst_5279_);
v_val_5284_ = lean_ctor_get(v_cmdRef_x3f_5115_, 0);
lean_inc(v_val_5284_);
lean_dec_ref(v_cmdRef_x3f_5115_);
lean_inc(v_val_5284_);
v___x_5285_ = l_Lean_Syntax_reprint(v_val_5284_);
if (lean_obj_tag(v___x_5285_) == 1)
{
lean_object* v_val_5286_; lean_object* v___x_5288_; uint8_t v_isShared_5289_; uint8_t v_isSharedCheck_5310_; 
v_val_5286_ = lean_ctor_get(v___x_5285_, 0);
v_isSharedCheck_5310_ = !lean_is_exclusive(v___x_5285_);
if (v_isSharedCheck_5310_ == 0)
{
v___x_5288_ = v___x_5285_;
v_isShared_5289_ = v_isSharedCheck_5310_;
goto v_resetjp_5287_;
}
else
{
lean_inc(v_val_5286_);
lean_dec(v___x_5285_);
v___x_5288_ = lean_box(0);
v_isShared_5289_ = v_isSharedCheck_5310_;
goto v_resetjp_5287_;
}
v_resetjp_5287_:
{
lean_object* v___x_5290_; lean_object* v___x_5291_; lean_object* v___x_5292_; lean_object* v___x_5293_; lean_object* v___x_5294_; lean_object* v___x_5295_; lean_object* v___x_5296_; lean_object* v_str_5297_; lean_object* v_startInclusive_5298_; lean_object* v_endExclusive_5299_; lean_object* v___x_5300_; lean_object* v___x_5301_; lean_object* v___x_5303_; 
v___x_5290_ = ((lean_object*)(l_Lean_Elab_Term_processDefDeriving___lam__6___closed__11));
v___x_5291_ = lean_string_utf8_byte_size(v_val_5286_);
v___x_5292_ = lean_alloc_ctor(0, 3, 0);
lean_ctor_set(v___x_5292_, 0, v_val_5286_);
lean_ctor_set(v___x_5292_, 1, v___x_5276_);
lean_ctor_set(v___x_5292_, 2, v___x_5291_);
v___x_5293_ = l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg(v___x_5292_, v___x_5290_);
v___x_5294_ = lean_string_utf8_byte_size(v___x_5293_);
v___x_5295_ = lean_alloc_ctor(0, 3, 0);
lean_ctor_set(v___x_5295_, 0, v___x_5293_);
lean_ctor_set(v___x_5295_, 1, v___x_5276_);
lean_ctor_set(v___x_5295_, 2, v___x_5294_);
v___x_5296_ = l_String_Slice_trimAscii(v___x_5295_);
lean_dec_ref(v___x_5295_);
v_str_5297_ = lean_ctor_get(v___x_5296_, 0);
lean_inc_ref(v_str_5297_);
v_startInclusive_5298_ = lean_ctor_get(v___x_5296_, 1);
lean_inc(v_startInclusive_5298_);
v_endExclusive_5299_ = lean_ctor_get(v___x_5296_, 2);
lean_inc(v_endExclusive_5299_);
lean_dec_ref(v___x_5296_);
v___x_5300_ = lean_obj_once(&l_Lean_Elab_Term_processDefDeriving___lam__6___closed__13, &l_Lean_Elab_Term_processDefDeriving___lam__6___closed__13_once, _init_l_Lean_Elab_Term_processDefDeriving___lam__6___closed__13);
v___x_5301_ = lean_string_utf8_extract(v_str_5297_, v_startInclusive_5298_, v_endExclusive_5299_);
lean_dec(v_endExclusive_5299_);
lean_dec(v_startInclusive_5298_);
lean_dec_ref(v_str_5297_);
if (v_isShared_5289_ == 0)
{
lean_ctor_set_tag(v___x_5288_, 3);
lean_ctor_set(v___x_5288_, 0, v___x_5301_);
v___x_5303_ = v___x_5288_;
goto v_reusejp_5302_;
}
else
{
lean_object* v_reuseFailAlloc_5309_; 
v_reuseFailAlloc_5309_ = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5309_, 0, v___x_5301_);
v___x_5303_ = v_reuseFailAlloc_5309_;
goto v_reusejp_5302_;
}
v_reusejp_5302_:
{
lean_object* v___x_5304_; lean_object* v___x_5306_; 
v___x_5304_ = l_Lean_MessageData_ofFormat(v___x_5303_);
if (v_isShared_5282_ == 0)
{
lean_ctor_set_tag(v___x_5281_, 7);
lean_ctor_set(v___x_5281_, 1, v___x_5304_);
lean_ctor_set(v___x_5281_, 0, v___x_5300_);
v___x_5306_ = v___x_5281_;
goto v_reusejp_5305_;
}
else
{
lean_object* v_reuseFailAlloc_5308_; 
v_reuseFailAlloc_5308_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v_reuseFailAlloc_5308_, 0, v___x_5300_);
lean_ctor_set(v_reuseFailAlloc_5308_, 1, v___x_5304_);
v___x_5306_ = v_reuseFailAlloc_5308_;
goto v_reusejp_5305_;
}
v_reusejp_5305_:
{
lean_object* v___x_5307_; 
lean_inc_ref(v___y_5261_);
v___x_5307_ = l_Lean_logInfoAt___at___00Lean_Elab_Term_processDefDeriving_spec__12___redArg(v_val_5284_, v___x_5306_, v___y_5259_, v___y_5260_, v___y_5261_, v___y_5262_);
lean_dec(v_val_5284_);
if (lean_obj_tag(v___x_5307_) == 0)
{
lean_dec_ref(v___x_5307_);
v___y_5214_ = v_val_5283_;
v___y_5215_ = v_a_5269_;
v___y_5216_ = v_instName_5256_;
v___y_5217_ = v___y_5257_;
v___y_5218_ = v___y_5258_;
v___y_5219_ = v___y_5259_;
v___y_5220_ = v___y_5260_;
v___y_5221_ = v___y_5261_;
v___y_5222_ = v___y_5262_;
goto v___jp_5213_;
}
else
{
lean_dec(v_val_5283_);
lean_dec(v_a_5269_);
lean_dec(v___y_5262_);
lean_dec_ref(v___y_5261_);
lean_dec(v___y_5260_);
lean_dec_ref(v___y_5259_);
lean_dec(v___y_5258_);
lean_dec_ref(v___y_5257_);
lean_dec(v_instName_5256_);
return v___x_5307_;
}
}
}
}
}
else
{
lean_dec(v___x_5285_);
lean_dec(v_val_5284_);
lean_del_object(v___x_5281_);
v___y_5214_ = v_val_5283_;
v___y_5215_ = v_a_5269_;
v___y_5216_ = v_instName_5256_;
v___y_5217_ = v___y_5257_;
v___y_5218_ = v___y_5258_;
v___y_5219_ = v___y_5259_;
v___y_5220_ = v___y_5260_;
v___y_5221_ = v___y_5261_;
v___y_5222_ = v___y_5262_;
goto v___jp_5213_;
}
}
else
{
lean_object* v_val_5311_; 
lean_del_object(v___x_5281_);
lean_dec(v_cmdRef_x3f_5115_);
v_val_5311_ = lean_ctor_get(v_fst_5279_, 0);
lean_inc(v_val_5311_);
lean_dec_ref(v_fst_5279_);
v___y_5214_ = v_val_5311_;
v___y_5215_ = v_a_5269_;
v___y_5216_ = v_instName_5256_;
v___y_5217_ = v___y_5257_;
v___y_5218_ = v___y_5258_;
v___y_5219_ = v___y_5259_;
v___y_5220_ = v___y_5260_;
v___y_5221_ = v___y_5261_;
v___y_5222_ = v___y_5262_;
goto v___jp_5213_;
}
}
else
{
lean_del_object(v___x_5281_);
lean_dec(v_fst_5279_);
lean_dec(v_cmdRef_x3f_5115_);
v___y_5202_ = v_a_5269_;
v___y_5203_ = v_instName_5256_;
v___y_5204_ = v___y_5257_;
v___y_5205_ = v___y_5258_;
v___y_5206_ = v___y_5259_;
v___y_5207_ = v___y_5260_;
v___y_5208_ = v___y_5261_;
v___y_5209_ = v___y_5262_;
goto v___jp_5201_;
}
}
}
else
{
lean_dec_ref(v_env_5254_);
lean_dec_ref(v_value_5246_);
lean_dec(v_cmdRef_x3f_5115_);
v___y_5202_ = v_a_5269_;
v___y_5203_ = v_instName_5256_;
v___y_5204_ = v___y_5257_;
v___y_5205_ = v___y_5258_;
v___y_5206_ = v___y_5259_;
v___y_5207_ = v___y_5260_;
v___y_5208_ = v___y_5261_;
v___y_5209_ = v___y_5262_;
goto v___jp_5201_;
}
}
else
{
lean_dec_ref(v___x_5270_);
lean_dec_ref(v_env_5254_);
lean_dec_ref(v_value_5246_);
lean_dec(v_cmdRef_x3f_5115_);
v___y_5202_ = v_a_5269_;
v___y_5203_ = v_instName_5256_;
v___y_5204_ = v___y_5257_;
v___y_5205_ = v___y_5258_;
v___y_5206_ = v___y_5259_;
v___y_5207_ = v___y_5260_;
v___y_5208_ = v___y_5261_;
v___y_5209_ = v___y_5262_;
goto v___jp_5201_;
}
}
else
{
lean_dec_ref(v___x_5270_);
lean_dec_ref(v_env_5254_);
lean_dec_ref(v_value_5246_);
lean_dec(v_cmdRef_x3f_5115_);
v___y_5202_ = v_a_5269_;
v___y_5203_ = v_instName_5256_;
v___y_5204_ = v___y_5257_;
v___y_5205_ = v___y_5258_;
v___y_5206_ = v___y_5259_;
v___y_5207_ = v___y_5260_;
v___y_5208_ = v___y_5261_;
v___y_5209_ = v___y_5262_;
goto v___jp_5201_;
}
}
else
{
lean_object* v_a_5314_; lean_object* v___x_5316_; uint8_t v_isShared_5317_; uint8_t v_isSharedCheck_5321_; 
lean_dec(v_a_5269_);
lean_dec(v___y_5262_);
lean_dec_ref(v___y_5261_);
lean_dec(v___y_5260_);
lean_dec_ref(v___y_5259_);
lean_dec(v___y_5258_);
lean_dec_ref(v___y_5257_);
lean_dec(v_instName_5256_);
lean_dec_ref(v_env_5254_);
lean_dec_ref(v_value_5246_);
lean_dec(v_cmdRef_x3f_5115_);
v_a_5314_ = lean_ctor_get(v___x_5270_, 0);
v_isSharedCheck_5321_ = !lean_is_exclusive(v___x_5270_);
if (v_isSharedCheck_5321_ == 0)
{
v___x_5316_ = v___x_5270_;
v_isShared_5317_ = v_isSharedCheck_5321_;
goto v_resetjp_5315_;
}
else
{
lean_inc(v_a_5314_);
lean_dec(v___x_5270_);
v___x_5316_ = lean_box(0);
v_isShared_5317_ = v_isSharedCheck_5321_;
goto v_resetjp_5315_;
}
v_resetjp_5315_:
{
lean_object* v___x_5319_; 
if (v_isShared_5317_ == 0)
{
v___x_5319_ = v___x_5316_;
goto v_reusejp_5318_;
}
else
{
lean_object* v_reuseFailAlloc_5320_; 
v_reuseFailAlloc_5320_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5320_, 0, v_a_5314_);
v___x_5319_ = v_reuseFailAlloc_5320_;
goto v_reusejp_5318_;
}
v_reusejp_5318_:
{
return v___x_5319_;
}
}
}
}
}
else
{
lean_object* v_a_5324_; lean_object* v___x_5326_; uint8_t v_isShared_5327_; uint8_t v_isSharedCheck_5331_; 
lean_dec_ref(v_value_5246_);
lean_dec_ref(v_type_5245_);
lean_dec_ref(v_levelParams_5244_);
lean_dec(v___x_5242_);
lean_dec(v___y_5121_);
lean_dec_ref(v___y_5120_);
lean_dec(v___y_5119_);
lean_dec_ref(v___y_5118_);
lean_dec(v___y_5117_);
lean_dec_ref(v___y_5116_);
lean_dec(v_cmdRef_x3f_5115_);
lean_dec(v_declName_5109_);
v_a_5324_ = lean_ctor_get(v___x_5252_, 0);
v_isSharedCheck_5331_ = !lean_is_exclusive(v___x_5252_);
if (v_isSharedCheck_5331_ == 0)
{
v___x_5326_ = v___x_5252_;
v_isShared_5327_ = v_isSharedCheck_5331_;
goto v_resetjp_5325_;
}
else
{
lean_inc(v_a_5324_);
lean_dec(v___x_5252_);
v___x_5326_ = lean_box(0);
v_isShared_5327_ = v_isSharedCheck_5331_;
goto v_resetjp_5325_;
}
v_resetjp_5325_:
{
lean_object* v___x_5329_; 
if (v_isShared_5327_ == 0)
{
v___x_5329_ = v___x_5326_;
goto v_reusejp_5328_;
}
else
{
lean_object* v_reuseFailAlloc_5330_; 
v_reuseFailAlloc_5330_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5330_, 0, v_a_5324_);
v___x_5329_ = v_reuseFailAlloc_5330_;
goto v_reusejp_5328_;
}
v_reusejp_5328_:
{
return v___x_5329_;
}
}
}
}
else
{
lean_object* v_a_5332_; lean_object* v___x_5334_; uint8_t v_isShared_5335_; uint8_t v_isSharedCheck_5339_; 
lean_dec_ref(v_value_5246_);
lean_dec_ref(v_type_5245_);
lean_dec_ref(v_levelParams_5244_);
lean_dec(v___x_5242_);
lean_dec(v___y_5121_);
lean_dec_ref(v___y_5120_);
lean_dec(v___y_5119_);
lean_dec_ref(v___y_5118_);
lean_dec(v___y_5117_);
lean_dec_ref(v___y_5116_);
lean_dec(v_cmdRef_x3f_5115_);
lean_dec(v_declName_5109_);
v_a_5332_ = lean_ctor_get(v___x_5248_, 0);
v_isSharedCheck_5339_ = !lean_is_exclusive(v___x_5248_);
if (v_isSharedCheck_5339_ == 0)
{
v___x_5334_ = v___x_5248_;
v_isShared_5335_ = v_isSharedCheck_5339_;
goto v_resetjp_5333_;
}
else
{
lean_inc(v_a_5332_);
lean_dec(v___x_5248_);
v___x_5334_ = lean_box(0);
v_isShared_5335_ = v_isSharedCheck_5339_;
goto v_resetjp_5333_;
}
v_resetjp_5333_:
{
lean_object* v___x_5337_; 
if (v_isShared_5335_ == 0)
{
v___x_5337_ = v___x_5334_;
goto v_reusejp_5336_;
}
else
{
lean_object* v_reuseFailAlloc_5338_; 
v_reuseFailAlloc_5338_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5338_, 0, v_a_5332_);
v___x_5337_ = v_reuseFailAlloc_5338_;
goto v_reusejp_5336_;
}
v_reusejp_5336_:
{
return v___x_5337_;
}
}
}
}
else
{
lean_object* v_a_5340_; lean_object* v___x_5342_; uint8_t v_isShared_5343_; uint8_t v_isSharedCheck_5347_; 
lean_dec(v___y_5121_);
lean_dec_ref(v___y_5120_);
lean_dec(v___y_5119_);
lean_dec_ref(v___y_5118_);
lean_dec(v___y_5117_);
lean_dec_ref(v___y_5116_);
lean_dec(v_cmdRef_x3f_5115_);
lean_dec(v_declName_5109_);
v_a_5340_ = lean_ctor_get(v___x_5240_, 0);
v_isSharedCheck_5347_ = !lean_is_exclusive(v___x_5240_);
if (v_isSharedCheck_5347_ == 0)
{
v___x_5342_ = v___x_5240_;
v_isShared_5343_ = v_isSharedCheck_5347_;
goto v_resetjp_5341_;
}
else
{
lean_inc(v_a_5340_);
lean_dec(v___x_5240_);
v___x_5342_ = lean_box(0);
v_isShared_5343_ = v_isSharedCheck_5347_;
goto v_resetjp_5341_;
}
v_resetjp_5341_:
{
lean_object* v___x_5345_; 
if (v_isShared_5343_ == 0)
{
v___x_5345_ = v___x_5342_;
goto v_reusejp_5344_;
}
else
{
lean_object* v_reuseFailAlloc_5346_; 
v_reuseFailAlloc_5346_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5346_, 0, v_a_5340_);
v___x_5345_ = v_reuseFailAlloc_5346_;
goto v_reusejp_5344_;
}
v_reusejp_5344_:
{
return v___x_5345_;
}
}
}
}
else
{
lean_object* v___x_5348_; lean_object* v___x_5349_; lean_object* v___x_5350_; lean_object* v___x_5351_; lean_object* v___x_5352_; lean_object* v___x_5353_; 
lean_dec(v_a_5230_);
lean_dec(v_cmdRef_x3f_5115_);
lean_dec_ref(v___f_5111_);
lean_dec_ref(v_a_5110_);
v___x_5348_ = lean_obj_once(&l_Lean_Elab_Term_processDefDeriving___lam__6___closed__15, &l_Lean_Elab_Term_processDefDeriving___lam__6___closed__15_once, _init_l_Lean_Elab_Term_processDefDeriving___lam__6___closed__15);
v___x_5349_ = l_Lean_MessageData_ofConstName(v_declName_5109_, v___x_5112_);
v___x_5350_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_5350_, 0, v___x_5348_);
lean_ctor_set(v___x_5350_, 1, v___x_5349_);
v___x_5351_ = lean_obj_once(&l_Lean_Elab_Term_processDefDeriving___lam__6___closed__17, &l_Lean_Elab_Term_processDefDeriving___lam__6___closed__17_once, _init_l_Lean_Elab_Term_processDefDeriving___lam__6___closed__17);
v___x_5352_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_5352_, 0, v___x_5350_);
lean_ctor_set(v___x_5352_, 1, v___x_5351_);
v___x_5353_ = l_Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4___redArg(v___x_5352_, v___y_5116_, v___y_5117_, v___y_5118_, v___y_5119_, v___y_5120_, v___y_5121_);
lean_dec(v___y_5121_);
lean_dec_ref(v___y_5120_);
lean_dec(v___y_5119_);
lean_dec_ref(v___y_5118_);
lean_dec(v___y_5117_);
return v___x_5353_;
}
}
else
{
lean_object* v_a_5354_; lean_object* v___x_5356_; uint8_t v_isShared_5357_; uint8_t v_isSharedCheck_5361_; 
lean_dec(v___y_5121_);
lean_dec_ref(v___y_5120_);
lean_dec(v___y_5119_);
lean_dec_ref(v___y_5118_);
lean_dec(v___y_5117_);
lean_dec_ref(v___y_5116_);
lean_dec(v_cmdRef_x3f_5115_);
lean_dec_ref(v___f_5111_);
lean_dec_ref(v_a_5110_);
lean_dec(v_declName_5109_);
v_a_5354_ = lean_ctor_get(v___x_5229_, 0);
v_isSharedCheck_5361_ = !lean_is_exclusive(v___x_5229_);
if (v_isSharedCheck_5361_ == 0)
{
v___x_5356_ = v___x_5229_;
v_isShared_5357_ = v_isSharedCheck_5361_;
goto v_resetjp_5355_;
}
else
{
lean_inc(v_a_5354_);
lean_dec(v___x_5229_);
v___x_5356_ = lean_box(0);
v_isShared_5357_ = v_isSharedCheck_5361_;
goto v_resetjp_5355_;
}
v_resetjp_5355_:
{
lean_object* v___x_5359_; 
if (v_isShared_5357_ == 0)
{
v___x_5359_ = v___x_5356_;
goto v_reusejp_5358_;
}
else
{
lean_object* v_reuseFailAlloc_5360_; 
v_reuseFailAlloc_5360_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5360_, 0, v_a_5354_);
v___x_5359_ = v_reuseFailAlloc_5360_;
goto v_reusejp_5358_;
}
v_reusejp_5358_:
{
return v___x_5359_;
}
}
}
v___jp_5123_:
{
uint8_t v___x_5131_; lean_object* v___x_5132_; lean_object* v___x_5133_; 
v___x_5131_ = 0;
v___x_5132_ = lean_unsigned_to_nat(1000u);
lean_inc(v___y_5130_);
lean_inc_ref(v___y_5129_);
lean_inc(v___y_5128_);
lean_inc_ref(v___y_5127_);
lean_inc(v___y_5124_);
v___x_5133_ = l_Lean_Meta_registerInstance(v___y_5124_, v___x_5131_, v___x_5132_, v___y_5127_, v___y_5128_, v___y_5129_, v___y_5130_);
if (lean_obj_tag(v___x_5133_) == 0)
{
lean_object* v_ref_5134_; lean_object* v___x_5135_; lean_object* v___x_5136_; 
lean_dec_ref(v___x_5133_);
v_ref_5134_ = lean_ctor_get(v___y_5129_, 5);
lean_inc(v_ref_5134_);
v___x_5135_ = lean_box(0);
v___x_5136_ = l_Lean_Elab_addDeclarationRangesFromSyntax___at___00Lean_Elab_Term_processDefDeriving_spec__9(v___y_5124_, v_ref_5134_, v___x_5135_, v___y_5125_, v___y_5126_, v___y_5127_, v___y_5128_, v___y_5129_, v___y_5130_);
lean_dec(v___y_5130_);
lean_dec(v___y_5128_);
lean_dec_ref(v___y_5127_);
lean_dec(v___y_5126_);
lean_dec_ref(v___y_5125_);
lean_dec(v_ref_5134_);
return v___x_5136_;
}
else
{
lean_dec(v___y_5130_);
lean_dec_ref(v___y_5129_);
lean_dec(v___y_5128_);
lean_dec_ref(v___y_5127_);
lean_dec(v___y_5126_);
lean_dec_ref(v___y_5125_);
lean_dec(v___y_5124_);
return v___x_5133_;
}
}
v___jp_5137_:
{
lean_object* v___x_5145_; lean_object* v___x_5146_; lean_object* v_a_5147_; uint8_t v___x_5148_; 
v___x_5145_ = ((lean_object*)(l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__1));
v___x_5146_ = l_Lean_isTracingEnabledFor___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__2___redArg(v___x_5145_, v___y_5143_);
v_a_5147_ = lean_ctor_get(v___x_5146_, 0);
lean_inc(v_a_5147_);
lean_dec_ref(v___x_5146_);
v___x_5148_ = lean_unbox(v_a_5147_);
lean_dec(v_a_5147_);
if (v___x_5148_ == 0)
{
v___y_5124_ = v___y_5138_;
v___y_5125_ = v___y_5139_;
v___y_5126_ = v___y_5140_;
v___y_5127_ = v___y_5141_;
v___y_5128_ = v___y_5142_;
v___y_5129_ = v___y_5143_;
v___y_5130_ = v___y_5144_;
goto v___jp_5123_;
}
else
{
lean_object* v___x_5149_; lean_object* v___x_5150_; lean_object* v___x_5151_; lean_object* v___x_5152_; lean_object* v___x_5153_; lean_object* v___x_5154_; 
v___x_5149_ = lean_obj_once(&l_Lean_Elab_Term_processDefDeriving___lam__6___closed__1, &l_Lean_Elab_Term_processDefDeriving___lam__6___closed__1_once, _init_l_Lean_Elab_Term_processDefDeriving___lam__6___closed__1);
lean_inc(v___y_5138_);
v___x_5150_ = l_Lean_MessageData_ofConstName(v___y_5138_, v___x_5112_);
v___x_5151_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_5151_, 0, v___x_5149_);
lean_ctor_set(v___x_5151_, 1, v___x_5150_);
v___x_5152_ = lean_obj_once(&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__5, &l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__5_once, _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__5);
v___x_5153_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_5153_, 0, v___x_5151_);
lean_ctor_set(v___x_5153_, 1, v___x_5152_);
v___x_5154_ = l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg(v___x_5145_, v___x_5153_, v___y_5141_, v___y_5142_, v___y_5143_, v___y_5144_);
if (lean_obj_tag(v___x_5154_) == 0)
{
lean_dec_ref(v___x_5154_);
v___y_5124_ = v___y_5138_;
v___y_5125_ = v___y_5139_;
v___y_5126_ = v___y_5140_;
v___y_5127_ = v___y_5141_;
v___y_5128_ = v___y_5142_;
v___y_5129_ = v___y_5143_;
v___y_5130_ = v___y_5144_;
goto v___jp_5123_;
}
else
{
lean_dec(v___y_5144_);
lean_dec_ref(v___y_5143_);
lean_dec(v___y_5142_);
lean_dec_ref(v___y_5141_);
lean_dec(v___y_5140_);
lean_dec_ref(v___y_5139_);
lean_dec(v___y_5138_);
return v___x_5154_;
}
}
}
v___jp_5155_:
{
lean_object* v___x_5164_; lean_object* v___x_5165_; 
v___x_5164_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_5164_, 0, v___y_5158_);
lean_inc(v___y_5163_);
lean_inc_ref(v___y_5157_);
v___x_5165_ = l_Lean_addDecl(v___x_5164_, v___x_5112_, v___y_5157_, v___y_5163_);
if (lean_obj_tag(v___x_5165_) == 0)
{
lean_object* v___x_5166_; lean_object* v_env_5167_; lean_object* v_nextMacroScope_5168_; lean_object* v_ngen_5169_; lean_object* v_auxDeclNGen_5170_; lean_object* v_traceState_5171_; lean_object* v_messages_5172_; lean_object* v_infoState_5173_; lean_object* v_snapshotTasks_5174_; lean_object* v___x_5176_; uint8_t v_isShared_5177_; uint8_t v_isSharedCheck_5199_; 
lean_dec_ref(v___x_5165_);
v___x_5166_ = lean_st_ref_take(v___y_5163_);
v_env_5167_ = lean_ctor_get(v___x_5166_, 0);
v_nextMacroScope_5168_ = lean_ctor_get(v___x_5166_, 1);
v_ngen_5169_ = lean_ctor_get(v___x_5166_, 2);
v_auxDeclNGen_5170_ = lean_ctor_get(v___x_5166_, 3);
v_traceState_5171_ = lean_ctor_get(v___x_5166_, 4);
v_messages_5172_ = lean_ctor_get(v___x_5166_, 6);
v_infoState_5173_ = lean_ctor_get(v___x_5166_, 7);
v_snapshotTasks_5174_ = lean_ctor_get(v___x_5166_, 8);
v_isSharedCheck_5199_ = !lean_is_exclusive(v___x_5166_);
if (v_isSharedCheck_5199_ == 0)
{
lean_object* v_unused_5200_; 
v_unused_5200_ = lean_ctor_get(v___x_5166_, 5);
lean_dec(v_unused_5200_);
v___x_5176_ = v___x_5166_;
v_isShared_5177_ = v_isSharedCheck_5199_;
goto v_resetjp_5175_;
}
else
{
lean_inc(v_snapshotTasks_5174_);
lean_inc(v_infoState_5173_);
lean_inc(v_messages_5172_);
lean_inc(v_traceState_5171_);
lean_inc(v_auxDeclNGen_5170_);
lean_inc(v_ngen_5169_);
lean_inc(v_nextMacroScope_5168_);
lean_inc(v_env_5167_);
lean_dec(v___x_5166_);
v___x_5176_ = lean_box(0);
v_isShared_5177_ = v_isSharedCheck_5199_;
goto v_resetjp_5175_;
}
v_resetjp_5175_:
{
lean_object* v___x_5178_; lean_object* v___x_5179_; lean_object* v___x_5181_; 
lean_inc(v___y_5162_);
v___x_5178_ = l_Lean_addNoncomputable(v_env_5167_, v___y_5162_);
v___x_5179_ = lean_obj_once(&l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__2, &l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__2_once, _init_l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__2);
if (v_isShared_5177_ == 0)
{
lean_ctor_set(v___x_5176_, 5, v___x_5179_);
lean_ctor_set(v___x_5176_, 0, v___x_5178_);
v___x_5181_ = v___x_5176_;
goto v_reusejp_5180_;
}
else
{
lean_object* v_reuseFailAlloc_5198_; 
v_reuseFailAlloc_5198_ = lean_alloc_ctor(0, 9, 0);
lean_ctor_set(v_reuseFailAlloc_5198_, 0, v___x_5178_);
lean_ctor_set(v_reuseFailAlloc_5198_, 1, v_nextMacroScope_5168_);
lean_ctor_set(v_reuseFailAlloc_5198_, 2, v_ngen_5169_);
lean_ctor_set(v_reuseFailAlloc_5198_, 3, v_auxDeclNGen_5170_);
lean_ctor_set(v_reuseFailAlloc_5198_, 4, v_traceState_5171_);
lean_ctor_set(v_reuseFailAlloc_5198_, 5, v___x_5179_);
lean_ctor_set(v_reuseFailAlloc_5198_, 6, v_messages_5172_);
lean_ctor_set(v_reuseFailAlloc_5198_, 7, v_infoState_5173_);
lean_ctor_set(v_reuseFailAlloc_5198_, 8, v_snapshotTasks_5174_);
v___x_5181_ = v_reuseFailAlloc_5198_;
goto v_reusejp_5180_;
}
v_reusejp_5180_:
{
lean_object* v___x_5182_; lean_object* v___x_5183_; lean_object* v_mctx_5184_; lean_object* v_zetaDeltaFVarIds_5185_; lean_object* v_postponed_5186_; lean_object* v_diag_5187_; lean_object* v___x_5189_; uint8_t v_isShared_5190_; uint8_t v_isSharedCheck_5196_; 
v___x_5182_ = lean_st_ref_set(v___y_5163_, v___x_5181_);
v___x_5183_ = lean_st_ref_take(v___y_5160_);
v_mctx_5184_ = lean_ctor_get(v___x_5183_, 0);
v_zetaDeltaFVarIds_5185_ = lean_ctor_get(v___x_5183_, 2);
v_postponed_5186_ = lean_ctor_get(v___x_5183_, 3);
v_diag_5187_ = lean_ctor_get(v___x_5183_, 4);
v_isSharedCheck_5196_ = !lean_is_exclusive(v___x_5183_);
if (v_isSharedCheck_5196_ == 0)
{
lean_object* v_unused_5197_; 
v_unused_5197_ = lean_ctor_get(v___x_5183_, 1);
lean_dec(v_unused_5197_);
v___x_5189_ = v___x_5183_;
v_isShared_5190_ = v_isSharedCheck_5196_;
goto v_resetjp_5188_;
}
else
{
lean_inc(v_diag_5187_);
lean_inc(v_postponed_5186_);
lean_inc(v_zetaDeltaFVarIds_5185_);
lean_inc(v_mctx_5184_);
lean_dec(v___x_5183_);
v___x_5189_ = lean_box(0);
v_isShared_5190_ = v_isSharedCheck_5196_;
goto v_resetjp_5188_;
}
v_resetjp_5188_:
{
lean_object* v___x_5191_; lean_object* v___x_5193_; 
v___x_5191_ = lean_obj_once(&l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__3, &l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__3_once, _init_l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg___closed__3);
if (v_isShared_5190_ == 0)
{
lean_ctor_set(v___x_5189_, 1, v___x_5191_);
v___x_5193_ = v___x_5189_;
goto v_reusejp_5192_;
}
else
{
lean_object* v_reuseFailAlloc_5195_; 
v_reuseFailAlloc_5195_ = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(v_reuseFailAlloc_5195_, 0, v_mctx_5184_);
lean_ctor_set(v_reuseFailAlloc_5195_, 1, v___x_5191_);
lean_ctor_set(v_reuseFailAlloc_5195_, 2, v_zetaDeltaFVarIds_5185_);
lean_ctor_set(v_reuseFailAlloc_5195_, 3, v_postponed_5186_);
lean_ctor_set(v_reuseFailAlloc_5195_, 4, v_diag_5187_);
v___x_5193_ = v_reuseFailAlloc_5195_;
goto v_reusejp_5192_;
}
v_reusejp_5192_:
{
lean_object* v___x_5194_; 
v___x_5194_ = lean_st_ref_set(v___y_5160_, v___x_5193_);
v___y_5138_ = v___y_5162_;
v___y_5139_ = v___y_5161_;
v___y_5140_ = v___y_5156_;
v___y_5141_ = v___y_5159_;
v___y_5142_ = v___y_5160_;
v___y_5143_ = v___y_5157_;
v___y_5144_ = v___y_5163_;
goto v___jp_5137_;
}
}
}
}
}
else
{
lean_dec(v___y_5163_);
lean_dec(v___y_5162_);
lean_dec_ref(v___y_5161_);
lean_dec(v___y_5160_);
lean_dec_ref(v___y_5159_);
lean_dec_ref(v___y_5157_);
lean_dec(v___y_5156_);
return v___x_5165_;
}
}
v___jp_5201_:
{
if (v_isNoncomputable_5113_ == 0)
{
uint8_t v_isNoncomputableSection_5210_; 
v_isNoncomputableSection_5210_ = lean_ctor_get_uint8(v___y_5204_, sizeof(void*)*8 + 4);
if (v_isNoncomputableSection_5210_ == 0)
{
lean_object* v___x_5211_; lean_object* v___x_5212_; 
v___x_5211_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_5211_, 0, v___y_5202_);
lean_inc(v___y_5209_);
lean_inc_ref(v___y_5208_);
v___x_5212_ = l_Lean_addAndCompile(v___x_5211_, v___x_5114_, v___y_5208_, v___y_5209_);
if (lean_obj_tag(v___x_5212_) == 0)
{
lean_dec_ref(v___x_5212_);
v___y_5138_ = v___y_5203_;
v___y_5139_ = v___y_5204_;
v___y_5140_ = v___y_5205_;
v___y_5141_ = v___y_5206_;
v___y_5142_ = v___y_5207_;
v___y_5143_ = v___y_5208_;
v___y_5144_ = v___y_5209_;
goto v___jp_5137_;
}
else
{
lean_dec(v___y_5209_);
lean_dec_ref(v___y_5208_);
lean_dec(v___y_5207_);
lean_dec_ref(v___y_5206_);
lean_dec(v___y_5205_);
lean_dec_ref(v___y_5204_);
lean_dec(v___y_5203_);
return v___x_5212_;
}
}
else
{
v___y_5156_ = v___y_5205_;
v___y_5157_ = v___y_5208_;
v___y_5158_ = v___y_5202_;
v___y_5159_ = v___y_5206_;
v___y_5160_ = v___y_5207_;
v___y_5161_ = v___y_5204_;
v___y_5162_ = v___y_5203_;
v___y_5163_ = v___y_5209_;
goto v___jp_5155_;
}
}
else
{
v___y_5156_ = v___y_5205_;
v___y_5157_ = v___y_5208_;
v___y_5158_ = v___y_5202_;
v___y_5159_ = v___y_5206_;
v___y_5160_ = v___y_5207_;
v___y_5161_ = v___y_5204_;
v___y_5162_ = v___y_5203_;
v___y_5163_ = v___y_5209_;
goto v___jp_5155_;
}
}
v___jp_5213_:
{
lean_object* v___x_5223_; lean_object* v___x_5224_; lean_object* v___x_5225_; lean_object* v___x_5226_; lean_object* v___x_5227_; lean_object* v___x_5228_; 
lean_dec(v___y_5216_);
lean_dec_ref(v___y_5215_);
v___x_5223_ = lean_obj_once(&l_Lean_Elab_Term_processDefDeriving___lam__6___closed__3, &l_Lean_Elab_Term_processDefDeriving___lam__6___closed__3_once, _init_l_Lean_Elab_Term_processDefDeriving___lam__6___closed__3);
v___x_5224_ = l_Lean_MessageData_ofConstName(v___y_5214_, v___x_5112_);
v___x_5225_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_5225_, 0, v___x_5223_);
lean_ctor_set(v___x_5225_, 1, v___x_5224_);
v___x_5226_ = lean_obj_once(&l_Lean_Elab_Term_processDefDeriving___lam__6___closed__5, &l_Lean_Elab_Term_processDefDeriving___lam__6___closed__5_once, _init_l_Lean_Elab_Term_processDefDeriving___lam__6___closed__5);
v___x_5227_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_5227_, 0, v___x_5225_);
lean_ctor_set(v___x_5227_, 1, v___x_5226_);
v___x_5228_ = l_Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4___redArg(v___x_5227_, v___y_5217_, v___y_5218_, v___y_5219_, v___y_5220_, v___y_5221_, v___y_5222_);
lean_dec(v___y_5222_);
lean_dec_ref(v___y_5221_);
lean_dec(v___y_5220_);
lean_dec_ref(v___y_5219_);
lean_dec(v___y_5218_);
return v___x_5228_;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_Term_processDefDeriving___lam__6___boxed(lean_object* v_declName_5362_, lean_object* v_a_5363_, lean_object* v___f_5364_, lean_object* v___x_5365_, lean_object* v_isNoncomputable_5366_, lean_object* v___x_5367_, lean_object* v_cmdRef_x3f_5368_, lean_object* v___y_5369_, lean_object* v___y_5370_, lean_object* v___y_5371_, lean_object* v___y_5372_, lean_object* v___y_5373_, lean_object* v___y_5374_, lean_object* v___y_5375_){
_start:
{
uint8_t v___x_46285__boxed_5376_; uint8_t v_isNoncomputable_boxed_5377_; uint8_t v___x_46286__boxed_5378_; lean_object* v_res_5379_; 
v___x_46285__boxed_5376_ = lean_unbox(v___x_5365_);
v_isNoncomputable_boxed_5377_ = lean_unbox(v_isNoncomputable_5366_);
v___x_46286__boxed_5378_ = lean_unbox(v___x_5367_);
v_res_5379_ = l_Lean_Elab_Term_processDefDeriving___lam__6(v_declName_5362_, v_a_5363_, v___f_5364_, v___x_46285__boxed_5376_, v_isNoncomputable_boxed_5377_, v___x_46286__boxed_5378_, v_cmdRef_x3f_5368_, v___y_5369_, v___y_5370_, v___y_5371_, v___y_5372_, v___y_5373_, v___y_5374_);
return v_res_5379_;
}
}
static lean_object* _init_l_Lean_Elab_Term_processDefDeriving___closed__1(void){
_start:
{
lean_object* v___x_5381_; lean_object* v___x_5382_; 
v___x_5381_ = ((lean_object*)(l_Lean_Elab_Term_processDefDeriving___closed__0));
v___x_5382_ = l_Lean_stringToMessageData(v___x_5381_);
return v___x_5382_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_Term_processDefDeriving(lean_object* v_view_5383_, lean_object* v_decl_5384_, uint8_t v_isNoncomputable_5385_, lean_object* v_cmdRef_x3f_5386_, lean_object* v_a_5387_, lean_object* v_a_5388_, lean_object* v_a_5389_, lean_object* v_a_5390_, lean_object* v_a_5391_, lean_object* v_a_5392_){
_start:
{
lean_object* v_cls_5394_; lean_object* v___x_5395_; 
v_cls_5394_ = lean_ctor_get(v_view_5383_, 1);
lean_inc(v_cls_5394_);
lean_dec_ref(v_view_5383_);
lean_inc(v_a_5392_);
lean_inc_ref(v_a_5391_);
lean_inc(v_a_5390_);
lean_inc_ref(v_a_5389_);
v___x_5395_ = l_Lean_Meta_whnfCore(v_decl_5384_, v_a_5389_, v_a_5390_, v_a_5391_, v_a_5392_);
if (lean_obj_tag(v___x_5395_) == 0)
{
lean_object* v_a_5396_; lean_object* v___x_5397_; 
v_a_5396_ = lean_ctor_get(v___x_5395_, 0);
lean_inc(v_a_5396_);
lean_dec_ref(v___x_5395_);
v___x_5397_ = l_Lean_Expr_getAppFn(v_a_5396_);
if (lean_obj_tag(v___x_5397_) == 4)
{
lean_object* v_declName_5398_; lean_object* v___x_5399_; lean_object* v_env_5400_; uint8_t v___x_5401_; lean_object* v___x_5402_; uint8_t v___x_5403_; lean_object* v___x_5404_; lean_object* v___x_5405_; lean_object* v___f_5406_; lean_object* v___x_5407_; lean_object* v___x_5408_; lean_object* v___x_5409_; lean_object* v___f_5410_; lean_object* v___x_5411_; 
v_declName_5398_ = lean_ctor_get(v___x_5397_, 0);
lean_inc(v_declName_5398_);
lean_dec_ref(v___x_5397_);
v___x_5399_ = lean_st_ref_get(v_a_5392_);
v_env_5400_ = lean_ctor_get(v___x_5399_, 0);
lean_inc_ref(v_env_5400_);
lean_dec(v___x_5399_);
v___x_5401_ = 1;
v___x_5402_ = l_Lean_Environment_setExporting(v_env_5400_, v___x_5401_);
v___x_5403_ = 0;
v___x_5404_ = lean_box(v___x_5401_);
v___x_5405_ = lean_box(v___x_5403_);
lean_inc(v_declName_5398_);
lean_inc(v_a_5396_);
v___f_5406_ = lean_alloc_closure((void*)(l_Lean_Elab_Term_processDefDeriving___lam__4___boxed), 14, 5);
lean_closure_set(v___f_5406_, 0, v_a_5396_);
lean_closure_set(v___f_5406_, 1, v_declName_5398_);
lean_closure_set(v___f_5406_, 2, v___x_5404_);
lean_closure_set(v___f_5406_, 3, v_cls_5394_);
lean_closure_set(v___f_5406_, 4, v___x_5405_);
v___x_5407_ = lean_box(v___x_5403_);
v___x_5408_ = lean_box(v_isNoncomputable_5385_);
v___x_5409_ = lean_box(v___x_5401_);
lean_inc(v_declName_5398_);
v___f_5410_ = lean_alloc_closure((void*)(l_Lean_Elab_Term_processDefDeriving___lam__6___boxed), 14, 7);
lean_closure_set(v___f_5410_, 0, v_declName_5398_);
lean_closure_set(v___f_5410_, 1, v_a_5396_);
lean_closure_set(v___f_5410_, 2, v___f_5406_);
lean_closure_set(v___f_5410_, 3, v___x_5407_);
lean_closure_set(v___f_5410_, 4, v___x_5408_);
lean_closure_set(v___f_5410_, 5, v___x_5409_);
lean_closure_set(v___f_5410_, 6, v_cmdRef_x3f_5386_);
v___x_5411_ = l_Lean_Environment_find_x3f(v___x_5402_, v_declName_5398_, v___x_5403_);
if (lean_obj_tag(v___x_5411_) == 0)
{
lean_object* v___x_5412_; 
v___x_5412_ = l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg(v___f_5410_, v___x_5403_, v_a_5387_, v_a_5388_, v_a_5389_, v_a_5390_, v_a_5391_, v_a_5392_);
return v___x_5412_;
}
else
{
lean_object* v_val_5413_; uint8_t v___x_5414_; lean_object* v___x_5415_; 
v_val_5413_ = lean_ctor_get(v___x_5411_, 0);
lean_inc(v_val_5413_);
lean_dec_ref(v___x_5411_);
v___x_5414_ = l_Lean_ConstantInfo_hasValue(v_val_5413_, v___x_5403_);
lean_dec(v_val_5413_);
v___x_5415_ = l_Lean_withExporting___at___00Lean_Elab_Term_processDefDeriving_spec__13___redArg(v___f_5410_, v___x_5414_, v_a_5387_, v_a_5388_, v_a_5389_, v_a_5390_, v_a_5391_, v_a_5392_);
return v___x_5415_;
}
}
else
{
lean_object* v___x_5416_; lean_object* v___x_5417_; lean_object* v___x_5418_; lean_object* v___x_5419_; 
lean_dec_ref(v___x_5397_);
lean_dec(v_cls_5394_);
lean_dec(v_cmdRef_x3f_5386_);
v___x_5416_ = lean_obj_once(&l_Lean_Elab_Term_processDefDeriving___closed__1, &l_Lean_Elab_Term_processDefDeriving___closed__1_once, _init_l_Lean_Elab_Term_processDefDeriving___closed__1);
v___x_5417_ = l_Lean_indentExpr(v_a_5396_);
v___x_5418_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_5418_, 0, v___x_5416_);
lean_ctor_set(v___x_5418_, 1, v___x_5417_);
v___x_5419_ = l_Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4___redArg(v___x_5418_, v_a_5387_, v_a_5388_, v_a_5389_, v_a_5390_, v_a_5391_, v_a_5392_);
lean_dec(v_a_5392_);
lean_dec_ref(v_a_5391_);
lean_dec(v_a_5390_);
lean_dec_ref(v_a_5389_);
lean_dec(v_a_5388_);
return v___x_5419_;
}
}
else
{
lean_object* v_a_5420_; lean_object* v___x_5422_; uint8_t v_isShared_5423_; uint8_t v_isSharedCheck_5427_; 
lean_dec(v_cls_5394_);
lean_dec(v_a_5392_);
lean_dec_ref(v_a_5391_);
lean_dec(v_a_5390_);
lean_dec_ref(v_a_5389_);
lean_dec(v_a_5388_);
lean_dec_ref(v_a_5387_);
lean_dec(v_cmdRef_x3f_5386_);
v_a_5420_ = lean_ctor_get(v___x_5395_, 0);
v_isSharedCheck_5427_ = !lean_is_exclusive(v___x_5395_);
if (v_isSharedCheck_5427_ == 0)
{
v___x_5422_ = v___x_5395_;
v_isShared_5423_ = v_isSharedCheck_5427_;
goto v_resetjp_5421_;
}
else
{
lean_inc(v_a_5420_);
lean_dec(v___x_5395_);
v___x_5422_ = lean_box(0);
v_isShared_5423_ = v_isSharedCheck_5427_;
goto v_resetjp_5421_;
}
v_resetjp_5421_:
{
lean_object* v___x_5425_; 
if (v_isShared_5423_ == 0)
{
v___x_5425_ = v___x_5422_;
goto v_reusejp_5424_;
}
else
{
lean_object* v_reuseFailAlloc_5426_; 
v_reuseFailAlloc_5426_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5426_, 0, v_a_5420_);
v___x_5425_ = v_reuseFailAlloc_5426_;
goto v_reusejp_5424_;
}
v_reusejp_5424_:
{
return v___x_5425_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_Term_processDefDeriving___boxed(lean_object* v_view_5428_, lean_object* v_decl_5429_, lean_object* v_isNoncomputable_5430_, lean_object* v_cmdRef_x3f_5431_, lean_object* v_a_5432_, lean_object* v_a_5433_, lean_object* v_a_5434_, lean_object* v_a_5435_, lean_object* v_a_5436_, lean_object* v_a_5437_, lean_object* v_a_5438_){
_start:
{
uint8_t v_isNoncomputable_boxed_5439_; lean_object* v_res_5440_; 
v_isNoncomputable_boxed_5439_ = lean_unbox(v_isNoncomputable_5430_);
v_res_5440_ = l_Lean_Elab_Term_processDefDeriving(v_view_5428_, v_decl_5429_, v_isNoncomputable_boxed_5439_, v_cmdRef_x3f_5431_, v_a_5432_, v_a_5433_, v_a_5434_, v_a_5435_, v_a_5436_, v_a_5437_);
return v_res_5440_;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Elab_Term_processDefDeriving_spec__4(lean_object* v_as_5441_, size_t v_i_5442_, size_t v_stop_5443_, lean_object* v_b_5444_, lean_object* v___y_5445_, lean_object* v___y_5446_, lean_object* v___y_5447_, lean_object* v___y_5448_, lean_object* v___y_5449_, lean_object* v___y_5450_){
_start:
{
lean_object* v___x_5452_; 
v___x_5452_ = l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Elab_Term_processDefDeriving_spec__4___redArg(v_as_5441_, v_i_5442_, v_stop_5443_, v_b_5444_, v___y_5449_, v___y_5450_);
return v___x_5452_;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Elab_Term_processDefDeriving_spec__4___boxed(lean_object* v_as_5453_, lean_object* v_i_5454_, lean_object* v_stop_5455_, lean_object* v_b_5456_, lean_object* v___y_5457_, lean_object* v___y_5458_, lean_object* v___y_5459_, lean_object* v___y_5460_, lean_object* v___y_5461_, lean_object* v___y_5462_, lean_object* v___y_5463_){
_start:
{
size_t v_i_boxed_5464_; size_t v_stop_boxed_5465_; lean_object* v_res_5466_; 
v_i_boxed_5464_ = lean_unbox_usize(v_i_5454_);
lean_dec(v_i_5454_);
v_stop_boxed_5465_ = lean_unbox_usize(v_stop_5455_);
lean_dec(v_stop_5455_);
v_res_5466_ = l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Elab_Term_processDefDeriving_spec__4(v_as_5453_, v_i_boxed_5464_, v_stop_boxed_5465_, v_b_5456_, v___y_5457_, v___y_5458_, v___y_5459_, v___y_5460_, v___y_5461_, v___y_5462_);
lean_dec(v___y_5460_);
lean_dec_ref(v___y_5459_);
lean_dec(v___y_5458_);
lean_dec_ref(v___y_5457_);
lean_dec_ref(v_as_5453_);
return v_res_5466_;
}
}
LEAN_EXPORT lean_object* l_liftExcept___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__9(lean_object* v_00_u03b1_5467_, lean_object* v_x_5468_, lean_object* v___y_5469_, lean_object* v___y_5470_){
_start:
{
lean_object* v___x_5471_; 
v___x_5471_ = l_liftExcept___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__9___redArg(v_x_5468_, v___y_5470_);
return v___x_5471_;
}
}
LEAN_EXPORT lean_object* l_liftExcept___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__9___boxed(lean_object* v_00_u03b1_5472_, lean_object* v_x_5473_, lean_object* v___y_5474_, lean_object* v___y_5475_){
_start:
{
lean_object* v_res_5476_; 
v_res_5476_ = l_liftExcept___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__9(v_00_u03b1_5472_, v_x_5473_, v___y_5474_, v___y_5475_);
lean_dec_ref(v___y_5474_);
lean_dec_ref(v_x_5473_);
return v_res_5476_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14(lean_object* v_00_u03b1_5477_, lean_object* v_ref_5478_, lean_object* v___y_5479_, lean_object* v___y_5480_, lean_object* v___y_5481_, lean_object* v___y_5482_, lean_object* v___y_5483_, lean_object* v___y_5484_){
_start:
{
lean_object* v___x_5486_; 
v___x_5486_ = l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14___redArg(v_ref_5478_);
return v___x_5486_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14___boxed(lean_object* v_00_u03b1_5487_, lean_object* v_ref_5488_, lean_object* v___y_5489_, lean_object* v___y_5490_, lean_object* v___y_5491_, lean_object* v___y_5492_, lean_object* v___y_5493_, lean_object* v___y_5494_, lean_object* v___y_5495_){
_start:
{
lean_object* v_res_5496_; 
v_res_5496_ = l_Lean_throwMaxRecDepthAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__14(v_00_u03b1_5487_, v_ref_5488_, v___y_5489_, v___y_5490_, v___y_5491_, v___y_5492_, v___y_5493_, v___y_5494_);
lean_dec(v___y_5494_);
lean_dec_ref(v___y_5493_);
lean_dec(v___y_5492_);
lean_dec_ref(v___y_5491_);
lean_dec(v___y_5490_);
lean_dec_ref(v___y_5489_);
return v_res_5496_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__15(lean_object* v_00_u03b1_5497_, lean_object* v___y_5498_, lean_object* v___y_5499_, lean_object* v___y_5500_, lean_object* v___y_5501_, lean_object* v___y_5502_, lean_object* v___y_5503_){
_start:
{
lean_object* v___x_5505_; 
v___x_5505_ = l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__15___redArg();
return v___x_5505_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__15___boxed(lean_object* v_00_u03b1_5506_, lean_object* v___y_5507_, lean_object* v___y_5508_, lean_object* v___y_5509_, lean_object* v___y_5510_, lean_object* v___y_5511_, lean_object* v___y_5512_, lean_object* v___y_5513_){
_start:
{
lean_object* v_res_5514_; 
v_res_5514_ = l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__15(v_00_u03b1_5506_, v___y_5507_, v___y_5508_, v___y_5509_, v___y_5510_, v___y_5511_, v___y_5512_);
lean_dec(v___y_5512_);
lean_dec_ref(v___y_5511_);
lean_dec(v___y_5510_);
lean_dec_ref(v___y_5509_);
lean_dec(v___y_5508_);
lean_dec_ref(v___y_5507_);
return v_res_5514_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8(lean_object* v_00_u03b1_5515_, lean_object* v_x_5516_, lean_object* v___y_5517_, lean_object* v___y_5518_, lean_object* v___y_5519_, lean_object* v___y_5520_, lean_object* v___y_5521_, lean_object* v___y_5522_){
_start:
{
lean_object* v___x_5524_; 
v___x_5524_ = l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8___redArg(v_x_5516_, v___y_5517_, v___y_5518_, v___y_5519_, v___y_5520_, v___y_5521_, v___y_5522_);
return v___x_5524_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8___boxed(lean_object* v_00_u03b1_5525_, lean_object* v_x_5526_, lean_object* v___y_5527_, lean_object* v___y_5528_, lean_object* v___y_5529_, lean_object* v___y_5530_, lean_object* v___y_5531_, lean_object* v___y_5532_, lean_object* v___y_5533_){
_start:
{
lean_object* v_res_5534_; 
v_res_5534_ = l_Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8(v_00_u03b1_5525_, v_x_5526_, v___y_5527_, v___y_5528_, v___y_5529_, v___y_5530_, v___y_5531_, v___y_5532_);
lean_dec(v___y_5532_);
lean_dec(v___y_5530_);
lean_dec_ref(v___y_5529_);
lean_dec(v___y_5528_);
return v_res_5534_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_getDeclarationRange_x3f___at___00Lean_Elab_addDeclarationRangesFromSyntax___at___00Lean_Elab_Term_processDefDeriving_spec__9_spec__17(lean_object* v_stx_5535_, lean_object* v___y_5536_, lean_object* v___y_5537_, lean_object* v___y_5538_, lean_object* v___y_5539_, lean_object* v___y_5540_, lean_object* v___y_5541_){
_start:
{
lean_object* v___x_5543_; 
v___x_5543_ = l_Lean_Elab_getDeclarationRange_x3f___at___00Lean_Elab_addDeclarationRangesFromSyntax___at___00Lean_Elab_Term_processDefDeriving_spec__9_spec__17___redArg(v_stx_5535_, v___y_5540_);
return v___x_5543_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_getDeclarationRange_x3f___at___00Lean_Elab_addDeclarationRangesFromSyntax___at___00Lean_Elab_Term_processDefDeriving_spec__9_spec__17___boxed(lean_object* v_stx_5544_, lean_object* v___y_5545_, lean_object* v___y_5546_, lean_object* v___y_5547_, lean_object* v___y_5548_, lean_object* v___y_5549_, lean_object* v___y_5550_, lean_object* v___y_5551_){
_start:
{
lean_object* v_res_5552_; 
v_res_5552_ = l_Lean_Elab_getDeclarationRange_x3f___at___00Lean_Elab_addDeclarationRangesFromSyntax___at___00Lean_Elab_Term_processDefDeriving_spec__9_spec__17(v_stx_5544_, v___y_5545_, v___y_5546_, v___y_5547_, v___y_5548_, v___y_5549_, v___y_5550_);
lean_dec(v___y_5550_);
lean_dec(v___y_5548_);
lean_dec_ref(v___y_5547_);
lean_dec(v___y_5546_);
lean_dec_ref(v___y_5545_);
lean_dec(v_stx_5544_);
return v_res_5552_;
}
}
LEAN_EXPORT lean_object* l_Lean_addDeclarationRanges___at___00Lean_Elab_addDeclarationRangesFromSyntax___at___00Lean_Elab_Term_processDefDeriving_spec__9_spec__18(lean_object* v_declName_5553_, lean_object* v_declRanges_5554_, lean_object* v___y_5555_, lean_object* v___y_5556_, lean_object* v___y_5557_, lean_object* v___y_5558_, lean_object* v___y_5559_, lean_object* v___y_5560_){
_start:
{
lean_object* v___x_5562_; 
v___x_5562_ = l_Lean_addDeclarationRanges___at___00Lean_Elab_addDeclarationRangesFromSyntax___at___00Lean_Elab_Term_processDefDeriving_spec__9_spec__18___redArg(v_declName_5553_, v_declRanges_5554_, v___y_5558_, v___y_5560_);
return v___x_5562_;
}
}
LEAN_EXPORT lean_object* l_Lean_addDeclarationRanges___at___00Lean_Elab_addDeclarationRangesFromSyntax___at___00Lean_Elab_Term_processDefDeriving_spec__9_spec__18___boxed(lean_object* v_declName_5563_, lean_object* v_declRanges_5564_, lean_object* v___y_5565_, lean_object* v___y_5566_, lean_object* v___y_5567_, lean_object* v___y_5568_, lean_object* v___y_5569_, lean_object* v___y_5570_, lean_object* v___y_5571_){
_start:
{
lean_object* v_res_5572_; 
v_res_5572_ = l_Lean_addDeclarationRanges___at___00Lean_Elab_addDeclarationRangesFromSyntax___at___00Lean_Elab_Term_processDefDeriving_spec__9_spec__18(v_declName_5563_, v_declRanges_5564_, v___y_5565_, v___y_5566_, v___y_5567_, v___y_5568_, v___y_5569_, v___y_5570_);
lean_dec(v___y_5570_);
lean_dec_ref(v___y_5569_);
lean_dec(v___y_5568_);
lean_dec_ref(v___y_5567_);
lean_dec(v___y_5566_);
lean_dec_ref(v___y_5565_);
return v_res_5572_;
}
}
LEAN_EXPORT lean_object* l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11(lean_object* v_s_5573_, lean_object* v_pattern_5574_, lean_object* v_replacement_5575_){
_start:
{
lean_object* v___x_5576_; 
v___x_5576_ = l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___redArg(v_s_5573_, v_replacement_5575_);
return v___x_5576_;
}
}
LEAN_EXPORT lean_object* l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11___boxed(lean_object* v_s_5577_, lean_object* v_pattern_5578_, lean_object* v_replacement_5579_){
_start:
{
lean_object* v_res_5580_; 
v_res_5580_ = l_String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11(v_s_5577_, v_pattern_5578_, v_replacement_5579_);
lean_dec_ref(v_replacement_5579_);
lean_dec_ref(v_pattern_5578_);
return v_res_5580_;
}
}
LEAN_EXPORT lean_object* l_Lean_logInfoAt___at___00Lean_Elab_Term_processDefDeriving_spec__12(lean_object* v_ref_5581_, lean_object* v_msgData_5582_, lean_object* v___y_5583_, lean_object* v___y_5584_, lean_object* v___y_5585_, lean_object* v___y_5586_, lean_object* v___y_5587_, lean_object* v___y_5588_){
_start:
{
lean_object* v___x_5590_; 
v___x_5590_ = l_Lean_logInfoAt___at___00Lean_Elab_Term_processDefDeriving_spec__12___redArg(v_ref_5581_, v_msgData_5582_, v___y_5585_, v___y_5586_, v___y_5587_, v___y_5588_);
return v___x_5590_;
}
}
LEAN_EXPORT lean_object* l_Lean_logInfoAt___at___00Lean_Elab_Term_processDefDeriving_spec__12___boxed(lean_object* v_ref_5591_, lean_object* v_msgData_5592_, lean_object* v___y_5593_, lean_object* v___y_5594_, lean_object* v___y_5595_, lean_object* v___y_5596_, lean_object* v___y_5597_, lean_object* v___y_5598_, lean_object* v___y_5599_){
_start:
{
lean_object* v_res_5600_; 
v_res_5600_ = l_Lean_logInfoAt___at___00Lean_Elab_Term_processDefDeriving_spec__12(v_ref_5591_, v_msgData_5592_, v___y_5593_, v___y_5594_, v___y_5595_, v___y_5596_, v___y_5597_, v___y_5598_);
lean_dec(v___y_5598_);
lean_dec(v___y_5596_);
lean_dec_ref(v___y_5595_);
lean_dec(v___y_5594_);
lean_dec_ref(v___y_5593_);
lean_dec(v_ref_5591_);
return v_res_5600_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6(lean_object* v_00_u03b1_5601_, lean_object* v_constName_5602_, lean_object* v___y_5603_, lean_object* v___y_5604_, lean_object* v___y_5605_, lean_object* v___y_5606_, lean_object* v___y_5607_, lean_object* v___y_5608_){
_start:
{
lean_object* v___x_5610_; 
v___x_5610_ = l_Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6___redArg(v_constName_5602_, v___y_5603_, v___y_5604_, v___y_5605_, v___y_5606_, v___y_5607_, v___y_5608_);
return v___x_5610_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6___boxed(lean_object* v_00_u03b1_5611_, lean_object* v_constName_5612_, lean_object* v___y_5613_, lean_object* v___y_5614_, lean_object* v___y_5615_, lean_object* v___y_5616_, lean_object* v___y_5617_, lean_object* v___y_5618_, lean_object* v___y_5619_){
_start:
{
lean_object* v_res_5620_; 
v_res_5620_ = l_Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6(v_00_u03b1_5611_, v_constName_5612_, v___y_5613_, v___y_5614_, v___y_5615_, v___y_5616_, v___y_5617_, v___y_5618_);
lean_dec(v___y_5618_);
lean_dec(v___y_5616_);
lean_dec_ref(v___y_5615_);
lean_dec(v___y_5614_);
return v_res_5620_;
}
}
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__11(lean_object* v_as_5621_, lean_object* v_as_x27_5622_, lean_object* v_b_5623_, lean_object* v_a_5624_, lean_object* v___y_5625_, lean_object* v___y_5626_, lean_object* v___y_5627_, lean_object* v___y_5628_, lean_object* v___y_5629_, lean_object* v___y_5630_){
_start:
{
lean_object* v___x_5632_; 
v___x_5632_ = l_List_forIn_x27_loop___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__11___redArg(v_as_x27_5622_, v_b_5623_, v___y_5625_, v___y_5626_, v___y_5627_, v___y_5628_, v___y_5629_, v___y_5630_);
return v___x_5632_;
}
}
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__11___boxed(lean_object* v_as_5633_, lean_object* v_as_x27_5634_, lean_object* v_b_5635_, lean_object* v_a_5636_, lean_object* v___y_5637_, lean_object* v___y_5638_, lean_object* v___y_5639_, lean_object* v___y_5640_, lean_object* v___y_5641_, lean_object* v___y_5642_, lean_object* v___y_5643_){
_start:
{
lean_object* v_res_5644_; 
v_res_5644_ = l_List_forIn_x27_loop___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__11(v_as_5633_, v_as_x27_5634_, v_b_5635_, v_a_5636_, v___y_5637_, v___y_5638_, v___y_5639_, v___y_5640_, v___y_5641_, v___y_5642_);
lean_dec(v___y_5642_);
lean_dec_ref(v___y_5641_);
lean_dec(v___y_5640_);
lean_dec_ref(v___y_5639_);
lean_dec(v___y_5638_);
lean_dec_ref(v___y_5637_);
lean_dec(v_as_5633_);
return v_res_5644_;
}
}
LEAN_EXPORT lean_object* l_List_forM___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__12(lean_object* v_as_5645_, lean_object* v___y_5646_, lean_object* v___y_5647_, lean_object* v___y_5648_, lean_object* v___y_5649_, lean_object* v___y_5650_, lean_object* v___y_5651_){
_start:
{
lean_object* v___x_5653_; 
v___x_5653_ = l_List_forM___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__12___redArg(v_as_5645_, v___y_5648_, v___y_5649_, v___y_5650_, v___y_5651_);
return v___x_5653_;
}
}
LEAN_EXPORT lean_object* l_List_forM___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__12___boxed(lean_object* v_as_5654_, lean_object* v___y_5655_, lean_object* v___y_5656_, lean_object* v___y_5657_, lean_object* v___y_5658_, lean_object* v___y_5659_, lean_object* v___y_5660_, lean_object* v___y_5661_){
_start:
{
lean_object* v_res_5662_; 
v_res_5662_ = l_List_forM___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__12(v_as_5654_, v___y_5655_, v___y_5656_, v___y_5657_, v___y_5658_, v___y_5659_, v___y_5660_);
lean_dec(v___y_5660_);
lean_dec_ref(v___y_5659_);
lean_dec(v___y_5658_);
lean_dec_ref(v___y_5657_);
lean_dec(v___y_5656_);
lean_dec_ref(v___y_5655_);
return v_res_5662_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwErrorAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__13(lean_object* v_00_u03b1_5663_, lean_object* v_ref_5664_, lean_object* v_msg_5665_, lean_object* v___y_5666_, lean_object* v___y_5667_, lean_object* v___y_5668_, lean_object* v___y_5669_, lean_object* v___y_5670_, lean_object* v___y_5671_){
_start:
{
lean_object* v___x_5673_; 
v___x_5673_ = l_Lean_throwErrorAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__13___redArg(v_ref_5664_, v_msg_5665_, v___y_5666_, v___y_5667_, v___y_5668_, v___y_5669_, v___y_5670_, v___y_5671_);
return v___x_5673_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwErrorAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__13___boxed(lean_object* v_00_u03b1_5674_, lean_object* v_ref_5675_, lean_object* v_msg_5676_, lean_object* v___y_5677_, lean_object* v___y_5678_, lean_object* v___y_5679_, lean_object* v___y_5680_, lean_object* v___y_5681_, lean_object* v___y_5682_, lean_object* v___y_5683_){
_start:
{
lean_object* v_res_5684_; 
v_res_5684_ = l_Lean_throwErrorAt___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__13(v_00_u03b1_5674_, v_ref_5675_, v_msg_5676_, v___y_5677_, v___y_5678_, v___y_5679_, v___y_5680_, v___y_5681_, v___y_5682_);
lean_dec(v___y_5682_);
lean_dec(v___y_5680_);
lean_dec_ref(v___y_5679_);
lean_dec(v___y_5678_);
lean_dec(v_ref_5675_);
return v_res_5684_;
}
}
LEAN_EXPORT lean_object* l_WellFounded_opaqueFix_u2083___at___00String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11_spec__21(lean_object* v_s_5685_, lean_object* v_replacement_5686_, lean_object* v_inst_5687_, lean_object* v_R_5688_, lean_object* v_a_5689_, lean_object* v_b_5690_, lean_object* v_c_5691_){
_start:
{
lean_object* v___x_5692_; 
v___x_5692_ = l_WellFounded_opaqueFix_u2083___at___00String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11_spec__21___redArg(v_s_5685_, v_replacement_5686_, v_a_5689_, v_b_5690_);
return v___x_5692_;
}
}
LEAN_EXPORT lean_object* l_WellFounded_opaqueFix_u2083___at___00String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11_spec__21___boxed(lean_object* v_s_5693_, lean_object* v_replacement_5694_, lean_object* v_inst_5695_, lean_object* v_R_5696_, lean_object* v_a_5697_, lean_object* v_b_5698_, lean_object* v_c_5699_){
_start:
{
lean_object* v_res_5700_; 
v_res_5700_ = l_WellFounded_opaqueFix_u2083___at___00String_Slice_replace___at___00Lean_Elab_Term_processDefDeriving_spec__11_spec__21(v_s_5693_, v_replacement_5694_, v_inst_5695_, v_R_5696_, v_a_5697_, v_b_5698_, v_c_5699_);
lean_dec_ref(v_replacement_5694_);
return v_res_5700_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10(lean_object* v_00_u03b1_5701_, lean_object* v_ref_5702_, lean_object* v_constName_5703_, lean_object* v___y_5704_, lean_object* v___y_5705_, lean_object* v___y_5706_, lean_object* v___y_5707_, lean_object* v___y_5708_, lean_object* v___y_5709_){
_start:
{
lean_object* v___x_5711_; 
v___x_5711_ = l_Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10___redArg(v_ref_5702_, v_constName_5703_, v___y_5704_, v___y_5705_, v___y_5706_, v___y_5707_, v___y_5708_, v___y_5709_);
return v___x_5711_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10___boxed(lean_object* v_00_u03b1_5712_, lean_object* v_ref_5713_, lean_object* v_constName_5714_, lean_object* v___y_5715_, lean_object* v___y_5716_, lean_object* v___y_5717_, lean_object* v___y_5718_, lean_object* v___y_5719_, lean_object* v___y_5720_, lean_object* v___y_5721_){
_start:
{
lean_object* v_res_5722_; 
v_res_5722_ = l_Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10(v_00_u03b1_5712_, v_ref_5713_, v_constName_5714_, v___y_5715_, v___y_5716_, v___y_5717_, v___y_5718_, v___y_5719_, v___y_5720_);
lean_dec(v___y_5720_);
lean_dec(v___y_5718_);
lean_dec_ref(v___y_5717_);
lean_dec(v___y_5716_);
lean_dec(v_ref_5713_);
return v_res_5722_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14(lean_object* v_mod_5723_, uint8_t v_isMeta_5724_, lean_object* v_hint_5725_, lean_object* v___y_5726_, lean_object* v___y_5727_, lean_object* v___y_5728_, lean_object* v___y_5729_, lean_object* v___y_5730_, lean_object* v___y_5731_){
_start:
{
lean_object* v___x_5733_; 
v___x_5733_ = l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___redArg(v_mod_5723_, v_isMeta_5724_, v_hint_5725_, v___y_5728_, v___y_5729_, v___y_5730_, v___y_5731_);
return v___x_5733_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14___boxed(lean_object* v_mod_5734_, lean_object* v_isMeta_5735_, lean_object* v_hint_5736_, lean_object* v___y_5737_, lean_object* v___y_5738_, lean_object* v___y_5739_, lean_object* v___y_5740_, lean_object* v___y_5741_, lean_object* v___y_5742_, lean_object* v___y_5743_){
_start:
{
uint8_t v_isMeta_boxed_5744_; lean_object* v_res_5745_; 
v_isMeta_boxed_5744_ = lean_unbox(v_isMeta_5735_);
v_res_5745_ = l___private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14(v_mod_5734_, v_isMeta_boxed_5744_, v_hint_5736_, v___y_5737_, v___y_5738_, v___y_5739_, v___y_5740_, v___y_5741_, v___y_5742_);
lean_dec(v___y_5742_);
lean_dec_ref(v___y_5741_);
lean_dec(v___y_5740_);
lean_dec_ref(v___y_5739_);
lean_dec(v___y_5738_);
lean_dec_ref(v___y_5737_);
return v_res_5745_;
}
}
LEAN_EXPORT lean_object* l_Std_DHashMap_Internal_Raw_u2080_Const_get_x3f___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__16(lean_object* v_00_u03b2_5746_, lean_object* v_m_5747_, lean_object* v_a_5748_){
_start:
{
lean_object* v___x_5749_; 
v___x_5749_ = l_Std_DHashMap_Internal_Raw_u2080_Const_get_x3f___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__16___redArg(v_m_5747_, v_a_5748_);
return v___x_5749_;
}
}
LEAN_EXPORT lean_object* l_Std_DHashMap_Internal_Raw_u2080_Const_get_x3f___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__16___boxed(lean_object* v_00_u03b2_5750_, lean_object* v_m_5751_, lean_object* v_a_5752_){
_start:
{
lean_object* v_res_5753_; 
v_res_5753_ = l_Std_DHashMap_Internal_Raw_u2080_Const_get_x3f___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__16(v_00_u03b2_5750_, v_m_5751_, v_a_5752_);
lean_dec(v_a_5752_);
lean_dec_ref(v_m_5751_);
return v_res_5753_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20(lean_object* v_00_u03b1_5754_, lean_object* v_ref_5755_, lean_object* v_msg_5756_, lean_object* v_declHint_5757_, lean_object* v___y_5758_, lean_object* v___y_5759_, lean_object* v___y_5760_, lean_object* v___y_5761_, lean_object* v___y_5762_, lean_object* v___y_5763_){
_start:
{
lean_object* v___x_5765_; 
v___x_5765_ = l_Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20___redArg(v_ref_5755_, v_msg_5756_, v_declHint_5757_, v___y_5758_, v___y_5759_, v___y_5760_, v___y_5761_, v___y_5762_, v___y_5763_);
return v___x_5765_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20___boxed(lean_object* v_00_u03b1_5766_, lean_object* v_ref_5767_, lean_object* v_msg_5768_, lean_object* v_declHint_5769_, lean_object* v___y_5770_, lean_object* v___y_5771_, lean_object* v___y_5772_, lean_object* v___y_5773_, lean_object* v___y_5774_, lean_object* v___y_5775_, lean_object* v___y_5776_){
_start:
{
lean_object* v_res_5777_; 
v_res_5777_ = l_Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20(v_00_u03b1_5766_, v_ref_5767_, v_msg_5768_, v_declHint_5769_, v___y_5770_, v___y_5771_, v___y_5772_, v___y_5773_, v___y_5774_, v___y_5775_);
lean_dec(v___y_5775_);
lean_dec(v___y_5773_);
lean_dec_ref(v___y_5772_);
lean_dec(v___y_5771_);
lean_dec(v_ref_5767_);
return v_res_5777_;
}
}
LEAN_EXPORT uint8_t l_Lean_PersistentHashMap_contains___at___00__private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14_spec__23(lean_object* v_00_u03b2_5778_, lean_object* v_x_5779_, lean_object* v_x_5780_){
_start:
{
uint8_t v___x_5781_; 
v___x_5781_ = l_Lean_PersistentHashMap_contains___at___00__private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14_spec__23___redArg(v_x_5779_, v_x_5780_);
return v___x_5781_;
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_contains___at___00__private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14_spec__23___boxed(lean_object* v_00_u03b2_5782_, lean_object* v_x_5783_, lean_object* v_x_5784_){
_start:
{
uint8_t v_res_5785_; lean_object* v_r_5786_; 
v_res_5785_ = l_Lean_PersistentHashMap_contains___at___00__private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14_spec__23(v_00_u03b2_5782_, v_x_5783_, v_x_5784_);
lean_dec_ref(v_x_5784_);
v_r_5786_ = lean_box(v_res_5785_);
return v_r_5786_;
}
}
LEAN_EXPORT lean_object* l_Std_DHashMap_Internal_AssocList_get_x3f___at___00Std_DHashMap_Internal_Raw_u2080_Const_get_x3f___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__16_spec__26(lean_object* v_00_u03b2_5787_, lean_object* v_a_5788_, lean_object* v_x_5789_){
_start:
{
lean_object* v___x_5790_; 
v___x_5790_ = l_Std_DHashMap_Internal_AssocList_get_x3f___at___00Std_DHashMap_Internal_Raw_u2080_Const_get_x3f___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__16_spec__26___redArg(v_a_5788_, v_x_5789_);
return v___x_5790_;
}
}
LEAN_EXPORT lean_object* l_Std_DHashMap_Internal_AssocList_get_x3f___at___00Std_DHashMap_Internal_Raw_u2080_Const_get_x3f___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__16_spec__26___boxed(lean_object* v_00_u03b2_5791_, lean_object* v_a_5792_, lean_object* v_x_5793_){
_start:
{
lean_object* v_res_5794_; 
v_res_5794_ = l_Std_DHashMap_Internal_AssocList_get_x3f___at___00Std_DHashMap_Internal_Raw_u2080_Const_get_x3f___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__16_spec__26(v_00_u03b2_5791_, v_a_5792_, v_x_5793_);
lean_dec(v_x_5793_);
lean_dec(v_a_5792_);
return v_res_5794_;
}
}
LEAN_EXPORT lean_object* l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30(lean_object* v_msg_5795_, lean_object* v_declHint_5796_, lean_object* v___y_5797_, lean_object* v___y_5798_, lean_object* v___y_5799_, lean_object* v___y_5800_, lean_object* v___y_5801_, lean_object* v___y_5802_){
_start:
{
lean_object* v___x_5804_; 
v___x_5804_ = l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg(v_msg_5795_, v_declHint_5796_, v___y_5802_);
return v___x_5804_;
}
}
LEAN_EXPORT lean_object* l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___boxed(lean_object* v_msg_5805_, lean_object* v_declHint_5806_, lean_object* v___y_5807_, lean_object* v___y_5808_, lean_object* v___y_5809_, lean_object* v___y_5810_, lean_object* v___y_5811_, lean_object* v___y_5812_, lean_object* v___y_5813_){
_start:
{
lean_object* v_res_5814_; 
v_res_5814_ = l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30(v_msg_5805_, v_declHint_5806_, v___y_5807_, v___y_5808_, v___y_5809_, v___y_5810_, v___y_5811_, v___y_5812_);
lean_dec(v___y_5812_);
lean_dec_ref(v___y_5811_);
lean_dec(v___y_5810_);
lean_dec_ref(v___y_5809_);
lean_dec(v___y_5808_);
lean_dec_ref(v___y_5807_);
return v_res_5814_;
}
}
LEAN_EXPORT uint8_t l_Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00__private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14_spec__23_spec__29(lean_object* v_00_u03b2_5815_, lean_object* v_x_5816_, size_t v_x_5817_, lean_object* v_x_5818_){
_start:
{
uint8_t v___x_5819_; 
v___x_5819_ = l_Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00__private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14_spec__23_spec__29___redArg(v_x_5816_, v_x_5817_, v_x_5818_);
return v___x_5819_;
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00__private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14_spec__23_spec__29___boxed(lean_object* v_00_u03b2_5820_, lean_object* v_x_5821_, lean_object* v_x_5822_, lean_object* v_x_5823_){
_start:
{
size_t v_x_47265__boxed_5824_; uint8_t v_res_5825_; lean_object* v_r_5826_; 
v_x_47265__boxed_5824_ = lean_unbox_usize(v_x_5822_);
lean_dec(v_x_5822_);
v_res_5825_ = l_Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00__private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14_spec__23_spec__29(v_00_u03b2_5820_, v_x_5821_, v_x_47265__boxed_5824_, v_x_5823_);
lean_dec_ref(v_x_5823_);
v_r_5826_ = lean_box(v_res_5825_);
return v_r_5826_;
}
}
LEAN_EXPORT uint8_t l_Lean_PersistentHashMap_containsAtAux___at___00Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00__private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14_spec__23_spec__29_spec__33(lean_object* v_00_u03b2_5827_, lean_object* v_keys_5828_, lean_object* v_vals_5829_, lean_object* v_heq_5830_, lean_object* v_i_5831_, lean_object* v_k_5832_){
_start:
{
uint8_t v___x_5833_; 
v___x_5833_ = l_Lean_PersistentHashMap_containsAtAux___at___00Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00__private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14_spec__23_spec__29_spec__33___redArg(v_keys_5828_, v_i_5831_, v_k_5832_);
return v___x_5833_;
}
}
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_containsAtAux___at___00Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00__private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14_spec__23_spec__29_spec__33___boxed(lean_object* v_00_u03b2_5834_, lean_object* v_keys_5835_, lean_object* v_vals_5836_, lean_object* v_heq_5837_, lean_object* v_i_5838_, lean_object* v_k_5839_){
_start:
{
uint8_t v_res_5840_; lean_object* v_r_5841_; 
v_res_5840_ = l_Lean_PersistentHashMap_containsAtAux___at___00Lean_PersistentHashMap_containsAux___at___00Lean_PersistentHashMap_contains___at___00__private_Lean_ExtraModUses_0__Lean_recordExtraModUseCore___at___00Lean_recordExtraModUseFromDecl___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__10_spec__14_spec__23_spec__29_spec__33(v_00_u03b2_5834_, v_keys_5835_, v_vals_5836_, v_heq_5837_, v_i_5838_, v_k_5839_);
lean_dec_ref(v_k_5839_);
lean_dec_ref(v_vals_5836_);
lean_dec_ref(v_keys_5835_);
v_r_5841_ = lean_box(v_res_5840_);
return v_r_5841_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_initFn_00___x40_Lean_Elab_Deriving_Basic_393575330____hygCtx___hyg_2_(){
_start:
{
lean_object* v___x_5843_; lean_object* v___x_5844_; lean_object* v___x_5845_; 
v___x_5843_ = lean_box(1);
v___x_5844_ = lean_st_mk_ref(v___x_5843_);
v___x_5845_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_5845_, 0, v___x_5844_);
return v___x_5845_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_initFn_00___x40_Lean_Elab_Deriving_Basic_393575330____hygCtx___hyg_2____boxed(lean_object* v_a_5846_){
_start:
{
lean_object* v_res_5847_; 
v_res_5847_ = l_Lean_Elab_initFn_00___x40_Lean_Elab_Deriving_Basic_393575330____hygCtx___hyg_2_();
return v_res_5847_;
}
}
static lean_object* _init_l_Lean_Elab_registerDerivingHandler___closed__1(void){
_start:
{
lean_object* v___x_5849_; lean_object* v___x_5850_; 
v___x_5849_ = ((lean_object*)(l_Lean_Elab_registerDerivingHandler___closed__0));
v___x_5850_ = lean_mk_io_user_error(v___x_5849_);
return v___x_5850_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_registerDerivingHandler(lean_object* v_className_5851_, lean_object* v_handler_5852_){
_start:
{
lean_object* v___x_5854_; 
v___x_5854_ = l_Lean_initializing();
if (lean_obj_tag(v___x_5854_) == 0)
{
lean_object* v_a_5855_; lean_object* v___x_5857_; uint8_t v_isShared_5858_; uint8_t v_isSharedCheck_5885_; 
v_a_5855_ = lean_ctor_get(v___x_5854_, 0);
v_isSharedCheck_5885_ = !lean_is_exclusive(v___x_5854_);
if (v_isSharedCheck_5885_ == 0)
{
v___x_5857_ = v___x_5854_;
v_isShared_5858_ = v_isSharedCheck_5885_;
goto v_resetjp_5856_;
}
else
{
lean_inc(v_a_5855_);
lean_dec(v___x_5854_);
v___x_5857_ = lean_box(0);
v_isShared_5858_ = v_isSharedCheck_5885_;
goto v_resetjp_5856_;
}
v_resetjp_5856_:
{
uint8_t v___x_5859_; 
v___x_5859_ = lean_unbox(v_a_5855_);
lean_dec(v_a_5855_);
if (v___x_5859_ == 0)
{
lean_object* v___x_5860_; lean_object* v___x_5862_; 
lean_dec_ref(v_handler_5852_);
lean_dec(v_className_5851_);
v___x_5860_ = lean_obj_once(&l_Lean_Elab_registerDerivingHandler___closed__1, &l_Lean_Elab_registerDerivingHandler___closed__1_once, _init_l_Lean_Elab_registerDerivingHandler___closed__1);
if (v_isShared_5858_ == 0)
{
lean_ctor_set_tag(v___x_5857_, 1);
lean_ctor_set(v___x_5857_, 0, v___x_5860_);
v___x_5862_ = v___x_5857_;
goto v_reusejp_5861_;
}
else
{
lean_object* v_reuseFailAlloc_5863_; 
v_reuseFailAlloc_5863_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5863_, 0, v___x_5860_);
v___x_5862_ = v_reuseFailAlloc_5863_;
goto v_reusejp_5861_;
}
v_reusejp_5861_:
{
return v___x_5862_;
}
}
else
{
lean_object* v___x_5864_; 
lean_del_object(v___x_5857_);
lean_inc(v_className_5851_);
v___x_5864_ = l_Lean_Elab_Term_registerDerivableClass(v_className_5851_);
if (lean_obj_tag(v___x_5864_) == 0)
{
lean_object* v___x_5866_; uint8_t v_isShared_5867_; uint8_t v_isSharedCheck_5883_; 
v_isSharedCheck_5883_ = !lean_is_exclusive(v___x_5864_);
if (v_isSharedCheck_5883_ == 0)
{
lean_object* v_unused_5884_; 
v_unused_5884_ = lean_ctor_get(v___x_5864_, 0);
lean_dec(v_unused_5884_);
v___x_5866_ = v___x_5864_;
v_isShared_5867_ = v_isSharedCheck_5883_;
goto v_resetjp_5865_;
}
else
{
lean_dec(v___x_5864_);
v___x_5866_ = lean_box(0);
v_isShared_5867_ = v_isSharedCheck_5883_;
goto v_resetjp_5865_;
}
v_resetjp_5865_:
{
lean_object* v___x_5868_; lean_object* v___x_5869_; lean_object* v___y_5871_; lean_object* v___x_5876_; 
v___x_5868_ = l_Lean_Elab_derivingHandlersRef;
v___x_5869_ = lean_st_ref_take(v___x_5868_);
v___x_5876_ = l_Std_DTreeMap_Internal_Impl_Const_get_x3f___at___00Lean_NameMap_find_x3f_spec__0___redArg(v___x_5869_, v_className_5851_);
if (lean_obj_tag(v___x_5876_) == 0)
{
lean_object* v___x_5877_; lean_object* v___x_5878_; lean_object* v___x_5879_; 
v___x_5877_ = lean_box(0);
v___x_5878_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_5878_, 0, v_handler_5852_);
lean_ctor_set(v___x_5878_, 1, v___x_5877_);
v___x_5879_ = l_Std_DTreeMap_Internal_Impl_insert___at___00Lean_NameMap_insert_spec__0___redArg(v_className_5851_, v___x_5878_, v___x_5869_);
v___y_5871_ = v___x_5879_;
goto v___jp_5870_;
}
else
{
lean_object* v_val_5880_; lean_object* v___x_5881_; lean_object* v___x_5882_; 
v_val_5880_ = lean_ctor_get(v___x_5876_, 0);
lean_inc(v_val_5880_);
lean_dec_ref(v___x_5876_);
v___x_5881_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_5881_, 0, v_handler_5852_);
lean_ctor_set(v___x_5881_, 1, v_val_5880_);
v___x_5882_ = l_Std_DTreeMap_Internal_Impl_insert___at___00Lean_NameMap_insert_spec__0___redArg(v_className_5851_, v___x_5881_, v___x_5869_);
v___y_5871_ = v___x_5882_;
goto v___jp_5870_;
}
v___jp_5870_:
{
lean_object* v___x_5872_; lean_object* v___x_5874_; 
v___x_5872_ = lean_st_ref_set(v___x_5868_, v___y_5871_);
if (v_isShared_5867_ == 0)
{
lean_ctor_set(v___x_5866_, 0, v___x_5872_);
v___x_5874_ = v___x_5866_;
goto v_reusejp_5873_;
}
else
{
lean_object* v_reuseFailAlloc_5875_; 
v_reuseFailAlloc_5875_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5875_, 0, v___x_5872_);
v___x_5874_ = v_reuseFailAlloc_5875_;
goto v_reusejp_5873_;
}
v_reusejp_5873_:
{
return v___x_5874_;
}
}
}
}
else
{
lean_dec_ref(v_handler_5852_);
lean_dec(v_className_5851_);
return v___x_5864_;
}
}
}
}
else
{
lean_object* v_a_5886_; lean_object* v___x_5888_; uint8_t v_isShared_5889_; uint8_t v_isSharedCheck_5893_; 
lean_dec_ref(v_handler_5852_);
lean_dec(v_className_5851_);
v_a_5886_ = lean_ctor_get(v___x_5854_, 0);
v_isSharedCheck_5893_ = !lean_is_exclusive(v___x_5854_);
if (v_isSharedCheck_5893_ == 0)
{
v___x_5888_ = v___x_5854_;
v_isShared_5889_ = v_isSharedCheck_5893_;
goto v_resetjp_5887_;
}
else
{
lean_inc(v_a_5886_);
lean_dec(v___x_5854_);
v___x_5888_ = lean_box(0);
v_isShared_5889_ = v_isSharedCheck_5893_;
goto v_resetjp_5887_;
}
v_resetjp_5887_:
{
lean_object* v___x_5891_; 
if (v_isShared_5889_ == 0)
{
v___x_5891_ = v___x_5888_;
goto v_reusejp_5890_;
}
else
{
lean_object* v_reuseFailAlloc_5892_; 
v_reuseFailAlloc_5892_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_5892_, 0, v_a_5886_);
v___x_5891_ = v_reuseFailAlloc_5892_;
goto v_reusejp_5890_;
}
v_reusejp_5890_:
{
return v___x_5891_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_registerDerivingHandler___boxed(lean_object* v_className_5894_, lean_object* v_handler_5895_, lean_object* v_a_5896_){
_start:
{
lean_object* v_res_5897_; 
v_res_5897_ = l_Lean_Elab_registerDerivingHandler(v_className_5894_, v_handler_5895_);
return v_res_5897_;
}
}
LEAN_EXPORT lean_object* l_Lean_Options_set___at___00Lean_Elab_applyDerivingHandlers_spec__0(lean_object* v_o_5898_, lean_object* v_k_5899_, uint8_t v_v_5900_){
_start:
{
lean_object* v_map_5901_; uint8_t v_hasTrace_5902_; lean_object* v___x_5904_; uint8_t v_isShared_5905_; uint8_t v_isSharedCheck_5916_; 
v_map_5901_ = lean_ctor_get(v_o_5898_, 0);
v_hasTrace_5902_ = lean_ctor_get_uint8(v_o_5898_, sizeof(void*)*1);
v_isSharedCheck_5916_ = !lean_is_exclusive(v_o_5898_);
if (v_isSharedCheck_5916_ == 0)
{
v___x_5904_ = v_o_5898_;
v_isShared_5905_ = v_isSharedCheck_5916_;
goto v_resetjp_5903_;
}
else
{
lean_inc(v_map_5901_);
lean_dec(v_o_5898_);
v___x_5904_ = lean_box(0);
v_isShared_5905_ = v_isSharedCheck_5916_;
goto v_resetjp_5903_;
}
v_resetjp_5903_:
{
lean_object* v___x_5906_; lean_object* v___x_5907_; 
v___x_5906_ = lean_alloc_ctor(1, 0, 1);
lean_ctor_set_uint8(v___x_5906_, 0, v_v_5900_);
lean_inc(v_k_5899_);
v___x_5907_ = l_Std_DTreeMap_Internal_Impl_insert___at___00Lean_NameMap_insert_spec__0___redArg(v_k_5899_, v___x_5906_, v_map_5901_);
if (v_hasTrace_5902_ == 0)
{
lean_object* v___x_5908_; uint8_t v___x_5909_; lean_object* v___x_5911_; 
v___x_5908_ = ((lean_object*)(l_Lean_isTracingEnabledFor___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__2___redArg___closed__1));
v___x_5909_ = l_Lean_Name_isPrefixOf(v___x_5908_, v_k_5899_);
lean_dec(v_k_5899_);
if (v_isShared_5905_ == 0)
{
lean_ctor_set(v___x_5904_, 0, v___x_5907_);
v___x_5911_ = v___x_5904_;
goto v_reusejp_5910_;
}
else
{
lean_object* v_reuseFailAlloc_5912_; 
v_reuseFailAlloc_5912_ = lean_alloc_ctor(0, 1, 1);
lean_ctor_set(v_reuseFailAlloc_5912_, 0, v___x_5907_);
v___x_5911_ = v_reuseFailAlloc_5912_;
goto v_reusejp_5910_;
}
v_reusejp_5910_:
{
lean_ctor_set_uint8(v___x_5911_, sizeof(void*)*1, v___x_5909_);
return v___x_5911_;
}
}
else
{
lean_object* v___x_5914_; 
lean_dec(v_k_5899_);
if (v_isShared_5905_ == 0)
{
lean_ctor_set(v___x_5904_, 0, v___x_5907_);
v___x_5914_ = v___x_5904_;
goto v_reusejp_5913_;
}
else
{
lean_object* v_reuseFailAlloc_5915_; 
v_reuseFailAlloc_5915_ = lean_alloc_ctor(0, 1, 1);
lean_ctor_set(v_reuseFailAlloc_5915_, 0, v___x_5907_);
lean_ctor_set_uint8(v_reuseFailAlloc_5915_, sizeof(void*)*1, v_hasTrace_5902_);
v___x_5914_ = v_reuseFailAlloc_5915_;
goto v_reusejp_5913_;
}
v_reusejp_5913_:
{
return v___x_5914_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Options_set___at___00Lean_Elab_applyDerivingHandlers_spec__0___boxed(lean_object* v_o_5917_, lean_object* v_k_5918_, lean_object* v_v_5919_){
_start:
{
uint8_t v_v_boxed_5920_; lean_object* v_res_5921_; 
v_v_boxed_5920_ = lean_unbox(v_v_5919_);
v_res_5921_ = l_Lean_Options_set___at___00Lean_Elab_applyDerivingHandlers_spec__0(v_o_5917_, v_k_5918_, v_v_boxed_5920_);
return v_res_5921_;
}
}
LEAN_EXPORT lean_object* l_Lean_isTracingEnabledFor___at___00Lean_Elab_applyDerivingHandlers_spec__5___redArg(lean_object* v_cls_5922_, lean_object* v___y_5923_){
_start:
{
lean_object* v___x_5925_; lean_object* v___x_5926_; lean_object* v___x_5927_; lean_object* v_scopes_5928_; lean_object* v___x_5929_; lean_object* v___x_5930_; lean_object* v_opts_5931_; uint8_t v_hasTrace_5932_; 
v___x_5925_ = l_Lean_inheritedTraceOptions;
v___x_5926_ = lean_st_ref_get(v___x_5925_);
v___x_5927_ = lean_st_ref_get(v___y_5923_);
v_scopes_5928_ = lean_ctor_get(v___x_5927_, 2);
lean_inc(v_scopes_5928_);
lean_dec(v___x_5927_);
v___x_5929_ = l_Lean_Elab_Command_instInhabitedScope_default;
v___x_5930_ = l_List_head_x21___redArg(v___x_5929_, v_scopes_5928_);
lean_dec(v_scopes_5928_);
v_opts_5931_ = lean_ctor_get(v___x_5930_, 1);
lean_inc_ref(v_opts_5931_);
lean_dec(v___x_5930_);
v_hasTrace_5932_ = lean_ctor_get_uint8(v_opts_5931_, sizeof(void*)*1);
if (v_hasTrace_5932_ == 0)
{
lean_object* v___x_5933_; lean_object* v___x_5934_; 
lean_dec_ref(v_opts_5931_);
lean_dec(v___x_5926_);
lean_dec(v_cls_5922_);
v___x_5933_ = lean_box(v_hasTrace_5932_);
v___x_5934_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_5934_, 0, v___x_5933_);
return v___x_5934_;
}
else
{
lean_object* v___x_5935_; lean_object* v___x_5936_; uint8_t v___x_5937_; lean_object* v___x_5938_; lean_object* v___x_5939_; 
v___x_5935_ = ((lean_object*)(l_Lean_isTracingEnabledFor___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__2___redArg___closed__1));
v___x_5936_ = l_Lean_Name_append(v___x_5935_, v_cls_5922_);
v___x_5937_ = l___private_Lean_Util_Trace_0__Lean_checkTraceOption_go(v___x_5926_, v_opts_5931_, v___x_5936_);
lean_dec(v___x_5936_);
lean_dec_ref(v_opts_5931_);
lean_dec(v___x_5926_);
v___x_5938_ = lean_box(v___x_5937_);
v___x_5939_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_5939_, 0, v___x_5938_);
return v___x_5939_;
}
}
}
LEAN_EXPORT lean_object* l_Lean_isTracingEnabledFor___at___00Lean_Elab_applyDerivingHandlers_spec__5___redArg___boxed(lean_object* v_cls_5940_, lean_object* v___y_5941_, lean_object* v___y_5942_){
_start:
{
lean_object* v_res_5943_; 
v_res_5943_ = l_Lean_isTracingEnabledFor___at___00Lean_Elab_applyDerivingHandlers_spec__5___redArg(v_cls_5940_, v___y_5941_);
lean_dec(v___y_5941_);
return v_res_5943_;
}
}
LEAN_EXPORT lean_object* l_Lean_isTracingEnabledFor___at___00Lean_Elab_applyDerivingHandlers_spec__5(lean_object* v_cls_5944_, lean_object* v___y_5945_, lean_object* v___y_5946_){
_start:
{
lean_object* v___x_5948_; 
v___x_5948_ = l_Lean_isTracingEnabledFor___at___00Lean_Elab_applyDerivingHandlers_spec__5___redArg(v_cls_5944_, v___y_5946_);
return v___x_5948_;
}
}
LEAN_EXPORT lean_object* l_Lean_isTracingEnabledFor___at___00Lean_Elab_applyDerivingHandlers_spec__5___boxed(lean_object* v_cls_5949_, lean_object* v___y_5950_, lean_object* v___y_5951_, lean_object* v___y_5952_){
_start:
{
lean_object* v_res_5953_; 
v_res_5953_ = l_Lean_isTracingEnabledFor___at___00Lean_Elab_applyDerivingHandlers_spec__5(v_cls_5949_, v___y_5950_, v___y_5951_);
lean_dec(v___y_5951_);
lean_dec_ref(v___y_5950_);
return v_res_5953_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___00Lean_Elab_applyDerivingHandlers_spec__6___redArg(lean_object* v___y_5954_){
_start:
{
lean_object* v___x_5956_; lean_object* v_traceState_5957_; lean_object* v_traces_5958_; lean_object* v___x_5959_; lean_object* v_traceState_5960_; lean_object* v_env_5961_; lean_object* v_messages_5962_; lean_object* v_scopes_5963_; lean_object* v_usedQuotCtxts_5964_; lean_object* v_nextMacroScope_5965_; lean_object* v_maxRecDepth_5966_; lean_object* v_ngen_5967_; lean_object* v_auxDeclNGen_5968_; lean_object* v_infoState_5969_; lean_object* v_snapshotTasks_5970_; lean_object* v___x_5972_; uint8_t v_isShared_5973_; uint8_t v_isSharedCheck_5991_; 
v___x_5956_ = lean_st_ref_get(v___y_5954_);
v_traceState_5957_ = lean_ctor_get(v___x_5956_, 9);
lean_inc_ref(v_traceState_5957_);
lean_dec(v___x_5956_);
v_traces_5958_ = lean_ctor_get(v_traceState_5957_, 0);
lean_inc_ref(v_traces_5958_);
lean_dec_ref(v_traceState_5957_);
v___x_5959_ = lean_st_ref_take(v___y_5954_);
v_traceState_5960_ = lean_ctor_get(v___x_5959_, 9);
v_env_5961_ = lean_ctor_get(v___x_5959_, 0);
v_messages_5962_ = lean_ctor_get(v___x_5959_, 1);
v_scopes_5963_ = lean_ctor_get(v___x_5959_, 2);
v_usedQuotCtxts_5964_ = lean_ctor_get(v___x_5959_, 3);
v_nextMacroScope_5965_ = lean_ctor_get(v___x_5959_, 4);
v_maxRecDepth_5966_ = lean_ctor_get(v___x_5959_, 5);
v_ngen_5967_ = lean_ctor_get(v___x_5959_, 6);
v_auxDeclNGen_5968_ = lean_ctor_get(v___x_5959_, 7);
v_infoState_5969_ = lean_ctor_get(v___x_5959_, 8);
v_snapshotTasks_5970_ = lean_ctor_get(v___x_5959_, 10);
v_isSharedCheck_5991_ = !lean_is_exclusive(v___x_5959_);
if (v_isSharedCheck_5991_ == 0)
{
v___x_5972_ = v___x_5959_;
v_isShared_5973_ = v_isSharedCheck_5991_;
goto v_resetjp_5971_;
}
else
{
lean_inc(v_snapshotTasks_5970_);
lean_inc(v_traceState_5960_);
lean_inc(v_infoState_5969_);
lean_inc(v_auxDeclNGen_5968_);
lean_inc(v_ngen_5967_);
lean_inc(v_maxRecDepth_5966_);
lean_inc(v_nextMacroScope_5965_);
lean_inc(v_usedQuotCtxts_5964_);
lean_inc(v_scopes_5963_);
lean_inc(v_messages_5962_);
lean_inc(v_env_5961_);
lean_dec(v___x_5959_);
v___x_5972_ = lean_box(0);
v_isShared_5973_ = v_isSharedCheck_5991_;
goto v_resetjp_5971_;
}
v_resetjp_5971_:
{
uint64_t v_tid_5974_; lean_object* v___x_5976_; uint8_t v_isShared_5977_; uint8_t v_isSharedCheck_5989_; 
v_tid_5974_ = lean_ctor_get_uint64(v_traceState_5960_, sizeof(void*)*1);
v_isSharedCheck_5989_ = !lean_is_exclusive(v_traceState_5960_);
if (v_isSharedCheck_5989_ == 0)
{
lean_object* v_unused_5990_; 
v_unused_5990_ = lean_ctor_get(v_traceState_5960_, 0);
lean_dec(v_unused_5990_);
v___x_5976_ = v_traceState_5960_;
v_isShared_5977_ = v_isSharedCheck_5989_;
goto v_resetjp_5975_;
}
else
{
lean_dec(v_traceState_5960_);
v___x_5976_ = lean_box(0);
v_isShared_5977_ = v_isSharedCheck_5989_;
goto v_resetjp_5975_;
}
v_resetjp_5975_:
{
lean_object* v___x_5978_; lean_object* v___x_5979_; lean_object* v___x_5980_; lean_object* v___x_5982_; 
v___x_5978_ = lean_unsigned_to_nat(32u);
v___x_5979_ = lean_mk_empty_array_with_capacity(v___x_5978_);
lean_dec_ref(v___x_5979_);
v___x_5980_ = lean_obj_once(&l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__6___redArg___closed__1, &l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__6___redArg___closed__1_once, _init_l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__6___redArg___closed__1);
if (v_isShared_5977_ == 0)
{
lean_ctor_set(v___x_5976_, 0, v___x_5980_);
v___x_5982_ = v___x_5976_;
goto v_reusejp_5981_;
}
else
{
lean_object* v_reuseFailAlloc_5988_; 
v_reuseFailAlloc_5988_ = lean_alloc_ctor(0, 1, 8);
lean_ctor_set(v_reuseFailAlloc_5988_, 0, v___x_5980_);
lean_ctor_set_uint64(v_reuseFailAlloc_5988_, sizeof(void*)*1, v_tid_5974_);
v___x_5982_ = v_reuseFailAlloc_5988_;
goto v_reusejp_5981_;
}
v_reusejp_5981_:
{
lean_object* v___x_5984_; 
if (v_isShared_5973_ == 0)
{
lean_ctor_set(v___x_5972_, 9, v___x_5982_);
v___x_5984_ = v___x_5972_;
goto v_reusejp_5983_;
}
else
{
lean_object* v_reuseFailAlloc_5987_; 
v_reuseFailAlloc_5987_ = lean_alloc_ctor(0, 11, 0);
lean_ctor_set(v_reuseFailAlloc_5987_, 0, v_env_5961_);
lean_ctor_set(v_reuseFailAlloc_5987_, 1, v_messages_5962_);
lean_ctor_set(v_reuseFailAlloc_5987_, 2, v_scopes_5963_);
lean_ctor_set(v_reuseFailAlloc_5987_, 3, v_usedQuotCtxts_5964_);
lean_ctor_set(v_reuseFailAlloc_5987_, 4, v_nextMacroScope_5965_);
lean_ctor_set(v_reuseFailAlloc_5987_, 5, v_maxRecDepth_5966_);
lean_ctor_set(v_reuseFailAlloc_5987_, 6, v_ngen_5967_);
lean_ctor_set(v_reuseFailAlloc_5987_, 7, v_auxDeclNGen_5968_);
lean_ctor_set(v_reuseFailAlloc_5987_, 8, v_infoState_5969_);
lean_ctor_set(v_reuseFailAlloc_5987_, 9, v___x_5982_);
lean_ctor_set(v_reuseFailAlloc_5987_, 10, v_snapshotTasks_5970_);
v___x_5984_ = v_reuseFailAlloc_5987_;
goto v_reusejp_5983_;
}
v_reusejp_5983_:
{
lean_object* v___x_5985_; lean_object* v___x_5986_; 
v___x_5985_ = lean_st_ref_set(v___y_5954_, v___x_5984_);
v___x_5986_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_5986_, 0, v_traces_5958_);
return v___x_5986_;
}
}
}
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___00Lean_Elab_applyDerivingHandlers_spec__6___redArg___boxed(lean_object* v___y_5992_, lean_object* v___y_5993_){
_start:
{
lean_object* v_res_5994_; 
v_res_5994_ = l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___00Lean_Elab_applyDerivingHandlers_spec__6___redArg(v___y_5992_);
lean_dec(v___y_5992_);
return v_res_5994_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___00Lean_Elab_applyDerivingHandlers_spec__6(lean_object* v___y_5995_, lean_object* v___y_5996_){
_start:
{
lean_object* v___x_5998_; 
v___x_5998_ = l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___00Lean_Elab_applyDerivingHandlers_spec__6___redArg(v___y_5996_);
return v___x_5998_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___00Lean_Elab_applyDerivingHandlers_spec__6___boxed(lean_object* v___y_5999_, lean_object* v___y_6000_, lean_object* v___y_6001_){
_start:
{
lean_object* v_res_6002_; 
v_res_6002_ = l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___00Lean_Elab_applyDerivingHandlers_spec__6(v___y_5999_, v___y_6000_);
lean_dec(v___y_6000_);
lean_dec_ref(v___y_5999_);
return v_res_6002_;
}
}
LEAN_EXPORT uint8_t l___private_Init_Data_Array_Basic_0__Array_anyMUnsafe_any___at___00Lean_Elab_applyDerivingHandlers_spec__1(lean_object* v_as_6003_, size_t v_i_6004_, size_t v_stop_6005_){
_start:
{
uint8_t v___x_6006_; 
v___x_6006_ = lean_usize_dec_eq(v_i_6004_, v_stop_6005_);
if (v___x_6006_ == 0)
{
lean_object* v___x_6007_; uint8_t v___x_6008_; 
v___x_6007_ = lean_array_uget_borrowed(v_as_6003_, v_i_6004_);
v___x_6008_ = l_Lean_isPrivateName(v___x_6007_);
if (v___x_6008_ == 0)
{
size_t v___x_6009_; size_t v___x_6010_; 
v___x_6009_ = ((size_t)1ULL);
v___x_6010_ = lean_usize_add(v_i_6004_, v___x_6009_);
v_i_6004_ = v___x_6010_;
goto _start;
}
else
{
return v___x_6008_;
}
}
else
{
uint8_t v___x_6012_; 
v___x_6012_ = 0;
return v___x_6012_;
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_anyMUnsafe_any___at___00Lean_Elab_applyDerivingHandlers_spec__1___boxed(lean_object* v_as_6013_, lean_object* v_i_6014_, lean_object* v_stop_6015_){
_start:
{
size_t v_i_boxed_6016_; size_t v_stop_boxed_6017_; uint8_t v_res_6018_; lean_object* v_r_6019_; 
v_i_boxed_6016_ = lean_unbox_usize(v_i_6014_);
lean_dec(v_i_6014_);
v_stop_boxed_6017_ = lean_unbox_usize(v_stop_6015_);
lean_dec(v_stop_6015_);
v_res_6018_ = l___private_Init_Data_Array_Basic_0__Array_anyMUnsafe_any___at___00Lean_Elab_applyDerivingHandlers_spec__1(v_as_6013_, v_i_boxed_6016_, v_stop_boxed_6017_);
lean_dec_ref(v_as_6013_);
v_r_6019_ = lean_box(v_res_6018_);
return v_r_6019_;
}
}
static lean_object* _init_l_Lean_Elab_applyDerivingHandlers___lam__0___closed__3(void){
_start:
{
uint8_t v___x_6025_; lean_object* v___x_6026_; lean_object* v___x_6027_; 
v___x_6025_ = 0;
v___x_6026_ = lean_box(0);
v___x_6027_ = l_Lean_SourceInfo_fromRef(v___x_6026_, v___x_6025_);
return v___x_6027_;
}
}
static lean_object* _init_l_Lean_Elab_applyDerivingHandlers___lam__0___closed__15(void){
_start:
{
lean_object* v___x_6049_; 
v___x_6049_ = l_Array_mkArray0(lean_box(0));
return v___x_6049_;
}
}
static lean_object* _init_l_Lean_Elab_applyDerivingHandlers___lam__0___closed__16(void){
_start:
{
lean_object* v___x_6050_; lean_object* v___x_6051_; lean_object* v___x_6052_; lean_object* v___x_6053_; 
v___x_6050_ = lean_obj_once(&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__15, &l_Lean_Elab_applyDerivingHandlers___lam__0___closed__15_once, _init_l_Lean_Elab_applyDerivingHandlers___lam__0___closed__15);
v___x_6051_ = ((lean_object*)(l_Lean_Elab_applyDerivingHandlers___lam__0___closed__14));
v___x_6052_ = lean_obj_once(&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__3, &l_Lean_Elab_applyDerivingHandlers___lam__0___closed__3_once, _init_l_Lean_Elab_applyDerivingHandlers___lam__0___closed__3);
v___x_6053_ = lean_alloc_ctor(1, 3, 0);
lean_ctor_set(v___x_6053_, 0, v___x_6052_);
lean_ctor_set(v___x_6053_, 1, v___x_6051_);
lean_ctor_set(v___x_6053_, 2, v___x_6050_);
return v___x_6053_;
}
}
static lean_object* _init_l_Lean_Elab_applyDerivingHandlers___lam__0___closed__17(void){
_start:
{
lean_object* v___x_6054_; lean_object* v___x_6055_; lean_object* v___x_6056_; lean_object* v___x_6057_; 
v___x_6054_ = lean_obj_once(&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__16, &l_Lean_Elab_applyDerivingHandlers___lam__0___closed__16_once, _init_l_Lean_Elab_applyDerivingHandlers___lam__0___closed__16);
v___x_6055_ = ((lean_object*)(l_Lean_Elab_applyDerivingHandlers___lam__0___closed__12));
v___x_6056_ = lean_obj_once(&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__3, &l_Lean_Elab_applyDerivingHandlers___lam__0___closed__3_once, _init_l_Lean_Elab_applyDerivingHandlers___lam__0___closed__3);
v___x_6057_ = l_Lean_Syntax_node1(v___x_6056_, v___x_6055_, v___x_6054_);
return v___x_6057_;
}
}
static lean_object* _init_l_Lean_Elab_applyDerivingHandlers___lam__0___closed__22(void){
_start:
{
lean_object* v___x_6066_; lean_object* v___x_6067_; 
v___x_6066_ = ((lean_object*)(l_Lean_Elab_applyDerivingHandlers___lam__0___closed__21));
v___x_6067_ = l_String_toRawSubstring_x27(v___x_6066_);
return v___x_6067_;
}
}
static lean_object* _init_l_Lean_Elab_applyDerivingHandlers___lam__0___closed__24(void){
_start:
{
lean_object* v___x_6070_; lean_object* v___x_6071_; lean_object* v___x_6072_; lean_object* v___x_6073_; 
v___x_6070_ = l_Lean_firstFrontendMacroScope;
v___x_6071_ = ((lean_object*)(l_Lean_Elab_applyDerivingHandlers___lam__0___closed__23));
v___x_6072_ = ((lean_object*)(l_Lean_Elab_applyDerivingHandlers___lam__0___closed__5));
v___x_6073_ = l_Lean_addMacroScope(v___x_6072_, v___x_6071_, v___x_6070_);
return v___x_6073_;
}
}
static lean_object* _init_l_Lean_Elab_applyDerivingHandlers___lam__0___closed__25(void){
_start:
{
lean_object* v___x_6074_; lean_object* v___x_6075_; lean_object* v___x_6076_; lean_object* v___x_6077_; lean_object* v___x_6078_; 
v___x_6074_ = lean_box(0);
v___x_6075_ = lean_obj_once(&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__24, &l_Lean_Elab_applyDerivingHandlers___lam__0___closed__24_once, _init_l_Lean_Elab_applyDerivingHandlers___lam__0___closed__24);
v___x_6076_ = lean_obj_once(&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__22, &l_Lean_Elab_applyDerivingHandlers___lam__0___closed__22_once, _init_l_Lean_Elab_applyDerivingHandlers___lam__0___closed__22);
v___x_6077_ = lean_obj_once(&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__3, &l_Lean_Elab_applyDerivingHandlers___lam__0___closed__3_once, _init_l_Lean_Elab_applyDerivingHandlers___lam__0___closed__3);
v___x_6078_ = lean_alloc_ctor(3, 4, 0);
lean_ctor_set(v___x_6078_, 0, v___x_6077_);
lean_ctor_set(v___x_6078_, 1, v___x_6076_);
lean_ctor_set(v___x_6078_, 2, v___x_6075_);
lean_ctor_set(v___x_6078_, 3, v___x_6074_);
return v___x_6078_;
}
}
static lean_object* _init_l_Lean_Elab_applyDerivingHandlers___lam__0___closed__26(void){
_start:
{
lean_object* v___x_6079_; lean_object* v___x_6080_; lean_object* v___x_6081_; lean_object* v___x_6082_; lean_object* v___x_6083_; 
v___x_6079_ = lean_obj_once(&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__16, &l_Lean_Elab_applyDerivingHandlers___lam__0___closed__16_once, _init_l_Lean_Elab_applyDerivingHandlers___lam__0___closed__16);
v___x_6080_ = lean_obj_once(&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__25, &l_Lean_Elab_applyDerivingHandlers___lam__0___closed__25_once, _init_l_Lean_Elab_applyDerivingHandlers___lam__0___closed__25);
v___x_6081_ = ((lean_object*)(l_Lean_Elab_applyDerivingHandlers___lam__0___closed__20));
v___x_6082_ = lean_obj_once(&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__3, &l_Lean_Elab_applyDerivingHandlers___lam__0___closed__3_once, _init_l_Lean_Elab_applyDerivingHandlers___lam__0___closed__3);
v___x_6083_ = l_Lean_Syntax_node2(v___x_6082_, v___x_6081_, v___x_6080_, v___x_6079_);
return v___x_6083_;
}
}
static lean_object* _init_l_Lean_Elab_applyDerivingHandlers___lam__0___closed__27(void){
_start:
{
lean_object* v___x_6084_; lean_object* v___x_6085_; lean_object* v___x_6086_; lean_object* v___x_6087_; lean_object* v___x_6088_; 
v___x_6084_ = lean_obj_once(&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__26, &l_Lean_Elab_applyDerivingHandlers___lam__0___closed__26_once, _init_l_Lean_Elab_applyDerivingHandlers___lam__0___closed__26);
v___x_6085_ = lean_obj_once(&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__17, &l_Lean_Elab_applyDerivingHandlers___lam__0___closed__17_once, _init_l_Lean_Elab_applyDerivingHandlers___lam__0___closed__17);
v___x_6086_ = ((lean_object*)(l_Lean_Elab_applyDerivingHandlers___lam__0___closed__10));
v___x_6087_ = lean_obj_once(&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__3, &l_Lean_Elab_applyDerivingHandlers___lam__0___closed__3_once, _init_l_Lean_Elab_applyDerivingHandlers___lam__0___closed__3);
v___x_6088_ = l_Lean_Syntax_node2(v___x_6087_, v___x_6086_, v___x_6085_, v___x_6084_);
return v___x_6088_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_applyDerivingHandlers___lam__0(uint8_t v_setExpose_6089_, lean_object* v_typeNames_6090_, lean_object* v_sc_6091_){
_start:
{
lean_object* v_header_6092_; lean_object* v_opts_6093_; lean_object* v_currNamespace_6094_; lean_object* v_openDecls_6095_; lean_object* v_levelNames_6096_; lean_object* v_varDecls_6097_; lean_object* v_varUIds_6098_; lean_object* v_includedVars_6099_; lean_object* v_omittedVars_6100_; uint8_t v_isNoncomputable_6101_; uint8_t v_isMeta_6102_; lean_object* v_attrs_6103_; lean_object* v___x_6105_; uint8_t v_isShared_6106_; uint8_t v_isSharedCheck_6128_; 
v_header_6092_ = lean_ctor_get(v_sc_6091_, 0);
v_opts_6093_ = lean_ctor_get(v_sc_6091_, 1);
v_currNamespace_6094_ = lean_ctor_get(v_sc_6091_, 2);
v_openDecls_6095_ = lean_ctor_get(v_sc_6091_, 3);
v_levelNames_6096_ = lean_ctor_get(v_sc_6091_, 4);
v_varDecls_6097_ = lean_ctor_get(v_sc_6091_, 5);
v_varUIds_6098_ = lean_ctor_get(v_sc_6091_, 6);
v_includedVars_6099_ = lean_ctor_get(v_sc_6091_, 7);
v_omittedVars_6100_ = lean_ctor_get(v_sc_6091_, 8);
v_isNoncomputable_6101_ = lean_ctor_get_uint8(v_sc_6091_, sizeof(void*)*10);
v_isMeta_6102_ = lean_ctor_get_uint8(v_sc_6091_, sizeof(void*)*10 + 2);
v_attrs_6103_ = lean_ctor_get(v_sc_6091_, 9);
v_isSharedCheck_6128_ = !lean_is_exclusive(v_sc_6091_);
if (v_isSharedCheck_6128_ == 0)
{
v___x_6105_ = v_sc_6091_;
v_isShared_6106_ = v_isSharedCheck_6128_;
goto v_resetjp_6104_;
}
else
{
lean_inc(v_attrs_6103_);
lean_inc(v_omittedVars_6100_);
lean_inc(v_includedVars_6099_);
lean_inc(v_varUIds_6098_);
lean_inc(v_varDecls_6097_);
lean_inc(v_levelNames_6096_);
lean_inc(v_openDecls_6095_);
lean_inc(v_currNamespace_6094_);
lean_inc(v_opts_6093_);
lean_inc(v_header_6092_);
lean_dec(v_sc_6091_);
v___x_6105_ = lean_box(0);
v_isShared_6106_ = v_isSharedCheck_6128_;
goto v_resetjp_6104_;
}
v_resetjp_6104_:
{
lean_object* v___x_6107_; uint8_t v___x_6108_; lean_object* v___x_6109_; uint8_t v___y_6111_; lean_object* v___x_6122_; lean_object* v___x_6123_; uint8_t v___x_6124_; 
v___x_6107_ = ((lean_object*)(l_Lean_Elab_applyDerivingHandlers___lam__0___closed__2));
v___x_6108_ = 0;
v___x_6109_ = l_Lean_Options_set___at___00Lean_Elab_applyDerivingHandlers_spec__0(v_opts_6093_, v___x_6107_, v___x_6108_);
v___x_6122_ = lean_unsigned_to_nat(0u);
v___x_6123_ = lean_array_get_size(v_typeNames_6090_);
v___x_6124_ = lean_nat_dec_lt(v___x_6122_, v___x_6123_);
if (v___x_6124_ == 0)
{
goto v___jp_6120_;
}
else
{
if (v___x_6124_ == 0)
{
goto v___jp_6120_;
}
else
{
size_t v___x_6125_; size_t v___x_6126_; uint8_t v___x_6127_; 
v___x_6125_ = ((size_t)0ULL);
v___x_6126_ = lean_usize_of_nat(v___x_6123_);
v___x_6127_ = l___private_Init_Data_Array_Basic_0__Array_anyMUnsafe_any___at___00Lean_Elab_applyDerivingHandlers_spec__1(v_typeNames_6090_, v___x_6125_, v___x_6126_);
if (v___x_6127_ == 0)
{
goto v___jp_6120_;
}
else
{
v___y_6111_ = v___x_6108_;
goto v___jp_6110_;
}
}
}
v___jp_6110_:
{
if (v_setExpose_6089_ == 0)
{
lean_object* v___x_6113_; 
if (v_isShared_6106_ == 0)
{
lean_ctor_set(v___x_6105_, 1, v___x_6109_);
v___x_6113_ = v___x_6105_;
goto v_reusejp_6112_;
}
else
{
lean_object* v_reuseFailAlloc_6114_; 
v_reuseFailAlloc_6114_ = lean_alloc_ctor(0, 10, 3);
lean_ctor_set(v_reuseFailAlloc_6114_, 0, v_header_6092_);
lean_ctor_set(v_reuseFailAlloc_6114_, 1, v___x_6109_);
lean_ctor_set(v_reuseFailAlloc_6114_, 2, v_currNamespace_6094_);
lean_ctor_set(v_reuseFailAlloc_6114_, 3, v_openDecls_6095_);
lean_ctor_set(v_reuseFailAlloc_6114_, 4, v_levelNames_6096_);
lean_ctor_set(v_reuseFailAlloc_6114_, 5, v_varDecls_6097_);
lean_ctor_set(v_reuseFailAlloc_6114_, 6, v_varUIds_6098_);
lean_ctor_set(v_reuseFailAlloc_6114_, 7, v_includedVars_6099_);
lean_ctor_set(v_reuseFailAlloc_6114_, 8, v_omittedVars_6100_);
lean_ctor_set(v_reuseFailAlloc_6114_, 9, v_attrs_6103_);
lean_ctor_set_uint8(v_reuseFailAlloc_6114_, sizeof(void*)*10, v_isNoncomputable_6101_);
lean_ctor_set_uint8(v_reuseFailAlloc_6114_, sizeof(void*)*10 + 2, v_isMeta_6102_);
v___x_6113_ = v_reuseFailAlloc_6114_;
goto v_reusejp_6112_;
}
v_reusejp_6112_:
{
lean_ctor_set_uint8(v___x_6113_, sizeof(void*)*10 + 1, v___y_6111_);
return v___x_6113_;
}
}
else
{
lean_object* v___x_6115_; lean_object* v___x_6116_; lean_object* v___x_6118_; 
v___x_6115_ = lean_obj_once(&l_Lean_Elab_applyDerivingHandlers___lam__0___closed__27, &l_Lean_Elab_applyDerivingHandlers___lam__0___closed__27_once, _init_l_Lean_Elab_applyDerivingHandlers___lam__0___closed__27);
v___x_6116_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v___x_6116_, 0, v___x_6115_);
lean_ctor_set(v___x_6116_, 1, v_attrs_6103_);
if (v_isShared_6106_ == 0)
{
lean_ctor_set(v___x_6105_, 9, v___x_6116_);
lean_ctor_set(v___x_6105_, 1, v___x_6109_);
v___x_6118_ = v___x_6105_;
goto v_reusejp_6117_;
}
else
{
lean_object* v_reuseFailAlloc_6119_; 
v_reuseFailAlloc_6119_ = lean_alloc_ctor(0, 10, 3);
lean_ctor_set(v_reuseFailAlloc_6119_, 0, v_header_6092_);
lean_ctor_set(v_reuseFailAlloc_6119_, 1, v___x_6109_);
lean_ctor_set(v_reuseFailAlloc_6119_, 2, v_currNamespace_6094_);
lean_ctor_set(v_reuseFailAlloc_6119_, 3, v_openDecls_6095_);
lean_ctor_set(v_reuseFailAlloc_6119_, 4, v_levelNames_6096_);
lean_ctor_set(v_reuseFailAlloc_6119_, 5, v_varDecls_6097_);
lean_ctor_set(v_reuseFailAlloc_6119_, 6, v_varUIds_6098_);
lean_ctor_set(v_reuseFailAlloc_6119_, 7, v_includedVars_6099_);
lean_ctor_set(v_reuseFailAlloc_6119_, 8, v_omittedVars_6100_);
lean_ctor_set(v_reuseFailAlloc_6119_, 9, v___x_6116_);
lean_ctor_set_uint8(v_reuseFailAlloc_6119_, sizeof(void*)*10, v_isNoncomputable_6101_);
lean_ctor_set_uint8(v_reuseFailAlloc_6119_, sizeof(void*)*10 + 2, v_isMeta_6102_);
v___x_6118_ = v_reuseFailAlloc_6119_;
goto v_reusejp_6117_;
}
v_reusejp_6117_:
{
lean_ctor_set_uint8(v___x_6118_, sizeof(void*)*10 + 1, v___y_6111_);
return v___x_6118_;
}
}
}
v___jp_6120_:
{
uint8_t v___x_6121_; 
v___x_6121_ = 1;
v___y_6111_ = v___x_6121_;
goto v___jp_6110_;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_applyDerivingHandlers___lam__0___boxed(lean_object* v_setExpose_6129_, lean_object* v_typeNames_6130_, lean_object* v_sc_6131_){
_start:
{
uint8_t v_setExpose_boxed_6132_; lean_object* v_res_6133_; 
v_setExpose_boxed_6132_ = lean_unbox(v_setExpose_6129_);
v_res_6133_ = l_Lean_Elab_applyDerivingHandlers___lam__0(v_setExpose_boxed_6132_, v_typeNames_6130_, v_sc_6131_);
lean_dec_ref(v_typeNames_6130_);
return v_res_6133_;
}
}
static lean_object* _init_l_Lean_Elab_applyDerivingHandlers___lam__1___closed__1(void){
_start:
{
lean_object* v___x_6135_; lean_object* v___x_6136_; 
v___x_6135_ = ((lean_object*)(l_Lean_Elab_applyDerivingHandlers___lam__1___closed__0));
v___x_6136_ = l_Lean_stringToMessageData(v___x_6135_);
return v___x_6136_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_applyDerivingHandlers___lam__1(lean_object* v_className_6137_, lean_object* v_x_6138_, lean_object* v___y_6139_, lean_object* v___y_6140_){
_start:
{
lean_object* v___x_6142_; uint8_t v___x_6143_; lean_object* v___x_6144_; lean_object* v___x_6145_; lean_object* v___x_6146_; lean_object* v___x_6147_; lean_object* v___x_6148_; 
v___x_6142_ = lean_obj_once(&l_Lean_Elab_applyDerivingHandlers___lam__1___closed__1, &l_Lean_Elab_applyDerivingHandlers___lam__1___closed__1_once, _init_l_Lean_Elab_applyDerivingHandlers___lam__1___closed__1);
v___x_6143_ = 0;
v___x_6144_ = l_Lean_MessageData_ofConstName(v_className_6137_, v___x_6143_);
v___x_6145_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_6145_, 0, v___x_6142_);
lean_ctor_set(v___x_6145_, 1, v___x_6144_);
v___x_6146_ = lean_obj_once(&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__5, &l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__5_once, _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__5);
v___x_6147_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_6147_, 0, v___x_6145_);
lean_ctor_set(v___x_6147_, 1, v___x_6146_);
v___x_6148_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_6148_, 0, v___x_6147_);
return v___x_6148_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_applyDerivingHandlers___lam__1___boxed(lean_object* v_className_6149_, lean_object* v_x_6150_, lean_object* v___y_6151_, lean_object* v___y_6152_, lean_object* v___y_6153_){
_start:
{
lean_object* v_res_6154_; 
v_res_6154_ = l_Lean_Elab_applyDerivingHandlers___lam__1(v_className_6149_, v_x_6150_, v___y_6151_, v___y_6152_);
lean_dec(v___y_6152_);
lean_dec_ref(v___y_6151_);
lean_dec_ref(v_x_6150_);
return v_res_6154_;
}
}
LEAN_EXPORT lean_object* l_List_mapTR_loop___at___00Lean_Elab_applyDerivingHandlers_spec__8(lean_object* v_a_6155_, lean_object* v_a_6156_){
_start:
{
if (lean_obj_tag(v_a_6155_) == 0)
{
lean_object* v___x_6157_; 
v___x_6157_ = l_List_reverse___redArg(v_a_6156_);
return v___x_6157_;
}
else
{
lean_object* v_head_6158_; lean_object* v_tail_6159_; lean_object* v___x_6161_; uint8_t v_isShared_6162_; uint8_t v_isSharedCheck_6172_; 
v_head_6158_ = lean_ctor_get(v_a_6155_, 0);
v_tail_6159_ = lean_ctor_get(v_a_6155_, 1);
v_isSharedCheck_6172_ = !lean_is_exclusive(v_a_6155_);
if (v_isSharedCheck_6172_ == 0)
{
v___x_6161_ = v_a_6155_;
v_isShared_6162_ = v_isSharedCheck_6172_;
goto v_resetjp_6160_;
}
else
{
lean_inc(v_tail_6159_);
lean_inc(v_head_6158_);
lean_dec(v_a_6155_);
v___x_6161_ = lean_box(0);
v_isShared_6162_ = v_isSharedCheck_6172_;
goto v_resetjp_6160_;
}
v_resetjp_6160_:
{
uint8_t v___x_6163_; lean_object* v___x_6164_; lean_object* v___x_6165_; lean_object* v___x_6166_; lean_object* v___x_6167_; lean_object* v___x_6169_; 
v___x_6163_ = 0;
v___x_6164_ = lean_obj_once(&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__5, &l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__5_once, _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__5);
v___x_6165_ = l_Lean_MessageData_ofConstName(v_head_6158_, v___x_6163_);
v___x_6166_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_6166_, 0, v___x_6164_);
lean_ctor_set(v___x_6166_, 1, v___x_6165_);
v___x_6167_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_6167_, 0, v___x_6166_);
lean_ctor_set(v___x_6167_, 1, v___x_6164_);
if (v_isShared_6162_ == 0)
{
lean_ctor_set(v___x_6161_, 1, v_a_6156_);
lean_ctor_set(v___x_6161_, 0, v___x_6167_);
v___x_6169_ = v___x_6161_;
goto v_reusejp_6168_;
}
else
{
lean_object* v_reuseFailAlloc_6171_; 
v_reuseFailAlloc_6171_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v_reuseFailAlloc_6171_, 0, v___x_6167_);
lean_ctor_set(v_reuseFailAlloc_6171_, 1, v_a_6156_);
v___x_6169_ = v_reuseFailAlloc_6171_;
goto v_reusejp_6168_;
}
v_reusejp_6168_:
{
v_a_6155_ = v_tail_6159_;
v_a_6156_ = v___x_6169_;
goto _start;
}
}
}
}
}
LEAN_EXPORT uint8_t l_Except_toTraceResult___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00Lean_Elab_applyDerivingHandlers_spec__7_spec__9(lean_object* v_e_6173_){
_start:
{
if (lean_obj_tag(v_e_6173_) == 0)
{
uint8_t v___x_6174_; 
v___x_6174_ = 2;
return v___x_6174_;
}
else
{
uint8_t v___x_6175_; 
v___x_6175_ = 0;
return v___x_6175_;
}
}
}
LEAN_EXPORT lean_object* l_Except_toTraceResult___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00Lean_Elab_applyDerivingHandlers_spec__7_spec__9___boxed(lean_object* v_e_6176_){
_start:
{
uint8_t v_res_6177_; lean_object* v_r_6178_; 
v_res_6177_ = l_Except_toTraceResult___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00Lean_Elab_applyDerivingHandlers_spec__7_spec__9(v_e_6176_);
lean_dec_ref(v_e_6176_);
v_r_6178_ = lean_box(v_res_6177_);
return v_r_6178_;
}
}
LEAN_EXPORT lean_object* l_MonadExcept_ofExcept___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00Lean_Elab_applyDerivingHandlers_spec__7_spec__11___redArg(lean_object* v_x_6179_){
_start:
{
if (lean_obj_tag(v_x_6179_) == 0)
{
lean_object* v_a_6181_; lean_object* v___x_6183_; uint8_t v_isShared_6184_; uint8_t v_isSharedCheck_6188_; 
v_a_6181_ = lean_ctor_get(v_x_6179_, 0);
v_isSharedCheck_6188_ = !lean_is_exclusive(v_x_6179_);
if (v_isSharedCheck_6188_ == 0)
{
v___x_6183_ = v_x_6179_;
v_isShared_6184_ = v_isSharedCheck_6188_;
goto v_resetjp_6182_;
}
else
{
lean_inc(v_a_6181_);
lean_dec(v_x_6179_);
v___x_6183_ = lean_box(0);
v_isShared_6184_ = v_isSharedCheck_6188_;
goto v_resetjp_6182_;
}
v_resetjp_6182_:
{
lean_object* v___x_6186_; 
if (v_isShared_6184_ == 0)
{
lean_ctor_set_tag(v___x_6183_, 1);
v___x_6186_ = v___x_6183_;
goto v_reusejp_6185_;
}
else
{
lean_object* v_reuseFailAlloc_6187_; 
v_reuseFailAlloc_6187_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6187_, 0, v_a_6181_);
v___x_6186_ = v_reuseFailAlloc_6187_;
goto v_reusejp_6185_;
}
v_reusejp_6185_:
{
return v___x_6186_;
}
}
}
else
{
lean_object* v_a_6189_; lean_object* v___x_6191_; uint8_t v_isShared_6192_; uint8_t v_isSharedCheck_6196_; 
v_a_6189_ = lean_ctor_get(v_x_6179_, 0);
v_isSharedCheck_6196_ = !lean_is_exclusive(v_x_6179_);
if (v_isSharedCheck_6196_ == 0)
{
v___x_6191_ = v_x_6179_;
v_isShared_6192_ = v_isSharedCheck_6196_;
goto v_resetjp_6190_;
}
else
{
lean_inc(v_a_6189_);
lean_dec(v_x_6179_);
v___x_6191_ = lean_box(0);
v_isShared_6192_ = v_isSharedCheck_6196_;
goto v_resetjp_6190_;
}
v_resetjp_6190_:
{
lean_object* v___x_6194_; 
if (v_isShared_6192_ == 0)
{
lean_ctor_set_tag(v___x_6191_, 0);
v___x_6194_ = v___x_6191_;
goto v_reusejp_6193_;
}
else
{
lean_object* v_reuseFailAlloc_6195_; 
v_reuseFailAlloc_6195_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6195_, 0, v_a_6189_);
v___x_6194_ = v_reuseFailAlloc_6195_;
goto v_reusejp_6193_;
}
v_reusejp_6193_:
{
return v___x_6194_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_MonadExcept_ofExcept___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00Lean_Elab_applyDerivingHandlers_spec__7_spec__11___redArg___boxed(lean_object* v_x_6197_, lean_object* v___y_6198_){
_start:
{
lean_object* v_res_6199_; 
v_res_6199_ = l_MonadExcept_ofExcept___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00Lean_Elab_applyDerivingHandlers_spec__7_spec__11___redArg(v_x_6197_);
return v_res_6199_;
}
}
LEAN_EXPORT lean_object* l_Lean_addMessageContextPartial___at___00Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2_spec__2___redArg(lean_object* v_msgData_6200_, lean_object* v___y_6201_){
_start:
{
lean_object* v___x_6203_; lean_object* v_env_6204_; lean_object* v___x_6205_; lean_object* v_scopes_6206_; lean_object* v___x_6207_; lean_object* v___x_6208_; lean_object* v_opts_6209_; lean_object* v___x_6210_; lean_object* v___x_6211_; lean_object* v___x_6212_; lean_object* v___x_6213_; lean_object* v___x_6214_; lean_object* v___x_6215_; lean_object* v___x_6216_; 
v___x_6203_ = lean_st_ref_get(v___y_6201_);
v_env_6204_ = lean_ctor_get(v___x_6203_, 0);
lean_inc_ref(v_env_6204_);
lean_dec(v___x_6203_);
v___x_6205_ = lean_st_ref_get(v___y_6201_);
v_scopes_6206_ = lean_ctor_get(v___x_6205_, 2);
lean_inc(v_scopes_6206_);
lean_dec(v___x_6205_);
v___x_6207_ = l_Lean_Elab_Command_instInhabitedScope_default;
v___x_6208_ = l_List_head_x21___redArg(v___x_6207_, v_scopes_6206_);
lean_dec(v_scopes_6206_);
v_opts_6209_ = lean_ctor_get(v___x_6208_, 1);
lean_inc_ref(v_opts_6209_);
lean_dec(v___x_6208_);
v___x_6210_ = lean_obj_once(&l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__2, &l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__2_once, _init_l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__2);
v___x_6211_ = lean_unsigned_to_nat(32u);
v___x_6212_ = lean_mk_empty_array_with_capacity(v___x_6211_);
lean_dec_ref(v___x_6212_);
v___x_6213_ = lean_obj_once(&l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__5, &l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__5_once, _init_l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__5);
v___x_6214_ = lean_alloc_ctor(0, 4, 0);
lean_ctor_set(v___x_6214_, 0, v_env_6204_);
lean_ctor_set(v___x_6214_, 1, v___x_6210_);
lean_ctor_set(v___x_6214_, 2, v___x_6213_);
lean_ctor_set(v___x_6214_, 3, v_opts_6209_);
v___x_6215_ = lean_alloc_ctor(3, 2, 0);
lean_ctor_set(v___x_6215_, 0, v___x_6214_);
lean_ctor_set(v___x_6215_, 1, v_msgData_6200_);
v___x_6216_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_6216_, 0, v___x_6215_);
return v___x_6216_;
}
}
LEAN_EXPORT lean_object* l_Lean_addMessageContextPartial___at___00Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2_spec__2___redArg___boxed(lean_object* v_msgData_6217_, lean_object* v___y_6218_, lean_object* v___y_6219_){
_start:
{
lean_object* v_res_6220_; 
v_res_6220_ = l_Lean_addMessageContextPartial___at___00Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2_spec__2___redArg(v_msgData_6217_, v___y_6218_);
lean_dec(v___y_6218_);
return v_res_6220_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_addTraceNode___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00Lean_Elab_applyDerivingHandlers_spec__7_spec__10(lean_object* v_oldTraces_6221_, lean_object* v_data_6222_, lean_object* v_ref_6223_, lean_object* v_msg_6224_, lean_object* v___y_6225_, lean_object* v___y_6226_){
_start:
{
lean_object* v___x_6228_; 
v___x_6228_ = l_Lean_Elab_Command_getRef___redArg(v___y_6225_);
if (lean_obj_tag(v___x_6228_) == 0)
{
lean_object* v___x_6229_; lean_object* v_traceState_6230_; lean_object* v_traces_6231_; lean_object* v___x_6232_; size_t v_sz_6233_; size_t v___x_6234_; lean_object* v___x_6235_; lean_object* v_msg_6236_; lean_object* v___x_6237_; lean_object* v_a_6238_; lean_object* v___x_6240_; uint8_t v_isShared_6241_; uint8_t v_isSharedCheck_6277_; 
lean_dec_ref(v___x_6228_);
v___x_6229_ = lean_st_ref_get(v___y_6226_);
v_traceState_6230_ = lean_ctor_get(v___x_6229_, 9);
lean_inc_ref(v_traceState_6230_);
lean_dec(v___x_6229_);
v_traces_6231_ = lean_ctor_get(v_traceState_6230_, 0);
lean_inc_ref(v_traces_6231_);
lean_dec_ref(v_traceState_6230_);
v___x_6232_ = l_Lean_PersistentArray_toArray___redArg(v_traces_6231_);
lean_dec_ref(v_traces_6231_);
v_sz_6233_ = lean_array_size(v___x_6232_);
v___x_6234_ = ((size_t)0ULL);
v___x_6235_ = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00__private_Lean_Util_Trace_0__Lean_addTraceNode___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__11_spec__14(v_sz_6233_, v___x_6234_, v___x_6232_);
v_msg_6236_ = lean_alloc_ctor(9, 3, 0);
lean_ctor_set(v_msg_6236_, 0, v_data_6222_);
lean_ctor_set(v_msg_6236_, 1, v_msg_6224_);
lean_ctor_set(v_msg_6236_, 2, v___x_6235_);
v___x_6237_ = l_Lean_addMessageContextPartial___at___00Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2_spec__2___redArg(v_msg_6236_, v___y_6226_);
v_a_6238_ = lean_ctor_get(v___x_6237_, 0);
v_isSharedCheck_6277_ = !lean_is_exclusive(v___x_6237_);
if (v_isSharedCheck_6277_ == 0)
{
v___x_6240_ = v___x_6237_;
v_isShared_6241_ = v_isSharedCheck_6277_;
goto v_resetjp_6239_;
}
else
{
lean_inc(v_a_6238_);
lean_dec(v___x_6237_);
v___x_6240_ = lean_box(0);
v_isShared_6241_ = v_isSharedCheck_6277_;
goto v_resetjp_6239_;
}
v_resetjp_6239_:
{
lean_object* v___x_6242_; lean_object* v_traceState_6243_; lean_object* v_env_6244_; lean_object* v_messages_6245_; lean_object* v_scopes_6246_; lean_object* v_usedQuotCtxts_6247_; lean_object* v_nextMacroScope_6248_; lean_object* v_maxRecDepth_6249_; lean_object* v_ngen_6250_; lean_object* v_auxDeclNGen_6251_; lean_object* v_infoState_6252_; lean_object* v_snapshotTasks_6253_; lean_object* v___x_6255_; uint8_t v_isShared_6256_; uint8_t v_isSharedCheck_6276_; 
v___x_6242_ = lean_st_ref_take(v___y_6226_);
v_traceState_6243_ = lean_ctor_get(v___x_6242_, 9);
v_env_6244_ = lean_ctor_get(v___x_6242_, 0);
v_messages_6245_ = lean_ctor_get(v___x_6242_, 1);
v_scopes_6246_ = lean_ctor_get(v___x_6242_, 2);
v_usedQuotCtxts_6247_ = lean_ctor_get(v___x_6242_, 3);
v_nextMacroScope_6248_ = lean_ctor_get(v___x_6242_, 4);
v_maxRecDepth_6249_ = lean_ctor_get(v___x_6242_, 5);
v_ngen_6250_ = lean_ctor_get(v___x_6242_, 6);
v_auxDeclNGen_6251_ = lean_ctor_get(v___x_6242_, 7);
v_infoState_6252_ = lean_ctor_get(v___x_6242_, 8);
v_snapshotTasks_6253_ = lean_ctor_get(v___x_6242_, 10);
v_isSharedCheck_6276_ = !lean_is_exclusive(v___x_6242_);
if (v_isSharedCheck_6276_ == 0)
{
v___x_6255_ = v___x_6242_;
v_isShared_6256_ = v_isSharedCheck_6276_;
goto v_resetjp_6254_;
}
else
{
lean_inc(v_snapshotTasks_6253_);
lean_inc(v_traceState_6243_);
lean_inc(v_infoState_6252_);
lean_inc(v_auxDeclNGen_6251_);
lean_inc(v_ngen_6250_);
lean_inc(v_maxRecDepth_6249_);
lean_inc(v_nextMacroScope_6248_);
lean_inc(v_usedQuotCtxts_6247_);
lean_inc(v_scopes_6246_);
lean_inc(v_messages_6245_);
lean_inc(v_env_6244_);
lean_dec(v___x_6242_);
v___x_6255_ = lean_box(0);
v_isShared_6256_ = v_isSharedCheck_6276_;
goto v_resetjp_6254_;
}
v_resetjp_6254_:
{
uint64_t v_tid_6257_; lean_object* v___x_6259_; uint8_t v_isShared_6260_; uint8_t v_isSharedCheck_6274_; 
v_tid_6257_ = lean_ctor_get_uint64(v_traceState_6243_, sizeof(void*)*1);
v_isSharedCheck_6274_ = !lean_is_exclusive(v_traceState_6243_);
if (v_isSharedCheck_6274_ == 0)
{
lean_object* v_unused_6275_; 
v_unused_6275_ = lean_ctor_get(v_traceState_6243_, 0);
lean_dec(v_unused_6275_);
v___x_6259_ = v_traceState_6243_;
v_isShared_6260_ = v_isSharedCheck_6274_;
goto v_resetjp_6258_;
}
else
{
lean_dec(v_traceState_6243_);
v___x_6259_ = lean_box(0);
v_isShared_6260_ = v_isSharedCheck_6274_;
goto v_resetjp_6258_;
}
v_resetjp_6258_:
{
lean_object* v___x_6261_; lean_object* v___x_6262_; lean_object* v___x_6264_; 
v___x_6261_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_6261_, 0, v_ref_6223_);
lean_ctor_set(v___x_6261_, 1, v_a_6238_);
v___x_6262_ = l_Lean_PersistentArray_push___redArg(v_oldTraces_6221_, v___x_6261_);
if (v_isShared_6260_ == 0)
{
lean_ctor_set(v___x_6259_, 0, v___x_6262_);
v___x_6264_ = v___x_6259_;
goto v_reusejp_6263_;
}
else
{
lean_object* v_reuseFailAlloc_6273_; 
v_reuseFailAlloc_6273_ = lean_alloc_ctor(0, 1, 8);
lean_ctor_set(v_reuseFailAlloc_6273_, 0, v___x_6262_);
lean_ctor_set_uint64(v_reuseFailAlloc_6273_, sizeof(void*)*1, v_tid_6257_);
v___x_6264_ = v_reuseFailAlloc_6273_;
goto v_reusejp_6263_;
}
v_reusejp_6263_:
{
lean_object* v___x_6266_; 
if (v_isShared_6256_ == 0)
{
lean_ctor_set(v___x_6255_, 9, v___x_6264_);
v___x_6266_ = v___x_6255_;
goto v_reusejp_6265_;
}
else
{
lean_object* v_reuseFailAlloc_6272_; 
v_reuseFailAlloc_6272_ = lean_alloc_ctor(0, 11, 0);
lean_ctor_set(v_reuseFailAlloc_6272_, 0, v_env_6244_);
lean_ctor_set(v_reuseFailAlloc_6272_, 1, v_messages_6245_);
lean_ctor_set(v_reuseFailAlloc_6272_, 2, v_scopes_6246_);
lean_ctor_set(v_reuseFailAlloc_6272_, 3, v_usedQuotCtxts_6247_);
lean_ctor_set(v_reuseFailAlloc_6272_, 4, v_nextMacroScope_6248_);
lean_ctor_set(v_reuseFailAlloc_6272_, 5, v_maxRecDepth_6249_);
lean_ctor_set(v_reuseFailAlloc_6272_, 6, v_ngen_6250_);
lean_ctor_set(v_reuseFailAlloc_6272_, 7, v_auxDeclNGen_6251_);
lean_ctor_set(v_reuseFailAlloc_6272_, 8, v_infoState_6252_);
lean_ctor_set(v_reuseFailAlloc_6272_, 9, v___x_6264_);
lean_ctor_set(v_reuseFailAlloc_6272_, 10, v_snapshotTasks_6253_);
v___x_6266_ = v_reuseFailAlloc_6272_;
goto v_reusejp_6265_;
}
v_reusejp_6265_:
{
lean_object* v___x_6267_; lean_object* v___x_6268_; lean_object* v___x_6270_; 
v___x_6267_ = lean_st_ref_set(v___y_6226_, v___x_6266_);
v___x_6268_ = lean_box(0);
if (v_isShared_6241_ == 0)
{
lean_ctor_set(v___x_6240_, 0, v___x_6268_);
v___x_6270_ = v___x_6240_;
goto v_reusejp_6269_;
}
else
{
lean_object* v_reuseFailAlloc_6271_; 
v_reuseFailAlloc_6271_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6271_, 0, v___x_6268_);
v___x_6270_ = v_reuseFailAlloc_6271_;
goto v_reusejp_6269_;
}
v_reusejp_6269_:
{
return v___x_6270_;
}
}
}
}
}
}
}
else
{
lean_object* v_a_6278_; lean_object* v___x_6280_; uint8_t v_isShared_6281_; uint8_t v_isSharedCheck_6285_; 
lean_dec_ref(v_msg_6224_);
lean_dec(v_ref_6223_);
lean_dec_ref(v_data_6222_);
lean_dec_ref(v_oldTraces_6221_);
v_a_6278_ = lean_ctor_get(v___x_6228_, 0);
v_isSharedCheck_6285_ = !lean_is_exclusive(v___x_6228_);
if (v_isSharedCheck_6285_ == 0)
{
v___x_6280_ = v___x_6228_;
v_isShared_6281_ = v_isSharedCheck_6285_;
goto v_resetjp_6279_;
}
else
{
lean_inc(v_a_6278_);
lean_dec(v___x_6228_);
v___x_6280_ = lean_box(0);
v_isShared_6281_ = v_isSharedCheck_6285_;
goto v_resetjp_6279_;
}
v_resetjp_6279_:
{
lean_object* v___x_6283_; 
if (v_isShared_6281_ == 0)
{
v___x_6283_ = v___x_6280_;
goto v_reusejp_6282_;
}
else
{
lean_object* v_reuseFailAlloc_6284_; 
v_reuseFailAlloc_6284_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6284_, 0, v_a_6278_);
v___x_6283_ = v_reuseFailAlloc_6284_;
goto v_reusejp_6282_;
}
v_reusejp_6282_:
{
return v___x_6283_;
}
}
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_addTraceNode___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00Lean_Elab_applyDerivingHandlers_spec__7_spec__10___boxed(lean_object* v_oldTraces_6286_, lean_object* v_data_6287_, lean_object* v_ref_6288_, lean_object* v_msg_6289_, lean_object* v___y_6290_, lean_object* v___y_6291_, lean_object* v___y_6292_){
_start:
{
lean_object* v_res_6293_; 
v_res_6293_ = l___private_Lean_Util_Trace_0__Lean_addTraceNode___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00Lean_Elab_applyDerivingHandlers_spec__7_spec__10(v_oldTraces_6286_, v_data_6287_, v_ref_6288_, v_msg_6289_, v___y_6290_, v___y_6291_);
lean_dec(v___y_6291_);
lean_dec_ref(v___y_6290_);
return v_res_6293_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00Lean_Elab_applyDerivingHandlers_spec__7(lean_object* v_cls_6294_, uint8_t v_collapsed_6295_, lean_object* v_tag_6296_, lean_object* v_opts_6297_, uint8_t v_clsEnabled_6298_, lean_object* v_oldTraces_6299_, lean_object* v_msg_6300_, lean_object* v_resStartStop_6301_, lean_object* v___y_6302_, lean_object* v___y_6303_){
_start:
{
lean_object* v_fst_6305_; lean_object* v_snd_6306_; lean_object* v___x_6308_; uint8_t v_isShared_6309_; uint8_t v_isSharedCheck_6407_; 
v_fst_6305_ = lean_ctor_get(v_resStartStop_6301_, 0);
v_snd_6306_ = lean_ctor_get(v_resStartStop_6301_, 1);
v_isSharedCheck_6407_ = !lean_is_exclusive(v_resStartStop_6301_);
if (v_isSharedCheck_6407_ == 0)
{
v___x_6308_ = v_resStartStop_6301_;
v_isShared_6309_ = v_isSharedCheck_6407_;
goto v_resetjp_6307_;
}
else
{
lean_inc(v_snd_6306_);
lean_inc(v_fst_6305_);
lean_dec(v_resStartStop_6301_);
v___x_6308_ = lean_box(0);
v_isShared_6309_ = v_isSharedCheck_6407_;
goto v_resetjp_6307_;
}
v_resetjp_6307_:
{
lean_object* v___y_6311_; lean_object* v___y_6312_; lean_object* v_data_6313_; lean_object* v_fst_6316_; lean_object* v_snd_6317_; lean_object* v___x_6319_; uint8_t v_isShared_6320_; uint8_t v_isSharedCheck_6406_; 
v_fst_6316_ = lean_ctor_get(v_snd_6306_, 0);
v_snd_6317_ = lean_ctor_get(v_snd_6306_, 1);
v_isSharedCheck_6406_ = !lean_is_exclusive(v_snd_6306_);
if (v_isSharedCheck_6406_ == 0)
{
v___x_6319_ = v_snd_6306_;
v_isShared_6320_ = v_isSharedCheck_6406_;
goto v_resetjp_6318_;
}
else
{
lean_inc(v_snd_6317_);
lean_inc(v_fst_6316_);
lean_dec(v_snd_6306_);
v___x_6319_ = lean_box(0);
v_isShared_6320_ = v_isSharedCheck_6406_;
goto v_resetjp_6318_;
}
v___jp_6310_:
{
lean_object* v___x_6314_; 
v___x_6314_ = l___private_Lean_Util_Trace_0__Lean_addTraceNode___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00Lean_Elab_applyDerivingHandlers_spec__7_spec__10(v_oldTraces_6299_, v_data_6313_, v___y_6311_, v___y_6312_, v___y_6302_, v___y_6303_);
lean_dec(v___y_6303_);
lean_dec_ref(v___y_6302_);
if (lean_obj_tag(v___x_6314_) == 0)
{
lean_object* v___x_6315_; 
lean_dec_ref(v___x_6314_);
v___x_6315_ = l_MonadExcept_ofExcept___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00Lean_Elab_applyDerivingHandlers_spec__7_spec__11___redArg(v_fst_6305_);
return v___x_6315_;
}
else
{
lean_dec(v_fst_6305_);
return v___x_6314_;
}
}
v_resetjp_6318_:
{
lean_object* v___x_6321_; uint8_t v___x_6322_; lean_object* v___y_6324_; lean_object* v_a_6325_; uint8_t v___y_6358_; double v___y_6391_; 
v___x_6321_ = l_Lean_trace_profiler;
v___x_6322_ = l_Lean_Option_get___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__7(v_opts_6297_, v___x_6321_);
if (v___x_6322_ == 0)
{
v___y_6358_ = v___x_6322_;
goto v___jp_6357_;
}
else
{
lean_object* v___x_6396_; uint8_t v___x_6397_; 
v___x_6396_ = l_Lean_trace_profiler_useHeartbeats;
v___x_6397_ = l_Lean_Option_get___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__7(v_opts_6297_, v___x_6396_);
if (v___x_6397_ == 0)
{
lean_object* v___x_6398_; lean_object* v___x_6399_; double v___x_6400_; double v___x_6401_; double v___x_6402_; 
v___x_6398_ = l_Lean_trace_profiler_threshold;
v___x_6399_ = l_Lean_Option_get___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__13(v_opts_6297_, v___x_6398_);
v___x_6400_ = lean_float_of_nat(v___x_6399_);
v___x_6401_ = lean_float_once(&l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__4, &l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__4_once, _init_l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__4);
v___x_6402_ = lean_float_div(v___x_6400_, v___x_6401_);
v___y_6391_ = v___x_6402_;
goto v___jp_6390_;
}
else
{
lean_object* v___x_6403_; lean_object* v___x_6404_; double v___x_6405_; 
v___x_6403_ = l_Lean_trace_profiler_threshold;
v___x_6404_ = l_Lean_Option_get___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__13(v_opts_6297_, v___x_6403_);
v___x_6405_ = lean_float_of_nat(v___x_6404_);
v___y_6391_ = v___x_6405_;
goto v___jp_6390_;
}
}
v___jp_6323_:
{
uint8_t v_result_6326_; lean_object* v___x_6327_; lean_object* v___x_6328_; lean_object* v___x_6329_; lean_object* v___x_6331_; 
v_result_6326_ = l_Except_toTraceResult___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00Lean_Elab_applyDerivingHandlers_spec__7_spec__9(v_fst_6305_);
v___x_6327_ = l_Lean_TraceResult_toEmoji(v_result_6326_);
v___x_6328_ = l_Lean_stringToMessageData(v___x_6327_);
v___x_6329_ = lean_obj_once(&l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__1, &l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__1_once, _init_l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__1);
if (v_isShared_6320_ == 0)
{
lean_ctor_set_tag(v___x_6319_, 7);
lean_ctor_set(v___x_6319_, 1, v___x_6329_);
lean_ctor_set(v___x_6319_, 0, v___x_6328_);
v___x_6331_ = v___x_6319_;
goto v_reusejp_6330_;
}
else
{
lean_object* v_reuseFailAlloc_6342_; 
v_reuseFailAlloc_6342_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v_reuseFailAlloc_6342_, 0, v___x_6328_);
lean_ctor_set(v_reuseFailAlloc_6342_, 1, v___x_6329_);
v___x_6331_ = v_reuseFailAlloc_6342_;
goto v_reusejp_6330_;
}
v_reusejp_6330_:
{
lean_object* v_m_6333_; 
if (v_isShared_6309_ == 0)
{
lean_ctor_set_tag(v___x_6308_, 7);
lean_ctor_set(v___x_6308_, 1, v_a_6325_);
lean_ctor_set(v___x_6308_, 0, v___x_6331_);
v_m_6333_ = v___x_6308_;
goto v_reusejp_6332_;
}
else
{
lean_object* v_reuseFailAlloc_6341_; 
v_reuseFailAlloc_6341_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v_reuseFailAlloc_6341_, 0, v___x_6331_);
lean_ctor_set(v_reuseFailAlloc_6341_, 1, v_a_6325_);
v_m_6333_ = v_reuseFailAlloc_6341_;
goto v_reusejp_6332_;
}
v_reusejp_6332_:
{
lean_object* v___x_6334_; lean_object* v___x_6335_; double v___x_6336_; lean_object* v_data_6337_; 
v___x_6334_ = lean_box(v_result_6326_);
v___x_6335_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_6335_, 0, v___x_6334_);
v___x_6336_ = lean_float_once(&l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg___closed__0, &l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg___closed__0_once, _init_l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg___closed__0);
lean_inc_ref(v_tag_6296_);
lean_inc_ref(v___x_6335_);
lean_inc(v_cls_6294_);
v_data_6337_ = lean_alloc_ctor(0, 3, 17);
lean_ctor_set(v_data_6337_, 0, v_cls_6294_);
lean_ctor_set(v_data_6337_, 1, v___x_6335_);
lean_ctor_set(v_data_6337_, 2, v_tag_6296_);
lean_ctor_set_float(v_data_6337_, sizeof(void*)*3, v___x_6336_);
lean_ctor_set_float(v_data_6337_, sizeof(void*)*3 + 8, v___x_6336_);
lean_ctor_set_uint8(v_data_6337_, sizeof(void*)*3 + 16, v_collapsed_6295_);
if (v___x_6322_ == 0)
{
lean_dec_ref(v___x_6335_);
lean_dec(v_snd_6317_);
lean_dec(v_fst_6316_);
lean_dec_ref(v_tag_6296_);
lean_dec(v_cls_6294_);
v___y_6311_ = v___y_6324_;
v___y_6312_ = v_m_6333_;
v_data_6313_ = v_data_6337_;
goto v___jp_6310_;
}
else
{
lean_object* v_data_6338_; double v___x_6339_; double v___x_6340_; 
lean_dec_ref(v_data_6337_);
v_data_6338_ = lean_alloc_ctor(0, 3, 17);
lean_ctor_set(v_data_6338_, 0, v_cls_6294_);
lean_ctor_set(v_data_6338_, 1, v___x_6335_);
lean_ctor_set(v_data_6338_, 2, v_tag_6296_);
v___x_6339_ = lean_unbox_float(v_fst_6316_);
lean_dec(v_fst_6316_);
lean_ctor_set_float(v_data_6338_, sizeof(void*)*3, v___x_6339_);
v___x_6340_ = lean_unbox_float(v_snd_6317_);
lean_dec(v_snd_6317_);
lean_ctor_set_float(v_data_6338_, sizeof(void*)*3 + 8, v___x_6340_);
lean_ctor_set_uint8(v_data_6338_, sizeof(void*)*3 + 16, v_collapsed_6295_);
v___y_6311_ = v___y_6324_;
v___y_6312_ = v_m_6333_;
v_data_6313_ = v_data_6338_;
goto v___jp_6310_;
}
}
}
}
v___jp_6343_:
{
lean_object* v___x_6344_; 
v___x_6344_ = l_Lean_Elab_Command_getRef___redArg(v___y_6302_);
if (lean_obj_tag(v___x_6344_) == 0)
{
lean_object* v_a_6345_; lean_object* v___x_6346_; 
v_a_6345_ = lean_ctor_get(v___x_6344_, 0);
lean_inc(v_a_6345_);
lean_dec_ref(v___x_6344_);
lean_inc(v___y_6303_);
lean_inc_ref(v___y_6302_);
lean_inc(v_fst_6305_);
v___x_6346_ = lean_apply_4(v_msg_6300_, v_fst_6305_, v___y_6302_, v___y_6303_, lean_box(0));
if (lean_obj_tag(v___x_6346_) == 0)
{
lean_object* v_a_6347_; 
v_a_6347_ = lean_ctor_get(v___x_6346_, 0);
lean_inc(v_a_6347_);
lean_dec_ref(v___x_6346_);
v___y_6324_ = v_a_6345_;
v_a_6325_ = v_a_6347_;
goto v___jp_6323_;
}
else
{
lean_object* v___x_6348_; 
lean_dec_ref(v___x_6346_);
v___x_6348_ = lean_obj_once(&l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__3, &l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__3_once, _init_l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__3);
v___y_6324_ = v_a_6345_;
v_a_6325_ = v___x_6348_;
goto v___jp_6323_;
}
}
else
{
lean_object* v_a_6349_; lean_object* v___x_6351_; uint8_t v_isShared_6352_; uint8_t v_isSharedCheck_6356_; 
lean_del_object(v___x_6319_);
lean_dec(v_snd_6317_);
lean_dec(v_fst_6316_);
lean_del_object(v___x_6308_);
lean_dec(v_fst_6305_);
lean_dec(v___y_6303_);
lean_dec_ref(v___y_6302_);
lean_dec_ref(v_msg_6300_);
lean_dec_ref(v_oldTraces_6299_);
lean_dec_ref(v_tag_6296_);
lean_dec(v_cls_6294_);
v_a_6349_ = lean_ctor_get(v___x_6344_, 0);
v_isSharedCheck_6356_ = !lean_is_exclusive(v___x_6344_);
if (v_isSharedCheck_6356_ == 0)
{
v___x_6351_ = v___x_6344_;
v_isShared_6352_ = v_isSharedCheck_6356_;
goto v_resetjp_6350_;
}
else
{
lean_inc(v_a_6349_);
lean_dec(v___x_6344_);
v___x_6351_ = lean_box(0);
v_isShared_6352_ = v_isSharedCheck_6356_;
goto v_resetjp_6350_;
}
v_resetjp_6350_:
{
lean_object* v___x_6354_; 
if (v_isShared_6352_ == 0)
{
v___x_6354_ = v___x_6351_;
goto v_reusejp_6353_;
}
else
{
lean_object* v_reuseFailAlloc_6355_; 
v_reuseFailAlloc_6355_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6355_, 0, v_a_6349_);
v___x_6354_ = v_reuseFailAlloc_6355_;
goto v_reusejp_6353_;
}
v_reusejp_6353_:
{
return v___x_6354_;
}
}
}
}
v___jp_6357_:
{
if (v_clsEnabled_6298_ == 0)
{
if (v___y_6358_ == 0)
{
lean_object* v___x_6359_; lean_object* v_traceState_6360_; lean_object* v_env_6361_; lean_object* v_messages_6362_; lean_object* v_scopes_6363_; lean_object* v_usedQuotCtxts_6364_; lean_object* v_nextMacroScope_6365_; lean_object* v_maxRecDepth_6366_; lean_object* v_ngen_6367_; lean_object* v_auxDeclNGen_6368_; lean_object* v_infoState_6369_; lean_object* v_snapshotTasks_6370_; lean_object* v___x_6372_; uint8_t v_isShared_6373_; uint8_t v_isSharedCheck_6389_; 
lean_del_object(v___x_6319_);
lean_dec(v_snd_6317_);
lean_dec(v_fst_6316_);
lean_del_object(v___x_6308_);
lean_dec_ref(v___y_6302_);
lean_dec_ref(v_msg_6300_);
lean_dec_ref(v_tag_6296_);
lean_dec(v_cls_6294_);
v___x_6359_ = lean_st_ref_take(v___y_6303_);
v_traceState_6360_ = lean_ctor_get(v___x_6359_, 9);
v_env_6361_ = lean_ctor_get(v___x_6359_, 0);
v_messages_6362_ = lean_ctor_get(v___x_6359_, 1);
v_scopes_6363_ = lean_ctor_get(v___x_6359_, 2);
v_usedQuotCtxts_6364_ = lean_ctor_get(v___x_6359_, 3);
v_nextMacroScope_6365_ = lean_ctor_get(v___x_6359_, 4);
v_maxRecDepth_6366_ = lean_ctor_get(v___x_6359_, 5);
v_ngen_6367_ = lean_ctor_get(v___x_6359_, 6);
v_auxDeclNGen_6368_ = lean_ctor_get(v___x_6359_, 7);
v_infoState_6369_ = lean_ctor_get(v___x_6359_, 8);
v_snapshotTasks_6370_ = lean_ctor_get(v___x_6359_, 10);
v_isSharedCheck_6389_ = !lean_is_exclusive(v___x_6359_);
if (v_isSharedCheck_6389_ == 0)
{
v___x_6372_ = v___x_6359_;
v_isShared_6373_ = v_isSharedCheck_6389_;
goto v_resetjp_6371_;
}
else
{
lean_inc(v_snapshotTasks_6370_);
lean_inc(v_traceState_6360_);
lean_inc(v_infoState_6369_);
lean_inc(v_auxDeclNGen_6368_);
lean_inc(v_ngen_6367_);
lean_inc(v_maxRecDepth_6366_);
lean_inc(v_nextMacroScope_6365_);
lean_inc(v_usedQuotCtxts_6364_);
lean_inc(v_scopes_6363_);
lean_inc(v_messages_6362_);
lean_inc(v_env_6361_);
lean_dec(v___x_6359_);
v___x_6372_ = lean_box(0);
v_isShared_6373_ = v_isSharedCheck_6389_;
goto v_resetjp_6371_;
}
v_resetjp_6371_:
{
uint64_t v_tid_6374_; lean_object* v_traces_6375_; lean_object* v___x_6377_; uint8_t v_isShared_6378_; uint8_t v_isSharedCheck_6388_; 
v_tid_6374_ = lean_ctor_get_uint64(v_traceState_6360_, sizeof(void*)*1);
v_traces_6375_ = lean_ctor_get(v_traceState_6360_, 0);
v_isSharedCheck_6388_ = !lean_is_exclusive(v_traceState_6360_);
if (v_isSharedCheck_6388_ == 0)
{
v___x_6377_ = v_traceState_6360_;
v_isShared_6378_ = v_isSharedCheck_6388_;
goto v_resetjp_6376_;
}
else
{
lean_inc(v_traces_6375_);
lean_dec(v_traceState_6360_);
v___x_6377_ = lean_box(0);
v_isShared_6378_ = v_isSharedCheck_6388_;
goto v_resetjp_6376_;
}
v_resetjp_6376_:
{
lean_object* v___x_6379_; lean_object* v___x_6381_; 
v___x_6379_ = l_Lean_PersistentArray_append___redArg(v_oldTraces_6299_, v_traces_6375_);
lean_dec_ref(v_traces_6375_);
if (v_isShared_6378_ == 0)
{
lean_ctor_set(v___x_6377_, 0, v___x_6379_);
v___x_6381_ = v___x_6377_;
goto v_reusejp_6380_;
}
else
{
lean_object* v_reuseFailAlloc_6387_; 
v_reuseFailAlloc_6387_ = lean_alloc_ctor(0, 1, 8);
lean_ctor_set(v_reuseFailAlloc_6387_, 0, v___x_6379_);
lean_ctor_set_uint64(v_reuseFailAlloc_6387_, sizeof(void*)*1, v_tid_6374_);
v___x_6381_ = v_reuseFailAlloc_6387_;
goto v_reusejp_6380_;
}
v_reusejp_6380_:
{
lean_object* v___x_6383_; 
if (v_isShared_6373_ == 0)
{
lean_ctor_set(v___x_6372_, 9, v___x_6381_);
v___x_6383_ = v___x_6372_;
goto v_reusejp_6382_;
}
else
{
lean_object* v_reuseFailAlloc_6386_; 
v_reuseFailAlloc_6386_ = lean_alloc_ctor(0, 11, 0);
lean_ctor_set(v_reuseFailAlloc_6386_, 0, v_env_6361_);
lean_ctor_set(v_reuseFailAlloc_6386_, 1, v_messages_6362_);
lean_ctor_set(v_reuseFailAlloc_6386_, 2, v_scopes_6363_);
lean_ctor_set(v_reuseFailAlloc_6386_, 3, v_usedQuotCtxts_6364_);
lean_ctor_set(v_reuseFailAlloc_6386_, 4, v_nextMacroScope_6365_);
lean_ctor_set(v_reuseFailAlloc_6386_, 5, v_maxRecDepth_6366_);
lean_ctor_set(v_reuseFailAlloc_6386_, 6, v_ngen_6367_);
lean_ctor_set(v_reuseFailAlloc_6386_, 7, v_auxDeclNGen_6368_);
lean_ctor_set(v_reuseFailAlloc_6386_, 8, v_infoState_6369_);
lean_ctor_set(v_reuseFailAlloc_6386_, 9, v___x_6381_);
lean_ctor_set(v_reuseFailAlloc_6386_, 10, v_snapshotTasks_6370_);
v___x_6383_ = v_reuseFailAlloc_6386_;
goto v_reusejp_6382_;
}
v_reusejp_6382_:
{
lean_object* v___x_6384_; lean_object* v___x_6385_; 
v___x_6384_ = lean_st_ref_set(v___y_6303_, v___x_6383_);
lean_dec(v___y_6303_);
v___x_6385_ = l_MonadExcept_ofExcept___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00Lean_Elab_applyDerivingHandlers_spec__7_spec__11___redArg(v_fst_6305_);
return v___x_6385_;
}
}
}
}
}
else
{
goto v___jp_6343_;
}
}
else
{
goto v___jp_6343_;
}
}
v___jp_6390_:
{
double v___x_6392_; double v___x_6393_; double v___x_6394_; uint8_t v___x_6395_; 
v___x_6392_ = lean_unbox_float(v_snd_6317_);
v___x_6393_ = lean_unbox_float(v_fst_6316_);
v___x_6394_ = lean_float_sub(v___x_6392_, v___x_6393_);
v___x_6395_ = lean_float_decLt(v___y_6391_, v___x_6394_);
v___y_6358_ = v___x_6395_;
goto v___jp_6357_;
}
}
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00Lean_Elab_applyDerivingHandlers_spec__7___boxed(lean_object* v_cls_6408_, lean_object* v_collapsed_6409_, lean_object* v_tag_6410_, lean_object* v_opts_6411_, lean_object* v_clsEnabled_6412_, lean_object* v_oldTraces_6413_, lean_object* v_msg_6414_, lean_object* v_resStartStop_6415_, lean_object* v___y_6416_, lean_object* v___y_6417_, lean_object* v___y_6418_){
_start:
{
uint8_t v_collapsed_boxed_6419_; uint8_t v_clsEnabled_boxed_6420_; lean_object* v_res_6421_; 
v_collapsed_boxed_6419_ = lean_unbox(v_collapsed_6409_);
v_clsEnabled_boxed_6420_ = lean_unbox(v_clsEnabled_6412_);
v_res_6421_ = l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00Lean_Elab_applyDerivingHandlers_spec__7(v_cls_6408_, v_collapsed_boxed_6419_, v_tag_6410_, v_opts_6411_, v_clsEnabled_boxed_6420_, v_oldTraces_6413_, v_msg_6414_, v_resStartStop_6415_, v___y_6416_, v___y_6417_);
lean_dec_ref(v_opts_6411_);
return v_res_6421_;
}
}
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00Lean_Elab_applyDerivingHandlers_spec__3___redArg(lean_object* v_typeNames_6430_, lean_object* v_as_x27_6431_, lean_object* v_b_6432_, lean_object* v___y_6433_, lean_object* v___y_6434_){
_start:
{
if (lean_obj_tag(v_as_x27_6431_) == 0)
{
lean_object* v___x_6436_; 
lean_dec(v___y_6434_);
lean_dec_ref(v___y_6433_);
lean_dec_ref(v_typeNames_6430_);
v___x_6436_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_6436_, 0, v_b_6432_);
return v___x_6436_;
}
else
{
lean_object* v_head_6437_; lean_object* v_tail_6438_; lean_object* v___x_6439_; 
lean_dec_ref(v_b_6432_);
v_head_6437_ = lean_ctor_get(v_as_x27_6431_, 0);
lean_inc(v_head_6437_);
v_tail_6438_ = lean_ctor_get(v_as_x27_6431_, 1);
lean_inc(v_tail_6438_);
lean_dec_ref(v_as_x27_6431_);
lean_inc(v___y_6434_);
lean_inc_ref(v___y_6433_);
lean_inc_ref(v_typeNames_6430_);
v___x_6439_ = lean_apply_4(v_head_6437_, v_typeNames_6430_, v___y_6433_, v___y_6434_, lean_box(0));
if (lean_obj_tag(v___x_6439_) == 0)
{
lean_object* v_a_6440_; lean_object* v___x_6442_; uint8_t v_isShared_6443_; uint8_t v_isSharedCheck_6451_; 
v_a_6440_ = lean_ctor_get(v___x_6439_, 0);
v_isSharedCheck_6451_ = !lean_is_exclusive(v___x_6439_);
if (v_isSharedCheck_6451_ == 0)
{
v___x_6442_ = v___x_6439_;
v_isShared_6443_ = v_isSharedCheck_6451_;
goto v_resetjp_6441_;
}
else
{
lean_inc(v_a_6440_);
lean_dec(v___x_6439_);
v___x_6442_ = lean_box(0);
v_isShared_6443_ = v_isSharedCheck_6451_;
goto v_resetjp_6441_;
}
v_resetjp_6441_:
{
uint8_t v___x_6444_; 
v___x_6444_ = lean_unbox(v_a_6440_);
lean_dec(v_a_6440_);
if (v___x_6444_ == 0)
{
lean_object* v___x_6445_; 
lean_del_object(v___x_6442_);
v___x_6445_ = ((lean_object*)(l_List_forIn_x27_loop___at___00Lean_Elab_applyDerivingHandlers_spec__3___redArg___closed__0));
v_as_x27_6431_ = v_tail_6438_;
v_b_6432_ = v___x_6445_;
goto _start;
}
else
{
lean_object* v___x_6447_; lean_object* v___x_6449_; 
lean_dec(v_tail_6438_);
lean_dec(v___y_6434_);
lean_dec_ref(v___y_6433_);
lean_dec_ref(v_typeNames_6430_);
v___x_6447_ = ((lean_object*)(l_List_forIn_x27_loop___at___00Lean_Elab_applyDerivingHandlers_spec__3___redArg___closed__2));
if (v_isShared_6443_ == 0)
{
lean_ctor_set(v___x_6442_, 0, v___x_6447_);
v___x_6449_ = v___x_6442_;
goto v_reusejp_6448_;
}
else
{
lean_object* v_reuseFailAlloc_6450_; 
v_reuseFailAlloc_6450_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6450_, 0, v___x_6447_);
v___x_6449_ = v_reuseFailAlloc_6450_;
goto v_reusejp_6448_;
}
v_reusejp_6448_:
{
return v___x_6449_;
}
}
}
}
else
{
lean_object* v_a_6452_; lean_object* v___x_6454_; uint8_t v_isShared_6455_; uint8_t v_isSharedCheck_6459_; 
lean_dec(v_tail_6438_);
lean_dec(v___y_6434_);
lean_dec_ref(v___y_6433_);
lean_dec_ref(v_typeNames_6430_);
v_a_6452_ = lean_ctor_get(v___x_6439_, 0);
v_isSharedCheck_6459_ = !lean_is_exclusive(v___x_6439_);
if (v_isSharedCheck_6459_ == 0)
{
v___x_6454_ = v___x_6439_;
v_isShared_6455_ = v_isSharedCheck_6459_;
goto v_resetjp_6453_;
}
else
{
lean_inc(v_a_6452_);
lean_dec(v___x_6439_);
v___x_6454_ = lean_box(0);
v_isShared_6455_ = v_isSharedCheck_6459_;
goto v_resetjp_6453_;
}
v_resetjp_6453_:
{
lean_object* v___x_6457_; 
if (v_isShared_6455_ == 0)
{
v___x_6457_ = v___x_6454_;
goto v_reusejp_6456_;
}
else
{
lean_object* v_reuseFailAlloc_6458_; 
v_reuseFailAlloc_6458_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6458_, 0, v_a_6452_);
v___x_6457_ = v_reuseFailAlloc_6458_;
goto v_reusejp_6456_;
}
v_reusejp_6456_:
{
return v___x_6457_;
}
}
}
}
}
}
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00Lean_Elab_applyDerivingHandlers_spec__3___redArg___boxed(lean_object* v_typeNames_6460_, lean_object* v_as_x27_6461_, lean_object* v_b_6462_, lean_object* v___y_6463_, lean_object* v___y_6464_, lean_object* v___y_6465_){
_start:
{
lean_object* v_res_6466_; 
v_res_6466_ = l_List_forIn_x27_loop___at___00Lean_Elab_applyDerivingHandlers_spec__3___redArg(v_typeNames_6460_, v_as_x27_6461_, v_b_6462_, v___y_6463_, v___y_6464_);
return v_res_6466_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_addMacroStack___at___00Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2_spec__3___redArg(lean_object* v_msgData_6467_, lean_object* v_macroStack_6468_, lean_object* v___y_6469_){
_start:
{
lean_object* v___x_6471_; lean_object* v_scopes_6472_; lean_object* v___x_6473_; lean_object* v___x_6474_; lean_object* v_opts_6475_; lean_object* v___x_6476_; uint8_t v___x_6477_; 
v___x_6471_ = lean_st_ref_get(v___y_6469_);
v_scopes_6472_ = lean_ctor_get(v___x_6471_, 2);
lean_inc(v_scopes_6472_);
lean_dec(v___x_6471_);
v___x_6473_ = l_Lean_Elab_Command_instInhabitedScope_default;
v___x_6474_ = l_List_head_x21___redArg(v___x_6473_, v_scopes_6472_);
lean_dec(v_scopes_6472_);
v_opts_6475_ = lean_ctor_get(v___x_6474_, 1);
lean_inc_ref(v_opts_6475_);
lean_dec(v___x_6474_);
v___x_6476_ = l_Lean_Elab_pp_macroStack;
v___x_6477_ = l_Lean_Option_get___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__7(v_opts_6475_, v___x_6476_);
lean_dec_ref(v_opts_6475_);
if (v___x_6477_ == 0)
{
lean_object* v___x_6478_; 
lean_dec(v_macroStack_6468_);
v___x_6478_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_6478_, 0, v_msgData_6467_);
return v___x_6478_;
}
else
{
if (lean_obj_tag(v_macroStack_6468_) == 0)
{
lean_object* v___x_6479_; 
v___x_6479_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_6479_, 0, v_msgData_6467_);
return v___x_6479_;
}
else
{
lean_object* v_head_6480_; lean_object* v_after_6481_; lean_object* v___x_6483_; uint8_t v_isShared_6484_; uint8_t v_isSharedCheck_6496_; 
v_head_6480_ = lean_ctor_get(v_macroStack_6468_, 0);
lean_inc(v_head_6480_);
v_after_6481_ = lean_ctor_get(v_head_6480_, 1);
v_isSharedCheck_6496_ = !lean_is_exclusive(v_head_6480_);
if (v_isSharedCheck_6496_ == 0)
{
lean_object* v_unused_6497_; 
v_unused_6497_ = lean_ctor_get(v_head_6480_, 0);
lean_dec(v_unused_6497_);
v___x_6483_ = v_head_6480_;
v_isShared_6484_ = v_isSharedCheck_6496_;
goto v_resetjp_6482_;
}
else
{
lean_inc(v_after_6481_);
lean_dec(v_head_6480_);
v___x_6483_ = lean_box(0);
v_isShared_6484_ = v_isSharedCheck_6496_;
goto v_resetjp_6482_;
}
v_resetjp_6482_:
{
lean_object* v___x_6485_; lean_object* v___x_6487_; 
v___x_6485_ = lean_obj_once(&l_List_foldl___at___00Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6_spec__9___closed__0, &l_List_foldl___at___00Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6_spec__9___closed__0_once, _init_l_List_foldl___at___00Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6_spec__9___closed__0);
if (v_isShared_6484_ == 0)
{
lean_ctor_set_tag(v___x_6483_, 7);
lean_ctor_set(v___x_6483_, 1, v___x_6485_);
lean_ctor_set(v___x_6483_, 0, v_msgData_6467_);
v___x_6487_ = v___x_6483_;
goto v_reusejp_6486_;
}
else
{
lean_object* v_reuseFailAlloc_6495_; 
v_reuseFailAlloc_6495_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v_reuseFailAlloc_6495_, 0, v_msgData_6467_);
lean_ctor_set(v_reuseFailAlloc_6495_, 1, v___x_6485_);
v___x_6487_ = v_reuseFailAlloc_6495_;
goto v_reusejp_6486_;
}
v_reusejp_6486_:
{
lean_object* v___x_6488_; lean_object* v___x_6489_; lean_object* v___x_6490_; lean_object* v___x_6491_; lean_object* v_msgData_6492_; lean_object* v___x_6493_; lean_object* v___x_6494_; 
v___x_6488_ = lean_obj_once(&l_Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6___redArg___closed__2, &l_Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6___redArg___closed__2_once, _init_l_Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6___redArg___closed__2);
v___x_6489_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_6489_, 0, v___x_6487_);
lean_ctor_set(v___x_6489_, 1, v___x_6488_);
v___x_6490_ = l_Lean_MessageData_ofSyntax(v_after_6481_);
v___x_6491_ = l_Lean_indentD(v___x_6490_);
v_msgData_6492_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v_msgData_6492_, 0, v___x_6489_);
lean_ctor_set(v_msgData_6492_, 1, v___x_6491_);
v___x_6493_ = l_List_foldl___at___00Lean_Elab_addMacroStack___at___00Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4_spec__6_spec__9(v_msgData_6492_, v_macroStack_6468_);
v___x_6494_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_6494_, 0, v___x_6493_);
return v___x_6494_;
}
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_addMacroStack___at___00Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2_spec__3___redArg___boxed(lean_object* v_msgData_6498_, lean_object* v_macroStack_6499_, lean_object* v___y_6500_, lean_object* v___y_6501_){
_start:
{
lean_object* v_res_6502_; 
v_res_6502_ = l_Lean_Elab_addMacroStack___at___00Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2_spec__3___redArg(v_msgData_6498_, v_macroStack_6499_, v___y_6500_);
lean_dec(v___y_6500_);
return v_res_6502_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2___redArg(lean_object* v_msg_6503_, lean_object* v___y_6504_, lean_object* v___y_6505_){
_start:
{
lean_object* v___x_6507_; 
v___x_6507_ = l_Lean_Elab_Command_getRef___redArg(v___y_6504_);
if (lean_obj_tag(v___x_6507_) == 0)
{
lean_object* v_a_6508_; lean_object* v_macroStack_6509_; lean_object* v___x_6510_; lean_object* v_a_6511_; lean_object* v___x_6512_; lean_object* v___x_6513_; lean_object* v_a_6514_; lean_object* v___x_6516_; uint8_t v_isShared_6517_; uint8_t v_isSharedCheck_6522_; 
v_a_6508_ = lean_ctor_get(v___x_6507_, 0);
lean_inc(v_a_6508_);
lean_dec_ref(v___x_6507_);
v_macroStack_6509_ = lean_ctor_get(v___y_6504_, 4);
lean_inc(v_macroStack_6509_);
lean_dec_ref(v___y_6504_);
v___x_6510_ = l_Lean_addMessageContextPartial___at___00Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2_spec__2___redArg(v_msg_6503_, v___y_6505_);
v_a_6511_ = lean_ctor_get(v___x_6510_, 0);
lean_inc(v_a_6511_);
lean_dec_ref(v___x_6510_);
lean_inc(v_macroStack_6509_);
v___x_6512_ = l_Lean_Elab_getBetterRef(v_a_6508_, v_macroStack_6509_);
lean_dec(v_a_6508_);
v___x_6513_ = l_Lean_Elab_addMacroStack___at___00Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2_spec__3___redArg(v_a_6511_, v_macroStack_6509_, v___y_6505_);
v_a_6514_ = lean_ctor_get(v___x_6513_, 0);
v_isSharedCheck_6522_ = !lean_is_exclusive(v___x_6513_);
if (v_isSharedCheck_6522_ == 0)
{
v___x_6516_ = v___x_6513_;
v_isShared_6517_ = v_isSharedCheck_6522_;
goto v_resetjp_6515_;
}
else
{
lean_inc(v_a_6514_);
lean_dec(v___x_6513_);
v___x_6516_ = lean_box(0);
v_isShared_6517_ = v_isSharedCheck_6522_;
goto v_resetjp_6515_;
}
v_resetjp_6515_:
{
lean_object* v___x_6518_; lean_object* v___x_6520_; 
v___x_6518_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_6518_, 0, v___x_6512_);
lean_ctor_set(v___x_6518_, 1, v_a_6514_);
if (v_isShared_6517_ == 0)
{
lean_ctor_set_tag(v___x_6516_, 1);
lean_ctor_set(v___x_6516_, 0, v___x_6518_);
v___x_6520_ = v___x_6516_;
goto v_reusejp_6519_;
}
else
{
lean_object* v_reuseFailAlloc_6521_; 
v_reuseFailAlloc_6521_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6521_, 0, v___x_6518_);
v___x_6520_ = v_reuseFailAlloc_6521_;
goto v_reusejp_6519_;
}
v_reusejp_6519_:
{
return v___x_6520_;
}
}
}
else
{
lean_object* v_a_6523_; lean_object* v___x_6525_; uint8_t v_isShared_6526_; uint8_t v_isSharedCheck_6530_; 
lean_dec_ref(v___y_6504_);
lean_dec_ref(v_msg_6503_);
v_a_6523_ = lean_ctor_get(v___x_6507_, 0);
v_isSharedCheck_6530_ = !lean_is_exclusive(v___x_6507_);
if (v_isSharedCheck_6530_ == 0)
{
v___x_6525_ = v___x_6507_;
v_isShared_6526_ = v_isSharedCheck_6530_;
goto v_resetjp_6524_;
}
else
{
lean_inc(v_a_6523_);
lean_dec(v___x_6507_);
v___x_6525_ = lean_box(0);
v_isShared_6526_ = v_isSharedCheck_6530_;
goto v_resetjp_6524_;
}
v_resetjp_6524_:
{
lean_object* v___x_6528_; 
if (v_isShared_6526_ == 0)
{
v___x_6528_ = v___x_6525_;
goto v_reusejp_6527_;
}
else
{
lean_object* v_reuseFailAlloc_6529_; 
v_reuseFailAlloc_6529_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6529_, 0, v_a_6523_);
v___x_6528_ = v_reuseFailAlloc_6529_;
goto v_reusejp_6527_;
}
v_reusejp_6527_:
{
return v___x_6528_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2___redArg___boxed(lean_object* v_msg_6531_, lean_object* v___y_6532_, lean_object* v___y_6533_, lean_object* v___y_6534_){
_start:
{
lean_object* v_res_6535_; 
v_res_6535_ = l_Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2___redArg(v_msg_6531_, v___y_6532_, v___y_6533_);
lean_dec(v___y_6533_);
return v_res_6535_;
}
}
LEAN_EXPORT lean_object* l_List_mapTR_loop___at___00Lean_Elab_applyDerivingHandlers_spec__4(uint8_t v___x_6536_, lean_object* v_a_6537_, lean_object* v_a_6538_){
_start:
{
if (lean_obj_tag(v_a_6537_) == 0)
{
lean_object* v___x_6539_; 
v___x_6539_ = l_List_reverse___redArg(v_a_6538_);
return v___x_6539_;
}
else
{
lean_object* v_head_6540_; lean_object* v_tail_6541_; lean_object* v___x_6543_; uint8_t v_isShared_6544_; uint8_t v_isSharedCheck_6553_; 
v_head_6540_ = lean_ctor_get(v_a_6537_, 0);
v_tail_6541_ = lean_ctor_get(v_a_6537_, 1);
v_isSharedCheck_6553_ = !lean_is_exclusive(v_a_6537_);
if (v_isSharedCheck_6553_ == 0)
{
v___x_6543_ = v_a_6537_;
v_isShared_6544_ = v_isSharedCheck_6553_;
goto v_resetjp_6542_;
}
else
{
lean_inc(v_tail_6541_);
lean_inc(v_head_6540_);
lean_dec(v_a_6537_);
v___x_6543_ = lean_box(0);
v_isShared_6544_ = v_isSharedCheck_6553_;
goto v_resetjp_6542_;
}
v_resetjp_6542_:
{
lean_object* v___x_6545_; lean_object* v___x_6546_; lean_object* v___x_6547_; lean_object* v___x_6548_; lean_object* v___x_6550_; 
v___x_6545_ = lean_obj_once(&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__5, &l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__5_once, _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__5);
v___x_6546_ = l_Lean_MessageData_ofConstName(v_head_6540_, v___x_6536_);
v___x_6547_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_6547_, 0, v___x_6545_);
lean_ctor_set(v___x_6547_, 1, v___x_6546_);
v___x_6548_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_6548_, 0, v___x_6547_);
lean_ctor_set(v___x_6548_, 1, v___x_6545_);
if (v_isShared_6544_ == 0)
{
lean_ctor_set(v___x_6543_, 1, v_a_6538_);
lean_ctor_set(v___x_6543_, 0, v___x_6548_);
v___x_6550_ = v___x_6543_;
goto v_reusejp_6549_;
}
else
{
lean_object* v_reuseFailAlloc_6552_; 
v_reuseFailAlloc_6552_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v_reuseFailAlloc_6552_, 0, v___x_6548_);
lean_ctor_set(v_reuseFailAlloc_6552_, 1, v_a_6538_);
v___x_6550_ = v_reuseFailAlloc_6552_;
goto v_reusejp_6549_;
}
v_reusejp_6549_:
{
v_a_6537_ = v_tail_6541_;
v_a_6538_ = v___x_6550_;
goto _start;
}
}
}
}
}
LEAN_EXPORT lean_object* l_List_mapTR_loop___at___00Lean_Elab_applyDerivingHandlers_spec__4___boxed(lean_object* v___x_6554_, lean_object* v_a_6555_, lean_object* v_a_6556_){
_start:
{
uint8_t v___x_13813__boxed_6557_; lean_object* v_res_6558_; 
v___x_13813__boxed_6557_ = lean_unbox(v___x_6554_);
v_res_6558_ = l_List_mapTR_loop___at___00Lean_Elab_applyDerivingHandlers_spec__4(v___x_13813__boxed_6557_, v_a_6555_, v_a_6556_);
return v_res_6558_;
}
}
static lean_object* _init_l_Lean_Elab_applyDerivingHandlers___lam__2___closed__1(void){
_start:
{
lean_object* v___x_6560_; lean_object* v___x_6561_; 
v___x_6560_ = ((lean_object*)(l_Lean_Elab_applyDerivingHandlers___lam__2___closed__0));
v___x_6561_ = l_Lean_stringToMessageData(v___x_6560_);
return v___x_6561_;
}
}
static lean_object* _init_l_Lean_Elab_applyDerivingHandlers___lam__2___closed__3(void){
_start:
{
lean_object* v___x_6563_; lean_object* v___x_6564_; 
v___x_6563_ = ((lean_object*)(l_Lean_Elab_applyDerivingHandlers___lam__2___closed__2));
v___x_6564_ = l_Lean_stringToMessageData(v___x_6563_);
return v___x_6564_;
}
}
static lean_object* _init_l_Lean_Elab_applyDerivingHandlers___lam__2___closed__5(void){
_start:
{
lean_object* v___x_6566_; lean_object* v___x_6567_; 
v___x_6566_ = ((lean_object*)(l_Lean_Elab_applyDerivingHandlers___lam__2___closed__4));
v___x_6567_ = l_Lean_stringToMessageData(v___x_6566_);
return v___x_6567_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_applyDerivingHandlers___lam__2(lean_object* v___x_6568_, lean_object* v___x_6569_, lean_object* v_className_6570_, lean_object* v_typeNames_6571_, lean_object* v___x_6572_, uint8_t v___x_6573_, lean_object* v___x_6574_, lean_object* v___f_6575_, lean_object* v___y_6576_, lean_object* v___y_6577_){
_start:
{
lean_object* v___x_6579_; lean_object* v_scopes_6580_; lean_object* v___x_6581_; lean_object* v_opts_6582_; uint8_t v_hasTrace_6583_; 
v___x_6579_ = lean_st_ref_get(v___y_6577_);
v_scopes_6580_ = lean_ctor_get(v___x_6579_, 2);
lean_inc(v_scopes_6580_);
lean_dec(v___x_6579_);
v___x_6581_ = l_List_head_x21___redArg(v___x_6568_, v_scopes_6580_);
lean_dec(v_scopes_6580_);
v_opts_6582_ = lean_ctor_get(v___x_6581_, 1);
lean_inc_ref(v_opts_6582_);
lean_dec(v___x_6581_);
v_hasTrace_6583_ = lean_ctor_get_uint8(v_opts_6582_, sizeof(void*)*1);
if (v_hasTrace_6583_ == 0)
{
lean_object* v___x_6584_; lean_object* v___x_6585_; 
lean_dec_ref(v_opts_6582_);
lean_dec_ref(v___f_6575_);
lean_dec_ref(v___x_6574_);
lean_dec(v___x_6572_);
v___x_6584_ = lean_st_ref_get(v___x_6569_);
v___x_6585_ = l_Std_DTreeMap_Internal_Impl_Const_get_x3f___at___00Lean_NameMap_find_x3f_spec__0___redArg(v___x_6584_, v_className_6570_);
lean_dec(v___x_6584_);
if (lean_obj_tag(v___x_6585_) == 0)
{
lean_object* v___x_6586_; lean_object* v___x_6587_; lean_object* v___x_6588_; lean_object* v___x_6589_; lean_object* v___x_6590_; lean_object* v___x_6591_; 
lean_dec_ref(v_typeNames_6571_);
v___x_6586_ = lean_obj_once(&l_Lean_Elab_applyDerivingHandlers___lam__2___closed__1, &l_Lean_Elab_applyDerivingHandlers___lam__2___closed__1_once, _init_l_Lean_Elab_applyDerivingHandlers___lam__2___closed__1);
v___x_6587_ = l_Lean_MessageData_ofConstName(v_className_6570_, v_hasTrace_6583_);
v___x_6588_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_6588_, 0, v___x_6586_);
lean_ctor_set(v___x_6588_, 1, v___x_6587_);
v___x_6589_ = lean_obj_once(&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__5, &l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__5_once, _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__5);
v___x_6590_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_6590_, 0, v___x_6588_);
lean_ctor_set(v___x_6590_, 1, v___x_6589_);
v___x_6591_ = l_Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2___redArg(v___x_6590_, v___y_6576_, v___y_6577_);
lean_dec(v___y_6577_);
return v___x_6591_;
}
else
{
lean_object* v_val_6592_; lean_object* v___x_6593_; lean_object* v___x_6594_; 
v_val_6592_ = lean_ctor_get(v___x_6585_, 0);
lean_inc(v_val_6592_);
lean_dec_ref(v___x_6585_);
v___x_6593_ = ((lean_object*)(l_List_forIn_x27_loop___at___00Lean_Elab_applyDerivingHandlers_spec__3___redArg___closed__0));
lean_inc(v___y_6577_);
lean_inc_ref(v___y_6576_);
lean_inc_ref(v_typeNames_6571_);
v___x_6594_ = l_List_forIn_x27_loop___at___00Lean_Elab_applyDerivingHandlers_spec__3___redArg(v_typeNames_6571_, v_val_6592_, v___x_6593_, v___y_6576_, v___y_6577_);
if (lean_obj_tag(v___x_6594_) == 0)
{
lean_object* v_a_6595_; lean_object* v___x_6597_; uint8_t v_isShared_6598_; uint8_t v_isSharedCheck_6622_; 
v_a_6595_ = lean_ctor_get(v___x_6594_, 0);
v_isSharedCheck_6622_ = !lean_is_exclusive(v___x_6594_);
if (v_isSharedCheck_6622_ == 0)
{
v___x_6597_ = v___x_6594_;
v_isShared_6598_ = v_isSharedCheck_6622_;
goto v_resetjp_6596_;
}
else
{
lean_inc(v_a_6595_);
lean_dec(v___x_6594_);
v___x_6597_ = lean_box(0);
v_isShared_6598_ = v_isSharedCheck_6622_;
goto v_resetjp_6596_;
}
v_resetjp_6596_:
{
lean_object* v_fst_6599_; lean_object* v___x_6601_; uint8_t v_isShared_6602_; uint8_t v_isSharedCheck_6620_; 
v_fst_6599_ = lean_ctor_get(v_a_6595_, 0);
v_isSharedCheck_6620_ = !lean_is_exclusive(v_a_6595_);
if (v_isSharedCheck_6620_ == 0)
{
lean_object* v_unused_6621_; 
v_unused_6621_ = lean_ctor_get(v_a_6595_, 1);
lean_dec(v_unused_6621_);
v___x_6601_ = v_a_6595_;
v_isShared_6602_ = v_isSharedCheck_6620_;
goto v_resetjp_6600_;
}
else
{
lean_inc(v_fst_6599_);
lean_dec(v_a_6595_);
v___x_6601_ = lean_box(0);
v_isShared_6602_ = v_isSharedCheck_6620_;
goto v_resetjp_6600_;
}
v_resetjp_6600_:
{
if (lean_obj_tag(v_fst_6599_) == 0)
{
lean_object* v___x_6603_; lean_object* v___x_6604_; lean_object* v___x_6606_; 
lean_del_object(v___x_6597_);
v___x_6603_ = lean_obj_once(&l_Lean_Elab_applyDerivingHandlers___lam__2___closed__3, &l_Lean_Elab_applyDerivingHandlers___lam__2___closed__3_once, _init_l_Lean_Elab_applyDerivingHandlers___lam__2___closed__3);
v___x_6604_ = l_Lean_MessageData_ofConstName(v_className_6570_, v_hasTrace_6583_);
if (v_isShared_6602_ == 0)
{
lean_ctor_set_tag(v___x_6601_, 7);
lean_ctor_set(v___x_6601_, 1, v___x_6604_);
lean_ctor_set(v___x_6601_, 0, v___x_6603_);
v___x_6606_ = v___x_6601_;
goto v_reusejp_6605_;
}
else
{
lean_object* v_reuseFailAlloc_6615_; 
v_reuseFailAlloc_6615_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v_reuseFailAlloc_6615_, 0, v___x_6603_);
lean_ctor_set(v_reuseFailAlloc_6615_, 1, v___x_6604_);
v___x_6606_ = v_reuseFailAlloc_6615_;
goto v_reusejp_6605_;
}
v_reusejp_6605_:
{
lean_object* v___x_6607_; lean_object* v___x_6608_; lean_object* v___x_6609_; lean_object* v___x_6610_; lean_object* v___x_6611_; lean_object* v___x_6612_; lean_object* v___x_6613_; lean_object* v___x_6614_; 
v___x_6607_ = lean_obj_once(&l_Lean_Elab_applyDerivingHandlers___lam__2___closed__5, &l_Lean_Elab_applyDerivingHandlers___lam__2___closed__5_once, _init_l_Lean_Elab_applyDerivingHandlers___lam__2___closed__5);
v___x_6608_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_6608_, 0, v___x_6606_);
lean_ctor_set(v___x_6608_, 1, v___x_6607_);
v___x_6609_ = lean_array_to_list(v_typeNames_6571_);
v___x_6610_ = lean_box(0);
v___x_6611_ = l_List_mapTR_loop___at___00Lean_Elab_applyDerivingHandlers_spec__4(v_hasTrace_6583_, v___x_6609_, v___x_6610_);
v___x_6612_ = l_Lean_MessageData_andList(v___x_6611_);
v___x_6613_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_6613_, 0, v___x_6608_);
lean_ctor_set(v___x_6613_, 1, v___x_6612_);
v___x_6614_ = l_Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2___redArg(v___x_6613_, v___y_6576_, v___y_6577_);
lean_dec(v___y_6577_);
return v___x_6614_;
}
}
else
{
lean_object* v_val_6616_; lean_object* v___x_6618_; 
lean_del_object(v___x_6601_);
lean_dec(v___y_6577_);
lean_dec_ref(v___y_6576_);
lean_dec_ref(v_typeNames_6571_);
lean_dec(v_className_6570_);
v_val_6616_ = lean_ctor_get(v_fst_6599_, 0);
lean_inc(v_val_6616_);
lean_dec_ref(v_fst_6599_);
if (v_isShared_6598_ == 0)
{
lean_ctor_set(v___x_6597_, 0, v_val_6616_);
v___x_6618_ = v___x_6597_;
goto v_reusejp_6617_;
}
else
{
lean_object* v_reuseFailAlloc_6619_; 
v_reuseFailAlloc_6619_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6619_, 0, v_val_6616_);
v___x_6618_ = v_reuseFailAlloc_6619_;
goto v_reusejp_6617_;
}
v_reusejp_6617_:
{
return v___x_6618_;
}
}
}
}
}
else
{
lean_object* v_a_6623_; lean_object* v___x_6625_; uint8_t v_isShared_6626_; uint8_t v_isSharedCheck_6630_; 
lean_dec(v___y_6577_);
lean_dec_ref(v___y_6576_);
lean_dec_ref(v_typeNames_6571_);
lean_dec(v_className_6570_);
v_a_6623_ = lean_ctor_get(v___x_6594_, 0);
v_isSharedCheck_6630_ = !lean_is_exclusive(v___x_6594_);
if (v_isSharedCheck_6630_ == 0)
{
v___x_6625_ = v___x_6594_;
v_isShared_6626_ = v_isSharedCheck_6630_;
goto v_resetjp_6624_;
}
else
{
lean_inc(v_a_6623_);
lean_dec(v___x_6594_);
v___x_6625_ = lean_box(0);
v_isShared_6626_ = v_isSharedCheck_6630_;
goto v_resetjp_6624_;
}
v_resetjp_6624_:
{
lean_object* v___x_6628_; 
if (v_isShared_6626_ == 0)
{
v___x_6628_ = v___x_6625_;
goto v_reusejp_6627_;
}
else
{
lean_object* v_reuseFailAlloc_6629_; 
v_reuseFailAlloc_6629_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6629_, 0, v_a_6623_);
v___x_6628_ = v_reuseFailAlloc_6629_;
goto v_reusejp_6627_;
}
v_reusejp_6627_:
{
return v___x_6628_;
}
}
}
}
}
else
{
lean_object* v___x_6631_; lean_object* v_a_6632_; lean_object* v___x_6634_; uint8_t v_isShared_6635_; uint8_t v_isSharedCheck_6822_; 
lean_inc(v___x_6572_);
v___x_6631_ = l_Lean_isTracingEnabledFor___at___00Lean_Elab_applyDerivingHandlers_spec__5___redArg(v___x_6572_, v___y_6577_);
v_a_6632_ = lean_ctor_get(v___x_6631_, 0);
v_isSharedCheck_6822_ = !lean_is_exclusive(v___x_6631_);
if (v_isSharedCheck_6822_ == 0)
{
v___x_6634_ = v___x_6631_;
v_isShared_6635_ = v_isSharedCheck_6822_;
goto v_resetjp_6633_;
}
else
{
lean_inc(v_a_6632_);
lean_dec(v___x_6631_);
v___x_6634_ = lean_box(0);
v_isShared_6635_ = v_isSharedCheck_6822_;
goto v_resetjp_6633_;
}
v_resetjp_6633_:
{
lean_object* v___y_6637_; lean_object* v___y_6638_; lean_object* v_a_6639_; lean_object* v___y_6653_; lean_object* v___y_6654_; lean_object* v_a_6655_; lean_object* v___y_6660_; lean_object* v___y_6661_; lean_object* v_a_6662_; lean_object* v___y_6665_; lean_object* v___y_6666_; lean_object* v___y_6667_; lean_object* v___y_6670_; lean_object* v___y_6671_; lean_object* v_a_6672_; lean_object* v___y_6683_; lean_object* v___y_6684_; lean_object* v_a_6685_; lean_object* v___y_6688_; lean_object* v___y_6689_; lean_object* v_a_6690_; lean_object* v___y_6693_; lean_object* v___y_6694_; lean_object* v___y_6695_; uint8_t v___x_6772_; 
v___x_6772_ = lean_unbox(v_a_6632_);
if (v___x_6772_ == 0)
{
lean_object* v___x_6773_; uint8_t v___x_6774_; 
v___x_6773_ = l_Lean_trace_profiler;
v___x_6774_ = l_Lean_Option_get___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__7(v_opts_6582_, v___x_6773_);
if (v___x_6774_ == 0)
{
lean_object* v___x_6775_; lean_object* v___x_6776_; 
lean_del_object(v___x_6634_);
lean_dec(v_a_6632_);
lean_dec_ref(v_opts_6582_);
lean_dec_ref(v___f_6575_);
lean_dec_ref(v___x_6574_);
lean_dec(v___x_6572_);
v___x_6775_ = lean_st_ref_get(v___x_6569_);
v___x_6776_ = l_Std_DTreeMap_Internal_Impl_Const_get_x3f___at___00Lean_NameMap_find_x3f_spec__0___redArg(v___x_6775_, v_className_6570_);
lean_dec(v___x_6775_);
if (lean_obj_tag(v___x_6776_) == 0)
{
lean_object* v___x_6777_; lean_object* v___x_6778_; lean_object* v___x_6779_; lean_object* v___x_6780_; lean_object* v___x_6781_; lean_object* v___x_6782_; 
lean_dec_ref(v_typeNames_6571_);
v___x_6777_ = lean_obj_once(&l_Lean_Elab_applyDerivingHandlers___lam__2___closed__1, &l_Lean_Elab_applyDerivingHandlers___lam__2___closed__1_once, _init_l_Lean_Elab_applyDerivingHandlers___lam__2___closed__1);
v___x_6778_ = l_Lean_MessageData_ofConstName(v_className_6570_, v___x_6774_);
v___x_6779_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_6779_, 0, v___x_6777_);
lean_ctor_set(v___x_6779_, 1, v___x_6778_);
v___x_6780_ = lean_obj_once(&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__5, &l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__5_once, _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__5);
v___x_6781_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_6781_, 0, v___x_6779_);
lean_ctor_set(v___x_6781_, 1, v___x_6780_);
v___x_6782_ = l_Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2___redArg(v___x_6781_, v___y_6576_, v___y_6577_);
lean_dec(v___y_6577_);
return v___x_6782_;
}
else
{
lean_object* v_val_6783_; lean_object* v___x_6784_; lean_object* v___x_6785_; 
v_val_6783_ = lean_ctor_get(v___x_6776_, 0);
lean_inc(v_val_6783_);
lean_dec_ref(v___x_6776_);
v___x_6784_ = ((lean_object*)(l_List_forIn_x27_loop___at___00Lean_Elab_applyDerivingHandlers_spec__3___redArg___closed__0));
lean_inc(v___y_6577_);
lean_inc_ref(v___y_6576_);
lean_inc_ref(v_typeNames_6571_);
v___x_6785_ = l_List_forIn_x27_loop___at___00Lean_Elab_applyDerivingHandlers_spec__3___redArg(v_typeNames_6571_, v_val_6783_, v___x_6784_, v___y_6576_, v___y_6577_);
if (lean_obj_tag(v___x_6785_) == 0)
{
lean_object* v_a_6786_; lean_object* v___x_6788_; uint8_t v_isShared_6789_; uint8_t v_isSharedCheck_6813_; 
v_a_6786_ = lean_ctor_get(v___x_6785_, 0);
v_isSharedCheck_6813_ = !lean_is_exclusive(v___x_6785_);
if (v_isSharedCheck_6813_ == 0)
{
v___x_6788_ = v___x_6785_;
v_isShared_6789_ = v_isSharedCheck_6813_;
goto v_resetjp_6787_;
}
else
{
lean_inc(v_a_6786_);
lean_dec(v___x_6785_);
v___x_6788_ = lean_box(0);
v_isShared_6789_ = v_isSharedCheck_6813_;
goto v_resetjp_6787_;
}
v_resetjp_6787_:
{
lean_object* v_fst_6790_; lean_object* v___x_6792_; uint8_t v_isShared_6793_; uint8_t v_isSharedCheck_6811_; 
v_fst_6790_ = lean_ctor_get(v_a_6786_, 0);
v_isSharedCheck_6811_ = !lean_is_exclusive(v_a_6786_);
if (v_isSharedCheck_6811_ == 0)
{
lean_object* v_unused_6812_; 
v_unused_6812_ = lean_ctor_get(v_a_6786_, 1);
lean_dec(v_unused_6812_);
v___x_6792_ = v_a_6786_;
v_isShared_6793_ = v_isSharedCheck_6811_;
goto v_resetjp_6791_;
}
else
{
lean_inc(v_fst_6790_);
lean_dec(v_a_6786_);
v___x_6792_ = lean_box(0);
v_isShared_6793_ = v_isSharedCheck_6811_;
goto v_resetjp_6791_;
}
v_resetjp_6791_:
{
if (lean_obj_tag(v_fst_6790_) == 0)
{
lean_object* v___x_6794_; lean_object* v___x_6795_; lean_object* v___x_6797_; 
lean_del_object(v___x_6788_);
v___x_6794_ = lean_obj_once(&l_Lean_Elab_applyDerivingHandlers___lam__2___closed__3, &l_Lean_Elab_applyDerivingHandlers___lam__2___closed__3_once, _init_l_Lean_Elab_applyDerivingHandlers___lam__2___closed__3);
v___x_6795_ = l_Lean_MessageData_ofConstName(v_className_6570_, v___x_6774_);
if (v_isShared_6793_ == 0)
{
lean_ctor_set_tag(v___x_6792_, 7);
lean_ctor_set(v___x_6792_, 1, v___x_6795_);
lean_ctor_set(v___x_6792_, 0, v___x_6794_);
v___x_6797_ = v___x_6792_;
goto v_reusejp_6796_;
}
else
{
lean_object* v_reuseFailAlloc_6806_; 
v_reuseFailAlloc_6806_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v_reuseFailAlloc_6806_, 0, v___x_6794_);
lean_ctor_set(v_reuseFailAlloc_6806_, 1, v___x_6795_);
v___x_6797_ = v_reuseFailAlloc_6806_;
goto v_reusejp_6796_;
}
v_reusejp_6796_:
{
lean_object* v___x_6798_; lean_object* v___x_6799_; lean_object* v___x_6800_; lean_object* v___x_6801_; lean_object* v___x_6802_; lean_object* v___x_6803_; lean_object* v___x_6804_; lean_object* v___x_6805_; 
v___x_6798_ = lean_obj_once(&l_Lean_Elab_applyDerivingHandlers___lam__2___closed__5, &l_Lean_Elab_applyDerivingHandlers___lam__2___closed__5_once, _init_l_Lean_Elab_applyDerivingHandlers___lam__2___closed__5);
v___x_6799_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_6799_, 0, v___x_6797_);
lean_ctor_set(v___x_6799_, 1, v___x_6798_);
v___x_6800_ = lean_array_to_list(v_typeNames_6571_);
v___x_6801_ = lean_box(0);
v___x_6802_ = l_List_mapTR_loop___at___00Lean_Elab_applyDerivingHandlers_spec__4(v___x_6774_, v___x_6800_, v___x_6801_);
v___x_6803_ = l_Lean_MessageData_andList(v___x_6802_);
v___x_6804_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_6804_, 0, v___x_6799_);
lean_ctor_set(v___x_6804_, 1, v___x_6803_);
v___x_6805_ = l_Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2___redArg(v___x_6804_, v___y_6576_, v___y_6577_);
lean_dec(v___y_6577_);
return v___x_6805_;
}
}
else
{
lean_object* v_val_6807_; lean_object* v___x_6809_; 
lean_del_object(v___x_6792_);
lean_dec(v___y_6577_);
lean_dec_ref(v___y_6576_);
lean_dec_ref(v_typeNames_6571_);
lean_dec(v_className_6570_);
v_val_6807_ = lean_ctor_get(v_fst_6790_, 0);
lean_inc(v_val_6807_);
lean_dec_ref(v_fst_6790_);
if (v_isShared_6789_ == 0)
{
lean_ctor_set(v___x_6788_, 0, v_val_6807_);
v___x_6809_ = v___x_6788_;
goto v_reusejp_6808_;
}
else
{
lean_object* v_reuseFailAlloc_6810_; 
v_reuseFailAlloc_6810_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6810_, 0, v_val_6807_);
v___x_6809_ = v_reuseFailAlloc_6810_;
goto v_reusejp_6808_;
}
v_reusejp_6808_:
{
return v___x_6809_;
}
}
}
}
}
else
{
lean_object* v_a_6814_; lean_object* v___x_6816_; uint8_t v_isShared_6817_; uint8_t v_isSharedCheck_6821_; 
lean_dec(v___y_6577_);
lean_dec_ref(v___y_6576_);
lean_dec_ref(v_typeNames_6571_);
lean_dec(v_className_6570_);
v_a_6814_ = lean_ctor_get(v___x_6785_, 0);
v_isSharedCheck_6821_ = !lean_is_exclusive(v___x_6785_);
if (v_isSharedCheck_6821_ == 0)
{
v___x_6816_ = v___x_6785_;
v_isShared_6817_ = v_isSharedCheck_6821_;
goto v_resetjp_6815_;
}
else
{
lean_inc(v_a_6814_);
lean_dec(v___x_6785_);
v___x_6816_ = lean_box(0);
v_isShared_6817_ = v_isSharedCheck_6821_;
goto v_resetjp_6815_;
}
v_resetjp_6815_:
{
lean_object* v___x_6819_; 
if (v_isShared_6817_ == 0)
{
v___x_6819_ = v___x_6816_;
goto v_reusejp_6818_;
}
else
{
lean_object* v_reuseFailAlloc_6820_; 
v_reuseFailAlloc_6820_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6820_, 0, v_a_6814_);
v___x_6819_ = v_reuseFailAlloc_6820_;
goto v_reusejp_6818_;
}
v_reusejp_6818_:
{
return v___x_6819_;
}
}
}
}
}
else
{
goto v___jp_6697_;
}
}
else
{
goto v___jp_6697_;
}
v___jp_6636_:
{
lean_object* v___x_6640_; double v___x_6641_; double v___x_6642_; double v___x_6643_; double v___x_6644_; double v___x_6645_; lean_object* v___x_6646_; lean_object* v___x_6647_; lean_object* v___x_6648_; lean_object* v___x_6649_; uint8_t v___x_6650_; lean_object* v___x_6651_; 
v___x_6640_ = lean_io_mono_nanos_now();
v___x_6641_ = lean_float_of_nat(v___y_6637_);
v___x_6642_ = lean_float_once(&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__7, &l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__7_once, _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__7);
v___x_6643_ = lean_float_div(v___x_6641_, v___x_6642_);
v___x_6644_ = lean_float_of_nat(v___x_6640_);
v___x_6645_ = lean_float_div(v___x_6644_, v___x_6642_);
v___x_6646_ = lean_box_float(v___x_6643_);
v___x_6647_ = lean_box_float(v___x_6645_);
v___x_6648_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_6648_, 0, v___x_6646_);
lean_ctor_set(v___x_6648_, 1, v___x_6647_);
v___x_6649_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_6649_, 0, v_a_6639_);
lean_ctor_set(v___x_6649_, 1, v___x_6648_);
v___x_6650_ = lean_unbox(v_a_6632_);
lean_dec(v_a_6632_);
v___x_6651_ = l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00Lean_Elab_applyDerivingHandlers_spec__7(v___x_6572_, v___x_6573_, v___x_6574_, v_opts_6582_, v___x_6650_, v___y_6638_, v___f_6575_, v___x_6649_, v___y_6576_, v___y_6577_);
lean_dec_ref(v_opts_6582_);
return v___x_6651_;
}
v___jp_6652_:
{
lean_object* v___x_6657_; 
if (v_isShared_6635_ == 0)
{
lean_ctor_set_tag(v___x_6634_, 1);
lean_ctor_set(v___x_6634_, 0, v_a_6655_);
v___x_6657_ = v___x_6634_;
goto v_reusejp_6656_;
}
else
{
lean_object* v_reuseFailAlloc_6658_; 
v_reuseFailAlloc_6658_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_6658_, 0, v_a_6655_);
v___x_6657_ = v_reuseFailAlloc_6658_;
goto v_reusejp_6656_;
}
v_reusejp_6656_:
{
v___y_6637_ = v___y_6653_;
v___y_6638_ = v___y_6654_;
v_a_6639_ = v___x_6657_;
goto v___jp_6636_;
}
}
v___jp_6659_:
{
lean_object* v___x_6663_; 
v___x_6663_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_6663_, 0, v_a_6662_);
v___y_6637_ = v___y_6660_;
v___y_6638_ = v___y_6661_;
v_a_6639_ = v___x_6663_;
goto v___jp_6636_;
}
v___jp_6664_:
{
lean_object* v_a_6668_; 
v_a_6668_ = lean_ctor_get(v___y_6667_, 0);
lean_inc(v_a_6668_);
lean_dec_ref(v___y_6667_);
v___y_6660_ = v___y_6665_;
v___y_6661_ = v___y_6666_;
v_a_6662_ = v_a_6668_;
goto v___jp_6659_;
}
v___jp_6669_:
{
lean_object* v___x_6673_; double v___x_6674_; double v___x_6675_; lean_object* v___x_6676_; lean_object* v___x_6677_; lean_object* v___x_6678_; lean_object* v___x_6679_; uint8_t v___x_6680_; lean_object* v___x_6681_; 
v___x_6673_ = lean_io_get_num_heartbeats();
v___x_6674_ = lean_float_of_nat(v___y_6670_);
v___x_6675_ = lean_float_of_nat(v___x_6673_);
v___x_6676_ = lean_box_float(v___x_6674_);
v___x_6677_ = lean_box_float(v___x_6675_);
v___x_6678_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_6678_, 0, v___x_6676_);
lean_ctor_set(v___x_6678_, 1, v___x_6677_);
v___x_6679_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_6679_, 0, v_a_6672_);
lean_ctor_set(v___x_6679_, 1, v___x_6678_);
v___x_6680_ = lean_unbox(v_a_6632_);
lean_dec(v_a_6632_);
v___x_6681_ = l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00Lean_Elab_applyDerivingHandlers_spec__7(v___x_6572_, v___x_6573_, v___x_6574_, v_opts_6582_, v___x_6680_, v___y_6671_, v___f_6575_, v___x_6679_, v___y_6576_, v___y_6577_);
lean_dec_ref(v_opts_6582_);
return v___x_6681_;
}
v___jp_6682_:
{
lean_object* v___x_6686_; 
v___x_6686_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_6686_, 0, v_a_6685_);
v___y_6670_ = v___y_6683_;
v___y_6671_ = v___y_6684_;
v_a_6672_ = v___x_6686_;
goto v___jp_6669_;
}
v___jp_6687_:
{
lean_object* v___x_6691_; 
v___x_6691_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_6691_, 0, v_a_6690_);
v___y_6670_ = v___y_6688_;
v___y_6671_ = v___y_6689_;
v_a_6672_ = v___x_6691_;
goto v___jp_6669_;
}
v___jp_6692_:
{
lean_object* v_a_6696_; 
v_a_6696_ = lean_ctor_get(v___y_6695_, 0);
lean_inc(v_a_6696_);
lean_dec_ref(v___y_6695_);
v___y_6683_ = v___y_6693_;
v___y_6684_ = v___y_6694_;
v_a_6685_ = v_a_6696_;
goto v___jp_6682_;
}
v___jp_6697_:
{
lean_object* v___x_6698_; lean_object* v_a_6699_; lean_object* v___x_6700_; uint8_t v___x_6701_; 
v___x_6698_ = l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___00Lean_Elab_applyDerivingHandlers_spec__6___redArg(v___y_6577_);
v_a_6699_ = lean_ctor_get(v___x_6698_, 0);
lean_inc(v_a_6699_);
lean_dec_ref(v___x_6698_);
v___x_6700_ = l_Lean_trace_profiler_useHeartbeats;
v___x_6701_ = l_Lean_Option_get___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__7(v_opts_6582_, v___x_6700_);
if (v___x_6701_ == 0)
{
lean_object* v___x_6702_; lean_object* v___x_6703_; lean_object* v___x_6704_; 
v___x_6702_ = lean_io_mono_nanos_now();
v___x_6703_ = lean_st_ref_get(v___x_6569_);
v___x_6704_ = l_Std_DTreeMap_Internal_Impl_Const_get_x3f___at___00Lean_NameMap_find_x3f_spec__0___redArg(v___x_6703_, v_className_6570_);
lean_dec(v___x_6703_);
if (lean_obj_tag(v___x_6704_) == 0)
{
lean_object* v___x_6705_; lean_object* v___x_6706_; lean_object* v___x_6707_; lean_object* v___x_6708_; lean_object* v___x_6709_; lean_object* v___x_6710_; 
lean_del_object(v___x_6634_);
lean_dec_ref(v_typeNames_6571_);
v___x_6705_ = lean_obj_once(&l_Lean_Elab_applyDerivingHandlers___lam__2___closed__1, &l_Lean_Elab_applyDerivingHandlers___lam__2___closed__1_once, _init_l_Lean_Elab_applyDerivingHandlers___lam__2___closed__1);
v___x_6706_ = l_Lean_MessageData_ofConstName(v_className_6570_, v___x_6701_);
v___x_6707_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_6707_, 0, v___x_6705_);
lean_ctor_set(v___x_6707_, 1, v___x_6706_);
v___x_6708_ = lean_obj_once(&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__5, &l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__5_once, _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__5);
v___x_6709_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_6709_, 0, v___x_6707_);
lean_ctor_set(v___x_6709_, 1, v___x_6708_);
lean_inc_ref(v___y_6576_);
v___x_6710_ = l_Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2___redArg(v___x_6709_, v___y_6576_, v___y_6577_);
v___y_6665_ = v___x_6702_;
v___y_6666_ = v_a_6699_;
v___y_6667_ = v___x_6710_;
goto v___jp_6664_;
}
else
{
lean_object* v_val_6711_; lean_object* v___x_6712_; lean_object* v___x_6713_; 
v_val_6711_ = lean_ctor_get(v___x_6704_, 0);
lean_inc(v_val_6711_);
lean_dec_ref(v___x_6704_);
v___x_6712_ = ((lean_object*)(l_List_forIn_x27_loop___at___00Lean_Elab_applyDerivingHandlers_spec__3___redArg___closed__0));
lean_inc(v___y_6577_);
lean_inc_ref(v___y_6576_);
lean_inc_ref(v_typeNames_6571_);
v___x_6713_ = l_List_forIn_x27_loop___at___00Lean_Elab_applyDerivingHandlers_spec__3___redArg(v_typeNames_6571_, v_val_6711_, v___x_6712_, v___y_6576_, v___y_6577_);
if (lean_obj_tag(v___x_6713_) == 0)
{
lean_object* v_a_6714_; lean_object* v_fst_6715_; lean_object* v___x_6717_; uint8_t v_isShared_6718_; uint8_t v_isSharedCheck_6733_; 
v_a_6714_ = lean_ctor_get(v___x_6713_, 0);
lean_inc(v_a_6714_);
lean_dec_ref(v___x_6713_);
v_fst_6715_ = lean_ctor_get(v_a_6714_, 0);
v_isSharedCheck_6733_ = !lean_is_exclusive(v_a_6714_);
if (v_isSharedCheck_6733_ == 0)
{
lean_object* v_unused_6734_; 
v_unused_6734_ = lean_ctor_get(v_a_6714_, 1);
lean_dec(v_unused_6734_);
v___x_6717_ = v_a_6714_;
v_isShared_6718_ = v_isSharedCheck_6733_;
goto v_resetjp_6716_;
}
else
{
lean_inc(v_fst_6715_);
lean_dec(v_a_6714_);
v___x_6717_ = lean_box(0);
v_isShared_6718_ = v_isSharedCheck_6733_;
goto v_resetjp_6716_;
}
v_resetjp_6716_:
{
if (lean_obj_tag(v_fst_6715_) == 0)
{
lean_object* v___x_6719_; lean_object* v___x_6720_; lean_object* v___x_6722_; 
lean_del_object(v___x_6634_);
v___x_6719_ = lean_obj_once(&l_Lean_Elab_applyDerivingHandlers___lam__2___closed__3, &l_Lean_Elab_applyDerivingHandlers___lam__2___closed__3_once, _init_l_Lean_Elab_applyDerivingHandlers___lam__2___closed__3);
v___x_6720_ = l_Lean_MessageData_ofConstName(v_className_6570_, v___x_6701_);
if (v_isShared_6718_ == 0)
{
lean_ctor_set_tag(v___x_6717_, 7);
lean_ctor_set(v___x_6717_, 1, v___x_6720_);
lean_ctor_set(v___x_6717_, 0, v___x_6719_);
v___x_6722_ = v___x_6717_;
goto v_reusejp_6721_;
}
else
{
lean_object* v_reuseFailAlloc_6731_; 
v_reuseFailAlloc_6731_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v_reuseFailAlloc_6731_, 0, v___x_6719_);
lean_ctor_set(v_reuseFailAlloc_6731_, 1, v___x_6720_);
v___x_6722_ = v_reuseFailAlloc_6731_;
goto v_reusejp_6721_;
}
v_reusejp_6721_:
{
lean_object* v___x_6723_; lean_object* v___x_6724_; lean_object* v___x_6725_; lean_object* v___x_6726_; lean_object* v___x_6727_; lean_object* v___x_6728_; lean_object* v___x_6729_; lean_object* v___x_6730_; 
v___x_6723_ = lean_obj_once(&l_Lean_Elab_applyDerivingHandlers___lam__2___closed__5, &l_Lean_Elab_applyDerivingHandlers___lam__2___closed__5_once, _init_l_Lean_Elab_applyDerivingHandlers___lam__2___closed__5);
v___x_6724_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_6724_, 0, v___x_6722_);
lean_ctor_set(v___x_6724_, 1, v___x_6723_);
v___x_6725_ = lean_array_to_list(v_typeNames_6571_);
v___x_6726_ = lean_box(0);
v___x_6727_ = l_List_mapTR_loop___at___00Lean_Elab_applyDerivingHandlers_spec__4(v___x_6701_, v___x_6725_, v___x_6726_);
v___x_6728_ = l_Lean_MessageData_andList(v___x_6727_);
v___x_6729_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_6729_, 0, v___x_6724_);
lean_ctor_set(v___x_6729_, 1, v___x_6728_);
lean_inc_ref(v___y_6576_);
v___x_6730_ = l_Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2___redArg(v___x_6729_, v___y_6576_, v___y_6577_);
v___y_6665_ = v___x_6702_;
v___y_6666_ = v_a_6699_;
v___y_6667_ = v___x_6730_;
goto v___jp_6664_;
}
}
else
{
lean_object* v_val_6732_; 
lean_del_object(v___x_6717_);
lean_dec_ref(v_typeNames_6571_);
lean_dec(v_className_6570_);
v_val_6732_ = lean_ctor_get(v_fst_6715_, 0);
lean_inc(v_val_6732_);
lean_dec_ref(v_fst_6715_);
v___y_6653_ = v___x_6702_;
v___y_6654_ = v_a_6699_;
v_a_6655_ = v_val_6732_;
goto v___jp_6652_;
}
}
}
else
{
lean_object* v_a_6735_; 
lean_del_object(v___x_6634_);
lean_dec_ref(v_typeNames_6571_);
lean_dec(v_className_6570_);
v_a_6735_ = lean_ctor_get(v___x_6713_, 0);
lean_inc(v_a_6735_);
lean_dec_ref(v___x_6713_);
v___y_6660_ = v___x_6702_;
v___y_6661_ = v_a_6699_;
v_a_6662_ = v_a_6735_;
goto v___jp_6659_;
}
}
}
else
{
lean_object* v___x_6736_; lean_object* v___x_6737_; lean_object* v___x_6738_; 
lean_del_object(v___x_6634_);
v___x_6736_ = lean_io_get_num_heartbeats();
v___x_6737_ = lean_st_ref_get(v___x_6569_);
v___x_6738_ = l_Std_DTreeMap_Internal_Impl_Const_get_x3f___at___00Lean_NameMap_find_x3f_spec__0___redArg(v___x_6737_, v_className_6570_);
lean_dec(v___x_6737_);
if (lean_obj_tag(v___x_6738_) == 0)
{
lean_object* v___x_6739_; uint8_t v___x_6740_; lean_object* v___x_6741_; lean_object* v___x_6742_; lean_object* v___x_6743_; lean_object* v___x_6744_; lean_object* v___x_6745_; 
lean_dec_ref(v_typeNames_6571_);
v___x_6739_ = lean_obj_once(&l_Lean_Elab_applyDerivingHandlers___lam__2___closed__1, &l_Lean_Elab_applyDerivingHandlers___lam__2___closed__1_once, _init_l_Lean_Elab_applyDerivingHandlers___lam__2___closed__1);
v___x_6740_ = 0;
v___x_6741_ = l_Lean_MessageData_ofConstName(v_className_6570_, v___x_6740_);
v___x_6742_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_6742_, 0, v___x_6739_);
lean_ctor_set(v___x_6742_, 1, v___x_6741_);
v___x_6743_ = lean_obj_once(&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__5, &l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__5_once, _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__5);
v___x_6744_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_6744_, 0, v___x_6742_);
lean_ctor_set(v___x_6744_, 1, v___x_6743_);
lean_inc_ref(v___y_6576_);
v___x_6745_ = l_Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2___redArg(v___x_6744_, v___y_6576_, v___y_6577_);
v___y_6693_ = v___x_6736_;
v___y_6694_ = v_a_6699_;
v___y_6695_ = v___x_6745_;
goto v___jp_6692_;
}
else
{
lean_object* v_val_6746_; lean_object* v___x_6747_; lean_object* v___x_6748_; 
v_val_6746_ = lean_ctor_get(v___x_6738_, 0);
lean_inc(v_val_6746_);
lean_dec_ref(v___x_6738_);
v___x_6747_ = ((lean_object*)(l_List_forIn_x27_loop___at___00Lean_Elab_applyDerivingHandlers_spec__3___redArg___closed__0));
lean_inc(v___y_6577_);
lean_inc_ref(v___y_6576_);
lean_inc_ref(v_typeNames_6571_);
v___x_6748_ = l_List_forIn_x27_loop___at___00Lean_Elab_applyDerivingHandlers_spec__3___redArg(v_typeNames_6571_, v_val_6746_, v___x_6747_, v___y_6576_, v___y_6577_);
if (lean_obj_tag(v___x_6748_) == 0)
{
lean_object* v_a_6749_; lean_object* v_fst_6750_; lean_object* v___x_6752_; uint8_t v_isShared_6753_; uint8_t v_isSharedCheck_6769_; 
v_a_6749_ = lean_ctor_get(v___x_6748_, 0);
lean_inc(v_a_6749_);
lean_dec_ref(v___x_6748_);
v_fst_6750_ = lean_ctor_get(v_a_6749_, 0);
v_isSharedCheck_6769_ = !lean_is_exclusive(v_a_6749_);
if (v_isSharedCheck_6769_ == 0)
{
lean_object* v_unused_6770_; 
v_unused_6770_ = lean_ctor_get(v_a_6749_, 1);
lean_dec(v_unused_6770_);
v___x_6752_ = v_a_6749_;
v_isShared_6753_ = v_isSharedCheck_6769_;
goto v_resetjp_6751_;
}
else
{
lean_inc(v_fst_6750_);
lean_dec(v_a_6749_);
v___x_6752_ = lean_box(0);
v_isShared_6753_ = v_isSharedCheck_6769_;
goto v_resetjp_6751_;
}
v_resetjp_6751_:
{
if (lean_obj_tag(v_fst_6750_) == 0)
{
lean_object* v___x_6754_; uint8_t v___x_6755_; lean_object* v___x_6756_; lean_object* v___x_6758_; 
v___x_6754_ = lean_obj_once(&l_Lean_Elab_applyDerivingHandlers___lam__2___closed__3, &l_Lean_Elab_applyDerivingHandlers___lam__2___closed__3_once, _init_l_Lean_Elab_applyDerivingHandlers___lam__2___closed__3);
v___x_6755_ = 0;
v___x_6756_ = l_Lean_MessageData_ofConstName(v_className_6570_, v___x_6755_);
if (v_isShared_6753_ == 0)
{
lean_ctor_set_tag(v___x_6752_, 7);
lean_ctor_set(v___x_6752_, 1, v___x_6756_);
lean_ctor_set(v___x_6752_, 0, v___x_6754_);
v___x_6758_ = v___x_6752_;
goto v_reusejp_6757_;
}
else
{
lean_object* v_reuseFailAlloc_6767_; 
v_reuseFailAlloc_6767_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v_reuseFailAlloc_6767_, 0, v___x_6754_);
lean_ctor_set(v_reuseFailAlloc_6767_, 1, v___x_6756_);
v___x_6758_ = v_reuseFailAlloc_6767_;
goto v_reusejp_6757_;
}
v_reusejp_6757_:
{
lean_object* v___x_6759_; lean_object* v___x_6760_; lean_object* v___x_6761_; lean_object* v___x_6762_; lean_object* v___x_6763_; lean_object* v___x_6764_; lean_object* v___x_6765_; lean_object* v___x_6766_; 
v___x_6759_ = lean_obj_once(&l_Lean_Elab_applyDerivingHandlers___lam__2___closed__5, &l_Lean_Elab_applyDerivingHandlers___lam__2___closed__5_once, _init_l_Lean_Elab_applyDerivingHandlers___lam__2___closed__5);
v___x_6760_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_6760_, 0, v___x_6758_);
lean_ctor_set(v___x_6760_, 1, v___x_6759_);
v___x_6761_ = lean_array_to_list(v_typeNames_6571_);
v___x_6762_ = lean_box(0);
v___x_6763_ = l_List_mapTR_loop___at___00Lean_Elab_applyDerivingHandlers_spec__8(v___x_6761_, v___x_6762_);
v___x_6764_ = l_Lean_MessageData_andList(v___x_6763_);
v___x_6765_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_6765_, 0, v___x_6760_);
lean_ctor_set(v___x_6765_, 1, v___x_6764_);
lean_inc_ref(v___y_6576_);
v___x_6766_ = l_Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2___redArg(v___x_6765_, v___y_6576_, v___y_6577_);
v___y_6693_ = v___x_6736_;
v___y_6694_ = v_a_6699_;
v___y_6695_ = v___x_6766_;
goto v___jp_6692_;
}
}
else
{
lean_object* v_val_6768_; 
lean_del_object(v___x_6752_);
lean_dec_ref(v_typeNames_6571_);
lean_dec(v_className_6570_);
v_val_6768_ = lean_ctor_get(v_fst_6750_, 0);
lean_inc(v_val_6768_);
lean_dec_ref(v_fst_6750_);
v___y_6688_ = v___x_6736_;
v___y_6689_ = v_a_6699_;
v_a_6690_ = v_val_6768_;
goto v___jp_6687_;
}
}
}
else
{
lean_object* v_a_6771_; 
lean_dec_ref(v_typeNames_6571_);
lean_dec(v_className_6570_);
v_a_6771_ = lean_ctor_get(v___x_6748_, 0);
lean_inc(v_a_6771_);
lean_dec_ref(v___x_6748_);
v___y_6683_ = v___x_6736_;
v___y_6684_ = v_a_6699_;
v_a_6685_ = v_a_6771_;
goto v___jp_6682_;
}
}
}
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_applyDerivingHandlers___lam__2___boxed(lean_object* v___x_6823_, lean_object* v___x_6824_, lean_object* v_className_6825_, lean_object* v_typeNames_6826_, lean_object* v___x_6827_, lean_object* v___x_6828_, lean_object* v___x_6829_, lean_object* v___f_6830_, lean_object* v___y_6831_, lean_object* v___y_6832_, lean_object* v___y_6833_){
_start:
{
uint8_t v___x_13927__boxed_6834_; lean_object* v_res_6835_; 
v___x_13927__boxed_6834_ = lean_unbox(v___x_6828_);
v_res_6835_ = l_Lean_Elab_applyDerivingHandlers___lam__2(v___x_6823_, v___x_6824_, v_className_6825_, v_typeNames_6826_, v___x_6827_, v___x_13927__boxed_6834_, v___x_6829_, v___f_6830_, v___y_6831_, v___y_6832_);
lean_dec(v___x_6824_);
return v_res_6835_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_applyDerivingHandlers(lean_object* v_className_6836_, lean_object* v_typeNames_6837_, uint8_t v_setExpose_6838_, lean_object* v_a_6839_, lean_object* v_a_6840_){
_start:
{
lean_object* v___x_6842_; lean_object* v___f_6843_; lean_object* v___f_6844_; lean_object* v___x_6845_; lean_object* v___x_6846_; uint8_t v___x_6847_; lean_object* v___x_6848_; lean_object* v___x_6849_; lean_object* v___x_6850_; lean_object* v___f_6851_; lean_object* v___x_6852_; 
v___x_6842_ = lean_box(v_setExpose_6838_);
lean_inc_ref(v_typeNames_6837_);
v___f_6843_ = lean_alloc_closure((void*)(l_Lean_Elab_applyDerivingHandlers___lam__0___boxed), 3, 2);
lean_closure_set(v___f_6843_, 0, v___x_6842_);
lean_closure_set(v___f_6843_, 1, v_typeNames_6837_);
lean_inc(v_className_6836_);
v___f_6844_ = lean_alloc_closure((void*)(l_Lean_Elab_applyDerivingHandlers___lam__1___boxed), 5, 1);
lean_closure_set(v___f_6844_, 0, v_className_6836_);
v___x_6845_ = ((lean_object*)(l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__1));
v___x_6846_ = l_Lean_Elab_derivingHandlersRef;
v___x_6847_ = 1;
v___x_6848_ = ((lean_object*)(l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg___closed__1));
v___x_6849_ = l_Lean_Elab_Command_instInhabitedScope_default;
v___x_6850_ = lean_box(v___x_6847_);
v___f_6851_ = lean_alloc_closure((void*)(l_Lean_Elab_applyDerivingHandlers___lam__2___boxed), 11, 8);
lean_closure_set(v___f_6851_, 0, v___x_6849_);
lean_closure_set(v___f_6851_, 1, v___x_6846_);
lean_closure_set(v___f_6851_, 2, v_className_6836_);
lean_closure_set(v___f_6851_, 3, v_typeNames_6837_);
lean_closure_set(v___f_6851_, 4, v___x_6845_);
lean_closure_set(v___f_6851_, 5, v___x_6850_);
lean_closure_set(v___f_6851_, 6, v___x_6848_);
lean_closure_set(v___f_6851_, 7, v___f_6844_);
v___x_6852_ = l_Lean_Elab_Command_withScope___redArg(v___f_6843_, v___f_6851_, v_a_6839_, v_a_6840_);
return v___x_6852_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_applyDerivingHandlers___boxed(lean_object* v_className_6853_, lean_object* v_typeNames_6854_, lean_object* v_setExpose_6855_, lean_object* v_a_6856_, lean_object* v_a_6857_, lean_object* v_a_6858_){
_start:
{
uint8_t v_setExpose_boxed_6859_; lean_object* v_res_6860_; 
v_setExpose_boxed_6859_ = lean_unbox(v_setExpose_6855_);
v_res_6860_ = l_Lean_Elab_applyDerivingHandlers(v_className_6853_, v_typeNames_6854_, v_setExpose_boxed_6859_, v_a_6856_, v_a_6857_);
return v_res_6860_;
}
}
LEAN_EXPORT lean_object* l_Lean_addMessageContextPartial___at___00Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2_spec__2(lean_object* v_msgData_6861_, lean_object* v___y_6862_, lean_object* v___y_6863_){
_start:
{
lean_object* v___x_6865_; 
v___x_6865_ = l_Lean_addMessageContextPartial___at___00Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2_spec__2___redArg(v_msgData_6861_, v___y_6863_);
return v___x_6865_;
}
}
LEAN_EXPORT lean_object* l_Lean_addMessageContextPartial___at___00Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2_spec__2___boxed(lean_object* v_msgData_6866_, lean_object* v___y_6867_, lean_object* v___y_6868_, lean_object* v___y_6869_){
_start:
{
lean_object* v_res_6870_; 
v_res_6870_ = l_Lean_addMessageContextPartial___at___00Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2_spec__2(v_msgData_6866_, v___y_6867_, v___y_6868_);
lean_dec(v___y_6868_);
lean_dec_ref(v___y_6867_);
return v_res_6870_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2(lean_object* v_00_u03b1_6871_, lean_object* v_msg_6872_, lean_object* v___y_6873_, lean_object* v___y_6874_){
_start:
{
lean_object* v___x_6876_; 
v___x_6876_ = l_Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2___redArg(v_msg_6872_, v___y_6873_, v___y_6874_);
return v___x_6876_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2___boxed(lean_object* v_00_u03b1_6877_, lean_object* v_msg_6878_, lean_object* v___y_6879_, lean_object* v___y_6880_, lean_object* v___y_6881_){
_start:
{
lean_object* v_res_6882_; 
v_res_6882_ = l_Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2(v_00_u03b1_6877_, v_msg_6878_, v___y_6879_, v___y_6880_);
lean_dec(v___y_6880_);
return v_res_6882_;
}
}
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00Lean_Elab_applyDerivingHandlers_spec__3(lean_object* v_typeNames_6883_, lean_object* v_as_6884_, lean_object* v_as_x27_6885_, lean_object* v_b_6886_, lean_object* v_a_6887_, lean_object* v___y_6888_, lean_object* v___y_6889_){
_start:
{
lean_object* v___x_6891_; 
v___x_6891_ = l_List_forIn_x27_loop___at___00Lean_Elab_applyDerivingHandlers_spec__3___redArg(v_typeNames_6883_, v_as_x27_6885_, v_b_6886_, v___y_6888_, v___y_6889_);
return v___x_6891_;
}
}
LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at___00Lean_Elab_applyDerivingHandlers_spec__3___boxed(lean_object* v_typeNames_6892_, lean_object* v_as_6893_, lean_object* v_as_x27_6894_, lean_object* v_b_6895_, lean_object* v_a_6896_, lean_object* v___y_6897_, lean_object* v___y_6898_, lean_object* v___y_6899_){
_start:
{
lean_object* v_res_6900_; 
v_res_6900_ = l_List_forIn_x27_loop___at___00Lean_Elab_applyDerivingHandlers_spec__3(v_typeNames_6892_, v_as_6893_, v_as_x27_6894_, v_b_6895_, v_a_6896_, v___y_6897_, v___y_6898_);
lean_dec(v_as_6893_);
return v_res_6900_;
}
}
LEAN_EXPORT lean_object* l_MonadExcept_ofExcept___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00Lean_Elab_applyDerivingHandlers_spec__7_spec__11(lean_object* v_00_u03b1_6901_, lean_object* v_x_6902_, lean_object* v___y_6903_, lean_object* v___y_6904_){
_start:
{
lean_object* v___x_6906_; 
v___x_6906_ = l_MonadExcept_ofExcept___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00Lean_Elab_applyDerivingHandlers_spec__7_spec__11___redArg(v_x_6902_);
return v___x_6906_;
}
}
LEAN_EXPORT lean_object* l_MonadExcept_ofExcept___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00Lean_Elab_applyDerivingHandlers_spec__7_spec__11___boxed(lean_object* v_00_u03b1_6907_, lean_object* v_x_6908_, lean_object* v___y_6909_, lean_object* v___y_6910_, lean_object* v___y_6911_){
_start:
{
lean_object* v_res_6912_; 
v_res_6912_ = l_MonadExcept_ofExcept___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00Lean_Elab_applyDerivingHandlers_spec__7_spec__11(v_00_u03b1_6907_, v_x_6908_, v___y_6909_, v___y_6910_);
lean_dec(v___y_6910_);
lean_dec_ref(v___y_6909_);
return v_res_6912_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_addMacroStack___at___00Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2_spec__3(lean_object* v_msgData_6913_, lean_object* v_macroStack_6914_, lean_object* v___y_6915_, lean_object* v___y_6916_){
_start:
{
lean_object* v___x_6918_; 
v___x_6918_ = l_Lean_Elab_addMacroStack___at___00Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2_spec__3___redArg(v_msgData_6913_, v_macroStack_6914_, v___y_6916_);
return v___x_6918_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_addMacroStack___at___00Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2_spec__3___boxed(lean_object* v_msgData_6919_, lean_object* v_macroStack_6920_, lean_object* v___y_6921_, lean_object* v___y_6922_, lean_object* v___y_6923_){
_start:
{
lean_object* v_res_6924_; 
v_res_6924_ = l_Lean_Elab_addMacroStack___at___00Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2_spec__3(v_msgData_6919_, v_macroStack_6920_, v___y_6921_, v___y_6922_);
lean_dec(v___y_6922_);
lean_dec_ref(v___y_6921_);
return v_res_6924_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_DerivingClassView_getClassName(lean_object* v_view_6925_, lean_object* v_a_6926_, lean_object* v_a_6927_){
_start:
{
lean_object* v_cls_6929_; lean_object* v___x_6930_; lean_object* v___x_6931_; 
v_cls_6929_ = lean_ctor_get(v_view_6925_, 1);
lean_inc(v_cls_6929_);
lean_dec_ref(v_view_6925_);
v___x_6930_ = lean_box(0);
v___x_6931_ = l_Lean_Elab_realizeGlobalConstNoOverloadWithInfo(v_cls_6929_, v___x_6930_, v_a_6926_, v_a_6927_);
return v___x_6931_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_DerivingClassView_getClassName___boxed(lean_object* v_view_6932_, lean_object* v_a_6933_, lean_object* v_a_6934_, lean_object* v_a_6935_){
_start:
{
lean_object* v_res_6936_; 
v_res_6936_ = l_Lean_Elab_DerivingClassView_getClassName(v_view_6932_, v_a_6933_, v_a_6934_);
return v_res_6936_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_DerivingClassView_ofSyntax_spec__0___redArg(){
_start:
{
lean_object* v___x_6938_; lean_object* v___x_6939_; 
v___x_6938_ = lean_obj_once(&l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__15___redArg___closed__0, &l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__15___redArg___closed__0_once, _init_l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__15___redArg___closed__0);
v___x_6939_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_6939_, 0, v___x_6938_);
return v___x_6939_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_DerivingClassView_ofSyntax_spec__0___redArg___boxed(lean_object* v___y_6940_){
_start:
{
lean_object* v_res_6941_; 
v_res_6941_ = l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_DerivingClassView_ofSyntax_spec__0___redArg();
return v_res_6941_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_DerivingClassView_ofSyntax_spec__0(lean_object* v_00_u03b1_6942_, lean_object* v___y_6943_, lean_object* v___y_6944_){
_start:
{
lean_object* v___x_6946_; 
v___x_6946_ = l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_DerivingClassView_ofSyntax_spec__0___redArg();
return v___x_6946_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_DerivingClassView_ofSyntax_spec__0___boxed(lean_object* v_00_u03b1_6947_, lean_object* v___y_6948_, lean_object* v___y_6949_, lean_object* v___y_6950_){
_start:
{
lean_object* v_res_6951_; 
v_res_6951_ = l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_DerivingClassView_ofSyntax_spec__0(v_00_u03b1_6947_, v___y_6948_, v___y_6949_);
lean_dec(v___y_6949_);
lean_dec_ref(v___y_6948_);
return v_res_6951_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_DerivingClassView_ofSyntax(lean_object* v_x_6959_, lean_object* v_a_6960_, lean_object* v_a_6961_){
_start:
{
lean_object* v___y_6964_; uint8_t v___y_6965_; lean_object* v___x_6968_; uint8_t v___x_6969_; lean_object* v_expTk_x3f_6971_; 
v___x_6968_ = ((lean_object*)(l_Lean_Elab_DerivingClassView_ofSyntax___closed__2));
lean_inc(v_x_6959_);
v___x_6969_ = l_Lean_Syntax_isOfKind(v_x_6959_, v___x_6968_);
if (v___x_6969_ == 0)
{
lean_object* v___x_6975_; 
lean_dec(v_x_6959_);
v___x_6975_ = l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_DerivingClassView_ofSyntax_spec__0___redArg();
return v___x_6975_;
}
else
{
lean_object* v___x_6976_; lean_object* v___x_6977_; uint8_t v___x_6978_; 
v___x_6976_ = lean_unsigned_to_nat(0u);
v___x_6977_ = l_Lean_Syntax_getArg(v_x_6959_, v___x_6976_);
v___x_6978_ = l_Lean_Syntax_isNone(v___x_6977_);
if (v___x_6978_ == 0)
{
lean_object* v___x_6979_; uint8_t v___x_6980_; 
v___x_6979_ = lean_unsigned_to_nat(3u);
lean_inc(v___x_6977_);
v___x_6980_ = l_Lean_Syntax_matchesNull(v___x_6977_, v___x_6979_);
if (v___x_6980_ == 0)
{
lean_object* v___x_6981_; 
lean_dec(v___x_6977_);
lean_dec(v_x_6959_);
v___x_6981_ = l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_DerivingClassView_ofSyntax_spec__0___redArg();
return v___x_6981_;
}
else
{
lean_object* v___x_6982_; lean_object* v_expTk_x3f_6983_; lean_object* v___x_6984_; 
v___x_6982_ = lean_unsigned_to_nat(1u);
v_expTk_x3f_6983_ = l_Lean_Syntax_getArg(v___x_6977_, v___x_6982_);
lean_dec(v___x_6977_);
v___x_6984_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_6984_, 0, v_expTk_x3f_6983_);
v_expTk_x3f_6971_ = v___x_6984_;
goto v___jp_6970_;
}
}
else
{
lean_object* v___x_6985_; 
lean_dec(v___x_6977_);
v___x_6985_ = lean_box(0);
v_expTk_x3f_6971_ = v___x_6985_;
goto v___jp_6970_;
}
}
v___jp_6963_:
{
lean_object* v___x_6966_; lean_object* v___x_6967_; 
lean_inc(v___y_6964_);
v___x_6966_ = lean_alloc_ctor(0, 2, 1);
lean_ctor_set(v___x_6966_, 0, v___y_6964_);
lean_ctor_set(v___x_6966_, 1, v___y_6964_);
lean_ctor_set_uint8(v___x_6966_, sizeof(void*)*2, v___y_6965_);
v___x_6967_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_6967_, 0, v___x_6966_);
return v___x_6967_;
}
v___jp_6970_:
{
lean_object* v___x_6972_; lean_object* v_cls_6973_; 
v___x_6972_ = lean_unsigned_to_nat(1u);
v_cls_6973_ = l_Lean_Syntax_getArg(v_x_6959_, v___x_6972_);
lean_dec(v_x_6959_);
if (lean_obj_tag(v_expTk_x3f_6971_) == 0)
{
uint8_t v___x_6974_; 
v___x_6974_ = 0;
v___y_6964_ = v_cls_6973_;
v___y_6965_ = v___x_6974_;
goto v___jp_6963_;
}
else
{
lean_dec_ref(v_expTk_x3f_6971_);
v___y_6964_ = v_cls_6973_;
v___y_6965_ = v___x_6969_;
goto v___jp_6963_;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_DerivingClassView_ofSyntax___boxed(lean_object* v_x_6986_, lean_object* v_a_6987_, lean_object* v_a_6988_, lean_object* v_a_6989_){
_start:
{
lean_object* v_res_6990_; 
v_res_6990_ = l_Lean_Elab_DerivingClassView_ofSyntax(v_x_6986_, v_a_6987_, v_a_6988_);
lean_dec(v_a_6988_);
lean_dec_ref(v_a_6987_);
return v_res_6990_;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Elab_getOptDerivingClasses_spec__0(size_t v_sz_6991_, size_t v_i_6992_, lean_object* v_bs_6993_){
_start:
{
uint8_t v___x_6994_; 
v___x_6994_ = lean_usize_dec_lt(v_i_6992_, v_sz_6991_);
if (v___x_6994_ == 0)
{
lean_object* v___x_6995_; 
v___x_6995_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_6995_, 0, v_bs_6993_);
return v___x_6995_;
}
else
{
lean_object* v_v_6996_; lean_object* v___x_6997_; lean_object* v_bs_x27_6998_; size_t v___x_6999_; size_t v___x_7000_; lean_object* v___x_7001_; 
v_v_6996_ = lean_array_uget(v_bs_6993_, v_i_6992_);
v___x_6997_ = lean_unsigned_to_nat(0u);
v_bs_x27_6998_ = lean_array_uset(v_bs_6993_, v_i_6992_, v___x_6997_);
v___x_6999_ = ((size_t)1ULL);
v___x_7000_ = lean_usize_add(v_i_6992_, v___x_6999_);
v___x_7001_ = lean_array_uset(v_bs_x27_6998_, v_i_6992_, v_v_6996_);
v_i_6992_ = v___x_7000_;
v_bs_6993_ = v___x_7001_;
goto _start;
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Elab_getOptDerivingClasses_spec__0___boxed(lean_object* v_sz_7003_, lean_object* v_i_7004_, lean_object* v_bs_7005_){
_start:
{
size_t v_sz_boxed_7006_; size_t v_i_boxed_7007_; lean_object* v_res_7008_; 
v_sz_boxed_7006_ = lean_unbox_usize(v_sz_7003_);
lean_dec(v_sz_7003_);
v_i_boxed_7007_ = lean_unbox_usize(v_i_7004_);
lean_dec(v_i_7004_);
v_res_7008_ = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Elab_getOptDerivingClasses_spec__0(v_sz_boxed_7006_, v_i_boxed_7007_, v_bs_7005_);
return v_res_7008_;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Elab_getOptDerivingClasses_spec__1(size_t v_sz_7009_, size_t v_i_7010_, lean_object* v_bs_7011_, lean_object* v___y_7012_, lean_object* v___y_7013_){
_start:
{
uint8_t v___x_7015_; 
v___x_7015_ = lean_usize_dec_lt(v_i_7010_, v_sz_7009_);
if (v___x_7015_ == 0)
{
lean_object* v___x_7016_; 
v___x_7016_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_7016_, 0, v_bs_7011_);
return v___x_7016_;
}
else
{
lean_object* v_v_7017_; lean_object* v___x_7018_; 
v_v_7017_ = lean_array_uget_borrowed(v_bs_7011_, v_i_7010_);
lean_inc(v_v_7017_);
v___x_7018_ = l_Lean_Elab_DerivingClassView_ofSyntax(v_v_7017_, v___y_7012_, v___y_7013_);
if (lean_obj_tag(v___x_7018_) == 0)
{
lean_object* v_a_7019_; lean_object* v___x_7020_; lean_object* v_bs_x27_7021_; size_t v___x_7022_; size_t v___x_7023_; lean_object* v___x_7024_; 
v_a_7019_ = lean_ctor_get(v___x_7018_, 0);
lean_inc(v_a_7019_);
lean_dec_ref(v___x_7018_);
v___x_7020_ = lean_unsigned_to_nat(0u);
v_bs_x27_7021_ = lean_array_uset(v_bs_7011_, v_i_7010_, v___x_7020_);
v___x_7022_ = ((size_t)1ULL);
v___x_7023_ = lean_usize_add(v_i_7010_, v___x_7022_);
v___x_7024_ = lean_array_uset(v_bs_x27_7021_, v_i_7010_, v_a_7019_);
v_i_7010_ = v___x_7023_;
v_bs_7011_ = v___x_7024_;
goto _start;
}
else
{
lean_object* v_a_7026_; lean_object* v___x_7028_; uint8_t v_isShared_7029_; uint8_t v_isSharedCheck_7033_; 
lean_dec_ref(v_bs_7011_);
v_a_7026_ = lean_ctor_get(v___x_7018_, 0);
v_isSharedCheck_7033_ = !lean_is_exclusive(v___x_7018_);
if (v_isSharedCheck_7033_ == 0)
{
v___x_7028_ = v___x_7018_;
v_isShared_7029_ = v_isSharedCheck_7033_;
goto v_resetjp_7027_;
}
else
{
lean_inc(v_a_7026_);
lean_dec(v___x_7018_);
v___x_7028_ = lean_box(0);
v_isShared_7029_ = v_isSharedCheck_7033_;
goto v_resetjp_7027_;
}
v_resetjp_7027_:
{
lean_object* v___x_7031_; 
if (v_isShared_7029_ == 0)
{
v___x_7031_ = v___x_7028_;
goto v_reusejp_7030_;
}
else
{
lean_object* v_reuseFailAlloc_7032_; 
v_reuseFailAlloc_7032_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_7032_, 0, v_a_7026_);
v___x_7031_ = v_reuseFailAlloc_7032_;
goto v_reusejp_7030_;
}
v_reusejp_7030_:
{
return v___x_7031_;
}
}
}
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Elab_getOptDerivingClasses_spec__1___boxed(lean_object* v_sz_7034_, lean_object* v_i_7035_, lean_object* v_bs_7036_, lean_object* v___y_7037_, lean_object* v___y_7038_, lean_object* v___y_7039_){
_start:
{
size_t v_sz_boxed_7040_; size_t v_i_boxed_7041_; lean_object* v_res_7042_; 
v_sz_boxed_7040_ = lean_unbox_usize(v_sz_7034_);
lean_dec(v_sz_7034_);
v_i_boxed_7041_ = lean_unbox_usize(v_i_7035_);
lean_dec(v_i_7035_);
v_res_7042_ = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Elab_getOptDerivingClasses_spec__1(v_sz_boxed_7040_, v_i_boxed_7041_, v_bs_7036_, v___y_7037_, v___y_7038_);
lean_dec(v___y_7038_);
lean_dec_ref(v___y_7037_);
return v_res_7042_;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Elab_getOptDerivingClasses_spec__2(uint8_t v___x_7043_, lean_object* v_as_7044_, size_t v_i_7045_, size_t v_stop_7046_, lean_object* v_b_7047_){
_start:
{
lean_object* v___y_7049_; uint8_t v___x_7053_; 
v___x_7053_ = lean_usize_dec_eq(v_i_7045_, v_stop_7046_);
if (v___x_7053_ == 0)
{
lean_object* v_fst_7054_; uint8_t v___x_7055_; 
v_fst_7054_ = lean_ctor_get(v_b_7047_, 0);
v___x_7055_ = lean_unbox(v_fst_7054_);
if (v___x_7055_ == 0)
{
lean_object* v_snd_7056_; lean_object* v___x_7058_; uint8_t v_isShared_7059_; uint8_t v_isSharedCheck_7064_; 
v_snd_7056_ = lean_ctor_get(v_b_7047_, 1);
v_isSharedCheck_7064_ = !lean_is_exclusive(v_b_7047_);
if (v_isSharedCheck_7064_ == 0)
{
lean_object* v_unused_7065_; 
v_unused_7065_ = lean_ctor_get(v_b_7047_, 0);
lean_dec(v_unused_7065_);
v___x_7058_ = v_b_7047_;
v_isShared_7059_ = v_isSharedCheck_7064_;
goto v_resetjp_7057_;
}
else
{
lean_inc(v_snd_7056_);
lean_dec(v_b_7047_);
v___x_7058_ = lean_box(0);
v_isShared_7059_ = v_isSharedCheck_7064_;
goto v_resetjp_7057_;
}
v_resetjp_7057_:
{
lean_object* v___x_7060_; lean_object* v___x_7062_; 
v___x_7060_ = lean_box(v___x_7043_);
if (v_isShared_7059_ == 0)
{
lean_ctor_set(v___x_7058_, 0, v___x_7060_);
v___x_7062_ = v___x_7058_;
goto v_reusejp_7061_;
}
else
{
lean_object* v_reuseFailAlloc_7063_; 
v_reuseFailAlloc_7063_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v_reuseFailAlloc_7063_, 0, v___x_7060_);
lean_ctor_set(v_reuseFailAlloc_7063_, 1, v_snd_7056_);
v___x_7062_ = v_reuseFailAlloc_7063_;
goto v_reusejp_7061_;
}
v_reusejp_7061_:
{
v___y_7049_ = v___x_7062_;
goto v___jp_7048_;
}
}
}
else
{
lean_object* v_snd_7066_; lean_object* v___x_7068_; uint8_t v_isShared_7069_; uint8_t v_isSharedCheck_7076_; 
v_snd_7066_ = lean_ctor_get(v_b_7047_, 1);
v_isSharedCheck_7076_ = !lean_is_exclusive(v_b_7047_);
if (v_isSharedCheck_7076_ == 0)
{
lean_object* v_unused_7077_; 
v_unused_7077_ = lean_ctor_get(v_b_7047_, 0);
lean_dec(v_unused_7077_);
v___x_7068_ = v_b_7047_;
v_isShared_7069_ = v_isSharedCheck_7076_;
goto v_resetjp_7067_;
}
else
{
lean_inc(v_snd_7066_);
lean_dec(v_b_7047_);
v___x_7068_ = lean_box(0);
v_isShared_7069_ = v_isSharedCheck_7076_;
goto v_resetjp_7067_;
}
v_resetjp_7067_:
{
lean_object* v___x_7070_; lean_object* v___x_7071_; lean_object* v___x_7072_; lean_object* v___x_7074_; 
v___x_7070_ = lean_array_uget_borrowed(v_as_7044_, v_i_7045_);
lean_inc(v___x_7070_);
v___x_7071_ = lean_array_push(v_snd_7066_, v___x_7070_);
v___x_7072_ = lean_box(v___x_7053_);
if (v_isShared_7069_ == 0)
{
lean_ctor_set(v___x_7068_, 1, v___x_7071_);
lean_ctor_set(v___x_7068_, 0, v___x_7072_);
v___x_7074_ = v___x_7068_;
goto v_reusejp_7073_;
}
else
{
lean_object* v_reuseFailAlloc_7075_; 
v_reuseFailAlloc_7075_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v_reuseFailAlloc_7075_, 0, v___x_7072_);
lean_ctor_set(v_reuseFailAlloc_7075_, 1, v___x_7071_);
v___x_7074_ = v_reuseFailAlloc_7075_;
goto v_reusejp_7073_;
}
v_reusejp_7073_:
{
v___y_7049_ = v___x_7074_;
goto v___jp_7048_;
}
}
}
}
else
{
return v_b_7047_;
}
v___jp_7048_:
{
size_t v___x_7050_; size_t v___x_7051_; 
v___x_7050_ = ((size_t)1ULL);
v___x_7051_ = lean_usize_add(v_i_7045_, v___x_7050_);
v_i_7045_ = v___x_7051_;
v_b_7047_ = v___y_7049_;
goto _start;
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Elab_getOptDerivingClasses_spec__2___boxed(lean_object* v___x_7078_, lean_object* v_as_7079_, lean_object* v_i_7080_, lean_object* v_stop_7081_, lean_object* v_b_7082_){
_start:
{
uint8_t v___x_1598__boxed_7083_; size_t v_i_boxed_7084_; size_t v_stop_boxed_7085_; lean_object* v_res_7086_; 
v___x_1598__boxed_7083_ = lean_unbox(v___x_7078_);
v_i_boxed_7084_ = lean_unbox_usize(v_i_7080_);
lean_dec(v_i_7080_);
v_stop_boxed_7085_ = lean_unbox_usize(v_stop_7081_);
lean_dec(v_stop_7081_);
v_res_7086_ = l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Elab_getOptDerivingClasses_spec__2(v___x_1598__boxed_7083_, v_as_7079_, v_i_boxed_7084_, v_stop_boxed_7085_, v_b_7082_);
lean_dec_ref(v_as_7079_);
return v_res_7086_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_getOptDerivingClasses(lean_object* v_optDeriving_7097_, lean_object* v_a_7098_, lean_object* v_a_7099_){
_start:
{
lean_object* v___x_7101_; uint8_t v___x_7102_; 
v___x_7101_ = ((lean_object*)(l_Lean_Elab_getOptDerivingClasses___closed__1));
lean_inc(v_optDeriving_7097_);
v___x_7102_ = l_Lean_Syntax_isOfKind(v_optDeriving_7097_, v___x_7101_);
if (v___x_7102_ == 0)
{
lean_object* v___x_7103_; lean_object* v___x_7104_; 
lean_dec(v_optDeriving_7097_);
v___x_7103_ = ((lean_object*)(l_Lean_Elab_getOptDerivingClasses___closed__2));
v___x_7104_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_7104_, 0, v___x_7103_);
return v___x_7104_;
}
else
{
lean_object* v___x_7105_; lean_object* v___y_7107_; lean_object* v___x_7116_; lean_object* v___x_7117_; uint8_t v___x_7118_; 
v___x_7105_ = lean_unsigned_to_nat(0u);
v___x_7116_ = l_Lean_Syntax_getArg(v_optDeriving_7097_, v___x_7105_);
lean_dec(v_optDeriving_7097_);
v___x_7117_ = lean_unsigned_to_nat(2u);
lean_inc(v___x_7116_);
v___x_7118_ = l_Lean_Syntax_matchesNull(v___x_7116_, v___x_7117_);
if (v___x_7118_ == 0)
{
lean_object* v___x_7119_; lean_object* v___x_7120_; 
lean_dec(v___x_7116_);
v___x_7119_ = ((lean_object*)(l_Lean_Elab_getOptDerivingClasses___closed__2));
v___x_7120_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_7120_, 0, v___x_7119_);
return v___x_7120_;
}
else
{
lean_object* v___x_7121_; lean_object* v___x_7122_; lean_object* v___x_7123_; lean_object* v___x_7124_; lean_object* v___x_7125_; uint8_t v___x_7126_; 
v___x_7121_ = lean_unsigned_to_nat(1u);
v___x_7122_ = l_Lean_Syntax_getArg(v___x_7116_, v___x_7121_);
lean_dec(v___x_7116_);
v___x_7123_ = l_Lean_Syntax_getArgs(v___x_7122_);
lean_dec(v___x_7122_);
v___x_7124_ = ((lean_object*)(l_Lean_Elab_getOptDerivingClasses___closed__3));
v___x_7125_ = lean_array_get_size(v___x_7123_);
v___x_7126_ = lean_nat_dec_lt(v___x_7105_, v___x_7125_);
if (v___x_7126_ == 0)
{
lean_dec_ref(v___x_7123_);
v___y_7107_ = v___x_7124_;
goto v___jp_7106_;
}
else
{
lean_object* v___x_7127_; lean_object* v___x_7128_; uint8_t v___x_7129_; 
v___x_7127_ = lean_box(v___x_7118_);
v___x_7128_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_7128_, 0, v___x_7127_);
lean_ctor_set(v___x_7128_, 1, v___x_7124_);
v___x_7129_ = lean_nat_dec_le(v___x_7125_, v___x_7125_);
if (v___x_7129_ == 0)
{
if (v___x_7126_ == 0)
{
lean_dec_ref(v___x_7128_);
lean_dec_ref(v___x_7123_);
v___y_7107_ = v___x_7124_;
goto v___jp_7106_;
}
else
{
size_t v___x_7130_; size_t v___x_7131_; lean_object* v___x_7132_; lean_object* v_snd_7133_; 
v___x_7130_ = ((size_t)0ULL);
v___x_7131_ = lean_usize_of_nat(v___x_7125_);
v___x_7132_ = l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Elab_getOptDerivingClasses_spec__2(v___x_7118_, v___x_7123_, v___x_7130_, v___x_7131_, v___x_7128_);
lean_dec_ref(v___x_7123_);
v_snd_7133_ = lean_ctor_get(v___x_7132_, 1);
lean_inc(v_snd_7133_);
lean_dec_ref(v___x_7132_);
v___y_7107_ = v_snd_7133_;
goto v___jp_7106_;
}
}
else
{
size_t v___x_7134_; size_t v___x_7135_; lean_object* v___x_7136_; lean_object* v_snd_7137_; 
v___x_7134_ = ((size_t)0ULL);
v___x_7135_ = lean_usize_of_nat(v___x_7125_);
v___x_7136_ = l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Elab_getOptDerivingClasses_spec__2(v___x_7118_, v___x_7123_, v___x_7134_, v___x_7135_, v___x_7128_);
lean_dec_ref(v___x_7123_);
v_snd_7137_ = lean_ctor_get(v___x_7136_, 1);
lean_inc(v_snd_7137_);
lean_dec_ref(v___x_7136_);
v___y_7107_ = v_snd_7137_;
goto v___jp_7106_;
}
}
}
v___jp_7106_:
{
size_t v_sz_7108_; size_t v___x_7109_; lean_object* v___x_7110_; 
v_sz_7108_ = lean_array_size(v___y_7107_);
v___x_7109_ = ((size_t)0ULL);
v___x_7110_ = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Elab_getOptDerivingClasses_spec__0(v_sz_7108_, v___x_7109_, v___y_7107_);
if (lean_obj_tag(v___x_7110_) == 0)
{
lean_object* v___x_7111_; lean_object* v___x_7112_; 
v___x_7111_ = ((lean_object*)(l_Lean_Elab_getOptDerivingClasses___closed__2));
v___x_7112_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_7112_, 0, v___x_7111_);
return v___x_7112_;
}
else
{
lean_object* v_val_7113_; size_t v_sz_7114_; lean_object* v___x_7115_; 
v_val_7113_ = lean_ctor_get(v___x_7110_, 0);
lean_inc(v_val_7113_);
lean_dec_ref(v___x_7110_);
v_sz_7114_ = lean_array_size(v_val_7113_);
v___x_7115_ = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Elab_getOptDerivingClasses_spec__1(v_sz_7114_, v___x_7109_, v_val_7113_, v_a_7098_, v_a_7099_);
return v___x_7115_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_getOptDerivingClasses___boxed(lean_object* v_optDeriving_7138_, lean_object* v_a_7139_, lean_object* v_a_7140_, lean_object* v_a_7141_){
_start:
{
lean_object* v_res_7142_; 
v_res_7142_ = l_Lean_Elab_getOptDerivingClasses(v_optDeriving_7138_, v_a_7139_, v_a_7140_);
lean_dec(v_a_7140_);
lean_dec_ref(v_a_7139_);
return v_res_7142_;
}
}
LEAN_EXPORT uint8_t l___private_Init_Data_Array_Basic_0__Array_anyMUnsafe_any___at___00Lean_Elab_DerivingClassView_applyHandlers_spec__0(lean_object* v___x_7143_, uint8_t v___x_7144_, lean_object* v_as_7145_, size_t v_i_7146_, size_t v_stop_7147_){
_start:
{
uint8_t v___x_7148_; 
v___x_7148_ = lean_usize_dec_eq(v_i_7146_, v_stop_7147_);
if (v___x_7148_ == 0)
{
uint8_t v___x_7149_; lean_object* v___x_7150_; uint8_t v___x_7151_; 
v___x_7149_ = 1;
v___x_7150_ = lean_array_uget_borrowed(v_as_7145_, v_i_7146_);
lean_inc(v___x_7150_);
lean_inc_ref(v___x_7143_);
v___x_7151_ = l_Lean_isMarkedMeta(v___x_7143_, v___x_7150_);
if (v___x_7151_ == 0)
{
lean_dec_ref(v___x_7143_);
return v___x_7149_;
}
else
{
if (v___x_7144_ == 0)
{
size_t v___x_7152_; size_t v___x_7153_; 
v___x_7152_ = ((size_t)1ULL);
v___x_7153_ = lean_usize_add(v_i_7146_, v___x_7152_);
v_i_7146_ = v___x_7153_;
goto _start;
}
else
{
lean_dec_ref(v___x_7143_);
return v___x_7149_;
}
}
}
else
{
uint8_t v___x_7155_; 
lean_dec_ref(v___x_7143_);
v___x_7155_ = 0;
return v___x_7155_;
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_anyMUnsafe_any___at___00Lean_Elab_DerivingClassView_applyHandlers_spec__0___boxed(lean_object* v___x_7156_, lean_object* v___x_7157_, lean_object* v_as_7158_, lean_object* v_i_7159_, lean_object* v_stop_7160_){
_start:
{
uint8_t v___x_674__boxed_7161_; size_t v_i_boxed_7162_; size_t v_stop_boxed_7163_; uint8_t v_res_7164_; lean_object* v_r_7165_; 
v___x_674__boxed_7161_ = lean_unbox(v___x_7157_);
v_i_boxed_7162_ = lean_unbox_usize(v_i_7159_);
lean_dec(v_i_7159_);
v_stop_boxed_7163_ = lean_unbox_usize(v_stop_7160_);
lean_dec(v_stop_7160_);
v_res_7164_ = l___private_Init_Data_Array_Basic_0__Array_anyMUnsafe_any___at___00Lean_Elab_DerivingClassView_applyHandlers_spec__0(v___x_7156_, v___x_674__boxed_7161_, v_as_7158_, v_i_boxed_7162_, v_stop_boxed_7163_);
lean_dec_ref(v_as_7158_);
v_r_7165_ = lean_box(v_res_7164_);
return v_r_7165_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_DerivingClassView_applyHandlers___lam__0(lean_object* v_declNames_7166_, lean_object* v_env_7167_, lean_object* v_sc_7168_){
_start:
{
uint8_t v_isMeta_7169_; 
v_isMeta_7169_ = lean_ctor_get_uint8(v_sc_7168_, sizeof(void*)*10 + 2);
if (v_isMeta_7169_ == 0)
{
lean_object* v_header_7170_; lean_object* v_opts_7171_; lean_object* v_currNamespace_7172_; lean_object* v_openDecls_7173_; lean_object* v_levelNames_7174_; lean_object* v_varDecls_7175_; lean_object* v_varUIds_7176_; lean_object* v_includedVars_7177_; lean_object* v_omittedVars_7178_; uint8_t v_isNoncomputable_7179_; uint8_t v_isPublic_7180_; lean_object* v_attrs_7181_; lean_object* v___x_7182_; lean_object* v___x_7183_; uint8_t v___x_7184_; 
v_header_7170_ = lean_ctor_get(v_sc_7168_, 0);
v_opts_7171_ = lean_ctor_get(v_sc_7168_, 1);
v_currNamespace_7172_ = lean_ctor_get(v_sc_7168_, 2);
v_openDecls_7173_ = lean_ctor_get(v_sc_7168_, 3);
v_levelNames_7174_ = lean_ctor_get(v_sc_7168_, 4);
v_varDecls_7175_ = lean_ctor_get(v_sc_7168_, 5);
v_varUIds_7176_ = lean_ctor_get(v_sc_7168_, 6);
v_includedVars_7177_ = lean_ctor_get(v_sc_7168_, 7);
v_omittedVars_7178_ = lean_ctor_get(v_sc_7168_, 8);
v_isNoncomputable_7179_ = lean_ctor_get_uint8(v_sc_7168_, sizeof(void*)*10);
v_isPublic_7180_ = lean_ctor_get_uint8(v_sc_7168_, sizeof(void*)*10 + 1);
v_attrs_7181_ = lean_ctor_get(v_sc_7168_, 9);
v___x_7182_ = lean_unsigned_to_nat(0u);
v___x_7183_ = lean_array_get_size(v_declNames_7166_);
v___x_7184_ = lean_nat_dec_lt(v___x_7182_, v___x_7183_);
if (v___x_7184_ == 0)
{
lean_object* v___x_7186_; uint8_t v_isShared_7187_; uint8_t v_isSharedCheck_7192_; 
lean_inc(v_attrs_7181_);
lean_inc(v_omittedVars_7178_);
lean_inc(v_includedVars_7177_);
lean_inc_ref(v_varUIds_7176_);
lean_inc_ref(v_varDecls_7175_);
lean_inc(v_levelNames_7174_);
lean_inc(v_openDecls_7173_);
lean_inc(v_currNamespace_7172_);
lean_inc_ref(v_opts_7171_);
lean_inc_ref(v_header_7170_);
lean_dec_ref(v_env_7167_);
v_isSharedCheck_7192_ = !lean_is_exclusive(v_sc_7168_);
if (v_isSharedCheck_7192_ == 0)
{
lean_object* v_unused_7193_; lean_object* v_unused_7194_; lean_object* v_unused_7195_; lean_object* v_unused_7196_; lean_object* v_unused_7197_; lean_object* v_unused_7198_; lean_object* v_unused_7199_; lean_object* v_unused_7200_; lean_object* v_unused_7201_; lean_object* v_unused_7202_; 
v_unused_7193_ = lean_ctor_get(v_sc_7168_, 9);
lean_dec(v_unused_7193_);
v_unused_7194_ = lean_ctor_get(v_sc_7168_, 8);
lean_dec(v_unused_7194_);
v_unused_7195_ = lean_ctor_get(v_sc_7168_, 7);
lean_dec(v_unused_7195_);
v_unused_7196_ = lean_ctor_get(v_sc_7168_, 6);
lean_dec(v_unused_7196_);
v_unused_7197_ = lean_ctor_get(v_sc_7168_, 5);
lean_dec(v_unused_7197_);
v_unused_7198_ = lean_ctor_get(v_sc_7168_, 4);
lean_dec(v_unused_7198_);
v_unused_7199_ = lean_ctor_get(v_sc_7168_, 3);
lean_dec(v_unused_7199_);
v_unused_7200_ = lean_ctor_get(v_sc_7168_, 2);
lean_dec(v_unused_7200_);
v_unused_7201_ = lean_ctor_get(v_sc_7168_, 1);
lean_dec(v_unused_7201_);
v_unused_7202_ = lean_ctor_get(v_sc_7168_, 0);
lean_dec(v_unused_7202_);
v___x_7186_ = v_sc_7168_;
v_isShared_7187_ = v_isSharedCheck_7192_;
goto v_resetjp_7185_;
}
else
{
lean_dec(v_sc_7168_);
v___x_7186_ = lean_box(0);
v_isShared_7187_ = v_isSharedCheck_7192_;
goto v_resetjp_7185_;
}
v_resetjp_7185_:
{
uint8_t v___x_7188_; lean_object* v___x_7190_; 
v___x_7188_ = 1;
if (v_isShared_7187_ == 0)
{
v___x_7190_ = v___x_7186_;
goto v_reusejp_7189_;
}
else
{
lean_object* v_reuseFailAlloc_7191_; 
v_reuseFailAlloc_7191_ = lean_alloc_ctor(0, 10, 3);
lean_ctor_set(v_reuseFailAlloc_7191_, 0, v_header_7170_);
lean_ctor_set(v_reuseFailAlloc_7191_, 1, v_opts_7171_);
lean_ctor_set(v_reuseFailAlloc_7191_, 2, v_currNamespace_7172_);
lean_ctor_set(v_reuseFailAlloc_7191_, 3, v_openDecls_7173_);
lean_ctor_set(v_reuseFailAlloc_7191_, 4, v_levelNames_7174_);
lean_ctor_set(v_reuseFailAlloc_7191_, 5, v_varDecls_7175_);
lean_ctor_set(v_reuseFailAlloc_7191_, 6, v_varUIds_7176_);
lean_ctor_set(v_reuseFailAlloc_7191_, 7, v_includedVars_7177_);
lean_ctor_set(v_reuseFailAlloc_7191_, 8, v_omittedVars_7178_);
lean_ctor_set(v_reuseFailAlloc_7191_, 9, v_attrs_7181_);
lean_ctor_set_uint8(v_reuseFailAlloc_7191_, sizeof(void*)*10, v_isNoncomputable_7179_);
lean_ctor_set_uint8(v_reuseFailAlloc_7191_, sizeof(void*)*10 + 1, v_isPublic_7180_);
v___x_7190_ = v_reuseFailAlloc_7191_;
goto v_reusejp_7189_;
}
v_reusejp_7189_:
{
lean_ctor_set_uint8(v___x_7190_, sizeof(void*)*10 + 2, v___x_7188_);
return v___x_7190_;
}
}
}
else
{
if (v___x_7184_ == 0)
{
lean_object* v___x_7204_; uint8_t v_isShared_7205_; uint8_t v_isSharedCheck_7209_; 
lean_inc(v_attrs_7181_);
lean_inc(v_omittedVars_7178_);
lean_inc(v_includedVars_7177_);
lean_inc_ref(v_varUIds_7176_);
lean_inc_ref(v_varDecls_7175_);
lean_inc(v_levelNames_7174_);
lean_inc(v_openDecls_7173_);
lean_inc(v_currNamespace_7172_);
lean_inc_ref(v_opts_7171_);
lean_inc_ref(v_header_7170_);
lean_dec_ref(v_env_7167_);
v_isSharedCheck_7209_ = !lean_is_exclusive(v_sc_7168_);
if (v_isSharedCheck_7209_ == 0)
{
lean_object* v_unused_7210_; lean_object* v_unused_7211_; lean_object* v_unused_7212_; lean_object* v_unused_7213_; lean_object* v_unused_7214_; lean_object* v_unused_7215_; lean_object* v_unused_7216_; lean_object* v_unused_7217_; lean_object* v_unused_7218_; lean_object* v_unused_7219_; 
v_unused_7210_ = lean_ctor_get(v_sc_7168_, 9);
lean_dec(v_unused_7210_);
v_unused_7211_ = lean_ctor_get(v_sc_7168_, 8);
lean_dec(v_unused_7211_);
v_unused_7212_ = lean_ctor_get(v_sc_7168_, 7);
lean_dec(v_unused_7212_);
v_unused_7213_ = lean_ctor_get(v_sc_7168_, 6);
lean_dec(v_unused_7213_);
v_unused_7214_ = lean_ctor_get(v_sc_7168_, 5);
lean_dec(v_unused_7214_);
v_unused_7215_ = lean_ctor_get(v_sc_7168_, 4);
lean_dec(v_unused_7215_);
v_unused_7216_ = lean_ctor_get(v_sc_7168_, 3);
lean_dec(v_unused_7216_);
v_unused_7217_ = lean_ctor_get(v_sc_7168_, 2);
lean_dec(v_unused_7217_);
v_unused_7218_ = lean_ctor_get(v_sc_7168_, 1);
lean_dec(v_unused_7218_);
v_unused_7219_ = lean_ctor_get(v_sc_7168_, 0);
lean_dec(v_unused_7219_);
v___x_7204_ = v_sc_7168_;
v_isShared_7205_ = v_isSharedCheck_7209_;
goto v_resetjp_7203_;
}
else
{
lean_dec(v_sc_7168_);
v___x_7204_ = lean_box(0);
v_isShared_7205_ = v_isSharedCheck_7209_;
goto v_resetjp_7203_;
}
v_resetjp_7203_:
{
lean_object* v___x_7207_; 
if (v_isShared_7205_ == 0)
{
v___x_7207_ = v___x_7204_;
goto v_reusejp_7206_;
}
else
{
lean_object* v_reuseFailAlloc_7208_; 
v_reuseFailAlloc_7208_ = lean_alloc_ctor(0, 10, 3);
lean_ctor_set(v_reuseFailAlloc_7208_, 0, v_header_7170_);
lean_ctor_set(v_reuseFailAlloc_7208_, 1, v_opts_7171_);
lean_ctor_set(v_reuseFailAlloc_7208_, 2, v_currNamespace_7172_);
lean_ctor_set(v_reuseFailAlloc_7208_, 3, v_openDecls_7173_);
lean_ctor_set(v_reuseFailAlloc_7208_, 4, v_levelNames_7174_);
lean_ctor_set(v_reuseFailAlloc_7208_, 5, v_varDecls_7175_);
lean_ctor_set(v_reuseFailAlloc_7208_, 6, v_varUIds_7176_);
lean_ctor_set(v_reuseFailAlloc_7208_, 7, v_includedVars_7177_);
lean_ctor_set(v_reuseFailAlloc_7208_, 8, v_omittedVars_7178_);
lean_ctor_set(v_reuseFailAlloc_7208_, 9, v_attrs_7181_);
lean_ctor_set_uint8(v_reuseFailAlloc_7208_, sizeof(void*)*10, v_isNoncomputable_7179_);
lean_ctor_set_uint8(v_reuseFailAlloc_7208_, sizeof(void*)*10 + 1, v_isPublic_7180_);
v___x_7207_ = v_reuseFailAlloc_7208_;
goto v_reusejp_7206_;
}
v_reusejp_7206_:
{
lean_ctor_set_uint8(v___x_7207_, sizeof(void*)*10 + 2, v___x_7184_);
return v___x_7207_;
}
}
}
else
{
size_t v___x_7220_; size_t v___x_7221_; uint8_t v___x_7222_; 
v___x_7220_ = ((size_t)0ULL);
v___x_7221_ = lean_usize_of_nat(v___x_7183_);
v___x_7222_ = l___private_Init_Data_Array_Basic_0__Array_anyMUnsafe_any___at___00Lean_Elab_DerivingClassView_applyHandlers_spec__0(v_env_7167_, v_isMeta_7169_, v_declNames_7166_, v___x_7220_, v___x_7221_);
if (v___x_7222_ == 0)
{
lean_object* v___x_7224_; uint8_t v_isShared_7225_; uint8_t v_isSharedCheck_7229_; 
lean_inc(v_attrs_7181_);
lean_inc(v_omittedVars_7178_);
lean_inc(v_includedVars_7177_);
lean_inc_ref(v_varUIds_7176_);
lean_inc_ref(v_varDecls_7175_);
lean_inc(v_levelNames_7174_);
lean_inc(v_openDecls_7173_);
lean_inc(v_currNamespace_7172_);
lean_inc_ref(v_opts_7171_);
lean_inc_ref(v_header_7170_);
v_isSharedCheck_7229_ = !lean_is_exclusive(v_sc_7168_);
if (v_isSharedCheck_7229_ == 0)
{
lean_object* v_unused_7230_; lean_object* v_unused_7231_; lean_object* v_unused_7232_; lean_object* v_unused_7233_; lean_object* v_unused_7234_; lean_object* v_unused_7235_; lean_object* v_unused_7236_; lean_object* v_unused_7237_; lean_object* v_unused_7238_; lean_object* v_unused_7239_; 
v_unused_7230_ = lean_ctor_get(v_sc_7168_, 9);
lean_dec(v_unused_7230_);
v_unused_7231_ = lean_ctor_get(v_sc_7168_, 8);
lean_dec(v_unused_7231_);
v_unused_7232_ = lean_ctor_get(v_sc_7168_, 7);
lean_dec(v_unused_7232_);
v_unused_7233_ = lean_ctor_get(v_sc_7168_, 6);
lean_dec(v_unused_7233_);
v_unused_7234_ = lean_ctor_get(v_sc_7168_, 5);
lean_dec(v_unused_7234_);
v_unused_7235_ = lean_ctor_get(v_sc_7168_, 4);
lean_dec(v_unused_7235_);
v_unused_7236_ = lean_ctor_get(v_sc_7168_, 3);
lean_dec(v_unused_7236_);
v_unused_7237_ = lean_ctor_get(v_sc_7168_, 2);
lean_dec(v_unused_7237_);
v_unused_7238_ = lean_ctor_get(v_sc_7168_, 1);
lean_dec(v_unused_7238_);
v_unused_7239_ = lean_ctor_get(v_sc_7168_, 0);
lean_dec(v_unused_7239_);
v___x_7224_ = v_sc_7168_;
v_isShared_7225_ = v_isSharedCheck_7229_;
goto v_resetjp_7223_;
}
else
{
lean_dec(v_sc_7168_);
v___x_7224_ = lean_box(0);
v_isShared_7225_ = v_isSharedCheck_7229_;
goto v_resetjp_7223_;
}
v_resetjp_7223_:
{
lean_object* v___x_7227_; 
if (v_isShared_7225_ == 0)
{
v___x_7227_ = v___x_7224_;
goto v_reusejp_7226_;
}
else
{
lean_object* v_reuseFailAlloc_7228_; 
v_reuseFailAlloc_7228_ = lean_alloc_ctor(0, 10, 3);
lean_ctor_set(v_reuseFailAlloc_7228_, 0, v_header_7170_);
lean_ctor_set(v_reuseFailAlloc_7228_, 1, v_opts_7171_);
lean_ctor_set(v_reuseFailAlloc_7228_, 2, v_currNamespace_7172_);
lean_ctor_set(v_reuseFailAlloc_7228_, 3, v_openDecls_7173_);
lean_ctor_set(v_reuseFailAlloc_7228_, 4, v_levelNames_7174_);
lean_ctor_set(v_reuseFailAlloc_7228_, 5, v_varDecls_7175_);
lean_ctor_set(v_reuseFailAlloc_7228_, 6, v_varUIds_7176_);
lean_ctor_set(v_reuseFailAlloc_7228_, 7, v_includedVars_7177_);
lean_ctor_set(v_reuseFailAlloc_7228_, 8, v_omittedVars_7178_);
lean_ctor_set(v_reuseFailAlloc_7228_, 9, v_attrs_7181_);
lean_ctor_set_uint8(v_reuseFailAlloc_7228_, sizeof(void*)*10, v_isNoncomputable_7179_);
lean_ctor_set_uint8(v_reuseFailAlloc_7228_, sizeof(void*)*10 + 1, v_isPublic_7180_);
v___x_7227_ = v_reuseFailAlloc_7228_;
goto v_reusejp_7226_;
}
v_reusejp_7226_:
{
lean_ctor_set_uint8(v___x_7227_, sizeof(void*)*10 + 2, v___x_7184_);
return v___x_7227_;
}
}
}
else
{
return v_sc_7168_;
}
}
}
}
else
{
lean_dec_ref(v_env_7167_);
return v_sc_7168_;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_DerivingClassView_applyHandlers___lam__0___boxed(lean_object* v_declNames_7240_, lean_object* v_env_7241_, lean_object* v_sc_7242_){
_start:
{
lean_object* v_res_7243_; 
v_res_7243_ = l_Lean_Elab_DerivingClassView_applyHandlers___lam__0(v_declNames_7240_, v_env_7241_, v_sc_7242_);
lean_dec_ref(v_declNames_7240_);
return v_res_7243_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_DerivingClassView_applyHandlers___lam__1(lean_object* v_ref_7244_, lean_object* v___x_7245_, lean_object* v_declNames_7246_, uint8_t v_hasExpose_7247_, lean_object* v___y_7248_, lean_object* v___y_7249_){
_start:
{
lean_object* v___x_7251_; 
v___x_7251_ = l_Lean_Elab_Command_getRef___redArg(v___y_7248_);
if (lean_obj_tag(v___x_7251_) == 0)
{
lean_object* v_a_7252_; lean_object* v_fileName_7253_; lean_object* v_fileMap_7254_; lean_object* v_currRecDepth_7255_; lean_object* v_cmdPos_7256_; lean_object* v_macroStack_7257_; lean_object* v_quotContext_x3f_7258_; lean_object* v_currMacroScope_7259_; lean_object* v_snap_x3f_7260_; lean_object* v_cancelTk_x3f_7261_; uint8_t v_suppressElabErrors_7262_; lean_object* v___x_7264_; uint8_t v_isShared_7265_; uint8_t v_isSharedCheck_7281_; 
v_a_7252_ = lean_ctor_get(v___x_7251_, 0);
lean_inc(v_a_7252_);
lean_dec_ref(v___x_7251_);
v_fileName_7253_ = lean_ctor_get(v___y_7248_, 0);
v_fileMap_7254_ = lean_ctor_get(v___y_7248_, 1);
v_currRecDepth_7255_ = lean_ctor_get(v___y_7248_, 2);
v_cmdPos_7256_ = lean_ctor_get(v___y_7248_, 3);
v_macroStack_7257_ = lean_ctor_get(v___y_7248_, 4);
v_quotContext_x3f_7258_ = lean_ctor_get(v___y_7248_, 5);
v_currMacroScope_7259_ = lean_ctor_get(v___y_7248_, 6);
v_snap_x3f_7260_ = lean_ctor_get(v___y_7248_, 8);
v_cancelTk_x3f_7261_ = lean_ctor_get(v___y_7248_, 9);
v_suppressElabErrors_7262_ = lean_ctor_get_uint8(v___y_7248_, sizeof(void*)*10);
v_isSharedCheck_7281_ = !lean_is_exclusive(v___y_7248_);
if (v_isSharedCheck_7281_ == 0)
{
lean_object* v_unused_7282_; 
v_unused_7282_ = lean_ctor_get(v___y_7248_, 7);
lean_dec(v_unused_7282_);
v___x_7264_ = v___y_7248_;
v_isShared_7265_ = v_isSharedCheck_7281_;
goto v_resetjp_7263_;
}
else
{
lean_inc(v_cancelTk_x3f_7261_);
lean_inc(v_snap_x3f_7260_);
lean_inc(v_currMacroScope_7259_);
lean_inc(v_quotContext_x3f_7258_);
lean_inc(v_macroStack_7257_);
lean_inc(v_cmdPos_7256_);
lean_inc(v_currRecDepth_7255_);
lean_inc(v_fileMap_7254_);
lean_inc(v_fileName_7253_);
lean_dec(v___y_7248_);
v___x_7264_ = lean_box(0);
v_isShared_7265_ = v_isSharedCheck_7281_;
goto v_resetjp_7263_;
}
v_resetjp_7263_:
{
lean_object* v_ref_7266_; lean_object* v___x_7268_; 
v_ref_7266_ = l_Lean_replaceRef(v_ref_7244_, v_a_7252_);
lean_dec(v_a_7252_);
if (v_isShared_7265_ == 0)
{
lean_ctor_set(v___x_7264_, 7, v_ref_7266_);
v___x_7268_ = v___x_7264_;
goto v_reusejp_7267_;
}
else
{
lean_object* v_reuseFailAlloc_7280_; 
v_reuseFailAlloc_7280_ = lean_alloc_ctor(0, 10, 1);
lean_ctor_set(v_reuseFailAlloc_7280_, 0, v_fileName_7253_);
lean_ctor_set(v_reuseFailAlloc_7280_, 1, v_fileMap_7254_);
lean_ctor_set(v_reuseFailAlloc_7280_, 2, v_currRecDepth_7255_);
lean_ctor_set(v_reuseFailAlloc_7280_, 3, v_cmdPos_7256_);
lean_ctor_set(v_reuseFailAlloc_7280_, 4, v_macroStack_7257_);
lean_ctor_set(v_reuseFailAlloc_7280_, 5, v_quotContext_x3f_7258_);
lean_ctor_set(v_reuseFailAlloc_7280_, 6, v_currMacroScope_7259_);
lean_ctor_set(v_reuseFailAlloc_7280_, 7, v_ref_7266_);
lean_ctor_set(v_reuseFailAlloc_7280_, 8, v_snap_x3f_7260_);
lean_ctor_set(v_reuseFailAlloc_7280_, 9, v_cancelTk_x3f_7261_);
lean_ctor_set_uint8(v_reuseFailAlloc_7280_, sizeof(void*)*10, v_suppressElabErrors_7262_);
v___x_7268_ = v_reuseFailAlloc_7280_;
goto v_reusejp_7267_;
}
v_reusejp_7267_:
{
lean_object* v___x_7269_; 
lean_inc_ref(v___x_7268_);
v___x_7269_ = l_Lean_Elab_Command_liftCoreM___redArg(v___x_7245_, v___x_7268_, v___y_7249_);
if (lean_obj_tag(v___x_7269_) == 0)
{
lean_object* v_a_7270_; lean_object* v___x_7271_; 
v_a_7270_ = lean_ctor_get(v___x_7269_, 0);
lean_inc(v_a_7270_);
lean_dec_ref(v___x_7269_);
v___x_7271_ = l_Lean_Elab_applyDerivingHandlers(v_a_7270_, v_declNames_7246_, v_hasExpose_7247_, v___x_7268_, v___y_7249_);
return v___x_7271_;
}
else
{
lean_object* v_a_7272_; lean_object* v___x_7274_; uint8_t v_isShared_7275_; uint8_t v_isSharedCheck_7279_; 
lean_dec_ref(v___x_7268_);
lean_dec(v___y_7249_);
lean_dec_ref(v_declNames_7246_);
v_a_7272_ = lean_ctor_get(v___x_7269_, 0);
v_isSharedCheck_7279_ = !lean_is_exclusive(v___x_7269_);
if (v_isSharedCheck_7279_ == 0)
{
v___x_7274_ = v___x_7269_;
v_isShared_7275_ = v_isSharedCheck_7279_;
goto v_resetjp_7273_;
}
else
{
lean_inc(v_a_7272_);
lean_dec(v___x_7269_);
v___x_7274_ = lean_box(0);
v_isShared_7275_ = v_isSharedCheck_7279_;
goto v_resetjp_7273_;
}
v_resetjp_7273_:
{
lean_object* v___x_7277_; 
if (v_isShared_7275_ == 0)
{
v___x_7277_ = v___x_7274_;
goto v_reusejp_7276_;
}
else
{
lean_object* v_reuseFailAlloc_7278_; 
v_reuseFailAlloc_7278_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_7278_, 0, v_a_7272_);
v___x_7277_ = v_reuseFailAlloc_7278_;
goto v_reusejp_7276_;
}
v_reusejp_7276_:
{
return v___x_7277_;
}
}
}
}
}
}
else
{
lean_object* v_a_7283_; lean_object* v___x_7285_; uint8_t v_isShared_7286_; uint8_t v_isSharedCheck_7290_; 
lean_dec(v___y_7249_);
lean_dec_ref(v___y_7248_);
lean_dec_ref(v_declNames_7246_);
lean_dec_ref(v___x_7245_);
v_a_7283_ = lean_ctor_get(v___x_7251_, 0);
v_isSharedCheck_7290_ = !lean_is_exclusive(v___x_7251_);
if (v_isSharedCheck_7290_ == 0)
{
v___x_7285_ = v___x_7251_;
v_isShared_7286_ = v_isSharedCheck_7290_;
goto v_resetjp_7284_;
}
else
{
lean_inc(v_a_7283_);
lean_dec(v___x_7251_);
v___x_7285_ = lean_box(0);
v_isShared_7286_ = v_isSharedCheck_7290_;
goto v_resetjp_7284_;
}
v_resetjp_7284_:
{
lean_object* v___x_7288_; 
if (v_isShared_7286_ == 0)
{
v___x_7288_ = v___x_7285_;
goto v_reusejp_7287_;
}
else
{
lean_object* v_reuseFailAlloc_7289_; 
v_reuseFailAlloc_7289_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_7289_, 0, v_a_7283_);
v___x_7288_ = v_reuseFailAlloc_7289_;
goto v_reusejp_7287_;
}
v_reusejp_7287_:
{
return v___x_7288_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_DerivingClassView_applyHandlers___lam__1___boxed(lean_object* v_ref_7291_, lean_object* v___x_7292_, lean_object* v_declNames_7293_, lean_object* v_hasExpose_7294_, lean_object* v___y_7295_, lean_object* v___y_7296_, lean_object* v___y_7297_){
_start:
{
uint8_t v_hasExpose_boxed_7298_; lean_object* v_res_7299_; 
v_hasExpose_boxed_7298_ = lean_unbox(v_hasExpose_7294_);
v_res_7299_ = l_Lean_Elab_DerivingClassView_applyHandlers___lam__1(v_ref_7291_, v___x_7292_, v_declNames_7293_, v_hasExpose_boxed_7298_, v___y_7295_, v___y_7296_);
lean_dec(v_ref_7291_);
return v_res_7299_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_DerivingClassView_applyHandlers(lean_object* v_view_7300_, lean_object* v_declNames_7301_, lean_object* v_a_7302_, lean_object* v_a_7303_){
_start:
{
lean_object* v___x_7305_; lean_object* v_env_7306_; lean_object* v_ref_7307_; uint8_t v_hasExpose_7308_; lean_object* v___f_7309_; lean_object* v___x_7310_; lean_object* v___x_7311_; lean_object* v___f_7312_; lean_object* v___x_7313_; 
v___x_7305_ = lean_st_ref_get(v_a_7303_);
v_env_7306_ = lean_ctor_get(v___x_7305_, 0);
lean_inc_ref(v_env_7306_);
lean_dec(v___x_7305_);
v_ref_7307_ = lean_ctor_get(v_view_7300_, 0);
lean_inc(v_ref_7307_);
v_hasExpose_7308_ = lean_ctor_get_uint8(v_view_7300_, sizeof(void*)*2);
lean_inc_ref(v_declNames_7301_);
v___f_7309_ = lean_alloc_closure((void*)(l_Lean_Elab_DerivingClassView_applyHandlers___lam__0___boxed), 3, 2);
lean_closure_set(v___f_7309_, 0, v_declNames_7301_);
lean_closure_set(v___f_7309_, 1, v_env_7306_);
v___x_7310_ = lean_alloc_closure((void*)(l_Lean_Elab_DerivingClassView_getClassName___boxed), 4, 1);
lean_closure_set(v___x_7310_, 0, v_view_7300_);
v___x_7311_ = lean_box(v_hasExpose_7308_);
v___f_7312_ = lean_alloc_closure((void*)(l_Lean_Elab_DerivingClassView_applyHandlers___lam__1___boxed), 7, 4);
lean_closure_set(v___f_7312_, 0, v_ref_7307_);
lean_closure_set(v___f_7312_, 1, v___x_7310_);
lean_closure_set(v___f_7312_, 2, v_declNames_7301_);
lean_closure_set(v___f_7312_, 3, v___x_7311_);
v___x_7313_ = l_Lean_Elab_Command_withScope___redArg(v___f_7309_, v___f_7312_, v_a_7302_, v_a_7303_);
return v___x_7313_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_DerivingClassView_applyHandlers___boxed(lean_object* v_view_7314_, lean_object* v_declNames_7315_, lean_object* v_a_7316_, lean_object* v_a_7317_, lean_object* v_a_7318_){
_start:
{
lean_object* v_res_7319_; 
v_res_7319_ = l_Lean_Elab_DerivingClassView_applyHandlers(v_view_7314_, v_declNames_7315_, v_a_7316_, v_a_7317_);
return v_res_7319_;
}
}
LEAN_EXPORT lean_object* l_List_mapTR_loop___at___00Lean_mkConstWithLevelParams___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__3_spec__4(lean_object* v_a_7320_, lean_object* v_a_7321_){
_start:
{
if (lean_obj_tag(v_a_7320_) == 0)
{
lean_object* v___x_7322_; 
v___x_7322_ = l_List_reverse___redArg(v_a_7321_);
return v___x_7322_;
}
else
{
lean_object* v_head_7323_; lean_object* v_tail_7324_; lean_object* v___x_7326_; uint8_t v_isShared_7327_; uint8_t v_isSharedCheck_7333_; 
v_head_7323_ = lean_ctor_get(v_a_7320_, 0);
v_tail_7324_ = lean_ctor_get(v_a_7320_, 1);
v_isSharedCheck_7333_ = !lean_is_exclusive(v_a_7320_);
if (v_isSharedCheck_7333_ == 0)
{
v___x_7326_ = v_a_7320_;
v_isShared_7327_ = v_isSharedCheck_7333_;
goto v_resetjp_7325_;
}
else
{
lean_inc(v_tail_7324_);
lean_inc(v_head_7323_);
lean_dec(v_a_7320_);
v___x_7326_ = lean_box(0);
v_isShared_7327_ = v_isSharedCheck_7333_;
goto v_resetjp_7325_;
}
v_resetjp_7325_:
{
lean_object* v___x_7328_; lean_object* v___x_7330_; 
v___x_7328_ = l_Lean_mkLevelParam(v_head_7323_);
if (v_isShared_7327_ == 0)
{
lean_ctor_set(v___x_7326_, 1, v_a_7321_);
lean_ctor_set(v___x_7326_, 0, v___x_7328_);
v___x_7330_ = v___x_7326_;
goto v_reusejp_7329_;
}
else
{
lean_object* v_reuseFailAlloc_7332_; 
v_reuseFailAlloc_7332_ = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(v_reuseFailAlloc_7332_, 0, v___x_7328_);
lean_ctor_set(v_reuseFailAlloc_7332_, 1, v_a_7321_);
v___x_7330_ = v_reuseFailAlloc_7332_;
goto v_reusejp_7329_;
}
v_reusejp_7329_:
{
v_a_7320_ = v_tail_7324_;
v_a_7321_ = v___x_7330_;
goto _start;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_getConstVal___at___00Lean_mkConstWithLevelParams___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__3_spec__3(lean_object* v_constName_7334_, lean_object* v___y_7335_, lean_object* v___y_7336_, lean_object* v___y_7337_, lean_object* v___y_7338_, lean_object* v___y_7339_, lean_object* v___y_7340_){
_start:
{
lean_object* v___x_7342_; lean_object* v_env_7343_; uint8_t v___x_7344_; lean_object* v___x_7345_; 
v___x_7342_ = lean_st_ref_get(v___y_7340_);
v_env_7343_ = lean_ctor_get(v___x_7342_, 0);
lean_inc_ref(v_env_7343_);
lean_dec(v___x_7342_);
v___x_7344_ = 0;
lean_inc(v_constName_7334_);
v___x_7345_ = l_Lean_Environment_findConstVal_x3f(v_env_7343_, v_constName_7334_, v___x_7344_);
if (lean_obj_tag(v___x_7345_) == 0)
{
lean_object* v___x_7346_; 
v___x_7346_ = l_Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6___redArg(v_constName_7334_, v___y_7335_, v___y_7336_, v___y_7337_, v___y_7338_, v___y_7339_, v___y_7340_);
return v___x_7346_;
}
else
{
lean_object* v_val_7347_; lean_object* v___x_7349_; uint8_t v_isShared_7350_; uint8_t v_isSharedCheck_7354_; 
lean_dec_ref(v___y_7339_);
lean_dec_ref(v___y_7335_);
lean_dec(v_constName_7334_);
v_val_7347_ = lean_ctor_get(v___x_7345_, 0);
v_isSharedCheck_7354_ = !lean_is_exclusive(v___x_7345_);
if (v_isSharedCheck_7354_ == 0)
{
v___x_7349_ = v___x_7345_;
v_isShared_7350_ = v_isSharedCheck_7354_;
goto v_resetjp_7348_;
}
else
{
lean_inc(v_val_7347_);
lean_dec(v___x_7345_);
v___x_7349_ = lean_box(0);
v_isShared_7350_ = v_isSharedCheck_7354_;
goto v_resetjp_7348_;
}
v_resetjp_7348_:
{
lean_object* v___x_7352_; 
if (v_isShared_7350_ == 0)
{
lean_ctor_set_tag(v___x_7349_, 0);
v___x_7352_ = v___x_7349_;
goto v_reusejp_7351_;
}
else
{
lean_object* v_reuseFailAlloc_7353_; 
v_reuseFailAlloc_7353_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_7353_, 0, v_val_7347_);
v___x_7352_ = v_reuseFailAlloc_7353_;
goto v_reusejp_7351_;
}
v_reusejp_7351_:
{
return v___x_7352_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_getConstVal___at___00Lean_mkConstWithLevelParams___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__3_spec__3___boxed(lean_object* v_constName_7355_, lean_object* v___y_7356_, lean_object* v___y_7357_, lean_object* v___y_7358_, lean_object* v___y_7359_, lean_object* v___y_7360_, lean_object* v___y_7361_, lean_object* v___y_7362_){
_start:
{
lean_object* v_res_7363_; 
v_res_7363_ = l_Lean_getConstVal___at___00Lean_mkConstWithLevelParams___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__3_spec__3(v_constName_7355_, v___y_7356_, v___y_7357_, v___y_7358_, v___y_7359_, v___y_7360_, v___y_7361_);
lean_dec(v___y_7361_);
lean_dec(v___y_7359_);
lean_dec_ref(v___y_7358_);
lean_dec(v___y_7357_);
return v_res_7363_;
}
}
LEAN_EXPORT lean_object* l_Lean_mkConstWithLevelParams___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__3(lean_object* v_constName_7364_, lean_object* v___y_7365_, lean_object* v___y_7366_, lean_object* v___y_7367_, lean_object* v___y_7368_, lean_object* v___y_7369_, lean_object* v___y_7370_){
_start:
{
lean_object* v___x_7372_; 
lean_inc(v_constName_7364_);
v___x_7372_ = l_Lean_getConstVal___at___00Lean_mkConstWithLevelParams___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__3_spec__3(v_constName_7364_, v___y_7365_, v___y_7366_, v___y_7367_, v___y_7368_, v___y_7369_, v___y_7370_);
if (lean_obj_tag(v___x_7372_) == 0)
{
lean_object* v_a_7373_; lean_object* v___x_7375_; uint8_t v_isShared_7376_; uint8_t v_isSharedCheck_7384_; 
v_a_7373_ = lean_ctor_get(v___x_7372_, 0);
v_isSharedCheck_7384_ = !lean_is_exclusive(v___x_7372_);
if (v_isSharedCheck_7384_ == 0)
{
v___x_7375_ = v___x_7372_;
v_isShared_7376_ = v_isSharedCheck_7384_;
goto v_resetjp_7374_;
}
else
{
lean_inc(v_a_7373_);
lean_dec(v___x_7372_);
v___x_7375_ = lean_box(0);
v_isShared_7376_ = v_isSharedCheck_7384_;
goto v_resetjp_7374_;
}
v_resetjp_7374_:
{
lean_object* v_levelParams_7377_; lean_object* v___x_7378_; lean_object* v___x_7379_; lean_object* v___x_7380_; lean_object* v___x_7382_; 
v_levelParams_7377_ = lean_ctor_get(v_a_7373_, 1);
lean_inc(v_levelParams_7377_);
lean_dec(v_a_7373_);
v___x_7378_ = lean_box(0);
v___x_7379_ = l_List_mapTR_loop___at___00Lean_mkConstWithLevelParams___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__3_spec__4(v_levelParams_7377_, v___x_7378_);
v___x_7380_ = l_Lean_mkConst(v_constName_7364_, v___x_7379_);
if (v_isShared_7376_ == 0)
{
lean_ctor_set(v___x_7375_, 0, v___x_7380_);
v___x_7382_ = v___x_7375_;
goto v_reusejp_7381_;
}
else
{
lean_object* v_reuseFailAlloc_7383_; 
v_reuseFailAlloc_7383_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_7383_, 0, v___x_7380_);
v___x_7382_ = v_reuseFailAlloc_7383_;
goto v_reusejp_7381_;
}
v_reusejp_7381_:
{
return v___x_7382_;
}
}
}
else
{
lean_object* v_a_7385_; lean_object* v___x_7387_; uint8_t v_isShared_7388_; uint8_t v_isSharedCheck_7392_; 
lean_dec(v_constName_7364_);
v_a_7385_ = lean_ctor_get(v___x_7372_, 0);
v_isSharedCheck_7392_ = !lean_is_exclusive(v___x_7372_);
if (v_isSharedCheck_7392_ == 0)
{
v___x_7387_ = v___x_7372_;
v_isShared_7388_ = v_isSharedCheck_7392_;
goto v_resetjp_7386_;
}
else
{
lean_inc(v_a_7385_);
lean_dec(v___x_7372_);
v___x_7387_ = lean_box(0);
v_isShared_7388_ = v_isSharedCheck_7392_;
goto v_resetjp_7386_;
}
v_resetjp_7386_:
{
lean_object* v___x_7390_; 
if (v_isShared_7388_ == 0)
{
v___x_7390_ = v___x_7387_;
goto v_reusejp_7389_;
}
else
{
lean_object* v_reuseFailAlloc_7391_; 
v_reuseFailAlloc_7391_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_7391_, 0, v_a_7385_);
v___x_7390_ = v_reuseFailAlloc_7391_;
goto v_reusejp_7389_;
}
v_reusejp_7389_:
{
return v___x_7390_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_mkConstWithLevelParams___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__3___boxed(lean_object* v_constName_7393_, lean_object* v___y_7394_, lean_object* v___y_7395_, lean_object* v___y_7396_, lean_object* v___y_7397_, lean_object* v___y_7398_, lean_object* v___y_7399_, lean_object* v___y_7400_){
_start:
{
lean_object* v_res_7401_; 
v_res_7401_ = l_Lean_mkConstWithLevelParams___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__3(v_constName_7393_, v___y_7394_, v___y_7395_, v___y_7396_, v___y_7397_, v___y_7398_, v___y_7399_);
lean_dec(v___y_7399_);
lean_dec(v___y_7397_);
lean_dec_ref(v___y_7396_);
lean_dec(v___y_7395_);
return v_res_7401_;
}
}
static lean_object* _init_l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4___lam__1___closed__1(void){
_start:
{
lean_object* v___x_7403_; lean_object* v___x_7404_; 
v___x_7403_ = ((lean_object*)(l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4___lam__1___closed__0));
v___x_7404_ = l_Lean_stringToMessageData(v___x_7403_);
return v___x_7404_;
}
}
static lean_object* _init_l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4___lam__1___closed__3(void){
_start:
{
lean_object* v___x_7406_; lean_object* v___x_7407_; 
v___x_7406_ = ((lean_object*)(l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4___lam__1___closed__2));
v___x_7407_ = l_Lean_stringToMessageData(v___x_7406_);
return v___x_7407_;
}
}
static lean_object* _init_l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4___lam__1___closed__4(void){
_start:
{
lean_object* v___x_7408_; lean_object* v___x_7409_; 
v___x_7408_ = lean_obj_once(&l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4___lam__1___closed__3, &l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4___lam__1___closed__3_once, _init_l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4___lam__1___closed__3);
v___x_7409_ = l_Lean_MessageData_note(v___x_7408_);
return v___x_7409_;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4___lam__1(uint8_t v___x_7410_, lean_object* v_a_7411_, lean_object* v___f_7412_, lean_object* v___y_7413_, lean_object* v___y_7414_, lean_object* v___y_7415_, lean_object* v___y_7416_, lean_object* v___y_7417_, lean_object* v___y_7418_){
_start:
{
if (v___x_7410_ == 0)
{
lean_object* v___x_7420_; lean_object* v___x_7421_; 
v___x_7420_ = lean_box(0);
lean_inc(v___y_7418_);
lean_inc_ref(v___y_7417_);
lean_inc(v___y_7416_);
lean_inc_ref(v___y_7415_);
lean_inc(v___y_7414_);
lean_inc_ref(v___y_7413_);
v___x_7421_ = l_Lean_Elab_Term_elabTermAndSynthesize(v_a_7411_, v___x_7420_, v___y_7413_, v___y_7414_, v___y_7415_, v___y_7416_, v___y_7417_, v___y_7418_);
if (lean_obj_tag(v___x_7421_) == 0)
{
lean_object* v_a_7422_; lean_object* v___x_7423_; 
v_a_7422_ = lean_ctor_get(v___x_7421_, 0);
lean_inc(v_a_7422_);
lean_dec_ref(v___x_7421_);
v___x_7423_ = lean_apply_8(v___f_7412_, v_a_7422_, v___y_7413_, v___y_7414_, v___y_7415_, v___y_7416_, v___y_7417_, v___y_7418_, lean_box(0));
return v___x_7423_;
}
else
{
lean_object* v_a_7424_; lean_object* v___x_7426_; uint8_t v_isShared_7427_; uint8_t v_isSharedCheck_7431_; 
lean_dec(v___y_7418_);
lean_dec_ref(v___y_7417_);
lean_dec(v___y_7416_);
lean_dec_ref(v___y_7415_);
lean_dec(v___y_7414_);
lean_dec_ref(v___y_7413_);
lean_dec_ref(v___f_7412_);
v_a_7424_ = lean_ctor_get(v___x_7421_, 0);
v_isSharedCheck_7431_ = !lean_is_exclusive(v___x_7421_);
if (v_isSharedCheck_7431_ == 0)
{
v___x_7426_ = v___x_7421_;
v_isShared_7427_ = v_isSharedCheck_7431_;
goto v_resetjp_7425_;
}
else
{
lean_inc(v_a_7424_);
lean_dec(v___x_7421_);
v___x_7426_ = lean_box(0);
v_isShared_7427_ = v_isSharedCheck_7431_;
goto v_resetjp_7425_;
}
v_resetjp_7425_:
{
lean_object* v___x_7429_; 
if (v_isShared_7427_ == 0)
{
v___x_7429_ = v___x_7426_;
goto v_reusejp_7428_;
}
else
{
lean_object* v_reuseFailAlloc_7430_; 
v_reuseFailAlloc_7430_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_7430_, 0, v_a_7424_);
v___x_7429_ = v_reuseFailAlloc_7430_;
goto v_reusejp_7428_;
}
v_reusejp_7428_:
{
return v___x_7429_;
}
}
}
}
else
{
lean_object* v___x_7432_; 
lean_inc(v___y_7418_);
lean_inc_ref(v___y_7417_);
v___x_7432_ = l_Lean_realizeGlobalConstNoOverload(v_a_7411_, v___y_7417_, v___y_7418_);
if (lean_obj_tag(v___x_7432_) == 0)
{
lean_object* v_a_7433_; lean_object* v___y_7435_; lean_object* v___y_7436_; lean_object* v___y_7437_; lean_object* v___y_7438_; lean_object* v___y_7439_; lean_object* v___y_7440_; lean_object* v___x_7452_; 
v_a_7433_ = lean_ctor_get(v___x_7432_, 0);
lean_inc(v_a_7433_);
lean_dec_ref(v___x_7432_);
lean_inc_ref(v___y_7417_);
lean_inc_ref(v___y_7413_);
lean_inc(v_a_7433_);
v___x_7452_ = l_Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6(v_a_7433_, v___y_7413_, v___y_7414_, v___y_7415_, v___y_7416_, v___y_7417_, v___y_7418_);
if (lean_obj_tag(v___x_7452_) == 0)
{
lean_object* v_a_7453_; uint8_t v___x_7454_; 
v_a_7453_ = lean_ctor_get(v___x_7452_, 0);
lean_inc(v_a_7453_);
lean_dec_ref(v___x_7452_);
v___x_7454_ = l_Lean_ConstantInfo_isDefinition(v_a_7453_);
lean_dec(v_a_7453_);
if (v___x_7454_ == 0)
{
lean_object* v___x_7455_; lean_object* v___x_7456_; lean_object* v___x_7457_; lean_object* v___x_7458_; lean_object* v___x_7459_; lean_object* v___x_7460_; lean_object* v___x_7461_; lean_object* v___x_7462_; 
v___x_7455_ = lean_obj_once(&l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4___lam__1___closed__1, &l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4___lam__1___closed__1_once, _init_l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4___lam__1___closed__1);
lean_inc(v_a_7433_);
v___x_7456_ = l_Lean_MessageData_ofConstName(v_a_7433_, v___x_7454_);
v___x_7457_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_7457_, 0, v___x_7455_);
lean_ctor_set(v___x_7457_, 1, v___x_7456_);
v___x_7458_ = lean_obj_once(&l_Lean_Elab_Term_processDefDeriving___lam__6___closed__17, &l_Lean_Elab_Term_processDefDeriving___lam__6___closed__17_once, _init_l_Lean_Elab_Term_processDefDeriving___lam__6___closed__17);
v___x_7459_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_7459_, 0, v___x_7457_);
lean_ctor_set(v___x_7459_, 1, v___x_7458_);
v___x_7460_ = lean_obj_once(&l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4___lam__1___closed__4, &l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4___lam__1___closed__4_once, _init_l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4___lam__1___closed__4);
v___x_7461_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_7461_, 0, v___x_7459_);
lean_ctor_set(v___x_7461_, 1, v___x_7460_);
lean_inc_ref(v___y_7413_);
v___x_7462_ = l_Lean_throwError___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_spec__4___redArg(v___x_7461_, v___y_7413_, v___y_7414_, v___y_7415_, v___y_7416_, v___y_7417_, v___y_7418_);
if (lean_obj_tag(v___x_7462_) == 0)
{
lean_dec_ref(v___x_7462_);
v___y_7435_ = v___y_7413_;
v___y_7436_ = v___y_7414_;
v___y_7437_ = v___y_7415_;
v___y_7438_ = v___y_7416_;
v___y_7439_ = v___y_7417_;
v___y_7440_ = v___y_7418_;
goto v___jp_7434_;
}
else
{
lean_dec(v_a_7433_);
lean_dec(v___y_7418_);
lean_dec_ref(v___y_7417_);
lean_dec(v___y_7416_);
lean_dec_ref(v___y_7415_);
lean_dec(v___y_7414_);
lean_dec_ref(v___y_7413_);
lean_dec_ref(v___f_7412_);
return v___x_7462_;
}
}
else
{
v___y_7435_ = v___y_7413_;
v___y_7436_ = v___y_7414_;
v___y_7437_ = v___y_7415_;
v___y_7438_ = v___y_7416_;
v___y_7439_ = v___y_7417_;
v___y_7440_ = v___y_7418_;
goto v___jp_7434_;
}
}
else
{
lean_object* v_a_7463_; lean_object* v___x_7465_; uint8_t v_isShared_7466_; uint8_t v_isSharedCheck_7470_; 
lean_dec(v_a_7433_);
lean_dec(v___y_7418_);
lean_dec_ref(v___y_7417_);
lean_dec(v___y_7416_);
lean_dec_ref(v___y_7415_);
lean_dec(v___y_7414_);
lean_dec_ref(v___y_7413_);
lean_dec_ref(v___f_7412_);
v_a_7463_ = lean_ctor_get(v___x_7452_, 0);
v_isSharedCheck_7470_ = !lean_is_exclusive(v___x_7452_);
if (v_isSharedCheck_7470_ == 0)
{
v___x_7465_ = v___x_7452_;
v_isShared_7466_ = v_isSharedCheck_7470_;
goto v_resetjp_7464_;
}
else
{
lean_inc(v_a_7463_);
lean_dec(v___x_7452_);
v___x_7465_ = lean_box(0);
v_isShared_7466_ = v_isSharedCheck_7470_;
goto v_resetjp_7464_;
}
v_resetjp_7464_:
{
lean_object* v___x_7468_; 
if (v_isShared_7466_ == 0)
{
v___x_7468_ = v___x_7465_;
goto v_reusejp_7467_;
}
else
{
lean_object* v_reuseFailAlloc_7469_; 
v_reuseFailAlloc_7469_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_7469_, 0, v_a_7463_);
v___x_7468_ = v_reuseFailAlloc_7469_;
goto v_reusejp_7467_;
}
v_reusejp_7467_:
{
return v___x_7468_;
}
}
}
v___jp_7434_:
{
lean_object* v___x_7441_; 
lean_inc_ref(v___y_7439_);
lean_inc_ref(v___y_7435_);
v___x_7441_ = l_Lean_mkConstWithLevelParams___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__3(v_a_7433_, v___y_7435_, v___y_7436_, v___y_7437_, v___y_7438_, v___y_7439_, v___y_7440_);
if (lean_obj_tag(v___x_7441_) == 0)
{
lean_object* v_a_7442_; lean_object* v___x_7443_; 
v_a_7442_ = lean_ctor_get(v___x_7441_, 0);
lean_inc(v_a_7442_);
lean_dec_ref(v___x_7441_);
v___x_7443_ = lean_apply_8(v___f_7412_, v_a_7442_, v___y_7435_, v___y_7436_, v___y_7437_, v___y_7438_, v___y_7439_, v___y_7440_, lean_box(0));
return v___x_7443_;
}
else
{
lean_object* v_a_7444_; lean_object* v___x_7446_; uint8_t v_isShared_7447_; uint8_t v_isSharedCheck_7451_; 
lean_dec(v___y_7440_);
lean_dec_ref(v___y_7439_);
lean_dec(v___y_7438_);
lean_dec_ref(v___y_7437_);
lean_dec(v___y_7436_);
lean_dec_ref(v___y_7435_);
lean_dec_ref(v___f_7412_);
v_a_7444_ = lean_ctor_get(v___x_7441_, 0);
v_isSharedCheck_7451_ = !lean_is_exclusive(v___x_7441_);
if (v_isSharedCheck_7451_ == 0)
{
v___x_7446_ = v___x_7441_;
v_isShared_7447_ = v_isSharedCheck_7451_;
goto v_resetjp_7445_;
}
else
{
lean_inc(v_a_7444_);
lean_dec(v___x_7441_);
v___x_7446_ = lean_box(0);
v_isShared_7447_ = v_isSharedCheck_7451_;
goto v_resetjp_7445_;
}
v_resetjp_7445_:
{
lean_object* v___x_7449_; 
if (v_isShared_7447_ == 0)
{
v___x_7449_ = v___x_7446_;
goto v_reusejp_7448_;
}
else
{
lean_object* v_reuseFailAlloc_7450_; 
v_reuseFailAlloc_7450_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_7450_, 0, v_a_7444_);
v___x_7449_ = v_reuseFailAlloc_7450_;
goto v_reusejp_7448_;
}
v_reusejp_7448_:
{
return v___x_7449_;
}
}
}
}
}
else
{
lean_object* v_a_7471_; lean_object* v___x_7473_; uint8_t v_isShared_7474_; uint8_t v_isSharedCheck_7478_; 
lean_dec(v___y_7418_);
lean_dec_ref(v___y_7417_);
lean_dec(v___y_7416_);
lean_dec_ref(v___y_7415_);
lean_dec(v___y_7414_);
lean_dec_ref(v___y_7413_);
lean_dec_ref(v___f_7412_);
v_a_7471_ = lean_ctor_get(v___x_7432_, 0);
v_isSharedCheck_7478_ = !lean_is_exclusive(v___x_7432_);
if (v_isSharedCheck_7478_ == 0)
{
v___x_7473_ = v___x_7432_;
v_isShared_7474_ = v_isSharedCheck_7478_;
goto v_resetjp_7472_;
}
else
{
lean_inc(v_a_7471_);
lean_dec(v___x_7432_);
v___x_7473_ = lean_box(0);
v_isShared_7474_ = v_isSharedCheck_7478_;
goto v_resetjp_7472_;
}
v_resetjp_7472_:
{
lean_object* v___x_7476_; 
if (v_isShared_7474_ == 0)
{
v___x_7476_ = v___x_7473_;
goto v_reusejp_7475_;
}
else
{
lean_object* v_reuseFailAlloc_7477_; 
v_reuseFailAlloc_7477_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_7477_, 0, v_a_7471_);
v___x_7476_ = v_reuseFailAlloc_7477_;
goto v_reusejp_7475_;
}
v_reusejp_7475_:
{
return v___x_7476_;
}
}
}
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4___lam__1___boxed(lean_object* v___x_7479_, lean_object* v_a_7480_, lean_object* v___f_7481_, lean_object* v___y_7482_, lean_object* v___y_7483_, lean_object* v___y_7484_, lean_object* v___y_7485_, lean_object* v___y_7486_, lean_object* v___y_7487_, lean_object* v___y_7488_){
_start:
{
uint8_t v___x_11393__boxed_7489_; lean_object* v_res_7490_; 
v___x_11393__boxed_7489_ = lean_unbox(v___x_7479_);
v_res_7490_ = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4___lam__1(v___x_11393__boxed_7489_, v_a_7480_, v___f_7481_, v___y_7482_, v___y_7483_, v___y_7484_, v___y_7485_, v___y_7486_, v___y_7487_);
return v_res_7490_;
}
}
static lean_object* _init_l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__2___lam__0___closed__1(void){
_start:
{
lean_object* v___x_7492_; lean_object* v___x_7493_; 
v___x_7492_ = ((lean_object*)(l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__2___lam__0___closed__0));
v___x_7493_ = l_Lean_stringToMessageData(v___x_7492_);
return v___x_7493_;
}
}
static lean_object* _init_l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__2___lam__0___closed__3(void){
_start:
{
lean_object* v___x_7495_; lean_object* v___x_7496_; 
v___x_7495_ = ((lean_object*)(l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__2___lam__0___closed__2));
v___x_7496_ = l_Lean_stringToMessageData(v___x_7495_);
return v___x_7496_;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__2___lam__0(lean_object* v_a_7497_, lean_object* v_declExpr_7498_, lean_object* v_x_7499_, lean_object* v___y_7500_, lean_object* v___y_7501_, lean_object* v___y_7502_, lean_object* v___y_7503_, lean_object* v___y_7504_, lean_object* v___y_7505_){
_start:
{
lean_object* v_cls_7507_; lean_object* v___x_7508_; lean_object* v___x_7509_; lean_object* v___x_7510_; lean_object* v___x_7511_; lean_object* v___x_7512_; lean_object* v___x_7513_; lean_object* v___x_7514_; lean_object* v___x_7515_; lean_object* v___x_7516_; lean_object* v___x_7517_; 
v_cls_7507_ = lean_ctor_get(v_a_7497_, 1);
lean_inc(v_cls_7507_);
lean_dec_ref(v_a_7497_);
v___x_7508_ = lean_obj_once(&l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__2___lam__0___closed__1, &l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__2___lam__0___closed__1_once, _init_l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__2___lam__0___closed__1);
v___x_7509_ = l_Lean_MessageData_ofSyntax(v_cls_7507_);
v___x_7510_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_7510_, 0, v___x_7508_);
lean_ctor_set(v___x_7510_, 1, v___x_7509_);
v___x_7511_ = lean_obj_once(&l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__2___lam__0___closed__3, &l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__2___lam__0___closed__3_once, _init_l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__2___lam__0___closed__3);
v___x_7512_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_7512_, 0, v___x_7510_);
lean_ctor_set(v___x_7512_, 1, v___x_7511_);
v___x_7513_ = l_Lean_MessageData_ofExpr(v_declExpr_7498_);
v___x_7514_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_7514_, 0, v___x_7512_);
lean_ctor_set(v___x_7514_, 1, v___x_7513_);
v___x_7515_ = lean_obj_once(&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__5, &l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__5_once, _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__5);
v___x_7516_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_7516_, 0, v___x_7514_);
lean_ctor_set(v___x_7516_, 1, v___x_7515_);
v___x_7517_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_7517_, 0, v___x_7516_);
return v___x_7517_;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__2___lam__0___boxed(lean_object* v_a_7518_, lean_object* v_declExpr_7519_, lean_object* v_x_7520_, lean_object* v___y_7521_, lean_object* v___y_7522_, lean_object* v___y_7523_, lean_object* v___y_7524_, lean_object* v___y_7525_, lean_object* v___y_7526_, lean_object* v___y_7527_){
_start:
{
lean_object* v_res_7528_; 
v_res_7528_ = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__2___lam__0(v_a_7518_, v_declExpr_7519_, v_x_7520_, v___y_7521_, v___y_7522_, v___y_7523_, v___y_7524_, v___y_7525_, v___y_7526_);
lean_dec(v___y_7526_);
lean_dec_ref(v___y_7525_);
lean_dec(v___y_7524_);
lean_dec_ref(v___y_7523_);
lean_dec(v___y_7522_);
lean_dec_ref(v___y_7521_);
lean_dec_ref(v_x_7520_);
return v_res_7528_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__0(lean_object* v_cls_7529_, uint8_t v_collapsed_7530_, lean_object* v_tag_7531_, lean_object* v_opts_7532_, uint8_t v_clsEnabled_7533_, lean_object* v_oldTraces_7534_, lean_object* v_msg_7535_, lean_object* v_resStartStop_7536_, lean_object* v___y_7537_, lean_object* v___y_7538_, lean_object* v___y_7539_, lean_object* v___y_7540_, lean_object* v___y_7541_, lean_object* v___y_7542_){
_start:
{
lean_object* v_fst_7544_; lean_object* v_snd_7545_; lean_object* v___x_7547_; uint8_t v_isShared_7548_; uint8_t v_isSharedCheck_7635_; 
v_fst_7544_ = lean_ctor_get(v_resStartStop_7536_, 0);
v_snd_7545_ = lean_ctor_get(v_resStartStop_7536_, 1);
v_isSharedCheck_7635_ = !lean_is_exclusive(v_resStartStop_7536_);
if (v_isSharedCheck_7635_ == 0)
{
v___x_7547_ = v_resStartStop_7536_;
v_isShared_7548_ = v_isSharedCheck_7635_;
goto v_resetjp_7546_;
}
else
{
lean_inc(v_snd_7545_);
lean_inc(v_fst_7544_);
lean_dec(v_resStartStop_7536_);
v___x_7547_ = lean_box(0);
v_isShared_7548_ = v_isSharedCheck_7635_;
goto v_resetjp_7546_;
}
v_resetjp_7546_:
{
lean_object* v___y_7550_; lean_object* v___y_7551_; lean_object* v_data_7552_; lean_object* v_fst_7555_; lean_object* v_snd_7556_; lean_object* v___x_7558_; uint8_t v_isShared_7559_; uint8_t v_isSharedCheck_7634_; 
v_fst_7555_ = lean_ctor_get(v_snd_7545_, 0);
v_snd_7556_ = lean_ctor_get(v_snd_7545_, 1);
v_isSharedCheck_7634_ = !lean_is_exclusive(v_snd_7545_);
if (v_isSharedCheck_7634_ == 0)
{
v___x_7558_ = v_snd_7545_;
v_isShared_7559_ = v_isSharedCheck_7634_;
goto v_resetjp_7557_;
}
else
{
lean_inc(v_snd_7556_);
lean_inc(v_fst_7555_);
lean_dec(v_snd_7545_);
v___x_7558_ = lean_box(0);
v_isShared_7559_ = v_isSharedCheck_7634_;
goto v_resetjp_7557_;
}
v___jp_7549_:
{
lean_object* v___x_7553_; 
v___x_7553_ = l___private_Lean_Util_Trace_0__Lean_addTraceNode___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__11___redArg(v_oldTraces_7534_, v_data_7552_, v___y_7551_, v___y_7550_, v___y_7539_, v___y_7540_, v___y_7541_, v___y_7542_);
lean_dec(v___y_7542_);
lean_dec(v___y_7540_);
lean_dec_ref(v___y_7539_);
if (lean_obj_tag(v___x_7553_) == 0)
{
lean_object* v___x_7554_; 
lean_dec_ref(v___x_7553_);
v___x_7554_ = l_MonadExcept_ofExcept___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__12___redArg(v_fst_7544_);
return v___x_7554_;
}
else
{
lean_dec(v_fst_7544_);
return v___x_7553_;
}
}
v_resetjp_7557_:
{
lean_object* v___x_7560_; uint8_t v___x_7561_; lean_object* v___y_7563_; lean_object* v_a_7564_; uint8_t v___y_7588_; double v___y_7619_; 
v___x_7560_ = l_Lean_trace_profiler;
v___x_7561_ = l_Lean_Option_get___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__7(v_opts_7532_, v___x_7560_);
if (v___x_7561_ == 0)
{
v___y_7588_ = v___x_7561_;
goto v___jp_7587_;
}
else
{
lean_object* v___x_7624_; uint8_t v___x_7625_; 
v___x_7624_ = l_Lean_trace_profiler_useHeartbeats;
v___x_7625_ = l_Lean_Option_get___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__7(v_opts_7532_, v___x_7624_);
if (v___x_7625_ == 0)
{
lean_object* v___x_7626_; lean_object* v___x_7627_; double v___x_7628_; double v___x_7629_; double v___x_7630_; 
v___x_7626_ = l_Lean_trace_profiler_threshold;
v___x_7627_ = l_Lean_Option_get___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__13(v_opts_7532_, v___x_7626_);
v___x_7628_ = lean_float_of_nat(v___x_7627_);
v___x_7629_ = lean_float_once(&l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__4, &l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__4_once, _init_l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__4);
v___x_7630_ = lean_float_div(v___x_7628_, v___x_7629_);
v___y_7619_ = v___x_7630_;
goto v___jp_7618_;
}
else
{
lean_object* v___x_7631_; lean_object* v___x_7632_; double v___x_7633_; 
v___x_7631_ = l_Lean_trace_profiler_threshold;
v___x_7632_ = l_Lean_Option_get___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__13(v_opts_7532_, v___x_7631_);
v___x_7633_ = lean_float_of_nat(v___x_7632_);
v___y_7619_ = v___x_7633_;
goto v___jp_7618_;
}
}
v___jp_7562_:
{
uint8_t v_result_7565_; lean_object* v___x_7566_; lean_object* v___x_7567_; lean_object* v___x_7568_; lean_object* v___x_7570_; 
v_result_7565_ = l_Except_toTraceResult___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00Lean_Elab_applyDerivingHandlers_spec__7_spec__9(v_fst_7544_);
v___x_7566_ = l_Lean_TraceResult_toEmoji(v_result_7565_);
v___x_7567_ = l_Lean_stringToMessageData(v___x_7566_);
v___x_7568_ = lean_obj_once(&l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__1, &l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__1_once, _init_l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__1);
if (v_isShared_7559_ == 0)
{
lean_ctor_set_tag(v___x_7558_, 7);
lean_ctor_set(v___x_7558_, 1, v___x_7568_);
lean_ctor_set(v___x_7558_, 0, v___x_7567_);
v___x_7570_ = v___x_7558_;
goto v_reusejp_7569_;
}
else
{
lean_object* v_reuseFailAlloc_7581_; 
v_reuseFailAlloc_7581_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v_reuseFailAlloc_7581_, 0, v___x_7567_);
lean_ctor_set(v_reuseFailAlloc_7581_, 1, v___x_7568_);
v___x_7570_ = v_reuseFailAlloc_7581_;
goto v_reusejp_7569_;
}
v_reusejp_7569_:
{
lean_object* v_m_7572_; 
if (v_isShared_7548_ == 0)
{
lean_ctor_set_tag(v___x_7547_, 7);
lean_ctor_set(v___x_7547_, 1, v_a_7564_);
lean_ctor_set(v___x_7547_, 0, v___x_7570_);
v_m_7572_ = v___x_7547_;
goto v_reusejp_7571_;
}
else
{
lean_object* v_reuseFailAlloc_7580_; 
v_reuseFailAlloc_7580_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v_reuseFailAlloc_7580_, 0, v___x_7570_);
lean_ctor_set(v_reuseFailAlloc_7580_, 1, v_a_7564_);
v_m_7572_ = v_reuseFailAlloc_7580_;
goto v_reusejp_7571_;
}
v_reusejp_7571_:
{
lean_object* v___x_7573_; lean_object* v___x_7574_; double v___x_7575_; lean_object* v_data_7576_; 
v___x_7573_ = lean_box(v_result_7565_);
v___x_7574_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_7574_, 0, v___x_7573_);
v___x_7575_ = lean_float_once(&l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg___closed__0, &l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg___closed__0_once, _init_l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg___closed__0);
lean_inc_ref(v_tag_7531_);
lean_inc_ref(v___x_7574_);
lean_inc(v_cls_7529_);
v_data_7576_ = lean_alloc_ctor(0, 3, 17);
lean_ctor_set(v_data_7576_, 0, v_cls_7529_);
lean_ctor_set(v_data_7576_, 1, v___x_7574_);
lean_ctor_set(v_data_7576_, 2, v_tag_7531_);
lean_ctor_set_float(v_data_7576_, sizeof(void*)*3, v___x_7575_);
lean_ctor_set_float(v_data_7576_, sizeof(void*)*3 + 8, v___x_7575_);
lean_ctor_set_uint8(v_data_7576_, sizeof(void*)*3 + 16, v_collapsed_7530_);
if (v___x_7561_ == 0)
{
lean_dec_ref(v___x_7574_);
lean_dec(v_snd_7556_);
lean_dec(v_fst_7555_);
lean_dec_ref(v_tag_7531_);
lean_dec(v_cls_7529_);
v___y_7550_ = v_m_7572_;
v___y_7551_ = v___y_7563_;
v_data_7552_ = v_data_7576_;
goto v___jp_7549_;
}
else
{
lean_object* v_data_7577_; double v___x_7578_; double v___x_7579_; 
lean_dec_ref(v_data_7576_);
v_data_7577_ = lean_alloc_ctor(0, 3, 17);
lean_ctor_set(v_data_7577_, 0, v_cls_7529_);
lean_ctor_set(v_data_7577_, 1, v___x_7574_);
lean_ctor_set(v_data_7577_, 2, v_tag_7531_);
v___x_7578_ = lean_unbox_float(v_fst_7555_);
lean_dec(v_fst_7555_);
lean_ctor_set_float(v_data_7577_, sizeof(void*)*3, v___x_7578_);
v___x_7579_ = lean_unbox_float(v_snd_7556_);
lean_dec(v_snd_7556_);
lean_ctor_set_float(v_data_7577_, sizeof(void*)*3 + 8, v___x_7579_);
lean_ctor_set_uint8(v_data_7577_, sizeof(void*)*3 + 16, v_collapsed_7530_);
v___y_7550_ = v_m_7572_;
v___y_7551_ = v___y_7563_;
v_data_7552_ = v_data_7577_;
goto v___jp_7549_;
}
}
}
}
v___jp_7582_:
{
lean_object* v_ref_7583_; lean_object* v___x_7584_; 
v_ref_7583_ = lean_ctor_get(v___y_7541_, 5);
lean_inc(v___y_7542_);
lean_inc_ref(v___y_7541_);
lean_inc(v___y_7540_);
lean_inc_ref(v___y_7539_);
lean_inc(v_fst_7544_);
v___x_7584_ = lean_apply_8(v_msg_7535_, v_fst_7544_, v___y_7537_, v___y_7538_, v___y_7539_, v___y_7540_, v___y_7541_, v___y_7542_, lean_box(0));
if (lean_obj_tag(v___x_7584_) == 0)
{
lean_object* v_a_7585_; 
v_a_7585_ = lean_ctor_get(v___x_7584_, 0);
lean_inc(v_a_7585_);
lean_dec_ref(v___x_7584_);
lean_inc(v_ref_7583_);
v___y_7563_ = v_ref_7583_;
v_a_7564_ = v_a_7585_;
goto v___jp_7562_;
}
else
{
lean_object* v___x_7586_; 
lean_dec_ref(v___x_7584_);
v___x_7586_ = lean_obj_once(&l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__3, &l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__3_once, _init_l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8___closed__3);
lean_inc(v_ref_7583_);
v___y_7563_ = v_ref_7583_;
v_a_7564_ = v___x_7586_;
goto v___jp_7562_;
}
}
v___jp_7587_:
{
if (v_clsEnabled_7533_ == 0)
{
if (v___y_7588_ == 0)
{
lean_object* v___x_7589_; lean_object* v_traceState_7590_; lean_object* v_env_7591_; lean_object* v_nextMacroScope_7592_; lean_object* v_ngen_7593_; lean_object* v_auxDeclNGen_7594_; lean_object* v_cache_7595_; lean_object* v_messages_7596_; lean_object* v_infoState_7597_; lean_object* v_snapshotTasks_7598_; lean_object* v___x_7600_; uint8_t v_isShared_7601_; uint8_t v_isSharedCheck_7617_; 
lean_del_object(v___x_7558_);
lean_dec(v_snd_7556_);
lean_dec(v_fst_7555_);
lean_del_object(v___x_7547_);
lean_dec_ref(v___y_7541_);
lean_dec(v___y_7540_);
lean_dec_ref(v___y_7539_);
lean_dec(v___y_7538_);
lean_dec_ref(v___y_7537_);
lean_dec_ref(v_msg_7535_);
lean_dec_ref(v_tag_7531_);
lean_dec(v_cls_7529_);
v___x_7589_ = lean_st_ref_take(v___y_7542_);
v_traceState_7590_ = lean_ctor_get(v___x_7589_, 4);
v_env_7591_ = lean_ctor_get(v___x_7589_, 0);
v_nextMacroScope_7592_ = lean_ctor_get(v___x_7589_, 1);
v_ngen_7593_ = lean_ctor_get(v___x_7589_, 2);
v_auxDeclNGen_7594_ = lean_ctor_get(v___x_7589_, 3);
v_cache_7595_ = lean_ctor_get(v___x_7589_, 5);
v_messages_7596_ = lean_ctor_get(v___x_7589_, 6);
v_infoState_7597_ = lean_ctor_get(v___x_7589_, 7);
v_snapshotTasks_7598_ = lean_ctor_get(v___x_7589_, 8);
v_isSharedCheck_7617_ = !lean_is_exclusive(v___x_7589_);
if (v_isSharedCheck_7617_ == 0)
{
v___x_7600_ = v___x_7589_;
v_isShared_7601_ = v_isSharedCheck_7617_;
goto v_resetjp_7599_;
}
else
{
lean_inc(v_snapshotTasks_7598_);
lean_inc(v_infoState_7597_);
lean_inc(v_messages_7596_);
lean_inc(v_cache_7595_);
lean_inc(v_traceState_7590_);
lean_inc(v_auxDeclNGen_7594_);
lean_inc(v_ngen_7593_);
lean_inc(v_nextMacroScope_7592_);
lean_inc(v_env_7591_);
lean_dec(v___x_7589_);
v___x_7600_ = lean_box(0);
v_isShared_7601_ = v_isSharedCheck_7617_;
goto v_resetjp_7599_;
}
v_resetjp_7599_:
{
uint64_t v_tid_7602_; lean_object* v_traces_7603_; lean_object* v___x_7605_; uint8_t v_isShared_7606_; uint8_t v_isSharedCheck_7616_; 
v_tid_7602_ = lean_ctor_get_uint64(v_traceState_7590_, sizeof(void*)*1);
v_traces_7603_ = lean_ctor_get(v_traceState_7590_, 0);
v_isSharedCheck_7616_ = !lean_is_exclusive(v_traceState_7590_);
if (v_isSharedCheck_7616_ == 0)
{
v___x_7605_ = v_traceState_7590_;
v_isShared_7606_ = v_isSharedCheck_7616_;
goto v_resetjp_7604_;
}
else
{
lean_inc(v_traces_7603_);
lean_dec(v_traceState_7590_);
v___x_7605_ = lean_box(0);
v_isShared_7606_ = v_isSharedCheck_7616_;
goto v_resetjp_7604_;
}
v_resetjp_7604_:
{
lean_object* v___x_7607_; lean_object* v___x_7609_; 
v___x_7607_ = l_Lean_PersistentArray_append___redArg(v_oldTraces_7534_, v_traces_7603_);
lean_dec_ref(v_traces_7603_);
if (v_isShared_7606_ == 0)
{
lean_ctor_set(v___x_7605_, 0, v___x_7607_);
v___x_7609_ = v___x_7605_;
goto v_reusejp_7608_;
}
else
{
lean_object* v_reuseFailAlloc_7615_; 
v_reuseFailAlloc_7615_ = lean_alloc_ctor(0, 1, 8);
lean_ctor_set(v_reuseFailAlloc_7615_, 0, v___x_7607_);
lean_ctor_set_uint64(v_reuseFailAlloc_7615_, sizeof(void*)*1, v_tid_7602_);
v___x_7609_ = v_reuseFailAlloc_7615_;
goto v_reusejp_7608_;
}
v_reusejp_7608_:
{
lean_object* v___x_7611_; 
if (v_isShared_7601_ == 0)
{
lean_ctor_set(v___x_7600_, 4, v___x_7609_);
v___x_7611_ = v___x_7600_;
goto v_reusejp_7610_;
}
else
{
lean_object* v_reuseFailAlloc_7614_; 
v_reuseFailAlloc_7614_ = lean_alloc_ctor(0, 9, 0);
lean_ctor_set(v_reuseFailAlloc_7614_, 0, v_env_7591_);
lean_ctor_set(v_reuseFailAlloc_7614_, 1, v_nextMacroScope_7592_);
lean_ctor_set(v_reuseFailAlloc_7614_, 2, v_ngen_7593_);
lean_ctor_set(v_reuseFailAlloc_7614_, 3, v_auxDeclNGen_7594_);
lean_ctor_set(v_reuseFailAlloc_7614_, 4, v___x_7609_);
lean_ctor_set(v_reuseFailAlloc_7614_, 5, v_cache_7595_);
lean_ctor_set(v_reuseFailAlloc_7614_, 6, v_messages_7596_);
lean_ctor_set(v_reuseFailAlloc_7614_, 7, v_infoState_7597_);
lean_ctor_set(v_reuseFailAlloc_7614_, 8, v_snapshotTasks_7598_);
v___x_7611_ = v_reuseFailAlloc_7614_;
goto v_reusejp_7610_;
}
v_reusejp_7610_:
{
lean_object* v___x_7612_; lean_object* v___x_7613_; 
v___x_7612_ = lean_st_ref_set(v___y_7542_, v___x_7611_);
lean_dec(v___y_7542_);
v___x_7613_ = l_MonadExcept_ofExcept___at___00__private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__8_spec__12___redArg(v_fst_7544_);
return v___x_7613_;
}
}
}
}
}
else
{
goto v___jp_7582_;
}
}
else
{
goto v___jp_7582_;
}
}
v___jp_7618_:
{
double v___x_7620_; double v___x_7621_; double v___x_7622_; uint8_t v___x_7623_; 
v___x_7620_ = lean_unbox_float(v_snd_7556_);
v___x_7621_ = lean_unbox_float(v_fst_7555_);
v___x_7622_ = lean_float_sub(v___x_7620_, v___x_7621_);
v___x_7623_ = lean_float_decLt(v___y_7619_, v___x_7622_);
v___y_7588_ = v___x_7623_;
goto v___jp_7587_;
}
}
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__0___boxed(lean_object* v_cls_7636_, lean_object* v_collapsed_7637_, lean_object* v_tag_7638_, lean_object* v_opts_7639_, lean_object* v_clsEnabled_7640_, lean_object* v_oldTraces_7641_, lean_object* v_msg_7642_, lean_object* v_resStartStop_7643_, lean_object* v___y_7644_, lean_object* v___y_7645_, lean_object* v___y_7646_, lean_object* v___y_7647_, lean_object* v___y_7648_, lean_object* v___y_7649_, lean_object* v___y_7650_){
_start:
{
uint8_t v_collapsed_boxed_7651_; uint8_t v_clsEnabled_boxed_7652_; lean_object* v_res_7653_; 
v_collapsed_boxed_7651_ = lean_unbox(v_collapsed_7637_);
v_clsEnabled_boxed_7652_ = lean_unbox(v_clsEnabled_7640_);
v_res_7653_ = l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__0(v_cls_7636_, v_collapsed_boxed_7651_, v_tag_7638_, v_opts_7639_, v_clsEnabled_boxed_7652_, v_oldTraces_7641_, v_msg_7642_, v_resStartStop_7643_, v___y_7644_, v___y_7645_, v___y_7646_, v___y_7647_, v___y_7648_, v___y_7649_);
lean_dec_ref(v_opts_7639_);
return v_res_7653_;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__2___lam__1(lean_object* v_a_7654_, lean_object* v_declExpr_7655_, uint8_t v_isNoncomputable_7656_, lean_object* v_cmdRef_x3f_7657_, lean_object* v___x_7658_, uint8_t v___x_7659_, lean_object* v___x_7660_, lean_object* v___f_7661_, lean_object* v___y_7662_, lean_object* v___y_7663_, lean_object* v___y_7664_, lean_object* v___y_7665_, lean_object* v___y_7666_, lean_object* v___y_7667_){
_start:
{
lean_object* v_options_7669_; uint8_t v_hasTrace_7670_; 
v_options_7669_ = lean_ctor_get(v___y_7666_, 2);
v_hasTrace_7670_ = lean_ctor_get_uint8(v_options_7669_, sizeof(void*)*1);
if (v_hasTrace_7670_ == 0)
{
lean_object* v___x_7671_; 
lean_dec_ref(v___f_7661_);
lean_dec_ref(v___x_7660_);
lean_dec(v___x_7658_);
v___x_7671_ = l_Lean_Elab_Term_processDefDeriving(v_a_7654_, v_declExpr_7655_, v_isNoncomputable_7656_, v_cmdRef_x3f_7657_, v___y_7662_, v___y_7663_, v___y_7664_, v___y_7665_, v___y_7666_, v___y_7667_);
return v___x_7671_;
}
else
{
lean_object* v___x_7672_; 
lean_inc(v___x_7658_);
v___x_7672_ = l_Lean_isTracingEnabledFor___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__2___redArg(v___x_7658_, v___y_7666_);
if (lean_obj_tag(v___x_7672_) == 0)
{
lean_object* v_a_7673_; lean_object* v___y_7675_; lean_object* v___y_7676_; lean_object* v_a_7677_; lean_object* v___y_7691_; lean_object* v___y_7692_; lean_object* v_a_7693_; uint8_t v___x_7752_; 
v_a_7673_ = lean_ctor_get(v___x_7672_, 0);
lean_inc(v_a_7673_);
lean_dec_ref(v___x_7672_);
v___x_7752_ = lean_unbox(v_a_7673_);
if (v___x_7752_ == 0)
{
lean_object* v___x_7753_; uint8_t v___x_7754_; 
v___x_7753_ = l_Lean_trace_profiler;
v___x_7754_ = l_Lean_Option_get___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__7(v_options_7669_, v___x_7753_);
if (v___x_7754_ == 0)
{
lean_object* v___x_7755_; 
lean_dec(v_a_7673_);
lean_dec_ref(v___f_7661_);
lean_dec_ref(v___x_7660_);
lean_dec(v___x_7658_);
v___x_7755_ = l_Lean_Elab_Term_processDefDeriving(v_a_7654_, v_declExpr_7655_, v_isNoncomputable_7656_, v_cmdRef_x3f_7657_, v___y_7662_, v___y_7663_, v___y_7664_, v___y_7665_, v___y_7666_, v___y_7667_);
return v___x_7755_;
}
else
{
lean_inc_ref(v_options_7669_);
goto v___jp_7703_;
}
}
else
{
lean_inc_ref(v_options_7669_);
goto v___jp_7703_;
}
v___jp_7674_:
{
lean_object* v___x_7678_; double v___x_7679_; double v___x_7680_; double v___x_7681_; double v___x_7682_; double v___x_7683_; lean_object* v___x_7684_; lean_object* v___x_7685_; lean_object* v___x_7686_; lean_object* v___x_7687_; uint8_t v___x_7688_; lean_object* v___x_7689_; 
v___x_7678_ = lean_io_mono_nanos_now();
v___x_7679_ = lean_float_of_nat(v___y_7675_);
v___x_7680_ = lean_float_once(&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__7, &l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__7_once, _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go___closed__7);
v___x_7681_ = lean_float_div(v___x_7679_, v___x_7680_);
v___x_7682_ = lean_float_of_nat(v___x_7678_);
v___x_7683_ = lean_float_div(v___x_7682_, v___x_7680_);
v___x_7684_ = lean_box_float(v___x_7681_);
v___x_7685_ = lean_box_float(v___x_7683_);
v___x_7686_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_7686_, 0, v___x_7684_);
lean_ctor_set(v___x_7686_, 1, v___x_7685_);
v___x_7687_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_7687_, 0, v_a_7677_);
lean_ctor_set(v___x_7687_, 1, v___x_7686_);
v___x_7688_ = lean_unbox(v_a_7673_);
lean_dec(v_a_7673_);
v___x_7689_ = l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__0(v___x_7658_, v___x_7659_, v___x_7660_, v_options_7669_, v___x_7688_, v___y_7676_, v___f_7661_, v___x_7687_, v___y_7662_, v___y_7663_, v___y_7664_, v___y_7665_, v___y_7666_, v___y_7667_);
lean_dec_ref(v_options_7669_);
return v___x_7689_;
}
v___jp_7690_:
{
lean_object* v___x_7694_; double v___x_7695_; double v___x_7696_; lean_object* v___x_7697_; lean_object* v___x_7698_; lean_object* v___x_7699_; lean_object* v___x_7700_; uint8_t v___x_7701_; lean_object* v___x_7702_; 
v___x_7694_ = lean_io_get_num_heartbeats();
v___x_7695_ = lean_float_of_nat(v___y_7691_);
v___x_7696_ = lean_float_of_nat(v___x_7694_);
v___x_7697_ = lean_box_float(v___x_7695_);
v___x_7698_ = lean_box_float(v___x_7696_);
v___x_7699_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_7699_, 0, v___x_7697_);
lean_ctor_set(v___x_7699_, 1, v___x_7698_);
v___x_7700_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_7700_, 0, v_a_7693_);
lean_ctor_set(v___x_7700_, 1, v___x_7699_);
v___x_7701_ = lean_unbox(v_a_7673_);
lean_dec(v_a_7673_);
v___x_7702_ = l___private_Lean_Util_Trace_0__Lean_withTraceNode_postCallback___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__0(v___x_7658_, v___x_7659_, v___x_7660_, v_options_7669_, v___x_7701_, v___y_7692_, v___f_7661_, v___x_7700_, v___y_7662_, v___y_7663_, v___y_7664_, v___y_7665_, v___y_7666_, v___y_7667_);
lean_dec_ref(v_options_7669_);
return v___x_7702_;
}
v___jp_7703_:
{
lean_object* v___x_7704_; 
v___x_7704_ = l___private_Lean_Util_Trace_0__Lean_getResetTraces___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__6___redArg(v___y_7667_);
if (lean_obj_tag(v___x_7704_) == 0)
{
lean_object* v_a_7705_; lean_object* v___x_7706_; uint8_t v___x_7707_; 
v_a_7705_ = lean_ctor_get(v___x_7704_, 0);
lean_inc(v_a_7705_);
lean_dec_ref(v___x_7704_);
v___x_7706_ = l_Lean_trace_profiler_useHeartbeats;
v___x_7707_ = l_Lean_Option_get___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__7(v_options_7669_, v___x_7706_);
if (v___x_7707_ == 0)
{
lean_object* v___x_7708_; lean_object* v___x_7709_; 
v___x_7708_ = lean_io_mono_nanos_now();
lean_inc(v___y_7667_);
lean_inc_ref(v___y_7666_);
lean_inc(v___y_7665_);
lean_inc_ref(v___y_7664_);
lean_inc(v___y_7663_);
lean_inc_ref(v___y_7662_);
v___x_7709_ = l_Lean_Elab_Term_processDefDeriving(v_a_7654_, v_declExpr_7655_, v_isNoncomputable_7656_, v_cmdRef_x3f_7657_, v___y_7662_, v___y_7663_, v___y_7664_, v___y_7665_, v___y_7666_, v___y_7667_);
if (lean_obj_tag(v___x_7709_) == 0)
{
lean_object* v_a_7710_; lean_object* v___x_7712_; uint8_t v_isShared_7713_; uint8_t v_isSharedCheck_7717_; 
v_a_7710_ = lean_ctor_get(v___x_7709_, 0);
v_isSharedCheck_7717_ = !lean_is_exclusive(v___x_7709_);
if (v_isSharedCheck_7717_ == 0)
{
v___x_7712_ = v___x_7709_;
v_isShared_7713_ = v_isSharedCheck_7717_;
goto v_resetjp_7711_;
}
else
{
lean_inc(v_a_7710_);
lean_dec(v___x_7709_);
v___x_7712_ = lean_box(0);
v_isShared_7713_ = v_isSharedCheck_7717_;
goto v_resetjp_7711_;
}
v_resetjp_7711_:
{
lean_object* v___x_7715_; 
if (v_isShared_7713_ == 0)
{
lean_ctor_set_tag(v___x_7712_, 1);
v___x_7715_ = v___x_7712_;
goto v_reusejp_7714_;
}
else
{
lean_object* v_reuseFailAlloc_7716_; 
v_reuseFailAlloc_7716_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_7716_, 0, v_a_7710_);
v___x_7715_ = v_reuseFailAlloc_7716_;
goto v_reusejp_7714_;
}
v_reusejp_7714_:
{
v___y_7675_ = v___x_7708_;
v___y_7676_ = v_a_7705_;
v_a_7677_ = v___x_7715_;
goto v___jp_7674_;
}
}
}
else
{
lean_object* v_a_7718_; lean_object* v___x_7720_; uint8_t v_isShared_7721_; uint8_t v_isSharedCheck_7725_; 
v_a_7718_ = lean_ctor_get(v___x_7709_, 0);
v_isSharedCheck_7725_ = !lean_is_exclusive(v___x_7709_);
if (v_isSharedCheck_7725_ == 0)
{
v___x_7720_ = v___x_7709_;
v_isShared_7721_ = v_isSharedCheck_7725_;
goto v_resetjp_7719_;
}
else
{
lean_inc(v_a_7718_);
lean_dec(v___x_7709_);
v___x_7720_ = lean_box(0);
v_isShared_7721_ = v_isSharedCheck_7725_;
goto v_resetjp_7719_;
}
v_resetjp_7719_:
{
lean_object* v___x_7723_; 
if (v_isShared_7721_ == 0)
{
lean_ctor_set_tag(v___x_7720_, 0);
v___x_7723_ = v___x_7720_;
goto v_reusejp_7722_;
}
else
{
lean_object* v_reuseFailAlloc_7724_; 
v_reuseFailAlloc_7724_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_7724_, 0, v_a_7718_);
v___x_7723_ = v_reuseFailAlloc_7724_;
goto v_reusejp_7722_;
}
v_reusejp_7722_:
{
v___y_7675_ = v___x_7708_;
v___y_7676_ = v_a_7705_;
v_a_7677_ = v___x_7723_;
goto v___jp_7674_;
}
}
}
}
else
{
lean_object* v___x_7726_; lean_object* v___x_7727_; 
v___x_7726_ = lean_io_get_num_heartbeats();
lean_inc(v___y_7667_);
lean_inc_ref(v___y_7666_);
lean_inc(v___y_7665_);
lean_inc_ref(v___y_7664_);
lean_inc(v___y_7663_);
lean_inc_ref(v___y_7662_);
v___x_7727_ = l_Lean_Elab_Term_processDefDeriving(v_a_7654_, v_declExpr_7655_, v_isNoncomputable_7656_, v_cmdRef_x3f_7657_, v___y_7662_, v___y_7663_, v___y_7664_, v___y_7665_, v___y_7666_, v___y_7667_);
if (lean_obj_tag(v___x_7727_) == 0)
{
lean_object* v_a_7728_; lean_object* v___x_7730_; uint8_t v_isShared_7731_; uint8_t v_isSharedCheck_7735_; 
v_a_7728_ = lean_ctor_get(v___x_7727_, 0);
v_isSharedCheck_7735_ = !lean_is_exclusive(v___x_7727_);
if (v_isSharedCheck_7735_ == 0)
{
v___x_7730_ = v___x_7727_;
v_isShared_7731_ = v_isSharedCheck_7735_;
goto v_resetjp_7729_;
}
else
{
lean_inc(v_a_7728_);
lean_dec(v___x_7727_);
v___x_7730_ = lean_box(0);
v_isShared_7731_ = v_isSharedCheck_7735_;
goto v_resetjp_7729_;
}
v_resetjp_7729_:
{
lean_object* v___x_7733_; 
if (v_isShared_7731_ == 0)
{
lean_ctor_set_tag(v___x_7730_, 1);
v___x_7733_ = v___x_7730_;
goto v_reusejp_7732_;
}
else
{
lean_object* v_reuseFailAlloc_7734_; 
v_reuseFailAlloc_7734_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_7734_, 0, v_a_7728_);
v___x_7733_ = v_reuseFailAlloc_7734_;
goto v_reusejp_7732_;
}
v_reusejp_7732_:
{
v___y_7691_ = v___x_7726_;
v___y_7692_ = v_a_7705_;
v_a_7693_ = v___x_7733_;
goto v___jp_7690_;
}
}
}
else
{
lean_object* v_a_7736_; lean_object* v___x_7738_; uint8_t v_isShared_7739_; uint8_t v_isSharedCheck_7743_; 
v_a_7736_ = lean_ctor_get(v___x_7727_, 0);
v_isSharedCheck_7743_ = !lean_is_exclusive(v___x_7727_);
if (v_isSharedCheck_7743_ == 0)
{
v___x_7738_ = v___x_7727_;
v_isShared_7739_ = v_isSharedCheck_7743_;
goto v_resetjp_7737_;
}
else
{
lean_inc(v_a_7736_);
lean_dec(v___x_7727_);
v___x_7738_ = lean_box(0);
v_isShared_7739_ = v_isSharedCheck_7743_;
goto v_resetjp_7737_;
}
v_resetjp_7737_:
{
lean_object* v___x_7741_; 
if (v_isShared_7739_ == 0)
{
lean_ctor_set_tag(v___x_7738_, 0);
v___x_7741_ = v___x_7738_;
goto v_reusejp_7740_;
}
else
{
lean_object* v_reuseFailAlloc_7742_; 
v_reuseFailAlloc_7742_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_7742_, 0, v_a_7736_);
v___x_7741_ = v_reuseFailAlloc_7742_;
goto v_reusejp_7740_;
}
v_reusejp_7740_:
{
v___y_7691_ = v___x_7726_;
v___y_7692_ = v_a_7705_;
v_a_7693_ = v___x_7741_;
goto v___jp_7690_;
}
}
}
}
}
else
{
lean_object* v_a_7744_; lean_object* v___x_7746_; uint8_t v_isShared_7747_; uint8_t v_isSharedCheck_7751_; 
lean_dec(v_a_7673_);
lean_dec_ref(v_options_7669_);
lean_dec(v___y_7667_);
lean_dec_ref(v___y_7666_);
lean_dec(v___y_7665_);
lean_dec_ref(v___y_7664_);
lean_dec(v___y_7663_);
lean_dec_ref(v___y_7662_);
lean_dec_ref(v___f_7661_);
lean_dec_ref(v___x_7660_);
lean_dec(v___x_7658_);
lean_dec(v_cmdRef_x3f_7657_);
lean_dec_ref(v_declExpr_7655_);
lean_dec_ref(v_a_7654_);
v_a_7744_ = lean_ctor_get(v___x_7704_, 0);
v_isSharedCheck_7751_ = !lean_is_exclusive(v___x_7704_);
if (v_isSharedCheck_7751_ == 0)
{
v___x_7746_ = v___x_7704_;
v_isShared_7747_ = v_isSharedCheck_7751_;
goto v_resetjp_7745_;
}
else
{
lean_inc(v_a_7744_);
lean_dec(v___x_7704_);
v___x_7746_ = lean_box(0);
v_isShared_7747_ = v_isSharedCheck_7751_;
goto v_resetjp_7745_;
}
v_resetjp_7745_:
{
lean_object* v___x_7749_; 
if (v_isShared_7747_ == 0)
{
v___x_7749_ = v___x_7746_;
goto v_reusejp_7748_;
}
else
{
lean_object* v_reuseFailAlloc_7750_; 
v_reuseFailAlloc_7750_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_7750_, 0, v_a_7744_);
v___x_7749_ = v_reuseFailAlloc_7750_;
goto v_reusejp_7748_;
}
v_reusejp_7748_:
{
return v___x_7749_;
}
}
}
}
}
else
{
lean_object* v_a_7756_; lean_object* v___x_7758_; uint8_t v_isShared_7759_; uint8_t v_isSharedCheck_7763_; 
lean_dec(v___y_7667_);
lean_dec_ref(v___y_7666_);
lean_dec(v___y_7665_);
lean_dec_ref(v___y_7664_);
lean_dec(v___y_7663_);
lean_dec_ref(v___y_7662_);
lean_dec_ref(v___f_7661_);
lean_dec_ref(v___x_7660_);
lean_dec(v___x_7658_);
lean_dec(v_cmdRef_x3f_7657_);
lean_dec_ref(v_declExpr_7655_);
lean_dec_ref(v_a_7654_);
v_a_7756_ = lean_ctor_get(v___x_7672_, 0);
v_isSharedCheck_7763_ = !lean_is_exclusive(v___x_7672_);
if (v_isSharedCheck_7763_ == 0)
{
v___x_7758_ = v___x_7672_;
v_isShared_7759_ = v_isSharedCheck_7763_;
goto v_resetjp_7757_;
}
else
{
lean_inc(v_a_7756_);
lean_dec(v___x_7672_);
v___x_7758_ = lean_box(0);
v_isShared_7759_ = v_isSharedCheck_7763_;
goto v_resetjp_7757_;
}
v_resetjp_7757_:
{
lean_object* v___x_7761_; 
if (v_isShared_7759_ == 0)
{
v___x_7761_ = v___x_7758_;
goto v_reusejp_7760_;
}
else
{
lean_object* v_reuseFailAlloc_7762_; 
v_reuseFailAlloc_7762_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_7762_, 0, v_a_7756_);
v___x_7761_ = v_reuseFailAlloc_7762_;
goto v_reusejp_7760_;
}
v_reusejp_7760_:
{
return v___x_7761_;
}
}
}
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__2___lam__1___boxed(lean_object* v_a_7764_, lean_object* v_declExpr_7765_, lean_object* v_isNoncomputable_7766_, lean_object* v_cmdRef_x3f_7767_, lean_object* v___x_7768_, lean_object* v___x_7769_, lean_object* v___x_7770_, lean_object* v___f_7771_, lean_object* v___y_7772_, lean_object* v___y_7773_, lean_object* v___y_7774_, lean_object* v___y_7775_, lean_object* v___y_7776_, lean_object* v___y_7777_, lean_object* v___y_7778_){
_start:
{
uint8_t v_isNoncomputable_boxed_7779_; uint8_t v___x_11804__boxed_7780_; lean_object* v_res_7781_; 
v_isNoncomputable_boxed_7779_ = lean_unbox(v_isNoncomputable_7766_);
v___x_11804__boxed_7780_ = lean_unbox(v___x_7769_);
v_res_7781_ = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__2___lam__1(v_a_7764_, v_declExpr_7765_, v_isNoncomputable_boxed_7779_, v_cmdRef_x3f_7767_, v___x_7768_, v___x_11804__boxed_7780_, v___x_7770_, v___f_7771_, v___y_7772_, v___y_7773_, v___y_7774_, v___y_7775_, v___y_7776_, v___y_7777_);
return v_res_7781_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_withLogging___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__1(lean_object* v_x_7782_, lean_object* v___y_7783_, lean_object* v___y_7784_, lean_object* v___y_7785_, lean_object* v___y_7786_, lean_object* v___y_7787_, lean_object* v___y_7788_){
_start:
{
lean_object* v___x_7790_; 
lean_inc(v___y_7788_);
lean_inc_ref(v___y_7787_);
lean_inc(v___y_7786_);
lean_inc_ref(v___y_7785_);
lean_inc(v___y_7784_);
lean_inc_ref(v___y_7783_);
v___x_7790_ = lean_apply_7(v_x_7782_, v___y_7783_, v___y_7784_, v___y_7785_, v___y_7786_, v___y_7787_, v___y_7788_, lean_box(0));
if (lean_obj_tag(v___x_7790_) == 0)
{
lean_dec(v___y_7788_);
lean_dec_ref(v___y_7787_);
lean_dec(v___y_7786_);
lean_dec_ref(v___y_7785_);
lean_dec(v___y_7784_);
lean_dec_ref(v___y_7783_);
return v___x_7790_;
}
else
{
lean_object* v_a_7791_; uint8_t v___y_7793_; uint8_t v___x_7795_; 
v_a_7791_ = lean_ctor_get(v___x_7790_, 0);
lean_inc(v_a_7791_);
v___x_7795_ = l_Lean_Exception_isInterrupt(v_a_7791_);
if (v___x_7795_ == 0)
{
uint8_t v___x_7796_; 
lean_inc(v_a_7791_);
v___x_7796_ = l_Lean_Exception_isRuntime(v_a_7791_);
v___y_7793_ = v___x_7796_;
goto v___jp_7792_;
}
else
{
v___y_7793_ = v___x_7795_;
goto v___jp_7792_;
}
v___jp_7792_:
{
if (v___y_7793_ == 0)
{
lean_object* v___x_7794_; 
lean_dec_ref(v___x_7790_);
v___x_7794_ = l_Lean_Elab_logException___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__4(v_a_7791_, v___y_7783_, v___y_7784_, v___y_7785_, v___y_7786_, v___y_7787_, v___y_7788_);
lean_dec(v___y_7788_);
lean_dec(v___y_7786_);
lean_dec_ref(v___y_7785_);
lean_dec(v___y_7784_);
lean_dec_ref(v___y_7783_);
return v___x_7794_;
}
else
{
lean_dec(v_a_7791_);
lean_dec(v___y_7788_);
lean_dec_ref(v___y_7787_);
lean_dec(v___y_7786_);
lean_dec_ref(v___y_7785_);
lean_dec(v___y_7784_);
lean_dec_ref(v___y_7783_);
return v___x_7790_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_withLogging___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__1___boxed(lean_object* v_x_7797_, lean_object* v___y_7798_, lean_object* v___y_7799_, lean_object* v___y_7800_, lean_object* v___y_7801_, lean_object* v___y_7802_, lean_object* v___y_7803_, lean_object* v___y_7804_){
_start:
{
lean_object* v_res_7805_; 
v_res_7805_ = l_Lean_Elab_withLogging___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__1(v_x_7797_, v___y_7798_, v___y_7799_, v___y_7800_, v___y_7801_, v___y_7802_, v___y_7803_);
return v_res_7805_;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__2(lean_object* v_declExpr_7806_, uint8_t v_isNoncomputable_7807_, lean_object* v_cmdRef_x3f_7808_, lean_object* v_as_7809_, size_t v_sz_7810_, size_t v_i_7811_, lean_object* v_b_7812_, lean_object* v___y_7813_, lean_object* v___y_7814_, lean_object* v___y_7815_, lean_object* v___y_7816_, lean_object* v___y_7817_, lean_object* v___y_7818_){
_start:
{
uint8_t v___x_7820_; 
v___x_7820_ = lean_usize_dec_lt(v_i_7811_, v_sz_7810_);
if (v___x_7820_ == 0)
{
lean_object* v___x_7821_; 
lean_dec(v___y_7818_);
lean_dec_ref(v___y_7817_);
lean_dec(v___y_7816_);
lean_dec_ref(v___y_7815_);
lean_dec(v___y_7814_);
lean_dec_ref(v___y_7813_);
lean_dec(v_cmdRef_x3f_7808_);
lean_dec_ref(v_declExpr_7806_);
v___x_7821_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_7821_, 0, v_b_7812_);
return v___x_7821_;
}
else
{
lean_object* v_a_7822_; lean_object* v___f_7823_; lean_object* v___x_7824_; lean_object* v___x_7825_; lean_object* v___x_7826_; lean_object* v___x_7827_; lean_object* v___f_7828_; lean_object* v___x_7829_; 
v_a_7822_ = lean_array_uget_borrowed(v_as_7809_, v_i_7811_);
lean_inc_ref(v_declExpr_7806_);
lean_inc(v_a_7822_);
v___f_7823_ = lean_alloc_closure((void*)(l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__2___lam__0___boxed), 10, 2);
lean_closure_set(v___f_7823_, 0, v_a_7822_);
lean_closure_set(v___f_7823_, 1, v_declExpr_7806_);
v___x_7824_ = ((lean_object*)(l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__1));
v___x_7825_ = ((lean_object*)(l_Lean_addTrace___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__3___redArg___closed__1));
v___x_7826_ = lean_box(v_isNoncomputable_7807_);
v___x_7827_ = lean_box(v___x_7820_);
lean_inc(v_cmdRef_x3f_7808_);
lean_inc_ref(v_declExpr_7806_);
lean_inc(v_a_7822_);
v___f_7828_ = lean_alloc_closure((void*)(l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__2___lam__1___boxed), 15, 8);
lean_closure_set(v___f_7828_, 0, v_a_7822_);
lean_closure_set(v___f_7828_, 1, v_declExpr_7806_);
lean_closure_set(v___f_7828_, 2, v___x_7826_);
lean_closure_set(v___f_7828_, 3, v_cmdRef_x3f_7808_);
lean_closure_set(v___f_7828_, 4, v___x_7824_);
lean_closure_set(v___f_7828_, 5, v___x_7827_);
lean_closure_set(v___f_7828_, 6, v___x_7825_);
lean_closure_set(v___f_7828_, 7, v___f_7823_);
lean_inc(v___y_7818_);
lean_inc_ref(v___y_7817_);
lean_inc(v___y_7816_);
lean_inc_ref(v___y_7815_);
lean_inc(v___y_7814_);
lean_inc_ref(v___y_7813_);
v___x_7829_ = l_Lean_Elab_withLogging___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__1(v___f_7828_, v___y_7813_, v___y_7814_, v___y_7815_, v___y_7816_, v___y_7817_, v___y_7818_);
if (lean_obj_tag(v___x_7829_) == 0)
{
lean_object* v___x_7830_; size_t v___x_7831_; size_t v___x_7832_; 
lean_dec_ref(v___x_7829_);
v___x_7830_ = lean_box(0);
v___x_7831_ = ((size_t)1ULL);
v___x_7832_ = lean_usize_add(v_i_7811_, v___x_7831_);
v_i_7811_ = v___x_7832_;
v_b_7812_ = v___x_7830_;
goto _start;
}
else
{
lean_dec(v___y_7818_);
lean_dec_ref(v___y_7817_);
lean_dec(v___y_7816_);
lean_dec_ref(v___y_7815_);
lean_dec(v___y_7814_);
lean_dec_ref(v___y_7813_);
lean_dec(v_cmdRef_x3f_7808_);
lean_dec_ref(v_declExpr_7806_);
return v___x_7829_;
}
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__2___boxed(lean_object* v_declExpr_7834_, lean_object* v_isNoncomputable_7835_, lean_object* v_cmdRef_x3f_7836_, lean_object* v_as_7837_, lean_object* v_sz_7838_, lean_object* v_i_7839_, lean_object* v_b_7840_, lean_object* v___y_7841_, lean_object* v___y_7842_, lean_object* v___y_7843_, lean_object* v___y_7844_, lean_object* v___y_7845_, lean_object* v___y_7846_, lean_object* v___y_7847_){
_start:
{
uint8_t v_isNoncomputable_boxed_7848_; size_t v_sz_boxed_7849_; size_t v_i_boxed_7850_; lean_object* v_res_7851_; 
v_isNoncomputable_boxed_7848_ = lean_unbox(v_isNoncomputable_7835_);
v_sz_boxed_7849_ = lean_unbox_usize(v_sz_7838_);
lean_dec(v_sz_7838_);
v_i_boxed_7850_ = lean_unbox_usize(v_i_7839_);
lean_dec(v_i_7839_);
v_res_7851_ = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__2(v_declExpr_7834_, v_isNoncomputable_boxed_7848_, v_cmdRef_x3f_7836_, v_as_7837_, v_sz_boxed_7849_, v_i_boxed_7850_, v_b_7840_, v___y_7841_, v___y_7842_, v___y_7843_, v___y_7844_, v___y_7845_, v___y_7846_);
lean_dec_ref(v_as_7837_);
return v_res_7851_;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4___lam__0(lean_object* v_classes_7852_, uint8_t v_isNoncomputable_7853_, lean_object* v_cmdRef_x3f_7854_, lean_object* v___x_7855_, lean_object* v_declExpr_7856_, lean_object* v___y_7857_, lean_object* v___y_7858_, lean_object* v___y_7859_, lean_object* v___y_7860_, lean_object* v___y_7861_, lean_object* v___y_7862_){
_start:
{
size_t v_sz_7864_; size_t v___x_7865_; lean_object* v___x_7866_; 
v_sz_7864_ = lean_array_size(v_classes_7852_);
v___x_7865_ = ((size_t)0ULL);
v___x_7866_ = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__2(v_declExpr_7856_, v_isNoncomputable_7853_, v_cmdRef_x3f_7854_, v_classes_7852_, v_sz_7864_, v___x_7865_, v___x_7855_, v___y_7857_, v___y_7858_, v___y_7859_, v___y_7860_, v___y_7861_, v___y_7862_);
if (lean_obj_tag(v___x_7866_) == 0)
{
lean_object* v___x_7868_; uint8_t v_isShared_7869_; uint8_t v_isSharedCheck_7873_; 
v_isSharedCheck_7873_ = !lean_is_exclusive(v___x_7866_);
if (v_isSharedCheck_7873_ == 0)
{
lean_object* v_unused_7874_; 
v_unused_7874_ = lean_ctor_get(v___x_7866_, 0);
lean_dec(v_unused_7874_);
v___x_7868_ = v___x_7866_;
v_isShared_7869_ = v_isSharedCheck_7873_;
goto v_resetjp_7867_;
}
else
{
lean_dec(v___x_7866_);
v___x_7868_ = lean_box(0);
v_isShared_7869_ = v_isSharedCheck_7873_;
goto v_resetjp_7867_;
}
v_resetjp_7867_:
{
lean_object* v___x_7871_; 
if (v_isShared_7869_ == 0)
{
lean_ctor_set(v___x_7868_, 0, v___x_7855_);
v___x_7871_ = v___x_7868_;
goto v_reusejp_7870_;
}
else
{
lean_object* v_reuseFailAlloc_7872_; 
v_reuseFailAlloc_7872_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_7872_, 0, v___x_7855_);
v___x_7871_ = v_reuseFailAlloc_7872_;
goto v_reusejp_7870_;
}
v_reusejp_7870_:
{
return v___x_7871_;
}
}
}
else
{
return v___x_7866_;
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4___lam__0___boxed(lean_object* v_classes_7875_, lean_object* v_isNoncomputable_7876_, lean_object* v_cmdRef_x3f_7877_, lean_object* v___x_7878_, lean_object* v_declExpr_7879_, lean_object* v___y_7880_, lean_object* v___y_7881_, lean_object* v___y_7882_, lean_object* v___y_7883_, lean_object* v___y_7884_, lean_object* v___y_7885_, lean_object* v___y_7886_){
_start:
{
uint8_t v_isNoncomputable_boxed_7887_; lean_object* v_res_7888_; 
v_isNoncomputable_boxed_7887_ = lean_unbox(v_isNoncomputable_7876_);
v_res_7888_ = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4___lam__0(v_classes_7875_, v_isNoncomputable_boxed_7887_, v_cmdRef_x3f_7877_, v___x_7878_, v_declExpr_7879_, v___y_7880_, v___y_7881_, v___y_7882_, v___y_7883_, v___y_7884_, v___y_7885_);
lean_dec_ref(v_classes_7875_);
return v_res_7888_;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4_spec__6(lean_object* v_classes_7889_, uint8_t v_isNoncomputable_7890_, lean_object* v_cmdRef_x3f_7891_, lean_object* v_as_7892_, size_t v_sz_7893_, size_t v_i_7894_, lean_object* v_b_7895_, lean_object* v___y_7896_, lean_object* v___y_7897_, lean_object* v___y_7898_, lean_object* v___y_7899_, lean_object* v___y_7900_, lean_object* v___y_7901_){
_start:
{
uint8_t v___x_7903_; 
v___x_7903_ = lean_usize_dec_lt(v_i_7894_, v_sz_7893_);
if (v___x_7903_ == 0)
{
lean_object* v___x_7904_; 
lean_dec(v___y_7901_);
lean_dec(v___y_7899_);
lean_dec_ref(v___y_7898_);
lean_dec(v___y_7897_);
lean_dec_ref(v___y_7896_);
lean_dec(v_cmdRef_x3f_7891_);
lean_dec_ref(v_classes_7889_);
v___x_7904_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_7904_, 0, v_b_7895_);
return v___x_7904_;
}
else
{
lean_object* v_fileName_7905_; lean_object* v_fileMap_7906_; lean_object* v_options_7907_; lean_object* v_currRecDepth_7908_; lean_object* v_maxRecDepth_7909_; lean_object* v_ref_7910_; lean_object* v_currNamespace_7911_; lean_object* v_openDecls_7912_; lean_object* v_initHeartbeats_7913_; lean_object* v_maxHeartbeats_7914_; lean_object* v_quotContext_7915_; lean_object* v_currMacroScope_7916_; uint8_t v_diag_7917_; lean_object* v_cancelTk_x3f_7918_; uint8_t v_suppressElabErrors_7919_; lean_object* v_inheritedTraceOptions_7920_; lean_object* v___x_7921_; lean_object* v___x_7922_; lean_object* v___f_7923_; lean_object* v_a_7924_; uint8_t v___x_7925_; lean_object* v___x_7926_; lean_object* v___y_7927_; lean_object* v_ref_7928_; lean_object* v___x_7929_; lean_object* v___x_7930_; 
v_fileName_7905_ = lean_ctor_get(v___y_7900_, 0);
v_fileMap_7906_ = lean_ctor_get(v___y_7900_, 1);
v_options_7907_ = lean_ctor_get(v___y_7900_, 2);
v_currRecDepth_7908_ = lean_ctor_get(v___y_7900_, 3);
v_maxRecDepth_7909_ = lean_ctor_get(v___y_7900_, 4);
v_ref_7910_ = lean_ctor_get(v___y_7900_, 5);
v_currNamespace_7911_ = lean_ctor_get(v___y_7900_, 6);
v_openDecls_7912_ = lean_ctor_get(v___y_7900_, 7);
v_initHeartbeats_7913_ = lean_ctor_get(v___y_7900_, 8);
v_maxHeartbeats_7914_ = lean_ctor_get(v___y_7900_, 9);
v_quotContext_7915_ = lean_ctor_get(v___y_7900_, 10);
v_currMacroScope_7916_ = lean_ctor_get(v___y_7900_, 11);
v_diag_7917_ = lean_ctor_get_uint8(v___y_7900_, sizeof(void*)*14);
v_cancelTk_x3f_7918_ = lean_ctor_get(v___y_7900_, 12);
v_suppressElabErrors_7919_ = lean_ctor_get_uint8(v___y_7900_, sizeof(void*)*14 + 1);
v_inheritedTraceOptions_7920_ = lean_ctor_get(v___y_7900_, 13);
v___x_7921_ = lean_box(0);
v___x_7922_ = lean_box(v_isNoncomputable_7890_);
lean_inc(v_cmdRef_x3f_7891_);
lean_inc_ref(v_classes_7889_);
v___f_7923_ = lean_alloc_closure((void*)(l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4___lam__0___boxed), 12, 4);
lean_closure_set(v___f_7923_, 0, v_classes_7889_);
lean_closure_set(v___f_7923_, 1, v___x_7922_);
lean_closure_set(v___f_7923_, 2, v_cmdRef_x3f_7891_);
lean_closure_set(v___f_7923_, 3, v___x_7921_);
v_a_7924_ = lean_array_uget_borrowed(v_as_7892_, v_i_7894_);
v___x_7925_ = l_Lean_Syntax_isIdent(v_a_7924_);
v___x_7926_ = lean_box(v___x_7925_);
lean_inc(v_a_7924_);
v___y_7927_ = lean_alloc_closure((void*)(l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4___lam__1___boxed), 10, 3);
lean_closure_set(v___y_7927_, 0, v___x_7926_);
lean_closure_set(v___y_7927_, 1, v_a_7924_);
lean_closure_set(v___y_7927_, 2, v___f_7923_);
v_ref_7928_ = l_Lean_replaceRef(v_a_7924_, v_ref_7910_);
lean_inc_ref(v_inheritedTraceOptions_7920_);
lean_inc(v_cancelTk_x3f_7918_);
lean_inc(v_currMacroScope_7916_);
lean_inc(v_quotContext_7915_);
lean_inc(v_maxHeartbeats_7914_);
lean_inc(v_initHeartbeats_7913_);
lean_inc(v_openDecls_7912_);
lean_inc(v_currNamespace_7911_);
lean_inc(v_maxRecDepth_7909_);
lean_inc(v_currRecDepth_7908_);
lean_inc_ref(v_options_7907_);
lean_inc_ref(v_fileMap_7906_);
lean_inc_ref(v_fileName_7905_);
v___x_7929_ = lean_alloc_ctor(0, 14, 2);
lean_ctor_set(v___x_7929_, 0, v_fileName_7905_);
lean_ctor_set(v___x_7929_, 1, v_fileMap_7906_);
lean_ctor_set(v___x_7929_, 2, v_options_7907_);
lean_ctor_set(v___x_7929_, 3, v_currRecDepth_7908_);
lean_ctor_set(v___x_7929_, 4, v_maxRecDepth_7909_);
lean_ctor_set(v___x_7929_, 5, v_ref_7928_);
lean_ctor_set(v___x_7929_, 6, v_currNamespace_7911_);
lean_ctor_set(v___x_7929_, 7, v_openDecls_7912_);
lean_ctor_set(v___x_7929_, 8, v_initHeartbeats_7913_);
lean_ctor_set(v___x_7929_, 9, v_maxHeartbeats_7914_);
lean_ctor_set(v___x_7929_, 10, v_quotContext_7915_);
lean_ctor_set(v___x_7929_, 11, v_currMacroScope_7916_);
lean_ctor_set(v___x_7929_, 12, v_cancelTk_x3f_7918_);
lean_ctor_set(v___x_7929_, 13, v_inheritedTraceOptions_7920_);
lean_ctor_set_uint8(v___x_7929_, sizeof(void*)*14, v_diag_7917_);
lean_ctor_set_uint8(v___x_7929_, sizeof(void*)*14 + 1, v_suppressElabErrors_7919_);
lean_inc(v___y_7901_);
lean_inc(v___y_7899_);
lean_inc_ref(v___y_7898_);
lean_inc(v___y_7897_);
lean_inc_ref(v___y_7896_);
v___x_7930_ = l_Lean_Elab_withLogging___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__1(v___y_7927_, v___y_7896_, v___y_7897_, v___y_7898_, v___y_7899_, v___x_7929_, v___y_7901_);
if (lean_obj_tag(v___x_7930_) == 0)
{
size_t v___x_7931_; size_t v___x_7932_; 
lean_dec_ref(v___x_7930_);
v___x_7931_ = ((size_t)1ULL);
v___x_7932_ = lean_usize_add(v_i_7894_, v___x_7931_);
v_i_7894_ = v___x_7932_;
v_b_7895_ = v___x_7921_;
goto _start;
}
else
{
lean_dec(v___y_7901_);
lean_dec(v___y_7899_);
lean_dec_ref(v___y_7898_);
lean_dec(v___y_7897_);
lean_dec_ref(v___y_7896_);
lean_dec(v_cmdRef_x3f_7891_);
lean_dec_ref(v_classes_7889_);
return v___x_7930_;
}
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4_spec__6___boxed(lean_object* v_classes_7934_, lean_object* v_isNoncomputable_7935_, lean_object* v_cmdRef_x3f_7936_, lean_object* v_as_7937_, lean_object* v_sz_7938_, lean_object* v_i_7939_, lean_object* v_b_7940_, lean_object* v___y_7941_, lean_object* v___y_7942_, lean_object* v___y_7943_, lean_object* v___y_7944_, lean_object* v___y_7945_, lean_object* v___y_7946_, lean_object* v___y_7947_){
_start:
{
uint8_t v_isNoncomputable_boxed_7948_; size_t v_sz_boxed_7949_; size_t v_i_boxed_7950_; lean_object* v_res_7951_; 
v_isNoncomputable_boxed_7948_ = lean_unbox(v_isNoncomputable_7935_);
v_sz_boxed_7949_ = lean_unbox_usize(v_sz_7938_);
lean_dec(v_sz_7938_);
v_i_boxed_7950_ = lean_unbox_usize(v_i_7939_);
lean_dec(v_i_7939_);
v_res_7951_ = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4_spec__6(v_classes_7934_, v_isNoncomputable_boxed_7948_, v_cmdRef_x3f_7936_, v_as_7937_, v_sz_boxed_7949_, v_i_boxed_7950_, v_b_7940_, v___y_7941_, v___y_7942_, v___y_7943_, v___y_7944_, v___y_7945_, v___y_7946_);
lean_dec_ref(v___y_7945_);
lean_dec_ref(v_as_7937_);
return v_res_7951_;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4(uint8_t v_isNoncomputable_7952_, lean_object* v_cmdRef_x3f_7953_, lean_object* v_classes_7954_, lean_object* v_as_7955_, size_t v_sz_7956_, size_t v_i_7957_, lean_object* v_b_7958_, lean_object* v___y_7959_, lean_object* v___y_7960_, lean_object* v___y_7961_, lean_object* v___y_7962_, lean_object* v___y_7963_, lean_object* v___y_7964_){
_start:
{
uint8_t v___x_7966_; 
v___x_7966_ = lean_usize_dec_lt(v_i_7957_, v_sz_7956_);
if (v___x_7966_ == 0)
{
lean_object* v___x_7967_; 
lean_dec(v___y_7964_);
lean_dec(v___y_7962_);
lean_dec_ref(v___y_7961_);
lean_dec(v___y_7960_);
lean_dec_ref(v___y_7959_);
lean_dec_ref(v_classes_7954_);
lean_dec(v_cmdRef_x3f_7953_);
v___x_7967_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_7967_, 0, v_b_7958_);
return v___x_7967_;
}
else
{
lean_object* v_fileName_7968_; lean_object* v_fileMap_7969_; lean_object* v_options_7970_; lean_object* v_currRecDepth_7971_; lean_object* v_maxRecDepth_7972_; lean_object* v_ref_7973_; lean_object* v_currNamespace_7974_; lean_object* v_openDecls_7975_; lean_object* v_initHeartbeats_7976_; lean_object* v_maxHeartbeats_7977_; lean_object* v_quotContext_7978_; lean_object* v_currMacroScope_7979_; uint8_t v_diag_7980_; lean_object* v_cancelTk_x3f_7981_; uint8_t v_suppressElabErrors_7982_; lean_object* v_inheritedTraceOptions_7983_; lean_object* v___x_7984_; lean_object* v___x_7985_; lean_object* v___f_7986_; lean_object* v_a_7987_; uint8_t v___x_7988_; lean_object* v___x_7989_; lean_object* v___y_7990_; lean_object* v_ref_7991_; lean_object* v___x_7992_; lean_object* v___x_7993_; 
v_fileName_7968_ = lean_ctor_get(v___y_7963_, 0);
v_fileMap_7969_ = lean_ctor_get(v___y_7963_, 1);
v_options_7970_ = lean_ctor_get(v___y_7963_, 2);
v_currRecDepth_7971_ = lean_ctor_get(v___y_7963_, 3);
v_maxRecDepth_7972_ = lean_ctor_get(v___y_7963_, 4);
v_ref_7973_ = lean_ctor_get(v___y_7963_, 5);
v_currNamespace_7974_ = lean_ctor_get(v___y_7963_, 6);
v_openDecls_7975_ = lean_ctor_get(v___y_7963_, 7);
v_initHeartbeats_7976_ = lean_ctor_get(v___y_7963_, 8);
v_maxHeartbeats_7977_ = lean_ctor_get(v___y_7963_, 9);
v_quotContext_7978_ = lean_ctor_get(v___y_7963_, 10);
v_currMacroScope_7979_ = lean_ctor_get(v___y_7963_, 11);
v_diag_7980_ = lean_ctor_get_uint8(v___y_7963_, sizeof(void*)*14);
v_cancelTk_x3f_7981_ = lean_ctor_get(v___y_7963_, 12);
v_suppressElabErrors_7982_ = lean_ctor_get_uint8(v___y_7963_, sizeof(void*)*14 + 1);
v_inheritedTraceOptions_7983_ = lean_ctor_get(v___y_7963_, 13);
v___x_7984_ = lean_box(0);
v___x_7985_ = lean_box(v_isNoncomputable_7952_);
lean_inc(v_cmdRef_x3f_7953_);
lean_inc_ref(v_classes_7954_);
v___f_7986_ = lean_alloc_closure((void*)(l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4___lam__0___boxed), 12, 4);
lean_closure_set(v___f_7986_, 0, v_classes_7954_);
lean_closure_set(v___f_7986_, 1, v___x_7985_);
lean_closure_set(v___f_7986_, 2, v_cmdRef_x3f_7953_);
lean_closure_set(v___f_7986_, 3, v___x_7984_);
v_a_7987_ = lean_array_uget_borrowed(v_as_7955_, v_i_7957_);
v___x_7988_ = l_Lean_Syntax_isIdent(v_a_7987_);
v___x_7989_ = lean_box(v___x_7988_);
lean_inc(v_a_7987_);
v___y_7990_ = lean_alloc_closure((void*)(l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4___lam__1___boxed), 10, 3);
lean_closure_set(v___y_7990_, 0, v___x_7989_);
lean_closure_set(v___y_7990_, 1, v_a_7987_);
lean_closure_set(v___y_7990_, 2, v___f_7986_);
v_ref_7991_ = l_Lean_replaceRef(v_a_7987_, v_ref_7973_);
lean_inc_ref(v_inheritedTraceOptions_7983_);
lean_inc(v_cancelTk_x3f_7981_);
lean_inc(v_currMacroScope_7979_);
lean_inc(v_quotContext_7978_);
lean_inc(v_maxHeartbeats_7977_);
lean_inc(v_initHeartbeats_7976_);
lean_inc(v_openDecls_7975_);
lean_inc(v_currNamespace_7974_);
lean_inc(v_maxRecDepth_7972_);
lean_inc(v_currRecDepth_7971_);
lean_inc_ref(v_options_7970_);
lean_inc_ref(v_fileMap_7969_);
lean_inc_ref(v_fileName_7968_);
v___x_7992_ = lean_alloc_ctor(0, 14, 2);
lean_ctor_set(v___x_7992_, 0, v_fileName_7968_);
lean_ctor_set(v___x_7992_, 1, v_fileMap_7969_);
lean_ctor_set(v___x_7992_, 2, v_options_7970_);
lean_ctor_set(v___x_7992_, 3, v_currRecDepth_7971_);
lean_ctor_set(v___x_7992_, 4, v_maxRecDepth_7972_);
lean_ctor_set(v___x_7992_, 5, v_ref_7991_);
lean_ctor_set(v___x_7992_, 6, v_currNamespace_7974_);
lean_ctor_set(v___x_7992_, 7, v_openDecls_7975_);
lean_ctor_set(v___x_7992_, 8, v_initHeartbeats_7976_);
lean_ctor_set(v___x_7992_, 9, v_maxHeartbeats_7977_);
lean_ctor_set(v___x_7992_, 10, v_quotContext_7978_);
lean_ctor_set(v___x_7992_, 11, v_currMacroScope_7979_);
lean_ctor_set(v___x_7992_, 12, v_cancelTk_x3f_7981_);
lean_ctor_set(v___x_7992_, 13, v_inheritedTraceOptions_7983_);
lean_ctor_set_uint8(v___x_7992_, sizeof(void*)*14, v_diag_7980_);
lean_ctor_set_uint8(v___x_7992_, sizeof(void*)*14 + 1, v_suppressElabErrors_7982_);
lean_inc(v___y_7964_);
lean_inc(v___y_7962_);
lean_inc_ref(v___y_7961_);
lean_inc(v___y_7960_);
lean_inc_ref(v___y_7959_);
v___x_7993_ = l_Lean_Elab_withLogging___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__1(v___y_7990_, v___y_7959_, v___y_7960_, v___y_7961_, v___y_7962_, v___x_7992_, v___y_7964_);
if (lean_obj_tag(v___x_7993_) == 0)
{
size_t v___x_7994_; size_t v___x_7995_; lean_object* v___x_7996_; 
lean_dec_ref(v___x_7993_);
v___x_7994_ = ((size_t)1ULL);
v___x_7995_ = lean_usize_add(v_i_7957_, v___x_7994_);
v___x_7996_ = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4_spec__6(v_classes_7954_, v_isNoncomputable_7952_, v_cmdRef_x3f_7953_, v_as_7955_, v_sz_7956_, v___x_7995_, v___x_7984_, v___y_7959_, v___y_7960_, v___y_7961_, v___y_7962_, v___y_7963_, v___y_7964_);
return v___x_7996_;
}
else
{
lean_dec(v___y_7964_);
lean_dec(v___y_7962_);
lean_dec_ref(v___y_7961_);
lean_dec(v___y_7960_);
lean_dec_ref(v___y_7959_);
lean_dec_ref(v_classes_7954_);
lean_dec(v_cmdRef_x3f_7953_);
return v___x_7993_;
}
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4___boxed(lean_object* v_isNoncomputable_7997_, lean_object* v_cmdRef_x3f_7998_, lean_object* v_classes_7999_, lean_object* v_as_8000_, lean_object* v_sz_8001_, lean_object* v_i_8002_, lean_object* v_b_8003_, lean_object* v___y_8004_, lean_object* v___y_8005_, lean_object* v___y_8006_, lean_object* v___y_8007_, lean_object* v___y_8008_, lean_object* v___y_8009_, lean_object* v___y_8010_){
_start:
{
uint8_t v_isNoncomputable_boxed_8011_; size_t v_sz_boxed_8012_; size_t v_i_boxed_8013_; lean_object* v_res_8014_; 
v_isNoncomputable_boxed_8011_ = lean_unbox(v_isNoncomputable_7997_);
v_sz_boxed_8012_ = lean_unbox_usize(v_sz_8001_);
lean_dec(v_sz_8001_);
v_i_boxed_8013_ = lean_unbox_usize(v_i_8002_);
lean_dec(v_i_8002_);
v_res_8014_ = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4(v_isNoncomputable_boxed_8011_, v_cmdRef_x3f_7998_, v_classes_7999_, v_as_8000_, v_sz_boxed_8012_, v_i_boxed_8013_, v_b_8003_, v___y_8004_, v___y_8005_, v___y_8006_, v___y_8007_, v___y_8008_, v___y_8009_);
lean_dec_ref(v___y_8008_);
lean_dec_ref(v_as_8000_);
return v_res_8014_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving___lam__0(lean_object* v_decls_8015_, uint8_t v_isNoncomputable_8016_, lean_object* v_cmdRef_x3f_8017_, lean_object* v_classes_8018_, lean_object* v_x_8019_, lean_object* v___y_8020_, lean_object* v___y_8021_, lean_object* v___y_8022_, lean_object* v___y_8023_, lean_object* v___y_8024_, lean_object* v___y_8025_){
_start:
{
lean_object* v___x_8027_; size_t v_sz_8028_; size_t v___x_8029_; lean_object* v___x_8030_; 
v___x_8027_ = lean_box(0);
v_sz_8028_ = lean_array_size(v_decls_8015_);
v___x_8029_ = ((size_t)0ULL);
v___x_8030_ = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving_spec__4(v_isNoncomputable_8016_, v_cmdRef_x3f_8017_, v_classes_8018_, v_decls_8015_, v_sz_8028_, v___x_8029_, v___x_8027_, v___y_8020_, v___y_8021_, v___y_8022_, v___y_8023_, v___y_8024_, v___y_8025_);
if (lean_obj_tag(v___x_8030_) == 0)
{
lean_object* v___x_8032_; uint8_t v_isShared_8033_; uint8_t v_isSharedCheck_8037_; 
v_isSharedCheck_8037_ = !lean_is_exclusive(v___x_8030_);
if (v_isSharedCheck_8037_ == 0)
{
lean_object* v_unused_8038_; 
v_unused_8038_ = lean_ctor_get(v___x_8030_, 0);
lean_dec(v_unused_8038_);
v___x_8032_ = v___x_8030_;
v_isShared_8033_ = v_isSharedCheck_8037_;
goto v_resetjp_8031_;
}
else
{
lean_dec(v___x_8030_);
v___x_8032_ = lean_box(0);
v_isShared_8033_ = v_isSharedCheck_8037_;
goto v_resetjp_8031_;
}
v_resetjp_8031_:
{
lean_object* v___x_8035_; 
if (v_isShared_8033_ == 0)
{
lean_ctor_set(v___x_8032_, 0, v___x_8027_);
v___x_8035_ = v___x_8032_;
goto v_reusejp_8034_;
}
else
{
lean_object* v_reuseFailAlloc_8036_; 
v_reuseFailAlloc_8036_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8036_, 0, v___x_8027_);
v___x_8035_ = v_reuseFailAlloc_8036_;
goto v_reusejp_8034_;
}
v_reusejp_8034_:
{
return v___x_8035_;
}
}
}
else
{
return v___x_8030_;
}
}
}
LEAN_EXPORT lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving___lam__0___boxed(lean_object* v_decls_8039_, lean_object* v_isNoncomputable_8040_, lean_object* v_cmdRef_x3f_8041_, lean_object* v_classes_8042_, lean_object* v_x_8043_, lean_object* v___y_8044_, lean_object* v___y_8045_, lean_object* v___y_8046_, lean_object* v___y_8047_, lean_object* v___y_8048_, lean_object* v___y_8049_, lean_object* v___y_8050_){
_start:
{
uint8_t v_isNoncomputable_boxed_8051_; lean_object* v_res_8052_; 
v_isNoncomputable_boxed_8051_ = lean_unbox(v_isNoncomputable_8040_);
v_res_8052_ = l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving___lam__0(v_decls_8039_, v_isNoncomputable_boxed_8051_, v_cmdRef_x3f_8041_, v_classes_8042_, v_x_8043_, v___y_8044_, v___y_8045_, v___y_8046_, v___y_8047_, v___y_8048_, v___y_8049_);
lean_dec_ref(v___y_8048_);
lean_dec_ref(v_x_8043_);
lean_dec_ref(v_decls_8039_);
return v_res_8052_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving(lean_object* v_classes_8053_, lean_object* v_decls_8054_, uint8_t v_isNoncomputable_8055_, lean_object* v_cmdRef_x3f_8056_, lean_object* v_a_8057_, lean_object* v_a_8058_){
_start:
{
lean_object* v___x_8060_; lean_object* v___f_8061_; lean_object* v___x_8062_; 
v___x_8060_ = lean_box(v_isNoncomputable_8055_);
v___f_8061_ = lean_alloc_closure((void*)(l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving___lam__0___boxed), 12, 4);
lean_closure_set(v___f_8061_, 0, v_decls_8054_);
lean_closure_set(v___f_8061_, 1, v___x_8060_);
lean_closure_set(v___f_8061_, 2, v_cmdRef_x3f_8056_);
lean_closure_set(v___f_8061_, 3, v_classes_8053_);
v___x_8062_ = l_Lean_Elab_Command_runTermElabM___redArg(v___f_8061_, v_a_8057_, v_a_8058_);
return v___x_8062_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving___boxed(lean_object* v_classes_8063_, lean_object* v_decls_8064_, lean_object* v_isNoncomputable_8065_, lean_object* v_cmdRef_x3f_8066_, lean_object* v_a_8067_, lean_object* v_a_8068_, lean_object* v_a_8069_){
_start:
{
uint8_t v_isNoncomputable_boxed_8070_; lean_object* v_res_8071_; 
v_isNoncomputable_boxed_8070_ = lean_unbox(v_isNoncomputable_8065_);
v_res_8071_ = l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving(v_classes_8063_, v_decls_8064_, v_isNoncomputable_boxed_8070_, v_cmdRef_x3f_8066_, v_a_8067_, v_a_8068_);
lean_dec(v_a_8068_);
return v_res_8071_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_elabDeriving_spec__0___redArg(){
_start:
{
lean_object* v___x_8073_; lean_object* v___x_8074_; 
v___x_8073_ = lean_obj_once(&l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__15___redArg___closed__0, &l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__15___redArg___closed__0_once, _init_l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_liftMacroM___at___00Lean_Elab_Term_processDefDeriving_spec__8_spec__15___redArg___closed__0);
v___x_8074_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_8074_, 0, v___x_8073_);
return v___x_8074_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_elabDeriving_spec__0___redArg___boxed(lean_object* v___y_8075_){
_start:
{
lean_object* v_res_8076_; 
v_res_8076_ = l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_elabDeriving_spec__0___redArg();
return v_res_8076_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_elabDeriving_spec__0(lean_object* v_00_u03b1_8077_, lean_object* v___y_8078_, lean_object* v___y_8079_){
_start:
{
lean_object* v___x_8081_; 
v___x_8081_ = l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_elabDeriving_spec__0___redArg();
return v___x_8081_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_elabDeriving_spec__0___boxed(lean_object* v_00_u03b1_8082_, lean_object* v___y_8083_, lean_object* v___y_8084_, lean_object* v___y_8085_){
_start:
{
lean_object* v_res_8086_; 
v_res_8086_ = l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_elabDeriving_spec__0(v_00_u03b1_8082_, v___y_8083_, v___y_8084_);
lean_dec(v___y_8084_);
lean_dec_ref(v___y_8083_);
return v_res_8086_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_elabDeriving___lam__0(uint8_t v___x_8087_, lean_object* v_sc_8088_){
_start:
{
lean_object* v_header_8089_; lean_object* v_opts_8090_; lean_object* v_currNamespace_8091_; lean_object* v_openDecls_8092_; lean_object* v_levelNames_8093_; lean_object* v_varDecls_8094_; lean_object* v_varUIds_8095_; lean_object* v_includedVars_8096_; lean_object* v_omittedVars_8097_; uint8_t v_isPublic_8098_; uint8_t v_isMeta_8099_; lean_object* v_attrs_8100_; lean_object* v___x_8102_; uint8_t v_isShared_8103_; uint8_t v_isSharedCheck_8107_; 
v_header_8089_ = lean_ctor_get(v_sc_8088_, 0);
v_opts_8090_ = lean_ctor_get(v_sc_8088_, 1);
v_currNamespace_8091_ = lean_ctor_get(v_sc_8088_, 2);
v_openDecls_8092_ = lean_ctor_get(v_sc_8088_, 3);
v_levelNames_8093_ = lean_ctor_get(v_sc_8088_, 4);
v_varDecls_8094_ = lean_ctor_get(v_sc_8088_, 5);
v_varUIds_8095_ = lean_ctor_get(v_sc_8088_, 6);
v_includedVars_8096_ = lean_ctor_get(v_sc_8088_, 7);
v_omittedVars_8097_ = lean_ctor_get(v_sc_8088_, 8);
v_isPublic_8098_ = lean_ctor_get_uint8(v_sc_8088_, sizeof(void*)*10 + 1);
v_isMeta_8099_ = lean_ctor_get_uint8(v_sc_8088_, sizeof(void*)*10 + 2);
v_attrs_8100_ = lean_ctor_get(v_sc_8088_, 9);
v_isSharedCheck_8107_ = !lean_is_exclusive(v_sc_8088_);
if (v_isSharedCheck_8107_ == 0)
{
v___x_8102_ = v_sc_8088_;
v_isShared_8103_ = v_isSharedCheck_8107_;
goto v_resetjp_8101_;
}
else
{
lean_inc(v_attrs_8100_);
lean_inc(v_omittedVars_8097_);
lean_inc(v_includedVars_8096_);
lean_inc(v_varUIds_8095_);
lean_inc(v_varDecls_8094_);
lean_inc(v_levelNames_8093_);
lean_inc(v_openDecls_8092_);
lean_inc(v_currNamespace_8091_);
lean_inc(v_opts_8090_);
lean_inc(v_header_8089_);
lean_dec(v_sc_8088_);
v___x_8102_ = lean_box(0);
v_isShared_8103_ = v_isSharedCheck_8107_;
goto v_resetjp_8101_;
}
v_resetjp_8101_:
{
lean_object* v___x_8105_; 
if (v_isShared_8103_ == 0)
{
v___x_8105_ = v___x_8102_;
goto v_reusejp_8104_;
}
else
{
lean_object* v_reuseFailAlloc_8106_; 
v_reuseFailAlloc_8106_ = lean_alloc_ctor(0, 10, 3);
lean_ctor_set(v_reuseFailAlloc_8106_, 0, v_header_8089_);
lean_ctor_set(v_reuseFailAlloc_8106_, 1, v_opts_8090_);
lean_ctor_set(v_reuseFailAlloc_8106_, 2, v_currNamespace_8091_);
lean_ctor_set(v_reuseFailAlloc_8106_, 3, v_openDecls_8092_);
lean_ctor_set(v_reuseFailAlloc_8106_, 4, v_levelNames_8093_);
lean_ctor_set(v_reuseFailAlloc_8106_, 5, v_varDecls_8094_);
lean_ctor_set(v_reuseFailAlloc_8106_, 6, v_varUIds_8095_);
lean_ctor_set(v_reuseFailAlloc_8106_, 7, v_includedVars_8096_);
lean_ctor_set(v_reuseFailAlloc_8106_, 8, v_omittedVars_8097_);
lean_ctor_set(v_reuseFailAlloc_8106_, 9, v_attrs_8100_);
lean_ctor_set_uint8(v_reuseFailAlloc_8106_, sizeof(void*)*10 + 1, v_isPublic_8098_);
lean_ctor_set_uint8(v_reuseFailAlloc_8106_, sizeof(void*)*10 + 2, v_isMeta_8099_);
v___x_8105_ = v_reuseFailAlloc_8106_;
goto v_reusejp_8104_;
}
v_reusejp_8104_:
{
lean_ctor_set_uint8(v___x_8105_, sizeof(void*)*10, v___x_8087_);
return v___x_8105_;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_elabDeriving___lam__0___boxed(lean_object* v___x_8108_, lean_object* v_sc_8109_){
_start:
{
uint8_t v___x_6897__boxed_8110_; lean_object* v_res_8111_; 
v___x_6897__boxed_8110_ = lean_unbox(v___x_8108_);
v_res_8111_ = l_Lean_Elab_elabDeriving___lam__0(v___x_6897__boxed_8110_, v_sc_8109_);
return v_res_8111_;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Elab_elabDeriving_spec__5(lean_object* v_a_8112_, lean_object* v_as_8113_, size_t v_sz_8114_, size_t v_i_8115_, lean_object* v_b_8116_, lean_object* v___y_8117_, lean_object* v___y_8118_){
_start:
{
uint8_t v___x_8120_; 
v___x_8120_ = lean_usize_dec_lt(v_i_8115_, v_sz_8114_);
if (v___x_8120_ == 0)
{
lean_object* v___x_8121_; 
lean_dec(v___y_8118_);
lean_dec_ref(v___y_8117_);
lean_dec_ref(v_a_8112_);
v___x_8121_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_8121_, 0, v_b_8116_);
return v___x_8121_;
}
else
{
lean_object* v_a_8122_; lean_object* v___x_8123_; 
v_a_8122_ = lean_array_uget_borrowed(v_as_8113_, v_i_8115_);
lean_inc(v___y_8118_);
lean_inc_ref(v___y_8117_);
lean_inc_ref(v_a_8112_);
lean_inc(v_a_8122_);
v___x_8123_ = l_Lean_Elab_DerivingClassView_applyHandlers(v_a_8122_, v_a_8112_, v___y_8117_, v___y_8118_);
if (lean_obj_tag(v___x_8123_) == 0)
{
lean_object* v___x_8124_; size_t v___x_8125_; size_t v___x_8126_; 
lean_dec_ref(v___x_8123_);
v___x_8124_ = lean_box(0);
v___x_8125_ = ((size_t)1ULL);
v___x_8126_ = lean_usize_add(v_i_8115_, v___x_8125_);
v_i_8115_ = v___x_8126_;
v_b_8116_ = v___x_8124_;
goto _start;
}
else
{
lean_dec(v___y_8118_);
lean_dec_ref(v___y_8117_);
lean_dec_ref(v_a_8112_);
return v___x_8123_;
}
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Elab_elabDeriving_spec__5___boxed(lean_object* v_a_8128_, lean_object* v_as_8129_, lean_object* v_sz_8130_, lean_object* v_i_8131_, lean_object* v_b_8132_, lean_object* v___y_8133_, lean_object* v___y_8134_, lean_object* v___y_8135_){
_start:
{
size_t v_sz_boxed_8136_; size_t v_i_boxed_8137_; lean_object* v_res_8138_; 
v_sz_boxed_8136_ = lean_unbox_usize(v_sz_8130_);
lean_dec(v_sz_8130_);
v_i_boxed_8137_ = lean_unbox_usize(v_i_8131_);
lean_dec(v_i_8131_);
v_res_8138_ = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Elab_elabDeriving_spec__5(v_a_8128_, v_as_8129_, v_sz_boxed_8136_, v_i_boxed_8137_, v_b_8132_, v___y_8133_, v___y_8134_);
lean_dec_ref(v_as_8129_);
return v_res_8138_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_elabDeriving___lam__1(lean_object* v_a_8139_, lean_object* v_a_8140_, size_t v_sz_8141_, size_t v___x_8142_, lean_object* v___x_8143_, lean_object* v___y_8144_, lean_object* v___y_8145_){
_start:
{
lean_object* v___x_8147_; 
v___x_8147_ = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Elab_elabDeriving_spec__5(v_a_8139_, v_a_8140_, v_sz_8141_, v___x_8142_, v___x_8143_, v___y_8144_, v___y_8145_);
if (lean_obj_tag(v___x_8147_) == 0)
{
lean_object* v___x_8149_; uint8_t v_isShared_8150_; uint8_t v_isSharedCheck_8154_; 
v_isSharedCheck_8154_ = !lean_is_exclusive(v___x_8147_);
if (v_isSharedCheck_8154_ == 0)
{
lean_object* v_unused_8155_; 
v_unused_8155_ = lean_ctor_get(v___x_8147_, 0);
lean_dec(v_unused_8155_);
v___x_8149_ = v___x_8147_;
v_isShared_8150_ = v_isSharedCheck_8154_;
goto v_resetjp_8148_;
}
else
{
lean_dec(v___x_8147_);
v___x_8149_ = lean_box(0);
v_isShared_8150_ = v_isSharedCheck_8154_;
goto v_resetjp_8148_;
}
v_resetjp_8148_:
{
lean_object* v___x_8152_; 
if (v_isShared_8150_ == 0)
{
lean_ctor_set(v___x_8149_, 0, v___x_8143_);
v___x_8152_ = v___x_8149_;
goto v_reusejp_8151_;
}
else
{
lean_object* v_reuseFailAlloc_8153_; 
v_reuseFailAlloc_8153_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8153_, 0, v___x_8143_);
v___x_8152_ = v_reuseFailAlloc_8153_;
goto v_reusejp_8151_;
}
v_reusejp_8151_:
{
return v___x_8152_;
}
}
}
else
{
return v___x_8147_;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_elabDeriving___lam__1___boxed(lean_object* v_a_8156_, lean_object* v_a_8157_, lean_object* v_sz_8158_, lean_object* v___x_8159_, lean_object* v___x_8160_, lean_object* v___y_8161_, lean_object* v___y_8162_, lean_object* v___y_8163_){
_start:
{
size_t v_sz_boxed_8164_; size_t v___x_6944__boxed_8165_; lean_object* v_res_8166_; 
v_sz_boxed_8164_ = lean_unbox_usize(v_sz_8158_);
lean_dec(v_sz_8158_);
v___x_6944__boxed_8165_ = lean_unbox_usize(v___x_8159_);
lean_dec(v___x_8159_);
v_res_8166_ = l_Lean_Elab_elabDeriving___lam__1(v_a_8156_, v_a_8157_, v_sz_boxed_8164_, v___x_6944__boxed_8165_, v___x_8160_, v___y_8161_, v___y_8162_);
lean_dec_ref(v_a_8157_);
return v_res_8166_;
}
}
LEAN_EXPORT uint8_t l___private_Init_Data_Array_Basic_0__Array_anyMUnsafe_any___at___00Lean_Elab_elabDeriving_spec__7(uint8_t v___x_8167_, lean_object* v_as_8168_, size_t v_i_8169_, size_t v_stop_8170_){
_start:
{
uint8_t v___x_8171_; 
v___x_8171_ = lean_usize_dec_eq(v_i_8169_, v_stop_8170_);
if (v___x_8171_ == 0)
{
uint8_t v___x_8172_; uint8_t v___y_8174_; lean_object* v___x_8178_; uint8_t v___x_8179_; 
v___x_8172_ = 1;
v___x_8178_ = lean_array_uget_borrowed(v_as_8168_, v_i_8169_);
v___x_8179_ = l_Lean_Syntax_isIdent(v___x_8178_);
if (v___x_8179_ == 0)
{
v___y_8174_ = v___x_8167_;
goto v___jp_8173_;
}
else
{
v___y_8174_ = v___x_8171_;
goto v___jp_8173_;
}
v___jp_8173_:
{
if (v___y_8174_ == 0)
{
size_t v___x_8175_; size_t v___x_8176_; 
v___x_8175_ = ((size_t)1ULL);
v___x_8176_ = lean_usize_add(v_i_8169_, v___x_8175_);
v_i_8169_ = v___x_8176_;
goto _start;
}
else
{
return v___x_8172_;
}
}
}
else
{
uint8_t v___x_8180_; 
v___x_8180_ = 0;
return v___x_8180_;
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_anyMUnsafe_any___at___00Lean_Elab_elabDeriving_spec__7___boxed(lean_object* v___x_8181_, lean_object* v_as_8182_, lean_object* v_i_8183_, lean_object* v_stop_8184_){
_start:
{
uint8_t v___x_6983__boxed_8185_; size_t v_i_boxed_8186_; size_t v_stop_boxed_8187_; uint8_t v_res_8188_; lean_object* v_r_8189_; 
v___x_6983__boxed_8185_ = lean_unbox(v___x_8181_);
v_i_boxed_8186_ = lean_unbox_usize(v_i_8183_);
lean_dec(v_i_8183_);
v_stop_boxed_8187_ = lean_unbox_usize(v_stop_8184_);
lean_dec(v_stop_8184_);
v_res_8188_ = l___private_Init_Data_Array_Basic_0__Array_anyMUnsafe_any___at___00Lean_Elab_elabDeriving_spec__7(v___x_6983__boxed_8185_, v_as_8182_, v_i_boxed_8186_, v_stop_boxed_8187_);
lean_dec_ref(v_as_8182_);
v_r_8189_ = lean_box(v_res_8188_);
return v_r_8189_;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Elab_elabDeriving_spec__2(size_t v_sz_8190_, size_t v_i_8191_, lean_object* v_bs_8192_, lean_object* v___y_8193_, lean_object* v___y_8194_){
_start:
{
uint8_t v___x_8196_; 
v___x_8196_ = lean_usize_dec_lt(v_i_8191_, v_sz_8190_);
if (v___x_8196_ == 0)
{
lean_object* v___x_8197_; 
lean_dec(v___y_8194_);
lean_dec_ref(v___y_8193_);
v___x_8197_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_8197_, 0, v_bs_8192_);
return v___x_8197_;
}
else
{
lean_object* v_v_8198_; lean_object* v___x_8199_; lean_object* v___x_8200_; 
v_v_8198_ = lean_array_uget_borrowed(v_bs_8192_, v_i_8191_);
v___x_8199_ = lean_box(0);
lean_inc(v___y_8194_);
lean_inc_ref(v___y_8193_);
lean_inc(v_v_8198_);
v___x_8200_ = l_Lean_Elab_realizeGlobalConstNoOverloadWithInfo(v_v_8198_, v___x_8199_, v___y_8193_, v___y_8194_);
if (lean_obj_tag(v___x_8200_) == 0)
{
lean_object* v_a_8201_; lean_object* v___x_8202_; lean_object* v_bs_x27_8203_; size_t v___x_8204_; size_t v___x_8205_; lean_object* v___x_8206_; 
v_a_8201_ = lean_ctor_get(v___x_8200_, 0);
lean_inc(v_a_8201_);
lean_dec_ref(v___x_8200_);
v___x_8202_ = lean_unsigned_to_nat(0u);
v_bs_x27_8203_ = lean_array_uset(v_bs_8192_, v_i_8191_, v___x_8202_);
v___x_8204_ = ((size_t)1ULL);
v___x_8205_ = lean_usize_add(v_i_8191_, v___x_8204_);
v___x_8206_ = lean_array_uset(v_bs_x27_8203_, v_i_8191_, v_a_8201_);
v_i_8191_ = v___x_8205_;
v_bs_8192_ = v___x_8206_;
goto _start;
}
else
{
lean_object* v_a_8208_; lean_object* v___x_8210_; uint8_t v_isShared_8211_; uint8_t v_isSharedCheck_8215_; 
lean_dec(v___y_8194_);
lean_dec_ref(v___y_8193_);
lean_dec_ref(v_bs_8192_);
v_a_8208_ = lean_ctor_get(v___x_8200_, 0);
v_isSharedCheck_8215_ = !lean_is_exclusive(v___x_8200_);
if (v_isSharedCheck_8215_ == 0)
{
v___x_8210_ = v___x_8200_;
v_isShared_8211_ = v_isSharedCheck_8215_;
goto v_resetjp_8209_;
}
else
{
lean_inc(v_a_8208_);
lean_dec(v___x_8200_);
v___x_8210_ = lean_box(0);
v_isShared_8211_ = v_isSharedCheck_8215_;
goto v_resetjp_8209_;
}
v_resetjp_8209_:
{
lean_object* v___x_8213_; 
if (v_isShared_8211_ == 0)
{
v___x_8213_ = v___x_8210_;
goto v_reusejp_8212_;
}
else
{
lean_object* v_reuseFailAlloc_8214_; 
v_reuseFailAlloc_8214_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8214_, 0, v_a_8208_);
v___x_8213_ = v_reuseFailAlloc_8214_;
goto v_reusejp_8212_;
}
v_reusejp_8212_:
{
return v___x_8213_;
}
}
}
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Elab_elabDeriving_spec__2___boxed(lean_object* v_sz_8216_, lean_object* v_i_8217_, lean_object* v_bs_8218_, lean_object* v___y_8219_, lean_object* v___y_8220_, lean_object* v___y_8221_){
_start:
{
size_t v_sz_boxed_8222_; size_t v_i_boxed_8223_; lean_object* v_res_8224_; 
v_sz_boxed_8222_ = lean_unbox_usize(v_sz_8216_);
lean_dec(v_sz_8216_);
v_i_boxed_8223_ = lean_unbox_usize(v_i_8217_);
lean_dec(v_i_8217_);
v_res_8224_ = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Elab_elabDeriving_spec__2(v_sz_boxed_8222_, v_i_boxed_8223_, v_bs_8218_, v___y_8219_, v___y_8220_);
return v_res_8224_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwErrorAt___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4_spec__9_spec__11___redArg(lean_object* v_ref_8225_, lean_object* v_msg_8226_, lean_object* v___y_8227_, lean_object* v___y_8228_){
_start:
{
lean_object* v___x_8230_; 
v___x_8230_ = l_Lean_Elab_Command_getRef___redArg(v___y_8227_);
if (lean_obj_tag(v___x_8230_) == 0)
{
lean_object* v_a_8231_; lean_object* v_fileName_8232_; lean_object* v_fileMap_8233_; lean_object* v_currRecDepth_8234_; lean_object* v_cmdPos_8235_; lean_object* v_macroStack_8236_; lean_object* v_quotContext_x3f_8237_; lean_object* v_currMacroScope_8238_; lean_object* v_snap_x3f_8239_; lean_object* v_cancelTk_x3f_8240_; uint8_t v_suppressElabErrors_8241_; lean_object* v___x_8243_; uint8_t v_isShared_8244_; uint8_t v_isSharedCheck_8250_; 
v_a_8231_ = lean_ctor_get(v___x_8230_, 0);
lean_inc(v_a_8231_);
lean_dec_ref(v___x_8230_);
v_fileName_8232_ = lean_ctor_get(v___y_8227_, 0);
v_fileMap_8233_ = lean_ctor_get(v___y_8227_, 1);
v_currRecDepth_8234_ = lean_ctor_get(v___y_8227_, 2);
v_cmdPos_8235_ = lean_ctor_get(v___y_8227_, 3);
v_macroStack_8236_ = lean_ctor_get(v___y_8227_, 4);
v_quotContext_x3f_8237_ = lean_ctor_get(v___y_8227_, 5);
v_currMacroScope_8238_ = lean_ctor_get(v___y_8227_, 6);
v_snap_x3f_8239_ = lean_ctor_get(v___y_8227_, 8);
v_cancelTk_x3f_8240_ = lean_ctor_get(v___y_8227_, 9);
v_suppressElabErrors_8241_ = lean_ctor_get_uint8(v___y_8227_, sizeof(void*)*10);
v_isSharedCheck_8250_ = !lean_is_exclusive(v___y_8227_);
if (v_isSharedCheck_8250_ == 0)
{
lean_object* v_unused_8251_; 
v_unused_8251_ = lean_ctor_get(v___y_8227_, 7);
lean_dec(v_unused_8251_);
v___x_8243_ = v___y_8227_;
v_isShared_8244_ = v_isSharedCheck_8250_;
goto v_resetjp_8242_;
}
else
{
lean_inc(v_cancelTk_x3f_8240_);
lean_inc(v_snap_x3f_8239_);
lean_inc(v_currMacroScope_8238_);
lean_inc(v_quotContext_x3f_8237_);
lean_inc(v_macroStack_8236_);
lean_inc(v_cmdPos_8235_);
lean_inc(v_currRecDepth_8234_);
lean_inc(v_fileMap_8233_);
lean_inc(v_fileName_8232_);
lean_dec(v___y_8227_);
v___x_8243_ = lean_box(0);
v_isShared_8244_ = v_isSharedCheck_8250_;
goto v_resetjp_8242_;
}
v_resetjp_8242_:
{
lean_object* v_ref_8245_; lean_object* v___x_8247_; 
v_ref_8245_ = l_Lean_replaceRef(v_ref_8225_, v_a_8231_);
lean_dec(v_a_8231_);
if (v_isShared_8244_ == 0)
{
lean_ctor_set(v___x_8243_, 7, v_ref_8245_);
v___x_8247_ = v___x_8243_;
goto v_reusejp_8246_;
}
else
{
lean_object* v_reuseFailAlloc_8249_; 
v_reuseFailAlloc_8249_ = lean_alloc_ctor(0, 10, 1);
lean_ctor_set(v_reuseFailAlloc_8249_, 0, v_fileName_8232_);
lean_ctor_set(v_reuseFailAlloc_8249_, 1, v_fileMap_8233_);
lean_ctor_set(v_reuseFailAlloc_8249_, 2, v_currRecDepth_8234_);
lean_ctor_set(v_reuseFailAlloc_8249_, 3, v_cmdPos_8235_);
lean_ctor_set(v_reuseFailAlloc_8249_, 4, v_macroStack_8236_);
lean_ctor_set(v_reuseFailAlloc_8249_, 5, v_quotContext_x3f_8237_);
lean_ctor_set(v_reuseFailAlloc_8249_, 6, v_currMacroScope_8238_);
lean_ctor_set(v_reuseFailAlloc_8249_, 7, v_ref_8245_);
lean_ctor_set(v_reuseFailAlloc_8249_, 8, v_snap_x3f_8239_);
lean_ctor_set(v_reuseFailAlloc_8249_, 9, v_cancelTk_x3f_8240_);
lean_ctor_set_uint8(v_reuseFailAlloc_8249_, sizeof(void*)*10, v_suppressElabErrors_8241_);
v___x_8247_ = v_reuseFailAlloc_8249_;
goto v_reusejp_8246_;
}
v_reusejp_8246_:
{
lean_object* v___x_8248_; 
v___x_8248_ = l_Lean_throwError___at___00Lean_Elab_applyDerivingHandlers_spec__2___redArg(v_msg_8226_, v___x_8247_, v___y_8228_);
return v___x_8248_;
}
}
}
else
{
lean_object* v_a_8252_; lean_object* v___x_8254_; uint8_t v_isShared_8255_; uint8_t v_isSharedCheck_8259_; 
lean_dec_ref(v___y_8227_);
lean_dec_ref(v_msg_8226_);
v_a_8252_ = lean_ctor_get(v___x_8230_, 0);
v_isSharedCheck_8259_ = !lean_is_exclusive(v___x_8230_);
if (v_isSharedCheck_8259_ == 0)
{
v___x_8254_ = v___x_8230_;
v_isShared_8255_ = v_isSharedCheck_8259_;
goto v_resetjp_8253_;
}
else
{
lean_inc(v_a_8252_);
lean_dec(v___x_8230_);
v___x_8254_ = lean_box(0);
v_isShared_8255_ = v_isSharedCheck_8259_;
goto v_resetjp_8253_;
}
v_resetjp_8253_:
{
lean_object* v___x_8257_; 
if (v_isShared_8255_ == 0)
{
v___x_8257_ = v___x_8254_;
goto v_reusejp_8256_;
}
else
{
lean_object* v_reuseFailAlloc_8258_; 
v_reuseFailAlloc_8258_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8258_, 0, v_a_8252_);
v___x_8257_ = v_reuseFailAlloc_8258_;
goto v_reusejp_8256_;
}
v_reusejp_8256_:
{
return v___x_8257_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_throwErrorAt___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4_spec__9_spec__11___redArg___boxed(lean_object* v_ref_8260_, lean_object* v_msg_8261_, lean_object* v___y_8262_, lean_object* v___y_8263_, lean_object* v___y_8264_){
_start:
{
lean_object* v_res_8265_; 
v_res_8265_ = l_Lean_throwErrorAt___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4_spec__9_spec__11___redArg(v_ref_8260_, v_msg_8261_, v___y_8262_, v___y_8263_);
lean_dec(v___y_8263_);
lean_dec(v_ref_8260_);
return v_res_8265_;
}
}
LEAN_EXPORT lean_object* l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4_spec__9_spec__10_spec__11___redArg(lean_object* v_msg_8266_, lean_object* v_declHint_8267_, lean_object* v___y_8268_){
_start:
{
lean_object* v___x_8270_; lean_object* v_env_8271_; uint8_t v___x_8272_; 
v___x_8270_ = lean_st_ref_get(v___y_8268_);
v_env_8271_ = lean_ctor_get(v___x_8270_, 0);
lean_inc_ref(v_env_8271_);
lean_dec(v___x_8270_);
v___x_8272_ = l_Lean_Name_isAnonymous(v_declHint_8267_);
if (v___x_8272_ == 0)
{
uint8_t v_isExporting_8273_; 
v_isExporting_8273_ = lean_ctor_get_uint8(v_env_8271_, sizeof(void*)*8);
if (v_isExporting_8273_ == 0)
{
lean_object* v___x_8274_; 
lean_dec_ref(v_env_8271_);
lean_dec(v_declHint_8267_);
v___x_8274_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_8274_, 0, v_msg_8266_);
return v___x_8274_;
}
else
{
lean_object* v___x_8275_; uint8_t v___x_8276_; 
lean_inc_ref(v_env_8271_);
v___x_8275_ = l_Lean_Environment_setExporting(v_env_8271_, v___x_8272_);
lean_inc(v_declHint_8267_);
lean_inc_ref(v___x_8275_);
v___x_8276_ = l_Lean_Environment_contains(v___x_8275_, v_declHint_8267_, v_isExporting_8273_);
if (v___x_8276_ == 0)
{
lean_object* v___x_8277_; 
lean_dec_ref(v___x_8275_);
lean_dec_ref(v_env_8271_);
lean_dec(v_declHint_8267_);
v___x_8277_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_8277_, 0, v_msg_8266_);
return v___x_8277_;
}
else
{
lean_object* v___x_8278_; lean_object* v___x_8279_; lean_object* v___x_8280_; lean_object* v___x_8281_; lean_object* v___x_8282_; lean_object* v___x_8283_; lean_object* v___x_8284_; lean_object* v_c_8285_; lean_object* v___x_8286_; 
v___x_8278_ = lean_obj_once(&l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__2, &l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__2_once, _init_l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__2);
v___x_8279_ = lean_unsigned_to_nat(32u);
v___x_8280_ = lean_mk_empty_array_with_capacity(v___x_8279_);
lean_dec_ref(v___x_8280_);
v___x_8281_ = lean_obj_once(&l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__5, &l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__5_once, _init_l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__5);
v___x_8282_ = l_Lean_Options_empty;
v___x_8283_ = lean_alloc_ctor(0, 4, 0);
lean_ctor_set(v___x_8283_, 0, v___x_8275_);
lean_ctor_set(v___x_8283_, 1, v___x_8278_);
lean_ctor_set(v___x_8283_, 2, v___x_8281_);
lean_ctor_set(v___x_8283_, 3, v___x_8282_);
lean_inc(v_declHint_8267_);
v___x_8284_ = l_Lean_MessageData_ofConstName(v_declHint_8267_, v___x_8272_);
v_c_8285_ = lean_alloc_ctor(3, 2, 0);
lean_ctor_set(v_c_8285_, 0, v___x_8283_);
lean_ctor_set(v_c_8285_, 1, v___x_8284_);
v___x_8286_ = l_Lean_Environment_getModuleIdxFor_x3f(v_env_8271_, v_declHint_8267_);
if (lean_obj_tag(v___x_8286_) == 0)
{
lean_object* v___x_8287_; lean_object* v___x_8288_; lean_object* v___x_8289_; lean_object* v___x_8290_; lean_object* v___x_8291_; lean_object* v___x_8292_; lean_object* v___x_8293_; 
lean_dec_ref(v_env_8271_);
lean_dec(v_declHint_8267_);
v___x_8287_ = lean_obj_once(&l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__7, &l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__7_once, _init_l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__7);
v___x_8288_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_8288_, 0, v___x_8287_);
lean_ctor_set(v___x_8288_, 1, v_c_8285_);
v___x_8289_ = lean_obj_once(&l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__9, &l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__9_once, _init_l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__9);
v___x_8290_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_8290_, 0, v___x_8288_);
lean_ctor_set(v___x_8290_, 1, v___x_8289_);
v___x_8291_ = l_Lean_MessageData_note(v___x_8290_);
v___x_8292_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_8292_, 0, v_msg_8266_);
lean_ctor_set(v___x_8292_, 1, v___x_8291_);
v___x_8293_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_8293_, 0, v___x_8292_);
return v___x_8293_;
}
else
{
lean_object* v_val_8294_; lean_object* v___x_8296_; uint8_t v_isShared_8297_; uint8_t v_isSharedCheck_8329_; 
v_val_8294_ = lean_ctor_get(v___x_8286_, 0);
v_isSharedCheck_8329_ = !lean_is_exclusive(v___x_8286_);
if (v_isSharedCheck_8329_ == 0)
{
v___x_8296_ = v___x_8286_;
v_isShared_8297_ = v_isSharedCheck_8329_;
goto v_resetjp_8295_;
}
else
{
lean_inc(v_val_8294_);
lean_dec(v___x_8286_);
v___x_8296_ = lean_box(0);
v_isShared_8297_ = v_isSharedCheck_8329_;
goto v_resetjp_8295_;
}
v_resetjp_8295_:
{
lean_object* v___x_8298_; lean_object* v___x_8299_; lean_object* v___x_8300_; lean_object* v_mod_8301_; uint8_t v___x_8302_; 
v___x_8298_ = lean_box(0);
v___x_8299_ = l_Lean_Environment_header(v_env_8271_);
lean_dec_ref(v_env_8271_);
v___x_8300_ = l_Lean_EnvironmentHeader_moduleNames(v___x_8299_);
v_mod_8301_ = lean_array_get(v___x_8298_, v___x_8300_, v_val_8294_);
lean_dec(v_val_8294_);
lean_dec_ref(v___x_8300_);
v___x_8302_ = l_Lean_isPrivateName(v_declHint_8267_);
lean_dec(v_declHint_8267_);
if (v___x_8302_ == 0)
{
lean_object* v___x_8303_; lean_object* v___x_8304_; lean_object* v___x_8305_; lean_object* v___x_8306_; lean_object* v___x_8307_; lean_object* v___x_8308_; lean_object* v___x_8309_; lean_object* v___x_8310_; lean_object* v___x_8311_; lean_object* v___x_8312_; lean_object* v___x_8314_; 
v___x_8303_ = lean_obj_once(&l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__11, &l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__11_once, _init_l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__11);
v___x_8304_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_8304_, 0, v___x_8303_);
lean_ctor_set(v___x_8304_, 1, v_c_8285_);
v___x_8305_ = lean_obj_once(&l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__13, &l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__13_once, _init_l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__13);
v___x_8306_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_8306_, 0, v___x_8304_);
lean_ctor_set(v___x_8306_, 1, v___x_8305_);
v___x_8307_ = l_Lean_MessageData_ofName(v_mod_8301_);
v___x_8308_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_8308_, 0, v___x_8306_);
lean_ctor_set(v___x_8308_, 1, v___x_8307_);
v___x_8309_ = lean_obj_once(&l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__15, &l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__15_once, _init_l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__15);
v___x_8310_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_8310_, 0, v___x_8308_);
lean_ctor_set(v___x_8310_, 1, v___x_8309_);
v___x_8311_ = l_Lean_MessageData_note(v___x_8310_);
v___x_8312_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_8312_, 0, v_msg_8266_);
lean_ctor_set(v___x_8312_, 1, v___x_8311_);
if (v_isShared_8297_ == 0)
{
lean_ctor_set_tag(v___x_8296_, 0);
lean_ctor_set(v___x_8296_, 0, v___x_8312_);
v___x_8314_ = v___x_8296_;
goto v_reusejp_8313_;
}
else
{
lean_object* v_reuseFailAlloc_8315_; 
v_reuseFailAlloc_8315_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8315_, 0, v___x_8312_);
v___x_8314_ = v_reuseFailAlloc_8315_;
goto v_reusejp_8313_;
}
v_reusejp_8313_:
{
return v___x_8314_;
}
}
else
{
lean_object* v___x_8316_; lean_object* v___x_8317_; lean_object* v___x_8318_; lean_object* v___x_8319_; lean_object* v___x_8320_; lean_object* v___x_8321_; lean_object* v___x_8322_; lean_object* v___x_8323_; lean_object* v___x_8324_; lean_object* v___x_8325_; lean_object* v___x_8327_; 
v___x_8316_ = lean_obj_once(&l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__7, &l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__7_once, _init_l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__7);
v___x_8317_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_8317_, 0, v___x_8316_);
lean_ctor_set(v___x_8317_, 1, v_c_8285_);
v___x_8318_ = lean_obj_once(&l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__17, &l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__17_once, _init_l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__17);
v___x_8319_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_8319_, 0, v___x_8317_);
lean_ctor_set(v___x_8319_, 1, v___x_8318_);
v___x_8320_ = l_Lean_MessageData_ofName(v_mod_8301_);
v___x_8321_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_8321_, 0, v___x_8319_);
lean_ctor_set(v___x_8321_, 1, v___x_8320_);
v___x_8322_ = lean_obj_once(&l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__19, &l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__19_once, _init_l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10_spec__20_spec__26_spec__30___redArg___closed__19);
v___x_8323_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_8323_, 0, v___x_8321_);
lean_ctor_set(v___x_8323_, 1, v___x_8322_);
v___x_8324_ = l_Lean_MessageData_note(v___x_8323_);
v___x_8325_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_8325_, 0, v_msg_8266_);
lean_ctor_set(v___x_8325_, 1, v___x_8324_);
if (v_isShared_8297_ == 0)
{
lean_ctor_set_tag(v___x_8296_, 0);
lean_ctor_set(v___x_8296_, 0, v___x_8325_);
v___x_8327_ = v___x_8296_;
goto v_reusejp_8326_;
}
else
{
lean_object* v_reuseFailAlloc_8328_; 
v_reuseFailAlloc_8328_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8328_, 0, v___x_8325_);
v___x_8327_ = v_reuseFailAlloc_8328_;
goto v_reusejp_8326_;
}
v_reusejp_8326_:
{
return v___x_8327_;
}
}
}
}
}
}
}
else
{
lean_object* v___x_8330_; 
lean_dec_ref(v_env_8271_);
lean_dec(v_declHint_8267_);
v___x_8330_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_8330_, 0, v_msg_8266_);
return v___x_8330_;
}
}
}
LEAN_EXPORT lean_object* l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4_spec__9_spec__10_spec__11___redArg___boxed(lean_object* v_msg_8331_, lean_object* v_declHint_8332_, lean_object* v___y_8333_, lean_object* v___y_8334_){
_start:
{
lean_object* v_res_8335_; 
v_res_8335_ = l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4_spec__9_spec__10_spec__11___redArg(v_msg_8331_, v_declHint_8332_, v___y_8333_);
lean_dec(v___y_8333_);
return v_res_8335_;
}
}
LEAN_EXPORT lean_object* l_Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4_spec__9_spec__10(lean_object* v_msg_8336_, lean_object* v_declHint_8337_, lean_object* v___y_8338_, lean_object* v___y_8339_){
_start:
{
lean_object* v___x_8341_; lean_object* v_a_8342_; lean_object* v___x_8344_; uint8_t v_isShared_8345_; uint8_t v_isSharedCheck_8351_; 
v___x_8341_ = l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4_spec__9_spec__10_spec__11___redArg(v_msg_8336_, v_declHint_8337_, v___y_8339_);
v_a_8342_ = lean_ctor_get(v___x_8341_, 0);
v_isSharedCheck_8351_ = !lean_is_exclusive(v___x_8341_);
if (v_isSharedCheck_8351_ == 0)
{
v___x_8344_ = v___x_8341_;
v_isShared_8345_ = v_isSharedCheck_8351_;
goto v_resetjp_8343_;
}
else
{
lean_inc(v_a_8342_);
lean_dec(v___x_8341_);
v___x_8344_ = lean_box(0);
v_isShared_8345_ = v_isSharedCheck_8351_;
goto v_resetjp_8343_;
}
v_resetjp_8343_:
{
lean_object* v___x_8346_; lean_object* v___x_8347_; lean_object* v___x_8349_; 
v___x_8346_ = l_Lean_unknownIdentifierMessageTag;
v___x_8347_ = lean_alloc_ctor(8, 2, 0);
lean_ctor_set(v___x_8347_, 0, v___x_8346_);
lean_ctor_set(v___x_8347_, 1, v_a_8342_);
if (v_isShared_8345_ == 0)
{
lean_ctor_set(v___x_8344_, 0, v___x_8347_);
v___x_8349_ = v___x_8344_;
goto v_reusejp_8348_;
}
else
{
lean_object* v_reuseFailAlloc_8350_; 
v_reuseFailAlloc_8350_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8350_, 0, v___x_8347_);
v___x_8349_ = v_reuseFailAlloc_8350_;
goto v_reusejp_8348_;
}
v_reusejp_8348_:
{
return v___x_8349_;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4_spec__9_spec__10___boxed(lean_object* v_msg_8352_, lean_object* v_declHint_8353_, lean_object* v___y_8354_, lean_object* v___y_8355_, lean_object* v___y_8356_){
_start:
{
lean_object* v_res_8357_; 
v_res_8357_ = l_Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4_spec__9_spec__10(v_msg_8352_, v_declHint_8353_, v___y_8354_, v___y_8355_);
lean_dec(v___y_8355_);
lean_dec_ref(v___y_8354_);
return v_res_8357_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4_spec__9___redArg(lean_object* v_ref_8358_, lean_object* v_msg_8359_, lean_object* v_declHint_8360_, lean_object* v___y_8361_, lean_object* v___y_8362_){
_start:
{
lean_object* v___x_8364_; lean_object* v_a_8365_; lean_object* v___x_8366_; 
v___x_8364_ = l_Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4_spec__9_spec__10(v_msg_8359_, v_declHint_8360_, v___y_8361_, v___y_8362_);
v_a_8365_ = lean_ctor_get(v___x_8364_, 0);
lean_inc(v_a_8365_);
lean_dec_ref(v___x_8364_);
v___x_8366_ = l_Lean_throwErrorAt___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4_spec__9_spec__11___redArg(v_ref_8358_, v_a_8365_, v___y_8361_, v___y_8362_);
return v___x_8366_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4_spec__9___redArg___boxed(lean_object* v_ref_8367_, lean_object* v_msg_8368_, lean_object* v_declHint_8369_, lean_object* v___y_8370_, lean_object* v___y_8371_, lean_object* v___y_8372_){
_start:
{
lean_object* v_res_8373_; 
v_res_8373_ = l_Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4_spec__9___redArg(v_ref_8367_, v_msg_8368_, v_declHint_8369_, v___y_8370_, v___y_8371_);
lean_dec(v___y_8371_);
lean_dec(v_ref_8367_);
return v_res_8373_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4___redArg(lean_object* v_ref_8374_, lean_object* v_constName_8375_, lean_object* v___y_8376_, lean_object* v___y_8377_){
_start:
{
lean_object* v___x_8379_; uint8_t v___x_8380_; lean_object* v___x_8381_; lean_object* v___x_8382_; lean_object* v___x_8383_; lean_object* v___x_8384_; lean_object* v___x_8385_; 
v___x_8379_ = lean_obj_once(&l_Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10___redArg___closed__1, &l_Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10___redArg___closed__1_once, _init_l_Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_Term_processDefDeriving_spec__6_spec__6_spec__10___redArg___closed__1);
v___x_8380_ = 0;
lean_inc(v_constName_8375_);
v___x_8381_ = l_Lean_MessageData_ofConstName(v_constName_8375_, v___x_8380_);
v___x_8382_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_8382_, 0, v___x_8379_);
lean_ctor_set(v___x_8382_, 1, v___x_8381_);
v___x_8383_ = lean_obj_once(&l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__5, &l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__5_once, _init_l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_throwDeltaDeriveFailure___redArg___closed__5);
v___x_8384_ = lean_alloc_ctor(7, 2, 0);
lean_ctor_set(v___x_8384_, 0, v___x_8382_);
lean_ctor_set(v___x_8384_, 1, v___x_8383_);
v___x_8385_ = l_Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4_spec__9___redArg(v_ref_8374_, v___x_8384_, v_constName_8375_, v___y_8376_, v___y_8377_);
return v___x_8385_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4___redArg___boxed(lean_object* v_ref_8386_, lean_object* v_constName_8387_, lean_object* v___y_8388_, lean_object* v___y_8389_, lean_object* v___y_8390_){
_start:
{
lean_object* v_res_8391_; 
v_res_8391_ = l_Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4___redArg(v_ref_8386_, v_constName_8387_, v___y_8388_, v___y_8389_);
lean_dec(v___y_8389_);
lean_dec(v_ref_8386_);
return v_res_8391_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3___redArg(lean_object* v_constName_8392_, lean_object* v___y_8393_, lean_object* v___y_8394_){
_start:
{
lean_object* v___x_8396_; 
v___x_8396_ = l_Lean_Elab_Command_getRef___redArg(v___y_8393_);
if (lean_obj_tag(v___x_8396_) == 0)
{
lean_object* v_a_8397_; lean_object* v___x_8398_; 
v_a_8397_ = lean_ctor_get(v___x_8396_, 0);
lean_inc(v_a_8397_);
lean_dec_ref(v___x_8396_);
v___x_8398_ = l_Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4___redArg(v_a_8397_, v_constName_8392_, v___y_8393_, v___y_8394_);
lean_dec(v_a_8397_);
return v___x_8398_;
}
else
{
lean_object* v_a_8399_; lean_object* v___x_8401_; uint8_t v_isShared_8402_; uint8_t v_isSharedCheck_8406_; 
lean_dec_ref(v___y_8393_);
lean_dec(v_constName_8392_);
v_a_8399_ = lean_ctor_get(v___x_8396_, 0);
v_isSharedCheck_8406_ = !lean_is_exclusive(v___x_8396_);
if (v_isSharedCheck_8406_ == 0)
{
v___x_8401_ = v___x_8396_;
v_isShared_8402_ = v_isSharedCheck_8406_;
goto v_resetjp_8400_;
}
else
{
lean_inc(v_a_8399_);
lean_dec(v___x_8396_);
v___x_8401_ = lean_box(0);
v_isShared_8402_ = v_isSharedCheck_8406_;
goto v_resetjp_8400_;
}
v_resetjp_8400_:
{
lean_object* v___x_8404_; 
if (v_isShared_8402_ == 0)
{
v___x_8404_ = v___x_8401_;
goto v_reusejp_8403_;
}
else
{
lean_object* v_reuseFailAlloc_8405_; 
v_reuseFailAlloc_8405_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8405_, 0, v_a_8399_);
v___x_8404_ = v_reuseFailAlloc_8405_;
goto v_reusejp_8403_;
}
v_reusejp_8403_:
{
return v___x_8404_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3___redArg___boxed(lean_object* v_constName_8407_, lean_object* v___y_8408_, lean_object* v___y_8409_, lean_object* v___y_8410_){
_start:
{
lean_object* v_res_8411_; 
v_res_8411_ = l_Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3___redArg(v_constName_8407_, v___y_8408_, v___y_8409_);
lean_dec(v___y_8409_);
return v_res_8411_;
}
}
LEAN_EXPORT lean_object* l_Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3(lean_object* v_constName_8412_, lean_object* v___y_8413_, lean_object* v___y_8414_){
_start:
{
lean_object* v___x_8416_; lean_object* v_env_8417_; uint8_t v___x_8418_; lean_object* v___x_8419_; 
v___x_8416_ = lean_st_ref_get(v___y_8414_);
v_env_8417_ = lean_ctor_get(v___x_8416_, 0);
lean_inc_ref(v_env_8417_);
lean_dec(v___x_8416_);
v___x_8418_ = 0;
lean_inc(v_constName_8412_);
v___x_8419_ = l_Lean_Environment_find_x3f(v_env_8417_, v_constName_8412_, v___x_8418_);
if (lean_obj_tag(v___x_8419_) == 0)
{
lean_object* v___x_8420_; 
v___x_8420_ = l_Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3___redArg(v_constName_8412_, v___y_8413_, v___y_8414_);
return v___x_8420_;
}
else
{
lean_object* v_val_8421_; lean_object* v___x_8423_; uint8_t v_isShared_8424_; uint8_t v_isSharedCheck_8428_; 
lean_dec_ref(v___y_8413_);
lean_dec(v_constName_8412_);
v_val_8421_ = lean_ctor_get(v___x_8419_, 0);
v_isSharedCheck_8428_ = !lean_is_exclusive(v___x_8419_);
if (v_isSharedCheck_8428_ == 0)
{
v___x_8423_ = v___x_8419_;
v_isShared_8424_ = v_isSharedCheck_8428_;
goto v_resetjp_8422_;
}
else
{
lean_inc(v_val_8421_);
lean_dec(v___x_8419_);
v___x_8423_ = lean_box(0);
v_isShared_8424_ = v_isSharedCheck_8428_;
goto v_resetjp_8422_;
}
v_resetjp_8422_:
{
lean_object* v___x_8426_; 
if (v_isShared_8424_ == 0)
{
lean_ctor_set_tag(v___x_8423_, 0);
v___x_8426_ = v___x_8423_;
goto v_reusejp_8425_;
}
else
{
lean_object* v_reuseFailAlloc_8427_; 
v_reuseFailAlloc_8427_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8427_, 0, v_val_8421_);
v___x_8426_ = v_reuseFailAlloc_8427_;
goto v_reusejp_8425_;
}
v_reusejp_8425_:
{
return v___x_8426_;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3___boxed(lean_object* v_constName_8429_, lean_object* v___y_8430_, lean_object* v___y_8431_, lean_object* v___y_8432_){
_start:
{
lean_object* v_res_8433_; 
v_res_8433_ = l_Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3(v_constName_8429_, v___y_8430_, v___y_8431_);
lean_dec(v___y_8431_);
return v_res_8433_;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Elab_elabDeriving_spec__4(size_t v_sz_8434_, size_t v_i_8435_, lean_object* v_bs_8436_, lean_object* v___y_8437_, lean_object* v___y_8438_){
_start:
{
uint8_t v___x_8440_; 
v___x_8440_ = lean_usize_dec_lt(v_i_8435_, v_sz_8434_);
if (v___x_8440_ == 0)
{
lean_object* v___x_8441_; 
lean_dec_ref(v___y_8437_);
v___x_8441_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v___x_8441_, 0, v_bs_8436_);
return v___x_8441_;
}
else
{
lean_object* v_v_8442_; lean_object* v___x_8443_; 
v_v_8442_ = lean_array_uget_borrowed(v_bs_8436_, v_i_8435_);
lean_inc_ref(v___y_8437_);
lean_inc(v_v_8442_);
v___x_8443_ = l_Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3(v_v_8442_, v___y_8437_, v___y_8438_);
if (lean_obj_tag(v___x_8443_) == 0)
{
lean_object* v_a_8444_; lean_object* v___x_8445_; lean_object* v_bs_x27_8446_; size_t v___x_8447_; size_t v___x_8448_; lean_object* v___x_8449_; 
v_a_8444_ = lean_ctor_get(v___x_8443_, 0);
lean_inc(v_a_8444_);
lean_dec_ref(v___x_8443_);
v___x_8445_ = lean_unsigned_to_nat(0u);
v_bs_x27_8446_ = lean_array_uset(v_bs_8436_, v_i_8435_, v___x_8445_);
v___x_8447_ = ((size_t)1ULL);
v___x_8448_ = lean_usize_add(v_i_8435_, v___x_8447_);
v___x_8449_ = lean_array_uset(v_bs_x27_8446_, v_i_8435_, v_a_8444_);
v_i_8435_ = v___x_8448_;
v_bs_8436_ = v___x_8449_;
goto _start;
}
else
{
lean_object* v_a_8451_; lean_object* v___x_8453_; uint8_t v_isShared_8454_; uint8_t v_isSharedCheck_8458_; 
lean_dec_ref(v___y_8437_);
lean_dec_ref(v_bs_8436_);
v_a_8451_ = lean_ctor_get(v___x_8443_, 0);
v_isSharedCheck_8458_ = !lean_is_exclusive(v___x_8443_);
if (v_isSharedCheck_8458_ == 0)
{
v___x_8453_ = v___x_8443_;
v_isShared_8454_ = v_isSharedCheck_8458_;
goto v_resetjp_8452_;
}
else
{
lean_inc(v_a_8451_);
lean_dec(v___x_8443_);
v___x_8453_ = lean_box(0);
v_isShared_8454_ = v_isSharedCheck_8458_;
goto v_resetjp_8452_;
}
v_resetjp_8452_:
{
lean_object* v___x_8456_; 
if (v_isShared_8454_ == 0)
{
v___x_8456_ = v___x_8453_;
goto v_reusejp_8455_;
}
else
{
lean_object* v_reuseFailAlloc_8457_; 
v_reuseFailAlloc_8457_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8457_, 0, v_a_8451_);
v___x_8456_ = v_reuseFailAlloc_8457_;
goto v_reusejp_8455_;
}
v_reusejp_8455_:
{
return v___x_8456_;
}
}
}
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Elab_elabDeriving_spec__4___boxed(lean_object* v_sz_8459_, lean_object* v_i_8460_, lean_object* v_bs_8461_, lean_object* v___y_8462_, lean_object* v___y_8463_, lean_object* v___y_8464_){
_start:
{
size_t v_sz_boxed_8465_; size_t v_i_boxed_8466_; lean_object* v_res_8467_; 
v_sz_boxed_8465_ = lean_unbox_usize(v_sz_8459_);
lean_dec(v_sz_8459_);
v_i_boxed_8466_ = lean_unbox_usize(v_i_8460_);
lean_dec(v_i_8460_);
v_res_8467_ = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Elab_elabDeriving_spec__4(v_sz_boxed_8465_, v_i_boxed_8466_, v_bs_8461_, v___y_8462_, v___y_8463_);
lean_dec(v___y_8463_);
return v_res_8467_;
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Elab_elabDeriving_spec__1(size_t v_sz_8468_, size_t v_i_8469_, lean_object* v_bs_8470_){
_start:
{
uint8_t v___x_8471_; 
v___x_8471_ = lean_usize_dec_lt(v_i_8469_, v_sz_8468_);
if (v___x_8471_ == 0)
{
lean_object* v___x_8472_; 
v___x_8472_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_8472_, 0, v_bs_8470_);
return v___x_8472_;
}
else
{
lean_object* v_v_8473_; lean_object* v___x_8474_; lean_object* v_bs_x27_8475_; size_t v___x_8476_; size_t v___x_8477_; lean_object* v___x_8478_; 
v_v_8473_ = lean_array_uget(v_bs_8470_, v_i_8469_);
v___x_8474_ = lean_unsigned_to_nat(0u);
v_bs_x27_8475_ = lean_array_uset(v_bs_8470_, v_i_8469_, v___x_8474_);
v___x_8476_ = ((size_t)1ULL);
v___x_8477_ = lean_usize_add(v_i_8469_, v___x_8476_);
v___x_8478_ = lean_array_uset(v_bs_x27_8475_, v_i_8469_, v_v_8473_);
v_i_8469_ = v___x_8477_;
v_bs_8470_ = v___x_8478_;
goto _start;
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Elab_elabDeriving_spec__1___boxed(lean_object* v_sz_8480_, lean_object* v_i_8481_, lean_object* v_bs_8482_){
_start:
{
size_t v_sz_boxed_8483_; size_t v_i_boxed_8484_; lean_object* v_res_8485_; 
v_sz_boxed_8483_ = lean_unbox_usize(v_sz_8480_);
lean_dec(v_sz_8480_);
v_i_boxed_8484_ = lean_unbox_usize(v_i_8481_);
lean_dec(v_i_8481_);
v_res_8485_ = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Elab_elabDeriving_spec__1(v_sz_boxed_8483_, v_i_boxed_8484_, v_bs_8482_);
return v_res_8485_;
}
}
LEAN_EXPORT uint8_t l___private_Init_Data_Array_Basic_0__Array_anyMUnsafe_any___at___00Lean_Elab_elabDeriving_spec__6(lean_object* v_as_8486_, size_t v_i_8487_, size_t v_stop_8488_){
_start:
{
uint8_t v___x_8489_; 
v___x_8489_ = lean_usize_dec_eq(v_i_8487_, v_stop_8488_);
if (v___x_8489_ == 0)
{
lean_object* v___x_8490_; uint8_t v___x_8491_; 
v___x_8490_ = lean_array_uget_borrowed(v_as_8486_, v_i_8487_);
v___x_8491_ = l_Lean_ConstantInfo_isDefinition(v___x_8490_);
if (v___x_8491_ == 0)
{
size_t v___x_8492_; size_t v___x_8493_; 
v___x_8492_ = ((size_t)1ULL);
v___x_8493_ = lean_usize_add(v_i_8487_, v___x_8492_);
v_i_8487_ = v___x_8493_;
goto _start;
}
else
{
return v___x_8491_;
}
}
else
{
uint8_t v___x_8495_; 
v___x_8495_ = 0;
return v___x_8495_;
}
}
}
LEAN_EXPORT lean_object* l___private_Init_Data_Array_Basic_0__Array_anyMUnsafe_any___at___00Lean_Elab_elabDeriving_spec__6___boxed(lean_object* v_as_8496_, lean_object* v_i_8497_, lean_object* v_stop_8498_){
_start:
{
size_t v_i_boxed_8499_; size_t v_stop_boxed_8500_; uint8_t v_res_8501_; lean_object* v_r_8502_; 
v_i_boxed_8499_ = lean_unbox_usize(v_i_8497_);
lean_dec(v_i_8497_);
v_stop_boxed_8500_ = lean_unbox_usize(v_stop_8498_);
lean_dec(v_stop_8498_);
v_res_8501_ = l___private_Init_Data_Array_Basic_0__Array_anyMUnsafe_any___at___00Lean_Elab_elabDeriving_spec__6(v_as_8496_, v_i_boxed_8499_, v_stop_boxed_8500_);
lean_dec_ref(v_as_8496_);
v_r_8502_ = lean_box(v_res_8501_);
return v_r_8502_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_elabDeriving(lean_object* v_x_8509_, lean_object* v_a_8510_, lean_object* v_a_8511_){
_start:
{
lean_object* v___y_8514_; lean_object* v___y_8515_; lean_object* v___y_8516_; uint8_t v___y_8517_; lean_object* v___y_8518_; lean_object* v___x_8521_; uint8_t v___x_8522_; 
v___x_8521_ = ((lean_object*)(l_Lean_Elab_elabDeriving___closed__1));
lean_inc(v_x_8509_);
v___x_8522_ = l_Lean_Syntax_isOfKind(v_x_8509_, v___x_8521_);
if (v___x_8522_ == 0)
{
lean_object* v___x_8523_; 
lean_dec(v_a_8511_);
lean_dec_ref(v_a_8510_);
lean_dec(v_x_8509_);
v___x_8523_ = l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_elabDeriving_spec__0___redArg();
return v___x_8523_;
}
else
{
lean_object* v___x_8524_; lean_object* v___f_8525_; size_t v___y_8527_; lean_object* v___y_8528_; lean_object* v___y_8529_; size_t v___y_8530_; lean_object* v___y_8531_; lean_object* v___y_8532_; lean_object* v___y_8533_; uint8_t v___y_8534_; lean_object* v___y_8535_; lean_object* v___x_8553_; size_t v___y_8555_; lean_object* v___y_8556_; size_t v___y_8557_; lean_object* v___y_8558_; lean_object* v___y_8559_; uint8_t v___y_8560_; lean_object* v___y_8561_; uint8_t v___y_8562_; size_t v___y_8595_; lean_object* v___y_8596_; size_t v___y_8597_; lean_object* v___y_8598_; lean_object* v___y_8599_; lean_object* v___y_8600_; uint8_t v___y_8601_; size_t v___y_8621_; lean_object* v___y_8622_; size_t v___y_8623_; lean_object* v___y_8624_; lean_object* v___y_8625_; lean_object* v___y_8626_; lean_object* v___y_8627_; lean_object* v___y_8635_; lean_object* v___y_8636_; lean_object* v___y_8637_; lean_object* v___y_8638_; lean_object* v_ncTk_x3f_8660_; lean_object* v___y_8661_; lean_object* v___y_8662_; lean_object* v___x_8680_; lean_object* v___x_8681_; uint8_t v___x_8682_; 
v___x_8524_ = lean_box(v___x_8522_);
v___f_8525_ = lean_alloc_closure((void*)(l_Lean_Elab_elabDeriving___lam__0___boxed), 2, 1);
lean_closure_set(v___f_8525_, 0, v___x_8524_);
v___x_8553_ = lean_unsigned_to_nat(0u);
v___x_8680_ = lean_unsigned_to_nat(1u);
v___x_8681_ = l_Lean_Syntax_getArg(v_x_8509_, v___x_8680_);
v___x_8682_ = l_Lean_Syntax_isNone(v___x_8681_);
if (v___x_8682_ == 0)
{
uint8_t v___x_8683_; 
lean_inc(v___x_8681_);
v___x_8683_ = l_Lean_Syntax_matchesNull(v___x_8681_, v___x_8680_);
if (v___x_8683_ == 0)
{
lean_object* v___x_8684_; 
lean_dec(v___x_8681_);
lean_dec_ref(v___f_8525_);
lean_dec(v_a_8511_);
lean_dec_ref(v_a_8510_);
lean_dec(v_x_8509_);
v___x_8684_ = l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_elabDeriving_spec__0___redArg();
return v___x_8684_;
}
else
{
lean_object* v_ncTk_x3f_8685_; lean_object* v___x_8686_; 
v_ncTk_x3f_8685_ = l_Lean_Syntax_getArg(v___x_8681_, v___x_8553_);
lean_dec(v___x_8681_);
v___x_8686_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_8686_, 0, v_ncTk_x3f_8685_);
v_ncTk_x3f_8660_ = v___x_8686_;
v___y_8661_ = v_a_8510_;
v___y_8662_ = v_a_8511_;
goto v___jp_8659_;
}
}
else
{
lean_object* v___x_8687_; 
lean_dec(v___x_8681_);
v___x_8687_ = lean_box(0);
v_ncTk_x3f_8660_ = v___x_8687_;
v___y_8661_ = v_a_8510_;
v___y_8662_ = v_a_8511_;
goto v___jp_8659_;
}
v___jp_8526_:
{
if (v___y_8534_ == 0)
{
lean_object* v___x_8536_; size_t v_sz_8537_; lean_object* v___x_8538_; 
lean_dec_ref(v___y_8529_);
lean_dec_ref(v___y_8528_);
lean_dec_ref(v___f_8525_);
v___x_8536_ = lean_box(0);
v_sz_8537_ = lean_array_size(v___y_8531_);
v___x_8538_ = l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00Lean_Elab_elabDeriving_spec__5(v___y_8532_, v___y_8531_, v_sz_8537_, v___y_8530_, v___x_8536_, v___y_8533_, v___y_8535_);
lean_dec_ref(v___y_8531_);
if (lean_obj_tag(v___x_8538_) == 0)
{
lean_object* v___x_8540_; uint8_t v_isShared_8541_; uint8_t v_isSharedCheck_8545_; 
v_isSharedCheck_8545_ = !lean_is_exclusive(v___x_8538_);
if (v_isSharedCheck_8545_ == 0)
{
lean_object* v_unused_8546_; 
v_unused_8546_ = lean_ctor_get(v___x_8538_, 0);
lean_dec(v_unused_8546_);
v___x_8540_ = v___x_8538_;
v_isShared_8541_ = v_isSharedCheck_8545_;
goto v_resetjp_8539_;
}
else
{
lean_dec(v___x_8538_);
v___x_8540_ = lean_box(0);
v_isShared_8541_ = v_isSharedCheck_8545_;
goto v_resetjp_8539_;
}
v_resetjp_8539_:
{
lean_object* v___x_8543_; 
if (v_isShared_8541_ == 0)
{
lean_ctor_set(v___x_8540_, 0, v___x_8536_);
v___x_8543_ = v___x_8540_;
goto v_reusejp_8542_;
}
else
{
lean_object* v_reuseFailAlloc_8544_; 
v_reuseFailAlloc_8544_ = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8544_, 0, v___x_8536_);
v___x_8543_ = v_reuseFailAlloc_8544_;
goto v_reusejp_8542_;
}
v_reusejp_8542_:
{
return v___x_8543_;
}
}
}
else
{
return v___x_8538_;
}
}
else
{
lean_object* v___x_8547_; size_t v_sz_8548_; lean_object* v___x_8549_; lean_object* v___x_8550_; lean_object* v___f_8551_; lean_object* v___x_8552_; 
lean_dec_ref(v___y_8532_);
v___x_8547_ = lean_box(0);
v_sz_8548_ = lean_array_size(v___y_8531_);
lean_dec_ref(v___y_8531_);
v___x_8549_ = lean_box_usize(v_sz_8548_);
v___x_8550_ = lean_box_usize(v___y_8527_);
v___f_8551_ = lean_alloc_closure((void*)(l_Lean_Elab_elabDeriving___lam__1___boxed), 8, 5);
lean_closure_set(v___f_8551_, 0, v___y_8529_);
lean_closure_set(v___f_8551_, 1, v___y_8528_);
lean_closure_set(v___f_8551_, 2, v___x_8549_);
lean_closure_set(v___f_8551_, 3, v___x_8550_);
lean_closure_set(v___f_8551_, 4, v___x_8547_);
v___x_8552_ = l_Lean_Elab_Command_withScope___redArg(v___f_8525_, v___f_8551_, v___y_8533_, v___y_8535_);
return v___x_8552_;
}
}
v___jp_8554_:
{
if (v___y_8562_ == 0)
{
lean_dec_ref(v___f_8525_);
v___y_8514_ = v___y_8558_;
v___y_8515_ = v___y_8556_;
v___y_8516_ = v___y_8559_;
v___y_8517_ = v___y_8560_;
v___y_8518_ = v___y_8561_;
goto v___jp_8513_;
}
else
{
size_t v_sz_8563_; lean_object* v___x_8564_; lean_object* v___x_8565_; lean_object* v___x_8566_; lean_object* v___x_8567_; 
v_sz_8563_ = lean_array_size(v___y_8558_);
v___x_8564_ = lean_box_usize(v_sz_8563_);
v___x_8565_ = lean_box_usize(v___y_8557_);
lean_inc_ref(v___y_8558_);
v___x_8566_ = lean_alloc_closure((void*)(l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Elab_elabDeriving_spec__2___boxed), 6, 3);
lean_closure_set(v___x_8566_, 0, v___x_8564_);
lean_closure_set(v___x_8566_, 1, v___x_8565_);
lean_closure_set(v___x_8566_, 2, v___y_8558_);
lean_inc_ref(v___y_8559_);
v___x_8567_ = l_Lean_Elab_Command_liftCoreM___redArg(v___x_8566_, v___y_8559_, v___y_8561_);
if (lean_obj_tag(v___x_8567_) == 0)
{
lean_object* v_a_8568_; size_t v_sz_8569_; lean_object* v___x_8570_; 
v_a_8568_ = lean_ctor_get(v___x_8567_, 0);
lean_inc(v_a_8568_);
lean_dec_ref(v___x_8567_);
v_sz_8569_ = lean_array_size(v_a_8568_);
lean_inc_ref(v___y_8559_);
lean_inc(v_a_8568_);
v___x_8570_ = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Elab_elabDeriving_spec__4(v_sz_8569_, v___y_8557_, v_a_8568_, v___y_8559_, v___y_8561_);
if (lean_obj_tag(v___x_8570_) == 0)
{
lean_object* v_a_8571_; lean_object* v___x_8572_; uint8_t v___x_8573_; 
v_a_8571_ = lean_ctor_get(v___x_8570_, 0);
lean_inc(v_a_8571_);
lean_dec_ref(v___x_8570_);
v___x_8572_ = lean_array_get_size(v_a_8571_);
v___x_8573_ = lean_nat_dec_lt(v___x_8553_, v___x_8572_);
if (v___x_8573_ == 0)
{
lean_dec(v_a_8571_);
lean_dec_ref(v___y_8558_);
lean_dec(v_x_8509_);
lean_inc(v_a_8568_);
lean_inc_ref(v___y_8556_);
v___y_8527_ = v___y_8555_;
v___y_8528_ = v___y_8556_;
v___y_8529_ = v_a_8568_;
v___y_8530_ = v___y_8557_;
v___y_8531_ = v___y_8556_;
v___y_8532_ = v_a_8568_;
v___y_8533_ = v___y_8559_;
v___y_8534_ = v___y_8560_;
v___y_8535_ = v___y_8561_;
goto v___jp_8526_;
}
else
{
if (v___x_8573_ == 0)
{
lean_dec(v_a_8571_);
lean_dec_ref(v___y_8558_);
lean_dec(v_x_8509_);
lean_inc(v_a_8568_);
lean_inc_ref(v___y_8556_);
v___y_8527_ = v___y_8555_;
v___y_8528_ = v___y_8556_;
v___y_8529_ = v_a_8568_;
v___y_8530_ = v___y_8557_;
v___y_8531_ = v___y_8556_;
v___y_8532_ = v_a_8568_;
v___y_8533_ = v___y_8559_;
v___y_8534_ = v___y_8560_;
v___y_8535_ = v___y_8561_;
goto v___jp_8526_;
}
else
{
size_t v___x_8574_; uint8_t v___x_8575_; 
v___x_8574_ = lean_usize_of_nat(v___x_8572_);
v___x_8575_ = l___private_Init_Data_Array_Basic_0__Array_anyMUnsafe_any___at___00Lean_Elab_elabDeriving_spec__6(v_a_8571_, v___y_8557_, v___x_8574_);
lean_dec(v_a_8571_);
if (v___x_8575_ == 0)
{
lean_dec_ref(v___y_8558_);
lean_dec(v_x_8509_);
lean_inc(v_a_8568_);
lean_inc_ref(v___y_8556_);
v___y_8527_ = v___y_8555_;
v___y_8528_ = v___y_8556_;
v___y_8529_ = v_a_8568_;
v___y_8530_ = v___y_8557_;
v___y_8531_ = v___y_8556_;
v___y_8532_ = v_a_8568_;
v___y_8533_ = v___y_8559_;
v___y_8534_ = v___y_8560_;
v___y_8535_ = v___y_8561_;
goto v___jp_8526_;
}
else
{
lean_object* v___x_8576_; lean_object* v___x_8577_; 
lean_dec(v_a_8568_);
lean_dec_ref(v___f_8525_);
v___x_8576_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_8576_, 0, v_x_8509_);
v___x_8577_ = l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving(v___y_8556_, v___y_8558_, v___y_8560_, v___x_8576_, v___y_8559_, v___y_8561_);
lean_dec(v___y_8561_);
return v___x_8577_;
}
}
}
}
else
{
lean_object* v_a_8578_; lean_object* v___x_8580_; uint8_t v_isShared_8581_; uint8_t v_isSharedCheck_8585_; 
lean_dec(v_a_8568_);
lean_dec(v___y_8561_);
lean_dec_ref(v___y_8559_);
lean_dec_ref(v___y_8558_);
lean_dec_ref(v___y_8556_);
lean_dec_ref(v___f_8525_);
lean_dec(v_x_8509_);
v_a_8578_ = lean_ctor_get(v___x_8570_, 0);
v_isSharedCheck_8585_ = !lean_is_exclusive(v___x_8570_);
if (v_isSharedCheck_8585_ == 0)
{
v___x_8580_ = v___x_8570_;
v_isShared_8581_ = v_isSharedCheck_8585_;
goto v_resetjp_8579_;
}
else
{
lean_inc(v_a_8578_);
lean_dec(v___x_8570_);
v___x_8580_ = lean_box(0);
v_isShared_8581_ = v_isSharedCheck_8585_;
goto v_resetjp_8579_;
}
v_resetjp_8579_:
{
lean_object* v___x_8583_; 
if (v_isShared_8581_ == 0)
{
v___x_8583_ = v___x_8580_;
goto v_reusejp_8582_;
}
else
{
lean_object* v_reuseFailAlloc_8584_; 
v_reuseFailAlloc_8584_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8584_, 0, v_a_8578_);
v___x_8583_ = v_reuseFailAlloc_8584_;
goto v_reusejp_8582_;
}
v_reusejp_8582_:
{
return v___x_8583_;
}
}
}
}
else
{
lean_object* v_a_8586_; lean_object* v___x_8588_; uint8_t v_isShared_8589_; uint8_t v_isSharedCheck_8593_; 
lean_dec(v___y_8561_);
lean_dec_ref(v___y_8559_);
lean_dec_ref(v___y_8558_);
lean_dec_ref(v___y_8556_);
lean_dec_ref(v___f_8525_);
lean_dec(v_x_8509_);
v_a_8586_ = lean_ctor_get(v___x_8567_, 0);
v_isSharedCheck_8593_ = !lean_is_exclusive(v___x_8567_);
if (v_isSharedCheck_8593_ == 0)
{
v___x_8588_ = v___x_8567_;
v_isShared_8589_ = v_isSharedCheck_8593_;
goto v_resetjp_8587_;
}
else
{
lean_inc(v_a_8586_);
lean_dec(v___x_8567_);
v___x_8588_ = lean_box(0);
v_isShared_8589_ = v_isSharedCheck_8593_;
goto v_resetjp_8587_;
}
v_resetjp_8587_:
{
lean_object* v___x_8591_; 
if (v_isShared_8589_ == 0)
{
v___x_8591_ = v___x_8588_;
goto v_reusejp_8590_;
}
else
{
lean_object* v_reuseFailAlloc_8592_; 
v_reuseFailAlloc_8592_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8592_, 0, v_a_8586_);
v___x_8591_ = v_reuseFailAlloc_8592_;
goto v_reusejp_8590_;
}
v_reusejp_8590_:
{
return v___x_8591_;
}
}
}
}
}
v___jp_8594_:
{
size_t v_sz_8602_; lean_object* v___x_8603_; lean_object* v___x_8604_; lean_object* v___x_8605_; lean_object* v___x_8606_; 
v_sz_8602_ = lean_array_size(v___y_8600_);
v___x_8603_ = lean_box_usize(v_sz_8602_);
v___x_8604_ = lean_box_usize(v___y_8597_);
v___x_8605_ = lean_alloc_closure((void*)(l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Elab_getOptDerivingClasses_spec__1___boxed), 6, 3);
lean_closure_set(v___x_8605_, 0, v___x_8603_);
lean_closure_set(v___x_8605_, 1, v___x_8604_);
lean_closure_set(v___x_8605_, 2, v___y_8600_);
lean_inc_ref(v___y_8598_);
v___x_8606_ = l_Lean_Elab_Command_liftCoreM___redArg(v___x_8605_, v___y_8598_, v___y_8599_);
if (lean_obj_tag(v___x_8606_) == 0)
{
lean_object* v_a_8607_; lean_object* v___x_8608_; uint8_t v___x_8609_; 
v_a_8607_ = lean_ctor_get(v___x_8606_, 0);
lean_inc(v_a_8607_);
lean_dec_ref(v___x_8606_);
v___x_8608_ = lean_array_get_size(v___y_8596_);
v___x_8609_ = lean_nat_dec_lt(v___x_8553_, v___x_8608_);
if (v___x_8609_ == 0)
{
v___y_8555_ = v___y_8595_;
v___y_8556_ = v_a_8607_;
v___y_8557_ = v___y_8597_;
v___y_8558_ = v___y_8596_;
v___y_8559_ = v___y_8598_;
v___y_8560_ = v___y_8601_;
v___y_8561_ = v___y_8599_;
v___y_8562_ = v___x_8522_;
goto v___jp_8554_;
}
else
{
if (v___x_8609_ == 0)
{
v___y_8555_ = v___y_8595_;
v___y_8556_ = v_a_8607_;
v___y_8557_ = v___y_8597_;
v___y_8558_ = v___y_8596_;
v___y_8559_ = v___y_8598_;
v___y_8560_ = v___y_8601_;
v___y_8561_ = v___y_8599_;
v___y_8562_ = v___x_8522_;
goto v___jp_8554_;
}
else
{
size_t v___x_8610_; uint8_t v___x_8611_; 
v___x_8610_ = lean_usize_of_nat(v___x_8608_);
v___x_8611_ = l___private_Init_Data_Array_Basic_0__Array_anyMUnsafe_any___at___00Lean_Elab_elabDeriving_spec__7(v___x_8522_, v___y_8596_, v___y_8597_, v___x_8610_);
if (v___x_8611_ == 0)
{
v___y_8555_ = v___y_8595_;
v___y_8556_ = v_a_8607_;
v___y_8557_ = v___y_8597_;
v___y_8558_ = v___y_8596_;
v___y_8559_ = v___y_8598_;
v___y_8560_ = v___y_8601_;
v___y_8561_ = v___y_8599_;
v___y_8562_ = v___x_8522_;
goto v___jp_8554_;
}
else
{
lean_dec_ref(v___f_8525_);
v___y_8514_ = v___y_8596_;
v___y_8515_ = v_a_8607_;
v___y_8516_ = v___y_8598_;
v___y_8517_ = v___y_8601_;
v___y_8518_ = v___y_8599_;
goto v___jp_8513_;
}
}
}
}
else
{
lean_object* v_a_8612_; lean_object* v___x_8614_; uint8_t v_isShared_8615_; uint8_t v_isSharedCheck_8619_; 
lean_dec(v___y_8599_);
lean_dec_ref(v___y_8598_);
lean_dec_ref(v___y_8596_);
lean_dec_ref(v___f_8525_);
lean_dec(v_x_8509_);
v_a_8612_ = lean_ctor_get(v___x_8606_, 0);
v_isSharedCheck_8619_ = !lean_is_exclusive(v___x_8606_);
if (v_isSharedCheck_8619_ == 0)
{
v___x_8614_ = v___x_8606_;
v_isShared_8615_ = v_isSharedCheck_8619_;
goto v_resetjp_8613_;
}
else
{
lean_inc(v_a_8612_);
lean_dec(v___x_8606_);
v___x_8614_ = lean_box(0);
v_isShared_8615_ = v_isSharedCheck_8619_;
goto v_resetjp_8613_;
}
v_resetjp_8613_:
{
lean_object* v___x_8617_; 
if (v_isShared_8615_ == 0)
{
v___x_8617_ = v___x_8614_;
goto v_reusejp_8616_;
}
else
{
lean_object* v_reuseFailAlloc_8618_; 
v_reuseFailAlloc_8618_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v_reuseFailAlloc_8618_, 0, v_a_8612_);
v___x_8617_ = v_reuseFailAlloc_8618_;
goto v_reusejp_8616_;
}
v_reusejp_8616_:
{
return v___x_8617_;
}
}
}
}
v___jp_8620_:
{
size_t v_sz_8628_; lean_object* v___x_8629_; 
v_sz_8628_ = lean_array_size(v___y_8627_);
v___x_8629_ = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Elab_elabDeriving_spec__1(v_sz_8628_, v___y_8623_, v___y_8627_);
if (lean_obj_tag(v___x_8629_) == 0)
{
lean_object* v___x_8630_; 
lean_dec(v___y_8626_);
lean_dec(v___y_8625_);
lean_dec_ref(v___y_8624_);
lean_dec_ref(v___y_8622_);
lean_dec_ref(v___f_8525_);
lean_dec(v_x_8509_);
v___x_8630_ = l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_elabDeriving_spec__0___redArg();
return v___x_8630_;
}
else
{
if (lean_obj_tag(v___y_8625_) == 0)
{
lean_object* v_val_8631_; uint8_t v___x_8632_; 
v_val_8631_ = lean_ctor_get(v___x_8629_, 0);
lean_inc(v_val_8631_);
lean_dec_ref(v___x_8629_);
v___x_8632_ = 0;
v___y_8595_ = v___y_8621_;
v___y_8596_ = v_val_8631_;
v___y_8597_ = v___y_8623_;
v___y_8598_ = v___y_8624_;
v___y_8599_ = v___y_8626_;
v___y_8600_ = v___y_8622_;
v___y_8601_ = v___x_8632_;
goto v___jp_8594_;
}
else
{
lean_object* v_val_8633_; 
lean_dec_ref(v___y_8625_);
v_val_8633_ = lean_ctor_get(v___x_8629_, 0);
lean_inc(v_val_8633_);
lean_dec_ref(v___x_8629_);
v___y_8595_ = v___y_8621_;
v___y_8596_ = v_val_8633_;
v___y_8597_ = v___y_8623_;
v___y_8598_ = v___y_8624_;
v___y_8599_ = v___y_8626_;
v___y_8600_ = v___y_8622_;
v___y_8601_ = v___x_8522_;
goto v___jp_8594_;
}
}
}
v___jp_8634_:
{
size_t v_sz_8639_; size_t v___x_8640_; lean_object* v___x_8641_; 
v_sz_8639_ = lean_array_size(v___y_8638_);
v___x_8640_ = ((size_t)0ULL);
v___x_8641_ = l___private_Init_Data_Array_Basic_0__Array_mapMUnsafe_map___at___00Lean_Elab_getOptDerivingClasses_spec__0(v_sz_8639_, v___x_8640_, v___y_8638_);
if (lean_obj_tag(v___x_8641_) == 0)
{
lean_object* v___x_8642_; 
lean_dec(v___y_8637_);
lean_dec(v___y_8636_);
lean_dec_ref(v___y_8635_);
lean_dec_ref(v___f_8525_);
lean_dec(v_x_8509_);
v___x_8642_ = l_Lean_Elab_throwUnsupportedSyntax___at___00Lean_Elab_elabDeriving_spec__0___redArg();
return v___x_8642_;
}
else
{
lean_object* v_val_8643_; lean_object* v___x_8644_; lean_object* v___x_8645_; lean_object* v___x_8646_; lean_object* v___x_8647_; lean_object* v___x_8648_; uint8_t v___x_8649_; 
v_val_8643_ = lean_ctor_get(v___x_8641_, 0);
lean_inc(v_val_8643_);
lean_dec_ref(v___x_8641_);
v___x_8644_ = lean_unsigned_to_nat(5u);
v___x_8645_ = l_Lean_Syntax_getArg(v_x_8509_, v___x_8644_);
v___x_8646_ = l_Lean_Syntax_getArgs(v___x_8645_);
lean_dec(v___x_8645_);
v___x_8647_ = ((lean_object*)(l_Lean_Elab_getOptDerivingClasses___closed__3));
v___x_8648_ = lean_array_get_size(v___x_8646_);
v___x_8649_ = lean_nat_dec_lt(v___x_8553_, v___x_8648_);
if (v___x_8649_ == 0)
{
lean_dec_ref(v___x_8646_);
v___y_8621_ = v___x_8640_;
v___y_8622_ = v_val_8643_;
v___y_8623_ = v___x_8640_;
v___y_8624_ = v___y_8635_;
v___y_8625_ = v___y_8636_;
v___y_8626_ = v___y_8637_;
v___y_8627_ = v___x_8647_;
goto v___jp_8620_;
}
else
{
lean_object* v___x_8650_; lean_object* v___x_8651_; uint8_t v___x_8652_; 
v___x_8650_ = lean_box(v___x_8522_);
v___x_8651_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_8651_, 0, v___x_8650_);
lean_ctor_set(v___x_8651_, 1, v___x_8647_);
v___x_8652_ = lean_nat_dec_le(v___x_8648_, v___x_8648_);
if (v___x_8652_ == 0)
{
if (v___x_8649_ == 0)
{
lean_dec_ref(v___x_8651_);
lean_dec_ref(v___x_8646_);
v___y_8621_ = v___x_8640_;
v___y_8622_ = v_val_8643_;
v___y_8623_ = v___x_8640_;
v___y_8624_ = v___y_8635_;
v___y_8625_ = v___y_8636_;
v___y_8626_ = v___y_8637_;
v___y_8627_ = v___x_8647_;
goto v___jp_8620_;
}
else
{
size_t v___x_8653_; lean_object* v___x_8654_; lean_object* v_snd_8655_; 
v___x_8653_ = lean_usize_of_nat(v___x_8648_);
v___x_8654_ = l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Elab_getOptDerivingClasses_spec__2(v___x_8522_, v___x_8646_, v___x_8640_, v___x_8653_, v___x_8651_);
lean_dec_ref(v___x_8646_);
v_snd_8655_ = lean_ctor_get(v___x_8654_, 1);
lean_inc(v_snd_8655_);
lean_dec_ref(v___x_8654_);
v___y_8621_ = v___x_8640_;
v___y_8622_ = v_val_8643_;
v___y_8623_ = v___x_8640_;
v___y_8624_ = v___y_8635_;
v___y_8625_ = v___y_8636_;
v___y_8626_ = v___y_8637_;
v___y_8627_ = v_snd_8655_;
goto v___jp_8620_;
}
}
else
{
size_t v___x_8656_; lean_object* v___x_8657_; lean_object* v_snd_8658_; 
v___x_8656_ = lean_usize_of_nat(v___x_8648_);
v___x_8657_ = l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Elab_getOptDerivingClasses_spec__2(v___x_8522_, v___x_8646_, v___x_8640_, v___x_8656_, v___x_8651_);
lean_dec_ref(v___x_8646_);
v_snd_8658_ = lean_ctor_get(v___x_8657_, 1);
lean_inc(v_snd_8658_);
lean_dec_ref(v___x_8657_);
v___y_8621_ = v___x_8640_;
v___y_8622_ = v_val_8643_;
v___y_8623_ = v___x_8640_;
v___y_8624_ = v___y_8635_;
v___y_8625_ = v___y_8636_;
v___y_8626_ = v___y_8637_;
v___y_8627_ = v_snd_8658_;
goto v___jp_8620_;
}
}
}
}
v___jp_8659_:
{
lean_object* v___x_8663_; lean_object* v___x_8664_; lean_object* v___x_8665_; lean_object* v___x_8666_; lean_object* v___x_8667_; uint8_t v___x_8668_; 
v___x_8663_ = lean_unsigned_to_nat(3u);
v___x_8664_ = l_Lean_Syntax_getArg(v_x_8509_, v___x_8663_);
v___x_8665_ = l_Lean_Syntax_getArgs(v___x_8664_);
lean_dec(v___x_8664_);
v___x_8666_ = ((lean_object*)(l_Lean_Elab_getOptDerivingClasses___closed__3));
v___x_8667_ = lean_array_get_size(v___x_8665_);
v___x_8668_ = lean_nat_dec_lt(v___x_8553_, v___x_8667_);
if (v___x_8668_ == 0)
{
lean_dec_ref(v___x_8665_);
v___y_8635_ = v___y_8661_;
v___y_8636_ = v_ncTk_x3f_8660_;
v___y_8637_ = v___y_8662_;
v___y_8638_ = v___x_8666_;
goto v___jp_8634_;
}
else
{
lean_object* v___x_8669_; lean_object* v___x_8670_; uint8_t v___x_8671_; 
v___x_8669_ = lean_box(v___x_8522_);
v___x_8670_ = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(v___x_8670_, 0, v___x_8669_);
lean_ctor_set(v___x_8670_, 1, v___x_8666_);
v___x_8671_ = lean_nat_dec_le(v___x_8667_, v___x_8667_);
if (v___x_8671_ == 0)
{
if (v___x_8668_ == 0)
{
lean_dec_ref(v___x_8670_);
lean_dec_ref(v___x_8665_);
v___y_8635_ = v___y_8661_;
v___y_8636_ = v_ncTk_x3f_8660_;
v___y_8637_ = v___y_8662_;
v___y_8638_ = v___x_8666_;
goto v___jp_8634_;
}
else
{
size_t v___x_8672_; size_t v___x_8673_; lean_object* v___x_8674_; lean_object* v_snd_8675_; 
v___x_8672_ = ((size_t)0ULL);
v___x_8673_ = lean_usize_of_nat(v___x_8667_);
v___x_8674_ = l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Elab_getOptDerivingClasses_spec__2(v___x_8522_, v___x_8665_, v___x_8672_, v___x_8673_, v___x_8670_);
lean_dec_ref(v___x_8665_);
v_snd_8675_ = lean_ctor_get(v___x_8674_, 1);
lean_inc(v_snd_8675_);
lean_dec_ref(v___x_8674_);
v___y_8635_ = v___y_8661_;
v___y_8636_ = v_ncTk_x3f_8660_;
v___y_8637_ = v___y_8662_;
v___y_8638_ = v_snd_8675_;
goto v___jp_8634_;
}
}
else
{
size_t v___x_8676_; size_t v___x_8677_; lean_object* v___x_8678_; lean_object* v_snd_8679_; 
v___x_8676_ = ((size_t)0ULL);
v___x_8677_ = lean_usize_of_nat(v___x_8667_);
v___x_8678_ = l___private_Init_Data_Array_Basic_0__Array_foldlMUnsafe_fold___at___00Lean_Elab_getOptDerivingClasses_spec__2(v___x_8522_, v___x_8665_, v___x_8676_, v___x_8677_, v___x_8670_);
lean_dec_ref(v___x_8665_);
v_snd_8679_ = lean_ctor_get(v___x_8678_, 1);
lean_inc(v_snd_8679_);
lean_dec_ref(v___x_8678_);
v___y_8635_ = v___y_8661_;
v___y_8636_ = v_ncTk_x3f_8660_;
v___y_8637_ = v___y_8662_;
v___y_8638_ = v_snd_8679_;
goto v___jp_8634_;
}
}
}
}
v___jp_8513_:
{
lean_object* v___x_8519_; lean_object* v___x_8520_; 
v___x_8519_ = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(v___x_8519_, 0, v_x_8509_);
v___x_8520_ = l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_elabDefDeriving(v___y_8515_, v___y_8514_, v___y_8517_, v___x_8519_, v___y_8516_, v___y_8518_);
lean_dec(v___y_8518_);
return v___x_8520_;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_elabDeriving___boxed(lean_object* v_x_8688_, lean_object* v_a_8689_, lean_object* v_a_8690_, lean_object* v_a_8691_){
_start:
{
lean_object* v_res_8692_; 
v_res_8692_ = l_Lean_Elab_elabDeriving(v_x_8688_, v_a_8689_, v_a_8690_);
return v_res_8692_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3(lean_object* v_00_u03b1_8693_, lean_object* v_constName_8694_, lean_object* v___y_8695_, lean_object* v___y_8696_){
_start:
{
lean_object* v___x_8698_; 
v___x_8698_ = l_Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3___redArg(v_constName_8694_, v___y_8695_, v___y_8696_);
return v___x_8698_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3___boxed(lean_object* v_00_u03b1_8699_, lean_object* v_constName_8700_, lean_object* v___y_8701_, lean_object* v___y_8702_, lean_object* v___y_8703_){
_start:
{
lean_object* v_res_8704_; 
v_res_8704_ = l_Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3(v_00_u03b1_8699_, v_constName_8700_, v___y_8701_, v___y_8702_);
lean_dec(v___y_8702_);
return v_res_8704_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4(lean_object* v_00_u03b1_8705_, lean_object* v_ref_8706_, lean_object* v_constName_8707_, lean_object* v___y_8708_, lean_object* v___y_8709_){
_start:
{
lean_object* v___x_8711_; 
v___x_8711_ = l_Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4___redArg(v_ref_8706_, v_constName_8707_, v___y_8708_, v___y_8709_);
return v___x_8711_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4___boxed(lean_object* v_00_u03b1_8712_, lean_object* v_ref_8713_, lean_object* v_constName_8714_, lean_object* v___y_8715_, lean_object* v___y_8716_, lean_object* v___y_8717_){
_start:
{
lean_object* v_res_8718_; 
v_res_8718_ = l_Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4(v_00_u03b1_8712_, v_ref_8713_, v_constName_8714_, v___y_8715_, v___y_8716_);
lean_dec(v___y_8716_);
lean_dec(v_ref_8713_);
return v_res_8718_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4_spec__9(lean_object* v_00_u03b1_8719_, lean_object* v_ref_8720_, lean_object* v_msg_8721_, lean_object* v_declHint_8722_, lean_object* v___y_8723_, lean_object* v___y_8724_){
_start:
{
lean_object* v___x_8726_; 
v___x_8726_ = l_Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4_spec__9___redArg(v_ref_8720_, v_msg_8721_, v_declHint_8722_, v___y_8723_, v___y_8724_);
return v___x_8726_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4_spec__9___boxed(lean_object* v_00_u03b1_8727_, lean_object* v_ref_8728_, lean_object* v_msg_8729_, lean_object* v_declHint_8730_, lean_object* v___y_8731_, lean_object* v___y_8732_, lean_object* v___y_8733_){
_start:
{
lean_object* v_res_8734_; 
v_res_8734_ = l_Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4_spec__9(v_00_u03b1_8727_, v_ref_8728_, v_msg_8729_, v_declHint_8730_, v___y_8731_, v___y_8732_);
lean_dec(v___y_8732_);
lean_dec(v_ref_8728_);
return v_res_8734_;
}
}
LEAN_EXPORT lean_object* l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4_spec__9_spec__10_spec__11(lean_object* v_msg_8735_, lean_object* v_declHint_8736_, lean_object* v___y_8737_, lean_object* v___y_8738_){
_start:
{
lean_object* v___x_8740_; 
v___x_8740_ = l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4_spec__9_spec__10_spec__11___redArg(v_msg_8735_, v_declHint_8736_, v___y_8738_);
return v___x_8740_;
}
}
LEAN_EXPORT lean_object* l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4_spec__9_spec__10_spec__11___boxed(lean_object* v_msg_8741_, lean_object* v_declHint_8742_, lean_object* v___y_8743_, lean_object* v___y_8744_, lean_object* v___y_8745_){
_start:
{
lean_object* v_res_8746_; 
v_res_8746_ = l_Lean_mkUnknownIdentifierMessageCore___at___00Lean_mkUnknownIdentifierMessage___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4_spec__9_spec__10_spec__11(v_msg_8741_, v_declHint_8742_, v___y_8743_, v___y_8744_);
lean_dec(v___y_8744_);
lean_dec_ref(v___y_8743_);
return v_res_8746_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwErrorAt___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4_spec__9_spec__11(lean_object* v_00_u03b1_8747_, lean_object* v_ref_8748_, lean_object* v_msg_8749_, lean_object* v___y_8750_, lean_object* v___y_8751_){
_start:
{
lean_object* v___x_8753_; 
v___x_8753_ = l_Lean_throwErrorAt___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4_spec__9_spec__11___redArg(v_ref_8748_, v_msg_8749_, v___y_8750_, v___y_8751_);
return v___x_8753_;
}
}
LEAN_EXPORT lean_object* l_Lean_throwErrorAt___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4_spec__9_spec__11___boxed(lean_object* v_00_u03b1_8754_, lean_object* v_ref_8755_, lean_object* v_msg_8756_, lean_object* v___y_8757_, lean_object* v___y_8758_, lean_object* v___y_8759_){
_start:
{
lean_object* v_res_8760_; 
v_res_8760_ = l_Lean_throwErrorAt___at___00Lean_throwUnknownIdentifierAt___at___00Lean_throwUnknownConstantAt___at___00Lean_throwUnknownConstant___at___00Lean_getConstInfo___at___00Lean_Elab_elabDeriving_spec__3_spec__3_spec__4_spec__9_spec__11(v_00_u03b1_8754_, v_ref_8755_, v_msg_8756_, v___y_8757_, v___y_8758_);
lean_dec(v___y_8758_);
lean_dec(v_ref_8755_);
return v_res_8760_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving__1(){
_start:
{
lean_object* v___x_8767_; lean_object* v___x_8768_; lean_object* v___x_8769_; lean_object* v___x_8770_; lean_object* v___x_8771_; 
v___x_8767_ = l_Lean_Elab_Command_commandElabAttribute;
v___x_8768_ = ((lean_object*)(l_Lean_Elab_elabDeriving___closed__1));
v___x_8769_ = ((lean_object*)(l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving__1___closed__1));
v___x_8770_ = lean_alloc_closure((void*)(l_Lean_Elab_elabDeriving___boxed), 4, 0);
v___x_8771_ = l_Lean_KeyedDeclsAttribute_addBuiltin___redArg(v___x_8767_, v___x_8768_, v___x_8769_, v___x_8770_);
return v___x_8771_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving__1___boxed(lean_object* v_a_8772_){
_start:
{
lean_object* v_res_8773_; 
v_res_8773_ = l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving__1();
return v_res_8773_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving_declRange__3(){
_start:
{
lean_object* v___x_8800_; lean_object* v___x_8801_; lean_object* v___x_8802_; 
v___x_8800_ = ((lean_object*)(l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving__1___closed__1));
v___x_8801_ = ((lean_object*)(l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving_declRange__3___closed__6));
v___x_8802_ = l_Lean_addBuiltinDeclarationRanges(v___x_8800_, v___x_8801_);
return v___x_8802_;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving_declRange__3___boxed(lean_object* v_a_8803_){
_start:
{
lean_object* v_res_8804_; 
v_res_8804_ = l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving_declRange__3();
return v_res_8804_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2_(){
_start:
{
lean_object* v___x_8866_; uint8_t v___x_8867_; lean_object* v___x_8868_; lean_object* v___x_8869_; 
v___x_8866_ = ((lean_object*)(l___private_Init_Data_Array_Basic_0__Array_forIn_x27Unsafe_loop___at___00__private_Lean_Elab_Deriving_Basic_0__Lean_Elab_Term_mkInst_go_spec__5___closed__1));
v___x_8867_ = 0;
v___x_8868_ = ((lean_object*)(l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn___closed__23_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2_));
v___x_8869_ = l_Lean_registerTraceClass(v___x_8866_, v___x_8867_, v___x_8868_);
return v___x_8869_;
}
}
LEAN_EXPORT lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2____boxed(lean_object* v_a_8870_){
_start:
{
lean_object* v_res_8871_; 
v_res_8871_ = l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2_();
return v_res_8871_;
}
}
lean_object* runtime_initialize_Lean_Elab_App(uint8_t builtin);
lean_object* runtime_initialize_Lean_Elab_DeclNameGen(uint8_t builtin);
lean_object* runtime_initialize_Lean_Compiler_NoncomputableAttr(uint8_t builtin);
static bool _G_runtime_initialized = false;
LEAN_EXPORT lean_object* runtime_initialize_Lean_Elab_Deriving_Basic(uint8_t builtin) {
lean_object * res;
if (_G_runtime_initialized) return lean_io_result_mk_ok(lean_box(0));
_G_runtime_initialized = true;
res = runtime_initialize_Lean_Elab_App(builtin);
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
res = runtime_initialize_Lean_Elab_DeclNameGen(builtin);
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
res = runtime_initialize_Lean_Compiler_NoncomputableAttr(builtin);
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
res = l_Lean_Elab_initFn_00___x40_Lean_Elab_Deriving_Basic_393575330____hygCtx___hyg_2_();
if (lean_io_result_is_error(res)) return res;
l_Lean_Elab_derivingHandlersRef = lean_io_result_get_value(res);
lean_mark_persistent(l_Lean_Elab_derivingHandlersRef);
lean_dec_ref(res);
res = l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving__1();
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
res = l_Lean_Elab_elabDeriving___regBuiltin_Lean_Elab_elabDeriving_declRange__3();
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
res = l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_initFn_00___x40_Lean_Elab_Deriving_Basic_1443173927____hygCtx___hyg_2_();
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
return lean_io_result_mk_ok(lean_box(0));
}
static bool _G_meta_initialized = false;
LEAN_EXPORT lean_object* meta_initialize_Lean_Elab_Deriving_Basic(uint8_t builtin) {
lean_object * res;
if (_G_meta_initialized) return lean_io_result_mk_ok(lean_box(0));
_G_meta_initialized = true;
return lean_io_result_mk_ok(lean_box(0));
}
lean_object* initialize_Lean_Elab_App(uint8_t builtin);
lean_object* initialize_Lean_Elab_DeclNameGen(uint8_t builtin);
lean_object* initialize_Lean_Compiler_NoncomputableAttr(uint8_t builtin);
static bool _G_initialized = false;
LEAN_EXPORT lean_object* initialize_Lean_Elab_Deriving_Basic(uint8_t builtin) {
lean_object * res;
if (_G_initialized) return lean_io_result_mk_ok(lean_box(0));
_G_initialized = true;
res = initialize_Lean_Elab_App(builtin);
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
res = initialize_Lean_Elab_DeclNameGen(builtin);
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
res = initialize_Lean_Compiler_NoncomputableAttr(builtin);
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
res = runtime_initialize_Lean_Elab_Deriving_Basic(builtin);
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
res = meta_initialize_Lean_Elab_Deriving_Basic(builtin);
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
return initialize_Lean_Elab_Deriving_Basic(builtin);
}
#ifdef __cplusplus
}
#endif
