From f607e9c47810f635be860df2fb489180d4cd5bf5 Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Mon, 2 Mar 2020 08:42:07 -0800 Subject: [PATCH] chore: update stage0 --- stage0/src/Init/Control/State.lean | 4 + stage0/src/Init/Core.lean | 15 + stage0/src/Init/Data/HashSet.lean | 172 +- stage0/src/Init/Data/List/Basic.lean | 6 + stage0/src/Init/Util.lean | 15 +- stage0/src/runtime/sharecommon.cpp | 26 - stage0/src/shell/lean.cpp | 15 + stage0/stdlib/Init/Core.c | 45 + stage0/stdlib/Init/Data/HashSet.c | 1791 +++++++++-- stage0/stdlib/Init/Data/List/Basic.c | 107 + stage0/stdlib/Init/Lean/Elab/Definition.c | 6 +- stage0/stdlib/Init/Lean/Elab/Tactic/Basic.c | 4 +- stage0/stdlib/Init/Lean/MetavarContext.c | 506 +-- stage0/stdlib/Init/Lean/Util/CollectFVars.c | 1998 +++++++----- .../Init/Lean/Util/CollectLevelParams.c | 2746 ++++++++--------- stage0/stdlib/Init/Lean/Util/CollectMVars.c | 2026 +++++++----- stage0/stdlib/Init/ShareCommon.c | 466 ++- stage0/stdlib/Init/Util.c | 74 + 18 files changed, 6128 insertions(+), 3894 deletions(-) diff --git a/stage0/src/Init/Control/State.lean b/stage0/src/Init/Control/State.lean index 29f04092b5..0e60bb45d0 100644 --- a/stage0/src/Init/Control/State.lean +++ b/stage0/src/Init/Control/State.lean @@ -23,6 +23,10 @@ Prod.fst <$> x s @[reducible] def StateM (σ α : Type u) : Type u := StateT σ Id α +instance StateM.subsingleton {σ α} [Subsingleton σ] [Subsingleton α] : Subsingleton (StateM σ α) := +⟨λ x y => funext $ fun (s : σ) => match x s, y s with + | (a₁, s₁), (a₂, s₂) => Subsingleton.elim a₁ a₂ ▸ Subsingleton.elim s₁ s₂ ▸ rfl⟩ + namespace StateT section variables {σ : Type u} {m : Type u → Type v} diff --git a/stage0/src/Init/Core.lean b/stage0/src/Init/Core.lean index 934bcb87c3..4f15da8ad7 100644 --- a/stage0/src/Init/Core.lean +++ b/stage0/src/Init/Core.lean @@ -1682,6 +1682,21 @@ fun y x => f x y end Function +/- Squash -/ + +def Squash (α : Type u) := Quot (fun (a b : α) => True) + +def Squash.mk {α : Type u} (x : α) : Squash α := Quot.mk _ x + +theorem Squash.ind {α : Type u} {β : Squash α → Prop} (h : ∀ (a : α), β (Squash.mk a)) : ∀ (q : Squash α), β q := +Quot.ind h + +@[inline] def Squash.lift {α β} [Subsingleton β] (s : Squash α) (f : α → β) : β := +Quot.lift f (fun a b _ => Subsingleton.elim _ _) s + +instance Squash.Subsingleton {α} : Subsingleton (Squash α) := +⟨Squash.ind (fun (a : α) => Squash.ind (fun (b : α) => Quot.sound trivial))⟩ + /- Classical reasoning support -/ namespace Classical diff --git a/stage0/src/Init/Data/HashSet.lean b/stage0/src/Init/Data/HashSet.lean index 7163c31975..ff9e65d498 100644 --- a/stage0/src/Init/Data/HashSet.lean +++ b/stage0/src/Init/Data/HashSet.lean @@ -4,18 +4,128 @@ Released under Apache 2.0 license as described in the file LICENSE. Author: Leonardo de Moura -/ prelude -import Init.Data.HashMap +import Init.Data.Array.Basic +import Init.Data.List.Control +import Init.Data.Option.Basic +import Init.Data.Hashable +universes u v w -universes u v +def HashSetBucket (α : Type u) := +{ b : Array (List α) // b.size > 0 } -structure HashSet (α : Type u) [HasBeq α] [Hashable α] := -(set : HashMap α Unit) +def HashSetBucket.update {α : Type u} (data : HashSetBucket α) (i : USize) (d : List α) (h : i.toNat < data.val.size) : HashSetBucket α := +⟨ data.val.uset i d h, + transRelRight Greater (Array.szFSetEq (data.val) ⟨USize.toNat i, h⟩ d) data.property ⟩ + +structure HashSetImp (α : Type u) := +(size : Nat) +(buckets : HashSetBucket α) + +def mkHashSetImp {α : Type u} (nbuckets := 8) : HashSetImp α := +let n := if nbuckets = 0 then 8 else nbuckets; +{ size := 0, + buckets := + ⟨ mkArray n [], + have p₁ : (mkArray n ([] : List α)).size = n from Array.szMkArrayEq _ _; + have p₂ : n = (if nbuckets = 0 then 8 else nbuckets) from rfl; + have p₃ : (if nbuckets = 0 then 8 else nbuckets) > 0 from + match nbuckets with + | 0 => Nat.zeroLtSucc _ + | (Nat.succ x) => Nat.zeroLtSucc _; + transRelRight Greater (Eq.trans p₁ p₂) p₃ ⟩ } + +namespace HashSetImp +variables {α : Type u} + +def mkIdx {n : Nat} (h : n > 0) (u : USize) : { u : USize // u.toNat < n } := +⟨u %ₙ n, USize.modnLt _ h⟩ + +@[inline] def reinsertAux (hashFn : α → USize) (data : HashSetBucket α) (a : α) : HashSetBucket α := +let ⟨i, h⟩ := mkIdx data.property (hashFn a); +data.update i (a :: data.val.uget i h) h + +@[inline] def foldBucketsM {δ : Type w} {m : Type w → Type w} [Monad m] (data : HashSetBucket α) (d : δ) (f : δ → α → m δ) : m δ := +data.val.foldlM (fun d as => as.foldlM f d) d + +@[inline] def foldBuckets {δ : Type w} (data : HashSetBucket α) (d : δ) (f : δ → α → δ) : δ := +Id.run $ foldBucketsM data d f + +@[inline] def foldM {δ : Type w} {m : Type w → Type w} [Monad m] (f : δ → α → m δ) (d : δ) (h : HashSetImp α) : m δ := +foldBucketsM h.buckets d f + +@[inline] def fold {δ : Type w} (f : δ → α → δ) (d : δ) (m : HashSetImp α) : δ := +foldBuckets m.buckets d f + +def find? [HasBeq α] [Hashable α] (m : HashSetImp α) (a : α) : Option α := +match m with +| ⟨_, buckets⟩ => + let ⟨i, h⟩ := mkIdx buckets.property (hash a); + (buckets.val.uget i h).find? (fun a' => a == a') + +def contains [HasBeq α] [Hashable α] (m : HashSetImp α) (a : α) : Bool := +match m with +| ⟨_, buckets⟩ => + let ⟨i, h⟩ := mkIdx buckets.property (hash a); + (buckets.val.uget i h).contains a + +-- TODO: remove `partial` by using well-founded recursion +partial def moveEntries [Hashable α] : Nat → Array (List α) → HashSetBucket α → HashSetBucket α +| i, source, target => + if h : i < source.size then + let idx : Fin source.size := ⟨i, h⟩; + let es : List α := source.get idx; + -- We remove `es` from `source` to make sure we can reuse its memory cells when performing es.foldl + let source := source.set idx []; + let target := es.foldl (reinsertAux hash) target; + moveEntries (i+1) source target + else target + +def expand [Hashable α] (size : Nat) (buckets : HashSetBucket α) : HashSetImp α := +let nbuckets := buckets.val.size * 2; +have aux₁ : nbuckets > 0 from Nat.mulPos buckets.property (Nat.zeroLtBit0 Nat.oneNeZero); +have aux₂ : (mkArray nbuckets ([] : List α)).size = nbuckets from Array.szMkArrayEq _ _; +let new_buckets : HashSetBucket α := ⟨mkArray nbuckets [], aux₂.symm ▸ aux₁⟩; +{ size := size, + buckets := moveEntries 0 buckets.val new_buckets } + +def insert [HasBeq α] [Hashable α] (m : HashSetImp α) (a : α) : HashSetImp α := +match m with +| ⟨size, buckets⟩ => + let ⟨i, h⟩ := mkIdx buckets.property (hash a); + let bkt := buckets.val.uget i h; + if bkt.contains a + then ⟨size, buckets.update i (bkt.replace a a) h⟩ + else + let size' := size + 1; + let buckets' := buckets.update i (a :: bkt) h; + if size' ≤ buckets.val.size + then { size := size', buckets := buckets' } + else expand size' buckets' + +def erase [HasBeq α] [Hashable α] (m : HashSetImp α) (a : α) : HashSetImp α := +match m with +| ⟨ size, buckets ⟩ => + let ⟨i, h⟩ := mkIdx buckets.property (hash a); + let bkt := buckets.val.uget i h; + if bkt.contains a then ⟨size - 1, buckets.update i (bkt.erase a) h⟩ + else m + +inductive WellFormed [HasBeq α] [Hashable α] : HashSetImp α → Prop +| mkWff : ∀ n, WellFormed (mkHashSetImp n) +| insertWff : ∀ m a, WellFormed m → WellFormed (insert m a) +| eraseWff : ∀ m a, WellFormed m → WellFormed (erase m a) + +end HashSetImp + +def HashSet (α : Type u) [HasBeq α] [Hashable α] := +{ m : HashSetImp α // m.WellFormed } + +open HashSetImp def mkHashSet {α : Type u} [HasBeq α] [Hashable α] (nbuckets := 8) : HashSet α := -{ set := mkHashMap nbuckets } +⟨ mkHashSetImp nbuckets, WellFormed.mkWff nbuckets ⟩ namespace HashSet - variables {α : Type u} [HasBeq α] [Hashable α] instance : Inhabited (HashSet α) := @@ -24,33 +134,47 @@ instance : Inhabited (HashSet α) := instance : HasEmptyc (HashSet α) := ⟨mkHashSet⟩ -@[inline] def insert (s : HashSet α) (a : α) : HashSet α := -{ set := s.set.insert a () } +@[inline] def insert (m : HashSet α) (a : α) : HashSet α := +match m with +| ⟨ m, hw ⟩ => ⟨ m.insert a, WellFormed.insertWff m a hw ⟩ -@[inline] def erase (s : HashSet α) (a : α) : HashSet α := -{ set := s.set.erase a } +@[inline] def erase (m : HashSet α) (a : α) : HashSet α := +match m with +| ⟨ m, hw ⟩ => ⟨ m.erase a, WellFormed.eraseWff m a hw ⟩ -@[inline] def find? (s : HashSet α) (a : α) : Option α := -match s.set.findEntry? a with -| some (k, _) => some k -| none => none +@[inline] def find? (m : HashSet α) (a : α) : Option α := +match m with +| ⟨ m, _ ⟩ => m.find? a -@[inline] def contains (s : HashSet α) (a : α) : Bool := -s.set.contains a +@[inline] def contains (m : HashSet α) (a : α) : Bool := +match m with +| ⟨ m, _ ⟩ => m.contains a -@[inline] def size (s : HashSet α) : Nat := -s.set.size +@[inline] def foldM {δ : Type w} {m : Type w → Type w} [Monad m] (f : δ → α → m δ) (d : δ) (h : HashSet α) : m δ := +match h with +| ⟨ h, _ ⟩ => h.foldM f d -@[inline] def isEmpty (s : HashSet α) : Bool := -s.set.isEmpty +@[inline] def fold {δ : Type w} (f : δ → α → δ) (d : δ) (m : HashSet α) : δ := +match m with +| ⟨ m, _ ⟩ => m.fold f d + +@[inline] def size (m : HashSet α) : Nat := +match m with +| ⟨ {size := sz, ..}, _ ⟩ => sz + +@[inline] def isEmpty (m : HashSet α) : Bool := +m.size = 0 @[inline] def empty : HashSet α := mkHashSet -@[inline] def foldM {β : Type v} {m : Type v → Type v} [Monad m] (f : β → α → m β) (d : β) (s : HashSet α) : m β := -s.set.foldM (fun d a _ => f d a) d +def toList (m : HashSet α) : List α := +m.fold (fun r a => a::r) [] -@[inline] def fold {β : Type v} (f : β → α → β) (d : β) (s : HashSet α) : β := -Id.run $ s.foldM f d +def toArray (m : HashSet α) : Array α := +m.fold (fun r a => r.push a) #[] + +def numBuckets (m : HashSet α) : Nat := +m.val.buckets.val.size end HashSet diff --git a/stage0/src/Init/Data/List/Basic.lean b/stage0/src/Init/Data/List/Basic.lean index 8e2efebdd5..0a71a5396b 100644 --- a/stage0/src/Init/Data/List/Basic.lean +++ b/stage0/src/Init/Data/List/Basic.lean @@ -165,6 +165,12 @@ def findSome? (f : α → Option β) : List α → Option β | some b => some b | none => findSome? as +def replace [HasBeq α] : List α → α → α → List α +| [], _, _ => [] +| a::as, b, c => match a == b with + | true => c::as + | flase => a :: (replace as b c) + def elem [HasBeq α] (a : α) : List α → Bool | [] => false | b::bs => match a == b with diff --git a/stage0/src/Init/Util.lean b/stage0/src/Init/Util.lean index 7987b0142f..b71ac3f860 100644 --- a/stage0/src/Init/Util.lean +++ b/stage0/src/Init/Util.lean @@ -47,18 +47,29 @@ k (ptrAddrUnsafe a) @[inline] unsafe def withPtrEqUnsafe {α : Type u} (a b : α) (k : Unit → Bool) (h : a = b → k () = true) : Bool := if ptrAddrUnsafe a == ptrAddrUnsafe b then true else k () +inductive PtrEqResult {α : Type u} (x y : α) : Type +| unknown {} : PtrEqResult +| yesEqual (h : x = y) : PtrEqResult + +@[inline] unsafe def withPtrEqResultUnsafe {α : Type u} {β : Type v} [Subsingleton β] (a b : α) (k : PtrEqResult a b → β) : β := +if ptrAddrUnsafe a == ptrAddrUnsafe b then k (PtrEqResult.yesEqual lcProof) else k PtrEqResult.unknown + @[implementedBy withPtrEqUnsafe] def withPtrEq {α : Type u} (a b : α) (k : Unit → Bool) (h : a = b → k () = true) : Bool := k () --- `withPtrEq` for `DecidableEq` - +/-- `withPtrEq` for `DecidableEq` -/ @[inline] def withPtrEqDecEq {α : Type u} (a b : α) (k : Unit → Decidable (a = b)) : Decidable (a = b) := let b := withPtrEq a b (fun _ => toBoolUsing (k ())) (toBoolUsingEqTrue (k ())); condEq b (fun h => isTrue (ofBoolUsingEqTrue h)) (fun h => isFalse (ofBoolUsingEqFalse h)) +/-- Similar to `withPtrEq`, but executes the continuation `k` with the "result" of the pointer equality test. -/ +@[implementedBy withPtrEqResultUnsafe] +def withPtrEqResult {α : Type u} {β : Type v} [Subsingleton β] (a b : α) (k : PtrEqResult a b → β) : β := +k PtrEqResult.unknown + @[implementedBy withPtrAddrUnsafe] def withPtrAddr {α : Type u} {β : Type v} (a : α) (k : USize → β) (h : ∀ u₁ u₂, k u₁ = k u₂) : β := k 0 diff --git a/stage0/src/runtime/sharecommon.cpp b/stage0/src/runtime/sharecommon.cpp index 07067c90a2..67c536f156 100644 --- a/stage0/src/runtime/sharecommon.cpp +++ b/stage0/src/runtime/sharecommon.cpp @@ -25,10 +25,6 @@ extern "C" uint8 lean_sharecommon_eq(b_obj_arg o1, b_obj_arg o2) { return memcmp(reinterpret_cast(o1) + header_sz, reinterpret_cast(o2) + header_sz, sz1 - header_sz) == 0; } -extern "C" uint8 lean_maxsharing_eq(b_obj_arg o1, b_obj_arg o2) { - return lean_sharecommon_eq(o1, o2); -} - extern "C" usize lean_sharecommon_hash(b_obj_arg o) { lean_assert(!lean_is_scalar(o)); size_t sz = lean_object_byte_size(o); @@ -39,10 +35,6 @@ extern "C" usize lean_sharecommon_hash(b_obj_arg o) { return hash_str(sz - header_sz, reinterpret_cast(o) + header_sz, init); } -extern "C" usize lean_maxsharing_hash(b_obj_arg o) { - return lean_sharecommon_hash(o); -} - // unsafe def mkObjectMap : Unit → ObjectMap extern "C" obj_res lean_mk_object_map(obj_arg); // unsafe def ObjectMap.find? (m : ObjectMap) (k : Object) : Option Object @@ -87,14 +79,6 @@ extern "C" obj_res lean_sharecommon_mk_pstate(obj_arg) { return mk_pair(lean_mk_object_pmap(lean_box(0)), lean_mk_object_pset(lean_box(0))); } -extern "C" obj_res lean_maxsharing_mk_state(obj_arg) { - return mk_pair(lean_mk_object_map(lean_box(0)), lean_mk_object_set(lean_box(0))); -} - -extern "C" obj_res lean_maxsharing_mk_pstate(obj_arg) { - return mk_pair(lean_mk_object_pmap(lean_box(0)), lean_mk_object_pset(lean_box(0))); -} - class sharecommon_state_core { protected: object * m_map; @@ -344,14 +328,4 @@ extern "C" obj_res lean_state_sharecommon(obj_arg s, obj_arg a) { extern "C" obj_res lean_persistent_state_sharecommon(obj_arg s, obj_arg a) { return sharecommon_fn(s)(a); } - -// def State.maxSharing {α} (s : State) (a : α) : α × State -extern "C" obj_res lean_state_maxsharing(obj_arg s, obj_arg a) { - return sharecommon_fn(s)(a); -} - -// def PersistentState.maxSharing {α} (s : PersistentState) (a : α) : α × PersistentState -extern "C" obj_res lean_persistent_state_maxsharing(obj_arg s, obj_arg a) { - return sharecommon_fn(s)(a); -} }; diff --git a/stage0/src/shell/lean.cpp b/stage0/src/shell/lean.cpp index 8ad7f64471..2730fa19d3 100644 --- a/stage0/src/shell/lean.cpp +++ b/stage0/src/shell/lean.cpp @@ -380,6 +380,13 @@ std::string olean_of_lean(std::string const & lean_fn) { } } +void check_optarg(char const * option_name) { + if (!optarg) { + std::cerr << "error: argument missing for option '-" << option_name << "'" << std::endl; + std::exit(1); + } +} + int main(int argc, char ** argv) { #if defined(LEAN_EMSCRIPTEN) EM_ASM( @@ -459,9 +466,11 @@ int main(int argc, char ** argv) { display_help(std::cout); return 0; case 'c': + check_optarg("c"); c_output = optarg; break; case 'C': + check_optarg("C"); c_output = optarg; break; case 's': @@ -481,12 +490,15 @@ int main(int argc, char ** argv) { } break; case 'M': + check_optarg("M"); opts = opts.update(get_max_memory_opt_name(), static_cast(atoi(optarg))); break; case 'T': + check_optarg("T"); opts = opts.update(get_timeout_opt_name(), static_cast(atoi(optarg))); break; case 't': + check_optarg("t"); trust_lvl = atoi(optarg); break; case 'q': @@ -500,6 +512,7 @@ int main(int argc, char ** argv) { break; case 'D': try { + check_optarg("D"); opts = set_config_option(opts, optarg); } catch (lean::exception & ex) { std::cerr << ex.what() << std::endl; @@ -517,6 +530,7 @@ int main(int argc, char ** argv) { break; #if defined(LEAN_DEBUG) case 'B': + check_optarg("B"); lean::enable_debug(optarg); break; #endif @@ -524,6 +538,7 @@ int main(int argc, char ** argv) { new_frontend = true; break; case 'p': + check_optarg("p"); load_plugin(optarg); break; default: diff --git a/stage0/stdlib/Init/Core.c b/stage0/stdlib/Init/Core.c index 41957528b8..65aaa28437 100644 --- a/stage0/stdlib/Init/Core.c +++ b/stage0/stdlib/Init/Core.c @@ -39,6 +39,7 @@ lean_object* l_PSigma_HasSizeof(lean_object*, lean_object*); lean_object* l_Quotient_recOn___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_bne___rarg___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Quotient_lift___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Squash_mk___rarg___boxed(lean_object*); lean_object* l_Nat_HasOne; lean_object* l_idRhs___rarg___boxed(lean_object*); lean_object* l_arbitrary___rarg___boxed(lean_object*); @@ -129,6 +130,7 @@ lean_object* l_setoidHasEquiv(lean_object*, lean_object*); lean_object* l_PUnit_sizeof(lean_object*); lean_object* l_Iff_Decidable(lean_object*, lean_object*); lean_object* l_Nat_HasSizeof; +lean_object* l_Squash_lift___rarg(lean_object*, lean_object*); lean_object* l_Ne_Decidable___rarg___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Sum_inhabitedLeft___rarg(lean_object*); lean_object* l_Quotient_lift_u2082___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -189,6 +191,7 @@ lean_object* l_inferInstance(lean_object*); lean_object* l_decidableOfDecidableOfEq(lean_object*, lean_object*); lean_object* l_typedExpr(lean_object*); lean_object* l_Bool_sizeof___boxed(lean_object*); +lean_object* l_Squash_mk(lean_object*); lean_object* l_PSigma_sizeof___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Nat_sizeof(lean_object*); lean_object* l_bit0(lean_object*); @@ -206,6 +209,7 @@ lean_object* l_bit1___rarg(lean_object*, lean_object*, lean_object*); uint8_t l_implies_Decidable___rarg(uint8_t, uint8_t); lean_object* l_typedExpr___rarg(lean_object*); lean_object* l_idRhs___rarg(lean_object*); +lean_object* l_Squash_lift(lean_object*, lean_object*, lean_object*); lean_object* l_Prop_Inhabited; lean_object* l_inferInstanceAs___rarg(lean_object*); lean_object* l_Eq_mp(lean_object*, lean_object*, lean_object*); @@ -308,6 +312,7 @@ lean_object* l_implies_Decidable(lean_object*, lean_object*); uint8_t l_strictAnd(uint8_t, uint8_t); lean_object* l_Quotient_liftOn_u2082___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_PSigma_HasSizeof___rarg(lean_object*, lean_object*); +lean_object* l_Squash_mk___rarg(lean_object*); lean_object* l_Thunk_pure___boxed(lean_object*, lean_object*); lean_object* l_decidableOfDecidableOfIff(lean_object*, lean_object*); lean_object* l_bit0___rarg(lean_object*, lean_object*); @@ -3574,6 +3579,46 @@ x_4 = lean_alloc_closure((void*)(l_Function_swap___rarg), 3, 0); return x_4; } } +lean_object* l_Squash_mk___rarg(lean_object* x_1) { +_start: +{ +lean_inc(x_1); +return x_1; +} +} +lean_object* l_Squash_mk(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Squash_mk___rarg___boxed), 1, 0); +return x_2; +} +} +lean_object* l_Squash_mk___rarg___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_Squash_mk___rarg(x_1); +lean_dec(x_1); +return x_2; +} +} +lean_object* l_Squash_lift___rarg(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_apply_1(x_2, x_1); +return x_3; +} +} +lean_object* l_Squash_lift(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = lean_alloc_closure((void*)(l_Squash_lift___rarg), 2, 0); +return x_4; +} +} static bool _G_initialized = false; lean_object* initialize_Init_Core(lean_object* w) { lean_object * res; diff --git a/stage0/stdlib/Init/Data/HashSet.c b/stage0/stdlib/Init/Data/HashSet.c index b87a44d630..191f2127e2 100644 --- a/stage0/stdlib/Init/Data/HashSet.c +++ b/stage0/stdlib/Init/Data/HashSet.c @@ -1,6 +1,6 @@ // Lean compiler output // Module: Init.Data.HashSet -// Imports: Init.Data.HashMap +// Imports: Init.Data.Array.Basic Init.Data.List.Control Init.Data.Option.Basic Init.Data.Hashable #include "runtime/lean.h" #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" @@ -15,65 +15,1074 @@ extern "C" { #endif lean_object* l_HashSet_erase(lean_object*); lean_object* l_HashSet_fold___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_List_erase___main___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_HashSet_isEmpty(lean_object*, lean_object*, lean_object*); +lean_object* l_Array_iterateMAux___main___at_HashSetImp_foldM___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_mkHashSetImp___rarg(lean_object*); +lean_object* l_HashSet_numBuckets___rarg(lean_object*); uint8_t l_HashSet_contains___rarg(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Array_iterateMAux___main___at_HashSet_foldM___spec__2(lean_object*, lean_object*, lean_object*); +lean_object* lean_array_uget(lean_object*, size_t); lean_object* l_HashSet_find_x3f___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_HashSetImp_reinsertAux(lean_object*); +uint8_t l_List_elem___main___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_HashSet_isEmpty___rarg___boxed(lean_object*); lean_object* l_HashSet_find_x3f___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_HashSet_toArray(lean_object*, lean_object*, lean_object*); +lean_object* l_HashSet_toArray___rarg(lean_object*); +lean_object* lean_array_uset(lean_object*, size_t, lean_object*); +lean_object* l_Array_iterateMAux___main___at_HashSet_toArray___spec__2___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_List_foldlM___main___at_HashSetImp_fold___spec__1___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_List_foldlM___main___at_HashSet_fold___spec__1(lean_object*, lean_object*); lean_object* l_HashSet_isEmpty___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at_HashSet_fold___spec__2___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_List_foldlM___main___at_HashSet_toArray___spec__1(lean_object*); +lean_object* l_Array_iterateMAux___main___at_HashSet_foldM___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_HashSetImp_find_x3f(lean_object*); lean_object* l_HashSet_size___rarg___boxed(lean_object*); lean_object* l_HashSet_Inhabited(lean_object*, lean_object*, lean_object*); +extern lean_object* l_Array_empty___closed__1; lean_object* l_HashSet_contains(lean_object*); +lean_object* l_Array_iterateMAux___main___at_HashSetImp_fold___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_HashSet_toArray___boxed(lean_object*, lean_object*, lean_object*); +lean_object* lean_array_push(lean_object*, lean_object*); lean_object* lean_array_get_size(lean_object*); -lean_object* l_HashMapImp_insert___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_List_find_x3f___main___rarg(lean_object*, lean_object*); +lean_object* l_HashSetImp_contains(lean_object*); lean_object* l_HashSet_size___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_HashSetImp_mkIdx___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_HashSet_foldM___rarg(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_HashSet_isEmpty___rarg(lean_object*); lean_object* l_HashSet_insert(lean_object*); +lean_object* l_HashSetImp_insert(lean_object*); +lean_object* l_HashSetImp_foldM___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_nat_add(lean_object*, lean_object*); +uint8_t l_HashSetImp_contains___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_iterateMAux___main___at_HashSet_toArray___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_HashSetImp_contains___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_HashSet_HasEmptyc___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_AssocList_foldlM___main___at_HashSet_fold___spec__1___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_HashSetImp_expand___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_HashSetBucket_update___rarg(lean_object*, size_t, lean_object*, lean_object*); +lean_object* l_HashSetImp_fold___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_List_foldlM___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_iterateMAux___main___at_HashSet_toList___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_HashSetImp_reinsertAux___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_HashSet_foldM___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_HashSetImp_find_x3f___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_HashSet_fold(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_fget(lean_object*, lean_object*); +lean_object* l_HashSetImp_find_x3f___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_eq(lean_object*, lean_object*); +lean_object* l_mkHashSetImp___rarg___closed__2; +lean_object* lean_nat_sub(lean_object*, lean_object*); lean_object* l_HashSet_insert___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_iterateMAux___main___at_HashSetImp_foldBucketsM___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_HashSet_toArray___rarg___boxed(lean_object*); lean_object* l_mkHashSet___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Array_iterateMAux___main___at_HashSetImp_foldM___spec__1(lean_object*, lean_object*, lean_object*); +lean_object* l_Array_iterateMAux___main___at_HashSet_toList___spec__2___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_iterateMAux___main___at_HashSet_foldM___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_HashSet_size(lean_object*, lean_object*, lean_object*); +lean_object* l_List_foldlM___main___at_HashSet_toList___spec__1(lean_object*); +lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); +lean_object* l_Array_iterateMAux___main___at_HashSet_toList___spec__2(lean_object*); +lean_object* l_HashSetImp_foldBuckets(lean_object*, lean_object*); +lean_object* l_Array_iterateMAux___main___at_HashSetImp_foldBuckets___spec__2(lean_object*, lean_object*); +lean_object* l_HashSetImp_expand(lean_object*); +lean_object* l_HashSetImp_moveEntries___main(lean_object*); +lean_object* l_HashSet_toList___rarg___boxed(lean_object*); lean_object* l_Array_iterateMAux___main___at_HashSet_fold___spec__2(lean_object*, lean_object*); -lean_object* l_HashMapImp_erase___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_iterateMAux___main___at_HashSetImp_foldBucketsM___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_HashSet_HasEmptyc(lean_object*, lean_object*, lean_object*); -lean_object* l_AssocList_foldlM___main___at_HashSet_foldM___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_List_foldlM___main___at_HashSetImp_fold___spec__1(lean_object*, lean_object*); +lean_object* l_HashSetImp_erase(lean_object*); lean_object* l_mkHashSet___rarg(lean_object*); -lean_object* l_AssocList_foldlM___main___at_HashSet_foldM___spec__1___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_mkHashMapImp___rarg(lean_object*); +size_t lean_usize_modn(size_t, lean_object*); +lean_object* l_HashSetImp_foldBuckets___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_HashSetImp_moveEntries(lean_object*); +lean_object* l_HashSetImp_foldM(lean_object*, lean_object*, lean_object*); +lean_object* l_List_foldlM___main___at_HashSetImp_foldBuckets___spec__1(lean_object*, lean_object*); +lean_object* l_HashSet_Inhabited___closed__1; +lean_object* l_List_foldlM___main___at_HashSet_toArray___spec__1___rarg(lean_object*, lean_object*); +lean_object* l_HashSet_numBuckets(lean_object*, lean_object*, lean_object*); +lean_object* l_Array_iterateMAux___main___at_HashSetImp_foldBuckets___spec__2___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_HashSet_find_x3f(lean_object*); -lean_object* l_AssocList_foldlM___main___at_HashSet_foldM___spec__1(lean_object*, lean_object*, lean_object*); +lean_object* l_List_replace___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_HashSetImp_foldBucketsM(lean_object*, lean_object*, lean_object*); +lean_object* l_HashSetImp_fold(lean_object*, lean_object*); +lean_object* l_mkHashSetImp___rarg___closed__1; +lean_object* l_HashSetImp_moveEntries___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_List_foldlM___main___at_HashSet_toList___spec__1___rarg(lean_object*, lean_object*); +uint8_t lean_nat_dec_le(lean_object*, lean_object*); lean_object* l_HashSet_contains___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_HashSet_empty(lean_object*, lean_object*, lean_object*); lean_object* l_HashSet_Inhabited___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_HashSet_toList___rarg(lean_object*); +lean_object* l_List_foldl___main___at_HashSetImp_moveEntries___main___spec__1___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_List_foldlM___main___at_HashSet_fold___spec__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at_HashSet_fold___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_HashSetImp_moveEntries___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_iterateMAux___main___at_HashSet_foldM___spec__1(lean_object*, lean_object*, lean_object*); +lean_object* l_HashSetImp_erase___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_nat_mul(lean_object*, lean_object*); +lean_object* l_HashSet_numBuckets___rarg___boxed(lean_object*); +lean_object* l_HashSetBucket_update(lean_object*); +lean_object* l_Array_iterateMAux___main___at_HashSetImp_fold___spec__2(lean_object*, lean_object*); +lean_object* l_Array_iterateMAux___main___at_HashSet_toArray___spec__2(lean_object*); +lean_object* l_HashSetImp_foldBucketsM___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_HashSet_toList___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_mkHashSet(lean_object*, lean_object*, lean_object*); -uint8_t l_HashMapImp_contains___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_HashSetBucket_update___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_HashSetImp_insert___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_List_foldlM___main___at_HashSetImp_foldBuckets___spec__1___rarg(lean_object*, lean_object*, lean_object*); +lean_object* lean_mk_array(lean_object*, lean_object*); lean_object* l_HashSet_fold___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Array_iterateMAux___main___at_HashSet_foldM___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_HashSetImp_fold___rarg___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_HashSet_erase___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_iterateMAux___main___at_HashSetImp_foldBucketsM___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_HashSet_size___rarg(lean_object*); -lean_object* l_HashMapImp_findEntry_x3f___rarg(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_AssocList_foldlM___main___at_HashSet_fold___spec__1(lean_object*, lean_object*); -extern lean_object* l_HashMap_Inhabited___closed__1; +lean_object* l_HashSet_toList(lean_object*, lean_object*, lean_object*); +lean_object* l_HashSet_numBuckets___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_HashSetImp_foldBuckets___rarg___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Array_iterateMAux___main___at_HashSetImp_foldM___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +size_t l_HashSetImp_mkIdx(lean_object*, lean_object*, size_t); +lean_object* l_Array_iterateMAux___main___at_HashSetImp_foldBuckets___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_List_foldl___main___at_HashSetImp_moveEntries___main___spec__1(lean_object*); +lean_object* l_Array_iterateMAux___main___at_HashSetImp_fold___spec__2___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_HashSet_fold___rarg___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Array_iterateMAux___main___at_HashSet_foldM___spec__2___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_HashSet_empty___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_mkHashSetImp(lean_object*); lean_object* l_HashSet_foldM(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); +lean_object* l_HashSetBucket_update___rarg(lean_object* x_1, size_t x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = lean_array_uset(x_1, x_2, x_3); +return x_5; +} +} +lean_object* l_HashSetBucket_update(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_HashSetBucket_update___rarg___boxed), 4, 0); +return x_2; +} +} +lean_object* l_HashSetBucket_update___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +size_t x_5; lean_object* x_6; +x_5 = lean_unbox_usize(x_2); +lean_dec(x_2); +x_6 = l_HashSetBucket_update___rarg(x_1, x_5, x_3, x_4); +return x_6; +} +} +lean_object* _init_l_mkHashSetImp___rarg___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = lean_unsigned_to_nat(8u); +x_3 = lean_mk_array(x_2, x_1); +return x_3; +} +} +lean_object* _init_l_mkHashSetImp___rarg___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_unsigned_to_nat(0u); +x_2 = l_mkHashSetImp___rarg___closed__1; +x_3 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set(x_3, 1, x_2); +return x_3; +} +} +lean_object* l_mkHashSetImp___rarg(lean_object* x_1) { +_start: +{ +lean_object* x_2; uint8_t x_3; +x_2 = lean_unsigned_to_nat(0u); +x_3 = lean_nat_dec_eq(x_1, x_2); +if (x_3 == 0) +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_4 = lean_box(0); +x_5 = lean_mk_array(x_1, x_4); +x_6 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_6, 0, x_2); +lean_ctor_set(x_6, 1, x_5); +return x_6; +} +else +{ +lean_object* x_7; +lean_dec(x_1); +x_7 = l_mkHashSetImp___rarg___closed__2; +return x_7; +} +} +} +lean_object* l_mkHashSetImp(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_mkHashSetImp___rarg), 1, 0); +return x_2; +} +} +size_t l_HashSetImp_mkIdx(lean_object* x_1, lean_object* x_2, size_t x_3) { +_start: +{ +size_t x_4; +x_4 = lean_usize_modn(x_3, x_1); +return x_4; +} +} +lean_object* l_HashSetImp_mkIdx___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +size_t x_4; size_t x_5; lean_object* x_6; +x_4 = lean_unbox_usize(x_3); +lean_dec(x_3); +x_5 = l_HashSetImp_mkIdx(x_1, x_2, x_4); +lean_dec(x_1); +x_6 = lean_box_usize(x_5); +return x_6; +} +} +lean_object* l_HashSetImp_reinsertAux___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; size_t x_6; size_t x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_4 = lean_array_get_size(x_2); +lean_inc(x_3); +x_5 = lean_apply_1(x_1, x_3); +x_6 = lean_unbox_usize(x_5); +lean_dec(x_5); +x_7 = lean_usize_modn(x_6, x_4); +lean_dec(x_4); +x_8 = lean_array_uget(x_2, x_7); +x_9 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_9, 0, x_3); +lean_ctor_set(x_9, 1, x_8); +x_10 = lean_array_uset(x_2, x_7, x_9); +return x_10; +} +} +lean_object* l_HashSetImp_reinsertAux(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_HashSetImp_reinsertAux___rarg), 3, 0); +return x_2; +} +} +lean_object* l_Array_iterateMAux___main___at_HashSetImp_foldBucketsM___spec__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; uint8_t x_8; +x_7 = lean_array_get_size(x_4); +x_8 = lean_nat_dec_lt(x_5, x_7); +lean_dec(x_7); +if (x_8 == 0) +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_9 = lean_ctor_get(x_1, 0); +lean_inc(x_9); +lean_dec(x_1); +x_10 = lean_ctor_get(x_9, 1); +lean_inc(x_10); +lean_dec(x_9); +x_11 = lean_apply_2(x_10, lean_box(0), x_6); +return x_11; +} +else +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_12 = lean_ctor_get(x_1, 1); +lean_inc(x_12); +x_13 = lean_array_fget(x_4, x_5); +lean_inc(x_3); +lean_inc(x_1); +x_14 = l_List_foldlM___main___rarg(x_1, lean_box(0), lean_box(0), x_3, x_6, x_13); +x_15 = lean_unsigned_to_nat(1u); +x_16 = lean_nat_add(x_5, x_15); +x_17 = lean_alloc_closure((void*)(l_Array_iterateMAux___main___at_HashSetImp_foldBucketsM___spec__1___rarg___boxed), 6, 5); +lean_closure_set(x_17, 0, x_1); +lean_closure_set(x_17, 1, x_2); +lean_closure_set(x_17, 2, x_3); +lean_closure_set(x_17, 3, x_4); +lean_closure_set(x_17, 4, x_16); +x_18 = lean_apply_4(x_12, lean_box(0), lean_box(0), x_14, x_17); +return x_18; +} +} +} +lean_object* l_Array_iterateMAux___main___at_HashSetImp_foldBucketsM___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = lean_alloc_closure((void*)(l_Array_iterateMAux___main___at_HashSetImp_foldBucketsM___spec__1___rarg___boxed), 6, 0); +return x_4; +} +} +lean_object* l_HashSetImp_foldBucketsM___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; lean_object* x_6; +x_5 = lean_unsigned_to_nat(0u); +lean_inc(x_2); +x_6 = l_Array_iterateMAux___main___at_HashSetImp_foldBucketsM___spec__1___rarg(x_1, x_2, x_4, x_2, x_5, x_3); +return x_6; +} +} +lean_object* l_HashSetImp_foldBucketsM(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = lean_alloc_closure((void*)(l_HashSetImp_foldBucketsM___rarg), 4, 0); +return x_4; +} +} +lean_object* l_Array_iterateMAux___main___at_HashSetImp_foldBucketsM___spec__1___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; +x_7 = l_Array_iterateMAux___main___at_HashSetImp_foldBucketsM___spec__1___rarg(x_1, x_2, x_3, x_4, x_5, x_6); +lean_dec(x_5); +return x_7; +} +} +lean_object* l_List_foldlM___main___at_HashSetImp_foldBuckets___spec__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +if (lean_obj_tag(x_3) == 0) +{ +lean_dec(x_1); +return x_2; +} +else +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_4 = lean_ctor_get(x_3, 0); +lean_inc(x_4); +x_5 = lean_ctor_get(x_3, 1); +lean_inc(x_5); +lean_dec(x_3); +lean_inc(x_1); +x_6 = lean_apply_2(x_1, x_2, x_4); +x_2 = x_6; +x_3 = x_5; +goto _start; +} +} +} +lean_object* l_List_foldlM___main___at_HashSetImp_foldBuckets___spec__1(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l_List_foldlM___main___at_HashSetImp_foldBuckets___spec__1___rarg), 3, 0); +return x_3; +} +} +lean_object* l_Array_iterateMAux___main___at_HashSetImp_foldBuckets___spec__2___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; uint8_t x_7; +x_6 = lean_array_get_size(x_3); +x_7 = lean_nat_dec_lt(x_4, x_6); +lean_dec(x_6); +if (x_7 == 0) +{ +lean_dec(x_4); +lean_dec(x_2); +return x_5; +} +else +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_8 = lean_array_fget(x_3, x_4); +lean_inc(x_2); +x_9 = l_List_foldlM___main___at_HashSetImp_foldBuckets___spec__1___rarg(x_2, x_5, x_8); +x_10 = lean_unsigned_to_nat(1u); +x_11 = lean_nat_add(x_4, x_10); +lean_dec(x_4); +x_4 = x_11; +x_5 = x_9; +goto _start; +} +} +} +lean_object* l_Array_iterateMAux___main___at_HashSetImp_foldBuckets___spec__2(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l_Array_iterateMAux___main___at_HashSetImp_foldBuckets___spec__2___rarg___boxed), 5, 0); +return x_3; +} +} +lean_object* l_HashSetImp_foldBuckets___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; +x_4 = lean_unsigned_to_nat(0u); +x_5 = l_Array_iterateMAux___main___at_HashSetImp_foldBuckets___spec__2___rarg(x_1, x_3, x_1, x_4, x_2); +return x_5; +} +} +lean_object* l_HashSetImp_foldBuckets(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l_HashSetImp_foldBuckets___rarg___boxed), 3, 0); +return x_3; +} +} +lean_object* l_Array_iterateMAux___main___at_HashSetImp_foldBuckets___spec__2___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; +x_6 = l_Array_iterateMAux___main___at_HashSetImp_foldBuckets___spec__2___rarg(x_1, x_2, x_3, x_4, x_5); +lean_dec(x_3); +lean_dec(x_1); +return x_6; +} +} +lean_object* l_HashSetImp_foldBuckets___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_HashSetImp_foldBuckets___rarg(x_1, x_2, x_3); +lean_dec(x_1); +return x_4; +} +} +lean_object* l_Array_iterateMAux___main___at_HashSetImp_foldM___spec__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; uint8_t x_8; +x_7 = lean_array_get_size(x_4); +x_8 = lean_nat_dec_lt(x_5, x_7); +lean_dec(x_7); +if (x_8 == 0) +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_9 = lean_ctor_get(x_1, 0); +lean_inc(x_9); +lean_dec(x_1); +x_10 = lean_ctor_get(x_9, 1); +lean_inc(x_10); +lean_dec(x_9); +x_11 = lean_apply_2(x_10, lean_box(0), x_6); +return x_11; +} +else +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_12 = lean_ctor_get(x_1, 1); +lean_inc(x_12); +x_13 = lean_array_fget(x_4, x_5); +lean_inc(x_2); +lean_inc(x_1); +x_14 = l_List_foldlM___main___rarg(x_1, lean_box(0), lean_box(0), x_2, x_6, x_13); +x_15 = lean_unsigned_to_nat(1u); +x_16 = lean_nat_add(x_5, x_15); +x_17 = lean_alloc_closure((void*)(l_Array_iterateMAux___main___at_HashSetImp_foldM___spec__1___rarg___boxed), 6, 5); +lean_closure_set(x_17, 0, x_1); +lean_closure_set(x_17, 1, x_2); +lean_closure_set(x_17, 2, x_3); +lean_closure_set(x_17, 3, x_4); +lean_closure_set(x_17, 4, x_16); +x_18 = lean_apply_4(x_12, lean_box(0), lean_box(0), x_14, x_17); +return x_18; +} +} +} +lean_object* l_Array_iterateMAux___main___at_HashSetImp_foldM___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = lean_alloc_closure((void*)(l_Array_iterateMAux___main___at_HashSetImp_foldM___spec__1___rarg___boxed), 6, 0); +return x_4; +} +} +lean_object* l_HashSetImp_foldM___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; +x_5 = lean_ctor_get(x_4, 1); +lean_inc(x_5); +x_6 = lean_unsigned_to_nat(0u); +x_7 = l_Array_iterateMAux___main___at_HashSetImp_foldM___spec__1___rarg(x_1, x_2, x_4, x_5, x_6, x_3); +return x_7; +} +} +lean_object* l_HashSetImp_foldM(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = lean_alloc_closure((void*)(l_HashSetImp_foldM___rarg), 4, 0); +return x_4; +} +} +lean_object* l_Array_iterateMAux___main___at_HashSetImp_foldM___spec__1___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; +x_7 = l_Array_iterateMAux___main___at_HashSetImp_foldM___spec__1___rarg(x_1, x_2, x_3, x_4, x_5, x_6); +lean_dec(x_5); +return x_7; +} +} +lean_object* l_List_foldlM___main___at_HashSetImp_fold___spec__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +if (lean_obj_tag(x_3) == 0) +{ +lean_dec(x_1); +return x_2; +} +else +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_4 = lean_ctor_get(x_3, 0); +lean_inc(x_4); +x_5 = lean_ctor_get(x_3, 1); +lean_inc(x_5); +lean_dec(x_3); +lean_inc(x_1); +x_6 = lean_apply_2(x_1, x_2, x_4); +x_2 = x_6; +x_3 = x_5; +goto _start; +} +} +} +lean_object* l_List_foldlM___main___at_HashSetImp_fold___spec__1(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l_List_foldlM___main___at_HashSetImp_fold___spec__1___rarg), 3, 0); +return x_3; +} +} +lean_object* l_Array_iterateMAux___main___at_HashSetImp_fold___spec__2___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; uint8_t x_7; +x_6 = lean_array_get_size(x_3); +x_7 = lean_nat_dec_lt(x_4, x_6); +lean_dec(x_6); +if (x_7 == 0) +{ +lean_dec(x_4); +lean_dec(x_1); +return x_5; +} +else +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_8 = lean_array_fget(x_3, x_4); +lean_inc(x_1); +x_9 = l_List_foldlM___main___at_HashSetImp_fold___spec__1___rarg(x_1, x_5, x_8); +x_10 = lean_unsigned_to_nat(1u); +x_11 = lean_nat_add(x_4, x_10); +lean_dec(x_4); +x_4 = x_11; +x_5 = x_9; +goto _start; +} +} +} +lean_object* l_Array_iterateMAux___main___at_HashSetImp_fold___spec__2(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l_Array_iterateMAux___main___at_HashSetImp_fold___spec__2___rarg___boxed), 5, 0); +return x_3; +} +} +lean_object* l_HashSetImp_fold___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_4 = lean_ctor_get(x_3, 1); +x_5 = lean_unsigned_to_nat(0u); +x_6 = l_Array_iterateMAux___main___at_HashSetImp_fold___spec__2___rarg(x_1, x_3, x_4, x_5, x_2); +return x_6; +} +} +lean_object* l_HashSetImp_fold(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l_HashSetImp_fold___rarg___boxed), 3, 0); +return x_3; +} +} +lean_object* l_Array_iterateMAux___main___at_HashSetImp_fold___spec__2___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; +x_6 = l_Array_iterateMAux___main___at_HashSetImp_fold___spec__2___rarg(x_1, x_2, x_3, x_4, x_5); +lean_dec(x_3); +lean_dec(x_2); +return x_6; +} +} +lean_object* l_HashSetImp_fold___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_HashSetImp_fold___rarg(x_1, x_2, x_3); +lean_dec(x_3); +return x_4; +} +} +lean_object* l_HashSetImp_find_x3f___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; size_t x_8; size_t x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_5 = lean_ctor_get(x_3, 1); +x_6 = lean_array_get_size(x_5); +lean_inc(x_4); +x_7 = lean_apply_1(x_2, x_4); +x_8 = lean_unbox_usize(x_7); +lean_dec(x_7); +x_9 = lean_usize_modn(x_8, x_6); +lean_dec(x_6); +x_10 = lean_apply_1(x_1, x_4); +x_11 = lean_array_uget(x_5, x_9); +x_12 = l_List_find_x3f___main___rarg(x_10, x_11); +return x_12; +} +} +lean_object* l_HashSetImp_find_x3f(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_HashSetImp_find_x3f___rarg___boxed), 4, 0); +return x_2; +} +} +lean_object* l_HashSetImp_find_x3f___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_HashSetImp_find_x3f___rarg(x_1, x_2, x_3, x_4); +lean_dec(x_3); +return x_5; +} +} +uint8_t l_HashSetImp_contains___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; size_t x_8; size_t x_9; lean_object* x_10; uint8_t x_11; +x_5 = lean_ctor_get(x_3, 1); +x_6 = lean_array_get_size(x_5); +lean_inc(x_4); +x_7 = lean_apply_1(x_2, x_4); +x_8 = lean_unbox_usize(x_7); +lean_dec(x_7); +x_9 = lean_usize_modn(x_8, x_6); +lean_dec(x_6); +x_10 = lean_array_uget(x_5, x_9); +x_11 = l_List_elem___main___rarg(x_1, x_4, x_10); +return x_11; +} +} +lean_object* l_HashSetImp_contains(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_HashSetImp_contains___rarg___boxed), 4, 0); +return x_2; +} +} +lean_object* l_HashSetImp_contains___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +uint8_t x_5; lean_object* x_6; +x_5 = l_HashSetImp_contains___rarg(x_1, x_2, x_3, x_4); +lean_dec(x_3); +x_6 = lean_box(x_5); +return x_6; +} +} +lean_object* l_List_foldl___main___at_HashSetImp_moveEntries___main___spec__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +if (lean_obj_tag(x_3) == 0) +{ +lean_dec(x_1); +return x_2; +} +else +{ +uint8_t x_4; +x_4 = !lean_is_exclusive(x_3); +if (x_4 == 0) +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; size_t x_9; size_t x_10; lean_object* x_11; lean_object* x_12; +x_5 = lean_ctor_get(x_3, 0); +x_6 = lean_ctor_get(x_3, 1); +x_7 = lean_array_get_size(x_2); +lean_inc(x_1); +lean_inc(x_5); +x_8 = lean_apply_1(x_1, x_5); +x_9 = lean_unbox_usize(x_8); +lean_dec(x_8); +x_10 = lean_usize_modn(x_9, x_7); +lean_dec(x_7); +x_11 = lean_array_uget(x_2, x_10); +lean_ctor_set(x_3, 1, x_11); +x_12 = lean_array_uset(x_2, x_10, x_3); +x_2 = x_12; +x_3 = x_6; +goto _start; +} +else +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; size_t x_18; size_t x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_14 = lean_ctor_get(x_3, 0); +x_15 = lean_ctor_get(x_3, 1); +lean_inc(x_15); +lean_inc(x_14); +lean_dec(x_3); +x_16 = lean_array_get_size(x_2); +lean_inc(x_1); +lean_inc(x_14); +x_17 = lean_apply_1(x_1, x_14); +x_18 = lean_unbox_usize(x_17); +lean_dec(x_17); +x_19 = lean_usize_modn(x_18, x_16); +lean_dec(x_16); +x_20 = lean_array_uget(x_2, x_19); +x_21 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_21, 0, x_14); +lean_ctor_set(x_21, 1, x_20); +x_22 = lean_array_uset(x_2, x_19, x_21); +x_2 = x_22; +x_3 = x_15; +goto _start; +} +} +} +} +lean_object* l_List_foldl___main___at_HashSetImp_moveEntries___main___spec__1(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_List_foldl___main___at_HashSetImp_moveEntries___main___spec__1___rarg), 3, 0); +return x_2; +} +} +lean_object* l_HashSetImp_moveEntries___main___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; uint8_t x_6; +x_5 = lean_array_get_size(x_3); +x_6 = lean_nat_dec_lt(x_2, x_5); +lean_dec(x_5); +if (x_6 == 0) +{ +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +return x_4; +} +else +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_7 = lean_array_fget(x_3, x_2); +x_8 = lean_box(0); +x_9 = lean_array_fset(x_3, x_2, x_8); +lean_inc(x_1); +x_10 = l_List_foldl___main___at_HashSetImp_moveEntries___main___spec__1___rarg(x_1, x_4, x_7); +x_11 = lean_unsigned_to_nat(1u); +x_12 = lean_nat_add(x_2, x_11); +lean_dec(x_2); +x_2 = x_12; +x_3 = x_9; +x_4 = x_10; +goto _start; +} +} +} +lean_object* l_HashSetImp_moveEntries___main(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_HashSetImp_moveEntries___main___rarg), 4, 0); +return x_2; +} +} +lean_object* l_HashSetImp_moveEntries___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_HashSetImp_moveEntries___main___rarg(x_1, x_2, x_3, x_4); +return x_5; +} +} +lean_object* l_HashSetImp_moveEntries(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_HashSetImp_moveEntries___rarg), 4, 0); +return x_2; +} +} +lean_object* l_HashSetImp_expand___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_4 = lean_array_get_size(x_3); +x_5 = lean_unsigned_to_nat(2u); +x_6 = lean_nat_mul(x_4, x_5); +lean_dec(x_4); +x_7 = lean_box(0); +x_8 = lean_mk_array(x_6, x_7); +x_9 = lean_unsigned_to_nat(0u); +x_10 = l_HashSetImp_moveEntries___main___rarg(x_1, x_9, x_3, x_8); +x_11 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_11, 0, x_2); +lean_ctor_set(x_11, 1, x_10); +return x_11; +} +} +lean_object* l_HashSetImp_expand(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_HashSetImp_expand___rarg), 3, 0); +return x_2; +} +} +lean_object* l_HashSetImp_insert___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +uint8_t x_5; +x_5 = !lean_is_exclusive(x_3); +if (x_5 == 0) +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; size_t x_10; size_t x_11; lean_object* x_12; uint8_t x_13; +x_6 = lean_ctor_get(x_3, 0); +x_7 = lean_ctor_get(x_3, 1); +x_8 = lean_array_get_size(x_7); +lean_inc(x_2); +lean_inc(x_4); +x_9 = lean_apply_1(x_2, x_4); +x_10 = lean_unbox_usize(x_9); +lean_dec(x_9); +x_11 = lean_usize_modn(x_10, x_8); +x_12 = lean_array_uget(x_7, x_11); +lean_inc(x_12); +lean_inc(x_4); +lean_inc(x_1); +x_13 = l_List_elem___main___rarg(x_1, x_4, x_12); +if (x_13 == 0) +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18; +lean_dec(x_1); +x_14 = lean_unsigned_to_nat(1u); +x_15 = lean_nat_add(x_6, x_14); +lean_dec(x_6); +x_16 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_16, 0, x_4); +lean_ctor_set(x_16, 1, x_12); +x_17 = lean_array_uset(x_7, x_11, x_16); +x_18 = lean_nat_dec_le(x_15, x_8); +lean_dec(x_8); +if (x_18 == 0) +{ +lean_object* x_19; +lean_free_object(x_3); +x_19 = l_HashSetImp_expand___rarg(x_2, x_15, x_17); +return x_19; +} +else +{ +lean_dec(x_2); +lean_ctor_set(x_3, 1, x_17); +lean_ctor_set(x_3, 0, x_15); +return x_3; +} +} +else +{ +lean_object* x_20; lean_object* x_21; +lean_dec(x_8); +lean_dec(x_2); +lean_inc(x_4); +x_20 = l_List_replace___main___rarg(x_1, x_12, x_4, x_4); +x_21 = lean_array_uset(x_7, x_11, x_20); +lean_ctor_set(x_3, 1, x_21); +return x_3; +} +} +else +{ +lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; size_t x_26; size_t x_27; lean_object* x_28; uint8_t x_29; +x_22 = lean_ctor_get(x_3, 0); +x_23 = lean_ctor_get(x_3, 1); +lean_inc(x_23); +lean_inc(x_22); +lean_dec(x_3); +x_24 = lean_array_get_size(x_23); +lean_inc(x_2); +lean_inc(x_4); +x_25 = lean_apply_1(x_2, x_4); +x_26 = lean_unbox_usize(x_25); +lean_dec(x_25); +x_27 = lean_usize_modn(x_26, x_24); +x_28 = lean_array_uget(x_23, x_27); +lean_inc(x_28); +lean_inc(x_4); +lean_inc(x_1); +x_29 = l_List_elem___main___rarg(x_1, x_4, x_28); +if (x_29 == 0) +{ +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; uint8_t x_34; +lean_dec(x_1); +x_30 = lean_unsigned_to_nat(1u); +x_31 = lean_nat_add(x_22, x_30); +lean_dec(x_22); +x_32 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_32, 0, x_4); +lean_ctor_set(x_32, 1, x_28); +x_33 = lean_array_uset(x_23, x_27, x_32); +x_34 = lean_nat_dec_le(x_31, x_24); +lean_dec(x_24); +if (x_34 == 0) +{ +lean_object* x_35; +x_35 = l_HashSetImp_expand___rarg(x_2, x_31, x_33); +return x_35; +} +else +{ +lean_object* x_36; +lean_dec(x_2); +x_36 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_36, 0, x_31); +lean_ctor_set(x_36, 1, x_33); +return x_36; +} +} +else +{ +lean_object* x_37; lean_object* x_38; lean_object* x_39; +lean_dec(x_24); +lean_dec(x_2); +lean_inc(x_4); +x_37 = l_List_replace___main___rarg(x_1, x_28, x_4, x_4); +x_38 = lean_array_uset(x_23, x_27, x_37); +x_39 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_39, 0, x_22); +lean_ctor_set(x_39, 1, x_38); +return x_39; +} +} +} +} +lean_object* l_HashSetImp_insert(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_HashSetImp_insert___rarg), 4, 0); +return x_2; +} +} +lean_object* l_HashSetImp_erase___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; size_t x_9; size_t x_10; lean_object* x_11; uint8_t x_12; +x_5 = lean_ctor_get(x_3, 0); +lean_inc(x_5); +x_6 = lean_ctor_get(x_3, 1); +lean_inc(x_6); +x_7 = lean_array_get_size(x_6); +lean_inc(x_4); +x_8 = lean_apply_1(x_2, x_4); +x_9 = lean_unbox_usize(x_8); +lean_dec(x_8); +x_10 = lean_usize_modn(x_9, x_7); +lean_dec(x_7); +x_11 = lean_array_uget(x_6, x_10); +lean_inc(x_11); +lean_inc(x_4); +lean_inc(x_1); +x_12 = l_List_elem___main___rarg(x_1, x_4, x_11); +if (x_12 == 0) +{ +lean_dec(x_11); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_1); +return x_3; +} +else +{ +uint8_t x_13; +x_13 = !lean_is_exclusive(x_3); +if (x_13 == 0) +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_14 = lean_ctor_get(x_3, 1); +lean_dec(x_14); +x_15 = lean_ctor_get(x_3, 0); +lean_dec(x_15); +x_16 = lean_unsigned_to_nat(1u); +x_17 = lean_nat_sub(x_5, x_16); +lean_dec(x_5); +x_18 = l_List_erase___main___rarg(x_1, x_11, x_4); +x_19 = lean_array_uset(x_6, x_10, x_18); +lean_ctor_set(x_3, 1, x_19); +lean_ctor_set(x_3, 0, x_17); +return x_3; +} +else +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; +lean_dec(x_3); +x_20 = lean_unsigned_to_nat(1u); +x_21 = lean_nat_sub(x_5, x_20); +lean_dec(x_5); +x_22 = l_List_erase___main___rarg(x_1, x_11, x_4); +x_23 = lean_array_uset(x_6, x_10, x_22); +x_24 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_24, 0, x_21); +lean_ctor_set(x_24, 1, x_23); +return x_24; +} +} +} +} +lean_object* l_HashSetImp_erase(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_HashSetImp_erase___rarg), 4, 0); +return x_2; +} +} lean_object* l_mkHashSet___rarg(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = l_mkHashMapImp___rarg(x_1); +x_2 = l_mkHashSetImp___rarg(x_1); return x_2; } } @@ -95,11 +1104,20 @@ lean_dec(x_2); return x_4; } } +lean_object* _init_l_HashSet_Inhabited___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = lean_unsigned_to_nat(8u); +x_2 = l_mkHashSetImp___rarg(x_1); +return x_2; +} +} lean_object* l_HashSet_Inhabited(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; -x_4 = l_HashMap_Inhabited___closed__1; +x_4 = l_HashSet_Inhabited___closed__1; return x_4; } } @@ -117,7 +1135,7 @@ lean_object* l_HashSet_HasEmptyc(lean_object* x_1, lean_object* x_2, lean_object _start: { lean_object* x_4; -x_4 = l_HashMap_Inhabited___closed__1; +x_4 = l_HashSet_Inhabited___closed__1; return x_4; } } @@ -134,10 +1152,9 @@ return x_4; lean_object* l_HashSet_insert___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { -lean_object* x_5; lean_object* x_6; -x_5 = lean_box(0); -x_6 = l_HashMapImp_insert___rarg(x_1, x_2, x_3, x_4, x_5); -return x_6; +lean_object* x_5; +x_5 = l_HashSetImp_insert___rarg(x_1, x_2, x_3, x_4); +return x_5; } } lean_object* l_HashSet_insert(lean_object* x_1) { @@ -152,7 +1169,7 @@ lean_object* l_HashSet_erase___rarg(lean_object* x_1, lean_object* x_2, lean_obj _start: { lean_object* x_5; -x_5 = l_HashMapImp_erase___rarg(x_1, x_2, x_3, x_4); +x_5 = l_HashSetImp_erase___rarg(x_1, x_2, x_3, x_4); return x_5; } } @@ -168,42 +1185,9 @@ lean_object* l_HashSet_find_x3f___rarg(lean_object* x_1, lean_object* x_2, lean_ _start: { lean_object* x_5; -x_5 = l_HashMapImp_findEntry_x3f___rarg(x_1, x_2, x_3, x_4); -if (lean_obj_tag(x_5) == 0) -{ -lean_object* x_6; -x_6 = lean_box(0); -return x_6; -} -else -{ -uint8_t x_7; -x_7 = !lean_is_exclusive(x_5); -if (x_7 == 0) -{ -lean_object* x_8; lean_object* x_9; -x_8 = lean_ctor_get(x_5, 0); -x_9 = lean_ctor_get(x_8, 0); -lean_inc(x_9); -lean_dec(x_8); -lean_ctor_set(x_5, 0, x_9); +x_5 = l_HashSetImp_find_x3f___rarg(x_1, x_2, x_3, x_4); return x_5; } -else -{ -lean_object* x_10; lean_object* x_11; lean_object* x_12; -x_10 = lean_ctor_get(x_5, 0); -lean_inc(x_10); -lean_dec(x_5); -x_11 = lean_ctor_get(x_10, 0); -lean_inc(x_11); -lean_dec(x_10); -x_12 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_12, 0, x_11); -return x_12; -} -} -} } lean_object* l_HashSet_find_x3f(lean_object* x_1) { _start: @@ -226,7 +1210,7 @@ uint8_t l_HashSet_contains___rarg(lean_object* x_1, lean_object* x_2, lean_objec _start: { uint8_t x_5; -x_5 = l_HashMapImp_contains___rarg(x_1, x_2, x_3, x_4); +x_5 = l_HashSetImp_contains___rarg(x_1, x_2, x_3, x_4); return x_5; } } @@ -248,6 +1232,211 @@ x_6 = lean_box(x_5); return x_6; } } +lean_object* l_Array_iterateMAux___main___at_HashSet_foldM___spec__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; uint8_t x_8; +x_7 = lean_array_get_size(x_4); +x_8 = lean_nat_dec_lt(x_5, x_7); +lean_dec(x_7); +if (x_8 == 0) +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_9 = lean_ctor_get(x_1, 0); +lean_inc(x_9); +lean_dec(x_1); +x_10 = lean_ctor_get(x_9, 1); +lean_inc(x_10); +lean_dec(x_9); +x_11 = lean_apply_2(x_10, lean_box(0), x_6); +return x_11; +} +else +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_12 = lean_ctor_get(x_1, 1); +lean_inc(x_12); +x_13 = lean_array_fget(x_4, x_5); +lean_inc(x_2); +lean_inc(x_1); +x_14 = l_List_foldlM___main___rarg(x_1, lean_box(0), lean_box(0), x_2, x_6, x_13); +x_15 = lean_unsigned_to_nat(1u); +x_16 = lean_nat_add(x_5, x_15); +x_17 = lean_alloc_closure((void*)(l_Array_iterateMAux___main___at_HashSet_foldM___spec__1___rarg___boxed), 6, 5); +lean_closure_set(x_17, 0, x_1); +lean_closure_set(x_17, 1, x_2); +lean_closure_set(x_17, 2, x_3); +lean_closure_set(x_17, 3, x_4); +lean_closure_set(x_17, 4, x_16); +x_18 = lean_apply_4(x_12, lean_box(0), lean_box(0), x_14, x_17); +return x_18; +} +} +} +lean_object* l_Array_iterateMAux___main___at_HashSet_foldM___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = lean_alloc_closure((void*)(l_Array_iterateMAux___main___at_HashSet_foldM___spec__1___rarg___boxed), 6, 0); +return x_4; +} +} +lean_object* l_HashSet_foldM___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; +x_5 = lean_ctor_get(x_4, 1); +lean_inc(x_5); +x_6 = lean_unsigned_to_nat(0u); +x_7 = l_Array_iterateMAux___main___at_HashSet_foldM___spec__1___rarg(x_1, x_2, x_4, x_5, x_6, x_3); +return x_7; +} +} +lean_object* l_HashSet_foldM(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; +x_6 = lean_alloc_closure((void*)(l_HashSet_foldM___rarg), 4, 0); +return x_6; +} +} +lean_object* l_Array_iterateMAux___main___at_HashSet_foldM___spec__1___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; +x_7 = l_Array_iterateMAux___main___at_HashSet_foldM___spec__1___rarg(x_1, x_2, x_3, x_4, x_5, x_6); +lean_dec(x_5); +return x_7; +} +} +lean_object* l_HashSet_foldM___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; +x_6 = l_HashSet_foldM(x_1, x_2, x_3, x_4, x_5); +lean_dec(x_3); +lean_dec(x_2); +return x_6; +} +} +lean_object* l_List_foldlM___main___at_HashSet_fold___spec__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +if (lean_obj_tag(x_3) == 0) +{ +lean_dec(x_1); +return x_2; +} +else +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_4 = lean_ctor_get(x_3, 0); +lean_inc(x_4); +x_5 = lean_ctor_get(x_3, 1); +lean_inc(x_5); +lean_dec(x_3); +lean_inc(x_1); +x_6 = lean_apply_2(x_1, x_2, x_4); +x_2 = x_6; +x_3 = x_5; +goto _start; +} +} +} +lean_object* l_List_foldlM___main___at_HashSet_fold___spec__1(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l_List_foldlM___main___at_HashSet_fold___spec__1___rarg), 3, 0); +return x_3; +} +} +lean_object* l_Array_iterateMAux___main___at_HashSet_fold___spec__2___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; uint8_t x_7; +x_6 = lean_array_get_size(x_3); +x_7 = lean_nat_dec_lt(x_4, x_6); +lean_dec(x_6); +if (x_7 == 0) +{ +lean_dec(x_4); +lean_dec(x_1); +return x_5; +} +else +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_8 = lean_array_fget(x_3, x_4); +lean_inc(x_1); +x_9 = l_List_foldlM___main___at_HashSet_fold___spec__1___rarg(x_1, x_5, x_8); +x_10 = lean_unsigned_to_nat(1u); +x_11 = lean_nat_add(x_4, x_10); +lean_dec(x_4); +x_4 = x_11; +x_5 = x_9; +goto _start; +} +} +} +lean_object* l_Array_iterateMAux___main___at_HashSet_fold___spec__2(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l_Array_iterateMAux___main___at_HashSet_fold___spec__2___rarg___boxed), 5, 0); +return x_3; +} +} +lean_object* l_HashSet_fold___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_4 = lean_ctor_get(x_3, 1); +x_5 = lean_unsigned_to_nat(0u); +x_6 = l_Array_iterateMAux___main___at_HashSet_fold___spec__2___rarg(x_1, x_3, x_4, x_5, x_2); +return x_6; +} +} +lean_object* l_HashSet_fold(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = lean_alloc_closure((void*)(l_HashSet_fold___rarg___boxed), 3, 0); +return x_5; +} +} +lean_object* l_Array_iterateMAux___main___at_HashSet_fold___spec__2___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; +x_6 = l_Array_iterateMAux___main___at_HashSet_fold___spec__2___rarg(x_1, x_2, x_3, x_4, x_5); +lean_dec(x_3); +lean_dec(x_2); +return x_6; +} +} +lean_object* l_HashSet_fold___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_HashSet_fold___rarg(x_1, x_2, x_3); +lean_dec(x_3); +return x_4; +} +} +lean_object* l_HashSet_fold___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_HashSet_fold(x_1, x_2, x_3, x_4); +lean_dec(x_3); +lean_dec(x_2); +return x_5; +} +} lean_object* l_HashSet_size___rarg(lean_object* x_1) { _start: { @@ -326,7 +1515,7 @@ lean_object* l_HashSet_empty(lean_object* x_1, lean_object* x_2, lean_object* x_ _start: { lean_object* x_4; -x_4 = l_HashMap_Inhabited___closed__1; +x_4 = l_HashSet_Inhabited___closed__1; return x_4; } } @@ -340,273 +1529,309 @@ lean_dec(x_2); return x_4; } } -lean_object* l_AssocList_foldlM___main___at_HashSet_foldM___spec__1___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +lean_object* l_List_foldlM___main___at_HashSet_toList___spec__1___rarg(lean_object* x_1, lean_object* x_2) { _start: { -lean_object* x_5; -x_5 = l_AssocList_foldlM___main___at_HashSet_foldM___spec__1___rarg(x_1, x_2, x_4, x_3); +if (lean_obj_tag(x_2) == 0) +{ +return x_1; +} +else +{ +uint8_t x_3; +x_3 = !lean_is_exclusive(x_2); +if (x_3 == 0) +{ +lean_object* x_4; +x_4 = lean_ctor_get(x_2, 1); +lean_ctor_set(x_2, 1, x_1); +x_1 = x_2; +x_2 = x_4; +goto _start; +} +else +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; +x_6 = lean_ctor_get(x_2, 0); +x_7 = lean_ctor_get(x_2, 1); +lean_inc(x_7); +lean_inc(x_6); +lean_dec(x_2); +x_8 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_8, 0, x_6); +lean_ctor_set(x_8, 1, x_1); +x_1 = x_8; +x_2 = x_7; +goto _start; +} +} +} +} +lean_object* l_List_foldlM___main___at_HashSet_toList___spec__1(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_List_foldlM___main___at_HashSet_toList___spec__1___rarg), 2, 0); +return x_2; +} +} +lean_object* l_Array_iterateMAux___main___at_HashSet_toList___spec__2___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; uint8_t x_6; +x_5 = lean_array_get_size(x_2); +x_6 = lean_nat_dec_lt(x_3, x_5); +lean_dec(x_5); +if (x_6 == 0) +{ +lean_dec(x_3); +return x_4; +} +else +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_7 = lean_array_fget(x_2, x_3); +x_8 = l_List_foldlM___main___at_HashSet_toList___spec__1___rarg(x_4, x_7); +x_9 = lean_unsigned_to_nat(1u); +x_10 = lean_nat_add(x_3, x_9); +lean_dec(x_3); +x_3 = x_10; +x_4 = x_8; +goto _start; +} +} +} +lean_object* l_Array_iterateMAux___main___at_HashSet_toList___spec__2(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Array_iterateMAux___main___at_HashSet_toList___spec__2___rarg___boxed), 4, 0); +return x_2; +} +} +lean_object* l_HashSet_toList___rarg(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; +x_2 = lean_box(0); +x_3 = lean_ctor_get(x_1, 1); +x_4 = lean_unsigned_to_nat(0u); +x_5 = l_Array_iterateMAux___main___at_HashSet_toList___spec__2___rarg(x_1, x_3, x_4, x_2); return x_5; } } -lean_object* l_AssocList_foldlM___main___at_HashSet_foldM___spec__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -if (lean_obj_tag(x_4) == 0) -{ -lean_object* x_5; lean_object* x_6; lean_object* x_7; -lean_dec(x_2); -x_5 = lean_ctor_get(x_1, 0); -lean_inc(x_5); -lean_dec(x_1); -x_6 = lean_ctor_get(x_5, 1); -lean_inc(x_6); -lean_dec(x_5); -x_7 = lean_apply_2(x_6, lean_box(0), x_3); -return x_7; -} -else -{ -lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; -x_8 = lean_ctor_get(x_4, 0); -lean_inc(x_8); -x_9 = lean_ctor_get(x_4, 2); -lean_inc(x_9); -lean_dec(x_4); -x_10 = lean_ctor_get(x_1, 1); -lean_inc(x_10); -lean_inc(x_2); -x_11 = lean_apply_2(x_2, x_3, x_8); -x_12 = lean_alloc_closure((void*)(l_AssocList_foldlM___main___at_HashSet_foldM___spec__1___rarg___lambda__1), 4, 3); -lean_closure_set(x_12, 0, x_1); -lean_closure_set(x_12, 1, x_2); -lean_closure_set(x_12, 2, x_9); -x_13 = lean_apply_4(x_10, lean_box(0), lean_box(0), x_11, x_12); -return x_13; -} -} -} -lean_object* l_AssocList_foldlM___main___at_HashSet_foldM___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_HashSet_toList(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; -x_4 = lean_alloc_closure((void*)(l_AssocList_foldlM___main___at_HashSet_foldM___spec__1___rarg), 4, 0); +x_4 = lean_alloc_closure((void*)(l_HashSet_toList___rarg___boxed), 1, 0); return x_4; } } -lean_object* l_Array_iterateMAux___main___at_HashSet_foldM___spec__2___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +lean_object* l_Array_iterateMAux___main___at_HashSet_toList___spec__2___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { -lean_object* x_7; uint8_t x_8; -x_7 = lean_array_get_size(x_4); -x_8 = lean_nat_dec_lt(x_5, x_7); -lean_dec(x_7); -if (x_8 == 0) -{ -lean_object* x_9; lean_object* x_10; lean_object* x_11; -lean_dec(x_4); -lean_dec(x_3); +lean_object* x_5; +x_5 = l_Array_iterateMAux___main___at_HashSet_toList___spec__2___rarg(x_1, x_2, x_3, x_4); lean_dec(x_2); -x_9 = lean_ctor_get(x_1, 0); -lean_inc(x_9); lean_dec(x_1); -x_10 = lean_ctor_get(x_9, 1); -lean_inc(x_10); -lean_dec(x_9); -x_11 = lean_apply_2(x_10, lean_box(0), x_6); -return x_11; -} -else -{ -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; -x_12 = lean_ctor_get(x_1, 1); -lean_inc(x_12); -x_13 = lean_array_fget(x_4, x_5); -lean_inc(x_2); -lean_inc(x_1); -x_14 = l_AssocList_foldlM___main___at_HashSet_foldM___spec__1___rarg(x_1, x_2, x_6, x_13); -x_15 = lean_unsigned_to_nat(1u); -x_16 = lean_nat_add(x_5, x_15); -x_17 = lean_alloc_closure((void*)(l_Array_iterateMAux___main___at_HashSet_foldM___spec__2___rarg___boxed), 6, 5); -lean_closure_set(x_17, 0, x_1); -lean_closure_set(x_17, 1, x_2); -lean_closure_set(x_17, 2, x_3); -lean_closure_set(x_17, 3, x_4); -lean_closure_set(x_17, 4, x_16); -x_18 = lean_apply_4(x_12, lean_box(0), lean_box(0), x_14, x_17); -return x_18; +return x_5; } } -} -lean_object* l_Array_iterateMAux___main___at_HashSet_foldM___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_HashSet_toList___rarg___boxed(lean_object* x_1) { _start: { -lean_object* x_4; -x_4 = lean_alloc_closure((void*)(l_Array_iterateMAux___main___at_HashSet_foldM___spec__2___rarg___boxed), 6, 0); -return x_4; -} -} -lean_object* l_HashSet_foldM___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; lean_object* x_6; lean_object* x_7; -x_5 = lean_ctor_get(x_4, 1); -lean_inc(x_5); -x_6 = lean_unsigned_to_nat(0u); -x_7 = l_Array_iterateMAux___main___at_HashSet_foldM___spec__2___rarg(x_1, x_2, x_4, x_5, x_6, x_3); -return x_7; -} -} -lean_object* l_HashSet_foldM(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { -_start: -{ -lean_object* x_6; -x_6 = lean_alloc_closure((void*)(l_HashSet_foldM___rarg), 4, 0); -return x_6; -} -} -lean_object* l_Array_iterateMAux___main___at_HashSet_foldM___spec__2___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { -_start: -{ -lean_object* x_7; -x_7 = l_Array_iterateMAux___main___at_HashSet_foldM___spec__2___rarg(x_1, x_2, x_3, x_4, x_5, x_6); -lean_dec(x_5); -return x_7; -} -} -lean_object* l_HashSet_foldM___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { -_start: -{ -lean_object* x_6; -x_6 = l_HashSet_foldM(x_1, x_2, x_3, x_4, x_5); -lean_dec(x_3); -lean_dec(x_2); -return x_6; -} -} -lean_object* l_AssocList_foldlM___main___at_HashSet_fold___spec__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -if (lean_obj_tag(x_3) == 0) -{ +lean_object* x_2; +x_2 = l_HashSet_toList___rarg(x_1); lean_dec(x_1); return x_2; } -else -{ -lean_object* x_4; lean_object* x_5; lean_object* x_6; -x_4 = lean_ctor_get(x_3, 0); -lean_inc(x_4); -x_5 = lean_ctor_get(x_3, 2); -lean_inc(x_5); -lean_dec(x_3); -lean_inc(x_1); -x_6 = lean_apply_2(x_1, x_2, x_4); -x_2 = x_6; -x_3 = x_5; -goto _start; } -} -} -lean_object* l_AssocList_foldlM___main___at_HashSet_fold___spec__1(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = lean_alloc_closure((void*)(l_AssocList_foldlM___main___at_HashSet_fold___spec__1___rarg), 3, 0); -return x_3; -} -} -lean_object* l_Array_iterateMAux___main___at_HashSet_fold___spec__2___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { -_start: -{ -lean_object* x_6; uint8_t x_7; -x_6 = lean_array_get_size(x_3); -x_7 = lean_nat_dec_lt(x_4, x_6); -lean_dec(x_6); -if (x_7 == 0) -{ -lean_dec(x_4); -lean_dec(x_1); -return x_5; -} -else -{ -lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; -x_8 = lean_array_fget(x_3, x_4); -lean_inc(x_1); -x_9 = l_AssocList_foldlM___main___at_HashSet_fold___spec__1___rarg(x_1, x_5, x_8); -x_10 = lean_unsigned_to_nat(1u); -x_11 = lean_nat_add(x_4, x_10); -lean_dec(x_4); -x_4 = x_11; -x_5 = x_9; -goto _start; -} -} -} -lean_object* l_Array_iterateMAux___main___at_HashSet_fold___spec__2(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = lean_alloc_closure((void*)(l_Array_iterateMAux___main___at_HashSet_fold___spec__2___rarg___boxed), 5, 0); -return x_3; -} -} -lean_object* l_HashSet_fold___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; lean_object* x_5; lean_object* x_6; -x_4 = lean_ctor_get(x_3, 1); -x_5 = lean_unsigned_to_nat(0u); -x_6 = l_Array_iterateMAux___main___at_HashSet_fold___spec__2___rarg(x_1, x_3, x_4, x_5, x_2); -return x_6; -} -} -lean_object* l_HashSet_fold(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; -x_5 = lean_alloc_closure((void*)(l_HashSet_fold___rarg___boxed), 3, 0); -return x_5; -} -} -lean_object* l_Array_iterateMAux___main___at_HashSet_fold___spec__2___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { -_start: -{ -lean_object* x_6; -x_6 = l_Array_iterateMAux___main___at_HashSet_fold___spec__2___rarg(x_1, x_2, x_3, x_4, x_5); -lean_dec(x_3); -lean_dec(x_2); -return x_6; -} -} -lean_object* l_HashSet_fold___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_HashSet_toList___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; -x_4 = l_HashSet_fold___rarg(x_1, x_2, x_3); +x_4 = l_HashSet_toList(x_1, x_2, x_3); lean_dec(x_3); +lean_dec(x_2); return x_4; } } -lean_object* l_HashSet_fold___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +lean_object* l_List_foldlM___main___at_HashSet_toArray___spec__1___rarg(lean_object* x_1, lean_object* x_2) { _start: { -lean_object* x_5; -x_5 = l_HashSet_fold(x_1, x_2, x_3, x_4); -lean_dec(x_3); +if (lean_obj_tag(x_2) == 0) +{ +return x_1; +} +else +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; +x_3 = lean_ctor_get(x_2, 0); +lean_inc(x_3); +x_4 = lean_ctor_get(x_2, 1); +lean_inc(x_4); lean_dec(x_2); +x_5 = lean_array_push(x_1, x_3); +x_1 = x_5; +x_2 = x_4; +goto _start; +} +} +} +lean_object* l_List_foldlM___main___at_HashSet_toArray___spec__1(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_List_foldlM___main___at_HashSet_toArray___spec__1___rarg), 2, 0); +return x_2; +} +} +lean_object* l_Array_iterateMAux___main___at_HashSet_toArray___spec__2___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; uint8_t x_6; +x_5 = lean_array_get_size(x_2); +x_6 = lean_nat_dec_lt(x_3, x_5); +lean_dec(x_5); +if (x_6 == 0) +{ +lean_dec(x_3); +return x_4; +} +else +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_7 = lean_array_fget(x_2, x_3); +x_8 = l_List_foldlM___main___at_HashSet_toArray___spec__1___rarg(x_4, x_7); +x_9 = lean_unsigned_to_nat(1u); +x_10 = lean_nat_add(x_3, x_9); +lean_dec(x_3); +x_3 = x_10; +x_4 = x_8; +goto _start; +} +} +} +lean_object* l_Array_iterateMAux___main___at_HashSet_toArray___spec__2(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Array_iterateMAux___main___at_HashSet_toArray___spec__2___rarg___boxed), 4, 0); +return x_2; +} +} +lean_object* l_HashSet_toArray___rarg(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; +x_2 = lean_ctor_get(x_1, 1); +x_3 = lean_unsigned_to_nat(0u); +x_4 = l_Array_empty___closed__1; +x_5 = l_Array_iterateMAux___main___at_HashSet_toArray___spec__2___rarg(x_1, x_2, x_3, x_4); return x_5; } } -lean_object* initialize_Init_Data_HashMap(lean_object*); +lean_object* l_HashSet_toArray(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = lean_alloc_closure((void*)(l_HashSet_toArray___rarg___boxed), 1, 0); +return x_4; +} +} +lean_object* l_Array_iterateMAux___main___at_HashSet_toArray___spec__2___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_Array_iterateMAux___main___at_HashSet_toArray___spec__2___rarg(x_1, x_2, x_3, x_4); +lean_dec(x_2); +lean_dec(x_1); +return x_5; +} +} +lean_object* l_HashSet_toArray___rarg___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_HashSet_toArray___rarg(x_1); +lean_dec(x_1); +return x_2; +} +} +lean_object* l_HashSet_toArray___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_HashSet_toArray(x_1, x_2, x_3); +lean_dec(x_3); +lean_dec(x_2); +return x_4; +} +} +lean_object* l_HashSet_numBuckets___rarg(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; +x_2 = lean_ctor_get(x_1, 1); +x_3 = lean_array_get_size(x_2); +return x_3; +} +} +lean_object* l_HashSet_numBuckets(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = lean_alloc_closure((void*)(l_HashSet_numBuckets___rarg___boxed), 1, 0); +return x_4; +} +} +lean_object* l_HashSet_numBuckets___rarg___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_HashSet_numBuckets___rarg(x_1); +lean_dec(x_1); +return x_2; +} +} +lean_object* l_HashSet_numBuckets___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_HashSet_numBuckets(x_1, x_2, x_3); +lean_dec(x_3); +lean_dec(x_2); +return x_4; +} +} +lean_object* initialize_Init_Data_Array_Basic(lean_object*); +lean_object* initialize_Init_Data_List_Control(lean_object*); +lean_object* initialize_Init_Data_Option_Basic(lean_object*); +lean_object* initialize_Init_Data_Hashable(lean_object*); static bool _G_initialized = false; lean_object* initialize_Init_Data_HashSet(lean_object* w) { lean_object * res; if (_G_initialized) return lean_mk_io_result(lean_box(0)); _G_initialized = true; -res = initialize_Init_Data_HashMap(lean_io_mk_world()); +res = initialize_Init_Data_Array_Basic(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +res = initialize_Init_Data_List_Control(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_Init_Data_Option_Basic(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_Init_Data_Hashable(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +l_mkHashSetImp___rarg___closed__1 = _init_l_mkHashSetImp___rarg___closed__1(); +lean_mark_persistent(l_mkHashSetImp___rarg___closed__1); +l_mkHashSetImp___rarg___closed__2 = _init_l_mkHashSetImp___rarg___closed__2(); +lean_mark_persistent(l_mkHashSetImp___rarg___closed__2); +l_HashSet_Inhabited___closed__1 = _init_l_HashSet_Inhabited___closed__1(); +lean_mark_persistent(l_HashSet_Inhabited___closed__1); return lean_mk_io_result(lean_box(0)); } #ifdef __cplusplus diff --git a/stage0/stdlib/Init/Data/List/Basic.c b/stage0/stdlib/Init/Data/List/Basic.c index 55b74ab243..73b2440a65 100644 --- a/stage0/stdlib/Init/Data/List/Basic.c +++ b/stage0/stdlib/Init/Data/List/Basic.c @@ -16,6 +16,7 @@ extern "C" { lean_object* l_List_reverse___rarg(lean_object*); lean_object* l_List_HasAppend(lean_object*); lean_object* l_List_erase___main___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_List_replace(lean_object*); lean_object* l_List_foldl___main(lean_object*, lean_object*); lean_object* l_List_isEqv___main___rarg___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_List_eraseDupsAux___main___rarg(lean_object*, lean_object*, lean_object*); @@ -52,6 +53,7 @@ lean_object* l_List_isPrefixOf___main(lean_object*); lean_object* l_List_filterAux___main___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_List_reverseAux(lean_object*); lean_object* l_List_lengthAux___rarg___boxed(lean_object*, lean_object*); +lean_object* l_List_replace___rarg(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_List_isSuffixOf___rarg(lean_object*, lean_object*, lean_object*); uint8_t l_List_isPrefixOf___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_List_isPrefixOf___rarg___boxed(lean_object*, lean_object*, lean_object*); @@ -126,6 +128,7 @@ lean_object* l_List_init___rarg(lean_object*); lean_object* l_List_isSuffixOf(lean_object*); uint8_t l_List_or(lean_object*); uint8_t l_List_isPrefixOf___main___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_List_replace___main(lean_object*); lean_object* l_List_replicate(lean_object*); lean_object* l_List_isPrefixOf___main___rarg___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_List_lengthAux___main___rarg___boxed(lean_object*, lean_object*); @@ -177,6 +180,7 @@ lean_object* l_List_partitionAux(lean_object*); lean_object* l_List_isEmpty(lean_object*); lean_object* l_List_drop___rarg(lean_object*, lean_object*); lean_object* l_List_take___rarg___boxed(lean_object*, lean_object*); +lean_object* l_List_replace___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_span___rarg(lean_object*, lean_object*); lean_object* l_List_hasDecEq___main(lean_object*); lean_object* l_List_erase(lean_object*); @@ -1880,6 +1884,109 @@ x_3 = lean_alloc_closure((void*)(l_List_findSome_x3f___rarg), 2, 0); return x_3; } } +lean_object* l_List_replace___main___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +if (lean_obj_tag(x_2) == 0) +{ +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_1); +return x_2; +} +else +{ +uint8_t x_5; +x_5 = !lean_is_exclusive(x_2); +if (x_5 == 0) +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; +x_6 = lean_ctor_get(x_2, 0); +x_7 = lean_ctor_get(x_2, 1); +lean_inc(x_1); +lean_inc(x_3); +lean_inc(x_6); +x_8 = lean_apply_2(x_1, x_6, x_3); +x_9 = lean_unbox(x_8); +lean_dec(x_8); +if (x_9 == 0) +{ +lean_object* x_10; +x_10 = l_List_replace___main___rarg(x_1, x_7, x_3, x_4); +lean_ctor_set(x_2, 1, x_10); +return x_2; +} +else +{ +lean_dec(x_6); +lean_dec(x_3); +lean_dec(x_1); +lean_ctor_set(x_2, 0, x_4); +return x_2; +} +} +else +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; +x_11 = lean_ctor_get(x_2, 0); +x_12 = lean_ctor_get(x_2, 1); +lean_inc(x_12); +lean_inc(x_11); +lean_dec(x_2); +lean_inc(x_1); +lean_inc(x_3); +lean_inc(x_11); +x_13 = lean_apply_2(x_1, x_11, x_3); +x_14 = lean_unbox(x_13); +lean_dec(x_13); +if (x_14 == 0) +{ +lean_object* x_15; lean_object* x_16; +x_15 = l_List_replace___main___rarg(x_1, x_12, x_3, x_4); +x_16 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_16, 0, x_11); +lean_ctor_set(x_16, 1, x_15); +return x_16; +} +else +{ +lean_object* x_17; +lean_dec(x_11); +lean_dec(x_3); +lean_dec(x_1); +x_17 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_17, 0, x_4); +lean_ctor_set(x_17, 1, x_12); +return x_17; +} +} +} +} +} +lean_object* l_List_replace___main(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_List_replace___main___rarg), 4, 0); +return x_2; +} +} +lean_object* l_List_replace___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_List_replace___main___rarg(x_1, x_2, x_3, x_4); +return x_5; +} +} +lean_object* l_List_replace(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_List_replace___rarg), 4, 0); +return x_2; +} +} uint8_t l_List_elem___main___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { diff --git a/stage0/stdlib/Init/Lean/Elab/Definition.c b/stage0/stdlib/Init/Lean/Elab/Definition.c index 4d1d74401e..29743bf34c 100644 --- a/stage0/stdlib/Init/Lean/Elab/Definition.c +++ b/stage0/stdlib/Init/Lean/Elab/Definition.c @@ -96,6 +96,7 @@ lean_object* l_Lean_Elab_Command_elabDefLike___lambda__2___boxed(lean_object*, l uint8_t l_Lean_Elab_Command_DefKind_isTheorem(uint8_t); extern lean_object* l_Lean_Elab_Command_withDeclId___closed__3; lean_object* l_Lean_Elab_Command_sortDeclLevelParams(lean_object*, lean_object*); +extern lean_object* l_HashSet_Inhabited___closed__1; lean_object* l_Lean_Elab_Command_elabDefVal___closed__3; lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabDefLike___spec__3(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabDefLike___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -124,7 +125,6 @@ lean_object* l_Lean_Elab_Term_elabBinders___rarg(lean_object*, lean_object*, lea lean_object* l_Lean_Elab_Command_removeUnused___closed__1; uint8_t l_Lean_NameSet_contains(lean_object*, lean_object*); lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*); -extern lean_object* l_HashMap_Inhabited___closed__1; uint8_t l_Lean_Elab_Command_DefKind_isDefOrOpaque(uint8_t); lean_object* lean_task_pure(lean_object*); lean_object* l___private_Init_Lean_Elab_Command_7__mkTermState(lean_object*); @@ -848,7 +848,7 @@ _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_HashMap_Inhabited___closed__1; +x_2 = l_HashSet_Inhabited___closed__1; x_3 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_3, 0, x_2); lean_ctor_set(x_3, 1, x_1); @@ -1342,7 +1342,7 @@ lean_object* _init_l_Lean_Elab_Command_mkDef___lambda__1___closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_HashMap_Inhabited___closed__1; +x_1 = l_HashSet_Inhabited___closed__1; x_2 = l_Array_empty___closed__1; x_3 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_3, 0, x_1); diff --git a/stage0/stdlib/Init/Lean/Elab/Tactic/Basic.c b/stage0/stdlib/Init/Lean/Elab/Tactic/Basic.c index 2a49fdb691..a03933fabc 100644 --- a/stage0/stdlib/Init/Lean/Elab/Tactic/Basic.c +++ b/stage0/stdlib/Init/Lean/Elab/Tactic/Basic.c @@ -302,6 +302,7 @@ lean_object* l_Lean_Elab_Tactic_tacticElabAttribute; lean_object* l_Lean_ConstantInfo_type(lean_object*); lean_object* l_Lean_MessageData_joinSep___main(lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_State_inhabited; +extern lean_object* l_HashSet_Inhabited___closed__1; lean_object* l_HashMapImp_find_x3f___at_Lean_Elab_Tactic_evalTactic___main___spec__5(lean_object*, lean_object*); lean_object* l___regBuiltinTactic_Lean_Elab_Tactic_evalTraceState___closed__1; lean_object* l___regBuiltinTactic_Lean_Elab_Tactic_evalIntros(lean_object*); @@ -502,7 +503,6 @@ extern lean_object* l_Lean_Parser_Tactic_seq___elambda__1___closed__1; lean_object* l___regBuiltinTactic_Lean_Elab_Tactic_evalNestedTacticBlockCurly___closed__2; lean_object* l_Array_umapMAux___main___at_Lean_Elab_Tactic_getFVarIds___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_getMainModule(lean_object*); -extern lean_object* l_HashMap_Inhabited___closed__1; lean_object* l_Lean_Elab_Tactic_throwUnsupportedSyntax___rarg___closed__1; extern lean_object* l_Lean_Parser_Tactic_revert___elambda__1___closed__2; lean_object* l_List_foldl___main___at_Lean_Elab_Tactic_tagUntaggedGoals___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); @@ -1647,7 +1647,7 @@ lean_object* _init_l_Lean_Elab_Tactic_collectMVars___closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_HashMap_Inhabited___closed__1; +x_1 = l_HashSet_Inhabited___closed__1; x_2 = l_Array_empty___closed__1; x_3 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_3, 0, x_1); diff --git a/stage0/stdlib/Init/Lean/MetavarContext.c b/stage0/stdlib/Init/Lean/MetavarContext.c index 5733248a2e..c23f828cc0 100644 --- a/stage0/stdlib/Init/Lean/MetavarContext.c +++ b/stage0/stdlib/Init/Lean/MetavarContext.c @@ -23,12 +23,14 @@ lean_object* l_Array_umapMAux___main___at___private_Init_Lean_MetavarContext_21_ size_t l_USize_add(size_t, size_t); lean_object* l_Array_iterateMAux___main___at___private_Init_Lean_MetavarContext_14__getInScope___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_MetavarContext_23__abstractRange___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_HashSetImp_insert___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__3(lean_object*, lean_object*); lean_object* l___private_Init_Lean_MetavarContext_8__dep___main(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_PersistentArray_foldlFromMAux___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__42___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_containsAux___main___at_Lean_MetavarContext_isLevelAssigned___spec__2___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_insertAtCollisionNodeAux___main___at_Lean_MetavarContext_assignExprCore___spec__3(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_toString___at_Lean_MetavarContext_MkBinding_Exception_toString___spec__2(lean_object*); lean_object* l_ReaderT_lift___at_Lean_MetavarContext_MkBinding_Lean_MonadHashMapCacheAdapter___spec__1(lean_object*); +lean_object* l_mkHashSetImp___rarg(lean_object*); lean_object* l_Lean_MetavarContext_MkBinding_Lean_MonadHashMapCacheAdapter___closed__2; lean_object* lean_mk_empty_array_with_capacity(lean_object*); lean_object* l_mkHashMap___at_Lean_MetavarContext_instantiateMVars___spec__1(lean_object*); @@ -74,6 +76,7 @@ lean_object* lean_array_uset(lean_object*, size_t, lean_object*); lean_object* l_Lean_MetavarContext_setMVarKind___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_insertAux___main___at_Lean_MetavarContext_assignDelayed___spec__2(lean_object*, size_t, size_t, lean_object*, lean_object*); lean_object* lean_array_fswap(lean_object*, lean_object*, lean_object*); +lean_object* l_HashSetImp_contains___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__1___boxed(lean_object*, lean_object*); lean_object* l___private_Init_Lean_MetavarContext_11__reduceLocalContext(lean_object*, lean_object*); lean_object* lean_mk_metavar_ctx(lean_object*); lean_object* l_PersistentArray_anyM___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__23___boxed(lean_object*, lean_object*); @@ -216,6 +219,7 @@ lean_object* l_Lean_Expr_getAppNumArgsAux___main(lean_object*, lean_object*); uint8_t lean_metavar_ctx_is_expr_assigned(lean_object*, lean_object*); extern lean_object* l_Lean_LocalContext_Inhabited___closed__2; extern lean_object* l_PersistentArray_getAux___main___rarg___closed__1; +uint8_t l_List_elem___main___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__2(lean_object*, lean_object*); lean_object* l_Lean_MetavarContext_LevelMVarToParam_mkParamName___rarg(lean_object*, lean_object*); lean_object* lean_expr_lower_loose_bvars(lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_MetavarContext_findDecl_x3f___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -290,7 +294,6 @@ lean_object* l_Array_iterateMAux___main___at___private_Init_Lean_MetavarContext_ lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Expr_2__mkAppRangeAux___main(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_find_x3f___at_Lean_MetavarContext_getDelayedAssignment_x3f___spec__1___boxed(lean_object*, lean_object*); -uint8_t l_AssocList_contains___main___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__2(lean_object*, lean_object*); lean_object* l_Lean_Expr_fvarId_x21(lean_object*); lean_object* lean_metavar_ctx_assign_expr(lean_object*, lean_object*, lean_object*); uint8_t l_PersistentArray_anyM___at_Lean_MetavarContext_localDeclDependsOn___spec__20(lean_object*, lean_object*); @@ -332,7 +335,6 @@ lean_object* l_Array_iterateMAux___main___at___private_Init_Lean_MetavarContext_ lean_object* l_PersistentHashMap_find_x3f___at_Lean_MetavarContext_findDecl_x3f___spec__1___boxed(lean_object*, lean_object*); lean_object* l_Array_anyRangeMAux___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__8___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Array_anyRangeMAux___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__27(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_mkHashMap___at_Lean_MetavarContext_findExprDependsOn___spec__2(lean_object*); size_t l_Lean_Expr_hash(lean_object*); lean_object* l_PersistentArray_anyMAux___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__18___boxed(lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__48___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -407,6 +409,7 @@ lean_object* l_Array_anyRangeMAux___main___at_Lean_MetavarContext_localDeclDepen uint8_t l_Lean_Expr_isLambda(lean_object*); uint8_t l_PersistentHashMap_containsAtAux___main___at_Lean_MetavarContext_isLevelAssigned___spec__3(lean_object*, lean_object*, lean_object*); lean_object* l_PersistentArray_anyMAux___main___at_Lean_MetavarContext_exprDependsOn___spec__9___boxed(lean_object*, lean_object*); +extern lean_object* l_HashSet_Inhabited___closed__1; lean_object* l_ReaderT_bind___at_Lean_MetavarContext_MkBinding_Lean_MonadHashMapCacheAdapter___spec__2___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_expr_update_proj(lean_object*, lean_object*); lean_object* l_Array_anyRangeMAux___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__15___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -414,7 +417,6 @@ lean_object* l_PersistentHashMap_insertAux___main___at_Lean_MetavarContext_assig uint8_t l_Array_anyRangeMAux___main___at_Lean_MetavarContext_exprDependsOn___spec__10(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); size_t l_USize_land(size_t, size_t); lean_object* l_Lean_LocalDecl_fvarId(lean_object*); -lean_object* l_AssocList_replace___main___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__7(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_MetavarContext_findLevelDepth_x3f___boxed(lean_object*, lean_object*); uint8_t l_PersistentArray_anyMAux___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__12(lean_object*, lean_object*); lean_object* l___private_Init_Lean_MetavarContext_8__dep___main___at_Lean_MetavarContext_exprDependsOn___spec__7___boxed(lean_object*, lean_object*, lean_object*, lean_object*); @@ -440,9 +442,8 @@ lean_object* l_PersistentHashMap_insertAux___main___at_Lean_MetavarContext_assig lean_object* l_Lean_MetavarContext_MkBinding_Exception_hasToString; lean_object* l_Array_umapMAux___main___at___private_Init_Lean_MetavarContext_21__elimMVarDepsApp___main___spec__5(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*); lean_object* l_Array_anyRangeMAux___main___at_Lean_MetavarContext_exprDependsOn___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_AssocList_contains___main___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__2___boxed(lean_object*, lean_object*); lean_object* l_Array_anyRangeMAux___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__9___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_AssocList_foldlM___main___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__6(lean_object*, lean_object*); +lean_object* l_HashSetImp_expand___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__4(lean_object*, lean_object*); lean_object* l_Lean_MetavarContext_hasAssignedLevelMVar___main___boxed(lean_object*, lean_object*); lean_object* l_AssocList_replace___main___at___private_Init_Lean_MetavarContext_2__visit___spec__8(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_MetavarContext_hasAssignableLevelMVar___main___boxed(lean_object*, lean_object*); @@ -461,7 +462,6 @@ lean_object* l_Lean_Expr_withAppAux___main___at___private_Init_Lean_MetavarConte lean_object* l_Array_iterateMAux___main___at_Lean_MetavarContext_assignLevel___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_umapMAux___main___at___private_Init_Lean_MetavarContext_21__elimMVarDepsApp___main___spec__8(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*); lean_object* l_Lean_MetavarContext_MkBinding_preserveOrder(uint8_t, lean_object*); -lean_object* l_HashMapImp_moveEntries___main___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__5(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_MetavarContext_hasAssignableMVar___boxed(lean_object*, lean_object*); uint8_t l_PersistentHashMap_containsAux___main___at_Lean_MetavarContext_isLevelAssigned___spec__2(lean_object*, size_t, lean_object*); lean_object* l_PersistentArray_anyMAux___main___at_Lean_MetavarContext_exprDependsOn___spec__3___boxed(lean_object*, lean_object*); @@ -489,7 +489,6 @@ lean_object* l_Lean_Expr_betaRev(lean_object*, lean_object*); uint8_t l_Lean_MetavarContext_hasAssignableLevelMVar(lean_object*, lean_object*); lean_object* l_Lean_MetavarContext_isExprAssigned___boxed(lean_object*, lean_object*); lean_object* l_Array_anyRangeMAux___main___at___private_Init_Lean_MetavarContext_21__elimMVarDepsApp___main___spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -uint8_t l_HashMapImp_contains___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__1(lean_object*, lean_object*); uint8_t l_Lean_Name_isAnonymous(lean_object*); lean_object* l_PersistentArray_anyMAux___main___at_Lean_MetavarContext_localDeclDependsOn___spec__3___boxed(lean_object*, lean_object*); lean_object* l_Array_anyRangeMAux___main___at_Lean_MetavarContext_localDeclDependsOn___spec__12___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -501,6 +500,7 @@ lean_object* lean_panic_fn(lean_object*, lean_object*); lean_object* lean_metavar_ctx_assign_level(lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at_Lean_MetavarContext_addLevelMVarDecl___spec__4(size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_anyRangeMAux___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__19___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_List_foldl___main___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__6(lean_object*, lean_object*); lean_object* l_PersistentHashMap_insertAtCollisionNodeAux___main___at_Lean_MetavarContext_assignLevel___spec__3(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_LocalContext_foldlFromM___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__40(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Nat_forMAux___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__51(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -508,11 +508,10 @@ lean_object* l_Nat_forMAux___main___at___private_Init_Lean_MetavarContext_10__co lean_object* l_PersistentHashMap_containsAux___main___at_Lean_MetavarContext_isExprAssigned___spec__2___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_MetavarContext_incDepth(lean_object*); lean_object* l_Lean_MetavarContext_localDeclDependsOn___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_HashMapImp_contains___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__1___boxed(lean_object*, lean_object*); lean_object* l_Array_anyRangeMAux___main___at_Lean_MetavarContext_localDeclDependsOn___spec__10___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_withAppAux___main___at_Lean_MetavarContext_InstantiateExprMVars_main___main___spec__3(lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t l_HashSetImp_contains___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__1(lean_object*, lean_object*); lean_object* l_PersistentArray_anyM___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l_HashMapImp_expand___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__4(lean_object*, lean_object*); lean_object* l_Lean_MetavarContext_renameMVar___closed__1; lean_object* l___private_Init_Lean_MetavarContext_8__dep___main___at_Lean_MetavarContext_exprDependsOn___spec__7(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_umapMAux___main___at___private_Init_Lean_MetavarContext_21__elimMVarDepsApp___main___spec__1(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*); @@ -556,6 +555,7 @@ lean_object* l_PersistentHashMap_getCollisionNodeSize___rarg(lean_object*); lean_object* l_PersistentHashMap_find_x3f___at_Lean_MetavarContext_getExprAssignment_x3f___spec__1___boxed(lean_object*, lean_object*); lean_object* l_PersistentArray_anyMAux___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__24___boxed(lean_object*, lean_object*); lean_object* l_Lean_mkLet(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t); +lean_object* l_List_replace___main___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__7(lean_object*, lean_object*, lean_object*); uint8_t l_Array_anyRangeMAux___main___at_Lean_MetavarContext_localDeclDependsOn___spec__10(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_PersistentArray_anyM___at_Lean_MetavarContext_localDeclDependsOn___spec__32___boxed(lean_object*, lean_object*); lean_object* l_Lean_MetavarContext_getLevelDepth(lean_object*, lean_object*); @@ -595,6 +595,7 @@ lean_object* l_Lean_LocalContext_foldlM___at_Lean_MetavarContext_instantiateLCtx lean_object* l_Lean_MetavarContext_MkBinding_preserveOrder___boxed(lean_object*, lean_object*); lean_object* l___private_Init_Lean_MetavarContext_20__anyDependsOn___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Array_anyRangeMAux___main___at_Lean_MetavarContext_localDeclDependsOn___spec__30___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_HashSetImp_moveEntries___main___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__5(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_MetavarContext_isLevelAssignable___closed__1; lean_object* l_Array_indexOfAux___main___at_Lean_MetavarContext_eraseDelayed___spec__3(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_MetavarContext_findExprDependsOn___closed__1; @@ -635,7 +636,6 @@ lean_object* l_Array_iterateMAux___main___at_Lean_mkAppN___spec__1(lean_object*, lean_object* l_Array_umapMAux___main___at___private_Init_Lean_MetavarContext_21__elimMVarDepsApp___main___spec__13___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_MetavarContext_getLevelDepth___boxed(lean_object*, lean_object*); lean_object* l_Lean_Name_toStringWithSep___main(lean_object*, lean_object*); -lean_object* l_HashMapImp_insert___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__3(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkLevelParam(lean_object*); lean_object* l_Array_iterateMAux___main___at_Lean_MetavarContext_instantiateLCtxMVars___spec__5(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_MetavarContext_InstantiateExprMVars_instantiateLevelMVars(lean_object*, lean_object*); @@ -650,6 +650,7 @@ lean_object* l_Array_anyRangeMAux___main___at_Lean_MetavarContext_localDeclDepen extern lean_object* l_HashMap_Inhabited___closed__1; lean_object* l_Array_iterateMAux___main___at_Lean_MetavarContext_addLevelMVarDecl___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Nat_forMAux___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__50___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_List_replace___main___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__7___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_MetavarContext_DependsOn_main(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_MetavarContext_mkBinding___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Expr_hasFVar(lean_object*); @@ -695,6 +696,7 @@ lean_object* l_Array_anyRangeMAux___main___at___private_Init_Lean_MetavarContext lean_object* l_HashMapImp_find_x3f___at___private_Init_Lean_MetavarContext_2__visit___spec__1(lean_object*, lean_object*); lean_object* l_Array_anyRangeMAux___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__33___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_MetavarContext_8__dep___main___at_Lean_MetavarContext_localDeclDependsOn___spec__13(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_List_elem___main___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__2___boxed(lean_object*, lean_object*); lean_object* l_PersistentHashMap_find_x3f___at_Lean_MetavarContext_findDecl_x3f___spec__1(lean_object*, lean_object*); lean_object* l_Lean_MetavarContext_MkBinding_mkBinding___closed__1; uint8_t l_PersistentArray_anyM___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__35(lean_object*, lean_object*); @@ -13722,7 +13724,7 @@ return x_45; } } } -uint8_t l_AssocList_contains___main___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__2(lean_object* x_1, lean_object* x_2) { +uint8_t l_List_elem___main___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__2(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) @@ -13735,8 +13737,8 @@ else { lean_object* x_4; lean_object* x_5; uint8_t x_6; x_4 = lean_ctor_get(x_2, 0); -x_5 = lean_ctor_get(x_2, 2); -x_6 = lean_expr_eqv(x_4, x_1); +x_5 = lean_ctor_get(x_2, 1); +x_6 = lean_expr_eqv(x_1, x_4); if (x_6 == 0) { x_2 = x_5; @@ -13751,7 +13753,7 @@ return x_8; } } } -uint8_t l_HashMapImp_contains___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__1(lean_object* x_1, lean_object* x_2) { +uint8_t l_HashSetImp_contains___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__1(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; size_t x_5; size_t x_6; lean_object* x_7; uint8_t x_8; @@ -13761,12 +13763,12 @@ x_5 = l_Lean_Expr_hash(x_2); x_6 = lean_usize_modn(x_5, x_4); lean_dec(x_4); x_7 = lean_array_uget(x_3, x_6); -x_8 = l_AssocList_contains___main___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__2(x_2, x_7); +x_8 = l_List_elem___main___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__2(x_2, x_7); lean_dec(x_7); return x_8; } } -lean_object* l_AssocList_foldlM___main___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__6(lean_object* x_1, lean_object* x_2) { +lean_object* l_List_foldl___main___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__6(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) @@ -13781,13 +13783,13 @@ if (x_3 == 0) { lean_object* x_4; lean_object* x_5; lean_object* x_6; size_t x_7; size_t x_8; lean_object* x_9; lean_object* x_10; x_4 = lean_ctor_get(x_2, 0); -x_5 = lean_ctor_get(x_2, 2); +x_5 = lean_ctor_get(x_2, 1); x_6 = lean_array_get_size(x_1); x_7 = l_Lean_Expr_hash(x_4); x_8 = lean_usize_modn(x_7, x_6); lean_dec(x_6); x_9 = lean_array_uget(x_1, x_8); -lean_ctor_set(x_2, 2, x_9); +lean_ctor_set(x_2, 1, x_9); x_10 = lean_array_uset(x_1, x_8, x_2); x_1 = x_10; x_2 = x_5; @@ -13795,32 +13797,29 @@ goto _start; } else { -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; size_t x_16; size_t x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; +lean_object* x_12; lean_object* x_13; lean_object* x_14; size_t x_15; size_t x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; x_12 = lean_ctor_get(x_2, 0); x_13 = lean_ctor_get(x_2, 1); -x_14 = lean_ctor_get(x_2, 2); -lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_dec(x_2); -x_15 = lean_array_get_size(x_1); -x_16 = l_Lean_Expr_hash(x_12); -x_17 = lean_usize_modn(x_16, x_15); -lean_dec(x_15); -x_18 = lean_array_uget(x_1, x_17); -x_19 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_19, 0, x_12); -lean_ctor_set(x_19, 1, x_13); -lean_ctor_set(x_19, 2, x_18); -x_20 = lean_array_uset(x_1, x_17, x_19); -x_1 = x_20; -x_2 = x_14; +x_14 = lean_array_get_size(x_1); +x_15 = l_Lean_Expr_hash(x_12); +x_16 = lean_usize_modn(x_15, x_14); +lean_dec(x_14); +x_17 = lean_array_uget(x_1, x_16); +x_18 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_18, 0, x_12); +lean_ctor_set(x_18, 1, x_17); +x_19 = lean_array_uset(x_1, x_16, x_18); +x_1 = x_19; +x_2 = x_13; goto _start; } } } } -lean_object* l_HashMapImp_moveEntries___main___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_HashSetImp_moveEntries___main___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; uint8_t x_5; @@ -13839,7 +13838,7 @@ lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_obj x_6 = lean_array_fget(x_2, x_1); x_7 = lean_box(0); x_8 = lean_array_fset(x_2, x_1, x_7); -x_9 = l_AssocList_foldlM___main___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__6(x_3, x_6); +x_9 = l_List_foldl___main___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__6(x_3, x_6); x_10 = lean_unsigned_to_nat(1u); x_11 = lean_nat_add(x_1, x_10); lean_dec(x_1); @@ -13850,7 +13849,7 @@ goto _start; } } } -lean_object* l_HashMapImp_expand___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__4(lean_object* x_1, lean_object* x_2) { +lean_object* l_HashSetImp_expand___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__4(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; @@ -13861,188 +13860,181 @@ lean_dec(x_3); x_6 = lean_box(0); x_7 = lean_mk_array(x_5, x_6); x_8 = lean_unsigned_to_nat(0u); -x_9 = l_HashMapImp_moveEntries___main___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__5(x_8, x_2, x_7); +x_9 = l_HashSetImp_moveEntries___main___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__5(x_8, x_2, x_7); x_10 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_10, 0, x_1); lean_ctor_set(x_10, 1, x_9); return x_10; } } -lean_object* l_AssocList_replace___main___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__7(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_List_replace___main___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__7(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { -if (lean_obj_tag(x_3) == 0) +if (lean_obj_tag(x_1) == 0) { -lean_dec(x_2); -lean_dec(x_1); -return x_3; -} -else -{ -uint8_t x_4; -x_4 = !lean_is_exclusive(x_3); -if (x_4 == 0) -{ -lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8; -x_5 = lean_ctor_get(x_3, 0); -x_6 = lean_ctor_get(x_3, 1); -x_7 = lean_ctor_get(x_3, 2); -x_8 = lean_expr_eqv(x_5, x_1); -if (x_8 == 0) -{ -lean_object* x_9; -x_9 = l_AssocList_replace___main___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__7(x_1, x_2, x_7); -lean_ctor_set(x_3, 2, x_9); -return x_3; -} -else -{ -lean_dec(x_6); -lean_dec(x_5); -lean_ctor_set(x_3, 1, x_2); -lean_ctor_set(x_3, 0, x_1); -return x_3; -} -} -else -{ -lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; -x_10 = lean_ctor_get(x_3, 0); -x_11 = lean_ctor_get(x_3, 1); -x_12 = lean_ctor_get(x_3, 2); -lean_inc(x_12); -lean_inc(x_11); -lean_inc(x_10); lean_dec(x_3); -x_13 = lean_expr_eqv(x_10, x_1); -if (x_13 == 0) -{ -lean_object* x_14; lean_object* x_15; -x_14 = l_AssocList_replace___main___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__7(x_1, x_2, x_12); -x_15 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_15, 0, x_10); -lean_ctor_set(x_15, 1, x_11); -lean_ctor_set(x_15, 2, x_14); -return x_15; +return x_1; } else { -lean_object* x_16; -lean_dec(x_11); -lean_dec(x_10); -x_16 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_16, 0, x_1); -lean_ctor_set(x_16, 1, x_2); -lean_ctor_set(x_16, 2, x_12); -return x_16; -} -} -} -} -} -lean_object* l_HashMapImp_insert___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ uint8_t x_4; x_4 = !lean_is_exclusive(x_1); if (x_4 == 0) { -lean_object* x_5; lean_object* x_6; lean_object* x_7; size_t x_8; size_t x_9; lean_object* x_10; uint8_t x_11; +lean_object* x_5; lean_object* x_6; uint8_t x_7; x_5 = lean_ctor_get(x_1, 0); x_6 = lean_ctor_get(x_1, 1); -x_7 = lean_array_get_size(x_6); -x_8 = l_Lean_Expr_hash(x_2); -x_9 = lean_usize_modn(x_8, x_7); -x_10 = lean_array_uget(x_6, x_9); -x_11 = l_AssocList_contains___main___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__2(x_2, x_10); +x_7 = lean_expr_eqv(x_5, x_2); +if (x_7 == 0) +{ +lean_object* x_8; +x_8 = l_List_replace___main___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__7(x_6, x_2, x_3); +lean_ctor_set(x_1, 1, x_8); +return x_1; +} +else +{ +lean_dec(x_5); +lean_ctor_set(x_1, 0, x_3); +return x_1; +} +} +else +{ +lean_object* x_9; lean_object* x_10; uint8_t x_11; +x_9 = lean_ctor_get(x_1, 0); +x_10 = lean_ctor_get(x_1, 1); +lean_inc(x_10); +lean_inc(x_9); +lean_dec(x_1); +x_11 = lean_expr_eqv(x_9, x_2); if (x_11 == 0) { -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; -x_12 = lean_unsigned_to_nat(1u); -x_13 = lean_nat_add(x_5, x_12); -lean_dec(x_5); -x_14 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_14, 0, x_2); -lean_ctor_set(x_14, 1, x_3); -lean_ctor_set(x_14, 2, x_10); -x_15 = lean_array_uset(x_6, x_9, x_14); -x_16 = lean_nat_dec_le(x_13, x_7); -lean_dec(x_7); -if (x_16 == 0) +lean_object* x_12; lean_object* x_13; +x_12 = l_List_replace___main___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__7(x_10, x_2, x_3); +x_13 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_13, 0, x_9); +lean_ctor_set(x_13, 1, x_12); +return x_13; +} +else { -lean_object* x_17; +lean_object* x_14; +lean_dec(x_9); +x_14 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_14, 0, x_3); +lean_ctor_set(x_14, 1, x_10); +return x_14; +} +} +} +} +} +lean_object* l_HashSetImp_insert___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__3(lean_object* x_1, lean_object* x_2) { +_start: +{ +uint8_t x_3; +x_3 = !lean_is_exclusive(x_1); +if (x_3 == 0) +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; size_t x_7; size_t x_8; lean_object* x_9; uint8_t x_10; +x_4 = lean_ctor_get(x_1, 0); +x_5 = lean_ctor_get(x_1, 1); +x_6 = lean_array_get_size(x_5); +x_7 = l_Lean_Expr_hash(x_2); +x_8 = lean_usize_modn(x_7, x_6); +x_9 = lean_array_uget(x_5, x_8); +x_10 = l_List_elem___main___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__2(x_2, x_9); +if (x_10 == 0) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; uint8_t x_15; +x_11 = lean_unsigned_to_nat(1u); +x_12 = lean_nat_add(x_4, x_11); +lean_dec(x_4); +x_13 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_13, 0, x_2); +lean_ctor_set(x_13, 1, x_9); +x_14 = lean_array_uset(x_5, x_8, x_13); +x_15 = lean_nat_dec_le(x_12, x_6); +lean_dec(x_6); +if (x_15 == 0) +{ +lean_object* x_16; lean_free_object(x_1); -x_17 = l_HashMapImp_expand___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__4(x_13, x_15); -return x_17; +x_16 = l_HashSetImp_expand___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__4(x_12, x_14); +return x_16; } else { -lean_ctor_set(x_1, 1, x_15); -lean_ctor_set(x_1, 0, x_13); +lean_ctor_set(x_1, 1, x_14); +lean_ctor_set(x_1, 0, x_12); return x_1; } } else { -lean_object* x_18; lean_object* x_19; -lean_dec(x_7); -x_18 = l_AssocList_replace___main___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__7(x_2, x_3, x_10); -x_19 = lean_array_uset(x_6, x_9, x_18); -lean_ctor_set(x_1, 1, x_19); +lean_object* x_17; lean_object* x_18; +lean_dec(x_6); +lean_inc(x_2); +x_17 = l_List_replace___main___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__7(x_9, x_2, x_2); +lean_dec(x_2); +x_18 = lean_array_uset(x_5, x_8, x_17); +lean_ctor_set(x_1, 1, x_18); return x_1; } } else { -lean_object* x_20; lean_object* x_21; lean_object* x_22; size_t x_23; size_t x_24; lean_object* x_25; uint8_t x_26; -x_20 = lean_ctor_get(x_1, 0); -x_21 = lean_ctor_get(x_1, 1); -lean_inc(x_21); +lean_object* x_19; lean_object* x_20; lean_object* x_21; size_t x_22; size_t x_23; lean_object* x_24; uint8_t x_25; +x_19 = lean_ctor_get(x_1, 0); +x_20 = lean_ctor_get(x_1, 1); lean_inc(x_20); +lean_inc(x_19); lean_dec(x_1); -x_22 = lean_array_get_size(x_21); -x_23 = l_Lean_Expr_hash(x_2); -x_24 = lean_usize_modn(x_23, x_22); -x_25 = lean_array_uget(x_21, x_24); -x_26 = l_AssocList_contains___main___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__2(x_2, x_25); -if (x_26 == 0) +x_21 = lean_array_get_size(x_20); +x_22 = l_Lean_Expr_hash(x_2); +x_23 = lean_usize_modn(x_22, x_21); +x_24 = lean_array_uget(x_20, x_23); +x_25 = l_List_elem___main___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__2(x_2, x_24); +if (x_25 == 0) { -lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; uint8_t x_31; -x_27 = lean_unsigned_to_nat(1u); -x_28 = lean_nat_add(x_20, x_27); -lean_dec(x_20); -x_29 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_29, 0, x_2); -lean_ctor_set(x_29, 1, x_3); -lean_ctor_set(x_29, 2, x_25); -x_30 = lean_array_uset(x_21, x_24, x_29); -x_31 = lean_nat_dec_le(x_28, x_22); -lean_dec(x_22); -if (x_31 == 0) +lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; uint8_t x_30; +x_26 = lean_unsigned_to_nat(1u); +x_27 = lean_nat_add(x_19, x_26); +lean_dec(x_19); +x_28 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_28, 0, x_2); +lean_ctor_set(x_28, 1, x_24); +x_29 = lean_array_uset(x_20, x_23, x_28); +x_30 = lean_nat_dec_le(x_27, x_21); +lean_dec(x_21); +if (x_30 == 0) +{ +lean_object* x_31; +x_31 = l_HashSetImp_expand___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__4(x_27, x_29); +return x_31; +} +else { lean_object* x_32; -x_32 = l_HashMapImp_expand___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__4(x_28, x_30); +x_32 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_32, 0, x_27); +lean_ctor_set(x_32, 1, x_29); return x_32; } -else -{ -lean_object* x_33; -x_33 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_33, 0, x_28); -lean_ctor_set(x_33, 1, x_30); -return x_33; -} } else { -lean_object* x_34; lean_object* x_35; lean_object* x_36; -lean_dec(x_22); -x_34 = l_AssocList_replace___main___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__7(x_2, x_3, x_25); -x_35 = lean_array_uset(x_21, x_24, x_34); -x_36 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_36, 0, x_20); -lean_ctor_set(x_36, 1, x_35); -return x_36; +lean_object* x_33; lean_object* x_34; lean_object* x_35; +lean_dec(x_21); +lean_inc(x_2); +x_33 = l_List_replace___main___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__7(x_24, x_2, x_2); +lean_dec(x_2); +x_34 = lean_array_uset(x_20, x_23, x_33); +x_35 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_35, 0, x_19); +lean_ctor_set(x_35, 1, x_34); +return x_35; } } } @@ -14050,91 +14042,111 @@ return x_36; lean_object* l___private_Init_Lean_MetavarContext_6__visit_x3f(lean_object* x_1, lean_object* x_2) { _start: { -lean_object* x_3; uint8_t x_14; -x_14 = l_Lean_Expr_hasMVar(x_1); -if (x_14 == 0) -{ -uint8_t x_15; -x_15 = l_Lean_Expr_hasFVar(x_1); -if (x_15 == 0) -{ -uint8_t x_16; lean_object* x_17; lean_object* x_18; -lean_dec(x_1); -x_16 = 0; -x_17 = lean_box(x_16); -x_18 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_18, 0, x_17); -lean_ctor_set(x_18, 1, x_2); -return x_18; -} -else -{ -lean_object* x_19; -x_19 = lean_box(0); -x_3 = x_19; -goto block_13; -} -} -else -{ -lean_object* x_20; -x_20 = lean_box(0); -x_3 = x_20; -goto block_13; -} -block_13: +uint8_t x_3; +x_3 = l_Lean_Expr_hasMVar(x_1); +if (x_3 == 0) { uint8_t x_4; -lean_dec(x_3); -x_4 = l_HashMapImp_contains___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__1(x_2, x_1); +x_4 = l_Lean_Expr_hasFVar(x_1); if (x_4 == 0) { -lean_object* x_5; lean_object* x_6; uint8_t x_7; lean_object* x_8; lean_object* x_9; -x_5 = lean_box(0); -x_6 = l_HashMapImp_insert___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__3(x_2, x_1, x_5); -x_7 = 1; -x_8 = lean_box(x_7); -x_9 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_9, 0, x_8); -lean_ctor_set(x_9, 1, x_6); -return x_9; +uint8_t x_5; lean_object* x_6; lean_object* x_7; +lean_dec(x_1); +x_5 = 0; +x_6 = lean_box(x_5); +x_7 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_7, 0, x_6); +lean_ctor_set(x_7, 1, x_2); +return x_7; } else { -uint8_t x_10; lean_object* x_11; lean_object* x_12; -lean_dec(x_1); -x_10 = 0; +uint8_t x_8; +x_8 = l_HashSetImp_contains___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__1(x_2, x_1); +if (x_8 == 0) +{ +lean_object* x_9; uint8_t x_10; lean_object* x_11; lean_object* x_12; +x_9 = l_HashSetImp_insert___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__3(x_2, x_1); +x_10 = 1; x_11 = lean_box(x_10); x_12 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_12, 0, x_11); -lean_ctor_set(x_12, 1, x_2); +lean_ctor_set(x_12, 1, x_9); return x_12; } +else +{ +uint8_t x_13; lean_object* x_14; lean_object* x_15; +lean_dec(x_1); +x_13 = 0; +x_14 = lean_box(x_13); +x_15 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_15, 0, x_14); +lean_ctor_set(x_15, 1, x_2); +return x_15; } } } -lean_object* l_AssocList_contains___main___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__2___boxed(lean_object* x_1, lean_object* x_2) { +else +{ +uint8_t x_16; +x_16 = l_HashSetImp_contains___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__1(x_2, x_1); +if (x_16 == 0) +{ +lean_object* x_17; uint8_t x_18; lean_object* x_19; lean_object* x_20; +x_17 = l_HashSetImp_insert___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__3(x_2, x_1); +x_18 = 1; +x_19 = lean_box(x_18); +x_20 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_20, 0, x_19); +lean_ctor_set(x_20, 1, x_17); +return x_20; +} +else +{ +uint8_t x_21; lean_object* x_22; lean_object* x_23; +lean_dec(x_1); +x_21 = 0; +x_22 = lean_box(x_21); +x_23 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_23, 0, x_22); +lean_ctor_set(x_23, 1, x_2); +return x_23; +} +} +} +} +lean_object* l_List_elem___main___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__2___boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; -x_3 = l_AssocList_contains___main___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__2(x_1, x_2); +x_3 = l_List_elem___main___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__2(x_1, x_2); lean_dec(x_2); lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } } -lean_object* l_HashMapImp_contains___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__1___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l_HashSetImp_contains___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__1___boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; -x_3 = l_HashMapImp_contains___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__1(x_1, x_2); +x_3 = l_HashSetImp_contains___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__1(x_1, x_2); lean_dec(x_2); lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } } +lean_object* l_List_replace___main___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__7___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_List_replace___main___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__7(x_1, x_2, x_3); +lean_dec(x_2); +return x_4; +} +} lean_object* l___private_Init_Lean_MetavarContext_7__visit(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { @@ -15172,19 +15184,11 @@ return x_11; } } } -lean_object* l_mkHashMap___at_Lean_MetavarContext_findExprDependsOn___spec__2(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_mkHashMapImp___rarg(x_1); -return x_2; -} -} lean_object* l_mkHashSet___at_Lean_MetavarContext_findExprDependsOn___spec__1(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = l_mkHashMapImp___rarg(x_1); +x_2 = l_mkHashSetImp___rarg(x_1); return x_2; } } @@ -15193,7 +15197,7 @@ _start: { lean_object* x_1; lean_object* x_2; x_1 = lean_unsigned_to_nat(8u); -x_2 = l_mkHashMapImp___rarg(x_1); +x_2 = l_mkHashSetImp___rarg(x_1); return x_2; } } @@ -15266,7 +15270,7 @@ return x_8; else { lean_object* x_9; lean_object* x_10; lean_object* x_11; -x_9 = l_HashMap_Inhabited___closed__1; +x_9 = l_HashSet_Inhabited___closed__1; x_10 = l___private_Init_Lean_MetavarContext_8__dep___main(x_1, x_3, x_4, x_9); x_11 = lean_ctor_get(x_10, 0); lean_inc(x_11); @@ -15277,7 +15281,7 @@ return x_11; else { lean_object* x_12; lean_object* x_13; lean_object* x_14; -x_12 = l_HashMap_Inhabited___closed__1; +x_12 = l_HashSet_Inhabited___closed__1; x_13 = l___private_Init_Lean_MetavarContext_8__dep___main(x_1, x_3, x_4, x_12); x_14 = lean_ctor_get(x_13, 0); lean_inc(x_14); @@ -15303,7 +15307,7 @@ if (x_30 == 0) uint8_t x_31; lean_object* x_32; lean_dec(x_15); x_31 = 0; -x_32 = l_HashMap_Inhabited___closed__1; +x_32 = l_HashSet_Inhabited___closed__1; x_17 = x_31; x_18 = x_32; goto block_28; @@ -15311,7 +15315,7 @@ goto block_28; else { lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; uint8_t x_37; -x_33 = l_HashMap_Inhabited___closed__1; +x_33 = l_HashSet_Inhabited___closed__1; lean_inc(x_3); lean_inc(x_1); x_34 = l___private_Init_Lean_MetavarContext_8__dep___main(x_1, x_3, x_15, x_33); @@ -15330,7 +15334,7 @@ goto block_28; else { lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; uint8_t x_42; -x_38 = l_HashMap_Inhabited___closed__1; +x_38 = l_HashSet_Inhabited___closed__1; lean_inc(x_3); lean_inc(x_1); x_39 = l___private_Init_Lean_MetavarContext_8__dep___main(x_1, x_3, x_15, x_38); @@ -17575,7 +17579,7 @@ return x_7; else { lean_object* x_8; lean_object* x_9; lean_object* x_10; -x_8 = l_HashMap_Inhabited___closed__1; +x_8 = l_HashSet_Inhabited___closed__1; x_9 = l___private_Init_Lean_MetavarContext_8__dep___main___at_Lean_MetavarContext_exprDependsOn___spec__1(x_3, x_1, x_2, x_8); x_10 = lean_ctor_get(x_9, 0); lean_inc(x_10); @@ -17586,7 +17590,7 @@ return x_10; else { lean_object* x_11; lean_object* x_12; lean_object* x_13; -x_11 = l_HashMap_Inhabited___closed__1; +x_11 = l_HashSet_Inhabited___closed__1; x_12 = l___private_Init_Lean_MetavarContext_8__dep___main___at_Lean_MetavarContext_exprDependsOn___spec__7(x_3, x_1, x_2, x_11); x_13 = lean_ctor_get(x_12, 0); lean_inc(x_13); @@ -24232,7 +24236,7 @@ return x_8; else { lean_object* x_9; lean_object* x_10; lean_object* x_11; -x_9 = l_HashMap_Inhabited___closed__1; +x_9 = l_HashSet_Inhabited___closed__1; x_10 = l___private_Init_Lean_MetavarContext_8__dep___main___at_Lean_MetavarContext_localDeclDependsOn___spec__1(x_3, x_1, x_4, x_9); x_11 = lean_ctor_get(x_10, 0); lean_inc(x_11); @@ -24243,7 +24247,7 @@ return x_11; else { lean_object* x_12; lean_object* x_13; lean_object* x_14; -x_12 = l_HashMap_Inhabited___closed__1; +x_12 = l_HashSet_Inhabited___closed__1; x_13 = l___private_Init_Lean_MetavarContext_8__dep___main___at_Lean_MetavarContext_localDeclDependsOn___spec__7(x_3, x_1, x_4, x_12); x_14 = lean_ctor_get(x_13, 0); lean_inc(x_14); @@ -24269,7 +24273,7 @@ if (x_30 == 0) uint8_t x_31; lean_object* x_32; lean_dec(x_15); x_31 = 0; -x_32 = l_HashMap_Inhabited___closed__1; +x_32 = l_HashSet_Inhabited___closed__1; x_17 = x_31; x_18 = x_32; goto block_28; @@ -24277,7 +24281,7 @@ goto block_28; else { lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; uint8_t x_37; -x_33 = l_HashMap_Inhabited___closed__1; +x_33 = l_HashSet_Inhabited___closed__1; lean_inc(x_1); x_34 = l___private_Init_Lean_MetavarContext_8__dep___main___at_Lean_MetavarContext_localDeclDependsOn___spec__25(x_3, x_1, x_15, x_33); x_35 = lean_ctor_get(x_34, 0); @@ -24295,7 +24299,7 @@ goto block_28; else { lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; uint8_t x_42; -x_38 = l_HashMap_Inhabited___closed__1; +x_38 = l_HashSet_Inhabited___closed__1; lean_inc(x_1); x_39 = l___private_Init_Lean_MetavarContext_8__dep___main___at_Lean_MetavarContext_localDeclDependsOn___spec__31(x_3, x_1, x_15, x_38); x_40 = lean_ctor_get(x_39, 0); @@ -32595,7 +32599,7 @@ return x_25; else { lean_object* x_26; lean_object* x_27; lean_object* x_28; uint8_t x_29; -x_26 = l_HashMap_Inhabited___closed__1; +x_26 = l_HashSet_Inhabited___closed__1; lean_inc(x_1); x_27 = l___private_Init_Lean_MetavarContext_8__dep___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__4(x_6, x_1, x_22, x_26); x_28 = lean_ctor_get(x_27, 0); @@ -32626,7 +32630,7 @@ goto block_18; else { lean_object* x_32; lean_object* x_33; lean_object* x_34; uint8_t x_35; -x_32 = l_HashMap_Inhabited___closed__1; +x_32 = l_HashSet_Inhabited___closed__1; lean_inc(x_1); x_33 = l___private_Init_Lean_MetavarContext_8__dep___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__10(x_6, x_1, x_22, x_32); x_34 = lean_ctor_get(x_33, 0); @@ -32671,7 +32675,7 @@ if (x_58 == 0) uint8_t x_59; lean_object* x_60; lean_dec(x_38); x_59 = 0; -x_60 = l_HashMap_Inhabited___closed__1; +x_60 = l_HashSet_Inhabited___closed__1; x_40 = x_59; x_41 = x_60; goto block_56; @@ -32679,7 +32683,7 @@ goto block_56; else { lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; uint8_t x_65; -x_61 = l_HashMap_Inhabited___closed__1; +x_61 = l_HashSet_Inhabited___closed__1; lean_inc(x_1); x_62 = l___private_Init_Lean_MetavarContext_8__dep___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__28(x_6, x_1, x_38, x_61); x_63 = lean_ctor_get(x_62, 0); @@ -32697,7 +32701,7 @@ goto block_56; else { lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; uint8_t x_70; -x_66 = l_HashMap_Inhabited___closed__1; +x_66 = l_HashSet_Inhabited___closed__1; lean_inc(x_1); x_67 = l___private_Init_Lean_MetavarContext_8__dep___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__34(x_6, x_1, x_38, x_66); x_68 = lean_ctor_get(x_67, 0); diff --git a/stage0/stdlib/Init/Lean/Util/CollectFVars.c b/stage0/stdlib/Init/Lean/Util/CollectFVars.c index cf97042823..2fc59c0b8b 100644 --- a/stage0/stdlib/Init/Lean/Util/CollectFVars.c +++ b/stage0/stdlib/Init/Lean/Util/CollectFVars.c @@ -14,52 +14,44 @@ extern "C" { #endif lean_object* l_Lean_CollectFVars_State_inhabited; +lean_object* l_mkHashSetImp___rarg(lean_object*); lean_object* lean_array_uget(lean_object*, size_t); +lean_object* l_List_replace___main___at_Lean_CollectFVars_visit___spec__7(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_CollectFVars_main(lean_object*, lean_object*); lean_object* lean_array_uset(lean_object*, size_t, lean_object*); +lean_object* l_List_elem___main___at_Lean_CollectFVars_visit___spec__2___boxed(lean_object*, lean_object*); lean_object* l_Lean_CollectFVars_State_inhabited___closed__2; lean_object* l_Lean_collectFVars(lean_object*, lean_object*); -lean_object* l_AssocList_contains___main___at_Lean_CollectFVars_visit___spec__2___boxed(lean_object*, lean_object*); lean_object* lean_array_get_size(lean_object*); +lean_object* l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(lean_object*, lean_object*); lean_object* l_Lean_CollectFVars_State_inhabited___closed__1; lean_object* lean_nat_add(lean_object*, lean_object*); -lean_object* l_HashMapImp_expand___at_Lean_CollectFVars_visit___spec__4(lean_object*, lean_object*); +lean_object* l_List_foldl___main___at_Lean_CollectFVars_visit___spec__6(lean_object*, lean_object*); lean_object* lean_array_fget(lean_object*, lean_object*); -lean_object* l_mkHashMap___at_Lean_CollectFVars_State_inhabited___spec__2(lean_object*); +lean_object* l_HashSetImp_expand___at_Lean_CollectFVars_visit___spec__4(lean_object*, lean_object*); lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); size_t l_Lean_Expr_hash(lean_object*); lean_object* l_Lean_CollectFVars_main___main(lean_object*, lean_object*); size_t lean_usize_modn(size_t, lean_object*); -lean_object* l_AssocList_replace___main___at_Lean_CollectFVars_visit___spec__7(lean_object*, lean_object*, lean_object*); -lean_object* l_mkHashMapImp___rarg(lean_object*); lean_object* l_RBNode_insert___at_Lean_NameSet_insert___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_CollectFVars_visit(lean_object*, lean_object*, lean_object*); -lean_object* l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(lean_object*, lean_object*, lean_object*); +lean_object* l_HashSetImp_contains___at_Lean_CollectFVars_visit___spec__1___boxed(lean_object*, lean_object*); +lean_object* l_HashSetImp_moveEntries___main___at_Lean_CollectFVars_visit___spec__5(lean_object*, lean_object*, lean_object*); uint8_t lean_expr_eqv(lean_object*, lean_object*); uint8_t lean_nat_dec_le(lean_object*, lean_object*); -uint8_t l_AssocList_contains___main___at_Lean_CollectFVars_visit___spec__2(lean_object*, lean_object*); +uint8_t l_HashSetImp_contains___at_Lean_CollectFVars_visit___spec__1(lean_object*, lean_object*); lean_object* l_mkHashSet___at_Lean_CollectFVars_State_inhabited___spec__1(lean_object*); lean_object* lean_nat_mul(lean_object*, lean_object*); -uint8_t l_HashMapImp_contains___at_Lean_CollectFVars_visit___spec__1(lean_object*, lean_object*); -lean_object* l_HashMapImp_moveEntries___main___at_Lean_CollectFVars_visit___spec__5(lean_object*, lean_object*, lean_object*); +lean_object* l_List_replace___main___at_Lean_CollectFVars_visit___spec__7___boxed(lean_object*, lean_object*, lean_object*); lean_object* lean_mk_array(lean_object*, lean_object*); +uint8_t l_List_elem___main___at_Lean_CollectFVars_visit___spec__2(lean_object*, lean_object*); uint8_t l_Lean_Expr_hasFVar(lean_object*); -lean_object* l_HashMapImp_contains___at_Lean_CollectFVars_visit___spec__1___boxed(lean_object*, lean_object*); -lean_object* l_AssocList_foldlM___main___at_Lean_CollectFVars_visit___spec__6(lean_object*, lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); -lean_object* l_mkHashMap___at_Lean_CollectFVars_State_inhabited___spec__2(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_mkHashMapImp___rarg(x_1); -return x_2; -} -} lean_object* l_mkHashSet___at_Lean_CollectFVars_State_inhabited___spec__1(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = l_mkHashMapImp___rarg(x_1); +x_2 = l_mkHashSetImp___rarg(x_1); return x_2; } } @@ -68,7 +60,7 @@ _start: { lean_object* x_1; lean_object* x_2; x_1 = lean_unsigned_to_nat(8u); -x_2 = l_mkHashMapImp___rarg(x_1); +x_2 = l_mkHashSetImp___rarg(x_1); return x_2; } } @@ -92,7 +84,7 @@ x_1 = l_Lean_CollectFVars_State_inhabited___closed__2; return x_1; } } -uint8_t l_AssocList_contains___main___at_Lean_CollectFVars_visit___spec__2(lean_object* x_1, lean_object* x_2) { +uint8_t l_List_elem___main___at_Lean_CollectFVars_visit___spec__2(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) @@ -105,8 +97,8 @@ else { lean_object* x_4; lean_object* x_5; uint8_t x_6; x_4 = lean_ctor_get(x_2, 0); -x_5 = lean_ctor_get(x_2, 2); -x_6 = lean_expr_eqv(x_4, x_1); +x_5 = lean_ctor_get(x_2, 1); +x_6 = lean_expr_eqv(x_1, x_4); if (x_6 == 0) { x_2 = x_5; @@ -121,7 +113,7 @@ return x_8; } } } -uint8_t l_HashMapImp_contains___at_Lean_CollectFVars_visit___spec__1(lean_object* x_1, lean_object* x_2) { +uint8_t l_HashSetImp_contains___at_Lean_CollectFVars_visit___spec__1(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; size_t x_5; size_t x_6; lean_object* x_7; uint8_t x_8; @@ -131,12 +123,12 @@ x_5 = l_Lean_Expr_hash(x_2); x_6 = lean_usize_modn(x_5, x_4); lean_dec(x_4); x_7 = lean_array_uget(x_3, x_6); -x_8 = l_AssocList_contains___main___at_Lean_CollectFVars_visit___spec__2(x_2, x_7); +x_8 = l_List_elem___main___at_Lean_CollectFVars_visit___spec__2(x_2, x_7); lean_dec(x_7); return x_8; } } -lean_object* l_AssocList_foldlM___main___at_Lean_CollectFVars_visit___spec__6(lean_object* x_1, lean_object* x_2) { +lean_object* l_List_foldl___main___at_Lean_CollectFVars_visit___spec__6(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) @@ -151,13 +143,13 @@ if (x_3 == 0) { lean_object* x_4; lean_object* x_5; lean_object* x_6; size_t x_7; size_t x_8; lean_object* x_9; lean_object* x_10; x_4 = lean_ctor_get(x_2, 0); -x_5 = lean_ctor_get(x_2, 2); +x_5 = lean_ctor_get(x_2, 1); x_6 = lean_array_get_size(x_1); x_7 = l_Lean_Expr_hash(x_4); x_8 = lean_usize_modn(x_7, x_6); lean_dec(x_6); x_9 = lean_array_uget(x_1, x_8); -lean_ctor_set(x_2, 2, x_9); +lean_ctor_set(x_2, 1, x_9); x_10 = lean_array_uset(x_1, x_8, x_2); x_1 = x_10; x_2 = x_5; @@ -165,32 +157,29 @@ goto _start; } else { -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; size_t x_16; size_t x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; +lean_object* x_12; lean_object* x_13; lean_object* x_14; size_t x_15; size_t x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; x_12 = lean_ctor_get(x_2, 0); x_13 = lean_ctor_get(x_2, 1); -x_14 = lean_ctor_get(x_2, 2); -lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_dec(x_2); -x_15 = lean_array_get_size(x_1); -x_16 = l_Lean_Expr_hash(x_12); -x_17 = lean_usize_modn(x_16, x_15); -lean_dec(x_15); -x_18 = lean_array_uget(x_1, x_17); -x_19 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_19, 0, x_12); -lean_ctor_set(x_19, 1, x_13); -lean_ctor_set(x_19, 2, x_18); -x_20 = lean_array_uset(x_1, x_17, x_19); -x_1 = x_20; -x_2 = x_14; +x_14 = lean_array_get_size(x_1); +x_15 = l_Lean_Expr_hash(x_12); +x_16 = lean_usize_modn(x_15, x_14); +lean_dec(x_14); +x_17 = lean_array_uget(x_1, x_16); +x_18 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_18, 0, x_12); +lean_ctor_set(x_18, 1, x_17); +x_19 = lean_array_uset(x_1, x_16, x_18); +x_1 = x_19; +x_2 = x_13; goto _start; } } } } -lean_object* l_HashMapImp_moveEntries___main___at_Lean_CollectFVars_visit___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_HashSetImp_moveEntries___main___at_Lean_CollectFVars_visit___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; uint8_t x_5; @@ -209,7 +198,7 @@ lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_obj x_6 = lean_array_fget(x_2, x_1); x_7 = lean_box(0); x_8 = lean_array_fset(x_2, x_1, x_7); -x_9 = l_AssocList_foldlM___main___at_Lean_CollectFVars_visit___spec__6(x_3, x_6); +x_9 = l_List_foldl___main___at_Lean_CollectFVars_visit___spec__6(x_3, x_6); x_10 = lean_unsigned_to_nat(1u); x_11 = lean_nat_add(x_1, x_10); lean_dec(x_1); @@ -220,7 +209,7 @@ goto _start; } } } -lean_object* l_HashMapImp_expand___at_Lean_CollectFVars_visit___spec__4(lean_object* x_1, lean_object* x_2) { +lean_object* l_HashSetImp_expand___at_Lean_CollectFVars_visit___spec__4(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; @@ -231,188 +220,181 @@ lean_dec(x_3); x_6 = lean_box(0); x_7 = lean_mk_array(x_5, x_6); x_8 = lean_unsigned_to_nat(0u); -x_9 = l_HashMapImp_moveEntries___main___at_Lean_CollectFVars_visit___spec__5(x_8, x_2, x_7); +x_9 = l_HashSetImp_moveEntries___main___at_Lean_CollectFVars_visit___spec__5(x_8, x_2, x_7); x_10 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_10, 0, x_1); lean_ctor_set(x_10, 1, x_9); return x_10; } } -lean_object* l_AssocList_replace___main___at_Lean_CollectFVars_visit___spec__7(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_List_replace___main___at_Lean_CollectFVars_visit___spec__7(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { -if (lean_obj_tag(x_3) == 0) +if (lean_obj_tag(x_1) == 0) { -lean_dec(x_2); -lean_dec(x_1); -return x_3; -} -else -{ -uint8_t x_4; -x_4 = !lean_is_exclusive(x_3); -if (x_4 == 0) -{ -lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8; -x_5 = lean_ctor_get(x_3, 0); -x_6 = lean_ctor_get(x_3, 1); -x_7 = lean_ctor_get(x_3, 2); -x_8 = lean_expr_eqv(x_5, x_1); -if (x_8 == 0) -{ -lean_object* x_9; -x_9 = l_AssocList_replace___main___at_Lean_CollectFVars_visit___spec__7(x_1, x_2, x_7); -lean_ctor_set(x_3, 2, x_9); -return x_3; -} -else -{ -lean_dec(x_6); -lean_dec(x_5); -lean_ctor_set(x_3, 1, x_2); -lean_ctor_set(x_3, 0, x_1); -return x_3; -} -} -else -{ -lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; -x_10 = lean_ctor_get(x_3, 0); -x_11 = lean_ctor_get(x_3, 1); -x_12 = lean_ctor_get(x_3, 2); -lean_inc(x_12); -lean_inc(x_11); -lean_inc(x_10); lean_dec(x_3); -x_13 = lean_expr_eqv(x_10, x_1); -if (x_13 == 0) -{ -lean_object* x_14; lean_object* x_15; -x_14 = l_AssocList_replace___main___at_Lean_CollectFVars_visit___spec__7(x_1, x_2, x_12); -x_15 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_15, 0, x_10); -lean_ctor_set(x_15, 1, x_11); -lean_ctor_set(x_15, 2, x_14); -return x_15; +return x_1; } else { -lean_object* x_16; -lean_dec(x_11); -lean_dec(x_10); -x_16 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_16, 0, x_1); -lean_ctor_set(x_16, 1, x_2); -lean_ctor_set(x_16, 2, x_12); -return x_16; -} -} -} -} -} -lean_object* l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ uint8_t x_4; x_4 = !lean_is_exclusive(x_1); if (x_4 == 0) { -lean_object* x_5; lean_object* x_6; lean_object* x_7; size_t x_8; size_t x_9; lean_object* x_10; uint8_t x_11; +lean_object* x_5; lean_object* x_6; uint8_t x_7; x_5 = lean_ctor_get(x_1, 0); x_6 = lean_ctor_get(x_1, 1); -x_7 = lean_array_get_size(x_6); -x_8 = l_Lean_Expr_hash(x_2); -x_9 = lean_usize_modn(x_8, x_7); -x_10 = lean_array_uget(x_6, x_9); -x_11 = l_AssocList_contains___main___at_Lean_CollectFVars_visit___spec__2(x_2, x_10); +x_7 = lean_expr_eqv(x_5, x_2); +if (x_7 == 0) +{ +lean_object* x_8; +x_8 = l_List_replace___main___at_Lean_CollectFVars_visit___spec__7(x_6, x_2, x_3); +lean_ctor_set(x_1, 1, x_8); +return x_1; +} +else +{ +lean_dec(x_5); +lean_ctor_set(x_1, 0, x_3); +return x_1; +} +} +else +{ +lean_object* x_9; lean_object* x_10; uint8_t x_11; +x_9 = lean_ctor_get(x_1, 0); +x_10 = lean_ctor_get(x_1, 1); +lean_inc(x_10); +lean_inc(x_9); +lean_dec(x_1); +x_11 = lean_expr_eqv(x_9, x_2); if (x_11 == 0) { -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; -x_12 = lean_unsigned_to_nat(1u); -x_13 = lean_nat_add(x_5, x_12); -lean_dec(x_5); -x_14 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_14, 0, x_2); -lean_ctor_set(x_14, 1, x_3); -lean_ctor_set(x_14, 2, x_10); -x_15 = lean_array_uset(x_6, x_9, x_14); -x_16 = lean_nat_dec_le(x_13, x_7); -lean_dec(x_7); -if (x_16 == 0) +lean_object* x_12; lean_object* x_13; +x_12 = l_List_replace___main___at_Lean_CollectFVars_visit___spec__7(x_10, x_2, x_3); +x_13 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_13, 0, x_9); +lean_ctor_set(x_13, 1, x_12); +return x_13; +} +else { -lean_object* x_17; +lean_object* x_14; +lean_dec(x_9); +x_14 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_14, 0, x_3); +lean_ctor_set(x_14, 1, x_10); +return x_14; +} +} +} +} +} +lean_object* l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(lean_object* x_1, lean_object* x_2) { +_start: +{ +uint8_t x_3; +x_3 = !lean_is_exclusive(x_1); +if (x_3 == 0) +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; size_t x_7; size_t x_8; lean_object* x_9; uint8_t x_10; +x_4 = lean_ctor_get(x_1, 0); +x_5 = lean_ctor_get(x_1, 1); +x_6 = lean_array_get_size(x_5); +x_7 = l_Lean_Expr_hash(x_2); +x_8 = lean_usize_modn(x_7, x_6); +x_9 = lean_array_uget(x_5, x_8); +x_10 = l_List_elem___main___at_Lean_CollectFVars_visit___spec__2(x_2, x_9); +if (x_10 == 0) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; uint8_t x_15; +x_11 = lean_unsigned_to_nat(1u); +x_12 = lean_nat_add(x_4, x_11); +lean_dec(x_4); +x_13 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_13, 0, x_2); +lean_ctor_set(x_13, 1, x_9); +x_14 = lean_array_uset(x_5, x_8, x_13); +x_15 = lean_nat_dec_le(x_12, x_6); +lean_dec(x_6); +if (x_15 == 0) +{ +lean_object* x_16; lean_free_object(x_1); -x_17 = l_HashMapImp_expand___at_Lean_CollectFVars_visit___spec__4(x_13, x_15); -return x_17; +x_16 = l_HashSetImp_expand___at_Lean_CollectFVars_visit___spec__4(x_12, x_14); +return x_16; } else { -lean_ctor_set(x_1, 1, x_15); -lean_ctor_set(x_1, 0, x_13); +lean_ctor_set(x_1, 1, x_14); +lean_ctor_set(x_1, 0, x_12); return x_1; } } else { -lean_object* x_18; lean_object* x_19; -lean_dec(x_7); -x_18 = l_AssocList_replace___main___at_Lean_CollectFVars_visit___spec__7(x_2, x_3, x_10); -x_19 = lean_array_uset(x_6, x_9, x_18); -lean_ctor_set(x_1, 1, x_19); +lean_object* x_17; lean_object* x_18; +lean_dec(x_6); +lean_inc(x_2); +x_17 = l_List_replace___main___at_Lean_CollectFVars_visit___spec__7(x_9, x_2, x_2); +lean_dec(x_2); +x_18 = lean_array_uset(x_5, x_8, x_17); +lean_ctor_set(x_1, 1, x_18); return x_1; } } else { -lean_object* x_20; lean_object* x_21; lean_object* x_22; size_t x_23; size_t x_24; lean_object* x_25; uint8_t x_26; -x_20 = lean_ctor_get(x_1, 0); -x_21 = lean_ctor_get(x_1, 1); -lean_inc(x_21); +lean_object* x_19; lean_object* x_20; lean_object* x_21; size_t x_22; size_t x_23; lean_object* x_24; uint8_t x_25; +x_19 = lean_ctor_get(x_1, 0); +x_20 = lean_ctor_get(x_1, 1); lean_inc(x_20); +lean_inc(x_19); lean_dec(x_1); -x_22 = lean_array_get_size(x_21); -x_23 = l_Lean_Expr_hash(x_2); -x_24 = lean_usize_modn(x_23, x_22); -x_25 = lean_array_uget(x_21, x_24); -x_26 = l_AssocList_contains___main___at_Lean_CollectFVars_visit___spec__2(x_2, x_25); -if (x_26 == 0) +x_21 = lean_array_get_size(x_20); +x_22 = l_Lean_Expr_hash(x_2); +x_23 = lean_usize_modn(x_22, x_21); +x_24 = lean_array_uget(x_20, x_23); +x_25 = l_List_elem___main___at_Lean_CollectFVars_visit___spec__2(x_2, x_24); +if (x_25 == 0) { -lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; uint8_t x_31; -x_27 = lean_unsigned_to_nat(1u); -x_28 = lean_nat_add(x_20, x_27); -lean_dec(x_20); -x_29 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_29, 0, x_2); -lean_ctor_set(x_29, 1, x_3); -lean_ctor_set(x_29, 2, x_25); -x_30 = lean_array_uset(x_21, x_24, x_29); -x_31 = lean_nat_dec_le(x_28, x_22); -lean_dec(x_22); -if (x_31 == 0) +lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; uint8_t x_30; +x_26 = lean_unsigned_to_nat(1u); +x_27 = lean_nat_add(x_19, x_26); +lean_dec(x_19); +x_28 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_28, 0, x_2); +lean_ctor_set(x_28, 1, x_24); +x_29 = lean_array_uset(x_20, x_23, x_28); +x_30 = lean_nat_dec_le(x_27, x_21); +lean_dec(x_21); +if (x_30 == 0) +{ +lean_object* x_31; +x_31 = l_HashSetImp_expand___at_Lean_CollectFVars_visit___spec__4(x_27, x_29); +return x_31; +} +else { lean_object* x_32; -x_32 = l_HashMapImp_expand___at_Lean_CollectFVars_visit___spec__4(x_28, x_30); +x_32 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_32, 0, x_27); +lean_ctor_set(x_32, 1, x_29); return x_32; } -else -{ -lean_object* x_33; -x_33 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_33, 0, x_28); -lean_ctor_set(x_33, 1, x_30); -return x_33; -} } else { -lean_object* x_34; lean_object* x_35; lean_object* x_36; -lean_dec(x_22); -x_34 = l_AssocList_replace___main___at_Lean_CollectFVars_visit___spec__7(x_2, x_3, x_25); -x_35 = lean_array_uset(x_21, x_24, x_34); -x_36 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_36, 0, x_20); -lean_ctor_set(x_36, 1, x_35); -return x_36; +lean_object* x_33; lean_object* x_34; lean_object* x_35; +lean_dec(x_21); +lean_inc(x_2); +x_33 = l_List_replace___main___at_Lean_CollectFVars_visit___spec__7(x_24, x_2, x_2); +lean_dec(x_2); +x_34 = lean_array_uset(x_20, x_23, x_33); +x_35 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_35, 0, x_19); +lean_ctor_set(x_35, 1, x_34); +return x_35; } } } @@ -435,37 +417,35 @@ x_5 = lean_ctor_get(x_3, 0); lean_inc(x_5); x_6 = lean_ctor_get(x_3, 1); lean_inc(x_6); -x_7 = l_HashMapImp_contains___at_Lean_CollectFVars_visit___spec__1(x_5, x_2); +x_7 = l_HashSetImp_contains___at_Lean_CollectFVars_visit___spec__1(x_5, x_2); if (x_7 == 0) { uint8_t x_8; x_8 = !lean_is_exclusive(x_3); if (x_8 == 0) { -lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; x_9 = lean_ctor_get(x_3, 1); lean_dec(x_9); x_10 = lean_ctor_get(x_3, 0); lean_dec(x_10); -x_11 = lean_box(0); lean_inc(x_2); -x_12 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_5, x_2, x_11); -lean_ctor_set(x_3, 0, x_12); -x_13 = lean_apply_2(x_1, x_2, x_3); -return x_13; +x_11 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_5, x_2); +lean_ctor_set(x_3, 0, x_11); +x_12 = lean_apply_2(x_1, x_2, x_3); +return x_12; } else { -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_dec(x_3); -x_14 = lean_box(0); lean_inc(x_2); -x_15 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_5, x_2, x_14); -x_16 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_16, 0, x_15); -lean_ctor_set(x_16, 1, x_6); -x_17 = lean_apply_2(x_1, x_2, x_16); -return x_17; +x_13 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_5, x_2); +x_14 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_14, 0, x_13); +lean_ctor_set(x_14, 1, x_6); +x_15 = lean_apply_2(x_1, x_2, x_14); +return x_15; } } else @@ -479,28 +459,37 @@ return x_3; } } } -lean_object* l_AssocList_contains___main___at_Lean_CollectFVars_visit___spec__2___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l_List_elem___main___at_Lean_CollectFVars_visit___spec__2___boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; -x_3 = l_AssocList_contains___main___at_Lean_CollectFVars_visit___spec__2(x_1, x_2); +x_3 = l_List_elem___main___at_Lean_CollectFVars_visit___spec__2(x_1, x_2); lean_dec(x_2); lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } } -lean_object* l_HashMapImp_contains___at_Lean_CollectFVars_visit___spec__1___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l_HashSetImp_contains___at_Lean_CollectFVars_visit___spec__1___boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; -x_3 = l_HashMapImp_contains___at_Lean_CollectFVars_visit___spec__1(x_1, x_2); +x_3 = l_HashSetImp_contains___at_Lean_CollectFVars_visit___spec__1(x_1, x_2); lean_dec(x_2); lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } } +lean_object* l_List_replace___main___at_Lean_CollectFVars_visit___spec__7___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_List_replace___main___at_Lean_CollectFVars_visit___spec__7(x_1, x_2, x_3); +lean_dec(x_2); +return x_4; +} +} lean_object* l_Lean_CollectFVars_main___main(lean_object* x_1, lean_object* x_2) { _start: { @@ -539,838 +528,1239 @@ return x_12; } case 5: { -lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_30; uint8_t x_31; +lean_object* x_13; lean_object* x_14; uint8_t x_15; uint8_t x_16; x_13 = lean_ctor_get(x_1, 0); lean_inc(x_13); x_14 = lean_ctor_get(x_1, 1); lean_inc(x_14); lean_dec(x_1); -x_30 = l_Lean_Expr_hasFVar(x_13); -x_31 = l_Lean_Expr_hasFVar(x_14); -if (x_30 == 0) +x_15 = l_Lean_Expr_hasFVar(x_13); +x_16 = l_Lean_Expr_hasFVar(x_14); +if (x_15 == 0) { lean_dec(x_13); -if (x_31 == 0) +if (x_16 == 0) { lean_dec(x_14); return x_2; } else { -x_15 = x_2; -goto block_29; -} -} -else -{ -lean_object* x_32; lean_object* x_33; uint8_t x_34; -x_32 = lean_ctor_get(x_2, 0); -lean_inc(x_32); -x_33 = lean_ctor_get(x_2, 1); -lean_inc(x_33); -x_34 = l_HashMapImp_contains___at_Lean_CollectFVars_visit___spec__1(x_32, x_13); -if (x_34 == 0) -{ -uint8_t x_35; -x_35 = !lean_is_exclusive(x_2); -if (x_35 == 0) -{ -lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; -x_36 = lean_ctor_get(x_2, 1); -lean_dec(x_36); -x_37 = lean_ctor_get(x_2, 0); -lean_dec(x_37); -x_38 = lean_box(0); -lean_inc(x_13); -x_39 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_32, x_13, x_38); -lean_ctor_set(x_2, 0, x_39); -x_40 = l_Lean_CollectFVars_main___main(x_13, x_2); -if (x_31 == 0) -{ -lean_dec(x_14); -return x_40; -} -else -{ -x_15 = x_40; -goto block_29; -} -} -else -{ -lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; -lean_dec(x_2); -x_41 = lean_box(0); -lean_inc(x_13); -x_42 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_32, x_13, x_41); -x_43 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_43, 0, x_42); -lean_ctor_set(x_43, 1, x_33); -x_44 = l_Lean_CollectFVars_main___main(x_13, x_43); -if (x_31 == 0) -{ -lean_dec(x_14); -return x_44; -} -else -{ -x_15 = x_44; -goto block_29; -} -} -} -else -{ -lean_dec(x_33); -lean_dec(x_32); -lean_dec(x_13); -if (x_31 == 0) -{ -lean_dec(x_14); -return x_2; -} -else -{ -x_15 = x_2; -goto block_29; -} -} -} -block_29: -{ -lean_object* x_16; lean_object* x_17; uint8_t x_18; -x_16 = lean_ctor_get(x_15, 0); -lean_inc(x_16); -x_17 = lean_ctor_get(x_15, 1); +lean_object* x_17; lean_object* x_18; uint8_t x_19; +x_17 = lean_ctor_get(x_2, 0); lean_inc(x_17); -x_18 = l_HashMapImp_contains___at_Lean_CollectFVars_visit___spec__1(x_16, x_14); -if (x_18 == 0) -{ -uint8_t x_19; -x_19 = !lean_is_exclusive(x_15); +x_18 = lean_ctor_get(x_2, 1); +lean_inc(x_18); +x_19 = l_HashSetImp_contains___at_Lean_CollectFVars_visit___spec__1(x_17, x_14); if (x_19 == 0) { -lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; -x_20 = lean_ctor_get(x_15, 1); -lean_dec(x_20); -x_21 = lean_ctor_get(x_15, 0); +uint8_t x_20; +x_20 = !lean_is_exclusive(x_2); +if (x_20 == 0) +{ +lean_object* x_21; lean_object* x_22; lean_object* x_23; +x_21 = lean_ctor_get(x_2, 1); lean_dec(x_21); -x_22 = lean_box(0); +x_22 = lean_ctor_get(x_2, 0); +lean_dec(x_22); lean_inc(x_14); -x_23 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_16, x_14, x_22); -lean_ctor_set(x_15, 0, x_23); +x_23 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_17, x_14); +lean_ctor_set(x_2, 0, x_23); x_1 = x_14; -x_2 = x_15; goto _start; } else { -lean_object* x_25; lean_object* x_26; lean_object* x_27; -lean_dec(x_15); -x_25 = lean_box(0); +lean_object* x_25; lean_object* x_26; +lean_dec(x_2); lean_inc(x_14); -x_26 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_16, x_14, x_25); -x_27 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_27, 0, x_26); -lean_ctor_set(x_27, 1, x_17); +x_25 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_17, x_14); +x_26 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_26, 0, x_25); +lean_ctor_set(x_26, 1, x_18); x_1 = x_14; -x_2 = x_27; +x_2 = x_26; goto _start; } } else { +lean_dec(x_18); lean_dec(x_17); -lean_dec(x_16); lean_dec(x_14); -return x_15; +return x_2; +} +} +} +else +{ +lean_object* x_28; lean_object* x_29; uint8_t x_30; +x_28 = lean_ctor_get(x_2, 0); +lean_inc(x_28); +x_29 = lean_ctor_get(x_2, 1); +lean_inc(x_29); +x_30 = l_HashSetImp_contains___at_Lean_CollectFVars_visit___spec__1(x_28, x_13); +if (x_30 == 0) +{ +uint8_t x_31; +x_31 = !lean_is_exclusive(x_2); +if (x_31 == 0) +{ +lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; +x_32 = lean_ctor_get(x_2, 1); +lean_dec(x_32); +x_33 = lean_ctor_get(x_2, 0); +lean_dec(x_33); +lean_inc(x_13); +x_34 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_28, x_13); +lean_ctor_set(x_2, 0, x_34); +x_35 = l_Lean_CollectFVars_main___main(x_13, x_2); +if (x_16 == 0) +{ +lean_dec(x_14); +return x_35; +} +else +{ +lean_object* x_36; lean_object* x_37; uint8_t x_38; +x_36 = lean_ctor_get(x_35, 0); +lean_inc(x_36); +x_37 = lean_ctor_get(x_35, 1); +lean_inc(x_37); +x_38 = l_HashSetImp_contains___at_Lean_CollectFVars_visit___spec__1(x_36, x_14); +if (x_38 == 0) +{ +uint8_t x_39; +x_39 = !lean_is_exclusive(x_35); +if (x_39 == 0) +{ +lean_object* x_40; lean_object* x_41; lean_object* x_42; +x_40 = lean_ctor_get(x_35, 1); +lean_dec(x_40); +x_41 = lean_ctor_get(x_35, 0); +lean_dec(x_41); +lean_inc(x_14); +x_42 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_36, x_14); +lean_ctor_set(x_35, 0, x_42); +x_1 = x_14; +x_2 = x_35; +goto _start; +} +else +{ +lean_object* x_44; lean_object* x_45; +lean_dec(x_35); +lean_inc(x_14); +x_44 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_36, x_14); +x_45 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_45, 0, x_44); +lean_ctor_set(x_45, 1, x_37); +x_1 = x_14; +x_2 = x_45; +goto _start; +} +} +else +{ +lean_dec(x_37); +lean_dec(x_36); +lean_dec(x_14); +return x_35; +} +} +} +else +{ +lean_object* x_47; lean_object* x_48; lean_object* x_49; +lean_dec(x_2); +lean_inc(x_13); +x_47 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_28, x_13); +x_48 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_48, 0, x_47); +lean_ctor_set(x_48, 1, x_29); +x_49 = l_Lean_CollectFVars_main___main(x_13, x_48); +if (x_16 == 0) +{ +lean_dec(x_14); +return x_49; +} +else +{ +lean_object* x_50; lean_object* x_51; uint8_t x_52; +x_50 = lean_ctor_get(x_49, 0); +lean_inc(x_50); +x_51 = lean_ctor_get(x_49, 1); +lean_inc(x_51); +x_52 = l_HashSetImp_contains___at_Lean_CollectFVars_visit___spec__1(x_50, x_14); +if (x_52 == 0) +{ +lean_object* x_53; lean_object* x_54; lean_object* x_55; +if (lean_is_exclusive(x_49)) { + lean_ctor_release(x_49, 0); + lean_ctor_release(x_49, 1); + x_53 = x_49; +} else { + lean_dec_ref(x_49); + x_53 = lean_box(0); +} +lean_inc(x_14); +x_54 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_50, x_14); +if (lean_is_scalar(x_53)) { + x_55 = lean_alloc_ctor(0, 2, 0); +} else { + x_55 = x_53; +} +lean_ctor_set(x_55, 0, x_54); +lean_ctor_set(x_55, 1, x_51); +x_1 = x_14; +x_2 = x_55; +goto _start; +} +else +{ +lean_dec(x_51); +lean_dec(x_50); +lean_dec(x_14); +return x_49; +} +} +} +} +else +{ +lean_dec(x_13); +if (x_16 == 0) +{ +lean_dec(x_29); +lean_dec(x_28); +lean_dec(x_14); +return x_2; +} +else +{ +uint8_t x_57; +x_57 = l_HashSetImp_contains___at_Lean_CollectFVars_visit___spec__1(x_28, x_14); +if (x_57 == 0) +{ +uint8_t x_58; +x_58 = !lean_is_exclusive(x_2); +if (x_58 == 0) +{ +lean_object* x_59; lean_object* x_60; lean_object* x_61; +x_59 = lean_ctor_get(x_2, 1); +lean_dec(x_59); +x_60 = lean_ctor_get(x_2, 0); +lean_dec(x_60); +lean_inc(x_14); +x_61 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_28, x_14); +lean_ctor_set(x_2, 0, x_61); +x_1 = x_14; +goto _start; +} +else +{ +lean_object* x_63; lean_object* x_64; +lean_dec(x_2); +lean_inc(x_14); +x_63 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_28, x_14); +x_64 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_64, 0, x_63); +lean_ctor_set(x_64, 1, x_29); +x_1 = x_14; +x_2 = x_64; +goto _start; +} +} +else +{ +lean_dec(x_29); +lean_dec(x_28); +lean_dec(x_14); +return x_2; +} +} } } } case 6: { -lean_object* x_45; lean_object* x_46; lean_object* x_47; uint8_t x_62; uint8_t x_63; -x_45 = lean_ctor_get(x_1, 1); -lean_inc(x_45); -x_46 = lean_ctor_get(x_1, 2); -lean_inc(x_46); +lean_object* x_66; lean_object* x_67; uint8_t x_68; uint8_t x_69; +x_66 = lean_ctor_get(x_1, 1); +lean_inc(x_66); +x_67 = lean_ctor_get(x_1, 2); +lean_inc(x_67); lean_dec(x_1); -x_62 = l_Lean_Expr_hasFVar(x_45); -x_63 = l_Lean_Expr_hasFVar(x_46); -if (x_62 == 0) +x_68 = l_Lean_Expr_hasFVar(x_66); +x_69 = l_Lean_Expr_hasFVar(x_67); +if (x_68 == 0) { -lean_dec(x_45); -if (x_63 == 0) +lean_dec(x_66); +if (x_69 == 0) { -lean_dec(x_46); +lean_dec(x_67); return x_2; } else { -x_47 = x_2; -goto block_61; -} +lean_object* x_70; lean_object* x_71; uint8_t x_72; +x_70 = lean_ctor_get(x_2, 0); +lean_inc(x_70); +x_71 = lean_ctor_get(x_2, 1); +lean_inc(x_71); +x_72 = l_HashSetImp_contains___at_Lean_CollectFVars_visit___spec__1(x_70, x_67); +if (x_72 == 0) +{ +uint8_t x_73; +x_73 = !lean_is_exclusive(x_2); +if (x_73 == 0) +{ +lean_object* x_74; lean_object* x_75; lean_object* x_76; +x_74 = lean_ctor_get(x_2, 1); +lean_dec(x_74); +x_75 = lean_ctor_get(x_2, 0); +lean_dec(x_75); +lean_inc(x_67); +x_76 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_70, x_67); +lean_ctor_set(x_2, 0, x_76); +x_1 = x_67; +goto _start; } else { -lean_object* x_64; lean_object* x_65; uint8_t x_66; -x_64 = lean_ctor_get(x_2, 0); -lean_inc(x_64); -x_65 = lean_ctor_get(x_2, 1); -lean_inc(x_65); -x_66 = l_HashMapImp_contains___at_Lean_CollectFVars_visit___spec__1(x_64, x_45); -if (x_66 == 0) -{ -uint8_t x_67; -x_67 = !lean_is_exclusive(x_2); -if (x_67 == 0) -{ -lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; -x_68 = lean_ctor_get(x_2, 1); -lean_dec(x_68); -x_69 = lean_ctor_get(x_2, 0); -lean_dec(x_69); -x_70 = lean_box(0); -lean_inc(x_45); -x_71 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_64, x_45, x_70); -lean_ctor_set(x_2, 0, x_71); -x_72 = l_Lean_CollectFVars_main___main(x_45, x_2); -if (x_63 == 0) -{ -lean_dec(x_46); -return x_72; -} -else -{ -x_47 = x_72; -goto block_61; -} -} -else -{ -lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; +lean_object* x_78; lean_object* x_79; lean_dec(x_2); -x_73 = lean_box(0); -lean_inc(x_45); -x_74 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_64, x_45, x_73); -x_75 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_75, 0, x_74); -lean_ctor_set(x_75, 1, x_65); -x_76 = l_Lean_CollectFVars_main___main(x_45, x_75); -if (x_63 == 0) -{ -lean_dec(x_46); -return x_76; +lean_inc(x_67); +x_78 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_70, x_67); +x_79 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_79, 0, x_78); +lean_ctor_set(x_79, 1, x_71); +x_1 = x_67; +x_2 = x_79; +goto _start; +} } else { -x_47 = x_76; -goto block_61; +lean_dec(x_71); +lean_dec(x_70); +lean_dec(x_67); +return x_2; } } } else { -lean_dec(x_65); -lean_dec(x_64); -lean_dec(x_45); -if (x_63 == 0) +lean_object* x_81; lean_object* x_82; uint8_t x_83; +x_81 = lean_ctor_get(x_2, 0); +lean_inc(x_81); +x_82 = lean_ctor_get(x_2, 1); +lean_inc(x_82); +x_83 = l_HashSetImp_contains___at_Lean_CollectFVars_visit___spec__1(x_81, x_66); +if (x_83 == 0) { -lean_dec(x_46); +uint8_t x_84; +x_84 = !lean_is_exclusive(x_2); +if (x_84 == 0) +{ +lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; +x_85 = lean_ctor_get(x_2, 1); +lean_dec(x_85); +x_86 = lean_ctor_get(x_2, 0); +lean_dec(x_86); +lean_inc(x_66); +x_87 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_81, x_66); +lean_ctor_set(x_2, 0, x_87); +x_88 = l_Lean_CollectFVars_main___main(x_66, x_2); +if (x_69 == 0) +{ +lean_dec(x_67); +return x_88; +} +else +{ +lean_object* x_89; lean_object* x_90; uint8_t x_91; +x_89 = lean_ctor_get(x_88, 0); +lean_inc(x_89); +x_90 = lean_ctor_get(x_88, 1); +lean_inc(x_90); +x_91 = l_HashSetImp_contains___at_Lean_CollectFVars_visit___spec__1(x_89, x_67); +if (x_91 == 0) +{ +uint8_t x_92; +x_92 = !lean_is_exclusive(x_88); +if (x_92 == 0) +{ +lean_object* x_93; lean_object* x_94; lean_object* x_95; +x_93 = lean_ctor_get(x_88, 1); +lean_dec(x_93); +x_94 = lean_ctor_get(x_88, 0); +lean_dec(x_94); +lean_inc(x_67); +x_95 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_89, x_67); +lean_ctor_set(x_88, 0, x_95); +x_1 = x_67; +x_2 = x_88; +goto _start; +} +else +{ +lean_object* x_97; lean_object* x_98; +lean_dec(x_88); +lean_inc(x_67); +x_97 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_89, x_67); +x_98 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_98, 0, x_97); +lean_ctor_set(x_98, 1, x_90); +x_1 = x_67; +x_2 = x_98; +goto _start; +} +} +else +{ +lean_dec(x_90); +lean_dec(x_89); +lean_dec(x_67); +return x_88; +} +} +} +else +{ +lean_object* x_100; lean_object* x_101; lean_object* x_102; +lean_dec(x_2); +lean_inc(x_66); +x_100 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_81, x_66); +x_101 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_101, 0, x_100); +lean_ctor_set(x_101, 1, x_82); +x_102 = l_Lean_CollectFVars_main___main(x_66, x_101); +if (x_69 == 0) +{ +lean_dec(x_67); +return x_102; +} +else +{ +lean_object* x_103; lean_object* x_104; uint8_t x_105; +x_103 = lean_ctor_get(x_102, 0); +lean_inc(x_103); +x_104 = lean_ctor_get(x_102, 1); +lean_inc(x_104); +x_105 = l_HashSetImp_contains___at_Lean_CollectFVars_visit___spec__1(x_103, x_67); +if (x_105 == 0) +{ +lean_object* x_106; lean_object* x_107; lean_object* x_108; +if (lean_is_exclusive(x_102)) { + lean_ctor_release(x_102, 0); + lean_ctor_release(x_102, 1); + x_106 = x_102; +} else { + lean_dec_ref(x_102); + x_106 = lean_box(0); +} +lean_inc(x_67); +x_107 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_103, x_67); +if (lean_is_scalar(x_106)) { + x_108 = lean_alloc_ctor(0, 2, 0); +} else { + x_108 = x_106; +} +lean_ctor_set(x_108, 0, x_107); +lean_ctor_set(x_108, 1, x_104); +x_1 = x_67; +x_2 = x_108; +goto _start; +} +else +{ +lean_dec(x_104); +lean_dec(x_103); +lean_dec(x_67); +return x_102; +} +} +} +} +else +{ +lean_dec(x_66); +if (x_69 == 0) +{ +lean_dec(x_82); +lean_dec(x_81); +lean_dec(x_67); return x_2; } else { -x_47 = x_2; -goto block_61; -} -} -} -block_61: +uint8_t x_110; +x_110 = l_HashSetImp_contains___at_Lean_CollectFVars_visit___spec__1(x_81, x_67); +if (x_110 == 0) { -lean_object* x_48; lean_object* x_49; uint8_t x_50; -x_48 = lean_ctor_get(x_47, 0); -lean_inc(x_48); -x_49 = lean_ctor_get(x_47, 1); -lean_inc(x_49); -x_50 = l_HashMapImp_contains___at_Lean_CollectFVars_visit___spec__1(x_48, x_46); -if (x_50 == 0) +uint8_t x_111; +x_111 = !lean_is_exclusive(x_2); +if (x_111 == 0) { -uint8_t x_51; -x_51 = !lean_is_exclusive(x_47); -if (x_51 == 0) -{ -lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; -x_52 = lean_ctor_get(x_47, 1); -lean_dec(x_52); -x_53 = lean_ctor_get(x_47, 0); -lean_dec(x_53); -x_54 = lean_box(0); -lean_inc(x_46); -x_55 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_48, x_46, x_54); -lean_ctor_set(x_47, 0, x_55); -x_1 = x_46; -x_2 = x_47; +lean_object* x_112; lean_object* x_113; lean_object* x_114; +x_112 = lean_ctor_get(x_2, 1); +lean_dec(x_112); +x_113 = lean_ctor_get(x_2, 0); +lean_dec(x_113); +lean_inc(x_67); +x_114 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_81, x_67); +lean_ctor_set(x_2, 0, x_114); +x_1 = x_67; goto _start; } else { -lean_object* x_57; lean_object* x_58; lean_object* x_59; -lean_dec(x_47); -x_57 = lean_box(0); -lean_inc(x_46); -x_58 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_48, x_46, x_57); -x_59 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_59, 0, x_58); -lean_ctor_set(x_59, 1, x_49); -x_1 = x_46; -x_2 = x_59; +lean_object* x_116; lean_object* x_117; +lean_dec(x_2); +lean_inc(x_67); +x_116 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_81, x_67); +x_117 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_117, 0, x_116); +lean_ctor_set(x_117, 1, x_82); +x_1 = x_67; +x_2 = x_117; goto _start; } } else { -lean_dec(x_49); -lean_dec(x_48); -lean_dec(x_46); -return x_47; +lean_dec(x_82); +lean_dec(x_81); +lean_dec(x_67); +return x_2; +} +} } } } case 7: { -lean_object* x_77; lean_object* x_78; lean_object* x_79; uint8_t x_94; uint8_t x_95; -x_77 = lean_ctor_get(x_1, 1); -lean_inc(x_77); -x_78 = lean_ctor_get(x_1, 2); -lean_inc(x_78); +lean_object* x_119; lean_object* x_120; uint8_t x_121; uint8_t x_122; +x_119 = lean_ctor_get(x_1, 1); +lean_inc(x_119); +x_120 = lean_ctor_get(x_1, 2); +lean_inc(x_120); lean_dec(x_1); -x_94 = l_Lean_Expr_hasFVar(x_77); -x_95 = l_Lean_Expr_hasFVar(x_78); -if (x_94 == 0) +x_121 = l_Lean_Expr_hasFVar(x_119); +x_122 = l_Lean_Expr_hasFVar(x_120); +if (x_121 == 0) { -lean_dec(x_77); -if (x_95 == 0) +lean_dec(x_119); +if (x_122 == 0) { -lean_dec(x_78); +lean_dec(x_120); return x_2; } else { -x_79 = x_2; -goto block_93; -} +lean_object* x_123; lean_object* x_124; uint8_t x_125; +x_123 = lean_ctor_get(x_2, 0); +lean_inc(x_123); +x_124 = lean_ctor_get(x_2, 1); +lean_inc(x_124); +x_125 = l_HashSetImp_contains___at_Lean_CollectFVars_visit___spec__1(x_123, x_120); +if (x_125 == 0) +{ +uint8_t x_126; +x_126 = !lean_is_exclusive(x_2); +if (x_126 == 0) +{ +lean_object* x_127; lean_object* x_128; lean_object* x_129; +x_127 = lean_ctor_get(x_2, 1); +lean_dec(x_127); +x_128 = lean_ctor_get(x_2, 0); +lean_dec(x_128); +lean_inc(x_120); +x_129 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_123, x_120); +lean_ctor_set(x_2, 0, x_129); +x_1 = x_120; +goto _start; } else { -lean_object* x_96; lean_object* x_97; uint8_t x_98; -x_96 = lean_ctor_get(x_2, 0); -lean_inc(x_96); -x_97 = lean_ctor_get(x_2, 1); -lean_inc(x_97); -x_98 = l_HashMapImp_contains___at_Lean_CollectFVars_visit___spec__1(x_96, x_77); -if (x_98 == 0) -{ -uint8_t x_99; -x_99 = !lean_is_exclusive(x_2); -if (x_99 == 0) -{ -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_2, 1); -lean_dec(x_100); -x_101 = lean_ctor_get(x_2, 0); -lean_dec(x_101); -x_102 = lean_box(0); -lean_inc(x_77); -x_103 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_96, x_77, x_102); -lean_ctor_set(x_2, 0, x_103); -x_104 = l_Lean_CollectFVars_main___main(x_77, x_2); -if (x_95 == 0) -{ -lean_dec(x_78); -return x_104; -} -else -{ -x_79 = x_104; -goto block_93; -} -} -else -{ -lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; +lean_object* x_131; lean_object* x_132; lean_dec(x_2); -x_105 = lean_box(0); -lean_inc(x_77); -x_106 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_96, x_77, x_105); -x_107 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_107, 0, x_106); -lean_ctor_set(x_107, 1, x_97); -x_108 = l_Lean_CollectFVars_main___main(x_77, x_107); -if (x_95 == 0) -{ -lean_dec(x_78); -return x_108; +lean_inc(x_120); +x_131 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_123, x_120); +x_132 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_132, 0, x_131); +lean_ctor_set(x_132, 1, x_124); +x_1 = x_120; +x_2 = x_132; +goto _start; +} } else { -x_79 = x_108; -goto block_93; +lean_dec(x_124); +lean_dec(x_123); +lean_dec(x_120); +return x_2; } } } else { -lean_dec(x_97); -lean_dec(x_96); -lean_dec(x_77); -if (x_95 == 0) +lean_object* x_134; lean_object* x_135; uint8_t x_136; +x_134 = lean_ctor_get(x_2, 0); +lean_inc(x_134); +x_135 = lean_ctor_get(x_2, 1); +lean_inc(x_135); +x_136 = l_HashSetImp_contains___at_Lean_CollectFVars_visit___spec__1(x_134, x_119); +if (x_136 == 0) { -lean_dec(x_78); +uint8_t x_137; +x_137 = !lean_is_exclusive(x_2); +if (x_137 == 0) +{ +lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; +x_138 = lean_ctor_get(x_2, 1); +lean_dec(x_138); +x_139 = lean_ctor_get(x_2, 0); +lean_dec(x_139); +lean_inc(x_119); +x_140 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_134, x_119); +lean_ctor_set(x_2, 0, x_140); +x_141 = l_Lean_CollectFVars_main___main(x_119, x_2); +if (x_122 == 0) +{ +lean_dec(x_120); +return x_141; +} +else +{ +lean_object* x_142; lean_object* x_143; uint8_t x_144; +x_142 = lean_ctor_get(x_141, 0); +lean_inc(x_142); +x_143 = lean_ctor_get(x_141, 1); +lean_inc(x_143); +x_144 = l_HashSetImp_contains___at_Lean_CollectFVars_visit___spec__1(x_142, x_120); +if (x_144 == 0) +{ +uint8_t x_145; +x_145 = !lean_is_exclusive(x_141); +if (x_145 == 0) +{ +lean_object* x_146; lean_object* x_147; lean_object* x_148; +x_146 = lean_ctor_get(x_141, 1); +lean_dec(x_146); +x_147 = lean_ctor_get(x_141, 0); +lean_dec(x_147); +lean_inc(x_120); +x_148 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_142, x_120); +lean_ctor_set(x_141, 0, x_148); +x_1 = x_120; +x_2 = x_141; +goto _start; +} +else +{ +lean_object* x_150; lean_object* x_151; +lean_dec(x_141); +lean_inc(x_120); +x_150 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_142, x_120); +x_151 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_151, 0, x_150); +lean_ctor_set(x_151, 1, x_143); +x_1 = x_120; +x_2 = x_151; +goto _start; +} +} +else +{ +lean_dec(x_143); +lean_dec(x_142); +lean_dec(x_120); +return x_141; +} +} +} +else +{ +lean_object* x_153; lean_object* x_154; lean_object* x_155; +lean_dec(x_2); +lean_inc(x_119); +x_153 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_134, x_119); +x_154 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_154, 0, x_153); +lean_ctor_set(x_154, 1, x_135); +x_155 = l_Lean_CollectFVars_main___main(x_119, x_154); +if (x_122 == 0) +{ +lean_dec(x_120); +return x_155; +} +else +{ +lean_object* x_156; lean_object* x_157; uint8_t x_158; +x_156 = lean_ctor_get(x_155, 0); +lean_inc(x_156); +x_157 = lean_ctor_get(x_155, 1); +lean_inc(x_157); +x_158 = l_HashSetImp_contains___at_Lean_CollectFVars_visit___spec__1(x_156, x_120); +if (x_158 == 0) +{ +lean_object* x_159; lean_object* x_160; lean_object* x_161; +if (lean_is_exclusive(x_155)) { + lean_ctor_release(x_155, 0); + lean_ctor_release(x_155, 1); + x_159 = x_155; +} else { + lean_dec_ref(x_155); + x_159 = lean_box(0); +} +lean_inc(x_120); +x_160 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_156, x_120); +if (lean_is_scalar(x_159)) { + x_161 = lean_alloc_ctor(0, 2, 0); +} else { + x_161 = x_159; +} +lean_ctor_set(x_161, 0, x_160); +lean_ctor_set(x_161, 1, x_157); +x_1 = x_120; +x_2 = x_161; +goto _start; +} +else +{ +lean_dec(x_157); +lean_dec(x_156); +lean_dec(x_120); +return x_155; +} +} +} +} +else +{ +lean_dec(x_119); +if (x_122 == 0) +{ +lean_dec(x_135); +lean_dec(x_134); +lean_dec(x_120); return x_2; } else { -x_79 = x_2; -goto block_93; -} -} -} -block_93: +uint8_t x_163; +x_163 = l_HashSetImp_contains___at_Lean_CollectFVars_visit___spec__1(x_134, x_120); +if (x_163 == 0) { -lean_object* x_80; lean_object* x_81; uint8_t x_82; -x_80 = lean_ctor_get(x_79, 0); -lean_inc(x_80); -x_81 = lean_ctor_get(x_79, 1); -lean_inc(x_81); -x_82 = l_HashMapImp_contains___at_Lean_CollectFVars_visit___spec__1(x_80, x_78); -if (x_82 == 0) +uint8_t x_164; +x_164 = !lean_is_exclusive(x_2); +if (x_164 == 0) { -uint8_t x_83; -x_83 = !lean_is_exclusive(x_79); -if (x_83 == 0) -{ -lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; -x_84 = lean_ctor_get(x_79, 1); -lean_dec(x_84); -x_85 = lean_ctor_get(x_79, 0); -lean_dec(x_85); -x_86 = lean_box(0); -lean_inc(x_78); -x_87 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_80, x_78, x_86); -lean_ctor_set(x_79, 0, x_87); -x_1 = x_78; -x_2 = x_79; +lean_object* x_165; lean_object* x_166; lean_object* x_167; +x_165 = lean_ctor_get(x_2, 1); +lean_dec(x_165); +x_166 = lean_ctor_get(x_2, 0); +lean_dec(x_166); +lean_inc(x_120); +x_167 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_134, x_120); +lean_ctor_set(x_2, 0, x_167); +x_1 = x_120; goto _start; } else { -lean_object* x_89; lean_object* x_90; lean_object* x_91; -lean_dec(x_79); -x_89 = lean_box(0); -lean_inc(x_78); -x_90 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_80, x_78, x_89); -x_91 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_91, 0, x_90); -lean_ctor_set(x_91, 1, x_81); -x_1 = x_78; -x_2 = x_91; +lean_object* x_169; lean_object* x_170; +lean_dec(x_2); +lean_inc(x_120); +x_169 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_134, x_120); +x_170 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_170, 0, x_169); +lean_ctor_set(x_170, 1, x_135); +x_1 = x_120; +x_2 = x_170; goto _start; } } else { -lean_dec(x_81); -lean_dec(x_80); -lean_dec(x_78); -return x_79; +lean_dec(x_135); +lean_dec(x_134); +lean_dec(x_120); +return x_2; +} +} } } } case 8: { -lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; uint8_t x_127; uint8_t x_128; uint8_t x_129; lean_object* x_130; -x_109 = lean_ctor_get(x_1, 1); -lean_inc(x_109); -x_110 = lean_ctor_get(x_1, 2); -lean_inc(x_110); -x_111 = lean_ctor_get(x_1, 3); -lean_inc(x_111); +lean_object* x_172; lean_object* x_173; lean_object* x_174; uint8_t x_175; uint8_t x_176; uint8_t x_177; lean_object* x_178; lean_object* x_191; +x_172 = lean_ctor_get(x_1, 1); +lean_inc(x_172); +x_173 = lean_ctor_get(x_1, 2); +lean_inc(x_173); +x_174 = lean_ctor_get(x_1, 3); +lean_inc(x_174); lean_dec(x_1); -x_127 = l_Lean_Expr_hasFVar(x_109); -x_128 = l_Lean_Expr_hasFVar(x_110); -x_129 = l_Lean_Expr_hasFVar(x_111); -if (x_127 == 0) +x_175 = l_Lean_Expr_hasFVar(x_172); +x_176 = l_Lean_Expr_hasFVar(x_173); +x_177 = l_Lean_Expr_hasFVar(x_174); +if (x_175 == 0) { -lean_dec(x_109); -if (x_128 == 0) +lean_dec(x_172); +if (x_176 == 0) { -lean_dec(x_110); -if (x_129 == 0) -{ -lean_dec(x_111); -return x_2; +lean_dec(x_173); +x_178 = x_2; +goto block_190; } else { -x_112 = x_2; -goto block_126; +x_191 = x_2; +goto block_230; } } else { -x_130 = x_2; -goto block_144; +lean_object* x_231; lean_object* x_232; uint8_t x_233; +x_231 = lean_ctor_get(x_2, 0); +lean_inc(x_231); +x_232 = lean_ctor_get(x_2, 1); +lean_inc(x_232); +x_233 = l_HashSetImp_contains___at_Lean_CollectFVars_visit___spec__1(x_231, x_172); +if (x_233 == 0) +{ +uint8_t x_234; +x_234 = !lean_is_exclusive(x_2); +if (x_234 == 0) +{ +lean_object* x_235; lean_object* x_236; lean_object* x_237; lean_object* x_238; +x_235 = lean_ctor_get(x_2, 1); +lean_dec(x_235); +x_236 = lean_ctor_get(x_2, 0); +lean_dec(x_236); +lean_inc(x_172); +x_237 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_231, x_172); +lean_ctor_set(x_2, 0, x_237); +x_238 = l_Lean_CollectFVars_main___main(x_172, x_2); +if (x_176 == 0) +{ +lean_dec(x_173); +x_178 = x_238; +goto block_190; +} +else +{ +x_191 = x_238; +goto block_230; } } else { -lean_object* x_145; lean_object* x_146; uint8_t x_147; -x_145 = lean_ctor_get(x_2, 0); -lean_inc(x_145); -x_146 = lean_ctor_get(x_2, 1); -lean_inc(x_146); -x_147 = l_HashMapImp_contains___at_Lean_CollectFVars_visit___spec__1(x_145, x_109); -if (x_147 == 0) -{ -uint8_t x_148; -x_148 = !lean_is_exclusive(x_2); -if (x_148 == 0) -{ -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_2, 1); -lean_dec(x_149); -x_150 = lean_ctor_get(x_2, 0); -lean_dec(x_150); -x_151 = lean_box(0); -lean_inc(x_109); -x_152 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_145, x_109, x_151); -lean_ctor_set(x_2, 0, x_152); -x_153 = l_Lean_CollectFVars_main___main(x_109, x_2); -if (x_128 == 0) -{ -lean_dec(x_110); -if (x_129 == 0) -{ -lean_dec(x_111); -return x_153; -} -else -{ -x_112 = x_153; -goto block_126; -} -} -else -{ -x_130 = x_153; -goto block_144; -} -} -else -{ -lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; +lean_object* x_239; lean_object* x_240; lean_object* x_241; lean_dec(x_2); -x_154 = lean_box(0); -lean_inc(x_109); -x_155 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_145, x_109, x_154); -x_156 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_156, 0, x_155); -lean_ctor_set(x_156, 1, x_146); -x_157 = l_Lean_CollectFVars_main___main(x_109, x_156); -if (x_128 == 0) +lean_inc(x_172); +x_239 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_231, x_172); +x_240 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_240, 0, x_239); +lean_ctor_set(x_240, 1, x_232); +x_241 = l_Lean_CollectFVars_main___main(x_172, x_240); +if (x_176 == 0) { -lean_dec(x_110); -if (x_129 == 0) -{ -lean_dec(x_111); -return x_157; +lean_dec(x_173); +x_178 = x_241; +goto block_190; } else { -x_112 = x_157; -goto block_126; -} -} -else -{ -x_130 = x_157; -goto block_144; +x_191 = x_241; +goto block_230; } } } else { -lean_dec(x_146); -lean_dec(x_145); -lean_dec(x_109); -if (x_128 == 0) +lean_dec(x_232); +lean_dec(x_231); +lean_dec(x_172); +if (x_176 == 0) { -lean_dec(x_110); -if (x_129 == 0) -{ -lean_dec(x_111); -return x_2; +lean_dec(x_173); +x_178 = x_2; +goto block_190; } else { -x_112 = x_2; -goto block_126; +x_191 = x_2; +goto block_230; } } +} +block_190: +{ +if (x_177 == 0) +{ +lean_dec(x_174); +return x_178; +} else { -x_130 = x_2; -goto block_144; -} -} -} -block_126: +lean_object* x_179; lean_object* x_180; uint8_t x_181; +x_179 = lean_ctor_get(x_178, 0); +lean_inc(x_179); +x_180 = lean_ctor_get(x_178, 1); +lean_inc(x_180); +x_181 = l_HashSetImp_contains___at_Lean_CollectFVars_visit___spec__1(x_179, x_174); +if (x_181 == 0) { -lean_object* x_113; lean_object* x_114; uint8_t x_115; -x_113 = lean_ctor_get(x_112, 0); -lean_inc(x_113); -x_114 = lean_ctor_get(x_112, 1); -lean_inc(x_114); -x_115 = l_HashMapImp_contains___at_Lean_CollectFVars_visit___spec__1(x_113, x_111); -if (x_115 == 0) +uint8_t x_182; +x_182 = !lean_is_exclusive(x_178); +if (x_182 == 0) { -uint8_t x_116; -x_116 = !lean_is_exclusive(x_112); -if (x_116 == 0) -{ -lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; -x_117 = lean_ctor_get(x_112, 1); -lean_dec(x_117); -x_118 = lean_ctor_get(x_112, 0); -lean_dec(x_118); -x_119 = lean_box(0); -lean_inc(x_111); -x_120 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_113, x_111, x_119); -lean_ctor_set(x_112, 0, x_120); -x_1 = x_111; -x_2 = x_112; +lean_object* x_183; lean_object* x_184; lean_object* x_185; +x_183 = lean_ctor_get(x_178, 1); +lean_dec(x_183); +x_184 = lean_ctor_get(x_178, 0); +lean_dec(x_184); +lean_inc(x_174); +x_185 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_179, x_174); +lean_ctor_set(x_178, 0, x_185); +x_1 = x_174; +x_2 = x_178; goto _start; } else { -lean_object* x_122; lean_object* x_123; lean_object* x_124; -lean_dec(x_112); -x_122 = lean_box(0); -lean_inc(x_111); -x_123 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_113, x_111, x_122); -x_124 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_124, 0, x_123); -lean_ctor_set(x_124, 1, x_114); -x_1 = x_111; -x_2 = x_124; +lean_object* x_187; lean_object* x_188; +lean_dec(x_178); +lean_inc(x_174); +x_187 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_179, x_174); +x_188 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_188, 0, x_187); +lean_ctor_set(x_188, 1, x_180); +x_1 = x_174; +x_2 = x_188; goto _start; } } else { -lean_dec(x_114); -lean_dec(x_113); -lean_dec(x_111); -return x_112; +lean_dec(x_180); +lean_dec(x_179); +lean_dec(x_174); +return x_178; } } -block_144: +} +block_230: { -lean_object* x_131; lean_object* x_132; uint8_t x_133; -x_131 = lean_ctor_get(x_130, 0); -lean_inc(x_131); -x_132 = lean_ctor_get(x_130, 1); -lean_inc(x_132); -x_133 = l_HashMapImp_contains___at_Lean_CollectFVars_visit___spec__1(x_131, x_110); -if (x_133 == 0) +lean_object* x_192; lean_object* x_193; uint8_t x_194; +x_192 = lean_ctor_get(x_191, 0); +lean_inc(x_192); +x_193 = lean_ctor_get(x_191, 1); +lean_inc(x_193); +x_194 = l_HashSetImp_contains___at_Lean_CollectFVars_visit___spec__1(x_192, x_173); +if (x_194 == 0) { -uint8_t x_134; -x_134 = !lean_is_exclusive(x_130); -if (x_134 == 0) +uint8_t x_195; +x_195 = !lean_is_exclusive(x_191); +if (x_195 == 0) { -lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; -x_135 = lean_ctor_get(x_130, 1); -lean_dec(x_135); -x_136 = lean_ctor_get(x_130, 0); -lean_dec(x_136); -x_137 = lean_box(0); -lean_inc(x_110); -x_138 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_131, x_110, x_137); -lean_ctor_set(x_130, 0, x_138); -x_139 = l_Lean_CollectFVars_main___main(x_110, x_130); -if (x_129 == 0) +lean_object* x_196; lean_object* x_197; lean_object* x_198; lean_object* x_199; +x_196 = lean_ctor_get(x_191, 1); +lean_dec(x_196); +x_197 = lean_ctor_get(x_191, 0); +lean_dec(x_197); +lean_inc(x_173); +x_198 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_192, x_173); +lean_ctor_set(x_191, 0, x_198); +x_199 = l_Lean_CollectFVars_main___main(x_173, x_191); +if (x_177 == 0) { -lean_dec(x_111); -return x_139; +lean_dec(x_174); +return x_199; } else { -x_112 = x_139; -goto block_126; +lean_object* x_200; lean_object* x_201; uint8_t x_202; +x_200 = lean_ctor_get(x_199, 0); +lean_inc(x_200); +x_201 = lean_ctor_get(x_199, 1); +lean_inc(x_201); +x_202 = l_HashSetImp_contains___at_Lean_CollectFVars_visit___spec__1(x_200, x_174); +if (x_202 == 0) +{ +uint8_t x_203; +x_203 = !lean_is_exclusive(x_199); +if (x_203 == 0) +{ +lean_object* x_204; lean_object* x_205; lean_object* x_206; +x_204 = lean_ctor_get(x_199, 1); +lean_dec(x_204); +x_205 = lean_ctor_get(x_199, 0); +lean_dec(x_205); +lean_inc(x_174); +x_206 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_200, x_174); +lean_ctor_set(x_199, 0, x_206); +x_1 = x_174; +x_2 = x_199; +goto _start; +} +else +{ +lean_object* x_208; lean_object* x_209; +lean_dec(x_199); +lean_inc(x_174); +x_208 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_200, x_174); +x_209 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_209, 0, x_208); +lean_ctor_set(x_209, 1, x_201); +x_1 = x_174; +x_2 = x_209; +goto _start; } } else { -lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; -lean_dec(x_130); -x_140 = lean_box(0); -lean_inc(x_110); -x_141 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_131, x_110, x_140); -x_142 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_142, 0, x_141); -lean_ctor_set(x_142, 1, x_132); -x_143 = l_Lean_CollectFVars_main___main(x_110, x_142); -if (x_129 == 0) -{ -lean_dec(x_111); -return x_143; -} -else -{ -x_112 = x_143; -goto block_126; +lean_dec(x_201); +lean_dec(x_200); +lean_dec(x_174); +return x_199; } } } else { -lean_dec(x_132); -lean_dec(x_131); -lean_dec(x_110); -if (x_129 == 0) +lean_object* x_211; lean_object* x_212; lean_object* x_213; +lean_dec(x_191); +lean_inc(x_173); +x_211 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_192, x_173); +x_212 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_212, 0, x_211); +lean_ctor_set(x_212, 1, x_193); +x_213 = l_Lean_CollectFVars_main___main(x_173, x_212); +if (x_177 == 0) { -lean_dec(x_111); -return x_130; +lean_dec(x_174); +return x_213; } else { -x_112 = x_130; -goto block_126; +lean_object* x_214; lean_object* x_215; uint8_t x_216; +x_214 = lean_ctor_get(x_213, 0); +lean_inc(x_214); +x_215 = lean_ctor_get(x_213, 1); +lean_inc(x_215); +x_216 = l_HashSetImp_contains___at_Lean_CollectFVars_visit___spec__1(x_214, x_174); +if (x_216 == 0) +{ +lean_object* x_217; lean_object* x_218; lean_object* x_219; +if (lean_is_exclusive(x_213)) { + lean_ctor_release(x_213, 0); + lean_ctor_release(x_213, 1); + x_217 = x_213; +} else { + lean_dec_ref(x_213); + x_217 = lean_box(0); +} +lean_inc(x_174); +x_218 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_214, x_174); +if (lean_is_scalar(x_217)) { + x_219 = lean_alloc_ctor(0, 2, 0); +} else { + x_219 = x_217; +} +lean_ctor_set(x_219, 0, x_218); +lean_ctor_set(x_219, 1, x_215); +x_1 = x_174; +x_2 = x_219; +goto _start; +} +else +{ +lean_dec(x_215); +lean_dec(x_214); +lean_dec(x_174); +return x_213; +} +} +} +} +else +{ +lean_dec(x_173); +if (x_177 == 0) +{ +lean_dec(x_193); +lean_dec(x_192); +lean_dec(x_174); +return x_191; +} +else +{ +uint8_t x_221; +x_221 = l_HashSetImp_contains___at_Lean_CollectFVars_visit___spec__1(x_192, x_174); +if (x_221 == 0) +{ +uint8_t x_222; +x_222 = !lean_is_exclusive(x_191); +if (x_222 == 0) +{ +lean_object* x_223; lean_object* x_224; lean_object* x_225; +x_223 = lean_ctor_get(x_191, 1); +lean_dec(x_223); +x_224 = lean_ctor_get(x_191, 0); +lean_dec(x_224); +lean_inc(x_174); +x_225 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_192, x_174); +lean_ctor_set(x_191, 0, x_225); +x_1 = x_174; +x_2 = x_191; +goto _start; +} +else +{ +lean_object* x_227; lean_object* x_228; +lean_dec(x_191); +lean_inc(x_174); +x_227 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_192, x_174); +x_228 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_228, 0, x_227); +lean_ctor_set(x_228, 1, x_193); +x_1 = x_174; +x_2 = x_228; +goto _start; +} +} +else +{ +lean_dec(x_193); +lean_dec(x_192); +lean_dec(x_174); +return x_191; +} } } } } case 10: { -lean_object* x_158; uint8_t x_159; -x_158 = lean_ctor_get(x_1, 1); -lean_inc(x_158); +lean_object* x_242; uint8_t x_243; +x_242 = lean_ctor_get(x_1, 1); +lean_inc(x_242); lean_dec(x_1); -x_159 = l_Lean_Expr_hasFVar(x_158); -if (x_159 == 0) +x_243 = l_Lean_Expr_hasFVar(x_242); +if (x_243 == 0) { -lean_dec(x_158); +lean_dec(x_242); return x_2; } else { -lean_object* x_160; lean_object* x_161; uint8_t x_162; -x_160 = lean_ctor_get(x_2, 0); -lean_inc(x_160); -x_161 = lean_ctor_get(x_2, 1); -lean_inc(x_161); -x_162 = l_HashMapImp_contains___at_Lean_CollectFVars_visit___spec__1(x_160, x_158); -if (x_162 == 0) +lean_object* x_244; lean_object* x_245; uint8_t x_246; +x_244 = lean_ctor_get(x_2, 0); +lean_inc(x_244); +x_245 = lean_ctor_get(x_2, 1); +lean_inc(x_245); +x_246 = l_HashSetImp_contains___at_Lean_CollectFVars_visit___spec__1(x_244, x_242); +if (x_246 == 0) { -uint8_t x_163; -x_163 = !lean_is_exclusive(x_2); -if (x_163 == 0) +uint8_t x_247; +x_247 = !lean_is_exclusive(x_2); +if (x_247 == 0) { -lean_object* x_164; lean_object* x_165; lean_object* x_166; lean_object* x_167; -x_164 = lean_ctor_get(x_2, 1); -lean_dec(x_164); -x_165 = lean_ctor_get(x_2, 0); -lean_dec(x_165); -x_166 = lean_box(0); -lean_inc(x_158); -x_167 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_160, x_158, x_166); -lean_ctor_set(x_2, 0, x_167); -x_1 = x_158; +lean_object* x_248; lean_object* x_249; lean_object* x_250; +x_248 = lean_ctor_get(x_2, 1); +lean_dec(x_248); +x_249 = lean_ctor_get(x_2, 0); +lean_dec(x_249); +lean_inc(x_242); +x_250 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_244, x_242); +lean_ctor_set(x_2, 0, x_250); +x_1 = x_242; goto _start; } else { -lean_object* x_169; lean_object* x_170; lean_object* x_171; +lean_object* x_252; lean_object* x_253; lean_dec(x_2); -x_169 = lean_box(0); -lean_inc(x_158); -x_170 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_160, x_158, x_169); -x_171 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_171, 0, x_170); -lean_ctor_set(x_171, 1, x_161); -x_1 = x_158; -x_2 = x_171; +lean_inc(x_242); +x_252 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_244, x_242); +x_253 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_253, 0, x_252); +lean_ctor_set(x_253, 1, x_245); +x_1 = x_242; +x_2 = x_253; goto _start; } } else { -lean_dec(x_161); -lean_dec(x_160); -lean_dec(x_158); +lean_dec(x_245); +lean_dec(x_244); +lean_dec(x_242); return x_2; } } } case 11: { -lean_object* x_173; uint8_t x_174; -x_173 = lean_ctor_get(x_1, 2); -lean_inc(x_173); +lean_object* x_255; uint8_t x_256; +x_255 = lean_ctor_get(x_1, 2); +lean_inc(x_255); lean_dec(x_1); -x_174 = l_Lean_Expr_hasFVar(x_173); -if (x_174 == 0) +x_256 = l_Lean_Expr_hasFVar(x_255); +if (x_256 == 0) { -lean_dec(x_173); +lean_dec(x_255); return x_2; } else { -lean_object* x_175; lean_object* x_176; uint8_t x_177; -x_175 = lean_ctor_get(x_2, 0); -lean_inc(x_175); -x_176 = lean_ctor_get(x_2, 1); -lean_inc(x_176); -x_177 = l_HashMapImp_contains___at_Lean_CollectFVars_visit___spec__1(x_175, x_173); -if (x_177 == 0) +lean_object* x_257; lean_object* x_258; uint8_t x_259; +x_257 = lean_ctor_get(x_2, 0); +lean_inc(x_257); +x_258 = lean_ctor_get(x_2, 1); +lean_inc(x_258); +x_259 = l_HashSetImp_contains___at_Lean_CollectFVars_visit___spec__1(x_257, x_255); +if (x_259 == 0) { -uint8_t x_178; -x_178 = !lean_is_exclusive(x_2); -if (x_178 == 0) +uint8_t x_260; +x_260 = !lean_is_exclusive(x_2); +if (x_260 == 0) { -lean_object* x_179; lean_object* x_180; lean_object* x_181; lean_object* x_182; -x_179 = lean_ctor_get(x_2, 1); -lean_dec(x_179); -x_180 = lean_ctor_get(x_2, 0); -lean_dec(x_180); -x_181 = lean_box(0); -lean_inc(x_173); -x_182 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_175, x_173, x_181); -lean_ctor_set(x_2, 0, x_182); -x_1 = x_173; +lean_object* x_261; lean_object* x_262; lean_object* x_263; +x_261 = lean_ctor_get(x_2, 1); +lean_dec(x_261); +x_262 = lean_ctor_get(x_2, 0); +lean_dec(x_262); +lean_inc(x_255); +x_263 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_257, x_255); +lean_ctor_set(x_2, 0, x_263); +x_1 = x_255; goto _start; } else { -lean_object* x_184; lean_object* x_185; lean_object* x_186; +lean_object* x_265; lean_object* x_266; lean_dec(x_2); -x_184 = lean_box(0); -lean_inc(x_173); -x_185 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_175, x_173, x_184); -x_186 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_186, 0, x_185); -lean_ctor_set(x_186, 1, x_176); -x_1 = x_173; -x_2 = x_186; +lean_inc(x_255); +x_265 = l_HashSetImp_insert___at_Lean_CollectFVars_visit___spec__3(x_257, x_255); +x_266 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_266, 0, x_265); +lean_ctor_set(x_266, 1, x_258); +x_1 = x_255; +x_2 = x_266; goto _start; } } else { -lean_dec(x_176); -lean_dec(x_175); -lean_dec(x_173); +lean_dec(x_258); +lean_dec(x_257); +lean_dec(x_255); return x_2; } } diff --git a/stage0/stdlib/Init/Lean/Util/CollectLevelParams.c b/stage0/stdlib/Init/Lean/Util/CollectLevelParams.c index 0da37dcc9c..56bdff807e 100644 --- a/stage0/stdlib/Init/Lean/Util/CollectLevelParams.c +++ b/stage0/stdlib/Init/Lean/Util/CollectLevelParams.c @@ -13,9 +13,11 @@ #ifdef __cplusplus extern "C" { #endif -lean_object* l_AssocList_replace___main___at_Lean_CollectLevelParams_visitLevel___spec__7(lean_object*, lean_object*, lean_object*); -lean_object* l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(lean_object*, lean_object*, lean_object*); +lean_object* l_List_replace___main___at_Lean_CollectLevelParams_visitExpr___spec__7___boxed(lean_object*, lean_object*, lean_object*); +uint8_t l_HashSetImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(lean_object*, lean_object*); +lean_object* l_mkHashSetImp___rarg(lean_object*); lean_object* lean_array_uget(lean_object*, size_t); +lean_object* l_HashSetImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1___boxed(lean_object*, lean_object*); lean_object* lean_array_uset(lean_object*, size_t, lean_object*); lean_object* l_Lean_CollectLevelParams_visitLevel(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_CollectLevelParams_collect(lean_object*, lean_object*); @@ -23,79 +25,61 @@ extern lean_object* l_Array_empty___closed__1; size_t l_Lean_Level_hash(lean_object*); lean_object* lean_array_push(lean_object*, lean_object*); lean_object* lean_array_get_size(lean_object*); -uint8_t l_AssocList_contains___main___at_Lean_CollectLevelParams_visitExpr___spec__2(lean_object*, lean_object*); uint8_t l_Lean_Level_hasParam(lean_object*); -uint8_t l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(lean_object*, lean_object*); -lean_object* l_HashMapImp_moveEntries___main___at_Lean_CollectLevelParams_visitExpr___spec__5(lean_object*, lean_object*, lean_object*); +uint8_t l_List_elem___main___at_Lean_CollectLevelParams_visitExpr___spec__2(lean_object*, lean_object*); lean_object* lean_nat_add(lean_object*, lean_object*); lean_object* l_Lean_CollectLevelParams_collect___main(lean_object*, lean_object*); -lean_object* l_AssocList_foldlM___main___at_Lean_CollectLevelParams_visitExpr___spec__6(lean_object*, lean_object*); lean_object* lean_array_fget(lean_object*, lean_object*); +uint8_t l_List_elem___main___at_Lean_CollectLevelParams_visitLevel___spec__2(lean_object*, lean_object*); uint8_t l_Lean_Expr_hasLevelParam(lean_object*); -lean_object* l_HashMapImp_expand___at_Lean_CollectLevelParams_visitLevel___spec__4(lean_object*, lean_object*); -uint8_t l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(lean_object*, lean_object*); +lean_object* l_HashSetImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(lean_object*, lean_object*); lean_object* l_Lean_CollectLevelParams_visitExpr(lean_object*, lean_object*, lean_object*); -lean_object* l_HashMapImp_expand___at_Lean_CollectLevelParams_visitExpr___spec__4(lean_object*, lean_object*); +lean_object* l_List_replace___main___at_Lean_CollectLevelParams_visitExpr___spec__7(lean_object*, lean_object*, lean_object*); lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); -lean_object* l_mkHashSet___at_Lean_CollectLevelParams_State_inhabited___spec__3(lean_object*); size_t l_Lean_Expr_hash(lean_object*); -lean_object* l_mkHashMap___at_Lean_CollectLevelParams_State_inhabited___spec__2(lean_object*); +lean_object* l_HashSetImp_moveEntries___main___at_Lean_CollectLevelParams_visitLevel___spec__5(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_CollectLevelParams_main(lean_object*, lean_object*); -lean_object* l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1___boxed(lean_object*, lean_object*); size_t lean_usize_modn(size_t, lean_object*); -lean_object* l_AssocList_foldlM___main___at_Lean_CollectLevelParams_visitLevel___spec__6(lean_object*, lean_object*); -lean_object* l_mkHashMapImp___rarg(lean_object*); lean_object* l_mkHashSet___at_Lean_CollectLevelParams_State_inhabited___spec__1(lean_object*); +lean_object* l_HashSetImp_moveEntries___main___at_Lean_CollectLevelParams_visitExpr___spec__5(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_CollectLevelParams_State_inhabited___closed__3; lean_object* l_List_foldl___main___at_Lean_CollectLevelParams_main___main___spec__1(lean_object*, lean_object*); uint8_t lean_expr_eqv(lean_object*, lean_object*); lean_object* l_Lean_CollectLevelParams_State_inhabited___closed__1; -lean_object* l_mkHashMap___at_Lean_CollectLevelParams_State_inhabited___spec__4(lean_object*); uint8_t lean_nat_dec_le(lean_object*, lean_object*); +lean_object* l_List_elem___main___at_Lean_CollectLevelParams_visitLevel___spec__2___boxed(lean_object*, lean_object*); lean_object* lean_nat_mul(lean_object*, lean_object*); -lean_object* l_AssocList_contains___main___at_Lean_CollectLevelParams_visitLevel___spec__2___boxed(lean_object*, lean_object*); -lean_object* l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1___boxed(lean_object*, lean_object*); -lean_object* l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(lean_object*, lean_object*, lean_object*); +lean_object* l_List_foldl___main___at_Lean_CollectLevelParams_visitLevel___spec__6(lean_object*, lean_object*); lean_object* lean_mk_array(lean_object*, lean_object*); +lean_object* l_List_replace___main___at_Lean_CollectLevelParams_visitLevel___spec__7(lean_object*, lean_object*, lean_object*); +uint8_t l_HashSetImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(lean_object*, lean_object*); +lean_object* l_HashSetImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(lean_object*, lean_object*); lean_object* l_Lean_CollectLevelParams_State_inhabited; +lean_object* l_HashSetImp_expand___at_Lean_CollectLevelParams_visitLevel___spec__4(lean_object*, lean_object*); +lean_object* l_List_elem___main___at_Lean_CollectLevelParams_visitExpr___spec__2___boxed(lean_object*, lean_object*); lean_object* l_Lean_CollectLevelParams_State_inhabited___closed__2; -lean_object* l_AssocList_replace___main___at_Lean_CollectLevelParams_visitExpr___spec__7(lean_object*, lean_object*, lean_object*); -lean_object* l_HashMapImp_moveEntries___main___at_Lean_CollectLevelParams_visitLevel___spec__5(lean_object*, lean_object*, lean_object*); -lean_object* l_AssocList_contains___main___at_Lean_CollectLevelParams_visitExpr___spec__2___boxed(lean_object*, lean_object*); +lean_object* l_List_foldl___main___at_Lean_CollectLevelParams_visitExpr___spec__6(lean_object*, lean_object*); +lean_object* l_HashSetImp_expand___at_Lean_CollectLevelParams_visitExpr___spec__4(lean_object*, lean_object*); lean_object* l_Lean_collectLevelParams(lean_object*, lean_object*); uint8_t lean_level_eq(lean_object*, lean_object*); -uint8_t l_AssocList_contains___main___at_Lean_CollectLevelParams_visitLevel___spec__2(lean_object*, lean_object*); +lean_object* l_List_replace___main___at_Lean_CollectLevelParams_visitLevel___spec__7___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_CollectLevelParams_main___main(lean_object*, lean_object*); +lean_object* l_HashSetImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1___boxed(lean_object*, lean_object*); +lean_object* l_mkHashSet___at_Lean_CollectLevelParams_State_inhabited___spec__2(lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); -lean_object* l_mkHashMap___at_Lean_CollectLevelParams_State_inhabited___spec__2(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_mkHashMapImp___rarg(x_1); -return x_2; -} -} lean_object* l_mkHashSet___at_Lean_CollectLevelParams_State_inhabited___spec__1(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = l_mkHashMapImp___rarg(x_1); +x_2 = l_mkHashSetImp___rarg(x_1); return x_2; } } -lean_object* l_mkHashMap___at_Lean_CollectLevelParams_State_inhabited___spec__4(lean_object* x_1) { +lean_object* l_mkHashSet___at_Lean_CollectLevelParams_State_inhabited___spec__2(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = l_mkHashMapImp___rarg(x_1); -return x_2; -} -} -lean_object* l_mkHashSet___at_Lean_CollectLevelParams_State_inhabited___spec__3(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_mkHashMapImp___rarg(x_1); +x_2 = l_mkHashSetImp___rarg(x_1); return x_2; } } @@ -104,7 +88,7 @@ _start: { lean_object* x_1; lean_object* x_2; x_1 = lean_unsigned_to_nat(8u); -x_2 = l_mkHashMapImp___rarg(x_1); +x_2 = l_mkHashSetImp___rarg(x_1); return x_2; } } @@ -113,7 +97,7 @@ _start: { lean_object* x_1; lean_object* x_2; x_1 = lean_unsigned_to_nat(8u); -x_2 = l_mkHashMapImp___rarg(x_1); +x_2 = l_mkHashSetImp___rarg(x_1); return x_2; } } @@ -139,7 +123,7 @@ x_1 = l_Lean_CollectLevelParams_State_inhabited___closed__3; return x_1; } } -uint8_t l_AssocList_contains___main___at_Lean_CollectLevelParams_visitLevel___spec__2(lean_object* x_1, lean_object* x_2) { +uint8_t l_List_elem___main___at_Lean_CollectLevelParams_visitLevel___spec__2(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) @@ -152,8 +136,8 @@ else { lean_object* x_4; lean_object* x_5; uint8_t x_6; x_4 = lean_ctor_get(x_2, 0); -x_5 = lean_ctor_get(x_2, 2); -x_6 = lean_level_eq(x_4, x_1); +x_5 = lean_ctor_get(x_2, 1); +x_6 = lean_level_eq(x_1, x_4); if (x_6 == 0) { x_2 = x_5; @@ -168,7 +152,7 @@ return x_8; } } } -uint8_t l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(lean_object* x_1, lean_object* x_2) { +uint8_t l_HashSetImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; size_t x_5; size_t x_6; lean_object* x_7; uint8_t x_8; @@ -178,12 +162,12 @@ x_5 = l_Lean_Level_hash(x_2); x_6 = lean_usize_modn(x_5, x_4); lean_dec(x_4); x_7 = lean_array_uget(x_3, x_6); -x_8 = l_AssocList_contains___main___at_Lean_CollectLevelParams_visitLevel___spec__2(x_2, x_7); +x_8 = l_List_elem___main___at_Lean_CollectLevelParams_visitLevel___spec__2(x_2, x_7); lean_dec(x_7); return x_8; } } -lean_object* l_AssocList_foldlM___main___at_Lean_CollectLevelParams_visitLevel___spec__6(lean_object* x_1, lean_object* x_2) { +lean_object* l_List_foldl___main___at_Lean_CollectLevelParams_visitLevel___spec__6(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) @@ -198,13 +182,13 @@ if (x_3 == 0) { lean_object* x_4; lean_object* x_5; lean_object* x_6; size_t x_7; size_t x_8; lean_object* x_9; lean_object* x_10; x_4 = lean_ctor_get(x_2, 0); -x_5 = lean_ctor_get(x_2, 2); +x_5 = lean_ctor_get(x_2, 1); x_6 = lean_array_get_size(x_1); x_7 = l_Lean_Level_hash(x_4); x_8 = lean_usize_modn(x_7, x_6); lean_dec(x_6); x_9 = lean_array_uget(x_1, x_8); -lean_ctor_set(x_2, 2, x_9); +lean_ctor_set(x_2, 1, x_9); x_10 = lean_array_uset(x_1, x_8, x_2); x_1 = x_10; x_2 = x_5; @@ -212,32 +196,29 @@ goto _start; } else { -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; size_t x_16; size_t x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; +lean_object* x_12; lean_object* x_13; lean_object* x_14; size_t x_15; size_t x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; x_12 = lean_ctor_get(x_2, 0); x_13 = lean_ctor_get(x_2, 1); -x_14 = lean_ctor_get(x_2, 2); -lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_dec(x_2); -x_15 = lean_array_get_size(x_1); -x_16 = l_Lean_Level_hash(x_12); -x_17 = lean_usize_modn(x_16, x_15); -lean_dec(x_15); -x_18 = lean_array_uget(x_1, x_17); -x_19 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_19, 0, x_12); -lean_ctor_set(x_19, 1, x_13); -lean_ctor_set(x_19, 2, x_18); -x_20 = lean_array_uset(x_1, x_17, x_19); -x_1 = x_20; -x_2 = x_14; +x_14 = lean_array_get_size(x_1); +x_15 = l_Lean_Level_hash(x_12); +x_16 = lean_usize_modn(x_15, x_14); +lean_dec(x_14); +x_17 = lean_array_uget(x_1, x_16); +x_18 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_18, 0, x_12); +lean_ctor_set(x_18, 1, x_17); +x_19 = lean_array_uset(x_1, x_16, x_18); +x_1 = x_19; +x_2 = x_13; goto _start; } } } } -lean_object* l_HashMapImp_moveEntries___main___at_Lean_CollectLevelParams_visitLevel___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_HashSetImp_moveEntries___main___at_Lean_CollectLevelParams_visitLevel___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; uint8_t x_5; @@ -256,7 +237,7 @@ lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_obj x_6 = lean_array_fget(x_2, x_1); x_7 = lean_box(0); x_8 = lean_array_fset(x_2, x_1, x_7); -x_9 = l_AssocList_foldlM___main___at_Lean_CollectLevelParams_visitLevel___spec__6(x_3, x_6); +x_9 = l_List_foldl___main___at_Lean_CollectLevelParams_visitLevel___spec__6(x_3, x_6); x_10 = lean_unsigned_to_nat(1u); x_11 = lean_nat_add(x_1, x_10); lean_dec(x_1); @@ -267,7 +248,7 @@ goto _start; } } } -lean_object* l_HashMapImp_expand___at_Lean_CollectLevelParams_visitLevel___spec__4(lean_object* x_1, lean_object* x_2) { +lean_object* l_HashSetImp_expand___at_Lean_CollectLevelParams_visitLevel___spec__4(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; @@ -278,188 +259,181 @@ lean_dec(x_3); x_6 = lean_box(0); x_7 = lean_mk_array(x_5, x_6); x_8 = lean_unsigned_to_nat(0u); -x_9 = l_HashMapImp_moveEntries___main___at_Lean_CollectLevelParams_visitLevel___spec__5(x_8, x_2, x_7); +x_9 = l_HashSetImp_moveEntries___main___at_Lean_CollectLevelParams_visitLevel___spec__5(x_8, x_2, x_7); x_10 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_10, 0, x_1); lean_ctor_set(x_10, 1, x_9); return x_10; } } -lean_object* l_AssocList_replace___main___at_Lean_CollectLevelParams_visitLevel___spec__7(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_List_replace___main___at_Lean_CollectLevelParams_visitLevel___spec__7(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { -if (lean_obj_tag(x_3) == 0) +if (lean_obj_tag(x_1) == 0) { -lean_dec(x_2); -lean_dec(x_1); -return x_3; -} -else -{ -uint8_t x_4; -x_4 = !lean_is_exclusive(x_3); -if (x_4 == 0) -{ -lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8; -x_5 = lean_ctor_get(x_3, 0); -x_6 = lean_ctor_get(x_3, 1); -x_7 = lean_ctor_get(x_3, 2); -x_8 = lean_level_eq(x_5, x_1); -if (x_8 == 0) -{ -lean_object* x_9; -x_9 = l_AssocList_replace___main___at_Lean_CollectLevelParams_visitLevel___spec__7(x_1, x_2, x_7); -lean_ctor_set(x_3, 2, x_9); -return x_3; -} -else -{ -lean_dec(x_6); -lean_dec(x_5); -lean_ctor_set(x_3, 1, x_2); -lean_ctor_set(x_3, 0, x_1); -return x_3; -} -} -else -{ -lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; -x_10 = lean_ctor_get(x_3, 0); -x_11 = lean_ctor_get(x_3, 1); -x_12 = lean_ctor_get(x_3, 2); -lean_inc(x_12); -lean_inc(x_11); -lean_inc(x_10); lean_dec(x_3); -x_13 = lean_level_eq(x_10, x_1); -if (x_13 == 0) -{ -lean_object* x_14; lean_object* x_15; -x_14 = l_AssocList_replace___main___at_Lean_CollectLevelParams_visitLevel___spec__7(x_1, x_2, x_12); -x_15 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_15, 0, x_10); -lean_ctor_set(x_15, 1, x_11); -lean_ctor_set(x_15, 2, x_14); -return x_15; +return x_1; } else { -lean_object* x_16; -lean_dec(x_11); -lean_dec(x_10); -x_16 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_16, 0, x_1); -lean_ctor_set(x_16, 1, x_2); -lean_ctor_set(x_16, 2, x_12); -return x_16; -} -} -} -} -} -lean_object* l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ uint8_t x_4; x_4 = !lean_is_exclusive(x_1); if (x_4 == 0) { -lean_object* x_5; lean_object* x_6; lean_object* x_7; size_t x_8; size_t x_9; lean_object* x_10; uint8_t x_11; +lean_object* x_5; lean_object* x_6; uint8_t x_7; x_5 = lean_ctor_get(x_1, 0); x_6 = lean_ctor_get(x_1, 1); -x_7 = lean_array_get_size(x_6); -x_8 = l_Lean_Level_hash(x_2); -x_9 = lean_usize_modn(x_8, x_7); -x_10 = lean_array_uget(x_6, x_9); -x_11 = l_AssocList_contains___main___at_Lean_CollectLevelParams_visitLevel___spec__2(x_2, x_10); +x_7 = lean_level_eq(x_5, x_2); +if (x_7 == 0) +{ +lean_object* x_8; +x_8 = l_List_replace___main___at_Lean_CollectLevelParams_visitLevel___spec__7(x_6, x_2, x_3); +lean_ctor_set(x_1, 1, x_8); +return x_1; +} +else +{ +lean_dec(x_5); +lean_ctor_set(x_1, 0, x_3); +return x_1; +} +} +else +{ +lean_object* x_9; lean_object* x_10; uint8_t x_11; +x_9 = lean_ctor_get(x_1, 0); +x_10 = lean_ctor_get(x_1, 1); +lean_inc(x_10); +lean_inc(x_9); +lean_dec(x_1); +x_11 = lean_level_eq(x_9, x_2); if (x_11 == 0) { -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; -x_12 = lean_unsigned_to_nat(1u); -x_13 = lean_nat_add(x_5, x_12); -lean_dec(x_5); -x_14 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_14, 0, x_2); -lean_ctor_set(x_14, 1, x_3); -lean_ctor_set(x_14, 2, x_10); -x_15 = lean_array_uset(x_6, x_9, x_14); -x_16 = lean_nat_dec_le(x_13, x_7); -lean_dec(x_7); -if (x_16 == 0) +lean_object* x_12; lean_object* x_13; +x_12 = l_List_replace___main___at_Lean_CollectLevelParams_visitLevel___spec__7(x_10, x_2, x_3); +x_13 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_13, 0, x_9); +lean_ctor_set(x_13, 1, x_12); +return x_13; +} +else { -lean_object* x_17; +lean_object* x_14; +lean_dec(x_9); +x_14 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_14, 0, x_3); +lean_ctor_set(x_14, 1, x_10); +return x_14; +} +} +} +} +} +lean_object* l_HashSetImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(lean_object* x_1, lean_object* x_2) { +_start: +{ +uint8_t x_3; +x_3 = !lean_is_exclusive(x_1); +if (x_3 == 0) +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; size_t x_7; size_t x_8; lean_object* x_9; uint8_t x_10; +x_4 = lean_ctor_get(x_1, 0); +x_5 = lean_ctor_get(x_1, 1); +x_6 = lean_array_get_size(x_5); +x_7 = l_Lean_Level_hash(x_2); +x_8 = lean_usize_modn(x_7, x_6); +x_9 = lean_array_uget(x_5, x_8); +x_10 = l_List_elem___main___at_Lean_CollectLevelParams_visitLevel___spec__2(x_2, x_9); +if (x_10 == 0) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; uint8_t x_15; +x_11 = lean_unsigned_to_nat(1u); +x_12 = lean_nat_add(x_4, x_11); +lean_dec(x_4); +x_13 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_13, 0, x_2); +lean_ctor_set(x_13, 1, x_9); +x_14 = lean_array_uset(x_5, x_8, x_13); +x_15 = lean_nat_dec_le(x_12, x_6); +lean_dec(x_6); +if (x_15 == 0) +{ +lean_object* x_16; lean_free_object(x_1); -x_17 = l_HashMapImp_expand___at_Lean_CollectLevelParams_visitLevel___spec__4(x_13, x_15); -return x_17; +x_16 = l_HashSetImp_expand___at_Lean_CollectLevelParams_visitLevel___spec__4(x_12, x_14); +return x_16; } else { -lean_ctor_set(x_1, 1, x_15); -lean_ctor_set(x_1, 0, x_13); +lean_ctor_set(x_1, 1, x_14); +lean_ctor_set(x_1, 0, x_12); return x_1; } } else { -lean_object* x_18; lean_object* x_19; -lean_dec(x_7); -x_18 = l_AssocList_replace___main___at_Lean_CollectLevelParams_visitLevel___spec__7(x_2, x_3, x_10); -x_19 = lean_array_uset(x_6, x_9, x_18); -lean_ctor_set(x_1, 1, x_19); +lean_object* x_17; lean_object* x_18; +lean_dec(x_6); +lean_inc(x_2); +x_17 = l_List_replace___main___at_Lean_CollectLevelParams_visitLevel___spec__7(x_9, x_2, x_2); +lean_dec(x_2); +x_18 = lean_array_uset(x_5, x_8, x_17); +lean_ctor_set(x_1, 1, x_18); return x_1; } } else { -lean_object* x_20; lean_object* x_21; lean_object* x_22; size_t x_23; size_t x_24; lean_object* x_25; uint8_t x_26; -x_20 = lean_ctor_get(x_1, 0); -x_21 = lean_ctor_get(x_1, 1); -lean_inc(x_21); +lean_object* x_19; lean_object* x_20; lean_object* x_21; size_t x_22; size_t x_23; lean_object* x_24; uint8_t x_25; +x_19 = lean_ctor_get(x_1, 0); +x_20 = lean_ctor_get(x_1, 1); lean_inc(x_20); +lean_inc(x_19); lean_dec(x_1); -x_22 = lean_array_get_size(x_21); -x_23 = l_Lean_Level_hash(x_2); -x_24 = lean_usize_modn(x_23, x_22); -x_25 = lean_array_uget(x_21, x_24); -x_26 = l_AssocList_contains___main___at_Lean_CollectLevelParams_visitLevel___spec__2(x_2, x_25); -if (x_26 == 0) +x_21 = lean_array_get_size(x_20); +x_22 = l_Lean_Level_hash(x_2); +x_23 = lean_usize_modn(x_22, x_21); +x_24 = lean_array_uget(x_20, x_23); +x_25 = l_List_elem___main___at_Lean_CollectLevelParams_visitLevel___spec__2(x_2, x_24); +if (x_25 == 0) { -lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; uint8_t x_31; -x_27 = lean_unsigned_to_nat(1u); -x_28 = lean_nat_add(x_20, x_27); -lean_dec(x_20); -x_29 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_29, 0, x_2); -lean_ctor_set(x_29, 1, x_3); -lean_ctor_set(x_29, 2, x_25); -x_30 = lean_array_uset(x_21, x_24, x_29); -x_31 = lean_nat_dec_le(x_28, x_22); -lean_dec(x_22); -if (x_31 == 0) +lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; uint8_t x_30; +x_26 = lean_unsigned_to_nat(1u); +x_27 = lean_nat_add(x_19, x_26); +lean_dec(x_19); +x_28 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_28, 0, x_2); +lean_ctor_set(x_28, 1, x_24); +x_29 = lean_array_uset(x_20, x_23, x_28); +x_30 = lean_nat_dec_le(x_27, x_21); +lean_dec(x_21); +if (x_30 == 0) +{ +lean_object* x_31; +x_31 = l_HashSetImp_expand___at_Lean_CollectLevelParams_visitLevel___spec__4(x_27, x_29); +return x_31; +} +else { lean_object* x_32; -x_32 = l_HashMapImp_expand___at_Lean_CollectLevelParams_visitLevel___spec__4(x_28, x_30); +x_32 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_32, 0, x_27); +lean_ctor_set(x_32, 1, x_29); return x_32; } -else -{ -lean_object* x_33; -x_33 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_33, 0, x_28); -lean_ctor_set(x_33, 1, x_30); -return x_33; -} } else { -lean_object* x_34; lean_object* x_35; lean_object* x_36; -lean_dec(x_22); -x_34 = l_AssocList_replace___main___at_Lean_CollectLevelParams_visitLevel___spec__7(x_2, x_3, x_25); -x_35 = lean_array_uset(x_21, x_24, x_34); -x_36 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_36, 0, x_20); -lean_ctor_set(x_36, 1, x_35); -return x_36; +lean_object* x_33; lean_object* x_34; lean_object* x_35; +lean_dec(x_21); +lean_inc(x_2); +x_33 = l_List_replace___main___at_Lean_CollectLevelParams_visitLevel___spec__7(x_24, x_2, x_2); +lean_dec(x_2); +x_34 = lean_array_uset(x_20, x_23, x_33); +x_35 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_35, 0, x_19); +lean_ctor_set(x_35, 1, x_34); +return x_35; } } } @@ -484,40 +458,38 @@ x_6 = lean_ctor_get(x_3, 1); lean_inc(x_6); x_7 = lean_ctor_get(x_3, 2); lean_inc(x_7); -x_8 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(x_5, x_2); +x_8 = l_HashSetImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(x_5, x_2); if (x_8 == 0) { uint8_t x_9; x_9 = !lean_is_exclusive(x_3); if (x_9 == 0) { -lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; x_10 = lean_ctor_get(x_3, 2); lean_dec(x_10); x_11 = lean_ctor_get(x_3, 1); lean_dec(x_11); x_12 = lean_ctor_get(x_3, 0); lean_dec(x_12); -x_13 = lean_box(0); lean_inc(x_2); -x_14 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_5, x_2, x_13); -lean_ctor_set(x_3, 0, x_14); -x_15 = lean_apply_2(x_1, x_2, x_3); -return x_15; +x_13 = l_HashSetImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_5, x_2); +lean_ctor_set(x_3, 0, x_13); +x_14 = lean_apply_2(x_1, x_2, x_3); +return x_14; } else { -lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_dec(x_3); -x_16 = lean_box(0); lean_inc(x_2); -x_17 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_5, x_2, x_16); -x_18 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_18, 0, x_17); -lean_ctor_set(x_18, 1, x_6); -lean_ctor_set(x_18, 2, x_7); -x_19 = lean_apply_2(x_1, x_2, x_18); -return x_19; +x_15 = l_HashSetImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_5, x_2); +x_16 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_16, 0, x_15); +lean_ctor_set(x_16, 1, x_6); +lean_ctor_set(x_16, 2, x_7); +x_17 = lean_apply_2(x_1, x_2, x_16); +return x_17; } } else @@ -532,28 +504,37 @@ return x_3; } } } -lean_object* l_AssocList_contains___main___at_Lean_CollectLevelParams_visitLevel___spec__2___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l_List_elem___main___at_Lean_CollectLevelParams_visitLevel___spec__2___boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; -x_3 = l_AssocList_contains___main___at_Lean_CollectLevelParams_visitLevel___spec__2(x_1, x_2); +x_3 = l_List_elem___main___at_Lean_CollectLevelParams_visitLevel___spec__2(x_1, x_2); lean_dec(x_2); lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } } -lean_object* l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l_HashSetImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1___boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; -x_3 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(x_1, x_2); +x_3 = l_HashSetImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(x_1, x_2); lean_dec(x_2); lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } } +lean_object* l_List_replace___main___at_Lean_CollectLevelParams_visitLevel___spec__7___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_List_replace___main___at_Lean_CollectLevelParams_visitLevel___spec__7(x_1, x_2, x_3); +lean_dec(x_2); +return x_4; +} +} lean_object* l_Lean_CollectLevelParams_collect___main(lean_object* x_1, lean_object* x_2) { _start: { @@ -579,40 +560,38 @@ x_6 = lean_ctor_get(x_2, 1); lean_inc(x_6); x_7 = lean_ctor_get(x_2, 2); lean_inc(x_7); -x_8 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(x_5, x_3); +x_8 = l_HashSetImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(x_5, x_3); if (x_8 == 0) { uint8_t x_9; x_9 = !lean_is_exclusive(x_2); if (x_9 == 0) { -lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; x_10 = lean_ctor_get(x_2, 2); lean_dec(x_10); x_11 = lean_ctor_get(x_2, 1); lean_dec(x_11); x_12 = lean_ctor_get(x_2, 0); lean_dec(x_12); -x_13 = lean_box(0); lean_inc(x_3); -x_14 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_5, x_3, x_13); -lean_ctor_set(x_2, 0, x_14); +x_13 = l_HashSetImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_5, x_3); +lean_ctor_set(x_2, 0, x_13); x_1 = x_3; goto _start; } else { -lean_object* x_16; lean_object* x_17; lean_object* x_18; +lean_object* x_15; lean_object* x_16; lean_dec(x_2); -x_16 = lean_box(0); lean_inc(x_3); -x_17 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_5, x_3, x_16); -x_18 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_18, 0, x_17); -lean_ctor_set(x_18, 1, x_6); -lean_ctor_set(x_18, 2, x_7); +x_15 = l_HashSetImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_5, x_3); +x_16 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_16, 0, x_15); +lean_ctor_set(x_16, 1, x_6); +lean_ctor_set(x_16, 2, x_7); x_1 = x_3; -x_2 = x_18; +x_2 = x_16; goto _start; } } @@ -628,359 +607,351 @@ return x_2; } case 2: { -lean_object* x_20; lean_object* x_21; lean_object* x_22; uint8_t x_39; uint8_t x_40; -x_20 = lean_ctor_get(x_1, 0); -lean_inc(x_20); -x_21 = lean_ctor_get(x_1, 1); -lean_inc(x_21); +lean_object* x_18; lean_object* x_19; lean_object* x_20; uint8_t x_35; uint8_t x_36; +x_18 = lean_ctor_get(x_1, 0); +lean_inc(x_18); +x_19 = lean_ctor_get(x_1, 1); +lean_inc(x_19); lean_dec(x_1); -x_39 = l_Lean_Level_hasParam(x_20); -x_40 = l_Lean_Level_hasParam(x_21); -if (x_39 == 0) +x_35 = l_Lean_Level_hasParam(x_18); +x_36 = l_Lean_Level_hasParam(x_19); +if (x_35 == 0) { -lean_dec(x_20); -if (x_40 == 0) +lean_dec(x_18); +if (x_36 == 0) { -lean_dec(x_21); +lean_dec(x_19); return x_2; } else { -x_22 = x_2; -goto block_38; +x_20 = x_2; +goto block_34; } } else { -lean_object* x_41; lean_object* x_42; lean_object* x_43; uint8_t x_44; -x_41 = lean_ctor_get(x_2, 0); -lean_inc(x_41); -x_42 = lean_ctor_get(x_2, 1); -lean_inc(x_42); -x_43 = lean_ctor_get(x_2, 2); -lean_inc(x_43); -x_44 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(x_41, x_20); -if (x_44 == 0) -{ -uint8_t x_45; -x_45 = !lean_is_exclusive(x_2); -if (x_45 == 0) -{ -lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; -x_46 = lean_ctor_get(x_2, 2); -lean_dec(x_46); -x_47 = lean_ctor_get(x_2, 1); -lean_dec(x_47); -x_48 = lean_ctor_get(x_2, 0); -lean_dec(x_48); -x_49 = lean_box(0); -lean_inc(x_20); -x_50 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_41, x_20, x_49); -lean_ctor_set(x_2, 0, x_50); -x_51 = l_Lean_CollectLevelParams_collect___main(x_20, x_2); +lean_object* x_37; lean_object* x_38; lean_object* x_39; uint8_t x_40; +x_37 = lean_ctor_get(x_2, 0); +lean_inc(x_37); +x_38 = lean_ctor_get(x_2, 1); +lean_inc(x_38); +x_39 = lean_ctor_get(x_2, 2); +lean_inc(x_39); +x_40 = l_HashSetImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(x_37, x_18); if (x_40 == 0) { -lean_dec(x_21); -return x_51; -} -else +uint8_t x_41; +x_41 = !lean_is_exclusive(x_2); +if (x_41 == 0) { -x_22 = x_51; -goto block_38; -} -} -else -{ -lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; -lean_dec(x_2); -x_52 = lean_box(0); -lean_inc(x_20); -x_53 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_41, x_20, x_52); -x_54 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_54, 0, x_53); -lean_ctor_set(x_54, 1, x_42); -lean_ctor_set(x_54, 2, x_43); -x_55 = l_Lean_CollectLevelParams_collect___main(x_20, x_54); -if (x_40 == 0) -{ -lean_dec(x_21); -return x_55; -} -else -{ -x_22 = x_55; -goto block_38; -} -} -} -else -{ -lean_dec(x_43); +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_2, 2); lean_dec(x_42); -lean_dec(x_41); -lean_dec(x_20); -if (x_40 == 0) +x_43 = lean_ctor_get(x_2, 1); +lean_dec(x_43); +x_44 = lean_ctor_get(x_2, 0); +lean_dec(x_44); +lean_inc(x_18); +x_45 = l_HashSetImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_37, x_18); +lean_ctor_set(x_2, 0, x_45); +x_46 = l_Lean_CollectLevelParams_collect___main(x_18, x_2); +if (x_36 == 0) { -lean_dec(x_21); +lean_dec(x_19); +return x_46; +} +else +{ +x_20 = x_46; +goto block_34; +} +} +else +{ +lean_object* x_47; lean_object* x_48; lean_object* x_49; +lean_dec(x_2); +lean_inc(x_18); +x_47 = l_HashSetImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_37, x_18); +x_48 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_48, 0, x_47); +lean_ctor_set(x_48, 1, x_38); +lean_ctor_set(x_48, 2, x_39); +x_49 = l_Lean_CollectLevelParams_collect___main(x_18, x_48); +if (x_36 == 0) +{ +lean_dec(x_19); +return x_49; +} +else +{ +x_20 = x_49; +goto block_34; +} +} +} +else +{ +lean_dec(x_39); +lean_dec(x_38); +lean_dec(x_37); +lean_dec(x_18); +if (x_36 == 0) +{ +lean_dec(x_19); return x_2; } else { -x_22 = x_2; -goto block_38; +x_20 = x_2; +goto block_34; } } } -block_38: +block_34: { -lean_object* x_23; lean_object* x_24; lean_object* x_25; uint8_t x_26; -x_23 = lean_ctor_get(x_22, 0); +lean_object* x_21; lean_object* x_22; lean_object* x_23; uint8_t x_24; +x_21 = lean_ctor_get(x_20, 0); +lean_inc(x_21); +x_22 = lean_ctor_get(x_20, 1); +lean_inc(x_22); +x_23 = lean_ctor_get(x_20, 2); lean_inc(x_23); -x_24 = lean_ctor_get(x_22, 1); -lean_inc(x_24); -x_25 = lean_ctor_get(x_22, 2); -lean_inc(x_25); -x_26 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(x_23, x_21); -if (x_26 == 0) +x_24 = l_HashSetImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(x_21, x_19); +if (x_24 == 0) { -uint8_t x_27; -x_27 = !lean_is_exclusive(x_22); -if (x_27 == 0) +uint8_t x_25; +x_25 = !lean_is_exclusive(x_20); +if (x_25 == 0) { -lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; -x_28 = lean_ctor_get(x_22, 2); +lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_26 = lean_ctor_get(x_20, 2); +lean_dec(x_26); +x_27 = lean_ctor_get(x_20, 1); +lean_dec(x_27); +x_28 = lean_ctor_get(x_20, 0); lean_dec(x_28); -x_29 = lean_ctor_get(x_22, 1); -lean_dec(x_29); -x_30 = lean_ctor_get(x_22, 0); -lean_dec(x_30); -x_31 = lean_box(0); -lean_inc(x_21); -x_32 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_23, x_21, x_31); -lean_ctor_set(x_22, 0, x_32); -x_1 = x_21; -x_2 = x_22; +lean_inc(x_19); +x_29 = l_HashSetImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_21, x_19); +lean_ctor_set(x_20, 0, x_29); +x_1 = x_19; +x_2 = x_20; goto _start; } else { -lean_object* x_34; lean_object* x_35; lean_object* x_36; -lean_dec(x_22); -x_34 = lean_box(0); -lean_inc(x_21); -x_35 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_23, x_21, x_34); -x_36 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_36, 0, x_35); -lean_ctor_set(x_36, 1, x_24); -lean_ctor_set(x_36, 2, x_25); -x_1 = x_21; -x_2 = x_36; +lean_object* x_31; lean_object* x_32; +lean_dec(x_20); +lean_inc(x_19); +x_31 = l_HashSetImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_21, x_19); +x_32 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_32, 0, x_31); +lean_ctor_set(x_32, 1, x_22); +lean_ctor_set(x_32, 2, x_23); +x_1 = x_19; +x_2 = x_32; goto _start; } } else { -lean_dec(x_25); -lean_dec(x_24); lean_dec(x_23); +lean_dec(x_22); lean_dec(x_21); -return x_22; +lean_dec(x_19); +return x_20; } } } case 3: { -lean_object* x_56; lean_object* x_57; lean_object* x_58; uint8_t x_75; uint8_t x_76; -x_56 = lean_ctor_get(x_1, 0); -lean_inc(x_56); -x_57 = lean_ctor_get(x_1, 1); -lean_inc(x_57); +lean_object* x_50; lean_object* x_51; lean_object* x_52; uint8_t x_67; uint8_t x_68; +x_50 = lean_ctor_get(x_1, 0); +lean_inc(x_50); +x_51 = lean_ctor_get(x_1, 1); +lean_inc(x_51); lean_dec(x_1); -x_75 = l_Lean_Level_hasParam(x_56); -x_76 = l_Lean_Level_hasParam(x_57); -if (x_75 == 0) +x_67 = l_Lean_Level_hasParam(x_50); +x_68 = l_Lean_Level_hasParam(x_51); +if (x_67 == 0) { -lean_dec(x_56); -if (x_76 == 0) +lean_dec(x_50); +if (x_68 == 0) { -lean_dec(x_57); +lean_dec(x_51); return x_2; } else { -x_58 = x_2; -goto block_74; +x_52 = x_2; +goto block_66; } } else { -lean_object* x_77; lean_object* x_78; lean_object* x_79; uint8_t x_80; -x_77 = lean_ctor_get(x_2, 0); -lean_inc(x_77); -x_78 = lean_ctor_get(x_2, 1); -lean_inc(x_78); -x_79 = lean_ctor_get(x_2, 2); -lean_inc(x_79); -x_80 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(x_77, x_56); -if (x_80 == 0) +lean_object* x_69; lean_object* x_70; lean_object* x_71; uint8_t x_72; +x_69 = lean_ctor_get(x_2, 0); +lean_inc(x_69); +x_70 = lean_ctor_get(x_2, 1); +lean_inc(x_70); +x_71 = lean_ctor_get(x_2, 2); +lean_inc(x_71); +x_72 = l_HashSetImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(x_69, x_50); +if (x_72 == 0) { -uint8_t x_81; -x_81 = !lean_is_exclusive(x_2); -if (x_81 == 0) +uint8_t x_73; +x_73 = !lean_is_exclusive(x_2); +if (x_73 == 0) { -lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; -x_82 = lean_ctor_get(x_2, 2); -lean_dec(x_82); -x_83 = lean_ctor_get(x_2, 1); -lean_dec(x_83); -x_84 = lean_ctor_get(x_2, 0); -lean_dec(x_84); -x_85 = lean_box(0); -lean_inc(x_56); -x_86 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_77, x_56, x_85); -lean_ctor_set(x_2, 0, x_86); -x_87 = l_Lean_CollectLevelParams_collect___main(x_56, x_2); -if (x_76 == 0) +lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; +x_74 = lean_ctor_get(x_2, 2); +lean_dec(x_74); +x_75 = lean_ctor_get(x_2, 1); +lean_dec(x_75); +x_76 = lean_ctor_get(x_2, 0); +lean_dec(x_76); +lean_inc(x_50); +x_77 = l_HashSetImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_69, x_50); +lean_ctor_set(x_2, 0, x_77); +x_78 = l_Lean_CollectLevelParams_collect___main(x_50, x_2); +if (x_68 == 0) { -lean_dec(x_57); -return x_87; +lean_dec(x_51); +return x_78; } else { -x_58 = x_87; -goto block_74; +x_52 = x_78; +goto block_66; } } else { -lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; +lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_dec(x_2); -x_88 = lean_box(0); -lean_inc(x_56); -x_89 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_77, x_56, x_88); -x_90 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_90, 0, x_89); -lean_ctor_set(x_90, 1, x_78); -lean_ctor_set(x_90, 2, x_79); -x_91 = l_Lean_CollectLevelParams_collect___main(x_56, x_90); -if (x_76 == 0) +lean_inc(x_50); +x_79 = l_HashSetImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_69, x_50); +x_80 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_80, 0, x_79); +lean_ctor_set(x_80, 1, x_70); +lean_ctor_set(x_80, 2, x_71); +x_81 = l_Lean_CollectLevelParams_collect___main(x_50, x_80); +if (x_68 == 0) { -lean_dec(x_57); -return x_91; +lean_dec(x_51); +return x_81; } else { -x_58 = x_91; -goto block_74; +x_52 = x_81; +goto block_66; } } } else { -lean_dec(x_79); -lean_dec(x_78); -lean_dec(x_77); -lean_dec(x_56); -if (x_76 == 0) +lean_dec(x_71); +lean_dec(x_70); +lean_dec(x_69); +lean_dec(x_50); +if (x_68 == 0) { -lean_dec(x_57); +lean_dec(x_51); return x_2; } else { -x_58 = x_2; -goto block_74; +x_52 = x_2; +goto block_66; } } } -block_74: +block_66: { -lean_object* x_59; lean_object* x_60; lean_object* x_61; uint8_t x_62; -x_59 = lean_ctor_get(x_58, 0); -lean_inc(x_59); -x_60 = lean_ctor_get(x_58, 1); -lean_inc(x_60); -x_61 = lean_ctor_get(x_58, 2); -lean_inc(x_61); -x_62 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(x_59, x_57); -if (x_62 == 0) +lean_object* x_53; lean_object* x_54; lean_object* x_55; uint8_t x_56; +x_53 = lean_ctor_get(x_52, 0); +lean_inc(x_53); +x_54 = lean_ctor_get(x_52, 1); +lean_inc(x_54); +x_55 = lean_ctor_get(x_52, 2); +lean_inc(x_55); +x_56 = l_HashSetImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(x_53, x_51); +if (x_56 == 0) { -uint8_t x_63; -x_63 = !lean_is_exclusive(x_58); -if (x_63 == 0) +uint8_t x_57; +x_57 = !lean_is_exclusive(x_52); +if (x_57 == 0) { -lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; -x_64 = lean_ctor_get(x_58, 2); -lean_dec(x_64); -x_65 = lean_ctor_get(x_58, 1); -lean_dec(x_65); -x_66 = lean_ctor_get(x_58, 0); -lean_dec(x_66); -x_67 = lean_box(0); -lean_inc(x_57); -x_68 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_59, x_57, x_67); -lean_ctor_set(x_58, 0, x_68); -x_1 = x_57; -x_2 = x_58; -goto _start; -} -else -{ -lean_object* x_70; lean_object* x_71; lean_object* x_72; +lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; +x_58 = lean_ctor_get(x_52, 2); lean_dec(x_58); -x_70 = lean_box(0); -lean_inc(x_57); -x_71 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_59, x_57, x_70); -x_72 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_72, 0, x_71); -lean_ctor_set(x_72, 1, x_60); -lean_ctor_set(x_72, 2, x_61); -x_1 = x_57; -x_2 = x_72; +x_59 = lean_ctor_get(x_52, 1); +lean_dec(x_59); +x_60 = lean_ctor_get(x_52, 0); +lean_dec(x_60); +lean_inc(x_51); +x_61 = l_HashSetImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_53, x_51); +lean_ctor_set(x_52, 0, x_61); +x_1 = x_51; +x_2 = x_52; +goto _start; +} +else +{ +lean_object* x_63; lean_object* x_64; +lean_dec(x_52); +lean_inc(x_51); +x_63 = l_HashSetImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_53, x_51); +x_64 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_64, 0, x_63); +lean_ctor_set(x_64, 1, x_54); +lean_ctor_set(x_64, 2, x_55); +x_1 = x_51; +x_2 = x_64; goto _start; } } else { -lean_dec(x_61); -lean_dec(x_60); -lean_dec(x_59); -lean_dec(x_57); -return x_58; +lean_dec(x_55); +lean_dec(x_54); +lean_dec(x_53); +lean_dec(x_51); +return x_52; } } } case 4: { -lean_object* x_92; uint8_t x_93; -x_92 = lean_ctor_get(x_1, 0); -lean_inc(x_92); +lean_object* x_82; uint8_t x_83; +x_82 = lean_ctor_get(x_1, 0); +lean_inc(x_82); lean_dec(x_1); -x_93 = !lean_is_exclusive(x_2); -if (x_93 == 0) +x_83 = !lean_is_exclusive(x_2); +if (x_83 == 0) { -lean_object* x_94; lean_object* x_95; -x_94 = lean_ctor_get(x_2, 2); -x_95 = lean_array_push(x_94, x_92); -lean_ctor_set(x_2, 2, x_95); +lean_object* x_84; lean_object* x_85; +x_84 = lean_ctor_get(x_2, 2); +x_85 = lean_array_push(x_84, x_82); +lean_ctor_set(x_2, 2, x_85); return x_2; } else { -lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; -x_96 = lean_ctor_get(x_2, 0); -x_97 = lean_ctor_get(x_2, 1); -x_98 = lean_ctor_get(x_2, 2); -lean_inc(x_98); -lean_inc(x_97); -lean_inc(x_96); +lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; +x_86 = lean_ctor_get(x_2, 0); +x_87 = lean_ctor_get(x_2, 1); +x_88 = lean_ctor_get(x_2, 2); +lean_inc(x_88); +lean_inc(x_87); +lean_inc(x_86); lean_dec(x_2); -x_99 = lean_array_push(x_98, x_92); -x_100 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_100, 0, x_96); -lean_ctor_set(x_100, 1, x_97); -lean_ctor_set(x_100, 2, x_99); -return x_100; +x_89 = lean_array_push(x_88, x_82); +x_90 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_90, 0, x_86); +lean_ctor_set(x_90, 1, x_87); +lean_ctor_set(x_90, 2, x_89); +return x_90; } } default: @@ -999,7 +970,7 @@ x_3 = l_Lean_CollectLevelParams_collect___main(x_1, x_2); return x_3; } } -uint8_t l_AssocList_contains___main___at_Lean_CollectLevelParams_visitExpr___spec__2(lean_object* x_1, lean_object* x_2) { +uint8_t l_List_elem___main___at_Lean_CollectLevelParams_visitExpr___spec__2(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) @@ -1012,8 +983,8 @@ else { lean_object* x_4; lean_object* x_5; uint8_t x_6; x_4 = lean_ctor_get(x_2, 0); -x_5 = lean_ctor_get(x_2, 2); -x_6 = lean_expr_eqv(x_4, x_1); +x_5 = lean_ctor_get(x_2, 1); +x_6 = lean_expr_eqv(x_1, x_4); if (x_6 == 0) { x_2 = x_5; @@ -1028,7 +999,7 @@ return x_8; } } } -uint8_t l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(lean_object* x_1, lean_object* x_2) { +uint8_t l_HashSetImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; size_t x_5; size_t x_6; lean_object* x_7; uint8_t x_8; @@ -1038,12 +1009,12 @@ x_5 = l_Lean_Expr_hash(x_2); x_6 = lean_usize_modn(x_5, x_4); lean_dec(x_4); x_7 = lean_array_uget(x_3, x_6); -x_8 = l_AssocList_contains___main___at_Lean_CollectLevelParams_visitExpr___spec__2(x_2, x_7); +x_8 = l_List_elem___main___at_Lean_CollectLevelParams_visitExpr___spec__2(x_2, x_7); lean_dec(x_7); return x_8; } } -lean_object* l_AssocList_foldlM___main___at_Lean_CollectLevelParams_visitExpr___spec__6(lean_object* x_1, lean_object* x_2) { +lean_object* l_List_foldl___main___at_Lean_CollectLevelParams_visitExpr___spec__6(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) @@ -1058,13 +1029,13 @@ if (x_3 == 0) { lean_object* x_4; lean_object* x_5; lean_object* x_6; size_t x_7; size_t x_8; lean_object* x_9; lean_object* x_10; x_4 = lean_ctor_get(x_2, 0); -x_5 = lean_ctor_get(x_2, 2); +x_5 = lean_ctor_get(x_2, 1); x_6 = lean_array_get_size(x_1); x_7 = l_Lean_Expr_hash(x_4); x_8 = lean_usize_modn(x_7, x_6); lean_dec(x_6); x_9 = lean_array_uget(x_1, x_8); -lean_ctor_set(x_2, 2, x_9); +lean_ctor_set(x_2, 1, x_9); x_10 = lean_array_uset(x_1, x_8, x_2); x_1 = x_10; x_2 = x_5; @@ -1072,32 +1043,29 @@ goto _start; } else { -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; size_t x_16; size_t x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; +lean_object* x_12; lean_object* x_13; lean_object* x_14; size_t x_15; size_t x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; x_12 = lean_ctor_get(x_2, 0); x_13 = lean_ctor_get(x_2, 1); -x_14 = lean_ctor_get(x_2, 2); -lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_dec(x_2); -x_15 = lean_array_get_size(x_1); -x_16 = l_Lean_Expr_hash(x_12); -x_17 = lean_usize_modn(x_16, x_15); -lean_dec(x_15); -x_18 = lean_array_uget(x_1, x_17); -x_19 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_19, 0, x_12); -lean_ctor_set(x_19, 1, x_13); -lean_ctor_set(x_19, 2, x_18); -x_20 = lean_array_uset(x_1, x_17, x_19); -x_1 = x_20; -x_2 = x_14; +x_14 = lean_array_get_size(x_1); +x_15 = l_Lean_Expr_hash(x_12); +x_16 = lean_usize_modn(x_15, x_14); +lean_dec(x_14); +x_17 = lean_array_uget(x_1, x_16); +x_18 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_18, 0, x_12); +lean_ctor_set(x_18, 1, x_17); +x_19 = lean_array_uset(x_1, x_16, x_18); +x_1 = x_19; +x_2 = x_13; goto _start; } } } } -lean_object* l_HashMapImp_moveEntries___main___at_Lean_CollectLevelParams_visitExpr___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_HashSetImp_moveEntries___main___at_Lean_CollectLevelParams_visitExpr___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; uint8_t x_5; @@ -1116,7 +1084,7 @@ lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_obj x_6 = lean_array_fget(x_2, x_1); x_7 = lean_box(0); x_8 = lean_array_fset(x_2, x_1, x_7); -x_9 = l_AssocList_foldlM___main___at_Lean_CollectLevelParams_visitExpr___spec__6(x_3, x_6); +x_9 = l_List_foldl___main___at_Lean_CollectLevelParams_visitExpr___spec__6(x_3, x_6); x_10 = lean_unsigned_to_nat(1u); x_11 = lean_nat_add(x_1, x_10); lean_dec(x_1); @@ -1127,7 +1095,7 @@ goto _start; } } } -lean_object* l_HashMapImp_expand___at_Lean_CollectLevelParams_visitExpr___spec__4(lean_object* x_1, lean_object* x_2) { +lean_object* l_HashSetImp_expand___at_Lean_CollectLevelParams_visitExpr___spec__4(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; @@ -1138,188 +1106,181 @@ lean_dec(x_3); x_6 = lean_box(0); x_7 = lean_mk_array(x_5, x_6); x_8 = lean_unsigned_to_nat(0u); -x_9 = l_HashMapImp_moveEntries___main___at_Lean_CollectLevelParams_visitExpr___spec__5(x_8, x_2, x_7); +x_9 = l_HashSetImp_moveEntries___main___at_Lean_CollectLevelParams_visitExpr___spec__5(x_8, x_2, x_7); x_10 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_10, 0, x_1); lean_ctor_set(x_10, 1, x_9); return x_10; } } -lean_object* l_AssocList_replace___main___at_Lean_CollectLevelParams_visitExpr___spec__7(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_List_replace___main___at_Lean_CollectLevelParams_visitExpr___spec__7(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { -if (lean_obj_tag(x_3) == 0) +if (lean_obj_tag(x_1) == 0) { -lean_dec(x_2); -lean_dec(x_1); -return x_3; -} -else -{ -uint8_t x_4; -x_4 = !lean_is_exclusive(x_3); -if (x_4 == 0) -{ -lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8; -x_5 = lean_ctor_get(x_3, 0); -x_6 = lean_ctor_get(x_3, 1); -x_7 = lean_ctor_get(x_3, 2); -x_8 = lean_expr_eqv(x_5, x_1); -if (x_8 == 0) -{ -lean_object* x_9; -x_9 = l_AssocList_replace___main___at_Lean_CollectLevelParams_visitExpr___spec__7(x_1, x_2, x_7); -lean_ctor_set(x_3, 2, x_9); -return x_3; -} -else -{ -lean_dec(x_6); -lean_dec(x_5); -lean_ctor_set(x_3, 1, x_2); -lean_ctor_set(x_3, 0, x_1); -return x_3; -} -} -else -{ -lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; -x_10 = lean_ctor_get(x_3, 0); -x_11 = lean_ctor_get(x_3, 1); -x_12 = lean_ctor_get(x_3, 2); -lean_inc(x_12); -lean_inc(x_11); -lean_inc(x_10); lean_dec(x_3); -x_13 = lean_expr_eqv(x_10, x_1); -if (x_13 == 0) -{ -lean_object* x_14; lean_object* x_15; -x_14 = l_AssocList_replace___main___at_Lean_CollectLevelParams_visitExpr___spec__7(x_1, x_2, x_12); -x_15 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_15, 0, x_10); -lean_ctor_set(x_15, 1, x_11); -lean_ctor_set(x_15, 2, x_14); -return x_15; +return x_1; } else { -lean_object* x_16; -lean_dec(x_11); -lean_dec(x_10); -x_16 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_16, 0, x_1); -lean_ctor_set(x_16, 1, x_2); -lean_ctor_set(x_16, 2, x_12); -return x_16; -} -} -} -} -} -lean_object* l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ uint8_t x_4; x_4 = !lean_is_exclusive(x_1); if (x_4 == 0) { -lean_object* x_5; lean_object* x_6; lean_object* x_7; size_t x_8; size_t x_9; lean_object* x_10; uint8_t x_11; +lean_object* x_5; lean_object* x_6; uint8_t x_7; x_5 = lean_ctor_get(x_1, 0); x_6 = lean_ctor_get(x_1, 1); -x_7 = lean_array_get_size(x_6); -x_8 = l_Lean_Expr_hash(x_2); -x_9 = lean_usize_modn(x_8, x_7); -x_10 = lean_array_uget(x_6, x_9); -x_11 = l_AssocList_contains___main___at_Lean_CollectLevelParams_visitExpr___spec__2(x_2, x_10); +x_7 = lean_expr_eqv(x_5, x_2); +if (x_7 == 0) +{ +lean_object* x_8; +x_8 = l_List_replace___main___at_Lean_CollectLevelParams_visitExpr___spec__7(x_6, x_2, x_3); +lean_ctor_set(x_1, 1, x_8); +return x_1; +} +else +{ +lean_dec(x_5); +lean_ctor_set(x_1, 0, x_3); +return x_1; +} +} +else +{ +lean_object* x_9; lean_object* x_10; uint8_t x_11; +x_9 = lean_ctor_get(x_1, 0); +x_10 = lean_ctor_get(x_1, 1); +lean_inc(x_10); +lean_inc(x_9); +lean_dec(x_1); +x_11 = lean_expr_eqv(x_9, x_2); if (x_11 == 0) { -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; -x_12 = lean_unsigned_to_nat(1u); -x_13 = lean_nat_add(x_5, x_12); -lean_dec(x_5); -x_14 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_14, 0, x_2); -lean_ctor_set(x_14, 1, x_3); -lean_ctor_set(x_14, 2, x_10); -x_15 = lean_array_uset(x_6, x_9, x_14); -x_16 = lean_nat_dec_le(x_13, x_7); -lean_dec(x_7); -if (x_16 == 0) +lean_object* x_12; lean_object* x_13; +x_12 = l_List_replace___main___at_Lean_CollectLevelParams_visitExpr___spec__7(x_10, x_2, x_3); +x_13 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_13, 0, x_9); +lean_ctor_set(x_13, 1, x_12); +return x_13; +} +else { -lean_object* x_17; +lean_object* x_14; +lean_dec(x_9); +x_14 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_14, 0, x_3); +lean_ctor_set(x_14, 1, x_10); +return x_14; +} +} +} +} +} +lean_object* l_HashSetImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(lean_object* x_1, lean_object* x_2) { +_start: +{ +uint8_t x_3; +x_3 = !lean_is_exclusive(x_1); +if (x_3 == 0) +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; size_t x_7; size_t x_8; lean_object* x_9; uint8_t x_10; +x_4 = lean_ctor_get(x_1, 0); +x_5 = lean_ctor_get(x_1, 1); +x_6 = lean_array_get_size(x_5); +x_7 = l_Lean_Expr_hash(x_2); +x_8 = lean_usize_modn(x_7, x_6); +x_9 = lean_array_uget(x_5, x_8); +x_10 = l_List_elem___main___at_Lean_CollectLevelParams_visitExpr___spec__2(x_2, x_9); +if (x_10 == 0) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; uint8_t x_15; +x_11 = lean_unsigned_to_nat(1u); +x_12 = lean_nat_add(x_4, x_11); +lean_dec(x_4); +x_13 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_13, 0, x_2); +lean_ctor_set(x_13, 1, x_9); +x_14 = lean_array_uset(x_5, x_8, x_13); +x_15 = lean_nat_dec_le(x_12, x_6); +lean_dec(x_6); +if (x_15 == 0) +{ +lean_object* x_16; lean_free_object(x_1); -x_17 = l_HashMapImp_expand___at_Lean_CollectLevelParams_visitExpr___spec__4(x_13, x_15); -return x_17; +x_16 = l_HashSetImp_expand___at_Lean_CollectLevelParams_visitExpr___spec__4(x_12, x_14); +return x_16; } else { -lean_ctor_set(x_1, 1, x_15); -lean_ctor_set(x_1, 0, x_13); +lean_ctor_set(x_1, 1, x_14); +lean_ctor_set(x_1, 0, x_12); return x_1; } } else { -lean_object* x_18; lean_object* x_19; -lean_dec(x_7); -x_18 = l_AssocList_replace___main___at_Lean_CollectLevelParams_visitExpr___spec__7(x_2, x_3, x_10); -x_19 = lean_array_uset(x_6, x_9, x_18); -lean_ctor_set(x_1, 1, x_19); +lean_object* x_17; lean_object* x_18; +lean_dec(x_6); +lean_inc(x_2); +x_17 = l_List_replace___main___at_Lean_CollectLevelParams_visitExpr___spec__7(x_9, x_2, x_2); +lean_dec(x_2); +x_18 = lean_array_uset(x_5, x_8, x_17); +lean_ctor_set(x_1, 1, x_18); return x_1; } } else { -lean_object* x_20; lean_object* x_21; lean_object* x_22; size_t x_23; size_t x_24; lean_object* x_25; uint8_t x_26; -x_20 = lean_ctor_get(x_1, 0); -x_21 = lean_ctor_get(x_1, 1); -lean_inc(x_21); +lean_object* x_19; lean_object* x_20; lean_object* x_21; size_t x_22; size_t x_23; lean_object* x_24; uint8_t x_25; +x_19 = lean_ctor_get(x_1, 0); +x_20 = lean_ctor_get(x_1, 1); lean_inc(x_20); +lean_inc(x_19); lean_dec(x_1); -x_22 = lean_array_get_size(x_21); -x_23 = l_Lean_Expr_hash(x_2); -x_24 = lean_usize_modn(x_23, x_22); -x_25 = lean_array_uget(x_21, x_24); -x_26 = l_AssocList_contains___main___at_Lean_CollectLevelParams_visitExpr___spec__2(x_2, x_25); -if (x_26 == 0) +x_21 = lean_array_get_size(x_20); +x_22 = l_Lean_Expr_hash(x_2); +x_23 = lean_usize_modn(x_22, x_21); +x_24 = lean_array_uget(x_20, x_23); +x_25 = l_List_elem___main___at_Lean_CollectLevelParams_visitExpr___spec__2(x_2, x_24); +if (x_25 == 0) { -lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; uint8_t x_31; -x_27 = lean_unsigned_to_nat(1u); -x_28 = lean_nat_add(x_20, x_27); -lean_dec(x_20); -x_29 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_29, 0, x_2); -lean_ctor_set(x_29, 1, x_3); -lean_ctor_set(x_29, 2, x_25); -x_30 = lean_array_uset(x_21, x_24, x_29); -x_31 = lean_nat_dec_le(x_28, x_22); -lean_dec(x_22); -if (x_31 == 0) +lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; uint8_t x_30; +x_26 = lean_unsigned_to_nat(1u); +x_27 = lean_nat_add(x_19, x_26); +lean_dec(x_19); +x_28 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_28, 0, x_2); +lean_ctor_set(x_28, 1, x_24); +x_29 = lean_array_uset(x_20, x_23, x_28); +x_30 = lean_nat_dec_le(x_27, x_21); +lean_dec(x_21); +if (x_30 == 0) +{ +lean_object* x_31; +x_31 = l_HashSetImp_expand___at_Lean_CollectLevelParams_visitExpr___spec__4(x_27, x_29); +return x_31; +} +else { lean_object* x_32; -x_32 = l_HashMapImp_expand___at_Lean_CollectLevelParams_visitExpr___spec__4(x_28, x_30); +x_32 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_32, 0, x_27); +lean_ctor_set(x_32, 1, x_29); return x_32; } -else -{ -lean_object* x_33; -x_33 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_33, 0, x_28); -lean_ctor_set(x_33, 1, x_30); -return x_33; -} } else { -lean_object* x_34; lean_object* x_35; lean_object* x_36; -lean_dec(x_22); -x_34 = l_AssocList_replace___main___at_Lean_CollectLevelParams_visitExpr___spec__7(x_2, x_3, x_25); -x_35 = lean_array_uset(x_21, x_24, x_34); -x_36 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_36, 0, x_20); -lean_ctor_set(x_36, 1, x_35); -return x_36; +lean_object* x_33; lean_object* x_34; lean_object* x_35; +lean_dec(x_21); +lean_inc(x_2); +x_33 = l_List_replace___main___at_Lean_CollectLevelParams_visitExpr___spec__7(x_24, x_2, x_2); +lean_dec(x_2); +x_34 = lean_array_uset(x_20, x_23, x_33); +x_35 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_35, 0, x_19); +lean_ctor_set(x_35, 1, x_34); +return x_35; } } } @@ -1344,40 +1305,38 @@ x_6 = lean_ctor_get(x_3, 1); lean_inc(x_6); x_7 = lean_ctor_get(x_3, 2); lean_inc(x_7); -x_8 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_6, x_2); +x_8 = l_HashSetImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_6, x_2); if (x_8 == 0) { uint8_t x_9; x_9 = !lean_is_exclusive(x_3); if (x_9 == 0) { -lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; x_10 = lean_ctor_get(x_3, 2); lean_dec(x_10); x_11 = lean_ctor_get(x_3, 1); lean_dec(x_11); x_12 = lean_ctor_get(x_3, 0); lean_dec(x_12); -x_13 = lean_box(0); lean_inc(x_2); -x_14 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_6, x_2, x_13); -lean_ctor_set(x_3, 1, x_14); -x_15 = lean_apply_2(x_1, x_2, x_3); -return x_15; +x_13 = l_HashSetImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_6, x_2); +lean_ctor_set(x_3, 1, x_13); +x_14 = lean_apply_2(x_1, x_2, x_3); +return x_14; } else { -lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_dec(x_3); -x_16 = lean_box(0); lean_inc(x_2); -x_17 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_6, x_2, x_16); -x_18 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_18, 0, x_5); -lean_ctor_set(x_18, 1, x_17); -lean_ctor_set(x_18, 2, x_7); -x_19 = lean_apply_2(x_1, x_2, x_18); -return x_19; +x_15 = l_HashSetImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_6, x_2); +x_16 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_16, 0, x_5); +lean_ctor_set(x_16, 1, x_15); +lean_ctor_set(x_16, 2, x_7); +x_17 = lean_apply_2(x_1, x_2, x_16); +return x_17; } } else @@ -1392,28 +1351,37 @@ return x_3; } } } -lean_object* l_AssocList_contains___main___at_Lean_CollectLevelParams_visitExpr___spec__2___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l_List_elem___main___at_Lean_CollectLevelParams_visitExpr___spec__2___boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; -x_3 = l_AssocList_contains___main___at_Lean_CollectLevelParams_visitExpr___spec__2(x_1, x_2); +x_3 = l_List_elem___main___at_Lean_CollectLevelParams_visitExpr___spec__2(x_1, x_2); lean_dec(x_2); lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } } -lean_object* l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l_HashSetImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1___boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; -x_3 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_1, x_2); +x_3 = l_HashSetImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_1, x_2); lean_dec(x_2); lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } } +lean_object* l_List_replace___main___at_Lean_CollectLevelParams_visitExpr___spec__7___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_List_replace___main___at_Lean_CollectLevelParams_visitExpr___spec__7(x_1, x_2, x_3); +lean_dec(x_2); +return x_4; +} +} lean_object* l_List_foldl___main___at_Lean_CollectLevelParams_main___main___spec__1(lean_object* x_1, lean_object* x_2) { _start: { @@ -1445,42 +1413,40 @@ x_8 = lean_ctor_get(x_1, 1); lean_inc(x_8); x_9 = lean_ctor_get(x_1, 2); lean_inc(x_9); -x_10 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(x_7, x_3); +x_10 = l_HashSetImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(x_7, x_3); if (x_10 == 0) { uint8_t x_11; x_11 = !lean_is_exclusive(x_1); if (x_11 == 0) { -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; x_12 = lean_ctor_get(x_1, 2); lean_dec(x_12); x_13 = lean_ctor_get(x_1, 1); lean_dec(x_13); x_14 = lean_ctor_get(x_1, 0); lean_dec(x_14); -x_15 = lean_box(0); lean_inc(x_3); -x_16 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_7, x_3, x_15); -lean_ctor_set(x_1, 0, x_16); -x_17 = l_Lean_CollectLevelParams_collect___main(x_3, x_1); -x_1 = x_17; +x_15 = l_HashSetImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_7, x_3); +lean_ctor_set(x_1, 0, x_15); +x_16 = l_Lean_CollectLevelParams_collect___main(x_3, x_1); +x_1 = x_16; x_2 = x_4; goto _start; } else { -lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; +lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_dec(x_1); -x_19 = lean_box(0); lean_inc(x_3); -x_20 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_7, x_3, x_19); -x_21 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_21, 0, x_20); -lean_ctor_set(x_21, 1, x_8); -lean_ctor_set(x_21, 2, x_9); -x_22 = l_Lean_CollectLevelParams_collect___main(x_3, x_21); -x_1 = x_22; +x_18 = l_HashSetImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_7, x_3); +x_19 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_19, 0, x_18); +lean_ctor_set(x_19, 1, x_8); +lean_ctor_set(x_19, 2, x_9); +x_20 = l_Lean_CollectLevelParams_collect___main(x_3, x_19); +x_1 = x_20; x_2 = x_4; goto _start; } @@ -1523,40 +1489,38 @@ x_6 = lean_ctor_get(x_2, 1); lean_inc(x_6); x_7 = lean_ctor_get(x_2, 2); lean_inc(x_7); -x_8 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(x_5, x_3); +x_8 = l_HashSetImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(x_5, x_3); if (x_8 == 0) { uint8_t x_9; x_9 = !lean_is_exclusive(x_2); if (x_9 == 0) { -lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; x_10 = lean_ctor_get(x_2, 2); lean_dec(x_10); x_11 = lean_ctor_get(x_2, 1); lean_dec(x_11); x_12 = lean_ctor_get(x_2, 0); lean_dec(x_12); -x_13 = lean_box(0); lean_inc(x_3); -x_14 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_5, x_3, x_13); -lean_ctor_set(x_2, 0, x_14); -x_15 = l_Lean_CollectLevelParams_collect___main(x_3, x_2); -return x_15; +x_13 = l_HashSetImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_5, x_3); +lean_ctor_set(x_2, 0, x_13); +x_14 = l_Lean_CollectLevelParams_collect___main(x_3, x_2); +return x_14; } else { -lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_dec(x_2); -x_16 = lean_box(0); lean_inc(x_3); -x_17 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_5, x_3, x_16); -x_18 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_18, 0, x_17); -lean_ctor_set(x_18, 1, x_6); -lean_ctor_set(x_18, 2, x_7); -x_19 = l_Lean_CollectLevelParams_collect___main(x_3, x_18); -return x_19; +x_15 = l_HashSetImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_5, x_3); +x_16 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_16, 0, x_15); +lean_ctor_set(x_16, 1, x_6); +lean_ctor_set(x_16, 2, x_7); +x_17 = l_Lean_CollectLevelParams_collect___main(x_3, x_16); +return x_17; } } else @@ -1571,913 +1535,891 @@ return x_2; } case 4: { -lean_object* x_20; lean_object* x_21; -x_20 = lean_ctor_get(x_1, 1); -lean_inc(x_20); +lean_object* x_18; lean_object* x_19; +x_18 = lean_ctor_get(x_1, 1); +lean_inc(x_18); lean_dec(x_1); -x_21 = l_List_foldl___main___at_Lean_CollectLevelParams_main___main___spec__1(x_2, x_20); -return x_21; +x_19 = l_List_foldl___main___at_Lean_CollectLevelParams_main___main___spec__1(x_2, x_18); +return x_19; } case 5: { -lean_object* x_22; lean_object* x_23; lean_object* x_24; uint8_t x_41; uint8_t x_42; -x_22 = lean_ctor_get(x_1, 0); -lean_inc(x_22); -x_23 = lean_ctor_get(x_1, 1); -lean_inc(x_23); +lean_object* x_20; lean_object* x_21; lean_object* x_22; uint8_t x_37; uint8_t x_38; +x_20 = lean_ctor_get(x_1, 0); +lean_inc(x_20); +x_21 = lean_ctor_get(x_1, 1); +lean_inc(x_21); lean_dec(x_1); -x_41 = l_Lean_Expr_hasLevelParam(x_22); -x_42 = l_Lean_Expr_hasLevelParam(x_23); -if (x_41 == 0) +x_37 = l_Lean_Expr_hasLevelParam(x_20); +x_38 = l_Lean_Expr_hasLevelParam(x_21); +if (x_37 == 0) { -lean_dec(x_22); -if (x_42 == 0) +lean_dec(x_20); +if (x_38 == 0) { -lean_dec(x_23); +lean_dec(x_21); return x_2; } else { -x_24 = x_2; -goto block_40; +x_22 = x_2; +goto block_36; } } else { -lean_object* x_43; lean_object* x_44; lean_object* x_45; uint8_t x_46; -x_43 = lean_ctor_get(x_2, 0); -lean_inc(x_43); -x_44 = lean_ctor_get(x_2, 1); -lean_inc(x_44); -x_45 = lean_ctor_get(x_2, 2); -lean_inc(x_45); -x_46 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_44, x_22); -if (x_46 == 0) -{ -uint8_t x_47; -x_47 = !lean_is_exclusive(x_2); -if (x_47 == 0) -{ -lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; -x_48 = lean_ctor_get(x_2, 2); -lean_dec(x_48); -x_49 = lean_ctor_get(x_2, 1); -lean_dec(x_49); -x_50 = lean_ctor_get(x_2, 0); -lean_dec(x_50); -x_51 = lean_box(0); -lean_inc(x_22); -x_52 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_44, x_22, x_51); -lean_ctor_set(x_2, 1, x_52); -x_53 = l_Lean_CollectLevelParams_main___main(x_22, x_2); +lean_object* x_39; lean_object* x_40; lean_object* x_41; uint8_t x_42; +x_39 = lean_ctor_get(x_2, 0); +lean_inc(x_39); +x_40 = lean_ctor_get(x_2, 1); +lean_inc(x_40); +x_41 = lean_ctor_get(x_2, 2); +lean_inc(x_41); +x_42 = l_HashSetImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_40, x_20); if (x_42 == 0) { -lean_dec(x_23); -return x_53; -} -else +uint8_t x_43; +x_43 = !lean_is_exclusive(x_2); +if (x_43 == 0) { -x_24 = x_53; -goto block_40; -} -} -else -{ -lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; -lean_dec(x_2); -x_54 = lean_box(0); -lean_inc(x_22); -x_55 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_44, x_22, x_54); -x_56 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_56, 0, x_43); -lean_ctor_set(x_56, 1, x_55); -lean_ctor_set(x_56, 2, x_45); -x_57 = l_Lean_CollectLevelParams_main___main(x_22, x_56); -if (x_42 == 0) -{ -lean_dec(x_23); -return x_57; -} -else -{ -x_24 = x_57; -goto block_40; -} -} -} -else -{ -lean_dec(x_45); +lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; +x_44 = lean_ctor_get(x_2, 2); lean_dec(x_44); -lean_dec(x_43); -lean_dec(x_22); -if (x_42 == 0) +x_45 = lean_ctor_get(x_2, 1); +lean_dec(x_45); +x_46 = lean_ctor_get(x_2, 0); +lean_dec(x_46); +lean_inc(x_20); +x_47 = l_HashSetImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_40, x_20); +lean_ctor_set(x_2, 1, x_47); +x_48 = l_Lean_CollectLevelParams_main___main(x_20, x_2); +if (x_38 == 0) { -lean_dec(x_23); +lean_dec(x_21); +return x_48; +} +else +{ +x_22 = x_48; +goto block_36; +} +} +else +{ +lean_object* x_49; lean_object* x_50; lean_object* x_51; +lean_dec(x_2); +lean_inc(x_20); +x_49 = l_HashSetImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_40, x_20); +x_50 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_50, 0, x_39); +lean_ctor_set(x_50, 1, x_49); +lean_ctor_set(x_50, 2, x_41); +x_51 = l_Lean_CollectLevelParams_main___main(x_20, x_50); +if (x_38 == 0) +{ +lean_dec(x_21); +return x_51; +} +else +{ +x_22 = x_51; +goto block_36; +} +} +} +else +{ +lean_dec(x_41); +lean_dec(x_40); +lean_dec(x_39); +lean_dec(x_20); +if (x_38 == 0) +{ +lean_dec(x_21); return x_2; } else { -x_24 = x_2; -goto block_40; +x_22 = x_2; +goto block_36; } } } -block_40: +block_36: { -lean_object* x_25; lean_object* x_26; lean_object* x_27; uint8_t x_28; -x_25 = lean_ctor_get(x_24, 0); +lean_object* x_23; lean_object* x_24; lean_object* x_25; uint8_t x_26; +x_23 = lean_ctor_get(x_22, 0); +lean_inc(x_23); +x_24 = lean_ctor_get(x_22, 1); +lean_inc(x_24); +x_25 = lean_ctor_get(x_22, 2); lean_inc(x_25); -x_26 = lean_ctor_get(x_24, 1); -lean_inc(x_26); -x_27 = lean_ctor_get(x_24, 2); -lean_inc(x_27); -x_28 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_26, x_23); -if (x_28 == 0) +x_26 = l_HashSetImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_24, x_21); +if (x_26 == 0) { -uint8_t x_29; -x_29 = !lean_is_exclusive(x_24); -if (x_29 == 0) +uint8_t x_27; +x_27 = !lean_is_exclusive(x_22); +if (x_27 == 0) { -lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; -x_30 = lean_ctor_get(x_24, 2); +lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_28 = lean_ctor_get(x_22, 2); +lean_dec(x_28); +x_29 = lean_ctor_get(x_22, 1); +lean_dec(x_29); +x_30 = lean_ctor_get(x_22, 0); lean_dec(x_30); -x_31 = lean_ctor_get(x_24, 1); -lean_dec(x_31); -x_32 = lean_ctor_get(x_24, 0); -lean_dec(x_32); -x_33 = lean_box(0); -lean_inc(x_23); -x_34 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_26, x_23, x_33); -lean_ctor_set(x_24, 1, x_34); -x_1 = x_23; -x_2 = x_24; +lean_inc(x_21); +x_31 = l_HashSetImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_24, x_21); +lean_ctor_set(x_22, 1, x_31); +x_1 = x_21; +x_2 = x_22; goto _start; } else { -lean_object* x_36; lean_object* x_37; lean_object* x_38; -lean_dec(x_24); -x_36 = lean_box(0); -lean_inc(x_23); -x_37 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_26, x_23, x_36); -x_38 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_38, 0, x_25); -lean_ctor_set(x_38, 1, x_37); -lean_ctor_set(x_38, 2, x_27); -x_1 = x_23; -x_2 = x_38; +lean_object* x_33; lean_object* x_34; +lean_dec(x_22); +lean_inc(x_21); +x_33 = l_HashSetImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_24, x_21); +x_34 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_34, 0, x_23); +lean_ctor_set(x_34, 1, x_33); +lean_ctor_set(x_34, 2, x_25); +x_1 = x_21; +x_2 = x_34; goto _start; } } else { -lean_dec(x_27); -lean_dec(x_26); lean_dec(x_25); +lean_dec(x_24); lean_dec(x_23); -return x_24; +lean_dec(x_21); +return x_22; } } } case 6: { -lean_object* x_58; lean_object* x_59; lean_object* x_60; uint8_t x_77; uint8_t x_78; -x_58 = lean_ctor_get(x_1, 1); -lean_inc(x_58); -x_59 = lean_ctor_get(x_1, 2); -lean_inc(x_59); +lean_object* x_52; lean_object* x_53; lean_object* x_54; uint8_t x_69; uint8_t x_70; +x_52 = lean_ctor_get(x_1, 1); +lean_inc(x_52); +x_53 = lean_ctor_get(x_1, 2); +lean_inc(x_53); lean_dec(x_1); -x_77 = l_Lean_Expr_hasLevelParam(x_58); -x_78 = l_Lean_Expr_hasLevelParam(x_59); -if (x_77 == 0) +x_69 = l_Lean_Expr_hasLevelParam(x_52); +x_70 = l_Lean_Expr_hasLevelParam(x_53); +if (x_69 == 0) { -lean_dec(x_58); -if (x_78 == 0) +lean_dec(x_52); +if (x_70 == 0) { -lean_dec(x_59); +lean_dec(x_53); return x_2; } else { -x_60 = x_2; -goto block_76; +x_54 = x_2; +goto block_68; } } else { -lean_object* x_79; lean_object* x_80; lean_object* x_81; uint8_t x_82; -x_79 = lean_ctor_get(x_2, 0); -lean_inc(x_79); -x_80 = lean_ctor_get(x_2, 1); -lean_inc(x_80); -x_81 = lean_ctor_get(x_2, 2); -lean_inc(x_81); -x_82 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_80, x_58); -if (x_82 == 0) +lean_object* x_71; lean_object* x_72; lean_object* x_73; uint8_t x_74; +x_71 = lean_ctor_get(x_2, 0); +lean_inc(x_71); +x_72 = lean_ctor_get(x_2, 1); +lean_inc(x_72); +x_73 = lean_ctor_get(x_2, 2); +lean_inc(x_73); +x_74 = l_HashSetImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_72, x_52); +if (x_74 == 0) { -uint8_t x_83; -x_83 = !lean_is_exclusive(x_2); -if (x_83 == 0) +uint8_t x_75; +x_75 = !lean_is_exclusive(x_2); +if (x_75 == 0) { -lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; -x_84 = lean_ctor_get(x_2, 2); -lean_dec(x_84); -x_85 = lean_ctor_get(x_2, 1); -lean_dec(x_85); -x_86 = lean_ctor_get(x_2, 0); -lean_dec(x_86); -x_87 = lean_box(0); -lean_inc(x_58); -x_88 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_80, x_58, x_87); -lean_ctor_set(x_2, 1, x_88); -x_89 = l_Lean_CollectLevelParams_main___main(x_58, x_2); -if (x_78 == 0) +lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; +x_76 = lean_ctor_get(x_2, 2); +lean_dec(x_76); +x_77 = lean_ctor_get(x_2, 1); +lean_dec(x_77); +x_78 = lean_ctor_get(x_2, 0); +lean_dec(x_78); +lean_inc(x_52); +x_79 = l_HashSetImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_72, x_52); +lean_ctor_set(x_2, 1, x_79); +x_80 = l_Lean_CollectLevelParams_main___main(x_52, x_2); +if (x_70 == 0) { -lean_dec(x_59); -return x_89; +lean_dec(x_53); +return x_80; } else { -x_60 = x_89; -goto block_76; +x_54 = x_80; +goto block_68; } } else { -lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; +lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_dec(x_2); -x_90 = lean_box(0); -lean_inc(x_58); -x_91 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_80, x_58, x_90); -x_92 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_92, 0, x_79); -lean_ctor_set(x_92, 1, x_91); -lean_ctor_set(x_92, 2, x_81); -x_93 = l_Lean_CollectLevelParams_main___main(x_58, x_92); -if (x_78 == 0) +lean_inc(x_52); +x_81 = l_HashSetImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_72, x_52); +x_82 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_82, 0, x_71); +lean_ctor_set(x_82, 1, x_81); +lean_ctor_set(x_82, 2, x_73); +x_83 = l_Lean_CollectLevelParams_main___main(x_52, x_82); +if (x_70 == 0) { -lean_dec(x_59); -return x_93; +lean_dec(x_53); +return x_83; } else { -x_60 = x_93; -goto block_76; +x_54 = x_83; +goto block_68; } } } else { -lean_dec(x_81); -lean_dec(x_80); -lean_dec(x_79); -lean_dec(x_58); -if (x_78 == 0) +lean_dec(x_73); +lean_dec(x_72); +lean_dec(x_71); +lean_dec(x_52); +if (x_70 == 0) { -lean_dec(x_59); +lean_dec(x_53); return x_2; } else { -x_60 = x_2; -goto block_76; +x_54 = x_2; +goto block_68; } } } -block_76: +block_68: { -lean_object* x_61; lean_object* x_62; lean_object* x_63; uint8_t x_64; -x_61 = lean_ctor_get(x_60, 0); -lean_inc(x_61); -x_62 = lean_ctor_get(x_60, 1); -lean_inc(x_62); -x_63 = lean_ctor_get(x_60, 2); -lean_inc(x_63); -x_64 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_62, x_59); -if (x_64 == 0) +lean_object* x_55; lean_object* x_56; lean_object* x_57; uint8_t x_58; +x_55 = lean_ctor_get(x_54, 0); +lean_inc(x_55); +x_56 = lean_ctor_get(x_54, 1); +lean_inc(x_56); +x_57 = lean_ctor_get(x_54, 2); +lean_inc(x_57); +x_58 = l_HashSetImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_56, x_53); +if (x_58 == 0) { -uint8_t x_65; -x_65 = !lean_is_exclusive(x_60); -if (x_65 == 0) +uint8_t x_59; +x_59 = !lean_is_exclusive(x_54); +if (x_59 == 0) { -lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; -x_66 = lean_ctor_get(x_60, 2); -lean_dec(x_66); -x_67 = lean_ctor_get(x_60, 1); -lean_dec(x_67); -x_68 = lean_ctor_get(x_60, 0); -lean_dec(x_68); -x_69 = lean_box(0); -lean_inc(x_59); -x_70 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_62, x_59, x_69); -lean_ctor_set(x_60, 1, x_70); -x_1 = x_59; -x_2 = x_60; -goto _start; -} -else -{ -lean_object* x_72; lean_object* x_73; lean_object* x_74; +lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; +x_60 = lean_ctor_get(x_54, 2); lean_dec(x_60); -x_72 = lean_box(0); -lean_inc(x_59); -x_73 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_62, x_59, x_72); -x_74 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_74, 0, x_61); -lean_ctor_set(x_74, 1, x_73); -lean_ctor_set(x_74, 2, x_63); -x_1 = x_59; -x_2 = x_74; +x_61 = lean_ctor_get(x_54, 1); +lean_dec(x_61); +x_62 = lean_ctor_get(x_54, 0); +lean_dec(x_62); +lean_inc(x_53); +x_63 = l_HashSetImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_56, x_53); +lean_ctor_set(x_54, 1, x_63); +x_1 = x_53; +x_2 = x_54; +goto _start; +} +else +{ +lean_object* x_65; lean_object* x_66; +lean_dec(x_54); +lean_inc(x_53); +x_65 = l_HashSetImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_56, x_53); +x_66 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_66, 0, x_55); +lean_ctor_set(x_66, 1, x_65); +lean_ctor_set(x_66, 2, x_57); +x_1 = x_53; +x_2 = x_66; goto _start; } } else { -lean_dec(x_63); -lean_dec(x_62); -lean_dec(x_61); -lean_dec(x_59); -return x_60; +lean_dec(x_57); +lean_dec(x_56); +lean_dec(x_55); +lean_dec(x_53); +return x_54; } } } case 7: { -lean_object* x_94; lean_object* x_95; lean_object* x_96; uint8_t x_113; uint8_t x_114; -x_94 = lean_ctor_get(x_1, 1); -lean_inc(x_94); -x_95 = lean_ctor_get(x_1, 2); -lean_inc(x_95); +lean_object* x_84; lean_object* x_85; lean_object* x_86; uint8_t x_101; uint8_t x_102; +x_84 = lean_ctor_get(x_1, 1); +lean_inc(x_84); +x_85 = lean_ctor_get(x_1, 2); +lean_inc(x_85); lean_dec(x_1); -x_113 = l_Lean_Expr_hasLevelParam(x_94); -x_114 = l_Lean_Expr_hasLevelParam(x_95); -if (x_113 == 0) -{ -lean_dec(x_94); -if (x_114 == 0) -{ -lean_dec(x_95); -return x_2; -} -else -{ -x_96 = x_2; -goto block_112; -} -} -else -{ -lean_object* x_115; lean_object* x_116; lean_object* x_117; uint8_t x_118; -x_115 = lean_ctor_get(x_2, 0); -lean_inc(x_115); -x_116 = lean_ctor_get(x_2, 1); -lean_inc(x_116); -x_117 = lean_ctor_get(x_2, 2); -lean_inc(x_117); -x_118 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_116, x_94); -if (x_118 == 0) -{ -uint8_t x_119; -x_119 = !lean_is_exclusive(x_2); -if (x_119 == 0) -{ -lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_125; -x_120 = lean_ctor_get(x_2, 2); -lean_dec(x_120); -x_121 = lean_ctor_get(x_2, 1); -lean_dec(x_121); -x_122 = lean_ctor_get(x_2, 0); -lean_dec(x_122); -x_123 = lean_box(0); -lean_inc(x_94); -x_124 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_116, x_94, x_123); -lean_ctor_set(x_2, 1, x_124); -x_125 = l_Lean_CollectLevelParams_main___main(x_94, x_2); -if (x_114 == 0) -{ -lean_dec(x_95); -return x_125; -} -else -{ -x_96 = x_125; -goto block_112; -} -} -else -{ -lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; -lean_dec(x_2); -x_126 = lean_box(0); -lean_inc(x_94); -x_127 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_116, x_94, x_126); -x_128 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_128, 0, x_115); -lean_ctor_set(x_128, 1, x_127); -lean_ctor_set(x_128, 2, x_117); -x_129 = l_Lean_CollectLevelParams_main___main(x_94, x_128); -if (x_114 == 0) -{ -lean_dec(x_95); -return x_129; -} -else -{ -x_96 = x_129; -goto block_112; -} -} -} -else -{ -lean_dec(x_117); -lean_dec(x_116); -lean_dec(x_115); -lean_dec(x_94); -if (x_114 == 0) -{ -lean_dec(x_95); -return x_2; -} -else -{ -x_96 = x_2; -goto block_112; -} -} -} -block_112: -{ -lean_object* x_97; lean_object* x_98; lean_object* x_99; uint8_t x_100; -x_97 = lean_ctor_get(x_96, 0); -lean_inc(x_97); -x_98 = lean_ctor_get(x_96, 1); -lean_inc(x_98); -x_99 = lean_ctor_get(x_96, 2); -lean_inc(x_99); -x_100 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_98, x_95); -if (x_100 == 0) -{ -uint8_t x_101; -x_101 = !lean_is_exclusive(x_96); +x_101 = l_Lean_Expr_hasLevelParam(x_84); +x_102 = l_Lean_Expr_hasLevelParam(x_85); if (x_101 == 0) { -lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; -x_102 = lean_ctor_get(x_96, 2); -lean_dec(x_102); -x_103 = lean_ctor_get(x_96, 1); -lean_dec(x_103); -x_104 = lean_ctor_get(x_96, 0); +lean_dec(x_84); +if (x_102 == 0) +{ +lean_dec(x_85); +return x_2; +} +else +{ +x_86 = x_2; +goto block_100; +} +} +else +{ +lean_object* x_103; lean_object* x_104; lean_object* x_105; uint8_t x_106; +x_103 = lean_ctor_get(x_2, 0); +lean_inc(x_103); +x_104 = lean_ctor_get(x_2, 1); +lean_inc(x_104); +x_105 = lean_ctor_get(x_2, 2); +lean_inc(x_105); +x_106 = l_HashSetImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_104, x_84); +if (x_106 == 0) +{ +uint8_t x_107; +x_107 = !lean_is_exclusive(x_2); +if (x_107 == 0) +{ +lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; +x_108 = lean_ctor_get(x_2, 2); +lean_dec(x_108); +x_109 = lean_ctor_get(x_2, 1); +lean_dec(x_109); +x_110 = lean_ctor_get(x_2, 0); +lean_dec(x_110); +lean_inc(x_84); +x_111 = l_HashSetImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_104, x_84); +lean_ctor_set(x_2, 1, x_111); +x_112 = l_Lean_CollectLevelParams_main___main(x_84, x_2); +if (x_102 == 0) +{ +lean_dec(x_85); +return x_112; +} +else +{ +x_86 = x_112; +goto block_100; +} +} +else +{ +lean_object* x_113; lean_object* x_114; lean_object* x_115; +lean_dec(x_2); +lean_inc(x_84); +x_113 = l_HashSetImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_104, x_84); +x_114 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_114, 0, x_103); +lean_ctor_set(x_114, 1, x_113); +lean_ctor_set(x_114, 2, x_105); +x_115 = l_Lean_CollectLevelParams_main___main(x_84, x_114); +if (x_102 == 0) +{ +lean_dec(x_85); +return x_115; +} +else +{ +x_86 = x_115; +goto block_100; +} +} +} +else +{ +lean_dec(x_105); lean_dec(x_104); -x_105 = lean_box(0); -lean_inc(x_95); -x_106 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_98, x_95, x_105); -lean_ctor_set(x_96, 1, x_106); -x_1 = x_95; -x_2 = x_96; +lean_dec(x_103); +lean_dec(x_84); +if (x_102 == 0) +{ +lean_dec(x_85); +return x_2; +} +else +{ +x_86 = x_2; +goto block_100; +} +} +} +block_100: +{ +lean_object* x_87; lean_object* x_88; lean_object* x_89; uint8_t x_90; +x_87 = lean_ctor_get(x_86, 0); +lean_inc(x_87); +x_88 = lean_ctor_get(x_86, 1); +lean_inc(x_88); +x_89 = lean_ctor_get(x_86, 2); +lean_inc(x_89); +x_90 = l_HashSetImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_88, x_85); +if (x_90 == 0) +{ +uint8_t x_91; +x_91 = !lean_is_exclusive(x_86); +if (x_91 == 0) +{ +lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; +x_92 = lean_ctor_get(x_86, 2); +lean_dec(x_92); +x_93 = lean_ctor_get(x_86, 1); +lean_dec(x_93); +x_94 = lean_ctor_get(x_86, 0); +lean_dec(x_94); +lean_inc(x_85); +x_95 = l_HashSetImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_88, x_85); +lean_ctor_set(x_86, 1, x_95); +x_1 = x_85; +x_2 = x_86; goto _start; } else { -lean_object* x_108; lean_object* x_109; lean_object* x_110; -lean_dec(x_96); -x_108 = lean_box(0); -lean_inc(x_95); -x_109 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_98, x_95, x_108); -x_110 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_110, 0, x_97); -lean_ctor_set(x_110, 1, x_109); -lean_ctor_set(x_110, 2, x_99); -x_1 = x_95; -x_2 = x_110; +lean_object* x_97; lean_object* x_98; +lean_dec(x_86); +lean_inc(x_85); +x_97 = l_HashSetImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_88, x_85); +x_98 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_98, 0, x_87); +lean_ctor_set(x_98, 1, x_97); +lean_ctor_set(x_98, 2, x_89); +x_1 = x_85; +x_2 = x_98; goto _start; } } else { -lean_dec(x_99); -lean_dec(x_98); -lean_dec(x_97); -lean_dec(x_95); -return x_96; +lean_dec(x_89); +lean_dec(x_88); +lean_dec(x_87); +lean_dec(x_85); +return x_86; } } } case 8: { -lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; uint8_t x_150; uint8_t x_151; uint8_t x_152; lean_object* x_153; -x_130 = lean_ctor_get(x_1, 1); -lean_inc(x_130); -x_131 = lean_ctor_get(x_1, 2); -lean_inc(x_131); -x_132 = lean_ctor_get(x_1, 3); -lean_inc(x_132); +lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; uint8_t x_134; uint8_t x_135; uint8_t x_136; lean_object* x_137; +x_116 = lean_ctor_get(x_1, 1); +lean_inc(x_116); +x_117 = lean_ctor_get(x_1, 2); +lean_inc(x_117); +x_118 = lean_ctor_get(x_1, 3); +lean_inc(x_118); lean_dec(x_1); -x_150 = l_Lean_Expr_hasLevelParam(x_130); -x_151 = l_Lean_Expr_hasLevelParam(x_131); -x_152 = l_Lean_Expr_hasLevelParam(x_132); -if (x_150 == 0) +x_134 = l_Lean_Expr_hasLevelParam(x_116); +x_135 = l_Lean_Expr_hasLevelParam(x_117); +x_136 = l_Lean_Expr_hasLevelParam(x_118); +if (x_134 == 0) { -lean_dec(x_130); -if (x_151 == 0) +lean_dec(x_116); +if (x_135 == 0) { -lean_dec(x_131); -if (x_152 == 0) +lean_dec(x_117); +if (x_136 == 0) { -lean_dec(x_132); +lean_dec(x_118); return x_2; } else { -x_133 = x_2; -goto block_149; +x_119 = x_2; +goto block_133; } } else { -x_153 = x_2; -goto block_169; +x_137 = x_2; +goto block_151; } } else { -lean_object* x_170; lean_object* x_171; lean_object* x_172; uint8_t x_173; -x_170 = lean_ctor_get(x_2, 0); -lean_inc(x_170); -x_171 = lean_ctor_get(x_2, 1); -lean_inc(x_171); -x_172 = lean_ctor_get(x_2, 2); -lean_inc(x_172); -x_173 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_171, x_130); -if (x_173 == 0) -{ -uint8_t x_174; -x_174 = !lean_is_exclusive(x_2); -if (x_174 == 0) -{ -lean_object* x_175; lean_object* x_176; lean_object* x_177; lean_object* x_178; lean_object* x_179; lean_object* x_180; -x_175 = lean_ctor_get(x_2, 2); -lean_dec(x_175); -x_176 = lean_ctor_get(x_2, 1); -lean_dec(x_176); -x_177 = lean_ctor_get(x_2, 0); -lean_dec(x_177); -x_178 = lean_box(0); -lean_inc(x_130); -x_179 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_171, x_130, x_178); -lean_ctor_set(x_2, 1, x_179); -x_180 = l_Lean_CollectLevelParams_main___main(x_130, x_2); -if (x_151 == 0) -{ -lean_dec(x_131); -if (x_152 == 0) -{ -lean_dec(x_132); -return x_180; -} -else -{ -x_133 = x_180; -goto block_149; -} -} -else -{ -x_153 = x_180; -goto block_169; -} -} -else -{ -lean_object* x_181; lean_object* x_182; lean_object* x_183; lean_object* x_184; -lean_dec(x_2); -x_181 = lean_box(0); -lean_inc(x_130); -x_182 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_171, x_130, x_181); -x_183 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_183, 0, x_170); -lean_ctor_set(x_183, 1, x_182); -lean_ctor_set(x_183, 2, x_172); -x_184 = l_Lean_CollectLevelParams_main___main(x_130, x_183); -if (x_151 == 0) -{ -lean_dec(x_131); -if (x_152 == 0) -{ -lean_dec(x_132); -return x_184; -} -else -{ -x_133 = x_184; -goto block_149; -} -} -else -{ -x_153 = x_184; -goto block_169; -} -} -} -else -{ -lean_dec(x_172); -lean_dec(x_171); -lean_dec(x_170); -lean_dec(x_130); -if (x_151 == 0) -{ -lean_dec(x_131); -if (x_152 == 0) -{ -lean_dec(x_132); -return x_2; -} -else -{ -x_133 = x_2; -goto block_149; -} -} -else -{ -x_153 = x_2; -goto block_169; -} -} -} -block_149: -{ -lean_object* x_134; lean_object* x_135; lean_object* x_136; uint8_t x_137; -x_134 = lean_ctor_get(x_133, 0); -lean_inc(x_134); -x_135 = lean_ctor_get(x_133, 1); -lean_inc(x_135); -x_136 = lean_ctor_get(x_133, 2); -lean_inc(x_136); -x_137 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_135, x_132); -if (x_137 == 0) -{ -uint8_t x_138; -x_138 = !lean_is_exclusive(x_133); -if (x_138 == 0) -{ -lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; -x_139 = lean_ctor_get(x_133, 2); -lean_dec(x_139); -x_140 = lean_ctor_get(x_133, 1); -lean_dec(x_140); -x_141 = lean_ctor_get(x_133, 0); -lean_dec(x_141); -x_142 = lean_box(0); -lean_inc(x_132); -x_143 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_135, x_132, x_142); -lean_ctor_set(x_133, 1, x_143); -x_1 = x_132; -x_2 = x_133; -goto _start; -} -else -{ -lean_object* x_145; lean_object* x_146; lean_object* x_147; -lean_dec(x_133); -x_145 = lean_box(0); -lean_inc(x_132); -x_146 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_135, x_132, x_145); -x_147 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_147, 0, x_134); -lean_ctor_set(x_147, 1, x_146); -lean_ctor_set(x_147, 2, x_136); -x_1 = x_132; -x_2 = x_147; -goto _start; -} -} -else -{ -lean_dec(x_136); -lean_dec(x_135); -lean_dec(x_134); -lean_dec(x_132); -return x_133; -} -} -block_169: -{ -lean_object* x_154; lean_object* x_155; lean_object* x_156; uint8_t x_157; -x_154 = lean_ctor_get(x_153, 0); +lean_object* x_152; lean_object* x_153; lean_object* x_154; uint8_t x_155; +x_152 = lean_ctor_get(x_2, 0); +lean_inc(x_152); +x_153 = lean_ctor_get(x_2, 1); +lean_inc(x_153); +x_154 = lean_ctor_get(x_2, 2); lean_inc(x_154); -x_155 = lean_ctor_get(x_153, 1); -lean_inc(x_155); -x_156 = lean_ctor_get(x_153, 2); -lean_inc(x_156); -x_157 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_155, x_131); -if (x_157 == 0) +x_155 = l_HashSetImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_153, x_116); +if (x_155 == 0) { -uint8_t x_158; -x_158 = !lean_is_exclusive(x_153); -if (x_158 == 0) +uint8_t x_156; +x_156 = !lean_is_exclusive(x_2); +if (x_156 == 0) { -lean_object* x_159; lean_object* x_160; lean_object* x_161; lean_object* x_162; lean_object* x_163; lean_object* x_164; -x_159 = lean_ctor_get(x_153, 2); +lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_object* x_160; lean_object* x_161; +x_157 = lean_ctor_get(x_2, 2); +lean_dec(x_157); +x_158 = lean_ctor_get(x_2, 1); +lean_dec(x_158); +x_159 = lean_ctor_get(x_2, 0); lean_dec(x_159); -x_160 = lean_ctor_get(x_153, 1); -lean_dec(x_160); -x_161 = lean_ctor_get(x_153, 0); -lean_dec(x_161); -x_162 = lean_box(0); -lean_inc(x_131); -x_163 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_155, x_131, x_162); -lean_ctor_set(x_153, 1, x_163); -x_164 = l_Lean_CollectLevelParams_main___main(x_131, x_153); -if (x_152 == 0) +lean_inc(x_116); +x_160 = l_HashSetImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_153, x_116); +lean_ctor_set(x_2, 1, x_160); +x_161 = l_Lean_CollectLevelParams_main___main(x_116, x_2); +if (x_135 == 0) { -lean_dec(x_132); +lean_dec(x_117); +if (x_136 == 0) +{ +lean_dec(x_118); +return x_161; +} +else +{ +x_119 = x_161; +goto block_133; +} +} +else +{ +x_137 = x_161; +goto block_151; +} +} +else +{ +lean_object* x_162; lean_object* x_163; lean_object* x_164; +lean_dec(x_2); +lean_inc(x_116); +x_162 = l_HashSetImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_153, x_116); +x_163 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_163, 0, x_152); +lean_ctor_set(x_163, 1, x_162); +lean_ctor_set(x_163, 2, x_154); +x_164 = l_Lean_CollectLevelParams_main___main(x_116, x_163); +if (x_135 == 0) +{ +lean_dec(x_117); +if (x_136 == 0) +{ +lean_dec(x_118); return x_164; } else { -x_133 = x_164; -goto block_149; +x_119 = x_164; +goto block_133; } } else { -lean_object* x_165; lean_object* x_166; lean_object* x_167; lean_object* x_168; -lean_dec(x_153); -x_165 = lean_box(0); -lean_inc(x_131); -x_166 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_155, x_131, x_165); -x_167 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_167, 0, x_154); -lean_ctor_set(x_167, 1, x_166); -lean_ctor_set(x_167, 2, x_156); -x_168 = l_Lean_CollectLevelParams_main___main(x_131, x_167); -if (x_152 == 0) -{ -lean_dec(x_132); -return x_168; -} -else -{ -x_133 = x_168; -goto block_149; +x_137 = x_164; +goto block_151; } } } else { -lean_dec(x_156); -lean_dec(x_155); lean_dec(x_154); -lean_dec(x_131); -if (x_152 == 0) +lean_dec(x_153); +lean_dec(x_152); +lean_dec(x_116); +if (x_135 == 0) { -lean_dec(x_132); -return x_153; +lean_dec(x_117); +if (x_136 == 0) +{ +lean_dec(x_118); +return x_2; } else { -x_133 = x_153; -goto block_149; +x_119 = x_2; +goto block_133; +} +} +else +{ +x_137 = x_2; +goto block_151; +} +} +} +block_133: +{ +lean_object* x_120; lean_object* x_121; lean_object* x_122; uint8_t x_123; +x_120 = lean_ctor_get(x_119, 0); +lean_inc(x_120); +x_121 = lean_ctor_get(x_119, 1); +lean_inc(x_121); +x_122 = lean_ctor_get(x_119, 2); +lean_inc(x_122); +x_123 = l_HashSetImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_121, x_118); +if (x_123 == 0) +{ +uint8_t x_124; +x_124 = !lean_is_exclusive(x_119); +if (x_124 == 0) +{ +lean_object* x_125; lean_object* x_126; lean_object* x_127; lean_object* x_128; +x_125 = lean_ctor_get(x_119, 2); +lean_dec(x_125); +x_126 = lean_ctor_get(x_119, 1); +lean_dec(x_126); +x_127 = lean_ctor_get(x_119, 0); +lean_dec(x_127); +lean_inc(x_118); +x_128 = l_HashSetImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_121, x_118); +lean_ctor_set(x_119, 1, x_128); +x_1 = x_118; +x_2 = x_119; +goto _start; +} +else +{ +lean_object* x_130; lean_object* x_131; +lean_dec(x_119); +lean_inc(x_118); +x_130 = l_HashSetImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_121, x_118); +x_131 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_131, 0, x_120); +lean_ctor_set(x_131, 1, x_130); +lean_ctor_set(x_131, 2, x_122); +x_1 = x_118; +x_2 = x_131; +goto _start; +} +} +else +{ +lean_dec(x_122); +lean_dec(x_121); +lean_dec(x_120); +lean_dec(x_118); +return x_119; +} +} +block_151: +{ +lean_object* x_138; lean_object* x_139; lean_object* x_140; uint8_t x_141; +x_138 = lean_ctor_get(x_137, 0); +lean_inc(x_138); +x_139 = lean_ctor_get(x_137, 1); +lean_inc(x_139); +x_140 = lean_ctor_get(x_137, 2); +lean_inc(x_140); +x_141 = l_HashSetImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_139, x_117); +if (x_141 == 0) +{ +uint8_t x_142; +x_142 = !lean_is_exclusive(x_137); +if (x_142 == 0) +{ +lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147; +x_143 = lean_ctor_get(x_137, 2); +lean_dec(x_143); +x_144 = lean_ctor_get(x_137, 1); +lean_dec(x_144); +x_145 = lean_ctor_get(x_137, 0); +lean_dec(x_145); +lean_inc(x_117); +x_146 = l_HashSetImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_139, x_117); +lean_ctor_set(x_137, 1, x_146); +x_147 = l_Lean_CollectLevelParams_main___main(x_117, x_137); +if (x_136 == 0) +{ +lean_dec(x_118); +return x_147; +} +else +{ +x_119 = x_147; +goto block_133; +} +} +else +{ +lean_object* x_148; lean_object* x_149; lean_object* x_150; +lean_dec(x_137); +lean_inc(x_117); +x_148 = l_HashSetImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_139, x_117); +x_149 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_149, 0, x_138); +lean_ctor_set(x_149, 1, x_148); +lean_ctor_set(x_149, 2, x_140); +x_150 = l_Lean_CollectLevelParams_main___main(x_117, x_149); +if (x_136 == 0) +{ +lean_dec(x_118); +return x_150; +} +else +{ +x_119 = x_150; +goto block_133; +} +} +} +else +{ +lean_dec(x_140); +lean_dec(x_139); +lean_dec(x_138); +lean_dec(x_117); +if (x_136 == 0) +{ +lean_dec(x_118); +return x_137; +} +else +{ +x_119 = x_137; +goto block_133; } } } } case 10: { -lean_object* x_185; uint8_t x_186; -x_185 = lean_ctor_get(x_1, 1); -lean_inc(x_185); +lean_object* x_165; uint8_t x_166; +x_165 = lean_ctor_get(x_1, 1); +lean_inc(x_165); lean_dec(x_1); -x_186 = l_Lean_Expr_hasLevelParam(x_185); -if (x_186 == 0) +x_166 = l_Lean_Expr_hasLevelParam(x_165); +if (x_166 == 0) { -lean_dec(x_185); +lean_dec(x_165); return x_2; } else { -lean_object* x_187; lean_object* x_188; lean_object* x_189; uint8_t x_190; -x_187 = lean_ctor_get(x_2, 0); -lean_inc(x_187); -x_188 = lean_ctor_get(x_2, 1); -lean_inc(x_188); -x_189 = lean_ctor_get(x_2, 2); -lean_inc(x_189); -x_190 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_188, x_185); -if (x_190 == 0) +lean_object* x_167; lean_object* x_168; lean_object* x_169; uint8_t x_170; +x_167 = lean_ctor_get(x_2, 0); +lean_inc(x_167); +x_168 = lean_ctor_get(x_2, 1); +lean_inc(x_168); +x_169 = lean_ctor_get(x_2, 2); +lean_inc(x_169); +x_170 = l_HashSetImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_168, x_165); +if (x_170 == 0) { -uint8_t x_191; -x_191 = !lean_is_exclusive(x_2); -if (x_191 == 0) +uint8_t x_171; +x_171 = !lean_is_exclusive(x_2); +if (x_171 == 0) { -lean_object* x_192; lean_object* x_193; lean_object* x_194; lean_object* x_195; lean_object* x_196; -x_192 = lean_ctor_get(x_2, 2); -lean_dec(x_192); -x_193 = lean_ctor_get(x_2, 1); -lean_dec(x_193); -x_194 = lean_ctor_get(x_2, 0); -lean_dec(x_194); -x_195 = lean_box(0); -lean_inc(x_185); -x_196 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_188, x_185, x_195); -lean_ctor_set(x_2, 1, x_196); -x_1 = x_185; +lean_object* x_172; lean_object* x_173; lean_object* x_174; lean_object* x_175; +x_172 = lean_ctor_get(x_2, 2); +lean_dec(x_172); +x_173 = lean_ctor_get(x_2, 1); +lean_dec(x_173); +x_174 = lean_ctor_get(x_2, 0); +lean_dec(x_174); +lean_inc(x_165); +x_175 = l_HashSetImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_168, x_165); +lean_ctor_set(x_2, 1, x_175); +x_1 = x_165; goto _start; } else { -lean_object* x_198; lean_object* x_199; lean_object* x_200; +lean_object* x_177; lean_object* x_178; lean_dec(x_2); -x_198 = lean_box(0); -lean_inc(x_185); -x_199 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_188, x_185, x_198); -x_200 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_200, 0, x_187); -lean_ctor_set(x_200, 1, x_199); -lean_ctor_set(x_200, 2, x_189); -x_1 = x_185; -x_2 = x_200; +lean_inc(x_165); +x_177 = l_HashSetImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_168, x_165); +x_178 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_178, 0, x_167); +lean_ctor_set(x_178, 1, x_177); +lean_ctor_set(x_178, 2, x_169); +x_1 = x_165; +x_2 = x_178; goto _start; } } else { -lean_dec(x_189); -lean_dec(x_188); -lean_dec(x_187); -lean_dec(x_185); +lean_dec(x_169); +lean_dec(x_168); +lean_dec(x_167); +lean_dec(x_165); return x_2; } } } case 11: { -lean_object* x_202; uint8_t x_203; -x_202 = lean_ctor_get(x_1, 2); -lean_inc(x_202); +lean_object* x_180; uint8_t x_181; +x_180 = lean_ctor_get(x_1, 2); +lean_inc(x_180); lean_dec(x_1); -x_203 = l_Lean_Expr_hasLevelParam(x_202); -if (x_203 == 0) +x_181 = l_Lean_Expr_hasLevelParam(x_180); +if (x_181 == 0) { -lean_dec(x_202); +lean_dec(x_180); return x_2; } else { -lean_object* x_204; lean_object* x_205; lean_object* x_206; uint8_t x_207; -x_204 = lean_ctor_get(x_2, 0); -lean_inc(x_204); -x_205 = lean_ctor_get(x_2, 1); -lean_inc(x_205); -x_206 = lean_ctor_get(x_2, 2); -lean_inc(x_206); -x_207 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_205, x_202); -if (x_207 == 0) +lean_object* x_182; lean_object* x_183; lean_object* x_184; uint8_t x_185; +x_182 = lean_ctor_get(x_2, 0); +lean_inc(x_182); +x_183 = lean_ctor_get(x_2, 1); +lean_inc(x_183); +x_184 = lean_ctor_get(x_2, 2); +lean_inc(x_184); +x_185 = l_HashSetImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_183, x_180); +if (x_185 == 0) { -uint8_t x_208; -x_208 = !lean_is_exclusive(x_2); -if (x_208 == 0) +uint8_t x_186; +x_186 = !lean_is_exclusive(x_2); +if (x_186 == 0) { -lean_object* x_209; lean_object* x_210; lean_object* x_211; lean_object* x_212; lean_object* x_213; -x_209 = lean_ctor_get(x_2, 2); -lean_dec(x_209); -x_210 = lean_ctor_get(x_2, 1); -lean_dec(x_210); -x_211 = lean_ctor_get(x_2, 0); -lean_dec(x_211); -x_212 = lean_box(0); -lean_inc(x_202); -x_213 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_205, x_202, x_212); -lean_ctor_set(x_2, 1, x_213); -x_1 = x_202; +lean_object* x_187; lean_object* x_188; lean_object* x_189; lean_object* x_190; +x_187 = lean_ctor_get(x_2, 2); +lean_dec(x_187); +x_188 = lean_ctor_get(x_2, 1); +lean_dec(x_188); +x_189 = lean_ctor_get(x_2, 0); +lean_dec(x_189); +lean_inc(x_180); +x_190 = l_HashSetImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_183, x_180); +lean_ctor_set(x_2, 1, x_190); +x_1 = x_180; goto _start; } else { -lean_object* x_215; lean_object* x_216; lean_object* x_217; +lean_object* x_192; lean_object* x_193; lean_dec(x_2); -x_215 = lean_box(0); -lean_inc(x_202); -x_216 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_205, x_202, x_215); -x_217 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_217, 0, x_204); -lean_ctor_set(x_217, 1, x_216); -lean_ctor_set(x_217, 2, x_206); -x_1 = x_202; -x_2 = x_217; +lean_inc(x_180); +x_192 = l_HashSetImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_183, x_180); +x_193 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_193, 0, x_182); +lean_ctor_set(x_193, 1, x_192); +lean_ctor_set(x_193, 2, x_184); +x_1 = x_180; +x_2 = x_193; goto _start; } } else { -lean_dec(x_206); -lean_dec(x_205); -lean_dec(x_204); -lean_dec(x_202); +lean_dec(x_184); +lean_dec(x_183); +lean_dec(x_182); +lean_dec(x_180); return x_2; } } diff --git a/stage0/stdlib/Init/Lean/Util/CollectMVars.c b/stage0/stdlib/Init/Lean/Util/CollectMVars.c index 39ecfc29c3..60384df803 100644 --- a/stage0/stdlib/Init/Lean/Util/CollectMVars.c +++ b/stage0/stdlib/Init/Lean/Util/CollectMVars.c @@ -14,10 +14,11 @@ extern "C" { #endif lean_object* l_Lean_CollectMVars_visit(lean_object*, lean_object*, lean_object*); -lean_object* l_AssocList_foldlM___main___at_Lean_CollectMVars_visit___spec__6(lean_object*, lean_object*); +lean_object* l_mkHashSetImp___rarg(lean_object*); lean_object* lean_array_uget(lean_object*, size_t); +lean_object* l_HashSetImp_contains___at_Lean_CollectMVars_visit___spec__1___boxed(lean_object*, lean_object*); lean_object* lean_array_uset(lean_object*, size_t, lean_object*); -lean_object* l_HashMapImp_contains___at_Lean_CollectMVars_visit___spec__1___boxed(lean_object*, lean_object*); +lean_object* l_List_foldl___main___at_Lean_CollectMVars_visit___spec__6(lean_object*, lean_object*); lean_object* l_Lean_CollectMVars_main___main(lean_object*, lean_object*); extern lean_object* l_Array_empty___closed__1; lean_object* l_mkHashSet___at_Lean_CollectMVars_State_inhabited___spec__1(lean_object*); @@ -25,42 +26,33 @@ lean_object* lean_array_push(lean_object*, lean_object*); lean_object* lean_array_get_size(lean_object*); lean_object* lean_nat_add(lean_object*, lean_object*); lean_object* lean_array_fget(lean_object*, lean_object*); -lean_object* l_mkHashMap___at_Lean_CollectMVars_State_inhabited___spec__2(lean_object*); +uint8_t l_HashSetImp_contains___at_Lean_CollectMVars_visit___spec__1(lean_object*, lean_object*); +uint8_t l_List_elem___main___at_Lean_CollectMVars_visit___spec__2(lean_object*, lean_object*); lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); size_t l_Lean_Expr_hash(lean_object*); -lean_object* l_AssocList_contains___main___at_Lean_CollectMVars_visit___spec__2___boxed(lean_object*, lean_object*); lean_object* l_Lean_collectMVars(lean_object*, lean_object*); lean_object* l_Lean_CollectMVars_State_inhabited___closed__2; size_t lean_usize_modn(size_t, lean_object*); +lean_object* l_List_elem___main___at_Lean_CollectMVars_visit___spec__2___boxed(lean_object*, lean_object*); lean_object* l_Lean_CollectMVars_State_inhabited___closed__1; -lean_object* l_mkHashMapImp___rarg(lean_object*); -lean_object* l_HashMapImp_expand___at_Lean_CollectMVars_visit___spec__4(lean_object*, lean_object*); +lean_object* l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(lean_object*, lean_object*); uint8_t lean_expr_eqv(lean_object*, lean_object*); uint8_t lean_nat_dec_le(lean_object*, lean_object*); uint8_t l_Lean_Expr_hasMVar(lean_object*); lean_object* lean_nat_mul(lean_object*, lean_object*); -uint8_t l_AssocList_contains___main___at_Lean_CollectMVars_visit___spec__2(lean_object*, lean_object*); +lean_object* l_List_replace___main___at_Lean_CollectMVars_visit___spec__7(lean_object*, lean_object*, lean_object*); lean_object* lean_mk_array(lean_object*, lean_object*); -uint8_t l_HashMapImp_contains___at_Lean_CollectMVars_visit___spec__1(lean_object*, lean_object*); -lean_object* l_HashMapImp_moveEntries___main___at_Lean_CollectMVars_visit___spec__5(lean_object*, lean_object*, lean_object*); -lean_object* l_AssocList_replace___main___at_Lean_CollectMVars_visit___spec__7(lean_object*, lean_object*, lean_object*); -lean_object* l_HashMapImp_insert___at_Lean_CollectMVars_visit___spec__3(lean_object*, lean_object*, lean_object*); +lean_object* l_List_replace___main___at_Lean_CollectMVars_visit___spec__7___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_HashSetImp_moveEntries___main___at_Lean_CollectMVars_visit___spec__5(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_CollectMVars_State_inhabited; +lean_object* l_HashSetImp_expand___at_Lean_CollectMVars_visit___spec__4(lean_object*, lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); lean_object* l_Lean_CollectMVars_main(lean_object*, lean_object*); -lean_object* l_mkHashMap___at_Lean_CollectMVars_State_inhabited___spec__2(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_mkHashMapImp___rarg(x_1); -return x_2; -} -} lean_object* l_mkHashSet___at_Lean_CollectMVars_State_inhabited___spec__1(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = l_mkHashMapImp___rarg(x_1); +x_2 = l_mkHashSetImp___rarg(x_1); return x_2; } } @@ -69,7 +61,7 @@ _start: { lean_object* x_1; lean_object* x_2; x_1 = lean_unsigned_to_nat(8u); -x_2 = l_mkHashMapImp___rarg(x_1); +x_2 = l_mkHashSetImp___rarg(x_1); return x_2; } } @@ -93,7 +85,7 @@ x_1 = l_Lean_CollectMVars_State_inhabited___closed__2; return x_1; } } -uint8_t l_AssocList_contains___main___at_Lean_CollectMVars_visit___spec__2(lean_object* x_1, lean_object* x_2) { +uint8_t l_List_elem___main___at_Lean_CollectMVars_visit___spec__2(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) @@ -106,8 +98,8 @@ else { lean_object* x_4; lean_object* x_5; uint8_t x_6; x_4 = lean_ctor_get(x_2, 0); -x_5 = lean_ctor_get(x_2, 2); -x_6 = lean_expr_eqv(x_4, x_1); +x_5 = lean_ctor_get(x_2, 1); +x_6 = lean_expr_eqv(x_1, x_4); if (x_6 == 0) { x_2 = x_5; @@ -122,7 +114,7 @@ return x_8; } } } -uint8_t l_HashMapImp_contains___at_Lean_CollectMVars_visit___spec__1(lean_object* x_1, lean_object* x_2) { +uint8_t l_HashSetImp_contains___at_Lean_CollectMVars_visit___spec__1(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; size_t x_5; size_t x_6; lean_object* x_7; uint8_t x_8; @@ -132,12 +124,12 @@ x_5 = l_Lean_Expr_hash(x_2); x_6 = lean_usize_modn(x_5, x_4); lean_dec(x_4); x_7 = lean_array_uget(x_3, x_6); -x_8 = l_AssocList_contains___main___at_Lean_CollectMVars_visit___spec__2(x_2, x_7); +x_8 = l_List_elem___main___at_Lean_CollectMVars_visit___spec__2(x_2, x_7); lean_dec(x_7); return x_8; } } -lean_object* l_AssocList_foldlM___main___at_Lean_CollectMVars_visit___spec__6(lean_object* x_1, lean_object* x_2) { +lean_object* l_List_foldl___main___at_Lean_CollectMVars_visit___spec__6(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) @@ -152,13 +144,13 @@ if (x_3 == 0) { lean_object* x_4; lean_object* x_5; lean_object* x_6; size_t x_7; size_t x_8; lean_object* x_9; lean_object* x_10; x_4 = lean_ctor_get(x_2, 0); -x_5 = lean_ctor_get(x_2, 2); +x_5 = lean_ctor_get(x_2, 1); x_6 = lean_array_get_size(x_1); x_7 = l_Lean_Expr_hash(x_4); x_8 = lean_usize_modn(x_7, x_6); lean_dec(x_6); x_9 = lean_array_uget(x_1, x_8); -lean_ctor_set(x_2, 2, x_9); +lean_ctor_set(x_2, 1, x_9); x_10 = lean_array_uset(x_1, x_8, x_2); x_1 = x_10; x_2 = x_5; @@ -166,32 +158,29 @@ goto _start; } else { -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; size_t x_16; size_t x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; +lean_object* x_12; lean_object* x_13; lean_object* x_14; size_t x_15; size_t x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; x_12 = lean_ctor_get(x_2, 0); x_13 = lean_ctor_get(x_2, 1); -x_14 = lean_ctor_get(x_2, 2); -lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_dec(x_2); -x_15 = lean_array_get_size(x_1); -x_16 = l_Lean_Expr_hash(x_12); -x_17 = lean_usize_modn(x_16, x_15); -lean_dec(x_15); -x_18 = lean_array_uget(x_1, x_17); -x_19 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_19, 0, x_12); -lean_ctor_set(x_19, 1, x_13); -lean_ctor_set(x_19, 2, x_18); -x_20 = lean_array_uset(x_1, x_17, x_19); -x_1 = x_20; -x_2 = x_14; +x_14 = lean_array_get_size(x_1); +x_15 = l_Lean_Expr_hash(x_12); +x_16 = lean_usize_modn(x_15, x_14); +lean_dec(x_14); +x_17 = lean_array_uget(x_1, x_16); +x_18 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_18, 0, x_12); +lean_ctor_set(x_18, 1, x_17); +x_19 = lean_array_uset(x_1, x_16, x_18); +x_1 = x_19; +x_2 = x_13; goto _start; } } } } -lean_object* l_HashMapImp_moveEntries___main___at_Lean_CollectMVars_visit___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_HashSetImp_moveEntries___main___at_Lean_CollectMVars_visit___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; uint8_t x_5; @@ -210,7 +199,7 @@ lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_obj x_6 = lean_array_fget(x_2, x_1); x_7 = lean_box(0); x_8 = lean_array_fset(x_2, x_1, x_7); -x_9 = l_AssocList_foldlM___main___at_Lean_CollectMVars_visit___spec__6(x_3, x_6); +x_9 = l_List_foldl___main___at_Lean_CollectMVars_visit___spec__6(x_3, x_6); x_10 = lean_unsigned_to_nat(1u); x_11 = lean_nat_add(x_1, x_10); lean_dec(x_1); @@ -221,7 +210,7 @@ goto _start; } } } -lean_object* l_HashMapImp_expand___at_Lean_CollectMVars_visit___spec__4(lean_object* x_1, lean_object* x_2) { +lean_object* l_HashSetImp_expand___at_Lean_CollectMVars_visit___spec__4(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; @@ -232,188 +221,181 @@ lean_dec(x_3); x_6 = lean_box(0); x_7 = lean_mk_array(x_5, x_6); x_8 = lean_unsigned_to_nat(0u); -x_9 = l_HashMapImp_moveEntries___main___at_Lean_CollectMVars_visit___spec__5(x_8, x_2, x_7); +x_9 = l_HashSetImp_moveEntries___main___at_Lean_CollectMVars_visit___spec__5(x_8, x_2, x_7); x_10 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_10, 0, x_1); lean_ctor_set(x_10, 1, x_9); return x_10; } } -lean_object* l_AssocList_replace___main___at_Lean_CollectMVars_visit___spec__7(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_List_replace___main___at_Lean_CollectMVars_visit___spec__7(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { -if (lean_obj_tag(x_3) == 0) +if (lean_obj_tag(x_1) == 0) { -lean_dec(x_2); -lean_dec(x_1); -return x_3; -} -else -{ -uint8_t x_4; -x_4 = !lean_is_exclusive(x_3); -if (x_4 == 0) -{ -lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8; -x_5 = lean_ctor_get(x_3, 0); -x_6 = lean_ctor_get(x_3, 1); -x_7 = lean_ctor_get(x_3, 2); -x_8 = lean_expr_eqv(x_5, x_1); -if (x_8 == 0) -{ -lean_object* x_9; -x_9 = l_AssocList_replace___main___at_Lean_CollectMVars_visit___spec__7(x_1, x_2, x_7); -lean_ctor_set(x_3, 2, x_9); -return x_3; -} -else -{ -lean_dec(x_6); -lean_dec(x_5); -lean_ctor_set(x_3, 1, x_2); -lean_ctor_set(x_3, 0, x_1); -return x_3; -} -} -else -{ -lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; -x_10 = lean_ctor_get(x_3, 0); -x_11 = lean_ctor_get(x_3, 1); -x_12 = lean_ctor_get(x_3, 2); -lean_inc(x_12); -lean_inc(x_11); -lean_inc(x_10); lean_dec(x_3); -x_13 = lean_expr_eqv(x_10, x_1); -if (x_13 == 0) -{ -lean_object* x_14; lean_object* x_15; -x_14 = l_AssocList_replace___main___at_Lean_CollectMVars_visit___spec__7(x_1, x_2, x_12); -x_15 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_15, 0, x_10); -lean_ctor_set(x_15, 1, x_11); -lean_ctor_set(x_15, 2, x_14); -return x_15; +return x_1; } else { -lean_object* x_16; -lean_dec(x_11); -lean_dec(x_10); -x_16 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_16, 0, x_1); -lean_ctor_set(x_16, 1, x_2); -lean_ctor_set(x_16, 2, x_12); -return x_16; -} -} -} -} -} -lean_object* l_HashMapImp_insert___at_Lean_CollectMVars_visit___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ uint8_t x_4; x_4 = !lean_is_exclusive(x_1); if (x_4 == 0) { -lean_object* x_5; lean_object* x_6; lean_object* x_7; size_t x_8; size_t x_9; lean_object* x_10; uint8_t x_11; +lean_object* x_5; lean_object* x_6; uint8_t x_7; x_5 = lean_ctor_get(x_1, 0); x_6 = lean_ctor_get(x_1, 1); -x_7 = lean_array_get_size(x_6); -x_8 = l_Lean_Expr_hash(x_2); -x_9 = lean_usize_modn(x_8, x_7); -x_10 = lean_array_uget(x_6, x_9); -x_11 = l_AssocList_contains___main___at_Lean_CollectMVars_visit___spec__2(x_2, x_10); +x_7 = lean_expr_eqv(x_5, x_2); +if (x_7 == 0) +{ +lean_object* x_8; +x_8 = l_List_replace___main___at_Lean_CollectMVars_visit___spec__7(x_6, x_2, x_3); +lean_ctor_set(x_1, 1, x_8); +return x_1; +} +else +{ +lean_dec(x_5); +lean_ctor_set(x_1, 0, x_3); +return x_1; +} +} +else +{ +lean_object* x_9; lean_object* x_10; uint8_t x_11; +x_9 = lean_ctor_get(x_1, 0); +x_10 = lean_ctor_get(x_1, 1); +lean_inc(x_10); +lean_inc(x_9); +lean_dec(x_1); +x_11 = lean_expr_eqv(x_9, x_2); if (x_11 == 0) { -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; -x_12 = lean_unsigned_to_nat(1u); -x_13 = lean_nat_add(x_5, x_12); -lean_dec(x_5); -x_14 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_14, 0, x_2); -lean_ctor_set(x_14, 1, x_3); -lean_ctor_set(x_14, 2, x_10); -x_15 = lean_array_uset(x_6, x_9, x_14); -x_16 = lean_nat_dec_le(x_13, x_7); -lean_dec(x_7); -if (x_16 == 0) +lean_object* x_12; lean_object* x_13; +x_12 = l_List_replace___main___at_Lean_CollectMVars_visit___spec__7(x_10, x_2, x_3); +x_13 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_13, 0, x_9); +lean_ctor_set(x_13, 1, x_12); +return x_13; +} +else { -lean_object* x_17; +lean_object* x_14; +lean_dec(x_9); +x_14 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_14, 0, x_3); +lean_ctor_set(x_14, 1, x_10); +return x_14; +} +} +} +} +} +lean_object* l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(lean_object* x_1, lean_object* x_2) { +_start: +{ +uint8_t x_3; +x_3 = !lean_is_exclusive(x_1); +if (x_3 == 0) +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; size_t x_7; size_t x_8; lean_object* x_9; uint8_t x_10; +x_4 = lean_ctor_get(x_1, 0); +x_5 = lean_ctor_get(x_1, 1); +x_6 = lean_array_get_size(x_5); +x_7 = l_Lean_Expr_hash(x_2); +x_8 = lean_usize_modn(x_7, x_6); +x_9 = lean_array_uget(x_5, x_8); +x_10 = l_List_elem___main___at_Lean_CollectMVars_visit___spec__2(x_2, x_9); +if (x_10 == 0) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; uint8_t x_15; +x_11 = lean_unsigned_to_nat(1u); +x_12 = lean_nat_add(x_4, x_11); +lean_dec(x_4); +x_13 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_13, 0, x_2); +lean_ctor_set(x_13, 1, x_9); +x_14 = lean_array_uset(x_5, x_8, x_13); +x_15 = lean_nat_dec_le(x_12, x_6); +lean_dec(x_6); +if (x_15 == 0) +{ +lean_object* x_16; lean_free_object(x_1); -x_17 = l_HashMapImp_expand___at_Lean_CollectMVars_visit___spec__4(x_13, x_15); -return x_17; +x_16 = l_HashSetImp_expand___at_Lean_CollectMVars_visit___spec__4(x_12, x_14); +return x_16; } else { -lean_ctor_set(x_1, 1, x_15); -lean_ctor_set(x_1, 0, x_13); +lean_ctor_set(x_1, 1, x_14); +lean_ctor_set(x_1, 0, x_12); return x_1; } } else { -lean_object* x_18; lean_object* x_19; -lean_dec(x_7); -x_18 = l_AssocList_replace___main___at_Lean_CollectMVars_visit___spec__7(x_2, x_3, x_10); -x_19 = lean_array_uset(x_6, x_9, x_18); -lean_ctor_set(x_1, 1, x_19); +lean_object* x_17; lean_object* x_18; +lean_dec(x_6); +lean_inc(x_2); +x_17 = l_List_replace___main___at_Lean_CollectMVars_visit___spec__7(x_9, x_2, x_2); +lean_dec(x_2); +x_18 = lean_array_uset(x_5, x_8, x_17); +lean_ctor_set(x_1, 1, x_18); return x_1; } } else { -lean_object* x_20; lean_object* x_21; lean_object* x_22; size_t x_23; size_t x_24; lean_object* x_25; uint8_t x_26; -x_20 = lean_ctor_get(x_1, 0); -x_21 = lean_ctor_get(x_1, 1); -lean_inc(x_21); +lean_object* x_19; lean_object* x_20; lean_object* x_21; size_t x_22; size_t x_23; lean_object* x_24; uint8_t x_25; +x_19 = lean_ctor_get(x_1, 0); +x_20 = lean_ctor_get(x_1, 1); lean_inc(x_20); +lean_inc(x_19); lean_dec(x_1); -x_22 = lean_array_get_size(x_21); -x_23 = l_Lean_Expr_hash(x_2); -x_24 = lean_usize_modn(x_23, x_22); -x_25 = lean_array_uget(x_21, x_24); -x_26 = l_AssocList_contains___main___at_Lean_CollectMVars_visit___spec__2(x_2, x_25); -if (x_26 == 0) +x_21 = lean_array_get_size(x_20); +x_22 = l_Lean_Expr_hash(x_2); +x_23 = lean_usize_modn(x_22, x_21); +x_24 = lean_array_uget(x_20, x_23); +x_25 = l_List_elem___main___at_Lean_CollectMVars_visit___spec__2(x_2, x_24); +if (x_25 == 0) { -lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; uint8_t x_31; -x_27 = lean_unsigned_to_nat(1u); -x_28 = lean_nat_add(x_20, x_27); -lean_dec(x_20); -x_29 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_29, 0, x_2); -lean_ctor_set(x_29, 1, x_3); -lean_ctor_set(x_29, 2, x_25); -x_30 = lean_array_uset(x_21, x_24, x_29); -x_31 = lean_nat_dec_le(x_28, x_22); -lean_dec(x_22); -if (x_31 == 0) +lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; uint8_t x_30; +x_26 = lean_unsigned_to_nat(1u); +x_27 = lean_nat_add(x_19, x_26); +lean_dec(x_19); +x_28 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_28, 0, x_2); +lean_ctor_set(x_28, 1, x_24); +x_29 = lean_array_uset(x_20, x_23, x_28); +x_30 = lean_nat_dec_le(x_27, x_21); +lean_dec(x_21); +if (x_30 == 0) +{ +lean_object* x_31; +x_31 = l_HashSetImp_expand___at_Lean_CollectMVars_visit___spec__4(x_27, x_29); +return x_31; +} +else { lean_object* x_32; -x_32 = l_HashMapImp_expand___at_Lean_CollectMVars_visit___spec__4(x_28, x_30); +x_32 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_32, 0, x_27); +lean_ctor_set(x_32, 1, x_29); return x_32; } -else -{ -lean_object* x_33; -x_33 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_33, 0, x_28); -lean_ctor_set(x_33, 1, x_30); -return x_33; -} } else { -lean_object* x_34; lean_object* x_35; lean_object* x_36; -lean_dec(x_22); -x_34 = l_AssocList_replace___main___at_Lean_CollectMVars_visit___spec__7(x_2, x_3, x_25); -x_35 = lean_array_uset(x_21, x_24, x_34); -x_36 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_36, 0, x_20); -lean_ctor_set(x_36, 1, x_35); -return x_36; +lean_object* x_33; lean_object* x_34; lean_object* x_35; +lean_dec(x_21); +lean_inc(x_2); +x_33 = l_List_replace___main___at_Lean_CollectMVars_visit___spec__7(x_24, x_2, x_2); +lean_dec(x_2); +x_34 = lean_array_uset(x_20, x_23, x_33); +x_35 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_35, 0, x_19); +lean_ctor_set(x_35, 1, x_34); +return x_35; } } } @@ -436,37 +418,35 @@ x_5 = lean_ctor_get(x_3, 0); lean_inc(x_5); x_6 = lean_ctor_get(x_3, 1); lean_inc(x_6); -x_7 = l_HashMapImp_contains___at_Lean_CollectMVars_visit___spec__1(x_5, x_2); +x_7 = l_HashSetImp_contains___at_Lean_CollectMVars_visit___spec__1(x_5, x_2); if (x_7 == 0) { uint8_t x_8; x_8 = !lean_is_exclusive(x_3); if (x_8 == 0) { -lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; x_9 = lean_ctor_get(x_3, 1); lean_dec(x_9); x_10 = lean_ctor_get(x_3, 0); lean_dec(x_10); -x_11 = lean_box(0); lean_inc(x_2); -x_12 = l_HashMapImp_insert___at_Lean_CollectMVars_visit___spec__3(x_5, x_2, x_11); -lean_ctor_set(x_3, 0, x_12); -x_13 = lean_apply_2(x_1, x_2, x_3); -return x_13; +x_11 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_5, x_2); +lean_ctor_set(x_3, 0, x_11); +x_12 = lean_apply_2(x_1, x_2, x_3); +return x_12; } else { -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_dec(x_3); -x_14 = lean_box(0); lean_inc(x_2); -x_15 = l_HashMapImp_insert___at_Lean_CollectMVars_visit___spec__3(x_5, x_2, x_14); -x_16 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_16, 0, x_15); -lean_ctor_set(x_16, 1, x_6); -x_17 = lean_apply_2(x_1, x_2, x_16); -return x_17; +x_13 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_5, x_2); +x_14 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_14, 0, x_13); +lean_ctor_set(x_14, 1, x_6); +x_15 = lean_apply_2(x_1, x_2, x_14); +return x_15; } } else @@ -480,28 +460,37 @@ return x_3; } } } -lean_object* l_AssocList_contains___main___at_Lean_CollectMVars_visit___spec__2___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l_List_elem___main___at_Lean_CollectMVars_visit___spec__2___boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; -x_3 = l_AssocList_contains___main___at_Lean_CollectMVars_visit___spec__2(x_1, x_2); +x_3 = l_List_elem___main___at_Lean_CollectMVars_visit___spec__2(x_1, x_2); lean_dec(x_2); lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } } -lean_object* l_HashMapImp_contains___at_Lean_CollectMVars_visit___spec__1___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l_HashSetImp_contains___at_Lean_CollectMVars_visit___spec__1___boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; -x_3 = l_HashMapImp_contains___at_Lean_CollectMVars_visit___spec__1(x_1, x_2); +x_3 = l_HashSetImp_contains___at_Lean_CollectMVars_visit___spec__1(x_1, x_2); lean_dec(x_2); lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } } +lean_object* l_List_replace___main___at_Lean_CollectMVars_visit___spec__7___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_List_replace___main___at_Lean_CollectMVars_visit___spec__7(x_1, x_2, x_3); +lean_dec(x_2); +return x_4; +} +} lean_object* l_Lean_CollectMVars_main___main(lean_object* x_1, lean_object* x_2) { _start: { @@ -538,838 +527,1239 @@ return x_10; } case 5: { -lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_28; uint8_t x_29; +lean_object* x_11; lean_object* x_12; uint8_t x_13; uint8_t x_14; x_11 = lean_ctor_get(x_1, 0); lean_inc(x_11); x_12 = lean_ctor_get(x_1, 1); lean_inc(x_12); lean_dec(x_1); -x_28 = l_Lean_Expr_hasMVar(x_11); -x_29 = l_Lean_Expr_hasMVar(x_12); -if (x_28 == 0) +x_13 = l_Lean_Expr_hasMVar(x_11); +x_14 = l_Lean_Expr_hasMVar(x_12); +if (x_13 == 0) { lean_dec(x_11); -if (x_29 == 0) +if (x_14 == 0) { lean_dec(x_12); return x_2; } else { -x_13 = x_2; -goto block_27; -} -} -else -{ -lean_object* x_30; lean_object* x_31; uint8_t x_32; -x_30 = lean_ctor_get(x_2, 0); -lean_inc(x_30); -x_31 = lean_ctor_get(x_2, 1); -lean_inc(x_31); -x_32 = l_HashMapImp_contains___at_Lean_CollectMVars_visit___spec__1(x_30, x_11); -if (x_32 == 0) -{ -uint8_t x_33; -x_33 = !lean_is_exclusive(x_2); -if (x_33 == 0) -{ -lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; -x_34 = lean_ctor_get(x_2, 1); -lean_dec(x_34); -x_35 = lean_ctor_get(x_2, 0); -lean_dec(x_35); -x_36 = lean_box(0); -lean_inc(x_11); -x_37 = l_HashMapImp_insert___at_Lean_CollectMVars_visit___spec__3(x_30, x_11, x_36); -lean_ctor_set(x_2, 0, x_37); -x_38 = l_Lean_CollectMVars_main___main(x_11, x_2); -if (x_29 == 0) -{ -lean_dec(x_12); -return x_38; -} -else -{ -x_13 = x_38; -goto block_27; -} -} -else -{ -lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; -lean_dec(x_2); -x_39 = lean_box(0); -lean_inc(x_11); -x_40 = l_HashMapImp_insert___at_Lean_CollectMVars_visit___spec__3(x_30, x_11, x_39); -x_41 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_41, 0, x_40); -lean_ctor_set(x_41, 1, x_31); -x_42 = l_Lean_CollectMVars_main___main(x_11, x_41); -if (x_29 == 0) -{ -lean_dec(x_12); -return x_42; -} -else -{ -x_13 = x_42; -goto block_27; -} -} -} -else -{ -lean_dec(x_31); -lean_dec(x_30); -lean_dec(x_11); -if (x_29 == 0) -{ -lean_dec(x_12); -return x_2; -} -else -{ -x_13 = x_2; -goto block_27; -} -} -} -block_27: -{ -lean_object* x_14; lean_object* x_15; uint8_t x_16; -x_14 = lean_ctor_get(x_13, 0); -lean_inc(x_14); -x_15 = lean_ctor_get(x_13, 1); +lean_object* x_15; lean_object* x_16; uint8_t x_17; +x_15 = lean_ctor_get(x_2, 0); lean_inc(x_15); -x_16 = l_HashMapImp_contains___at_Lean_CollectMVars_visit___spec__1(x_14, x_12); -if (x_16 == 0) -{ -uint8_t x_17; -x_17 = !lean_is_exclusive(x_13); +x_16 = lean_ctor_get(x_2, 1); +lean_inc(x_16); +x_17 = l_HashSetImp_contains___at_Lean_CollectMVars_visit___spec__1(x_15, x_12); if (x_17 == 0) { -lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; -x_18 = lean_ctor_get(x_13, 1); -lean_dec(x_18); -x_19 = lean_ctor_get(x_13, 0); +uint8_t x_18; +x_18 = !lean_is_exclusive(x_2); +if (x_18 == 0) +{ +lean_object* x_19; lean_object* x_20; lean_object* x_21; +x_19 = lean_ctor_get(x_2, 1); lean_dec(x_19); -x_20 = lean_box(0); +x_20 = lean_ctor_get(x_2, 0); +lean_dec(x_20); lean_inc(x_12); -x_21 = l_HashMapImp_insert___at_Lean_CollectMVars_visit___spec__3(x_14, x_12, x_20); -lean_ctor_set(x_13, 0, x_21); +x_21 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_15, x_12); +lean_ctor_set(x_2, 0, x_21); x_1 = x_12; -x_2 = x_13; goto _start; } else { -lean_object* x_23; lean_object* x_24; lean_object* x_25; -lean_dec(x_13); -x_23 = lean_box(0); +lean_object* x_23; lean_object* x_24; +lean_dec(x_2); lean_inc(x_12); -x_24 = l_HashMapImp_insert___at_Lean_CollectMVars_visit___spec__3(x_14, x_12, x_23); -x_25 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_25, 0, x_24); -lean_ctor_set(x_25, 1, x_15); +x_23 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_15, x_12); +x_24 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_24, 0, x_23); +lean_ctor_set(x_24, 1, x_16); x_1 = x_12; -x_2 = x_25; +x_2 = x_24; goto _start; } } else { +lean_dec(x_16); lean_dec(x_15); -lean_dec(x_14); lean_dec(x_12); -return x_13; +return x_2; +} +} +} +else +{ +lean_object* x_26; lean_object* x_27; uint8_t x_28; +x_26 = lean_ctor_get(x_2, 0); +lean_inc(x_26); +x_27 = lean_ctor_get(x_2, 1); +lean_inc(x_27); +x_28 = l_HashSetImp_contains___at_Lean_CollectMVars_visit___spec__1(x_26, x_11); +if (x_28 == 0) +{ +uint8_t x_29; +x_29 = !lean_is_exclusive(x_2); +if (x_29 == 0) +{ +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_30 = lean_ctor_get(x_2, 1); +lean_dec(x_30); +x_31 = lean_ctor_get(x_2, 0); +lean_dec(x_31); +lean_inc(x_11); +x_32 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_26, x_11); +lean_ctor_set(x_2, 0, x_32); +x_33 = l_Lean_CollectMVars_main___main(x_11, x_2); +if (x_14 == 0) +{ +lean_dec(x_12); +return x_33; +} +else +{ +lean_object* x_34; lean_object* x_35; uint8_t x_36; +x_34 = lean_ctor_get(x_33, 0); +lean_inc(x_34); +x_35 = lean_ctor_get(x_33, 1); +lean_inc(x_35); +x_36 = l_HashSetImp_contains___at_Lean_CollectMVars_visit___spec__1(x_34, x_12); +if (x_36 == 0) +{ +uint8_t x_37; +x_37 = !lean_is_exclusive(x_33); +if (x_37 == 0) +{ +lean_object* x_38; lean_object* x_39; lean_object* x_40; +x_38 = lean_ctor_get(x_33, 1); +lean_dec(x_38); +x_39 = lean_ctor_get(x_33, 0); +lean_dec(x_39); +lean_inc(x_12); +x_40 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_34, x_12); +lean_ctor_set(x_33, 0, x_40); +x_1 = x_12; +x_2 = x_33; +goto _start; +} +else +{ +lean_object* x_42; lean_object* x_43; +lean_dec(x_33); +lean_inc(x_12); +x_42 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_34, x_12); +x_43 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_43, 0, x_42); +lean_ctor_set(x_43, 1, x_35); +x_1 = x_12; +x_2 = x_43; +goto _start; +} +} +else +{ +lean_dec(x_35); +lean_dec(x_34); +lean_dec(x_12); +return x_33; +} +} +} +else +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; +lean_dec(x_2); +lean_inc(x_11); +x_45 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_26, x_11); +x_46 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_46, 0, x_45); +lean_ctor_set(x_46, 1, x_27); +x_47 = l_Lean_CollectMVars_main___main(x_11, x_46); +if (x_14 == 0) +{ +lean_dec(x_12); +return x_47; +} +else +{ +lean_object* x_48; lean_object* x_49; uint8_t x_50; +x_48 = lean_ctor_get(x_47, 0); +lean_inc(x_48); +x_49 = lean_ctor_get(x_47, 1); +lean_inc(x_49); +x_50 = l_HashSetImp_contains___at_Lean_CollectMVars_visit___spec__1(x_48, x_12); +if (x_50 == 0) +{ +lean_object* x_51; lean_object* x_52; lean_object* x_53; +if (lean_is_exclusive(x_47)) { + lean_ctor_release(x_47, 0); + lean_ctor_release(x_47, 1); + x_51 = x_47; +} else { + lean_dec_ref(x_47); + x_51 = lean_box(0); +} +lean_inc(x_12); +x_52 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_48, x_12); +if (lean_is_scalar(x_51)) { + x_53 = lean_alloc_ctor(0, 2, 0); +} else { + x_53 = x_51; +} +lean_ctor_set(x_53, 0, x_52); +lean_ctor_set(x_53, 1, x_49); +x_1 = x_12; +x_2 = x_53; +goto _start; +} +else +{ +lean_dec(x_49); +lean_dec(x_48); +lean_dec(x_12); +return x_47; +} +} +} +} +else +{ +lean_dec(x_11); +if (x_14 == 0) +{ +lean_dec(x_27); +lean_dec(x_26); +lean_dec(x_12); +return x_2; +} +else +{ +uint8_t x_55; +x_55 = l_HashSetImp_contains___at_Lean_CollectMVars_visit___spec__1(x_26, x_12); +if (x_55 == 0) +{ +uint8_t x_56; +x_56 = !lean_is_exclusive(x_2); +if (x_56 == 0) +{ +lean_object* x_57; lean_object* x_58; lean_object* x_59; +x_57 = lean_ctor_get(x_2, 1); +lean_dec(x_57); +x_58 = lean_ctor_get(x_2, 0); +lean_dec(x_58); +lean_inc(x_12); +x_59 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_26, x_12); +lean_ctor_set(x_2, 0, x_59); +x_1 = x_12; +goto _start; +} +else +{ +lean_object* x_61; lean_object* x_62; +lean_dec(x_2); +lean_inc(x_12); +x_61 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_26, x_12); +x_62 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_62, 0, x_61); +lean_ctor_set(x_62, 1, x_27); +x_1 = x_12; +x_2 = x_62; +goto _start; +} +} +else +{ +lean_dec(x_27); +lean_dec(x_26); +lean_dec(x_12); +return x_2; +} +} } } } case 6: { -lean_object* x_43; lean_object* x_44; lean_object* x_45; uint8_t x_60; uint8_t x_61; -x_43 = lean_ctor_get(x_1, 1); -lean_inc(x_43); -x_44 = lean_ctor_get(x_1, 2); -lean_inc(x_44); +lean_object* x_64; lean_object* x_65; uint8_t x_66; uint8_t x_67; +x_64 = lean_ctor_get(x_1, 1); +lean_inc(x_64); +x_65 = lean_ctor_get(x_1, 2); +lean_inc(x_65); lean_dec(x_1); -x_60 = l_Lean_Expr_hasMVar(x_43); -x_61 = l_Lean_Expr_hasMVar(x_44); -if (x_60 == 0) +x_66 = l_Lean_Expr_hasMVar(x_64); +x_67 = l_Lean_Expr_hasMVar(x_65); +if (x_66 == 0) { -lean_dec(x_43); -if (x_61 == 0) +lean_dec(x_64); +if (x_67 == 0) { -lean_dec(x_44); +lean_dec(x_65); return x_2; } else { -x_45 = x_2; -goto block_59; -} +lean_object* x_68; lean_object* x_69; uint8_t x_70; +x_68 = lean_ctor_get(x_2, 0); +lean_inc(x_68); +x_69 = lean_ctor_get(x_2, 1); +lean_inc(x_69); +x_70 = l_HashSetImp_contains___at_Lean_CollectMVars_visit___spec__1(x_68, x_65); +if (x_70 == 0) +{ +uint8_t x_71; +x_71 = !lean_is_exclusive(x_2); +if (x_71 == 0) +{ +lean_object* x_72; lean_object* x_73; lean_object* x_74; +x_72 = lean_ctor_get(x_2, 1); +lean_dec(x_72); +x_73 = lean_ctor_get(x_2, 0); +lean_dec(x_73); +lean_inc(x_65); +x_74 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_68, x_65); +lean_ctor_set(x_2, 0, x_74); +x_1 = x_65; +goto _start; } else { -lean_object* x_62; lean_object* x_63; uint8_t x_64; -x_62 = lean_ctor_get(x_2, 0); -lean_inc(x_62); -x_63 = lean_ctor_get(x_2, 1); -lean_inc(x_63); -x_64 = l_HashMapImp_contains___at_Lean_CollectMVars_visit___spec__1(x_62, x_43); -if (x_64 == 0) -{ -uint8_t x_65; -x_65 = !lean_is_exclusive(x_2); -if (x_65 == 0) -{ -lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; -x_66 = lean_ctor_get(x_2, 1); -lean_dec(x_66); -x_67 = lean_ctor_get(x_2, 0); -lean_dec(x_67); -x_68 = lean_box(0); -lean_inc(x_43); -x_69 = l_HashMapImp_insert___at_Lean_CollectMVars_visit___spec__3(x_62, x_43, x_68); -lean_ctor_set(x_2, 0, x_69); -x_70 = l_Lean_CollectMVars_main___main(x_43, x_2); -if (x_61 == 0) -{ -lean_dec(x_44); -return x_70; -} -else -{ -x_45 = x_70; -goto block_59; -} -} -else -{ -lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; +lean_object* x_76; lean_object* x_77; lean_dec(x_2); -x_71 = lean_box(0); -lean_inc(x_43); -x_72 = l_HashMapImp_insert___at_Lean_CollectMVars_visit___spec__3(x_62, x_43, x_71); -x_73 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_73, 0, x_72); -lean_ctor_set(x_73, 1, x_63); -x_74 = l_Lean_CollectMVars_main___main(x_43, x_73); -if (x_61 == 0) -{ -lean_dec(x_44); -return x_74; +lean_inc(x_65); +x_76 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_68, x_65); +x_77 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_77, 0, x_76); +lean_ctor_set(x_77, 1, x_69); +x_1 = x_65; +x_2 = x_77; +goto _start; +} } else { -x_45 = x_74; -goto block_59; +lean_dec(x_69); +lean_dec(x_68); +lean_dec(x_65); +return x_2; } } } else { -lean_dec(x_63); -lean_dec(x_62); -lean_dec(x_43); -if (x_61 == 0) +lean_object* x_79; lean_object* x_80; uint8_t x_81; +x_79 = lean_ctor_get(x_2, 0); +lean_inc(x_79); +x_80 = lean_ctor_get(x_2, 1); +lean_inc(x_80); +x_81 = l_HashSetImp_contains___at_Lean_CollectMVars_visit___spec__1(x_79, x_64); +if (x_81 == 0) { -lean_dec(x_44); +uint8_t x_82; +x_82 = !lean_is_exclusive(x_2); +if (x_82 == 0) +{ +lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; +x_83 = lean_ctor_get(x_2, 1); +lean_dec(x_83); +x_84 = lean_ctor_get(x_2, 0); +lean_dec(x_84); +lean_inc(x_64); +x_85 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_79, x_64); +lean_ctor_set(x_2, 0, x_85); +x_86 = l_Lean_CollectMVars_main___main(x_64, x_2); +if (x_67 == 0) +{ +lean_dec(x_65); +return x_86; +} +else +{ +lean_object* x_87; lean_object* x_88; uint8_t x_89; +x_87 = lean_ctor_get(x_86, 0); +lean_inc(x_87); +x_88 = lean_ctor_get(x_86, 1); +lean_inc(x_88); +x_89 = l_HashSetImp_contains___at_Lean_CollectMVars_visit___spec__1(x_87, x_65); +if (x_89 == 0) +{ +uint8_t x_90; +x_90 = !lean_is_exclusive(x_86); +if (x_90 == 0) +{ +lean_object* x_91; lean_object* x_92; lean_object* x_93; +x_91 = lean_ctor_get(x_86, 1); +lean_dec(x_91); +x_92 = lean_ctor_get(x_86, 0); +lean_dec(x_92); +lean_inc(x_65); +x_93 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_87, x_65); +lean_ctor_set(x_86, 0, x_93); +x_1 = x_65; +x_2 = x_86; +goto _start; +} +else +{ +lean_object* x_95; lean_object* x_96; +lean_dec(x_86); +lean_inc(x_65); +x_95 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_87, x_65); +x_96 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_96, 0, x_95); +lean_ctor_set(x_96, 1, x_88); +x_1 = x_65; +x_2 = x_96; +goto _start; +} +} +else +{ +lean_dec(x_88); +lean_dec(x_87); +lean_dec(x_65); +return x_86; +} +} +} +else +{ +lean_object* x_98; lean_object* x_99; lean_object* x_100; +lean_dec(x_2); +lean_inc(x_64); +x_98 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_79, x_64); +x_99 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_99, 0, x_98); +lean_ctor_set(x_99, 1, x_80); +x_100 = l_Lean_CollectMVars_main___main(x_64, x_99); +if (x_67 == 0) +{ +lean_dec(x_65); +return x_100; +} +else +{ +lean_object* x_101; lean_object* x_102; uint8_t x_103; +x_101 = lean_ctor_get(x_100, 0); +lean_inc(x_101); +x_102 = lean_ctor_get(x_100, 1); +lean_inc(x_102); +x_103 = l_HashSetImp_contains___at_Lean_CollectMVars_visit___spec__1(x_101, x_65); +if (x_103 == 0) +{ +lean_object* x_104; lean_object* x_105; lean_object* x_106; +if (lean_is_exclusive(x_100)) { + lean_ctor_release(x_100, 0); + lean_ctor_release(x_100, 1); + x_104 = x_100; +} else { + lean_dec_ref(x_100); + x_104 = lean_box(0); +} +lean_inc(x_65); +x_105 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_101, x_65); +if (lean_is_scalar(x_104)) { + x_106 = lean_alloc_ctor(0, 2, 0); +} else { + x_106 = x_104; +} +lean_ctor_set(x_106, 0, x_105); +lean_ctor_set(x_106, 1, x_102); +x_1 = x_65; +x_2 = x_106; +goto _start; +} +else +{ +lean_dec(x_102); +lean_dec(x_101); +lean_dec(x_65); +return x_100; +} +} +} +} +else +{ +lean_dec(x_64); +if (x_67 == 0) +{ +lean_dec(x_80); +lean_dec(x_79); +lean_dec(x_65); return x_2; } else { -x_45 = x_2; -goto block_59; -} -} -} -block_59: +uint8_t x_108; +x_108 = l_HashSetImp_contains___at_Lean_CollectMVars_visit___spec__1(x_79, x_65); +if (x_108 == 0) { -lean_object* x_46; lean_object* x_47; uint8_t x_48; -x_46 = lean_ctor_get(x_45, 0); -lean_inc(x_46); -x_47 = lean_ctor_get(x_45, 1); -lean_inc(x_47); -x_48 = l_HashMapImp_contains___at_Lean_CollectMVars_visit___spec__1(x_46, x_44); -if (x_48 == 0) +uint8_t x_109; +x_109 = !lean_is_exclusive(x_2); +if (x_109 == 0) { -uint8_t x_49; -x_49 = !lean_is_exclusive(x_45); -if (x_49 == 0) -{ -lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; -x_50 = lean_ctor_get(x_45, 1); -lean_dec(x_50); -x_51 = lean_ctor_get(x_45, 0); -lean_dec(x_51); -x_52 = lean_box(0); -lean_inc(x_44); -x_53 = l_HashMapImp_insert___at_Lean_CollectMVars_visit___spec__3(x_46, x_44, x_52); -lean_ctor_set(x_45, 0, x_53); -x_1 = x_44; -x_2 = x_45; +lean_object* x_110; lean_object* x_111; lean_object* x_112; +x_110 = lean_ctor_get(x_2, 1); +lean_dec(x_110); +x_111 = lean_ctor_get(x_2, 0); +lean_dec(x_111); +lean_inc(x_65); +x_112 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_79, x_65); +lean_ctor_set(x_2, 0, x_112); +x_1 = x_65; goto _start; } else { -lean_object* x_55; lean_object* x_56; lean_object* x_57; -lean_dec(x_45); -x_55 = lean_box(0); -lean_inc(x_44); -x_56 = l_HashMapImp_insert___at_Lean_CollectMVars_visit___spec__3(x_46, x_44, x_55); -x_57 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_57, 0, x_56); -lean_ctor_set(x_57, 1, x_47); -x_1 = x_44; -x_2 = x_57; +lean_object* x_114; lean_object* x_115; +lean_dec(x_2); +lean_inc(x_65); +x_114 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_79, x_65); +x_115 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_115, 0, x_114); +lean_ctor_set(x_115, 1, x_80); +x_1 = x_65; +x_2 = x_115; goto _start; } } else { -lean_dec(x_47); -lean_dec(x_46); -lean_dec(x_44); -return x_45; +lean_dec(x_80); +lean_dec(x_79); +lean_dec(x_65); +return x_2; +} +} } } } case 7: { -lean_object* x_75; lean_object* x_76; lean_object* x_77; uint8_t x_92; uint8_t x_93; -x_75 = lean_ctor_get(x_1, 1); -lean_inc(x_75); -x_76 = lean_ctor_get(x_1, 2); -lean_inc(x_76); +lean_object* x_117; lean_object* x_118; uint8_t x_119; uint8_t x_120; +x_117 = lean_ctor_get(x_1, 1); +lean_inc(x_117); +x_118 = lean_ctor_get(x_1, 2); +lean_inc(x_118); lean_dec(x_1); -x_92 = l_Lean_Expr_hasMVar(x_75); -x_93 = l_Lean_Expr_hasMVar(x_76); -if (x_92 == 0) +x_119 = l_Lean_Expr_hasMVar(x_117); +x_120 = l_Lean_Expr_hasMVar(x_118); +if (x_119 == 0) { -lean_dec(x_75); -if (x_93 == 0) +lean_dec(x_117); +if (x_120 == 0) { -lean_dec(x_76); +lean_dec(x_118); return x_2; } else { -x_77 = x_2; -goto block_91; -} +lean_object* x_121; lean_object* x_122; uint8_t x_123; +x_121 = lean_ctor_get(x_2, 0); +lean_inc(x_121); +x_122 = lean_ctor_get(x_2, 1); +lean_inc(x_122); +x_123 = l_HashSetImp_contains___at_Lean_CollectMVars_visit___spec__1(x_121, x_118); +if (x_123 == 0) +{ +uint8_t x_124; +x_124 = !lean_is_exclusive(x_2); +if (x_124 == 0) +{ +lean_object* x_125; lean_object* x_126; lean_object* x_127; +x_125 = lean_ctor_get(x_2, 1); +lean_dec(x_125); +x_126 = lean_ctor_get(x_2, 0); +lean_dec(x_126); +lean_inc(x_118); +x_127 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_121, x_118); +lean_ctor_set(x_2, 0, x_127); +x_1 = x_118; +goto _start; } else { -lean_object* x_94; lean_object* x_95; uint8_t x_96; -x_94 = lean_ctor_get(x_2, 0); -lean_inc(x_94); -x_95 = lean_ctor_get(x_2, 1); -lean_inc(x_95); -x_96 = l_HashMapImp_contains___at_Lean_CollectMVars_visit___spec__1(x_94, x_75); -if (x_96 == 0) -{ -uint8_t x_97; -x_97 = !lean_is_exclusive(x_2); -if (x_97 == 0) -{ -lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; -x_98 = lean_ctor_get(x_2, 1); -lean_dec(x_98); -x_99 = lean_ctor_get(x_2, 0); -lean_dec(x_99); -x_100 = lean_box(0); -lean_inc(x_75); -x_101 = l_HashMapImp_insert___at_Lean_CollectMVars_visit___spec__3(x_94, x_75, x_100); -lean_ctor_set(x_2, 0, x_101); -x_102 = l_Lean_CollectMVars_main___main(x_75, x_2); -if (x_93 == 0) -{ -lean_dec(x_76); -return x_102; -} -else -{ -x_77 = x_102; -goto block_91; -} -} -else -{ -lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; +lean_object* x_129; lean_object* x_130; lean_dec(x_2); -x_103 = lean_box(0); -lean_inc(x_75); -x_104 = l_HashMapImp_insert___at_Lean_CollectMVars_visit___spec__3(x_94, x_75, x_103); -x_105 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_105, 0, x_104); -lean_ctor_set(x_105, 1, x_95); -x_106 = l_Lean_CollectMVars_main___main(x_75, x_105); -if (x_93 == 0) -{ -lean_dec(x_76); -return x_106; +lean_inc(x_118); +x_129 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_121, x_118); +x_130 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_130, 0, x_129); +lean_ctor_set(x_130, 1, x_122); +x_1 = x_118; +x_2 = x_130; +goto _start; +} } else { -x_77 = x_106; -goto block_91; +lean_dec(x_122); +lean_dec(x_121); +lean_dec(x_118); +return x_2; } } } else { -lean_dec(x_95); -lean_dec(x_94); -lean_dec(x_75); -if (x_93 == 0) +lean_object* x_132; lean_object* x_133; uint8_t x_134; +x_132 = lean_ctor_get(x_2, 0); +lean_inc(x_132); +x_133 = lean_ctor_get(x_2, 1); +lean_inc(x_133); +x_134 = l_HashSetImp_contains___at_Lean_CollectMVars_visit___spec__1(x_132, x_117); +if (x_134 == 0) { -lean_dec(x_76); +uint8_t x_135; +x_135 = !lean_is_exclusive(x_2); +if (x_135 == 0) +{ +lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; +x_136 = lean_ctor_get(x_2, 1); +lean_dec(x_136); +x_137 = lean_ctor_get(x_2, 0); +lean_dec(x_137); +lean_inc(x_117); +x_138 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_132, x_117); +lean_ctor_set(x_2, 0, x_138); +x_139 = l_Lean_CollectMVars_main___main(x_117, x_2); +if (x_120 == 0) +{ +lean_dec(x_118); +return x_139; +} +else +{ +lean_object* x_140; lean_object* x_141; uint8_t x_142; +x_140 = lean_ctor_get(x_139, 0); +lean_inc(x_140); +x_141 = lean_ctor_get(x_139, 1); +lean_inc(x_141); +x_142 = l_HashSetImp_contains___at_Lean_CollectMVars_visit___spec__1(x_140, x_118); +if (x_142 == 0) +{ +uint8_t x_143; +x_143 = !lean_is_exclusive(x_139); +if (x_143 == 0) +{ +lean_object* x_144; lean_object* x_145; lean_object* x_146; +x_144 = lean_ctor_get(x_139, 1); +lean_dec(x_144); +x_145 = lean_ctor_get(x_139, 0); +lean_dec(x_145); +lean_inc(x_118); +x_146 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_140, x_118); +lean_ctor_set(x_139, 0, x_146); +x_1 = x_118; +x_2 = x_139; +goto _start; +} +else +{ +lean_object* x_148; lean_object* x_149; +lean_dec(x_139); +lean_inc(x_118); +x_148 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_140, x_118); +x_149 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_149, 0, x_148); +lean_ctor_set(x_149, 1, x_141); +x_1 = x_118; +x_2 = x_149; +goto _start; +} +} +else +{ +lean_dec(x_141); +lean_dec(x_140); +lean_dec(x_118); +return x_139; +} +} +} +else +{ +lean_object* x_151; lean_object* x_152; lean_object* x_153; +lean_dec(x_2); +lean_inc(x_117); +x_151 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_132, x_117); +x_152 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_152, 0, x_151); +lean_ctor_set(x_152, 1, x_133); +x_153 = l_Lean_CollectMVars_main___main(x_117, x_152); +if (x_120 == 0) +{ +lean_dec(x_118); +return x_153; +} +else +{ +lean_object* x_154; lean_object* x_155; uint8_t x_156; +x_154 = lean_ctor_get(x_153, 0); +lean_inc(x_154); +x_155 = lean_ctor_get(x_153, 1); +lean_inc(x_155); +x_156 = l_HashSetImp_contains___at_Lean_CollectMVars_visit___spec__1(x_154, x_118); +if (x_156 == 0) +{ +lean_object* x_157; lean_object* x_158; lean_object* x_159; +if (lean_is_exclusive(x_153)) { + lean_ctor_release(x_153, 0); + lean_ctor_release(x_153, 1); + x_157 = x_153; +} else { + lean_dec_ref(x_153); + x_157 = lean_box(0); +} +lean_inc(x_118); +x_158 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_154, x_118); +if (lean_is_scalar(x_157)) { + x_159 = lean_alloc_ctor(0, 2, 0); +} else { + x_159 = x_157; +} +lean_ctor_set(x_159, 0, x_158); +lean_ctor_set(x_159, 1, x_155); +x_1 = x_118; +x_2 = x_159; +goto _start; +} +else +{ +lean_dec(x_155); +lean_dec(x_154); +lean_dec(x_118); +return x_153; +} +} +} +} +else +{ +lean_dec(x_117); +if (x_120 == 0) +{ +lean_dec(x_133); +lean_dec(x_132); +lean_dec(x_118); return x_2; } else { -x_77 = x_2; -goto block_91; -} -} -} -block_91: +uint8_t x_161; +x_161 = l_HashSetImp_contains___at_Lean_CollectMVars_visit___spec__1(x_132, x_118); +if (x_161 == 0) { -lean_object* x_78; lean_object* x_79; uint8_t x_80; -x_78 = lean_ctor_get(x_77, 0); -lean_inc(x_78); -x_79 = lean_ctor_get(x_77, 1); -lean_inc(x_79); -x_80 = l_HashMapImp_contains___at_Lean_CollectMVars_visit___spec__1(x_78, x_76); -if (x_80 == 0) +uint8_t x_162; +x_162 = !lean_is_exclusive(x_2); +if (x_162 == 0) { -uint8_t x_81; -x_81 = !lean_is_exclusive(x_77); -if (x_81 == 0) -{ -lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; -x_82 = lean_ctor_get(x_77, 1); -lean_dec(x_82); -x_83 = lean_ctor_get(x_77, 0); -lean_dec(x_83); -x_84 = lean_box(0); -lean_inc(x_76); -x_85 = l_HashMapImp_insert___at_Lean_CollectMVars_visit___spec__3(x_78, x_76, x_84); -lean_ctor_set(x_77, 0, x_85); -x_1 = x_76; -x_2 = x_77; +lean_object* x_163; lean_object* x_164; lean_object* x_165; +x_163 = lean_ctor_get(x_2, 1); +lean_dec(x_163); +x_164 = lean_ctor_get(x_2, 0); +lean_dec(x_164); +lean_inc(x_118); +x_165 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_132, x_118); +lean_ctor_set(x_2, 0, x_165); +x_1 = x_118; goto _start; } else { -lean_object* x_87; lean_object* x_88; lean_object* x_89; -lean_dec(x_77); -x_87 = lean_box(0); -lean_inc(x_76); -x_88 = l_HashMapImp_insert___at_Lean_CollectMVars_visit___spec__3(x_78, x_76, x_87); -x_89 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_89, 0, x_88); -lean_ctor_set(x_89, 1, x_79); -x_1 = x_76; -x_2 = x_89; +lean_object* x_167; lean_object* x_168; +lean_dec(x_2); +lean_inc(x_118); +x_167 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_132, x_118); +x_168 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_168, 0, x_167); +lean_ctor_set(x_168, 1, x_133); +x_1 = x_118; +x_2 = x_168; goto _start; } } else { -lean_dec(x_79); -lean_dec(x_78); -lean_dec(x_76); -return x_77; +lean_dec(x_133); +lean_dec(x_132); +lean_dec(x_118); +return x_2; +} +} } } } case 8: { -lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; uint8_t x_125; uint8_t x_126; uint8_t x_127; lean_object* x_128; -x_107 = lean_ctor_get(x_1, 1); -lean_inc(x_107); -x_108 = lean_ctor_get(x_1, 2); -lean_inc(x_108); -x_109 = lean_ctor_get(x_1, 3); -lean_inc(x_109); +lean_object* x_170; lean_object* x_171; lean_object* x_172; uint8_t x_173; uint8_t x_174; uint8_t x_175; lean_object* x_176; lean_object* x_189; +x_170 = lean_ctor_get(x_1, 1); +lean_inc(x_170); +x_171 = lean_ctor_get(x_1, 2); +lean_inc(x_171); +x_172 = lean_ctor_get(x_1, 3); +lean_inc(x_172); lean_dec(x_1); -x_125 = l_Lean_Expr_hasMVar(x_107); -x_126 = l_Lean_Expr_hasMVar(x_108); -x_127 = l_Lean_Expr_hasMVar(x_109); -if (x_125 == 0) +x_173 = l_Lean_Expr_hasMVar(x_170); +x_174 = l_Lean_Expr_hasMVar(x_171); +x_175 = l_Lean_Expr_hasMVar(x_172); +if (x_173 == 0) { -lean_dec(x_107); -if (x_126 == 0) +lean_dec(x_170); +if (x_174 == 0) { -lean_dec(x_108); -if (x_127 == 0) -{ -lean_dec(x_109); -return x_2; +lean_dec(x_171); +x_176 = x_2; +goto block_188; } else { -x_110 = x_2; -goto block_124; +x_189 = x_2; +goto block_228; } } else { -x_128 = x_2; -goto block_142; +lean_object* x_229; lean_object* x_230; uint8_t x_231; +x_229 = lean_ctor_get(x_2, 0); +lean_inc(x_229); +x_230 = lean_ctor_get(x_2, 1); +lean_inc(x_230); +x_231 = l_HashSetImp_contains___at_Lean_CollectMVars_visit___spec__1(x_229, x_170); +if (x_231 == 0) +{ +uint8_t x_232; +x_232 = !lean_is_exclusive(x_2); +if (x_232 == 0) +{ +lean_object* x_233; lean_object* x_234; lean_object* x_235; lean_object* x_236; +x_233 = lean_ctor_get(x_2, 1); +lean_dec(x_233); +x_234 = lean_ctor_get(x_2, 0); +lean_dec(x_234); +lean_inc(x_170); +x_235 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_229, x_170); +lean_ctor_set(x_2, 0, x_235); +x_236 = l_Lean_CollectMVars_main___main(x_170, x_2); +if (x_174 == 0) +{ +lean_dec(x_171); +x_176 = x_236; +goto block_188; +} +else +{ +x_189 = x_236; +goto block_228; } } else { -lean_object* x_143; lean_object* x_144; uint8_t x_145; -x_143 = lean_ctor_get(x_2, 0); -lean_inc(x_143); -x_144 = lean_ctor_get(x_2, 1); -lean_inc(x_144); -x_145 = l_HashMapImp_contains___at_Lean_CollectMVars_visit___spec__1(x_143, x_107); -if (x_145 == 0) -{ -uint8_t x_146; -x_146 = !lean_is_exclusive(x_2); -if (x_146 == 0) -{ -lean_object* x_147; lean_object* x_148; lean_object* x_149; lean_object* x_150; lean_object* x_151; -x_147 = lean_ctor_get(x_2, 1); -lean_dec(x_147); -x_148 = lean_ctor_get(x_2, 0); -lean_dec(x_148); -x_149 = lean_box(0); -lean_inc(x_107); -x_150 = l_HashMapImp_insert___at_Lean_CollectMVars_visit___spec__3(x_143, x_107, x_149); -lean_ctor_set(x_2, 0, x_150); -x_151 = l_Lean_CollectMVars_main___main(x_107, x_2); -if (x_126 == 0) -{ -lean_dec(x_108); -if (x_127 == 0) -{ -lean_dec(x_109); -return x_151; -} -else -{ -x_110 = x_151; -goto block_124; -} -} -else -{ -x_128 = x_151; -goto block_142; -} -} -else -{ -lean_object* x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155; +lean_object* x_237; lean_object* x_238; lean_object* x_239; lean_dec(x_2); -x_152 = lean_box(0); -lean_inc(x_107); -x_153 = l_HashMapImp_insert___at_Lean_CollectMVars_visit___spec__3(x_143, x_107, x_152); -x_154 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_154, 0, x_153); -lean_ctor_set(x_154, 1, x_144); -x_155 = l_Lean_CollectMVars_main___main(x_107, x_154); -if (x_126 == 0) +lean_inc(x_170); +x_237 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_229, x_170); +x_238 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_238, 0, x_237); +lean_ctor_set(x_238, 1, x_230); +x_239 = l_Lean_CollectMVars_main___main(x_170, x_238); +if (x_174 == 0) { -lean_dec(x_108); -if (x_127 == 0) -{ -lean_dec(x_109); -return x_155; +lean_dec(x_171); +x_176 = x_239; +goto block_188; } else { -x_110 = x_155; -goto block_124; -} -} -else -{ -x_128 = x_155; -goto block_142; +x_189 = x_239; +goto block_228; } } } else { -lean_dec(x_144); -lean_dec(x_143); -lean_dec(x_107); -if (x_126 == 0) +lean_dec(x_230); +lean_dec(x_229); +lean_dec(x_170); +if (x_174 == 0) { -lean_dec(x_108); -if (x_127 == 0) -{ -lean_dec(x_109); -return x_2; +lean_dec(x_171); +x_176 = x_2; +goto block_188; } else { -x_110 = x_2; -goto block_124; +x_189 = x_2; +goto block_228; } } +} +block_188: +{ +if (x_175 == 0) +{ +lean_dec(x_172); +return x_176; +} else { -x_128 = x_2; -goto block_142; -} -} -} -block_124: +lean_object* x_177; lean_object* x_178; uint8_t x_179; +x_177 = lean_ctor_get(x_176, 0); +lean_inc(x_177); +x_178 = lean_ctor_get(x_176, 1); +lean_inc(x_178); +x_179 = l_HashSetImp_contains___at_Lean_CollectMVars_visit___spec__1(x_177, x_172); +if (x_179 == 0) { -lean_object* x_111; lean_object* x_112; uint8_t x_113; -x_111 = lean_ctor_get(x_110, 0); -lean_inc(x_111); -x_112 = lean_ctor_get(x_110, 1); -lean_inc(x_112); -x_113 = l_HashMapImp_contains___at_Lean_CollectMVars_visit___spec__1(x_111, x_109); -if (x_113 == 0) +uint8_t x_180; +x_180 = !lean_is_exclusive(x_176); +if (x_180 == 0) { -uint8_t x_114; -x_114 = !lean_is_exclusive(x_110); -if (x_114 == 0) -{ -lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; -x_115 = lean_ctor_get(x_110, 1); -lean_dec(x_115); -x_116 = lean_ctor_get(x_110, 0); -lean_dec(x_116); -x_117 = lean_box(0); -lean_inc(x_109); -x_118 = l_HashMapImp_insert___at_Lean_CollectMVars_visit___spec__3(x_111, x_109, x_117); -lean_ctor_set(x_110, 0, x_118); -x_1 = x_109; -x_2 = x_110; +lean_object* x_181; lean_object* x_182; lean_object* x_183; +x_181 = lean_ctor_get(x_176, 1); +lean_dec(x_181); +x_182 = lean_ctor_get(x_176, 0); +lean_dec(x_182); +lean_inc(x_172); +x_183 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_177, x_172); +lean_ctor_set(x_176, 0, x_183); +x_1 = x_172; +x_2 = x_176; goto _start; } else { -lean_object* x_120; lean_object* x_121; lean_object* x_122; -lean_dec(x_110); -x_120 = lean_box(0); -lean_inc(x_109); -x_121 = l_HashMapImp_insert___at_Lean_CollectMVars_visit___spec__3(x_111, x_109, x_120); -x_122 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_122, 0, x_121); -lean_ctor_set(x_122, 1, x_112); -x_1 = x_109; -x_2 = x_122; +lean_object* x_185; lean_object* x_186; +lean_dec(x_176); +lean_inc(x_172); +x_185 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_177, x_172); +x_186 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_186, 0, x_185); +lean_ctor_set(x_186, 1, x_178); +x_1 = x_172; +x_2 = x_186; goto _start; } } else { -lean_dec(x_112); -lean_dec(x_111); -lean_dec(x_109); -return x_110; +lean_dec(x_178); +lean_dec(x_177); +lean_dec(x_172); +return x_176; } } -block_142: +} +block_228: { -lean_object* x_129; lean_object* x_130; uint8_t x_131; -x_129 = lean_ctor_get(x_128, 0); -lean_inc(x_129); -x_130 = lean_ctor_get(x_128, 1); -lean_inc(x_130); -x_131 = l_HashMapImp_contains___at_Lean_CollectMVars_visit___spec__1(x_129, x_108); -if (x_131 == 0) +lean_object* x_190; lean_object* x_191; uint8_t x_192; +x_190 = lean_ctor_get(x_189, 0); +lean_inc(x_190); +x_191 = lean_ctor_get(x_189, 1); +lean_inc(x_191); +x_192 = l_HashSetImp_contains___at_Lean_CollectMVars_visit___spec__1(x_190, x_171); +if (x_192 == 0) { -uint8_t x_132; -x_132 = !lean_is_exclusive(x_128); -if (x_132 == 0) +uint8_t x_193; +x_193 = !lean_is_exclusive(x_189); +if (x_193 == 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_128, 1); -lean_dec(x_133); -x_134 = lean_ctor_get(x_128, 0); -lean_dec(x_134); -x_135 = lean_box(0); -lean_inc(x_108); -x_136 = l_HashMapImp_insert___at_Lean_CollectMVars_visit___spec__3(x_129, x_108, x_135); -lean_ctor_set(x_128, 0, x_136); -x_137 = l_Lean_CollectMVars_main___main(x_108, x_128); -if (x_127 == 0) +lean_object* x_194; lean_object* x_195; lean_object* x_196; lean_object* x_197; +x_194 = lean_ctor_get(x_189, 1); +lean_dec(x_194); +x_195 = lean_ctor_get(x_189, 0); +lean_dec(x_195); +lean_inc(x_171); +x_196 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_190, x_171); +lean_ctor_set(x_189, 0, x_196); +x_197 = l_Lean_CollectMVars_main___main(x_171, x_189); +if (x_175 == 0) { -lean_dec(x_109); -return x_137; +lean_dec(x_172); +return x_197; } else { -x_110 = x_137; -goto block_124; +lean_object* x_198; lean_object* x_199; uint8_t x_200; +x_198 = lean_ctor_get(x_197, 0); +lean_inc(x_198); +x_199 = lean_ctor_get(x_197, 1); +lean_inc(x_199); +x_200 = l_HashSetImp_contains___at_Lean_CollectMVars_visit___spec__1(x_198, x_172); +if (x_200 == 0) +{ +uint8_t x_201; +x_201 = !lean_is_exclusive(x_197); +if (x_201 == 0) +{ +lean_object* x_202; lean_object* x_203; lean_object* x_204; +x_202 = lean_ctor_get(x_197, 1); +lean_dec(x_202); +x_203 = lean_ctor_get(x_197, 0); +lean_dec(x_203); +lean_inc(x_172); +x_204 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_198, x_172); +lean_ctor_set(x_197, 0, x_204); +x_1 = x_172; +x_2 = x_197; +goto _start; +} +else +{ +lean_object* x_206; lean_object* x_207; +lean_dec(x_197); +lean_inc(x_172); +x_206 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_198, x_172); +x_207 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_207, 0, x_206); +lean_ctor_set(x_207, 1, x_199); +x_1 = x_172; +x_2 = x_207; +goto _start; } } else { -lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; -lean_dec(x_128); -x_138 = lean_box(0); -lean_inc(x_108); -x_139 = l_HashMapImp_insert___at_Lean_CollectMVars_visit___spec__3(x_129, x_108, x_138); -x_140 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_140, 0, x_139); -lean_ctor_set(x_140, 1, x_130); -x_141 = l_Lean_CollectMVars_main___main(x_108, x_140); -if (x_127 == 0) -{ -lean_dec(x_109); -return x_141; -} -else -{ -x_110 = x_141; -goto block_124; +lean_dec(x_199); +lean_dec(x_198); +lean_dec(x_172); +return x_197; } } } else { -lean_dec(x_130); -lean_dec(x_129); -lean_dec(x_108); -if (x_127 == 0) +lean_object* x_209; lean_object* x_210; lean_object* x_211; +lean_dec(x_189); +lean_inc(x_171); +x_209 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_190, x_171); +x_210 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_210, 0, x_209); +lean_ctor_set(x_210, 1, x_191); +x_211 = l_Lean_CollectMVars_main___main(x_171, x_210); +if (x_175 == 0) { -lean_dec(x_109); -return x_128; +lean_dec(x_172); +return x_211; } else { -x_110 = x_128; -goto block_124; +lean_object* x_212; lean_object* x_213; uint8_t x_214; +x_212 = lean_ctor_get(x_211, 0); +lean_inc(x_212); +x_213 = lean_ctor_get(x_211, 1); +lean_inc(x_213); +x_214 = l_HashSetImp_contains___at_Lean_CollectMVars_visit___spec__1(x_212, x_172); +if (x_214 == 0) +{ +lean_object* x_215; lean_object* x_216; lean_object* x_217; +if (lean_is_exclusive(x_211)) { + lean_ctor_release(x_211, 0); + lean_ctor_release(x_211, 1); + x_215 = x_211; +} else { + lean_dec_ref(x_211); + x_215 = lean_box(0); +} +lean_inc(x_172); +x_216 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_212, x_172); +if (lean_is_scalar(x_215)) { + x_217 = lean_alloc_ctor(0, 2, 0); +} else { + x_217 = x_215; +} +lean_ctor_set(x_217, 0, x_216); +lean_ctor_set(x_217, 1, x_213); +x_1 = x_172; +x_2 = x_217; +goto _start; +} +else +{ +lean_dec(x_213); +lean_dec(x_212); +lean_dec(x_172); +return x_211; +} +} +} +} +else +{ +lean_dec(x_171); +if (x_175 == 0) +{ +lean_dec(x_191); +lean_dec(x_190); +lean_dec(x_172); +return x_189; +} +else +{ +uint8_t x_219; +x_219 = l_HashSetImp_contains___at_Lean_CollectMVars_visit___spec__1(x_190, x_172); +if (x_219 == 0) +{ +uint8_t x_220; +x_220 = !lean_is_exclusive(x_189); +if (x_220 == 0) +{ +lean_object* x_221; lean_object* x_222; lean_object* x_223; +x_221 = lean_ctor_get(x_189, 1); +lean_dec(x_221); +x_222 = lean_ctor_get(x_189, 0); +lean_dec(x_222); +lean_inc(x_172); +x_223 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_190, x_172); +lean_ctor_set(x_189, 0, x_223); +x_1 = x_172; +x_2 = x_189; +goto _start; +} +else +{ +lean_object* x_225; lean_object* x_226; +lean_dec(x_189); +lean_inc(x_172); +x_225 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_190, x_172); +x_226 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_226, 0, x_225); +lean_ctor_set(x_226, 1, x_191); +x_1 = x_172; +x_2 = x_226; +goto _start; +} +} +else +{ +lean_dec(x_191); +lean_dec(x_190); +lean_dec(x_172); +return x_189; +} } } } } case 10: { -lean_object* x_156; uint8_t x_157; -x_156 = lean_ctor_get(x_1, 1); -lean_inc(x_156); +lean_object* x_240; uint8_t x_241; +x_240 = lean_ctor_get(x_1, 1); +lean_inc(x_240); lean_dec(x_1); -x_157 = l_Lean_Expr_hasMVar(x_156); -if (x_157 == 0) +x_241 = l_Lean_Expr_hasMVar(x_240); +if (x_241 == 0) { -lean_dec(x_156); +lean_dec(x_240); return x_2; } else { -lean_object* x_158; lean_object* x_159; uint8_t x_160; -x_158 = lean_ctor_get(x_2, 0); -lean_inc(x_158); -x_159 = lean_ctor_get(x_2, 1); -lean_inc(x_159); -x_160 = l_HashMapImp_contains___at_Lean_CollectMVars_visit___spec__1(x_158, x_156); -if (x_160 == 0) +lean_object* x_242; lean_object* x_243; uint8_t x_244; +x_242 = lean_ctor_get(x_2, 0); +lean_inc(x_242); +x_243 = lean_ctor_get(x_2, 1); +lean_inc(x_243); +x_244 = l_HashSetImp_contains___at_Lean_CollectMVars_visit___spec__1(x_242, x_240); +if (x_244 == 0) { -uint8_t x_161; -x_161 = !lean_is_exclusive(x_2); -if (x_161 == 0) +uint8_t x_245; +x_245 = !lean_is_exclusive(x_2); +if (x_245 == 0) { -lean_object* x_162; lean_object* x_163; lean_object* x_164; lean_object* x_165; -x_162 = lean_ctor_get(x_2, 1); -lean_dec(x_162); -x_163 = lean_ctor_get(x_2, 0); -lean_dec(x_163); -x_164 = lean_box(0); -lean_inc(x_156); -x_165 = l_HashMapImp_insert___at_Lean_CollectMVars_visit___spec__3(x_158, x_156, x_164); -lean_ctor_set(x_2, 0, x_165); -x_1 = x_156; +lean_object* x_246; lean_object* x_247; lean_object* x_248; +x_246 = lean_ctor_get(x_2, 1); +lean_dec(x_246); +x_247 = lean_ctor_get(x_2, 0); +lean_dec(x_247); +lean_inc(x_240); +x_248 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_242, x_240); +lean_ctor_set(x_2, 0, x_248); +x_1 = x_240; goto _start; } else { -lean_object* x_167; lean_object* x_168; lean_object* x_169; +lean_object* x_250; lean_object* x_251; lean_dec(x_2); -x_167 = lean_box(0); -lean_inc(x_156); -x_168 = l_HashMapImp_insert___at_Lean_CollectMVars_visit___spec__3(x_158, x_156, x_167); -x_169 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_169, 0, x_168); -lean_ctor_set(x_169, 1, x_159); -x_1 = x_156; -x_2 = x_169; +lean_inc(x_240); +x_250 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_242, x_240); +x_251 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_251, 0, x_250); +lean_ctor_set(x_251, 1, x_243); +x_1 = x_240; +x_2 = x_251; goto _start; } } else { -lean_dec(x_159); -lean_dec(x_158); -lean_dec(x_156); +lean_dec(x_243); +lean_dec(x_242); +lean_dec(x_240); return x_2; } } } case 11: { -lean_object* x_171; uint8_t x_172; -x_171 = lean_ctor_get(x_1, 2); -lean_inc(x_171); +lean_object* x_253; uint8_t x_254; +x_253 = lean_ctor_get(x_1, 2); +lean_inc(x_253); lean_dec(x_1); -x_172 = l_Lean_Expr_hasMVar(x_171); -if (x_172 == 0) +x_254 = l_Lean_Expr_hasMVar(x_253); +if (x_254 == 0) { -lean_dec(x_171); +lean_dec(x_253); return x_2; } else { -lean_object* x_173; lean_object* x_174; uint8_t x_175; -x_173 = lean_ctor_get(x_2, 0); -lean_inc(x_173); -x_174 = lean_ctor_get(x_2, 1); -lean_inc(x_174); -x_175 = l_HashMapImp_contains___at_Lean_CollectMVars_visit___spec__1(x_173, x_171); -if (x_175 == 0) +lean_object* x_255; lean_object* x_256; uint8_t x_257; +x_255 = lean_ctor_get(x_2, 0); +lean_inc(x_255); +x_256 = lean_ctor_get(x_2, 1); +lean_inc(x_256); +x_257 = l_HashSetImp_contains___at_Lean_CollectMVars_visit___spec__1(x_255, x_253); +if (x_257 == 0) { -uint8_t x_176; -x_176 = !lean_is_exclusive(x_2); -if (x_176 == 0) +uint8_t x_258; +x_258 = !lean_is_exclusive(x_2); +if (x_258 == 0) { -lean_object* x_177; lean_object* x_178; lean_object* x_179; lean_object* x_180; -x_177 = lean_ctor_get(x_2, 1); -lean_dec(x_177); -x_178 = lean_ctor_get(x_2, 0); -lean_dec(x_178); -x_179 = lean_box(0); -lean_inc(x_171); -x_180 = l_HashMapImp_insert___at_Lean_CollectMVars_visit___spec__3(x_173, x_171, x_179); -lean_ctor_set(x_2, 0, x_180); -x_1 = x_171; +lean_object* x_259; lean_object* x_260; lean_object* x_261; +x_259 = lean_ctor_get(x_2, 1); +lean_dec(x_259); +x_260 = lean_ctor_get(x_2, 0); +lean_dec(x_260); +lean_inc(x_253); +x_261 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_255, x_253); +lean_ctor_set(x_2, 0, x_261); +x_1 = x_253; goto _start; } else { -lean_object* x_182; lean_object* x_183; lean_object* x_184; +lean_object* x_263; lean_object* x_264; lean_dec(x_2); -x_182 = lean_box(0); -lean_inc(x_171); -x_183 = l_HashMapImp_insert___at_Lean_CollectMVars_visit___spec__3(x_173, x_171, x_182); -x_184 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_184, 0, x_183); -lean_ctor_set(x_184, 1, x_174); -x_1 = x_171; -x_2 = x_184; +lean_inc(x_253); +x_263 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_255, x_253); +x_264 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_264, 0, x_263); +lean_ctor_set(x_264, 1, x_256); +x_1 = x_253; +x_2 = x_264; goto _start; } } else { -lean_dec(x_174); -lean_dec(x_173); -lean_dec(x_171); +lean_dec(x_256); +lean_dec(x_255); +lean_dec(x_253); return x_2; } } @@ -1407,37 +1797,35 @@ x_4 = lean_ctor_get(x_1, 0); lean_inc(x_4); x_5 = lean_ctor_get(x_1, 1); lean_inc(x_5); -x_6 = l_HashMapImp_contains___at_Lean_CollectMVars_visit___spec__1(x_4, x_2); +x_6 = l_HashSetImp_contains___at_Lean_CollectMVars_visit___spec__1(x_4, x_2); if (x_6 == 0) { uint8_t x_7; x_7 = !lean_is_exclusive(x_1); if (x_7 == 0) { -lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; x_8 = lean_ctor_get(x_1, 1); lean_dec(x_8); x_9 = lean_ctor_get(x_1, 0); lean_dec(x_9); -x_10 = lean_box(0); lean_inc(x_2); -x_11 = l_HashMapImp_insert___at_Lean_CollectMVars_visit___spec__3(x_4, x_2, x_10); -lean_ctor_set(x_1, 0, x_11); -x_12 = l_Lean_CollectMVars_main___main(x_2, x_1); -return x_12; +x_10 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_4, x_2); +lean_ctor_set(x_1, 0, x_10); +x_11 = l_Lean_CollectMVars_main___main(x_2, x_1); +return x_11; } else { -lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_dec(x_1); -x_13 = lean_box(0); lean_inc(x_2); -x_14 = l_HashMapImp_insert___at_Lean_CollectMVars_visit___spec__3(x_4, x_2, x_13); -x_15 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_15, 0, x_14); -lean_ctor_set(x_15, 1, x_5); -x_16 = l_Lean_CollectMVars_main___main(x_2, x_15); -return x_16; +x_12 = l_HashSetImp_insert___at_Lean_CollectMVars_visit___spec__3(x_4, x_2); +x_13 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_13, 0, x_12); +lean_ctor_set(x_13, 1, x_5); +x_14 = l_Lean_CollectMVars_main___main(x_2, x_13); +return x_14; } } else diff --git a/stage0/stdlib/Init/ShareCommon.c b/stage0/stdlib/Init/ShareCommon.c index 8148f06820..2340df94dd 100644 --- a/stage0/stdlib/Init/ShareCommon.c +++ b/stage0/stdlib/Init/ShareCommon.c @@ -14,11 +14,11 @@ extern "C" { #endif lean_object* l_PersistentHashMap_findAux___main___at_ShareCommon_ObjectPersistentMap_find_x3f___spec__2(lean_object*, size_t, lean_object*); -lean_object* l_HashMapImp_findEntry_x3f___at_ShareCommon_ObjectSet_find_x3f___spec__1(lean_object*, lean_object*); size_t l_USize_add(size_t, size_t); lean_object* l_PersistentHashMap_findEntryAux___main___at_ShareCommon_ObjectPersistentSet_find_x3f___spec__2___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_shareCommon(lean_object*); lean_object* l_ShareCommon_mkPersistentState___boxed(lean_object*); +lean_object* l_mkHashSetImp___rarg(lean_object*); lean_object* l_PersistentHashMap_empty___at_ShareCommon_mkObjectPersistentSet___spec__1___closed__3; lean_object* l_ShareCommon_PersistentState_shareCommon___boxed(lean_object*, lean_object*, lean_object*); lean_object* lean_sharecommon_mk_pstate(lean_object*); @@ -37,6 +37,8 @@ lean_object* lean_object_map_insert(lean_object*, lean_object*, lean_object*); size_t l_USize_sub(size_t, size_t); lean_object* l_PersistentHashMap_empty___at_ShareCommon_mkObjectPersistentSet___spec__1; lean_object* l_PShareCommonT_run___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_HashSetImp_find_x3f___at_ShareCommon_ObjectSet_find_x3f___spec__1(lean_object*, lean_object*); +lean_object* l_HashSetImp_moveEntries___main___at_ShareCommon_ObjectSet_insert___spec__4(lean_object*, lean_object*, lean_object*); lean_object* l_ShareCommon_State_shareCommon___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_ShareCommon_PersistentState_inhabited; lean_object* l_PShareCommonT_withShareCommon(lean_object*); @@ -44,6 +46,7 @@ lean_object* l_shareCommonM(lean_object*, lean_object*); lean_object* l_ShareCommonT_monadShareCommon(lean_object*); lean_object* lean_array_push(lean_object*, lean_object*); lean_object* lean_array_get_size(lean_object*); +lean_object* l_List_find_x3f___main___rarg(lean_object*, lean_object*); lean_object* l_shareCommon___rarg(lean_object*); lean_object* l_ShareCommon_Object_ptrEq___boxed(lean_object*, lean_object*); lean_object* l_PersistentHashMap_findEntry_x3f___at_ShareCommon_ObjectPersistentSet_find_x3f___spec__1___boxed(lean_object*, lean_object*); @@ -56,18 +59,17 @@ lean_object* l_PersistentHashMap_findEntryAtAux___main___at_ShareCommon_ObjectPe lean_object* lean_nat_add(lean_object*, lean_object*); lean_object* lean_object_set_insert(lean_object*, lean_object*); lean_object* l_ShareCommon_PersistentState_empty___closed__1; -lean_object* l_HashMapImp_insert___at_ShareCommon_ObjectSet_insert___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_ShareCommonT_withShareCommon___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_PShareCommonT_monadShareCommon___rarg(lean_object*); lean_object* l_HashMapImp_expand___at_ShareCommon_ObjectMap_insert___spec__3(lean_object*, lean_object*); lean_object* l_PersistentHashMap_empty___at_ShareCommon_mkObjectPersistentSet___spec__1___closed__2; lean_object* l_Array_iterateMAux___main___at_ShareCommon_ObjectPersistentSet_insert___spec__4(size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_fget(lean_object*, lean_object*); +uint8_t l_List_elem___main___at_ShareCommon_ObjectSet_insert___spec__2(lean_object*, lean_object*); lean_object* l_ShareCommonT_run___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_ShareCommon_mkObjectSet___closed__1; lean_object* l_AssocList_find_x3f___main___at_ShareCommon_ObjectMap_find_x3f___spec__2___boxed(lean_object*, lean_object*); lean_object* l_PersistentHashMap_insert___at_ShareCommon_ObjectPersistentSet_insert___spec__1(lean_object*, lean_object*, lean_object*); -lean_object* l_HashMapImp_moveEntries___main___at_ShareCommon_ObjectSet_insert___spec__4(lean_object*, lean_object*, lean_object*); lean_object* l_HashMapImp_moveEntries___main___at_ShareCommon_ObjectMap_insert___spec__4(lean_object*, lean_object*, lean_object*); lean_object* l_ShareCommon_PersistentState_empty; lean_object* l_ShareCommon_StatePointed; @@ -76,12 +78,15 @@ lean_object* lean_sharecommon_mk_state(lean_object*); lean_object* l_PersistentHashMap_insertAux___main___at_ShareCommon_ObjectPersistentSet_insert___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_ShareCommon_Object_eq___boxed(lean_object*, lean_object*); lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); +lean_object* l_List_foldl___main___at_ShareCommon_ObjectSet_insert___spec__5(lean_object*, lean_object*); lean_object* lean_mk_object_map(lean_object*); lean_object* l_ShareCommonT_withShareCommon___at_shareCommon___spec__1(lean_object*); lean_object* lean_persistent_state_sharecommon(lean_object*, lean_object*); lean_object* l_PersistentHashMap_find_x3f___at_ShareCommon_ObjectPersistentMap_find_x3f___spec__1(lean_object*, lean_object*); +lean_object* l_List_replace___main___at_ShareCommon_ObjectSet_insert___spec__6___boxed(lean_object*, lean_object*, lean_object*); lean_object* lean_mk_object_pmap(lean_object*); extern lean_object* l_PersistentHashMap_insertAux___main___rarg___closed__3; +lean_object* l_HashSetImp_insert___at_ShareCommon_ObjectSet_insert___spec__1(lean_object*, lean_object*); lean_object* l_AssocList_replace___main___at_ShareCommon_ObjectMap_insert___spec__6(lean_object*, lean_object*, lean_object*); size_t lean_usize_modn(size_t, lean_object*); lean_object* l_PShareCommonT_monadShareCommon(lean_object*); @@ -92,7 +97,6 @@ size_t l_USize_mul(size_t, size_t); lean_object* l_mkHashMapImp___rarg(lean_object*); lean_object* lean_object_pset_insert(lean_object*, lean_object*); lean_object* l_PersistentHashMap_findEntry_x3f___at_ShareCommon_ObjectPersistentSet_find_x3f___spec__1(lean_object*, lean_object*); -lean_object* l_AssocList_replace___main___at_ShareCommon_ObjectSet_insert___spec__6(lean_object*, lean_object*, lean_object*); lean_object* l_PShareCommonT_run(lean_object*); lean_object* l_PersistentHashMap_findAux___main___at_ShareCommon_ObjectPersistentMap_find_x3f___spec__2___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_empty___at_ShareCommon_mkObjectPersistentSet___spec__1___closed__1; @@ -104,6 +108,7 @@ lean_object* l_ShareCommonT_monadShareCommon___rarg(lean_object*); lean_object* l_PersistentHashMap_empty___at_ShareCommon_mkObjectPersistentMap___spec__1; lean_object* l_ShareCommonT_withShareCommon___at_shareCommon___spec__1___rarg(lean_object*, lean_object*); lean_object* l_ShareCommonT_withShareCommon(lean_object*); +lean_object* l_HashSetImp_expand___at_ShareCommon_ObjectSet_insert___spec__3(lean_object*, lean_object*); size_t lean_ptr_addr(lean_object*); lean_object* lean_object_set_find(lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at_ShareCommon_ObjectPersistentSet_insert___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -116,34 +121,29 @@ uint8_t lean_nat_dec_le(lean_object*, lean_object*); uint8_t l_USize_decLe(size_t, size_t); lean_object* l_mkHashSet___at_ShareCommon_mkObjectSet___spec__1(lean_object*); lean_object* l_PersistentHashMap_findEntryAtAux___main___at_ShareCommon_ObjectPersistentSet_find_x3f___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_HashMapImp_expand___at_ShareCommon_ObjectSet_insert___spec__3(lean_object*, lean_object*); lean_object* l_AssocList_foldlM___main___at_ShareCommon_ObjectMap_insert___spec__5(lean_object*, lean_object*); -lean_object* l_HashMapImp_findEntry_x3f___at_ShareCommon_ObjectSet_find_x3f___spec__1___boxed(lean_object*, lean_object*); uint8_t l_AssocList_contains___main___at_ShareCommon_ObjectMap_insert___spec__2(lean_object*, lean_object*); -lean_object* l_AssocList_foldlM___main___at_ShareCommon_ObjectSet_insert___spec__5(lean_object*, lean_object*); lean_object* l_PersistentHashMap_insertAux___main___at_ShareCommon_ObjectPersistentMap_insert___spec__2(lean_object*, size_t, size_t, lean_object*, lean_object*); lean_object* l_AssocList_contains___main___at_ShareCommon_ObjectMap_insert___spec__2___boxed(lean_object*, lean_object*); lean_object* l_PersistentHashMap_findAtAux___main___at_ShareCommon_ObjectPersistentMap_find_x3f___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_HashMapImp_find_x3f___at_ShareCommon_ObjectMap_find_x3f___spec__1(lean_object*, lean_object*); lean_object* lean_nat_mul(lean_object*, lean_object*); -lean_object* l_mkHashMap___at_ShareCommon_mkObjectSet___spec__2(lean_object*); uint8_t lean_sharecommon_eq(lean_object*, lean_object*); -lean_object* l_AssocList_contains___main___at_ShareCommon_ObjectSet_insert___spec__2___boxed(lean_object*, lean_object*); lean_object* l_PersistentHashMap_getCollisionNodeSize___rarg(lean_object*); lean_object* lean_mk_array(lean_object*, lean_object*); +lean_object* l_HashSetImp_find_x3f___at_ShareCommon_ObjectSet_find_x3f___spec__1___boxed(lean_object*, lean_object*); +lean_object* l_List_elem___main___at_ShareCommon_ObjectSet_insert___spec__2___boxed(lean_object*, lean_object*); size_t lean_sharecommon_hash(lean_object*); lean_object* l_PersistentHashMap_empty___at_ShareCommon_mkObjectPersistentMap___spec__1___closed__2; lean_object* l_ShareCommon_Object_hash___boxed(lean_object*); -lean_object* l_AssocList_findEntry_x3f___main___at_ShareCommon_ObjectSet_find_x3f___spec__2___boxed(lean_object*, lean_object*); lean_object* l_PersistentHashMap_insertAux___main___at_ShareCommon_ObjectPersistentSet_insert___spec__2(lean_object*, size_t, size_t, lean_object*, lean_object*); lean_object* l_PersistentHashMap_empty___at_ShareCommon_mkObjectPersistentMap___spec__1___closed__1; lean_object* l_ShareCommon_State_empty; lean_object* l_HashMapImp_insert___at_ShareCommon_ObjectMap_insert___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_empty___at_ShareCommon_mkObjectPersistentMap___spec__1___closed__3; -lean_object* l_AssocList_findEntry_x3f___main___at_ShareCommon_ObjectSet_find_x3f___spec__2(lean_object*, lean_object*); +lean_object* l_List_replace___main___at_ShareCommon_ObjectSet_insert___spec__6(lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_insertAtCollisionNodeAux___main___at_ShareCommon_ObjectPersistentMap_insert___spec__3(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_object_map_find(lean_object*, lean_object*); -uint8_t l_AssocList_contains___main___at_ShareCommon_ObjectSet_insert___spec__2(lean_object*, lean_object*); lean_object* lean_usize_to_nat(size_t); lean_object* lean_state_sharecommon(lean_object*, lean_object*); lean_object* lean_object_pset_find(lean_object*, lean_object*); @@ -665,19 +665,11 @@ x_4 = lean_box(x_3); return x_4; } } -lean_object* l_mkHashMap___at_ShareCommon_mkObjectSet___spec__2(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_mkHashMapImp___rarg(x_1); -return x_2; -} -} lean_object* l_mkHashSet___at_ShareCommon_mkObjectSet___spec__1(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = l_mkHashMapImp___rarg(x_1); +x_2 = l_mkHashSetImp___rarg(x_1); return x_2; } } @@ -686,7 +678,7 @@ _start: { lean_object* x_1; lean_object* x_2; x_1 = lean_unsigned_to_nat(1024u); -x_2 = l_mkHashMapImp___rarg(x_1); +x_2 = l_mkHashSetImp___rarg(x_1); return x_2; } } @@ -699,121 +691,41 @@ x_2 = l_ShareCommon_mkObjectSet___closed__1; return x_2; } } -lean_object* l_AssocList_findEntry_x3f___main___at_ShareCommon_ObjectSet_find_x3f___spec__2(lean_object* x_1, lean_object* x_2) { +lean_object* l_HashSetImp_find_x3f___at_ShareCommon_ObjectSet_find_x3f___spec__1(lean_object* x_1, lean_object* x_2) { _start: { -if (lean_obj_tag(x_2) == 0) -{ -lean_object* x_3; -x_3 = lean_box(0); -return x_3; -} -else -{ -lean_object* x_4; lean_object* x_5; lean_object* x_6; uint8_t x_7; -x_4 = lean_ctor_get(x_2, 0); -x_5 = lean_ctor_get(x_2, 1); -x_6 = lean_ctor_get(x_2, 2); -x_7 = lean_sharecommon_eq(x_4, x_1); -if (x_7 == 0) -{ -x_2 = x_6; -goto _start; -} -else -{ -lean_object* x_9; lean_object* x_10; -lean_inc(x_5); -lean_inc(x_4); -x_9 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_9, 0, x_4); -lean_ctor_set(x_9, 1, x_5); -x_10 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_10, 0, x_9); -return x_10; -} -} -} -} -lean_object* l_HashMapImp_findEntry_x3f___at_ShareCommon_ObjectSet_find_x3f___spec__1(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; lean_object* x_4; size_t x_5; size_t x_6; lean_object* x_7; lean_object* x_8; +lean_object* x_3; lean_object* x_4; size_t x_5; size_t x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; x_3 = lean_ctor_get(x_1, 1); x_4 = lean_array_get_size(x_3); x_5 = lean_sharecommon_hash(x_2); x_6 = lean_usize_modn(x_5, x_4); lean_dec(x_4); -x_7 = lean_array_uget(x_3, x_6); -x_8 = l_AssocList_findEntry_x3f___main___at_ShareCommon_ObjectSet_find_x3f___spec__2(x_2, x_7); -lean_dec(x_7); -return x_8; +x_7 = lean_alloc_closure((void*)(l_ShareCommon_Object_eq___boxed), 2, 1); +lean_closure_set(x_7, 0, x_2); +x_8 = lean_array_uget(x_3, x_6); +x_9 = l_List_find_x3f___main___rarg(x_7, x_8); +return x_9; } } lean_object* lean_object_set_find(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; -x_3 = l_HashMapImp_findEntry_x3f___at_ShareCommon_ObjectSet_find_x3f___spec__1(x_1, x_2); -lean_dec(x_2); +x_3 = l_HashSetImp_find_x3f___at_ShareCommon_ObjectSet_find_x3f___spec__1(x_1, x_2); lean_dec(x_1); -if (lean_obj_tag(x_3) == 0) -{ -lean_object* x_4; -x_4 = lean_box(0); -return x_4; -} -else -{ -uint8_t x_5; -x_5 = !lean_is_exclusive(x_3); -if (x_5 == 0) -{ -lean_object* x_6; lean_object* x_7; -x_6 = lean_ctor_get(x_3, 0); -x_7 = lean_ctor_get(x_6, 0); -lean_inc(x_7); -lean_dec(x_6); -lean_ctor_set(x_3, 0, x_7); return x_3; } -else -{ -lean_object* x_8; lean_object* x_9; lean_object* x_10; -x_8 = lean_ctor_get(x_3, 0); -lean_inc(x_8); -lean_dec(x_3); -x_9 = lean_ctor_get(x_8, 0); -lean_inc(x_9); -lean_dec(x_8); -x_10 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_10, 0, x_9); -return x_10; } -} -} -} -lean_object* l_AssocList_findEntry_x3f___main___at_ShareCommon_ObjectSet_find_x3f___spec__2___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l_HashSetImp_find_x3f___at_ShareCommon_ObjectSet_find_x3f___spec__1___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; -x_3 = l_AssocList_findEntry_x3f___main___at_ShareCommon_ObjectSet_find_x3f___spec__2(x_1, x_2); -lean_dec(x_2); +x_3 = l_HashSetImp_find_x3f___at_ShareCommon_ObjectSet_find_x3f___spec__1(x_1, x_2); lean_dec(x_1); return x_3; } } -lean_object* l_HashMapImp_findEntry_x3f___at_ShareCommon_ObjectSet_find_x3f___spec__1___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_HashMapImp_findEntry_x3f___at_ShareCommon_ObjectSet_find_x3f___spec__1(x_1, x_2); -lean_dec(x_2); -lean_dec(x_1); -return x_3; -} -} -uint8_t l_AssocList_contains___main___at_ShareCommon_ObjectSet_insert___spec__2(lean_object* x_1, lean_object* x_2) { +uint8_t l_List_elem___main___at_ShareCommon_ObjectSet_insert___spec__2(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) @@ -826,8 +738,8 @@ else { lean_object* x_4; lean_object* x_5; uint8_t x_6; x_4 = lean_ctor_get(x_2, 0); -x_5 = lean_ctor_get(x_2, 2); -x_6 = lean_sharecommon_eq(x_4, x_1); +x_5 = lean_ctor_get(x_2, 1); +x_6 = lean_sharecommon_eq(x_1, x_4); if (x_6 == 0) { x_2 = x_5; @@ -842,7 +754,7 @@ return x_8; } } } -lean_object* l_AssocList_foldlM___main___at_ShareCommon_ObjectSet_insert___spec__5(lean_object* x_1, lean_object* x_2) { +lean_object* l_List_foldl___main___at_ShareCommon_ObjectSet_insert___spec__5(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) @@ -857,13 +769,13 @@ if (x_3 == 0) { lean_object* x_4; lean_object* x_5; lean_object* x_6; size_t x_7; size_t x_8; lean_object* x_9; lean_object* x_10; x_4 = lean_ctor_get(x_2, 0); -x_5 = lean_ctor_get(x_2, 2); +x_5 = lean_ctor_get(x_2, 1); x_6 = lean_array_get_size(x_1); x_7 = lean_sharecommon_hash(x_4); x_8 = lean_usize_modn(x_7, x_6); lean_dec(x_6); x_9 = lean_array_uget(x_1, x_8); -lean_ctor_set(x_2, 2, x_9); +lean_ctor_set(x_2, 1, x_9); x_10 = lean_array_uset(x_1, x_8, x_2); x_1 = x_10; x_2 = x_5; @@ -871,32 +783,29 @@ goto _start; } else { -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; size_t x_16; size_t x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; +lean_object* x_12; lean_object* x_13; lean_object* x_14; size_t x_15; size_t x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; x_12 = lean_ctor_get(x_2, 0); x_13 = lean_ctor_get(x_2, 1); -x_14 = lean_ctor_get(x_2, 2); -lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_dec(x_2); -x_15 = lean_array_get_size(x_1); -x_16 = lean_sharecommon_hash(x_12); -x_17 = lean_usize_modn(x_16, x_15); -lean_dec(x_15); -x_18 = lean_array_uget(x_1, x_17); -x_19 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_19, 0, x_12); -lean_ctor_set(x_19, 1, x_13); -lean_ctor_set(x_19, 2, x_18); -x_20 = lean_array_uset(x_1, x_17, x_19); -x_1 = x_20; -x_2 = x_14; +x_14 = lean_array_get_size(x_1); +x_15 = lean_sharecommon_hash(x_12); +x_16 = lean_usize_modn(x_15, x_14); +lean_dec(x_14); +x_17 = lean_array_uget(x_1, x_16); +x_18 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_18, 0, x_12); +lean_ctor_set(x_18, 1, x_17); +x_19 = lean_array_uset(x_1, x_16, x_18); +x_1 = x_19; +x_2 = x_13; goto _start; } } } } -lean_object* l_HashMapImp_moveEntries___main___at_ShareCommon_ObjectSet_insert___spec__4(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_HashSetImp_moveEntries___main___at_ShareCommon_ObjectSet_insert___spec__4(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; uint8_t x_5; @@ -915,7 +824,7 @@ lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_obj x_6 = lean_array_fget(x_2, x_1); x_7 = lean_box(0); x_8 = lean_array_fset(x_2, x_1, x_7); -x_9 = l_AssocList_foldlM___main___at_ShareCommon_ObjectSet_insert___spec__5(x_3, x_6); +x_9 = l_List_foldl___main___at_ShareCommon_ObjectSet_insert___spec__5(x_3, x_6); x_10 = lean_unsigned_to_nat(1u); x_11 = lean_nat_add(x_1, x_10); lean_dec(x_1); @@ -926,7 +835,7 @@ goto _start; } } } -lean_object* l_HashMapImp_expand___at_ShareCommon_ObjectSet_insert___spec__3(lean_object* x_1, lean_object* x_2) { +lean_object* l_HashSetImp_expand___at_ShareCommon_ObjectSet_insert___spec__3(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; @@ -937,188 +846,181 @@ lean_dec(x_3); x_6 = lean_box(0); x_7 = lean_mk_array(x_5, x_6); x_8 = lean_unsigned_to_nat(0u); -x_9 = l_HashMapImp_moveEntries___main___at_ShareCommon_ObjectSet_insert___spec__4(x_8, x_2, x_7); +x_9 = l_HashSetImp_moveEntries___main___at_ShareCommon_ObjectSet_insert___spec__4(x_8, x_2, x_7); x_10 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_10, 0, x_1); lean_ctor_set(x_10, 1, x_9); return x_10; } } -lean_object* l_AssocList_replace___main___at_ShareCommon_ObjectSet_insert___spec__6(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_List_replace___main___at_ShareCommon_ObjectSet_insert___spec__6(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { -if (lean_obj_tag(x_3) == 0) +if (lean_obj_tag(x_1) == 0) { -lean_dec(x_2); -lean_dec(x_1); -return x_3; -} -else -{ -uint8_t x_4; -x_4 = !lean_is_exclusive(x_3); -if (x_4 == 0) -{ -lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8; -x_5 = lean_ctor_get(x_3, 0); -x_6 = lean_ctor_get(x_3, 1); -x_7 = lean_ctor_get(x_3, 2); -x_8 = lean_sharecommon_eq(x_5, x_1); -if (x_8 == 0) -{ -lean_object* x_9; -x_9 = l_AssocList_replace___main___at_ShareCommon_ObjectSet_insert___spec__6(x_1, x_2, x_7); -lean_ctor_set(x_3, 2, x_9); -return x_3; -} -else -{ -lean_dec(x_6); -lean_dec(x_5); -lean_ctor_set(x_3, 1, x_2); -lean_ctor_set(x_3, 0, x_1); -return x_3; -} -} -else -{ -lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; -x_10 = lean_ctor_get(x_3, 0); -x_11 = lean_ctor_get(x_3, 1); -x_12 = lean_ctor_get(x_3, 2); -lean_inc(x_12); -lean_inc(x_11); -lean_inc(x_10); lean_dec(x_3); -x_13 = lean_sharecommon_eq(x_10, x_1); -if (x_13 == 0) -{ -lean_object* x_14; lean_object* x_15; -x_14 = l_AssocList_replace___main___at_ShareCommon_ObjectSet_insert___spec__6(x_1, x_2, x_12); -x_15 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_15, 0, x_10); -lean_ctor_set(x_15, 1, x_11); -lean_ctor_set(x_15, 2, x_14); -return x_15; +return x_1; } else { -lean_object* x_16; -lean_dec(x_11); -lean_dec(x_10); -x_16 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_16, 0, x_1); -lean_ctor_set(x_16, 1, x_2); -lean_ctor_set(x_16, 2, x_12); -return x_16; -} -} -} -} -} -lean_object* l_HashMapImp_insert___at_ShareCommon_ObjectSet_insert___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ uint8_t x_4; x_4 = !lean_is_exclusive(x_1); if (x_4 == 0) { -lean_object* x_5; lean_object* x_6; lean_object* x_7; size_t x_8; size_t x_9; lean_object* x_10; uint8_t x_11; +lean_object* x_5; lean_object* x_6; uint8_t x_7; x_5 = lean_ctor_get(x_1, 0); x_6 = lean_ctor_get(x_1, 1); -x_7 = lean_array_get_size(x_6); -x_8 = lean_sharecommon_hash(x_2); -x_9 = lean_usize_modn(x_8, x_7); -x_10 = lean_array_uget(x_6, x_9); -x_11 = l_AssocList_contains___main___at_ShareCommon_ObjectSet_insert___spec__2(x_2, x_10); +x_7 = lean_sharecommon_eq(x_5, x_2); +if (x_7 == 0) +{ +lean_object* x_8; +x_8 = l_List_replace___main___at_ShareCommon_ObjectSet_insert___spec__6(x_6, x_2, x_3); +lean_ctor_set(x_1, 1, x_8); +return x_1; +} +else +{ +lean_dec(x_5); +lean_ctor_set(x_1, 0, x_3); +return x_1; +} +} +else +{ +lean_object* x_9; lean_object* x_10; uint8_t x_11; +x_9 = lean_ctor_get(x_1, 0); +x_10 = lean_ctor_get(x_1, 1); +lean_inc(x_10); +lean_inc(x_9); +lean_dec(x_1); +x_11 = lean_sharecommon_eq(x_9, x_2); if (x_11 == 0) { -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; -x_12 = lean_unsigned_to_nat(1u); -x_13 = lean_nat_add(x_5, x_12); -lean_dec(x_5); -x_14 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_14, 0, x_2); -lean_ctor_set(x_14, 1, x_3); -lean_ctor_set(x_14, 2, x_10); -x_15 = lean_array_uset(x_6, x_9, x_14); -x_16 = lean_nat_dec_le(x_13, x_7); -lean_dec(x_7); -if (x_16 == 0) +lean_object* x_12; lean_object* x_13; +x_12 = l_List_replace___main___at_ShareCommon_ObjectSet_insert___spec__6(x_10, x_2, x_3); +x_13 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_13, 0, x_9); +lean_ctor_set(x_13, 1, x_12); +return x_13; +} +else { -lean_object* x_17; +lean_object* x_14; +lean_dec(x_9); +x_14 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_14, 0, x_3); +lean_ctor_set(x_14, 1, x_10); +return x_14; +} +} +} +} +} +lean_object* l_HashSetImp_insert___at_ShareCommon_ObjectSet_insert___spec__1(lean_object* x_1, lean_object* x_2) { +_start: +{ +uint8_t x_3; +x_3 = !lean_is_exclusive(x_1); +if (x_3 == 0) +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; size_t x_7; size_t x_8; lean_object* x_9; uint8_t x_10; +x_4 = lean_ctor_get(x_1, 0); +x_5 = lean_ctor_get(x_1, 1); +x_6 = lean_array_get_size(x_5); +x_7 = lean_sharecommon_hash(x_2); +x_8 = lean_usize_modn(x_7, x_6); +x_9 = lean_array_uget(x_5, x_8); +x_10 = l_List_elem___main___at_ShareCommon_ObjectSet_insert___spec__2(x_2, x_9); +if (x_10 == 0) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; uint8_t x_15; +x_11 = lean_unsigned_to_nat(1u); +x_12 = lean_nat_add(x_4, x_11); +lean_dec(x_4); +x_13 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_13, 0, x_2); +lean_ctor_set(x_13, 1, x_9); +x_14 = lean_array_uset(x_5, x_8, x_13); +x_15 = lean_nat_dec_le(x_12, x_6); +lean_dec(x_6); +if (x_15 == 0) +{ +lean_object* x_16; lean_free_object(x_1); -x_17 = l_HashMapImp_expand___at_ShareCommon_ObjectSet_insert___spec__3(x_13, x_15); -return x_17; +x_16 = l_HashSetImp_expand___at_ShareCommon_ObjectSet_insert___spec__3(x_12, x_14); +return x_16; } else { -lean_ctor_set(x_1, 1, x_15); -lean_ctor_set(x_1, 0, x_13); +lean_ctor_set(x_1, 1, x_14); +lean_ctor_set(x_1, 0, x_12); return x_1; } } else { -lean_object* x_18; lean_object* x_19; -lean_dec(x_7); -x_18 = l_AssocList_replace___main___at_ShareCommon_ObjectSet_insert___spec__6(x_2, x_3, x_10); -x_19 = lean_array_uset(x_6, x_9, x_18); -lean_ctor_set(x_1, 1, x_19); +lean_object* x_17; lean_object* x_18; +lean_dec(x_6); +lean_inc(x_2); +x_17 = l_List_replace___main___at_ShareCommon_ObjectSet_insert___spec__6(x_9, x_2, x_2); +lean_dec(x_2); +x_18 = lean_array_uset(x_5, x_8, x_17); +lean_ctor_set(x_1, 1, x_18); return x_1; } } else { -lean_object* x_20; lean_object* x_21; lean_object* x_22; size_t x_23; size_t x_24; lean_object* x_25; uint8_t x_26; -x_20 = lean_ctor_get(x_1, 0); -x_21 = lean_ctor_get(x_1, 1); -lean_inc(x_21); +lean_object* x_19; lean_object* x_20; lean_object* x_21; size_t x_22; size_t x_23; lean_object* x_24; uint8_t x_25; +x_19 = lean_ctor_get(x_1, 0); +x_20 = lean_ctor_get(x_1, 1); lean_inc(x_20); +lean_inc(x_19); lean_dec(x_1); -x_22 = lean_array_get_size(x_21); -x_23 = lean_sharecommon_hash(x_2); -x_24 = lean_usize_modn(x_23, x_22); -x_25 = lean_array_uget(x_21, x_24); -x_26 = l_AssocList_contains___main___at_ShareCommon_ObjectSet_insert___spec__2(x_2, x_25); -if (x_26 == 0) +x_21 = lean_array_get_size(x_20); +x_22 = lean_sharecommon_hash(x_2); +x_23 = lean_usize_modn(x_22, x_21); +x_24 = lean_array_uget(x_20, x_23); +x_25 = l_List_elem___main___at_ShareCommon_ObjectSet_insert___spec__2(x_2, x_24); +if (x_25 == 0) { -lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; uint8_t x_31; -x_27 = lean_unsigned_to_nat(1u); -x_28 = lean_nat_add(x_20, x_27); -lean_dec(x_20); -x_29 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_29, 0, x_2); -lean_ctor_set(x_29, 1, x_3); -lean_ctor_set(x_29, 2, x_25); -x_30 = lean_array_uset(x_21, x_24, x_29); -x_31 = lean_nat_dec_le(x_28, x_22); -lean_dec(x_22); -if (x_31 == 0) +lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; uint8_t x_30; +x_26 = lean_unsigned_to_nat(1u); +x_27 = lean_nat_add(x_19, x_26); +lean_dec(x_19); +x_28 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_28, 0, x_2); +lean_ctor_set(x_28, 1, x_24); +x_29 = lean_array_uset(x_20, x_23, x_28); +x_30 = lean_nat_dec_le(x_27, x_21); +lean_dec(x_21); +if (x_30 == 0) +{ +lean_object* x_31; +x_31 = l_HashSetImp_expand___at_ShareCommon_ObjectSet_insert___spec__3(x_27, x_29); +return x_31; +} +else { lean_object* x_32; -x_32 = l_HashMapImp_expand___at_ShareCommon_ObjectSet_insert___spec__3(x_28, x_30); +x_32 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_32, 0, x_27); +lean_ctor_set(x_32, 1, x_29); return x_32; } -else -{ -lean_object* x_33; -x_33 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_33, 0, x_28); -lean_ctor_set(x_33, 1, x_30); -return x_33; -} } else { -lean_object* x_34; lean_object* x_35; lean_object* x_36; -lean_dec(x_22); -x_34 = l_AssocList_replace___main___at_ShareCommon_ObjectSet_insert___spec__6(x_2, x_3, x_25); -x_35 = lean_array_uset(x_21, x_24, x_34); -x_36 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_36, 0, x_20); -lean_ctor_set(x_36, 1, x_35); -return x_36; +lean_object* x_33; lean_object* x_34; lean_object* x_35; +lean_dec(x_21); +lean_inc(x_2); +x_33 = l_List_replace___main___at_ShareCommon_ObjectSet_insert___spec__6(x_24, x_2, x_2); +lean_dec(x_2); +x_34 = lean_array_uset(x_20, x_23, x_33); +x_35 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_35, 0, x_19); +lean_ctor_set(x_35, 1, x_34); +return x_35; } } } @@ -1126,23 +1028,31 @@ return x_36; lean_object* lean_object_set_insert(lean_object* x_1, lean_object* x_2) { _start: { -lean_object* x_3; lean_object* x_4; -x_3 = lean_box(0); -x_4 = l_HashMapImp_insert___at_ShareCommon_ObjectSet_insert___spec__1(x_1, x_2, x_3); -return x_4; +lean_object* x_3; +x_3 = l_HashSetImp_insert___at_ShareCommon_ObjectSet_insert___spec__1(x_1, x_2); +return x_3; } } -lean_object* l_AssocList_contains___main___at_ShareCommon_ObjectSet_insert___spec__2___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l_List_elem___main___at_ShareCommon_ObjectSet_insert___spec__2___boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; -x_3 = l_AssocList_contains___main___at_ShareCommon_ObjectSet_insert___spec__2(x_1, x_2); +x_3 = l_List_elem___main___at_ShareCommon_ObjectSet_insert___spec__2(x_1, x_2); lean_dec(x_2); lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } } +lean_object* l_List_replace___main___at_ShareCommon_ObjectSet_insert___spec__6___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_List_replace___main___at_ShareCommon_ObjectSet_insert___spec__6(x_1, x_2, x_3); +lean_dec(x_2); +return x_4; +} +} lean_object* _init_l_PersistentHashMap_empty___at_ShareCommon_mkObjectPersistentMap___spec__1___closed__1() { _start: { diff --git a/stage0/stdlib/Init/Util.c b/stage0/stdlib/Init/Util.c index 1821ba3367..d39bb26b1c 100644 --- a/stage0/stdlib/Init/Util.c +++ b/stage0/stdlib/Init/Util.c @@ -25,12 +25,17 @@ lean_object* l_withPtrEq___rarg(lean_object*, lean_object*); lean_object* l_withPtrEqUnsafe(lean_object*); lean_object* l___private_Init_Util_1__mkPanicMessage(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_dbg_trace(lean_object*, lean_object*); +lean_object* l_withPtrEqResult(lean_object*, lean_object*, lean_object*); lean_object* lean_string_append(lean_object*, lean_object*); lean_object* l_withPtrEqDecEq___rarg___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_withPtrEq___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_unreachable_x21___rarg___closed__2; +lean_object* l_withPtrEqResult___rarg___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_withPtrEqResultUnsafe(lean_object*, lean_object*, lean_object*); lean_object* l_withPtrEqDecEq(lean_object*); +lean_object* l_withPtrEqResultUnsafe___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_panicWithPos___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_withPtrEqResultUnsafe___rarg___boxed(lean_object*, lean_object*, lean_object*); lean_object* lean_dbg_sleep(uint32_t, lean_object*); lean_object* l_Nat_repr(lean_object*); lean_object* l_withPtrAddr___boxed(lean_object*, lean_object*, lean_object*); @@ -51,6 +56,7 @@ lean_object* l___private_Init_Util_1__mkPanicMessage___closed__2; lean_object* l_unreachable_x21___rarg___closed__1; lean_object* l_withPtrAddr___rarg___boxed__const__1; lean_object* l_withPtrAddr___rarg(lean_object*, lean_object*); +lean_object* l_withPtrEqResult___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Util_1__mkPanicMessage___closed__3; lean_object* l_dbgSleep___boxed(lean_object*, lean_object*, lean_object*); @@ -306,6 +312,47 @@ lean_dec(x_1); return x_5; } } +lean_object* l_withPtrEqResultUnsafe___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +size_t x_4; size_t x_5; uint8_t x_6; +x_4 = lean_ptr_addr(x_1); +x_5 = lean_ptr_addr(x_2); +x_6 = x_4 == x_5; +if (x_6 == 0) +{ +lean_object* x_7; lean_object* x_8; +x_7 = lean_box(0); +x_8 = lean_apply_1(x_3, x_7); +return x_8; +} +else +{ +lean_object* x_9; lean_object* x_10; +x_9 = lean_box(1); +x_10 = lean_apply_1(x_3, x_9); +return x_10; +} +} +} +lean_object* l_withPtrEqResultUnsafe(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = lean_alloc_closure((void*)(l_withPtrEqResultUnsafe___rarg___boxed), 3, 0); +return x_4; +} +} +lean_object* l_withPtrEqResultUnsafe___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_withPtrEqResultUnsafe___rarg(x_1, x_2, x_3); +lean_dec(x_2); +lean_dec(x_1); +return x_4; +} +} lean_object* l_withPtrEq___rarg(lean_object* x_1, lean_object* x_2) { _start: { @@ -375,6 +422,33 @@ lean_dec(x_1); return x_4; } } +lean_object* l_withPtrEqResult___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; +x_4 = lean_box(0); +x_5 = lean_apply_1(x_3, x_4); +return x_5; +} +} +lean_object* l_withPtrEqResult(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = lean_alloc_closure((void*)(l_withPtrEqResult___rarg___boxed), 3, 0); +return x_4; +} +} +lean_object* l_withPtrEqResult___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_withPtrEqResult___rarg(x_1, x_2, x_3); +lean_dec(x_2); +lean_dec(x_1); +return x_4; +} +} lean_object* _init_l_withPtrAddr___rarg___boxed__const__1() { _start: {