text: // Lean compiler output
  // Module: Lean.Compiler.ExternAttr
  // Imports: Init Lean.Expr Lean.Environment Lean.Attributes Lean.ProjFns Lean.Meta.Basic
  #include <lean/lean.h>
  #if defined(__clang__)
  #pragma clang diagnostic ignored "-Wunused-parameter"
  #pragma clang diagnostic ignored "-Wunused-label"
  #elif defined(__GNUC__) && !defined(__CLANG__)
  #pragma GCC diagnostic ignored "-Wunused-parameter"
  #pragma GCC diagnostic ignored "-Wunused-label"
  #pragma GCC diagnostic ignored "-Wunused-but-set-variable"
  #endif
  #ifdef __cplusplus
  extern "C" {
  #endif
  static lean_object* l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__8;
  lean_object* lean_string_push(lean_object*, uint32_t);
  lean_object* l_Lean_addMessageContextPartial___at_Lean_Core_instAddMessageContextCoreM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*);
  static lean_object* l_Lean_mkSimpleFnCall___closed__2;
  static lean_object* l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__2;
  size_t lean_usize_add(size_t, size_t);
  lean_object* lean_io_get_num_heartbeats(lean_object*);
  lean_object* l_Lean_stringToMessageData(lean_object*);
  LEAN_EXPORT lean_object* l_Lean_getExternEntryForAux(lean_object*, lean_object*);
  static lean_object* l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__3;
  lean_object* lean_mk_empty_array_with_capacity(lean_object*);
  static lean_object* l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__1;
  static lean_object* l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__15;
  lean_object* l_List_getD___rarg(lean_object*, lean_object*, lean_object*);
  static lean_object* l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__18;
  static lean_object* l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__6;
  LEAN_EXPORT lean_object* lean_get_extern_const_arity(lean_object*, lean_object*, lean_object*);
  lean_object* lean_name_mk_string(lean_object*, lean_object*);
  lean_object* lean_array_uget(lean_object*, size_t);
  LEAN_EXPORT lean_object* l_Lean_getExternNameFor___boxed(lean_object*, lean_object*, lean_object*);
  lean_object* l_List_foldl___at_String_join___spec__1(lean_object*, lean_object*);
  static lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3___closed__4;
  lean_object* l_Lean_ofExcept___at_Lean_initFn____x40_Lean_Class___hyg_767____spec__1(lean_object*, lean_object*, lean_object*, lean_object*);
  static lean_object* l_Lean_getExternConstArityExport___closed__1;
  lean_object* l_Lean_Meta_forallTelescopeReducing___at_Lean_Meta_getParamNames___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l___private_Lean_Compiler_ExternAttr_0__Lean_parseOptNum(lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_instInhabitedExternAttrData;
  static lean_object* l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__14;
  static lean_object* l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__5;
  lean_object* lean_environment_find(lean_object*, lean_object*);
  static lean_object* l_Lean_instInhabitedExternAttrData___closed__1;
  lean_object* l___private_Init_Meta_0__Lean_Syntax_isNatLitAux(lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_expandExternPattern(lean_object*, lean_object*);
  static lean_object* l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__6;
  lean_object* lean_st_ref_get(lean_object*, lean_object*);
  uint8_t lean_name_eq(lean_object*, lean_object*);
  uint8_t l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_810____at___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_341____spec__1(lean_object*, lean_object*);
  lean_object* lean_array_push(lean_object*, lean_object*);
  lean_object* lean_array_get_size(lean_object*);
  lean_object* lean_string_append(lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_ExternEntry_backend___boxed(lean_object*);
  LEAN_EXPORT lean_object* l_Lean_getExternNameFor(lean_object*, lean_object*, lean_object*);
  static lean_object* l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__22;
  LEAN_EXPORT lean_object* l___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  uint8_t lean_usize_dec_lt(size_t, size_t);
  static uint8_t l_Lean_expandExternPatternAux___closed__3;
  static uint8_t l_Lean_expandExternPatternAux___closed__1;
  lean_object* lean_nat_add(lean_object*, lean_object*);
  static lean_object* l_Lean_getExternAttrData___closed__1;
  LEAN_EXPORT lean_object* l_Lean_throwError___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_throwError___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__2(lean_object*, lean_object*, lean_object*, lean_object*);
  uint8_t l_Lean_Environment_isConstructor(lean_object*, lean_object*);
  static lean_object* l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__21;
  LEAN_EXPORT lean_object* l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_expandExternPattern___boxed(lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_ExternEntry_backend(lean_object*);
  LEAN_EXPORT uint8_t l_Lean_isExternC(lean_object*, lean_object*);
  static lean_object* l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__13;
  static lean_object* l_Lean_getConstInfo___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__1___closed__1;
  uint8_t lean_nat_dec_eq(lean_object*, lean_object*);
  uint8_t l_instDecidableNot___rarg(uint8_t);
  LEAN_EXPORT uint8_t l_Lean_isExtern(lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_getConstInfo___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* lean_add_extern(lean_object*, lean_object*);
  lean_object* l_Lean_MessageData_toString(lean_object*, lean_object*);
  static lean_object* l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__4;
  static lean_object* l_Lean_getExternConstArityExport___closed__5;
  extern lean_object* l_Lean_numLitKind;
  lean_object* lean_nat_sub(lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_ExternAttrData_arity_x3f___default;
  LEAN_EXPORT lean_object* l_Lean_expandExternPatternAux___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
  static lean_object* l_Lean_getExternConstArityExport___closed__3;
  lean_object* l_Lean_Syntax_isStrLit_x3f(lean_object*);
  LEAN_EXPORT lean_object* l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____lambda__3___boxed(lean_object*, lean_object*, lean_object*);
  static lean_object* l_Lean_getExternConstArityExport___closed__4;
  static lean_object* l___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___closed__1;
  extern lean_object* l_Lean_instInhabitedProjectionFunctionInfo;
  lean_object* l_Lean_replaceRef(lean_object*, lean_object*);
  static lean_object* l_Lean_expandExternPatternAux___closed__2;
  static lean_object* l_Lean_getExternConstArityExport___closed__2;
  static lean_object* l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__17;
  LEAN_EXPORT lean_object* l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  static lean_object* l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__4;
  LEAN_EXPORT lean_object* l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____lambda__3(lean_object*, lean_object*, lean_object*);
  static lean_object* l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__8;
  lean_object* lean_st_mk_ref(lean_object*, lean_object*);
  lean_object* l_Lean_Core_getMaxHeartbeats(lean_object*);
  lean_object* l_Lean_Syntax_getId(lean_object*);
  extern lean_object* l_Lean_Expr_instHashableExpr;
  lean_object* l_Std_PersistentHashMap_mkEmptyEntriesArray(lean_object*, lean_object*);
  static lean_object* l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__2;
  static lean_object* l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__1;
  lean_object* lean_array_to_list(lean_object*, lean_object*);
  lean_object* l_Lean_Meta_InfoCacheKey_instHashableInfoCacheKey___boxed(lean_object*);
  static lean_object* l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__9;
  LEAN_EXPORT lean_object* l_Lean_isExtern___boxed(lean_object*, lean_object*);
  extern lean_object* l_Lean_firstFrontendMacroScope;
  static lean_object* l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__19;
  LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_String_Iterator_next(lean_object*);
  LEAN_EXPORT lean_object* l_Lean_throwError___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
  static lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3___closed__3;
  LEAN_EXPORT lean_object* l___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData(lean_object*, lean_object*, lean_object*, lean_object*);
  size_t lean_usize_of_nat(lean_object*);
  lean_object* l_Lean_ConstantInfo_type(lean_object*);
  lean_object* l_instBEqProd___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_throwErrorAt___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  uint8_t l_String_Iterator_hasNext(lean_object*);
  extern lean_object* l_Lean_projectionFnInfoExt;
  static lean_object* l_Lean_mkSimpleFnCall___closed__3;
  LEAN_EXPORT lean_object* l_Lean_isExternC___boxed(lean_object*, lean_object*);
  static lean_object* l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__11;
  lean_object* l_Lean_setEnv___at_Lean_registerTagAttribute___spec__2(lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* lean_get_extern_attr_data(lean_object*, lean_object*);
  uint8_t lean_uint32_dec_eq(uint32_t, uint32_t);
  LEAN_EXPORT lean_object* l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397_(lean_object*);
  static lean_object* l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__12;
  static lean_object* l_Lean_getConstInfo___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__1___closed__2;
  lean_object* l_Lean_Syntax_getArgs(lean_object*);
  uint32_t l_String_Iterator_curr(lean_object*);
  lean_object* l_List_intersperse___rarg(lean_object*, lean_object*);
  lean_object* l_Lean_ParametricAttribute_getParam___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_addExtern___boxed(lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_getExternEntryFor(lean_object*, lean_object*);
  static lean_object* l_Lean_getExternConstArityExport___closed__6;
  LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* lean_nat_mul(lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_throwError___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__2(lean_object*, lean_object*, lean_object*, lean_object*);
  uint8_t lean_nat_dec_eq(lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_expandExternPatternAux(lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l_Lean_getExternEntryForAux___boxed(lean_object*, lean_object*);
  uint8_t l_Lean_Syntax_isNone(lean_object*);
  static lean_object* l___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___closed__4;
  lean_object* l_instHashableProd___rarg___boxed(lean_object*, lean_object*, lean_object*);
  uint8_t l_Lean_MapDeclarationExtension_contains___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
  static lean_object* l_Lean_getConstInfo___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__1___closed__3;
  static lean_object* l___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___closed__2;
  static lean_object* l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__7;
  static lean_object* l___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___lambda__1___closed__1;
  extern lean_object* l_Lean_Expr_instBEqExpr;
  LEAN_EXPORT lean_object* l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity(lean_object*, lean_object*, lean_object*, lean_object*);
  LEAN_EXPORT lean_object* l___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  lean_object* l_Lean_registerParametricAttribute___rarg(lean_object*, lean_object*, lean_object*);
  lean_object* lean_string_length(lean_object*);
  lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*);
  static lean_object* l___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___closed__3;
  lean_object* l_String_Iterator_remainingBytes(lean_object*);
  static lean_object* l_Lean_mkSimpleFnCall___closed__1;
  static lean_object* l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__7;
  static lean_object* l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____lambda__2___closed__1;
  LEAN_EXPORT lean_object* l_Lean_getConstInfo___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__1(lean_object*, lean_object*, lean_object*, lean_object*);
  static lean_object* l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__16;
  uint8_t lean_uint32_dec_le(uint32_t, uint32_t);
  LEAN_EXPORT lean_object* l_Lean_mkSimpleFnCall(lean_object*, lean_object*);
  static lean_object* l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__5;
  LEAN_EXPORT lean_object* l_Lean_getExternEntryFor___boxed(lean_object*, lean_object*);
  static lean_object* l_Lean_getConstInfo___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__1___closed__4;
  LEAN_EXPORT lean_object* l_Lean_externAttr;
  lean_object* l_Lean_mkConst(lean_object*, lean_object*);
  lean_object* lean_uint32_to_nat(uint32_t);
  static lean_object* l_Lean_getExternConstArityExport___closed__7;
  static lean_object* l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__3;
  static lean_object* l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__10;
  static lean_object* l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__20;
  LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  static lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3___closed__2;
  LEAN_EXPORT lean_object* l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
  static lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3___closed__1;
  uint8_t lean_string_dec_eq(lean_object*, lean_object*);
  static lean_object* _init_l_Lean_ExternAttrData_arity_x3f___default() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_box(0);
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_instInhabitedExternAttrData___closed__1() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; 
  x_1 = lean_box(0);
  x_2 = lean_box(0);
  x_3 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_3, 0, x_1);
  lean_ctor_set(x_3, 1, x_2);
  return x_3;
  }
  }
  static lean_object* _init_l_Lean_instInhabitedExternAttrData() {
  _start:
  {
  lean_object* x_1; 
  x_1 = l_Lean_instInhabitedExternAttrData___closed__1;
  return x_1;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_throwError___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
  _start:
  {
  lean_object* x_5; lean_object* x_6; uint8_t x_7; 
  x_5 = lean_ctor_get(x_2, 3);
  x_6 = l_Lean_addMessageContextPartial___at_Lean_Core_instAddMessageContextCoreM___spec__1(x_1, x_2, x_3, x_4);
  x_7 = !lean_is_exclusive(x_6);
  if (x_7 == 0)
  {
  lean_object* x_8; lean_object* x_9; 
  x_8 = lean_ctor_get(x_6, 0);
  lean_inc(x_5);
  x_9 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_9, 0, x_5);
  lean_ctor_set(x_9, 1, x_8);
  lean_ctor_set_tag(x_6, 1);
  lean_ctor_set(x_6, 0, x_9);
  return x_6;
  }
  else
  {
  lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; 
  x_10 = lean_ctor_get(x_6, 0);
  x_11 = lean_ctor_get(x_6, 1);
  lean_inc(x_11);
  lean_inc(x_10);
  lean_dec(x_6);
  lean_inc(x_5);
  x_12 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_12, 0, x_5);
  lean_ctor_set(x_12, 1, x_10);
  x_13 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_13, 0, x_12);
  lean_ctor_set(x_13, 1, x_11);
  return x_13;
  }
  }
  }
  LEAN_EXPORT lean_object* l_Lean_throwErrorAt___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
  _start:
  {
  uint8_t x_6; 
  x_6 = !lean_is_exclusive(x_3);
  if (x_6 == 0)
  {
  lean_object* x_7; lean_object* x_8; lean_object* x_9; 
  x_7 = lean_ctor_get(x_3, 3);
  x_8 = l_Lean_replaceRef(x_1, x_7);
  lean_dec(x_7);
  lean_dec(x_1);
  lean_ctor_set(x_3, 3, x_8);
  x_9 = l_Lean_throwError___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__2(x_2, x_3, x_4, x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  return x_9;
  }
  else
  {
  lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; 
  x_10 = lean_ctor_get(x_3, 0);
  x_11 = lean_ctor_get(x_3, 1);
  x_12 = lean_ctor_get(x_3, 2);
  x_13 = lean_ctor_get(x_3, 3);
  x_14 = lean_ctor_get(x_3, 4);
  x_15 = lean_ctor_get(x_3, 5);
  x_16 = lean_ctor_get(x_3, 6);
  x_17 = lean_ctor_get(x_3, 7);
  x_18 = lean_ctor_get(x_3, 8);
  lean_inc(x_18);
  lean_inc(x_17);
  lean_inc(x_16);
  lean_inc(x_15);
  lean_inc(x_14);
  lean_inc(x_13);
  lean_inc(x_12);
  lean_inc(x_11);
  lean_inc(x_10);
  lean_dec(x_3);
  x_19 = l_Lean_replaceRef(x_1, x_13);
  lean_dec(x_13);
  lean_dec(x_1);
  x_20 = lean_alloc_ctor(0, 9, 0);
  lean_ctor_set(x_20, 0, x_10);
  lean_ctor_set(x_20, 1, x_11);
  lean_ctor_set(x_20, 2, x_12);
  lean_ctor_set(x_20, 3, x_19);
  lean_ctor_set(x_20, 4, x_14);
  lean_ctor_set(x_20, 5, x_15);
  lean_ctor_set(x_20, 6, x_16);
  lean_ctor_set(x_20, 7, x_17);
  lean_ctor_set(x_20, 8, x_18);
  x_21 = l_Lean_throwError___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__2(x_2, x_20, x_4, x_5);
  lean_dec(x_4);
  lean_dec(x_20);
  return x_21;
  }
  }
  }
  LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
  _start:
  {
  lean_object* x_8; lean_object* x_9; uint8_t x_10; 
  x_8 = lean_unsigned_to_nat(1u);
  x_9 = l_Lean_Syntax_getArg(x_1, x_8);
  x_10 = l_Lean_Syntax_isNone(x_9);
  lean_dec(x_9);
  if (x_10 == 0)
  {
  lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; 
  x_11 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_11, 0, x_2);
  lean_ctor_set(x_11, 1, x_4);
  x_12 = lean_array_push(x_3, x_11);
  x_13 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_13, 0, x_12);
  x_14 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_14, 0, x_13);
  lean_ctor_set(x_14, 1, x_7);
  return x_14;
  }
  else
  {
  lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; 
  x_15 = lean_alloc_ctor(2, 2, 0);
  lean_ctor_set(x_15, 0, x_2);
  lean_ctor_set(x_15, 1, x_4);
  x_16 = lean_array_push(x_3, x_15);
  x_17 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_17, 0, x_16);
  x_18 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_18, 0, x_17);
  lean_ctor_set(x_18, 1, x_7);
  return x_18;
  }
  }
  }
  static lean_object* _init_l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3___closed__1() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("string literal expected");
  return x_1;
  }
  }
  static lean_object* _init_l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3___closed__2() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; 
  x_1 = l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3___closed__1;
  x_2 = l_Lean_stringToMessageData(x_1);
  return x_2;
  }
  }
  static lean_object* _init_l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3___closed__3() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("all");
  return x_1;
  }
  }
  static lean_object* _init_l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3___closed__4() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; 
  x_1 = lean_box(0);
  x_2 = l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3___closed__3;
  x_3 = lean_name_mk_string(x_1, x_2);
  return x_3;
  }
  }
  LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
  _start:
  {
  uint8_t x_8; 
  x_8 = lean_usize_dec_lt(x_3, x_2);
  if (x_8 == 0)
  {
  lean_object* x_9; 
  lean_dec(x_6);
  lean_dec(x_5);
  x_9 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_9, 0, x_4);
  lean_ctor_set(x_9, 1, x_7);
  return x_9;
  }
  else
  {
  lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; 
  x_10 = lean_array_uget(x_1, x_3);
  x_11 = lean_unsigned_to_nat(0u);
  x_12 = l_Lean_Syntax_getArg(x_10, x_11);
  x_13 = l_Lean_Syntax_isNone(x_12);
  x_14 = lean_unsigned_to_nat(2u);
  x_15 = l_Lean_Syntax_getArg(x_10, x_14);
  x_16 = l_Lean_Syntax_isStrLit_x3f(x_15);
  if (x_13 == 0)
  {
  lean_object* x_33; lean_object* x_34; 
  x_33 = l_Lean_Syntax_getArg(x_12, x_11);
  lean_dec(x_12);
  x_34 = l_Lean_Syntax_getId(x_33);
  lean_dec(x_33);
  x_17 = x_34;
  goto block_32;
  }
  else
  {
  lean_object* x_35; 
  lean_dec(x_12);
  x_35 = l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3___closed__4;
  x_17 = x_35;
  goto block_32;
  }
  block_32:
  {
  if (lean_obj_tag(x_16) == 0)
  {
  lean_object* x_18; lean_object* x_19; uint8_t x_20; 
  lean_dec(x_17);
  lean_dec(x_10);
  lean_dec(x_4);
  x_18 = l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3___closed__2;
  x_19 = l_Lean_throwErrorAt___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__1(x_15, x_18, x_5, x_6, x_7);
  x_20 = !lean_is_exclusive(x_19);
  if (x_20 == 0)
  {
  return x_19;
  }
  else
  {
  lean_object* x_21; lean_object* x_22; lean_object* x_23; 
  x_21 = lean_ctor_get(x_19, 0);
  x_22 = lean_ctor_get(x_19, 1);
  lean_inc(x_22);
  lean_inc(x_21);
  lean_dec(x_19);
  x_23 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_23, 0, x_21);
  lean_ctor_set(x_23, 1, x_22);
  return x_23;
  }
  }
  else
  {
  lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; size_t x_29; size_t x_30; 
  lean_dec(x_15);
  x_24 = lean_ctor_get(x_16, 0);
  lean_inc(x_24);
  lean_dec(x_16);
  x_25 = l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3___lambda__1(x_10, x_17, x_4, x_24, x_5, x_6, x_7);
  lean_dec(x_10);
  x_26 = lean_ctor_get(x_25, 0);
  lean_inc(x_26);
  x_27 = lean_ctor_get(x_25, 1);
  lean_inc(x_27);
  lean_dec(x_25);
  x_28 = lean_ctor_get(x_26, 0);
  lean_inc(x_28);
  lean_dec(x_26);
  x_29 = 1;
  x_30 = lean_usize_add(x_3, x_29);
  x_3 = x_30;
  x_4 = x_28;
  x_7 = x_27;
  goto _start;
  }
  }
  }
  }
  }
  static lean_object* _init_l___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___lambda__1___closed__1() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; 
  x_1 = lean_unsigned_to_nat(0u);
  x_2 = lean_mk_empty_array_with_capacity(x_1);
  return x_2;
  }
  }
  LEAN_EXPORT lean_object* l___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
  _start:
  {
  size_t x_8; size_t x_9; lean_object* x_10; lean_object* x_11; 
  x_8 = lean_usize_of_nat(x_1);
  x_9 = 0;
  x_10 = l___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___lambda__1___closed__1;
  x_11 = l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3(x_2, x_8, x_9, x_10, x_5, x_6, x_7);
  if (lean_obj_tag(x_11) == 0)
  {
  uint8_t x_12; 
  x_12 = !lean_is_exclusive(x_11);
  if (x_12 == 0)
  {
  lean_object* x_13; lean_object* x_14; lean_object* x_15; 
  x_13 = lean_ctor_get(x_11, 0);
  x_14 = lean_array_to_list(lean_box(0), x_13);
  x_15 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_15, 0, x_3);
  lean_ctor_set(x_15, 1, x_14);
  lean_ctor_set(x_11, 0, x_15);
  return x_11;
  }
  else
  {
  lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; 
  x_16 = lean_ctor_get(x_11, 0);
  x_17 = lean_ctor_get(x_11, 1);
  lean_inc(x_17);
  lean_inc(x_16);
  lean_dec(x_11);
  x_18 = lean_array_to_list(lean_box(0), x_16);
  x_19 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_19, 0, x_3);
  lean_ctor_set(x_19, 1, x_18);
  x_20 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_20, 0, x_19);
  lean_ctor_set(x_20, 1, x_17);
  return x_20;
  }
  }
  else
  {
  uint8_t x_21; 
  lean_dec(x_3);
  x_21 = !lean_is_exclusive(x_11);
  if (x_21 == 0)
  {
  return x_11;
  }
  else
  {
  lean_object* x_22; lean_object* x_23; lean_object* x_24; 
  x_22 = lean_ctor_get(x_11, 0);
  x_23 = lean_ctor_get(x_11, 1);
  lean_inc(x_23);
  lean_inc(x_22);
  lean_dec(x_11);
  x_24 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_24, 0, x_22);
  lean_ctor_set(x_24, 1, x_23);
  return x_24;
  }
  }
  }
  }
  static lean_object* _init_l___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___closed__1() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; 
  x_1 = l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3___closed__4;
  x_2 = lean_alloc_ctor(0, 1, 0);
  lean_ctor_set(x_2, 0, x_1);
  return x_2;
  }
  }
  static lean_object* _init_l___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___closed__2() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; 
  x_1 = lean_box(0);
  x_2 = l___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___closed__1;
  x_3 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_3, 0, x_2);
  lean_ctor_set(x_3, 1, x_1);
  return x_3;
  }
  }
  static lean_object* _init_l___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___closed__3() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; 
  x_1 = lean_box(0);
  x_2 = l___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___closed__2;
  x_3 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_3, 0, x_1);
  lean_ctor_set(x_3, 1, x_2);
  return x_3;
  }
  }
  static lean_object* _init_l___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___closed__4() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; 
  x_1 = lean_unsigned_to_nat(0u);
  x_2 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_2, 0, x_1);
  return x_2;
  }
  }
  LEAN_EXPORT lean_object* l___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
  _start:
  {
  lean_object* x_5; lean_object* x_6; uint8_t x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; lean_object* x_14; 
  x_5 = lean_unsigned_to_nat(1u);
  x_6 = l_Lean_Syntax_getArg(x_1, x_5);
  x_7 = l_Lean_Syntax_isNone(x_6);
  x_8 = lean_unsigned_to_nat(2u);
  x_9 = l_Lean_Syntax_getArg(x_1, x_8);
  lean_dec(x_1);
  x_10 = l_Lean_Syntax_getArgs(x_9);
  lean_dec(x_9);
  x_11 = lean_array_get_size(x_10);
  x_12 = lean_unsigned_to_nat(0u);
  x_13 = lean_nat_dec_eq(x_11, x_12);
  if (x_7 == 0)
  {
  lean_object* x_24; lean_object* x_25; lean_object* x_26; 
  x_24 = l_Lean_Syntax_getArg(x_6, x_12);
  lean_dec(x_6);
  x_25 = l_Lean_numLitKind;
  x_26 = l___private_Init_Meta_0__Lean_Syntax_isNatLitAux(x_25, x_24);
  lean_dec(x_24);
  if (lean_obj_tag(x_26) == 0)
  {
  lean_object* x_27; 
  x_27 = l___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___closed__4;
  x_14 = x_27;
  goto block_23;
  }
  else
  {
  uint8_t x_28; 
  x_28 = !lean_is_exclusive(x_26);
  if (x_28 == 0)
  {
  x_14 = x_26;
  goto block_23;
  }
  else
  {
  lean_object* x_29; lean_object* x_30; 
  x_29 = lean_ctor_get(x_26, 0);
  lean_inc(x_29);
  lean_dec(x_26);
  x_30 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_30, 0, x_29);
  x_14 = x_30;
  goto block_23;
  }
  }
  }
  else
  {
  lean_object* x_31; 
  lean_dec(x_6);
  x_31 = lean_box(0);
  x_14 = x_31;
  goto block_23;
  }
  block_23:
  {
  if (x_13 == 0)
  {
  lean_object* x_15; lean_object* x_16; 
  x_15 = lean_box(0);
  x_16 = l___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___lambda__1(x_11, x_10, x_14, x_15, x_2, x_3, x_4);
  lean_dec(x_10);
  lean_dec(x_11);
  return x_16;
  }
  else
  {
  lean_object* x_17; uint8_t x_18; 
  x_17 = lean_box(0);
  x_18 = l___private_Init_Data_Option_Basic_0__beqOption____x40_Init_Data_Option_Basic___hyg_810____at___private_Lean_Meta_Basic_0__Lean_Meta_beqInfoCacheKey____x40_Lean_Meta_Basic___hyg_341____spec__1(x_14, x_17);
  if (x_18 == 0)
  {
  lean_object* x_19; lean_object* x_20; 
  x_19 = lean_box(0);
  x_20 = l___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___lambda__1(x_11, x_10, x_14, x_19, x_2, x_3, x_4);
  lean_dec(x_10);
  lean_dec(x_11);
  return x_20;
  }
  else
  {
  lean_object* x_21; lean_object* x_22; 
  lean_dec(x_14);
  lean_dec(x_11);
  lean_dec(x_10);
  lean_dec(x_3);
  lean_dec(x_2);
  x_21 = l___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___closed__3;
  x_22 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_22, 0, x_21);
  lean_ctor_set(x_22, 1, x_4);
  return x_22;
  }
  }
  }
  }
  }
  LEAN_EXPORT lean_object* l_Lean_throwError___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
  _start:
  {
  lean_object* x_5; 
  x_5 = l_Lean_throwError___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__2(x_1, x_2, x_3, x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  return x_5;
  }
  }
  LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
  _start:
  {
  lean_object* x_8; 
  x_8 = l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_1);
  return x_8;
  }
  }
  LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
  _start:
  {
  size_t x_8; size_t x_9; lean_object* x_10; 
  x_8 = lean_unbox_usize(x_2);
  lean_dec(x_2);
  x_9 = lean_unbox_usize(x_3);
  lean_dec(x_3);
  x_10 = l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3(x_1, x_8, x_9, x_4, x_5, x_6, x_7);
  lean_dec(x_1);
  return x_10;
  }
  }
  LEAN_EXPORT lean_object* l___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
  _start:
  {
  lean_object* x_8; 
  x_8 = l___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7);
  lean_dec(x_4);
  lean_dec(x_2);
  lean_dec(x_1);
  return x_8;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_addExtern___boxed(lean_object* x_1, lean_object* x_2) {
  _start:
  {
  lean_object* x_3; 
  x_3 = lean_add_extern(x_1, x_2);
  return x_3;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
  _start:
  {
  lean_object* x_6; 
  x_6 = l___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData(x_2, x_3, x_4, x_5);
  return x_6;
  }
  }
  static lean_object* _init_l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____lambda__2___closed__1() {
  _start:
  {
  lean_object* x_1; 
  x_1 = l_Lean_projectionFnInfoExt;
  return x_1;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
  _start:
  {
  lean_object* x_6; uint8_t x_7; 
  x_6 = lean_st_ref_get(x_4, x_5);
  x_7 = !lean_is_exclusive(x_6);
  if (x_7 == 0)
  {
  lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; 
  x_8 = lean_ctor_get(x_6, 0);
  x_9 = lean_ctor_get(x_6, 1);
  x_10 = lean_ctor_get(x_8, 0);
  lean_inc(x_10);
  lean_dec(x_8);
  x_11 = l_Lean_instInhabitedProjectionFunctionInfo;
  x_12 = l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____lambda__2___closed__1;
  lean_inc(x_1);
  lean_inc(x_10);
  x_13 = l_Lean_MapDeclarationExtension_contains___rarg(x_11, x_12, x_10, x_1);
  if (x_13 == 0)
  {
  uint8_t x_14; 
  lean_inc(x_1);
  lean_inc(x_10);
  x_14 = l_Lean_Environment_isConstructor(x_10, x_1);
  if (x_14 == 0)
  {
  lean_object* x_15; 
  lean_dec(x_10);
  lean_dec(x_1);
  x_15 = lean_box(0);
  lean_ctor_set(x_6, 0, x_15);
  return x_6;
  }
  else
  {
  lean_object* x_16; lean_object* x_17; 
  lean_free_object(x_6);
  x_16 = lean_add_extern(x_10, x_1);
  x_17 = l_Lean_ofExcept___at_Lean_initFn____x40_Lean_Class___hyg_767____spec__1(x_16, x_3, x_4, x_9);
  if (lean_obj_tag(x_17) == 0)
  {
  lean_object* x_18; lean_object* x_19; lean_object* x_20; 
  x_18 = lean_ctor_get(x_17, 0);
  lean_inc(x_18);
  x_19 = lean_ctor_get(x_17, 1);
  lean_inc(x_19);
  lean_dec(x_17);
  x_20 = l_Lean_setEnv___at_Lean_registerTagAttribute___spec__2(x_18, x_3, x_4, x_19);
  return x_20;
  }
  else
  {
  uint8_t x_21; 
  x_21 = !lean_is_exclusive(x_17);
  if (x_21 == 0)
  {
  return x_17;
  }
  else
  {
  lean_object* x_22; lean_object* x_23; lean_object* x_24; 
  x_22 = lean_ctor_get(x_17, 0);
  x_23 = lean_ctor_get(x_17, 1);
  lean_inc(x_23);
  lean_inc(x_22);
  lean_dec(x_17);
  x_24 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_24, 0, x_22);
  lean_ctor_set(x_24, 1, x_23);
  return x_24;
  }
  }
  }
  }
  else
  {
  lean_object* x_25; lean_object* x_26; 
  lean_free_object(x_6);
  x_25 = lean_add_extern(x_10, x_1);
  x_26 = l_Lean_ofExcept___at_Lean_initFn____x40_Lean_Class___hyg_767____spec__1(x_25, x_3, x_4, x_9);
  if (lean_obj_tag(x_26) == 0)
  {
  lean_object* x_27; lean_object* x_28; lean_object* x_29; 
  x_27 = lean_ctor_get(x_26, 0);
  lean_inc(x_27);
  x_28 = lean_ctor_get(x_26, 1);
  lean_inc(x_28);
  lean_dec(x_26);
  x_29 = l_Lean_setEnv___at_Lean_registerTagAttribute___spec__2(x_27, x_3, x_4, x_28);
  return x_29;
  }
  else
  {
  uint8_t x_30; 
  x_30 = !lean_is_exclusive(x_26);
  if (x_30 == 0)
  {
  return x_26;
  }
  else
  {
  lean_object* x_31; lean_object* x_32; lean_object* x_33; 
  x_31 = lean_ctor_get(x_26, 0);
  x_32 = lean_ctor_get(x_26, 1);
  lean_inc(x_32);
  lean_inc(x_31);
  lean_dec(x_26);
  x_33 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_33, 0, x_31);
  lean_ctor_set(x_33, 1, x_32);
  return x_33;
  }
  }
  }
  }
  else
  {
  lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; uint8_t x_39; 
  x_34 = lean_ctor_get(x_6, 0);
  x_35 = lean_ctor_get(x_6, 1);
  lean_inc(x_35);
  lean_inc(x_34);
  lean_dec(x_6);
  x_36 = lean_ctor_get(x_34, 0);
  lean_inc(x_36);
  lean_dec(x_34);
  x_37 = l_Lean_instInhabitedProjectionFunctionInfo;
  x_38 = l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____lambda__2___closed__1;
  lean_inc(x_1);
  lean_inc(x_36);
  x_39 = l_Lean_MapDeclarationExtension_contains___rarg(x_37, x_38, x_36, x_1);
  if (x_39 == 0)
  {
  uint8_t x_40; 
  lean_inc(x_1);
  lean_inc(x_36);
  x_40 = l_Lean_Environment_isConstructor(x_36, x_1);
  if (x_40 == 0)
  {
  lean_object* x_41; lean_object* x_42; 
  lean_dec(x_36);
  lean_dec(x_1);
  x_41 = lean_box(0);
  x_42 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_42, 0, x_41);
  lean_ctor_set(x_42, 1, x_35);
  return x_42;
  }
  else
  {
  lean_object* x_43; lean_object* x_44; 
  x_43 = lean_add_extern(x_36, x_1);
  x_44 = l_Lean_ofExcept___at_Lean_initFn____x40_Lean_Class___hyg_767____spec__1(x_43, x_3, x_4, x_35);
  if (lean_obj_tag(x_44) == 0)
  {
  lean_object* x_45; lean_object* x_46; lean_object* x_47; 
  x_45 = lean_ctor_get(x_44, 0);
  lean_inc(x_45);
  x_46 = lean_ctor_get(x_44, 1);
  lean_inc(x_46);
  lean_dec(x_44);
  x_47 = l_Lean_setEnv___at_Lean_registerTagAttribute___spec__2(x_45, x_3, x_4, x_46);
  return x_47;
  }
  else
  {
  lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; 
  x_48 = lean_ctor_get(x_44, 0);
  lean_inc(x_48);
  x_49 = lean_ctor_get(x_44, 1);
  lean_inc(x_49);
  if (lean_is_exclusive(x_44)) {
   lean_ctor_release(x_44, 0);
   lean_ctor_release(x_44, 1);
   x_50 = x_44;
  } else {
   lean_dec_ref(x_44);
   x_50 = lean_box(0);
  }
  if (lean_is_scalar(x_50)) {
   x_51 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_51 = x_50;
  }
  lean_ctor_set(x_51, 0, x_48);
  lean_ctor_set(x_51, 1, x_49);
  return x_51;
  }
  }
  }
  else
  {
  lean_object* x_52; lean_object* x_53; 
  x_52 = lean_add_extern(x_36, x_1);
  x_53 = l_Lean_ofExcept___at_Lean_initFn____x40_Lean_Class___hyg_767____spec__1(x_52, x_3, x_4, x_35);
  if (lean_obj_tag(x_53) == 0)
  {
  lean_object* x_54; lean_object* x_55; lean_object* x_56; 
  x_54 = lean_ctor_get(x_53, 0);
  lean_inc(x_54);
  x_55 = lean_ctor_get(x_53, 1);
  lean_inc(x_55);
  lean_dec(x_53);
  x_56 = l_Lean_setEnv___at_Lean_registerTagAttribute___spec__2(x_54, x_3, x_4, x_55);
  return x_56;
  }
  else
  {
  lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; 
  x_57 = lean_ctor_get(x_53, 0);
  lean_inc(x_57);
  x_58 = lean_ctor_get(x_53, 1);
  lean_inc(x_58);
  if (lean_is_exclusive(x_53)) {
   lean_ctor_release(x_53, 0);
   lean_ctor_release(x_53, 1);
   x_59 = x_53;
  } else {
   lean_dec_ref(x_53);
   x_59 = lean_box(0);
  }
  if (lean_is_scalar(x_59)) {
   x_60 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_60 = x_59;
  }
  lean_ctor_set(x_60, 0, x_57);
  lean_ctor_set(x_60, 1, x_58);
  return x_60;
  }
  }
  }
  }
  }
  LEAN_EXPORT lean_object* l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____lambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
  _start:
  {
  lean_object* x_4; lean_object* x_5; 
  x_4 = lean_box(0);
  x_5 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_5, 0, x_4);
  lean_ctor_set(x_5, 1, x_3);
  return x_5;
  }
  }
  static lean_object* _init_l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__1() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("extern");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__2() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; 
  x_1 = lean_box(0);
  x_2 = l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__1;
  x_3 = lean_name_mk_string(x_1, x_2);
  return x_3;
  }
  }
  static lean_object* _init_l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__3() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("builtin and foreign functions");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__4() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; uint8_t x_3; lean_object* x_4; 
  x_1 = l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__2;
  x_2 = l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__3;
  x_3 = 0;
  x_4 = lean_alloc_ctor(0, 2, 1);
  lean_ctor_set(x_4, 0, x_1);
  lean_ctor_set(x_4, 1, x_2);
  lean_ctor_set_uint8(x_4, sizeof(void*)*2, x_3);
  return x_4;
  }
  }
  static lean_object* _init_l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__5() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_alloc_closure((void*)(l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____lambda__1___boxed), 5, 0);
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__6() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_alloc_closure((void*)(l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____lambda__2___boxed), 5, 0);
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__7() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_alloc_closure((void*)(l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____lambda__3___boxed), 3, 0);
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__8() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; 
  x_1 = l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__4;
  x_2 = l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__5;
  x_3 = l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__6;
  x_4 = l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__7;
  x_5 = lean_alloc_ctor(0, 4, 0);
  lean_ctor_set(x_5, 0, x_1);
  lean_ctor_set(x_5, 1, x_2);
  lean_ctor_set(x_5, 2, x_3);
  lean_ctor_set(x_5, 3, x_4);
  return x_5;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397_(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; lean_object* x_3; lean_object* x_4; 
  x_2 = l_Lean_instInhabitedExternAttrData;
  x_3 = l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__8;
  x_4 = l_Lean_registerParametricAttribute___rarg(x_2, x_3, x_1);
  return x_4;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
  _start:
  {
  lean_object* x_6; 
  x_6 = l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____lambda__1(x_1, x_2, x_3, x_4, x_5);
  lean_dec(x_1);
  return x_6;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
  _start:
  {
  lean_object* x_6; 
  x_6 = l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____lambda__2(x_1, x_2, x_3, x_4, x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  return x_6;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____lambda__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
  _start:
  {
  lean_object* x_4; 
  x_4 = l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____lambda__3(x_1, x_2, x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  return x_4;
  }
  }
  static lean_object* _init_l_Lean_getExternAttrData___closed__1() {
  _start:
  {
  lean_object* x_1; 
  x_1 = l_Lean_externAttr;
  return x_1;
  }
  }
  LEAN_EXPORT lean_object* lean_get_extern_attr_data(lean_object* x_1, lean_object* x_2) {
  _start:
  {
  lean_object* x_3; lean_object* x_4; lean_object* x_5; 
  x_3 = l_Lean_instInhabitedExternAttrData;
  x_4 = l_Lean_getExternAttrData___closed__1;
  x_5 = l_Lean_ParametricAttribute_getParam___rarg(x_3, x_4, x_1, x_2);
  return x_5;
  }
  }
  LEAN_EXPORT lean_object* l___private_Lean_Compiler_ExternAttr_0__Lean_parseOptNum(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
  _start:
  {
  lean_object* x_4; uint8_t x_5; 
  x_4 = lean_unsigned_to_nat(0u);
  x_5 = lean_nat_dec_eq(x_1, x_4);
  if (x_5 == 0)
  {
  lean_object* x_6; lean_object* x_7; uint8_t x_8; 
  x_6 = lean_unsigned_to_nat(1u);
  x_7 = lean_nat_sub(x_1, x_6);
  lean_dec(x_1);
  x_8 = l_String_Iterator_hasNext(x_2);
  if (x_8 == 0)
  {
  lean_object* x_9; 
  lean_dec(x_7);
  x_9 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_9, 0, x_2);
  lean_ctor_set(x_9, 1, x_3);
  return x_9;
  }
  else
  {
  uint32_t x_10; uint32_t x_11; uint8_t x_12; 
  x_10 = l_String_Iterator_curr(x_2);
  x_11 = 48;
  x_12 = lean_uint32_dec_le(x_11, x_10);
  if (x_12 == 0)
  {
  lean_object* x_13; 
  lean_dec(x_7);
  x_13 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_13, 0, x_2);
  lean_ctor_set(x_13, 1, x_3);
  return x_13;
  }
  else
  {
  uint32_t x_14; uint8_t x_15; 
  x_14 = 57;
  x_15 = lean_uint32_dec_le(x_10, x_14);
  if (x_15 == 0)
  {
  lean_object* x_16; 
  lean_dec(x_7);
  x_16 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_16, 0, x_2);
  lean_ctor_set(x_16, 1, x_3);
  return x_16;
  }
  else
  {
  lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; 
  x_17 = l_String_Iterator_next(x_2);
  x_18 = lean_unsigned_to_nat(10u);
  x_19 = lean_nat_mul(x_3, x_18);
  lean_dec(x_3);
  x_20 = lean_uint32_to_nat(x_10);
  x_21 = lean_unsigned_to_nat(48u);
  x_22 = lean_nat_sub(x_20, x_21);
  lean_dec(x_20);
  x_23 = lean_nat_add(x_19, x_22);
  lean_dec(x_22);
  lean_dec(x_19);
  x_1 = x_7;
  x_2 = x_17;
  x_3 = x_23;
  goto _start;
  }
  }
  }
  }
  else
  {
  lean_object* x_25; 
  lean_dec(x_1);
  x_25 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_25, 0, x_2);
  lean_ctor_set(x_25, 1, x_3);
  return x_25;
  }
  }
  }
  static uint8_t _init_l_Lean_expandExternPatternAux___closed__1() {
  _start:
  {
  uint8_t x_1; uint8_t x_2; 
  x_1 = 0;
  x_2 = l_instDecidableNot___rarg(x_1);
  return x_2;
  }
  }
  static lean_object* _init_l_Lean_expandExternPatternAux___closed__2() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("");
  return x_1;
  }
  }
  static uint8_t _init_l_Lean_expandExternPatternAux___closed__3() {
  _start:
  {
  uint8_t x_1; uint8_t x_2; 
  x_1 = 1;
  x_2 = l_instDecidableNot___rarg(x_1);
  return x_2;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_expandExternPatternAux(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
  _start:
  {
  lean_object* x_5; uint8_t x_6; 
  x_5 = lean_unsigned_to_nat(0u);
  x_6 = lean_nat_dec_eq(x_2, x_5);
  if (x_6 == 0)
  {
  lean_object* x_7; lean_object* x_8; uint8_t x_9; 
  x_7 = lean_unsigned_to_nat(1u);
  x_8 = lean_nat_sub(x_2, x_7);
  lean_dec(x_2);
  x_9 = l_String_Iterator_hasNext(x_3);
  if (x_9 == 0)
  {
  uint8_t x_10; 
  x_10 = l_Lean_expandExternPatternAux___closed__1;
  if (x_10 == 0)
  {
  uint32_t x_11; uint32_t x_12; uint8_t x_13; uint8_t x_14; 
  x_11 = l_String_Iterator_curr(x_3);
  x_12 = 35;
  x_13 = lean_uint32_dec_eq(x_11, x_12);
  x_14 = l_instDecidableNot___rarg(x_13);
  if (x_14 == 0)
  {
  lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; 
  x_15 = l_String_Iterator_next(x_3);
  x_16 = l_String_Iterator_remainingBytes(x_15);
  x_17 = l___private_Lean_Compiler_ExternAttr_0__Lean_parseOptNum(x_16, x_15, x_5);
  x_18 = lean_ctor_get(x_17, 0);
  lean_inc(x_18);
  x_19 = lean_ctor_get(x_17, 1);
  lean_inc(x_19);
  lean_dec(x_17);
  x_20 = lean_nat_sub(x_19, x_7);
  lean_dec(x_19);
  x_21 = l_Lean_expandExternPatternAux___closed__2;
  x_22 = l_List_getD___rarg(x_1, x_20, x_21);
  x_23 = lean_string_append(x_4, x_22);
  lean_dec(x_22);
  x_2 = x_8;
  x_3 = x_18;
  x_4 = x_23;
  goto _start;
  }
  else
  {
  lean_object* x_25; lean_object* x_26; 
  x_25 = l_String_Iterator_next(x_3);
  x_26 = lean_string_push(x_4, x_11);
  x_2 = x_8;
  x_3 = x_25;
  x_4 = x_26;
  goto _start;
  }
  }
  else
  {
  lean_dec(x_8);
  lean_dec(x_3);
  return x_4;
  }
  }
  else
  {
  uint8_t x_28; 
  x_28 = l_Lean_expandExternPatternAux___closed__3;
  if (x_28 == 0)
  {
  uint32_t x_29; uint32_t x_30; uint8_t x_31; uint8_t x_32; 
  x_29 = l_String_Iterator_curr(x_3);
  x_30 = 35;
  x_31 = lean_uint32_dec_eq(x_29, x_30);
  x_32 = l_instDecidableNot___rarg(x_31);
  if (x_32 == 0)
  {
  lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; 
  x_33 = l_String_Iterator_next(x_3);
  x_34 = l_String_Iterator_remainingBytes(x_33);
  x_35 = l___private_Lean_Compiler_ExternAttr_0__Lean_parseOptNum(x_34, x_33, x_5);
  x_36 = lean_ctor_get(x_35, 0);
  lean_inc(x_36);
  x_37 = lean_ctor_get(x_35, 1);
  lean_inc(x_37);
  lean_dec(x_35);
  x_38 = lean_nat_sub(x_37, x_7);
  lean_dec(x_37);
  x_39 = l_Lean_expandExternPatternAux___closed__2;
  x_40 = l_List_getD___rarg(x_1, x_38, x_39);
  x_41 = lean_string_append(x_4, x_40);
  lean_dec(x_40);
  x_2 = x_8;
  x_3 = x_36;
  x_4 = x_41;
  goto _start;
  }
  else
  {
  lean_object* x_43; lean_object* x_44; 
  x_43 = l_String_Iterator_next(x_3);
  x_44 = lean_string_push(x_4, x_29);
  x_2 = x_8;
  x_3 = x_43;
  x_4 = x_44;
  goto _start;
  }
  }
  else
  {
  lean_dec(x_8);
  lean_dec(x_3);
  return x_4;
  }
  }
  }
  else
  {
  lean_dec(x_3);
  lean_dec(x_2);
  return x_4;
  }
  }
  }
  LEAN_EXPORT lean_object* l_Lean_expandExternPatternAux___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
  _start:
  {
  lean_object* x_5; 
  x_5 = l_Lean_expandExternPatternAux(x_1, x_2, x_3, x_4);
  lean_dec(x_1);
  return x_5;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_expandExternPattern(lean_object* x_1, lean_object* x_2) {
  _start:
  {
  lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; 
  x_3 = lean_string_length(x_1);
  x_4 = lean_unsigned_to_nat(0u);
  x_5 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_5, 0, x_1);
  lean_ctor_set(x_5, 1, x_4);
  x_6 = l_Lean_expandExternPatternAux___closed__2;
  x_7 = l_Lean_expandExternPatternAux(x_2, x_3, x_5, x_6);
  return x_7;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_expandExternPattern___boxed(lean_object* x_1, lean_object* x_2) {
  _start:
  {
  lean_object* x_3; 
  x_3 = l_Lean_expandExternPattern(x_1, x_2);
  lean_dec(x_2);
  return x_3;
  }
  }
  static lean_object* _init_l_Lean_mkSimpleFnCall___closed__1() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("(");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_mkSimpleFnCall___closed__2() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string(", ");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_mkSimpleFnCall___closed__3() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string(")");
  return x_1;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_mkSimpleFnCall(lean_object* x_1, lean_object* x_2) {
  _start:
  {
  lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; 
  x_3 = l_Lean_mkSimpleFnCall___closed__1;
  x_4 = lean_string_append(x_1, x_3);
  x_5 = l_Lean_mkSimpleFnCall___closed__2;
  x_6 = l_List_intersperse___rarg(x_5, x_2);
  x_7 = l_Lean_expandExternPatternAux___closed__2;
  x_8 = l_List_foldl___at_String_join___spec__1(x_7, x_6);
  lean_dec(x_6);
  x_9 = lean_string_append(x_4, x_8);
  lean_dec(x_8);
  x_10 = l_Lean_mkSimpleFnCall___closed__3;
  x_11 = lean_string_append(x_9, x_10);
  return x_11;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_ExternEntry_backend(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = lean_ctor_get(x_1, 0);
  lean_inc(x_2);
  return x_2;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_ExternEntry_backend___boxed(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = l_Lean_ExternEntry_backend(x_1);
  lean_dec(x_1);
  return x_2;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_getExternEntryForAux(lean_object* x_1, lean_object* x_2) {
  _start:
  {
  if (lean_obj_tag(x_2) == 0)
  {
  lean_object* x_3; 
  x_3 = lean_box(0);
  return x_3;
  }
  else
  {
  lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8; 
  x_4 = lean_ctor_get(x_2, 0);
  x_5 = lean_ctor_get(x_2, 1);
  x_6 = l_Lean_ExternEntry_backend(x_4);
  x_7 = l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3___closed__4;
  x_8 = lean_name_eq(x_6, x_7);
  if (x_8 == 0)
  {
  uint8_t x_9; 
  x_9 = lean_name_eq(x_6, x_1);
  lean_dec(x_6);
  if (x_9 == 0)
  {
  x_2 = x_5;
  goto _start;
  }
  else
  {
  lean_object* x_11; 
  lean_inc(x_4);
  x_11 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_11, 0, x_4);
  return x_11;
  }
  }
  else
  {
  lean_object* x_12; 
  lean_dec(x_6);
  lean_inc(x_4);
  x_12 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_12, 0, x_4);
  return x_12;
  }
  }
  }
  }
  LEAN_EXPORT lean_object* l_Lean_getExternEntryForAux___boxed(lean_object* x_1, lean_object* x_2) {
  _start:
  {
  lean_object* x_3; 
  x_3 = l_Lean_getExternEntryForAux(x_1, x_2);
  lean_dec(x_2);
  lean_dec(x_1);
  return x_3;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_getExternEntryFor(lean_object* x_1, lean_object* x_2) {
  _start:
  {
  lean_object* x_3; lean_object* x_4; 
  x_3 = lean_ctor_get(x_1, 1);
  x_4 = l_Lean_getExternEntryForAux(x_2, x_3);
  return x_4;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_getExternEntryFor___boxed(lean_object* x_1, lean_object* x_2) {
  _start:
  {
  lean_object* x_3; 
  x_3 = l_Lean_getExternEntryFor(x_1, x_2);
  lean_dec(x_2);
  lean_dec(x_1);
  return x_3;
  }
  }
  LEAN_EXPORT uint8_t l_Lean_isExtern(lean_object* x_1, lean_object* x_2) {
  _start:
  {
  lean_object* x_3; lean_object* x_4; lean_object* x_5; 
  x_3 = l_Lean_instInhabitedExternAttrData;
  x_4 = l_Lean_getExternAttrData___closed__1;
  x_5 = l_Lean_ParametricAttribute_getParam___rarg(x_3, x_4, x_1, x_2);
  if (lean_obj_tag(x_5) == 0)
  {
  uint8_t x_6; 
  x_6 = 0;
  return x_6;
  }
  else
  {
  uint8_t x_7; 
  lean_dec(x_5);
  x_7 = 1;
  return x_7;
  }
  }
  }
  LEAN_EXPORT lean_object* l_Lean_isExtern___boxed(lean_object* x_1, lean_object* x_2) {
  _start:
  {
  uint8_t x_3; lean_object* x_4; 
  x_3 = l_Lean_isExtern(x_1, x_2);
  x_4 = lean_box(x_3);
  return x_4;
  }
  }
  LEAN_EXPORT uint8_t l_Lean_isExternC(lean_object* x_1, lean_object* x_2) {
  _start:
  {
  lean_object* x_3; lean_object* x_4; lean_object* x_5; 
  x_3 = l_Lean_instInhabitedExternAttrData;
  x_4 = l_Lean_getExternAttrData___closed__1;
  x_5 = l_Lean_ParametricAttribute_getParam___rarg(x_3, x_4, x_1, x_2);
  if (lean_obj_tag(x_5) == 0)
  {
  uint8_t x_6; 
  x_6 = 0;
  return x_6;
  }
  else
  {
  lean_object* x_7; lean_object* x_8; 
  x_7 = lean_ctor_get(x_5, 0);
  lean_inc(x_7);
  lean_dec(x_5);
  x_8 = lean_ctor_get(x_7, 1);
  lean_inc(x_8);
  lean_dec(x_7);
  if (lean_obj_tag(x_8) == 0)
  {
  uint8_t x_9; 
  x_9 = 0;
  return x_9;
  }
  else
  {
  lean_object* x_10; 
  x_10 = lean_ctor_get(x_8, 0);
  lean_inc(x_10);
  if (lean_obj_tag(x_10) == 2)
  {
  lean_object* x_11; 
  x_11 = lean_ctor_get(x_10, 0);
  lean_inc(x_11);
  lean_dec(x_10);
  if (lean_obj_tag(x_11) == 1)
  {
  lean_object* x_12; 
  x_12 = lean_ctor_get(x_11, 0);
  lean_inc(x_12);
  if (lean_obj_tag(x_12) == 0)
  {
  lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; 
  x_13 = lean_ctor_get(x_8, 1);
  lean_inc(x_13);
  lean_dec(x_8);
  x_14 = lean_ctor_get(x_11, 1);
  lean_inc(x_14);
  lean_dec(x_11);
  x_15 = l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3___closed__3;
  x_16 = lean_string_dec_eq(x_14, x_15);
  lean_dec(x_14);
  if (x_16 == 0)
  {
  uint8_t x_17; 
  lean_dec(x_13);
  x_17 = 0;
  return x_17;
  }
  else
  {
  if (lean_obj_tag(x_13) == 0)
  {
  uint8_t x_18; 
  x_18 = 1;
  return x_18;
  }
  else
  {
  uint8_t x_19; 
  lean_dec(x_13);
  x_19 = 0;
  return x_19;
  }
  }
  }
  else
  {
  uint8_t x_20; 
  lean_dec(x_12);
  lean_dec(x_11);
  lean_dec(x_8);
  x_20 = 0;
  return x_20;
  }
  }
  else
  {
  uint8_t x_21; 
  lean_dec(x_11);
  lean_dec(x_8);
  x_21 = 0;
  return x_21;
  }
  }
  else
  {
  uint8_t x_22; 
  lean_dec(x_10);
  lean_dec(x_8);
  x_22 = 0;
  return x_22;
  }
  }
  }
  }
  }
  LEAN_EXPORT lean_object* l_Lean_isExternC___boxed(lean_object* x_1, lean_object* x_2) {
  _start:
  {
  uint8_t x_3; lean_object* x_4; 
  x_3 = l_Lean_isExternC(x_1, x_2);
  x_4 = lean_box(x_3);
  return x_4;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_getExternNameFor(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
  _start:
  {
  lean_object* x_4; lean_object* x_5; lean_object* x_6; 
  x_4 = l_Lean_instInhabitedExternAttrData;
  x_5 = l_Lean_getExternAttrData___closed__1;
  x_6 = l_Lean_ParametricAttribute_getParam___rarg(x_4, x_5, x_1, x_3);
  if (lean_obj_tag(x_6) == 0)
  {
  lean_object* x_7; 
  x_7 = lean_box(0);
  return x_7;
  }
  else
  {
  lean_object* x_8; lean_object* x_9; 
  x_8 = lean_ctor_get(x_6, 0);
  lean_inc(x_8);
  lean_dec(x_6);
  x_9 = l_Lean_getExternEntryFor(x_8, x_2);
  lean_dec(x_8);
  if (lean_obj_tag(x_9) == 0)
  {
  lean_object* x_10; 
  x_10 = lean_box(0);
  return x_10;
  }
  else
  {
  uint8_t x_11; 
  x_11 = !lean_is_exclusive(x_9);
  if (x_11 == 0)
  {
  lean_object* x_12; 
  x_12 = lean_ctor_get(x_9, 0);
  switch (lean_obj_tag(x_12)) {
  case 2:
  {
  lean_object* x_13; 
  x_13 = lean_ctor_get(x_12, 1);
  lean_inc(x_13);
  lean_dec(x_12);
  lean_ctor_set(x_9, 0, x_13);
  return x_9;
  }
  case 3:
  {
  lean_object* x_14; 
  x_14 = lean_ctor_get(x_12, 1);
  lean_inc(x_14);
  lean_dec(x_12);
  lean_ctor_set(x_9, 0, x_14);
  return x_9;
  }
  default: 
  {
  lean_object* x_15; 
  lean_free_object(x_9);
  lean_dec(x_12);
  x_15 = lean_box(0);
  return x_15;
  }
  }
  }
  else
  {
  lean_object* x_16; 
  x_16 = lean_ctor_get(x_9, 0);
  lean_inc(x_16);
  lean_dec(x_9);
  switch (lean_obj_tag(x_16)) {
  case 2:
  {
  lean_object* x_17; lean_object* x_18; 
  x_17 = lean_ctor_get(x_16, 1);
  lean_inc(x_17);
  lean_dec(x_16);
  x_18 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_18, 0, x_17);
  return x_18;
  }
  case 3:
  {
  lean_object* x_19; lean_object* x_20; 
  x_19 = lean_ctor_get(x_16, 1);
  lean_inc(x_19);
  lean_dec(x_16);
  x_20 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_20, 0, x_19);
  return x_20;
  }
  default: 
  {
  lean_object* x_21; 
  lean_dec(x_16);
  x_21 = lean_box(0);
  return x_21;
  }
  }
  }
  }
  }
  }
  }
  LEAN_EXPORT lean_object* l_Lean_getExternNameFor___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
  _start:
  {
  lean_object* x_4; 
  x_4 = l_Lean_getExternNameFor(x_1, x_2, x_3);
  lean_dec(x_2);
  return x_4;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_throwError___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
  _start:
  {
  lean_object* x_5; lean_object* x_6; uint8_t x_7; 
  x_5 = lean_ctor_get(x_2, 3);
  x_6 = l_Lean_addMessageContextPartial___at_Lean_Core_instAddMessageContextCoreM___spec__1(x_1, x_2, x_3, x_4);
  x_7 = !lean_is_exclusive(x_6);
  if (x_7 == 0)
  {
  lean_object* x_8; lean_object* x_9; 
  x_8 = lean_ctor_get(x_6, 0);
  lean_inc(x_5);
  x_9 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_9, 0, x_5);
  lean_ctor_set(x_9, 1, x_8);
  lean_ctor_set_tag(x_6, 1);
  lean_ctor_set(x_6, 0, x_9);
  return x_6;
  }
  else
  {
  lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; 
  x_10 = lean_ctor_get(x_6, 0);
  x_11 = lean_ctor_get(x_6, 1);
  lean_inc(x_11);
  lean_inc(x_10);
  lean_dec(x_6);
  lean_inc(x_5);
  x_12 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_12, 0, x_5);
  lean_ctor_set(x_12, 1, x_10);
  x_13 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_13, 0, x_12);
  lean_ctor_set(x_13, 1, x_11);
  return x_13;
  }
  }
  }
  static lean_object* _init_l_Lean_getConstInfo___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__1___closed__1() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("unknown constant '");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_getConstInfo___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__1___closed__2() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; 
  x_1 = l_Lean_getConstInfo___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__1___closed__1;
  x_2 = l_Lean_stringToMessageData(x_1);
  return x_2;
  }
  }
  static lean_object* _init_l_Lean_getConstInfo___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__1___closed__3() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("'");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_getConstInfo___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__1___closed__4() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; 
  x_1 = l_Lean_getConstInfo___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__1___closed__3;
  x_2 = l_Lean_stringToMessageData(x_1);
  return x_2;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_getConstInfo___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
  _start:
  {
  lean_object* x_5; uint8_t x_6; 
  x_5 = lean_st_ref_get(x_3, x_4);
  x_6 = !lean_is_exclusive(x_5);
  if (x_6 == 0)
  {
  lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; 
  x_7 = lean_ctor_get(x_5, 0);
  x_8 = lean_ctor_get(x_5, 1);
  x_9 = lean_ctor_get(x_7, 0);
  lean_inc(x_9);
  lean_dec(x_7);
  lean_inc(x_1);
  x_10 = lean_environment_find(x_9, x_1);
  if (lean_obj_tag(x_10) == 0)
  {
  lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; 
  lean_free_object(x_5);
  x_11 = lean_box(0);
  x_12 = l_Lean_mkConst(x_1, x_11);
  x_13 = lean_alloc_ctor(2, 1, 0);
  lean_ctor_set(x_13, 0, x_12);
  x_14 = l_Lean_getConstInfo___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__1___closed__2;
  x_15 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_15, 0, x_14);
  lean_ctor_set(x_15, 1, x_13);
  x_16 = l_Lean_getConstInfo___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__1___closed__4;
  x_17 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_17, 0, x_15);
  lean_ctor_set(x_17, 1, x_16);
  x_18 = l_Lean_throwError___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__2(x_17, x_2, x_3, x_8);
  return x_18;
  }
  else
  {
  lean_object* x_19; 
  lean_dec(x_1);
  x_19 = lean_ctor_get(x_10, 0);
  lean_inc(x_19);
  lean_dec(x_10);
  lean_ctor_set(x_5, 0, x_19);
  return x_5;
  }
  }
  else
  {
  lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; 
  x_20 = lean_ctor_get(x_5, 0);
  x_21 = lean_ctor_get(x_5, 1);
  lean_inc(x_21);
  lean_inc(x_20);
  lean_dec(x_5);
  x_22 = lean_ctor_get(x_20, 0);
  lean_inc(x_22);
  lean_dec(x_20);
  lean_inc(x_1);
  x_23 = lean_environment_find(x_22, x_1);
  if (lean_obj_tag(x_23) == 0)
  {
  lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; 
  x_24 = lean_box(0);
  x_25 = l_Lean_mkConst(x_1, x_24);
  x_26 = lean_alloc_ctor(2, 1, 0);
  lean_ctor_set(x_26, 0, x_25);
  x_27 = l_Lean_getConstInfo___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__1___closed__2;
  x_28 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_28, 0, x_27);
  lean_ctor_set(x_28, 1, x_26);
  x_29 = l_Lean_getConstInfo___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__1___closed__4;
  x_30 = lean_alloc_ctor(10, 2, 0);
  lean_ctor_set(x_30, 0, x_28);
  lean_ctor_set(x_30, 1, x_29);
  x_31 = l_Lean_throwError___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__2(x_30, x_2, x_3, x_21);
  return x_31;
  }
  else
  {
  lean_object* x_32; lean_object* x_33; 
  lean_dec(x_1);
  x_32 = lean_ctor_get(x_23, 0);
  lean_inc(x_32);
  lean_dec(x_23);
  x_33 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_33, 0, x_32);
  lean_ctor_set(x_33, 1, x_21);
  return x_33;
  }
  }
  }
  }
  LEAN_EXPORT lean_object* l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
  _start:
  {
  lean_object* x_8; lean_object* x_9; 
  x_8 = lean_array_get_size(x_1);
  x_9 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_9, 0, x_8);
  lean_ctor_set(x_9, 1, x_7);
  return x_9;
  }
  }
  static lean_object* _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__1() {
  _start:
  {
  uint8_t x_1; uint8_t x_2; uint8_t x_3; lean_object* x_4; 
  x_1 = 0;
  x_2 = 1;
  x_3 = 1;
  x_4 = lean_alloc_ctor(0, 0, 14);
  lean_ctor_set_uint8(x_4, 0, x_1);
  lean_ctor_set_uint8(x_4, 1, x_1);
  lean_ctor_set_uint8(x_4, 2, x_1);
  lean_ctor_set_uint8(x_4, 3, x_1);
  lean_ctor_set_uint8(x_4, 4, x_1);
  lean_ctor_set_uint8(x_4, 5, x_2);
  lean_ctor_set_uint8(x_4, 6, x_3);
  lean_ctor_set_uint8(x_4, 7, x_1);
  lean_ctor_set_uint8(x_4, 8, x_3);
  lean_ctor_set_uint8(x_4, 9, x_3);
  lean_ctor_set_uint8(x_4, 10, x_1);
  lean_ctor_set_uint8(x_4, 11, x_3);
  lean_ctor_set_uint8(x_4, 12, x_3);
  lean_ctor_set_uint8(x_4, 13, x_3);
  return x_4;
  }
  }
  static lean_object* _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__2() {
  _start:
  {
  lean_object* x_1; 
  x_1 = l_Std_PersistentHashMap_mkEmptyEntriesArray(lean_box(0), lean_box(0));
  return x_1;
  }
  }
  static lean_object* _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__3() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; 
  x_1 = l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__2;
  x_2 = lean_alloc_ctor(0, 1, 0);
  lean_ctor_set(x_2, 0, x_1);
  return x_2;
  }
  }
  static lean_object* _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__4() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; 
  x_1 = l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__3;
  x_2 = lean_unsigned_to_nat(0u);
  x_3 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_3, 0, x_1);
  lean_ctor_set(x_3, 1, x_2);
  return x_3;
  }
  }
  static lean_object* _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__5() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; 
  x_1 = lean_unsigned_to_nat(32u);
  x_2 = lean_mk_empty_array_with_capacity(x_1);
  return x_2;
  }
  }
  static lean_object* _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__6() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; 
  x_1 = l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__5;
  x_2 = lean_alloc_ctor(0, 1, 0);
  lean_ctor_set(x_2, 0, x_1);
  return x_2;
  }
  }
  static lean_object* _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__7() {
  _start:
  {
  size_t x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; 
  x_1 = 5;
  x_2 = l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__6;
  x_3 = l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__5;
  x_4 = lean_unsigned_to_nat(0u);
  x_5 = lean_alloc_ctor(0, 4, sizeof(size_t)*1);
  lean_ctor_set(x_5, 0, x_2);
  lean_ctor_set(x_5, 1, x_3);
  lean_ctor_set(x_5, 2, x_4);
  lean_ctor_set(x_5, 3, x_4);
  lean_ctor_set_usize(x_5, 4, x_1);
  return x_5;
  }
  }
  static lean_object* _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__8() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; 
  x_1 = l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__4;
  x_2 = l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__7;
  x_3 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_3, 0, x_1);
  lean_ctor_set(x_3, 1, x_2);
  return x_3;
  }
  }
  static lean_object* _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__9() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; 
  x_1 = lean_box(0);
  x_2 = l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__1;
  x_3 = l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__8;
  x_4 = l___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___lambda__1___closed__1;
  x_5 = lean_unsigned_to_nat(0u);
  x_6 = lean_alloc_ctor(0, 6, 0);
  lean_ctor_set(x_6, 0, x_2);
  lean_ctor_set(x_6, 1, x_3);
  lean_ctor_set(x_6, 2, x_4);
  lean_ctor_set(x_6, 3, x_1);
  lean_ctor_set(x_6, 4, x_5);
  lean_ctor_set(x_6, 5, x_1);
  return x_6;
  }
  }
  static lean_object* _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__10() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; 
  x_1 = l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__3;
  x_2 = lean_unsigned_to_nat(0u);
  x_3 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_3, 0, x_1);
  lean_ctor_set(x_3, 1, x_2);
  return x_3;
  }
  }
  static lean_object* _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__11() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; 
  x_1 = l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__3;
  x_2 = lean_unsigned_to_nat(0u);
  x_3 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_3, 0, x_1);
  lean_ctor_set(x_3, 1, x_2);
  return x_3;
  }
  }
  static lean_object* _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__12() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; 
  x_1 = lean_unsigned_to_nat(0u);
  x_2 = l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__10;
  x_3 = l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__11;
  x_4 = lean_alloc_ctor(0, 8, 0);
  lean_ctor_set(x_4, 0, x_1);
  lean_ctor_set(x_4, 1, x_1);
  lean_ctor_set(x_4, 2, x_2);
  lean_ctor_set(x_4, 3, x_2);
  lean_ctor_set(x_4, 4, x_3);
  lean_ctor_set(x_4, 5, x_2);
  lean_ctor_set(x_4, 6, x_2);
  lean_ctor_set(x_4, 7, x_2);
  return x_4;
  }
  }
  static lean_object* _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__13() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; 
  x_1 = l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__3;
  x_2 = lean_unsigned_to_nat(0u);
  x_3 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_3, 0, x_1);
  lean_ctor_set(x_3, 1, x_2);
  return x_3;
  }
  }
  static lean_object* _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__14() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_alloc_closure((void*)(l_Lean_Meta_InfoCacheKey_instHashableInfoCacheKey___boxed), 1, 0);
  return x_1;
  }
  }
  static lean_object* _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__15() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; 
  x_1 = l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__3;
  x_2 = lean_unsigned_to_nat(0u);
  x_3 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_3, 0, x_1);
  lean_ctor_set(x_3, 1, x_2);
  return x_3;
  }
  }
  static lean_object* _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__16() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; 
  x_1 = l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__3;
  x_2 = lean_unsigned_to_nat(0u);
  x_3 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_3, 0, x_1);
  lean_ctor_set(x_3, 1, x_2);
  return x_3;
  }
  }
  static lean_object* _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__17() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; 
  x_1 = l_Lean_Expr_instBEqExpr;
  x_2 = lean_alloc_closure((void*)(l_instBEqProd___rarg), 4, 2);
  lean_closure_set(x_2, 0, x_1);
  lean_closure_set(x_2, 1, x_1);
  return x_2;
  }
  }
  static lean_object* _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__18() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; 
  x_1 = l_Lean_Expr_instHashableExpr;
  x_2 = lean_alloc_closure((void*)(l_instHashableProd___rarg___boxed), 3, 2);
  lean_closure_set(x_2, 0, x_1);
  lean_closure_set(x_2, 1, x_1);
  return x_2;
  }
  }
  static lean_object* _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__19() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; 
  x_1 = l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__3;
  x_2 = lean_unsigned_to_nat(0u);
  x_3 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_3, 0, x_1);
  lean_ctor_set(x_3, 1, x_2);
  return x_3;
  }
  }
  static lean_object* _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__20() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; 
  x_1 = l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__13;
  x_2 = l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__15;
  x_3 = l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__16;
  x_4 = l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__19;
  x_5 = lean_alloc_ctor(0, 7, 0);
  lean_ctor_set(x_5, 0, x_1);
  lean_ctor_set(x_5, 1, x_2);
  lean_ctor_set(x_5, 2, x_3);
  lean_ctor_set(x_5, 3, x_1);
  lean_ctor_set(x_5, 4, x_1);
  lean_ctor_set(x_5, 5, x_4);
  lean_ctor_set(x_5, 6, x_4);
  return x_5;
  }
  }
  static lean_object* _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__21() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; 
  x_1 = lean_box(0);
  x_2 = l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__12;
  x_3 = l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__20;
  x_4 = l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__7;
  x_5 = lean_alloc_ctor(0, 4, 0);
  lean_ctor_set(x_5, 0, x_2);
  lean_ctor_set(x_5, 1, x_3);
  lean_ctor_set(x_5, 2, x_1);
  lean_ctor_set(x_5, 3, x_4);
  return x_5;
  }
  }
  static lean_object* _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__22() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_alloc_closure((void*)(l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___lambda__1___boxed), 7, 0);
  return x_1;
  }
  }
  LEAN_EXPORT lean_object* l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
  _start:
  {
  lean_object* x_5; uint8_t x_6; 
  x_5 = lean_st_ref_get(x_3, x_4);
  x_6 = !lean_is_exclusive(x_5);
  if (x_6 == 0)
  {
  lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; 
  x_7 = lean_ctor_get(x_5, 0);
  x_8 = lean_ctor_get(x_5, 1);
  x_9 = lean_ctor_get(x_7, 0);
  lean_inc(x_9);
  lean_dec(x_7);
  x_10 = l_Lean_instInhabitedExternAttrData;
  x_11 = l_Lean_getExternAttrData___closed__1;
  lean_inc(x_1);
  x_12 = l_Lean_ParametricAttribute_getParam___rarg(x_10, x_11, x_9, x_1);
  if (lean_obj_tag(x_12) == 0)
  {
  lean_object* x_13; 
  lean_free_object(x_5);
  x_13 = l_Lean_getConstInfo___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__1(x_1, x_2, x_3, x_8);
  if (lean_obj_tag(x_13) == 0)
  {
  lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; 
  x_14 = lean_ctor_get(x_13, 0);
  lean_inc(x_14);
  x_15 = lean_ctor_get(x_13, 1);
  lean_inc(x_15);
  lean_dec(x_13);
  x_16 = l_Lean_ConstantInfo_type(x_14);
  lean_dec(x_14);
  x_17 = lean_st_ref_get(x_3, x_15);
  x_18 = lean_ctor_get(x_17, 1);
  lean_inc(x_18);
  lean_dec(x_17);
  x_19 = l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__21;
  x_20 = lean_st_mk_ref(x_19, x_18);
  x_21 = lean_ctor_get(x_20, 0);
  lean_inc(x_21);
  x_22 = lean_ctor_get(x_20, 1);
  lean_inc(x_22);
  lean_dec(x_20);
  x_23 = l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__22;
  x_24 = l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__9;
  lean_inc(x_3);
  lean_inc(x_21);
  x_25 = l_Lean_Meta_forallTelescopeReducing___at_Lean_Meta_getParamNames___spec__2___rarg(x_16, x_23, x_24, x_21, x_2, x_3, x_22);
  if (lean_obj_tag(x_25) == 0)
  {
  lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; uint8_t x_31; 
  x_26 = lean_ctor_get(x_25, 0);
  lean_inc(x_26);
  x_27 = lean_ctor_get(x_25, 1);
  lean_inc(x_27);
  lean_dec(x_25);
  x_28 = lean_st_ref_get(x_3, x_27);
  lean_dec(x_3);
  x_29 = lean_ctor_get(x_28, 1);
  lean_inc(x_29);
  lean_dec(x_28);
  x_30 = lean_st_ref_get(x_21, x_29);
  lean_dec(x_21);
  x_31 = !lean_is_exclusive(x_30);
  if (x_31 == 0)
  {
  lean_object* x_32; 
  x_32 = lean_ctor_get(x_30, 0);
  lean_dec(x_32);
  lean_ctor_set(x_30, 0, x_26);
  return x_30;
  }
  else
  {
  lean_object* x_33; lean_object* x_34; 
  x_33 = lean_ctor_get(x_30, 1);
  lean_inc(x_33);
  lean_dec(x_30);
  x_34 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_34, 0, x_26);
  lean_ctor_set(x_34, 1, x_33);
  return x_34;
  }
  }
  else
  {
  uint8_t x_35; 
  lean_dec(x_21);
  lean_dec(x_3);
  x_35 = !lean_is_exclusive(x_25);
  if (x_35 == 0)
  {
  return x_25;
  }
  else
  {
  lean_object* x_36; lean_object* x_37; lean_object* x_38; 
  x_36 = lean_ctor_get(x_25, 0);
  x_37 = lean_ctor_get(x_25, 1);
  lean_inc(x_37);
  lean_inc(x_36);
  lean_dec(x_25);
  x_38 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_38, 0, x_36);
  lean_ctor_set(x_38, 1, x_37);
  return x_38;
  }
  }
  }
  else
  {
  uint8_t x_39; 
  lean_dec(x_3);
  lean_dec(x_2);
  x_39 = !lean_is_exclusive(x_13);
  if (x_39 == 0)
  {
  return x_13;
  }
  else
  {
  lean_object* x_40; lean_object* x_41; lean_object* x_42; 
  x_40 = lean_ctor_get(x_13, 0);
  x_41 = lean_ctor_get(x_13, 1);
  lean_inc(x_41);
  lean_inc(x_40);
  lean_dec(x_13);
  x_42 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_42, 0, x_40);
  lean_ctor_set(x_42, 1, x_41);
  return x_42;
  }
  }
  }
  else
  {
  lean_object* x_43; lean_object* x_44; 
  x_43 = lean_ctor_get(x_12, 0);
  lean_inc(x_43);
  lean_dec(x_12);
  x_44 = lean_ctor_get(x_43, 0);
  lean_inc(x_44);
  lean_dec(x_43);
  if (lean_obj_tag(x_44) == 0)
  {
  lean_object* x_45; 
  lean_free_object(x_5);
  x_45 = l_Lean_getConstInfo___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__1(x_1, x_2, x_3, x_8);
  if (lean_obj_tag(x_45) == 0)
  {
  lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; 
  x_46 = lean_ctor_get(x_45, 0);
  lean_inc(x_46);
  x_47 = lean_ctor_get(x_45, 1);
  lean_inc(x_47);
  lean_dec(x_45);
  x_48 = l_Lean_ConstantInfo_type(x_46);
  lean_dec(x_46);
  x_49 = lean_st_ref_get(x_3, x_47);
  x_50 = lean_ctor_get(x_49, 1);
  lean_inc(x_50);
  lean_dec(x_49);
  x_51 = l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__21;
  x_52 = lean_st_mk_ref(x_51, x_50);
  x_53 = lean_ctor_get(x_52, 0);
  lean_inc(x_53);
  x_54 = lean_ctor_get(x_52, 1);
  lean_inc(x_54);
  lean_dec(x_52);
  x_55 = l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__22;
  x_56 = l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__9;
  lean_inc(x_3);
  lean_inc(x_53);
  x_57 = l_Lean_Meta_forallTelescopeReducing___at_Lean_Meta_getParamNames___spec__2___rarg(x_48, x_55, x_56, x_53, x_2, x_3, x_54);
  if (lean_obj_tag(x_57) == 0)
  {
  lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; uint8_t x_63; 
  x_58 = lean_ctor_get(x_57, 0);
  lean_inc(x_58);
  x_59 = lean_ctor_get(x_57, 1);
  lean_inc(x_59);
  lean_dec(x_57);
  x_60 = lean_st_ref_get(x_3, x_59);
  lean_dec(x_3);
  x_61 = lean_ctor_get(x_60, 1);
  lean_inc(x_61);
  lean_dec(x_60);
  x_62 = lean_st_ref_get(x_53, x_61);
  lean_dec(x_53);
  x_63 = !lean_is_exclusive(x_62);
  if (x_63 == 0)
  {
  lean_object* x_64; 
  x_64 = lean_ctor_get(x_62, 0);
  lean_dec(x_64);
  lean_ctor_set(x_62, 0, x_58);
  return x_62;
  }
  else
  {
  lean_object* x_65; lean_object* x_66; 
  x_65 = lean_ctor_get(x_62, 1);
  lean_inc(x_65);
  lean_dec(x_62);
  x_66 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_66, 0, x_58);
  lean_ctor_set(x_66, 1, x_65);
  return x_66;
  }
  }
  else
  {
  uint8_t x_67; 
  lean_dec(x_53);
  lean_dec(x_3);
  x_67 = !lean_is_exclusive(x_57);
  if (x_67 == 0)
  {
  return x_57;
  }
  else
  {
  lean_object* x_68; lean_object* x_69; lean_object* x_70; 
  x_68 = lean_ctor_get(x_57, 0);
  x_69 = lean_ctor_get(x_57, 1);
  lean_inc(x_69);
  lean_inc(x_68);
  lean_dec(x_57);
  x_70 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_70, 0, x_68);
  lean_ctor_set(x_70, 1, x_69);
  return x_70;
  }
  }
  }
  else
  {
  uint8_t x_71; 
  lean_dec(x_3);
  lean_dec(x_2);
  x_71 = !lean_is_exclusive(x_45);
  if (x_71 == 0)
  {
  return x_45;
  }
  else
  {
  lean_object* x_72; lean_object* x_73; lean_object* x_74; 
  x_72 = lean_ctor_get(x_45, 0);
  x_73 = lean_ctor_get(x_45, 1);
  lean_inc(x_73);
  lean_inc(x_72);
  lean_dec(x_45);
  x_74 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_74, 0, x_72);
  lean_ctor_set(x_74, 1, x_73);
  return x_74;
  }
  }
  }
  else
  {
  lean_object* x_75; 
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_75 = lean_ctor_get(x_44, 0);
  lean_inc(x_75);
  lean_dec(x_44);
  lean_ctor_set(x_5, 0, x_75);
  return x_5;
  }
  }
  }
  else
  {
  lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; 
  x_76 = lean_ctor_get(x_5, 0);
  x_77 = lean_ctor_get(x_5, 1);
  lean_inc(x_77);
  lean_inc(x_76);
  lean_dec(x_5);
  x_78 = lean_ctor_get(x_76, 0);
  lean_inc(x_78);
  lean_dec(x_76);
  x_79 = l_Lean_instInhabitedExternAttrData;
  x_80 = l_Lean_getExternAttrData___closed__1;
  lean_inc(x_1);
  x_81 = l_Lean_ParametricAttribute_getParam___rarg(x_79, x_80, x_78, x_1);
  if (lean_obj_tag(x_81) == 0)
  {
  lean_object* x_82; 
  x_82 = l_Lean_getConstInfo___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__1(x_1, x_2, x_3, x_77);
  if (lean_obj_tag(x_82) == 0)
  {
  lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; 
  x_83 = lean_ctor_get(x_82, 0);
  lean_inc(x_83);
  x_84 = lean_ctor_get(x_82, 1);
  lean_inc(x_84);
  lean_dec(x_82);
  x_85 = l_Lean_ConstantInfo_type(x_83);
  lean_dec(x_83);
  x_86 = lean_st_ref_get(x_3, x_84);
  x_87 = lean_ctor_get(x_86, 1);
  lean_inc(x_87);
  lean_dec(x_86);
  x_88 = l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__21;
  x_89 = lean_st_mk_ref(x_88, x_87);
  x_90 = lean_ctor_get(x_89, 0);
  lean_inc(x_90);
  x_91 = lean_ctor_get(x_89, 1);
  lean_inc(x_91);
  lean_dec(x_89);
  x_92 = l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__22;
  x_93 = l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__9;
  lean_inc(x_3);
  lean_inc(x_90);
  x_94 = l_Lean_Meta_forallTelescopeReducing___at_Lean_Meta_getParamNames___spec__2___rarg(x_85, x_92, x_93, x_90, x_2, x_3, x_91);
  if (lean_obj_tag(x_94) == 0)
  {
  lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; 
  x_95 = lean_ctor_get(x_94, 0);
  lean_inc(x_95);
  x_96 = lean_ctor_get(x_94, 1);
  lean_inc(x_96);
  lean_dec(x_94);
  x_97 = lean_st_ref_get(x_3, x_96);
  lean_dec(x_3);
  x_98 = lean_ctor_get(x_97, 1);
  lean_inc(x_98);
  lean_dec(x_97);
  x_99 = lean_st_ref_get(x_90, x_98);
  lean_dec(x_90);
  x_100 = lean_ctor_get(x_99, 1);
  lean_inc(x_100);
  if (lean_is_exclusive(x_99)) {
   lean_ctor_release(x_99, 0);
   lean_ctor_release(x_99, 1);
   x_101 = x_99;
  } else {
   lean_dec_ref(x_99);
   x_101 = lean_box(0);
  }
  if (lean_is_scalar(x_101)) {
   x_102 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_102 = x_101;
  }
  lean_ctor_set(x_102, 0, x_95);
  lean_ctor_set(x_102, 1, x_100);
  return x_102;
  }
  else
  {
  lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; 
  lean_dec(x_90);
  lean_dec(x_3);
  x_103 = lean_ctor_get(x_94, 0);
  lean_inc(x_103);
  x_104 = lean_ctor_get(x_94, 1);
  lean_inc(x_104);
  if (lean_is_exclusive(x_94)) {
   lean_ctor_release(x_94, 0);
   lean_ctor_release(x_94, 1);
   x_105 = x_94;
  } else {
   lean_dec_ref(x_94);
   x_105 = lean_box(0);
  }
  if (lean_is_scalar(x_105)) {
   x_106 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_106 = x_105;
  }
  lean_ctor_set(x_106, 0, x_103);
  lean_ctor_set(x_106, 1, x_104);
  return x_106;
  }
  }
  else
  {
  lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; 
  lean_dec(x_3);
  lean_dec(x_2);
  x_107 = lean_ctor_get(x_82, 0);
  lean_inc(x_107);
  x_108 = lean_ctor_get(x_82, 1);
  lean_inc(x_108);
  if (lean_is_exclusive(x_82)) {
   lean_ctor_release(x_82, 0);
   lean_ctor_release(x_82, 1);
   x_109 = x_82;
  } else {
   lean_dec_ref(x_82);
   x_109 = lean_box(0);
  }
  if (lean_is_scalar(x_109)) {
   x_110 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_110 = x_109;
  }
  lean_ctor_set(x_110, 0, x_107);
  lean_ctor_set(x_110, 1, x_108);
  return x_110;
  }
  }
  else
  {
  lean_object* x_111; lean_object* x_112; 
  x_111 = lean_ctor_get(x_81, 0);
  lean_inc(x_111);
  lean_dec(x_81);
  x_112 = lean_ctor_get(x_111, 0);
  lean_inc(x_112);
  lean_dec(x_111);
  if (lean_obj_tag(x_112) == 0)
  {
  lean_object* x_113; 
  x_113 = l_Lean_getConstInfo___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__1(x_1, x_2, x_3, x_77);
  if (lean_obj_tag(x_113) == 0)
  {
  lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_125; 
  x_114 = lean_ctor_get(x_113, 0);
  lean_inc(x_114);
  x_115 = lean_ctor_get(x_113, 1);
  lean_inc(x_115);
  lean_dec(x_113);
  x_116 = l_Lean_ConstantInfo_type(x_114);
  lean_dec(x_114);
  x_117 = lean_st_ref_get(x_3, x_115);
  x_118 = lean_ctor_get(x_117, 1);
  lean_inc(x_118);
  lean_dec(x_117);
  x_119 = l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__21;
  x_120 = lean_st_mk_ref(x_119, x_118);
  x_121 = lean_ctor_get(x_120, 0);
  lean_inc(x_121);
  x_122 = lean_ctor_get(x_120, 1);
  lean_inc(x_122);
  lean_dec(x_120);
  x_123 = l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__22;
  x_124 = l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__9;
  lean_inc(x_3);
  lean_inc(x_121);
  x_125 = l_Lean_Meta_forallTelescopeReducing___at_Lean_Meta_getParamNames___spec__2___rarg(x_116, x_123, x_124, x_121, x_2, x_3, x_122);
  if (lean_obj_tag(x_125) == 0)
  {
  lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; 
  x_126 = lean_ctor_get(x_125, 0);
  lean_inc(x_126);
  x_127 = lean_ctor_get(x_125, 1);
  lean_inc(x_127);
  lean_dec(x_125);
  x_128 = lean_st_ref_get(x_3, x_127);
  lean_dec(x_3);
  x_129 = lean_ctor_get(x_128, 1);
  lean_inc(x_129);
  lean_dec(x_128);
  x_130 = lean_st_ref_get(x_121, x_129);
  lean_dec(x_121);
  x_131 = lean_ctor_get(x_130, 1);
  lean_inc(x_131);
  if (lean_is_exclusive(x_130)) {
   lean_ctor_release(x_130, 0);
   lean_ctor_release(x_130, 1);
   x_132 = x_130;
  } else {
   lean_dec_ref(x_130);
   x_132 = lean_box(0);
  }
  if (lean_is_scalar(x_132)) {
   x_133 = lean_alloc_ctor(0, 2, 0);
  } else {
   x_133 = x_132;
  }
  lean_ctor_set(x_133, 0, x_126);
  lean_ctor_set(x_133, 1, x_131);
  return x_133;
  }
  else
  {
  lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; 
  lean_dec(x_121);
  lean_dec(x_3);
  x_134 = lean_ctor_get(x_125, 0);
  lean_inc(x_134);
  x_135 = lean_ctor_get(x_125, 1);
  lean_inc(x_135);
  if (lean_is_exclusive(x_125)) {
   lean_ctor_release(x_125, 0);
   lean_ctor_release(x_125, 1);
   x_136 = x_125;
  } else {
   lean_dec_ref(x_125);
   x_136 = lean_box(0);
  }
  if (lean_is_scalar(x_136)) {
   x_137 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_137 = x_136;
  }
  lean_ctor_set(x_137, 0, x_134);
  lean_ctor_set(x_137, 1, x_135);
  return x_137;
  }
  }
  else
  {
  lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; 
  lean_dec(x_3);
  lean_dec(x_2);
  x_138 = lean_ctor_get(x_113, 0);
  lean_inc(x_138);
  x_139 = lean_ctor_get(x_113, 1);
  lean_inc(x_139);
  if (lean_is_exclusive(x_113)) {
   lean_ctor_release(x_113, 0);
   lean_ctor_release(x_113, 1);
   x_140 = x_113;
  } else {
   lean_dec_ref(x_113);
   x_140 = lean_box(0);
  }
  if (lean_is_scalar(x_140)) {
   x_141 = lean_alloc_ctor(1, 2, 0);
  } else {
   x_141 = x_140;
  }
  lean_ctor_set(x_141, 0, x_138);
  lean_ctor_set(x_141, 1, x_139);
  return x_141;
  }
  }
  else
  {
  lean_object* x_142; lean_object* x_143; 
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  x_142 = lean_ctor_get(x_112, 0);
  lean_inc(x_142);
  lean_dec(x_112);
  x_143 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_143, 0, x_142);
  lean_ctor_set(x_143, 1, x_77);
  return x_143;
  }
  }
  }
  }
  }
  LEAN_EXPORT lean_object* l_Lean_throwError___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
  _start:
  {
  lean_object* x_5; 
  x_5 = l_Lean_throwError___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__2(x_1, x_2, x_3, x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  return x_5;
  }
  }
  LEAN_EXPORT lean_object* l_Lean_getConstInfo___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
  _start:
  {
  lean_object* x_5; 
  x_5 = l_Lean_getConstInfo___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__1(x_1, x_2, x_3, x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  return x_5;
  }
  }
  LEAN_EXPORT lean_object* l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
  _start:
  {
  lean_object* x_8; 
  x_8 = l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7);
  lean_dec(x_6);
  lean_dec(x_5);
  lean_dec(x_4);
  lean_dec(x_3);
  lean_dec(x_2);
  lean_dec(x_1);
  return x_8;
  }
  }
  static lean_object* _init_l_Lean_getExternConstArityExport___closed__1() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; 
  x_1 = lean_box(0);
  x_2 = l_Lean_Core_getMaxHeartbeats(x_1);
  return x_2;
  }
  }
  static lean_object* _init_l_Lean_getExternConstArityExport___closed__2() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; 
  x_1 = l_Lean_firstFrontendMacroScope;
  x_2 = lean_unsigned_to_nat(1u);
  x_3 = lean_nat_add(x_1, x_2);
  return x_3;
  }
  }
  static lean_object* _init_l_Lean_getExternConstArityExport___closed__3() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("_uniq");
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_getExternConstArityExport___closed__4() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; 
  x_1 = lean_box(0);
  x_2 = l_Lean_getExternConstArityExport___closed__3;
  x_3 = lean_name_mk_string(x_1, x_2);
  return x_3;
  }
  }
  static lean_object* _init_l_Lean_getExternConstArityExport___closed__5() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; lean_object* x_3; 
  x_1 = l_Lean_getExternConstArityExport___closed__4;
  x_2 = lean_unsigned_to_nat(1u);
  x_3 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_3, 0, x_1);
  lean_ctor_set(x_3, 1, x_2);
  return x_3;
  }
  }
  static lean_object* _init_l_Lean_getExternConstArityExport___closed__6() {
  _start:
  {
  uint8_t x_1; lean_object* x_2; lean_object* x_3; 
  x_1 = 1;
  x_2 = l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__7;
  x_3 = lean_alloc_ctor(0, 1, 1);
  lean_ctor_set(x_3, 0, x_2);
  lean_ctor_set_uint8(x_3, sizeof(void*)*1, x_1);
  return x_3;
  }
  }
  static lean_object* _init_l_Lean_getExternConstArityExport___closed__7() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; 
  x_1 = l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__11;
  x_2 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_2, 0, x_1);
  lean_ctor_set(x_2, 1, x_1);
  return x_2;
  }
  }
  LEAN_EXPORT lean_object* lean_get_extern_const_arity(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
  _start:
  {
  lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; 
  x_4 = lean_box(0);
  x_5 = l_Lean_getExternConstArityExport___closed__2;
  x_6 = l_Lean_getExternConstArityExport___closed__5;
  x_7 = l_Lean_getExternConstArityExport___closed__6;
  x_8 = l_Lean_getExternConstArityExport___closed__7;
  x_9 = lean_alloc_ctor(0, 5, 0);
  lean_ctor_set(x_9, 0, x_1);
  lean_ctor_set(x_9, 1, x_5);
  lean_ctor_set(x_9, 2, x_6);
  lean_ctor_set(x_9, 3, x_7);
  lean_ctor_set(x_9, 4, x_8);
  x_10 = lean_io_get_num_heartbeats(x_3);
  x_11 = lean_ctor_get(x_10, 0);
  lean_inc(x_11);
  x_12 = lean_ctor_get(x_10, 1);
  lean_inc(x_12);
  lean_dec(x_10);
  x_13 = lean_unsigned_to_nat(0u);
  x_14 = lean_unsigned_to_nat(1000u);
  x_15 = lean_box(0);
  x_16 = lean_box(0);
  x_17 = l_Lean_getExternConstArityExport___closed__1;
  x_18 = l_Lean_firstFrontendMacroScope;
  x_19 = lean_alloc_ctor(0, 9, 0);
  lean_ctor_set(x_19, 0, x_4);
  lean_ctor_set(x_19, 1, x_13);
  lean_ctor_set(x_19, 2, x_14);
  lean_ctor_set(x_19, 3, x_15);
  lean_ctor_set(x_19, 4, x_16);
  lean_ctor_set(x_19, 5, x_4);
  lean_ctor_set(x_19, 6, x_11);
  lean_ctor_set(x_19, 7, x_17);
  lean_ctor_set(x_19, 8, x_18);
  x_20 = lean_st_mk_ref(x_9, x_12);
  x_21 = lean_ctor_get(x_20, 0);
  lean_inc(x_21);
  x_22 = lean_ctor_get(x_20, 1);
  lean_inc(x_22);
  lean_dec(x_20);
  lean_inc(x_21);
  x_23 = l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity(x_2, x_19, x_21, x_22);
  if (lean_obj_tag(x_23) == 0)
  {
  lean_object* x_24; lean_object* x_25; lean_object* x_26; uint8_t x_27; 
  x_24 = lean_ctor_get(x_23, 0);
  lean_inc(x_24);
  x_25 = lean_ctor_get(x_23, 1);
  lean_inc(x_25);
  lean_dec(x_23);
  x_26 = lean_st_ref_get(x_21, x_25);
  lean_dec(x_21);
  x_27 = !lean_is_exclusive(x_26);
  if (x_27 == 0)
  {
  lean_object* x_28; lean_object* x_29; 
  x_28 = lean_ctor_get(x_26, 0);
  lean_dec(x_28);
  x_29 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_29, 0, x_24);
  lean_ctor_set(x_26, 0, x_29);
  return x_26;
  }
  else
  {
  lean_object* x_30; lean_object* x_31; lean_object* x_32; 
  x_30 = lean_ctor_get(x_26, 1);
  lean_inc(x_30);
  lean_dec(x_26);
  x_31 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_31, 0, x_24);
  x_32 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_32, 0, x_31);
  lean_ctor_set(x_32, 1, x_30);
  return x_32;
  }
  }
  else
  {
  lean_object* x_33; 
  lean_dec(x_21);
  x_33 = lean_ctor_get(x_23, 0);
  lean_inc(x_33);
  if (lean_obj_tag(x_33) == 0)
  {
  lean_object* x_34; lean_object* x_35; lean_object* x_36; 
  x_34 = lean_ctor_get(x_23, 1);
  lean_inc(x_34);
  lean_dec(x_23);
  x_35 = lean_ctor_get(x_33, 1);
  lean_inc(x_35);
  lean_dec(x_33);
  x_36 = l_Lean_MessageData_toString(x_35, x_34);
  if (lean_obj_tag(x_36) == 0)
  {
  uint8_t x_37; 
  x_37 = !lean_is_exclusive(x_36);
  if (x_37 == 0)
  {
  lean_object* x_38; lean_object* x_39; 
  x_38 = lean_ctor_get(x_36, 0);
  lean_dec(x_38);
  x_39 = lean_box(0);
  lean_ctor_set(x_36, 0, x_39);
  return x_36;
  }
  else
  {
  lean_object* x_40; lean_object* x_41; lean_object* x_42; 
  x_40 = lean_ctor_get(x_36, 1);
  lean_inc(x_40);
  lean_dec(x_36);
  x_41 = lean_box(0);
  x_42 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_42, 0, x_41);
  lean_ctor_set(x_42, 1, x_40);
  return x_42;
  }
  }
  else
  {
  uint8_t x_43; 
  x_43 = !lean_is_exclusive(x_36);
  if (x_43 == 0)
  {
  lean_object* x_44; lean_object* x_45; 
  x_44 = lean_ctor_get(x_36, 0);
  lean_dec(x_44);
  x_45 = lean_box(0);
  lean_ctor_set_tag(x_36, 0);
  lean_ctor_set(x_36, 0, x_45);
  return x_36;
  }
  else
  {
  lean_object* x_46; lean_object* x_47; lean_object* x_48; 
  x_46 = lean_ctor_get(x_36, 1);
  lean_inc(x_46);
  lean_dec(x_36);
  x_47 = lean_box(0);
  x_48 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_48, 0, x_47);
  lean_ctor_set(x_48, 1, x_46);
  return x_48;
  }
  }
  }
  else
  {
  uint8_t x_49; 
  lean_dec(x_33);
  x_49 = !lean_is_exclusive(x_23);
  if (x_49 == 0)
  {
  lean_object* x_50; lean_object* x_51; 
  x_50 = lean_ctor_get(x_23, 0);
  lean_dec(x_50);
  x_51 = lean_box(0);
  lean_ctor_set_tag(x_23, 0);
  lean_ctor_set(x_23, 0, x_51);
  return x_23;
  }
  else
  {
  lean_object* x_52; lean_object* x_53; lean_object* x_54; 
  x_52 = lean_ctor_get(x_23, 1);
  lean_inc(x_52);
  lean_dec(x_23);
  x_53 = lean_box(0);
  x_54 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_54, 0, x_53);
  lean_ctor_set(x_54, 1, x_52);
  return x_54;
  }
  }
  }
  }
  }
  lean_object* initialize_Init(uint8_t builtin, lean_object*);
  lean_object* initialize_Lean_Expr(uint8_t builtin, lean_object*);
  lean_object* initialize_Lean_Environment(uint8_t builtin, lean_object*);
  lean_object* initialize_Lean_Attributes(uint8_t builtin, lean_object*);
  lean_object* initialize_Lean_ProjFns(uint8_t builtin, lean_object*);
  lean_object* initialize_Lean_Meta_Basic(uint8_t builtin, lean_object*);
  static bool _G_initialized = false;
  LEAN_EXPORT lean_object* initialize_Lean_Compiler_ExternAttr(uint8_t builtin, lean_object* w) {
  lean_object * res;
  if (_G_initialized) return lean_io_result_mk_ok(lean_box(0));
  _G_initialized = true;
  res = initialize_Init(builtin, lean_io_mk_world());
  if (lean_io_result_is_error(res)) return res;
  lean_dec_ref(res);
  res = initialize_Lean_Expr(builtin, lean_io_mk_world());
  if (lean_io_result_is_error(res)) return res;
  lean_dec_ref(res);
  res = initialize_Lean_Environment(builtin, lean_io_mk_world());
  if (lean_io_result_is_error(res)) return res;
  lean_dec_ref(res);
  res = initialize_Lean_Attributes(builtin, lean_io_mk_world());
  if (lean_io_result_is_error(res)) return res;
  lean_dec_ref(res);
  res = initialize_Lean_ProjFns(builtin, lean_io_mk_world());
  if (lean_io_result_is_error(res)) return res;
  lean_dec_ref(res);
  res = initialize_Lean_Meta_Basic(builtin, lean_io_mk_world());
  if (lean_io_result_is_error(res)) return res;
  lean_dec_ref(res);
  l_Lean_ExternAttrData_arity_x3f___default = _init_l_Lean_ExternAttrData_arity_x3f___default();
  lean_mark_persistent(l_Lean_ExternAttrData_arity_x3f___default);
  l_Lean_instInhabitedExternAttrData___closed__1 = _init_l_Lean_instInhabitedExternAttrData___closed__1();
  lean_mark_persistent(l_Lean_instInhabitedExternAttrData___closed__1);
  l_Lean_instInhabitedExternAttrData = _init_l_Lean_instInhabitedExternAttrData();
  lean_mark_persistent(l_Lean_instInhabitedExternAttrData);
  l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3___closed__1 = _init_l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3___closed__1();
  lean_mark_persistent(l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3___closed__1);
  l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3___closed__2 = _init_l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3___closed__2();
  lean_mark_persistent(l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3___closed__2);
  l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3___closed__3 = _init_l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3___closed__3();
  lean_mark_persistent(l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3___closed__3);
  l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3___closed__4 = _init_l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3___closed__4();
  lean_mark_persistent(l_Array_forInUnsafe_loop___at___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___spec__3___closed__4);
  l___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___lambda__1___closed__1 = _init_l___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___lambda__1___closed__1();
  lean_mark_persistent(l___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___lambda__1___closed__1);
  l___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___closed__1 = _init_l___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___closed__1();
  lean_mark_persistent(l___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___closed__1);
  l___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___closed__2 = _init_l___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___closed__2();
  lean_mark_persistent(l___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___closed__2);
  l___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___closed__3 = _init_l___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___closed__3();
  lean_mark_persistent(l___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___closed__3);
  l___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___closed__4 = _init_l___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___closed__4();
  lean_mark_persistent(l___private_Lean_Compiler_ExternAttr_0__Lean_syntaxToExternAttrData___closed__4);
  l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____lambda__2___closed__1 = _init_l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____lambda__2___closed__1();
  lean_mark_persistent(l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____lambda__2___closed__1);
  l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__1 = _init_l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__1();
  lean_mark_persistent(l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__1);
  l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__2 = _init_l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__2();
  lean_mark_persistent(l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__2);
  l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__3 = _init_l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__3();
  lean_mark_persistent(l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__3);
  l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__4 = _init_l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__4();
  lean_mark_persistent(l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__4);
  l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__5 = _init_l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__5();
  lean_mark_persistent(l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__5);
  l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__6 = _init_l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__6();
  lean_mark_persistent(l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__6);
  l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__7 = _init_l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__7();
  lean_mark_persistent(l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__7);
  l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__8 = _init_l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__8();
  lean_mark_persistent(l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397____closed__8);
  if (builtin) {res = l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_397_(lean_io_mk_world());
  if (lean_io_result_is_error(res)) return res;
  l_Lean_externAttr = lean_io_result_get_value(res);
  lean_mark_persistent(l_Lean_externAttr);
  lean_dec_ref(res);
  }l_Lean_getExternAttrData___closed__1 = _init_l_Lean_getExternAttrData___closed__1();
  lean_mark_persistent(l_Lean_getExternAttrData___closed__1);
  l_Lean_expandExternPatternAux___closed__1 = _init_l_Lean_expandExternPatternAux___closed__1();
  l_Lean_expandExternPatternAux___closed__2 = _init_l_Lean_expandExternPatternAux___closed__2();
  lean_mark_persistent(l_Lean_expandExternPatternAux___closed__2);
  l_Lean_expandExternPatternAux___closed__3 = _init_l_Lean_expandExternPatternAux___closed__3();
  l_Lean_mkSimpleFnCall___closed__1 = _init_l_Lean_mkSimpleFnCall___closed__1();
  lean_mark_persistent(l_Lean_mkSimpleFnCall___closed__1);
  l_Lean_mkSimpleFnCall___closed__2 = _init_l_Lean_mkSimpleFnCall___closed__2();
  lean_mark_persistent(l_Lean_mkSimpleFnCall___closed__2);
  l_Lean_mkSimpleFnCall___closed__3 = _init_l_Lean_mkSimpleFnCall___closed__3();
  lean_mark_persistent(l_Lean_mkSimpleFnCall___closed__3);
  l_Lean_getConstInfo___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__1___closed__1 = _init_l_Lean_getConstInfo___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__1___closed__1();
  lean_mark_persistent(l_Lean_getConstInfo___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__1___closed__1);
  l_Lean_getConstInfo___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__1___closed__2 = _init_l_Lean_getConstInfo___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__1___closed__2();
  lean_mark_persistent(l_Lean_getConstInfo___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__1___closed__2);
  l_Lean_getConstInfo___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__1___closed__3 = _init_l_Lean_getConstInfo___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__1___closed__3();
  lean_mark_persistent(l_Lean_getConstInfo___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__1___closed__3);
  l_Lean_getConstInfo___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__1___closed__4 = _init_l_Lean_getConstInfo___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__1___closed__4();
  lean_mark_persistent(l_Lean_getConstInfo___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__1___closed__4);
  l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__1 = _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__1();
  lean_mark_persistent(l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__1);
  l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__2 = _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__2();
  lean_mark_persistent(l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__2);
  l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__3 = _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__3();
  lean_mark_persistent(l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__3);
  l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__4 = _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__4();
  lean_mark_persistent(l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__4);
  l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__5 = _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__5();
  lean_mark_persistent(l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__5);
  l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__6 = _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__6();
  lean_mark_persistent(l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__6);
  l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__7 = _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__7();
  lean_mark_persistent(l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__7);
  l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__8 = _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__8();
  lean_mark_persistent(l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__8);
  l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__9 = _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__9();
  lean_mark_persistent(l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__9);
  l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__10 = _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__10();
  lean_mark_persistent(l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__10);
  l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__11 = _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__11();
  lean_mark_persistent(l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__11);
  l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__12 = _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__12();
  lean_mark_persistent(l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__12);
  l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__13 = _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__13();
  lean_mark_persistent(l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__13);
  l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__14 = _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__14();
  lean_mark_persistent(l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__14);
  l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__15 = _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__15();
  lean_mark_persistent(l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__15);
  l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__16 = _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__16();
  lean_mark_persistent(l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__16);
  l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__17 = _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__17();
  lean_mark_persistent(l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__17);
  l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__18 = _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__18();
  lean_mark_persistent(l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__18);
  l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__19 = _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__19();
  lean_mark_persistent(l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__19);
  l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__20 = _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__20();
  lean_mark_persistent(l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__20);
  l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__21 = _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__21();
  lean_mark_persistent(l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__21);
  l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__22 = _init_l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__22();
  lean_mark_persistent(l___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___closed__22);
  l_Lean_getExternConstArityExport___closed__1 = _init_l_Lean_getExternConstArityExport___closed__1();
  lean_mark_persistent(l_Lean_getExternConstArityExport___closed__1);
  l_Lean_getExternConstArityExport___closed__2 = _init_l_Lean_getExternConstArityExport___closed__2();
  lean_mark_persistent(l_Lean_getExternConstArityExport___closed__2);
  l_Lean_getExternConstArityExport___closed__3 = _init_l_Lean_getExternConstArityExport___closed__3();
  lean_mark_persistent(l_Lean_getExternConstArityExport___closed__3);
  l_Lean_getExternConstArityExport___closed__4 = _init_l_Lean_getExternConstArityExport___closed__4();
  lean_mark_persistent(l_Lean_getExternConstArityExport___closed__4);
  l_Lean_getExternConstArityExport___closed__5 = _init_l_Lean_getExternConstArityExport___closed__5();
  lean_mark_persistent(l_Lean_getExternConstArityExport___closed__5);
  l_Lean_getExternConstArityExport___closed__6 = _init_l_Lean_getExternConstArityExport___closed__6();
  lean_mark_persistent(l_Lean_getExternConstArityExport___closed__6);
  l_Lean_getExternConstArityExport___closed__7 = _init_l_Lean_getExternConstArityExport___closed__7();
  lean_mark_persistent(l_Lean_getExternConstArityExport___closed__7);
  return lean_io_result_mk_ok(lean_box(0));
  }
  #ifdef __cplusplus
  }
  #endif
  