diff --git a/stage0/src/Init/Lean/Meta/DiscrTree.lean b/stage0/src/Init/Lean/Meta/DiscrTree.lean index e9f0b03252..5f9aaac4bf 100644 --- a/stage0/src/Init/Lean/Meta/DiscrTree.lean +++ b/stage0/src/Init/Lean/Meta/DiscrTree.lean @@ -132,11 +132,11 @@ private def tmpStar := mkMVar tmpMVarId instance {α} : Inhabited (DiscrTree α) := ⟨{}⟩ -private partial def pushArgsAux (infos : Array ParamInfo) : Nat → Expr → Array Expr → MetaM (Array Expr) +private partial def pushArgsAux (infos : Array ParamInfo) (ignoreImplicit : Bool) : Nat → Expr → Array Expr → MetaM (Array Expr) | i, Expr.app f a _, todo => if h : i < infos.size then let info := infos.get ⟨i, h⟩; - if info.implicit || info.instImplicit then + if (info.implicit && ignoreImplicit) || info.instImplicit then pushArgsAux (i-1) f (todo.push tmpStar) else condM (isProof a) (pushArgsAux (i-1) f (todo.push tmpStar)) @@ -146,12 +146,12 @@ private partial def pushArgsAux (infos : Array ParamInfo) : Nat → Expr → Arr (pushArgsAux (i-1) f (todo.push a)) | _, _, todo => pure todo -private def pushArgs (todo : Array Expr) (e : Expr) : MetaM (Key × Array Expr) := +private def pushArgs (todo : Array Expr) (e : Expr) (ignoreImplicit : Bool) : MetaM (Key × Array Expr) := do e ← whnf e; let fn := e.getAppFn; let push (k : Key) (nargs : Nat) : MetaM (Key × Array Expr) := do { info ← getFunInfoNArgs fn nargs; - todo ← pushArgsAux info.paramInfo (nargs-1) e todo; + todo ← pushArgsAux info.paramInfo ignoreImplicit (nargs-1) e todo; pure (k, todo) }; match fn with @@ -167,23 +167,23 @@ do e ← whnf e; (pure (Key.star, todo)) | _ => pure (Key.other, todo) -partial def mkPathAux : Array Expr → Array Key → MetaM (Array Key) +partial def mkPathAux (ignoreImplicit : Bool) : Array Expr → Array Key → MetaM (Array Key) | todo, keys => if todo.isEmpty then pure keys else do let e := todo.back; let todo := todo.pop; - (k, todo) ← pushArgs todo e; + (k, todo) ← pushArgs todo e ignoreImplicit; mkPathAux todo (keys.push k) private def initCapacity := 8 -def mkPath (e : Expr) : MetaM (Array Key) := +def mkPath (e : Expr) (ignoreImplicit : Bool) : MetaM (Array Key) := usingTransparency TransparencyMode.reducible $ do let todo : Array Expr := Array.mkEmpty initCapacity; let keys : Array Key := Array.mkEmpty initCapacity; - mkPathAux (todo.push e) keys + mkPathAux ignoreImplicit (todo.push e) keys private partial def createNodes {α} (keys : Array Key) (v : α) : Nat → Trie α | i => @@ -222,8 +222,8 @@ else let c := insertAux keys v 1 c; { root := d.root.insert k c } -def insert {α} [HasBeq α] (d : DiscrTree α) (e : Expr) (v : α) : MetaM (DiscrTree α) := -do keys ← mkPath e; +def insert {α} [HasBeq α] (d : DiscrTree α) (e : Expr) (v : α) (ignoreImplicit : Bool := true) : MetaM (DiscrTree α) := +do keys ← mkPath e ignoreImplicit; pure $ d.insertCore keys v partial def Trie.format {α} [HasFormat α] : Trie α → Format diff --git a/stage0/src/Init/Lean/Meta/Instances.lean b/stage0/src/Init/Lean/Meta/Instances.lean index f9f927f710..809b746d4d 100644 --- a/stage0/src/Init/Lean/Meta/Instances.lean +++ b/stage0/src/Init/Lean/Meta/Instances.lean @@ -13,24 +13,26 @@ structure InstanceEntry := (keys : Array DiscrTree.Key) (val : Expr) -def addInstanceEntry (d : DiscrTree Expr) (e : InstanceEntry) : DiscrTree Expr := +abbrev Instances := DiscrTree Expr + +def addInstanceEntry (d : Instances) (e : InstanceEntry) : Instances := d.insertCore e.keys e.val -def mkInstanceExtension : IO (SimplePersistentEnvExtension InstanceEntry (DiscrTree Expr)) := +def mkInstanceExtension : IO (SimplePersistentEnvExtension InstanceEntry Instances) := registerSimplePersistentEnvExtension { name := `instanceExt, addEntryFn := addInstanceEntry, - addImportedFn := fun es => (mkStateFromImportedEntries addInstanceEntry {} es) + addImportedFn := fun es => (mkStateFromImportedEntries addInstanceEntry DiscrTree.empty es) } @[init mkInstanceExtension] -constant instanceExtension : SimplePersistentEnvExtension InstanceEntry (DiscrTree Expr) := arbitrary _ +constant instanceExtension : SimplePersistentEnvExtension InstanceEntry Instances := arbitrary _ private def mkInstanceKey (e : Expr) : MetaM (Array DiscrTree.Key) := do type ← inferType e; withNewMCtxDepth $ do (_, _, type) ← forallMetaTelescopeReducing type; - DiscrTree.mkPath type + DiscrTree.mkPath type false /- Do not ignore implicit arguments, only instImplicit -/ def addGlobalInstance (env : Environment) (constName : Name) : IO Environment := match env.find constName with @@ -40,7 +42,7 @@ match env.find constName with (keys, env) ← IO.runMeta (mkInstanceKey c) env; pure $ instanceExtension.addEntry env { keys := keys, val := c } -def getInstances (env : Environment) : DiscrTree Expr := +def getInstances (env : Environment) : Instances := instanceExtension.getState env @[init] def registerInstanceAttr : IO Unit := diff --git a/stage0/stdlib/Init/Lean/Meta/DiscrTree.c b/stage0/stdlib/Init/Lean/Meta/DiscrTree.c index 4a00a98229..7fabc98284 100644 --- a/stage0/stdlib/Init/Lean/Meta/DiscrTree.c +++ b/stage0/stdlib/Init/Lean/Meta/DiscrTree.c @@ -47,7 +47,7 @@ lean_object* l_Lean_Meta_DiscrTree_insertCore___rarg___closed__4; lean_object* l_Array_binSearchAux___main___at___private_Init_Lean_Meta_DiscrTree_12__getMatchAux___main___spec__4(lean_object*); lean_object* l_Array_iterateMAux___main___at___private_Init_Lean_Meta_DiscrTree_14__getUnifyAux___main___spec__4___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_insertAux___main___at_Lean_Meta_DiscrTree_insertCore___spec__9___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Meta_DiscrTree_3__pushArgsAux___main___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Meta_DiscrTree_3__pushArgsAux___main___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Meta_DiscrTree_8__insertAux(lean_object*); lean_object* l_Lean_Meta_DiscrTree_Key_ctorIdx(lean_object*); lean_object* l_Lean_mkMVar(lean_object*); @@ -71,6 +71,7 @@ lean_object* l_Array_iterateMAux___main___at_Lean_Meta_DiscrTree_format___spec__ lean_object* l_PersistentHashMap_foldlMAux___main___at_Lean_Meta_DiscrTree_getUnify___spec__5(lean_object*); lean_object* l_Array_iterateMAux___main___at_Lean_Meta_DiscrTree_getUnify___spec__7(lean_object*); lean_object* l___private_Init_Lean_Meta_DiscrTree_8__insertAux___main(lean_object*); +lean_object* l___private_Init_Lean_Meta_DiscrTree_4__pushArgs___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_back___at___private_Init_Lean_Meta_DiscrTree_8__insertAux___main___spec__3___rarg___boxed(lean_object*); lean_object* l_Array_binSearchAux___main___at___private_Init_Lean_Meta_DiscrTree_12__getMatchAux___main___spec__2___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_DiscrTree_Key_beq___boxed(lean_object*, lean_object*); @@ -88,7 +89,7 @@ lean_object* l_Lean_Meta_DiscrTree_Key_format(lean_object*); size_t l_USize_shiftRight(size_t, size_t); lean_object* l_Lean_Meta_DiscrTree_DiscrTree_hasFormat(lean_object*); lean_object* l___private_Init_Lean_Meta_DiscrTree_6__createNodes___rarg___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Meta_DiscrTree_3__pushArgsAux(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Meta_DiscrTree_3__pushArgsAux(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Meta_DiscrTree_14__getUnifyAux(lean_object*); lean_object* l_Array_binSearchAux___main___at___private_Init_Lean_Meta_DiscrTree_12__getMatchAux___main___spec__3(lean_object*); lean_object* l___private_Init_Lean_Meta_DiscrTree_12__getMatchAux___main(lean_object*); @@ -99,6 +100,7 @@ lean_object* l_Lean_fmt___at_Lean_Level_LevelToFormat_toResult___main___spec__1( lean_object* lean_nat_add(lean_object*, lean_object*); lean_object* l_Lean_Meta_DiscrTree_format(lean_object*); lean_object* l_Array_iterateMAux___main___at___private_Init_Lean_Meta_DiscrTree_14__getUnifyAux___main___spec__6___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_DiscrTree_mkPathAux___main___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_DiscrTree_Trie_format___main___rarg___closed__3; lean_object* l_Lean_Expr_getAppNumArgsAux___main(lean_object*, lean_object*); lean_object* l___private_Init_Data_Array_BinSearch_1__binInsertAux___main___at___private_Init_Lean_Meta_DiscrTree_8__insertAux___main___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -127,16 +129,16 @@ lean_object* l_PersistentHashMap_findAux___main___at_Lean_Meta_DiscrTree_getMatc lean_object* l_Array_iterateMAux___main___at_Lean_Meta_DiscrTree_getUnify___spec__7___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_binSearchAux___main___at___private_Init_Lean_Meta_DiscrTree_14__getUnifyAux___main___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Literal_beq(lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Meta_DiscrTree_3__pushArgsAux___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Meta_DiscrTree_3__pushArgsAux___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Meta_DiscrTree_8__insertAux___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Meta_DiscrTree_mkPathAux(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_DiscrTree_mkPathAux(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_back___at_Lean_Meta_DiscrTree_mkPathAux___main___spec__1___boxed(lean_object*); lean_object* l_Lean_Meta_DiscrTree_Key_hasFormat___closed__1; lean_object* l_Array_binSearchAux___main___at___private_Init_Lean_Meta_DiscrTree_14__getUnifyAux___main___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_Meta_DiscrTree_insertCore___spec__3(lean_object*); lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_arrayHasFormat___rarg___closed__1; -lean_object* l_Lean_Meta_DiscrTree_mkPathAux___main(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_DiscrTree_mkPathAux___main(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_DiscrTree_getUnify___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_isReadOnlyOrSyntheticExprMVar(lean_object*, lean_object*, lean_object*); @@ -145,6 +147,7 @@ lean_object* l_PersistentHashMap_find___at_Lean_Meta_DiscrTree_getMatch___spec__ lean_object* l_Lean_Meta_DiscrTree_Key_arity(lean_object*); size_t l_Lean_Name_hash(lean_object*); lean_object* l_PersistentHashMap_insert___at_Lean_Meta_DiscrTree_insertCore___spec__8___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_DiscrTree_insert___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_insertAtCollisionNodeAux___main___at_Lean_Meta_DiscrTree_insertCore___spec__6___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_insertAux___main___at_Lean_Meta_DiscrTree_insertCore___spec__9(lean_object*); lean_object* l___private_Init_Lean_Meta_DiscrTree_6__createNodes___main___rarg___boxed(lean_object*, lean_object*, lean_object*); @@ -157,7 +160,7 @@ lean_object* lean_name_mk_string(lean_object*, lean_object*); lean_object* l___private_Init_Lean_Meta_DiscrTree_6__createNodes___main(lean_object*); lean_object* l___private_Init_Data_Array_BinSearch_1__binInsertAux___main___at___private_Init_Lean_Meta_DiscrTree_8__insertAux___main___spec__2___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_binSearchAux___main___at___private_Init_Lean_Meta_DiscrTree_14__getUnifyAux___main___spec__3___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Meta_DiscrTree_3__pushArgsAux___main(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Meta_DiscrTree_3__pushArgsAux___main(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Data_Array_BinSearch_1__binInsertAux___main___at___private_Init_Lean_Meta_DiscrTree_8__insertAux___main___spec__2___rarg___closed__1; lean_object* l_PersistentHashMap_insertAux___main___at_Lean_Meta_DiscrTree_insertCore___spec__9___rarg(lean_object*, size_t, size_t, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Meta_DiscrTree_8__insertAux___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -183,6 +186,7 @@ lean_object* l_Lean_Meta_DiscrTree_Key_hasLess; lean_object* l_Array_binSearchAux___main___at___private_Init_Lean_Meta_DiscrTree_14__getUnifyAux___main___spec__5___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_whnf(lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_DiscrTree_mkPathAux___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_binSearchAux___main___at___private_Init_Lean_Meta_DiscrTree_12__getMatchAux___main___spec__4___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_foldlMAux___main___at_Lean_Meta_DiscrTree_format___spec__3(lean_object*); lean_object* l_Lean_Meta_DiscrTree_format___rarg(lean_object*, lean_object*); @@ -193,12 +197,13 @@ lean_object* l___private_Init_Lean_Meta_DiscrTree_14__getUnifyAux___main(lean_ob lean_object* l_Array_back___at_Lean_Meta_DiscrTree_mkPathAux___main___spec__1(lean_object*); lean_object* l_PersistentHashMap_insertAtCollisionNodeAux___main___at_Lean_Meta_DiscrTree_insertCore___spec__10___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_DiscrTree_mkPath___closed__1; +lean_object* l_Lean_Meta_DiscrTree_mkPath___boxed(lean_object*, lean_object*, lean_object*, lean_object*); size_t l_USize_land(size_t, size_t); lean_object* l_Lean_Meta_DiscrTree_getUnify(lean_object*); -lean_object* l___private_Init_Lean_Meta_DiscrTree_4__pushArgs(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Meta_DiscrTree_4__pushArgs(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*); uint8_t l_Array_contains___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_DiscrTree_Trie_format___rarg___boxed(lean_object*, lean_object*); -lean_object* l_Lean_Meta_DiscrTree_mkPath(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_DiscrTree_mkPath(lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Meta_DiscrTree_11__getUnifyKeyArgs(lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_Meta_DiscrTree_getUnify___spec__3(lean_object*); lean_object* l___private_Init_Lean_Meta_DiscrTree_1__tmpMVarId___closed__2; @@ -312,7 +317,7 @@ lean_object* l_Array_insertAt___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Array_binSearchAux___main___at___private_Init_Lean_Meta_DiscrTree_12__getMatchAux___main___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Meta_DiscrTree_14__getUnifyAux___main___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_foldlM___at_Lean_Meta_DiscrTree_format___spec__2___rarg___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Meta_DiscrTree_insert___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_DiscrTree_insert___rarg(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*); size_t l_Lean_Meta_DiscrTree_Key_hash(lean_object*); lean_object* l_PersistentHashMap_mkCollisionNode___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Meta_DiscrTree_12__getMatchAux___main___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -987,1153 +992,1268 @@ x_2 = l_Lean_Meta_DiscrTree_empty___closed__1; return x_2; } } -lean_object* l___private_Init_Lean_Meta_DiscrTree_3__pushArgsAux___main(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* l___private_Init_Lean_Meta_DiscrTree_3__pushArgsAux___main(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { _start: { -if (lean_obj_tag(x_3) == 5) +if (lean_obj_tag(x_4) == 5) { -lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; -x_7 = lean_ctor_get(x_3, 0); -lean_inc(x_7); -x_8 = lean_ctor_get(x_3, 1); +lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; +x_8 = lean_ctor_get(x_4, 0); lean_inc(x_8); -lean_dec(x_3); -x_9 = lean_array_get_size(x_1); -x_10 = lean_nat_dec_lt(x_2, x_9); -lean_dec(x_9); -if (x_10 == 0) -{ -lean_object* x_11; -lean_inc(x_5); -lean_inc(x_8); -x_11 = l_Lean_Meta_isProof(x_8, x_5, x_6); -if (lean_obj_tag(x_11) == 0) -{ -lean_object* x_12; uint8_t x_13; -x_12 = lean_ctor_get(x_11, 0); -lean_inc(x_12); -x_13 = lean_unbox(x_12); -lean_dec(x_12); -if (x_13 == 0) -{ -lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; -x_14 = lean_ctor_get(x_11, 1); -lean_inc(x_14); -lean_dec(x_11); -x_15 = lean_unsigned_to_nat(1u); -x_16 = lean_nat_sub(x_2, x_15); -lean_dec(x_2); -x_17 = lean_array_push(x_4, x_8); -x_2 = x_16; -x_3 = x_7; -x_4 = x_17; -x_6 = x_14; -goto _start; -} -else -{ -lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; -lean_dec(x_8); -x_19 = lean_ctor_get(x_11, 1); -lean_inc(x_19); -lean_dec(x_11); -x_20 = lean_unsigned_to_nat(1u); -x_21 = lean_nat_sub(x_2, x_20); -lean_dec(x_2); -x_22 = l___private_Init_Lean_Meta_DiscrTree_2__tmpStar; -x_23 = lean_array_push(x_4, x_22); -x_2 = x_21; -x_3 = x_7; -x_4 = x_23; -x_6 = x_19; -goto _start; -} -} -else -{ -uint8_t x_25; -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_5); +x_9 = lean_ctor_get(x_4, 1); +lean_inc(x_9); lean_dec(x_4); -lean_dec(x_2); -x_25 = !lean_is_exclusive(x_11); -if (x_25 == 0) +x_10 = lean_array_get_size(x_1); +x_11 = lean_nat_dec_lt(x_3, x_10); +lean_dec(x_10); +if (x_11 == 0) { -return x_11; -} -else +lean_object* x_12; +lean_inc(x_6); +lean_inc(x_9); +x_12 = l_Lean_Meta_isProof(x_9, x_6, x_7); +if (lean_obj_tag(x_12) == 0) { -lean_object* x_26; lean_object* x_27; lean_object* x_28; -x_26 = lean_ctor_get(x_11, 0); -x_27 = lean_ctor_get(x_11, 1); -lean_inc(x_27); -lean_inc(x_26); -lean_dec(x_11); -x_28 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_28, 0, x_26); -lean_ctor_set(x_28, 1, x_27); -return x_28; -} -} -} -else +lean_object* x_13; uint8_t x_14; +x_13 = lean_ctor_get(x_12, 0); +lean_inc(x_13); +x_14 = lean_unbox(x_13); +lean_dec(x_13); +if (x_14 == 0) { -lean_object* x_29; uint8_t x_30; -x_29 = lean_array_fget(x_1, x_2); -x_30 = lean_ctor_get_uint8(x_29, sizeof(void*)*1); -if (x_30 == 0) -{ -uint8_t x_31; uint8_t x_32; uint8_t x_33; -x_31 = lean_ctor_get_uint8(x_29, sizeof(void*)*1 + 1); -lean_dec(x_29); -x_32 = 1; -x_33 = l_Bool_DecidableEq(x_31, x_32); -if (x_33 == 0) -{ -lean_object* x_34; -lean_inc(x_5); -lean_inc(x_8); -x_34 = l_Lean_Meta_isProof(x_8, x_5, x_6); -if (lean_obj_tag(x_34) == 0) -{ -lean_object* x_35; uint8_t x_36; -x_35 = lean_ctor_get(x_34, 0); -lean_inc(x_35); -x_36 = lean_unbox(x_35); -lean_dec(x_35); -if (x_36 == 0) -{ -lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; -x_37 = lean_ctor_get(x_34, 1); -lean_inc(x_37); -lean_dec(x_34); -x_38 = lean_unsigned_to_nat(1u); -x_39 = lean_nat_sub(x_2, x_38); -lean_dec(x_2); -x_40 = lean_array_push(x_4, x_8); -x_2 = x_39; -x_3 = x_7; -x_4 = x_40; -x_6 = x_37; -goto _start; -} -else -{ -lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; -lean_dec(x_8); -x_42 = lean_ctor_get(x_34, 1); -lean_inc(x_42); -lean_dec(x_34); -x_43 = lean_unsigned_to_nat(1u); -x_44 = lean_nat_sub(x_2, x_43); -lean_dec(x_2); -x_45 = l___private_Init_Lean_Meta_DiscrTree_2__tmpStar; -x_46 = lean_array_push(x_4, x_45); -x_2 = x_44; -x_3 = x_7; -x_4 = x_46; -x_6 = x_42; -goto _start; -} -} -else -{ -uint8_t x_48; -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -x_48 = !lean_is_exclusive(x_34); -if (x_48 == 0) -{ -return x_34; -} -else -{ -lean_object* x_49; lean_object* x_50; lean_object* x_51; -x_49 = lean_ctor_get(x_34, 0); -x_50 = lean_ctor_get(x_34, 1); -lean_inc(x_50); -lean_inc(x_49); -lean_dec(x_34); -x_51 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_51, 0, x_49); -lean_ctor_set(x_51, 1, x_50); -return x_51; -} -} -} -else -{ -lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; -lean_dec(x_8); -x_52 = lean_unsigned_to_nat(1u); -x_53 = lean_nat_sub(x_2, x_52); -lean_dec(x_2); -x_54 = l___private_Init_Lean_Meta_DiscrTree_2__tmpStar; -x_55 = lean_array_push(x_4, x_54); -x_2 = x_53; -x_3 = x_7; -x_4 = x_55; -goto _start; -} -} -else -{ -uint8_t x_57; -lean_dec(x_29); -x_57 = l_String_Iterator_extract___closed__1; -if (x_57 == 0) -{ -lean_object* x_58; -lean_inc(x_5); -lean_inc(x_8); -x_58 = l_Lean_Meta_isProof(x_8, x_5, x_6); -if (lean_obj_tag(x_58) == 0) -{ -lean_object* x_59; uint8_t x_60; -x_59 = lean_ctor_get(x_58, 0); -lean_inc(x_59); -x_60 = lean_unbox(x_59); -lean_dec(x_59); -if (x_60 == 0) -{ -lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; -x_61 = lean_ctor_get(x_58, 1); -lean_inc(x_61); -lean_dec(x_58); -x_62 = lean_unsigned_to_nat(1u); -x_63 = lean_nat_sub(x_2, x_62); -lean_dec(x_2); -x_64 = lean_array_push(x_4, x_8); -x_2 = x_63; -x_3 = x_7; -x_4 = x_64; -x_6 = x_61; -goto _start; -} -else -{ -lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; -lean_dec(x_8); -x_66 = lean_ctor_get(x_58, 1); -lean_inc(x_66); -lean_dec(x_58); -x_67 = lean_unsigned_to_nat(1u); -x_68 = lean_nat_sub(x_2, x_67); -lean_dec(x_2); -x_69 = l___private_Init_Lean_Meta_DiscrTree_2__tmpStar; -x_70 = lean_array_push(x_4, x_69); -x_2 = x_68; -x_3 = x_7; -x_4 = x_70; -x_6 = x_66; -goto _start; -} -} -else -{ -uint8_t x_72; -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -x_72 = !lean_is_exclusive(x_58); -if (x_72 == 0) -{ -return x_58; -} -else -{ -lean_object* x_73; lean_object* x_74; lean_object* x_75; -x_73 = lean_ctor_get(x_58, 0); -x_74 = lean_ctor_get(x_58, 1); -lean_inc(x_74); -lean_inc(x_73); -lean_dec(x_58); -x_75 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_75, 0, x_73); -lean_ctor_set(x_75, 1, x_74); -return x_75; -} -} -} -else -{ -lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; -lean_dec(x_8); -x_76 = lean_unsigned_to_nat(1u); -x_77 = lean_nat_sub(x_2, x_76); -lean_dec(x_2); -x_78 = l___private_Init_Lean_Meta_DiscrTree_2__tmpStar; -x_79 = lean_array_push(x_4, x_78); -x_2 = x_77; -x_3 = x_7; -x_4 = x_79; -goto _start; -} -} -} -} -else -{ -lean_object* x_81; -lean_dec(x_5); -lean_dec(x_3); -lean_dec(x_2); -x_81 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_81, 0, x_4); -lean_ctor_set(x_81, 1, x_6); -return x_81; -} -} -} -lean_object* l___private_Init_Lean_Meta_DiscrTree_3__pushArgsAux___main___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { -_start: -{ -lean_object* x_7; -x_7 = l___private_Init_Lean_Meta_DiscrTree_3__pushArgsAux___main(x_1, x_2, x_3, x_4, x_5, x_6); -lean_dec(x_1); -return x_7; -} -} -lean_object* l___private_Init_Lean_Meta_DiscrTree_3__pushArgsAux(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { -_start: -{ -lean_object* x_7; -x_7 = l___private_Init_Lean_Meta_DiscrTree_3__pushArgsAux___main(x_1, x_2, x_3, x_4, x_5, x_6); -return x_7; -} -} -lean_object* l___private_Init_Lean_Meta_DiscrTree_3__pushArgsAux___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { -_start: -{ -lean_object* x_7; -x_7 = l___private_Init_Lean_Meta_DiscrTree_3__pushArgsAux(x_1, x_2, x_3, x_4, x_5, x_6); -lean_dec(x_1); -return x_7; -} -} -lean_object* l___private_Init_Lean_Meta_DiscrTree_4__pushArgs(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; -lean_inc(x_3); -x_5 = l_Lean_Meta_whnf(x_2, x_3, x_4); -if (lean_obj_tag(x_5) == 0) -{ -uint8_t x_6; -x_6 = !lean_is_exclusive(x_5); -if (x_6 == 0) -{ -lean_object* x_7; lean_object* x_8; lean_object* x_9; -x_7 = lean_ctor_get(x_5, 0); -x_8 = lean_ctor_get(x_5, 1); -x_9 = l_Lean_Expr_getAppFn___main(x_7); -switch (lean_obj_tag(x_9)) { -case 1: -{ -lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; -lean_free_object(x_5); -x_10 = lean_ctor_get(x_9, 0); -lean_inc(x_10); -x_11 = lean_unsigned_to_nat(0u); -x_12 = l_Lean_Expr_getAppNumArgsAux___main(x_7, x_11); -lean_inc(x_12); -x_13 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_13, 0, x_10); -lean_ctor_set(x_13, 1, x_12); -lean_inc(x_3); -lean_inc(x_12); -x_14 = l_Lean_Meta_getFunInfoNArgs(x_9, x_12, x_3, x_8); -if (lean_obj_tag(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; -x_15 = lean_ctor_get(x_14, 0); +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_15 = lean_ctor_get(x_12, 1); lean_inc(x_15); -x_16 = lean_ctor_get(x_14, 1); -lean_inc(x_16); -lean_dec(x_14); -x_17 = lean_ctor_get(x_15, 0); -lean_inc(x_17); -lean_dec(x_15); -x_18 = lean_unsigned_to_nat(1u); -x_19 = lean_nat_sub(x_12, x_18); lean_dec(x_12); -x_20 = l___private_Init_Lean_Meta_DiscrTree_3__pushArgsAux___main(x_17, x_19, x_7, x_1, x_3, x_16); -lean_dec(x_17); -if (lean_obj_tag(x_20) == 0) -{ -uint8_t x_21; -x_21 = !lean_is_exclusive(x_20); -if (x_21 == 0) -{ -lean_object* x_22; lean_object* x_23; -x_22 = lean_ctor_get(x_20, 0); -x_23 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_23, 0, x_13); -lean_ctor_set(x_23, 1, x_22); -lean_ctor_set(x_20, 0, x_23); -return x_20; -} -else -{ -lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; -x_24 = lean_ctor_get(x_20, 0); -x_25 = lean_ctor_get(x_20, 1); -lean_inc(x_25); -lean_inc(x_24); -lean_dec(x_20); -x_26 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_26, 0, x_13); -lean_ctor_set(x_26, 1, x_24); -x_27 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_27, 0, x_26); -lean_ctor_set(x_27, 1, x_25); -return x_27; -} -} -else -{ -uint8_t x_28; -lean_dec(x_13); -x_28 = !lean_is_exclusive(x_20); -if (x_28 == 0) -{ -return x_20; -} -else -{ -lean_object* x_29; lean_object* x_30; lean_object* x_31; -x_29 = lean_ctor_get(x_20, 0); -x_30 = lean_ctor_get(x_20, 1); -lean_inc(x_30); -lean_inc(x_29); -lean_dec(x_20); -x_31 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_31, 0, x_29); -lean_ctor_set(x_31, 1, x_30); -return x_31; -} -} -} -else -{ -uint8_t x_32; -lean_dec(x_13); -lean_dec(x_12); -lean_dec(x_7); +x_16 = lean_unsigned_to_nat(1u); +x_17 = lean_nat_sub(x_3, x_16); lean_dec(x_3); -lean_dec(x_1); -x_32 = !lean_is_exclusive(x_14); -if (x_32 == 0) -{ -return x_14; +x_18 = lean_array_push(x_5, x_9); +x_3 = x_17; +x_4 = x_8; +x_5 = x_18; +x_7 = x_15; +goto _start; } else { -lean_object* x_33; lean_object* x_34; lean_object* x_35; -x_33 = lean_ctor_get(x_14, 0); -x_34 = lean_ctor_get(x_14, 1); -lean_inc(x_34); -lean_inc(x_33); -lean_dec(x_14); -x_35 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_35, 0, x_33); -lean_ctor_set(x_35, 1, x_34); +lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; +lean_dec(x_9); +x_20 = lean_ctor_get(x_12, 1); +lean_inc(x_20); +lean_dec(x_12); +x_21 = lean_unsigned_to_nat(1u); +x_22 = lean_nat_sub(x_3, x_21); +lean_dec(x_3); +x_23 = l___private_Init_Lean_Meta_DiscrTree_2__tmpStar; +x_24 = lean_array_push(x_5, x_23); +x_3 = x_22; +x_4 = x_8; +x_5 = x_24; +x_7 = x_20; +goto _start; +} +} +else +{ +uint8_t x_26; +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_3); +x_26 = !lean_is_exclusive(x_12); +if (x_26 == 0) +{ +return x_12; +} +else +{ +lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_27 = lean_ctor_get(x_12, 0); +x_28 = lean_ctor_get(x_12, 1); +lean_inc(x_28); +lean_inc(x_27); +lean_dec(x_12); +x_29 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_29, 0, x_27); +lean_ctor_set(x_29, 1, x_28); +return x_29; +} +} +} +else +{ +lean_object* x_30; uint8_t x_31; +x_30 = lean_array_fget(x_1, x_3); +x_31 = lean_ctor_get_uint8(x_30, sizeof(void*)*1); +if (x_31 == 0) +{ +uint8_t x_32; uint8_t x_33; uint8_t x_34; +x_32 = lean_ctor_get_uint8(x_30, sizeof(void*)*1 + 1); +lean_dec(x_30); +x_33 = 1; +x_34 = l_Bool_DecidableEq(x_32, x_33); +if (x_34 == 0) +{ +lean_object* x_35; +lean_inc(x_6); +lean_inc(x_9); +x_35 = l_Lean_Meta_isProof(x_9, x_6, x_7); +if (lean_obj_tag(x_35) == 0) +{ +lean_object* x_36; uint8_t x_37; +x_36 = lean_ctor_get(x_35, 0); +lean_inc(x_36); +x_37 = lean_unbox(x_36); +lean_dec(x_36); +if (x_37 == 0) +{ +lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; +x_38 = lean_ctor_get(x_35, 1); +lean_inc(x_38); +lean_dec(x_35); +x_39 = lean_unsigned_to_nat(1u); +x_40 = lean_nat_sub(x_3, x_39); +lean_dec(x_3); +x_41 = lean_array_push(x_5, x_9); +x_3 = x_40; +x_4 = x_8; +x_5 = x_41; +x_7 = x_38; +goto _start; +} +else +{ +lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; +lean_dec(x_9); +x_43 = lean_ctor_get(x_35, 1); +lean_inc(x_43); +lean_dec(x_35); +x_44 = lean_unsigned_to_nat(1u); +x_45 = lean_nat_sub(x_3, x_44); +lean_dec(x_3); +x_46 = l___private_Init_Lean_Meta_DiscrTree_2__tmpStar; +x_47 = lean_array_push(x_5, x_46); +x_3 = x_45; +x_4 = x_8; +x_5 = x_47; +x_7 = x_43; +goto _start; +} +} +else +{ +uint8_t x_49; +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_3); +x_49 = !lean_is_exclusive(x_35); +if (x_49 == 0) +{ return x_35; } -} -} -case 2: +else { -lean_object* x_36; lean_object* x_37; uint8_t x_38; uint8_t x_39; uint8_t x_40; -lean_dec(x_7); -x_36 = lean_ctor_get(x_9, 0); -lean_inc(x_36); +lean_object* x_50; lean_object* x_51; lean_object* x_52; +x_50 = lean_ctor_get(x_35, 0); +x_51 = lean_ctor_get(x_35, 1); +lean_inc(x_51); +lean_inc(x_50); +lean_dec(x_35); +x_52 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_52, 0, x_50); +lean_ctor_set(x_52, 1, x_51); +return x_52; +} +} +} +else +{ +lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_dec(x_9); -x_37 = l___private_Init_Lean_Meta_DiscrTree_1__tmpMVarId; -x_38 = lean_name_eq(x_36, x_37); -x_39 = 1; -x_40 = l_Bool_DecidableEq(x_38, x_39); -if (x_40 == 0) -{ -lean_object* x_41; -lean_free_object(x_5); -x_41 = l_Lean_Meta_isReadOnlyOrSyntheticExprMVar(x_36, x_3, x_8); +x_53 = lean_unsigned_to_nat(1u); +x_54 = lean_nat_sub(x_3, x_53); lean_dec(x_3); -if (lean_obj_tag(x_41) == 0) -{ -lean_object* x_42; uint8_t x_43; -x_42 = lean_ctor_get(x_41, 0); -lean_inc(x_42); -x_43 = lean_unbox(x_42); -lean_dec(x_42); -if (x_43 == 0) -{ -uint8_t x_44; -x_44 = !lean_is_exclusive(x_41); -if (x_44 == 0) -{ -lean_object* x_45; lean_object* x_46; lean_object* x_47; -x_45 = lean_ctor_get(x_41, 0); -lean_dec(x_45); -x_46 = lean_box(3); -x_47 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_47, 0, x_46); -lean_ctor_set(x_47, 1, x_1); -lean_ctor_set(x_41, 0, x_47); -return x_41; -} -else -{ -lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; -x_48 = lean_ctor_get(x_41, 1); -lean_inc(x_48); -lean_dec(x_41); -x_49 = lean_box(3); -x_50 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_50, 0, x_49); -lean_ctor_set(x_50, 1, x_1); -x_51 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_51, 0, x_50); -lean_ctor_set(x_51, 1, x_48); -return x_51; +x_55 = l___private_Init_Lean_Meta_DiscrTree_2__tmpStar; +x_56 = lean_array_push(x_5, x_55); +x_3 = x_54; +x_4 = x_8; +x_5 = x_56; +goto _start; } } else { -uint8_t x_52; -x_52 = !lean_is_exclusive(x_41); -if (x_52 == 0) +if (x_2 == 0) { -lean_object* x_53; lean_object* x_54; lean_object* x_55; -x_53 = lean_ctor_get(x_41, 0); -lean_dec(x_53); -x_54 = lean_box(4); -x_55 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_55, 0, x_54); -lean_ctor_set(x_55, 1, x_1); -lean_ctor_set(x_41, 0, x_55); -return x_41; -} -else -{ -lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; -x_56 = lean_ctor_get(x_41, 1); -lean_inc(x_56); -lean_dec(x_41); -x_57 = lean_box(4); -x_58 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_58, 0, x_57); -lean_ctor_set(x_58, 1, x_1); -x_59 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_59, 0, x_58); -lean_ctor_set(x_59, 1, x_56); -return x_59; -} -} -} -else -{ -uint8_t x_60; -lean_dec(x_1); -x_60 = !lean_is_exclusive(x_41); +uint8_t x_58; uint8_t x_59; uint8_t x_60; +x_58 = lean_ctor_get_uint8(x_30, sizeof(void*)*1 + 1); +lean_dec(x_30); +x_59 = 1; +x_60 = l_Bool_DecidableEq(x_58, x_59); if (x_60 == 0) { -return x_41; -} -else +lean_object* x_61; +lean_inc(x_6); +lean_inc(x_9); +x_61 = l_Lean_Meta_isProof(x_9, x_6, x_7); +if (lean_obj_tag(x_61) == 0) { -lean_object* x_61; lean_object* x_62; lean_object* x_63; -x_61 = lean_ctor_get(x_41, 0); -x_62 = lean_ctor_get(x_41, 1); +lean_object* x_62; uint8_t x_63; +x_62 = lean_ctor_get(x_61, 0); lean_inc(x_62); -lean_inc(x_61); -lean_dec(x_41); -x_63 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_63, 0, x_61); -lean_ctor_set(x_63, 1, x_62); -return x_63; -} -} -} -else +x_63 = lean_unbox(x_62); +lean_dec(x_62); +if (x_63 == 0) { -lean_object* x_64; lean_object* x_65; -lean_dec(x_36); +lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; +x_64 = lean_ctor_get(x_61, 1); +lean_inc(x_64); +lean_dec(x_61); +x_65 = lean_unsigned_to_nat(1u); +x_66 = lean_nat_sub(x_3, x_65); lean_dec(x_3); -x_64 = lean_box(3); -x_65 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_65, 0, x_64); -lean_ctor_set(x_65, 1, x_1); -lean_ctor_set(x_5, 0, x_65); -return x_5; -} -} -case 4: -{ -lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; -lean_free_object(x_5); -x_66 = lean_ctor_get(x_9, 0); -lean_inc(x_66); -x_67 = lean_unsigned_to_nat(0u); -x_68 = l_Lean_Expr_getAppNumArgsAux___main(x_7, x_67); -lean_inc(x_68); -x_69 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_69, 0, x_66); -lean_ctor_set(x_69, 1, x_68); -lean_inc(x_3); -lean_inc(x_68); -x_70 = l_Lean_Meta_getFunInfoNArgs(x_9, x_68, x_3, x_8); -if (lean_obj_tag(x_70) == 0) -{ -lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; -x_71 = lean_ctor_get(x_70, 0); -lean_inc(x_71); -x_72 = lean_ctor_get(x_70, 1); -lean_inc(x_72); -lean_dec(x_70); -x_73 = lean_ctor_get(x_71, 0); -lean_inc(x_73); -lean_dec(x_71); -x_74 = lean_unsigned_to_nat(1u); -x_75 = lean_nat_sub(x_68, x_74); -lean_dec(x_68); -x_76 = l___private_Init_Lean_Meta_DiscrTree_3__pushArgsAux___main(x_73, x_75, x_7, x_1, x_3, x_72); -lean_dec(x_73); -if (lean_obj_tag(x_76) == 0) -{ -uint8_t x_77; -x_77 = !lean_is_exclusive(x_76); -if (x_77 == 0) -{ -lean_object* x_78; lean_object* x_79; -x_78 = lean_ctor_get(x_76, 0); -x_79 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_79, 0, x_69); -lean_ctor_set(x_79, 1, x_78); -lean_ctor_set(x_76, 0, x_79); -return x_76; +x_67 = lean_array_push(x_5, x_9); +x_3 = x_66; +x_4 = x_8; +x_5 = x_67; +x_7 = x_64; +goto _start; } else { -lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; -x_80 = lean_ctor_get(x_76, 0); -x_81 = lean_ctor_get(x_76, 1); -lean_inc(x_81); -lean_inc(x_80); -lean_dec(x_76); -x_82 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_82, 0, x_69); -lean_ctor_set(x_82, 1, x_80); -x_83 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_83, 0, x_82); -lean_ctor_set(x_83, 1, x_81); -return x_83; +lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; +lean_dec(x_9); +x_69 = lean_ctor_get(x_61, 1); +lean_inc(x_69); +lean_dec(x_61); +x_70 = lean_unsigned_to_nat(1u); +x_71 = lean_nat_sub(x_3, x_70); +lean_dec(x_3); +x_72 = l___private_Init_Lean_Meta_DiscrTree_2__tmpStar; +x_73 = lean_array_push(x_5, x_72); +x_3 = x_71; +x_4 = x_8; +x_5 = x_73; +x_7 = x_69; +goto _start; +} +} +else +{ +uint8_t x_75; +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_3); +x_75 = !lean_is_exclusive(x_61); +if (x_75 == 0) +{ +return x_61; +} +else +{ +lean_object* x_76; lean_object* x_77; lean_object* x_78; +x_76 = lean_ctor_get(x_61, 0); +x_77 = lean_ctor_get(x_61, 1); +lean_inc(x_77); +lean_inc(x_76); +lean_dec(x_61); +x_78 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_78, 0, x_76); +lean_ctor_set(x_78, 1, x_77); +return x_78; +} +} +} +else +{ +lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; +lean_dec(x_9); +x_79 = lean_unsigned_to_nat(1u); +x_80 = lean_nat_sub(x_3, x_79); +lean_dec(x_3); +x_81 = l___private_Init_Lean_Meta_DiscrTree_2__tmpStar; +x_82 = lean_array_push(x_5, x_81); +x_3 = x_80; +x_4 = x_8; +x_5 = x_82; +goto _start; } } else { uint8_t x_84; -lean_dec(x_69); -x_84 = !lean_is_exclusive(x_76); +lean_dec(x_30); +x_84 = l_String_Iterator_extract___closed__1; if (x_84 == 0) { -return x_76; -} -else +lean_object* x_85; +lean_inc(x_6); +lean_inc(x_9); +x_85 = l_Lean_Meta_isProof(x_9, x_6, x_7); +if (lean_obj_tag(x_85) == 0) { -lean_object* x_85; lean_object* x_86; lean_object* x_87; -x_85 = lean_ctor_get(x_76, 0); -x_86 = lean_ctor_get(x_76, 1); +lean_object* x_86; uint8_t x_87; +x_86 = lean_ctor_get(x_85, 0); lean_inc(x_86); -lean_inc(x_85); -lean_dec(x_76); -x_87 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_87, 0, x_85); -lean_ctor_set(x_87, 1, x_86); -return x_87; -} -} +x_87 = lean_unbox(x_86); +lean_dec(x_86); +if (x_87 == 0) +{ +lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; +x_88 = lean_ctor_get(x_85, 1); +lean_inc(x_88); +lean_dec(x_85); +x_89 = lean_unsigned_to_nat(1u); +x_90 = lean_nat_sub(x_3, x_89); +lean_dec(x_3); +x_91 = lean_array_push(x_5, x_9); +x_3 = x_90; +x_4 = x_8; +x_5 = x_91; +x_7 = x_88; +goto _start; } else { -uint8_t x_88; -lean_dec(x_69); -lean_dec(x_68); -lean_dec(x_7); -lean_dec(x_3); -lean_dec(x_1); -x_88 = !lean_is_exclusive(x_70); -if (x_88 == 0) -{ -return x_70; -} -else -{ -lean_object* x_89; lean_object* x_90; lean_object* x_91; -x_89 = lean_ctor_get(x_70, 0); -x_90 = lean_ctor_get(x_70, 1); -lean_inc(x_90); -lean_inc(x_89); -lean_dec(x_70); -x_91 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_91, 0, x_89); -lean_ctor_set(x_91, 1, x_90); -return x_91; -} -} -} -case 9: -{ -lean_object* x_92; lean_object* x_93; lean_object* x_94; -lean_dec(x_7); -lean_dec(x_3); -x_92 = lean_ctor_get(x_9, 0); -lean_inc(x_92); +lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_dec(x_9); -x_93 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_93, 0, x_92); -x_94 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_94, 0, x_93); -lean_ctor_set(x_94, 1, x_1); -lean_ctor_set(x_5, 0, x_94); -return x_5; -} -default: -{ -lean_object* x_95; lean_object* x_96; -lean_dec(x_9); -lean_dec(x_7); +x_93 = lean_ctor_get(x_85, 1); +lean_inc(x_93); +lean_dec(x_85); +x_94 = lean_unsigned_to_nat(1u); +x_95 = lean_nat_sub(x_3, x_94); lean_dec(x_3); -x_95 = lean_box(4); -x_96 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_96, 0, x_95); -lean_ctor_set(x_96, 1, x_1); -lean_ctor_set(x_5, 0, x_96); -return x_5; -} +x_96 = l___private_Init_Lean_Meta_DiscrTree_2__tmpStar; +x_97 = lean_array_push(x_5, x_96); +x_3 = x_95; +x_4 = x_8; +x_5 = x_97; +x_7 = x_93; +goto _start; } } else { -lean_object* x_97; lean_object* x_98; lean_object* x_99; -x_97 = lean_ctor_get(x_5, 0); -x_98 = lean_ctor_get(x_5, 1); -lean_inc(x_98); -lean_inc(x_97); +uint8_t x_99; +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_6); lean_dec(x_5); -x_99 = l_Lean_Expr_getAppFn___main(x_97); -switch (lean_obj_tag(x_99)) { +lean_dec(x_3); +x_99 = !lean_is_exclusive(x_85); +if (x_99 == 0) +{ +return x_85; +} +else +{ +lean_object* x_100; lean_object* x_101; lean_object* x_102; +x_100 = lean_ctor_get(x_85, 0); +x_101 = lean_ctor_get(x_85, 1); +lean_inc(x_101); +lean_inc(x_100); +lean_dec(x_85); +x_102 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_102, 0, x_100); +lean_ctor_set(x_102, 1, x_101); +return x_102; +} +} +} +else +{ +lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; +lean_dec(x_9); +x_103 = lean_unsigned_to_nat(1u); +x_104 = lean_nat_sub(x_3, x_103); +lean_dec(x_3); +x_105 = l___private_Init_Lean_Meta_DiscrTree_2__tmpStar; +x_106 = lean_array_push(x_5, x_105); +x_3 = x_104; +x_4 = x_8; +x_5 = x_106; +goto _start; +} +} +} +} +} +else +{ +lean_object* x_108; +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_3); +x_108 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_108, 0, x_5); +lean_ctor_set(x_108, 1, x_7); +return x_108; +} +} +} +lean_object* l___private_Init_Lean_Meta_DiscrTree_3__pushArgsAux___main___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +uint8_t x_8; lean_object* x_9; +x_8 = lean_unbox(x_2); +lean_dec(x_2); +x_9 = l___private_Init_Lean_Meta_DiscrTree_3__pushArgsAux___main(x_1, x_8, x_3, x_4, x_5, x_6, x_7); +lean_dec(x_1); +return x_9; +} +} +lean_object* l___private_Init_Lean_Meta_DiscrTree_3__pushArgsAux(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +lean_object* x_8; +x_8 = l___private_Init_Lean_Meta_DiscrTree_3__pushArgsAux___main(x_1, x_2, x_3, x_4, x_5, x_6, x_7); +return x_8; +} +} +lean_object* l___private_Init_Lean_Meta_DiscrTree_3__pushArgsAux___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +uint8_t x_8; lean_object* x_9; +x_8 = lean_unbox(x_2); +lean_dec(x_2); +x_9 = l___private_Init_Lean_Meta_DiscrTree_3__pushArgsAux(x_1, x_8, x_3, x_4, x_5, x_6, x_7); +lean_dec(x_1); +return x_9; +} +} +lean_object* l___private_Init_Lean_Meta_DiscrTree_4__pushArgs(lean_object* x_1, lean_object* x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; +lean_inc(x_4); +x_6 = l_Lean_Meta_whnf(x_2, x_4, x_5); +if (lean_obj_tag(x_6) == 0) +{ +uint8_t x_7; +x_7 = !lean_is_exclusive(x_6); +if (x_7 == 0) +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_8 = lean_ctor_get(x_6, 0); +x_9 = lean_ctor_get(x_6, 1); +x_10 = l_Lean_Expr_getAppFn___main(x_8); +switch (lean_obj_tag(x_10)) { case 1: { -lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; -x_100 = lean_ctor_get(x_99, 0); -lean_inc(x_100); -x_101 = lean_unsigned_to_nat(0u); -x_102 = l_Lean_Expr_getAppNumArgsAux___main(x_97, x_101); -lean_inc(x_102); -x_103 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_103, 0, x_100); -lean_ctor_set(x_103, 1, x_102); -lean_inc(x_3); -lean_inc(x_102); -x_104 = l_Lean_Meta_getFunInfoNArgs(x_99, x_102, x_3, x_98); -if (lean_obj_tag(x_104) == 0) +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; +lean_free_object(x_6); +x_11 = lean_ctor_get(x_10, 0); +lean_inc(x_11); +x_12 = lean_unsigned_to_nat(0u); +x_13 = l_Lean_Expr_getAppNumArgsAux___main(x_8, x_12); +lean_inc(x_13); +x_14 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_14, 0, x_11); +lean_ctor_set(x_14, 1, x_13); +lean_inc(x_4); +lean_inc(x_13); +x_15 = l_Lean_Meta_getFunInfoNArgs(x_10, x_13, x_4, x_9); +if (lean_obj_tag(x_15) == 0) { -lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; -x_105 = lean_ctor_get(x_104, 0); -lean_inc(x_105); -x_106 = lean_ctor_get(x_104, 1); -lean_inc(x_106); -lean_dec(x_104); -x_107 = lean_ctor_get(x_105, 0); -lean_inc(x_107); -lean_dec(x_105); -x_108 = lean_unsigned_to_nat(1u); -x_109 = lean_nat_sub(x_102, x_108); -lean_dec(x_102); -x_110 = l___private_Init_Lean_Meta_DiscrTree_3__pushArgsAux___main(x_107, x_109, x_97, x_1, x_3, x_106); -lean_dec(x_107); -if (lean_obj_tag(x_110) == 0) +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_16 = lean_ctor_get(x_15, 0); +lean_inc(x_16); +x_17 = lean_ctor_get(x_15, 1); +lean_inc(x_17); +lean_dec(x_15); +x_18 = lean_ctor_get(x_16, 0); +lean_inc(x_18); +lean_dec(x_16); +x_19 = lean_unsigned_to_nat(1u); +x_20 = lean_nat_sub(x_13, x_19); +lean_dec(x_13); +x_21 = l___private_Init_Lean_Meta_DiscrTree_3__pushArgsAux___main(x_18, x_3, x_20, x_8, x_1, x_4, x_17); +lean_dec(x_18); +if (lean_obj_tag(x_21) == 0) { -lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; -x_111 = lean_ctor_get(x_110, 0); -lean_inc(x_111); -x_112 = lean_ctor_get(x_110, 1); -lean_inc(x_112); -if (lean_is_exclusive(x_110)) { - lean_ctor_release(x_110, 0); - lean_ctor_release(x_110, 1); - x_113 = x_110; -} else { - lean_dec_ref(x_110); - x_113 = lean_box(0); -} -x_114 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_114, 0, x_103); -lean_ctor_set(x_114, 1, x_111); -if (lean_is_scalar(x_113)) { - x_115 = lean_alloc_ctor(0, 2, 0); -} else { - x_115 = x_113; -} -lean_ctor_set(x_115, 0, x_114); -lean_ctor_set(x_115, 1, x_112); -return x_115; +uint8_t x_22; +x_22 = !lean_is_exclusive(x_21); +if (x_22 == 0) +{ +lean_object* x_23; lean_object* x_24; +x_23 = lean_ctor_get(x_21, 0); +x_24 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_24, 0, x_14); +lean_ctor_set(x_24, 1, x_23); +lean_ctor_set(x_21, 0, x_24); +return x_21; } else { -lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; -lean_dec(x_103); -x_116 = lean_ctor_get(x_110, 0); -lean_inc(x_116); -x_117 = lean_ctor_get(x_110, 1); -lean_inc(x_117); -if (lean_is_exclusive(x_110)) { - lean_ctor_release(x_110, 0); - lean_ctor_release(x_110, 1); - x_118 = x_110; -} else { - lean_dec_ref(x_110); - x_118 = lean_box(0); -} -if (lean_is_scalar(x_118)) { - x_119 = lean_alloc_ctor(1, 2, 0); -} else { - x_119 = x_118; -} -lean_ctor_set(x_119, 0, x_116); -lean_ctor_set(x_119, 1, x_117); -return x_119; +lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; +x_25 = lean_ctor_get(x_21, 0); +x_26 = lean_ctor_get(x_21, 1); +lean_inc(x_26); +lean_inc(x_25); +lean_dec(x_21); +x_27 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_27, 0, x_14); +lean_ctor_set(x_27, 1, x_25); +x_28 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_28, 0, x_27); +lean_ctor_set(x_28, 1, x_26); +return x_28; } } else { -lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; -lean_dec(x_103); -lean_dec(x_102); -lean_dec(x_97); -lean_dec(x_3); +uint8_t x_29; +lean_dec(x_14); +x_29 = !lean_is_exclusive(x_21); +if (x_29 == 0) +{ +return x_21; +} +else +{ +lean_object* x_30; lean_object* x_31; lean_object* x_32; +x_30 = lean_ctor_get(x_21, 0); +x_31 = lean_ctor_get(x_21, 1); +lean_inc(x_31); +lean_inc(x_30); +lean_dec(x_21); +x_32 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_32, 0, x_30); +lean_ctor_set(x_32, 1, x_31); +return x_32; +} +} +} +else +{ +uint8_t x_33; +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_8); +lean_dec(x_4); lean_dec(x_1); -x_120 = lean_ctor_get(x_104, 0); -lean_inc(x_120); -x_121 = lean_ctor_get(x_104, 1); -lean_inc(x_121); -if (lean_is_exclusive(x_104)) { - lean_ctor_release(x_104, 0); - lean_ctor_release(x_104, 1); - x_122 = x_104; -} else { - lean_dec_ref(x_104); - x_122 = lean_box(0); +x_33 = !lean_is_exclusive(x_15); +if (x_33 == 0) +{ +return x_15; } -if (lean_is_scalar(x_122)) { - x_123 = lean_alloc_ctor(1, 2, 0); -} else { - x_123 = x_122; +else +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; +x_34 = lean_ctor_get(x_15, 0); +x_35 = lean_ctor_get(x_15, 1); +lean_inc(x_35); +lean_inc(x_34); +lean_dec(x_15); +x_36 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_36, 0, x_34); +lean_ctor_set(x_36, 1, x_35); +return x_36; } -lean_ctor_set(x_123, 0, x_120); -lean_ctor_set(x_123, 1, x_121); -return x_123; } } case 2: { -lean_object* x_124; lean_object* x_125; uint8_t x_126; uint8_t x_127; uint8_t x_128; -lean_dec(x_97); -x_124 = lean_ctor_get(x_99, 0); -lean_inc(x_124); -lean_dec(x_99); -x_125 = l___private_Init_Lean_Meta_DiscrTree_1__tmpMVarId; -x_126 = lean_name_eq(x_124, x_125); -x_127 = 1; -x_128 = l_Bool_DecidableEq(x_126, x_127); -if (x_128 == 0) +lean_object* x_37; lean_object* x_38; uint8_t x_39; uint8_t x_40; uint8_t x_41; +lean_dec(x_8); +x_37 = lean_ctor_get(x_10, 0); +lean_inc(x_37); +lean_dec(x_10); +x_38 = l___private_Init_Lean_Meta_DiscrTree_1__tmpMVarId; +x_39 = lean_name_eq(x_37, x_38); +x_40 = 1; +x_41 = l_Bool_DecidableEq(x_39, x_40); +if (x_41 == 0) { -lean_object* x_129; -x_129 = l_Lean_Meta_isReadOnlyOrSyntheticExprMVar(x_124, x_3, x_98); -lean_dec(x_3); -if (lean_obj_tag(x_129) == 0) +lean_object* x_42; +lean_free_object(x_6); +x_42 = l_Lean_Meta_isReadOnlyOrSyntheticExprMVar(x_37, x_4, x_9); +lean_dec(x_4); +if (lean_obj_tag(x_42) == 0) { -lean_object* x_130; uint8_t x_131; -x_130 = lean_ctor_get(x_129, 0); -lean_inc(x_130); -x_131 = lean_unbox(x_130); -lean_dec(x_130); -if (x_131 == 0) +lean_object* x_43; uint8_t x_44; +x_43 = lean_ctor_get(x_42, 0); +lean_inc(x_43); +x_44 = lean_unbox(x_43); +lean_dec(x_43); +if (x_44 == 0) { -lean_object* x_132; lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; -x_132 = lean_ctor_get(x_129, 1); -lean_inc(x_132); -if (lean_is_exclusive(x_129)) { - lean_ctor_release(x_129, 0); - lean_ctor_release(x_129, 1); - x_133 = x_129; -} else { - lean_dec_ref(x_129); - x_133 = lean_box(0); -} -x_134 = lean_box(3); -x_135 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_135, 0, x_134); -lean_ctor_set(x_135, 1, x_1); -if (lean_is_scalar(x_133)) { - x_136 = lean_alloc_ctor(0, 2, 0); -} else { - x_136 = x_133; -} -lean_ctor_set(x_136, 0, x_135); -lean_ctor_set(x_136, 1, x_132); -return x_136; +uint8_t x_45; +x_45 = !lean_is_exclusive(x_42); +if (x_45 == 0) +{ +lean_object* x_46; lean_object* x_47; lean_object* x_48; +x_46 = lean_ctor_get(x_42, 0); +lean_dec(x_46); +x_47 = lean_box(3); +x_48 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_48, 0, x_47); +lean_ctor_set(x_48, 1, x_1); +lean_ctor_set(x_42, 0, x_48); +return x_42; } else { -lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; -x_137 = lean_ctor_get(x_129, 1); -lean_inc(x_137); -if (lean_is_exclusive(x_129)) { - lean_ctor_release(x_129, 0); - lean_ctor_release(x_129, 1); - x_138 = x_129; -} else { - lean_dec_ref(x_129); - x_138 = lean_box(0); -} -x_139 = lean_box(4); -x_140 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_140, 0, x_139); -lean_ctor_set(x_140, 1, x_1); -if (lean_is_scalar(x_138)) { - x_141 = lean_alloc_ctor(0, 2, 0); -} else { - x_141 = x_138; -} -lean_ctor_set(x_141, 0, x_140); -lean_ctor_set(x_141, 1, x_137); -return x_141; +lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; +x_49 = lean_ctor_get(x_42, 1); +lean_inc(x_49); +lean_dec(x_42); +x_50 = lean_box(3); +x_51 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_51, 0, x_50); +lean_ctor_set(x_51, 1, x_1); +x_52 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_52, 0, x_51); +lean_ctor_set(x_52, 1, x_49); +return x_52; } } else { -lean_object* x_142; lean_object* x_143; lean_object* x_144; lean_object* x_145; +uint8_t x_53; +x_53 = !lean_is_exclusive(x_42); +if (x_53 == 0) +{ +lean_object* x_54; lean_object* x_55; lean_object* x_56; +x_54 = lean_ctor_get(x_42, 0); +lean_dec(x_54); +x_55 = lean_box(4); +x_56 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_56, 0, x_55); +lean_ctor_set(x_56, 1, x_1); +lean_ctor_set(x_42, 0, x_56); +return x_42; +} +else +{ +lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; +x_57 = lean_ctor_get(x_42, 1); +lean_inc(x_57); +lean_dec(x_42); +x_58 = lean_box(4); +x_59 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_59, 0, x_58); +lean_ctor_set(x_59, 1, x_1); +x_60 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_60, 0, x_59); +lean_ctor_set(x_60, 1, x_57); +return x_60; +} +} +} +else +{ +uint8_t x_61; lean_dec(x_1); -x_142 = lean_ctor_get(x_129, 0); -lean_inc(x_142); -x_143 = lean_ctor_get(x_129, 1); -lean_inc(x_143); -if (lean_is_exclusive(x_129)) { - lean_ctor_release(x_129, 0); - lean_ctor_release(x_129, 1); - x_144 = x_129; -} else { - lean_dec_ref(x_129); - x_144 = lean_box(0); +x_61 = !lean_is_exclusive(x_42); +if (x_61 == 0) +{ +return x_42; } -if (lean_is_scalar(x_144)) { - x_145 = lean_alloc_ctor(1, 2, 0); -} else { - x_145 = x_144; +else +{ +lean_object* x_62; lean_object* x_63; lean_object* x_64; +x_62 = lean_ctor_get(x_42, 0); +x_63 = lean_ctor_get(x_42, 1); +lean_inc(x_63); +lean_inc(x_62); +lean_dec(x_42); +x_64 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_64, 0, x_62); +lean_ctor_set(x_64, 1, x_63); +return x_64; } -lean_ctor_set(x_145, 0, x_142); -lean_ctor_set(x_145, 1, x_143); -return x_145; } } else { -lean_object* x_146; lean_object* x_147; lean_object* x_148; -lean_dec(x_124); -lean_dec(x_3); -x_146 = lean_box(3); -x_147 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_147, 0, x_146); -lean_ctor_set(x_147, 1, x_1); -x_148 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_148, 0, x_147); -lean_ctor_set(x_148, 1, x_98); -return x_148; +lean_object* x_65; lean_object* x_66; +lean_dec(x_37); +lean_dec(x_4); +x_65 = lean_box(3); +x_66 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_66, 0, x_65); +lean_ctor_set(x_66, 1, x_1); +lean_ctor_set(x_6, 0, x_66); +return x_6; } } case 4: { -lean_object* x_149; lean_object* x_150; lean_object* x_151; lean_object* x_152; lean_object* x_153; -x_149 = lean_ctor_get(x_99, 0); -lean_inc(x_149); -x_150 = lean_unsigned_to_nat(0u); -x_151 = l_Lean_Expr_getAppNumArgsAux___main(x_97, x_150); -lean_inc(x_151); -x_152 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_152, 0, x_149); -lean_ctor_set(x_152, 1, x_151); -lean_inc(x_3); -lean_inc(x_151); -x_153 = l_Lean_Meta_getFunInfoNArgs(x_99, x_151, x_3, x_98); -if (lean_obj_tag(x_153) == 0) +lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; +lean_free_object(x_6); +x_67 = lean_ctor_get(x_10, 0); +lean_inc(x_67); +x_68 = lean_unsigned_to_nat(0u); +x_69 = l_Lean_Expr_getAppNumArgsAux___main(x_8, x_68); +lean_inc(x_69); +x_70 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_70, 0, x_67); +lean_ctor_set(x_70, 1, x_69); +lean_inc(x_4); +lean_inc(x_69); +x_71 = l_Lean_Meta_getFunInfoNArgs(x_10, x_69, x_4, x_9); +if (lean_obj_tag(x_71) == 0) { -lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; -x_154 = lean_ctor_get(x_153, 0); -lean_inc(x_154); -x_155 = lean_ctor_get(x_153, 1); -lean_inc(x_155); -lean_dec(x_153); -x_156 = lean_ctor_get(x_154, 0); -lean_inc(x_156); -lean_dec(x_154); -x_157 = lean_unsigned_to_nat(1u); -x_158 = lean_nat_sub(x_151, x_157); -lean_dec(x_151); -x_159 = l___private_Init_Lean_Meta_DiscrTree_3__pushArgsAux___main(x_156, x_158, x_97, x_1, x_3, x_155); -lean_dec(x_156); -if (lean_obj_tag(x_159) == 0) +lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; +x_72 = lean_ctor_get(x_71, 0); +lean_inc(x_72); +x_73 = lean_ctor_get(x_71, 1); +lean_inc(x_73); +lean_dec(x_71); +x_74 = lean_ctor_get(x_72, 0); +lean_inc(x_74); +lean_dec(x_72); +x_75 = lean_unsigned_to_nat(1u); +x_76 = lean_nat_sub(x_69, x_75); +lean_dec(x_69); +x_77 = l___private_Init_Lean_Meta_DiscrTree_3__pushArgsAux___main(x_74, x_3, x_76, x_8, x_1, x_4, x_73); +lean_dec(x_74); +if (lean_obj_tag(x_77) == 0) { -lean_object* x_160; lean_object* x_161; lean_object* x_162; lean_object* x_163; lean_object* x_164; -x_160 = lean_ctor_get(x_159, 0); -lean_inc(x_160); -x_161 = lean_ctor_get(x_159, 1); -lean_inc(x_161); -if (lean_is_exclusive(x_159)) { - lean_ctor_release(x_159, 0); - lean_ctor_release(x_159, 1); - x_162 = x_159; -} else { - lean_dec_ref(x_159); - x_162 = lean_box(0); -} -x_163 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_163, 0, x_152); -lean_ctor_set(x_163, 1, x_160); -if (lean_is_scalar(x_162)) { - x_164 = lean_alloc_ctor(0, 2, 0); -} else { - x_164 = x_162; -} -lean_ctor_set(x_164, 0, x_163); -lean_ctor_set(x_164, 1, x_161); -return x_164; +uint8_t x_78; +x_78 = !lean_is_exclusive(x_77); +if (x_78 == 0) +{ +lean_object* x_79; lean_object* x_80; +x_79 = lean_ctor_get(x_77, 0); +x_80 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_80, 0, x_70); +lean_ctor_set(x_80, 1, x_79); +lean_ctor_set(x_77, 0, x_80); +return x_77; } else { -lean_object* x_165; lean_object* x_166; lean_object* x_167; lean_object* x_168; -lean_dec(x_152); -x_165 = lean_ctor_get(x_159, 0); -lean_inc(x_165); -x_166 = lean_ctor_get(x_159, 1); -lean_inc(x_166); -if (lean_is_exclusive(x_159)) { - lean_ctor_release(x_159, 0); - lean_ctor_release(x_159, 1); - x_167 = x_159; -} else { - lean_dec_ref(x_159); - x_167 = lean_box(0); -} -if (lean_is_scalar(x_167)) { - x_168 = lean_alloc_ctor(1, 2, 0); -} else { - x_168 = x_167; -} -lean_ctor_set(x_168, 0, x_165); -lean_ctor_set(x_168, 1, x_166); -return x_168; +lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; +x_81 = lean_ctor_get(x_77, 0); +x_82 = lean_ctor_get(x_77, 1); +lean_inc(x_82); +lean_inc(x_81); +lean_dec(x_77); +x_83 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_83, 0, x_70); +lean_ctor_set(x_83, 1, x_81); +x_84 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_84, 0, x_83); +lean_ctor_set(x_84, 1, x_82); +return x_84; } } else { -lean_object* x_169; lean_object* x_170; lean_object* x_171; lean_object* x_172; -lean_dec(x_152); -lean_dec(x_151); -lean_dec(x_97); -lean_dec(x_3); +uint8_t x_85; +lean_dec(x_70); +x_85 = !lean_is_exclusive(x_77); +if (x_85 == 0) +{ +return x_77; +} +else +{ +lean_object* x_86; lean_object* x_87; lean_object* x_88; +x_86 = lean_ctor_get(x_77, 0); +x_87 = lean_ctor_get(x_77, 1); +lean_inc(x_87); +lean_inc(x_86); +lean_dec(x_77); +x_88 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_88, 0, x_86); +lean_ctor_set(x_88, 1, x_87); +return x_88; +} +} +} +else +{ +uint8_t x_89; +lean_dec(x_70); +lean_dec(x_69); +lean_dec(x_8); +lean_dec(x_4); lean_dec(x_1); -x_169 = lean_ctor_get(x_153, 0); -lean_inc(x_169); -x_170 = lean_ctor_get(x_153, 1); -lean_inc(x_170); -if (lean_is_exclusive(x_153)) { - lean_ctor_release(x_153, 0); - lean_ctor_release(x_153, 1); - x_171 = x_153; -} else { - lean_dec_ref(x_153); - x_171 = lean_box(0); +x_89 = !lean_is_exclusive(x_71); +if (x_89 == 0) +{ +return x_71; } -if (lean_is_scalar(x_171)) { - x_172 = lean_alloc_ctor(1, 2, 0); -} else { - x_172 = x_171; +else +{ +lean_object* x_90; lean_object* x_91; lean_object* x_92; +x_90 = lean_ctor_get(x_71, 0); +x_91 = lean_ctor_get(x_71, 1); +lean_inc(x_91); +lean_inc(x_90); +lean_dec(x_71); +x_92 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_92, 0, x_90); +lean_ctor_set(x_92, 1, x_91); +return x_92; } -lean_ctor_set(x_172, 0, x_169); -lean_ctor_set(x_172, 1, x_170); -return x_172; } } case 9: { -lean_object* x_173; lean_object* x_174; lean_object* x_175; lean_object* x_176; -lean_dec(x_97); -lean_dec(x_3); -x_173 = lean_ctor_get(x_99, 0); -lean_inc(x_173); -lean_dec(x_99); -x_174 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_174, 0, x_173); -x_175 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_175, 0, x_174); -lean_ctor_set(x_175, 1, x_1); -x_176 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_176, 0, x_175); -lean_ctor_set(x_176, 1, x_98); -return x_176; +lean_object* x_93; lean_object* x_94; lean_object* x_95; +lean_dec(x_8); +lean_dec(x_4); +x_93 = lean_ctor_get(x_10, 0); +lean_inc(x_93); +lean_dec(x_10); +x_94 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_94, 0, x_93); +x_95 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_95, 0, x_94); +lean_ctor_set(x_95, 1, x_1); +lean_ctor_set(x_6, 0, x_95); +return x_6; } default: { -lean_object* x_177; lean_object* x_178; lean_object* x_179; -lean_dec(x_99); -lean_dec(x_97); -lean_dec(x_3); -x_177 = lean_box(4); -x_178 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_178, 0, x_177); -lean_ctor_set(x_178, 1, x_1); +lean_object* x_96; lean_object* x_97; +lean_dec(x_10); +lean_dec(x_8); +lean_dec(x_4); +x_96 = lean_box(4); +x_97 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_97, 0, x_96); +lean_ctor_set(x_97, 1, x_1); +lean_ctor_set(x_6, 0, x_97); +return x_6; +} +} +} +else +{ +lean_object* x_98; lean_object* x_99; lean_object* x_100; +x_98 = lean_ctor_get(x_6, 0); +x_99 = lean_ctor_get(x_6, 1); +lean_inc(x_99); +lean_inc(x_98); +lean_dec(x_6); +x_100 = l_Lean_Expr_getAppFn___main(x_98); +switch (lean_obj_tag(x_100)) { +case 1: +{ +lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; +x_101 = lean_ctor_get(x_100, 0); +lean_inc(x_101); +x_102 = lean_unsigned_to_nat(0u); +x_103 = l_Lean_Expr_getAppNumArgsAux___main(x_98, x_102); +lean_inc(x_103); +x_104 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_104, 0, x_101); +lean_ctor_set(x_104, 1, x_103); +lean_inc(x_4); +lean_inc(x_103); +x_105 = l_Lean_Meta_getFunInfoNArgs(x_100, x_103, x_4, x_99); +if (lean_obj_tag(x_105) == 0) +{ +lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; +x_106 = lean_ctor_get(x_105, 0); +lean_inc(x_106); +x_107 = lean_ctor_get(x_105, 1); +lean_inc(x_107); +lean_dec(x_105); +x_108 = lean_ctor_get(x_106, 0); +lean_inc(x_108); +lean_dec(x_106); +x_109 = lean_unsigned_to_nat(1u); +x_110 = lean_nat_sub(x_103, x_109); +lean_dec(x_103); +x_111 = l___private_Init_Lean_Meta_DiscrTree_3__pushArgsAux___main(x_108, x_3, x_110, x_98, x_1, x_4, x_107); +lean_dec(x_108); +if (lean_obj_tag(x_111) == 0) +{ +lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; +x_112 = lean_ctor_get(x_111, 0); +lean_inc(x_112); +x_113 = lean_ctor_get(x_111, 1); +lean_inc(x_113); +if (lean_is_exclusive(x_111)) { + lean_ctor_release(x_111, 0); + lean_ctor_release(x_111, 1); + x_114 = x_111; +} else { + lean_dec_ref(x_111); + x_114 = lean_box(0); +} +x_115 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_115, 0, x_104); +lean_ctor_set(x_115, 1, x_112); +if (lean_is_scalar(x_114)) { + x_116 = lean_alloc_ctor(0, 2, 0); +} else { + x_116 = x_114; +} +lean_ctor_set(x_116, 0, x_115); +lean_ctor_set(x_116, 1, x_113); +return x_116; +} +else +{ +lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; +lean_dec(x_104); +x_117 = lean_ctor_get(x_111, 0); +lean_inc(x_117); +x_118 = lean_ctor_get(x_111, 1); +lean_inc(x_118); +if (lean_is_exclusive(x_111)) { + lean_ctor_release(x_111, 0); + lean_ctor_release(x_111, 1); + x_119 = x_111; +} else { + lean_dec_ref(x_111); + x_119 = lean_box(0); +} +if (lean_is_scalar(x_119)) { + x_120 = lean_alloc_ctor(1, 2, 0); +} else { + x_120 = x_119; +} +lean_ctor_set(x_120, 0, x_117); +lean_ctor_set(x_120, 1, x_118); +return x_120; +} +} +else +{ +lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; +lean_dec(x_104); +lean_dec(x_103); +lean_dec(x_98); +lean_dec(x_4); +lean_dec(x_1); +x_121 = lean_ctor_get(x_105, 0); +lean_inc(x_121); +x_122 = lean_ctor_get(x_105, 1); +lean_inc(x_122); +if (lean_is_exclusive(x_105)) { + lean_ctor_release(x_105, 0); + lean_ctor_release(x_105, 1); + x_123 = x_105; +} else { + lean_dec_ref(x_105); + x_123 = lean_box(0); +} +if (lean_is_scalar(x_123)) { + x_124 = lean_alloc_ctor(1, 2, 0); +} else { + x_124 = x_123; +} +lean_ctor_set(x_124, 0, x_121); +lean_ctor_set(x_124, 1, x_122); +return x_124; +} +} +case 2: +{ +lean_object* x_125; lean_object* x_126; uint8_t x_127; uint8_t x_128; uint8_t x_129; +lean_dec(x_98); +x_125 = lean_ctor_get(x_100, 0); +lean_inc(x_125); +lean_dec(x_100); +x_126 = l___private_Init_Lean_Meta_DiscrTree_1__tmpMVarId; +x_127 = lean_name_eq(x_125, x_126); +x_128 = 1; +x_129 = l_Bool_DecidableEq(x_127, x_128); +if (x_129 == 0) +{ +lean_object* x_130; +x_130 = l_Lean_Meta_isReadOnlyOrSyntheticExprMVar(x_125, x_4, x_99); +lean_dec(x_4); +if (lean_obj_tag(x_130) == 0) +{ +lean_object* x_131; uint8_t x_132; +x_131 = lean_ctor_get(x_130, 0); +lean_inc(x_131); +x_132 = lean_unbox(x_131); +lean_dec(x_131); +if (x_132 == 0) +{ +lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; +x_133 = lean_ctor_get(x_130, 1); +lean_inc(x_133); +if (lean_is_exclusive(x_130)) { + lean_ctor_release(x_130, 0); + lean_ctor_release(x_130, 1); + x_134 = x_130; +} else { + lean_dec_ref(x_130); + x_134 = lean_box(0); +} +x_135 = lean_box(3); +x_136 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_136, 0, x_135); +lean_ctor_set(x_136, 1, x_1); +if (lean_is_scalar(x_134)) { + x_137 = lean_alloc_ctor(0, 2, 0); +} else { + x_137 = x_134; +} +lean_ctor_set(x_137, 0, x_136); +lean_ctor_set(x_137, 1, x_133); +return x_137; +} +else +{ +lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; +x_138 = lean_ctor_get(x_130, 1); +lean_inc(x_138); +if (lean_is_exclusive(x_130)) { + lean_ctor_release(x_130, 0); + lean_ctor_release(x_130, 1); + x_139 = x_130; +} else { + lean_dec_ref(x_130); + x_139 = lean_box(0); +} +x_140 = lean_box(4); +x_141 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_141, 0, x_140); +lean_ctor_set(x_141, 1, x_1); +if (lean_is_scalar(x_139)) { + x_142 = lean_alloc_ctor(0, 2, 0); +} else { + x_142 = x_139; +} +lean_ctor_set(x_142, 0, x_141); +lean_ctor_set(x_142, 1, x_138); +return x_142; +} +} +else +{ +lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; +lean_dec(x_1); +x_143 = lean_ctor_get(x_130, 0); +lean_inc(x_143); +x_144 = lean_ctor_get(x_130, 1); +lean_inc(x_144); +if (lean_is_exclusive(x_130)) { + lean_ctor_release(x_130, 0); + lean_ctor_release(x_130, 1); + x_145 = x_130; +} else { + lean_dec_ref(x_130); + x_145 = lean_box(0); +} +if (lean_is_scalar(x_145)) { + x_146 = lean_alloc_ctor(1, 2, 0); +} else { + x_146 = x_145; +} +lean_ctor_set(x_146, 0, x_143); +lean_ctor_set(x_146, 1, x_144); +return x_146; +} +} +else +{ +lean_object* x_147; lean_object* x_148; lean_object* x_149; +lean_dec(x_125); +lean_dec(x_4); +x_147 = lean_box(3); +x_148 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_148, 0, x_147); +lean_ctor_set(x_148, 1, x_1); +x_149 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_149, 0, x_148); +lean_ctor_set(x_149, 1, x_99); +return x_149; +} +} +case 4: +{ +lean_object* x_150; lean_object* x_151; lean_object* x_152; lean_object* x_153; lean_object* x_154; +x_150 = lean_ctor_get(x_100, 0); +lean_inc(x_150); +x_151 = lean_unsigned_to_nat(0u); +x_152 = l_Lean_Expr_getAppNumArgsAux___main(x_98, x_151); +lean_inc(x_152); +x_153 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_153, 0, x_150); +lean_ctor_set(x_153, 1, x_152); +lean_inc(x_4); +lean_inc(x_152); +x_154 = l_Lean_Meta_getFunInfoNArgs(x_100, x_152, x_4, x_99); +if (lean_obj_tag(x_154) == 0) +{ +lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_object* x_160; +x_155 = lean_ctor_get(x_154, 0); +lean_inc(x_155); +x_156 = lean_ctor_get(x_154, 1); +lean_inc(x_156); +lean_dec(x_154); +x_157 = lean_ctor_get(x_155, 0); +lean_inc(x_157); +lean_dec(x_155); +x_158 = lean_unsigned_to_nat(1u); +x_159 = lean_nat_sub(x_152, x_158); +lean_dec(x_152); +x_160 = l___private_Init_Lean_Meta_DiscrTree_3__pushArgsAux___main(x_157, x_3, x_159, x_98, x_1, x_4, x_156); +lean_dec(x_157); +if (lean_obj_tag(x_160) == 0) +{ +lean_object* x_161; lean_object* x_162; lean_object* x_163; lean_object* x_164; lean_object* x_165; +x_161 = lean_ctor_get(x_160, 0); +lean_inc(x_161); +x_162 = lean_ctor_get(x_160, 1); +lean_inc(x_162); +if (lean_is_exclusive(x_160)) { + lean_ctor_release(x_160, 0); + lean_ctor_release(x_160, 1); + x_163 = x_160; +} else { + lean_dec_ref(x_160); + x_163 = lean_box(0); +} +x_164 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_164, 0, x_153); +lean_ctor_set(x_164, 1, x_161); +if (lean_is_scalar(x_163)) { + x_165 = lean_alloc_ctor(0, 2, 0); +} else { + x_165 = x_163; +} +lean_ctor_set(x_165, 0, x_164); +lean_ctor_set(x_165, 1, x_162); +return x_165; +} +else +{ +lean_object* x_166; lean_object* x_167; lean_object* x_168; lean_object* x_169; +lean_dec(x_153); +x_166 = lean_ctor_get(x_160, 0); +lean_inc(x_166); +x_167 = lean_ctor_get(x_160, 1); +lean_inc(x_167); +if (lean_is_exclusive(x_160)) { + lean_ctor_release(x_160, 0); + lean_ctor_release(x_160, 1); + x_168 = x_160; +} else { + lean_dec_ref(x_160); + x_168 = lean_box(0); +} +if (lean_is_scalar(x_168)) { + x_169 = lean_alloc_ctor(1, 2, 0); +} else { + x_169 = x_168; +} +lean_ctor_set(x_169, 0, x_166); +lean_ctor_set(x_169, 1, x_167); +return x_169; +} +} +else +{ +lean_object* x_170; lean_object* x_171; lean_object* x_172; lean_object* x_173; +lean_dec(x_153); +lean_dec(x_152); +lean_dec(x_98); +lean_dec(x_4); +lean_dec(x_1); +x_170 = lean_ctor_get(x_154, 0); +lean_inc(x_170); +x_171 = lean_ctor_get(x_154, 1); +lean_inc(x_171); +if (lean_is_exclusive(x_154)) { + lean_ctor_release(x_154, 0); + lean_ctor_release(x_154, 1); + x_172 = x_154; +} else { + lean_dec_ref(x_154); + x_172 = lean_box(0); +} +if (lean_is_scalar(x_172)) { + x_173 = lean_alloc_ctor(1, 2, 0); +} else { + x_173 = x_172; +} +lean_ctor_set(x_173, 0, x_170); +lean_ctor_set(x_173, 1, x_171); +return x_173; +} +} +case 9: +{ +lean_object* x_174; lean_object* x_175; lean_object* x_176; lean_object* x_177; +lean_dec(x_98); +lean_dec(x_4); +x_174 = lean_ctor_get(x_100, 0); +lean_inc(x_174); +lean_dec(x_100); +x_175 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_175, 0, x_174); +x_176 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_176, 0, x_175); +lean_ctor_set(x_176, 1, x_1); +x_177 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_177, 0, x_176); +lean_ctor_set(x_177, 1, x_99); +return x_177; +} +default: +{ +lean_object* x_178; lean_object* x_179; lean_object* x_180; +lean_dec(x_100); +lean_dec(x_98); +lean_dec(x_4); +x_178 = lean_box(4); x_179 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_179, 0, x_178); -lean_ctor_set(x_179, 1, x_98); -return x_179; +lean_ctor_set(x_179, 1, x_1); +x_180 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_180, 0, x_179); +lean_ctor_set(x_180, 1, x_99); +return x_180; } } } } else { -uint8_t x_180; -lean_dec(x_3); +uint8_t x_181; +lean_dec(x_4); lean_dec(x_1); -x_180 = !lean_is_exclusive(x_5); -if (x_180 == 0) +x_181 = !lean_is_exclusive(x_6); +if (x_181 == 0) { -return x_5; +return x_6; } else { -lean_object* x_181; lean_object* x_182; lean_object* x_183; -x_181 = lean_ctor_get(x_5, 0); -x_182 = lean_ctor_get(x_5, 1); +lean_object* x_182; lean_object* x_183; lean_object* x_184; +x_182 = lean_ctor_get(x_6, 0); +x_183 = lean_ctor_get(x_6, 1); +lean_inc(x_183); lean_inc(x_182); -lean_inc(x_181); -lean_dec(x_5); -x_183 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_183, 0, x_181); -lean_ctor_set(x_183, 1, x_182); -return x_183; +lean_dec(x_6); +x_184 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_184, 0, x_182); +lean_ctor_set(x_184, 1, x_183); +return x_184; } } } } +lean_object* l___private_Init_Lean_Meta_DiscrTree_4__pushArgs___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +uint8_t x_6; lean_object* x_7; +x_6 = lean_unbox(x_3); +lean_dec(x_3); +x_7 = l___private_Init_Lean_Meta_DiscrTree_4__pushArgs(x_1, x_2, x_6, x_4, x_5); +return x_7; +} +} lean_object* l_Array_back___at_Lean_Meta_DiscrTree_mkPathAux___main___spec__1(lean_object* x_1) { _start: { @@ -2148,73 +2268,73 @@ lean_dec(x_4); return x_6; } } -lean_object* l_Lean_Meta_DiscrTree_mkPathAux___main(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +lean_object* l_Lean_Meta_DiscrTree_mkPathAux___main(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { -uint8_t x_5; uint8_t x_6; uint8_t x_7; -x_5 = l_Array_isEmpty___rarg(x_1); -x_6 = 1; -x_7 = l_Bool_DecidableEq(x_5, x_6); -if (x_7 == 0) +uint8_t x_6; uint8_t x_7; uint8_t x_8; +x_6 = l_Array_isEmpty___rarg(x_2); +x_7 = 1; +x_8 = l_Bool_DecidableEq(x_6, x_7); +if (x_8 == 0) { -lean_object* x_8; lean_object* x_9; lean_object* x_10; -x_8 = l_Array_back___at_Lean_Meta_DiscrTree_mkPathAux___main___spec__1(x_1); -x_9 = lean_array_pop(x_1); -lean_inc(x_3); -x_10 = l___private_Init_Lean_Meta_DiscrTree_4__pushArgs(x_9, x_8, x_3, x_4); -if (lean_obj_tag(x_10) == 0) +lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_9 = l_Array_back___at_Lean_Meta_DiscrTree_mkPathAux___main___spec__1(x_2); +x_10 = lean_array_pop(x_2); +lean_inc(x_4); +x_11 = l___private_Init_Lean_Meta_DiscrTree_4__pushArgs(x_10, x_9, x_1, x_4, x_5); +if (lean_obj_tag(x_11) == 0) { -lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; -x_11 = lean_ctor_get(x_10, 0); -lean_inc(x_11); -x_12 = lean_ctor_get(x_10, 1); +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_12 = lean_ctor_get(x_11, 0); lean_inc(x_12); -lean_dec(x_10); -x_13 = lean_ctor_get(x_11, 0); +x_13 = lean_ctor_get(x_11, 1); lean_inc(x_13); -x_14 = lean_ctor_get(x_11, 1); -lean_inc(x_14); lean_dec(x_11); -x_15 = lean_array_push(x_2, x_13); -x_1 = x_14; +x_14 = lean_ctor_get(x_12, 0); +lean_inc(x_14); +x_15 = lean_ctor_get(x_12, 1); +lean_inc(x_15); +lean_dec(x_12); +x_16 = lean_array_push(x_3, x_14); x_2 = x_15; -x_4 = x_12; +x_3 = x_16; +x_5 = x_13; goto _start; } else { -uint8_t x_17; +uint8_t x_18; +lean_dec(x_4); lean_dec(x_3); -lean_dec(x_2); -x_17 = !lean_is_exclusive(x_10); -if (x_17 == 0) +x_18 = !lean_is_exclusive(x_11); +if (x_18 == 0) { -return x_10; +return x_11; } else { -lean_object* x_18; lean_object* x_19; lean_object* x_20; -x_18 = lean_ctor_get(x_10, 0); -x_19 = lean_ctor_get(x_10, 1); +lean_object* x_19; lean_object* x_20; lean_object* x_21; +x_19 = lean_ctor_get(x_11, 0); +x_20 = lean_ctor_get(x_11, 1); +lean_inc(x_20); lean_inc(x_19); -lean_inc(x_18); -lean_dec(x_10); -x_20 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_20, 0, x_18); -lean_ctor_set(x_20, 1, x_19); -return x_20; +lean_dec(x_11); +x_21 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_21, 0, x_19); +lean_ctor_set(x_21, 1, x_20); +return x_21; } } } else { -lean_object* x_21; -lean_dec(x_3); -lean_dec(x_1); -x_21 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_21, 0, x_2); -lean_ctor_set(x_21, 1, x_4); -return x_21; +lean_object* x_22; +lean_dec(x_4); +lean_dec(x_2); +x_22 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_22, 0, x_3); +lean_ctor_set(x_22, 1, x_5); +return x_22; } } } @@ -2227,12 +2347,32 @@ lean_dec(x_1); return x_2; } } -lean_object* l_Lean_Meta_DiscrTree_mkPathAux(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +lean_object* l_Lean_Meta_DiscrTree_mkPathAux___main___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_5; -x_5 = l_Lean_Meta_DiscrTree_mkPathAux___main(x_1, x_2, x_3, x_4); -return x_5; +uint8_t x_6; lean_object* x_7; +x_6 = lean_unbox(x_1); +lean_dec(x_1); +x_7 = l_Lean_Meta_DiscrTree_mkPathAux___main(x_6, x_2, x_3, x_4, x_5); +return x_7; +} +} +lean_object* l_Lean_Meta_DiscrTree_mkPathAux(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; +x_6 = l_Lean_Meta_DiscrTree_mkPathAux___main(x_1, x_2, x_3, x_4, x_5); +return x_6; +} +} +lean_object* l_Lean_Meta_DiscrTree_mkPathAux___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +uint8_t x_6; lean_object* x_7; +x_6 = lean_unbox(x_1); +lean_dec(x_1); +x_7 = l_Lean_Meta_DiscrTree_mkPathAux(x_6, x_2, x_3, x_4, x_5); +return x_7; } } lean_object* _init_l___private_Init_Lean_Meta_DiscrTree_5__initCapacity() { @@ -2252,95 +2392,105 @@ x_2 = lean_mk_empty_array_with_capacity(x_1); return x_2; } } -lean_object* l_Lean_Meta_DiscrTree_mkPath(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Meta_DiscrTree_mkPath(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4) { _start: { -lean_object* x_4; lean_object* x_5; uint8_t x_6; -x_4 = l_Lean_Meta_DiscrTree_mkPath___closed__1; -x_5 = lean_array_push(x_4, x_1); -x_6 = !lean_is_exclusive(x_2); -if (x_6 == 0) +lean_object* x_5; lean_object* x_6; uint8_t x_7; +x_5 = l_Lean_Meta_DiscrTree_mkPath___closed__1; +x_6 = lean_array_push(x_5, x_1); +x_7 = !lean_is_exclusive(x_3); +if (x_7 == 0) { -lean_object* x_7; uint8_t x_8; -x_7 = lean_ctor_get(x_2, 0); -x_8 = !lean_is_exclusive(x_7); -if (x_8 == 0) +lean_object* x_8; uint8_t x_9; +x_8 = lean_ctor_get(x_3, 0); +x_9 = !lean_is_exclusive(x_8); +if (x_9 == 0) { -uint8_t x_9; lean_object* x_10; -x_9 = 2; -lean_ctor_set_uint8(x_7, sizeof(void*)*1 + 5, x_9); -x_10 = l_Lean_Meta_DiscrTree_mkPathAux___main(x_5, x_4, x_2, x_3); -return x_10; +uint8_t x_10; lean_object* x_11; +x_10 = 2; +lean_ctor_set_uint8(x_8, sizeof(void*)*1 + 5, x_10); +x_11 = l_Lean_Meta_DiscrTree_mkPathAux___main(x_2, x_6, x_5, x_3, x_4); +return x_11; } else { -lean_object* x_11; uint8_t x_12; uint8_t x_13; uint8_t x_14; uint8_t x_15; uint8_t x_16; uint8_t x_17; lean_object* x_18; lean_object* x_19; -x_11 = lean_ctor_get(x_7, 0); -x_12 = lean_ctor_get_uint8(x_7, sizeof(void*)*1); -x_13 = lean_ctor_get_uint8(x_7, sizeof(void*)*1 + 1); -x_14 = lean_ctor_get_uint8(x_7, sizeof(void*)*1 + 2); -x_15 = lean_ctor_get_uint8(x_7, sizeof(void*)*1 + 3); -x_16 = lean_ctor_get_uint8(x_7, sizeof(void*)*1 + 4); -lean_inc(x_11); -lean_dec(x_7); -x_17 = 2; -x_18 = lean_alloc_ctor(0, 1, 6); -lean_ctor_set(x_18, 0, x_11); -lean_ctor_set_uint8(x_18, sizeof(void*)*1, x_12); -lean_ctor_set_uint8(x_18, sizeof(void*)*1 + 1, x_13); -lean_ctor_set_uint8(x_18, sizeof(void*)*1 + 2, x_14); -lean_ctor_set_uint8(x_18, sizeof(void*)*1 + 3, x_15); -lean_ctor_set_uint8(x_18, sizeof(void*)*1 + 4, x_16); -lean_ctor_set_uint8(x_18, sizeof(void*)*1 + 5, x_17); -lean_ctor_set(x_2, 0, x_18); -x_19 = l_Lean_Meta_DiscrTree_mkPathAux___main(x_5, x_4, x_2, x_3); -return x_19; +lean_object* x_12; uint8_t x_13; uint8_t x_14; uint8_t x_15; uint8_t x_16; uint8_t x_17; uint8_t x_18; lean_object* x_19; lean_object* x_20; +x_12 = lean_ctor_get(x_8, 0); +x_13 = lean_ctor_get_uint8(x_8, sizeof(void*)*1); +x_14 = lean_ctor_get_uint8(x_8, sizeof(void*)*1 + 1); +x_15 = lean_ctor_get_uint8(x_8, sizeof(void*)*1 + 2); +x_16 = lean_ctor_get_uint8(x_8, sizeof(void*)*1 + 3); +x_17 = lean_ctor_get_uint8(x_8, sizeof(void*)*1 + 4); +lean_inc(x_12); +lean_dec(x_8); +x_18 = 2; +x_19 = lean_alloc_ctor(0, 1, 6); +lean_ctor_set(x_19, 0, x_12); +lean_ctor_set_uint8(x_19, sizeof(void*)*1, x_13); +lean_ctor_set_uint8(x_19, sizeof(void*)*1 + 1, x_14); +lean_ctor_set_uint8(x_19, sizeof(void*)*1 + 2, x_15); +lean_ctor_set_uint8(x_19, sizeof(void*)*1 + 3, x_16); +lean_ctor_set_uint8(x_19, sizeof(void*)*1 + 4, x_17); +lean_ctor_set_uint8(x_19, sizeof(void*)*1 + 5, x_18); +lean_ctor_set(x_3, 0, x_19); +x_20 = l_Lean_Meta_DiscrTree_mkPathAux___main(x_2, x_6, x_5, x_3, x_4); +return x_20; } } else { -lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; uint8_t x_24; uint8_t x_25; uint8_t x_26; uint8_t x_27; uint8_t x_28; lean_object* x_29; uint8_t x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; -x_20 = lean_ctor_get(x_2, 0); -x_21 = lean_ctor_get(x_2, 1); -x_22 = lean_ctor_get(x_2, 2); +lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; uint8_t x_25; uint8_t x_26; uint8_t x_27; uint8_t x_28; uint8_t x_29; lean_object* x_30; uint8_t x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; +x_21 = lean_ctor_get(x_3, 0); +x_22 = lean_ctor_get(x_3, 1); +x_23 = lean_ctor_get(x_3, 2); +lean_inc(x_23); lean_inc(x_22); lean_inc(x_21); -lean_inc(x_20); +lean_dec(x_3); +x_24 = lean_ctor_get(x_21, 0); +lean_inc(x_24); +x_25 = lean_ctor_get_uint8(x_21, sizeof(void*)*1); +x_26 = lean_ctor_get_uint8(x_21, sizeof(void*)*1 + 1); +x_27 = lean_ctor_get_uint8(x_21, sizeof(void*)*1 + 2); +x_28 = lean_ctor_get_uint8(x_21, sizeof(void*)*1 + 3); +x_29 = lean_ctor_get_uint8(x_21, sizeof(void*)*1 + 4); +if (lean_is_exclusive(x_21)) { + lean_ctor_release(x_21, 0); + x_30 = x_21; +} else { + lean_dec_ref(x_21); + x_30 = lean_box(0); +} +x_31 = 2; +if (lean_is_scalar(x_30)) { + x_32 = lean_alloc_ctor(0, 1, 6); +} else { + x_32 = x_30; +} +lean_ctor_set(x_32, 0, x_24); +lean_ctor_set_uint8(x_32, sizeof(void*)*1, x_25); +lean_ctor_set_uint8(x_32, sizeof(void*)*1 + 1, x_26); +lean_ctor_set_uint8(x_32, sizeof(void*)*1 + 2, x_27); +lean_ctor_set_uint8(x_32, sizeof(void*)*1 + 3, x_28); +lean_ctor_set_uint8(x_32, sizeof(void*)*1 + 4, x_29); +lean_ctor_set_uint8(x_32, sizeof(void*)*1 + 5, x_31); +x_33 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_33, 0, x_32); +lean_ctor_set(x_33, 1, x_22); +lean_ctor_set(x_33, 2, x_23); +x_34 = l_Lean_Meta_DiscrTree_mkPathAux___main(x_2, x_6, x_5, x_33, x_4); +return x_34; +} +} +} +lean_object* l_Lean_Meta_DiscrTree_mkPath___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +uint8_t x_5; lean_object* x_6; +x_5 = lean_unbox(x_2); lean_dec(x_2); -x_23 = lean_ctor_get(x_20, 0); -lean_inc(x_23); -x_24 = lean_ctor_get_uint8(x_20, sizeof(void*)*1); -x_25 = lean_ctor_get_uint8(x_20, sizeof(void*)*1 + 1); -x_26 = lean_ctor_get_uint8(x_20, sizeof(void*)*1 + 2); -x_27 = lean_ctor_get_uint8(x_20, sizeof(void*)*1 + 3); -x_28 = lean_ctor_get_uint8(x_20, sizeof(void*)*1 + 4); -if (lean_is_exclusive(x_20)) { - lean_ctor_release(x_20, 0); - x_29 = x_20; -} else { - lean_dec_ref(x_20); - x_29 = lean_box(0); -} -x_30 = 2; -if (lean_is_scalar(x_29)) { - x_31 = lean_alloc_ctor(0, 1, 6); -} else { - x_31 = x_29; -} -lean_ctor_set(x_31, 0, x_23); -lean_ctor_set_uint8(x_31, sizeof(void*)*1, x_24); -lean_ctor_set_uint8(x_31, sizeof(void*)*1 + 1, x_25); -lean_ctor_set_uint8(x_31, sizeof(void*)*1 + 2, x_26); -lean_ctor_set_uint8(x_31, sizeof(void*)*1 + 3, x_27); -lean_ctor_set_uint8(x_31, sizeof(void*)*1 + 4, x_28); -lean_ctor_set_uint8(x_31, sizeof(void*)*1 + 5, x_30); -x_32 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_32, 0, x_31); -lean_ctor_set(x_32, 1, x_21); -lean_ctor_set(x_32, 2, x_22); -x_33 = l_Lean_Meta_DiscrTree_mkPathAux___main(x_5, x_4, x_32, x_3); -return x_33; -} +x_6 = l_Lean_Meta_DiscrTree_mkPath(x_1, x_5, x_3, x_4); +return x_6; } } lean_object* l___private_Init_Lean_Meta_DiscrTree_6__createNodes___main___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { @@ -4449,63 +4599,63 @@ lean_dec(x_3); return x_5; } } -lean_object* l_Lean_Meta_DiscrTree_insert___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* l_Lean_Meta_DiscrTree_insert___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, uint8_t x_5, lean_object* x_6, lean_object* x_7) { _start: { -lean_object* x_7; -x_7 = l_Lean_Meta_DiscrTree_mkPath(x_3, x_5, x_6); -if (lean_obj_tag(x_7) == 0) +lean_object* x_8; +x_8 = l_Lean_Meta_DiscrTree_mkPath(x_3, x_5, x_6, x_7); +if (lean_obj_tag(x_8) == 0) { -uint8_t x_8; -x_8 = !lean_is_exclusive(x_7); -if (x_8 == 0) +uint8_t x_9; +x_9 = !lean_is_exclusive(x_8); +if (x_9 == 0) { -lean_object* x_9; lean_object* x_10; -x_9 = lean_ctor_get(x_7, 0); -x_10 = l_Lean_Meta_DiscrTree_insertCore___rarg(x_1, x_2, x_9, x_4); -lean_dec(x_9); -lean_ctor_set(x_7, 0, x_10); -return x_7; +lean_object* x_10; lean_object* x_11; +x_10 = lean_ctor_get(x_8, 0); +x_11 = l_Lean_Meta_DiscrTree_insertCore___rarg(x_1, x_2, x_10, x_4); +lean_dec(x_10); +lean_ctor_set(x_8, 0, x_11); +return x_8; } else { -lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; -x_11 = lean_ctor_get(x_7, 0); -x_12 = lean_ctor_get(x_7, 1); +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; +x_12 = lean_ctor_get(x_8, 0); +x_13 = lean_ctor_get(x_8, 1); +lean_inc(x_13); lean_inc(x_12); -lean_inc(x_11); -lean_dec(x_7); -x_13 = l_Lean_Meta_DiscrTree_insertCore___rarg(x_1, x_2, x_11, x_4); -lean_dec(x_11); -x_14 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_14, 0, x_13); -lean_ctor_set(x_14, 1, x_12); -return x_14; +lean_dec(x_8); +x_14 = l_Lean_Meta_DiscrTree_insertCore___rarg(x_1, x_2, x_12, x_4); +lean_dec(x_12); +x_15 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_15, 0, x_14); +lean_ctor_set(x_15, 1, x_13); +return x_15; } } else { -uint8_t x_15; +uint8_t x_16; lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); -x_15 = !lean_is_exclusive(x_7); -if (x_15 == 0) +x_16 = !lean_is_exclusive(x_8); +if (x_16 == 0) { -return x_7; +return x_8; } else { -lean_object* x_16; lean_object* x_17; lean_object* x_18; -x_16 = lean_ctor_get(x_7, 0); -x_17 = lean_ctor_get(x_7, 1); +lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_17 = lean_ctor_get(x_8, 0); +x_18 = lean_ctor_get(x_8, 1); +lean_inc(x_18); lean_inc(x_17); -lean_inc(x_16); -lean_dec(x_7); -x_18 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_18, 0, x_16); -lean_ctor_set(x_18, 1, x_17); -return x_18; +lean_dec(x_8); +x_19 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_19, 0, x_17); +lean_ctor_set(x_19, 1, x_18); +return x_19; } } } @@ -4514,10 +4664,20 @@ lean_object* l_Lean_Meta_DiscrTree_insert(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_Meta_DiscrTree_insert___rarg), 6, 0); +x_2 = lean_alloc_closure((void*)(l_Lean_Meta_DiscrTree_insert___rarg___boxed), 7, 0); return x_2; } } +lean_object* l_Lean_Meta_DiscrTree_insert___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: +{ +uint8_t x_8; lean_object* x_9; +x_8 = lean_unbox(x_5); +lean_dec(x_5); +x_9 = l_Lean_Meta_DiscrTree_insert___rarg(x_1, x_2, x_3, x_4, x_8, x_6, x_7); +return x_9; +} +} lean_object* l_Lean_fmt___at_Lean_Meta_DiscrTree_Trie_format___main___spec__1(lean_object* x_1) { _start: { diff --git a/stage0/stdlib/Init/Lean/Meta/Instances.c b/stage0/stdlib/Init/Lean/Meta/Instances.c index 46d9f9d320..94ec89966d 100644 --- a/stage0/stdlib/Init/Lean/Meta/Instances.c +++ b/stage0/stdlib/Init/Lean/Meta/Instances.c @@ -18,6 +18,7 @@ lean_object* l_Lean_Meta_mkInstanceExtension___lambda__1___boxed(lean_object*); lean_object* l_Lean_Meta_instanceExtension___elambda__4___boxed(lean_object*); lean_object* l_Lean_Meta_DiscrTree_insertCore___at_Lean_Meta_addInstanceEntry___spec__1(lean_object*, lean_object*, lean_object*); size_t l_USize_add(size_t, size_t); +lean_object* l_Lean_Meta_mkInstanceExtension___lambda__1___closed__1; lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_Meta_mkInstanceExtension___spec__5(lean_object*, lean_object*); extern lean_object* l___private_Init_Lean_Environment_8__persistentEnvExtensionsRef; lean_object* l_Lean_registerEnvExtensionUnsafe___at_Lean_Meta_mkInstanceExtension___spec__7___closed__1; @@ -107,7 +108,7 @@ lean_object* l_Lean_PersistentEnvExtension_addEntry___rarg(lean_object*, lean_ob size_t l_USize_land(size_t, size_t); lean_object* l_Lean_Meta_addGlobalInstance___closed__2; lean_object* l_Lean_SimplePersistentEnvExtension_getState___rarg(lean_object*, lean_object*); -lean_object* l_Lean_Meta_DiscrTree_mkPath(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_DiscrTree_mkPath(lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_Meta_forallMetaTelescopeReducing(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__3; lean_object* l_Lean_Meta_getInstances(lean_object*); @@ -180,6 +181,7 @@ lean_object* l_Lean_Meta_addGlobalInstance___closed__3; size_t l_Lean_Meta_DiscrTree_Key_hash(lean_object*); lean_object* l_PersistentHashMap_mkCollisionNode___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_anyRangeMAux___main___at_Lean_Meta_addInstanceEntry___spec__12___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_DiscrTree_empty(lean_object*); lean_object* l_Lean_Meta_instanceExtension___elambda__2___boxed(lean_object*); extern lean_object* l_Lean_NameGenerator_Inhabited___closed__3; lean_object* l_Lean_Meta_instanceExtension___closed__6; @@ -2555,12 +2557,20 @@ x_9 = l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_Meta_mkInstanceExten return x_9; } } +lean_object* _init_l_Lean_Meta_mkInstanceExtension___lambda__1___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = l_Lean_Meta_DiscrTree_empty(lean_box(0)); +return x_1; +} +} lean_object* l_Lean_Meta_mkInstanceExtension___lambda__1(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; x_2 = lean_unsigned_to_nat(0u); -x_3 = l_Lean_Meta_DiscrTree_empty___closed__1; +x_3 = l_Lean_Meta_mkInstanceExtension___lambda__1___closed__1; x_4 = l_Array_iterateMAux___main___at_Lean_Meta_mkInstanceExtension___spec__3(x_1, x_1, x_2, x_3); return x_4; } @@ -2850,7 +2860,7 @@ x_12 = l_Lean_Meta_forallMetaTelescopeReducing(x_5, x_7, x_2, x_6); lean_dec(x_5); if (lean_obj_tag(x_12) == 0) { -lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; +lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; uint8_t x_17; lean_object* x_18; x_13 = lean_ctor_get(x_12, 0); lean_inc(x_13); x_14 = lean_ctor_get(x_13, 1); @@ -2862,508 +2872,510 @@ lean_dec(x_12); x_16 = lean_ctor_get(x_14, 1); lean_inc(x_16); lean_dec(x_14); -x_17 = l_Lean_Meta_DiscrTree_mkPath(x_16, x_2, x_15); -if (lean_obj_tag(x_17) == 0) +x_17 = 0; +x_18 = l_Lean_Meta_DiscrTree_mkPath(x_16, x_17, x_2, x_15); +if (lean_obj_tag(x_18) == 0) { -uint8_t x_18; -x_18 = !lean_is_exclusive(x_17); -if (x_18 == 0) +uint8_t x_19; +x_19 = !lean_is_exclusive(x_18); +if (x_19 == 0) { -lean_object* x_19; uint8_t x_20; -x_19 = lean_ctor_get(x_17, 1); -x_20 = !lean_is_exclusive(x_19); -if (x_20 == 0) +lean_object* x_20; uint8_t x_21; +x_20 = lean_ctor_get(x_18, 1); +x_21 = !lean_is_exclusive(x_20); +if (x_21 == 0) { -lean_object* x_21; lean_object* x_22; -x_21 = lean_ctor_get(x_19, 2); -lean_dec(x_21); -x_22 = lean_ctor_get(x_19, 1); +lean_object* x_22; lean_object* x_23; +x_22 = lean_ctor_get(x_20, 2); lean_dec(x_22); -lean_ctor_set(x_19, 2, x_10); -lean_ctor_set(x_19, 1, x_9); -return x_17; +x_23 = lean_ctor_get(x_20, 1); +lean_dec(x_23); +lean_ctor_set(x_20, 2, x_10); +lean_ctor_set(x_20, 1, x_9); +return x_18; } else { -lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; -x_23 = lean_ctor_get(x_19, 0); -x_24 = lean_ctor_get(x_19, 3); -x_25 = lean_ctor_get(x_19, 4); -x_26 = lean_ctor_get(x_19, 5); +lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; +x_24 = lean_ctor_get(x_20, 0); +x_25 = lean_ctor_get(x_20, 3); +x_26 = lean_ctor_get(x_20, 4); +x_27 = lean_ctor_get(x_20, 5); +lean_inc(x_27); lean_inc(x_26); lean_inc(x_25); lean_inc(x_24); -lean_inc(x_23); -lean_dec(x_19); -x_27 = lean_alloc_ctor(0, 6, 0); -lean_ctor_set(x_27, 0, x_23); -lean_ctor_set(x_27, 1, x_9); -lean_ctor_set(x_27, 2, x_10); -lean_ctor_set(x_27, 3, x_24); -lean_ctor_set(x_27, 4, x_25); -lean_ctor_set(x_27, 5, x_26); -lean_ctor_set(x_17, 1, x_27); -return x_17; +lean_dec(x_20); +x_28 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_28, 0, x_24); +lean_ctor_set(x_28, 1, x_9); +lean_ctor_set(x_28, 2, x_10); +lean_ctor_set(x_28, 3, x_25); +lean_ctor_set(x_28, 4, x_26); +lean_ctor_set(x_28, 5, x_27); +lean_ctor_set(x_18, 1, x_28); +return x_18; } } else { -lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; -x_28 = lean_ctor_get(x_17, 1); -x_29 = lean_ctor_get(x_17, 0); -lean_inc(x_28); +lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_29 = lean_ctor_get(x_18, 1); +x_30 = lean_ctor_get(x_18, 0); lean_inc(x_29); -lean_dec(x_17); -x_30 = lean_ctor_get(x_28, 0); lean_inc(x_30); -x_31 = lean_ctor_get(x_28, 3); +lean_dec(x_18); +x_31 = lean_ctor_get(x_29, 0); lean_inc(x_31); -x_32 = lean_ctor_get(x_28, 4); +x_32 = lean_ctor_get(x_29, 3); lean_inc(x_32); -x_33 = lean_ctor_get(x_28, 5); +x_33 = lean_ctor_get(x_29, 4); lean_inc(x_33); -if (lean_is_exclusive(x_28)) { - lean_ctor_release(x_28, 0); - lean_ctor_release(x_28, 1); - lean_ctor_release(x_28, 2); - lean_ctor_release(x_28, 3); - lean_ctor_release(x_28, 4); - lean_ctor_release(x_28, 5); - x_34 = x_28; +x_34 = lean_ctor_get(x_29, 5); +lean_inc(x_34); +if (lean_is_exclusive(x_29)) { + lean_ctor_release(x_29, 0); + lean_ctor_release(x_29, 1); + lean_ctor_release(x_29, 2); + lean_ctor_release(x_29, 3); + lean_ctor_release(x_29, 4); + lean_ctor_release(x_29, 5); + x_35 = x_29; } else { - lean_dec_ref(x_28); - x_34 = lean_box(0); + lean_dec_ref(x_29); + x_35 = lean_box(0); } -if (lean_is_scalar(x_34)) { - x_35 = lean_alloc_ctor(0, 6, 0); +if (lean_is_scalar(x_35)) { + x_36 = lean_alloc_ctor(0, 6, 0); } else { - x_35 = x_34; + x_36 = x_35; } -lean_ctor_set(x_35, 0, x_30); -lean_ctor_set(x_35, 1, x_9); -lean_ctor_set(x_35, 2, x_10); -lean_ctor_set(x_35, 3, x_31); -lean_ctor_set(x_35, 4, x_32); -lean_ctor_set(x_35, 5, x_33); -x_36 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_36, 0, x_29); -lean_ctor_set(x_36, 1, x_35); -return x_36; +lean_ctor_set(x_36, 0, x_31); +lean_ctor_set(x_36, 1, x_9); +lean_ctor_set(x_36, 2, x_10); +lean_ctor_set(x_36, 3, x_32); +lean_ctor_set(x_36, 4, x_33); +lean_ctor_set(x_36, 5, x_34); +x_37 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_37, 0, x_30); +lean_ctor_set(x_37, 1, x_36); +return x_37; } } else { -uint8_t x_37; -x_37 = !lean_is_exclusive(x_17); -if (x_37 == 0) +uint8_t x_38; +x_38 = !lean_is_exclusive(x_18); +if (x_38 == 0) { -lean_object* x_38; uint8_t x_39; -x_38 = lean_ctor_get(x_17, 1); -x_39 = !lean_is_exclusive(x_38); -if (x_39 == 0) +lean_object* x_39; uint8_t x_40; +x_39 = lean_ctor_get(x_18, 1); +x_40 = !lean_is_exclusive(x_39); +if (x_40 == 0) { -lean_object* x_40; lean_object* x_41; -x_40 = lean_ctor_get(x_38, 2); -lean_dec(x_40); -x_41 = lean_ctor_get(x_38, 1); +lean_object* x_41; lean_object* x_42; +x_41 = lean_ctor_get(x_39, 2); lean_dec(x_41); -lean_ctor_set(x_38, 2, x_10); -lean_ctor_set(x_38, 1, x_9); -return x_17; +x_42 = lean_ctor_get(x_39, 1); +lean_dec(x_42); +lean_ctor_set(x_39, 2, x_10); +lean_ctor_set(x_39, 1, x_9); +return x_18; } else { -lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; -x_42 = lean_ctor_get(x_38, 0); -x_43 = lean_ctor_get(x_38, 3); -x_44 = lean_ctor_get(x_38, 4); -x_45 = lean_ctor_get(x_38, 5); +lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; +x_43 = lean_ctor_get(x_39, 0); +x_44 = lean_ctor_get(x_39, 3); +x_45 = lean_ctor_get(x_39, 4); +x_46 = lean_ctor_get(x_39, 5); +lean_inc(x_46); lean_inc(x_45); lean_inc(x_44); lean_inc(x_43); -lean_inc(x_42); -lean_dec(x_38); -x_46 = lean_alloc_ctor(0, 6, 0); -lean_ctor_set(x_46, 0, x_42); -lean_ctor_set(x_46, 1, x_9); -lean_ctor_set(x_46, 2, x_10); -lean_ctor_set(x_46, 3, x_43); -lean_ctor_set(x_46, 4, x_44); -lean_ctor_set(x_46, 5, x_45); -lean_ctor_set(x_17, 1, x_46); -return x_17; +lean_dec(x_39); +x_47 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_47, 0, x_43); +lean_ctor_set(x_47, 1, x_9); +lean_ctor_set(x_47, 2, x_10); +lean_ctor_set(x_47, 3, x_44); +lean_ctor_set(x_47, 4, x_45); +lean_ctor_set(x_47, 5, x_46); +lean_ctor_set(x_18, 1, x_47); +return x_18; } } else { -lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; -x_47 = lean_ctor_get(x_17, 1); -x_48 = lean_ctor_get(x_17, 0); -lean_inc(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; +x_48 = lean_ctor_get(x_18, 1); +x_49 = lean_ctor_get(x_18, 0); lean_inc(x_48); -lean_dec(x_17); -x_49 = lean_ctor_get(x_47, 0); lean_inc(x_49); -x_50 = lean_ctor_get(x_47, 3); +lean_dec(x_18); +x_50 = lean_ctor_get(x_48, 0); lean_inc(x_50); -x_51 = lean_ctor_get(x_47, 4); +x_51 = lean_ctor_get(x_48, 3); lean_inc(x_51); -x_52 = lean_ctor_get(x_47, 5); +x_52 = lean_ctor_get(x_48, 4); lean_inc(x_52); -if (lean_is_exclusive(x_47)) { - lean_ctor_release(x_47, 0); - lean_ctor_release(x_47, 1); - lean_ctor_release(x_47, 2); - lean_ctor_release(x_47, 3); - lean_ctor_release(x_47, 4); - lean_ctor_release(x_47, 5); - x_53 = x_47; +x_53 = lean_ctor_get(x_48, 5); +lean_inc(x_53); +if (lean_is_exclusive(x_48)) { + lean_ctor_release(x_48, 0); + lean_ctor_release(x_48, 1); + lean_ctor_release(x_48, 2); + lean_ctor_release(x_48, 3); + lean_ctor_release(x_48, 4); + lean_ctor_release(x_48, 5); + x_54 = x_48; } else { - lean_dec_ref(x_47); - x_53 = lean_box(0); + lean_dec_ref(x_48); + x_54 = lean_box(0); } -if (lean_is_scalar(x_53)) { - x_54 = lean_alloc_ctor(0, 6, 0); +if (lean_is_scalar(x_54)) { + x_55 = lean_alloc_ctor(0, 6, 0); } else { - x_54 = x_53; + x_55 = x_54; } -lean_ctor_set(x_54, 0, x_49); -lean_ctor_set(x_54, 1, x_9); -lean_ctor_set(x_54, 2, x_10); -lean_ctor_set(x_54, 3, x_50); -lean_ctor_set(x_54, 4, x_51); -lean_ctor_set(x_54, 5, x_52); -x_55 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_55, 0, x_48); -lean_ctor_set(x_55, 1, x_54); -return x_55; +lean_ctor_set(x_55, 0, x_50); +lean_ctor_set(x_55, 1, x_9); +lean_ctor_set(x_55, 2, x_10); +lean_ctor_set(x_55, 3, x_51); +lean_ctor_set(x_55, 4, x_52); +lean_ctor_set(x_55, 5, x_53); +x_56 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_56, 0, x_49); +lean_ctor_set(x_56, 1, x_55); +return x_56; } } } else { -uint8_t x_56; +uint8_t x_57; lean_dec(x_2); -x_56 = !lean_is_exclusive(x_12); -if (x_56 == 0) +x_57 = !lean_is_exclusive(x_12); +if (x_57 == 0) { -lean_object* x_57; uint8_t x_58; -x_57 = lean_ctor_get(x_12, 1); -x_58 = !lean_is_exclusive(x_57); -if (x_58 == 0) +lean_object* x_58; uint8_t x_59; +x_58 = lean_ctor_get(x_12, 1); +x_59 = !lean_is_exclusive(x_58); +if (x_59 == 0) { -lean_object* x_59; lean_object* x_60; -x_59 = lean_ctor_get(x_57, 2); -lean_dec(x_59); -x_60 = lean_ctor_get(x_57, 1); +lean_object* x_60; lean_object* x_61; +x_60 = lean_ctor_get(x_58, 2); lean_dec(x_60); -lean_ctor_set(x_57, 2, x_10); -lean_ctor_set(x_57, 1, x_9); +x_61 = lean_ctor_get(x_58, 1); +lean_dec(x_61); +lean_ctor_set(x_58, 2, x_10); +lean_ctor_set(x_58, 1, x_9); return x_12; } else { -lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; -x_61 = lean_ctor_get(x_57, 0); -x_62 = lean_ctor_get(x_57, 3); -x_63 = lean_ctor_get(x_57, 4); -x_64 = lean_ctor_get(x_57, 5); +lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; +x_62 = lean_ctor_get(x_58, 0); +x_63 = lean_ctor_get(x_58, 3); +x_64 = lean_ctor_get(x_58, 4); +x_65 = lean_ctor_get(x_58, 5); +lean_inc(x_65); lean_inc(x_64); lean_inc(x_63); lean_inc(x_62); -lean_inc(x_61); -lean_dec(x_57); -x_65 = lean_alloc_ctor(0, 6, 0); -lean_ctor_set(x_65, 0, x_61); -lean_ctor_set(x_65, 1, x_9); -lean_ctor_set(x_65, 2, x_10); -lean_ctor_set(x_65, 3, x_62); -lean_ctor_set(x_65, 4, x_63); -lean_ctor_set(x_65, 5, x_64); -lean_ctor_set(x_12, 1, x_65); +lean_dec(x_58); +x_66 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_66, 0, x_62); +lean_ctor_set(x_66, 1, x_9); +lean_ctor_set(x_66, 2, x_10); +lean_ctor_set(x_66, 3, x_63); +lean_ctor_set(x_66, 4, x_64); +lean_ctor_set(x_66, 5, x_65); +lean_ctor_set(x_12, 1, x_66); return x_12; } } else { -lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; -x_66 = lean_ctor_get(x_12, 1); -x_67 = lean_ctor_get(x_12, 0); -lean_inc(x_66); +lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; +x_67 = lean_ctor_get(x_12, 1); +x_68 = lean_ctor_get(x_12, 0); lean_inc(x_67); -lean_dec(x_12); -x_68 = lean_ctor_get(x_66, 0); lean_inc(x_68); -x_69 = lean_ctor_get(x_66, 3); +lean_dec(x_12); +x_69 = lean_ctor_get(x_67, 0); lean_inc(x_69); -x_70 = lean_ctor_get(x_66, 4); +x_70 = lean_ctor_get(x_67, 3); lean_inc(x_70); -x_71 = lean_ctor_get(x_66, 5); +x_71 = lean_ctor_get(x_67, 4); lean_inc(x_71); -if (lean_is_exclusive(x_66)) { - lean_ctor_release(x_66, 0); - lean_ctor_release(x_66, 1); - lean_ctor_release(x_66, 2); - lean_ctor_release(x_66, 3); - lean_ctor_release(x_66, 4); - lean_ctor_release(x_66, 5); - x_72 = x_66; +x_72 = lean_ctor_get(x_67, 5); +lean_inc(x_72); +if (lean_is_exclusive(x_67)) { + lean_ctor_release(x_67, 0); + lean_ctor_release(x_67, 1); + lean_ctor_release(x_67, 2); + lean_ctor_release(x_67, 3); + lean_ctor_release(x_67, 4); + lean_ctor_release(x_67, 5); + x_73 = x_67; } else { - lean_dec_ref(x_66); - x_72 = lean_box(0); + lean_dec_ref(x_67); + x_73 = lean_box(0); } -if (lean_is_scalar(x_72)) { - x_73 = lean_alloc_ctor(0, 6, 0); +if (lean_is_scalar(x_73)) { + x_74 = lean_alloc_ctor(0, 6, 0); } else { - x_73 = x_72; + x_74 = x_73; } -lean_ctor_set(x_73, 0, x_68); -lean_ctor_set(x_73, 1, x_9); -lean_ctor_set(x_73, 2, x_10); -lean_ctor_set(x_73, 3, x_69); -lean_ctor_set(x_73, 4, x_70); -lean_ctor_set(x_73, 5, x_71); -x_74 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_74, 0, x_67); -lean_ctor_set(x_74, 1, x_73); -return x_74; +lean_ctor_set(x_74, 0, x_69); +lean_ctor_set(x_74, 1, x_9); +lean_ctor_set(x_74, 2, x_10); +lean_ctor_set(x_74, 3, x_70); +lean_ctor_set(x_74, 4, x_71); +lean_ctor_set(x_74, 5, x_72); +x_75 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_75, 0, x_68); +lean_ctor_set(x_75, 1, x_74); +return x_75; } } } else { -lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; -x_75 = lean_ctor_get(x_6, 0); -x_76 = lean_ctor_get(x_6, 1); -x_77 = lean_ctor_get(x_6, 2); -x_78 = lean_ctor_get(x_6, 3); -x_79 = lean_ctor_get(x_6, 4); -x_80 = lean_ctor_get(x_6, 5); +lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; +x_76 = lean_ctor_get(x_6, 0); +x_77 = lean_ctor_get(x_6, 1); +x_78 = lean_ctor_get(x_6, 2); +x_79 = lean_ctor_get(x_6, 3); +x_80 = lean_ctor_get(x_6, 4); +x_81 = lean_ctor_get(x_6, 5); +lean_inc(x_81); lean_inc(x_80); lean_inc(x_79); lean_inc(x_78); lean_inc(x_77); lean_inc(x_76); -lean_inc(x_75); lean_dec(x_6); -lean_inc(x_76); -x_81 = l_Lean_MetavarContext_incDepth(x_76); lean_inc(x_77); -x_82 = lean_alloc_ctor(0, 6, 0); -lean_ctor_set(x_82, 0, x_75); -lean_ctor_set(x_82, 1, x_81); -lean_ctor_set(x_82, 2, x_77); -lean_ctor_set(x_82, 3, x_78); -lean_ctor_set(x_82, 4, x_79); -lean_ctor_set(x_82, 5, x_80); +x_82 = l_Lean_MetavarContext_incDepth(x_77); +lean_inc(x_78); +x_83 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_83, 0, x_76); +lean_ctor_set(x_83, 1, x_82); +lean_ctor_set(x_83, 2, x_78); +lean_ctor_set(x_83, 3, x_79); +lean_ctor_set(x_83, 4, x_80); +lean_ctor_set(x_83, 5, x_81); lean_inc(x_2); -x_83 = l_Lean_Meta_forallMetaTelescopeReducing(x_5, x_7, x_2, x_82); +x_84 = l_Lean_Meta_forallMetaTelescopeReducing(x_5, x_7, x_2, x_83); lean_dec(x_5); -if (lean_obj_tag(x_83) == 0) +if (lean_obj_tag(x_84) == 0) { -lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; -x_84 = lean_ctor_get(x_83, 0); -lean_inc(x_84); -x_85 = lean_ctor_get(x_84, 1); +lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; uint8_t x_89; lean_object* x_90; +x_85 = lean_ctor_get(x_84, 0); lean_inc(x_85); -lean_dec(x_84); -x_86 = lean_ctor_get(x_83, 1); +x_86 = lean_ctor_get(x_85, 1); lean_inc(x_86); -lean_dec(x_83); -x_87 = lean_ctor_get(x_85, 1); -lean_inc(x_87); lean_dec(x_85); -x_88 = l_Lean_Meta_DiscrTree_mkPath(x_87, x_2, x_86); -if (lean_obj_tag(x_88) == 0) +x_87 = lean_ctor_get(x_84, 1); +lean_inc(x_87); +lean_dec(x_84); +x_88 = lean_ctor_get(x_86, 1); +lean_inc(x_88); +lean_dec(x_86); +x_89 = 0; +x_90 = l_Lean_Meta_DiscrTree_mkPath(x_88, x_89, x_2, x_87); +if (lean_obj_tag(x_90) == 0) { -lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; -x_89 = lean_ctor_get(x_88, 1); -lean_inc(x_89); -x_90 = lean_ctor_get(x_88, 0); -lean_inc(x_90); -if (lean_is_exclusive(x_88)) { - lean_ctor_release(x_88, 0); - lean_ctor_release(x_88, 1); - x_91 = x_88; -} else { - lean_dec_ref(x_88); - x_91 = lean_box(0); -} -x_92 = lean_ctor_get(x_89, 0); +lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; +x_91 = lean_ctor_get(x_90, 1); +lean_inc(x_91); +x_92 = lean_ctor_get(x_90, 0); lean_inc(x_92); -x_93 = lean_ctor_get(x_89, 3); -lean_inc(x_93); -x_94 = lean_ctor_get(x_89, 4); +if (lean_is_exclusive(x_90)) { + lean_ctor_release(x_90, 0); + lean_ctor_release(x_90, 1); + x_93 = x_90; +} else { + lean_dec_ref(x_90); + x_93 = lean_box(0); +} +x_94 = lean_ctor_get(x_91, 0); lean_inc(x_94); -x_95 = lean_ctor_get(x_89, 5); +x_95 = lean_ctor_get(x_91, 3); lean_inc(x_95); -if (lean_is_exclusive(x_89)) { - lean_ctor_release(x_89, 0); - lean_ctor_release(x_89, 1); - lean_ctor_release(x_89, 2); - lean_ctor_release(x_89, 3); - lean_ctor_release(x_89, 4); - lean_ctor_release(x_89, 5); - x_96 = x_89; -} else { - lean_dec_ref(x_89); - x_96 = lean_box(0); -} -if (lean_is_scalar(x_96)) { - x_97 = lean_alloc_ctor(0, 6, 0); -} else { - x_97 = x_96; -} -lean_ctor_set(x_97, 0, x_92); -lean_ctor_set(x_97, 1, x_76); -lean_ctor_set(x_97, 2, x_77); -lean_ctor_set(x_97, 3, x_93); -lean_ctor_set(x_97, 4, x_94); -lean_ctor_set(x_97, 5, x_95); -if (lean_is_scalar(x_91)) { - x_98 = lean_alloc_ctor(0, 2, 0); -} else { +x_96 = lean_ctor_get(x_91, 4); +lean_inc(x_96); +x_97 = lean_ctor_get(x_91, 5); +lean_inc(x_97); +if (lean_is_exclusive(x_91)) { + lean_ctor_release(x_91, 0); + lean_ctor_release(x_91, 1); + lean_ctor_release(x_91, 2); + lean_ctor_release(x_91, 3); + lean_ctor_release(x_91, 4); + lean_ctor_release(x_91, 5); x_98 = x_91; +} else { + lean_dec_ref(x_91); + x_98 = lean_box(0); } -lean_ctor_set(x_98, 0, x_90); -lean_ctor_set(x_98, 1, x_97); -return x_98; +if (lean_is_scalar(x_98)) { + x_99 = lean_alloc_ctor(0, 6, 0); +} else { + x_99 = x_98; +} +lean_ctor_set(x_99, 0, x_94); +lean_ctor_set(x_99, 1, x_77); +lean_ctor_set(x_99, 2, x_78); +lean_ctor_set(x_99, 3, x_95); +lean_ctor_set(x_99, 4, x_96); +lean_ctor_set(x_99, 5, x_97); +if (lean_is_scalar(x_93)) { + x_100 = lean_alloc_ctor(0, 2, 0); +} else { + x_100 = x_93; +} +lean_ctor_set(x_100, 0, x_92); +lean_ctor_set(x_100, 1, x_99); +return x_100; } else { -lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; -x_99 = lean_ctor_get(x_88, 1); -lean_inc(x_99); -x_100 = lean_ctor_get(x_88, 0); -lean_inc(x_100); -if (lean_is_exclusive(x_88)) { - lean_ctor_release(x_88, 0); - lean_ctor_release(x_88, 1); - x_101 = x_88; -} else { - lean_dec_ref(x_88); - x_101 = lean_box(0); -} -x_102 = lean_ctor_get(x_99, 0); +lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; +x_101 = lean_ctor_get(x_90, 1); +lean_inc(x_101); +x_102 = lean_ctor_get(x_90, 0); lean_inc(x_102); -x_103 = lean_ctor_get(x_99, 3); -lean_inc(x_103); -x_104 = lean_ctor_get(x_99, 4); +if (lean_is_exclusive(x_90)) { + lean_ctor_release(x_90, 0); + lean_ctor_release(x_90, 1); + x_103 = x_90; +} else { + lean_dec_ref(x_90); + x_103 = lean_box(0); +} +x_104 = lean_ctor_get(x_101, 0); lean_inc(x_104); -x_105 = lean_ctor_get(x_99, 5); +x_105 = lean_ctor_get(x_101, 3); lean_inc(x_105); -if (lean_is_exclusive(x_99)) { - lean_ctor_release(x_99, 0); - lean_ctor_release(x_99, 1); - lean_ctor_release(x_99, 2); - lean_ctor_release(x_99, 3); - lean_ctor_release(x_99, 4); - lean_ctor_release(x_99, 5); - x_106 = x_99; -} else { - lean_dec_ref(x_99); - x_106 = lean_box(0); -} -if (lean_is_scalar(x_106)) { - x_107 = lean_alloc_ctor(0, 6, 0); -} else { - x_107 = x_106; -} -lean_ctor_set(x_107, 0, x_102); -lean_ctor_set(x_107, 1, x_76); -lean_ctor_set(x_107, 2, x_77); -lean_ctor_set(x_107, 3, x_103); -lean_ctor_set(x_107, 4, x_104); -lean_ctor_set(x_107, 5, x_105); -if (lean_is_scalar(x_101)) { - x_108 = lean_alloc_ctor(1, 2, 0); -} else { +x_106 = lean_ctor_get(x_101, 4); +lean_inc(x_106); +x_107 = lean_ctor_get(x_101, 5); +lean_inc(x_107); +if (lean_is_exclusive(x_101)) { + lean_ctor_release(x_101, 0); + lean_ctor_release(x_101, 1); + lean_ctor_release(x_101, 2); + lean_ctor_release(x_101, 3); + lean_ctor_release(x_101, 4); + lean_ctor_release(x_101, 5); x_108 = x_101; +} else { + lean_dec_ref(x_101); + x_108 = lean_box(0); } -lean_ctor_set(x_108, 0, x_100); -lean_ctor_set(x_108, 1, x_107); -return x_108; +if (lean_is_scalar(x_108)) { + x_109 = lean_alloc_ctor(0, 6, 0); +} else { + x_109 = x_108; +} +lean_ctor_set(x_109, 0, x_104); +lean_ctor_set(x_109, 1, x_77); +lean_ctor_set(x_109, 2, x_78); +lean_ctor_set(x_109, 3, x_105); +lean_ctor_set(x_109, 4, x_106); +lean_ctor_set(x_109, 5, x_107); +if (lean_is_scalar(x_103)) { + x_110 = lean_alloc_ctor(1, 2, 0); +} else { + x_110 = x_103; +} +lean_ctor_set(x_110, 0, x_102); +lean_ctor_set(x_110, 1, x_109); +return x_110; } } else { -lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; +lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_dec(x_2); -x_109 = lean_ctor_get(x_83, 1); -lean_inc(x_109); -x_110 = lean_ctor_get(x_83, 0); -lean_inc(x_110); -if (lean_is_exclusive(x_83)) { - lean_ctor_release(x_83, 0); - lean_ctor_release(x_83, 1); - x_111 = x_83; -} else { - lean_dec_ref(x_83); - x_111 = lean_box(0); -} -x_112 = lean_ctor_get(x_109, 0); +x_111 = lean_ctor_get(x_84, 1); +lean_inc(x_111); +x_112 = lean_ctor_get(x_84, 0); lean_inc(x_112); -x_113 = lean_ctor_get(x_109, 3); -lean_inc(x_113); -x_114 = lean_ctor_get(x_109, 4); +if (lean_is_exclusive(x_84)) { + lean_ctor_release(x_84, 0); + lean_ctor_release(x_84, 1); + x_113 = x_84; +} else { + lean_dec_ref(x_84); + x_113 = lean_box(0); +} +x_114 = lean_ctor_get(x_111, 0); lean_inc(x_114); -x_115 = lean_ctor_get(x_109, 5); +x_115 = lean_ctor_get(x_111, 3); lean_inc(x_115); -if (lean_is_exclusive(x_109)) { - lean_ctor_release(x_109, 0); - lean_ctor_release(x_109, 1); - lean_ctor_release(x_109, 2); - lean_ctor_release(x_109, 3); - lean_ctor_release(x_109, 4); - lean_ctor_release(x_109, 5); - x_116 = x_109; -} else { - lean_dec_ref(x_109); - x_116 = lean_box(0); -} -if (lean_is_scalar(x_116)) { - x_117 = lean_alloc_ctor(0, 6, 0); -} else { - x_117 = x_116; -} -lean_ctor_set(x_117, 0, x_112); -lean_ctor_set(x_117, 1, x_76); -lean_ctor_set(x_117, 2, x_77); -lean_ctor_set(x_117, 3, x_113); -lean_ctor_set(x_117, 4, x_114); -lean_ctor_set(x_117, 5, x_115); -if (lean_is_scalar(x_111)) { - x_118 = lean_alloc_ctor(1, 2, 0); -} else { +x_116 = lean_ctor_get(x_111, 4); +lean_inc(x_116); +x_117 = lean_ctor_get(x_111, 5); +lean_inc(x_117); +if (lean_is_exclusive(x_111)) { + lean_ctor_release(x_111, 0); + lean_ctor_release(x_111, 1); + lean_ctor_release(x_111, 2); + lean_ctor_release(x_111, 3); + lean_ctor_release(x_111, 4); + lean_ctor_release(x_111, 5); x_118 = x_111; +} else { + lean_dec_ref(x_111); + x_118 = lean_box(0); } -lean_ctor_set(x_118, 0, x_110); -lean_ctor_set(x_118, 1, x_117); -return x_118; +if (lean_is_scalar(x_118)) { + x_119 = lean_alloc_ctor(0, 6, 0); +} else { + x_119 = x_118; +} +lean_ctor_set(x_119, 0, x_114); +lean_ctor_set(x_119, 1, x_77); +lean_ctor_set(x_119, 2, x_78); +lean_ctor_set(x_119, 3, x_115); +lean_ctor_set(x_119, 4, x_116); +lean_ctor_set(x_119, 5, x_117); +if (lean_is_scalar(x_113)) { + x_120 = lean_alloc_ctor(1, 2, 0); +} else { + x_120 = x_113; +} +lean_ctor_set(x_120, 0, x_112); +lean_ctor_set(x_120, 1, x_119); +return x_120; } } } else { -uint8_t x_119; +uint8_t x_121; lean_dec(x_2); -x_119 = !lean_is_exclusive(x_4); -if (x_119 == 0) +x_121 = !lean_is_exclusive(x_4); +if (x_121 == 0) { return x_4; } else { -lean_object* x_120; lean_object* x_121; lean_object* x_122; -x_120 = lean_ctor_get(x_4, 0); -x_121 = lean_ctor_get(x_4, 1); -lean_inc(x_121); -lean_inc(x_120); +lean_object* x_122; lean_object* x_123; lean_object* x_124; +x_122 = lean_ctor_get(x_4, 0); +x_123 = lean_ctor_get(x_4, 1); +lean_inc(x_123); +lean_inc(x_122); lean_dec(x_4); -x_122 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_122, 0, x_120); -lean_ctor_set(x_122, 1, x_121); -return x_122; +x_124 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_124, 0, x_122); +lean_ctor_set(x_124, 1, x_123); +return x_124; } } } @@ -3792,6 +3804,8 @@ l_Lean_registerEnvExtensionUnsafe___at_Lean_Meta_mkInstanceExtension___spec__7__ lean_mark_persistent(l_Lean_registerEnvExtensionUnsafe___at_Lean_Meta_mkInstanceExtension___spec__7___closed__1); l_Lean_registerEnvExtensionUnsafe___at_Lean_Meta_mkInstanceExtension___spec__7___closed__2 = _init_l_Lean_registerEnvExtensionUnsafe___at_Lean_Meta_mkInstanceExtension___spec__7___closed__2(); lean_mark_persistent(l_Lean_registerEnvExtensionUnsafe___at_Lean_Meta_mkInstanceExtension___spec__7___closed__2); +l_Lean_Meta_mkInstanceExtension___lambda__1___closed__1 = _init_l_Lean_Meta_mkInstanceExtension___lambda__1___closed__1(); +lean_mark_persistent(l_Lean_Meta_mkInstanceExtension___lambda__1___closed__1); l_Lean_Meta_mkInstanceExtension___closed__1 = _init_l_Lean_Meta_mkInstanceExtension___closed__1(); lean_mark_persistent(l_Lean_Meta_mkInstanceExtension___closed__1); l_Lean_Meta_mkInstanceExtension___closed__2 = _init_l_Lean_Meta_mkInstanceExtension___closed__2();