// Lean compiler output
// Module: Lean.Elab.PreDefinition.Structural.Basic
// Imports: Lean.Meta.Basic Lean.Meta.ForEachExpr
#include <lean/lean.h>
#if defined(__clang__)
#pragma clang diagnostic ignored "-Wunused-parameter"
#pragma clang diagnostic ignored "-Wunused-label"
#elif defined(__GNUC__) && !defined(__CLANG__)
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Wunused-label"
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#endif
#ifdef __cplusplus
extern "C" {
#endif
LEAN_EXPORT lean_object* l_panic___at_Lean_Elab_Structural_Positions_mapMwith___spec__2___rarg(lean_object*, lean_object*);
lean_object* lean_mk_empty_array_with_capacity(lean_object*);
lean_object* l___private_Lean_Expr_0__Lean_Expr_getAppNumArgsAux(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Structural_Positions_mapMwith___spec__3___rarg(lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*);
static lean_object* l_Lean_Elab_Structural_Positions_mapMwith___rarg___closed__6;
LEAN_EXPORT lean_object* l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382_(lean_object*);
LEAN_EXPORT lean_object* l_Array_qsort_sort___at_Lean_Elab_Structural_Positions_groupAndSort___spec__3(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Structural_State_addMatchers___default;
static lean_object* l_Lean_Elab_Structural_Positions_groupAndSort___rarg___closed__6;
LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Structural_Positions_groupAndSort___spec__2___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Structural_Positions_groupAndSort___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*);
static lean_object* l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__17;
LEAN_EXPORT lean_object* l_Lean_Elab_Structural_Positions_groupAndSort___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* lean_array_push(lean_object*, lean_object*);
lean_object* l_Array_qpartition___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Structural_Positions_mapMwith___spec__4___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
uint8_t lean_usize_dec_eq(size_t, size_t);
LEAN_EXPORT lean_object* l_Lean_Elab_Structural_Positions_mapMwith___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* lean_array_fget(lean_object*, lean_object*);
static lean_object* l_Lean_Elab_Structural_instInhabitedM___closed__1;
LEAN_EXPORT lean_object* l_Array_qsort_sort___at_Lean_Elab_Structural_Positions_groupAndSort___spec__3___boxed(lean_object*, lean_object*, lean_object*);
lean_object* l_Nat_blt___boxed(lean_object*, lean_object*);
static lean_object* l_Lean_Elab_Structural_Positions_mapMwith___rarg___closed__2;
static lean_object* l_Lean_Elab_Structural_Positions_groupAndSort___rarg___closed__2;
uint8_t l_Lean_Expr_isAppOf(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Array_isEqvAux___at_Lean_Elab_Structural_Positions_groupAndSort___spec__5___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_stringToMessageData(lean_object*);
static lean_object* l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__5;
static lean_object* l_Lean_Elab_Structural_Positions_mapMwith___rarg___closed__4;
LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Structural_Positions_mapMwith___spec__3(lean_object*);
LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_Structural_Positions_numIndices___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__7;
lean_object* l_Lean_Name_mkStr3(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Structural_Positions_groupAndSort___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
size_t lean_usize_of_nat(lean_object*);
static lean_object* l_Lean_Elab_Structural_Positions_groupAndSort___rarg___closed__3;
LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_Structural_Positions_groupAndSort___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Structural_recArgHasLooseBVarsAt___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Structural_Positions_mapMwith___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Structural_Positions_numIndices___boxed(lean_object*);
static lean_object* l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__1;
static lean_object* l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__12;
lean_object* l_Lean_Expr_getRevArg_x21(lean_object*, lean_object*);
uint8_t lean_nat_dec_eq(lean_object*, lean_object*);
static lean_object* l_Lean_Elab_Structural_Positions_groupAndSort___rarg___closed__4;
lean_object* l_Array_zip___rarg(lean_object*, lean_object*);
static lean_object* l_Lean_Elab_Structural_Positions_groupAndSort___rarg___closed__1;
static lean_object* l_Lean_Elab_Structural_Positions_mapMwith___rarg___closed__1;
LEAN_EXPORT lean_object* l_Lean_Elab_Structural_Positions_numIndices(lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Structural_Positions_groupAndSort(lean_object*, lean_object*);
lean_object* l_Lean_registerTraceClass(lean_object*, uint8_t, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Elab_Structural_instInhabitedM___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT uint8_t l_Lean_Elab_Structural_recArgHasLooseBVarsAt___lambda__1(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT uint8_t l_Lean_Elab_Structural_recArgHasLooseBVarsAt(lean_object*, lean_object*, lean_object*);
lean_object* l_outOfBounds___rarg(lean_object*);
static lean_object* l_Lean_Elab_Structural_Positions_mapMwith___rarg___closed__7;
lean_object* lean_st_ref_get(lean_object*, lean_object*);
lean_object* lean_st_mk_ref(lean_object*, lean_object*);
uint8_t l_Lean_Expr_hasLooseBVars(lean_object*);
lean_object* l_Lean_Name_num___override(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_panic___at_Lean_Elab_Structural_Positions_mapMwith___spec__1___rarg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Structural_run___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Elab_Structural_Positions_mapMwith___rarg___closed__5;
static lean_object* l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__8;
LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Structural_Positions_mapMwith___spec__4___rarg___lambda__1(size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Elab_Structural_instInhabitedM___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Name_str___override(lean_object*, lean_object*);
static lean_object* l_Array_qsort_sort___at_Lean_Elab_Structural_Positions_groupAndSort___spec__3___closed__1;
lean_object* l___private_Init_Util_0__mkPanicMessageWithDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Array_range(lean_object*);
static lean_object* l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__13;
static lean_object* l_Lean_Elab_Structural_Positions_groupAndSort___rarg___closed__5;
static lean_object* l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__15;
LEAN_EXPORT lean_object* l_Lean_Elab_Structural_instInhabitedM(lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Elab_Structural_instInhabitedM___spec__1(lean_object*);
LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_Structural_Positions_groupAndSort___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_panic___at_Lean_Elab_Structural_Positions_mapMwith___spec__1(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_Structural_Positions_groupAndSort___spec__1(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_panic___at_Lean_Elab_Structural_Positions_groupAndSort___spec__4(lean_object*);
LEAN_EXPORT uint8_t l_Array_isEqvAux___at_Lean_Elab_Structural_Positions_groupAndSort___spec__5___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_panic___at_Lean_Elab_Structural_Positions_mapMwith___spec__2(lean_object*, lean_object*);
uint8_t lean_nat_dec_eq(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Structural_Positions_mapMwith(lean_object*, lean_object*, lean_object*, lean_object*);
uint8_t lean_nat_dec_lt(lean_object*, lean_object*);
static lean_object* l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__3;
lean_object* l_Lean_addMessageContextFull___at_Lean_Meta_instAddMessageContextMetaM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__16;
lean_object* lean_panic_fn(lean_object*, lean_object*);
static lean_object* l_Lean_Elab_Structural_State_addMatchers___default___closed__1;
lean_object* lean_nat_sub(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Structural_run(lean_object*);
static lean_object* l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__6;
LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Structural_Positions_mapMwith___spec__3___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__2;
lean_object* l_Array_flatten___rarg(lean_object*);
static lean_object* l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__18;
size_t lean_usize_add(size_t, size_t);
static lean_object* l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__9;
LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Structural_Positions_mapMwith___spec__4(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Structural_Positions_mapMwith___spec__4___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*);
lean_object* lean_array_uget(lean_object*, size_t);
size_t lean_array_size(lean_object*);
static lean_object* l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__4;
lean_object* l_instInhabitedOfMonad___rarg(lean_object*, lean_object*);
static lean_object* l_Lean_Elab_Structural_Positions_mapMwith___rarg___closed__3;
static lean_object* l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__19;
static lean_object* l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__10;
LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Structural_Positions_groupAndSort___spec__2(lean_object*, lean_object*);
lean_object* lean_string_append(lean_object*, lean_object*);
lean_object* lean_array_get_size(lean_object*);
static lean_object* l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__20;
lean_object* lean_find_expr(lean_object*, lean_object*);
uint8_t lean_nat_dec_le(lean_object*, lean_object*);
uint8_t lean_usize_dec_lt(size_t, size_t);
static lean_object* l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__11;
LEAN_EXPORT lean_object* l_Array_isEqvAux___at_Lean_Elab_Structural_Positions_groupAndSort___spec__5(lean_object*, lean_object*);
lean_object* lean_nat_add(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Structural_recArgHasLooseBVarsAt___lambda__1___boxed(lean_object*, lean_object*, lean_object*);
lean_object* lean_array_uset(lean_object*, size_t, lean_object*);
LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Structural_Positions_mapMwith___spec__4___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Elab_Structural_instInhabitedM___closed__2;
static lean_object* l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__14;
LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_Structural_Positions_numIndices___spec__1(lean_object*, size_t, size_t, lean_object*);
static lean_object* _init_l_Lean_Elab_Structural_State_addMatchers___default___closed__1() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(0u);
x_2 = lean_mk_empty_array_with_capacity(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Elab_Structural_State_addMatchers___default() {
_start:
{
lean_object* x_1; 
x_1 = l_Lean_Elab_Structural_State_addMatchers___default___closed__1;
return x_1;
}
}
LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Elab_Structural_instInhabitedM___spec__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
_start:
{
lean_object* x_8; lean_object* x_9; uint8_t x_10; 
x_8 = lean_ctor_get(x_5, 5);
x_9 = l_Lean_addMessageContextFull___at_Lean_Meta_instAddMessageContextMetaM___spec__1(x_1, x_3, x_4, x_5, x_6, x_7);
x_10 = !lean_is_exclusive(x_9);
if (x_10 == 0)
{
lean_object* x_11; lean_object* x_12; 
x_11 = lean_ctor_get(x_9, 0);
lean_inc(x_8);
x_12 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_12, 0, x_8);
lean_ctor_set(x_12, 1, x_11);
lean_ctor_set_tag(x_9, 1);
lean_ctor_set(x_9, 0, x_12);
return x_9;
}
else
{
lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; 
x_13 = lean_ctor_get(x_9, 0);
x_14 = lean_ctor_get(x_9, 1);
lean_inc(x_14);
lean_inc(x_13);
lean_dec(x_9);
lean_inc(x_8);
x_15 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_15, 0, x_8);
lean_ctor_set(x_15, 1, x_13);
x_16 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_16, 0, x_15);
lean_ctor_set(x_16, 1, x_14);
return x_16;
}
}
}
LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Elab_Structural_instInhabitedM___spec__1(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = lean_alloc_closure((void*)(l_Lean_throwError___at_Lean_Elab_Structural_instInhabitedM___spec__1___rarg___boxed), 7, 0);
return x_2;
}
}
static lean_object* _init_l_Lean_Elab_Structural_instInhabitedM___closed__1() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("failed", 6, 6);
return x_1;
}
}
static lean_object* _init_l_Lean_Elab_Structural_instInhabitedM___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lean_Elab_Structural_instInhabitedM___closed__1;
x_2 = l_Lean_stringToMessageData(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_Structural_instInhabitedM(lean_object* x_1) {
_start:
{
lean_object* x_2; lean_object* x_3; 
x_2 = l_Lean_Elab_Structural_instInhabitedM___closed__2;
x_3 = lean_alloc_closure((void*)(l_Lean_throwError___at_Lean_Elab_Structural_instInhabitedM___spec__1___rarg___boxed), 7, 1);
lean_closure_set(x_3, 0, x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Elab_Structural_instInhabitedM___spec__1___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
_start:
{
lean_object* x_8; 
x_8 = l_Lean_throwError___at_Lean_Elab_Structural_instInhabitedM___spec__1___rarg(x_1, x_2, x_3, x_4, x_5, x_6, x_7);
lean_dec(x_6);
lean_dec(x_5);
lean_dec(x_4);
lean_dec(x_3);
lean_dec(x_2);
return x_8;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_Structural_run___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
_start:
{
lean_object* x_8; uint8_t x_9; 
x_8 = lean_st_mk_ref(x_2, x_7);
x_9 = !lean_is_exclusive(x_8);
if (x_9 == 0)
{
lean_object* x_10; lean_object* x_11; lean_object* x_12; 
x_10 = lean_ctor_get(x_8, 0);
x_11 = lean_ctor_get(x_8, 1);
lean_inc(x_10);
x_12 = lean_apply_6(x_1, x_10, x_3, x_4, x_5, x_6, x_11);
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_12, 0);
lean_inc(x_13);
x_14 = lean_ctor_get(x_12, 1);
lean_inc(x_14);
lean_dec(x_12);
x_15 = lean_st_ref_get(x_10, x_14);
lean_dec(x_10);
x_16 = !lean_is_exclusive(x_15);
if (x_16 == 0)
{
lean_object* x_17; 
x_17 = lean_ctor_get(x_15, 0);
lean_ctor_set(x_8, 1, x_17);
lean_ctor_set(x_8, 0, x_13);
lean_ctor_set(x_15, 0, x_8);
return x_15;
}
else
{
lean_object* x_18; lean_object* x_19; lean_object* x_20; 
x_18 = lean_ctor_get(x_15, 0);
x_19 = lean_ctor_get(x_15, 1);
lean_inc(x_19);
lean_inc(x_18);
lean_dec(x_15);
lean_ctor_set(x_8, 1, x_18);
lean_ctor_set(x_8, 0, x_13);
x_20 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_20, 0, x_8);
lean_ctor_set(x_20, 1, x_19);
return x_20;
}
}
else
{
uint8_t x_21; 
lean_free_object(x_8);
lean_dec(x_10);
x_21 = !lean_is_exclusive(x_12);
if (x_21 == 0)
{
return x_12;
}
else
{
lean_object* x_22; lean_object* x_23; lean_object* x_24; 
x_22 = lean_ctor_get(x_12, 0);
x_23 = lean_ctor_get(x_12, 1);
lean_inc(x_23);
lean_inc(x_22);
lean_dec(x_12);
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_object* x_27; 
x_25 = lean_ctor_get(x_8, 0);
x_26 = lean_ctor_get(x_8, 1);
lean_inc(x_26);
lean_inc(x_25);
lean_dec(x_8);
lean_inc(x_25);
x_27 = lean_apply_6(x_1, x_25, x_3, x_4, x_5, x_6, x_26);
if (lean_obj_tag(x_27) == 0)
{
lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; 
x_28 = lean_ctor_get(x_27, 0);
lean_inc(x_28);
x_29 = lean_ctor_get(x_27, 1);
lean_inc(x_29);
lean_dec(x_27);
x_30 = lean_st_ref_get(x_25, x_29);
lean_dec(x_25);
x_31 = lean_ctor_get(x_30, 0);
lean_inc(x_31);
x_32 = lean_ctor_get(x_30, 1);
lean_inc(x_32);
if (lean_is_exclusive(x_30)) {
 lean_ctor_release(x_30, 0);
 lean_ctor_release(x_30, 1);
 x_33 = x_30;
} else {
 lean_dec_ref(x_30);
 x_33 = lean_box(0);
}
x_34 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_34, 0, x_28);
lean_ctor_set(x_34, 1, x_31);
if (lean_is_scalar(x_33)) {
 x_35 = lean_alloc_ctor(0, 2, 0);
} else {
 x_35 = x_33;
}
lean_ctor_set(x_35, 0, x_34);
lean_ctor_set(x_35, 1, x_32);
return x_35;
}
else
{
lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; 
lean_dec(x_25);
x_36 = lean_ctor_get(x_27, 0);
lean_inc(x_36);
x_37 = lean_ctor_get(x_27, 1);
lean_inc(x_37);
if (lean_is_exclusive(x_27)) {
 lean_ctor_release(x_27, 0);
 lean_ctor_release(x_27, 1);
 x_38 = x_27;
} else {
 lean_dec_ref(x_27);
 x_38 = lean_box(0);
}
if (lean_is_scalar(x_38)) {
 x_39 = lean_alloc_ctor(1, 2, 0);
} else {
 x_39 = x_38;
}
lean_ctor_set(x_39, 0, x_36);
lean_ctor_set(x_39, 1, x_37);
return x_39;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_Structural_run(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Structural_run___rarg), 7, 0);
return x_2;
}
}
LEAN_EXPORT uint8_t l_Lean_Elab_Structural_recArgHasLooseBVarsAt___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
uint8_t x_4; 
x_4 = l_Lean_Expr_isAppOf(x_3, x_1);
if (x_4 == 0)
{
uint8_t x_5; 
x_5 = 0;
return x_5;
}
else
{
lean_object* x_6; lean_object* x_7; uint8_t x_8; 
x_6 = lean_unsigned_to_nat(0u);
x_7 = l___private_Lean_Expr_0__Lean_Expr_getAppNumArgsAux(x_3, x_6);
x_8 = lean_nat_dec_lt(x_2, x_7);
if (x_8 == 0)
{
uint8_t x_9; 
lean_dec(x_7);
x_9 = 0;
return x_9;
}
else
{
lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; 
x_10 = lean_nat_sub(x_7, x_2);
lean_dec(x_7);
x_11 = lean_unsigned_to_nat(1u);
x_12 = lean_nat_sub(x_10, x_11);
lean_dec(x_10);
x_13 = l_Lean_Expr_getRevArg_x21(x_3, x_12);
x_14 = l_Lean_Expr_hasLooseBVars(x_13);
lean_dec(x_13);
return x_14;
}
}
}
}
LEAN_EXPORT uint8_t l_Lean_Elab_Structural_recArgHasLooseBVarsAt(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; lean_object* x_5; 
x_4 = lean_alloc_closure((void*)(l_Lean_Elab_Structural_recArgHasLooseBVarsAt___lambda__1___boxed), 3, 2);
lean_closure_set(x_4, 0, x_1);
lean_closure_set(x_4, 1, x_2);
x_5 = lean_find_expr(x_4, x_3);
lean_dec(x_4);
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_Elab_Structural_recArgHasLooseBVarsAt___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
uint8_t x_4; lean_object* x_5; 
x_4 = l_Lean_Elab_Structural_recArgHasLooseBVarsAt___lambda__1(x_1, x_2, x_3);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
x_5 = lean_box(x_4);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_Structural_recArgHasLooseBVarsAt___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
uint8_t x_4; lean_object* x_5; 
x_4 = l_Lean_Elab_Structural_recArgHasLooseBVarsAt(x_1, x_2, x_3);
lean_dec(x_3);
x_5 = lean_box(x_4);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_Structural_Positions_numIndices___spec__1(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4) {
_start:
{
uint8_t x_5; 
x_5 = lean_usize_dec_eq(x_2, x_3);
if (x_5 == 0)
{
lean_object* x_6; lean_object* x_7; lean_object* x_8; size_t x_9; size_t x_10; 
x_6 = lean_array_uget(x_1, x_2);
x_7 = lean_array_get_size(x_6);
lean_dec(x_6);
x_8 = lean_nat_add(x_4, x_7);
lean_dec(x_7);
lean_dec(x_4);
x_9 = 1;
x_10 = lean_usize_add(x_2, x_9);
x_2 = x_10;
x_4 = x_8;
goto _start;
}
else
{
return x_4;
}
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_Structural_Positions_numIndices(lean_object* x_1) {
_start:
{
lean_object* x_2; lean_object* x_3; uint8_t x_4; 
x_2 = lean_array_get_size(x_1);
x_3 = lean_unsigned_to_nat(0u);
x_4 = lean_nat_dec_lt(x_3, x_2);
if (x_4 == 0)
{
lean_object* x_5; 
lean_dec(x_2);
x_5 = lean_unsigned_to_nat(0u);
return x_5;
}
else
{
uint8_t x_6; 
x_6 = lean_nat_dec_le(x_2, x_2);
if (x_6 == 0)
{
lean_object* x_7; 
lean_dec(x_2);
x_7 = lean_unsigned_to_nat(0u);
return x_7;
}
else
{
size_t x_8; size_t x_9; lean_object* x_10; 
x_8 = 0;
x_9 = lean_usize_of_nat(x_2);
lean_dec(x_2);
x_10 = l_Array_foldlMUnsafe_fold___at_Lean_Elab_Structural_Positions_numIndices___spec__1(x_1, x_8, x_9, x_3);
return x_10;
}
}
}
}
LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_Structural_Positions_numIndices___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
size_t x_5; size_t x_6; lean_object* x_7; 
x_5 = lean_unbox_usize(x_2);
lean_dec(x_2);
x_6 = lean_unbox_usize(x_3);
lean_dec(x_3);
x_7 = l_Array_foldlMUnsafe_fold___at_Lean_Elab_Structural_Positions_numIndices___spec__1(x_1, x_5, x_6, x_4);
lean_dec(x_1);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_Structural_Positions_numIndices___boxed(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = l_Lean_Elab_Structural_Positions_numIndices(x_1);
lean_dec(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_Structural_Positions_groupAndSort___spec__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, size_t x_8, size_t x_9, lean_object* x_10) {
_start:
{
uint8_t x_11; 
x_11 = lean_usize_dec_eq(x_8, x_9);
if (x_11 == 0)
{
lean_object* x_12; uint8_t x_13; size_t x_14; size_t x_15; 
x_12 = lean_array_uget(x_7, x_8);
x_13 = lean_nat_dec_lt(x_12, x_6);
x_14 = 1;
x_15 = lean_usize_add(x_8, x_14);
if (x_13 == 0)
{
lean_object* x_16; lean_object* x_17; lean_object* x_18; uint8_t x_19; 
lean_inc(x_1);
x_16 = l_outOfBounds___rarg(x_1);
lean_inc(x_3);
x_17 = lean_apply_1(x_3, x_16);
lean_inc(x_2);
lean_inc(x_5);
x_18 = lean_apply_2(x_2, x_17, x_5);
x_19 = lean_unbox(x_18);
lean_dec(x_18);
if (x_19 == 0)
{
lean_dec(x_12);
x_8 = x_15;
goto _start;
}
else
{
lean_object* x_21; 
x_21 = lean_array_push(x_10, x_12);
x_8 = x_15;
x_10 = x_21;
goto _start;
}
}
else
{
lean_object* x_23; lean_object* x_24; lean_object* x_25; uint8_t x_26; 
x_23 = lean_array_fget(x_4, x_12);
lean_inc(x_3);
x_24 = lean_apply_1(x_3, x_23);
lean_inc(x_2);
lean_inc(x_5);
x_25 = lean_apply_2(x_2, x_24, x_5);
x_26 = lean_unbox(x_25);
lean_dec(x_25);
if (x_26 == 0)
{
lean_dec(x_12);
x_8 = x_15;
goto _start;
}
else
{
lean_object* x_28; 
x_28 = lean_array_push(x_10, x_12);
x_8 = x_15;
x_10 = x_28;
goto _start;
}
}
}
else
{
lean_dec(x_5);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
return x_10;
}
}
}
LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_Structural_Positions_groupAndSort___spec__1(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 
x_3 = lean_alloc_closure((void*)(l_Array_foldlMUnsafe_fold___at_Lean_Elab_Structural_Positions_groupAndSort___spec__1___rarg___boxed), 10, 0);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Structural_Positions_groupAndSort___spec__2___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, size_t x_5, size_t x_6, lean_object* x_7) {
_start:
{
uint8_t x_8; 
x_8 = lean_usize_dec_lt(x_6, x_5);
if (x_8 == 0)
{
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
return x_7;
}
else
{
lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; uint8_t x_15; size_t x_16; size_t x_17; 
x_9 = lean_array_uget(x_7, x_6);
x_10 = lean_unsigned_to_nat(0u);
x_11 = lean_array_uset(x_7, x_6, x_10);
x_12 = lean_array_get_size(x_4);
lean_inc(x_12);
x_13 = l_Array_range(x_12);
x_14 = lean_array_get_size(x_13);
x_15 = lean_nat_dec_lt(x_10, x_14);
x_16 = 1;
x_17 = lean_usize_add(x_6, x_16);
if (x_15 == 0)
{
lean_object* x_18; lean_object* x_19; 
lean_dec(x_14);
lean_dec(x_13);
lean_dec(x_12);
lean_dec(x_9);
x_18 = l_Lean_Elab_Structural_State_addMatchers___default___closed__1;
x_19 = lean_array_uset(x_11, x_6, x_18);
x_6 = x_17;
x_7 = x_19;
goto _start;
}
else
{
uint8_t x_21; 
x_21 = lean_nat_dec_le(x_14, x_14);
if (x_21 == 0)
{
lean_object* x_22; lean_object* x_23; 
lean_dec(x_14);
lean_dec(x_13);
lean_dec(x_12);
lean_dec(x_9);
x_22 = l_Lean_Elab_Structural_State_addMatchers___default___closed__1;
x_23 = lean_array_uset(x_11, x_6, x_22);
x_6 = x_17;
x_7 = x_23;
goto _start;
}
else
{
size_t x_25; size_t x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; 
x_25 = 0;
x_26 = lean_usize_of_nat(x_14);
lean_dec(x_14);
x_27 = l_Lean_Elab_Structural_State_addMatchers___default___closed__1;
lean_inc(x_3);
lean_inc(x_2);
lean_inc(x_1);
x_28 = l_Array_foldlMUnsafe_fold___at_Lean_Elab_Structural_Positions_groupAndSort___spec__1___rarg(x_1, x_2, x_3, x_4, x_9, x_12, x_13, x_25, x_26, x_27);
lean_dec(x_13);
lean_dec(x_12);
x_29 = lean_array_uset(x_11, x_6, x_28);
x_6 = x_17;
x_7 = x_29;
goto _start;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Structural_Positions_groupAndSort___spec__2(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 
x_3 = lean_alloc_closure((void*)(l_Array_mapMUnsafe_map___at_Lean_Elab_Structural_Positions_groupAndSort___spec__2___rarg___boxed), 7, 0);
return x_3;
}
}
static lean_object* _init_l_Array_qsort_sort___at_Lean_Elab_Structural_Positions_groupAndSort___spec__3___closed__1() {
_start:
{
lean_object* x_1; 
x_1 = lean_alloc_closure((void*)(l_Nat_blt___boxed), 2, 0);
return x_1;
}
}
LEAN_EXPORT lean_object* l_Array_qsort_sort___at_Lean_Elab_Structural_Positions_groupAndSort___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
uint8_t x_4; 
x_4 = lean_nat_dec_lt(x_2, x_3);
if (x_4 == 0)
{
lean_dec(x_2);
return x_1;
}
else
{
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; 
x_5 = l_Array_qsort_sort___at_Lean_Elab_Structural_Positions_groupAndSort___spec__3___closed__1;
lean_inc(x_2);
x_6 = l_Array_qpartition___rarg(x_1, x_5, x_2, x_3);
x_7 = lean_ctor_get(x_6, 0);
lean_inc(x_7);
x_8 = lean_ctor_get(x_6, 1);
lean_inc(x_8);
lean_dec(x_6);
x_9 = lean_nat_dec_le(x_3, x_7);
if (x_9 == 0)
{
lean_object* x_10; lean_object* x_11; lean_object* x_12; 
x_10 = l_Array_qsort_sort___at_Lean_Elab_Structural_Positions_groupAndSort___spec__3(x_8, x_2, x_7);
x_11 = lean_unsigned_to_nat(1u);
x_12 = lean_nat_add(x_7, x_11);
lean_dec(x_7);
x_1 = x_10;
x_2 = x_12;
goto _start;
}
else
{
lean_dec(x_7);
lean_dec(x_2);
return x_8;
}
}
}
}
LEAN_EXPORT lean_object* l_panic___at_Lean_Elab_Structural_Positions_groupAndSort___spec__4(lean_object* x_1) {
_start:
{
lean_object* x_2; lean_object* x_3; 
x_2 = l_Lean_Elab_Structural_State_addMatchers___default___closed__1;
x_3 = lean_panic_fn(x_2, x_1);
return x_3;
}
}
LEAN_EXPORT uint8_t l_Array_isEqvAux___at_Lean_Elab_Structural_Positions_groupAndSort___spec__5___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) {
_start:
{
lean_object* x_10; uint8_t x_11; 
x_10 = lean_array_get_size(x_7);
x_11 = lean_nat_dec_lt(x_9, x_10);
lean_dec(x_10);
if (x_11 == 0)
{
uint8_t x_12; 
lean_dec(x_9);
x_12 = 1;
return x_12;
}
else
{
lean_object* x_13; lean_object* x_14; uint8_t x_15; 
x_13 = lean_array_fget(x_7, x_9);
x_14 = lean_array_fget(x_8, x_9);
x_15 = lean_nat_dec_eq(x_13, x_14);
lean_dec(x_14);
lean_dec(x_13);
if (x_15 == 0)
{
uint8_t x_16; 
lean_dec(x_9);
x_16 = 0;
return x_16;
}
else
{
lean_object* x_17; lean_object* x_18; 
x_17 = lean_unsigned_to_nat(1u);
x_18 = lean_nat_add(x_9, x_17);
lean_dec(x_9);
x_6 = lean_box(0);
x_9 = x_18;
goto _start;
}
}
}
}
LEAN_EXPORT lean_object* l_Array_isEqvAux___at_Lean_Elab_Structural_Positions_groupAndSort___spec__5(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 
x_3 = lean_alloc_closure((void*)(l_Array_isEqvAux___at_Lean_Elab_Structural_Positions_groupAndSort___spec__5___rarg___boxed), 9, 0);
return x_3;
}
}
static lean_object* _init_l_Lean_Elab_Structural_Positions_groupAndSort___rarg___closed__1() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("assertion violation: ", 21, 21);
return x_1;
}
}
static lean_object* _init_l_Lean_Elab_Structural_Positions_groupAndSort___rarg___closed__2() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("Array.range xs.size == positions.flatten.qsort Nat.blt\n  ", 57, 57);
return x_1;
}
}
static lean_object* _init_l_Lean_Elab_Structural_Positions_groupAndSort___rarg___closed__3() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lean_Elab_Structural_Positions_groupAndSort___rarg___closed__1;
x_2 = l_Lean_Elab_Structural_Positions_groupAndSort___rarg___closed__2;
x_3 = lean_string_append(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lean_Elab_Structural_Positions_groupAndSort___rarg___closed__4() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("Lean.Elab.PreDefinition.Structural.Basic", 40, 40);
return x_1;
}
}
static lean_object* _init_l_Lean_Elab_Structural_Positions_groupAndSort___rarg___closed__5() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("Lean.Elab.Structural.Positions.groupAndSort", 43, 43);
return x_1;
}
}
static lean_object* _init_l_Lean_Elab_Structural_Positions_groupAndSort___rarg___closed__6() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; 
x_1 = l_Lean_Elab_Structural_Positions_groupAndSort___rarg___closed__4;
x_2 = l_Lean_Elab_Structural_Positions_groupAndSort___rarg___closed__5;
x_3 = lean_unsigned_to_nat(76u);
x_4 = lean_unsigned_to_nat(2u);
x_5 = l_Lean_Elab_Structural_Positions_groupAndSort___rarg___closed__3;
x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_Structural_Positions_groupAndSort___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
size_t x_6; size_t x_7; lean_object* x_8; 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; uint8_t x_19; 
x_6 = lean_array_size(x_5);
x_7 = 0;
lean_inc(x_5);
lean_inc(x_3);
lean_inc(x_2);
lean_inc(x_1);
x_8 = l_Array_mapMUnsafe_map___at_Lean_Elab_Structural_Positions_groupAndSort___spec__2___rarg(x_1, x_2, x_3, x_4, x_6, x_7, x_5);
x_9 = lean_array_get_size(x_4);
x_10 = l_Array_range(x_9);
x_11 = l_Array_flatten___rarg(x_8);
x_12 = lean_array_get_size(x_11);
x_13 = lean_unsigned_to_nat(1u);
x_14 = lean_nat_sub(x_12, x_13);
lean_dec(x_12);
x_15 = lean_unsigned_to_nat(0u);
x_16 = l_Array_qsort_sort___at_Lean_Elab_Structural_Positions_groupAndSort___spec__3(x_11, x_15, x_14);
lean_dec(x_14);
x_17 = lean_array_get_size(x_10);
x_18 = lean_array_get_size(x_16);
x_19 = lean_nat_dec_eq(x_17, x_18);
lean_dec(x_18);
lean_dec(x_17);
if (x_19 == 0)
{
lean_object* x_20; lean_object* x_21; 
lean_dec(x_16);
lean_dec(x_10);
lean_dec(x_8);
lean_dec(x_5);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
x_20 = l_Lean_Elab_Structural_Positions_groupAndSort___rarg___closed__6;
x_21 = l_panic___at_Lean_Elab_Structural_Positions_groupAndSort___spec__4(x_20);
return x_21;
}
else
{
uint8_t x_22; 
x_22 = l_Array_isEqvAux___at_Lean_Elab_Structural_Positions_groupAndSort___spec__5___rarg(x_1, x_2, x_3, x_4, x_5, lean_box(0), x_10, x_16, x_15);
lean_dec(x_16);
lean_dec(x_10);
lean_dec(x_5);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
if (x_22 == 0)
{
lean_object* x_23; lean_object* x_24; 
lean_dec(x_8);
x_23 = l_Lean_Elab_Structural_Positions_groupAndSort___rarg___closed__6;
x_24 = l_panic___at_Lean_Elab_Structural_Positions_groupAndSort___spec__4(x_23);
return x_24;
}
else
{
return x_8;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_Structural_Positions_groupAndSort(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 
x_3 = lean_alloc_closure((void*)(l_Lean_Elab_Structural_Positions_groupAndSort___rarg___boxed), 5, 0);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_Structural_Positions_groupAndSort___spec__1___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) {
_start:
{
size_t x_11; size_t x_12; lean_object* x_13; 
x_11 = lean_unbox_usize(x_8);
lean_dec(x_8);
x_12 = lean_unbox_usize(x_9);
lean_dec(x_9);
x_13 = l_Array_foldlMUnsafe_fold___at_Lean_Elab_Structural_Positions_groupAndSort___spec__1___rarg(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_11, x_12, x_10);
lean_dec(x_7);
lean_dec(x_6);
lean_dec(x_4);
return x_13;
}
}
LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Structural_Positions_groupAndSort___spec__2___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
_start:
{
size_t x_8; size_t x_9; lean_object* x_10; 
x_8 = lean_unbox_usize(x_5);
lean_dec(x_5);
x_9 = lean_unbox_usize(x_6);
lean_dec(x_6);
x_10 = l_Array_mapMUnsafe_map___at_Lean_Elab_Structural_Positions_groupAndSort___spec__2___rarg(x_1, x_2, x_3, x_4, x_8, x_9, x_7);
lean_dec(x_4);
return x_10;
}
}
LEAN_EXPORT lean_object* l_Array_qsort_sort___at_Lean_Elab_Structural_Positions_groupAndSort___spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4; 
x_4 = l_Array_qsort_sort___at_Lean_Elab_Structural_Positions_groupAndSort___spec__3(x_1, x_2, x_3);
lean_dec(x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Array_isEqvAux___at_Lean_Elab_Structural_Positions_groupAndSort___spec__5___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) {
_start:
{
uint8_t x_10; lean_object* x_11; 
x_10 = l_Array_isEqvAux___at_Lean_Elab_Structural_Positions_groupAndSort___spec__5___rarg(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9);
lean_dec(x_8);
lean_dec(x_7);
lean_dec(x_5);
lean_dec(x_4);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
x_11 = lean_box(x_10);
return x_11;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_Structural_Positions_groupAndSort___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l_Lean_Elab_Structural_Positions_groupAndSort___rarg(x_1, x_2, x_3, x_4, x_5);
lean_dec(x_4);
return x_6;
}
}
LEAN_EXPORT lean_object* l_panic___at_Lean_Elab_Structural_Positions_mapMwith___spec__1___rarg(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_Elab_Structural_State_addMatchers___default___closed__1;
x_4 = l_instInhabitedOfMonad___rarg(x_1, x_3);
x_5 = lean_panic_fn(x_4, x_2);
return x_5;
}
}
LEAN_EXPORT lean_object* l_panic___at_Lean_Elab_Structural_Positions_mapMwith___spec__1(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 
x_3 = lean_alloc_closure((void*)(l_panic___at_Lean_Elab_Structural_Positions_mapMwith___spec__1___rarg), 2, 0);
return x_3;
}
}
LEAN_EXPORT lean_object* l_panic___at_Lean_Elab_Structural_Positions_mapMwith___spec__2___rarg(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; lean_object* x_4; lean_object* x_5; 
x_3 = l_Lean_Elab_Structural_State_addMatchers___default___closed__1;
x_4 = l_instInhabitedOfMonad___rarg(x_1, x_3);
x_5 = lean_panic_fn(x_4, x_2);
return x_5;
}
}
LEAN_EXPORT lean_object* l_panic___at_Lean_Elab_Structural_Positions_mapMwith___spec__2(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 
x_3 = lean_alloc_closure((void*)(l_panic___at_Lean_Elab_Structural_Positions_mapMwith___spec__2___rarg), 2, 0);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Structural_Positions_mapMwith___spec__3___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, size_t x_4, size_t x_5, lean_object* x_6) {
_start:
{
uint8_t x_7; 
x_7 = lean_usize_dec_lt(x_5, x_4);
if (x_7 == 0)
{
lean_dec(x_1);
return x_6;
}
else
{
lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; size_t x_12; size_t x_13; 
x_8 = lean_array_uget(x_6, x_5);
x_9 = lean_unsigned_to_nat(0u);
x_10 = lean_array_uset(x_6, x_5, x_9);
x_11 = lean_nat_dec_lt(x_8, x_3);
x_12 = 1;
x_13 = lean_usize_add(x_5, x_12);
if (x_11 == 0)
{
lean_object* x_14; lean_object* x_15; 
lean_dec(x_8);
lean_inc(x_1);
x_14 = l_outOfBounds___rarg(x_1);
x_15 = lean_array_uset(x_10, x_5, x_14);
x_5 = x_13;
x_6 = x_15;
goto _start;
}
else
{
lean_object* x_17; lean_object* x_18; 
x_17 = lean_array_fget(x_2, x_8);
lean_dec(x_8);
x_18 = lean_array_uset(x_10, x_5, x_17);
x_5 = x_13;
x_6 = x_18;
goto _start;
}
}
}
}
LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Structural_Positions_mapMwith___spec__3(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = lean_alloc_closure((void*)(l_Array_mapMUnsafe_map___at_Lean_Elab_Structural_Positions_mapMwith___spec__3___rarg___boxed), 6, 0);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Structural_Positions_mapMwith___spec__4___rarg___lambda__1(size_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, size_t x_8, lean_object* x_9) {
_start:
{
size_t x_10; size_t x_11; lean_object* x_12; lean_object* x_13; 
x_10 = 1;
x_11 = lean_usize_add(x_1, x_10);
x_12 = lean_array_uset(x_2, x_1, x_9);
x_13 = l_Array_mapMUnsafe_map___at_Lean_Elab_Structural_Positions_mapMwith___spec__4___rarg(x_3, x_4, x_5, x_6, x_7, x_8, x_11, x_12);
return x_13;
}
}
LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Structural_Positions_mapMwith___spec__4___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, size_t x_6, size_t x_7, lean_object* x_8) {
_start:
{
uint8_t x_9; 
x_9 = lean_usize_dec_lt(x_7, x_6);
if (x_9 == 0)
{
lean_object* x_10; lean_object* x_11; lean_object* x_12; 
lean_dec(x_5);
lean_dec(x_4);
lean_dec(x_3);
lean_dec(x_2);
x_10 = lean_ctor_get(x_1, 0);
lean_inc(x_10);
lean_dec(x_1);
x_11 = lean_ctor_get(x_10, 1);
lean_inc(x_11);
lean_dec(x_10);
x_12 = lean_apply_2(x_11, lean_box(0), x_8);
return x_12;
}
else
{
lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; size_t x_22; size_t x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; 
x_13 = lean_array_uget(x_8, x_7);
x_14 = lean_unsigned_to_nat(0u);
x_15 = lean_array_uset(x_8, x_7, x_14);
x_16 = lean_ctor_get(x_1, 1);
lean_inc(x_16);
x_17 = lean_box_usize(x_7);
x_18 = lean_box_usize(x_6);
lean_inc(x_5);
lean_inc(x_4);
lean_inc(x_3);
lean_inc(x_2);
x_19 = lean_alloc_closure((void*)(l_Array_mapMUnsafe_map___at_Lean_Elab_Structural_Positions_mapMwith___spec__4___rarg___lambda__1___boxed), 9, 8);
lean_closure_set(x_19, 0, x_17);
lean_closure_set(x_19, 1, x_15);
lean_closure_set(x_19, 2, x_1);
lean_closure_set(x_19, 3, x_2);
lean_closure_set(x_19, 4, x_3);
lean_closure_set(x_19, 5, x_4);
lean_closure_set(x_19, 6, x_5);
lean_closure_set(x_19, 7, x_18);
x_20 = lean_ctor_get(x_13, 0);
lean_inc(x_20);
x_21 = lean_ctor_get(x_13, 1);
lean_inc(x_21);
lean_dec(x_13);
x_22 = lean_array_size(x_21);
x_23 = 0;
x_24 = l_Array_mapMUnsafe_map___at_Lean_Elab_Structural_Positions_mapMwith___spec__3___rarg(x_2, x_4, x_5, x_22, x_23, x_21);
lean_dec(x_5);
lean_dec(x_4);
x_25 = lean_apply_2(x_3, x_20, x_24);
x_26 = lean_apply_4(x_16, lean_box(0), lean_box(0), x_25, x_19);
return x_26;
}
}
}
LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Structural_Positions_mapMwith___spec__4(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = lean_alloc_closure((void*)(l_Array_mapMUnsafe_map___at_Lean_Elab_Structural_Positions_mapMwith___spec__4___rarg___boxed), 8, 0);
return x_5;
}
}
static lean_object* _init_l_Lean_Elab_Structural_Positions_mapMwith___rarg___closed__1() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("positions.size = ys.size\n  ", 27, 27);
return x_1;
}
}
static lean_object* _init_l_Lean_Elab_Structural_Positions_mapMwith___rarg___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lean_Elab_Structural_Positions_groupAndSort___rarg___closed__1;
x_2 = l_Lean_Elab_Structural_Positions_mapMwith___rarg___closed__1;
x_3 = lean_string_append(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lean_Elab_Structural_Positions_mapMwith___rarg___closed__3() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("Lean.Elab.Structural.Positions.mapMwith", 39, 39);
return x_1;
}
}
static lean_object* _init_l_Lean_Elab_Structural_Positions_mapMwith___rarg___closed__4() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; 
x_1 = l_Lean_Elab_Structural_Positions_groupAndSort___rarg___closed__4;
x_2 = l_Lean_Elab_Structural_Positions_mapMwith___rarg___closed__3;
x_3 = lean_unsigned_to_nat(86u);
x_4 = lean_unsigned_to_nat(2u);
x_5 = l_Lean_Elab_Structural_Positions_mapMwith___rarg___closed__2;
x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5);
return x_6;
}
}
static lean_object* _init_l_Lean_Elab_Structural_Positions_mapMwith___rarg___closed__5() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("positions.numIndices = xs.size\n  ", 33, 33);
return x_1;
}
}
static lean_object* _init_l_Lean_Elab_Structural_Positions_mapMwith___rarg___closed__6() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lean_Elab_Structural_Positions_groupAndSort___rarg___closed__1;
x_2 = l_Lean_Elab_Structural_Positions_mapMwith___rarg___closed__5;
x_3 = lean_string_append(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lean_Elab_Structural_Positions_mapMwith___rarg___closed__7() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; 
x_1 = l_Lean_Elab_Structural_Positions_groupAndSort___rarg___closed__4;
x_2 = l_Lean_Elab_Structural_Positions_mapMwith___rarg___closed__3;
x_3 = lean_unsigned_to_nat(87u);
x_4 = lean_unsigned_to_nat(2u);
x_5 = l_Lean_Elab_Structural_Positions_mapMwith___rarg___closed__6;
x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_Structural_Positions_mapMwith___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; lean_object* x_8; uint8_t x_9; 
x_7 = lean_array_get_size(x_4);
x_8 = lean_array_get_size(x_5);
x_9 = lean_nat_dec_eq(x_7, x_8);
lean_dec(x_8);
lean_dec(x_7);
if (x_9 == 0)
{
lean_object* x_10; lean_object* x_11; 
lean_dec(x_6);
lean_dec(x_3);
lean_dec(x_2);
x_10 = l_Lean_Elab_Structural_Positions_mapMwith___rarg___closed__4;
x_11 = l_panic___at_Lean_Elab_Structural_Positions_mapMwith___spec__1___rarg(x_1, x_10);
return x_11;
}
else
{
lean_object* x_12; lean_object* x_13; uint8_t x_14; 
x_12 = l_Lean_Elab_Structural_Positions_numIndices(x_4);
x_13 = lean_array_get_size(x_6);
x_14 = lean_nat_dec_eq(x_12, x_13);
lean_dec(x_12);
if (x_14 == 0)
{
lean_object* x_15; lean_object* x_16; 
lean_dec(x_13);
lean_dec(x_6);
lean_dec(x_3);
lean_dec(x_2);
x_15 = l_Lean_Elab_Structural_Positions_mapMwith___rarg___closed__7;
x_16 = l_panic___at_Lean_Elab_Structural_Positions_mapMwith___spec__2___rarg(x_1, x_15);
return x_16;
}
else
{
lean_object* x_17; size_t x_18; size_t x_19; lean_object* x_20; 
x_17 = l_Array_zip___rarg(x_5, x_4);
x_18 = lean_array_size(x_17);
x_19 = 0;
x_20 = l_Array_mapMUnsafe_map___at_Lean_Elab_Structural_Positions_mapMwith___spec__4___rarg(x_1, x_2, x_3, x_6, x_13, x_18, x_19, x_17);
return x_20;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_Structural_Positions_mapMwith(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = lean_alloc_closure((void*)(l_Lean_Elab_Structural_Positions_mapMwith___rarg___boxed), 6, 0);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Structural_Positions_mapMwith___spec__3___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
size_t x_7; size_t x_8; lean_object* x_9; 
x_7 = lean_unbox_usize(x_4);
lean_dec(x_4);
x_8 = lean_unbox_usize(x_5);
lean_dec(x_5);
x_9 = l_Array_mapMUnsafe_map___at_Lean_Elab_Structural_Positions_mapMwith___spec__3___rarg(x_1, x_2, x_3, x_7, x_8, x_6);
lean_dec(x_3);
lean_dec(x_2);
return x_9;
}
}
LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Structural_Positions_mapMwith___spec__4___rarg___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) {
_start:
{
size_t x_10; size_t x_11; lean_object* x_12; 
x_10 = lean_unbox_usize(x_1);
lean_dec(x_1);
x_11 = lean_unbox_usize(x_8);
lean_dec(x_8);
x_12 = l_Array_mapMUnsafe_map___at_Lean_Elab_Structural_Positions_mapMwith___spec__4___rarg___lambda__1(x_10, x_2, x_3, x_4, x_5, x_6, x_7, x_11, x_9);
return x_12;
}
}
LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Structural_Positions_mapMwith___spec__4___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
_start:
{
size_t x_9; size_t x_10; lean_object* x_11; 
x_9 = lean_unbox_usize(x_6);
lean_dec(x_6);
x_10 = lean_unbox_usize(x_7);
lean_dec(x_7);
x_11 = l_Array_mapMUnsafe_map___at_Lean_Elab_Structural_Positions_mapMwith___spec__4___rarg(x_1, x_2, x_3, x_4, x_5, x_9, x_10, x_8);
return x_11;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_Structural_Positions_mapMwith___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
lean_object* x_7; 
x_7 = l_Lean_Elab_Structural_Positions_mapMwith___rarg(x_1, x_2, x_3, x_4, x_5, x_6);
lean_dec(x_5);
lean_dec(x_4);
return x_7;
}
}
static lean_object* _init_l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__1() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("Elab", 4, 4);
return x_1;
}
}
static lean_object* _init_l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__2() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("definition", 10, 10);
return x_1;
}
}
static lean_object* _init_l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__3() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("structural", 10, 10);
return x_1;
}
}
static lean_object* _init_l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__4() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; 
x_1 = l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__1;
x_2 = l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__2;
x_3 = l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__3;
x_4 = l_Lean_Name_mkStr3(x_1, x_2, x_3);
return x_4;
}
}
static lean_object* _init_l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__5() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("initFn", 6, 6);
return x_1;
}
}
static lean_object* _init_l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__6() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = lean_box(0);
x_2 = l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__5;
x_3 = l_Lean_Name_str___override(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__7() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("_@", 2, 2);
return x_1;
}
}
static lean_object* _init_l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__8() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__6;
x_2 = l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__7;
x_3 = l_Lean_Name_str___override(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__9() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("Lean", 4, 4);
return x_1;
}
}
static lean_object* _init_l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__10() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__8;
x_2 = l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__9;
x_3 = l_Lean_Name_str___override(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__11() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__10;
x_2 = l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__1;
x_3 = l_Lean_Name_str___override(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__12() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("PreDefinition", 13, 13);
return x_1;
}
}
static lean_object* _init_l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__13() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__11;
x_2 = l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__12;
x_3 = l_Lean_Name_str___override(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__14() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("Structural", 10, 10);
return x_1;
}
}
static lean_object* _init_l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__15() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__13;
x_2 = l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__14;
x_3 = l_Lean_Name_str___override(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__16() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("Basic", 5, 5);
return x_1;
}
}
static lean_object* _init_l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__17() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__15;
x_2 = l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__16;
x_3 = l_Lean_Name_str___override(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__18() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("_hyg", 4, 4);
return x_1;
}
}
static lean_object* _init_l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__19() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__17;
x_2 = l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__18;
x_3 = l_Lean_Name_str___override(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__20() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__19;
x_2 = lean_unsigned_to_nat(382u);
x_3 = l_Lean_Name_num___override(x_1, x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382_(lean_object* x_1) {
_start:
{
lean_object* x_2; uint8_t x_3; lean_object* x_4; lean_object* x_5; 
x_2 = l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__4;
x_3 = 0;
x_4 = l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__20;
x_5 = l_Lean_registerTraceClass(x_2, x_3, x_4, x_1);
return x_5;
}
}
lean_object* initialize_Lean_Meta_Basic(uint8_t builtin, lean_object*);
lean_object* initialize_Lean_Meta_ForEachExpr(uint8_t builtin, lean_object*);
static bool _G_initialized = false;
LEAN_EXPORT lean_object* initialize_Lean_Elab_PreDefinition_Structural_Basic(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_Lean_Meta_Basic(builtin, lean_io_mk_world());
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
res = initialize_Lean_Meta_ForEachExpr(builtin, lean_io_mk_world());
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
l_Lean_Elab_Structural_State_addMatchers___default___closed__1 = _init_l_Lean_Elab_Structural_State_addMatchers___default___closed__1();
lean_mark_persistent(l_Lean_Elab_Structural_State_addMatchers___default___closed__1);
l_Lean_Elab_Structural_State_addMatchers___default = _init_l_Lean_Elab_Structural_State_addMatchers___default();
lean_mark_persistent(l_Lean_Elab_Structural_State_addMatchers___default);
l_Lean_Elab_Structural_instInhabitedM___closed__1 = _init_l_Lean_Elab_Structural_instInhabitedM___closed__1();
lean_mark_persistent(l_Lean_Elab_Structural_instInhabitedM___closed__1);
l_Lean_Elab_Structural_instInhabitedM___closed__2 = _init_l_Lean_Elab_Structural_instInhabitedM___closed__2();
lean_mark_persistent(l_Lean_Elab_Structural_instInhabitedM___closed__2);
l_Array_qsort_sort___at_Lean_Elab_Structural_Positions_groupAndSort___spec__3___closed__1 = _init_l_Array_qsort_sort___at_Lean_Elab_Structural_Positions_groupAndSort___spec__3___closed__1();
lean_mark_persistent(l_Array_qsort_sort___at_Lean_Elab_Structural_Positions_groupAndSort___spec__3___closed__1);
l_Lean_Elab_Structural_Positions_groupAndSort___rarg___closed__1 = _init_l_Lean_Elab_Structural_Positions_groupAndSort___rarg___closed__1();
lean_mark_persistent(l_Lean_Elab_Structural_Positions_groupAndSort___rarg___closed__1);
l_Lean_Elab_Structural_Positions_groupAndSort___rarg___closed__2 = _init_l_Lean_Elab_Structural_Positions_groupAndSort___rarg___closed__2();
lean_mark_persistent(l_Lean_Elab_Structural_Positions_groupAndSort___rarg___closed__2);
l_Lean_Elab_Structural_Positions_groupAndSort___rarg___closed__3 = _init_l_Lean_Elab_Structural_Positions_groupAndSort___rarg___closed__3();
lean_mark_persistent(l_Lean_Elab_Structural_Positions_groupAndSort___rarg___closed__3);
l_Lean_Elab_Structural_Positions_groupAndSort___rarg___closed__4 = _init_l_Lean_Elab_Structural_Positions_groupAndSort___rarg___closed__4();
lean_mark_persistent(l_Lean_Elab_Structural_Positions_groupAndSort___rarg___closed__4);
l_Lean_Elab_Structural_Positions_groupAndSort___rarg___closed__5 = _init_l_Lean_Elab_Structural_Positions_groupAndSort___rarg___closed__5();
lean_mark_persistent(l_Lean_Elab_Structural_Positions_groupAndSort___rarg___closed__5);
l_Lean_Elab_Structural_Positions_groupAndSort___rarg___closed__6 = _init_l_Lean_Elab_Structural_Positions_groupAndSort___rarg___closed__6();
lean_mark_persistent(l_Lean_Elab_Structural_Positions_groupAndSort___rarg___closed__6);
l_Lean_Elab_Structural_Positions_mapMwith___rarg___closed__1 = _init_l_Lean_Elab_Structural_Positions_mapMwith___rarg___closed__1();
lean_mark_persistent(l_Lean_Elab_Structural_Positions_mapMwith___rarg___closed__1);
l_Lean_Elab_Structural_Positions_mapMwith___rarg___closed__2 = _init_l_Lean_Elab_Structural_Positions_mapMwith___rarg___closed__2();
lean_mark_persistent(l_Lean_Elab_Structural_Positions_mapMwith___rarg___closed__2);
l_Lean_Elab_Structural_Positions_mapMwith___rarg___closed__3 = _init_l_Lean_Elab_Structural_Positions_mapMwith___rarg___closed__3();
lean_mark_persistent(l_Lean_Elab_Structural_Positions_mapMwith___rarg___closed__3);
l_Lean_Elab_Structural_Positions_mapMwith___rarg___closed__4 = _init_l_Lean_Elab_Structural_Positions_mapMwith___rarg___closed__4();
lean_mark_persistent(l_Lean_Elab_Structural_Positions_mapMwith___rarg___closed__4);
l_Lean_Elab_Structural_Positions_mapMwith___rarg___closed__5 = _init_l_Lean_Elab_Structural_Positions_mapMwith___rarg___closed__5();
lean_mark_persistent(l_Lean_Elab_Structural_Positions_mapMwith___rarg___closed__5);
l_Lean_Elab_Structural_Positions_mapMwith___rarg___closed__6 = _init_l_Lean_Elab_Structural_Positions_mapMwith___rarg___closed__6();
lean_mark_persistent(l_Lean_Elab_Structural_Positions_mapMwith___rarg___closed__6);
l_Lean_Elab_Structural_Positions_mapMwith___rarg___closed__7 = _init_l_Lean_Elab_Structural_Positions_mapMwith___rarg___closed__7();
lean_mark_persistent(l_Lean_Elab_Structural_Positions_mapMwith___rarg___closed__7);
l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__1 = _init_l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__1();
lean_mark_persistent(l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__1);
l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__2 = _init_l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__2();
lean_mark_persistent(l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__2);
l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__3 = _init_l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__3();
lean_mark_persistent(l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__3);
l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__4 = _init_l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__4();
lean_mark_persistent(l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__4);
l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__5 = _init_l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__5();
lean_mark_persistent(l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__5);
l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__6 = _init_l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__6();
lean_mark_persistent(l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__6);
l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__7 = _init_l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__7();
lean_mark_persistent(l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__7);
l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__8 = _init_l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__8();
lean_mark_persistent(l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__8);
l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__9 = _init_l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__9();
lean_mark_persistent(l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__9);
l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__10 = _init_l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__10();
lean_mark_persistent(l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__10);
l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__11 = _init_l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__11();
lean_mark_persistent(l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__11);
l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__12 = _init_l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__12();
lean_mark_persistent(l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__12);
l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__13 = _init_l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__13();
lean_mark_persistent(l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__13);
l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__14 = _init_l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__14();
lean_mark_persistent(l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__14);
l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__15 = _init_l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__15();
lean_mark_persistent(l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__15);
l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__16 = _init_l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__16();
lean_mark_persistent(l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__16);
l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__17 = _init_l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__17();
lean_mark_persistent(l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__17);
l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__18 = _init_l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__18();
lean_mark_persistent(l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__18);
l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__19 = _init_l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__19();
lean_mark_persistent(l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__19);
l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__20 = _init_l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__20();
lean_mark_persistent(l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382____closed__20);
if (builtin) {res = l_initFn____x40_Lean_Elab_PreDefinition_Structural_Basic___hyg_382_(lean_io_mk_world());
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
}return lean_io_result_mk_ok(lean_box(0));
}
#ifdef __cplusplus
}
#endif
