diff --git a/library/init/lean/compiler/ir/basic.lean b/library/init/lean/compiler/ir/basic.lean index 58711c7317..f8f9f1e100 100644 --- a/library/init/lean/compiler/ir/basic.lean +++ b/library/init/lean/compiler/ir/basic.lean @@ -178,8 +178,8 @@ inductive AltCore (FnBody : Type) : Type inductive FnBody /- `let x : ty := e; b` -/ | vdecl (x : VarId) (ty : IRType) (e : Expr) (b : FnBody) -/- Join point Declaration `let j (xs) : ty := e; b` -/ -| jdecl (j : JoinPointId) (xs : Array Param) (ty : IRType) (v : FnBody) (b : FnBody) +/- Join point Declaration `block_j (xs) := e; b` -/ +| jdecl (j : JoinPointId) (xs : Array Param) (v : FnBody) (b : FnBody) /- Store `y` at Position `sizeof(void*)*i` in `x`. `x` must be a Constructor object and `RC(x)` must be 1. This operation is not part of λPure is only used during optimization. -/ | set (x : VarId) (i : Nat) (y : VarId) (b : FnBody) @@ -205,7 +205,7 @@ instance : Inhabited FnBody := ⟨FnBody.unreachable⟩ abbrev FnBody.nil := FnBody.unreachable @[export lean.ir.mk_vdecl_core] def mkVDecl (x : VarId) (ty : IRType) (e : Expr) (b : FnBody) : FnBody := FnBody.vdecl x ty e b -@[export lean.ir.mk_jdecl_core] def mkJDecl (j : JoinPointId) (xs : Array Param) (ty : IRType) (v : FnBody) (b : FnBody) : FnBody := FnBody.jdecl j xs ty v b +@[export lean.ir.mk_jdecl_core] def mkJDecl (j : JoinPointId) (xs : Array Param) (v : FnBody) (b : FnBody) : FnBody := FnBody.jdecl j xs v b @[export lean.ir.mk_uset_core] def mkUSet (x : VarId) (i : Nat) (y : VarId) (b : FnBody) : FnBody := FnBody.uset x i y b @[export lean.ir.mk_sset_core] def mkSSet (x : VarId) (i : Nat) (offset : Nat) (y : VarId) (ty : IRType) (b : FnBody) : FnBody := FnBody.sset x i offset y ty b @[export lean.ir.mk_case_core] def mkCase (tid : Name) (x : VarId) (cs : Array (AltCore FnBody)) : FnBody := FnBody.case tid x cs @@ -229,7 +229,7 @@ def FnBody.isTerminal : FnBody → Bool def FnBody.body : FnBody → FnBody | (FnBody.vdecl _ _ _ b) := b -| (FnBody.jdecl _ _ _ _ b) := b +| (FnBody.jdecl _ _ _ b) := b | (FnBody.set _ _ _ b) := b | (FnBody.uset _ _ _ b) := b | (FnBody.sset _ _ _ _ _ b) := b @@ -241,7 +241,7 @@ def FnBody.body : FnBody → FnBody def FnBody.setBody : FnBody → FnBody → FnBody | (FnBody.vdecl x t v _) b := FnBody.vdecl x t v b -| (FnBody.jdecl j xs t v _) b := FnBody.jdecl j xs t v b +| (FnBody.jdecl j xs v _) b := FnBody.jdecl j xs v b | (FnBody.set x i y _) b := FnBody.set x i y b | (FnBody.uset x i y _) b := FnBody.uset x i y b | (FnBody.sset x i o y t _) b := FnBody.sset x i o y t b @@ -309,13 +309,13 @@ reshapeAux bs bs.size term @[inline] def modifyJPs (bs : Array FnBody) (f : FnBody → FnBody) : Array FnBody := bs.hmap $ λ b, match b with - | FnBody.jdecl j xs t v k := FnBody.jdecl j xs t (f v) k - | other := other + | FnBody.jdecl j xs v k := FnBody.jdecl j xs (f v) k + | other := other @[inline] def mmodifyJPs {m : Type → Type} [Monad m] (bs : Array FnBody) (f : FnBody → m FnBody) : m (Array FnBody) := bs.hmmap $ λ b, match b with - | FnBody.jdecl j xs t v k := do v ← f v, pure $ FnBody.jdecl j xs t v k - | other := pure other + | FnBody.jdecl j xs v k := do v ← f v, pure $ FnBody.jdecl j xs v k + | other := pure other @[export lean.ir.mk_alt_core] def mkAlt (n : Name) (cidx : Nat) (size : Nat) (usize : Nat) (ssize : Nat) (b : FnBody) : Alt := Alt.ctor ⟨n, cidx, size, usize, ssize⟩ b @@ -344,7 +344,7 @@ def Expr.isPure : Expr → Bool /-- `FnBody.isPure b` return `true` Iff `b` is in the `λPure` fragment. -/ partial def FnBody.isPure : FnBody → Bool | (FnBody.vdecl _ _ e b) := e.isPure && b.isPure -| (FnBody.jdecl _ _ _ e b) := e.isPure && b.isPure +| (FnBody.jdecl _ _ e b) := e.isPure && b.isPure | (FnBody.uset _ _ _ b) := b.isPure | (FnBody.sset _ _ _ _ _ b) := b.isPure | (FnBody.mdata _ b) := b.isPure @@ -368,8 +368,8 @@ structure Context := def Context.addDecl (ctx : Context) (b : FnBody) : Context := match b with -| FnBody.vdecl x _ _ _ := { locals := ctx.locals.insert x.idx b, .. ctx } -| FnBody.jdecl j _ _ _ _ := { locals := ctx.locals.insert j.idx b, .. ctx } +| FnBody.vdecl x _ _ _ := { locals := ctx.locals.insert x.idx b, .. ctx } +| FnBody.jdecl j _ _ _ := { locals := ctx.locals.insert j.idx b, .. ctx } | other := ctx def Context.addParam (ctx : Context) (p : Param) : Context := @@ -377,12 +377,12 @@ def Context.addParam (ctx : Context) (p : Param) : Context := def Context.isJP (ctx : Context) (idx : Index) : Bool := match ctx.locals.find idx with -| some (FnBody.jdecl _ _ _ _ _) := true +| some (FnBody.jdecl _ _ _ _) := true | other := false def Context.getJoinPointBody (ctx : Context) (j : JoinPointId) : Option FnBody := match ctx.locals.find j.idx with -| some (FnBody.jdecl _ _ _ v _) := some v +| some (FnBody.jdecl _ _ v _) := some v | other := none def Context.isParam (ctx : Context) (idx : Index) : Bool := @@ -457,9 +457,9 @@ else Array.foldl₂ ps₁ ps₂ (λ ρ p₁ p₂, do ρ ← ρ, addParamRename partial def FnBody.alphaEqv : IndexRenaming → FnBody → FnBody → Bool | ρ (FnBody.vdecl x₁ t₁ v₁ b₁) (FnBody.vdecl x₂ t₂ v₂ b₂) := t₁ == t₂ && v₁ =[ρ]= v₂ && FnBody.alphaEqv (addVarRename ρ x₁.idx x₂.idx) b₁ b₂ -| ρ (FnBody.jdecl j₁ ys₁ t₁ v₁ b₁) (FnBody.jdecl j₂ ys₂ t₂ v₂ b₂) := +| ρ (FnBody.jdecl j₁ ys₁ v₁ b₁) (FnBody.jdecl j₂ ys₂ v₂ b₂) := match addParamsRename ρ ys₁ ys₂ with - | some ρ' := t₁ == t₂ && FnBody.alphaEqv ρ' v₁ v₂ && FnBody.alphaEqv (addVarRename ρ j₁.idx j₂.idx) b₁ b₂ + | some ρ' := FnBody.alphaEqv ρ' v₁ v₂ && FnBody.alphaEqv (addVarRename ρ j₁.idx j₂.idx) b₁ b₂ | none := false | ρ (FnBody.set x₁ i₁ y₁ b₁) (FnBody.set x₂ i₂ y₂ b₂) := x₁ =[ρ]= x₂ && i₁ == i₂ && y₁ =[ρ]= y₂ && FnBody.alphaEqv ρ b₁ b₂ | ρ (FnBody.uset x₁ i₁ y₁ b₁) (FnBody.uset x₂ i₂ y₂ b₂) := x₁ =[ρ]= x₂ && i₁ == i₂ && y₁ =[ρ]= y₂ && FnBody.alphaEqv ρ b₁ b₂ diff --git a/library/init/lean/compiler/ir/checker.lean b/library/init/lean/compiler/ir/checker.lean index 74546b3beb..3e1fbff81c 100644 --- a/library/init/lean/compiler/ir/checker.lean +++ b/library/init/lean/compiler/ir/checker.lean @@ -48,7 +48,7 @@ partial def checkFnBody : FnBody → M Unit ctx ← read, when (ctx.contains x.idx) $ throw ("invalid variable declaration, shadowing is not allowed"), adaptReader (λ ctx : Context, ctx.addDecl d) (checkFnBody b) -| d@(FnBody.jdecl j ys _ v b) := do +| d@(FnBody.jdecl j ys v b) := do withParams ys (checkFnBody v), ctx ← read, when (ctx.contains j.idx) $ throw ("invalid join point declaration, shadowing is not allowed"), diff --git a/library/init/lean/compiler/ir/elimdead.lean b/library/init/lean/compiler/ir/elimdead.lean index 16aebef41f..95d31e7a88 100644 --- a/library/init/lean/compiler/ir/elimdead.lean +++ b/library/init/lean/compiler/ir/elimdead.lean @@ -24,9 +24,9 @@ partial def reshapeWithoutDeadAux : Array FnBody → FnBody → IndexSet → FnB if used.contains vidx then keep () else reshapeWithoutDeadAux bs b used in match curr with - | FnBody.vdecl x _ _ _ := keepIfUsed x.idx - | FnBody.jdecl j _ _ _ _ := keepIfUsed j.idx - | _ := keep () + | FnBody.vdecl x _ _ _ := keepIfUsed x.idx + | FnBody.jdecl j _ _ _ := keepIfUsed j.idx + | _ := keep () def reshapeWithoutDead (bs : Array FnBody) (term : FnBody) : FnBody := reshapeWithoutDeadAux bs term term.freeIndices diff --git a/library/init/lean/compiler/ir/format.lean b/library/init/lean/compiler/ir/format.lean index 6806b1890c..2f286e7a83 100644 --- a/library/init/lean/compiler/ir/format.lean +++ b/library/init/lean/compiler/ir/format.lean @@ -75,7 +75,7 @@ def formatAlt (fmt : FnBody → Format) (indent : Nat) : Alt → Format partial def formatFnBody (indent : Nat := 2) : FnBody → Format | (FnBody.vdecl x ty e b) := "let " ++ format x ++ " : " ++ format ty ++ " := " ++ format e ++ ";" ++ Format.line ++ formatFnBody b -| (FnBody.jdecl j xs ty v b) := format j ++ formatArray xs ++ " : " ++ format ty ++ " :=" ++ Format.nest indent (Format.line ++ formatFnBody v) ++ ";" ++ Format.line ++ formatFnBody b +| (FnBody.jdecl j xs v b) := format j ++ formatArray xs ++ " :=" ++ Format.nest indent (Format.line ++ formatFnBody v) ++ ";" ++ Format.line ++ formatFnBody b | (FnBody.set x i y b) := "set " ++ format x ++ "[" ++ format i ++ "] := " ++ format y ++ ";" ++ Format.line ++ formatFnBody b | (FnBody.uset x i y b) := "uset " ++ format x ++ "[" ++ format i ++ "] := " ++ format y ++ ";" ++ Format.line ++ formatFnBody b | (FnBody.sset x i o y ty b) := "sset " ++ format x ++ "[" ++ format i ++ ", " ++ format o ++ "] : " ++ format ty ++ " := " ++ format y ++ ";" ++ Format.line ++ formatFnBody b diff --git a/library/init/lean/compiler/ir/freevars.lean b/library/init/lean/compiler/ir/freevars.lean index 6782500714..bdb7872027 100644 --- a/library/init/lean/compiler/ir/freevars.lean +++ b/library/init/lean/compiler/ir/freevars.lean @@ -59,7 +59,7 @@ collectArray alts $ λ alt, f alt.body partial def collectFnBody : FnBody → Collector | (FnBody.vdecl x _ v b) := collectExpr v; collectFnBody b -| (FnBody.jdecl j ys _ v b) := collectFnBody v; collectParams ys; collectFnBody b +| (FnBody.jdecl j ys v b) := collectFnBody v; collectParams ys; collectFnBody b | (FnBody.set x _ y b) := collectVar x; collectVar y; collectFnBody b | (FnBody.uset x _ y b) := collectVar x; collectVar y; collectFnBody b | (FnBody.sset x _ _ y _ b) := collectVar x; collectVar y; collectFnBody b @@ -153,7 +153,7 @@ collectArray alts $ λ alt, f alt.body partial def collectFnBody : FnBody → Collector | (FnBody.vdecl x _ v b) := collectExpr v; withVar x (collectFnBody b) -| (FnBody.jdecl j ys _ v b) := withParams ys (collectFnBody v); withJP j (collectFnBody b) +| (FnBody.jdecl j ys v b) := withParams ys (collectFnBody v); withJP j (collectFnBody b) | (FnBody.set x _ y b) := collectVar x; collectVar y; collectFnBody b | (FnBody.uset x _ y b) := collectVar x; collectVar y; collectFnBody b | (FnBody.sset x _ _ y _ b) := collectVar x; collectVar y; collectFnBody b @@ -210,7 +210,7 @@ def visitExpr (w : Index) : Expr → Bool partial def visitFnBody (w : Index) : FnBody → Bool | (FnBody.vdecl x _ v b) := visitExpr w v || visitFnBody b -| (FnBody.jdecl j ys _ v b) := visitFnBody v || visitFnBody b +| (FnBody.jdecl j ys v b) := visitFnBody v || visitFnBody b | (FnBody.set x _ y b) := visitVar w x || visitVar w y || visitFnBody b | (FnBody.uset x _ y b) := visitVar w x || visitVar w y || visitFnBody b | (FnBody.sset x _ _ y _ b) := visitVar w x || visitVar w y || visitFnBody b diff --git a/library/init/lean/compiler/ir/livevars.lean b/library/init/lean/compiler/ir/livevars.lean index d14b4b54fd..463dca50cc 100644 --- a/library/init/lean/compiler/ir/livevars.lean +++ b/library/init/lean/compiler/ir/livevars.lean @@ -50,7 +50,7 @@ local attribute [instance] monadInhabited partial def visitFnBody (w : Index) : FnBody → M Bool | (FnBody.vdecl x _ v b) := visitExpr w v <||> visitFnBody b -| (FnBody.jdecl j ys _ v b) := visitFnBody v <||> visitFnBody b +| (FnBody.jdecl j ys v b) := visitFnBody v <||> visitFnBody b | (FnBody.set x _ y b) := visitVar w x <||> visitVar w y <||> visitFnBody b | (FnBody.uset x _ y b) := visitVar w x <||> visitVar w y <||> visitFnBody b | (FnBody.sset x _ _ y _ b) := visitVar w x <||> visitVar w y <||> visitFnBody b diff --git a/library/init/lean/compiler/ir/normids.lean b/library/init/lean/compiler/ir/normids.lean index 3a9225fe83..adbdb97ce2 100644 --- a/library/init/lean/compiler/ir/normids.lean +++ b/library/init/lean/compiler/ir/normids.lean @@ -74,9 +74,9 @@ local attribute [instance] monadInhabited partial def normFnBody : FnBody → N FnBody | (FnBody.vdecl x t v b) := do v ← normExpr v, withVar x $ λ x, FnBody.vdecl x t v <$> normFnBody b -| (FnBody.jdecl j ys t v b) := do +| (FnBody.jdecl j ys v b) := do (ys, v) ← withParams ys $ λ ys, do { v ← normFnBody v, pure (ys, v) }, - withJP j $ λ j, FnBody.jdecl j ys t v <$> normFnBody b + withJP j $ λ j, FnBody.jdecl j ys v <$> normFnBody b | (FnBody.set x i y b) := do x ← normVar x, y ← normVar y, FnBody.set x i y <$> normFnBody b | (FnBody.uset x i y b) := do x ← normVar x, y ← normVar y, FnBody.uset x i y <$> normFnBody b | (FnBody.sset x i o y t b) := do x ← normVar x, y ← normVar y, FnBody.sset x i o y t <$> normFnBody b diff --git a/library/init/lean/compiler/ir/resetreuse.lean b/library/init/lean/compiler/ir/resetreuse.lean index 87f3ed8763..3c16b4335a 100644 --- a/library/init/lean/compiler/ir/resetreuse.lean +++ b/library/init/lean/compiler/ir/resetreuse.lean @@ -42,10 +42,10 @@ private partial def S (w : VarId) (c : CtorInfo) : FnBody → FnBody FnBody.vdecl x t (Expr.reuse w c updtCidx ys) b else FnBody.vdecl x t v (S b) -| (FnBody.jdecl j ys t v b) := +| (FnBody.jdecl j ys v b) := let v' := S v in - if v == v' then FnBody.jdecl j ys t v (S b) - else FnBody.jdecl j ys t v' b + if v == v' then FnBody.jdecl j ys v (S b) + else FnBody.jdecl j ys v' b | (FnBody.case tid x alts) := FnBody.case tid x $ alts.hmap $ λ alt, alt.modifyBody S | b := if b.isTerminal then b @@ -79,13 +79,13 @@ private partial def Dmain (x : VarId) (c : CtorInfo) : FnBody → M (FnBody × B alts ← alts.hmmap $ λ alt, alt.mmodifyBody (λ b, Dmain b >>= Dfinalize x c), pure (FnBody.case tid y alts, true) else pure (e, false) -| e@(FnBody.jdecl j ys t v b) := do +| e@(FnBody.jdecl j ys v b) := do (b, _) ← adaptReader (λ ctx : Context, ctx.addDecl e) (Dmain b), (v, found) ← Dmain v, /- If `found == true`, then `Dmain b` must also have returned `(b, true)` since we assume the IR does not have dead join points. So, if `x` is live in `j`, then it must also live in `b` since `j` is reachable from `b` with a `jmp`. -/ - pure (FnBody.jdecl j ys t v b, found) + pure (FnBody.jdecl j ys v b, found) | e := do ctx ← read, if e.isTerminal then @@ -108,8 +108,8 @@ private partial def hasCtorUsing (x : VarId) : FnBody → Bool | Arg.var y := x == y | _ := false) || hasCtorUsing b -| (FnBody.jdecl _ _ _ v b) := hasCtorUsing v || hasCtorUsing b -| b := !b.isTerminal && hasCtorUsing b.body +| (FnBody.jdecl _ _ v b) := hasCtorUsing v || hasCtorUsing b +| b := !b.isTerminal && hasCtorUsing b.body private def D (x : VarId) (c : CtorInfo) (b : FnBody) : M FnBody := /- If the scrutinee `x` (the one that is providing memory) is being @@ -127,10 +127,10 @@ private partial def R : FnBody → M FnBody | _ := pure alt }, pure $ FnBody.case tid x alts -| e@(FnBody.jdecl j ys t v b) := do +| e@(FnBody.jdecl j ys v b) := do v ← R v, b ← adaptReader (λ ctx : Context, ctx.addDecl e) (R b), - pure $ FnBody.jdecl j ys t v b + pure $ FnBody.jdecl j ys v b | e := do if e.isTerminal then pure e else do diff --git a/src/library/compiler/ir.cpp b/src/library/compiler/ir.cpp index a1b931bcc5..601fd3a210 100644 --- a/src/library/compiler/ir.cpp +++ b/src/library/compiler/ir.cpp @@ -27,7 +27,7 @@ object * mk_app_expr_core(object * x, object * ys); object * mk_num_expr_core(object * v); object * mk_str_expr_core(object * v); object * mk_vdecl_core(object * x, uint8 ty, object * e, object * b); -object * mk_jdecl_core(object * j, object * xs, uint8 ty, object * v, object * b); +object * mk_jdecl_core(object * j, object * xs, object * v, object * b); object * mk_uset_core(object * x, object * i, object * y, object * b); object * mk_sset_core(object * x, object * i, object * o, object * y, uint8 ty, object * b); object * mk_case_core(object * tid, object * x, object * cs); @@ -79,9 +79,9 @@ fn_body mk_vdecl(var_id const & x, type ty, expr const & e, fn_body const & b) { inc(x.raw()); inc(e.raw()), inc(b.raw()); return fn_body(mk_vdecl_core(x.raw(), static_cast(ty), e.raw(), b.raw())); } -fn_body mk_jdecl(jp_id const & j, buffer const & xs, type ty, expr const & v, fn_body const & b) { +fn_body mk_jdecl(jp_id const & j, buffer const & xs, expr const & v, fn_body const & b) { inc(j.raw()); inc(v.raw()); inc(b.raw()); - return fn_body(mk_jdecl_core(j.raw(), to_array(xs), static_cast(ty), v.raw(), b.raw())); + return fn_body(mk_jdecl_core(j.raw(), to_array(xs), v.raw(), b.raw())); } fn_body mk_uset(var_id const & x, unsigned i, var_id const & y, fn_body const & b) { inc(x.raw()); inc(y.raw()); inc(b.raw()); @@ -293,8 +293,7 @@ class to_ir_fn { expr val = *decl.get_value(); buffer xs; ir::fn_body v = visit_lambda(val, xs); - ir::type t = to_ir_result_type(decl.get_type(), xs.size()); - return ir::mk_jdecl(to_jp_id(decl), xs, t, v, b); + return ir::mk_jdecl(to_jp_id(decl), xs, v, b); } ir::fn_body visit_ctor(local_decl const & decl, ir::fn_body const & b) { diff --git a/src/stage0/CMakeLists.txt b/src/stage0/CMakeLists.txt index f9fba30021..80118f67ee 100644 --- a/src/stage0/CMakeLists.txt +++ b/src/stage0/CMakeLists.txt @@ -1 +1 @@ -add_library (stage0 OBJECT ./init/coe.cpp ./init/control/alternative.cpp ./init/control/applicative.cpp ./init/control/combinators.cpp ./init/control/default.cpp ./init/control/estate.cpp ./init/control/except.cpp ./init/control/functor.cpp ./init/control/id.cpp ./init/control/lift.cpp ./init/control/monad.cpp ./init/control/monadfail.cpp ./init/control/option.cpp ./init/control/reader.cpp ./init/control/state.cpp ./init/core.cpp ./init/data/array/basic.cpp ./init/data/array/default.cpp ./init/data/assoclist.cpp ./init/data/basic.cpp ./init/data/char/basic.cpp ./init/data/char/default.cpp ./init/data/default.cpp ./init/data/dlist.cpp ./init/data/fin/basic.cpp ./init/data/fin/default.cpp ./init/data/hashable.cpp ./init/data/hashmap/basic.cpp ./init/data/hashmap/default.cpp ./init/data/int/basic.cpp ./init/data/int/default.cpp ./init/data/list/basic.cpp ./init/data/list/default.cpp ./init/data/list/instances.cpp ./init/data/nat/basic.cpp ./init/data/nat/bitwise.cpp ./init/data/nat/default.cpp ./init/data/nat/div.cpp ./init/data/option/basic.cpp ./init/data/option/instances.cpp ./init/data/ordering/basic.cpp ./init/data/ordering/default.cpp ./init/data/random.cpp ./init/data/rbmap/basic.cpp ./init/data/rbmap/default.cpp ./init/data/rbtree/basic.cpp ./init/data/rbtree/default.cpp ./init/data/repr.cpp ./init/data/string/basic.cpp ./init/data/string/default.cpp ./init/data/tostring.cpp ./init/data/uint.cpp ./init/default.cpp ./init/env_ext.cpp ./init/fix.cpp ./init/io.cpp ./init/lean/compiler/constfolding.cpp ./init/lean/compiler/default.cpp ./init/lean/compiler/ir/basic.cpp ./init/lean/compiler/ir/default.cpp ./init/lean/compiler/ir/elimdead.cpp ./init/lean/compiler/ir/format.cpp ./init/lean/compiler/ir/freevars.cpp ./init/lean/compiler/ir/livevars.cpp ./init/lean/compiler/ir/normids.cpp ./init/lean/compiler/ir/pushproj.cpp ./init/lean/compiler/ir/resetreuse.cpp ./init/lean/compiler/ir/simpcase.cpp ./init/lean/compiler/util.cpp ./init/lean/config.cpp ./init/lean/declaration.cpp ./init/lean/default.cpp ./init/lean/disjoint_set.cpp ./init/lean/elaborator.cpp ./init/lean/expander.cpp ./init/lean/expr.cpp ./init/lean/extern.cpp ./init/lean/format.cpp ./init/lean/frontend.cpp ./init/lean/kvmap.cpp ./init/lean/level.cpp ./init/lean/message.cpp ./init/lean/name.cpp ./init/lean/name_mangling.cpp ./init/lean/options.cpp ./init/lean/parser/basic.cpp ./init/lean/parser/combinators.cpp ./init/lean/parser/command.cpp ./init/lean/parser/declaration.cpp ./init/lean/parser/identifier.cpp ./init/lean/parser/level.cpp ./init/lean/parser/module.cpp ./init/lean/parser/notation.cpp ./init/lean/parser/parsec.cpp ./init/lean/parser/pratt.cpp ./init/lean/parser/rec.cpp ./init/lean/parser/stringliteral.cpp ./init/lean/parser/syntax.cpp ./init/lean/parser/term.cpp ./init/lean/parser/token.cpp ./init/lean/parser/trie.cpp ./init/lean/position.cpp ./init/lean/trace.cpp ./init/lean/util.cpp ./init/platform.cpp ./init/util.cpp ./init/wf.cpp) +add_library (stage0 OBJECT ./init/coe.cpp ./init/control/alternative.cpp ./init/control/applicative.cpp ./init/control/combinators.cpp ./init/control/conditional.cpp ./init/control/default.cpp ./init/control/estate.cpp ./init/control/except.cpp ./init/control/functor.cpp ./init/control/id.cpp ./init/control/lift.cpp ./init/control/monad.cpp ./init/control/monadfail.cpp ./init/control/option.cpp ./init/control/reader.cpp ./init/control/state.cpp ./init/core.cpp ./init/data/array/basic.cpp ./init/data/array/default.cpp ./init/data/assoclist.cpp ./init/data/basic.cpp ./init/data/char/basic.cpp ./init/data/char/default.cpp ./init/data/default.cpp ./init/data/dlist.cpp ./init/data/fin/basic.cpp ./init/data/fin/default.cpp ./init/data/hashable.cpp ./init/data/hashmap/basic.cpp ./init/data/hashmap/default.cpp ./init/data/int/basic.cpp ./init/data/int/default.cpp ./init/data/list/basic.cpp ./init/data/list/default.cpp ./init/data/list/instances.cpp ./init/data/nat/basic.cpp ./init/data/nat/bitwise.cpp ./init/data/nat/default.cpp ./init/data/nat/div.cpp ./init/data/option/basic.cpp ./init/data/option/instances.cpp ./init/data/ordering/basic.cpp ./init/data/ordering/default.cpp ./init/data/random.cpp ./init/data/rbmap/basic.cpp ./init/data/rbmap/default.cpp ./init/data/rbtree/basic.cpp ./init/data/rbtree/default.cpp ./init/data/repr.cpp ./init/data/string/basic.cpp ./init/data/string/default.cpp ./init/data/tostring.cpp ./init/data/uint.cpp ./init/default.cpp ./init/env_ext.cpp ./init/fix.cpp ./init/io.cpp ./init/lean/compiler/constfolding.cpp ./init/lean/compiler/default.cpp ./init/lean/compiler/ir/basic.cpp ./init/lean/compiler/ir/checker.cpp ./init/lean/compiler/ir/default.cpp ./init/lean/compiler/ir/elimdead.cpp ./init/lean/compiler/ir/format.cpp ./init/lean/compiler/ir/freevars.cpp ./init/lean/compiler/ir/livevars.cpp ./init/lean/compiler/ir/normids.cpp ./init/lean/compiler/ir/pushproj.cpp ./init/lean/compiler/ir/resetreuse.cpp ./init/lean/compiler/ir/simpcase.cpp ./init/lean/compiler/util.cpp ./init/lean/config.cpp ./init/lean/declaration.cpp ./init/lean/default.cpp ./init/lean/disjoint_set.cpp ./init/lean/elaborator.cpp ./init/lean/expander.cpp ./init/lean/expr.cpp ./init/lean/extern.cpp ./init/lean/format.cpp ./init/lean/frontend.cpp ./init/lean/kvmap.cpp ./init/lean/level.cpp ./init/lean/message.cpp ./init/lean/name.cpp ./init/lean/name_mangling.cpp ./init/lean/options.cpp ./init/lean/parser/basic.cpp ./init/lean/parser/combinators.cpp ./init/lean/parser/command.cpp ./init/lean/parser/declaration.cpp ./init/lean/parser/identifier.cpp ./init/lean/parser/level.cpp ./init/lean/parser/module.cpp ./init/lean/parser/notation.cpp ./init/lean/parser/parsec.cpp ./init/lean/parser/pratt.cpp ./init/lean/parser/rec.cpp ./init/lean/parser/stringliteral.cpp ./init/lean/parser/syntax.cpp ./init/lean/parser/term.cpp ./init/lean/parser/token.cpp ./init/lean/parser/trie.cpp ./init/lean/position.cpp ./init/lean/trace.cpp ./init/lean/util.cpp ./init/platform.cpp ./init/util.cpp ./init/wf.cpp) diff --git a/src/stage0/init/control/default.cpp b/src/stage0/init/control/default.cpp index f945d02e83..46cbafaf5b 100644 --- a/src/stage0/init/control/default.cpp +++ b/src/stage0/init/control/default.cpp @@ -1,6 +1,6 @@ // Lean compiler output // Module: init.control.default -// Imports: init.control.applicative init.control.functor init.control.alternative init.control.monad init.control.lift init.control.state init.control.id init.control.except init.control.reader init.control.option init.control.combinators +// Imports: init.control.applicative init.control.functor init.control.alternative init.control.monad init.control.lift init.control.state init.control.id init.control.except init.control.reader init.control.option init.control.combinators init.control.conditional #include "runtime/object.h" #include "runtime/apply.h" typedef lean::object obj; typedef lean::usize usize; @@ -25,6 +25,7 @@ obj* initialize_init_control_except(obj*); obj* initialize_init_control_reader(obj*); obj* initialize_init_control_option(obj*); obj* initialize_init_control_combinators(obj*); +obj* initialize_init_control_conditional(obj*); static bool _G_initialized = false; obj* initialize_init_control_default(obj* w) { if (_G_initialized) return w; @@ -52,5 +53,7 @@ w = initialize_init_control_option(w); if (io_result_is_error(w)) return w; w = initialize_init_control_combinators(w); if (io_result_is_error(w)) return w; +w = initialize_init_control_conditional(w); +if (io_result_is_error(w)) return w; return w; } diff --git a/src/stage0/init/core.cpp b/src/stage0/init/core.cpp index 1fdab4f66e..3de8ebc762 100644 --- a/src/stage0/init/core.cpp +++ b/src/stage0/init/core.cpp @@ -52,7 +52,6 @@ obj* l_Thunk_bind___boxed(obj*, obj*, obj*, obj*); obj* l_decidableOfDecidableOfEq___boxed(obj*, obj*); obj* l_ite___boxed(obj*); obj* l_Quot_liftOn___rarg(obj*, obj*, obj*); -uint8 l_Decidable_toBool___rarg(uint8); uint8 l_Bool_DecidableEq(uint8, uint8); obj* l_Function_onFun___boxed(obj*, obj*, obj*); obj* l_inline(obj*); @@ -156,6 +155,7 @@ obj* l_Prod_DecidableEq___boxed(obj*, obj*); obj* l_Subtype_sizeof___main(obj*); obj* l_Quot_recOnSubsingleton(obj*, obj*, obj*, obj*); obj* l_Prod_HasSizeof___boxed(obj*, obj*); +obj* l_Decidable_decide___boxed(obj*); obj* l_Quotient_liftOn___boxed(obj*, obj*, obj*); obj* l_PSum_sizeof(obj*, obj*); obj* l_Task_map___boxed(obj*, obj*, obj*, obj*); @@ -284,6 +284,7 @@ obj* l_Prod_map___main___rarg(obj*, obj*, obj*); uint8 l_ite_Decidable___rarg(uint8, uint8, uint8); obj* l___private_init_core_21__funSetoid(obj*, obj*); obj* l_Quot_hrecOn___boxed(obj*, obj*, obj*); +uint8 l_Decidable_decide___rarg(uint8); obj* l_Xor_Decidable(obj*, obj*); obj* l_Nat_add___boxed(obj*, obj*); obj* l_PSum_sizeof___rarg(obj*, obj*, obj*); @@ -340,7 +341,6 @@ uint8 l_Xor_Decidable___rarg(uint8, uint8); obj* l_typedExpr___boxed(obj*); obj* l_Decidable_byCases___boxed(obj*, obj*); obj* l_cond___rarg(uint8, obj*, obj*); -obj* l_Decidable_toBool(obj*); obj* l_Bool_sizeof(uint8); obj* l_Pi_Inhabited___boxed(obj*, obj*); obj* l_Prod_map(obj*, obj*, obj*, obj*); @@ -379,6 +379,7 @@ obj* l_Function_const___rarg(obj*, obj*); obj* l_Eq_ndrec(obj*, obj*, obj*); obj* l_Subtype_HasSizeof___boxed(obj*); uint8 l_xor___main(uint8, uint8); +obj* l_Decidable_decide(obj*); obj* l_idRhs___rarg___boxed(obj*); obj* l_Quotient_recOnSubsingleton_u_2082___at_Quotient_DecidableEq___spec__1(obj*, obj*); obj* l_Subtype_sizeof___rarg___boxed(obj*, obj*, obj*); @@ -407,6 +408,7 @@ uint8 l_Quotient_DecidableEq___rarg___lambda__1(obj*, obj*, obj*); obj* l_inferInstanceAs(obj*); obj* l_absurd___boxed(obj*, obj*, obj*, obj*); obj* l_PSigma_HasSizeof___boxed(obj*, obj*); +obj* l_Decidable_decide___rarg___boxed(obj*); obj* l_Function_comp(obj*, obj*, obj*); uint8 l_prodHasDecidableLt___rarg(obj*, obj*, obj*, obj*, obj*, obj*); obj* l_Function_combine(obj*, obj*, obj*, obj*, obj*); @@ -439,7 +441,6 @@ obj* l_inferInstance(obj*); obj* l_absurd(obj*, obj*, obj*, obj*); obj* l_xor___main___boxed(obj*, obj*); uint8 l_decidableOfDecidableOfIff___rarg(uint8, obj*); -obj* l_Decidable_toBool___boxed(obj*); obj* l_PSigma_sizeof___rarg(obj*, obj*, obj*); obj* l_Decidable_byCases(obj*, obj*); obj* l_Ne_Decidable___boxed(obj*); @@ -452,7 +453,6 @@ obj* l_Prod_sizeof___boxed(obj*, obj*); obj* l_PSigma_sizeof___main___rarg(obj*, obj*, obj*); obj* l_Option_sizeof(obj*); obj* l_Quotient_recOnSubsingleton___boxed(obj*, obj*, obj*, obj*); -obj* l_Decidable_toBool___rarg___boxed(obj*); obj* l_Sigma_sizeof___main___boxed(obj*, obj*); obj* l_Sum_inhabitedLeft(obj*, obj*); obj* l_Function_swap___rarg(obj*, obj*, obj*); @@ -2692,7 +2692,7 @@ lean::dec(x_2); return x_3; } } -uint8 l_Decidable_toBool___rarg(uint8 x_0) { +uint8 l_Decidable_decide___rarg(uint8 x_0) { _start: { if (x_0 == 0) @@ -2709,29 +2709,29 @@ return x_2; } } } -obj* l_Decidable_toBool(obj* x_0) { +obj* l_Decidable_decide(obj* x_0) { _start: { obj* x_1; -x_1 = lean::alloc_closure(reinterpret_cast(l_Decidable_toBool___rarg___boxed), 1, 0); +x_1 = lean::alloc_closure(reinterpret_cast(l_Decidable_decide___rarg___boxed), 1, 0); return x_1; } } -obj* l_Decidable_toBool___rarg___boxed(obj* x_0) { +obj* l_Decidable_decide___rarg___boxed(obj* x_0) { _start: { uint8 x_1; uint8 x_2; obj* x_3; x_1 = lean::unbox(x_0); -x_2 = l_Decidable_toBool___rarg(x_1); +x_2 = l_Decidable_decide___rarg(x_1); x_3 = lean::box(x_2); return x_3; } } -obj* l_Decidable_toBool___boxed(obj* x_0) { +obj* l_Decidable_decide___boxed(obj* x_0) { _start: { obj* x_1; -x_1 = l_Decidable_toBool(x_0); +x_1 = l_Decidable_decide(x_0); lean::dec(x_0); return x_1; } diff --git a/src/stage0/init/data/array/basic.cpp b/src/stage0/init/data/array/basic.cpp index dfd2f2ba8c..5c2c4dca90 100644 --- a/src/stage0/init/data/array/basic.cpp +++ b/src/stage0/init/data/array/basic.cpp @@ -15,6 +15,7 @@ typedef lean::uint32 uint32; typedef lean::uint64 uint64; #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif obj* l_List_toArrayAux___rarg(obj*, obj*); +obj* l_Array_anyMAux___main___at_Array_any___spec__1(obj*); obj* l_Array_extractAux___main___rarg___boxed(obj*, obj*, obj*, obj*, obj*); obj* l_Array_append(obj*); obj* l_Array_foldlFrom___rarg(obj*, obj*, obj*, obj*); @@ -24,6 +25,7 @@ obj* l_Array_hmmapAux___main___at_Array_hmapIdx___spec__1(obj*); obj* l_Array_miterateAux___main___at_Array_iterateFrom___spec__1___rarg(obj*, obj*, obj*, obj*, obj*); obj* l_Array_shrink___main___rarg___boxed(obj*, obj*); obj* l_Array_hmap(obj*); +obj* l_Array_mforAux___rarg___boxed(obj*, obj*, obj*, obj*, obj*, obj*); obj* l_Array_miterate_u_2082Aux___main___at_Array_foldl_u_2082___spec__1___rarg___boxed(obj*, obj*, obj*, obj*, obj*, obj*); obj* l_Array_hmmap___rarg(obj*, obj*, obj*, obj*); obj* l_Array_toList___rarg___boxed(obj*); @@ -32,6 +34,7 @@ obj* l_Array_empty___closed__1; namespace lean { obj* nat_sub(obj*, obj*); } +obj* l_Array_anyMAux___main___at_Array_all___spec__1___rarg___boxed(obj*, obj*, obj*); obj* l_Array_getOpt(obj*); obj* l_Array_miterateAux___main___at_Array_foldlFrom___spec__1(obj*, obj*); obj* l_Array_any(obj*); @@ -40,9 +43,9 @@ obj* l_Array_swap___boxed(obj*, obj*, obj*, obj*); obj* l___private_init_data_array_basic_1__revIterateAux___main___at_Array_toList___spec__1___rarg___boxed(obj*, obj*, obj*, obj*, obj*); obj* l_Array_revFoldl(obj*, obj*); obj* l_Array_back___boxed(obj*); +obj* l_Array_mfor___rarg___boxed(obj*, obj*, obj*, obj*, obj*); obj* l_Array_extract___rarg___boxed(obj*, obj*, obj*); obj* l_Array_miterate___boxed(obj*, obj*, obj*); -uint8 l_Array_anyAux___rarg(obj*, obj*, obj*); obj* l_Array_isEmpty___boxed(obj*); obj* l_Array_iterate___rarg___boxed(obj*, obj*, obj*); obj* l_Array_mfoldl___rarg(obj*, obj*, obj*, obj*); @@ -51,6 +54,7 @@ obj* l_Array_miterateAux___main___at_Array_iterate___spec__1(obj*, obj*); obj* l_Array_miterateAux___main___at_Array_foldlFrom___spec__1___rarg___boxed(obj*, obj*, obj*, obj*, obj*); obj* l_Array_reverse(obj*); obj* l_Array_filter(obj*); +obj* l_Array_anyMAux___main___at_Array_allM___spec__1___rarg___lambda__1___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*); obj* l_Array_hmmapAux___rarg(obj*, obj*, obj*, obj*, obj*); obj* l_Array_mfoldl_u_2082___rarg(obj*, obj*, obj*, obj*, obj*); obj* l_Array_all___rarg___boxed(obj*, obj*); @@ -66,7 +70,7 @@ obj* l_Array_any___boxed(obj*); obj* l_Array_extractAux(obj*); obj* l_Array_HasRepr(obj*); obj* l_Array_singleton___boxed(obj*); -obj* l_Array_anyAux___main___at_Array_all___spec__1(obj*); +obj* l_Array_allM___boxed(obj*, obj*); obj* l_Array_hmmapAux___main___rarg(obj*, obj*, obj*, obj*, obj*); obj* l_Array_iterate_u_2082___rarg___boxed(obj*, obj*, obj*, obj*); obj* l_Array_back___rarg___boxed(obj*, obj*); @@ -83,12 +87,13 @@ obj* l_Array_iterate___boxed(obj*, obj*); obj* l_Array_size___boxed(obj*, obj*); obj* l_Array_uset___boxed(obj*, obj*, obj*, obj*, obj*); obj* l_Array_miterateAux___main___at_Array_iterateFrom___spec__1___rarg___boxed(obj*, obj*, obj*, obj*, obj*); +obj* l_Array_anyMAux___main___rarg(obj*, obj*, obj*, obj*); obj* l_Array_isEqvAux___main___boxed(obj*); obj* l_List_toArrayAux___main___rarg(obj*, obj*); obj* l_Array_isEqv___rarg___boxed(obj*, obj*, obj*); obj* l_Array_fswapAt___rarg___boxed(obj*, obj*, obj*); obj* l_Array_mfoldlFrom___rarg(obj*, obj*, obj*, obj*, obj*); -uint8 l_Array_anyAux___main___at_Array_all___spec__1___rarg(obj*, obj*, obj*); +obj* l_Array_anyMAux(obj*, obj*); obj* l_Array_extractAux___rarg(obj*, obj*, obj*, obj*, obj*); obj* l_Array_miterate_u_2082___rarg(obj*, obj*, obj*, obj*, obj*); obj* l_Array_miterateAux___main___at_Array_mfoldlFrom___spec__1___rarg___boxed(obj*, obj*, obj*, obj*, obj*, obj*); @@ -108,6 +113,7 @@ obj* l_Array_miterateAux___main___at_Array_mfoldl___spec__1(obj*, obj*, obj*); obj* l_Array_miterateAux___main___at_Array_iterate___spec__1___rarg___boxed(obj*, obj*, obj*, obj*, obj*); obj* l_Array_pop___boxed(obj*, obj*); obj* l_Array_foldlFrom___rarg___boxed(obj*, obj*, obj*, obj*); +obj* l_Array_anyMAux___main___at_Array_all___spec__1(obj*); uint8 l_Array_isEqvAux___rarg(obj*, obj*, obj*, obj*, obj*); obj* l_Array_hmmapAux___main___at_Array_hmap___spec__1___boxed(obj*); obj* l_Array_Inhabited___boxed(obj*); @@ -133,21 +139,24 @@ obj* l_Array_toList___rarg(obj*); obj* l_Array_uget___boxed(obj*, obj*, obj*, obj*); obj* l___private_init_data_array_basic_1__revIterateAux___main___at_Array_revFoldl___spec__1___rarg___boxed(obj*, obj*, obj*, obj*, obj*, obj*); uint8 l_Array_HasBeq___rarg(obj*, obj*, obj*); +obj* l_Array_allM(obj*, obj*); obj* l_Array_hmapIdx(obj*); obj* l_Array_get___boxed(obj*, obj*, obj*, obj*); obj* l_Array_miterate_u_2082Aux___boxed(obj*, obj*, obj*); obj* l_Array_iterate(obj*, obj*); obj* l_Array_miterateAux___main___at_Array_mmap___spec__1___rarg___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*); obj* l_Array_mfindAux___boxed(obj*, obj*, obj*); +obj* l_Array_mfor(obj*); obj* l_Array_reverseAux___main___boxed(obj*); obj* l_Array_mfindAux___main___at_Array_find___spec__1(obj*, obj*); obj* l_Array_extract___rarg(obj*, obj*, obj*); obj* l_Array_miterateAux___main___at_Array_mfoldl___spec__1___boxed(obj*, obj*, obj*); obj* l_Array_hmmapAux___main(obj*, obj*); obj* l_Array_miterate_u_2082Aux___main___at_Array_iterate_u_2082___spec__1___rarg___boxed(obj*, obj*, obj*, obj*, obj*, obj*); +uint8 l_Array_allM___rarg___lambda__1(uint8); obj* l_Array_mfindAux___main___rarg(obj*, obj*, obj*, obj*); -obj* l_Array_anyAux(obj*); obj* l_Array_isEqv(obj*); +obj* l_Array_anyMAux___main___at_Array_any___spec__1___boxed(obj*); obj* l_Array_mfind___boxed(obj*, obj*, obj*); obj* l_Array_iterateFrom___boxed(obj*, obj*); obj* l_Array_mfindAux___main(obj*, obj*, obj*); @@ -159,6 +168,7 @@ obj* l___private_init_data_array_basic_1__revIterateAux___main___rarg(obj*, obj* obj* l_List_toString___rarg(obj*, obj*); obj* l_Array_miterate_u_2082Aux(obj*, obj*, obj*); obj* l_Array_revIterate___boxed(obj*, obj*); +obj* l_Array_anyMAux___main___at_Array_all___spec__1___boxed(obj*); obj* l_Array_revFoldl___rarg___boxed(obj*, obj*, obj*); obj* l_Array_miterateAux___main___at_Array_foldlFrom___spec__1___rarg(obj*, obj*, obj*, obj*, obj*); obj* l_Array_swapAt___rarg___boxed(obj*, obj*, obj*); @@ -170,18 +180,22 @@ obj* l_Array_miterateAux___main(obj*, obj*, obj*); obj* l_Array_mfindAux___main___rarg___lambda__1(obj*, obj*, obj*, obj*, obj*); obj* l_Array_miterate_u_2082Aux___main(obj*, obj*, obj*); obj* l_Array_HasBeq___rarg___boxed(obj*, obj*, obj*); +obj* l_Array_allM___rarg___lambda__1___boxed(obj*); obj* l_Array_foldl(obj*, obj*); obj* l_Array_miterate_u_2082Aux___main___at_Array_mfoldl_u_2082___spec__1___rarg(obj*, obj*, obj*, obj*, obj*, obj*, obj*); obj* l_Array_mfindAux___main___at_Array_find___spec__1___rarg(obj*, obj*, obj*); obj* l_Array_hmap___rarg(obj*, obj*, obj*); obj* l_Array_append___boxed(obj*); obj* l_Array_hmmapAux___main___at_Array_hmmap___spec__1(obj*, obj*); +obj* l_Array_anyMAux___main___rarg___lambda__1___boxed(obj*, obj*, obj*, obj*, obj*); obj* l_Array_filterAux___main___rarg(obj*, obj*, obj*, obj*); obj* l_Array_foldl___boxed(obj*, obj*); obj* l_Array_miterateAux___main___at_Array_mmap___spec__1___rarg(obj*, obj*, obj*, obj*, obj*, obj*, obj*); +obj* l_Array_mforAux___main___boxed(obj*); obj* l_Array_singleton___rarg(obj*); obj* l_Array_HasEmptyc___boxed(obj*); obj* l_Array_miterateAux___main___at_Array_foldl___spec__1___boxed(obj*, obj*); +uint8 l_Array_anyMAux___main___at_Array_all___spec__1___rarg(obj*, obj*, obj*); obj* l_Array_filter___rarg(obj*, obj*); namespace lean { obj* nat_add(obj*, obj*); @@ -198,45 +212,50 @@ uint8 l_Array_isEmpty___rarg(obj*); obj* l_Array_miterateAux___main___at_Array_iterateFrom___spec__1___boxed(obj*, obj*); uint8 l_Array_any___rarg(obj*, obj*); obj* l_Array_iterateFrom(obj*, obj*); +obj* l_Array_anyMAux___main(obj*, obj*); +obj* l_Array_mforAux___rarg(obj*, obj*, obj*, obj*, obj*, obj*); obj* l_Array_map___rarg___boxed(obj*, obj*); obj* l_Array_push___boxed(obj*, obj*, obj*); obj* l_Array_fget___boxed(obj*, obj*, obj*); -uint8 l_Array_anyAux___main___rarg(obj*, obj*, obj*); obj* l_Array_foldl_u_2082(obj*, obj*); obj* l_Array_reverseAux___rarg(obj*, obj*); obj* l_Array_miterate_u_2082Aux___main___boxed(obj*, obj*, obj*); -obj* l_Array_anyAux___boxed(obj*); +obj* l_Array_anyMAux___main___at_Array_allM___spec__1___rarg(obj*, obj*, obj*, obj*, obj*, obj*); uint8 l_Array_isEqv___rarg(obj*, obj*, obj*); obj* l_Array_map(obj*, obj*); obj* l_Array_map___boxed(obj*, obj*); obj* l_Array_hmap___boxed(obj*); obj* l_Array_foldl_u_2082___boxed(obj*, obj*); obj* l_Array_miterateAux___main___at_Array_foldl___spec__1___rarg___boxed(obj*, obj*, obj*, obj*, obj*); +obj* l_Array_anyMAux___main___at_Array_any___spec__1___rarg___boxed(obj*, obj*, obj*); obj* l_Array_mmap___rarg(obj*, obj*, obj*, obj*); obj* l___private_init_data_array_basic_1__revIterateAux___boxed(obj*, obj*); obj* l_Array_miterate_u_2082___boxed(obj*, obj*, obj*); obj* l_Array_mfoldl_u_2082(obj*, obj*, obj*); obj* l_Array_filterAux___rarg(obj*, obj*, obj*, obj*); obj* l_Array_miterate_u_2082Aux___main___at_Array_foldl_u_2082___spec__1___boxed(obj*, obj*); +obj* l_Array_mforAux(obj*); obj* l_Array_iterateFrom___rarg___boxed(obj*, obj*, obj*, obj*); obj* l_Array_back(obj*); obj* l_Array_miterateAux___main___at_Array_mmap___spec__1___rarg___lambda__1(obj*, obj*, obj*); obj* l___private_init_data_array_basic_1__revIterateAux___main___at_Array_toList___spec__1___boxed(obj*); obj* l_Array_isEqvAux___main(obj*); +obj* l_Array_anyMAux___main___at_Array_allM___spec__1___boxed(obj*, obj*); obj* l_Array_shrink___main(obj*); obj* l___private_init_data_array_basic_1__revIterateAux___main___at_Array_toList___spec__1___rarg(obj*, obj*, obj*, obj*, obj*); +obj* l_Array_anyMAux___boxed(obj*, obj*); obj* l_Array_miterateAux___main___boxed(obj*, obj*, obj*); obj* l_List_toArray(obj*); obj* l_List_redLength___boxed(obj*); obj* l_Array_getOpt___rarg(obj*, obj*); obj* l_Array_reverseAux___main(obj*); obj* l_Array_hmmapAux___main___at_Array_hmap___spec__1(obj*); +obj* l_Array_mfor___rarg(obj*, obj*, obj*, obj*, obj*); obj* l_List_toArrayAux___boxed(obj*); obj* l_Array_hmmapAux___main___at_Array_hmapIdx___spec__1___boxed(obj*); obj* l_Array_append___rarg(obj*, obj*); obj* l_Array_miterate_u_2082Aux___main___at_Array_iterate_u_2082___spec__1___boxed(obj*, obj*); obj* l_Array_mmap___rarg___boxed(obj*, obj*, obj*, obj*); -obj* l_Array_anyAux___main___at_Array_all___spec__1___boxed(obj*); obj* l_Array_Inhabited(obj*); obj* l_Array_miterate_u_2082Aux___main___at_Array_iterate_u_2082___spec__1(obj*, obj*); obj* l_Array_modify___rarg___boxed(obj*, obj*, obj*, obj*); @@ -244,8 +263,10 @@ obj* l_Array_revIterate___rarg(obj*, obj*, obj*); obj* l_Array_HasRepr___rarg___closed__1; obj* l_Array_HasToString(obj*); obj* l_Array_singleton(obj*); +obj* l_Array_allM___rarg___closed__1; obj* l_Array_shrink___rarg___boxed(obj*, obj*); obj* l_List_toArray___boxed(obj*); +obj* l_Array_mforAux___main___rarg(obj*, obj*, obj*, obj*, obj*, obj*); obj* l_Array_hmapIdx___boxed(obj*); obj* l_Array_HasAppend___closed__1; obj* l_Array_isEmpty___rarg___boxed(obj*); @@ -262,16 +283,16 @@ obj* l_Array_empty___boxed(obj*); obj* l_Array_filterAux___main(obj*); obj* l_Array_reverseAux___main___rarg(obj*, obj*); obj* l_Array_HasToString___boxed(obj*); +obj* l_Array_anyMAux___main___rarg___lambda__1(obj*, obj*, obj*, obj*, uint8); obj* l_List_redLength___main___boxed(obj*); -obj* l_Array_anyAux___main(obj*); obj* l_Array_miterateAux(obj*, obj*, obj*); -obj* l_Array_anyAux___main___boxed(obj*); obj* l_Array_extractAux___main(obj*); obj* l_Array_miterate_u_2082Aux___main___at_Array_iterate_u_2082___spec__1___rarg(obj*, obj*, obj*, obj*, obj*, obj*); obj* l_Array_hmmapAux___main___at_Array_hmmap___spec__1___boxed(obj*, obj*); obj* l_Array_modify___boxed(obj*); obj* l_Array_mfindAux___main___at_Array_find___spec__1___rarg___boxed(obj*, obj*, obj*); obj* l_Array_modify___rarg(obj*, obj*, obj*, obj*); +obj* l_Array_mforAux___main___rarg___boxed(obj*, obj*, obj*, obj*, obj*, obj*); obj* l_Array_miterateAux___main___at_Array_map___spec__1(obj*, obj*); obj* l_Array_isEmpty(obj*); obj* l_Array_mfoldl_u_2082___boxed(obj*, obj*, obj*); @@ -281,20 +302,22 @@ obj* l_Array_hmmapAux(obj*, obj*); obj* l_Array_reverse___boxed(obj*); obj* l_Array_foldl_u_2082___rarg(obj*, obj*, obj*, obj*); obj* l_Array_mfoldlFrom___rarg___boxed(obj*, obj*, obj*, obj*, obj*); -obj* l_Array_anyAux___main___rarg___boxed(obj*, obj*, obj*); +obj* l_Array_anyMAux___main___at_Array_allM___spec__1___rarg___lambda__1(obj*, obj*, obj*, obj*, obj*, obj*, uint8); obj* l_Array_HasAppend___boxed(obj*); obj* l_Array_mfoldl(obj*, obj*, obj*); -obj* l_Array_anyAux___rarg___boxed(obj*, obj*, obj*); obj* l_Array_mfind___rarg(obj*, obj*, obj*); obj* l_Array_miterate(obj*, obj*, obj*); obj* l_Array_revFoldl___boxed(obj*, obj*); uint8 l_Array_isEqvAux___main___rarg(obj*, obj*, obj*, obj*, obj*); obj* l_Array_foldlFrom(obj*, obj*); +uint8 l_Array_anyMAux___main___at_Array_any___spec__1___rarg(obj*, obj*, obj*); +obj* l_Array_anyMAux___main___boxed(obj*, obj*); obj* l_Array_isEqvAux___rarg___boxed(obj*, obj*, obj*, obj*, obj*); obj* l_Array_HasRepr___boxed(obj*); obj* l___private_init_data_array_basic_1__revIterateAux___main___at_Array_toList___spec__1(obj*); obj* l___private_init_data_array_basic_1__revIterateAux(obj*, obj*); obj* l_Array_extract___boxed(obj*); +obj* l_Array_anyM(obj*, obj*); obj* l_Array_hmmapAux___main___rarg___lambda__1(obj*, obj*, obj*, obj*, obj*, obj*); obj* l_Array_HasRepr___rarg(obj*); obj* l_Array_find___rarg(obj*, obj*); @@ -311,6 +334,7 @@ obj* l_Array_hmapIdx___rarg(obj*, obj*, obj*); obj* l_Array_getOpt___boxed(obj*); obj* l___private_init_data_array_basic_1__revIterateAux___main___boxed(obj*, obj*); obj* l_Array_shrink(obj*); +obj* l_Array_anyM___rarg(obj*, obj*, obj*); obj* l_Array_miterateAux___main___at_Array_append___spec__1___rarg___boxed(obj*, obj*, obj*, obj*); namespace lean { obj* nat_div(obj*, obj*); @@ -321,6 +345,7 @@ obj* l_Array_hmmap___boxed(obj*, obj*); obj* l_Array_HasToString___rarg(obj*); obj* l_Array_miterateAux___main___at_Array_mfoldl___spec__1___rarg(obj*, obj*, obj*, obj*, obj*, obj*); obj* l_Array_reverse___rarg(obj*); +obj* l_Array_mfor___boxed(obj*); obj* l_Array_mmap___boxed(obj*, obj*); obj* l_Array_shrink___main___boxed(obj*); obj* l_Array_find(obj*, obj*); @@ -330,11 +355,15 @@ obj* l_Array_miterateAux___main___at_Array_mmap___spec__1(obj*, obj*); obj* l_Array_miterate_u_2082Aux___main___at_Array_mfoldl_u_2082___spec__1___rarg___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*); obj* l_Array_miterate_u_2082Aux___main___rarg(obj*, obj*, obj*, obj*, obj*, obj*); obj* l_Array_miterateAux___main___rarg(obj*, obj*, obj*, obj*, obj*); +obj* l_Array_anyMAux___main___at_Array_allM___spec__1(obj*, obj*); obj* l_Array_revIterate(obj*, obj*); +obj* l_Array_mforAux___boxed(obj*); obj* l_Array_miterateAux___main___at_Array_mfoldl___spec__1___rarg___boxed(obj*, obj*, obj*, obj*, obj*, obj*); obj* l_Array_getOpt___rarg___boxed(obj*, obj*); +obj* l_Array_allM___rarg(obj*, obj*, obj*); obj* l_Array_foldl_u_2082___rarg___boxed(obj*, obj*, obj*, obj*); obj* l_Array_miterate_u_2082Aux___main___at_Array_foldl_u_2082___spec__1___rarg(obj*, obj*, obj*, obj*, obj*, obj*); +obj* l_Array_anyM___boxed(obj*, obj*); obj* l_Array_mmap(obj*, obj*); obj* l_Array_find___rarg___boxed(obj*, obj*); obj* l_Array_toList(obj*); @@ -356,7 +385,6 @@ obj* l_Array_foldlFrom___boxed(obj*, obj*); obj* l_Array_modify(obj*); obj* l_Array_mfindAux(obj*, obj*, obj*); obj* l_Array_miterateAux___boxed(obj*, obj*, obj*); -obj* l_Array_anyAux___main___at_Array_all___spec__1___rarg___boxed(obj*, obj*, obj*); obj* l_Array_mkEmpty___boxed(obj*, obj*); obj* l_Array_iterateFrom___rarg(obj*, obj*, obj*, obj*); obj* l_Array_miterateAux___main___at_Array_map___spec__1___boxed(obj*, obj*); @@ -371,6 +399,8 @@ obj* l_Array_miterate_u_2082Aux___rarg(obj*, obj*, obj*, obj*, obj*, obj*); obj* l_Array_back___rarg(obj*, obj*); obj* l_List_redLength___rarg(obj*); obj* l_Array_find___boxed(obj*, obj*); +obj* l_Array_anyMAux___rarg(obj*, obj*, obj*, obj*); +obj* l_Array_mforAux___main(obj*); obj* l_Array_size___boxed(obj* x_0, obj* x_1) { _start: { @@ -2308,17 +2338,348 @@ lean::dec(x_1); return x_2; } } -uint8 l_Array_anyAux___main___rarg(obj* x_0, obj* x_1, obj* x_2) { +obj* l_Array_anyMAux___main___rarg___lambda__1(obj* x_0, obj* x_1, obj* x_2, obj* x_3, uint8 x_4) { +_start: +{ +if (x_4 == 0) +{ +obj* x_5; obj* x_6; obj* x_7; +x_5 = lean::mk_nat_obj(1ul); +x_6 = lean::nat_add(x_0, x_5); +x_7 = l_Array_anyMAux___main___rarg(x_1, x_2, x_3, x_6); +return x_7; +} +else +{ +obj* x_10; obj* x_13; obj* x_16; obj* x_17; +lean::dec(x_3); +lean::dec(x_2); +x_10 = lean::cnstr_get(x_1, 0); +lean::inc(x_10); +lean::dec(x_1); +x_13 = lean::cnstr_get(x_10, 1); +lean::inc(x_13); +lean::dec(x_10); +x_16 = lean::box(x_4); +x_17 = lean::apply_2(x_13, lean::box(0), x_16); +return x_17; +} +} +} +obj* l_Array_anyMAux___main___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { +_start: +{ +obj* x_4; uint8 x_5; +x_4 = lean::array_get_size(x_1); +x_5 = lean::nat_dec_lt(x_3, x_4); +lean::dec(x_4); +if (x_5 == 0) +{ +obj* x_10; obj* x_13; uint8 x_16; obj* x_17; obj* x_18; +lean::dec(x_1); +lean::dec(x_3); +lean::dec(x_2); +x_10 = lean::cnstr_get(x_0, 0); +lean::inc(x_10); +lean::dec(x_0); +x_13 = lean::cnstr_get(x_10, 1); +lean::inc(x_13); +lean::dec(x_10); +x_16 = 0; +x_17 = lean::box(x_16); +x_18 = lean::apply_2(x_13, lean::box(0), x_17); +return x_18; +} +else +{ +obj* x_19; obj* x_21; obj* x_23; obj* x_24; obj* x_25; +x_19 = lean::cnstr_get(x_0, 1); +lean::inc(x_19); +x_21 = lean::array_fget(x_1, x_3); +lean::inc(x_2); +x_23 = lean::apply_1(x_2, x_21); +x_24 = lean::alloc_closure(reinterpret_cast(l_Array_anyMAux___main___rarg___lambda__1___boxed), 5, 4); +lean::closure_set(x_24, 0, x_3); +lean::closure_set(x_24, 1, x_0); +lean::closure_set(x_24, 2, x_1); +lean::closure_set(x_24, 3, x_2); +x_25 = lean::apply_4(x_19, lean::box(0), lean::box(0), x_23, x_24); +return x_25; +} +} +} +obj* l_Array_anyMAux___main(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; +x_2 = lean::alloc_closure(reinterpret_cast(l_Array_anyMAux___main___rarg), 4, 0); +return x_2; +} +} +obj* l_Array_anyMAux___main___rarg___lambda__1___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { +_start: +{ +uint8 x_5; obj* x_6; +x_5 = lean::unbox(x_4); +x_6 = l_Array_anyMAux___main___rarg___lambda__1(x_0, x_1, x_2, x_3, x_5); +lean::dec(x_0); +return x_6; +} +} +obj* l_Array_anyMAux___main___boxed(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; +x_2 = l_Array_anyMAux___main(x_0, x_1); +lean::dec(x_0); +lean::dec(x_1); +return x_2; +} +} +obj* l_Array_anyMAux___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { +_start: +{ +obj* x_4; +x_4 = l_Array_anyMAux___main___rarg(x_0, x_1, x_2, x_3); +return x_4; +} +} +obj* l_Array_anyMAux(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; +x_2 = lean::alloc_closure(reinterpret_cast(l_Array_anyMAux___rarg), 4, 0); +return x_2; +} +} +obj* l_Array_anyMAux___boxed(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; +x_2 = l_Array_anyMAux(x_0, x_1); +lean::dec(x_0); +lean::dec(x_1); +return x_2; +} +} +obj* l_Array_anyM___rarg(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +obj* x_3; obj* x_4; +x_3 = lean::mk_nat_obj(0ul); +x_4 = l_Array_anyMAux___main___rarg(x_0, x_1, x_2, x_3); +return x_4; +} +} +obj* l_Array_anyM(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; +x_2 = lean::alloc_closure(reinterpret_cast(l_Array_anyM___rarg), 3, 0); +return x_2; +} +} +obj* l_Array_anyM___boxed(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; +x_2 = l_Array_anyM(x_0, x_1); +lean::dec(x_0); +lean::dec(x_1); +return x_2; +} +} +obj* l_Array_anyMAux___main___at_Array_allM___spec__1___rarg___lambda__1(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, uint8 x_6) { +_start: +{ +if (x_6 == 0) +{ +obj* x_7; obj* x_8; obj* x_9; +x_7 = lean::mk_nat_obj(1ul); +x_8 = lean::nat_add(x_0, x_7); +x_9 = l_Array_anyMAux___main___at_Array_allM___spec__1___rarg(x_1, x_2, x_3, x_4, x_5, x_8); +return x_9; +} +else +{ +obj* x_14; obj* x_17; obj* x_20; obj* x_21; +lean::dec(x_5); +lean::dec(x_4); +lean::dec(x_3); +lean::dec(x_2); +x_14 = lean::cnstr_get(x_1, 0); +lean::inc(x_14); +lean::dec(x_1); +x_17 = lean::cnstr_get(x_14, 1); +lean::inc(x_17); +lean::dec(x_14); +x_20 = lean::box(x_6); +x_21 = lean::apply_2(x_17, lean::box(0), x_20); +return x_21; +} +} +} +obj* l_Array_anyMAux___main___at_Array_allM___spec__1___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; uint8 x_7; +x_6 = lean::array_get_size(x_4); +x_7 = lean::nat_dec_lt(x_5, x_6); +lean::dec(x_6); +if (x_7 == 0) +{ +obj* x_14; obj* x_17; uint8 x_20; obj* x_21; obj* x_22; +lean::dec(x_5); +lean::dec(x_4); +lean::dec(x_1); +lean::dec(x_3); +lean::dec(x_2); +x_14 = lean::cnstr_get(x_0, 0); +lean::inc(x_14); +lean::dec(x_0); +x_17 = lean::cnstr_get(x_14, 1); +lean::inc(x_17); +lean::dec(x_14); +x_20 = 0; +x_21 = lean::box(x_20); +x_22 = lean::apply_2(x_17, lean::box(0), x_21); +return x_22; +} +else +{ +obj* x_23; obj* x_25; obj* x_27; obj* x_30; obj* x_31; obj* x_32; +x_23 = lean::cnstr_get(x_0, 1); +lean::inc(x_23); +x_25 = lean::array_fget(x_4, x_5); +lean::inc(x_1); +x_27 = lean::apply_1(x_1, x_25); +lean::inc(x_3); +lean::inc(x_2); +x_30 = lean::apply_4(x_2, lean::box(0), lean::box(0), x_3, x_27); +x_31 = lean::alloc_closure(reinterpret_cast(l_Array_anyMAux___main___at_Array_allM___spec__1___rarg___lambda__1___boxed), 7, 6); +lean::closure_set(x_31, 0, x_5); +lean::closure_set(x_31, 1, x_0); +lean::closure_set(x_31, 2, x_1); +lean::closure_set(x_31, 3, x_2); +lean::closure_set(x_31, 4, x_3); +lean::closure_set(x_31, 5, x_4); +x_32 = lean::apply_4(x_23, lean::box(0), lean::box(0), x_30, x_31); +return x_32; +} +} +} +obj* l_Array_anyMAux___main___at_Array_allM___spec__1(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; +x_2 = lean::alloc_closure(reinterpret_cast(l_Array_anyMAux___main___at_Array_allM___spec__1___rarg), 6, 0); +return x_2; +} +} +uint8 l_Array_allM___rarg___lambda__1(uint8 x_0) { +_start: +{ +if (x_0 == 0) +{ +uint8 x_1; +x_1 = 1; +return x_1; +} +else +{ +uint8 x_2; +x_2 = 0; +return x_2; +} +} +} +obj* _init_l_Array_allM___rarg___closed__1() { +_start: +{ +obj* x_0; +x_0 = lean::alloc_closure(reinterpret_cast(l_Array_allM___rarg___lambda__1___boxed), 1, 0); +return x_0; +} +} +obj* l_Array_allM___rarg(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +obj* x_3; obj* x_5; obj* x_8; obj* x_11; obj* x_12; obj* x_14; obj* x_15; +x_3 = lean::cnstr_get(x_0, 0); +lean::inc(x_3); +x_5 = lean::cnstr_get(x_3, 0); +lean::inc(x_5); +lean::dec(x_3); +x_8 = lean::cnstr_get(x_5, 0); +lean::inc(x_8); +lean::dec(x_5); +x_11 = l_Array_allM___rarg___closed__1; +x_12 = lean::mk_nat_obj(0ul); +lean::inc(x_8); +x_14 = l_Array_anyMAux___main___at_Array_allM___spec__1___rarg(x_0, x_2, x_8, x_11, x_1, x_12); +x_15 = lean::apply_4(x_8, lean::box(0), lean::box(0), x_11, x_14); +return x_15; +} +} +obj* l_Array_allM(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; +x_2 = lean::alloc_closure(reinterpret_cast(l_Array_allM___rarg), 3, 0); +return x_2; +} +} +obj* l_Array_anyMAux___main___at_Array_allM___spec__1___rarg___lambda__1___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6) { +_start: +{ +uint8 x_7; obj* x_8; +x_7 = lean::unbox(x_6); +x_8 = l_Array_anyMAux___main___at_Array_allM___spec__1___rarg___lambda__1(x_0, x_1, x_2, x_3, x_4, x_5, x_7); +lean::dec(x_0); +return x_8; +} +} +obj* l_Array_anyMAux___main___at_Array_allM___spec__1___boxed(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; +x_2 = l_Array_anyMAux___main___at_Array_allM___spec__1(x_0, x_1); +lean::dec(x_0); +lean::dec(x_1); +return x_2; +} +} +obj* l_Array_allM___rarg___lambda__1___boxed(obj* x_0) { +_start: +{ +uint8 x_1; uint8 x_2; obj* x_3; +x_1 = lean::unbox(x_0); +x_2 = l_Array_allM___rarg___lambda__1(x_1); +x_3 = lean::box(x_2); +return x_3; +} +} +obj* l_Array_allM___boxed(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; +x_2 = l_Array_allM(x_0, x_1); +lean::dec(x_0); +lean::dec(x_1); +return x_2; +} +} +uint8 l_Array_anyMAux___main___at_Array_any___spec__1___rarg(obj* x_0, obj* x_1, obj* x_2) { _start: { obj* x_3; uint8 x_4; -x_3 = lean::array_get_size(x_0); +x_3 = lean::array_get_size(x_1); x_4 = lean::nat_dec_lt(x_2, x_3); lean::dec(x_3); if (x_4 == 0) { uint8 x_8; -lean::dec(x_1); +lean::dec(x_0); lean::dec(x_2); x_8 = 0; return x_8; @@ -2326,9 +2687,9 @@ return x_8; else { obj* x_9; obj* x_11; uint8 x_12; -x_9 = lean::array_fget(x_0, x_2); -lean::inc(x_1); -x_11 = lean::apply_1(x_1, x_9); +x_9 = lean::array_fget(x_1, x_2); +lean::inc(x_0); +x_11 = lean::apply_1(x_0, x_9); x_12 = lean::unbox(x_11); if (x_12 == 0) { @@ -2341,74 +2702,18 @@ goto _start; } else { -uint8 x_19; -lean::dec(x_1); +lean::dec(x_0); lean::dec(x_2); -x_19 = 1; -return x_19; +return x_12; } } } } -obj* l_Array_anyAux___main(obj* x_0) { +obj* l_Array_anyMAux___main___at_Array_any___spec__1(obj* x_0) { _start: { obj* x_1; -x_1 = lean::alloc_closure(reinterpret_cast(l_Array_anyAux___main___rarg___boxed), 3, 0); -return x_1; -} -} -obj* l_Array_anyAux___main___rarg___boxed(obj* x_0, obj* x_1, obj* x_2) { -_start: -{ -uint8 x_3; obj* x_4; -x_3 = l_Array_anyAux___main___rarg(x_0, x_1, x_2); -x_4 = lean::box(x_3); -lean::dec(x_0); -return x_4; -} -} -obj* l_Array_anyAux___main___boxed(obj* x_0) { -_start: -{ -obj* x_1; -x_1 = l_Array_anyAux___main(x_0); -lean::dec(x_0); -return x_1; -} -} -uint8 l_Array_anyAux___rarg(obj* x_0, obj* x_1, obj* x_2) { -_start: -{ -uint8 x_3; -x_3 = l_Array_anyAux___main___rarg(x_0, x_1, x_2); -return x_3; -} -} -obj* l_Array_anyAux(obj* x_0) { -_start: -{ -obj* x_1; -x_1 = lean::alloc_closure(reinterpret_cast(l_Array_anyAux___rarg___boxed), 3, 0); -return x_1; -} -} -obj* l_Array_anyAux___rarg___boxed(obj* x_0, obj* x_1, obj* x_2) { -_start: -{ -uint8 x_3; obj* x_4; -x_3 = l_Array_anyAux___rarg(x_0, x_1, x_2); -x_4 = lean::box(x_3); -lean::dec(x_0); -return x_4; -} -} -obj* l_Array_anyAux___boxed(obj* x_0) { -_start: -{ -obj* x_1; -x_1 = l_Array_anyAux(x_0); -lean::dec(x_0); +x_1 = lean::alloc_closure(reinterpret_cast(l_Array_anyMAux___main___at_Array_any___spec__1___rarg___boxed), 3, 0); return x_1; } } @@ -2417,7 +2722,7 @@ _start: { obj* x_2; uint8 x_3; x_2 = lean::mk_nat_obj(0ul); -x_3 = l_Array_anyAux___main___rarg(x_0, x_1, x_2); +x_3 = l_Array_anyMAux___main___at_Array_any___spec__1___rarg(x_1, x_0, x_2); return x_3; } } @@ -2429,6 +2734,25 @@ x_1 = lean::alloc_closure(reinterpret_cast(l_Array_any___rarg___boxed), 2 return x_1; } } +obj* l_Array_anyMAux___main___at_Array_any___spec__1___rarg___boxed(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +uint8 x_3; obj* x_4; +x_3 = l_Array_anyMAux___main___at_Array_any___spec__1___rarg(x_0, x_1, x_2); +x_4 = lean::box(x_3); +lean::dec(x_1); +return x_4; +} +} +obj* l_Array_anyMAux___main___at_Array_any___spec__1___boxed(obj* x_0) { +_start: +{ +obj* x_1; +x_1 = l_Array_anyMAux___main___at_Array_any___spec__1(x_0); +lean::dec(x_0); +return x_1; +} +} obj* l_Array_any___rarg___boxed(obj* x_0, obj* x_1) { _start: { @@ -2448,7 +2772,7 @@ lean::dec(x_0); return x_1; } } -uint8 l_Array_anyAux___main___at_Array_all___spec__1___rarg(obj* x_0, obj* x_1, obj* x_2) { +uint8 l_Array_anyMAux___main___at_Array_all___spec__1___rarg(obj* x_0, obj* x_1, obj* x_2) { _start: { obj* x_3; uint8 x_4; @@ -2490,11 +2814,11 @@ goto _start; } } } -obj* l_Array_anyAux___main___at_Array_all___spec__1(obj* x_0) { +obj* l_Array_anyMAux___main___at_Array_all___spec__1(obj* x_0) { _start: { obj* x_1; -x_1 = lean::alloc_closure(reinterpret_cast(l_Array_anyAux___main___at_Array_all___spec__1___rarg___boxed), 3, 0); +x_1 = lean::alloc_closure(reinterpret_cast(l_Array_anyMAux___main___at_Array_all___spec__1___rarg___boxed), 3, 0); return x_1; } } @@ -2503,7 +2827,7 @@ _start: { obj* x_2; uint8 x_3; x_2 = lean::mk_nat_obj(0ul); -x_3 = l_Array_anyAux___main___at_Array_all___spec__1___rarg(x_1, x_0, x_2); +x_3 = l_Array_anyMAux___main___at_Array_all___spec__1___rarg(x_1, x_0, x_2); if (x_3 == 0) { uint8 x_4; @@ -2526,21 +2850,21 @@ x_1 = lean::alloc_closure(reinterpret_cast(l_Array_all___rarg___boxed), 2 return x_1; } } -obj* l_Array_anyAux___main___at_Array_all___spec__1___rarg___boxed(obj* x_0, obj* x_1, obj* x_2) { +obj* l_Array_anyMAux___main___at_Array_all___spec__1___rarg___boxed(obj* x_0, obj* x_1, obj* x_2) { _start: { uint8 x_3; obj* x_4; -x_3 = l_Array_anyAux___main___at_Array_all___spec__1___rarg(x_0, x_1, x_2); +x_3 = l_Array_anyMAux___main___at_Array_all___spec__1___rarg(x_0, x_1, x_2); x_4 = lean::box(x_3); lean::dec(x_1); return x_4; } } -obj* l_Array_anyAux___main___at_Array_all___spec__1___boxed(obj* x_0) { +obj* l_Array_anyMAux___main___at_Array_all___spec__1___boxed(obj* x_0) { _start: { obj* x_1; -x_1 = l_Array_anyAux___main___at_Array_all___spec__1(x_0); +x_1 = l_Array_anyMAux___main___at_Array_all___spec__1(x_0); lean::dec(x_0); return x_1; } @@ -3592,6 +3916,150 @@ lean::dec(x_1); return x_2; } } +obj* l_Array_mforAux___main___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; uint8 x_7; +x_6 = lean::array_get_size(x_4); +x_7 = lean::nat_dec_lt(x_5, x_6); +lean::dec(x_6); +if (x_7 == 0) +{ +obj* x_10; obj* x_13; obj* x_16; obj* x_17; +lean::dec(x_3); +x_10 = lean::cnstr_get(x_0, 0); +lean::inc(x_10); +lean::dec(x_0); +x_13 = lean::cnstr_get(x_10, 1); +lean::inc(x_13); +lean::dec(x_10); +x_16 = lean::box(0); +x_17 = lean::apply_2(x_13, lean::box(0), x_16); +return x_17; +} +else +{ +obj* x_18; obj* x_19; obj* x_21; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_30; +x_18 = lean::array_fget(x_4, x_5); +x_19 = lean::cnstr_get(x_0, 0); +lean::inc(x_19); +x_21 = lean::cnstr_get(x_19, 4); +lean::inc(x_21); +lean::dec(x_19); +lean::inc(x_3); +x_25 = lean::apply_1(x_3, x_18); +x_26 = lean::mk_nat_obj(1ul); +x_27 = lean::nat_add(x_5, x_26); +x_28 = l_Array_mforAux___main___rarg(x_0, lean::box(0), lean::box(0), x_3, x_4, x_27); +lean::dec(x_27); +x_30 = lean::apply_4(x_21, lean::box(0), lean::box(0), x_25, x_28); +return x_30; +} +} +} +obj* l_Array_mforAux___main(obj* x_0) { +_start: +{ +obj* x_1; +x_1 = lean::alloc_closure(reinterpret_cast(l_Array_mforAux___main___rarg___boxed), 6, 0); +return x_1; +} +} +obj* l_Array_mforAux___main___rarg___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; +x_6 = l_Array_mforAux___main___rarg(x_0, x_1, x_2, x_3, x_4, x_5); +lean::dec(x_1); +lean::dec(x_2); +lean::dec(x_4); +lean::dec(x_5); +return x_6; +} +} +obj* l_Array_mforAux___main___boxed(obj* x_0) { +_start: +{ +obj* x_1; +x_1 = l_Array_mforAux___main(x_0); +lean::dec(x_0); +return x_1; +} +} +obj* l_Array_mforAux___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; +x_6 = l_Array_mforAux___main___rarg(x_0, lean::box(0), lean::box(0), x_3, x_4, x_5); +return x_6; +} +} +obj* l_Array_mforAux(obj* x_0) { +_start: +{ +obj* x_1; +x_1 = lean::alloc_closure(reinterpret_cast(l_Array_mforAux___rarg___boxed), 6, 0); +return x_1; +} +} +obj* l_Array_mforAux___rarg___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; +x_6 = l_Array_mforAux___rarg(x_0, x_1, x_2, x_3, x_4, x_5); +lean::dec(x_1); +lean::dec(x_2); +lean::dec(x_4); +lean::dec(x_5); +return x_6; +} +} +obj* l_Array_mforAux___boxed(obj* x_0) { +_start: +{ +obj* x_1; +x_1 = l_Array_mforAux(x_0); +lean::dec(x_0); +return x_1; +} +} +obj* l_Array_mfor___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { +_start: +{ +obj* x_5; obj* x_6; +x_5 = lean::mk_nat_obj(0ul); +x_6 = l_Array_mforAux___main___rarg(x_0, lean::box(0), lean::box(0), x_3, x_4, x_5); +return x_6; +} +} +obj* l_Array_mfor(obj* x_0) { +_start: +{ +obj* x_1; +x_1 = lean::alloc_closure(reinterpret_cast(l_Array_mfor___rarg___boxed), 5, 0); +return x_1; +} +} +obj* l_Array_mfor___rarg___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { +_start: +{ +obj* x_5; +x_5 = l_Array_mfor___rarg(x_0, x_1, x_2, x_3, x_4); +lean::dec(x_1); +lean::dec(x_2); +lean::dec(x_4); +return x_5; +} +} +obj* l_Array_mfor___boxed(obj* x_0) { +_start: +{ +obj* x_1; +x_1 = l_Array_mfor(x_0); +lean::dec(x_0); +return x_1; +} +} obj* l_Array_extractAux___main___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { @@ -4476,6 +4944,8 @@ w = initialize_init_control_id(w); if (io_result_is_error(w)) return w; l_Array_empty___closed__1 = _init_l_Array_empty___closed__1(); lean::mark_persistent(l_Array_empty___closed__1); + l_Array_allM___rarg___closed__1 = _init_l_Array_allM___rarg___closed__1(); +lean::mark_persistent(l_Array_allM___rarg___closed__1); l_Array_HasRepr___rarg___closed__1 = _init_l_Array_HasRepr___rarg___closed__1(); lean::mark_persistent(l_Array_HasRepr___rarg___closed__1); l_Array_HasAppend___closed__1 = _init_l_Array_HasAppend___closed__1(); diff --git a/src/stage0/init/data/string/basic.cpp b/src/stage0/init/data/string/basic.cpp index acc373fe7c..53537153aa 100644 --- a/src/stage0/init/data/string/basic.cpp +++ b/src/stage0/init/data/string/basic.cpp @@ -1407,18 +1407,7 @@ x_1 = lean::string_utf8_byte_size(x_0); x_2 = lean::mk_nat_obj(0ul); x_3 = lean::nat_dec_eq(x_1, x_2); lean::dec(x_1); -if (x_3 == 0) -{ -uint8 x_5; -x_5 = 0; -return x_5; -} -else -{ -uint8 x_6; -x_6 = 1; -return x_6; -} +return x_3; } } obj* l_String_isEmpty___boxed(obj* x_0) { diff --git a/src/stage0/init/io.cpp b/src/stage0/init/io.cpp index 7e4fd3e0bd..2067f3b826 100644 --- a/src/stage0/init/io.cpp +++ b/src/stage0/init/io.cpp @@ -29,6 +29,7 @@ obj* l_IO_Fs_handle_isEof___rarg(obj*, obj*); obj* l_getModify___rarg___lambda__1___boxed(obj*, obj*, obj*); obj* l_IO_Fs_handle_close___rarg(obj*, obj*); obj* l_IO_Ref_swap(obj*, obj*); +obj* l_IO_RefPointed___boxed(obj*); obj* l_EIO_Inhabited___rarg(obj*); obj* l_HasRepr_HasEval___rarg(obj*, obj*, obj*); obj* l_IO_Prim_Ref_swap___boxed(obj*, obj*, obj*, obj*); @@ -152,7 +153,7 @@ obj* l_IO_Fs_handle_isEof___at_IO_Fs_handle_readToEnd___spec__1(obj*, obj*); obj* l_IO_Fs_handle_close(obj*, obj*); obj* l_IO_Fs_handle_mk___rarg(obj*, obj*, uint8, uint8); obj* l_IO_Prim_liftIO___rarg(obj*, obj*); -obj* l_IO_RefPointed; +obj* l_IO_RefPointed(obj*); obj* l_IO_println___rarg___closed__1; obj* l_IO_Prim_mkRef___boxed(obj*, obj*, obj*); obj* l_IO_lazyPure___rarg(obj*, obj*); @@ -1201,12 +1202,21 @@ lean::dec(x_0); return x_1; } } -obj* _init_l_IO_RefPointed() { +obj* l_IO_RefPointed(obj* x_0) { _start: { -obj* x_0; -x_0 = lean::box(0); -return x_0; +obj* x_1; +x_1 = lean::box(0); +return x_1; +} +} +obj* l_IO_RefPointed___boxed(obj* x_0) { +_start: +{ +obj* x_1; +x_1 = l_IO_RefPointed(x_0); +lean::dec(x_0); +return x_1; } } obj* l_IO_Inhabited(obj* x_0) { @@ -1775,7 +1785,5 @@ lean::mark_persistent(l_IO_error_HasToString); lean::mark_persistent(l_IO_error_Inhabited); l_IO_println___rarg___closed__1 = _init_l_IO_println___rarg___closed__1(); lean::mark_persistent(l_IO_println___rarg___closed__1); - l_IO_RefPointed = _init_l_IO_RefPointed(); -lean::mark_persistent(l_IO_RefPointed); return w; } diff --git a/src/stage0/init/lean/compiler/ir/basic.cpp b/src/stage0/init/lean/compiler/ir/basic.cpp index bda688c90a..36c288714a 100644 --- a/src/stage0/init/lean/compiler/ir/basic.cpp +++ b/src/stage0/init/lean/compiler/ir/basic.cpp @@ -14,15 +14,16 @@ typedef lean::uint32 uint32; typedef lean::uint64 uint64; #pragma GCC diagnostic ignored "-Wunused-label" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif +obj* l_RBNode_insert___at_Lean_IR_Context_addDecl___spec__1(obj*, obj*, obj*); obj* l_RBNode_setBlack___main___rarg(obj*); obj* l_Lean_IR_FnBody_beq___boxed(obj*, obj*); -obj* l_Lean_IR_mkJDecl___boxed(obj*, obj*, obj*, obj*, obj*); obj* l_Lean_IR_FnBody_setBody(obj*, obj*); obj* l_Lean_IR_AltCore_mmodifyBody___boxed(obj*); namespace lean { namespace ir { obj* mk_sset_core(obj*, obj*, obj*, obj*, uint8, obj*); }} +uint8 l_Lean_IR_Context_isLocalVar(obj*, obj*); extern "C" uint8 lean_name_dec_eq(obj*, obj*); obj* l_Lean_IR_mkVDecl___boxed(obj*, obj*, obj*, obj*); obj* l_Lean_IR_AltCore_setBody(obj*, obj*); @@ -30,6 +31,7 @@ extern obj* l_Array_empty___closed__1; namespace lean { obj* nat_sub(obj*, obj*); } +obj* l_Lean_IR_vsetInh; obj* l_Lean_IR_VarId_Lean_HasFormat(obj*); obj* l_Lean_IR_Alt_isDefault___boxed(obj*); uint8 l_Lean_IR_IRType_beq(uint8, uint8); @@ -38,14 +40,16 @@ obj* l_Lean_IR_AltCore_mmodifyBody___main___rarg___closed__1; obj* l_Lean_IR_AltCore_mmodifyBody___main(obj*); namespace lean { namespace ir { -obj* mk_jdecl_core(obj*, obj*, uint8, obj*, obj*); +obj* mk_jdecl_core(obj*, obj*, obj*, obj*); }} +obj* l_RBNode_ins___main___at_Lean_IR_Context_addParam___spec__2(obj*, obj*, obj*); namespace lean { namespace ir { obj* mk_var_arg_core(obj*); }} obj* l_Lean_IR_JoinPointId_HasToString___closed__1; obj* l_Lean_IR_mmodifyJPs(obj*); +obj* l_RBNode_balRight___rarg(obj*, obj*, obj*, obj*); obj* l_Lean_IR_FnBody_isTerminal___boxed(obj*); uint8 l_Lean_IR_IRType_beq___main(uint8, uint8); obj* l_Lean_IR_AltCore_mmodifyBody(obj*); @@ -56,19 +60,23 @@ obj* mk_fapp_expr_core(obj*, obj*); }} obj* l_Lean_IR_AltCore_modifyBody___main(obj*, obj*); obj* l_Lean_IR_addParamRename(obj*, obj*, obj*); +uint8 l_Lean_IR_Context_isParam(obj*, obj*); namespace lean { namespace ir { obj* mk_alt_core(obj*, obj*, obj*, obj*, obj*, obj*); }} +obj* l_RBNode_insert___at_Lean_IR_Context_addParam___spec__1(obj*, obj*, obj*); obj* l_Lean_IR_modifyJPs(obj*, obj*); uint8 l_Lean_IR_LitVal_beq___main(obj*, obj*); obj* l_Lean_IR_AltCore_body___main___boxed(obj*); obj* l_Lean_IR_mmodifyJPs___boxed(obj*); obj* l_Lean_IR_mkParam___boxed(obj*, obj*, obj*); obj* l_Lean_IR_CtorInfo_HasBeq; +obj* l_RBNode_find___main___at_Lean_IR_Context_isJP___spec__1(obj*, obj*); uint8 l_Lean_IR_VarId_HasBeq(obj*, obj*); obj* l_Lean_IR_FnBody_body(obj*); obj* l_Array_miterate_u_2082Aux___main___at_Lean_IR_addParamsRename___spec__1___boxed(obj*, obj*, obj*, obj*, obj*); +obj* l_RBNode_ins___main___at_Lean_IR_Context_addDecl___spec__2(obj*, obj*, obj*); obj* l_Lean_IR_FnBody_alphaEqv___boxed(obj*, obj*, obj*); uint8 l_Lean_IR_VarId_alphaEqv(obj*, obj*, obj*); namespace lean { @@ -76,6 +84,7 @@ namespace ir { obj* mk_jmp_core(obj*, obj*); }} obj* l_Lean_IR_AltCore_modifyBody(obj*, obj*); +uint8 l_Lean_IR_Context_contains(obj*, obj*); obj* l_Lean_IR_JoinPointId_HasBeq___boxed(obj*, obj*); obj* l_Lean_IR_FnBody_nil; uint8 l_Lean_IR_FnBody_alphaEqv(obj*, obj*, obj*); @@ -89,13 +98,17 @@ obj* mk_proj_expr_core(obj*, obj*); }} uint8 l_Lean_IR_CtorInfo_beq(obj*, obj*); obj* l_Array_hmmapAux___main___at_Lean_IR_mmodifyJPs___spec__1___rarg___lambda__1(obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_IR_Context_addDecl(obj*, obj*); +obj* l_Lean_IR_Context_addParam(obj*, obj*); obj* l_Lean_IR_Alt_default(obj*); +obj* l_Lean_IR_Context_getJoinPointBody___boxed(obj*, obj*); namespace lean { namespace ir { obj* mk_num_expr_core(obj*); }} uint8 l_Lean_IR_FnBody_isPure(obj*); obj* l_Lean_IR_VarId_hasAeqv; +obj* l_RBNode_erase___at_Lean_IR_Context_eraseJoinPointDecl___spec__1___boxed(obj*, obj*); namespace lean { namespace ir { obj* mk_sproj_expr_core(obj*, obj*, obj*); @@ -104,12 +117,13 @@ uint8 l_Lean_IR_LitVal_beq(obj*, obj*); obj* l_Array_hmmapAux___main___at_Lean_IR_mmodifyJPs___spec__1___rarg___lambda__1___boxed(obj*, obj*, obj*, obj*, obj*); obj* l_Lean_IR_mkSSet___boxed(obj*, obj*, obj*, obj*, obj*, obj*); uint8 l_Lean_IR_Expr_isPure___main(obj*); +obj* l_Lean_IR_Context_eraseJoinPointDecl___boxed(obj*, obj*); obj* l_Nat_repr(obj*); obj* l_Lean_IR_FnBody_alphaEqv___main___boxed(obj*, obj*, obj*); uint8 l_Lean_IR_FnBody_alphaEqv___main(obj*, obj*, obj*); obj* l_Lean_IR_Arg_alphaEqv___boxed(obj*, obj*, obj*); -uint8 l_Array_anyAux___main___at_Lean_IR_FnBody_isPure___main___spec__1(obj*, obj*); obj* l_Array_miterate_u_2082Aux___main___at_Lean_IR_addParamsRename___spec__1(obj*, obj*, obj*, obj*, obj*); +obj* l_RBNode_find___main___at_Lean_IR_Context_isJP___spec__1___boxed(obj*, obj*); obj* l_Lean_IR_AltCore_mmodifyBody___main___boxed(obj*); obj* l_Lean_IR_AltCore_body(obj*); obj* l_Lean_IR_AltCore_mmodifyBody___rarg(obj*, obj*, obj*); @@ -117,27 +131,34 @@ uint8 l_Array_isEqv___at_Lean_IR_FnBody_alphaEqv___main___spec__1(obj*, obj*, ob obj* l_Lean_IR_flattenAux___main(obj*, obj*); obj* l_Lean_IR_reshape(obj*, obj*); obj* l_Lean_IR_JoinPointId_Lean_HasFormat(obj*); -obj* l_Array_hmmapAux___main___at_Lean_IR_mmodifyJPs___spec__1___rarg___lambda__2(obj*, obj*, obj*, uint8, obj*, obj*); +obj* l_Array_hmmapAux___main___at_Lean_IR_mmodifyJPs___spec__1___rarg___lambda__2(obj*, obj*, obj*, obj*, obj*); uint8 l_Array_isEqv___at_Lean_IR_args_alphaEqv___spec__1(obj*, obj*, obj*); namespace lean { namespace ir { obj* mk_case_core(obj*, obj*, obj*); }} +obj* l_Array_anyMAux___main___at_Lean_IR_FnBody_isPure___main___spec__1___boxed(obj*, obj*); namespace lean { obj* string_append(obj*, obj*); } +obj* l_RBNode_balLeft___main___rarg(obj*, obj*, obj*, obj*); +obj* l_RBNode_find___main___at_Lean_IR_Context_isParam___spec__1___boxed(obj*, obj*); obj* l_Lean_IR_addParamsRename(obj*, obj*, obj*); obj* l_Lean_IR_Expr_alphaEqv___boxed(obj*, obj*, obj*); +obj* l_Lean_IR_Context_isParam___boxed(obj*, obj*); obj* l_Lean_IR_args_hasAeqv; namespace lean { uint8 nat_dec_lt(obj*, obj*); } obj* l_Lean_IR_args_alphaEqv___boxed(obj*, obj*, obj*); obj* l_Lean_IR_FnBody_HasBeq; +obj* l_Lean_IR_Decl_id___main(obj*); uint8 l_Lean_IR_Expr_alphaEqv(obj*, obj*, obj*); uint8 l_Lean_IR_FnBody_isTerminal___main(obj*); -obj* l_Array_hmmapAux___main___at_Lean_IR_mmodifyJPs___spec__1___rarg___lambda__2___boxed(obj*, obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_IR_Decl_id___main___boxed(obj*); +obj* l_Lean_IR_Decl_id(obj*); obj* l_Lean_IR_LitVal_beq___boxed(obj*, obj*); +obj* l_RBNode_appendTrees___main___rarg(obj*, obj*); namespace lean { namespace ir { obj* mk_ret_core(obj*); @@ -147,6 +168,7 @@ namespace lean { obj* nat_add(obj*, obj*); } obj* l_Array_isEqv___at_Lean_IR_args_alphaEqv___spec__1___boxed(obj*, obj*, obj*); +obj* l_RBNode_find___main___at_Lean_IR_Context_isParam___spec__1(obj*, obj*); obj* l_Array_isEqv___at_Lean_IR_FnBody_alphaEqv___main___spec__1___lambda__1___boxed(obj*, obj*, obj*); namespace lean { uint8 nat_dec_eq(obj*, obj*); @@ -166,13 +188,13 @@ obj* mk_uset_core(obj*, obj*, obj*, obj*); }} obj* l_Lean_IR_FnBody_body___boxed(obj*); obj* l_Lean_IR_IRType_HasBeq; +obj* l_RBNode_del___main___at_Lean_IR_Context_eraseJoinPointDecl___spec__2___boxed(obj*, obj*); obj* l_Lean_IR_altInh; obj* l_Lean_IR_FnBody_body___main___boxed(obj*); obj* l_Lean_IR_FnBody_isTerminal___main___boxed(obj*); uint8 l_Lean_IR_Alt_isDefault___main(obj*); obj* l_Lean_IR_VarId_HasBeq___boxed(obj*, obj*); obj* l_Lean_IR_Expr_isPure___boxed(obj*); -obj* l_Array_anyAux___main___at_Lean_IR_FnBody_isPure___main___spec__1___boxed(obj*, obj*); obj* l_Lean_IR_FnBody_split(obj*); namespace lean { uint8 string_dec_eq(obj*, obj*); @@ -183,27 +205,30 @@ namespace ir { obj* mk_irrelevant_arg_core; }} obj* l_Lean_IR_Arg_alphaEqv___main___boxed(obj*, obj*, obj*); +uint8 l_Array_anyMAux___main___at_Lean_IR_FnBody_isPure___main___spec__1(obj*, obj*); obj* l_Lean_IR_LitVal_beq___main___boxed(obj*, obj*); namespace lean { namespace ir { obj* mk_app_expr_core(obj*, obj*); }} obj* l_Lean_IR_Expr_isPure___main___boxed(obj*); +obj* l_Lean_IR_Context_isLocalVar___boxed(obj*, obj*); obj* l_Lean_IR_VarId_HasToString(obj*); namespace lean { namespace ir { obj* mk_unreachable_core; }} +uint8 l_RBNode_isBlack___main___rarg(obj*); uint8 l_Lean_IR_FnBody_isTerminal(obj*); obj* l_Lean_IR_addVarRename(obj*, obj*, obj*); obj* l_Array_hmmapAux___main___at_Lean_IR_modifyJPs___spec__1(obj*, obj*, obj*); obj* l_Array_hmmapAux___main___at_Lean_IR_mmodifyJPs___spec__1___rarg(obj*, obj*, obj*, obj*); +obj* l_Lean_IR_Context_eraseJoinPointDecl(obj*, obj*); obj* l_Lean_IR_AltCore_mmodifyBody___main___rarg(obj*, obj*, obj*); uint8 l_Lean_IR_FnBody_isPure___main(obj*); uint8 l_Lean_IR_Arg_alphaEqv___main(obj*, obj*, obj*); obj* l_Lean_IR_VarId_alphaEqv___boxed(obj*, obj*, obj*); obj* l_Lean_IR_AltCore_body___main(obj*); -obj* l_Lean_IR_VarId_lt___boxed(obj*, obj*); obj* l_Lean_IR_mkDecl___boxed(obj*, obj*, obj*, obj*); uint8 l_Lean_IR_CtorInfo_beq___main(obj*, obj*); uint8 l_Lean_IR_FnBody_beq(obj*, obj*); @@ -212,12 +237,12 @@ obj* l_Lean_IR_CtorInfo_beq___main___boxed(obj*, obj*); uint8 l_Lean_IR_Expr_alphaEqv___main(obj*, obj*, obj*); obj* l_Lean_IR_VarId_HasToString___closed__1; uint8 l_Lean_IR_Expr_isPure(obj*); +uint8 l_Lean_IR_Index_lt(obj*, obj*); namespace lean { namespace ir { obj* mk_decl_core(obj*, obj*, uint8, obj*); }} uint8 l_Lean_IR_JoinPointId_HasBeq(obj*, obj*); -uint8 l_Lean_IR_VarId_lt(obj*, obj*); namespace lean { namespace ir { obj* mk_uproj_expr_core(obj*, obj*); @@ -230,10 +255,12 @@ obj* l_Lean_IR_MData_HasEmptyc; obj* l_Lean_IR_FnBody_setBody___main(obj*, obj*); uint8 l_Array_isEqvAux___main___rarg(obj*, obj*, obj*, obj*, obj*); obj* l_Lean_IR_argInh; +obj* l_Lean_IR_Context_contains___boxed(obj*, obj*); obj* l_Lean_IR_FnBody_isPure___main___boxed(obj*); uint8 l_Lean_IR_Alt_isDefault(obj*); obj* l_Lean_IR_FnBody_body___main(obj*); obj* l_Lean_IR_push(obj*, obj*); +uint8 l_Lean_IR_Context_isJP(obj*, obj*); namespace lean { namespace ir { obj* mk_papp_expr_core(obj*, obj*); @@ -248,15 +275,21 @@ namespace ir { obj* mk_vdecl_core(obj*, uint8, obj*, obj*); }} obj* l_Lean_IR_JoinPointId_HasToString(obj*); +obj* l_RBNode_erase___at_Lean_IR_Context_eraseJoinPointDecl___spec__1(obj*, obj*); obj* l_Lean_IR_IRType_beq___boxed(obj*, obj*); obj* l_RBNode_insert___at_Lean_IR_addVarRename___spec__1(obj*, obj*, obj*); +obj* l_Lean_IR_Index_lt___boxed(obj*, obj*); obj* l_Lean_IR_AltCore_setBody___main(obj*, obj*); obj* l_Lean_IR_reshapeAux___main(obj*, obj*, obj*); obj* l_Lean_IR_LitVal_HasBeq; obj* l_RBNode_find___main___at_Lean_IR_VarId_alphaEqv___spec__1___boxed(obj*, obj*); obj* l_Lean_IR_Expr_alphaEqv___main___boxed(obj*, obj*, obj*); +obj* l_Lean_IR_Context_isJP___boxed(obj*, obj*); obj* l_Array_hmmapAux___main___at_Lean_IR_mmodifyJPs___spec__1(obj*); +obj* l_Lean_IR_Context_getJoinPointBody(obj*, obj*); obj* l_Lean_IR_CtorInfo_beq___boxed(obj*, obj*); +obj* l_RBNode_del___main___at_Lean_IR_Context_eraseJoinPointDecl___spec__2(obj*, obj*); +obj* l_Lean_IR_Decl_id___boxed(obj*); obj* l_Lean_IR_reshapeAux(obj*, obj*, obj*); obj* l_Lean_IR_FnBody_resetBody(obj*); obj* l_Array_isEqv___at_Lean_IR_FnBody_alphaEqv___main___spec__1___boxed(obj*, obj*, obj*); @@ -267,6 +300,25 @@ uint8 l_Array_isEqv___at_Lean_IR_FnBody_alphaEqv___main___spec__1___lambda__1(ob obj* l_RBNode_ins___main___at_Lean_IR_addVarRename___spec__2(obj*, obj*, obj*); obj* l_Lean_IR_IRType_beq___main___boxed(obj*, obj*); obj* l_RBNode_find___main___at_Lean_IR_VarId_alphaEqv___spec__1(obj*, obj*); +uint8 l_Lean_IR_Index_lt(obj* x_0, obj* x_1) { +_start: +{ +uint8 x_2; +x_2 = lean::nat_dec_lt(x_0, x_1); +return x_2; +} +} +obj* l_Lean_IR_Index_lt___boxed(obj* x_0, obj* x_1) { +_start: +{ +uint8 x_2; obj* x_3; +x_2 = l_Lean_IR_Index_lt(x_0, x_1); +x_3 = lean::box(x_2); +lean::dec(x_0); +lean::dec(x_1); +return x_3; +} +} uint8 l_Lean_IR_VarId_HasBeq(obj* x_0, obj* x_1) { _start: { @@ -318,25 +370,6 @@ lean::cnstr_set(x_5, 0, x_3); return x_5; } } -uint8 l_Lean_IR_VarId_lt(obj* x_0, obj* x_1) { -_start: -{ -uint8 x_2; -x_2 = lean::nat_dec_lt(x_0, x_1); -return x_2; -} -} -obj* l_Lean_IR_VarId_lt___boxed(obj* x_0, obj* x_1) { -_start: -{ -uint8 x_2; obj* x_3; -x_2 = l_Lean_IR_VarId_lt(x_0, x_1); -x_3 = lean::box(x_2); -lean::dec(x_0); -lean::dec(x_1); -return x_3; -} -} uint8 l_Lean_IR_JoinPointId_HasBeq(obj* x_0, obj* x_1) { _start: { @@ -1021,30 +1054,19 @@ return x_5; } namespace lean { namespace ir { -obj* mk_jdecl_core(obj* x_0, obj* x_1, uint8 x_2, obj* x_3, obj* x_4) { +obj* mk_jdecl_core(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { -obj* x_5; obj* x_6; -x_5 = lean::alloc_cnstr(1, 4, 1); -lean::cnstr_set(x_5, 0, x_0); -lean::cnstr_set(x_5, 1, x_1); -lean::cnstr_set(x_5, 2, x_3); -lean::cnstr_set(x_5, 3, x_4); -lean::cnstr_set_scalar(x_5, sizeof(void*)*4, x_2); -x_6 = x_5; -return x_6; +obj* x_4; +x_4 = lean::alloc_cnstr(1, 4, 0); +lean::cnstr_set(x_4, 0, x_0); +lean::cnstr_set(x_4, 1, x_1); +lean::cnstr_set(x_4, 2, x_2); +lean::cnstr_set(x_4, 3, x_3); +return x_4; } } }} -obj* l_Lean_IR_mkJDecl___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { -_start: -{ -uint8 x_5; obj* x_6; -x_5 = lean::unbox(x_2); -x_6 = lean::ir::mk_jdecl_core(x_0, x_1, x_5, x_3, x_4); -return x_6; -} -} namespace lean { namespace ir { obj* mk_uset_core(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { @@ -1358,219 +1380,216 @@ return x_9; } case 1: { -obj* x_10; obj* x_12; uint8 x_14; obj* x_15; obj* x_17; obj* x_18; obj* x_19; +obj* x_10; obj* x_12; obj* x_14; obj* x_16; obj* x_17; x_10 = lean::cnstr_get(x_0, 0); x_12 = lean::cnstr_get(x_0, 1); -x_14 = lean::cnstr_get_scalar(x_0, sizeof(void*)*4); -x_15 = lean::cnstr_get(x_0, 2); +x_14 = lean::cnstr_get(x_0, 2); if (lean::is_exclusive(x_0)) { lean::cnstr_release(x_0, 3); - x_17 = x_0; + x_16 = x_0; } else { lean::inc(x_10); lean::inc(x_12); - lean::inc(x_15); + lean::inc(x_14); lean::dec(x_0); - x_17 = lean::box(0); + x_16 = lean::box(0); } -if (lean::is_scalar(x_17)) { - x_18 = lean::alloc_cnstr(1, 4, 1); +if (lean::is_scalar(x_16)) { + x_17 = lean::alloc_cnstr(1, 4, 0); } else { - x_18 = x_17; + x_17 = x_16; } -lean::cnstr_set(x_18, 0, x_10); -lean::cnstr_set(x_18, 1, x_12); -lean::cnstr_set(x_18, 2, x_15); -lean::cnstr_set(x_18, 3, x_1); -lean::cnstr_set_scalar(x_18, sizeof(void*)*4, x_14); -x_19 = x_18; -return x_19; +lean::cnstr_set(x_17, 0, x_10); +lean::cnstr_set(x_17, 1, x_12); +lean::cnstr_set(x_17, 2, x_14); +lean::cnstr_set(x_17, 3, x_1); +return x_17; } case 2: { -obj* x_20; obj* x_22; obj* x_24; obj* x_26; obj* x_27; -x_20 = lean::cnstr_get(x_0, 0); -x_22 = lean::cnstr_get(x_0, 1); -x_24 = lean::cnstr_get(x_0, 2); +obj* x_18; obj* x_20; obj* x_22; obj* x_24; obj* x_25; +x_18 = lean::cnstr_get(x_0, 0); +x_20 = lean::cnstr_get(x_0, 1); +x_22 = lean::cnstr_get(x_0, 2); if (lean::is_exclusive(x_0)) { lean::cnstr_release(x_0, 3); - x_26 = x_0; + x_24 = x_0; } else { + lean::inc(x_18); lean::inc(x_20); lean::inc(x_22); - lean::inc(x_24); lean::dec(x_0); - x_26 = lean::box(0); + x_24 = lean::box(0); } -if (lean::is_scalar(x_26)) { - x_27 = lean::alloc_cnstr(2, 4, 0); +if (lean::is_scalar(x_24)) { + x_25 = lean::alloc_cnstr(2, 4, 0); } else { - x_27 = x_26; + x_25 = x_24; } -lean::cnstr_set(x_27, 0, x_20); -lean::cnstr_set(x_27, 1, x_22); -lean::cnstr_set(x_27, 2, x_24); -lean::cnstr_set(x_27, 3, x_1); -return x_27; +lean::cnstr_set(x_25, 0, x_18); +lean::cnstr_set(x_25, 1, x_20); +lean::cnstr_set(x_25, 2, x_22); +lean::cnstr_set(x_25, 3, x_1); +return x_25; } case 3: { -obj* x_28; obj* x_30; obj* x_32; obj* x_34; obj* x_35; -x_28 = lean::cnstr_get(x_0, 0); -x_30 = lean::cnstr_get(x_0, 1); -x_32 = lean::cnstr_get(x_0, 2); +obj* x_26; obj* x_28; obj* x_30; obj* x_32; obj* x_33; +x_26 = lean::cnstr_get(x_0, 0); +x_28 = lean::cnstr_get(x_0, 1); +x_30 = lean::cnstr_get(x_0, 2); if (lean::is_exclusive(x_0)) { lean::cnstr_release(x_0, 3); - x_34 = x_0; + x_32 = x_0; } else { + lean::inc(x_26); lean::inc(x_28); lean::inc(x_30); - lean::inc(x_32); lean::dec(x_0); - x_34 = lean::box(0); + x_32 = lean::box(0); } -if (lean::is_scalar(x_34)) { - x_35 = lean::alloc_cnstr(3, 4, 0); +if (lean::is_scalar(x_32)) { + x_33 = lean::alloc_cnstr(3, 4, 0); } else { - x_35 = x_34; + x_33 = x_32; } -lean::cnstr_set(x_35, 0, x_28); -lean::cnstr_set(x_35, 1, x_30); -lean::cnstr_set(x_35, 2, x_32); -lean::cnstr_set(x_35, 3, x_1); -return x_35; +lean::cnstr_set(x_33, 0, x_26); +lean::cnstr_set(x_33, 1, x_28); +lean::cnstr_set(x_33, 2, x_30); +lean::cnstr_set(x_33, 3, x_1); +return x_33; } case 4: { -obj* x_36; obj* x_38; obj* x_40; obj* x_42; uint8 x_44; obj* x_45; obj* x_46; obj* x_47; -x_36 = lean::cnstr_get(x_0, 0); -x_38 = lean::cnstr_get(x_0, 1); -x_40 = lean::cnstr_get(x_0, 2); -x_42 = lean::cnstr_get(x_0, 3); -x_44 = lean::cnstr_get_scalar(x_0, sizeof(void*)*5); +obj* x_34; obj* x_36; obj* x_38; obj* x_40; uint8 x_42; obj* x_43; obj* x_44; obj* x_45; +x_34 = lean::cnstr_get(x_0, 0); +x_36 = lean::cnstr_get(x_0, 1); +x_38 = lean::cnstr_get(x_0, 2); +x_40 = lean::cnstr_get(x_0, 3); +x_42 = lean::cnstr_get_scalar(x_0, sizeof(void*)*5); if (lean::is_exclusive(x_0)) { lean::cnstr_release(x_0, 4); - x_45 = x_0; + x_43 = x_0; } else { + lean::inc(x_34); lean::inc(x_36); lean::inc(x_38); lean::inc(x_40); - lean::inc(x_42); lean::dec(x_0); - x_45 = lean::box(0); + x_43 = lean::box(0); } -if (lean::is_scalar(x_45)) { - x_46 = lean::alloc_cnstr(4, 5, 1); +if (lean::is_scalar(x_43)) { + x_44 = lean::alloc_cnstr(4, 5, 1); } else { - x_46 = x_45; + x_44 = x_43; } -lean::cnstr_set(x_46, 0, x_36); -lean::cnstr_set(x_46, 1, x_38); -lean::cnstr_set(x_46, 2, x_40); -lean::cnstr_set(x_46, 3, x_42); -lean::cnstr_set(x_46, 4, x_1); -lean::cnstr_set_scalar(x_46, sizeof(void*)*5, x_44); -x_47 = x_46; -return x_47; +lean::cnstr_set(x_44, 0, x_34); +lean::cnstr_set(x_44, 1, x_36); +lean::cnstr_set(x_44, 2, x_38); +lean::cnstr_set(x_44, 3, x_40); +lean::cnstr_set(x_44, 4, x_1); +lean::cnstr_set_scalar(x_44, sizeof(void*)*5, x_42); +x_45 = x_44; +return x_45; } case 5: { -obj* x_48; obj* x_50; obj* x_52; obj* x_53; -x_48 = lean::cnstr_get(x_0, 0); -x_50 = lean::cnstr_get(x_0, 1); +obj* x_46; obj* x_48; obj* x_50; obj* x_51; +x_46 = lean::cnstr_get(x_0, 0); +x_48 = lean::cnstr_get(x_0, 1); if (lean::is_exclusive(x_0)) { lean::cnstr_release(x_0, 2); - x_52 = x_0; + x_50 = x_0; } else { + lean::inc(x_46); lean::inc(x_48); - lean::inc(x_50); lean::dec(x_0); - x_52 = lean::box(0); + x_50 = lean::box(0); } -if (lean::is_scalar(x_52)) { - x_53 = lean::alloc_cnstr(5, 3, 0); +if (lean::is_scalar(x_50)) { + x_51 = lean::alloc_cnstr(5, 3, 0); } else { - x_53 = x_52; + x_51 = x_50; } -lean::cnstr_set(x_53, 0, x_48); -lean::cnstr_set(x_53, 1, x_50); -lean::cnstr_set(x_53, 2, x_1); -return x_53; +lean::cnstr_set(x_51, 0, x_46); +lean::cnstr_set(x_51, 1, x_48); +lean::cnstr_set(x_51, 2, x_1); +return x_51; } case 6: { -obj* x_54; obj* x_56; uint8 x_58; obj* x_59; obj* x_60; obj* x_61; -x_54 = lean::cnstr_get(x_0, 0); -x_56 = lean::cnstr_get(x_0, 1); -x_58 = lean::cnstr_get_scalar(x_0, sizeof(void*)*3); +obj* x_52; obj* x_54; uint8 x_56; obj* x_57; obj* x_58; obj* x_59; +x_52 = lean::cnstr_get(x_0, 0); +x_54 = lean::cnstr_get(x_0, 1); +x_56 = lean::cnstr_get_scalar(x_0, sizeof(void*)*3); if (lean::is_exclusive(x_0)) { lean::cnstr_release(x_0, 2); - x_59 = x_0; + x_57 = x_0; } else { + lean::inc(x_52); lean::inc(x_54); - lean::inc(x_56); lean::dec(x_0); - x_59 = lean::box(0); + x_57 = lean::box(0); } -if (lean::is_scalar(x_59)) { - x_60 = lean::alloc_cnstr(6, 3, 1); +if (lean::is_scalar(x_57)) { + x_58 = lean::alloc_cnstr(6, 3, 1); } else { - x_60 = x_59; + x_58 = x_57; } -lean::cnstr_set(x_60, 0, x_54); -lean::cnstr_set(x_60, 1, x_56); -lean::cnstr_set(x_60, 2, x_1); -lean::cnstr_set_scalar(x_60, sizeof(void*)*3, x_58); -x_61 = x_60; -return x_61; +lean::cnstr_set(x_58, 0, x_52); +lean::cnstr_set(x_58, 1, x_54); +lean::cnstr_set(x_58, 2, x_1); +lean::cnstr_set_scalar(x_58, sizeof(void*)*3, x_56); +x_59 = x_58; +return x_59; } case 7: { -obj* x_62; obj* x_64; uint8 x_66; obj* x_67; obj* x_68; obj* x_69; -x_62 = lean::cnstr_get(x_0, 0); -x_64 = lean::cnstr_get(x_0, 1); -x_66 = lean::cnstr_get_scalar(x_0, sizeof(void*)*3); +obj* x_60; obj* x_62; uint8 x_64; obj* x_65; obj* x_66; obj* x_67; +x_60 = lean::cnstr_get(x_0, 0); +x_62 = lean::cnstr_get(x_0, 1); +x_64 = lean::cnstr_get_scalar(x_0, sizeof(void*)*3); if (lean::is_exclusive(x_0)) { lean::cnstr_release(x_0, 2); - x_67 = x_0; + x_65 = x_0; } else { + lean::inc(x_60); lean::inc(x_62); - lean::inc(x_64); lean::dec(x_0); - x_67 = lean::box(0); + x_65 = lean::box(0); } -if (lean::is_scalar(x_67)) { - x_68 = lean::alloc_cnstr(7, 3, 1); +if (lean::is_scalar(x_65)) { + x_66 = lean::alloc_cnstr(7, 3, 1); } else { - x_68 = x_67; + x_66 = x_65; } -lean::cnstr_set(x_68, 0, x_62); -lean::cnstr_set(x_68, 1, x_64); -lean::cnstr_set(x_68, 2, x_1); -lean::cnstr_set_scalar(x_68, sizeof(void*)*3, x_66); -x_69 = x_68; -return x_69; +lean::cnstr_set(x_66, 0, x_60); +lean::cnstr_set(x_66, 1, x_62); +lean::cnstr_set(x_66, 2, x_1); +lean::cnstr_set_scalar(x_66, sizeof(void*)*3, x_64); +x_67 = x_66; +return x_67; } case 8: { -obj* x_70; obj* x_72; obj* x_73; -x_70 = lean::cnstr_get(x_0, 0); +obj* x_68; obj* x_70; obj* x_71; +x_68 = lean::cnstr_get(x_0, 0); if (lean::is_exclusive(x_0)) { lean::cnstr_release(x_0, 1); - x_72 = x_0; + x_70 = x_0; } else { - lean::inc(x_70); + lean::inc(x_68); lean::dec(x_0); - x_72 = lean::box(0); + x_70 = lean::box(0); } -if (lean::is_scalar(x_72)) { - x_73 = lean::alloc_cnstr(8, 2, 0); +if (lean::is_scalar(x_70)) { + x_71 = lean::alloc_cnstr(8, 2, 0); } else { - x_73 = x_72; + x_71 = x_70; } -lean::cnstr_set(x_73, 0, x_70); -lean::cnstr_set(x_73, 1, x_1); -return x_73; +lean::cnstr_set(x_71, 0, x_68); +lean::cnstr_set(x_71, 1, x_1); +return x_71; } default: { @@ -2123,48 +2142,45 @@ x_12 = lean::nat_add(x_1, x_11); switch (lean::obj_tag(x_8)) { case 1: { -obj* x_13; obj* x_15; uint8 x_17; obj* x_18; obj* x_20; obj* x_22; obj* x_24; obj* x_25; obj* x_26; obj* x_27; +obj* x_13; obj* x_15; obj* x_17; obj* x_19; obj* x_21; obj* x_23; obj* x_24; obj* x_25; x_13 = lean::cnstr_get(x_8, 0); x_15 = lean::cnstr_get(x_8, 1); -x_17 = lean::cnstr_get_scalar(x_8, sizeof(void*)*4); -x_18 = lean::cnstr_get(x_8, 2); -x_20 = lean::cnstr_get(x_8, 3); +x_17 = lean::cnstr_get(x_8, 2); +x_19 = lean::cnstr_get(x_8, 3); if (lean::is_exclusive(x_8)) { - x_22 = x_8; + x_21 = x_8; } else { lean::inc(x_13); lean::inc(x_15); - lean::inc(x_18); - lean::inc(x_20); + lean::inc(x_17); + lean::inc(x_19); lean::dec(x_8); - x_22 = lean::box(0); + x_21 = lean::box(0); } lean::inc(x_0); -x_24 = lean::apply_1(x_0, x_18); -if (lean::is_scalar(x_22)) { - x_25 = lean::alloc_cnstr(1, 4, 1); +x_23 = lean::apply_1(x_0, x_17); +if (lean::is_scalar(x_21)) { + x_24 = lean::alloc_cnstr(1, 4, 0); } else { - x_25 = x_22; + x_24 = x_21; } -lean::cnstr_set(x_25, 0, x_13); -lean::cnstr_set(x_25, 1, x_15); -lean::cnstr_set(x_25, 2, x_24); -lean::cnstr_set(x_25, 3, x_20); -lean::cnstr_set_scalar(x_25, sizeof(void*)*4, x_17); -x_26 = x_25; -x_27 = lean::array_fset(x_10, x_1, x_26); +lean::cnstr_set(x_24, 0, x_13); +lean::cnstr_set(x_24, 1, x_15); +lean::cnstr_set(x_24, 2, x_23); +lean::cnstr_set(x_24, 3, x_19); +x_25 = lean::array_fset(x_10, x_1, x_24); lean::dec(x_1); x_1 = x_12; -x_2 = x_27; +x_2 = x_25; goto _start; } default: { -obj* x_30; -x_30 = lean::array_fset(x_10, x_1, x_8); +obj* x_28; +x_28 = lean::array_fset(x_10, x_1, x_8); lean::dec(x_1); x_1 = x_12; -x_2 = x_30; +x_2 = x_28; goto _start; } } @@ -2191,25 +2207,23 @@ x_8 = l_Array_hmmapAux___main___at_Lean_IR_mmodifyJPs___spec__1___rarg(x_2, x_3, return x_8; } } -obj* l_Array_hmmapAux___main___at_Lean_IR_mmodifyJPs___spec__1___rarg___lambda__2(obj* x_0, obj* x_1, obj* x_2, uint8 x_3, obj* x_4, obj* x_5) { +obj* l_Array_hmmapAux___main___at_Lean_IR_mmodifyJPs___spec__1___rarg___lambda__2(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { -obj* x_6; obj* x_9; obj* x_12; obj* x_13; obj* x_14; -x_6 = lean::cnstr_get(x_0, 0); -lean::inc(x_6); +obj* x_5; obj* x_8; obj* x_11; obj* x_12; +x_5 = lean::cnstr_get(x_0, 0); +lean::inc(x_5); lean::dec(x_0); -x_9 = lean::cnstr_get(x_6, 1); -lean::inc(x_9); -lean::dec(x_6); -x_12 = lean::alloc_cnstr(1, 4, 1); -lean::cnstr_set(x_12, 0, x_1); -lean::cnstr_set(x_12, 1, x_2); -lean::cnstr_set(x_12, 2, x_5); -lean::cnstr_set(x_12, 3, x_4); -lean::cnstr_set_scalar(x_12, sizeof(void*)*4, x_3); -x_13 = x_12; -x_14 = lean::apply_2(x_9, lean::box(0), x_13); -return x_14; +x_8 = lean::cnstr_get(x_5, 1); +lean::inc(x_8); +lean::dec(x_5); +x_11 = lean::alloc_cnstr(1, 4, 0); +lean::cnstr_set(x_11, 0, x_1); +lean::cnstr_set(x_11, 1, x_2); +lean::cnstr_set(x_11, 2, x_4); +lean::cnstr_set(x_11, 3, x_3); +x_12 = lean::apply_2(x_8, lean::box(0), x_11); +return x_12; } } obj* l_Array_hmmapAux___main___at_Lean_IR_mmodifyJPs___spec__1___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { @@ -2251,52 +2265,49 @@ lean::closure_set(x_23, 3, x_1); switch (lean::obj_tag(x_16)) { case 1: { -obj* x_26; obj* x_28; uint8 x_30; obj* x_31; obj* x_33; obj* x_36; obj* x_37; obj* x_38; obj* x_40; obj* x_41; +obj* x_26; obj* x_28; obj* x_30; obj* x_32; obj* x_35; obj* x_36; obj* x_38; obj* x_39; x_26 = lean::cnstr_get(x_16, 0); lean::inc(x_26); x_28 = lean::cnstr_get(x_16, 1); lean::inc(x_28); -x_30 = lean::cnstr_get_scalar(x_16, sizeof(void*)*4); -x_31 = lean::cnstr_get(x_16, 2); -lean::inc(x_31); -x_33 = lean::cnstr_get(x_16, 3); -lean::inc(x_33); +x_30 = lean::cnstr_get(x_16, 2); +lean::inc(x_30); +x_32 = lean::cnstr_get(x_16, 3); +lean::inc(x_32); lean::dec(x_16); -x_36 = lean::apply_1(x_1, x_31); -x_37 = lean::box(x_30); -x_38 = lean::alloc_closure(reinterpret_cast(l_Array_hmmapAux___main___at_Lean_IR_mmodifyJPs___spec__1___rarg___lambda__2___boxed), 6, 5); -lean::closure_set(x_38, 0, x_0); -lean::closure_set(x_38, 1, x_26); -lean::closure_set(x_38, 2, x_28); -lean::closure_set(x_38, 3, x_37); -lean::closure_set(x_38, 4, x_33); +x_35 = lean::apply_1(x_1, x_30); +x_36 = lean::alloc_closure(reinterpret_cast(l_Array_hmmapAux___main___at_Lean_IR_mmodifyJPs___spec__1___rarg___lambda__2), 5, 4); +lean::closure_set(x_36, 0, x_0); +lean::closure_set(x_36, 1, x_26); +lean::closure_set(x_36, 2, x_28); +lean::closure_set(x_36, 3, x_32); lean::inc(x_19); -x_40 = lean::apply_4(x_19, lean::box(0), lean::box(0), x_36, x_38); -x_41 = lean::apply_4(x_19, lean::box(0), lean::box(0), x_40, x_23); -return x_41; +x_38 = lean::apply_4(x_19, lean::box(0), lean::box(0), x_35, x_36); +x_39 = lean::apply_4(x_19, lean::box(0), lean::box(0), x_38, x_23); +return x_39; } default: { -obj* x_43; +obj* x_41; lean::dec(x_1); -x_43 = lean::box(0); -x_24 = x_43; +x_41 = lean::box(0); +x_24 = x_41; goto lbl_25; } } lbl_25: { -obj* x_45; obj* x_48; obj* x_51; obj* x_52; +obj* x_43; obj* x_46; obj* x_49; obj* x_50; lean::dec(x_24); -x_45 = lean::cnstr_get(x_0, 0); -lean::inc(x_45); +x_43 = lean::cnstr_get(x_0, 0); +lean::inc(x_43); lean::dec(x_0); -x_48 = lean::cnstr_get(x_45, 1); -lean::inc(x_48); -lean::dec(x_45); -x_51 = lean::apply_2(x_48, lean::box(0), x_16); -x_52 = lean::apply_4(x_19, lean::box(0), lean::box(0), x_51, x_23); -return x_52; +x_46 = lean::cnstr_get(x_43, 1); +lean::inc(x_46); +lean::dec(x_43); +x_49 = lean::apply_2(x_46, lean::box(0), x_16); +x_50 = lean::apply_4(x_19, lean::box(0), lean::box(0), x_49, x_23); +return x_50; } } } @@ -2335,15 +2346,6 @@ lean::dec(x_0); return x_5; } } -obj* l_Array_hmmapAux___main___at_Lean_IR_mmodifyJPs___spec__1___rarg___lambda__2___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { -_start: -{ -uint8 x_6; obj* x_7; -x_6 = lean::unbox(x_3); -x_7 = l_Array_hmmapAux___main___at_Lean_IR_mmodifyJPs___spec__1___rarg___lambda__2(x_0, x_1, x_2, x_6, x_4, x_5); -return x_7; -} -} obj* l_Array_hmmapAux___main___at_Lean_IR_mmodifyJPs___spec__1___boxed(obj* x_0) { _start: { @@ -2381,6 +2383,41 @@ return x_7; } } }} +obj* l_Lean_IR_Decl_id___main(obj* x_0) { +_start: +{ +obj* x_1; +x_1 = lean::cnstr_get(x_0, 0); +lean::inc(x_1); +return x_1; +} +} +obj* l_Lean_IR_Decl_id___main___boxed(obj* x_0) { +_start: +{ +obj* x_1; +x_1 = l_Lean_IR_Decl_id___main(x_0); +lean::dec(x_0); +return x_1; +} +} +obj* l_Lean_IR_Decl_id(obj* x_0) { +_start: +{ +obj* x_1; +x_1 = l_Lean_IR_Decl_id___main(x_0); +return x_1; +} +} +obj* l_Lean_IR_Decl_id___boxed(obj* x_0) { +_start: +{ +obj* x_1; +x_1 = l_Lean_IR_Decl_id(x_0); +lean::dec(x_0); +return x_1; +} +} namespace lean { namespace ir { obj* mk_decl_core(obj* x_0, obj* x_1, uint8 x_2, obj* x_3) { @@ -2483,7 +2520,7 @@ lean::dec(x_0); return x_2; } } -uint8 l_Array_anyAux___main___at_Lean_IR_FnBody_isPure___main___spec__1(obj* x_0, obj* x_1) { +uint8 l_Array_anyMAux___main___at_Lean_IR_FnBody_isPure___main___spec__1(obj* x_0, obj* x_1) { _start: { obj* x_2; uint8 x_3; @@ -2520,20 +2557,18 @@ goto _start; } else { -uint8 x_18; lean::dec(x_1); -x_18 = 1; -return x_18; +return x_11; } } else { -obj* x_20; obj* x_21; +obj* x_19; obj* x_20; lean::dec(x_7); -x_20 = lean::mk_nat_obj(1ul); -x_21 = lean::nat_add(x_1, x_20); +x_19 = lean::mk_nat_obj(1ul); +x_20 = lean::nat_add(x_1, x_19); lean::dec(x_1); -x_1 = x_21; +x_1 = x_20; goto _start; } } @@ -2605,7 +2640,7 @@ case 9: obj* x_17; obj* x_18; uint8 x_19; x_17 = lean::cnstr_get(x_0, 2); x_18 = lean::mk_nat_obj(0ul); -x_19 = l_Array_anyAux___main___at_Lean_IR_FnBody_isPure___main___spec__1(x_17, x_18); +x_19 = l_Array_anyMAux___main___at_Lean_IR_FnBody_isPure___main___spec__1(x_17, x_18); return x_19; } case 10: @@ -2635,11 +2670,11 @@ return x_23; } } } -obj* l_Array_anyAux___main___at_Lean_IR_FnBody_isPure___main___spec__1___boxed(obj* x_0, obj* x_1) { +obj* l_Array_anyMAux___main___at_Lean_IR_FnBody_isPure___main___spec__1___boxed(obj* x_0, obj* x_1) { _start: { uint8 x_2; obj* x_3; -x_2 = l_Array_anyAux___main___at_Lean_IR_FnBody_isPure___main___spec__1(x_0, x_1); +x_2 = l_Array_anyMAux___main___at_Lean_IR_FnBody_isPure___main___spec__1(x_0, x_1); x_3 = lean::box(x_2); lean::dec(x_0); return x_3; @@ -2673,6 +2708,2842 @@ lean::dec(x_0); return x_2; } } +obj* _init_l_Lean_IR_vsetInh() { +_start: +{ +obj* x_0; +x_0 = lean::box(0); +return x_0; +} +} +obj* l_RBNode_ins___main___at_Lean_IR_Context_addDecl___spec__2(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +if (lean::obj_tag(x_0) == 0) +{ +uint8 x_3; obj* x_4; obj* x_5; +x_3 = 0; +x_4 = lean::alloc_cnstr(1, 4, 1); +lean::cnstr_set(x_4, 0, x_0); +lean::cnstr_set(x_4, 1, x_1); +lean::cnstr_set(x_4, 2, x_2); +lean::cnstr_set(x_4, 3, x_0); +lean::cnstr_set_scalar(x_4, sizeof(void*)*4, x_3); +x_5 = x_4; +return x_5; +} +else +{ +uint8 x_6; +x_6 = lean::cnstr_get_scalar(x_0, sizeof(void*)*4); +if (x_6 == 0) +{ +obj* x_7; obj* x_9; obj* x_11; obj* x_13; obj* x_15; uint8 x_16; +x_7 = lean::cnstr_get(x_0, 0); +x_9 = lean::cnstr_get(x_0, 1); +x_11 = lean::cnstr_get(x_0, 2); +x_13 = lean::cnstr_get(x_0, 3); +if (lean::is_exclusive(x_0)) { + lean::cnstr_set(x_0, 0, lean::box(0)); + lean::cnstr_set(x_0, 1, lean::box(0)); + lean::cnstr_set(x_0, 2, lean::box(0)); + lean::cnstr_set(x_0, 3, lean::box(0)); + x_15 = x_0; +} else { + lean::inc(x_7); + lean::inc(x_9); + lean::inc(x_11); + lean::inc(x_13); + lean::dec(x_0); + x_15 = lean::box(0); +} +x_16 = lean::nat_dec_lt(x_1, x_9); +if (x_16 == 0) +{ +uint8 x_17; +x_17 = lean::nat_dec_lt(x_9, x_1); +if (x_17 == 0) +{ +obj* x_20; obj* x_21; +lean::dec(x_9); +lean::dec(x_11); +if (lean::is_scalar(x_15)) { + x_20 = lean::alloc_cnstr(1, 4, 1); +} else { + x_20 = x_15; +} +lean::cnstr_set(x_20, 0, x_7); +lean::cnstr_set(x_20, 1, x_1); +lean::cnstr_set(x_20, 2, x_2); +lean::cnstr_set(x_20, 3, x_13); +lean::cnstr_set_scalar(x_20, sizeof(void*)*4, x_6); +x_21 = x_20; +return x_21; +} +else +{ +obj* x_22; obj* x_23; obj* x_24; +x_22 = l_RBNode_ins___main___at_Lean_IR_Context_addDecl___spec__2(x_13, x_1, x_2); +if (lean::is_scalar(x_15)) { + x_23 = lean::alloc_cnstr(1, 4, 1); +} else { + x_23 = x_15; +} +lean::cnstr_set(x_23, 0, x_7); +lean::cnstr_set(x_23, 1, x_9); +lean::cnstr_set(x_23, 2, x_11); +lean::cnstr_set(x_23, 3, x_22); +lean::cnstr_set_scalar(x_23, sizeof(void*)*4, x_6); +x_24 = x_23; +return x_24; +} +} +else +{ +obj* x_25; obj* x_26; obj* x_27; +x_25 = l_RBNode_ins___main___at_Lean_IR_Context_addDecl___spec__2(x_7, x_1, x_2); +if (lean::is_scalar(x_15)) { + x_26 = lean::alloc_cnstr(1, 4, 1); +} else { + x_26 = x_15; +} +lean::cnstr_set(x_26, 0, x_25); +lean::cnstr_set(x_26, 1, x_9); +lean::cnstr_set(x_26, 2, x_11); +lean::cnstr_set(x_26, 3, x_13); +lean::cnstr_set_scalar(x_26, sizeof(void*)*4, x_6); +x_27 = x_26; +return x_27; +} +} +else +{ +obj* x_28; obj* x_30; obj* x_32; obj* x_34; obj* x_36; uint8 x_37; +x_28 = lean::cnstr_get(x_0, 0); +x_30 = lean::cnstr_get(x_0, 1); +x_32 = lean::cnstr_get(x_0, 2); +x_34 = lean::cnstr_get(x_0, 3); +if (lean::is_exclusive(x_0)) { + lean::cnstr_set(x_0, 0, lean::box(0)); + lean::cnstr_set(x_0, 1, lean::box(0)); + lean::cnstr_set(x_0, 2, lean::box(0)); + lean::cnstr_set(x_0, 3, lean::box(0)); + x_36 = x_0; +} else { + lean::inc(x_28); + lean::inc(x_30); + lean::inc(x_32); + lean::inc(x_34); + lean::dec(x_0); + x_36 = lean::box(0); +} +x_37 = lean::nat_dec_lt(x_1, x_30); +if (x_37 == 0) +{ +uint8 x_38; +x_38 = lean::nat_dec_lt(x_30, x_1); +if (x_38 == 0) +{ +obj* x_41; obj* x_42; +lean::dec(x_32); +lean::dec(x_30); +if (lean::is_scalar(x_36)) { + x_41 = lean::alloc_cnstr(1, 4, 1); +} else { + x_41 = x_36; +} +lean::cnstr_set(x_41, 0, x_28); +lean::cnstr_set(x_41, 1, x_1); +lean::cnstr_set(x_41, 2, x_2); +lean::cnstr_set(x_41, 3, x_34); +lean::cnstr_set_scalar(x_41, sizeof(void*)*4, x_6); +x_42 = x_41; +return x_42; +} +else +{ +uint8 x_43; +x_43 = l_RBNode_isRed___main___rarg(x_34); +if (x_43 == 0) +{ +obj* x_44; obj* x_45; obj* x_46; +x_44 = l_RBNode_ins___main___at_Lean_IR_Context_addDecl___spec__2(x_34, x_1, x_2); +if (lean::is_scalar(x_36)) { + x_45 = lean::alloc_cnstr(1, 4, 1); +} else { + x_45 = x_36; +} +lean::cnstr_set(x_45, 0, x_28); +lean::cnstr_set(x_45, 1, x_30); +lean::cnstr_set(x_45, 2, x_32); +lean::cnstr_set(x_45, 3, x_44); +lean::cnstr_set_scalar(x_45, sizeof(void*)*4, x_6); +x_46 = x_45; +return x_46; +} +else +{ +obj* x_47; +x_47 = l_RBNode_ins___main___at_Lean_IR_Context_addDecl___spec__2(x_34, x_1, x_2); +if (lean::obj_tag(x_47) == 0) +{ +lean::dec(x_32); +lean::dec(x_36); +lean::dec(x_30); +lean::dec(x_28); +return x_47; +} +else +{ +obj* x_52; +x_52 = lean::cnstr_get(x_47, 0); +lean::inc(x_52); +if (lean::obj_tag(x_52) == 0) +{ +obj* x_54; +x_54 = lean::cnstr_get(x_47, 3); +lean::inc(x_54); +if (lean::obj_tag(x_54) == 0) +{ +obj* x_56; obj* x_58; obj* x_60; uint8 x_61; obj* x_62; obj* x_63; uint8 x_64; obj* x_65; obj* x_66; +x_56 = lean::cnstr_get(x_47, 1); +x_58 = lean::cnstr_get(x_47, 2); +if (lean::is_exclusive(x_47)) { + lean::cnstr_release(x_47, 0); + lean::cnstr_release(x_47, 3); + x_60 = x_47; +} else { + lean::inc(x_56); + lean::inc(x_58); + lean::dec(x_47); + x_60 = lean::box(0); +} +x_61 = 0; +if (lean::is_scalar(x_60)) { + x_62 = lean::alloc_cnstr(1, 4, 1); +} else { + x_62 = x_60; +} +lean::cnstr_set(x_62, 0, x_54); +lean::cnstr_set(x_62, 1, x_56); +lean::cnstr_set(x_62, 2, x_58); +lean::cnstr_set(x_62, 3, x_54); +lean::cnstr_set_scalar(x_62, sizeof(void*)*4, x_61); +x_63 = x_62; +x_64 = 1; +if (lean::is_scalar(x_36)) { + x_65 = lean::alloc_cnstr(1, 4, 1); +} else { + x_65 = x_36; +} +lean::cnstr_set(x_65, 0, x_28); +lean::cnstr_set(x_65, 1, x_30); +lean::cnstr_set(x_65, 2, x_32); +lean::cnstr_set(x_65, 3, x_63); +lean::cnstr_set_scalar(x_65, sizeof(void*)*4, x_64); +x_66 = x_65; +return x_66; +} +else +{ +uint8 x_67; +x_67 = lean::cnstr_get_scalar(x_54, sizeof(void*)*4); +if (x_67 == 0) +{ +obj* x_68; obj* x_70; obj* x_72; obj* x_73; obj* x_75; obj* x_77; obj* x_79; obj* x_81; uint8 x_82; obj* x_83; obj* x_84; obj* x_85; obj* x_86; obj* x_87; obj* x_88; +x_68 = lean::cnstr_get(x_47, 1); +x_70 = lean::cnstr_get(x_47, 2); +if (lean::is_exclusive(x_47)) { + lean::cnstr_release(x_47, 0); + lean::cnstr_release(x_47, 3); + x_72 = x_47; +} else { + lean::inc(x_68); + lean::inc(x_70); + lean::dec(x_47); + x_72 = lean::box(0); +} +x_73 = lean::cnstr_get(x_54, 0); +x_75 = lean::cnstr_get(x_54, 1); +x_77 = lean::cnstr_get(x_54, 2); +x_79 = lean::cnstr_get(x_54, 3); +if (lean::is_exclusive(x_54)) { + x_81 = x_54; +} else { + lean::inc(x_73); + lean::inc(x_75); + lean::inc(x_77); + lean::inc(x_79); + lean::dec(x_54); + x_81 = lean::box(0); +} +x_82 = 1; +if (lean::is_scalar(x_81)) { + x_83 = lean::alloc_cnstr(1, 4, 1); +} else { + x_83 = x_81; +} +lean::cnstr_set(x_83, 0, x_28); +lean::cnstr_set(x_83, 1, x_30); +lean::cnstr_set(x_83, 2, x_32); +lean::cnstr_set(x_83, 3, x_52); +lean::cnstr_set_scalar(x_83, sizeof(void*)*4, x_82); +x_84 = x_83; +if (lean::is_scalar(x_72)) { + x_85 = lean::alloc_cnstr(1, 4, 1); +} else { + x_85 = x_72; +} +lean::cnstr_set(x_85, 0, x_73); +lean::cnstr_set(x_85, 1, x_75); +lean::cnstr_set(x_85, 2, x_77); +lean::cnstr_set(x_85, 3, x_79); +lean::cnstr_set_scalar(x_85, sizeof(void*)*4, x_82); +x_86 = x_85; +if (lean::is_scalar(x_36)) { + x_87 = lean::alloc_cnstr(1, 4, 1); +} else { + x_87 = x_36; +} +lean::cnstr_set(x_87, 0, x_84); +lean::cnstr_set(x_87, 1, x_68); +lean::cnstr_set(x_87, 2, x_70); +lean::cnstr_set(x_87, 3, x_86); +lean::cnstr_set_scalar(x_87, sizeof(void*)*4, x_67); +x_88 = x_87; +return x_88; +} +else +{ +obj* x_89; obj* x_91; obj* x_93; uint8 x_94; obj* x_95; obj* x_96; obj* x_97; obj* x_98; +x_89 = lean::cnstr_get(x_47, 1); +x_91 = lean::cnstr_get(x_47, 2); +if (lean::is_exclusive(x_47)) { + lean::cnstr_release(x_47, 0); + lean::cnstr_release(x_47, 3); + x_93 = x_47; +} else { + lean::inc(x_89); + lean::inc(x_91); + lean::dec(x_47); + x_93 = lean::box(0); +} +x_94 = 0; +if (lean::is_scalar(x_93)) { + x_95 = lean::alloc_cnstr(1, 4, 1); +} else { + x_95 = x_93; +} +lean::cnstr_set(x_95, 0, x_52); +lean::cnstr_set(x_95, 1, x_89); +lean::cnstr_set(x_95, 2, x_91); +lean::cnstr_set(x_95, 3, x_54); +lean::cnstr_set_scalar(x_95, sizeof(void*)*4, x_94); +x_96 = x_95; +if (lean::is_scalar(x_36)) { + x_97 = lean::alloc_cnstr(1, 4, 1); +} else { + x_97 = x_36; +} +lean::cnstr_set(x_97, 0, x_28); +lean::cnstr_set(x_97, 1, x_30); +lean::cnstr_set(x_97, 2, x_32); +lean::cnstr_set(x_97, 3, x_96); +lean::cnstr_set_scalar(x_97, sizeof(void*)*4, x_67); +x_98 = x_97; +return x_98; +} +} +} +else +{ +uint8 x_99; +x_99 = lean::cnstr_get_scalar(x_52, sizeof(void*)*4); +if (x_99 == 0) +{ +obj* x_100; obj* x_102; obj* x_104; obj* x_106; obj* x_107; obj* x_109; obj* x_111; obj* x_113; obj* x_115; uint8 x_116; obj* x_117; obj* x_118; obj* x_119; obj* x_120; obj* x_121; obj* x_122; +x_100 = lean::cnstr_get(x_47, 1); +x_102 = lean::cnstr_get(x_47, 2); +x_104 = lean::cnstr_get(x_47, 3); +if (lean::is_exclusive(x_47)) { + lean::cnstr_release(x_47, 0); + x_106 = x_47; +} else { + lean::inc(x_100); + lean::inc(x_102); + lean::inc(x_104); + lean::dec(x_47); + x_106 = lean::box(0); +} +x_107 = lean::cnstr_get(x_52, 0); +x_109 = lean::cnstr_get(x_52, 1); +x_111 = lean::cnstr_get(x_52, 2); +x_113 = lean::cnstr_get(x_52, 3); +if (lean::is_exclusive(x_52)) { + x_115 = x_52; +} else { + lean::inc(x_107); + lean::inc(x_109); + lean::inc(x_111); + lean::inc(x_113); + lean::dec(x_52); + x_115 = lean::box(0); +} +x_116 = 1; +if (lean::is_scalar(x_115)) { + x_117 = lean::alloc_cnstr(1, 4, 1); +} else { + x_117 = x_115; +} +lean::cnstr_set(x_117, 0, x_28); +lean::cnstr_set(x_117, 1, x_30); +lean::cnstr_set(x_117, 2, x_32); +lean::cnstr_set(x_117, 3, x_107); +lean::cnstr_set_scalar(x_117, sizeof(void*)*4, x_116); +x_118 = x_117; +if (lean::is_scalar(x_106)) { + x_119 = lean::alloc_cnstr(1, 4, 1); +} else { + x_119 = x_106; +} +lean::cnstr_set(x_119, 0, x_113); +lean::cnstr_set(x_119, 1, x_100); +lean::cnstr_set(x_119, 2, x_102); +lean::cnstr_set(x_119, 3, x_104); +lean::cnstr_set_scalar(x_119, sizeof(void*)*4, x_116); +x_120 = x_119; +if (lean::is_scalar(x_36)) { + x_121 = lean::alloc_cnstr(1, 4, 1); +} else { + x_121 = x_36; +} +lean::cnstr_set(x_121, 0, x_118); +lean::cnstr_set(x_121, 1, x_109); +lean::cnstr_set(x_121, 2, x_111); +lean::cnstr_set(x_121, 3, x_120); +lean::cnstr_set_scalar(x_121, sizeof(void*)*4, x_99); +x_122 = x_121; +return x_122; +} +else +{ +obj* x_123; +x_123 = lean::cnstr_get(x_47, 3); +lean::inc(x_123); +if (lean::obj_tag(x_123) == 0) +{ +obj* x_125; obj* x_127; obj* x_129; uint8 x_130; obj* x_131; obj* x_132; obj* x_133; obj* x_134; +x_125 = lean::cnstr_get(x_47, 1); +x_127 = lean::cnstr_get(x_47, 2); +if (lean::is_exclusive(x_47)) { + lean::cnstr_release(x_47, 0); + lean::cnstr_release(x_47, 3); + x_129 = x_47; +} else { + lean::inc(x_125); + lean::inc(x_127); + lean::dec(x_47); + x_129 = lean::box(0); +} +x_130 = 0; +if (lean::is_scalar(x_129)) { + x_131 = lean::alloc_cnstr(1, 4, 1); +} else { + x_131 = x_129; +} +lean::cnstr_set(x_131, 0, x_52); +lean::cnstr_set(x_131, 1, x_125); +lean::cnstr_set(x_131, 2, x_127); +lean::cnstr_set(x_131, 3, x_123); +lean::cnstr_set_scalar(x_131, sizeof(void*)*4, x_130); +x_132 = x_131; +if (lean::is_scalar(x_36)) { + x_133 = lean::alloc_cnstr(1, 4, 1); +} else { + x_133 = x_36; +} +lean::cnstr_set(x_133, 0, x_28); +lean::cnstr_set(x_133, 1, x_30); +lean::cnstr_set(x_133, 2, x_32); +lean::cnstr_set(x_133, 3, x_132); +lean::cnstr_set_scalar(x_133, sizeof(void*)*4, x_99); +x_134 = x_133; +return x_134; +} +else +{ +uint8 x_135; +x_135 = lean::cnstr_get_scalar(x_123, sizeof(void*)*4); +if (x_135 == 0) +{ +obj* x_137; obj* x_139; obj* x_141; obj* x_142; obj* x_144; obj* x_146; obj* x_148; obj* x_150; obj* x_152; obj* x_153; obj* x_154; obj* x_155; obj* x_156; obj* x_157; obj* x_158; +lean::dec(x_36); +x_137 = lean::cnstr_get(x_47, 1); +x_139 = lean::cnstr_get(x_47, 2); +if (lean::is_exclusive(x_47)) { + lean::cnstr_release(x_47, 0); + lean::cnstr_release(x_47, 3); + x_141 = x_47; +} else { + lean::inc(x_137); + lean::inc(x_139); + lean::dec(x_47); + x_141 = lean::box(0); +} +x_142 = lean::cnstr_get(x_123, 0); +x_144 = lean::cnstr_get(x_123, 1); +x_146 = lean::cnstr_get(x_123, 2); +x_148 = lean::cnstr_get(x_123, 3); +if (lean::is_exclusive(x_123)) { + x_150 = x_123; +} else { + lean::inc(x_142); + lean::inc(x_144); + lean::inc(x_146); + lean::inc(x_148); + lean::dec(x_123); + x_150 = lean::box(0); +} +lean::inc(x_52); +if (lean::is_scalar(x_150)) { + x_152 = lean::alloc_cnstr(1, 4, 1); +} else { + x_152 = x_150; +} +lean::cnstr_set(x_152, 0, x_28); +lean::cnstr_set(x_152, 1, x_30); +lean::cnstr_set(x_152, 2, x_32); +lean::cnstr_set(x_152, 3, x_52); +if (lean::is_exclusive(x_52)) { + lean::cnstr_release(x_52, 0); + lean::cnstr_release(x_52, 1); + lean::cnstr_release(x_52, 2); + lean::cnstr_release(x_52, 3); + x_153 = x_52; +} else { + lean::dec(x_52); + x_153 = lean::box(0); +} +lean::cnstr_set_scalar(x_152, sizeof(void*)*4, x_99); +x_154 = x_152; +if (lean::is_scalar(x_153)) { + x_155 = lean::alloc_cnstr(1, 4, 1); +} else { + x_155 = x_153; +} +lean::cnstr_set(x_155, 0, x_142); +lean::cnstr_set(x_155, 1, x_144); +lean::cnstr_set(x_155, 2, x_146); +lean::cnstr_set(x_155, 3, x_148); +lean::cnstr_set_scalar(x_155, sizeof(void*)*4, x_99); +x_156 = x_155; +if (lean::is_scalar(x_141)) { + x_157 = lean::alloc_cnstr(1, 4, 1); +} else { + x_157 = x_141; +} +lean::cnstr_set(x_157, 0, x_154); +lean::cnstr_set(x_157, 1, x_137); +lean::cnstr_set(x_157, 2, x_139); +lean::cnstr_set(x_157, 3, x_156); +lean::cnstr_set_scalar(x_157, sizeof(void*)*4, x_135); +x_158 = x_157; +return x_158; +} +else +{ +obj* x_159; obj* x_161; obj* x_163; obj* x_164; obj* x_166; obj* x_168; obj* x_170; obj* x_172; obj* x_173; obj* x_174; uint8 x_175; obj* x_176; obj* x_177; obj* x_178; obj* x_179; +x_159 = lean::cnstr_get(x_47, 1); +x_161 = lean::cnstr_get(x_47, 2); +if (lean::is_exclusive(x_47)) { + lean::cnstr_release(x_47, 0); + lean::cnstr_release(x_47, 3); + x_163 = x_47; +} else { + lean::inc(x_159); + lean::inc(x_161); + lean::dec(x_47); + x_163 = lean::box(0); +} +x_164 = lean::cnstr_get(x_52, 0); +x_166 = lean::cnstr_get(x_52, 1); +x_168 = lean::cnstr_get(x_52, 2); +x_170 = lean::cnstr_get(x_52, 3); +if (lean::is_exclusive(x_52)) { + x_172 = x_52; +} else { + lean::inc(x_164); + lean::inc(x_166); + lean::inc(x_168); + lean::inc(x_170); + lean::dec(x_52); + x_172 = lean::box(0); +} +if (lean::is_scalar(x_172)) { + x_173 = lean::alloc_cnstr(1, 4, 1); +} else { + x_173 = x_172; +} +lean::cnstr_set(x_173, 0, x_164); +lean::cnstr_set(x_173, 1, x_166); +lean::cnstr_set(x_173, 2, x_168); +lean::cnstr_set(x_173, 3, x_170); +lean::cnstr_set_scalar(x_173, sizeof(void*)*4, x_135); +x_174 = x_173; +x_175 = 0; +if (lean::is_scalar(x_163)) { + x_176 = lean::alloc_cnstr(1, 4, 1); +} else { + x_176 = x_163; +} +lean::cnstr_set(x_176, 0, x_174); +lean::cnstr_set(x_176, 1, x_159); +lean::cnstr_set(x_176, 2, x_161); +lean::cnstr_set(x_176, 3, x_123); +lean::cnstr_set_scalar(x_176, sizeof(void*)*4, x_175); +x_177 = x_176; +if (lean::is_scalar(x_36)) { + x_178 = lean::alloc_cnstr(1, 4, 1); +} else { + x_178 = x_36; +} +lean::cnstr_set(x_178, 0, x_28); +lean::cnstr_set(x_178, 1, x_30); +lean::cnstr_set(x_178, 2, x_32); +lean::cnstr_set(x_178, 3, x_177); +lean::cnstr_set_scalar(x_178, sizeof(void*)*4, x_135); +x_179 = x_178; +return x_179; +} +} +} +} +} +} +} +} +else +{ +uint8 x_180; +x_180 = l_RBNode_isRed___main___rarg(x_28); +if (x_180 == 0) +{ +obj* x_181; obj* x_182; obj* x_183; +x_181 = l_RBNode_ins___main___at_Lean_IR_Context_addDecl___spec__2(x_28, x_1, x_2); +if (lean::is_scalar(x_36)) { + x_182 = lean::alloc_cnstr(1, 4, 1); +} else { + x_182 = x_36; +} +lean::cnstr_set(x_182, 0, x_181); +lean::cnstr_set(x_182, 1, x_30); +lean::cnstr_set(x_182, 2, x_32); +lean::cnstr_set(x_182, 3, x_34); +lean::cnstr_set_scalar(x_182, sizeof(void*)*4, x_6); +x_183 = x_182; +return x_183; +} +else +{ +obj* x_184; +x_184 = l_RBNode_ins___main___at_Lean_IR_Context_addDecl___spec__2(x_28, x_1, x_2); +if (lean::obj_tag(x_184) == 0) +{ +lean::dec(x_32); +lean::dec(x_36); +lean::dec(x_30); +lean::dec(x_34); +return x_184; +} +else +{ +obj* x_189; +x_189 = lean::cnstr_get(x_184, 0); +lean::inc(x_189); +if (lean::obj_tag(x_189) == 0) +{ +obj* x_191; +x_191 = lean::cnstr_get(x_184, 3); +lean::inc(x_191); +if (lean::obj_tag(x_191) == 0) +{ +obj* x_193; obj* x_195; obj* x_197; uint8 x_198; obj* x_199; obj* x_200; uint8 x_201; obj* x_202; obj* x_203; +x_193 = lean::cnstr_get(x_184, 1); +x_195 = lean::cnstr_get(x_184, 2); +if (lean::is_exclusive(x_184)) { + lean::cnstr_release(x_184, 0); + lean::cnstr_release(x_184, 3); + x_197 = x_184; +} else { + lean::inc(x_193); + lean::inc(x_195); + lean::dec(x_184); + x_197 = lean::box(0); +} +x_198 = 0; +if (lean::is_scalar(x_197)) { + x_199 = lean::alloc_cnstr(1, 4, 1); +} else { + x_199 = x_197; +} +lean::cnstr_set(x_199, 0, x_191); +lean::cnstr_set(x_199, 1, x_193); +lean::cnstr_set(x_199, 2, x_195); +lean::cnstr_set(x_199, 3, x_191); +lean::cnstr_set_scalar(x_199, sizeof(void*)*4, x_198); +x_200 = x_199; +x_201 = 1; +if (lean::is_scalar(x_36)) { + x_202 = lean::alloc_cnstr(1, 4, 1); +} else { + x_202 = x_36; +} +lean::cnstr_set(x_202, 0, x_200); +lean::cnstr_set(x_202, 1, x_30); +lean::cnstr_set(x_202, 2, x_32); +lean::cnstr_set(x_202, 3, x_34); +lean::cnstr_set_scalar(x_202, sizeof(void*)*4, x_201); +x_203 = x_202; +return x_203; +} +else +{ +uint8 x_204; +x_204 = lean::cnstr_get_scalar(x_191, sizeof(void*)*4); +if (x_204 == 0) +{ +obj* x_205; obj* x_207; obj* x_209; obj* x_210; obj* x_212; obj* x_214; obj* x_216; obj* x_218; uint8 x_219; obj* x_220; obj* x_221; obj* x_222; obj* x_223; obj* x_224; obj* x_225; +x_205 = lean::cnstr_get(x_184, 1); +x_207 = lean::cnstr_get(x_184, 2); +if (lean::is_exclusive(x_184)) { + lean::cnstr_release(x_184, 0); + lean::cnstr_release(x_184, 3); + x_209 = x_184; +} else { + lean::inc(x_205); + lean::inc(x_207); + lean::dec(x_184); + x_209 = lean::box(0); +} +x_210 = lean::cnstr_get(x_191, 0); +x_212 = lean::cnstr_get(x_191, 1); +x_214 = lean::cnstr_get(x_191, 2); +x_216 = lean::cnstr_get(x_191, 3); +if (lean::is_exclusive(x_191)) { + x_218 = x_191; +} else { + lean::inc(x_210); + lean::inc(x_212); + lean::inc(x_214); + lean::inc(x_216); + lean::dec(x_191); + x_218 = lean::box(0); +} +x_219 = 1; +if (lean::is_scalar(x_218)) { + x_220 = lean::alloc_cnstr(1, 4, 1); +} else { + x_220 = x_218; +} +lean::cnstr_set(x_220, 0, x_189); +lean::cnstr_set(x_220, 1, x_205); +lean::cnstr_set(x_220, 2, x_207); +lean::cnstr_set(x_220, 3, x_210); +lean::cnstr_set_scalar(x_220, sizeof(void*)*4, x_219); +x_221 = x_220; +if (lean::is_scalar(x_209)) { + x_222 = lean::alloc_cnstr(1, 4, 1); +} else { + x_222 = x_209; +} +lean::cnstr_set(x_222, 0, x_216); +lean::cnstr_set(x_222, 1, x_30); +lean::cnstr_set(x_222, 2, x_32); +lean::cnstr_set(x_222, 3, x_34); +lean::cnstr_set_scalar(x_222, sizeof(void*)*4, x_219); +x_223 = x_222; +if (lean::is_scalar(x_36)) { + x_224 = lean::alloc_cnstr(1, 4, 1); +} else { + x_224 = x_36; +} +lean::cnstr_set(x_224, 0, x_221); +lean::cnstr_set(x_224, 1, x_212); +lean::cnstr_set(x_224, 2, x_214); +lean::cnstr_set(x_224, 3, x_223); +lean::cnstr_set_scalar(x_224, sizeof(void*)*4, x_204); +x_225 = x_224; +return x_225; +} +else +{ +obj* x_226; obj* x_228; obj* x_230; uint8 x_231; obj* x_232; obj* x_233; obj* x_234; obj* x_235; +x_226 = lean::cnstr_get(x_184, 1); +x_228 = lean::cnstr_get(x_184, 2); +if (lean::is_exclusive(x_184)) { + lean::cnstr_release(x_184, 0); + lean::cnstr_release(x_184, 3); + x_230 = x_184; +} else { + lean::inc(x_226); + lean::inc(x_228); + lean::dec(x_184); + x_230 = lean::box(0); +} +x_231 = 0; +if (lean::is_scalar(x_230)) { + x_232 = lean::alloc_cnstr(1, 4, 1); +} else { + x_232 = x_230; +} +lean::cnstr_set(x_232, 0, x_189); +lean::cnstr_set(x_232, 1, x_226); +lean::cnstr_set(x_232, 2, x_228); +lean::cnstr_set(x_232, 3, x_191); +lean::cnstr_set_scalar(x_232, sizeof(void*)*4, x_231); +x_233 = x_232; +if (lean::is_scalar(x_36)) { + x_234 = lean::alloc_cnstr(1, 4, 1); +} else { + x_234 = x_36; +} +lean::cnstr_set(x_234, 0, x_233); +lean::cnstr_set(x_234, 1, x_30); +lean::cnstr_set(x_234, 2, x_32); +lean::cnstr_set(x_234, 3, x_34); +lean::cnstr_set_scalar(x_234, sizeof(void*)*4, x_204); +x_235 = x_234; +return x_235; +} +} +} +else +{ +uint8 x_236; +x_236 = lean::cnstr_get_scalar(x_189, sizeof(void*)*4); +if (x_236 == 0) +{ +obj* x_237; obj* x_239; obj* x_241; obj* x_243; obj* x_244; obj* x_246; obj* x_248; obj* x_250; obj* x_252; uint8 x_253; obj* x_254; obj* x_255; obj* x_256; obj* x_257; obj* x_258; obj* x_259; +x_237 = lean::cnstr_get(x_184, 1); +x_239 = lean::cnstr_get(x_184, 2); +x_241 = lean::cnstr_get(x_184, 3); +if (lean::is_exclusive(x_184)) { + lean::cnstr_release(x_184, 0); + x_243 = x_184; +} else { + lean::inc(x_237); + lean::inc(x_239); + lean::inc(x_241); + lean::dec(x_184); + x_243 = lean::box(0); +} +x_244 = lean::cnstr_get(x_189, 0); +x_246 = lean::cnstr_get(x_189, 1); +x_248 = lean::cnstr_get(x_189, 2); +x_250 = lean::cnstr_get(x_189, 3); +if (lean::is_exclusive(x_189)) { + x_252 = x_189; +} else { + lean::inc(x_244); + lean::inc(x_246); + lean::inc(x_248); + lean::inc(x_250); + lean::dec(x_189); + x_252 = lean::box(0); +} +x_253 = 1; +if (lean::is_scalar(x_252)) { + x_254 = lean::alloc_cnstr(1, 4, 1); +} else { + x_254 = x_252; +} +lean::cnstr_set(x_254, 0, x_244); +lean::cnstr_set(x_254, 1, x_246); +lean::cnstr_set(x_254, 2, x_248); +lean::cnstr_set(x_254, 3, x_250); +lean::cnstr_set_scalar(x_254, sizeof(void*)*4, x_253); +x_255 = x_254; +if (lean::is_scalar(x_243)) { + x_256 = lean::alloc_cnstr(1, 4, 1); +} else { + x_256 = x_243; +} +lean::cnstr_set(x_256, 0, x_241); +lean::cnstr_set(x_256, 1, x_30); +lean::cnstr_set(x_256, 2, x_32); +lean::cnstr_set(x_256, 3, x_34); +lean::cnstr_set_scalar(x_256, sizeof(void*)*4, x_253); +x_257 = x_256; +if (lean::is_scalar(x_36)) { + x_258 = lean::alloc_cnstr(1, 4, 1); +} else { + x_258 = x_36; +} +lean::cnstr_set(x_258, 0, x_255); +lean::cnstr_set(x_258, 1, x_237); +lean::cnstr_set(x_258, 2, x_239); +lean::cnstr_set(x_258, 3, x_257); +lean::cnstr_set_scalar(x_258, sizeof(void*)*4, x_236); +x_259 = x_258; +return x_259; +} +else +{ +obj* x_260; +x_260 = lean::cnstr_get(x_184, 3); +lean::inc(x_260); +if (lean::obj_tag(x_260) == 0) +{ +obj* x_262; obj* x_264; obj* x_266; uint8 x_267; obj* x_268; obj* x_269; obj* x_270; obj* x_271; +x_262 = lean::cnstr_get(x_184, 1); +x_264 = lean::cnstr_get(x_184, 2); +if (lean::is_exclusive(x_184)) { + lean::cnstr_release(x_184, 0); + lean::cnstr_release(x_184, 3); + x_266 = x_184; +} else { + lean::inc(x_262); + lean::inc(x_264); + lean::dec(x_184); + x_266 = lean::box(0); +} +x_267 = 0; +if (lean::is_scalar(x_266)) { + x_268 = lean::alloc_cnstr(1, 4, 1); +} else { + x_268 = x_266; +} +lean::cnstr_set(x_268, 0, x_189); +lean::cnstr_set(x_268, 1, x_262); +lean::cnstr_set(x_268, 2, x_264); +lean::cnstr_set(x_268, 3, x_260); +lean::cnstr_set_scalar(x_268, sizeof(void*)*4, x_267); +x_269 = x_268; +if (lean::is_scalar(x_36)) { + x_270 = lean::alloc_cnstr(1, 4, 1); +} else { + x_270 = x_36; +} +lean::cnstr_set(x_270, 0, x_269); +lean::cnstr_set(x_270, 1, x_30); +lean::cnstr_set(x_270, 2, x_32); +lean::cnstr_set(x_270, 3, x_34); +lean::cnstr_set_scalar(x_270, sizeof(void*)*4, x_236); +x_271 = x_270; +return x_271; +} +else +{ +uint8 x_272; +x_272 = lean::cnstr_get_scalar(x_260, sizeof(void*)*4); +if (x_272 == 0) +{ +obj* x_274; obj* x_276; obj* x_278; obj* x_279; obj* x_281; obj* x_283; obj* x_285; obj* x_287; obj* x_289; obj* x_290; obj* x_291; obj* x_292; obj* x_293; obj* x_294; obj* x_295; +lean::dec(x_36); +x_274 = lean::cnstr_get(x_184, 1); +x_276 = lean::cnstr_get(x_184, 2); +if (lean::is_exclusive(x_184)) { + lean::cnstr_release(x_184, 0); + lean::cnstr_release(x_184, 3); + x_278 = x_184; +} else { + lean::inc(x_274); + lean::inc(x_276); + lean::dec(x_184); + x_278 = lean::box(0); +} +x_279 = lean::cnstr_get(x_260, 0); +x_281 = lean::cnstr_get(x_260, 1); +x_283 = lean::cnstr_get(x_260, 2); +x_285 = lean::cnstr_get(x_260, 3); +if (lean::is_exclusive(x_260)) { + x_287 = x_260; +} else { + lean::inc(x_279); + lean::inc(x_281); + lean::inc(x_283); + lean::inc(x_285); + lean::dec(x_260); + x_287 = lean::box(0); +} +lean::inc(x_189); +if (lean::is_scalar(x_287)) { + x_289 = lean::alloc_cnstr(1, 4, 1); +} else { + x_289 = x_287; +} +lean::cnstr_set(x_289, 0, x_189); +lean::cnstr_set(x_289, 1, x_274); +lean::cnstr_set(x_289, 2, x_276); +lean::cnstr_set(x_289, 3, x_279); +if (lean::is_exclusive(x_189)) { + lean::cnstr_release(x_189, 0); + lean::cnstr_release(x_189, 1); + lean::cnstr_release(x_189, 2); + lean::cnstr_release(x_189, 3); + x_290 = x_189; +} else { + lean::dec(x_189); + x_290 = lean::box(0); +} +lean::cnstr_set_scalar(x_289, sizeof(void*)*4, x_236); +x_291 = x_289; +if (lean::is_scalar(x_290)) { + x_292 = lean::alloc_cnstr(1, 4, 1); +} else { + x_292 = x_290; +} +lean::cnstr_set(x_292, 0, x_285); +lean::cnstr_set(x_292, 1, x_30); +lean::cnstr_set(x_292, 2, x_32); +lean::cnstr_set(x_292, 3, x_34); +lean::cnstr_set_scalar(x_292, sizeof(void*)*4, x_236); +x_293 = x_292; +if (lean::is_scalar(x_278)) { + x_294 = lean::alloc_cnstr(1, 4, 1); +} else { + x_294 = x_278; +} +lean::cnstr_set(x_294, 0, x_291); +lean::cnstr_set(x_294, 1, x_281); +lean::cnstr_set(x_294, 2, x_283); +lean::cnstr_set(x_294, 3, x_293); +lean::cnstr_set_scalar(x_294, sizeof(void*)*4, x_272); +x_295 = x_294; +return x_295; +} +else +{ +obj* x_296; obj* x_298; obj* x_300; obj* x_301; obj* x_303; obj* x_305; obj* x_307; obj* x_309; obj* x_310; obj* x_311; uint8 x_312; obj* x_313; obj* x_314; obj* x_315; obj* x_316; +x_296 = lean::cnstr_get(x_184, 1); +x_298 = lean::cnstr_get(x_184, 2); +if (lean::is_exclusive(x_184)) { + lean::cnstr_release(x_184, 0); + lean::cnstr_release(x_184, 3); + x_300 = x_184; +} else { + lean::inc(x_296); + lean::inc(x_298); + lean::dec(x_184); + x_300 = lean::box(0); +} +x_301 = lean::cnstr_get(x_189, 0); +x_303 = lean::cnstr_get(x_189, 1); +x_305 = lean::cnstr_get(x_189, 2); +x_307 = lean::cnstr_get(x_189, 3); +if (lean::is_exclusive(x_189)) { + x_309 = x_189; +} else { + lean::inc(x_301); + lean::inc(x_303); + lean::inc(x_305); + lean::inc(x_307); + lean::dec(x_189); + x_309 = lean::box(0); +} +if (lean::is_scalar(x_309)) { + x_310 = lean::alloc_cnstr(1, 4, 1); +} else { + x_310 = x_309; +} +lean::cnstr_set(x_310, 0, x_301); +lean::cnstr_set(x_310, 1, x_303); +lean::cnstr_set(x_310, 2, x_305); +lean::cnstr_set(x_310, 3, x_307); +lean::cnstr_set_scalar(x_310, sizeof(void*)*4, x_272); +x_311 = x_310; +x_312 = 0; +if (lean::is_scalar(x_300)) { + x_313 = lean::alloc_cnstr(1, 4, 1); +} else { + x_313 = x_300; +} +lean::cnstr_set(x_313, 0, x_311); +lean::cnstr_set(x_313, 1, x_296); +lean::cnstr_set(x_313, 2, x_298); +lean::cnstr_set(x_313, 3, x_260); +lean::cnstr_set_scalar(x_313, sizeof(void*)*4, x_312); +x_314 = x_313; +if (lean::is_scalar(x_36)) { + x_315 = lean::alloc_cnstr(1, 4, 1); +} else { + x_315 = x_36; +} +lean::cnstr_set(x_315, 0, x_314); +lean::cnstr_set(x_315, 1, x_30); +lean::cnstr_set(x_315, 2, x_32); +lean::cnstr_set(x_315, 3, x_34); +lean::cnstr_set_scalar(x_315, sizeof(void*)*4, x_272); +x_316 = x_315; +return x_316; +} +} +} +} +} +} +} +} +} +} +} +obj* l_RBNode_insert___at_Lean_IR_Context_addDecl___spec__1(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +uint8 x_3; +x_3 = l_RBNode_isRed___main___rarg(x_0); +if (x_3 == 0) +{ +obj* x_4; +x_4 = l_RBNode_ins___main___at_Lean_IR_Context_addDecl___spec__2(x_0, x_1, x_2); +return x_4; +} +else +{ +obj* x_5; obj* x_6; +x_5 = l_RBNode_ins___main___at_Lean_IR_Context_addDecl___spec__2(x_0, x_1, x_2); +x_6 = l_RBNode_setBlack___main___rarg(x_5); +return x_6; +} +} +} +obj* l_Lean_IR_Context_addDecl(obj* x_0, obj* x_1) { +_start: +{ +switch (lean::obj_tag(x_1)) { +case 0: +{ +obj* x_2; obj* x_4; obj* x_6; obj* x_8; obj* x_9; obj* x_10; +x_2 = lean::cnstr_get(x_1, 0); +lean::inc(x_2); +x_4 = lean::cnstr_get(x_0, 0); +x_6 = lean::cnstr_get(x_0, 1); +if (lean::is_exclusive(x_0)) { + x_8 = x_0; +} else { + lean::inc(x_4); + lean::inc(x_6); + lean::dec(x_0); + x_8 = lean::box(0); +} +x_9 = l_RBNode_insert___at_Lean_IR_Context_addDecl___spec__1(x_4, x_2, x_1); +if (lean::is_scalar(x_8)) { + x_10 = lean::alloc_cnstr(0, 2, 0); +} else { + x_10 = x_8; +} +lean::cnstr_set(x_10, 0, x_9); +lean::cnstr_set(x_10, 1, x_6); +return x_10; +} +case 1: +{ +obj* x_11; obj* x_13; obj* x_15; obj* x_17; obj* x_18; obj* x_19; +x_11 = lean::cnstr_get(x_1, 0); +lean::inc(x_11); +x_13 = lean::cnstr_get(x_0, 0); +x_15 = lean::cnstr_get(x_0, 1); +if (lean::is_exclusive(x_0)) { + x_17 = x_0; +} else { + lean::inc(x_13); + lean::inc(x_15); + lean::dec(x_0); + x_17 = lean::box(0); +} +x_18 = l_RBNode_insert___at_Lean_IR_Context_addDecl___spec__1(x_13, x_11, x_1); +if (lean::is_scalar(x_17)) { + x_19 = lean::alloc_cnstr(0, 2, 0); +} else { + x_19 = x_17; +} +lean::cnstr_set(x_19, 0, x_18); +lean::cnstr_set(x_19, 1, x_15); +return x_19; +} +case 12: +{ +return x_0; +} +default: +{ +lean::dec(x_1); +return x_0; +} +} +} +} +obj* l_RBNode_ins___main___at_Lean_IR_Context_addParam___spec__2(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +if (lean::obj_tag(x_0) == 0) +{ +uint8 x_3; obj* x_4; obj* x_5; +x_3 = 0; +x_4 = lean::alloc_cnstr(1, 4, 1); +lean::cnstr_set(x_4, 0, x_0); +lean::cnstr_set(x_4, 1, x_1); +lean::cnstr_set(x_4, 2, x_2); +lean::cnstr_set(x_4, 3, x_0); +lean::cnstr_set_scalar(x_4, sizeof(void*)*4, x_3); +x_5 = x_4; +return x_5; +} +else +{ +uint8 x_6; +x_6 = lean::cnstr_get_scalar(x_0, sizeof(void*)*4); +if (x_6 == 0) +{ +obj* x_7; obj* x_9; obj* x_11; obj* x_13; obj* x_15; uint8 x_16; +x_7 = lean::cnstr_get(x_0, 0); +x_9 = lean::cnstr_get(x_0, 1); +x_11 = lean::cnstr_get(x_0, 2); +x_13 = lean::cnstr_get(x_0, 3); +if (lean::is_exclusive(x_0)) { + lean::cnstr_set(x_0, 0, lean::box(0)); + lean::cnstr_set(x_0, 1, lean::box(0)); + lean::cnstr_set(x_0, 2, lean::box(0)); + lean::cnstr_set(x_0, 3, lean::box(0)); + x_15 = x_0; +} else { + lean::inc(x_7); + lean::inc(x_9); + lean::inc(x_11); + lean::inc(x_13); + lean::dec(x_0); + x_15 = lean::box(0); +} +x_16 = lean::nat_dec_lt(x_1, x_9); +if (x_16 == 0) +{ +uint8 x_17; +x_17 = lean::nat_dec_lt(x_9, x_1); +if (x_17 == 0) +{ +obj* x_20; obj* x_21; +lean::dec(x_9); +lean::dec(x_11); +if (lean::is_scalar(x_15)) { + x_20 = lean::alloc_cnstr(1, 4, 1); +} else { + x_20 = x_15; +} +lean::cnstr_set(x_20, 0, x_7); +lean::cnstr_set(x_20, 1, x_1); +lean::cnstr_set(x_20, 2, x_2); +lean::cnstr_set(x_20, 3, x_13); +lean::cnstr_set_scalar(x_20, sizeof(void*)*4, x_6); +x_21 = x_20; +return x_21; +} +else +{ +obj* x_22; obj* x_23; obj* x_24; +x_22 = l_RBNode_ins___main___at_Lean_IR_Context_addParam___spec__2(x_13, x_1, x_2); +if (lean::is_scalar(x_15)) { + x_23 = lean::alloc_cnstr(1, 4, 1); +} else { + x_23 = x_15; +} +lean::cnstr_set(x_23, 0, x_7); +lean::cnstr_set(x_23, 1, x_9); +lean::cnstr_set(x_23, 2, x_11); +lean::cnstr_set(x_23, 3, x_22); +lean::cnstr_set_scalar(x_23, sizeof(void*)*4, x_6); +x_24 = x_23; +return x_24; +} +} +else +{ +obj* x_25; obj* x_26; obj* x_27; +x_25 = l_RBNode_ins___main___at_Lean_IR_Context_addParam___spec__2(x_7, x_1, x_2); +if (lean::is_scalar(x_15)) { + x_26 = lean::alloc_cnstr(1, 4, 1); +} else { + x_26 = x_15; +} +lean::cnstr_set(x_26, 0, x_25); +lean::cnstr_set(x_26, 1, x_9); +lean::cnstr_set(x_26, 2, x_11); +lean::cnstr_set(x_26, 3, x_13); +lean::cnstr_set_scalar(x_26, sizeof(void*)*4, x_6); +x_27 = x_26; +return x_27; +} +} +else +{ +obj* x_28; obj* x_30; obj* x_32; obj* x_34; obj* x_36; uint8 x_37; +x_28 = lean::cnstr_get(x_0, 0); +x_30 = lean::cnstr_get(x_0, 1); +x_32 = lean::cnstr_get(x_0, 2); +x_34 = lean::cnstr_get(x_0, 3); +if (lean::is_exclusive(x_0)) { + lean::cnstr_set(x_0, 0, lean::box(0)); + lean::cnstr_set(x_0, 1, lean::box(0)); + lean::cnstr_set(x_0, 2, lean::box(0)); + lean::cnstr_set(x_0, 3, lean::box(0)); + x_36 = x_0; +} else { + lean::inc(x_28); + lean::inc(x_30); + lean::inc(x_32); + lean::inc(x_34); + lean::dec(x_0); + x_36 = lean::box(0); +} +x_37 = lean::nat_dec_lt(x_1, x_30); +if (x_37 == 0) +{ +uint8 x_38; +x_38 = lean::nat_dec_lt(x_30, x_1); +if (x_38 == 0) +{ +obj* x_41; obj* x_42; +lean::dec(x_32); +lean::dec(x_30); +if (lean::is_scalar(x_36)) { + x_41 = lean::alloc_cnstr(1, 4, 1); +} else { + x_41 = x_36; +} +lean::cnstr_set(x_41, 0, x_28); +lean::cnstr_set(x_41, 1, x_1); +lean::cnstr_set(x_41, 2, x_2); +lean::cnstr_set(x_41, 3, x_34); +lean::cnstr_set_scalar(x_41, sizeof(void*)*4, x_6); +x_42 = x_41; +return x_42; +} +else +{ +uint8 x_43; +x_43 = l_RBNode_isRed___main___rarg(x_34); +if (x_43 == 0) +{ +obj* x_44; obj* x_45; obj* x_46; +x_44 = l_RBNode_ins___main___at_Lean_IR_Context_addParam___spec__2(x_34, x_1, x_2); +if (lean::is_scalar(x_36)) { + x_45 = lean::alloc_cnstr(1, 4, 1); +} else { + x_45 = x_36; +} +lean::cnstr_set(x_45, 0, x_28); +lean::cnstr_set(x_45, 1, x_30); +lean::cnstr_set(x_45, 2, x_32); +lean::cnstr_set(x_45, 3, x_44); +lean::cnstr_set_scalar(x_45, sizeof(void*)*4, x_6); +x_46 = x_45; +return x_46; +} +else +{ +obj* x_47; +x_47 = l_RBNode_ins___main___at_Lean_IR_Context_addParam___spec__2(x_34, x_1, x_2); +if (lean::obj_tag(x_47) == 0) +{ +lean::dec(x_32); +lean::dec(x_36); +lean::dec(x_30); +lean::dec(x_28); +return x_47; +} +else +{ +obj* x_52; +x_52 = lean::cnstr_get(x_47, 0); +lean::inc(x_52); +if (lean::obj_tag(x_52) == 0) +{ +obj* x_54; +x_54 = lean::cnstr_get(x_47, 3); +lean::inc(x_54); +if (lean::obj_tag(x_54) == 0) +{ +obj* x_56; obj* x_58; obj* x_60; uint8 x_61; obj* x_62; obj* x_63; uint8 x_64; obj* x_65; obj* x_66; +x_56 = lean::cnstr_get(x_47, 1); +x_58 = lean::cnstr_get(x_47, 2); +if (lean::is_exclusive(x_47)) { + lean::cnstr_release(x_47, 0); + lean::cnstr_release(x_47, 3); + x_60 = x_47; +} else { + lean::inc(x_56); + lean::inc(x_58); + lean::dec(x_47); + x_60 = lean::box(0); +} +x_61 = 0; +if (lean::is_scalar(x_60)) { + x_62 = lean::alloc_cnstr(1, 4, 1); +} else { + x_62 = x_60; +} +lean::cnstr_set(x_62, 0, x_54); +lean::cnstr_set(x_62, 1, x_56); +lean::cnstr_set(x_62, 2, x_58); +lean::cnstr_set(x_62, 3, x_54); +lean::cnstr_set_scalar(x_62, sizeof(void*)*4, x_61); +x_63 = x_62; +x_64 = 1; +if (lean::is_scalar(x_36)) { + x_65 = lean::alloc_cnstr(1, 4, 1); +} else { + x_65 = x_36; +} +lean::cnstr_set(x_65, 0, x_28); +lean::cnstr_set(x_65, 1, x_30); +lean::cnstr_set(x_65, 2, x_32); +lean::cnstr_set(x_65, 3, x_63); +lean::cnstr_set_scalar(x_65, sizeof(void*)*4, x_64); +x_66 = x_65; +return x_66; +} +else +{ +uint8 x_67; +x_67 = lean::cnstr_get_scalar(x_54, sizeof(void*)*4); +if (x_67 == 0) +{ +obj* x_68; obj* x_70; obj* x_72; obj* x_73; obj* x_75; obj* x_77; obj* x_79; obj* x_81; uint8 x_82; obj* x_83; obj* x_84; obj* x_85; obj* x_86; obj* x_87; obj* x_88; +x_68 = lean::cnstr_get(x_47, 1); +x_70 = lean::cnstr_get(x_47, 2); +if (lean::is_exclusive(x_47)) { + lean::cnstr_release(x_47, 0); + lean::cnstr_release(x_47, 3); + x_72 = x_47; +} else { + lean::inc(x_68); + lean::inc(x_70); + lean::dec(x_47); + x_72 = lean::box(0); +} +x_73 = lean::cnstr_get(x_54, 0); +x_75 = lean::cnstr_get(x_54, 1); +x_77 = lean::cnstr_get(x_54, 2); +x_79 = lean::cnstr_get(x_54, 3); +if (lean::is_exclusive(x_54)) { + x_81 = x_54; +} else { + lean::inc(x_73); + lean::inc(x_75); + lean::inc(x_77); + lean::inc(x_79); + lean::dec(x_54); + x_81 = lean::box(0); +} +x_82 = 1; +if (lean::is_scalar(x_81)) { + x_83 = lean::alloc_cnstr(1, 4, 1); +} else { + x_83 = x_81; +} +lean::cnstr_set(x_83, 0, x_28); +lean::cnstr_set(x_83, 1, x_30); +lean::cnstr_set(x_83, 2, x_32); +lean::cnstr_set(x_83, 3, x_52); +lean::cnstr_set_scalar(x_83, sizeof(void*)*4, x_82); +x_84 = x_83; +if (lean::is_scalar(x_72)) { + x_85 = lean::alloc_cnstr(1, 4, 1); +} else { + x_85 = x_72; +} +lean::cnstr_set(x_85, 0, x_73); +lean::cnstr_set(x_85, 1, x_75); +lean::cnstr_set(x_85, 2, x_77); +lean::cnstr_set(x_85, 3, x_79); +lean::cnstr_set_scalar(x_85, sizeof(void*)*4, x_82); +x_86 = x_85; +if (lean::is_scalar(x_36)) { + x_87 = lean::alloc_cnstr(1, 4, 1); +} else { + x_87 = x_36; +} +lean::cnstr_set(x_87, 0, x_84); +lean::cnstr_set(x_87, 1, x_68); +lean::cnstr_set(x_87, 2, x_70); +lean::cnstr_set(x_87, 3, x_86); +lean::cnstr_set_scalar(x_87, sizeof(void*)*4, x_67); +x_88 = x_87; +return x_88; +} +else +{ +obj* x_89; obj* x_91; obj* x_93; uint8 x_94; obj* x_95; obj* x_96; obj* x_97; obj* x_98; +x_89 = lean::cnstr_get(x_47, 1); +x_91 = lean::cnstr_get(x_47, 2); +if (lean::is_exclusive(x_47)) { + lean::cnstr_release(x_47, 0); + lean::cnstr_release(x_47, 3); + x_93 = x_47; +} else { + lean::inc(x_89); + lean::inc(x_91); + lean::dec(x_47); + x_93 = lean::box(0); +} +x_94 = 0; +if (lean::is_scalar(x_93)) { + x_95 = lean::alloc_cnstr(1, 4, 1); +} else { + x_95 = x_93; +} +lean::cnstr_set(x_95, 0, x_52); +lean::cnstr_set(x_95, 1, x_89); +lean::cnstr_set(x_95, 2, x_91); +lean::cnstr_set(x_95, 3, x_54); +lean::cnstr_set_scalar(x_95, sizeof(void*)*4, x_94); +x_96 = x_95; +if (lean::is_scalar(x_36)) { + x_97 = lean::alloc_cnstr(1, 4, 1); +} else { + x_97 = x_36; +} +lean::cnstr_set(x_97, 0, x_28); +lean::cnstr_set(x_97, 1, x_30); +lean::cnstr_set(x_97, 2, x_32); +lean::cnstr_set(x_97, 3, x_96); +lean::cnstr_set_scalar(x_97, sizeof(void*)*4, x_67); +x_98 = x_97; +return x_98; +} +} +} +else +{ +uint8 x_99; +x_99 = lean::cnstr_get_scalar(x_52, sizeof(void*)*4); +if (x_99 == 0) +{ +obj* x_100; obj* x_102; obj* x_104; obj* x_106; obj* x_107; obj* x_109; obj* x_111; obj* x_113; obj* x_115; uint8 x_116; obj* x_117; obj* x_118; obj* x_119; obj* x_120; obj* x_121; obj* x_122; +x_100 = lean::cnstr_get(x_47, 1); +x_102 = lean::cnstr_get(x_47, 2); +x_104 = lean::cnstr_get(x_47, 3); +if (lean::is_exclusive(x_47)) { + lean::cnstr_release(x_47, 0); + x_106 = x_47; +} else { + lean::inc(x_100); + lean::inc(x_102); + lean::inc(x_104); + lean::dec(x_47); + x_106 = lean::box(0); +} +x_107 = lean::cnstr_get(x_52, 0); +x_109 = lean::cnstr_get(x_52, 1); +x_111 = lean::cnstr_get(x_52, 2); +x_113 = lean::cnstr_get(x_52, 3); +if (lean::is_exclusive(x_52)) { + x_115 = x_52; +} else { + lean::inc(x_107); + lean::inc(x_109); + lean::inc(x_111); + lean::inc(x_113); + lean::dec(x_52); + x_115 = lean::box(0); +} +x_116 = 1; +if (lean::is_scalar(x_115)) { + x_117 = lean::alloc_cnstr(1, 4, 1); +} else { + x_117 = x_115; +} +lean::cnstr_set(x_117, 0, x_28); +lean::cnstr_set(x_117, 1, x_30); +lean::cnstr_set(x_117, 2, x_32); +lean::cnstr_set(x_117, 3, x_107); +lean::cnstr_set_scalar(x_117, sizeof(void*)*4, x_116); +x_118 = x_117; +if (lean::is_scalar(x_106)) { + x_119 = lean::alloc_cnstr(1, 4, 1); +} else { + x_119 = x_106; +} +lean::cnstr_set(x_119, 0, x_113); +lean::cnstr_set(x_119, 1, x_100); +lean::cnstr_set(x_119, 2, x_102); +lean::cnstr_set(x_119, 3, x_104); +lean::cnstr_set_scalar(x_119, sizeof(void*)*4, x_116); +x_120 = x_119; +if (lean::is_scalar(x_36)) { + x_121 = lean::alloc_cnstr(1, 4, 1); +} else { + x_121 = x_36; +} +lean::cnstr_set(x_121, 0, x_118); +lean::cnstr_set(x_121, 1, x_109); +lean::cnstr_set(x_121, 2, x_111); +lean::cnstr_set(x_121, 3, x_120); +lean::cnstr_set_scalar(x_121, sizeof(void*)*4, x_99); +x_122 = x_121; +return x_122; +} +else +{ +obj* x_123; +x_123 = lean::cnstr_get(x_47, 3); +lean::inc(x_123); +if (lean::obj_tag(x_123) == 0) +{ +obj* x_125; obj* x_127; obj* x_129; uint8 x_130; obj* x_131; obj* x_132; obj* x_133; obj* x_134; +x_125 = lean::cnstr_get(x_47, 1); +x_127 = lean::cnstr_get(x_47, 2); +if (lean::is_exclusive(x_47)) { + lean::cnstr_release(x_47, 0); + lean::cnstr_release(x_47, 3); + x_129 = x_47; +} else { + lean::inc(x_125); + lean::inc(x_127); + lean::dec(x_47); + x_129 = lean::box(0); +} +x_130 = 0; +if (lean::is_scalar(x_129)) { + x_131 = lean::alloc_cnstr(1, 4, 1); +} else { + x_131 = x_129; +} +lean::cnstr_set(x_131, 0, x_52); +lean::cnstr_set(x_131, 1, x_125); +lean::cnstr_set(x_131, 2, x_127); +lean::cnstr_set(x_131, 3, x_123); +lean::cnstr_set_scalar(x_131, sizeof(void*)*4, x_130); +x_132 = x_131; +if (lean::is_scalar(x_36)) { + x_133 = lean::alloc_cnstr(1, 4, 1); +} else { + x_133 = x_36; +} +lean::cnstr_set(x_133, 0, x_28); +lean::cnstr_set(x_133, 1, x_30); +lean::cnstr_set(x_133, 2, x_32); +lean::cnstr_set(x_133, 3, x_132); +lean::cnstr_set_scalar(x_133, sizeof(void*)*4, x_99); +x_134 = x_133; +return x_134; +} +else +{ +uint8 x_135; +x_135 = lean::cnstr_get_scalar(x_123, sizeof(void*)*4); +if (x_135 == 0) +{ +obj* x_137; obj* x_139; obj* x_141; obj* x_142; obj* x_144; obj* x_146; obj* x_148; obj* x_150; obj* x_152; obj* x_153; obj* x_154; obj* x_155; obj* x_156; obj* x_157; obj* x_158; +lean::dec(x_36); +x_137 = lean::cnstr_get(x_47, 1); +x_139 = lean::cnstr_get(x_47, 2); +if (lean::is_exclusive(x_47)) { + lean::cnstr_release(x_47, 0); + lean::cnstr_release(x_47, 3); + x_141 = x_47; +} else { + lean::inc(x_137); + lean::inc(x_139); + lean::dec(x_47); + x_141 = lean::box(0); +} +x_142 = lean::cnstr_get(x_123, 0); +x_144 = lean::cnstr_get(x_123, 1); +x_146 = lean::cnstr_get(x_123, 2); +x_148 = lean::cnstr_get(x_123, 3); +if (lean::is_exclusive(x_123)) { + x_150 = x_123; +} else { + lean::inc(x_142); + lean::inc(x_144); + lean::inc(x_146); + lean::inc(x_148); + lean::dec(x_123); + x_150 = lean::box(0); +} +lean::inc(x_52); +if (lean::is_scalar(x_150)) { + x_152 = lean::alloc_cnstr(1, 4, 1); +} else { + x_152 = x_150; +} +lean::cnstr_set(x_152, 0, x_28); +lean::cnstr_set(x_152, 1, x_30); +lean::cnstr_set(x_152, 2, x_32); +lean::cnstr_set(x_152, 3, x_52); +if (lean::is_exclusive(x_52)) { + lean::cnstr_release(x_52, 0); + lean::cnstr_release(x_52, 1); + lean::cnstr_release(x_52, 2); + lean::cnstr_release(x_52, 3); + x_153 = x_52; +} else { + lean::dec(x_52); + x_153 = lean::box(0); +} +lean::cnstr_set_scalar(x_152, sizeof(void*)*4, x_99); +x_154 = x_152; +if (lean::is_scalar(x_153)) { + x_155 = lean::alloc_cnstr(1, 4, 1); +} else { + x_155 = x_153; +} +lean::cnstr_set(x_155, 0, x_142); +lean::cnstr_set(x_155, 1, x_144); +lean::cnstr_set(x_155, 2, x_146); +lean::cnstr_set(x_155, 3, x_148); +lean::cnstr_set_scalar(x_155, sizeof(void*)*4, x_99); +x_156 = x_155; +if (lean::is_scalar(x_141)) { + x_157 = lean::alloc_cnstr(1, 4, 1); +} else { + x_157 = x_141; +} +lean::cnstr_set(x_157, 0, x_154); +lean::cnstr_set(x_157, 1, x_137); +lean::cnstr_set(x_157, 2, x_139); +lean::cnstr_set(x_157, 3, x_156); +lean::cnstr_set_scalar(x_157, sizeof(void*)*4, x_135); +x_158 = x_157; +return x_158; +} +else +{ +obj* x_159; obj* x_161; obj* x_163; obj* x_164; obj* x_166; obj* x_168; obj* x_170; obj* x_172; obj* x_173; obj* x_174; uint8 x_175; obj* x_176; obj* x_177; obj* x_178; obj* x_179; +x_159 = lean::cnstr_get(x_47, 1); +x_161 = lean::cnstr_get(x_47, 2); +if (lean::is_exclusive(x_47)) { + lean::cnstr_release(x_47, 0); + lean::cnstr_release(x_47, 3); + x_163 = x_47; +} else { + lean::inc(x_159); + lean::inc(x_161); + lean::dec(x_47); + x_163 = lean::box(0); +} +x_164 = lean::cnstr_get(x_52, 0); +x_166 = lean::cnstr_get(x_52, 1); +x_168 = lean::cnstr_get(x_52, 2); +x_170 = lean::cnstr_get(x_52, 3); +if (lean::is_exclusive(x_52)) { + x_172 = x_52; +} else { + lean::inc(x_164); + lean::inc(x_166); + lean::inc(x_168); + lean::inc(x_170); + lean::dec(x_52); + x_172 = lean::box(0); +} +if (lean::is_scalar(x_172)) { + x_173 = lean::alloc_cnstr(1, 4, 1); +} else { + x_173 = x_172; +} +lean::cnstr_set(x_173, 0, x_164); +lean::cnstr_set(x_173, 1, x_166); +lean::cnstr_set(x_173, 2, x_168); +lean::cnstr_set(x_173, 3, x_170); +lean::cnstr_set_scalar(x_173, sizeof(void*)*4, x_135); +x_174 = x_173; +x_175 = 0; +if (lean::is_scalar(x_163)) { + x_176 = lean::alloc_cnstr(1, 4, 1); +} else { + x_176 = x_163; +} +lean::cnstr_set(x_176, 0, x_174); +lean::cnstr_set(x_176, 1, x_159); +lean::cnstr_set(x_176, 2, x_161); +lean::cnstr_set(x_176, 3, x_123); +lean::cnstr_set_scalar(x_176, sizeof(void*)*4, x_175); +x_177 = x_176; +if (lean::is_scalar(x_36)) { + x_178 = lean::alloc_cnstr(1, 4, 1); +} else { + x_178 = x_36; +} +lean::cnstr_set(x_178, 0, x_28); +lean::cnstr_set(x_178, 1, x_30); +lean::cnstr_set(x_178, 2, x_32); +lean::cnstr_set(x_178, 3, x_177); +lean::cnstr_set_scalar(x_178, sizeof(void*)*4, x_135); +x_179 = x_178; +return x_179; +} +} +} +} +} +} +} +} +else +{ +uint8 x_180; +x_180 = l_RBNode_isRed___main___rarg(x_28); +if (x_180 == 0) +{ +obj* x_181; obj* x_182; obj* x_183; +x_181 = l_RBNode_ins___main___at_Lean_IR_Context_addParam___spec__2(x_28, x_1, x_2); +if (lean::is_scalar(x_36)) { + x_182 = lean::alloc_cnstr(1, 4, 1); +} else { + x_182 = x_36; +} +lean::cnstr_set(x_182, 0, x_181); +lean::cnstr_set(x_182, 1, x_30); +lean::cnstr_set(x_182, 2, x_32); +lean::cnstr_set(x_182, 3, x_34); +lean::cnstr_set_scalar(x_182, sizeof(void*)*4, x_6); +x_183 = x_182; +return x_183; +} +else +{ +obj* x_184; +x_184 = l_RBNode_ins___main___at_Lean_IR_Context_addParam___spec__2(x_28, x_1, x_2); +if (lean::obj_tag(x_184) == 0) +{ +lean::dec(x_32); +lean::dec(x_36); +lean::dec(x_30); +lean::dec(x_34); +return x_184; +} +else +{ +obj* x_189; +x_189 = lean::cnstr_get(x_184, 0); +lean::inc(x_189); +if (lean::obj_tag(x_189) == 0) +{ +obj* x_191; +x_191 = lean::cnstr_get(x_184, 3); +lean::inc(x_191); +if (lean::obj_tag(x_191) == 0) +{ +obj* x_193; obj* x_195; obj* x_197; uint8 x_198; obj* x_199; obj* x_200; uint8 x_201; obj* x_202; obj* x_203; +x_193 = lean::cnstr_get(x_184, 1); +x_195 = lean::cnstr_get(x_184, 2); +if (lean::is_exclusive(x_184)) { + lean::cnstr_release(x_184, 0); + lean::cnstr_release(x_184, 3); + x_197 = x_184; +} else { + lean::inc(x_193); + lean::inc(x_195); + lean::dec(x_184); + x_197 = lean::box(0); +} +x_198 = 0; +if (lean::is_scalar(x_197)) { + x_199 = lean::alloc_cnstr(1, 4, 1); +} else { + x_199 = x_197; +} +lean::cnstr_set(x_199, 0, x_191); +lean::cnstr_set(x_199, 1, x_193); +lean::cnstr_set(x_199, 2, x_195); +lean::cnstr_set(x_199, 3, x_191); +lean::cnstr_set_scalar(x_199, sizeof(void*)*4, x_198); +x_200 = x_199; +x_201 = 1; +if (lean::is_scalar(x_36)) { + x_202 = lean::alloc_cnstr(1, 4, 1); +} else { + x_202 = x_36; +} +lean::cnstr_set(x_202, 0, x_200); +lean::cnstr_set(x_202, 1, x_30); +lean::cnstr_set(x_202, 2, x_32); +lean::cnstr_set(x_202, 3, x_34); +lean::cnstr_set_scalar(x_202, sizeof(void*)*4, x_201); +x_203 = x_202; +return x_203; +} +else +{ +uint8 x_204; +x_204 = lean::cnstr_get_scalar(x_191, sizeof(void*)*4); +if (x_204 == 0) +{ +obj* x_205; obj* x_207; obj* x_209; obj* x_210; obj* x_212; obj* x_214; obj* x_216; obj* x_218; uint8 x_219; obj* x_220; obj* x_221; obj* x_222; obj* x_223; obj* x_224; obj* x_225; +x_205 = lean::cnstr_get(x_184, 1); +x_207 = lean::cnstr_get(x_184, 2); +if (lean::is_exclusive(x_184)) { + lean::cnstr_release(x_184, 0); + lean::cnstr_release(x_184, 3); + x_209 = x_184; +} else { + lean::inc(x_205); + lean::inc(x_207); + lean::dec(x_184); + x_209 = lean::box(0); +} +x_210 = lean::cnstr_get(x_191, 0); +x_212 = lean::cnstr_get(x_191, 1); +x_214 = lean::cnstr_get(x_191, 2); +x_216 = lean::cnstr_get(x_191, 3); +if (lean::is_exclusive(x_191)) { + x_218 = x_191; +} else { + lean::inc(x_210); + lean::inc(x_212); + lean::inc(x_214); + lean::inc(x_216); + lean::dec(x_191); + x_218 = lean::box(0); +} +x_219 = 1; +if (lean::is_scalar(x_218)) { + x_220 = lean::alloc_cnstr(1, 4, 1); +} else { + x_220 = x_218; +} +lean::cnstr_set(x_220, 0, x_189); +lean::cnstr_set(x_220, 1, x_205); +lean::cnstr_set(x_220, 2, x_207); +lean::cnstr_set(x_220, 3, x_210); +lean::cnstr_set_scalar(x_220, sizeof(void*)*4, x_219); +x_221 = x_220; +if (lean::is_scalar(x_209)) { + x_222 = lean::alloc_cnstr(1, 4, 1); +} else { + x_222 = x_209; +} +lean::cnstr_set(x_222, 0, x_216); +lean::cnstr_set(x_222, 1, x_30); +lean::cnstr_set(x_222, 2, x_32); +lean::cnstr_set(x_222, 3, x_34); +lean::cnstr_set_scalar(x_222, sizeof(void*)*4, x_219); +x_223 = x_222; +if (lean::is_scalar(x_36)) { + x_224 = lean::alloc_cnstr(1, 4, 1); +} else { + x_224 = x_36; +} +lean::cnstr_set(x_224, 0, x_221); +lean::cnstr_set(x_224, 1, x_212); +lean::cnstr_set(x_224, 2, x_214); +lean::cnstr_set(x_224, 3, x_223); +lean::cnstr_set_scalar(x_224, sizeof(void*)*4, x_204); +x_225 = x_224; +return x_225; +} +else +{ +obj* x_226; obj* x_228; obj* x_230; uint8 x_231; obj* x_232; obj* x_233; obj* x_234; obj* x_235; +x_226 = lean::cnstr_get(x_184, 1); +x_228 = lean::cnstr_get(x_184, 2); +if (lean::is_exclusive(x_184)) { + lean::cnstr_release(x_184, 0); + lean::cnstr_release(x_184, 3); + x_230 = x_184; +} else { + lean::inc(x_226); + lean::inc(x_228); + lean::dec(x_184); + x_230 = lean::box(0); +} +x_231 = 0; +if (lean::is_scalar(x_230)) { + x_232 = lean::alloc_cnstr(1, 4, 1); +} else { + x_232 = x_230; +} +lean::cnstr_set(x_232, 0, x_189); +lean::cnstr_set(x_232, 1, x_226); +lean::cnstr_set(x_232, 2, x_228); +lean::cnstr_set(x_232, 3, x_191); +lean::cnstr_set_scalar(x_232, sizeof(void*)*4, x_231); +x_233 = x_232; +if (lean::is_scalar(x_36)) { + x_234 = lean::alloc_cnstr(1, 4, 1); +} else { + x_234 = x_36; +} +lean::cnstr_set(x_234, 0, x_233); +lean::cnstr_set(x_234, 1, x_30); +lean::cnstr_set(x_234, 2, x_32); +lean::cnstr_set(x_234, 3, x_34); +lean::cnstr_set_scalar(x_234, sizeof(void*)*4, x_204); +x_235 = x_234; +return x_235; +} +} +} +else +{ +uint8 x_236; +x_236 = lean::cnstr_get_scalar(x_189, sizeof(void*)*4); +if (x_236 == 0) +{ +obj* x_237; obj* x_239; obj* x_241; obj* x_243; obj* x_244; obj* x_246; obj* x_248; obj* x_250; obj* x_252; uint8 x_253; obj* x_254; obj* x_255; obj* x_256; obj* x_257; obj* x_258; obj* x_259; +x_237 = lean::cnstr_get(x_184, 1); +x_239 = lean::cnstr_get(x_184, 2); +x_241 = lean::cnstr_get(x_184, 3); +if (lean::is_exclusive(x_184)) { + lean::cnstr_release(x_184, 0); + x_243 = x_184; +} else { + lean::inc(x_237); + lean::inc(x_239); + lean::inc(x_241); + lean::dec(x_184); + x_243 = lean::box(0); +} +x_244 = lean::cnstr_get(x_189, 0); +x_246 = lean::cnstr_get(x_189, 1); +x_248 = lean::cnstr_get(x_189, 2); +x_250 = lean::cnstr_get(x_189, 3); +if (lean::is_exclusive(x_189)) { + x_252 = x_189; +} else { + lean::inc(x_244); + lean::inc(x_246); + lean::inc(x_248); + lean::inc(x_250); + lean::dec(x_189); + x_252 = lean::box(0); +} +x_253 = 1; +if (lean::is_scalar(x_252)) { + x_254 = lean::alloc_cnstr(1, 4, 1); +} else { + x_254 = x_252; +} +lean::cnstr_set(x_254, 0, x_244); +lean::cnstr_set(x_254, 1, x_246); +lean::cnstr_set(x_254, 2, x_248); +lean::cnstr_set(x_254, 3, x_250); +lean::cnstr_set_scalar(x_254, sizeof(void*)*4, x_253); +x_255 = x_254; +if (lean::is_scalar(x_243)) { + x_256 = lean::alloc_cnstr(1, 4, 1); +} else { + x_256 = x_243; +} +lean::cnstr_set(x_256, 0, x_241); +lean::cnstr_set(x_256, 1, x_30); +lean::cnstr_set(x_256, 2, x_32); +lean::cnstr_set(x_256, 3, x_34); +lean::cnstr_set_scalar(x_256, sizeof(void*)*4, x_253); +x_257 = x_256; +if (lean::is_scalar(x_36)) { + x_258 = lean::alloc_cnstr(1, 4, 1); +} else { + x_258 = x_36; +} +lean::cnstr_set(x_258, 0, x_255); +lean::cnstr_set(x_258, 1, x_237); +lean::cnstr_set(x_258, 2, x_239); +lean::cnstr_set(x_258, 3, x_257); +lean::cnstr_set_scalar(x_258, sizeof(void*)*4, x_236); +x_259 = x_258; +return x_259; +} +else +{ +obj* x_260; +x_260 = lean::cnstr_get(x_184, 3); +lean::inc(x_260); +if (lean::obj_tag(x_260) == 0) +{ +obj* x_262; obj* x_264; obj* x_266; uint8 x_267; obj* x_268; obj* x_269; obj* x_270; obj* x_271; +x_262 = lean::cnstr_get(x_184, 1); +x_264 = lean::cnstr_get(x_184, 2); +if (lean::is_exclusive(x_184)) { + lean::cnstr_release(x_184, 0); + lean::cnstr_release(x_184, 3); + x_266 = x_184; +} else { + lean::inc(x_262); + lean::inc(x_264); + lean::dec(x_184); + x_266 = lean::box(0); +} +x_267 = 0; +if (lean::is_scalar(x_266)) { + x_268 = lean::alloc_cnstr(1, 4, 1); +} else { + x_268 = x_266; +} +lean::cnstr_set(x_268, 0, x_189); +lean::cnstr_set(x_268, 1, x_262); +lean::cnstr_set(x_268, 2, x_264); +lean::cnstr_set(x_268, 3, x_260); +lean::cnstr_set_scalar(x_268, sizeof(void*)*4, x_267); +x_269 = x_268; +if (lean::is_scalar(x_36)) { + x_270 = lean::alloc_cnstr(1, 4, 1); +} else { + x_270 = x_36; +} +lean::cnstr_set(x_270, 0, x_269); +lean::cnstr_set(x_270, 1, x_30); +lean::cnstr_set(x_270, 2, x_32); +lean::cnstr_set(x_270, 3, x_34); +lean::cnstr_set_scalar(x_270, sizeof(void*)*4, x_236); +x_271 = x_270; +return x_271; +} +else +{ +uint8 x_272; +x_272 = lean::cnstr_get_scalar(x_260, sizeof(void*)*4); +if (x_272 == 0) +{ +obj* x_274; obj* x_276; obj* x_278; obj* x_279; obj* x_281; obj* x_283; obj* x_285; obj* x_287; obj* x_289; obj* x_290; obj* x_291; obj* x_292; obj* x_293; obj* x_294; obj* x_295; +lean::dec(x_36); +x_274 = lean::cnstr_get(x_184, 1); +x_276 = lean::cnstr_get(x_184, 2); +if (lean::is_exclusive(x_184)) { + lean::cnstr_release(x_184, 0); + lean::cnstr_release(x_184, 3); + x_278 = x_184; +} else { + lean::inc(x_274); + lean::inc(x_276); + lean::dec(x_184); + x_278 = lean::box(0); +} +x_279 = lean::cnstr_get(x_260, 0); +x_281 = lean::cnstr_get(x_260, 1); +x_283 = lean::cnstr_get(x_260, 2); +x_285 = lean::cnstr_get(x_260, 3); +if (lean::is_exclusive(x_260)) { + x_287 = x_260; +} else { + lean::inc(x_279); + lean::inc(x_281); + lean::inc(x_283); + lean::inc(x_285); + lean::dec(x_260); + x_287 = lean::box(0); +} +lean::inc(x_189); +if (lean::is_scalar(x_287)) { + x_289 = lean::alloc_cnstr(1, 4, 1); +} else { + x_289 = x_287; +} +lean::cnstr_set(x_289, 0, x_189); +lean::cnstr_set(x_289, 1, x_274); +lean::cnstr_set(x_289, 2, x_276); +lean::cnstr_set(x_289, 3, x_279); +if (lean::is_exclusive(x_189)) { + lean::cnstr_release(x_189, 0); + lean::cnstr_release(x_189, 1); + lean::cnstr_release(x_189, 2); + lean::cnstr_release(x_189, 3); + x_290 = x_189; +} else { + lean::dec(x_189); + x_290 = lean::box(0); +} +lean::cnstr_set_scalar(x_289, sizeof(void*)*4, x_236); +x_291 = x_289; +if (lean::is_scalar(x_290)) { + x_292 = lean::alloc_cnstr(1, 4, 1); +} else { + x_292 = x_290; +} +lean::cnstr_set(x_292, 0, x_285); +lean::cnstr_set(x_292, 1, x_30); +lean::cnstr_set(x_292, 2, x_32); +lean::cnstr_set(x_292, 3, x_34); +lean::cnstr_set_scalar(x_292, sizeof(void*)*4, x_236); +x_293 = x_292; +if (lean::is_scalar(x_278)) { + x_294 = lean::alloc_cnstr(1, 4, 1); +} else { + x_294 = x_278; +} +lean::cnstr_set(x_294, 0, x_291); +lean::cnstr_set(x_294, 1, x_281); +lean::cnstr_set(x_294, 2, x_283); +lean::cnstr_set(x_294, 3, x_293); +lean::cnstr_set_scalar(x_294, sizeof(void*)*4, x_272); +x_295 = x_294; +return x_295; +} +else +{ +obj* x_296; obj* x_298; obj* x_300; obj* x_301; obj* x_303; obj* x_305; obj* x_307; obj* x_309; obj* x_310; obj* x_311; uint8 x_312; obj* x_313; obj* x_314; obj* x_315; obj* x_316; +x_296 = lean::cnstr_get(x_184, 1); +x_298 = lean::cnstr_get(x_184, 2); +if (lean::is_exclusive(x_184)) { + lean::cnstr_release(x_184, 0); + lean::cnstr_release(x_184, 3); + x_300 = x_184; +} else { + lean::inc(x_296); + lean::inc(x_298); + lean::dec(x_184); + x_300 = lean::box(0); +} +x_301 = lean::cnstr_get(x_189, 0); +x_303 = lean::cnstr_get(x_189, 1); +x_305 = lean::cnstr_get(x_189, 2); +x_307 = lean::cnstr_get(x_189, 3); +if (lean::is_exclusive(x_189)) { + x_309 = x_189; +} else { + lean::inc(x_301); + lean::inc(x_303); + lean::inc(x_305); + lean::inc(x_307); + lean::dec(x_189); + x_309 = lean::box(0); +} +if (lean::is_scalar(x_309)) { + x_310 = lean::alloc_cnstr(1, 4, 1); +} else { + x_310 = x_309; +} +lean::cnstr_set(x_310, 0, x_301); +lean::cnstr_set(x_310, 1, x_303); +lean::cnstr_set(x_310, 2, x_305); +lean::cnstr_set(x_310, 3, x_307); +lean::cnstr_set_scalar(x_310, sizeof(void*)*4, x_272); +x_311 = x_310; +x_312 = 0; +if (lean::is_scalar(x_300)) { + x_313 = lean::alloc_cnstr(1, 4, 1); +} else { + x_313 = x_300; +} +lean::cnstr_set(x_313, 0, x_311); +lean::cnstr_set(x_313, 1, x_296); +lean::cnstr_set(x_313, 2, x_298); +lean::cnstr_set(x_313, 3, x_260); +lean::cnstr_set_scalar(x_313, sizeof(void*)*4, x_312); +x_314 = x_313; +if (lean::is_scalar(x_36)) { + x_315 = lean::alloc_cnstr(1, 4, 1); +} else { + x_315 = x_36; +} +lean::cnstr_set(x_315, 0, x_314); +lean::cnstr_set(x_315, 1, x_30); +lean::cnstr_set(x_315, 2, x_32); +lean::cnstr_set(x_315, 3, x_34); +lean::cnstr_set_scalar(x_315, sizeof(void*)*4, x_272); +x_316 = x_315; +return x_316; +} +} +} +} +} +} +} +} +} +} +} +obj* l_RBNode_insert___at_Lean_IR_Context_addParam___spec__1(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +uint8 x_3; +x_3 = l_RBNode_isRed___main___rarg(x_0); +if (x_3 == 0) +{ +obj* x_4; +x_4 = l_RBNode_ins___main___at_Lean_IR_Context_addParam___spec__2(x_0, x_1, x_2); +return x_4; +} +else +{ +obj* x_5; obj* x_6; +x_5 = l_RBNode_ins___main___at_Lean_IR_Context_addParam___spec__2(x_0, x_1, x_2); +x_6 = l_RBNode_setBlack___main___rarg(x_5); +return x_6; +} +} +} +obj* l_Lean_IR_Context_addParam(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; obj* x_4; obj* x_6; obj* x_7; obj* x_9; obj* x_10; +x_2 = lean::cnstr_get(x_0, 0); +x_4 = lean::cnstr_get(x_0, 1); +if (lean::is_exclusive(x_0)) { + x_6 = x_0; +} else { + lean::inc(x_2); + lean::inc(x_4); + lean::dec(x_0); + x_6 = lean::box(0); +} +x_7 = lean::cnstr_get(x_1, 0); +lean::inc(x_7); +x_9 = l_RBNode_insert___at_Lean_IR_Context_addParam___spec__1(x_4, x_7, x_1); +if (lean::is_scalar(x_6)) { + x_10 = lean::alloc_cnstr(0, 2, 0); +} else { + x_10 = x_6; +} +lean::cnstr_set(x_10, 0, x_2); +lean::cnstr_set(x_10, 1, x_9); +return x_10; +} +} +obj* l_RBNode_find___main___at_Lean_IR_Context_isJP___spec__1(obj* x_0, obj* x_1) { +_start: +{ +if (lean::obj_tag(x_0) == 0) +{ +obj* x_2; +x_2 = lean::box(0); +return x_2; +} +else +{ +obj* x_3; obj* x_5; obj* x_7; obj* x_9; uint8 x_12; +x_3 = lean::cnstr_get(x_0, 0); +lean::inc(x_3); +x_5 = lean::cnstr_get(x_0, 1); +lean::inc(x_5); +x_7 = lean::cnstr_get(x_0, 2); +lean::inc(x_7); +x_9 = lean::cnstr_get(x_0, 3); +lean::inc(x_9); +lean::dec(x_0); +x_12 = lean::nat_dec_lt(x_1, x_5); +if (x_12 == 0) +{ +uint8 x_14; +lean::dec(x_3); +x_14 = lean::nat_dec_lt(x_5, x_1); +lean::dec(x_5); +if (x_14 == 0) +{ +obj* x_17; +lean::dec(x_9); +x_17 = lean::alloc_cnstr(1, 1, 0); +lean::cnstr_set(x_17, 0, x_7); +return x_17; +} +else +{ +lean::dec(x_7); +x_0 = x_9; +goto _start; +} +} +else +{ +lean::dec(x_7); +lean::dec(x_9); +lean::dec(x_5); +x_0 = x_3; +goto _start; +} +} +} +} +uint8 l_Lean_IR_Context_isJP(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; obj* x_5; +x_2 = lean::cnstr_get(x_0, 0); +lean::inc(x_2); +lean::dec(x_0); +x_5 = l_RBNode_find___main___at_Lean_IR_Context_isJP___spec__1(x_2, x_1); +if (lean::obj_tag(x_5) == 0) +{ +uint8 x_6; +x_6 = 0; +return x_6; +} +else +{ +obj* x_7; +x_7 = lean::cnstr_get(x_5, 0); +lean::inc(x_7); +lean::dec(x_5); +switch (lean::obj_tag(x_7)) { +case 1: +{ +uint8 x_11; +lean::dec(x_7); +x_11 = 1; +return x_11; +} +case 12: +{ +uint8 x_12; +x_12 = 0; +return x_12; +} +default: +{ +uint8 x_14; +lean::dec(x_7); +x_14 = 0; +return x_14; +} +} +} +} +} +obj* l_RBNode_find___main___at_Lean_IR_Context_isJP___spec__1___boxed(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; +x_2 = l_RBNode_find___main___at_Lean_IR_Context_isJP___spec__1(x_0, x_1); +lean::dec(x_1); +return x_2; +} +} +obj* l_Lean_IR_Context_isJP___boxed(obj* x_0, obj* x_1) { +_start: +{ +uint8 x_2; obj* x_3; +x_2 = l_Lean_IR_Context_isJP(x_0, x_1); +x_3 = lean::box(x_2); +lean::dec(x_1); +return x_3; +} +} +obj* l_Lean_IR_Context_getJoinPointBody(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; obj* x_5; +x_2 = lean::cnstr_get(x_0, 0); +lean::inc(x_2); +lean::dec(x_0); +x_5 = l_RBNode_find___main___at_Lean_IR_Context_isJP___spec__1(x_2, x_1); +if (lean::obj_tag(x_5) == 0) +{ +return x_5; +} +else +{ +obj* x_6; obj* x_8; +x_6 = lean::cnstr_get(x_5, 0); +if (lean::is_exclusive(x_5)) { + lean::cnstr_set(x_5, 0, lean::box(0)); + x_8 = x_5; +} else { + lean::inc(x_6); + lean::dec(x_5); + x_8 = lean::box(0); +} +switch (lean::obj_tag(x_6)) { +case 1: +{ +obj* x_9; obj* x_12; +x_9 = lean::cnstr_get(x_6, 2); +lean::inc(x_9); +lean::dec(x_6); +if (lean::is_scalar(x_8)) { + x_12 = lean::alloc_cnstr(1, 1, 0); +} else { + x_12 = x_8; +} +lean::cnstr_set(x_12, 0, x_9); +return x_12; +} +case 12: +{ +obj* x_14; +lean::dec(x_8); +x_14 = lean::box(0); +return x_14; +} +default: +{ +obj* x_17; +lean::dec(x_8); +lean::dec(x_6); +x_17 = lean::box(0); +return x_17; +} +} +} +} +} +obj* l_Lean_IR_Context_getJoinPointBody___boxed(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; +x_2 = l_Lean_IR_Context_getJoinPointBody(x_0, x_1); +lean::dec(x_1); +return x_2; +} +} +obj* l_RBNode_find___main___at_Lean_IR_Context_isParam___spec__1(obj* x_0, obj* x_1) { +_start: +{ +if (lean::obj_tag(x_0) == 0) +{ +obj* x_2; +x_2 = lean::box(0); +return x_2; +} +else +{ +obj* x_3; obj* x_5; obj* x_7; obj* x_9; uint8 x_12; +x_3 = lean::cnstr_get(x_0, 0); +lean::inc(x_3); +x_5 = lean::cnstr_get(x_0, 1); +lean::inc(x_5); +x_7 = lean::cnstr_get(x_0, 2); +lean::inc(x_7); +x_9 = lean::cnstr_get(x_0, 3); +lean::inc(x_9); +lean::dec(x_0); +x_12 = lean::nat_dec_lt(x_1, x_5); +if (x_12 == 0) +{ +uint8 x_14; +lean::dec(x_3); +x_14 = lean::nat_dec_lt(x_5, x_1); +lean::dec(x_5); +if (x_14 == 0) +{ +obj* x_17; +lean::dec(x_9); +x_17 = lean::alloc_cnstr(1, 1, 0); +lean::cnstr_set(x_17, 0, x_7); +return x_17; +} +else +{ +lean::dec(x_7); +x_0 = x_9; +goto _start; +} +} +else +{ +lean::dec(x_7); +lean::dec(x_9); +lean::dec(x_5); +x_0 = x_3; +goto _start; +} +} +} +} +uint8 l_Lean_IR_Context_isParam(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; obj* x_5; +x_2 = lean::cnstr_get(x_0, 1); +lean::inc(x_2); +lean::dec(x_0); +x_5 = l_RBNode_find___main___at_Lean_IR_Context_isParam___spec__1(x_2, x_1); +if (lean::obj_tag(x_5) == 0) +{ +uint8 x_6; +x_6 = 0; +return x_6; +} +else +{ +uint8 x_8; +lean::dec(x_5); +x_8 = 1; +return x_8; +} +} +} +obj* l_RBNode_find___main___at_Lean_IR_Context_isParam___spec__1___boxed(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; +x_2 = l_RBNode_find___main___at_Lean_IR_Context_isParam___spec__1(x_0, x_1); +lean::dec(x_1); +return x_2; +} +} +obj* l_Lean_IR_Context_isParam___boxed(obj* x_0, obj* x_1) { +_start: +{ +uint8 x_2; obj* x_3; +x_2 = l_Lean_IR_Context_isParam(x_0, x_1); +x_3 = lean::box(x_2); +lean::dec(x_1); +return x_3; +} +} +uint8 l_Lean_IR_Context_isLocalVar(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; obj* x_5; +x_2 = lean::cnstr_get(x_0, 0); +lean::inc(x_2); +lean::dec(x_0); +x_5 = l_RBNode_find___main___at_Lean_IR_Context_isJP___spec__1(x_2, x_1); +if (lean::obj_tag(x_5) == 0) +{ +uint8 x_6; +x_6 = 0; +return x_6; +} +else +{ +obj* x_7; +x_7 = lean::cnstr_get(x_5, 0); +lean::inc(x_7); +lean::dec(x_5); +switch (lean::obj_tag(x_7)) { +case 0: +{ +uint8 x_11; +lean::dec(x_7); +x_11 = 1; +return x_11; +} +case 12: +{ +uint8 x_12; +x_12 = 0; +return x_12; +} +default: +{ +uint8 x_14; +lean::dec(x_7); +x_14 = 0; +return x_14; +} +} +} +} +} +obj* l_Lean_IR_Context_isLocalVar___boxed(obj* x_0, obj* x_1) { +_start: +{ +uint8 x_2; obj* x_3; +x_2 = l_Lean_IR_Context_isLocalVar(x_0, x_1); +x_3 = lean::box(x_2); +lean::dec(x_1); +return x_3; +} +} +uint8 l_Lean_IR_Context_contains(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; obj* x_4; +x_2 = lean::cnstr_get(x_0, 0); +lean::inc(x_2); +x_4 = l_RBNode_find___main___at_Lean_IR_Context_isJP___spec__1(x_2, x_1); +if (lean::obj_tag(x_4) == 0) +{ +obj* x_5; obj* x_8; +x_5 = lean::cnstr_get(x_0, 1); +lean::inc(x_5); +lean::dec(x_0); +x_8 = l_RBNode_find___main___at_Lean_IR_Context_isParam___spec__1(x_5, x_1); +if (lean::obj_tag(x_8) == 0) +{ +uint8 x_9; +x_9 = 0; +return x_9; +} +else +{ +uint8 x_11; +lean::dec(x_8); +x_11 = 1; +return x_11; +} +} +else +{ +uint8 x_14; +lean::dec(x_4); +lean::dec(x_0); +x_14 = 1; +return x_14; +} +} +} +obj* l_Lean_IR_Context_contains___boxed(obj* x_0, obj* x_1) { +_start: +{ +uint8 x_2; obj* x_3; +x_2 = l_Lean_IR_Context_contains(x_0, x_1); +x_3 = lean::box(x_2); +lean::dec(x_1); +return x_3; +} +} +obj* l_RBNode_del___main___at_Lean_IR_Context_eraseJoinPointDecl___spec__2(obj* x_0, obj* x_1) { +_start: +{ +if (lean::obj_tag(x_1) == 0) +{ +return x_1; +} +else +{ +obj* x_2; obj* x_4; obj* x_6; obj* x_8; obj* x_10; uint8 x_11; +x_2 = lean::cnstr_get(x_1, 0); +x_4 = lean::cnstr_get(x_1, 1); +x_6 = lean::cnstr_get(x_1, 2); +x_8 = lean::cnstr_get(x_1, 3); +if (lean::is_exclusive(x_1)) { + lean::cnstr_set(x_1, 0, lean::box(0)); + lean::cnstr_set(x_1, 1, lean::box(0)); + lean::cnstr_set(x_1, 2, lean::box(0)); + lean::cnstr_set(x_1, 3, lean::box(0)); + x_10 = x_1; +} else { + lean::inc(x_2); + lean::inc(x_4); + lean::inc(x_6); + lean::inc(x_8); + lean::dec(x_1); + x_10 = lean::box(0); +} +x_11 = lean::nat_dec_lt(x_0, x_4); +if (x_11 == 0) +{ +uint8 x_12; +x_12 = lean::nat_dec_lt(x_4, x_0); +if (x_12 == 0) +{ +obj* x_16; +lean::dec(x_10); +lean::dec(x_4); +lean::dec(x_6); +x_16 = l_RBNode_appendTrees___main___rarg(x_2, x_8); +return x_16; +} +else +{ +uint8 x_17; +x_17 = l_RBNode_isBlack___main___rarg(x_8); +if (x_17 == 0) +{ +obj* x_18; uint8 x_19; obj* x_20; obj* x_21; +x_18 = l_RBNode_del___main___at_Lean_IR_Context_eraseJoinPointDecl___spec__2(x_0, x_8); +x_19 = 0; +if (lean::is_scalar(x_10)) { + x_20 = lean::alloc_cnstr(1, 4, 1); +} else { + x_20 = x_10; +} +lean::cnstr_set(x_20, 0, x_2); +lean::cnstr_set(x_20, 1, x_4); +lean::cnstr_set(x_20, 2, x_6); +lean::cnstr_set(x_20, 3, x_18); +lean::cnstr_set_scalar(x_20, sizeof(void*)*4, x_19); +x_21 = x_20; +return x_21; +} +else +{ +obj* x_23; obj* x_24; +lean::dec(x_10); +x_23 = l_RBNode_del___main___at_Lean_IR_Context_eraseJoinPointDecl___spec__2(x_0, x_8); +x_24 = l_RBNode_balRight___rarg(x_2, x_4, x_6, x_23); +return x_24; +} +} +} +else +{ +uint8 x_25; +x_25 = l_RBNode_isBlack___main___rarg(x_2); +if (x_25 == 0) +{ +obj* x_26; uint8 x_27; obj* x_28; obj* x_29; +x_26 = l_RBNode_del___main___at_Lean_IR_Context_eraseJoinPointDecl___spec__2(x_0, x_2); +x_27 = 0; +if (lean::is_scalar(x_10)) { + x_28 = lean::alloc_cnstr(1, 4, 1); +} else { + x_28 = x_10; +} +lean::cnstr_set(x_28, 0, x_26); +lean::cnstr_set(x_28, 1, x_4); +lean::cnstr_set(x_28, 2, x_6); +lean::cnstr_set(x_28, 3, x_8); +lean::cnstr_set_scalar(x_28, sizeof(void*)*4, x_27); +x_29 = x_28; +return x_29; +} +else +{ +obj* x_31; obj* x_32; +lean::dec(x_10); +x_31 = l_RBNode_del___main___at_Lean_IR_Context_eraseJoinPointDecl___spec__2(x_0, x_2); +x_32 = l_RBNode_balLeft___main___rarg(x_31, x_4, x_6, x_8); +return x_32; +} +} +} +} +} +obj* l_RBNode_erase___at_Lean_IR_Context_eraseJoinPointDecl___spec__1(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; obj* x_3; +x_2 = l_RBNode_del___main___at_Lean_IR_Context_eraseJoinPointDecl___spec__2(x_0, x_1); +x_3 = l_RBNode_setBlack___main___rarg(x_2); +return x_3; +} +} +obj* l_Lean_IR_Context_eraseJoinPointDecl(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; obj* x_4; obj* x_6; obj* x_7; obj* x_8; +x_2 = lean::cnstr_get(x_0, 0); +x_4 = lean::cnstr_get(x_0, 1); +if (lean::is_exclusive(x_0)) { + x_6 = x_0; +} else { + lean::inc(x_2); + lean::inc(x_4); + lean::dec(x_0); + x_6 = lean::box(0); +} +x_7 = l_RBNode_erase___at_Lean_IR_Context_eraseJoinPointDecl___spec__1(x_1, x_2); +if (lean::is_scalar(x_6)) { + x_8 = lean::alloc_cnstr(0, 2, 0); +} else { + x_8 = x_6; +} +lean::cnstr_set(x_8, 0, x_7); +lean::cnstr_set(x_8, 1, x_4); +return x_8; +} +} +obj* l_RBNode_del___main___at_Lean_IR_Context_eraseJoinPointDecl___spec__2___boxed(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; +x_2 = l_RBNode_del___main___at_Lean_IR_Context_eraseJoinPointDecl___spec__2(x_0, x_1); +lean::dec(x_0); +return x_2; +} +} +obj* l_RBNode_erase___at_Lean_IR_Context_eraseJoinPointDecl___spec__1___boxed(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; +x_2 = l_RBNode_erase___at_Lean_IR_Context_eraseJoinPointDecl___spec__1(x_0, x_1); +lean::dec(x_0); +return x_2; +} +} +obj* l_Lean_IR_Context_eraseJoinPointDecl___boxed(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; +x_2 = l_Lean_IR_Context_eraseJoinPointDecl(x_0, x_1); +lean::dec(x_1); +return x_2; +} +} obj* l_RBNode_find___main___at_Lean_IR_VarId_alphaEqv___spec__1(obj* x_0, obj* x_1) { _start: { @@ -4922,112 +7793,90 @@ return x_46; } case 1: { -uint8 x_47; -x_47 = lean::cnstr_get_scalar(x_1, sizeof(void*)*4); switch (lean::obj_tag(x_2)) { case 1: { -obj* x_48; obj* x_50; obj* x_52; obj* x_54; obj* x_57; obj* x_59; uint8 x_61; obj* x_62; obj* x_64; obj* x_68; -x_48 = lean::cnstr_get(x_1, 0); -lean::inc(x_48); -x_50 = lean::cnstr_get(x_1, 1); -lean::inc(x_50); -x_52 = lean::cnstr_get(x_1, 2); -lean::inc(x_52); -x_54 = lean::cnstr_get(x_1, 3); -lean::inc(x_54); +obj* x_47; obj* x_49; obj* x_51; obj* x_53; obj* x_56; obj* x_58; obj* x_60; obj* x_62; obj* x_66; +x_47 = lean::cnstr_get(x_1, 0); +lean::inc(x_47); +x_49 = lean::cnstr_get(x_1, 1); +lean::inc(x_49); +x_51 = lean::cnstr_get(x_1, 2); +lean::inc(x_51); +x_53 = lean::cnstr_get(x_1, 3); +lean::inc(x_53); lean::dec(x_1); -x_57 = lean::cnstr_get(x_2, 0); -lean::inc(x_57); -x_59 = lean::cnstr_get(x_2, 1); -lean::inc(x_59); -x_61 = lean::cnstr_get_scalar(x_2, sizeof(void*)*4); -x_62 = lean::cnstr_get(x_2, 2); +x_56 = lean::cnstr_get(x_2, 0); +lean::inc(x_56); +x_58 = lean::cnstr_get(x_2, 1); +lean::inc(x_58); +x_60 = lean::cnstr_get(x_2, 2); +lean::inc(x_60); +x_62 = lean::cnstr_get(x_2, 3); lean::inc(x_62); -x_64 = lean::cnstr_get(x_2, 3); -lean::inc(x_64); lean::dec(x_2); lean::inc(x_0); -x_68 = l_Lean_IR_addParamsRename(x_0, x_50, x_59); -lean::dec(x_59); -lean::dec(x_50); -if (lean::obj_tag(x_68) == 0) +x_66 = l_Lean_IR_addParamsRename(x_0, x_49, x_58); +lean::dec(x_58); +lean::dec(x_49); +if (lean::obj_tag(x_66) == 0) { -uint8 x_78; +uint8 x_76; lean::dec(x_0); -lean::dec(x_52); -lean::dec(x_54); -lean::dec(x_64); +lean::dec(x_47); +lean::dec(x_60); lean::dec(x_62); -lean::dec(x_48); -lean::dec(x_57); -x_78 = 0; -return x_78; +lean::dec(x_56); +lean::dec(x_51); +lean::dec(x_53); +x_76 = 0; +return x_76; } else { -obj* x_79; uint8 x_82; -x_79 = lean::cnstr_get(x_68, 0); -lean::inc(x_79); -lean::dec(x_68); -x_82 = l_Lean_IR_IRType_beq___main(x_47, x_61); -if (x_82 == 0) +obj* x_77; uint8 x_80; +x_77 = lean::cnstr_get(x_66, 0); +lean::inc(x_77); +lean::dec(x_66); +x_80 = l_Lean_IR_FnBody_alphaEqv___main(x_77, x_51, x_60); +if (x_80 == 0) +{ +uint8 x_86; +lean::dec(x_0); +lean::dec(x_47); +lean::dec(x_62); +lean::dec(x_56); +lean::dec(x_53); +x_86 = 0; +return x_86; +} +else +{ +obj* x_87; +x_87 = l_Lean_IR_addVarRename(x_0, x_47, x_56); +x_0 = x_87; +x_1 = x_53; +x_2 = x_62; +goto _start; +} +} +} +case 12: { uint8 x_91; +lean::dec(x_1); lean::dec(x_0); -lean::dec(x_79); -lean::dec(x_52); -lean::dec(x_54); -lean::dec(x_64); -lean::dec(x_62); -lean::dec(x_48); -lean::dec(x_57); x_91 = 0; return x_91; } -else -{ -uint8 x_92; -x_92 = l_Lean_IR_FnBody_alphaEqv___main(x_79, x_52, x_62); -if (x_92 == 0) -{ -uint8 x_98; -lean::dec(x_0); -lean::dec(x_54); -lean::dec(x_64); -lean::dec(x_48); -lean::dec(x_57); -x_98 = 0; -return x_98; -} -else -{ -obj* x_99; -x_99 = l_Lean_IR_addVarRename(x_0, x_48, x_57); -x_0 = x_99; -x_1 = x_54; -x_2 = x_64; -goto _start; -} -} -} -} -case 12: -{ -uint8 x_103; -lean::dec(x_1); -lean::dec(x_0); -x_103 = 0; -return x_103; -} default: { -uint8 x_107; +uint8 x_95; lean::dec(x_1); lean::dec(x_0); lean::dec(x_2); -x_107 = 0; -return x_107; +x_95 = 0; +return x_95; } } } @@ -5036,100 +7885,100 @@ case 2: switch (lean::obj_tag(x_2)) { case 2: { -obj* x_108; obj* x_110; obj* x_112; obj* x_114; obj* x_117; obj* x_119; obj* x_121; obj* x_123; uint8 x_127; -x_108 = lean::cnstr_get(x_1, 0); -lean::inc(x_108); -x_110 = lean::cnstr_get(x_1, 1); -lean::inc(x_110); -x_112 = lean::cnstr_get(x_1, 2); -lean::inc(x_112); -x_114 = lean::cnstr_get(x_1, 3); -lean::inc(x_114); +obj* x_96; obj* x_98; obj* x_100; obj* x_102; obj* x_105; obj* x_107; obj* x_109; obj* x_111; uint8 x_115; +x_96 = lean::cnstr_get(x_1, 0); +lean::inc(x_96); +x_98 = lean::cnstr_get(x_1, 1); +lean::inc(x_98); +x_100 = lean::cnstr_get(x_1, 2); +lean::inc(x_100); +x_102 = lean::cnstr_get(x_1, 3); +lean::inc(x_102); lean::dec(x_1); -x_117 = lean::cnstr_get(x_2, 0); -lean::inc(x_117); -x_119 = lean::cnstr_get(x_2, 1); -lean::inc(x_119); -x_121 = lean::cnstr_get(x_2, 2); -lean::inc(x_121); -x_123 = lean::cnstr_get(x_2, 3); -lean::inc(x_123); +x_105 = lean::cnstr_get(x_2, 0); +lean::inc(x_105); +x_107 = lean::cnstr_get(x_2, 1); +lean::inc(x_107); +x_109 = lean::cnstr_get(x_2, 2); +lean::inc(x_109); +x_111 = lean::cnstr_get(x_2, 3); +lean::inc(x_111); lean::dec(x_2); lean::inc(x_0); -x_127 = l_Lean_IR_VarId_alphaEqv(x_0, x_108, x_117); -lean::dec(x_117); -lean::dec(x_108); -if (x_127 == 0) +x_115 = l_Lean_IR_VarId_alphaEqv(x_0, x_96, x_105); +lean::dec(x_105); +lean::dec(x_96); +if (x_115 == 0) { -uint8 x_137; -lean::dec(x_119); -lean::dec(x_121); -lean::dec(x_114); -lean::dec(x_110); -lean::dec(x_112); +uint8 x_125; +lean::dec(x_98); +lean::dec(x_111); +lean::dec(x_107); +lean::dec(x_109); +lean::dec(x_102); lean::dec(x_0); -lean::dec(x_123); -x_137 = 0; -return x_137; +lean::dec(x_100); +x_125 = 0; +return x_125; } else { -uint8 x_138; -x_138 = lean::nat_dec_eq(x_110, x_119); -lean::dec(x_119); -lean::dec(x_110); -if (x_138 == 0) +uint8 x_126; +x_126 = lean::nat_dec_eq(x_98, x_107); +lean::dec(x_107); +lean::dec(x_98); +if (x_126 == 0) +{ +uint8 x_134; +lean::dec(x_111); +lean::dec(x_109); +lean::dec(x_102); +lean::dec(x_0); +lean::dec(x_100); +x_134 = 0; +return x_134; +} +else +{ +uint8 x_136; +lean::inc(x_0); +x_136 = l_Lean_IR_VarId_alphaEqv(x_0, x_100, x_109); +lean::dec(x_109); +lean::dec(x_100); +if (x_136 == 0) +{ +uint8 x_142; +lean::dec(x_111); +lean::dec(x_102); +lean::dec(x_0); +x_142 = 0; +return x_142; +} +else +{ +x_1 = x_102; +x_2 = x_111; +goto _start; +} +} +} +} +case 12: { uint8 x_146; -lean::dec(x_121); -lean::dec(x_114); -lean::dec(x_112); +lean::dec(x_1); lean::dec(x_0); -lean::dec(x_123); x_146 = 0; return x_146; } -else -{ -uint8 x_148; -lean::inc(x_0); -x_148 = l_Lean_IR_VarId_alphaEqv(x_0, x_112, x_121); -lean::dec(x_121); -lean::dec(x_112); -if (x_148 == 0) -{ -uint8 x_154; -lean::dec(x_114); -lean::dec(x_0); -lean::dec(x_123); -x_154 = 0; -return x_154; -} -else -{ -x_1 = x_114; -x_2 = x_123; -goto _start; -} -} -} -} -case 12: -{ -uint8 x_158; -lean::dec(x_1); -lean::dec(x_0); -x_158 = 0; -return x_158; -} default: { -uint8 x_162; +uint8 x_150; lean::dec(x_1); lean::dec(x_0); lean::dec(x_2); -x_162 = 0; -return x_162; +x_150 = 0; +return x_150; } } } @@ -5138,245 +7987,245 @@ case 3: switch (lean::obj_tag(x_2)) { case 3: { -obj* x_163; obj* x_165; obj* x_167; obj* x_169; obj* x_172; obj* x_174; obj* x_176; obj* x_178; uint8 x_182; -x_163 = lean::cnstr_get(x_1, 0); -lean::inc(x_163); -x_165 = lean::cnstr_get(x_1, 1); -lean::inc(x_165); -x_167 = lean::cnstr_get(x_1, 2); -lean::inc(x_167); -x_169 = lean::cnstr_get(x_1, 3); -lean::inc(x_169); +obj* x_151; obj* x_153; obj* x_155; obj* x_157; obj* x_160; obj* x_162; obj* x_164; obj* x_166; uint8 x_170; +x_151 = lean::cnstr_get(x_1, 0); +lean::inc(x_151); +x_153 = lean::cnstr_get(x_1, 1); +lean::inc(x_153); +x_155 = lean::cnstr_get(x_1, 2); +lean::inc(x_155); +x_157 = lean::cnstr_get(x_1, 3); +lean::inc(x_157); lean::dec(x_1); -x_172 = lean::cnstr_get(x_2, 0); -lean::inc(x_172); -x_174 = lean::cnstr_get(x_2, 1); -lean::inc(x_174); -x_176 = lean::cnstr_get(x_2, 2); -lean::inc(x_176); -x_178 = lean::cnstr_get(x_2, 3); -lean::inc(x_178); +x_160 = lean::cnstr_get(x_2, 0); +lean::inc(x_160); +x_162 = lean::cnstr_get(x_2, 1); +lean::inc(x_162); +x_164 = lean::cnstr_get(x_2, 2); +lean::inc(x_164); +x_166 = lean::cnstr_get(x_2, 3); +lean::inc(x_166); lean::dec(x_2); lean::inc(x_0); -x_182 = l_Lean_IR_VarId_alphaEqv(x_0, x_163, x_172); -lean::dec(x_172); -lean::dec(x_163); -if (x_182 == 0) +x_170 = l_Lean_IR_VarId_alphaEqv(x_0, x_151, x_160); +lean::dec(x_160); +lean::dec(x_151); +if (x_170 == 0) { -uint8 x_192; +uint8 x_180; lean::dec(x_0); -lean::dec(x_178); -lean::dec(x_176); -lean::dec(x_165); -lean::dec(x_174); -lean::dec(x_169); -lean::dec(x_167); -x_192 = 0; -return x_192; +lean::dec(x_157); +lean::dec(x_155); +lean::dec(x_153); +lean::dec(x_164); +lean::dec(x_166); +lean::dec(x_162); +x_180 = 0; +return x_180; } else { -uint8 x_193; -x_193 = lean::nat_dec_eq(x_165, x_174); -lean::dec(x_174); -lean::dec(x_165); -if (x_193 == 0) +uint8 x_181; +x_181 = lean::nat_dec_eq(x_153, x_162); +lean::dec(x_162); +lean::dec(x_153); +if (x_181 == 0) +{ +uint8 x_189; +lean::dec(x_0); +lean::dec(x_157); +lean::dec(x_155); +lean::dec(x_164); +lean::dec(x_166); +x_189 = 0; +return x_189; +} +else +{ +uint8 x_191; +lean::inc(x_0); +x_191 = l_Lean_IR_VarId_alphaEqv(x_0, x_155, x_164); +lean::dec(x_164); +lean::dec(x_155); +if (x_191 == 0) +{ +uint8 x_197; +lean::dec(x_0); +lean::dec(x_157); +lean::dec(x_166); +x_197 = 0; +return x_197; +} +else +{ +x_1 = x_157; +x_2 = x_166; +goto _start; +} +} +} +} +case 12: { uint8 x_201; +lean::dec(x_1); lean::dec(x_0); -lean::dec(x_178); -lean::dec(x_176); -lean::dec(x_169); -lean::dec(x_167); x_201 = 0; return x_201; } -else -{ -uint8 x_203; -lean::inc(x_0); -x_203 = l_Lean_IR_VarId_alphaEqv(x_0, x_167, x_176); -lean::dec(x_176); -lean::dec(x_167); -if (x_203 == 0) -{ -uint8 x_209; -lean::dec(x_0); -lean::dec(x_178); -lean::dec(x_169); -x_209 = 0; -return x_209; -} -else -{ -x_1 = x_169; -x_2 = x_178; -goto _start; -} -} -} -} -case 12: -{ -uint8 x_213; -lean::dec(x_1); -lean::dec(x_0); -x_213 = 0; -return x_213; -} default: { -uint8 x_217; +uint8 x_205; lean::dec(x_1); lean::dec(x_0); lean::dec(x_2); -x_217 = 0; -return x_217; +x_205 = 0; +return x_205; } } } case 4: { -uint8 x_218; -x_218 = lean::cnstr_get_scalar(x_1, sizeof(void*)*5); +uint8 x_206; +x_206 = lean::cnstr_get_scalar(x_1, sizeof(void*)*5); switch (lean::obj_tag(x_2)) { case 4: { -obj* x_219; obj* x_221; obj* x_223; obj* x_225; obj* x_227; obj* x_230; obj* x_232; obj* x_234; obj* x_236; uint8 x_238; obj* x_239; uint8 x_243; -x_219 = lean::cnstr_get(x_1, 0); -lean::inc(x_219); -x_221 = lean::cnstr_get(x_1, 1); -lean::inc(x_221); -x_223 = lean::cnstr_get(x_1, 2); -lean::inc(x_223); -x_225 = lean::cnstr_get(x_1, 3); -lean::inc(x_225); -x_227 = lean::cnstr_get(x_1, 4); -lean::inc(x_227); +obj* x_207; obj* x_209; obj* x_211; obj* x_213; obj* x_215; obj* x_218; obj* x_220; obj* x_222; obj* x_224; uint8 x_226; obj* x_227; uint8 x_231; +x_207 = lean::cnstr_get(x_1, 0); +lean::inc(x_207); +x_209 = lean::cnstr_get(x_1, 1); +lean::inc(x_209); +x_211 = lean::cnstr_get(x_1, 2); +lean::inc(x_211); +x_213 = lean::cnstr_get(x_1, 3); +lean::inc(x_213); +x_215 = lean::cnstr_get(x_1, 4); +lean::inc(x_215); lean::dec(x_1); -x_230 = lean::cnstr_get(x_2, 0); -lean::inc(x_230); -x_232 = lean::cnstr_get(x_2, 1); -lean::inc(x_232); -x_234 = lean::cnstr_get(x_2, 2); -lean::inc(x_234); -x_236 = lean::cnstr_get(x_2, 3); -lean::inc(x_236); -x_238 = lean::cnstr_get_scalar(x_2, sizeof(void*)*5); -x_239 = lean::cnstr_get(x_2, 4); -lean::inc(x_239); +x_218 = lean::cnstr_get(x_2, 0); +lean::inc(x_218); +x_220 = lean::cnstr_get(x_2, 1); +lean::inc(x_220); +x_222 = lean::cnstr_get(x_2, 2); +lean::inc(x_222); +x_224 = lean::cnstr_get(x_2, 3); +lean::inc(x_224); +x_226 = lean::cnstr_get_scalar(x_2, sizeof(void*)*5); +x_227 = lean::cnstr_get(x_2, 4); +lean::inc(x_227); lean::dec(x_2); lean::inc(x_0); -x_243 = l_Lean_IR_VarId_alphaEqv(x_0, x_219, x_230); -lean::dec(x_230); -lean::dec(x_219); -if (x_243 == 0) +x_231 = l_Lean_IR_VarId_alphaEqv(x_0, x_207, x_218); +lean::dec(x_218); +lean::dec(x_207); +if (x_231 == 0) +{ +uint8 x_243; +lean::dec(x_0); +lean::dec(x_224); +lean::dec(x_227); +lean::dec(x_222); +lean::dec(x_215); +lean::dec(x_209); +lean::dec(x_220); +lean::dec(x_213); +lean::dec(x_211); +x_243 = 0; +return x_243; +} +else +{ +uint8 x_244; +x_244 = lean::nat_dec_eq(x_209, x_220); +lean::dec(x_220); +lean::dec(x_209); +if (x_244 == 0) +{ +uint8 x_254; +lean::dec(x_0); +lean::dec(x_224); +lean::dec(x_227); +lean::dec(x_222); +lean::dec(x_215); +lean::dec(x_213); +lean::dec(x_211); +x_254 = 0; +return x_254; +} +else { uint8 x_255; -lean::dec(x_239); -lean::dec(x_234); -lean::dec(x_232); -lean::dec(x_225); -lean::dec(x_236); +x_255 = lean::nat_dec_eq(x_211, x_222); +lean::dec(x_222); +lean::dec(x_211); +if (x_255 == 0) +{ +uint8 x_263; lean::dec(x_0); -lean::dec(x_223); -lean::dec(x_221); +lean::dec(x_224); lean::dec(x_227); -x_255 = 0; -return x_255; +lean::dec(x_215); +lean::dec(x_213); +x_263 = 0; +return x_263; } else { -uint8 x_256; -x_256 = lean::nat_dec_eq(x_221, x_232); -lean::dec(x_232); -lean::dec(x_221); -if (x_256 == 0) -{ -uint8 x_266; -lean::dec(x_239); -lean::dec(x_234); -lean::dec(x_225); -lean::dec(x_236); -lean::dec(x_0); -lean::dec(x_223); -lean::dec(x_227); -x_266 = 0; -return x_266; -} -else -{ -uint8 x_267; -x_267 = lean::nat_dec_eq(x_223, x_234); -lean::dec(x_234); -lean::dec(x_223); -if (x_267 == 0) -{ -uint8 x_275; -lean::dec(x_239); -lean::dec(x_225); -lean::dec(x_236); -lean::dec(x_0); -lean::dec(x_227); -x_275 = 0; -return x_275; -} -else -{ -uint8 x_277; +uint8 x_265; lean::inc(x_0); -x_277 = l_Lean_IR_VarId_alphaEqv(x_0, x_225, x_236); -lean::dec(x_236); -lean::dec(x_225); -if (x_277 == 0) +x_265 = l_Lean_IR_VarId_alphaEqv(x_0, x_213, x_224); +lean::dec(x_224); +lean::dec(x_213); +if (x_265 == 0) { -uint8 x_283; -lean::dec(x_239); +uint8 x_271; lean::dec(x_0); lean::dec(x_227); -x_283 = 0; -return x_283; +lean::dec(x_215); +x_271 = 0; +return x_271; } else { +uint8 x_272; +x_272 = l_Lean_IR_IRType_beq___main(x_206, x_226); +if (x_272 == 0) +{ +uint8 x_276; +lean::dec(x_0); +lean::dec(x_227); +lean::dec(x_215); +x_276 = 0; +return x_276; +} +else +{ +x_1 = x_215; +x_2 = x_227; +goto _start; +} +} +} +} +} +} +case 12: +{ +uint8 x_280; +lean::dec(x_1); +lean::dec(x_0); +x_280 = 0; +return x_280; +} +default: +{ uint8 x_284; -x_284 = l_Lean_IR_IRType_beq___main(x_218, x_238); -if (x_284 == 0) -{ -uint8 x_288; -lean::dec(x_239); -lean::dec(x_0); -lean::dec(x_227); -x_288 = 0; -return x_288; -} -else -{ -x_1 = x_227; -x_2 = x_239; -goto _start; -} -} -} -} -} -} -case 12: -{ -uint8 x_292; -lean::dec(x_1); -lean::dec(x_0); -x_292 = 0; -return x_292; -} -default: -{ -uint8 x_296; lean::dec(x_1); lean::dec(x_0); lean::dec(x_2); -x_296 = 0; -return x_296; +x_284 = 0; +return x_284; } } } @@ -5385,166 +8234,166 @@ case 5: switch (lean::obj_tag(x_2)) { case 5: { -obj* x_297; obj* x_299; obj* x_301; obj* x_304; obj* x_306; obj* x_308; uint8 x_312; -x_297 = lean::cnstr_get(x_1, 0); -lean::inc(x_297); -x_299 = lean::cnstr_get(x_1, 1); -lean::inc(x_299); -x_301 = lean::cnstr_get(x_1, 2); -lean::inc(x_301); +obj* x_285; obj* x_287; obj* x_289; obj* x_292; obj* x_294; obj* x_296; uint8 x_300; +x_285 = lean::cnstr_get(x_1, 0); +lean::inc(x_285); +x_287 = lean::cnstr_get(x_1, 1); +lean::inc(x_287); +x_289 = lean::cnstr_get(x_1, 2); +lean::inc(x_289); lean::dec(x_1); -x_304 = lean::cnstr_get(x_2, 0); -lean::inc(x_304); -x_306 = lean::cnstr_get(x_2, 1); -lean::inc(x_306); -x_308 = lean::cnstr_get(x_2, 2); -lean::inc(x_308); +x_292 = lean::cnstr_get(x_2, 0); +lean::inc(x_292); +x_294 = lean::cnstr_get(x_2, 1); +lean::inc(x_294); +x_296 = lean::cnstr_get(x_2, 2); +lean::inc(x_296); lean::dec(x_2); lean::inc(x_0); -x_312 = l_Lean_IR_VarId_alphaEqv(x_0, x_297, x_304); -lean::dec(x_304); -lean::dec(x_297); -if (x_312 == 0) +x_300 = l_Lean_IR_VarId_alphaEqv(x_0, x_285, x_292); +lean::dec(x_292); +lean::dec(x_285); +if (x_300 == 0) { -uint8 x_320; -lean::dec(x_308); -lean::dec(x_299); -lean::dec(x_301); -lean::dec(x_306); +uint8 x_308; +lean::dec(x_294); lean::dec(x_0); -x_320 = 0; -return x_320; +lean::dec(x_296); +lean::dec(x_289); +lean::dec(x_287); +x_308 = 0; +return x_308; } else { -uint8 x_321; -x_321 = lean::nat_dec_eq(x_299, x_306); -lean::dec(x_306); -lean::dec(x_299); -if (x_321 == 0) +uint8 x_309; +x_309 = lean::nat_dec_eq(x_287, x_294); +lean::dec(x_294); +lean::dec(x_287); +if (x_309 == 0) { -uint8 x_327; -lean::dec(x_308); -lean::dec(x_301); +uint8 x_315; lean::dec(x_0); -x_327 = 0; -return x_327; +lean::dec(x_296); +lean::dec(x_289); +x_315 = 0; +return x_315; } else { -x_1 = x_301; -x_2 = x_308; +x_1 = x_289; +x_2 = x_296; goto _start; } } } case 12: { -uint8 x_331; +uint8 x_319; lean::dec(x_1); lean::dec(x_0); -x_331 = 0; -return x_331; +x_319 = 0; +return x_319; } default: { -uint8 x_335; +uint8 x_323; lean::dec(x_1); lean::dec(x_0); lean::dec(x_2); -x_335 = 0; -return x_335; +x_323 = 0; +return x_323; } } } case 6: { -uint8 x_336; -x_336 = lean::cnstr_get_scalar(x_1, sizeof(void*)*3); +uint8 x_324; +x_324 = lean::cnstr_get_scalar(x_1, sizeof(void*)*3); switch (lean::obj_tag(x_2)) { case 6: { -obj* x_337; obj* x_339; obj* x_341; obj* x_344; obj* x_346; uint8 x_348; obj* x_349; uint8 x_353; -x_337 = lean::cnstr_get(x_1, 0); +obj* x_325; obj* x_327; obj* x_329; obj* x_332; obj* x_334; uint8 x_336; obj* x_337; uint8 x_341; +x_325 = lean::cnstr_get(x_1, 0); +lean::inc(x_325); +x_327 = lean::cnstr_get(x_1, 1); +lean::inc(x_327); +x_329 = lean::cnstr_get(x_1, 2); +lean::inc(x_329); +lean::dec(x_1); +x_332 = lean::cnstr_get(x_2, 0); +lean::inc(x_332); +x_334 = lean::cnstr_get(x_2, 1); +lean::inc(x_334); +x_336 = lean::cnstr_get_scalar(x_2, sizeof(void*)*3); +x_337 = lean::cnstr_get(x_2, 2); lean::inc(x_337); -x_339 = lean::cnstr_get(x_1, 1); -lean::inc(x_339); -x_341 = lean::cnstr_get(x_1, 2); -lean::inc(x_341); -lean::dec(x_1); -x_344 = lean::cnstr_get(x_2, 0); -lean::inc(x_344); -x_346 = lean::cnstr_get(x_2, 1); -lean::inc(x_346); -x_348 = lean::cnstr_get_scalar(x_2, sizeof(void*)*3); -x_349 = lean::cnstr_get(x_2, 2); -lean::inc(x_349); lean::dec(x_2); lean::inc(x_0); -x_353 = l_Lean_IR_VarId_alphaEqv(x_0, x_337, x_344); -lean::dec(x_344); +x_341 = l_Lean_IR_VarId_alphaEqv(x_0, x_325, x_332); +lean::dec(x_332); +lean::dec(x_325); +if (x_341 == 0) +{ +uint8 x_349; +lean::dec(x_0); +lean::dec(x_327); +lean::dec(x_334); +lean::dec(x_329); lean::dec(x_337); -if (x_353 == 0) +x_349 = 0; +return x_349; +} +else +{ +uint8 x_350; +x_350 = lean::nat_dec_eq(x_327, x_334); +lean::dec(x_334); +lean::dec(x_327); +if (x_350 == 0) +{ +uint8 x_356; +lean::dec(x_0); +lean::dec(x_329); +lean::dec(x_337); +x_356 = 0; +return x_356; +} +else +{ +if (x_324 == 0) +{ +if (x_336 == 0) +{ +x_1 = x_329; +x_2 = x_337; +goto _start; +} +else { uint8 x_361; lean::dec(x_0); -lean::dec(x_341); -lean::dec(x_346); -lean::dec(x_339); -lean::dec(x_349); +lean::dec(x_329); +lean::dec(x_337); x_361 = 0; return x_361; } -else -{ -uint8 x_362; -x_362 = lean::nat_dec_eq(x_339, x_346); -lean::dec(x_346); -lean::dec(x_339); -if (x_362 == 0) -{ -uint8 x_368; -lean::dec(x_0); -lean::dec(x_341); -lean::dec(x_349); -x_368 = 0; -return x_368; } else { if (x_336 == 0) { -if (x_348 == 0) -{ -x_1 = x_341; -x_2 = x_349; -goto _start; -} -else -{ -uint8 x_373; +uint8 x_365; lean::dec(x_0); -lean::dec(x_341); -lean::dec(x_349); -x_373 = 0; -return x_373; -} +lean::dec(x_329); +lean::dec(x_337); +x_365 = 0; +return x_365; } else { -if (x_348 == 0) -{ -uint8 x_377; -lean::dec(x_0); -lean::dec(x_341); -lean::dec(x_349); -x_377 = 0; -return x_377; -} -else -{ -x_1 = x_341; -x_2 = x_349; +x_1 = x_329; +x_2 = x_337; goto _start; } } @@ -5553,185 +8402,185 @@ goto _start; } case 12: { -uint8 x_381; +uint8 x_369; lean::dec(x_1); lean::dec(x_0); -x_381 = 0; -return x_381; +x_369 = 0; +return x_369; } default: { -uint8 x_385; +uint8 x_373; lean::dec(x_1); lean::dec(x_0); lean::dec(x_2); -x_385 = 0; -return x_385; +x_373 = 0; +return x_373; } } } case 7: { -uint8 x_386; -x_386 = lean::cnstr_get_scalar(x_1, sizeof(void*)*3); +uint8 x_374; +x_374 = lean::cnstr_get_scalar(x_1, sizeof(void*)*3); switch (lean::obj_tag(x_2)) { case 7: { -obj* x_387; obj* x_389; obj* x_391; obj* x_394; obj* x_396; uint8 x_398; obj* x_399; uint8 x_403; -x_387 = lean::cnstr_get(x_1, 0); -lean::inc(x_387); -x_389 = lean::cnstr_get(x_1, 1); -lean::inc(x_389); -x_391 = lean::cnstr_get(x_1, 2); -lean::inc(x_391); +obj* x_375; obj* x_377; obj* x_379; obj* x_382; obj* x_384; uint8 x_386; obj* x_387; uint8 x_391; +x_375 = lean::cnstr_get(x_1, 0); +lean::inc(x_375); +x_377 = lean::cnstr_get(x_1, 1); +lean::inc(x_377); +x_379 = lean::cnstr_get(x_1, 2); +lean::inc(x_379); lean::dec(x_1); -x_394 = lean::cnstr_get(x_2, 0); -lean::inc(x_394); -x_396 = lean::cnstr_get(x_2, 1); -lean::inc(x_396); -x_398 = lean::cnstr_get_scalar(x_2, sizeof(void*)*3); -x_399 = lean::cnstr_get(x_2, 2); -lean::inc(x_399); +x_382 = lean::cnstr_get(x_2, 0); +lean::inc(x_382); +x_384 = lean::cnstr_get(x_2, 1); +lean::inc(x_384); +x_386 = lean::cnstr_get_scalar(x_2, sizeof(void*)*3); +x_387 = lean::cnstr_get(x_2, 2); +lean::inc(x_387); lean::dec(x_2); lean::inc(x_0); -x_403 = l_Lean_IR_VarId_alphaEqv(x_0, x_387, x_394); -lean::dec(x_394); -lean::dec(x_387); -if (x_403 == 0) +x_391 = l_Lean_IR_VarId_alphaEqv(x_0, x_375, x_382); +lean::dec(x_382); +lean::dec(x_375); +if (x_391 == 0) { -uint8 x_411; -lean::dec(x_391); -lean::dec(x_389); -lean::dec(x_396); +uint8 x_399; +lean::dec(x_379); +lean::dec(x_377); +lean::dec(x_384); +lean::dec(x_387); lean::dec(x_0); -lean::dec(x_399); -x_411 = 0; -return x_411; +x_399 = 0; +return x_399; } else { -uint8 x_412; -x_412 = lean::nat_dec_eq(x_389, x_396); -lean::dec(x_396); -lean::dec(x_389); -if (x_412 == 0) +uint8 x_400; +x_400 = lean::nat_dec_eq(x_377, x_384); +lean::dec(x_384); +lean::dec(x_377); +if (x_400 == 0) { -uint8 x_418; -lean::dec(x_391); +uint8 x_406; +lean::dec(x_379); +lean::dec(x_387); lean::dec(x_0); -lean::dec(x_399); -x_418 = 0; -return x_418; +x_406 = 0; +return x_406; +} +else +{ +if (x_374 == 0) +{ +if (x_386 == 0) +{ +x_1 = x_379; +x_2 = x_387; +goto _start; +} +else +{ +uint8 x_411; +lean::dec(x_379); +lean::dec(x_387); +lean::dec(x_0); +x_411 = 0; +return x_411; +} } else { if (x_386 == 0) { -if (x_398 == 0) -{ -x_1 = x_391; -x_2 = x_399; -goto _start; +uint8 x_415; +lean::dec(x_379); +lean::dec(x_387); +lean::dec(x_0); +x_415 = 0; +return x_415; } else { -uint8 x_423; -lean::dec(x_391); +x_1 = x_379; +x_2 = x_387; +goto _start; +} +} +} +} +} +case 12: +{ +uint8 x_419; +lean::dec(x_1); lean::dec(x_0); -lean::dec(x_399); +x_419 = 0; +return x_419; +} +default: +{ +uint8 x_423; +lean::dec(x_1); +lean::dec(x_0); +lean::dec(x_2); x_423 = 0; return x_423; } } -else -{ -if (x_398 == 0) -{ -uint8 x_427; -lean::dec(x_391); -lean::dec(x_0); -lean::dec(x_399); -x_427 = 0; -return x_427; -} -else -{ -x_1 = x_391; -x_2 = x_399; -goto _start; -} -} -} -} -} -case 12: -{ -uint8 x_431; -lean::dec(x_1); -lean::dec(x_0); -x_431 = 0; -return x_431; -} -default: -{ -uint8 x_435; -lean::dec(x_1); -lean::dec(x_0); -lean::dec(x_2); -x_435 = 0; -return x_435; -} -} } case 8: { switch (lean::obj_tag(x_2)) { case 8: { -obj* x_436; obj* x_438; obj* x_441; obj* x_443; uint8 x_446; -x_436 = lean::cnstr_get(x_1, 0); -lean::inc(x_436); -x_438 = lean::cnstr_get(x_1, 1); -lean::inc(x_438); +obj* x_424; obj* x_426; obj* x_429; obj* x_431; uint8 x_434; +x_424 = lean::cnstr_get(x_1, 0); +lean::inc(x_424); +x_426 = lean::cnstr_get(x_1, 1); +lean::inc(x_426); lean::dec(x_1); -x_441 = lean::cnstr_get(x_2, 0); -lean::inc(x_441); -x_443 = lean::cnstr_get(x_2, 1); -lean::inc(x_443); +x_429 = lean::cnstr_get(x_2, 0); +lean::inc(x_429); +x_431 = lean::cnstr_get(x_2, 1); +lean::inc(x_431); lean::dec(x_2); -x_446 = l_Lean_KVMap_eqv(x_436, x_441); -if (x_446 == 0) +x_434 = l_Lean_KVMap_eqv(x_424, x_429); +if (x_434 == 0) { -uint8 x_450; -lean::dec(x_443); +uint8 x_438; +lean::dec(x_431); lean::dec(x_0); -lean::dec(x_438); -x_450 = 0; -return x_450; +lean::dec(x_426); +x_438 = 0; +return x_438; } else { -x_1 = x_438; -x_2 = x_443; +x_1 = x_426; +x_2 = x_431; goto _start; } } case 12: { -uint8 x_454; +uint8 x_442; lean::dec(x_1); lean::dec(x_0); -x_454 = 0; -return x_454; +x_442 = 0; +return x_442; } default: { -uint8 x_458; +uint8 x_446; lean::dec(x_1); lean::dec(x_0); lean::dec(x_2); -x_458 = 0; -return x_458; +x_446 = 0; +return x_446; } } } @@ -5740,113 +8589,113 @@ case 9: switch (lean::obj_tag(x_2)) { case 9: { -obj* x_459; obj* x_461; obj* x_463; obj* x_466; obj* x_468; obj* x_470; uint8 x_473; -x_459 = lean::cnstr_get(x_1, 0); -lean::inc(x_459); -x_461 = lean::cnstr_get(x_1, 1); -lean::inc(x_461); -x_463 = lean::cnstr_get(x_1, 2); -lean::inc(x_463); +obj* x_447; obj* x_449; obj* x_451; obj* x_454; obj* x_456; obj* x_458; uint8 x_461; +x_447 = lean::cnstr_get(x_1, 0); +lean::inc(x_447); +x_449 = lean::cnstr_get(x_1, 1); +lean::inc(x_449); +x_451 = lean::cnstr_get(x_1, 2); +lean::inc(x_451); lean::dec(x_1); -x_466 = lean::cnstr_get(x_2, 0); -lean::inc(x_466); -x_468 = lean::cnstr_get(x_2, 1); -lean::inc(x_468); -x_470 = lean::cnstr_get(x_2, 2); -lean::inc(x_470); +x_454 = lean::cnstr_get(x_2, 0); +lean::inc(x_454); +x_456 = lean::cnstr_get(x_2, 1); +lean::inc(x_456); +x_458 = lean::cnstr_get(x_2, 2); +lean::inc(x_458); lean::dec(x_2); -x_473 = lean_name_dec_eq(x_459, x_466); -lean::dec(x_466); -lean::dec(x_459); -if (x_473 == 0) +x_461 = lean_name_dec_eq(x_447, x_454); +lean::dec(x_454); +lean::dec(x_447); +if (x_461 == 0) { -uint8 x_481; +uint8 x_469; lean::dec(x_0); -lean::dec(x_461); -lean::dec(x_463); -lean::dec(x_470); -lean::dec(x_468); -x_481 = 0; -return x_481; +lean::dec(x_451); +lean::dec(x_449); +lean::dec(x_458); +lean::dec(x_456); +x_469 = 0; +return x_469; } else { +uint8 x_471; +lean::inc(x_0); +x_471 = l_Lean_IR_VarId_alphaEqv(x_0, x_449, x_456); +lean::dec(x_456); +lean::dec(x_449); +if (x_471 == 0) +{ +uint8 x_477; +lean::dec(x_0); +lean::dec(x_451); +lean::dec(x_458); +x_477 = 0; +return x_477; +} +else +{ +uint8 x_478; +x_478 = l_Array_isEqv___at_Lean_IR_FnBody_alphaEqv___main___spec__1(x_0, x_451, x_458); +lean::dec(x_458); +lean::dec(x_451); +return x_478; +} +} +} +case 12: +{ uint8 x_483; -lean::inc(x_0); -x_483 = l_Lean_IR_VarId_alphaEqv(x_0, x_461, x_468); -lean::dec(x_468); -lean::dec(x_461); -if (x_483 == 0) -{ -uint8 x_489; -lean::dec(x_0); -lean::dec(x_463); -lean::dec(x_470); -x_489 = 0; -return x_489; -} -else -{ -uint8 x_490; -x_490 = l_Array_isEqv___at_Lean_IR_FnBody_alphaEqv___main___spec__1(x_0, x_463, x_470); -lean::dec(x_470); -lean::dec(x_463); -return x_490; -} -} -} -case 12: -{ -uint8 x_495; lean::dec(x_1); lean::dec(x_0); -x_495 = 0; -return x_495; +x_483 = 0; +return x_483; } default: { +uint8 x_487; +lean::dec(x_1); +lean::dec(x_0); +lean::dec(x_2); +x_487 = 0; +return x_487; +} +} +} +case 10: +{ +switch (lean::obj_tag(x_2)) { +case 10: +{ +obj* x_488; obj* x_491; uint8 x_494; +x_488 = lean::cnstr_get(x_1, 0); +lean::inc(x_488); +lean::dec(x_1); +x_491 = lean::cnstr_get(x_2, 0); +lean::inc(x_491); +lean::dec(x_2); +x_494 = l_Lean_IR_Arg_alphaEqv___main(x_0, x_488, x_491); +lean::dec(x_491); +lean::dec(x_488); +return x_494; +} +case 12: +{ uint8 x_499; lean::dec(x_1); lean::dec(x_0); -lean::dec(x_2); x_499 = 0; return x_499; } -} -} -case 10: -{ -switch (lean::obj_tag(x_2)) { -case 10: -{ -obj* x_500; obj* x_503; uint8 x_506; -x_500 = lean::cnstr_get(x_1, 0); -lean::inc(x_500); -lean::dec(x_1); -x_503 = lean::cnstr_get(x_2, 0); -lean::inc(x_503); -lean::dec(x_2); -x_506 = l_Lean_IR_Arg_alphaEqv___main(x_0, x_500, x_503); -lean::dec(x_503); -lean::dec(x_500); -return x_506; -} -case 12: -{ -uint8 x_511; -lean::dec(x_1); -lean::dec(x_0); -x_511 = 0; -return x_511; -} default: { -uint8 x_515; +uint8 x_503; lean::dec(x_1); lean::dec(x_0); lean::dec(x_2); -x_515 = 0; -return x_515; +x_503 = 0; +return x_503; } } } @@ -5855,54 +8704,54 @@ case 11: switch (lean::obj_tag(x_2)) { case 11: { -obj* x_516; obj* x_518; obj* x_521; obj* x_523; uint8 x_526; -x_516 = lean::cnstr_get(x_1, 0); -lean::inc(x_516); -x_518 = lean::cnstr_get(x_1, 1); -lean::inc(x_518); +obj* x_504; obj* x_506; obj* x_509; obj* x_511; uint8 x_514; +x_504 = lean::cnstr_get(x_1, 0); +lean::inc(x_504); +x_506 = lean::cnstr_get(x_1, 1); +lean::inc(x_506); lean::dec(x_1); -x_521 = lean::cnstr_get(x_2, 0); -lean::inc(x_521); -x_523 = lean::cnstr_get(x_2, 1); -lean::inc(x_523); +x_509 = lean::cnstr_get(x_2, 0); +lean::inc(x_509); +x_511 = lean::cnstr_get(x_2, 1); +lean::inc(x_511); lean::dec(x_2); -x_526 = lean::nat_dec_eq(x_516, x_521); -lean::dec(x_521); -lean::dec(x_516); -if (x_526 == 0) +x_514 = lean::nat_dec_eq(x_504, x_509); +lean::dec(x_509); +lean::dec(x_504); +if (x_514 == 0) { -uint8 x_532; +uint8 x_520; +lean::dec(x_511); +lean::dec(x_506); lean::dec(x_0); -lean::dec(x_518); -lean::dec(x_523); -x_532 = 0; -return x_532; +x_520 = 0; +return x_520; } else { -uint8 x_533; -x_533 = l_Array_isEqv___at_Lean_IR_args_alphaEqv___spec__1(x_0, x_518, x_523); -lean::dec(x_523); -lean::dec(x_518); -return x_533; +uint8 x_521; +x_521 = l_Array_isEqv___at_Lean_IR_args_alphaEqv___spec__1(x_0, x_506, x_511); +lean::dec(x_511); +lean::dec(x_506); +return x_521; } } case 12: { -uint8 x_538; +uint8 x_526; lean::dec(x_1); lean::dec(x_0); -x_538 = 0; -return x_538; +x_526 = 0; +return x_526; } default: { -uint8 x_542; +uint8 x_530; lean::dec(x_1); lean::dec(x_0); lean::dec(x_2); -x_542 = 0; -return x_542; +x_530 = 0; +return x_530; } } } @@ -5912,16 +8761,16 @@ lean::dec(x_0); switch (lean::obj_tag(x_2)) { case 12: { -uint8 x_544; -x_544 = 1; -return x_544; +uint8 x_532; +x_532 = 1; +return x_532; } default: { -uint8 x_546; +uint8 x_534; lean::dec(x_2); -x_546 = 0; -return x_546; +x_534 = 0; +return x_534; } } } @@ -6047,6 +8896,8 @@ lean::mark_persistent(lean::ir::mk_unreachable_core); lean::mark_persistent(l_Lean_IR_altInh); l_Lean_IR_AltCore_mmodifyBody___main___rarg___closed__1 = _init_l_Lean_IR_AltCore_mmodifyBody___main___rarg___closed__1(); lean::mark_persistent(l_Lean_IR_AltCore_mmodifyBody___main___rarg___closed__1); + l_Lean_IR_vsetInh = _init_l_Lean_IR_vsetInh(); +lean::mark_persistent(l_Lean_IR_vsetInh); l_Lean_IR_VarId_hasAeqv = _init_l_Lean_IR_VarId_hasAeqv(); lean::mark_persistent(l_Lean_IR_VarId_hasAeqv); l_Lean_IR_Arg_hasAeqv = _init_l_Lean_IR_Arg_hasAeqv(); diff --git a/src/stage0/init/lean/compiler/ir/default.cpp b/src/stage0/init/lean/compiler/ir/default.cpp index 9a67ee9586..2366315574 100644 --- a/src/stage0/init/lean/compiler/ir/default.cpp +++ b/src/stage0/init/lean/compiler/ir/default.cpp @@ -1,6 +1,6 @@ // Lean compiler output // Module: init.lean.compiler.ir.default -// Imports: init.lean.compiler.ir.basic init.lean.compiler.ir.format init.lean.compiler.ir.pushproj init.lean.compiler.ir.elimdead init.lean.compiler.ir.simpcase init.lean.compiler.ir.resetreuse init.lean.compiler.ir.normids +// Imports: init.lean.compiler.ir.basic init.lean.compiler.ir.format init.lean.compiler.ir.pushproj init.lean.compiler.ir.elimdead init.lean.compiler.ir.simpcase init.lean.compiler.ir.resetreuse init.lean.compiler.ir.normids init.lean.compiler.ir.checker #include "runtime/object.h" #include "runtime/apply.h" typedef lean::object obj; typedef lean::usize usize; @@ -27,9 +27,9 @@ obj* decl_to_string_core(obj*); }} extern "C" obj* lean_io_prim_put_str(obj*, obj*); obj* l_IO_println___at_Lean_IR_test___spec__1(obj*, obj*); +obj* l_Lean_IR_MaxIndex_collectDecl___main(obj*, obj*); obj* l_Lean_IR_Decl_pushProj___main(obj*); obj* l_Nat_repr(obj*); -obj* l_Lean_IR_MaxVar_collectDecl___main(obj*, obj*); namespace lean { obj* string_append(obj*, obj*); } @@ -42,6 +42,7 @@ obj* l_Lean_IR_test___closed__6; obj* l_IO_print___at_Lean_IR_test___spec__2(obj*, obj*); obj* l_Lean_IR_Decl_simpCase___main(obj*); extern obj* l_IO_println___rarg___closed__1; +obj* l_Lean_IR_Decl_check(obj*, obj*); obj* l_Lean_IR_test___closed__3; obj* l_IO_print___at_Lean_IR_test___spec__2(obj* x_0, obj* x_1) { _start: @@ -110,7 +111,7 @@ obj* _init_l_Lean_IR_test___closed__1() { _start: { obj* x_0; -x_0 = lean::mk_string("Max variable "); +x_0 = lean::mk_string("Max index "); return x_0; } } @@ -161,10 +162,10 @@ _start: { obj* x_3; lean::inc(x_0); -x_3 = l_IO_println___at_Lean_IR_test___spec__1(x_0, x_1); +x_3 = l_Lean_IR_Decl_check(x_0, x_1); if (lean::obj_tag(x_3) == 0) { -obj* x_4; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_16; +obj* x_4; obj* x_6; obj* x_7; obj* x_8; obj* x_10; x_4 = lean::cnstr_get(x_3, 1); if (lean::is_exclusive(x_3)) { lean::cnstr_release(x_3, 0); @@ -182,61 +183,61 @@ if (lean::is_scalar(x_6)) { } lean::cnstr_set(x_8, 0, x_7); lean::cnstr_set(x_8, 1, x_4); -x_9 = lean::mk_nat_obj(0ul); lean::inc(x_0); -x_11 = l_Lean_IR_MaxVar_collectDecl___main(x_0, x_9); -x_12 = l_Nat_repr(x_11); -x_13 = l_Lean_IR_test___closed__1; -x_14 = lean::string_append(x_13, x_12); -lean::dec(x_12); -x_16 = l_IO_println___at_HasRepr_HasEval___spec__1(x_14, x_8); -lean::dec(x_14); -if (lean::obj_tag(x_16) == 0) +x_10 = l_IO_println___at_Lean_IR_test___spec__1(x_0, x_8); +if (lean::obj_tag(x_10) == 0) { -obj* x_18; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; -x_18 = lean::cnstr_get(x_16, 1); -if (lean::is_exclusive(x_16)) { - lean::cnstr_release(x_16, 0); - x_20 = x_16; +obj* x_11; obj* x_13; obj* x_14; obj* x_15; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_22; +x_11 = lean::cnstr_get(x_10, 1); +if (lean::is_exclusive(x_10)) { + lean::cnstr_release(x_10, 0); + x_13 = x_10; } else { - lean::inc(x_18); - lean::dec(x_16); - x_20 = lean::box(0); + lean::inc(x_11); + lean::dec(x_10); + x_13 = lean::box(0); } -if (lean::is_scalar(x_20)) { - x_21 = lean::alloc_cnstr(0, 2, 0); +if (lean::is_scalar(x_13)) { + x_14 = lean::alloc_cnstr(0, 2, 0); } else { - x_21 = x_20; + x_14 = x_13; } -lean::cnstr_set(x_21, 0, x_7); -lean::cnstr_set(x_21, 1, x_18); -x_22 = l_Lean_IR_Decl_pushProj___main(x_0); -x_23 = l_Lean_IR_test___closed__2; -x_24 = l_IO_println___at_HasRepr_HasEval___spec__1(x_23, x_21); -if (lean::obj_tag(x_24) == 0) +lean::cnstr_set(x_14, 0, x_7); +lean::cnstr_set(x_14, 1, x_11); +x_15 = lean::mk_nat_obj(0ul); +lean::inc(x_0); +x_17 = l_Lean_IR_MaxIndex_collectDecl___main(x_0, x_15); +x_18 = l_Nat_repr(x_17); +x_19 = l_Lean_IR_test___closed__1; +x_20 = lean::string_append(x_19, x_18); +lean::dec(x_18); +x_22 = l_IO_println___at_HasRepr_HasEval___spec__1(x_20, x_14); +lean::dec(x_20); +if (lean::obj_tag(x_22) == 0) { -obj* x_25; obj* x_27; obj* x_28; obj* x_30; -x_25 = lean::cnstr_get(x_24, 1); -if (lean::is_exclusive(x_24)) { - lean::cnstr_release(x_24, 0); - x_27 = x_24; +obj* x_24; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; +x_24 = lean::cnstr_get(x_22, 1); +if (lean::is_exclusive(x_22)) { + lean::cnstr_release(x_22, 0); + x_26 = x_22; } else { - lean::inc(x_25); - lean::dec(x_24); - x_27 = lean::box(0); + lean::inc(x_24); + lean::dec(x_22); + x_26 = lean::box(0); } -if (lean::is_scalar(x_27)) { - x_28 = lean::alloc_cnstr(0, 2, 0); +if (lean::is_scalar(x_26)) { + x_27 = lean::alloc_cnstr(0, 2, 0); } else { - x_28 = x_27; + x_27 = x_26; } -lean::cnstr_set(x_28, 0, x_7); -lean::cnstr_set(x_28, 1, x_25); -lean::inc(x_22); -x_30 = l_IO_println___at_Lean_IR_test___spec__1(x_22, x_28); +lean::cnstr_set(x_27, 0, x_7); +lean::cnstr_set(x_27, 1, x_24); +x_28 = l_Lean_IR_Decl_pushProj___main(x_0); +x_29 = l_Lean_IR_test___closed__2; +x_30 = l_IO_println___at_HasRepr_HasEval___spec__1(x_29, x_27); if (lean::obj_tag(x_30) == 0) { -obj* x_31; obj* x_33; obj* x_34; obj* x_35; obj* x_36; obj* x_37; +obj* x_31; obj* x_33; obj* x_34; obj* x_36; x_31 = lean::cnstr_get(x_30, 1); if (lean::is_exclusive(x_30)) { lean::cnstr_release(x_30, 0); @@ -253,33 +254,33 @@ if (lean::is_scalar(x_33)) { } lean::cnstr_set(x_34, 0, x_7); lean::cnstr_set(x_34, 1, x_31); -x_35 = l_Lean_IR_Decl_insertResetReuse___main(x_22); -x_36 = l_Lean_IR_test___closed__3; -x_37 = l_IO_println___at_HasRepr_HasEval___spec__1(x_36, x_34); -if (lean::obj_tag(x_37) == 0) +lean::inc(x_28); +x_36 = l_IO_println___at_Lean_IR_test___spec__1(x_28, x_34); +if (lean::obj_tag(x_36) == 0) { -obj* x_38; obj* x_40; obj* x_41; obj* x_43; -x_38 = lean::cnstr_get(x_37, 1); -if (lean::is_exclusive(x_37)) { - lean::cnstr_release(x_37, 0); - x_40 = x_37; +obj* x_37; obj* x_39; obj* x_40; obj* x_41; obj* x_42; obj* x_43; +x_37 = lean::cnstr_get(x_36, 1); +if (lean::is_exclusive(x_36)) { + lean::cnstr_release(x_36, 0); + x_39 = x_36; } else { - lean::inc(x_38); - lean::dec(x_37); - x_40 = lean::box(0); + lean::inc(x_37); + lean::dec(x_36); + x_39 = lean::box(0); } -if (lean::is_scalar(x_40)) { - x_41 = lean::alloc_cnstr(0, 2, 0); +if (lean::is_scalar(x_39)) { + x_40 = lean::alloc_cnstr(0, 2, 0); } else { - x_41 = x_40; + x_40 = x_39; } -lean::cnstr_set(x_41, 0, x_7); -lean::cnstr_set(x_41, 1, x_38); -lean::inc(x_35); -x_43 = l_IO_println___at_Lean_IR_test___spec__1(x_35, x_41); +lean::cnstr_set(x_40, 0, x_7); +lean::cnstr_set(x_40, 1, x_37); +x_41 = l_Lean_IR_Decl_insertResetReuse___main(x_28); +x_42 = l_Lean_IR_test___closed__3; +x_43 = l_IO_println___at_HasRepr_HasEval___spec__1(x_42, x_40); if (lean::obj_tag(x_43) == 0) { -obj* x_44; obj* x_46; obj* x_47; obj* x_48; obj* x_49; obj* x_50; +obj* x_44; obj* x_46; obj* x_47; obj* x_49; x_44 = lean::cnstr_get(x_43, 1); if (lean::is_exclusive(x_43)) { lean::cnstr_release(x_43, 0); @@ -296,33 +297,33 @@ if (lean::is_scalar(x_46)) { } lean::cnstr_set(x_47, 0, x_7); lean::cnstr_set(x_47, 1, x_44); -x_48 = l_Lean_IR_Decl_elimDead___main(x_35); -x_49 = l_Lean_IR_test___closed__4; -x_50 = l_IO_println___at_HasRepr_HasEval___spec__1(x_49, x_47); -if (lean::obj_tag(x_50) == 0) +lean::inc(x_41); +x_49 = l_IO_println___at_Lean_IR_test___spec__1(x_41, x_47); +if (lean::obj_tag(x_49) == 0) { -obj* x_51; obj* x_53; obj* x_54; obj* x_56; -x_51 = lean::cnstr_get(x_50, 1); -if (lean::is_exclusive(x_50)) { - lean::cnstr_release(x_50, 0); - x_53 = x_50; +obj* x_50; obj* x_52; obj* x_53; obj* x_54; obj* x_55; obj* x_56; +x_50 = lean::cnstr_get(x_49, 1); +if (lean::is_exclusive(x_49)) { + lean::cnstr_release(x_49, 0); + x_52 = x_49; } else { - lean::inc(x_51); - lean::dec(x_50); - x_53 = lean::box(0); + lean::inc(x_50); + lean::dec(x_49); + x_52 = lean::box(0); } -if (lean::is_scalar(x_53)) { - x_54 = lean::alloc_cnstr(0, 2, 0); +if (lean::is_scalar(x_52)) { + x_53 = lean::alloc_cnstr(0, 2, 0); } else { - x_54 = x_53; + x_53 = x_52; } -lean::cnstr_set(x_54, 0, x_7); -lean::cnstr_set(x_54, 1, x_51); -lean::inc(x_48); -x_56 = l_IO_println___at_Lean_IR_test___spec__1(x_48, x_54); +lean::cnstr_set(x_53, 0, x_7); +lean::cnstr_set(x_53, 1, x_50); +x_54 = l_Lean_IR_Decl_elimDead___main(x_41); +x_55 = l_Lean_IR_test___closed__4; +x_56 = l_IO_println___at_HasRepr_HasEval___spec__1(x_55, x_53); if (lean::obj_tag(x_56) == 0) { -obj* x_57; obj* x_59; obj* x_60; obj* x_61; obj* x_62; obj* x_63; +obj* x_57; obj* x_59; obj* x_60; obj* x_62; x_57 = lean::cnstr_get(x_56, 1); if (lean::is_exclusive(x_56)) { lean::cnstr_release(x_56, 0); @@ -339,33 +340,33 @@ if (lean::is_scalar(x_59)) { } lean::cnstr_set(x_60, 0, x_7); lean::cnstr_set(x_60, 1, x_57); -x_61 = l_Lean_IR_Decl_simpCase___main(x_48); -x_62 = l_Lean_IR_test___closed__5; -x_63 = l_IO_println___at_HasRepr_HasEval___spec__1(x_62, x_60); -if (lean::obj_tag(x_63) == 0) +lean::inc(x_54); +x_62 = l_IO_println___at_Lean_IR_test___spec__1(x_54, x_60); +if (lean::obj_tag(x_62) == 0) { -obj* x_64; obj* x_66; obj* x_67; obj* x_69; -x_64 = lean::cnstr_get(x_63, 1); -if (lean::is_exclusive(x_63)) { - lean::cnstr_release(x_63, 0); - x_66 = x_63; +obj* x_63; obj* x_65; obj* x_66; obj* x_67; obj* x_68; obj* x_69; +x_63 = lean::cnstr_get(x_62, 1); +if (lean::is_exclusive(x_62)) { + lean::cnstr_release(x_62, 0); + x_65 = x_62; } else { - lean::inc(x_64); - lean::dec(x_63); - x_66 = lean::box(0); + lean::inc(x_63); + lean::dec(x_62); + x_65 = lean::box(0); } -if (lean::is_scalar(x_66)) { - x_67 = lean::alloc_cnstr(0, 2, 0); +if (lean::is_scalar(x_65)) { + x_66 = lean::alloc_cnstr(0, 2, 0); } else { - x_67 = x_66; + x_66 = x_65; } -lean::cnstr_set(x_67, 0, x_7); -lean::cnstr_set(x_67, 1, x_64); -lean::inc(x_61); -x_69 = l_IO_println___at_Lean_IR_test___spec__1(x_61, x_67); +lean::cnstr_set(x_66, 0, x_7); +lean::cnstr_set(x_66, 1, x_63); +x_67 = l_Lean_IR_Decl_simpCase___main(x_54); +x_68 = l_Lean_IR_test___closed__5; +x_69 = l_IO_println___at_HasRepr_HasEval___spec__1(x_68, x_66); if (lean::obj_tag(x_69) == 0) { -obj* x_70; obj* x_72; obj* x_73; obj* x_74; obj* x_75; obj* x_76; +obj* x_70; obj* x_72; obj* x_73; obj* x_75; x_70 = lean::cnstr_get(x_69, 1); if (lean::is_exclusive(x_69)) { lean::cnstr_release(x_69, 0); @@ -382,335 +383,425 @@ if (lean::is_scalar(x_72)) { } lean::cnstr_set(x_73, 0, x_7); lean::cnstr_set(x_73, 1, x_70); -x_74 = l_Lean_IR_Decl_normalizeIds(x_61); -x_75 = l_Lean_IR_test___closed__6; -x_76 = l_IO_println___at_HasRepr_HasEval___spec__1(x_75, x_73); -if (lean::obj_tag(x_76) == 0) +lean::inc(x_67); +x_75 = l_IO_println___at_Lean_IR_test___spec__1(x_67, x_73); +if (lean::obj_tag(x_75) == 0) { -obj* x_77; obj* x_79; obj* x_80; obj* x_81; -x_77 = lean::cnstr_get(x_76, 1); -if (lean::is_exclusive(x_76)) { - lean::cnstr_release(x_76, 0); - x_79 = x_76; +obj* x_76; obj* x_78; obj* x_79; obj* x_80; obj* x_81; obj* x_82; +x_76 = lean::cnstr_get(x_75, 1); +if (lean::is_exclusive(x_75)) { + lean::cnstr_release(x_75, 0); + x_78 = x_75; } else { - lean::inc(x_77); - lean::dec(x_76); - x_79 = lean::box(0); + lean::inc(x_76); + lean::dec(x_75); + x_78 = lean::box(0); } -if (lean::is_scalar(x_79)) { - x_80 = lean::alloc_cnstr(0, 2, 0); +if (lean::is_scalar(x_78)) { + x_79 = lean::alloc_cnstr(0, 2, 0); } else { - x_80 = x_79; + x_79 = x_78; } -lean::cnstr_set(x_80, 0, x_7); -lean::cnstr_set(x_80, 1, x_77); -x_81 = l_IO_println___at_Lean_IR_test___spec__1(x_74, x_80); -if (lean::obj_tag(x_81) == 0) +lean::cnstr_set(x_79, 0, x_7); +lean::cnstr_set(x_79, 1, x_76); +x_80 = l_Lean_IR_Decl_normalizeIds(x_67); +x_81 = l_Lean_IR_test___closed__6; +x_82 = l_IO_println___at_HasRepr_HasEval___spec__1(x_81, x_79); +if (lean::obj_tag(x_82) == 0) { -obj* x_82; obj* x_84; obj* x_85; -x_82 = lean::cnstr_get(x_81, 1); -if (lean::is_exclusive(x_81)) { - lean::cnstr_release(x_81, 0); - x_84 = x_81; +obj* x_83; obj* x_85; obj* x_86; obj* x_88; +x_83 = lean::cnstr_get(x_82, 1); +if (lean::is_exclusive(x_82)) { + lean::cnstr_release(x_82, 0); + x_85 = x_82; } else { - lean::inc(x_82); - lean::dec(x_81); - x_84 = lean::box(0); + lean::inc(x_83); + lean::dec(x_82); + x_85 = lean::box(0); } -if (lean::is_scalar(x_84)) { - x_85 = lean::alloc_cnstr(0, 2, 0); +if (lean::is_scalar(x_85)) { + x_86 = lean::alloc_cnstr(0, 2, 0); } else { - x_85 = x_84; + x_86 = x_85; } -lean::cnstr_set(x_85, 0, x_7); -lean::cnstr_set(x_85, 1, x_82); -return x_85; +lean::cnstr_set(x_86, 0, x_7); +lean::cnstr_set(x_86, 1, x_83); +lean::inc(x_80); +x_88 = l_IO_println___at_Lean_IR_test___spec__1(x_80, x_86); +if (lean::obj_tag(x_88) == 0) +{ +obj* x_89; obj* x_91; obj* x_92; obj* x_93; +x_89 = lean::cnstr_get(x_88, 1); +if (lean::is_exclusive(x_88)) { + lean::cnstr_release(x_88, 0); + x_91 = x_88; +} else { + lean::inc(x_89); + lean::dec(x_88); + x_91 = lean::box(0); +} +if (lean::is_scalar(x_91)) { + x_92 = lean::alloc_cnstr(0, 2, 0); +} else { + x_92 = x_91; +} +lean::cnstr_set(x_92, 0, x_7); +lean::cnstr_set(x_92, 1, x_89); +x_93 = l_Lean_IR_Decl_check(x_80, x_92); +if (lean::obj_tag(x_93) == 0) +{ +obj* x_94; obj* x_96; obj* x_97; +x_94 = lean::cnstr_get(x_93, 1); +if (lean::is_exclusive(x_93)) { + lean::cnstr_release(x_93, 0); + x_96 = x_93; +} else { + lean::inc(x_94); + lean::dec(x_93); + x_96 = lean::box(0); +} +if (lean::is_scalar(x_96)) { + x_97 = lean::alloc_cnstr(0, 2, 0); +} else { + x_97 = x_96; +} +lean::cnstr_set(x_97, 0, x_7); +lean::cnstr_set(x_97, 1, x_94); +return x_97; } else { -obj* x_86; obj* x_88; obj* x_90; obj* x_91; -x_86 = lean::cnstr_get(x_81, 0); -x_88 = lean::cnstr_get(x_81, 1); -if (lean::is_exclusive(x_81)) { - x_90 = x_81; -} else { - lean::inc(x_86); - lean::inc(x_88); - lean::dec(x_81); - x_90 = lean::box(0); -} -if (lean::is_scalar(x_90)) { - x_91 = lean::alloc_cnstr(1, 2, 0); -} else { - x_91 = x_90; -} -lean::cnstr_set(x_91, 0, x_86); -lean::cnstr_set(x_91, 1, x_88); -return x_91; -} -} -else -{ -obj* x_93; obj* x_95; obj* x_97; obj* x_98; -lean::dec(x_74); -x_93 = lean::cnstr_get(x_76, 0); -x_95 = lean::cnstr_get(x_76, 1); -if (lean::is_exclusive(x_76)) { - x_97 = x_76; -} else { - lean::inc(x_93); - lean::inc(x_95); - lean::dec(x_76); - x_97 = lean::box(0); -} -if (lean::is_scalar(x_97)) { - x_98 = lean::alloc_cnstr(1, 2, 0); -} else { - x_98 = x_97; -} -lean::cnstr_set(x_98, 0, x_93); -lean::cnstr_set(x_98, 1, x_95); -return x_98; -} -} -else -{ -obj* x_100; obj* x_102; obj* x_104; obj* x_105; -lean::dec(x_61); -x_100 = lean::cnstr_get(x_69, 0); -x_102 = lean::cnstr_get(x_69, 1); -if (lean::is_exclusive(x_69)) { - x_104 = x_69; +obj* x_98; obj* x_100; obj* x_102; obj* x_103; +x_98 = lean::cnstr_get(x_93, 0); +x_100 = lean::cnstr_get(x_93, 1); +if (lean::is_exclusive(x_93)) { + x_102 = x_93; } else { + lean::inc(x_98); lean::inc(x_100); - lean::inc(x_102); - lean::dec(x_69); - x_104 = lean::box(0); + lean::dec(x_93); + x_102 = lean::box(0); } -if (lean::is_scalar(x_104)) { - x_105 = lean::alloc_cnstr(1, 2, 0); +if (lean::is_scalar(x_102)) { + x_103 = lean::alloc_cnstr(1, 2, 0); } else { - x_105 = x_104; + x_103 = x_102; } -lean::cnstr_set(x_105, 0, x_100); -lean::cnstr_set(x_105, 1, x_102); -return x_105; +lean::cnstr_set(x_103, 0, x_98); +lean::cnstr_set(x_103, 1, x_100); +return x_103; } } else { -obj* x_107; obj* x_109; obj* x_111; obj* x_112; -lean::dec(x_61); -x_107 = lean::cnstr_get(x_63, 0); -x_109 = lean::cnstr_get(x_63, 1); -if (lean::is_exclusive(x_63)) { - x_111 = x_63; +obj* x_105; obj* x_107; obj* x_109; obj* x_110; +lean::dec(x_80); +x_105 = lean::cnstr_get(x_88, 0); +x_107 = lean::cnstr_get(x_88, 1); +if (lean::is_exclusive(x_88)) { + x_109 = x_88; } else { + lean::inc(x_105); lean::inc(x_107); - lean::inc(x_109); - lean::dec(x_63); - x_111 = lean::box(0); + lean::dec(x_88); + x_109 = lean::box(0); } -if (lean::is_scalar(x_111)) { - x_112 = lean::alloc_cnstr(1, 2, 0); +if (lean::is_scalar(x_109)) { + x_110 = lean::alloc_cnstr(1, 2, 0); } else { - x_112 = x_111; + x_110 = x_109; } -lean::cnstr_set(x_112, 0, x_107); -lean::cnstr_set(x_112, 1, x_109); -return x_112; +lean::cnstr_set(x_110, 0, x_105); +lean::cnstr_set(x_110, 1, x_107); +return x_110; } } else { -obj* x_114; obj* x_116; obj* x_118; obj* x_119; -lean::dec(x_48); -x_114 = lean::cnstr_get(x_56, 0); -x_116 = lean::cnstr_get(x_56, 1); -if (lean::is_exclusive(x_56)) { - x_118 = x_56; +obj* x_112; obj* x_114; obj* x_116; obj* x_117; +lean::dec(x_80); +x_112 = lean::cnstr_get(x_82, 0); +x_114 = lean::cnstr_get(x_82, 1); +if (lean::is_exclusive(x_82)) { + x_116 = x_82; } else { + lean::inc(x_112); lean::inc(x_114); - lean::inc(x_116); - lean::dec(x_56); - x_118 = lean::box(0); + lean::dec(x_82); + x_116 = lean::box(0); } -if (lean::is_scalar(x_118)) { - x_119 = lean::alloc_cnstr(1, 2, 0); +if (lean::is_scalar(x_116)) { + x_117 = lean::alloc_cnstr(1, 2, 0); } else { - x_119 = x_118; + x_117 = x_116; } -lean::cnstr_set(x_119, 0, x_114); -lean::cnstr_set(x_119, 1, x_116); -return x_119; +lean::cnstr_set(x_117, 0, x_112); +lean::cnstr_set(x_117, 1, x_114); +return x_117; } } else { -obj* x_121; obj* x_123; obj* x_125; obj* x_126; -lean::dec(x_48); -x_121 = lean::cnstr_get(x_50, 0); -x_123 = lean::cnstr_get(x_50, 1); -if (lean::is_exclusive(x_50)) { - x_125 = x_50; +obj* x_119; obj* x_121; obj* x_123; obj* x_124; +lean::dec(x_67); +x_119 = lean::cnstr_get(x_75, 0); +x_121 = lean::cnstr_get(x_75, 1); +if (lean::is_exclusive(x_75)) { + x_123 = x_75; } else { + lean::inc(x_119); lean::inc(x_121); - lean::inc(x_123); - lean::dec(x_50); - x_125 = lean::box(0); + lean::dec(x_75); + x_123 = lean::box(0); } -if (lean::is_scalar(x_125)) { - x_126 = lean::alloc_cnstr(1, 2, 0); +if (lean::is_scalar(x_123)) { + x_124 = lean::alloc_cnstr(1, 2, 0); } else { - x_126 = x_125; + x_124 = x_123; } -lean::cnstr_set(x_126, 0, x_121); -lean::cnstr_set(x_126, 1, x_123); -return x_126; +lean::cnstr_set(x_124, 0, x_119); +lean::cnstr_set(x_124, 1, x_121); +return x_124; } } else { -obj* x_128; obj* x_130; obj* x_132; obj* x_133; -lean::dec(x_35); -x_128 = lean::cnstr_get(x_43, 0); -x_130 = lean::cnstr_get(x_43, 1); -if (lean::is_exclusive(x_43)) { - x_132 = x_43; +obj* x_126; obj* x_128; obj* x_130; obj* x_131; +lean::dec(x_67); +x_126 = lean::cnstr_get(x_69, 0); +x_128 = lean::cnstr_get(x_69, 1); +if (lean::is_exclusive(x_69)) { + x_130 = x_69; } else { + lean::inc(x_126); lean::inc(x_128); - lean::inc(x_130); - lean::dec(x_43); - x_132 = lean::box(0); + lean::dec(x_69); + x_130 = lean::box(0); } -if (lean::is_scalar(x_132)) { - x_133 = lean::alloc_cnstr(1, 2, 0); +if (lean::is_scalar(x_130)) { + x_131 = lean::alloc_cnstr(1, 2, 0); } else { - x_133 = x_132; + x_131 = x_130; } -lean::cnstr_set(x_133, 0, x_128); -lean::cnstr_set(x_133, 1, x_130); -return x_133; +lean::cnstr_set(x_131, 0, x_126); +lean::cnstr_set(x_131, 1, x_128); +return x_131; } } else { -obj* x_135; obj* x_137; obj* x_139; obj* x_140; -lean::dec(x_35); -x_135 = lean::cnstr_get(x_37, 0); -x_137 = lean::cnstr_get(x_37, 1); -if (lean::is_exclusive(x_37)) { - x_139 = x_37; +obj* x_133; obj* x_135; obj* x_137; obj* x_138; +lean::dec(x_54); +x_133 = lean::cnstr_get(x_62, 0); +x_135 = lean::cnstr_get(x_62, 1); +if (lean::is_exclusive(x_62)) { + x_137 = x_62; } else { + lean::inc(x_133); lean::inc(x_135); - lean::inc(x_137); - lean::dec(x_37); - x_139 = lean::box(0); + lean::dec(x_62); + x_137 = lean::box(0); } -if (lean::is_scalar(x_139)) { - x_140 = lean::alloc_cnstr(1, 2, 0); +if (lean::is_scalar(x_137)) { + x_138 = lean::alloc_cnstr(1, 2, 0); } else { - x_140 = x_139; + x_138 = x_137; } -lean::cnstr_set(x_140, 0, x_135); -lean::cnstr_set(x_140, 1, x_137); -return x_140; +lean::cnstr_set(x_138, 0, x_133); +lean::cnstr_set(x_138, 1, x_135); +return x_138; } } else { -obj* x_142; obj* x_144; obj* x_146; obj* x_147; -lean::dec(x_22); -x_142 = lean::cnstr_get(x_30, 0); -x_144 = lean::cnstr_get(x_30, 1); -if (lean::is_exclusive(x_30)) { - x_146 = x_30; +obj* x_140; obj* x_142; obj* x_144; obj* x_145; +lean::dec(x_54); +x_140 = lean::cnstr_get(x_56, 0); +x_142 = lean::cnstr_get(x_56, 1); +if (lean::is_exclusive(x_56)) { + x_144 = x_56; } else { + lean::inc(x_140); lean::inc(x_142); - lean::inc(x_144); - lean::dec(x_30); - x_146 = lean::box(0); + lean::dec(x_56); + x_144 = lean::box(0); } -if (lean::is_scalar(x_146)) { - x_147 = lean::alloc_cnstr(1, 2, 0); +if (lean::is_scalar(x_144)) { + x_145 = lean::alloc_cnstr(1, 2, 0); } else { - x_147 = x_146; + x_145 = x_144; } -lean::cnstr_set(x_147, 0, x_142); -lean::cnstr_set(x_147, 1, x_144); -return x_147; +lean::cnstr_set(x_145, 0, x_140); +lean::cnstr_set(x_145, 1, x_142); +return x_145; } } else { -obj* x_149; obj* x_151; obj* x_153; obj* x_154; -lean::dec(x_22); -x_149 = lean::cnstr_get(x_24, 0); -x_151 = lean::cnstr_get(x_24, 1); -if (lean::is_exclusive(x_24)) { - x_153 = x_24; +obj* x_147; obj* x_149; obj* x_151; obj* x_152; +lean::dec(x_41); +x_147 = lean::cnstr_get(x_49, 0); +x_149 = lean::cnstr_get(x_49, 1); +if (lean::is_exclusive(x_49)) { + x_151 = x_49; } else { + lean::inc(x_147); lean::inc(x_149); - lean::inc(x_151); - lean::dec(x_24); - x_153 = lean::box(0); + lean::dec(x_49); + x_151 = lean::box(0); } -if (lean::is_scalar(x_153)) { - x_154 = lean::alloc_cnstr(1, 2, 0); +if (lean::is_scalar(x_151)) { + x_152 = lean::alloc_cnstr(1, 2, 0); } else { - x_154 = x_153; + x_152 = x_151; } -lean::cnstr_set(x_154, 0, x_149); -lean::cnstr_set(x_154, 1, x_151); -return x_154; +lean::cnstr_set(x_152, 0, x_147); +lean::cnstr_set(x_152, 1, x_149); +return x_152; } } else { -obj* x_156; obj* x_158; obj* x_160; obj* x_161; -lean::dec(x_0); -x_156 = lean::cnstr_get(x_16, 0); -x_158 = lean::cnstr_get(x_16, 1); -if (lean::is_exclusive(x_16)) { - x_160 = x_16; +obj* x_154; obj* x_156; obj* x_158; obj* x_159; +lean::dec(x_41); +x_154 = lean::cnstr_get(x_43, 0); +x_156 = lean::cnstr_get(x_43, 1); +if (lean::is_exclusive(x_43)) { + x_158 = x_43; } else { + lean::inc(x_154); lean::inc(x_156); - lean::inc(x_158); - lean::dec(x_16); - x_160 = lean::box(0); + lean::dec(x_43); + x_158 = lean::box(0); } -if (lean::is_scalar(x_160)) { - x_161 = lean::alloc_cnstr(1, 2, 0); +if (lean::is_scalar(x_158)) { + x_159 = lean::alloc_cnstr(1, 2, 0); } else { - x_161 = x_160; + x_159 = x_158; } -lean::cnstr_set(x_161, 0, x_156); -lean::cnstr_set(x_161, 1, x_158); -return x_161; +lean::cnstr_set(x_159, 0, x_154); +lean::cnstr_set(x_159, 1, x_156); +return x_159; } } else { -obj* x_163; obj* x_165; obj* x_167; obj* x_168; -lean::dec(x_0); -x_163 = lean::cnstr_get(x_3, 0); -x_165 = lean::cnstr_get(x_3, 1); -if (lean::is_exclusive(x_3)) { - x_167 = x_3; +obj* x_161; obj* x_163; obj* x_165; obj* x_166; +lean::dec(x_28); +x_161 = lean::cnstr_get(x_36, 0); +x_163 = lean::cnstr_get(x_36, 1); +if (lean::is_exclusive(x_36)) { + x_165 = x_36; } else { + lean::inc(x_161); lean::inc(x_163); - lean::inc(x_165); - lean::dec(x_3); - x_167 = lean::box(0); + lean::dec(x_36); + x_165 = lean::box(0); } -if (lean::is_scalar(x_167)) { - x_168 = lean::alloc_cnstr(1, 2, 0); +if (lean::is_scalar(x_165)) { + x_166 = lean::alloc_cnstr(1, 2, 0); } else { - x_168 = x_167; + x_166 = x_165; } -lean::cnstr_set(x_168, 0, x_163); -lean::cnstr_set(x_168, 1, x_165); -return x_168; +lean::cnstr_set(x_166, 0, x_161); +lean::cnstr_set(x_166, 1, x_163); +return x_166; +} +} +else +{ +obj* x_168; obj* x_170; obj* x_172; obj* x_173; +lean::dec(x_28); +x_168 = lean::cnstr_get(x_30, 0); +x_170 = lean::cnstr_get(x_30, 1); +if (lean::is_exclusive(x_30)) { + x_172 = x_30; +} else { + lean::inc(x_168); + lean::inc(x_170); + lean::dec(x_30); + x_172 = lean::box(0); +} +if (lean::is_scalar(x_172)) { + x_173 = lean::alloc_cnstr(1, 2, 0); +} else { + x_173 = x_172; +} +lean::cnstr_set(x_173, 0, x_168); +lean::cnstr_set(x_173, 1, x_170); +return x_173; +} +} +else +{ +obj* x_175; obj* x_177; obj* x_179; obj* x_180; +lean::dec(x_0); +x_175 = lean::cnstr_get(x_22, 0); +x_177 = lean::cnstr_get(x_22, 1); +if (lean::is_exclusive(x_22)) { + x_179 = x_22; +} else { + lean::inc(x_175); + lean::inc(x_177); + lean::dec(x_22); + x_179 = lean::box(0); +} +if (lean::is_scalar(x_179)) { + x_180 = lean::alloc_cnstr(1, 2, 0); +} else { + x_180 = x_179; +} +lean::cnstr_set(x_180, 0, x_175); +lean::cnstr_set(x_180, 1, x_177); +return x_180; +} +} +else +{ +obj* x_182; obj* x_184; obj* x_186; obj* x_187; +lean::dec(x_0); +x_182 = lean::cnstr_get(x_10, 0); +x_184 = lean::cnstr_get(x_10, 1); +if (lean::is_exclusive(x_10)) { + x_186 = x_10; +} else { + lean::inc(x_182); + lean::inc(x_184); + lean::dec(x_10); + x_186 = lean::box(0); +} +if (lean::is_scalar(x_186)) { + x_187 = lean::alloc_cnstr(1, 2, 0); +} else { + x_187 = x_186; +} +lean::cnstr_set(x_187, 0, x_182); +lean::cnstr_set(x_187, 1, x_184); +return x_187; +} +} +else +{ +obj* x_189; obj* x_191; obj* x_193; obj* x_194; +lean::dec(x_0); +x_189 = lean::cnstr_get(x_3, 0); +x_191 = lean::cnstr_get(x_3, 1); +if (lean::is_exclusive(x_3)) { + x_193 = x_3; +} else { + lean::inc(x_189); + lean::inc(x_191); + lean::dec(x_3); + x_193 = lean::box(0); +} +if (lean::is_scalar(x_193)) { + x_194 = lean::alloc_cnstr(1, 2, 0); +} else { + x_194 = x_193; +} +lean::cnstr_set(x_194, 0, x_189); +lean::cnstr_set(x_194, 1, x_191); +return x_194; } } } @@ -722,6 +813,7 @@ obj* initialize_init_lean_compiler_ir_elimdead(obj*); obj* initialize_init_lean_compiler_ir_simpcase(obj*); obj* initialize_init_lean_compiler_ir_resetreuse(obj*); obj* initialize_init_lean_compiler_ir_normids(obj*); +obj* initialize_init_lean_compiler_ir_checker(obj*); static bool _G_initialized = false; obj* initialize_init_lean_compiler_ir_default(obj* w) { if (_G_initialized) return w; @@ -740,6 +832,8 @@ if (io_result_is_error(w)) return w; w = initialize_init_lean_compiler_ir_resetreuse(w); if (io_result_is_error(w)) return w; w = initialize_init_lean_compiler_ir_normids(w); +if (io_result_is_error(w)) return w; +w = initialize_init_lean_compiler_ir_checker(w); if (io_result_is_error(w)) return w; l_Lean_IR_test___closed__1 = _init_l_Lean_IR_test___closed__1(); lean::mark_persistent(l_Lean_IR_test___closed__1); diff --git a/src/stage0/init/lean/compiler/ir/elimdead.cpp b/src/stage0/init/lean/compiler/ir/elimdead.cpp index 18e7b557b0..9cae4cc4ee 100644 --- a/src/stage0/init/lean/compiler/ir/elimdead.cpp +++ b/src/stage0/init/lean/compiler/ir/elimdead.cpp @@ -14,18 +14,18 @@ typedef lean::uint32 uint32; typedef lean::uint64 uint64; #pragma GCC diagnostic ignored "-Wunused-label" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif -obj* l_Lean_IR_FnBody_collectFreeVars(obj*, obj*); namespace lean { obj* nat_sub(obj*, obj*); } obj* l_Array_hmmapAux___main___at_Lean_IR_FnBody_elimDead___main___spec__2___closed__1; obj* l_Array_hmmapAux___main___at_Lean_IR_FnBody_elimDead___main___spec__1(obj*, obj*); obj* l_Lean_IR_reshapeWithoutDead(obj*, obj*); +obj* l_Lean_IR_FnBody_freeIndices(obj*); obj* l_Array_back___at_Lean_IR_reshapeWithoutDeadAux___main___spec__1(obj*); obj* l_Lean_IR_reshapeWithoutDeadAux(obj*, obj*, obj*); obj* l_Array_back___at_Lean_IR_reshapeWithoutDeadAux___main___spec__1___boxed(obj*); obj* l_Lean_IR_FnBody_elimDead___main(obj*); -obj* l_Lean_IR_FnBody_freeVars(obj*); +obj* l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__1(obj*, obj*); obj* l_Lean_IR_reshapeWithoutDeadAux___main(obj*, obj*, obj*); namespace lean { uint8 nat_dec_lt(obj*, obj*); @@ -37,7 +37,7 @@ obj* nat_add(obj*, obj*); } uint8 l_Array_isEmpty___rarg(obj*); obj* l_Lean_IR_Decl_elimDead___main(obj*); -obj* l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__1(obj*, obj*); +obj* l_Lean_IR_FnBody_collectFreeIndices(obj*, obj*); obj* l_Array_hmmapAux___main___at_Lean_IR_FnBody_elimDead___main___spec__2(obj*, obj*); obj* l_Lean_IR_FnBody_setBody___main(obj*, obj*); obj* l_Lean_IR_FnBody_elimDead(obj*); @@ -96,7 +96,7 @@ lbl_7: obj* x_17; obj* x_18; lean::dec(x_6); lean::inc(x_4); -x_17 = l_Lean_IR_FnBody_collectFreeVars(x_4, x_2); +x_17 = l_Lean_IR_FnBody_collectFreeIndices(x_4, x_2); x_18 = l_Lean_IR_FnBody_setBody___main(x_4, x_1); x_0 = x_5; x_1 = x_18; @@ -107,7 +107,7 @@ lbl_9: { obj* x_21; lean::inc(x_2); -x_21 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__1(x_2, x_8); +x_21 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__1(x_2, x_8); lean::dec(x_8); if (lean::obj_tag(x_21) == 0) { @@ -155,7 +155,7 @@ _start: { obj* x_3; obj* x_4; lean::inc(x_1); -x_3 = l_Lean_IR_FnBody_freeVars(x_1); +x_3 = l_Lean_IR_FnBody_freeIndices(x_1); x_4 = l_Lean_IR_reshapeWithoutDeadAux___main(x_0, x_1, x_3); return x_4; } @@ -183,47 +183,44 @@ x_10 = lean::nat_add(x_0, x_9); switch (lean::obj_tag(x_6)) { case 1: { -obj* x_11; obj* x_13; uint8 x_15; obj* x_16; obj* x_18; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; +obj* x_11; obj* x_13; obj* x_15; obj* x_17; obj* x_19; obj* x_20; obj* x_21; obj* x_22; x_11 = lean::cnstr_get(x_6, 0); x_13 = lean::cnstr_get(x_6, 1); -x_15 = lean::cnstr_get_scalar(x_6, sizeof(void*)*4); -x_16 = lean::cnstr_get(x_6, 2); -x_18 = lean::cnstr_get(x_6, 3); +x_15 = lean::cnstr_get(x_6, 2); +x_17 = lean::cnstr_get(x_6, 3); if (lean::is_exclusive(x_6)) { - x_20 = x_6; + x_19 = x_6; } else { lean::inc(x_11); lean::inc(x_13); - lean::inc(x_16); - lean::inc(x_18); + lean::inc(x_15); + lean::inc(x_17); lean::dec(x_6); - x_20 = lean::box(0); + x_19 = lean::box(0); } -x_21 = l_Lean_IR_FnBody_elimDead___main(x_16); -if (lean::is_scalar(x_20)) { - x_22 = lean::alloc_cnstr(1, 4, 1); +x_20 = l_Lean_IR_FnBody_elimDead___main(x_15); +if (lean::is_scalar(x_19)) { + x_21 = lean::alloc_cnstr(1, 4, 0); } else { - x_22 = x_20; + x_21 = x_19; } -lean::cnstr_set(x_22, 0, x_11); -lean::cnstr_set(x_22, 1, x_13); -lean::cnstr_set(x_22, 2, x_21); -lean::cnstr_set(x_22, 3, x_18); -lean::cnstr_set_scalar(x_22, sizeof(void*)*4, x_15); -x_23 = x_22; -x_24 = lean::array_fset(x_8, x_0, x_23); +lean::cnstr_set(x_21, 0, x_11); +lean::cnstr_set(x_21, 1, x_13); +lean::cnstr_set(x_21, 2, x_20); +lean::cnstr_set(x_21, 3, x_17); +x_22 = lean::array_fset(x_8, x_0, x_21); lean::dec(x_0); x_0 = x_10; -x_1 = x_24; +x_1 = x_22; goto _start; } default: { -obj* x_27; -x_27 = lean::array_fset(x_8, x_0, x_6); +obj* x_25; +x_25 = lean::array_fset(x_8, x_0, x_6); lean::dec(x_0); x_0 = x_10; -x_1 = x_27; +x_1 = x_25; goto _start; } } diff --git a/src/stage0/init/lean/compiler/ir/format.cpp b/src/stage0/init/lean/compiler/ir/format.cpp index 88c2047899..730791b912 100644 --- a/src/stage0/init/lean/compiler/ir/format.cpp +++ b/src/stage0/init/lean/compiler/ir/format.cpp @@ -1991,700 +1991,687 @@ return x_39; } case 1: { -obj* x_40; obj* x_42; uint8 x_44; obj* x_45; obj* x_47; obj* x_50; obj* x_51; obj* x_52; obj* x_54; obj* x_55; obj* x_56; obj* x_57; uint8 x_59; obj* x_60; obj* x_61; obj* x_62; obj* x_63; obj* x_64; obj* x_65; obj* x_66; obj* x_67; obj* x_68; obj* x_69; obj* x_70; obj* x_72; obj* x_73; obj* x_74; obj* x_75; obj* x_77; obj* x_78; obj* x_79; obj* x_80; obj* x_81; obj* x_82; obj* x_83; obj* x_84; obj* x_85; obj* x_86; obj* x_87; +obj* x_40; obj* x_42; obj* x_44; obj* x_46; obj* x_49; obj* x_50; obj* x_51; obj* x_53; obj* x_54; obj* x_55; obj* x_56; uint8 x_58; obj* x_59; obj* x_60; obj* x_61; obj* x_62; obj* x_63; obj* x_65; obj* x_66; obj* x_67; obj* x_68; obj* x_70; obj* x_71; obj* x_72; obj* x_73; obj* x_74; obj* x_75; obj* x_76; obj* x_77; obj* x_78; obj* x_79; obj* x_80; x_40 = lean::cnstr_get(x_1, 0); lean::inc(x_40); x_42 = lean::cnstr_get(x_1, 1); lean::inc(x_42); -x_44 = lean::cnstr_get_scalar(x_1, sizeof(void*)*4); -x_45 = lean::cnstr_get(x_1, 2); -lean::inc(x_45); -x_47 = lean::cnstr_get(x_1, 3); -lean::inc(x_47); +x_44 = lean::cnstr_get(x_1, 2); +lean::inc(x_44); +x_46 = lean::cnstr_get(x_1, 3); +lean::inc(x_46); lean::dec(x_1); -x_50 = l_Nat_repr(x_40); -x_51 = l_Lean_IR_JoinPointId_HasToString___closed__1; -x_52 = lean::string_append(x_51, x_50); -lean::dec(x_50); -x_54 = lean::alloc_cnstr(2, 1, 0); -lean::cnstr_set(x_54, 0, x_52); -x_55 = lean::mk_nat_obj(0ul); -x_56 = lean::box(0); -x_57 = l_Array_miterateAux___main___at_Lean_IR_formatFnBody___main___spec__2(x_42, x_42, x_55, x_56); +x_49 = l_Nat_repr(x_40); +x_50 = l_Lean_IR_JoinPointId_HasToString___closed__1; +x_51 = lean::string_append(x_50, x_49); +lean::dec(x_49); +x_53 = lean::alloc_cnstr(2, 1, 0); +lean::cnstr_set(x_53, 0, x_51); +x_54 = lean::mk_nat_obj(0ul); +x_55 = lean::box(0); +x_56 = l_Array_miterateAux___main___at_Lean_IR_formatFnBody___main___spec__2(x_42, x_42, x_54, x_55); lean::dec(x_42); -x_59 = 0; -x_60 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_60, 0, x_54); -lean::cnstr_set(x_60, 1, x_57); -lean::cnstr_set_scalar(x_60, sizeof(void*)*2, x_59); -x_61 = x_60; -x_62 = l___private_init_lean_compiler_ir_format_7__formatParam___main___closed__1; -x_63 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_63, 0, x_61); -lean::cnstr_set(x_63, 1, x_62); -lean::cnstr_set_scalar(x_63, sizeof(void*)*2, x_59); -x_64 = x_63; -x_65 = l___private_init_lean_compiler_ir_format_6__formatIRType___main(x_44); -x_66 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_66, 0, x_64); -lean::cnstr_set(x_66, 1, x_65); -lean::cnstr_set_scalar(x_66, sizeof(void*)*2, x_59); -x_67 = x_66; -x_68 = l_Lean_IR_formatFnBody___main___closed__3; -x_69 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_69, 0, x_67); -lean::cnstr_set(x_69, 1, x_68); -lean::cnstr_set_scalar(x_69, sizeof(void*)*2, x_59); -x_70 = x_69; +x_58 = 0; +x_59 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_59, 0, x_53); +lean::cnstr_set(x_59, 1, x_56); +lean::cnstr_set_scalar(x_59, sizeof(void*)*2, x_58); +x_60 = x_59; +x_61 = l_Lean_IR_formatFnBody___main___closed__3; +x_62 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_62, 0, x_60); +lean::cnstr_set(x_62, 1, x_61); +lean::cnstr_set_scalar(x_62, sizeof(void*)*2, x_58); +x_63 = x_62; lean::inc(x_0); -x_72 = l_Lean_IR_formatFnBody___main(x_0, x_45); -x_73 = lean::box(1); +x_65 = l_Lean_IR_formatFnBody___main(x_0, x_44); +x_66 = lean::box(1); +x_67 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_67, 0, x_66); +lean::cnstr_set(x_67, 1, x_65); +lean::cnstr_set_scalar(x_67, sizeof(void*)*2, x_58); +x_68 = x_67; +lean::inc(x_0); +x_70 = lean::alloc_cnstr(3, 2, 0); +lean::cnstr_set(x_70, 0, x_0); +lean::cnstr_set(x_70, 1, x_68); +x_71 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_71, 0, x_63); +lean::cnstr_set(x_71, 1, x_70); +lean::cnstr_set_scalar(x_71, sizeof(void*)*2, x_58); +x_72 = x_71; +x_73 = l_Lean_IR_formatFnBody___main___closed__2; x_74 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_74, 0, x_73); -lean::cnstr_set(x_74, 1, x_72); -lean::cnstr_set_scalar(x_74, sizeof(void*)*2, x_59); +lean::cnstr_set(x_74, 0, x_72); +lean::cnstr_set(x_74, 1, x_73); +lean::cnstr_set_scalar(x_74, sizeof(void*)*2, x_58); x_75 = x_74; -lean::inc(x_0); -x_77 = lean::alloc_cnstr(3, 2, 0); -lean::cnstr_set(x_77, 0, x_0); -lean::cnstr_set(x_77, 1, x_75); -x_78 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_78, 0, x_70); -lean::cnstr_set(x_78, 1, x_77); -lean::cnstr_set_scalar(x_78, sizeof(void*)*2, x_59); -x_79 = x_78; -x_80 = l_Lean_IR_formatFnBody___main___closed__2; -x_81 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_81, 0, x_79); -lean::cnstr_set(x_81, 1, x_80); -lean::cnstr_set_scalar(x_81, sizeof(void*)*2, x_59); -x_82 = x_81; -x_83 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_83, 0, x_82); -lean::cnstr_set(x_83, 1, x_73); -lean::cnstr_set_scalar(x_83, sizeof(void*)*2, x_59); -x_84 = x_83; -x_85 = l_Lean_IR_formatFnBody___main(x_0, x_47); -x_86 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_86, 0, x_84); -lean::cnstr_set(x_86, 1, x_85); -lean::cnstr_set_scalar(x_86, sizeof(void*)*2, x_59); -x_87 = x_86; -return x_87; +x_76 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_76, 0, x_75); +lean::cnstr_set(x_76, 1, x_66); +lean::cnstr_set_scalar(x_76, sizeof(void*)*2, x_58); +x_77 = x_76; +x_78 = l_Lean_IR_formatFnBody___main(x_0, x_46); +x_79 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_79, 0, x_77); +lean::cnstr_set(x_79, 1, x_78); +lean::cnstr_set_scalar(x_79, sizeof(void*)*2, x_58); +x_80 = x_79; +return x_80; } case 2: { -obj* x_88; obj* x_90; obj* x_92; obj* x_94; obj* x_97; obj* x_98; obj* x_99; obj* x_101; uint8 x_102; obj* x_103; obj* x_104; obj* x_105; obj* x_106; obj* x_107; obj* x_108; obj* x_109; obj* x_110; obj* x_111; obj* x_112; obj* x_113; obj* x_114; obj* x_115; obj* x_116; obj* x_117; obj* x_119; obj* x_120; obj* x_121; obj* x_122; obj* x_123; obj* x_124; obj* x_125; obj* x_126; obj* x_127; obj* x_128; obj* x_129; obj* x_130; -x_88 = lean::cnstr_get(x_1, 0); -lean::inc(x_88); -x_90 = lean::cnstr_get(x_1, 1); -lean::inc(x_90); -x_92 = lean::cnstr_get(x_1, 2); -lean::inc(x_92); -x_94 = lean::cnstr_get(x_1, 3); -lean::inc(x_94); +obj* x_81; obj* x_83; obj* x_85; obj* x_87; obj* x_90; obj* x_91; obj* x_92; obj* x_94; uint8 x_95; obj* x_96; obj* x_97; obj* x_98; obj* x_99; obj* x_100; obj* x_101; obj* x_102; obj* x_103; obj* x_104; obj* x_105; obj* x_106; obj* x_107; obj* x_108; obj* x_109; obj* x_110; obj* x_112; obj* x_113; obj* x_114; obj* x_115; obj* x_116; obj* x_117; obj* x_118; obj* x_119; obj* x_120; obj* x_121; obj* x_122; obj* x_123; +x_81 = lean::cnstr_get(x_1, 0); +lean::inc(x_81); +x_83 = lean::cnstr_get(x_1, 1); +lean::inc(x_83); +x_85 = lean::cnstr_get(x_1, 2); +lean::inc(x_85); +x_87 = lean::cnstr_get(x_1, 3); +lean::inc(x_87); lean::dec(x_1); -x_97 = l_Nat_repr(x_88); -x_98 = l_Lean_IR_VarId_HasToString___closed__1; -x_99 = lean::string_append(x_98, x_97); -lean::dec(x_97); -x_101 = lean::alloc_cnstr(2, 1, 0); -lean::cnstr_set(x_101, 0, x_99); -x_102 = 0; -x_103 = l_Lean_IR_formatFnBody___main___closed__4; +x_90 = l_Nat_repr(x_81); +x_91 = l_Lean_IR_VarId_HasToString___closed__1; +x_92 = lean::string_append(x_91, x_90); +lean::dec(x_90); +x_94 = lean::alloc_cnstr(2, 1, 0); +lean::cnstr_set(x_94, 0, x_92); +x_95 = 0; +x_96 = l_Lean_IR_formatFnBody___main___closed__4; +x_97 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_97, 0, x_96); +lean::cnstr_set(x_97, 1, x_94); +lean::cnstr_set_scalar(x_97, sizeof(void*)*2, x_95); +x_98 = x_97; +x_99 = l_Lean_Format_sbracket___closed__1; +x_100 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_100, 0, x_98); +lean::cnstr_set(x_100, 1, x_99); +lean::cnstr_set_scalar(x_100, sizeof(void*)*2, x_95); +x_101 = x_100; +x_102 = l_Nat_repr(x_83); +x_103 = lean::alloc_cnstr(2, 1, 0); +lean::cnstr_set(x_103, 0, x_102); x_104 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_104, 0, x_103); -lean::cnstr_set(x_104, 1, x_101); -lean::cnstr_set_scalar(x_104, sizeof(void*)*2, x_102); +lean::cnstr_set(x_104, 0, x_101); +lean::cnstr_set(x_104, 1, x_103); +lean::cnstr_set_scalar(x_104, sizeof(void*)*2, x_95); x_105 = x_104; -x_106 = l_Lean_Format_sbracket___closed__1; +x_106 = l_Lean_IR_formatFnBody___main___closed__5; x_107 = lean::alloc_cnstr(4, 2, 1); lean::cnstr_set(x_107, 0, x_105); lean::cnstr_set(x_107, 1, x_106); -lean::cnstr_set_scalar(x_107, sizeof(void*)*2, x_102); +lean::cnstr_set_scalar(x_107, sizeof(void*)*2, x_95); x_108 = x_107; -x_109 = l_Nat_repr(x_90); -x_110 = lean::alloc_cnstr(2, 1, 0); -lean::cnstr_set(x_110, 0, x_109); -x_111 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_111, 0, x_108); -lean::cnstr_set(x_111, 1, x_110); -lean::cnstr_set_scalar(x_111, sizeof(void*)*2, x_102); -x_112 = x_111; -x_113 = l_Lean_IR_formatFnBody___main___closed__5; -x_114 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_114, 0, x_112); -lean::cnstr_set(x_114, 1, x_113); -lean::cnstr_set_scalar(x_114, sizeof(void*)*2, x_102); -x_115 = x_114; -x_116 = l_Nat_repr(x_92); -x_117 = lean::string_append(x_98, x_116); -lean::dec(x_116); -x_119 = lean::alloc_cnstr(2, 1, 0); +x_109 = l_Nat_repr(x_85); +x_110 = lean::string_append(x_91, x_109); +lean::dec(x_109); +x_112 = lean::alloc_cnstr(2, 1, 0); +lean::cnstr_set(x_112, 0, x_110); +x_113 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_113, 0, x_108); +lean::cnstr_set(x_113, 1, x_112); +lean::cnstr_set_scalar(x_113, sizeof(void*)*2, x_95); +x_114 = x_113; +x_115 = l_Lean_IR_formatFnBody___main___closed__2; +x_116 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_116, 0, x_114); +lean::cnstr_set(x_116, 1, x_115); +lean::cnstr_set_scalar(x_116, sizeof(void*)*2, x_95); +x_117 = x_116; +x_118 = lean::box(1); +x_119 = lean::alloc_cnstr(4, 2, 1); lean::cnstr_set(x_119, 0, x_117); -x_120 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_120, 0, x_115); -lean::cnstr_set(x_120, 1, x_119); -lean::cnstr_set_scalar(x_120, sizeof(void*)*2, x_102); -x_121 = x_120; -x_122 = l_Lean_IR_formatFnBody___main___closed__2; -x_123 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_123, 0, x_121); -lean::cnstr_set(x_123, 1, x_122); -lean::cnstr_set_scalar(x_123, sizeof(void*)*2, x_102); -x_124 = x_123; -x_125 = lean::box(1); -x_126 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_126, 0, x_124); -lean::cnstr_set(x_126, 1, x_125); -lean::cnstr_set_scalar(x_126, sizeof(void*)*2, x_102); -x_127 = x_126; -x_128 = l_Lean_IR_formatFnBody___main(x_0, x_94); -x_129 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_129, 0, x_127); -lean::cnstr_set(x_129, 1, x_128); -lean::cnstr_set_scalar(x_129, sizeof(void*)*2, x_102); -x_130 = x_129; -return x_130; +lean::cnstr_set(x_119, 1, x_118); +lean::cnstr_set_scalar(x_119, sizeof(void*)*2, x_95); +x_120 = x_119; +x_121 = l_Lean_IR_formatFnBody___main(x_0, x_87); +x_122 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_122, 0, x_120); +lean::cnstr_set(x_122, 1, x_121); +lean::cnstr_set_scalar(x_122, sizeof(void*)*2, x_95); +x_123 = x_122; +return x_123; } case 3: { -obj* x_131; obj* x_133; obj* x_135; obj* x_137; obj* x_140; obj* x_141; obj* x_142; obj* x_144; uint8 x_145; obj* x_146; obj* x_147; obj* x_148; obj* x_149; obj* x_150; obj* x_151; obj* x_152; obj* x_153; obj* x_154; obj* x_155; obj* x_156; obj* x_157; obj* x_158; obj* x_159; obj* x_160; obj* x_162; obj* x_163; obj* x_164; obj* x_165; obj* x_166; obj* x_167; obj* x_168; obj* x_169; obj* x_170; obj* x_171; obj* x_172; obj* x_173; -x_131 = lean::cnstr_get(x_1, 0); -lean::inc(x_131); -x_133 = lean::cnstr_get(x_1, 1); -lean::inc(x_133); -x_135 = lean::cnstr_get(x_1, 2); -lean::inc(x_135); -x_137 = lean::cnstr_get(x_1, 3); -lean::inc(x_137); +obj* x_124; obj* x_126; obj* x_128; obj* x_130; obj* x_133; obj* x_134; obj* x_135; obj* x_137; uint8 x_138; obj* x_139; obj* x_140; obj* x_141; obj* x_142; obj* x_143; obj* x_144; obj* x_145; obj* x_146; obj* x_147; obj* x_148; obj* x_149; obj* x_150; obj* x_151; obj* x_152; obj* x_153; obj* x_155; obj* x_156; obj* x_157; obj* x_158; obj* x_159; obj* x_160; obj* x_161; obj* x_162; obj* x_163; obj* x_164; obj* x_165; obj* x_166; +x_124 = lean::cnstr_get(x_1, 0); +lean::inc(x_124); +x_126 = lean::cnstr_get(x_1, 1); +lean::inc(x_126); +x_128 = lean::cnstr_get(x_1, 2); +lean::inc(x_128); +x_130 = lean::cnstr_get(x_1, 3); +lean::inc(x_130); lean::dec(x_1); -x_140 = l_Nat_repr(x_131); -x_141 = l_Lean_IR_VarId_HasToString___closed__1; -x_142 = lean::string_append(x_141, x_140); -lean::dec(x_140); -x_144 = lean::alloc_cnstr(2, 1, 0); -lean::cnstr_set(x_144, 0, x_142); -x_145 = 0; -x_146 = l_Lean_IR_formatFnBody___main___closed__6; +x_133 = l_Nat_repr(x_124); +x_134 = l_Lean_IR_VarId_HasToString___closed__1; +x_135 = lean::string_append(x_134, x_133); +lean::dec(x_133); +x_137 = lean::alloc_cnstr(2, 1, 0); +lean::cnstr_set(x_137, 0, x_135); +x_138 = 0; +x_139 = l_Lean_IR_formatFnBody___main___closed__6; +x_140 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_140, 0, x_139); +lean::cnstr_set(x_140, 1, x_137); +lean::cnstr_set_scalar(x_140, sizeof(void*)*2, x_138); +x_141 = x_140; +x_142 = l_Lean_Format_sbracket___closed__1; +x_143 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_143, 0, x_141); +lean::cnstr_set(x_143, 1, x_142); +lean::cnstr_set_scalar(x_143, sizeof(void*)*2, x_138); +x_144 = x_143; +x_145 = l_Nat_repr(x_126); +x_146 = lean::alloc_cnstr(2, 1, 0); +lean::cnstr_set(x_146, 0, x_145); x_147 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_147, 0, x_146); -lean::cnstr_set(x_147, 1, x_144); -lean::cnstr_set_scalar(x_147, sizeof(void*)*2, x_145); +lean::cnstr_set(x_147, 0, x_144); +lean::cnstr_set(x_147, 1, x_146); +lean::cnstr_set_scalar(x_147, sizeof(void*)*2, x_138); x_148 = x_147; -x_149 = l_Lean_Format_sbracket___closed__1; +x_149 = l_Lean_IR_formatFnBody___main___closed__5; x_150 = lean::alloc_cnstr(4, 2, 1); lean::cnstr_set(x_150, 0, x_148); lean::cnstr_set(x_150, 1, x_149); -lean::cnstr_set_scalar(x_150, sizeof(void*)*2, x_145); +lean::cnstr_set_scalar(x_150, sizeof(void*)*2, x_138); x_151 = x_150; -x_152 = l_Nat_repr(x_133); -x_153 = lean::alloc_cnstr(2, 1, 0); -lean::cnstr_set(x_153, 0, x_152); -x_154 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_154, 0, x_151); -lean::cnstr_set(x_154, 1, x_153); -lean::cnstr_set_scalar(x_154, sizeof(void*)*2, x_145); -x_155 = x_154; -x_156 = l_Lean_IR_formatFnBody___main___closed__5; -x_157 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_157, 0, x_155); -lean::cnstr_set(x_157, 1, x_156); -lean::cnstr_set_scalar(x_157, sizeof(void*)*2, x_145); -x_158 = x_157; -x_159 = l_Nat_repr(x_135); -x_160 = lean::string_append(x_141, x_159); -lean::dec(x_159); -x_162 = lean::alloc_cnstr(2, 1, 0); +x_152 = l_Nat_repr(x_128); +x_153 = lean::string_append(x_134, x_152); +lean::dec(x_152); +x_155 = lean::alloc_cnstr(2, 1, 0); +lean::cnstr_set(x_155, 0, x_153); +x_156 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_156, 0, x_151); +lean::cnstr_set(x_156, 1, x_155); +lean::cnstr_set_scalar(x_156, sizeof(void*)*2, x_138); +x_157 = x_156; +x_158 = l_Lean_IR_formatFnBody___main___closed__2; +x_159 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_159, 0, x_157); +lean::cnstr_set(x_159, 1, x_158); +lean::cnstr_set_scalar(x_159, sizeof(void*)*2, x_138); +x_160 = x_159; +x_161 = lean::box(1); +x_162 = lean::alloc_cnstr(4, 2, 1); lean::cnstr_set(x_162, 0, x_160); -x_163 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_163, 0, x_158); -lean::cnstr_set(x_163, 1, x_162); -lean::cnstr_set_scalar(x_163, sizeof(void*)*2, x_145); -x_164 = x_163; -x_165 = l_Lean_IR_formatFnBody___main___closed__2; -x_166 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_166, 0, x_164); -lean::cnstr_set(x_166, 1, x_165); -lean::cnstr_set_scalar(x_166, sizeof(void*)*2, x_145); -x_167 = x_166; -x_168 = lean::box(1); -x_169 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_169, 0, x_167); -lean::cnstr_set(x_169, 1, x_168); -lean::cnstr_set_scalar(x_169, sizeof(void*)*2, x_145); -x_170 = x_169; -x_171 = l_Lean_IR_formatFnBody___main(x_0, x_137); -x_172 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_172, 0, x_170); -lean::cnstr_set(x_172, 1, x_171); -lean::cnstr_set_scalar(x_172, sizeof(void*)*2, x_145); -x_173 = x_172; -return x_173; +lean::cnstr_set(x_162, 1, x_161); +lean::cnstr_set_scalar(x_162, sizeof(void*)*2, x_138); +x_163 = x_162; +x_164 = l_Lean_IR_formatFnBody___main(x_0, x_130); +x_165 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_165, 0, x_163); +lean::cnstr_set(x_165, 1, x_164); +lean::cnstr_set_scalar(x_165, sizeof(void*)*2, x_138); +x_166 = x_165; +return x_166; } case 4: { -obj* x_174; obj* x_176; obj* x_178; obj* x_180; uint8 x_182; obj* x_183; obj* x_186; obj* x_187; obj* x_188; obj* x_190; uint8 x_191; obj* x_192; obj* x_193; obj* x_194; obj* x_195; obj* x_196; obj* x_197; obj* x_198; obj* x_199; obj* x_200; obj* x_201; obj* x_202; obj* x_203; obj* x_204; obj* x_205; obj* x_206; obj* x_207; obj* x_208; obj* x_209; obj* x_210; obj* x_211; obj* x_212; obj* x_213; obj* x_214; obj* x_215; obj* x_216; obj* x_217; obj* x_218; obj* x_219; obj* x_221; obj* x_222; obj* x_223; obj* x_224; obj* x_225; obj* x_226; obj* x_227; obj* x_228; obj* x_229; obj* x_230; obj* x_231; obj* x_232; -x_174 = lean::cnstr_get(x_1, 0); -lean::inc(x_174); -x_176 = lean::cnstr_get(x_1, 1); +obj* x_167; obj* x_169; obj* x_171; obj* x_173; uint8 x_175; obj* x_176; obj* x_179; obj* x_180; obj* x_181; obj* x_183; uint8 x_184; obj* x_185; obj* x_186; obj* x_187; obj* x_188; obj* x_189; obj* x_190; obj* x_191; obj* x_192; obj* x_193; obj* x_194; obj* x_195; obj* x_196; obj* x_197; obj* x_198; obj* x_199; obj* x_200; obj* x_201; obj* x_202; obj* x_203; obj* x_204; obj* x_205; obj* x_206; obj* x_207; obj* x_208; obj* x_209; obj* x_210; obj* x_211; obj* x_212; obj* x_214; obj* x_215; obj* x_216; obj* x_217; obj* x_218; obj* x_219; obj* x_220; obj* x_221; obj* x_222; obj* x_223; obj* x_224; obj* x_225; +x_167 = lean::cnstr_get(x_1, 0); +lean::inc(x_167); +x_169 = lean::cnstr_get(x_1, 1); +lean::inc(x_169); +x_171 = lean::cnstr_get(x_1, 2); +lean::inc(x_171); +x_173 = lean::cnstr_get(x_1, 3); +lean::inc(x_173); +x_175 = lean::cnstr_get_scalar(x_1, sizeof(void*)*5); +x_176 = lean::cnstr_get(x_1, 4); lean::inc(x_176); -x_178 = lean::cnstr_get(x_1, 2); -lean::inc(x_178); -x_180 = lean::cnstr_get(x_1, 3); -lean::inc(x_180); -x_182 = lean::cnstr_get_scalar(x_1, sizeof(void*)*5); -x_183 = lean::cnstr_get(x_1, 4); -lean::inc(x_183); lean::dec(x_1); -x_186 = l_Nat_repr(x_174); -x_187 = l_Lean_IR_VarId_HasToString___closed__1; -x_188 = lean::string_append(x_187, x_186); -lean::dec(x_186); -x_190 = lean::alloc_cnstr(2, 1, 0); -lean::cnstr_set(x_190, 0, x_188); -x_191 = 0; -x_192 = l_Lean_IR_formatFnBody___main___closed__7; +x_179 = l_Nat_repr(x_167); +x_180 = l_Lean_IR_VarId_HasToString___closed__1; +x_181 = lean::string_append(x_180, x_179); +lean::dec(x_179); +x_183 = lean::alloc_cnstr(2, 1, 0); +lean::cnstr_set(x_183, 0, x_181); +x_184 = 0; +x_185 = l_Lean_IR_formatFnBody___main___closed__7; +x_186 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_186, 0, x_185); +lean::cnstr_set(x_186, 1, x_183); +lean::cnstr_set_scalar(x_186, sizeof(void*)*2, x_184); +x_187 = x_186; +x_188 = l_Lean_Format_sbracket___closed__1; +x_189 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_189, 0, x_187); +lean::cnstr_set(x_189, 1, x_188); +lean::cnstr_set_scalar(x_189, sizeof(void*)*2, x_184); +x_190 = x_189; +x_191 = l_Nat_repr(x_169); +x_192 = lean::alloc_cnstr(2, 1, 0); +lean::cnstr_set(x_192, 0, x_191); x_193 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_193, 0, x_192); -lean::cnstr_set(x_193, 1, x_190); -lean::cnstr_set_scalar(x_193, sizeof(void*)*2, x_191); +lean::cnstr_set(x_193, 0, x_190); +lean::cnstr_set(x_193, 1, x_192); +lean::cnstr_set_scalar(x_193, sizeof(void*)*2, x_184); x_194 = x_193; -x_195 = l_Lean_Format_sbracket___closed__1; +x_195 = l_Lean_formatKVMap___closed__1; x_196 = lean::alloc_cnstr(4, 2, 1); lean::cnstr_set(x_196, 0, x_194); lean::cnstr_set(x_196, 1, x_195); -lean::cnstr_set_scalar(x_196, sizeof(void*)*2, x_191); +lean::cnstr_set_scalar(x_196, sizeof(void*)*2, x_184); x_197 = x_196; -x_198 = l_Nat_repr(x_176); +x_198 = l_Nat_repr(x_171); x_199 = lean::alloc_cnstr(2, 1, 0); lean::cnstr_set(x_199, 0, x_198); x_200 = lean::alloc_cnstr(4, 2, 1); lean::cnstr_set(x_200, 0, x_197); lean::cnstr_set(x_200, 1, x_199); -lean::cnstr_set_scalar(x_200, sizeof(void*)*2, x_191); +lean::cnstr_set_scalar(x_200, sizeof(void*)*2, x_184); x_201 = x_200; -x_202 = l_Lean_formatKVMap___closed__1; +x_202 = l_Lean_IR_formatFnBody___main___closed__8; x_203 = lean::alloc_cnstr(4, 2, 1); lean::cnstr_set(x_203, 0, x_201); lean::cnstr_set(x_203, 1, x_202); -lean::cnstr_set_scalar(x_203, sizeof(void*)*2, x_191); +lean::cnstr_set_scalar(x_203, sizeof(void*)*2, x_184); x_204 = x_203; -x_205 = l_Nat_repr(x_178); -x_206 = lean::alloc_cnstr(2, 1, 0); -lean::cnstr_set(x_206, 0, x_205); -x_207 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_207, 0, x_204); -lean::cnstr_set(x_207, 1, x_206); -lean::cnstr_set_scalar(x_207, sizeof(void*)*2, x_191); -x_208 = x_207; -x_209 = l_Lean_IR_formatFnBody___main___closed__8; -x_210 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_210, 0, x_208); -lean::cnstr_set(x_210, 1, x_209); -lean::cnstr_set_scalar(x_210, sizeof(void*)*2, x_191); -x_211 = x_210; -x_212 = l___private_init_lean_compiler_ir_format_6__formatIRType___main(x_182); -x_213 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_213, 0, x_211); -lean::cnstr_set(x_213, 1, x_212); -lean::cnstr_set_scalar(x_213, sizeof(void*)*2, x_191); -x_214 = x_213; -x_215 = l_Lean_formatEntry___main___closed__1; -x_216 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_216, 0, x_214); -lean::cnstr_set(x_216, 1, x_215); -lean::cnstr_set_scalar(x_216, sizeof(void*)*2, x_191); -x_217 = x_216; -x_218 = l_Nat_repr(x_180); -x_219 = lean::string_append(x_187, x_218); -lean::dec(x_218); -x_221 = lean::alloc_cnstr(2, 1, 0); +x_205 = l___private_init_lean_compiler_ir_format_6__formatIRType___main(x_175); +x_206 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_206, 0, x_204); +lean::cnstr_set(x_206, 1, x_205); +lean::cnstr_set_scalar(x_206, sizeof(void*)*2, x_184); +x_207 = x_206; +x_208 = l_Lean_formatEntry___main___closed__1; +x_209 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_209, 0, x_207); +lean::cnstr_set(x_209, 1, x_208); +lean::cnstr_set_scalar(x_209, sizeof(void*)*2, x_184); +x_210 = x_209; +x_211 = l_Nat_repr(x_173); +x_212 = lean::string_append(x_180, x_211); +lean::dec(x_211); +x_214 = lean::alloc_cnstr(2, 1, 0); +lean::cnstr_set(x_214, 0, x_212); +x_215 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_215, 0, x_210); +lean::cnstr_set(x_215, 1, x_214); +lean::cnstr_set_scalar(x_215, sizeof(void*)*2, x_184); +x_216 = x_215; +x_217 = l_Lean_IR_formatFnBody___main___closed__2; +x_218 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_218, 0, x_216); +lean::cnstr_set(x_218, 1, x_217); +lean::cnstr_set_scalar(x_218, sizeof(void*)*2, x_184); +x_219 = x_218; +x_220 = lean::box(1); +x_221 = lean::alloc_cnstr(4, 2, 1); lean::cnstr_set(x_221, 0, x_219); -x_222 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_222, 0, x_217); -lean::cnstr_set(x_222, 1, x_221); -lean::cnstr_set_scalar(x_222, sizeof(void*)*2, x_191); -x_223 = x_222; -x_224 = l_Lean_IR_formatFnBody___main___closed__2; -x_225 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_225, 0, x_223); -lean::cnstr_set(x_225, 1, x_224); -lean::cnstr_set_scalar(x_225, sizeof(void*)*2, x_191); -x_226 = x_225; -x_227 = lean::box(1); -x_228 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_228, 0, x_226); -lean::cnstr_set(x_228, 1, x_227); -lean::cnstr_set_scalar(x_228, sizeof(void*)*2, x_191); -x_229 = x_228; -x_230 = l_Lean_IR_formatFnBody___main(x_0, x_183); -x_231 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_231, 0, x_229); -lean::cnstr_set(x_231, 1, x_230); -lean::cnstr_set_scalar(x_231, sizeof(void*)*2, x_191); -x_232 = x_231; -return x_232; +lean::cnstr_set(x_221, 1, x_220); +lean::cnstr_set_scalar(x_221, sizeof(void*)*2, x_184); +x_222 = x_221; +x_223 = l_Lean_IR_formatFnBody___main(x_0, x_176); +x_224 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_224, 0, x_222); +lean::cnstr_set(x_224, 1, x_223); +lean::cnstr_set_scalar(x_224, sizeof(void*)*2, x_184); +x_225 = x_224; +return x_225; } case 5: { -obj* x_233; obj* x_235; obj* x_237; obj* x_240; obj* x_241; obj* x_242; obj* x_244; uint8 x_245; obj* x_246; obj* x_247; obj* x_248; obj* x_249; obj* x_250; obj* x_251; obj* x_252; obj* x_253; obj* x_254; obj* x_255; obj* x_256; obj* x_257; obj* x_258; obj* x_259; obj* x_260; obj* x_261; obj* x_262; obj* x_263; obj* x_264; -x_233 = lean::cnstr_get(x_1, 0); -lean::inc(x_233); -x_235 = lean::cnstr_get(x_1, 1); -lean::inc(x_235); -x_237 = lean::cnstr_get(x_1, 2); -lean::inc(x_237); +obj* x_226; obj* x_228; obj* x_230; obj* x_233; obj* x_234; obj* x_235; obj* x_237; uint8 x_238; obj* x_239; obj* x_240; obj* x_241; obj* x_242; obj* x_243; obj* x_244; obj* x_245; obj* x_246; obj* x_247; obj* x_248; obj* x_249; obj* x_250; obj* x_251; obj* x_252; obj* x_253; obj* x_254; obj* x_255; obj* x_256; obj* x_257; +x_226 = lean::cnstr_get(x_1, 0); +lean::inc(x_226); +x_228 = lean::cnstr_get(x_1, 1); +lean::inc(x_228); +x_230 = lean::cnstr_get(x_1, 2); +lean::inc(x_230); lean::dec(x_1); -x_240 = l_Nat_repr(x_233); -x_241 = l_Lean_IR_VarId_HasToString___closed__1; -x_242 = lean::string_append(x_241, x_240); -lean::dec(x_240); -x_244 = lean::alloc_cnstr(2, 1, 0); -lean::cnstr_set(x_244, 0, x_242); -x_245 = 0; -x_246 = l_Lean_IR_formatFnBody___main___closed__9; +x_233 = l_Nat_repr(x_226); +x_234 = l_Lean_IR_VarId_HasToString___closed__1; +x_235 = lean::string_append(x_234, x_233); +lean::dec(x_233); +x_237 = lean::alloc_cnstr(2, 1, 0); +lean::cnstr_set(x_237, 0, x_235); +x_238 = 0; +x_239 = l_Lean_IR_formatFnBody___main___closed__9; +x_240 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_240, 0, x_239); +lean::cnstr_set(x_240, 1, x_237); +lean::cnstr_set_scalar(x_240, sizeof(void*)*2, x_238); +x_241 = x_240; +x_242 = l_Lean_Format_sbracket___closed__1; +x_243 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_243, 0, x_241); +lean::cnstr_set(x_243, 1, x_242); +lean::cnstr_set_scalar(x_243, sizeof(void*)*2, x_238); +x_244 = x_243; +x_245 = l_Nat_repr(x_228); +x_246 = lean::alloc_cnstr(2, 1, 0); +lean::cnstr_set(x_246, 0, x_245); x_247 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_247, 0, x_246); -lean::cnstr_set(x_247, 1, x_244); -lean::cnstr_set_scalar(x_247, sizeof(void*)*2, x_245); +lean::cnstr_set(x_247, 0, x_244); +lean::cnstr_set(x_247, 1, x_246); +lean::cnstr_set_scalar(x_247, sizeof(void*)*2, x_238); x_248 = x_247; -x_249 = l_Lean_Format_sbracket___closed__1; +x_249 = l_Lean_IR_formatFnBody___main___closed__10; x_250 = lean::alloc_cnstr(4, 2, 1); lean::cnstr_set(x_250, 0, x_248); lean::cnstr_set(x_250, 1, x_249); -lean::cnstr_set_scalar(x_250, sizeof(void*)*2, x_245); +lean::cnstr_set_scalar(x_250, sizeof(void*)*2, x_238); x_251 = x_250; -x_252 = l_Nat_repr(x_235); -x_253 = lean::alloc_cnstr(2, 1, 0); -lean::cnstr_set(x_253, 0, x_252); -x_254 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_254, 0, x_251); -lean::cnstr_set(x_254, 1, x_253); -lean::cnstr_set_scalar(x_254, sizeof(void*)*2, x_245); -x_255 = x_254; -x_256 = l_Lean_IR_formatFnBody___main___closed__10; -x_257 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_257, 0, x_255); -lean::cnstr_set(x_257, 1, x_256); -lean::cnstr_set_scalar(x_257, sizeof(void*)*2, x_245); -x_258 = x_257; -x_259 = lean::box(1); -x_260 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_260, 0, x_258); -lean::cnstr_set(x_260, 1, x_259); -lean::cnstr_set_scalar(x_260, sizeof(void*)*2, x_245); -x_261 = x_260; -x_262 = l_Lean_IR_formatFnBody___main(x_0, x_237); -x_263 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_263, 0, x_261); -lean::cnstr_set(x_263, 1, x_262); -lean::cnstr_set_scalar(x_263, sizeof(void*)*2, x_245); -x_264 = x_263; -return x_264; +x_252 = lean::box(1); +x_253 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_253, 0, x_251); +lean::cnstr_set(x_253, 1, x_252); +lean::cnstr_set_scalar(x_253, sizeof(void*)*2, x_238); +x_254 = x_253; +x_255 = l_Lean_IR_formatFnBody___main(x_0, x_230); +x_256 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_256, 0, x_254); +lean::cnstr_set(x_256, 1, x_255); +lean::cnstr_set_scalar(x_256, sizeof(void*)*2, x_238); +x_257 = x_256; +return x_257; } case 6: { -obj* x_265; obj* x_267; obj* x_269; obj* x_272; obj* x_273; obj* x_274; obj* x_276; uint8 x_277; obj* x_278; obj* x_279; obj* x_280; obj* x_281; uint8 x_282; obj* x_283; -x_265 = lean::cnstr_get(x_1, 0); -lean::inc(x_265); -x_267 = lean::cnstr_get(x_1, 1); -lean::inc(x_267); -x_269 = lean::cnstr_get(x_1, 2); -lean::inc(x_269); +obj* x_258; obj* x_260; obj* x_262; obj* x_265; obj* x_266; obj* x_267; obj* x_269; uint8 x_270; obj* x_271; obj* x_272; obj* x_273; obj* x_274; uint8 x_275; obj* x_276; +x_258 = lean::cnstr_get(x_1, 0); +lean::inc(x_258); +x_260 = lean::cnstr_get(x_1, 1); +lean::inc(x_260); +x_262 = lean::cnstr_get(x_1, 2); +lean::inc(x_262); lean::dec(x_1); -x_272 = l_Nat_repr(x_265); -x_273 = l_Lean_IR_VarId_HasToString___closed__1; -x_274 = lean::string_append(x_273, x_272); -lean::dec(x_272); -x_276 = lean::alloc_cnstr(2, 1, 0); -lean::cnstr_set(x_276, 0, x_274); -x_277 = 0; -x_278 = l_Lean_IR_formatFnBody___main___closed__11; -x_279 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_279, 0, x_278); -lean::cnstr_set(x_279, 1, x_276); -lean::cnstr_set_scalar(x_279, sizeof(void*)*2, x_277); -x_280 = x_279; -x_281 = lean::mk_nat_obj(1ul); -x_282 = lean::nat_dec_eq(x_267, x_281); -x_283 = l_Lean_IR_formatFnBody___main(x_0, x_269); -if (x_282 == 0) +x_265 = l_Nat_repr(x_258); +x_266 = l_Lean_IR_VarId_HasToString___closed__1; +x_267 = lean::string_append(x_266, x_265); +lean::dec(x_265); +x_269 = lean::alloc_cnstr(2, 1, 0); +lean::cnstr_set(x_269, 0, x_267); +x_270 = 0; +x_271 = l_Lean_IR_formatFnBody___main___closed__11; +x_272 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_272, 0, x_271); +lean::cnstr_set(x_272, 1, x_269); +lean::cnstr_set_scalar(x_272, sizeof(void*)*2, x_270); +x_273 = x_272; +x_274 = lean::mk_nat_obj(1ul); +x_275 = lean::nat_dec_eq(x_260, x_274); +x_276 = l_Lean_IR_formatFnBody___main(x_0, x_262); +if (x_275 == 0) { -obj* x_284; obj* x_285; obj* x_286; obj* x_287; obj* x_288; obj* x_289; obj* x_290; obj* x_291; obj* x_292; obj* x_293; obj* x_294; obj* x_295; -x_284 = l_Nat_repr(x_267); -x_285 = lean::alloc_cnstr(2, 1, 0); -lean::cnstr_set(x_285, 0, x_284); -x_286 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_286, 0, x_280); -lean::cnstr_set(x_286, 1, x_285); -lean::cnstr_set_scalar(x_286, sizeof(void*)*2, x_277); -x_287 = x_286; -x_288 = l_Lean_IR_formatFnBody___main___closed__2; -x_289 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_289, 0, x_287); -lean::cnstr_set(x_289, 1, x_288); -lean::cnstr_set_scalar(x_289, sizeof(void*)*2, x_277); -x_290 = x_289; -x_291 = lean::box(1); -x_292 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_292, 0, x_290); -lean::cnstr_set(x_292, 1, x_291); -lean::cnstr_set_scalar(x_292, sizeof(void*)*2, x_277); -x_293 = x_292; -x_294 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_294, 0, x_293); -lean::cnstr_set(x_294, 1, x_283); -lean::cnstr_set_scalar(x_294, sizeof(void*)*2, x_277); -x_295 = x_294; -return x_295; +obj* x_277; obj* x_278; obj* x_279; obj* x_280; obj* x_281; obj* x_282; obj* x_283; obj* x_284; obj* x_285; obj* x_286; obj* x_287; obj* x_288; +x_277 = l_Nat_repr(x_260); +x_278 = lean::alloc_cnstr(2, 1, 0); +lean::cnstr_set(x_278, 0, x_277); +x_279 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_279, 0, x_273); +lean::cnstr_set(x_279, 1, x_278); +lean::cnstr_set_scalar(x_279, sizeof(void*)*2, x_270); +x_280 = x_279; +x_281 = l_Lean_IR_formatFnBody___main___closed__2; +x_282 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_282, 0, x_280); +lean::cnstr_set(x_282, 1, x_281); +lean::cnstr_set_scalar(x_282, sizeof(void*)*2, x_270); +x_283 = x_282; +x_284 = lean::box(1); +x_285 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_285, 0, x_283); +lean::cnstr_set(x_285, 1, x_284); +lean::cnstr_set_scalar(x_285, sizeof(void*)*2, x_270); +x_286 = x_285; +x_287 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_287, 0, x_286); +lean::cnstr_set(x_287, 1, x_276); +lean::cnstr_set_scalar(x_287, sizeof(void*)*2, x_270); +x_288 = x_287; +return x_288; } else { -obj* x_297; obj* x_298; obj* x_299; obj* x_300; obj* x_301; obj* x_302; obj* x_303; obj* x_304; obj* x_305; obj* x_306; obj* x_307; -lean::dec(x_267); -x_297 = l_Lean_Format_join___closed__1; -x_298 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_298, 0, x_280); -lean::cnstr_set(x_298, 1, x_297); -lean::cnstr_set_scalar(x_298, sizeof(void*)*2, x_277); -x_299 = x_298; -x_300 = l_Lean_IR_formatFnBody___main___closed__2; -x_301 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_301, 0, x_299); -lean::cnstr_set(x_301, 1, x_300); -lean::cnstr_set_scalar(x_301, sizeof(void*)*2, x_277); -x_302 = x_301; -x_303 = lean::box(1); -x_304 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_304, 0, x_302); -lean::cnstr_set(x_304, 1, x_303); -lean::cnstr_set_scalar(x_304, sizeof(void*)*2, x_277); -x_305 = x_304; -x_306 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_306, 0, x_305); -lean::cnstr_set(x_306, 1, x_283); -lean::cnstr_set_scalar(x_306, sizeof(void*)*2, x_277); -x_307 = x_306; -return x_307; +obj* x_290; obj* x_291; obj* x_292; obj* x_293; obj* x_294; obj* x_295; obj* x_296; obj* x_297; obj* x_298; obj* x_299; obj* x_300; +lean::dec(x_260); +x_290 = l_Lean_Format_join___closed__1; +x_291 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_291, 0, x_273); +lean::cnstr_set(x_291, 1, x_290); +lean::cnstr_set_scalar(x_291, sizeof(void*)*2, x_270); +x_292 = x_291; +x_293 = l_Lean_IR_formatFnBody___main___closed__2; +x_294 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_294, 0, x_292); +lean::cnstr_set(x_294, 1, x_293); +lean::cnstr_set_scalar(x_294, sizeof(void*)*2, x_270); +x_295 = x_294; +x_296 = lean::box(1); +x_297 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_297, 0, x_295); +lean::cnstr_set(x_297, 1, x_296); +lean::cnstr_set_scalar(x_297, sizeof(void*)*2, x_270); +x_298 = x_297; +x_299 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_299, 0, x_298); +lean::cnstr_set(x_299, 1, x_276); +lean::cnstr_set_scalar(x_299, sizeof(void*)*2, x_270); +x_300 = x_299; +return x_300; } } case 7: { -obj* x_308; obj* x_310; obj* x_312; obj* x_315; obj* x_316; obj* x_317; obj* x_319; uint8 x_320; obj* x_321; obj* x_322; obj* x_323; obj* x_324; uint8 x_325; obj* x_326; -x_308 = lean::cnstr_get(x_1, 0); -lean::inc(x_308); -x_310 = lean::cnstr_get(x_1, 1); -lean::inc(x_310); -x_312 = lean::cnstr_get(x_1, 2); -lean::inc(x_312); +obj* x_301; obj* x_303; obj* x_305; obj* x_308; obj* x_309; obj* x_310; obj* x_312; uint8 x_313; obj* x_314; obj* x_315; obj* x_316; obj* x_317; uint8 x_318; obj* x_319; +x_301 = lean::cnstr_get(x_1, 0); +lean::inc(x_301); +x_303 = lean::cnstr_get(x_1, 1); +lean::inc(x_303); +x_305 = lean::cnstr_get(x_1, 2); +lean::inc(x_305); lean::dec(x_1); -x_315 = l_Nat_repr(x_308); -x_316 = l_Lean_IR_VarId_HasToString___closed__1; -x_317 = lean::string_append(x_316, x_315); -lean::dec(x_315); -x_319 = lean::alloc_cnstr(2, 1, 0); -lean::cnstr_set(x_319, 0, x_317); -x_320 = 0; -x_321 = l_Lean_IR_formatFnBody___main___closed__12; -x_322 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_322, 0, x_321); -lean::cnstr_set(x_322, 1, x_319); -lean::cnstr_set_scalar(x_322, sizeof(void*)*2, x_320); -x_323 = x_322; -x_324 = lean::mk_nat_obj(1ul); -x_325 = lean::nat_dec_eq(x_310, x_324); -x_326 = l_Lean_IR_formatFnBody___main(x_0, x_312); -if (x_325 == 0) +x_308 = l_Nat_repr(x_301); +x_309 = l_Lean_IR_VarId_HasToString___closed__1; +x_310 = lean::string_append(x_309, x_308); +lean::dec(x_308); +x_312 = lean::alloc_cnstr(2, 1, 0); +lean::cnstr_set(x_312, 0, x_310); +x_313 = 0; +x_314 = l_Lean_IR_formatFnBody___main___closed__12; +x_315 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_315, 0, x_314); +lean::cnstr_set(x_315, 1, x_312); +lean::cnstr_set_scalar(x_315, sizeof(void*)*2, x_313); +x_316 = x_315; +x_317 = lean::mk_nat_obj(1ul); +x_318 = lean::nat_dec_eq(x_303, x_317); +x_319 = l_Lean_IR_formatFnBody___main(x_0, x_305); +if (x_318 == 0) { -obj* x_327; obj* x_328; obj* x_329; obj* x_330; obj* x_331; obj* x_332; obj* x_333; obj* x_334; obj* x_335; obj* x_336; obj* x_337; obj* x_338; -x_327 = l_Nat_repr(x_310); -x_328 = lean::alloc_cnstr(2, 1, 0); -lean::cnstr_set(x_328, 0, x_327); -x_329 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_329, 0, x_323); -lean::cnstr_set(x_329, 1, x_328); -lean::cnstr_set_scalar(x_329, sizeof(void*)*2, x_320); -x_330 = x_329; -x_331 = l_Lean_IR_formatFnBody___main___closed__2; -x_332 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_332, 0, x_330); -lean::cnstr_set(x_332, 1, x_331); -lean::cnstr_set_scalar(x_332, sizeof(void*)*2, x_320); -x_333 = x_332; -x_334 = lean::box(1); -x_335 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_335, 0, x_333); -lean::cnstr_set(x_335, 1, x_334); -lean::cnstr_set_scalar(x_335, sizeof(void*)*2, x_320); -x_336 = x_335; -x_337 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_337, 0, x_336); -lean::cnstr_set(x_337, 1, x_326); -lean::cnstr_set_scalar(x_337, sizeof(void*)*2, x_320); -x_338 = x_337; -return x_338; +obj* x_320; obj* x_321; obj* x_322; obj* x_323; obj* x_324; obj* x_325; obj* x_326; obj* x_327; obj* x_328; obj* x_329; obj* x_330; obj* x_331; +x_320 = l_Nat_repr(x_303); +x_321 = lean::alloc_cnstr(2, 1, 0); +lean::cnstr_set(x_321, 0, x_320); +x_322 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_322, 0, x_316); +lean::cnstr_set(x_322, 1, x_321); +lean::cnstr_set_scalar(x_322, sizeof(void*)*2, x_313); +x_323 = x_322; +x_324 = l_Lean_IR_formatFnBody___main___closed__2; +x_325 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_325, 0, x_323); +lean::cnstr_set(x_325, 1, x_324); +lean::cnstr_set_scalar(x_325, sizeof(void*)*2, x_313); +x_326 = x_325; +x_327 = lean::box(1); +x_328 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_328, 0, x_326); +lean::cnstr_set(x_328, 1, x_327); +lean::cnstr_set_scalar(x_328, sizeof(void*)*2, x_313); +x_329 = x_328; +x_330 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_330, 0, x_329); +lean::cnstr_set(x_330, 1, x_319); +lean::cnstr_set_scalar(x_330, sizeof(void*)*2, x_313); +x_331 = x_330; +return x_331; } else { -obj* x_340; obj* x_341; obj* x_342; obj* x_343; obj* x_344; obj* x_345; obj* x_346; obj* x_347; obj* x_348; obj* x_349; obj* x_350; -lean::dec(x_310); -x_340 = l_Lean_Format_join___closed__1; -x_341 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_341, 0, x_323); -lean::cnstr_set(x_341, 1, x_340); -lean::cnstr_set_scalar(x_341, sizeof(void*)*2, x_320); -x_342 = x_341; -x_343 = l_Lean_IR_formatFnBody___main___closed__2; -x_344 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_344, 0, x_342); -lean::cnstr_set(x_344, 1, x_343); -lean::cnstr_set_scalar(x_344, sizeof(void*)*2, x_320); -x_345 = x_344; -x_346 = lean::box(1); -x_347 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_347, 0, x_345); -lean::cnstr_set(x_347, 1, x_346); -lean::cnstr_set_scalar(x_347, sizeof(void*)*2, x_320); -x_348 = x_347; -x_349 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_349, 0, x_348); -lean::cnstr_set(x_349, 1, x_326); -lean::cnstr_set_scalar(x_349, sizeof(void*)*2, x_320); -x_350 = x_349; -return x_350; +obj* x_333; obj* x_334; obj* x_335; obj* x_336; obj* x_337; obj* x_338; obj* x_339; obj* x_340; obj* x_341; obj* x_342; obj* x_343; +lean::dec(x_303); +x_333 = l_Lean_Format_join___closed__1; +x_334 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_334, 0, x_316); +lean::cnstr_set(x_334, 1, x_333); +lean::cnstr_set_scalar(x_334, sizeof(void*)*2, x_313); +x_335 = x_334; +x_336 = l_Lean_IR_formatFnBody___main___closed__2; +x_337 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_337, 0, x_335); +lean::cnstr_set(x_337, 1, x_336); +lean::cnstr_set_scalar(x_337, sizeof(void*)*2, x_313); +x_338 = x_337; +x_339 = lean::box(1); +x_340 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_340, 0, x_338); +lean::cnstr_set(x_340, 1, x_339); +lean::cnstr_set_scalar(x_340, sizeof(void*)*2, x_313); +x_341 = x_340; +x_342 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_342, 0, x_341); +lean::cnstr_set(x_342, 1, x_319); +lean::cnstr_set_scalar(x_342, sizeof(void*)*2, x_313); +x_343 = x_342; +return x_343; } } case 8: { -obj* x_351; obj* x_353; obj* x_356; uint8 x_357; obj* x_358; obj* x_359; obj* x_360; obj* x_361; obj* x_362; obj* x_363; obj* x_364; obj* x_365; obj* x_366; obj* x_367; obj* x_368; obj* x_369; -x_351 = lean::cnstr_get(x_1, 0); -lean::inc(x_351); -x_353 = lean::cnstr_get(x_1, 1); -lean::inc(x_353); +obj* x_344; obj* x_346; obj* x_349; uint8 x_350; obj* x_351; obj* x_352; obj* x_353; obj* x_354; obj* x_355; obj* x_356; obj* x_357; obj* x_358; obj* x_359; obj* x_360; obj* x_361; obj* x_362; +x_344 = lean::cnstr_get(x_1, 0); +lean::inc(x_344); +x_346 = lean::cnstr_get(x_1, 1); +lean::inc(x_346); lean::dec(x_1); -x_356 = l_Lean_formatKVMap(x_351); -x_357 = 0; -x_358 = l_Lean_IR_formatFnBody___main___closed__13; -x_359 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_359, 0, x_358); -lean::cnstr_set(x_359, 1, x_356); -lean::cnstr_set_scalar(x_359, sizeof(void*)*2, x_357); -x_360 = x_359; -x_361 = l_Lean_IR_formatFnBody___main___closed__2; -x_362 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_362, 0, x_360); -lean::cnstr_set(x_362, 1, x_361); -lean::cnstr_set_scalar(x_362, sizeof(void*)*2, x_357); -x_363 = x_362; -x_364 = lean::box(1); -x_365 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_365, 0, x_363); -lean::cnstr_set(x_365, 1, x_364); -lean::cnstr_set_scalar(x_365, sizeof(void*)*2, x_357); -x_366 = x_365; -x_367 = l_Lean_IR_formatFnBody___main(x_0, x_353); -x_368 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_368, 0, x_366); -lean::cnstr_set(x_368, 1, x_367); -lean::cnstr_set_scalar(x_368, sizeof(void*)*2, x_357); -x_369 = x_368; -return x_369; +x_349 = l_Lean_formatKVMap(x_344); +x_350 = 0; +x_351 = l_Lean_IR_formatFnBody___main___closed__13; +x_352 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_352, 0, x_351); +lean::cnstr_set(x_352, 1, x_349); +lean::cnstr_set_scalar(x_352, sizeof(void*)*2, x_350); +x_353 = x_352; +x_354 = l_Lean_IR_formatFnBody___main___closed__2; +x_355 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_355, 0, x_353); +lean::cnstr_set(x_355, 1, x_354); +lean::cnstr_set_scalar(x_355, sizeof(void*)*2, x_350); +x_356 = x_355; +x_357 = lean::box(1); +x_358 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_358, 0, x_356); +lean::cnstr_set(x_358, 1, x_357); +lean::cnstr_set_scalar(x_358, sizeof(void*)*2, x_350); +x_359 = x_358; +x_360 = l_Lean_IR_formatFnBody___main(x_0, x_346); +x_361 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_361, 0, x_359); +lean::cnstr_set(x_361, 1, x_360); +lean::cnstr_set_scalar(x_361, sizeof(void*)*2, x_350); +x_362 = x_361; +return x_362; } case 9: { -obj* x_370; obj* x_372; obj* x_375; obj* x_376; obj* x_377; obj* x_379; uint8 x_380; obj* x_381; obj* x_382; obj* x_383; obj* x_384; obj* x_385; obj* x_386; obj* x_387; obj* x_388; obj* x_389; obj* x_391; obj* x_392; -x_370 = lean::cnstr_get(x_1, 1); -lean::inc(x_370); -x_372 = lean::cnstr_get(x_1, 2); -lean::inc(x_372); +obj* x_363; obj* x_365; obj* x_368; obj* x_369; obj* x_370; obj* x_372; uint8 x_373; obj* x_374; obj* x_375; obj* x_376; obj* x_377; obj* x_378; obj* x_379; obj* x_380; obj* x_381; obj* x_382; obj* x_384; obj* x_385; +x_363 = lean::cnstr_get(x_1, 1); +lean::inc(x_363); +x_365 = lean::cnstr_get(x_1, 2); +lean::inc(x_365); lean::dec(x_1); -x_375 = l_Nat_repr(x_370); -x_376 = l_Lean_IR_VarId_HasToString___closed__1; -x_377 = lean::string_append(x_376, x_375); -lean::dec(x_375); -x_379 = lean::alloc_cnstr(2, 1, 0); -lean::cnstr_set(x_379, 0, x_377); -x_380 = 0; -x_381 = l_Lean_IR_formatFnBody___main___closed__14; -x_382 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_382, 0, x_381); -lean::cnstr_set(x_382, 1, x_379); -lean::cnstr_set_scalar(x_382, sizeof(void*)*2, x_380); -x_383 = x_382; -x_384 = l_Lean_IR_formatFnBody___main___closed__15; -x_385 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_385, 0, x_383); -lean::cnstr_set(x_385, 1, x_384); -lean::cnstr_set_scalar(x_385, sizeof(void*)*2, x_380); -x_386 = x_385; -x_387 = lean::mk_nat_obj(0ul); -x_388 = lean::box(0); -x_389 = l_Array_miterateAux___main___at_Lean_IR_formatFnBody___main___spec__3(x_0, x_372, x_372, x_387, x_388); -lean::dec(x_372); -x_391 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_391, 0, x_386); -lean::cnstr_set(x_391, 1, x_389); -lean::cnstr_set_scalar(x_391, sizeof(void*)*2, x_380); -x_392 = x_391; -return x_392; +x_368 = l_Nat_repr(x_363); +x_369 = l_Lean_IR_VarId_HasToString___closed__1; +x_370 = lean::string_append(x_369, x_368); +lean::dec(x_368); +x_372 = lean::alloc_cnstr(2, 1, 0); +lean::cnstr_set(x_372, 0, x_370); +x_373 = 0; +x_374 = l_Lean_IR_formatFnBody___main___closed__14; +x_375 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_375, 0, x_374); +lean::cnstr_set(x_375, 1, x_372); +lean::cnstr_set_scalar(x_375, sizeof(void*)*2, x_373); +x_376 = x_375; +x_377 = l_Lean_IR_formatFnBody___main___closed__15; +x_378 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_378, 0, x_376); +lean::cnstr_set(x_378, 1, x_377); +lean::cnstr_set_scalar(x_378, sizeof(void*)*2, x_373); +x_379 = x_378; +x_380 = lean::mk_nat_obj(0ul); +x_381 = lean::box(0); +x_382 = l_Array_miterateAux___main___at_Lean_IR_formatFnBody___main___spec__3(x_0, x_365, x_365, x_380, x_381); +lean::dec(x_365); +x_384 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_384, 0, x_379); +lean::cnstr_set(x_384, 1, x_382); +lean::cnstr_set_scalar(x_384, sizeof(void*)*2, x_373); +x_385 = x_384; +return x_385; } case 10: { -obj* x_394; obj* x_397; uint8 x_398; obj* x_399; obj* x_400; obj* x_401; +obj* x_387; obj* x_390; uint8 x_391; obj* x_392; obj* x_393; obj* x_394; lean::dec(x_0); -x_394 = lean::cnstr_get(x_1, 0); -lean::inc(x_394); +x_387 = lean::cnstr_get(x_1, 0); +lean::inc(x_387); lean::dec(x_1); -x_397 = l___private_init_lean_compiler_ir_format_1__formatArg___main(x_394); -x_398 = 0; -x_399 = l_Lean_IR_formatFnBody___main___closed__16; -x_400 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_400, 0, x_399); -lean::cnstr_set(x_400, 1, x_397); -lean::cnstr_set_scalar(x_400, sizeof(void*)*2, x_398); -x_401 = x_400; -return x_401; +x_390 = l___private_init_lean_compiler_ir_format_1__formatArg___main(x_387); +x_391 = 0; +x_392 = l_Lean_IR_formatFnBody___main___closed__16; +x_393 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_393, 0, x_392); +lean::cnstr_set(x_393, 1, x_390); +lean::cnstr_set_scalar(x_393, sizeof(void*)*2, x_391); +x_394 = x_393; +return x_394; } case 11: { -obj* x_403; obj* x_405; obj* x_408; obj* x_409; obj* x_410; obj* x_412; uint8 x_413; obj* x_414; obj* x_415; obj* x_416; obj* x_417; obj* x_418; obj* x_419; obj* x_421; obj* x_422; +obj* x_396; obj* x_398; obj* x_401; obj* x_402; obj* x_403; obj* x_405; uint8 x_406; obj* x_407; obj* x_408; obj* x_409; obj* x_410; obj* x_411; obj* x_412; obj* x_414; obj* x_415; lean::dec(x_0); -x_403 = lean::cnstr_get(x_1, 0); -lean::inc(x_403); -x_405 = lean::cnstr_get(x_1, 1); -lean::inc(x_405); +x_396 = lean::cnstr_get(x_1, 0); +lean::inc(x_396); +x_398 = lean::cnstr_get(x_1, 1); +lean::inc(x_398); lean::dec(x_1); -x_408 = l_Nat_repr(x_403); -x_409 = l_Lean_IR_JoinPointId_HasToString___closed__1; -x_410 = lean::string_append(x_409, x_408); -lean::dec(x_408); -x_412 = lean::alloc_cnstr(2, 1, 0); -lean::cnstr_set(x_412, 0, x_410); -x_413 = 0; -x_414 = l_Lean_IR_formatFnBody___main___closed__17; -x_415 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_415, 0, x_414); -lean::cnstr_set(x_415, 1, x_412); -lean::cnstr_set_scalar(x_415, sizeof(void*)*2, x_413); -x_416 = x_415; -x_417 = lean::mk_nat_obj(0ul); -x_418 = lean::box(0); -x_419 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_format_5__formatExpr___main___spec__2(x_405, x_405, x_417, x_418); -lean::dec(x_405); -x_421 = lean::alloc_cnstr(4, 2, 1); -lean::cnstr_set(x_421, 0, x_416); -lean::cnstr_set(x_421, 1, x_419); -lean::cnstr_set_scalar(x_421, sizeof(void*)*2, x_413); -x_422 = x_421; -return x_422; +x_401 = l_Nat_repr(x_396); +x_402 = l_Lean_IR_JoinPointId_HasToString___closed__1; +x_403 = lean::string_append(x_402, x_401); +lean::dec(x_401); +x_405 = lean::alloc_cnstr(2, 1, 0); +lean::cnstr_set(x_405, 0, x_403); +x_406 = 0; +x_407 = l_Lean_IR_formatFnBody___main___closed__17; +x_408 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_408, 0, x_407); +lean::cnstr_set(x_408, 1, x_405); +lean::cnstr_set_scalar(x_408, sizeof(void*)*2, x_406); +x_409 = x_408; +x_410 = lean::mk_nat_obj(0ul); +x_411 = lean::box(0); +x_412 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_format_5__formatExpr___main___spec__2(x_398, x_398, x_410, x_411); +lean::dec(x_398); +x_414 = lean::alloc_cnstr(4, 2, 1); +lean::cnstr_set(x_414, 0, x_409); +lean::cnstr_set(x_414, 1, x_412); +lean::cnstr_set_scalar(x_414, sizeof(void*)*2, x_406); +x_415 = x_414; +return x_415; } default: { -obj* x_424; +obj* x_417; lean::dec(x_0); -x_424 = l_Lean_IR_formatFnBody___main___closed__18; -return x_424; +x_417 = l_Lean_IR_formatFnBody___main___closed__18; +return x_417; } } } diff --git a/src/stage0/init/lean/compiler/ir/freevars.cpp b/src/stage0/init/lean/compiler/ir/freevars.cpp index 0d1ae65f3d..9335f20543 100644 --- a/src/stage0/init/lean/compiler/ir/freevars.cpp +++ b/src/stage0/init/lean/compiler/ir/freevars.cpp @@ -16,183 +16,157 @@ typedef lean::uint32 uint32; typedef lean::uint64 uint64; #endif uint8 l_Lean_IR_Arg_hasFreeVar(obj*, obj*); obj* l_RBNode_setBlack___main___rarg(obj*); -obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_11__collectArray___spec__1___rarg(obj*, obj*, obj*, obj*, obj*, obj*); -obj* l_Array_miterateAux___main___at_Lean_IR_FreeVariables_insertParams___spec__1___boxed(obj*, obj*, obj*, obj*); -obj* l_Lean_IR_FnBody_collectFreeVars(obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_6__collectArg___main(obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_3__collectVar___boxed(obj*, obj*); +obj* l_Array_anyMAux___main___at_Lean_IR_HasIndex_visitArgs___spec__1___boxed(obj*, obj*, obj*); obj* l___private_init_lean_compiler_ir_freevars_1__skip___boxed(obj*); -obj* l___private_init_lean_compiler_ir_freevars_14__collectAlts___boxed(obj*, obj*, obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_16__collect___boxed(obj*, obj*); -obj* l_Lean_IR_vsetInh; -obj* l___private_init_lean_compiler_ir_freevars_26__collectAlts___boxed(obj*, obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_7__collectArray___at___private_init_lean_compiler_ir_freevars_10__collectParams___spec__1___boxed(obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_13__skip___boxed(obj*); +obj* l___private_init_lean_compiler_ir_freevars_26__collectAlts___boxed(obj*, obj*, obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_7__collectArray___at___private_init_lean_compiler_ir_freevars_8__collectArgs___spec__1(obj*, obj*); +obj* l_Lean_IR_MaxIndex_collectDecl(obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_10__collectParams(obj*, obj*); uint8 l_Lean_IR_HasIndex_visitParams(obj*, obj*); +obj* l_Lean_IR_MaxIndex_HasAndthen; obj* l_Lean_IR_Arg_hasFreeVar___boxed(obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_13__collectExpr(obj*, obj*, obj*); +obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_7__collectArray___spec__1(obj*); +obj* l_Lean_IR_FnBody_maxIndex(obj*); +obj* l___private_init_lean_compiler_ir_freevars_11__collectExpr(obj*, obj*); uint8 l_Lean_IR_HasIndex_visitExpr___main(obj*, obj*); -obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_21__collectArray___spec__1___boxed(obj*); -obj* l_Array_miterateAux___main___at_Lean_IR_FreeVariables_insertParams___spec__1(obj*, obj*, obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_22__collectArgs(obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_15__skip(obj*); -obj* l___private_init_lean_compiler_ir_freevars_11__collectArray___at___private_init_lean_compiler_ir_freevars_12__collectArgs___spec__1(obj*, obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_24__collectParams(obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_25__collectExpr___main(obj*, obj*); -uint8 l_Array_anyAux___main___at_Lean_IR_HasIndex_visitParams___spec__1(obj*, obj*, obj*); -obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_24__collectParams___spec__2___boxed(obj*, obj*, obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_7__collectArray___rarg(obj*, obj*, obj*); +obj* l_Lean_IR_FnBody_freeIndices(obj*); +uint8 l_Array_anyMAux___main___at_Lean_IR_HasIndex_visitArgs___spec__1(obj*, obj*, obj*); +obj* l_Lean_IR_MaxIndex_collectFnBody___main___closed__1; +obj* l___private_init_lean_compiler_ir_freevars_25__collectExpr___main(obj*, obj*, obj*); +obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_7__collectArray___spec__1___boxed(obj*); +uint8 l_Array_anyMAux___main___at_Lean_IR_HasIndex_visitFnBody___main___spec__1(obj*, obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_23__collectArray___at___private_init_lean_compiler_ir_freevars_26__collectAlts___spec__1___boxed(obj*, obj*, obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_6__collectArg___boxed(obj*, obj*); +obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_23__collectArray___spec__1(obj*); +obj* l___private_init_lean_compiler_ir_freevars_14__collectIndex(obj*, obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_19__withJP(obj*, obj*, obj*, obj*); obj* l_Lean_IR_HasIndex_visitArg___main___boxed(obj*, obj*); -obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_22__collectArgs___spec__2(obj*, obj*, obj*, obj*); -obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_26__collectAlts___spec__2___boxed(obj*, obj*, obj*, obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_6__withVar(obj*, obj*, obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_26__collectAlts(obj*, obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_23__collectParam___boxed(obj*, obj*); -obj* l_Array_anyAux___main___at_Lean_IR_HasIndex_visitParams___spec__1___boxed(obj*, obj*, obj*); -obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_12__collectArgs___spec__2___boxed(obj*, obj*, obj*, obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_20__collectArg___boxed(obj*, obj*); -obj* l_Lean_IR_FreeVariables_insertParams(obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_4__collectJP(obj*, obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_21__collectArray___at___private_init_lean_compiler_ir_freevars_22__collectArgs___spec__1___boxed(obj*, obj*); -obj* l_Lean_IR_Decl_maxVar(obj*); -obj* l___private_init_lean_compiler_ir_freevars_21__collectArray___at___private_init_lean_compiler_ir_freevars_26__collectAlts___spec__1(obj*, obj*, obj*); -obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_11__collectArray___spec__1___rarg___boxed(obj*, obj*, obj*, obj*, obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_11__collectArray(obj*); -obj* l___private_init_lean_compiler_ir_freevars_16__collect(obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_20__collectArg(obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_17__collectVar(obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_24__collectParams___boxed(obj*, obj*); -obj* l_Lean_IR_FreeVariables_collectFnBody(obj*, obj*, obj*); -obj* l_Lean_IR_MaxVar_collectFnBody(obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_4__collectJP___boxed(obj*, obj*); +obj* l_Lean_IR_FreeIndices_collectFnBody(obj*, obj*, obj*); +obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_26__collectAlts___spec__2___boxed(obj*, obj*, obj*, obj*, obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_26__collectAlts(obj*, obj*, obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_22__collectArg___main(obj*, obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_4__collectJP(obj*, obj*); +obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_12__collectAlts___spec__2(obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_IR_MaxIndex_collectDecl___main(obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_23__collectArray___boxed(obj*); +obj* l___private_init_lean_compiler_ir_freevars_2__collect(obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_23__collectArray___at___private_init_lean_compiler_ir_freevars_24__collectArgs___spec__1___boxed(obj*, obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_7__collectArray___at___private_init_lean_compiler_ir_freevars_12__collectAlts___spec__1(obj*, obj*, obj*); +obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_10__collectParams___spec__2___boxed(obj*, obj*, obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_23__collectArray___at___private_init_lean_compiler_ir_freevars_24__collectArgs___spec__1(obj*, obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_10__collectParams___boxed(obj*, obj*); +obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_12__collectAlts___spec__2___boxed(obj*, obj*, obj*, obj*, obj*); obj* l_Lean_IR_HasIndex_visitVar___boxed(obj*, obj*); -obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_26__collectAlts___spec__2(obj*, obj*, obj*, obj*, obj*); -obj* l_Lean_IR_FnBody_freeVars(obj*); -obj* l_Lean_IR_MaxVar_collectDecl___main(obj*, obj*); -obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_21__collectArray___spec__1(obj*); -uint8 l_Array_anyAux___main___at_Lean_IR_HasIndex_visitArgs___spec__1(obj*, obj*, obj*); -obj* l_Lean_IR_MaxVar_collectFnBody___main___closed__1; -obj* l___private_init_lean_compiler_ir_freevars_3__collectVar(obj*, obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_10__collectArg___main(obj*, obj*, obj*); +obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_23__collectArray___spec__1___rarg(obj*, obj*, obj*, obj*, obj*, obj*); +obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_26__collectAlts___spec__2(obj*, obj*, obj*, obj*, obj*, obj*); +obj* l_Array_miterateAux___main___at_Lean_IR_FreeIndices_insertParams___spec__1___boxed(obj*, obj*, obj*, obj*); +obj* l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__1(obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_6__collectArg___main___boxed(obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_3__collectVar(obj*, obj*); +obj* l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__2(obj*, obj*, obj*); +obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_10__collectParams___spec__2(obj*, obj*, obj*, obj*); +obj* l_Lean_IR_FreeIndices_collectFnBody___main___closed__1; +obj* l_Lean_IR_MaxIndex_collectFnBody(obj*, obj*); uint8 l_Lean_IR_Expr_hasFreeVar(obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_9__seq(obj*, obj*, obj*, obj*); +obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_23__collectArray___spec__1___boxed(obj*); +obj* l_Lean_IR_FreeIndices_HasAndthen; obj* l_Lean_IR_Expr_hasFreeVar___boxed(obj*, obj*); -obj* l_Lean_IR_MaxVar_collectDecl(obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_16__collectJP(obj*, obj*, obj*); uint8 l_Lean_IR_HasIndex_visitArgs(obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_18__collectJP(obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_23__collectParam(obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_7__withJP(obj*, obj*, obj*, obj*); -obj* l_Lean_IR_FreeVariables_collectFnBody___main___closed__1; -obj* l_Lean_IR_FreeVariables_HasAndthen; namespace lean { uint8 nat_dec_lt(obj*, obj*); } -obj* l___private_init_lean_compiler_ir_freevars_1__skip___rarg___boxed(obj*); -obj* l___private_init_lean_compiler_ir_freevars_21__collectArray___at___private_init_lean_compiler_ir_freevars_26__collectAlts___spec__1___boxed(obj*, obj*, obj*); -obj* l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__1___boxed(obj*, obj*); -obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_12__collectArgs___spec__2(obj*, obj*, obj*, obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_11__collectArray___rarg___boxed(obj*, obj*, obj*, obj*); +obj* l_Lean_IR_FreeIndices_insertParams___boxed(obj*, obj*); +obj* l_Array_anyMAux___main___at_Lean_IR_HasIndex_visitParams___spec__1___boxed(obj*, obj*, obj*); namespace lean { obj* nat_add(obj*, obj*); } -obj* l___private_init_lean_compiler_ir_freevars_11__collectArray___at___private_init_lean_compiler_ir_freevars_14__collectAlts___spec__1(obj*, obj*, obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_21__collectArray(obj*); +obj* l___private_init_lean_compiler_ir_freevars_23__collectArray___rarg(obj*, obj*, obj*, obj*); namespace lean { uint8 nat_dec_eq(obj*, obj*); } -obj* l___private_init_lean_compiler_ir_freevars_11__collectArray___boxed(obj*); -obj* l___private_init_lean_compiler_ir_freevars_11__collectArray___rarg(obj*, obj*, obj*, obj*); -obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_14__collectAlts___spec__2___boxed(obj*, obj*, obj*, obj*, obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_13__skip___rarg(obj*); uint8 l_RBNode_isRed___main___rarg(obj*); -obj* l___private_init_lean_compiler_ir_freevars_21__collectArray___boxed(obj*); -obj* l___private_init_lean_compiler_ir_freevars_21__collectArray___rarg___boxed(obj*, obj*, obj*); -obj* l_Array_anyAux___main___at_Lean_IR_HasIndex_visitFnBody___main___spec__1___boxed(obj*, obj*, obj*); -obj* l_Lean_IR_FreeVariables_insertParams___boxed(obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_2__collectIndex(obj*, obj*, obj*); -obj* l_Array_anyAux___main___at_Lean_IR_HasIndex_visitArgs___spec__1___boxed(obj*, obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_15__skip___boxed(obj*); -obj* l___private_init_lean_compiler_ir_freevars_8__withParams(obj*, obj*, obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_12__collectAlts___boxed(obj*, obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_7__collectArray(obj*); +obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_8__collectArgs___spec__2(obj*, obj*, obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_20__withParams___boxed(obj*, obj*, obj*, obj*); +obj* l_Lean_IR_FreeIndices_collectFnBody___main(obj*, obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_22__collectArg(obj*, obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_24__collectArgs___boxed(obj*, obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_7__collectArray___at___private_init_lean_compiler_ir_freevars_10__collectParams___spec__1(obj*, obj*); +obj* l_Lean_IR_FnBody_collectFreeIndices(obj*, obj*); +obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_24__collectArgs___spec__2___boxed(obj*, obj*, obj*, obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_13__skip___rarg___boxed(obj*); +obj* l___private_init_lean_compiler_ir_freevars_8__collectArgs___boxed(obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_7__collectArray___at___private_init_lean_compiler_ir_freevars_8__collectArgs___spec__1___boxed(obj*, obj*); obj* l_Lean_IR_HasIndex_visitParams___boxed(obj*, obj*); obj* l_Lean_IR_FnBody_hasFreeVar___boxed(obj*, obj*); uint8 l_Lean_IR_HasIndex_visitFnBody___main(obj*, obj*); +obj* l_RBNode_ins___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__3(obj*, obj*, obj*); obj* l_Lean_IR_HasIndex_visitJP___boxed(obj*, obj*); uint8 l_Lean_IR_HasIndex_visitVar(obj*, obj*); uint8 l_Lean_IR_FnBody_hasFreeVar(obj*, obj*); +obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_8__collectArgs___spec__2___boxed(obj*, obj*, obj*, obj*); obj* l_Lean_IR_HasIndex_visitExpr___boxed(obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_17__collectVar___boxed(obj*, obj*); -obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_14__collectAlts___spec__2(obj*, obj*, obj*, obj*, obj*, obj*); -obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_11__collectArray___spec__1___boxed(obj*); -obj* l_RBNode_ins___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__3(obj*, obj*, obj*); +obj* l_Lean_IR_Decl_maxIndex(obj*); obj* l_Lean_IR_AltCore_body___main(obj*); +obj* l_Array_miterateAux___main___at_Lean_IR_FreeIndices_insertParams___spec__1(obj*, obj*, obj*, obj*); uint8 l_Lean_IR_HasIndex_visitFnBody(obj*, obj*); -obj* l_Lean_IR_FnBody_maxVar(obj*); +obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_23__collectArray___spec__1___rarg___boxed(obj*, obj*, obj*, obj*, obj*, obj*); obj* l_Lean_IR_HasIndex_visitArgs___boxed(obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_8__collectArgs(obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_23__collectArray___rarg___boxed(obj*, obj*, obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_2__collect___boxed(obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_18__withVar(obj*, obj*, obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_7__collectArray___boxed(obj*); +obj* l_Array_anyMAux___main___at_Lean_IR_HasIndex_visitFnBody___main___spec__1___boxed(obj*, obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_7__collectArray___rarg___boxed(obj*, obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_5__seq(obj*, obj*, obj*); uint8 l_Lean_IR_HasIndex_visitExpr(obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_13__collectExpr___main(obj*, obj*, obj*); -obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_21__collectArray___spec__1___rarg___boxed(obj*, obj*, obj*, obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_10__collectArg(obj*, obj*, obj*); -obj* l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__1(obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_5__withIndex(obj*, obj*, obj*, obj*); -obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_24__collectParams___spec__2(obj*, obj*, obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_20__collectArg___main(obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_21__collectArray___at___private_init_lean_compiler_ir_freevars_22__collectArgs___spec__1(obj*, obj*); -obj* l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__2(obj*, obj*, obj*); -obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_11__collectArray___spec__1(obj*); -obj* l___private_init_lean_compiler_ir_freevars_8__withParams___boxed(obj*, obj*, obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_21__collectArray___rarg(obj*, obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_7__collectArray___at___private_init_lean_compiler_ir_freevars_12__collectAlts___spec__1___boxed(obj*, obj*, obj*); +obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_7__collectArray___spec__1___rarg___boxed(obj*, obj*, obj*, obj*, obj*); +obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_7__collectArray___spec__1___rarg(obj*, obj*, obj*, obj*, obj*); +obj* l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__1___boxed(obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_23__collectArray___at___private_init_lean_compiler_ir_freevars_26__collectAlts___spec__1(obj*, obj*, obj*, obj*); obj* l_Lean_IR_HasIndex_visitFnBody___main___boxed(obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_11__collectArray___at___private_init_lean_compiler_ir_freevars_12__collectArgs___spec__1___boxed(obj*, obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_1__skip___rarg(obj*); -obj* l___private_init_lean_compiler_ir_freevars_18__collectJP___boxed(obj*, obj*); -obj* l_Lean_IR_MaxVar_collectFnBody___main(obj*, obj*); -uint8 l_Array_anyAux___main___at_Lean_IR_HasIndex_visitFnBody___main___spec__1(obj*, obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_20__collectArg___main___boxed(obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_12__collectArgs(obj*, obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_11__collectArray___at___private_init_lean_compiler_ir_freevars_14__collectAlts___spec__1___boxed(obj*, obj*, obj*, obj*); +obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_24__collectArgs___spec__2(obj*, obj*, obj*, obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_6__collectArg(obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_9__collectParam(obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_9__collectParam___boxed(obj*, obj*); obj* l_Lean_IR_HasIndex_visitExpr___main___boxed(obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_19__seq(obj*, obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_12__collectArgs___boxed(obj*, obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_21__collectArray___at___private_init_lean_compiler_ir_freevars_24__collectParams___spec__1(obj*, obj*); -obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_21__collectArray___spec__1___rarg(obj*, obj*, obj*, obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_24__collectArgs(obj*, obj*, obj*); +uint8 l_Array_anyMAux___main___at_Lean_IR_HasIndex_visitParams___spec__1(obj*, obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_13__skip(obj*); +obj* l___private_init_lean_compiler_ir_freevars_20__withParams(obj*, obj*, obj*, obj*); uint8 l_Lean_IR_HasIndex_visitJP(obj*, obj*); -obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_22__collectArgs___spec__2___boxed(obj*, obj*, obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_11__collectExpr___main(obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_21__seq(obj*, obj*, obj*, obj*); +obj* l_Lean_IR_MaxIndex_collectFnBody___main(obj*, obj*); uint8 l_Lean_IR_HasIndex_visitArg(obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_21__collectArray___at___private_init_lean_compiler_ir_freevars_24__collectParams___spec__1___boxed(obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_22__collectArgs___boxed(obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_23__collectArray(obj*); +obj* l___private_init_lean_compiler_ir_freevars_17__withIndex(obj*, obj*, obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_12__collectAlts(obj*, obj*, obj*); uint8 l_Lean_IR_HasIndex_visitArg___main(obj*, obj*); obj* l_Lean_IR_HasIndex_visitArg___boxed(obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_25__collectExpr(obj*, obj*); +obj* l___private_init_lean_compiler_ir_freevars_25__collectExpr(obj*, obj*, obj*); obj* l___private_init_lean_compiler_ir_freevars_1__skip(obj*); -obj* l_Lean_IR_FreeVariables_collectFnBody___main(obj*, obj*, obj*); -obj* l_Lean_IR_MaxVar_HasAndthen; +obj* l___private_init_lean_compiler_ir_freevars_15__collectVar(obj*, obj*, obj*); +obj* l_Lean_IR_FreeIndices_insertParams(obj*, obj*); obj* l_Lean_IR_HasIndex_visitFnBody___boxed(obj*, obj*); -obj* l___private_init_lean_compiler_ir_freevars_14__collectAlts(obj*, obj*, obj*, obj*); -obj* _init_l_Lean_IR_vsetInh() { -_start: -{ -obj* x_0; -x_0 = lean::box(0); -return x_0; -} -} -obj* l___private_init_lean_compiler_ir_freevars_1__skip___rarg(obj* x_0) { +obj* l___private_init_lean_compiler_ir_freevars_1__skip(obj* x_0) { _start: { lean::inc(x_0); return x_0; } } -obj* l___private_init_lean_compiler_ir_freevars_1__skip(obj* x_0) { -_start: -{ -obj* x_1; -x_1 = lean::alloc_closure(reinterpret_cast(l___private_init_lean_compiler_ir_freevars_1__skip___rarg___boxed), 1, 0); -return x_1; -} -} -obj* l___private_init_lean_compiler_ir_freevars_1__skip___rarg___boxed(obj* x_0) { -_start: -{ -obj* x_1; -x_1 = l___private_init_lean_compiler_ir_freevars_1__skip___rarg(x_0); -lean::dec(x_0); -return x_1; -} -} obj* l___private_init_lean_compiler_ir_freevars_1__skip___boxed(obj* x_0) { _start: { @@ -202,7 +176,1083 @@ lean::dec(x_0); return x_1; } } -obj* l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__1(obj* x_0, obj* x_1) { +obj* l___private_init_lean_compiler_ir_freevars_2__collect(obj* x_0, obj* x_1) { +_start: +{ +uint8 x_2; +x_2 = lean::nat_dec_lt(x_1, x_0); +if (x_2 == 0) +{ +lean::inc(x_1); +return x_1; +} +else +{ +lean::inc(x_0); +return x_0; +} +} +} +obj* l___private_init_lean_compiler_ir_freevars_2__collect___boxed(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; +x_2 = l___private_init_lean_compiler_ir_freevars_2__collect(x_0, x_1); +lean::dec(x_0); +lean::dec(x_1); +return x_2; +} +} +obj* l___private_init_lean_compiler_ir_freevars_3__collectVar(obj* x_0, obj* x_1) { +_start: +{ +uint8 x_2; +x_2 = lean::nat_dec_lt(x_1, x_0); +if (x_2 == 0) +{ +lean::inc(x_1); +return x_1; +} +else +{ +lean::inc(x_0); +return x_0; +} +} +} +obj* l___private_init_lean_compiler_ir_freevars_3__collectVar___boxed(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; +x_2 = l___private_init_lean_compiler_ir_freevars_3__collectVar(x_0, x_1); +lean::dec(x_0); +lean::dec(x_1); +return x_2; +} +} +obj* l___private_init_lean_compiler_ir_freevars_4__collectJP(obj* x_0, obj* x_1) { +_start: +{ +uint8 x_2; +x_2 = lean::nat_dec_lt(x_1, x_0); +if (x_2 == 0) +{ +lean::inc(x_1); +return x_1; +} +else +{ +lean::inc(x_0); +return x_0; +} +} +} +obj* l___private_init_lean_compiler_ir_freevars_4__collectJP___boxed(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; +x_2 = l___private_init_lean_compiler_ir_freevars_4__collectJP(x_0, x_1); +lean::dec(x_0); +lean::dec(x_1); +return x_2; +} +} +obj* l___private_init_lean_compiler_ir_freevars_5__seq(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +obj* x_3; obj* x_4; +x_3 = lean::apply_1(x_0, x_2); +x_4 = lean::apply_1(x_1, x_3); +return x_4; +} +} +obj* _init_l_Lean_IR_MaxIndex_HasAndthen() { +_start: +{ +obj* x_0; +x_0 = lean::alloc_closure(reinterpret_cast(l___private_init_lean_compiler_ir_freevars_5__seq), 3, 0); +return x_0; +} +} +obj* l___private_init_lean_compiler_ir_freevars_6__collectArg___main(obj* x_0, obj* x_1) { +_start: +{ +if (lean::obj_tag(x_0) == 0) +{ +obj* x_2; uint8 x_3; +x_2 = lean::cnstr_get(x_0, 0); +x_3 = lean::nat_dec_lt(x_1, x_2); +if (x_3 == 0) +{ +lean::inc(x_1); +return x_1; +} +else +{ +lean::inc(x_2); +return x_2; +} +} +else +{ +lean::inc(x_1); +return x_1; +} +} +} +obj* l___private_init_lean_compiler_ir_freevars_6__collectArg___main___boxed(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; +x_2 = l___private_init_lean_compiler_ir_freevars_6__collectArg___main(x_0, x_1); +lean::dec(x_0); +lean::dec(x_1); +return x_2; +} +} +obj* l___private_init_lean_compiler_ir_freevars_6__collectArg(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; +x_2 = l___private_init_lean_compiler_ir_freevars_6__collectArg___main(x_0, x_1); +return x_2; +} +} +obj* l___private_init_lean_compiler_ir_freevars_6__collectArg___boxed(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; +x_2 = l___private_init_lean_compiler_ir_freevars_6__collectArg(x_0, x_1); +lean::dec(x_0); +lean::dec(x_1); +return x_2; +} +} +obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_7__collectArray___spec__1___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { +_start: +{ +obj* x_5; uint8 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_1); +lean::dec(x_3); +return x_4; +} +else +{ +obj* x_10; obj* x_12; obj* x_13; obj* x_14; +x_10 = lean::array_fget(x_2, x_3); +lean::inc(x_1); +x_12 = lean::apply_2(x_1, x_10, x_4); +x_13 = lean::mk_nat_obj(1ul); +x_14 = lean::nat_add(x_3, x_13); +lean::dec(x_3); +x_3 = x_14; +x_4 = x_12; +goto _start; +} +} +} +obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_7__collectArray___spec__1(obj* x_0) { +_start: +{ +obj* x_1; +x_1 = lean::alloc_closure(reinterpret_cast(l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_7__collectArray___spec__1___rarg___boxed), 5, 0); +return x_1; +} +} +obj* l___private_init_lean_compiler_ir_freevars_7__collectArray___rarg(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +obj* x_3; obj* x_4; +x_3 = lean::mk_nat_obj(0ul); +x_4 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_7__collectArray___spec__1___rarg(x_0, x_1, x_0, x_3, x_2); +return x_4; +} +} +obj* l___private_init_lean_compiler_ir_freevars_7__collectArray(obj* x_0) { +_start: +{ +obj* x_1; +x_1 = lean::alloc_closure(reinterpret_cast(l___private_init_lean_compiler_ir_freevars_7__collectArray___rarg___boxed), 3, 0); +return x_1; +} +} +obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_7__collectArray___spec__1___rarg___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { +_start: +{ +obj* x_5; +x_5 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_7__collectArray___spec__1___rarg(x_0, x_1, x_2, x_3, x_4); +lean::dec(x_0); +lean::dec(x_2); +return x_5; +} +} +obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_7__collectArray___spec__1___boxed(obj* x_0) { +_start: +{ +obj* x_1; +x_1 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_7__collectArray___spec__1(x_0); +lean::dec(x_0); +return x_1; +} +} +obj* l___private_init_lean_compiler_ir_freevars_7__collectArray___rarg___boxed(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +obj* x_3; +x_3 = l___private_init_lean_compiler_ir_freevars_7__collectArray___rarg(x_0, x_1, x_2); +lean::dec(x_0); +return x_3; +} +} +obj* l___private_init_lean_compiler_ir_freevars_7__collectArray___boxed(obj* x_0) { +_start: +{ +obj* x_1; +x_1 = l___private_init_lean_compiler_ir_freevars_7__collectArray(x_0); +lean::dec(x_0); +return x_1; +} +} +obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_8__collectArgs___spec__2(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { +_start: +{ +obj* x_4; uint8 x_5; +x_4 = lean::array_get_size(x_1); +x_5 = lean::nat_dec_lt(x_2, x_4); +lean::dec(x_4); +if (x_5 == 0) +{ +lean::dec(x_2); +return x_3; +} +else +{ +obj* x_8; obj* x_9; obj* x_12; obj* x_13; +x_8 = lean::array_fget(x_1, x_2); +x_9 = l___private_init_lean_compiler_ir_freevars_6__collectArg___main(x_8, x_3); +lean::dec(x_3); +lean::dec(x_8); +x_12 = lean::mk_nat_obj(1ul); +x_13 = lean::nat_add(x_2, x_12); +lean::dec(x_2); +x_2 = x_13; +x_3 = x_9; +goto _start; +} +} +} +obj* l___private_init_lean_compiler_ir_freevars_7__collectArray___at___private_init_lean_compiler_ir_freevars_8__collectArgs___spec__1(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; obj* x_3; +x_2 = lean::mk_nat_obj(0ul); +x_3 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_8__collectArgs___spec__2(x_0, x_0, x_2, x_1); +return x_3; +} +} +obj* l___private_init_lean_compiler_ir_freevars_8__collectArgs(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; obj* x_3; +x_2 = lean::mk_nat_obj(0ul); +x_3 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_8__collectArgs___spec__2(x_0, x_0, x_2, x_1); +return x_3; +} +} +obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_8__collectArgs___spec__2___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { +_start: +{ +obj* x_4; +x_4 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_8__collectArgs___spec__2(x_0, x_1, x_2, x_3); +lean::dec(x_0); +lean::dec(x_1); +return x_4; +} +} +obj* l___private_init_lean_compiler_ir_freevars_7__collectArray___at___private_init_lean_compiler_ir_freevars_8__collectArgs___spec__1___boxed(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; +x_2 = l___private_init_lean_compiler_ir_freevars_7__collectArray___at___private_init_lean_compiler_ir_freevars_8__collectArgs___spec__1(x_0, x_1); +lean::dec(x_0); +return x_2; +} +} +obj* l___private_init_lean_compiler_ir_freevars_8__collectArgs___boxed(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; +x_2 = l___private_init_lean_compiler_ir_freevars_8__collectArgs(x_0, x_1); +lean::dec(x_0); +return x_2; +} +} +obj* l___private_init_lean_compiler_ir_freevars_9__collectParam(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; uint8 x_3; +x_2 = lean::cnstr_get(x_0, 0); +x_3 = lean::nat_dec_lt(x_1, x_2); +if (x_3 == 0) +{ +lean::inc(x_1); +return x_1; +} +else +{ +lean::inc(x_2); +return x_2; +} +} +} +obj* l___private_init_lean_compiler_ir_freevars_9__collectParam___boxed(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; +x_2 = l___private_init_lean_compiler_ir_freevars_9__collectParam(x_0, x_1); +lean::dec(x_0); +lean::dec(x_1); +return x_2; +} +} +obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_10__collectParams___spec__2(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { +_start: +{ +obj* x_4; uint8 x_5; +x_4 = lean::array_get_size(x_1); +x_5 = lean::nat_dec_lt(x_2, x_4); +lean::dec(x_4); +if (x_5 == 0) +{ +lean::dec(x_2); +return x_3; +} +else +{ +obj* x_8; obj* x_9; obj* x_12; obj* x_13; +x_8 = lean::array_fget(x_1, x_2); +x_9 = l___private_init_lean_compiler_ir_freevars_9__collectParam(x_8, x_3); +lean::dec(x_3); +lean::dec(x_8); +x_12 = lean::mk_nat_obj(1ul); +x_13 = lean::nat_add(x_2, x_12); +lean::dec(x_2); +x_2 = x_13; +x_3 = x_9; +goto _start; +} +} +} +obj* l___private_init_lean_compiler_ir_freevars_7__collectArray___at___private_init_lean_compiler_ir_freevars_10__collectParams___spec__1(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; obj* x_3; +x_2 = lean::mk_nat_obj(0ul); +x_3 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_10__collectParams___spec__2(x_0, x_0, x_2, x_1); +return x_3; +} +} +obj* l___private_init_lean_compiler_ir_freevars_10__collectParams(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; obj* x_3; +x_2 = lean::mk_nat_obj(0ul); +x_3 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_10__collectParams___spec__2(x_0, x_0, x_2, x_1); +return x_3; +} +} +obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_10__collectParams___spec__2___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { +_start: +{ +obj* x_4; +x_4 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_10__collectParams___spec__2(x_0, x_1, x_2, x_3); +lean::dec(x_0); +lean::dec(x_1); +return x_4; +} +} +obj* l___private_init_lean_compiler_ir_freevars_7__collectArray___at___private_init_lean_compiler_ir_freevars_10__collectParams___spec__1___boxed(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; +x_2 = l___private_init_lean_compiler_ir_freevars_7__collectArray___at___private_init_lean_compiler_ir_freevars_10__collectParams___spec__1(x_0, x_1); +lean::dec(x_0); +return x_2; +} +} +obj* l___private_init_lean_compiler_ir_freevars_10__collectParams___boxed(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; +x_2 = l___private_init_lean_compiler_ir_freevars_10__collectParams(x_0, x_1); +lean::dec(x_0); +return x_2; +} +} +obj* l___private_init_lean_compiler_ir_freevars_11__collectExpr___main(obj* x_0, obj* x_1) { +_start: +{ +switch (lean::obj_tag(x_0)) { +case 0: +{ +obj* x_2; obj* x_5; obj* x_6; +x_2 = lean::cnstr_get(x_0, 1); +lean::inc(x_2); +lean::dec(x_0); +x_5 = lean::mk_nat_obj(0ul); +x_6 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_8__collectArgs___spec__2(x_2, x_2, x_5, x_1); +lean::dec(x_2); +return x_6; +} +case 2: +{ +obj* x_8; obj* x_10; uint8 x_13; +x_8 = lean::cnstr_get(x_0, 0); +lean::inc(x_8); +x_10 = lean::cnstr_get(x_0, 2); +lean::inc(x_10); +lean::dec(x_0); +x_13 = lean::nat_dec_lt(x_1, x_8); +if (x_13 == 0) +{ +obj* x_15; obj* x_16; +lean::dec(x_8); +x_15 = lean::mk_nat_obj(0ul); +x_16 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_8__collectArgs___spec__2(x_10, x_10, x_15, x_1); +lean::dec(x_10); +return x_16; +} +else +{ +obj* x_19; obj* x_20; +lean::dec(x_1); +x_19 = lean::mk_nat_obj(0ul); +x_20 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_8__collectArgs___spec__2(x_10, x_10, x_19, x_8); +lean::dec(x_10); +return x_20; +} +} +case 3: +{ +obj* x_22; uint8 x_25; +x_22 = lean::cnstr_get(x_0, 1); +lean::inc(x_22); +lean::dec(x_0); +x_25 = lean::nat_dec_lt(x_1, x_22); +if (x_25 == 0) +{ +lean::dec(x_22); +return x_1; +} +else +{ +lean::dec(x_1); +return x_22; +} +} +case 4: +{ +obj* x_28; uint8 x_31; +x_28 = lean::cnstr_get(x_0, 1); +lean::inc(x_28); +lean::dec(x_0); +x_31 = lean::nat_dec_lt(x_1, x_28); +if (x_31 == 0) +{ +lean::dec(x_28); +return x_1; +} +else +{ +lean::dec(x_1); +return x_28; +} +} +case 5: +{ +obj* x_34; uint8 x_37; +x_34 = lean::cnstr_get(x_0, 2); +lean::inc(x_34); +lean::dec(x_0); +x_37 = lean::nat_dec_lt(x_1, x_34); +if (x_37 == 0) +{ +lean::dec(x_34); +return x_1; +} +else +{ +lean::dec(x_1); +return x_34; +} +} +case 6: +{ +obj* x_40; obj* x_43; obj* x_44; +x_40 = lean::cnstr_get(x_0, 1); +lean::inc(x_40); +lean::dec(x_0); +x_43 = lean::mk_nat_obj(0ul); +x_44 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_8__collectArgs___spec__2(x_40, x_40, x_43, x_1); +lean::dec(x_40); +return x_44; +} +case 7: +{ +obj* x_46; obj* x_49; obj* x_50; +x_46 = lean::cnstr_get(x_0, 1); +lean::inc(x_46); +lean::dec(x_0); +x_49 = lean::mk_nat_obj(0ul); +x_50 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_8__collectArgs___spec__2(x_46, x_46, x_49, x_1); +lean::dec(x_46); +return x_50; +} +case 8: +{ +obj* x_52; obj* x_54; uint8 x_57; +x_52 = lean::cnstr_get(x_0, 0); +lean::inc(x_52); +x_54 = lean::cnstr_get(x_0, 1); +lean::inc(x_54); +lean::dec(x_0); +x_57 = lean::nat_dec_lt(x_1, x_52); +if (x_57 == 0) +{ +obj* x_59; obj* x_60; +lean::dec(x_52); +x_59 = lean::mk_nat_obj(0ul); +x_60 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_8__collectArgs___spec__2(x_54, x_54, x_59, x_1); +lean::dec(x_54); +return x_60; +} +else +{ +obj* x_63; obj* x_64; +lean::dec(x_1); +x_63 = lean::mk_nat_obj(0ul); +x_64 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_8__collectArgs___spec__2(x_54, x_54, x_63, x_52); +lean::dec(x_54); +return x_64; +} +} +case 11: +{ +lean::dec(x_0); +return x_1; +} +default: +{ +obj* x_67; uint8 x_70; +x_67 = lean::cnstr_get(x_0, 0); +lean::inc(x_67); +lean::dec(x_0); +x_70 = lean::nat_dec_lt(x_1, x_67); +if (x_70 == 0) +{ +lean::dec(x_67); +return x_1; +} +else +{ +lean::dec(x_1); +return x_67; +} +} +} +} +} +obj* l___private_init_lean_compiler_ir_freevars_11__collectExpr(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; +x_2 = l___private_init_lean_compiler_ir_freevars_11__collectExpr___main(x_0, x_1); +return x_2; +} +} +obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_12__collectAlts___spec__2(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { +_start: +{ +obj* x_5; uint8 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); +lean::dec(x_0); +return x_4; +} +else +{ +obj* x_10; obj* x_11; obj* x_14; obj* x_15; obj* x_16; +x_10 = lean::array_fget(x_2, x_3); +x_11 = l_Lean_IR_AltCore_body___main(x_10); +lean::dec(x_10); +lean::inc(x_0); +x_14 = lean::apply_2(x_0, x_11, x_4); +x_15 = lean::mk_nat_obj(1ul); +x_16 = lean::nat_add(x_3, x_15); +lean::dec(x_3); +x_3 = x_16; +x_4 = x_14; +goto _start; +} +} +} +obj* l___private_init_lean_compiler_ir_freevars_7__collectArray___at___private_init_lean_compiler_ir_freevars_12__collectAlts___spec__1(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +obj* x_3; obj* x_4; +x_3 = lean::mk_nat_obj(0ul); +x_4 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_12__collectAlts___spec__2(x_0, x_1, x_1, x_3, x_2); +return x_4; +} +} +obj* l___private_init_lean_compiler_ir_freevars_12__collectAlts(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +obj* x_3; obj* x_4; +x_3 = lean::mk_nat_obj(0ul); +x_4 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_12__collectAlts___spec__2(x_0, x_1, x_1, x_3, x_2); +return x_4; +} +} +obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_12__collectAlts___spec__2___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { +_start: +{ +obj* x_5; +x_5 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_12__collectAlts___spec__2(x_0, x_1, x_2, x_3, x_4); +lean::dec(x_1); +lean::dec(x_2); +return x_5; +} +} +obj* l___private_init_lean_compiler_ir_freevars_7__collectArray___at___private_init_lean_compiler_ir_freevars_12__collectAlts___spec__1___boxed(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +obj* x_3; +x_3 = l___private_init_lean_compiler_ir_freevars_7__collectArray___at___private_init_lean_compiler_ir_freevars_12__collectAlts___spec__1(x_0, x_1, x_2); +lean::dec(x_1); +return x_3; +} +} +obj* l___private_init_lean_compiler_ir_freevars_12__collectAlts___boxed(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +obj* x_3; +x_3 = l___private_init_lean_compiler_ir_freevars_12__collectAlts(x_0, x_1, x_2); +lean::dec(x_1); +return x_3; +} +} +obj* _init_l_Lean_IR_MaxIndex_collectFnBody___main___closed__1() { +_start: +{ +obj* x_0; +x_0 = lean::alloc_closure(reinterpret_cast(l_Lean_IR_MaxIndex_collectFnBody___main), 2, 0); +return x_0; +} +} +obj* l_Lean_IR_MaxIndex_collectFnBody___main(obj* x_0, obj* x_1) { +_start: +{ +switch (lean::obj_tag(x_0)) { +case 0: +{ +obj* x_2; obj* x_4; obj* x_7; +x_2 = lean::cnstr_get(x_0, 1); +lean::inc(x_2); +x_4 = lean::cnstr_get(x_0, 2); +lean::inc(x_4); +lean::dec(x_0); +x_7 = l___private_init_lean_compiler_ir_freevars_11__collectExpr___main(x_2, x_1); +x_0 = x_4; +x_1 = x_7; +goto _start; +} +case 1: +{ +obj* x_9; obj* x_11; obj* x_13; obj* x_16; obj* x_17; obj* x_18; +x_9 = lean::cnstr_get(x_0, 1); +lean::inc(x_9); +x_11 = lean::cnstr_get(x_0, 2); +lean::inc(x_11); +x_13 = lean::cnstr_get(x_0, 3); +lean::inc(x_13); +lean::dec(x_0); +x_16 = l_Lean_IR_MaxIndex_collectFnBody___main(x_11, x_1); +x_17 = lean::mk_nat_obj(0ul); +x_18 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_10__collectParams___spec__2(x_9, x_9, x_17, x_16); +lean::dec(x_9); +x_0 = x_13; +x_1 = x_18; +goto _start; +} +case 2: +{ +obj* x_21; obj* x_23; obj* x_25; uint8 x_28; +x_21 = lean::cnstr_get(x_0, 0); +lean::inc(x_21); +x_23 = lean::cnstr_get(x_0, 2); +lean::inc(x_23); +x_25 = lean::cnstr_get(x_0, 3); +lean::inc(x_25); +lean::dec(x_0); +x_28 = lean::nat_dec_lt(x_1, x_21); +if (x_28 == 0) +{ +uint8 x_30; +lean::dec(x_21); +x_30 = lean::nat_dec_lt(x_1, x_23); +if (x_30 == 0) +{ +lean::dec(x_23); +x_0 = x_25; +goto _start; +} +else +{ +lean::dec(x_1); +x_0 = x_25; +x_1 = x_23; +goto _start; +} +} +else +{ +uint8 x_36; +lean::dec(x_1); +x_36 = lean::nat_dec_lt(x_21, x_23); +if (x_36 == 0) +{ +lean::dec(x_23); +x_0 = x_25; +x_1 = x_21; +goto _start; +} +else +{ +lean::dec(x_21); +x_0 = x_25; +x_1 = x_23; +goto _start; +} +} +} +case 3: +{ +obj* x_41; obj* x_43; obj* x_45; uint8 x_48; +x_41 = lean::cnstr_get(x_0, 0); +lean::inc(x_41); +x_43 = lean::cnstr_get(x_0, 2); +lean::inc(x_43); +x_45 = lean::cnstr_get(x_0, 3); +lean::inc(x_45); +lean::dec(x_0); +x_48 = lean::nat_dec_lt(x_1, x_41); +if (x_48 == 0) +{ +uint8 x_50; +lean::dec(x_41); +x_50 = lean::nat_dec_lt(x_1, x_43); +if (x_50 == 0) +{ +lean::dec(x_43); +x_0 = x_45; +goto _start; +} +else +{ +lean::dec(x_1); +x_0 = x_45; +x_1 = x_43; +goto _start; +} +} +else +{ +uint8 x_56; +lean::dec(x_1); +x_56 = lean::nat_dec_lt(x_41, x_43); +if (x_56 == 0) +{ +lean::dec(x_43); +x_0 = x_45; +x_1 = x_41; +goto _start; +} +else +{ +lean::dec(x_41); +x_0 = x_45; +x_1 = x_43; +goto _start; +} +} +} +case 4: +{ +obj* x_61; obj* x_63; obj* x_65; uint8 x_68; +x_61 = lean::cnstr_get(x_0, 0); +lean::inc(x_61); +x_63 = lean::cnstr_get(x_0, 3); +lean::inc(x_63); +x_65 = lean::cnstr_get(x_0, 4); +lean::inc(x_65); +lean::dec(x_0); +x_68 = lean::nat_dec_lt(x_1, x_61); +if (x_68 == 0) +{ +uint8 x_70; +lean::dec(x_61); +x_70 = lean::nat_dec_lt(x_1, x_63); +if (x_70 == 0) +{ +lean::dec(x_63); +x_0 = x_65; +goto _start; +} +else +{ +lean::dec(x_1); +x_0 = x_65; +x_1 = x_63; +goto _start; +} +} +else +{ +uint8 x_76; +lean::dec(x_1); +x_76 = lean::nat_dec_lt(x_61, x_63); +if (x_76 == 0) +{ +lean::dec(x_63); +x_0 = x_65; +x_1 = x_61; +goto _start; +} +else +{ +lean::dec(x_61); +x_0 = x_65; +x_1 = x_63; +goto _start; +} +} +} +case 8: +{ +obj* x_81; +x_81 = lean::cnstr_get(x_0, 1); +lean::inc(x_81); +lean::dec(x_0); +x_0 = x_81; +goto _start; +} +case 9: +{ +obj* x_85; obj* x_87; uint8 x_90; +x_85 = lean::cnstr_get(x_0, 1); +lean::inc(x_85); +x_87 = lean::cnstr_get(x_0, 2); +lean::inc(x_87); +lean::dec(x_0); +x_90 = lean::nat_dec_lt(x_1, x_85); +if (x_90 == 0) +{ +obj* x_92; obj* x_93; obj* x_94; +lean::dec(x_85); +x_92 = l_Lean_IR_MaxIndex_collectFnBody___main___closed__1; +x_93 = lean::mk_nat_obj(0ul); +x_94 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_12__collectAlts___spec__2(x_92, x_87, x_87, x_93, x_1); +lean::dec(x_87); +return x_94; +} +else +{ +obj* x_97; obj* x_98; obj* x_99; +lean::dec(x_1); +x_97 = l_Lean_IR_MaxIndex_collectFnBody___main___closed__1; +x_98 = lean::mk_nat_obj(0ul); +x_99 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_12__collectAlts___spec__2(x_97, x_87, x_87, x_98, x_85); +lean::dec(x_87); +return x_99; +} +} +case 10: +{ +obj* x_101; obj* x_104; +x_101 = lean::cnstr_get(x_0, 0); +lean::inc(x_101); +lean::dec(x_0); +x_104 = l___private_init_lean_compiler_ir_freevars_6__collectArg___main(x_101, x_1); +lean::dec(x_1); +lean::dec(x_101); +return x_104; +} +case 11: +{ +obj* x_107; obj* x_109; uint8 x_112; +x_107 = lean::cnstr_get(x_0, 0); +lean::inc(x_107); +x_109 = lean::cnstr_get(x_0, 1); +lean::inc(x_109); +lean::dec(x_0); +x_112 = lean::nat_dec_lt(x_1, x_107); +if (x_112 == 0) +{ +obj* x_114; obj* x_115; +lean::dec(x_107); +x_114 = lean::mk_nat_obj(0ul); +x_115 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_8__collectArgs___spec__2(x_109, x_109, x_114, x_1); +lean::dec(x_109); +return x_115; +} +else +{ +obj* x_118; obj* x_119; +lean::dec(x_1); +x_118 = lean::mk_nat_obj(0ul); +x_119 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_8__collectArgs___spec__2(x_109, x_109, x_118, x_107); +lean::dec(x_109); +return x_119; +} +} +case 12: +{ +return x_1; +} +default: +{ +obj* x_121; obj* x_123; uint8 x_126; +x_121 = lean::cnstr_get(x_0, 0); +lean::inc(x_121); +x_123 = lean::cnstr_get(x_0, 2); +lean::inc(x_123); +lean::dec(x_0); +x_126 = lean::nat_dec_lt(x_1, x_121); +if (x_126 == 0) +{ +lean::dec(x_121); +x_0 = x_123; +goto _start; +} +else +{ +lean::dec(x_1); +x_0 = x_123; +x_1 = x_121; +goto _start; +} +} +} +} +} +obj* l_Lean_IR_MaxIndex_collectFnBody(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; +x_2 = l_Lean_IR_MaxIndex_collectFnBody___main(x_0, x_1); +return x_2; +} +} +obj* l_Lean_IR_MaxIndex_collectDecl___main(obj* x_0, obj* x_1) { +_start: +{ +if (lean::obj_tag(x_0) == 0) +{ +obj* x_2; obj* x_4; obj* x_7; obj* x_8; obj* x_10; +x_2 = lean::cnstr_get(x_0, 1); +lean::inc(x_2); +x_4 = lean::cnstr_get(x_0, 2); +lean::inc(x_4); +lean::dec(x_0); +x_7 = lean::mk_nat_obj(0ul); +x_8 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_10__collectParams___spec__2(x_2, x_2, x_7, x_1); +lean::dec(x_2); +x_10 = l_Lean_IR_MaxIndex_collectFnBody___main(x_4, x_8); +return x_10; +} +else +{ +obj* x_11; obj* x_14; obj* x_15; +x_11 = lean::cnstr_get(x_0, 1); +lean::inc(x_11); +lean::dec(x_0); +x_14 = lean::mk_nat_obj(0ul); +x_15 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_10__collectParams___spec__2(x_11, x_11, x_14, x_1); +lean::dec(x_11); +return x_15; +} +} +} +obj* l_Lean_IR_MaxIndex_collectDecl(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; +x_2 = l_Lean_IR_MaxIndex_collectDecl___main(x_0, x_1); +return x_2; +} +} +obj* l_Lean_IR_FnBody_maxIndex(obj* x_0) { +_start: +{ +obj* x_1; obj* x_2; +x_1 = lean::mk_nat_obj(0ul); +x_2 = l_Lean_IR_MaxIndex_collectFnBody___main(x_0, x_1); +return x_2; +} +} +obj* l_Lean_IR_Decl_maxIndex(obj* x_0) { +_start: +{ +obj* x_1; obj* x_2; +x_1 = lean::mk_nat_obj(0ul); +x_2 = l_Lean_IR_MaxIndex_collectDecl___main(x_0, x_1); +return x_2; +} +} +obj* l___private_init_lean_compiler_ir_freevars_13__skip___rarg(obj* x_0) { +_start: +{ +lean::inc(x_0); +return x_0; +} +} +obj* l___private_init_lean_compiler_ir_freevars_13__skip(obj* x_0) { +_start: +{ +obj* x_1; +x_1 = lean::alloc_closure(reinterpret_cast(l___private_init_lean_compiler_ir_freevars_13__skip___rarg___boxed), 1, 0); +return x_1; +} +} +obj* l___private_init_lean_compiler_ir_freevars_13__skip___rarg___boxed(obj* x_0) { +_start: +{ +obj* x_1; +x_1 = l___private_init_lean_compiler_ir_freevars_13__skip___rarg(x_0); +lean::dec(x_0); +return x_1; +} +} +obj* l___private_init_lean_compiler_ir_freevars_13__skip___boxed(obj* x_0) { +_start: +{ +obj* x_1; +x_1 = l___private_init_lean_compiler_ir_freevars_13__skip(x_0); +lean::dec(x_0); +return x_1; +} +} +obj* l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__1(obj* x_0, obj* x_1) { _start: { if (lean::obj_tag(x_0) == 0) @@ -259,7 +1309,7 @@ goto _start; } } } -obj* l_RBNode_ins___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__3(obj* x_0, obj* x_1, obj* x_2) { +obj* l_RBNode_ins___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__3(obj* x_0, obj* x_1, obj* x_2) { _start: { if (lean::obj_tag(x_0) == 0) @@ -326,7 +1376,7 @@ return x_21; else { obj* x_22; obj* x_23; obj* x_24; -x_22 = l_RBNode_ins___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__3(x_13, x_1, x_2); +x_22 = l_RBNode_ins___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__3(x_13, x_1, x_2); if (lean::is_scalar(x_15)) { x_23 = lean::alloc_cnstr(1, 4, 1); } else { @@ -344,7 +1394,7 @@ return x_24; else { obj* x_25; obj* x_26; obj* x_27; -x_25 = l_RBNode_ins___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__3(x_7, x_1, x_2); +x_25 = l_RBNode_ins___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__3(x_7, x_1, x_2); if (lean::is_scalar(x_15)) { x_26 = lean::alloc_cnstr(1, 4, 1); } else { @@ -410,7 +1460,7 @@ x_43 = l_RBNode_isRed___main___rarg(x_34); if (x_43 == 0) { obj* x_44; obj* x_45; obj* x_46; -x_44 = l_RBNode_ins___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__3(x_34, x_1, x_2); +x_44 = l_RBNode_ins___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__3(x_34, x_1, x_2); if (lean::is_scalar(x_36)) { x_45 = lean::alloc_cnstr(1, 4, 1); } else { @@ -427,7 +1477,7 @@ return x_46; else { obj* x_47; -x_47 = l_RBNode_ins___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__3(x_34, x_1, x_2); +x_47 = l_RBNode_ins___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__3(x_34, x_1, x_2); if (lean::obj_tag(x_47) == 0) { lean::dec(x_32); @@ -872,7 +1922,7 @@ x_180 = l_RBNode_isRed___main___rarg(x_28); if (x_180 == 0) { obj* x_181; obj* x_182; obj* x_183; -x_181 = l_RBNode_ins___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__3(x_28, x_1, x_2); +x_181 = l_RBNode_ins___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__3(x_28, x_1, x_2); if (lean::is_scalar(x_36)) { x_182 = lean::alloc_cnstr(1, 4, 1); } else { @@ -889,7 +1939,7 @@ return x_183; else { obj* x_184; -x_184 = l_RBNode_ins___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__3(x_28, x_1, x_2); +x_184 = l_RBNode_ins___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__3(x_28, x_1, x_2); if (lean::obj_tag(x_184) == 0) { lean::dec(x_32); @@ -1330,7 +2380,7 @@ return x_316; } } } -obj* l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__2(obj* x_0, obj* x_1, obj* x_2) { +obj* l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__2(obj* x_0, obj* x_1, obj* x_2) { _start: { uint8 x_3; @@ -1338,28 +2388,28 @@ x_3 = l_RBNode_isRed___main___rarg(x_0); if (x_3 == 0) { obj* x_4; -x_4 = l_RBNode_ins___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__3(x_0, x_1, x_2); +x_4 = l_RBNode_ins___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__3(x_0, x_1, x_2); return x_4; } else { obj* x_5; obj* x_6; -x_5 = l_RBNode_ins___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__3(x_0, x_1, x_2); +x_5 = l_RBNode_ins___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__3(x_0, x_1, x_2); x_6 = l_RBNode_setBlack___main___rarg(x_5); return x_6; } } } -obj* l___private_init_lean_compiler_ir_freevars_2__collectIndex(obj* x_0, obj* x_1, obj* x_2) { +obj* l___private_init_lean_compiler_ir_freevars_14__collectIndex(obj* x_0, obj* x_1, obj* x_2) { _start: { obj* x_3; -x_3 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__1(x_1, x_0); +x_3 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__1(x_1, x_0); if (lean::obj_tag(x_3) == 0) { obj* x_4; obj* x_5; x_4 = lean::box(0); -x_5 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__2(x_2, x_0, x_4); +x_5 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__2(x_2, x_0, x_4); return x_5; } else @@ -1370,25 +2420,25 @@ return x_2; } } } -obj* l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__1___boxed(obj* x_0, obj* x_1) { +obj* l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__1___boxed(obj* x_0, obj* x_1) { _start: { obj* x_2; -x_2 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__1(x_0, x_1); +x_2 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__1(x_0, x_1); lean::dec(x_1); return x_2; } } -obj* l___private_init_lean_compiler_ir_freevars_3__collectVar(obj* x_0, obj* x_1, obj* x_2) { +obj* l___private_init_lean_compiler_ir_freevars_15__collectVar(obj* x_0, obj* x_1, obj* x_2) { _start: { obj* x_3; -x_3 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__1(x_1, x_0); +x_3 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__1(x_1, x_0); if (lean::obj_tag(x_3) == 0) { obj* x_4; obj* x_5; x_4 = lean::box(0); -x_5 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__2(x_2, x_0, x_4); +x_5 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__2(x_2, x_0, x_4); return x_5; } else @@ -1399,16 +2449,16 @@ return x_2; } } } -obj* l___private_init_lean_compiler_ir_freevars_4__collectJP(obj* x_0, obj* x_1, obj* x_2) { +obj* l___private_init_lean_compiler_ir_freevars_16__collectJP(obj* x_0, obj* x_1, obj* x_2) { _start: { obj* x_3; -x_3 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__1(x_1, x_0); +x_3 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__1(x_1, x_0); if (lean::obj_tag(x_3) == 0) { obj* x_4; obj* x_5; x_4 = lean::box(0); -x_5 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__2(x_2, x_0, x_4); +x_5 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__2(x_2, x_0, x_4); return x_5; } else @@ -1419,37 +2469,37 @@ return x_2; } } } -obj* l___private_init_lean_compiler_ir_freevars_5__withIndex(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { +obj* l___private_init_lean_compiler_ir_freevars_17__withIndex(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { obj* x_4; obj* x_5; obj* x_6; x_4 = lean::box(0); -x_5 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__2(x_2, x_0, x_4); +x_5 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__2(x_2, x_0, x_4); x_6 = lean::apply_2(x_1, x_5, x_3); return x_6; } } -obj* l___private_init_lean_compiler_ir_freevars_6__withVar(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { +obj* l___private_init_lean_compiler_ir_freevars_18__withVar(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { obj* x_4; obj* x_5; obj* x_6; x_4 = lean::box(0); -x_5 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__2(x_2, x_0, x_4); +x_5 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__2(x_2, x_0, x_4); x_6 = lean::apply_2(x_1, x_5, x_3); return x_6; } } -obj* l___private_init_lean_compiler_ir_freevars_7__withJP(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { +obj* l___private_init_lean_compiler_ir_freevars_19__withJP(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { obj* x_4; obj* x_5; obj* x_6; x_4 = lean::box(0); -x_5 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__2(x_2, x_0, x_4); +x_5 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__2(x_2, x_0, x_4); x_6 = lean::apply_2(x_1, x_5, x_3); return x_6; } } -obj* l_Array_miterateAux___main___at_Lean_IR_FreeVariables_insertParams___spec__1(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { +obj* l_Array_miterateAux___main___at_Lean_IR_FreeIndices_insertParams___spec__1(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { obj* x_4; uint8 x_5; @@ -1472,61 +2522,61 @@ x_12 = lean::mk_nat_obj(1ul); x_13 = lean::nat_add(x_2, x_12); lean::dec(x_2); x_15 = lean::box(0); -x_16 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__2(x_3, x_9, x_15); +x_16 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__2(x_3, x_9, x_15); x_2 = x_13; x_3 = x_16; goto _start; } } } -obj* l_Lean_IR_FreeVariables_insertParams(obj* x_0, obj* x_1) { +obj* l_Lean_IR_FreeIndices_insertParams(obj* x_0, obj* x_1) { _start: { obj* x_2; obj* x_3; x_2 = lean::mk_nat_obj(0ul); -x_3 = l_Array_miterateAux___main___at_Lean_IR_FreeVariables_insertParams___spec__1(x_1, x_1, x_2, x_0); +x_3 = l_Array_miterateAux___main___at_Lean_IR_FreeIndices_insertParams___spec__1(x_1, x_1, x_2, x_0); return x_3; } } -obj* l_Array_miterateAux___main___at_Lean_IR_FreeVariables_insertParams___spec__1___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { +obj* l_Array_miterateAux___main___at_Lean_IR_FreeIndices_insertParams___spec__1___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { obj* x_4; -x_4 = l_Array_miterateAux___main___at_Lean_IR_FreeVariables_insertParams___spec__1(x_0, x_1, x_2, x_3); +x_4 = l_Array_miterateAux___main___at_Lean_IR_FreeIndices_insertParams___spec__1(x_0, x_1, x_2, x_3); lean::dec(x_0); lean::dec(x_1); return x_4; } } -obj* l_Lean_IR_FreeVariables_insertParams___boxed(obj* x_0, obj* x_1) { +obj* l_Lean_IR_FreeIndices_insertParams___boxed(obj* x_0, obj* x_1) { _start: { obj* x_2; -x_2 = l_Lean_IR_FreeVariables_insertParams(x_0, x_1); +x_2 = l_Lean_IR_FreeIndices_insertParams(x_0, x_1); lean::dec(x_1); return x_2; } } -obj* l___private_init_lean_compiler_ir_freevars_8__withParams(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { +obj* l___private_init_lean_compiler_ir_freevars_20__withParams(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { obj* x_4; obj* x_5; obj* x_6; x_4 = lean::mk_nat_obj(0ul); -x_5 = l_Array_miterateAux___main___at_Lean_IR_FreeVariables_insertParams___spec__1(x_0, x_0, x_4, x_2); +x_5 = l_Array_miterateAux___main___at_Lean_IR_FreeIndices_insertParams___spec__1(x_0, x_0, x_4, x_2); x_6 = lean::apply_2(x_1, x_5, x_3); return x_6; } } -obj* l___private_init_lean_compiler_ir_freevars_8__withParams___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { +obj* l___private_init_lean_compiler_ir_freevars_20__withParams___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { obj* x_4; -x_4 = l___private_init_lean_compiler_ir_freevars_8__withParams(x_0, x_1, x_2, x_3); +x_4 = l___private_init_lean_compiler_ir_freevars_20__withParams(x_0, x_1, x_2, x_3); lean::dec(x_0); return x_4; } } -obj* l___private_init_lean_compiler_ir_freevars_9__seq(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { +obj* l___private_init_lean_compiler_ir_freevars_21__seq(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { obj* x_5; obj* x_6; @@ -1536,15 +2586,15 @@ x_6 = lean::apply_2(x_1, x_2, x_5); return x_6; } } -obj* _init_l_Lean_IR_FreeVariables_HasAndthen() { +obj* _init_l_Lean_IR_FreeIndices_HasAndthen() { _start: { obj* x_0; -x_0 = lean::alloc_closure(reinterpret_cast(l___private_init_lean_compiler_ir_freevars_9__seq), 4, 0); +x_0 = lean::alloc_closure(reinterpret_cast(l___private_init_lean_compiler_ir_freevars_21__seq), 4, 0); return x_0; } } -obj* l___private_init_lean_compiler_ir_freevars_10__collectArg___main(obj* x_0, obj* x_1, obj* x_2) { +obj* l___private_init_lean_compiler_ir_freevars_22__collectArg___main(obj* x_0, obj* x_1, obj* x_2) { _start: { if (lean::obj_tag(x_0) == 0) @@ -1553,12 +2603,12 @@ obj* x_3; obj* x_6; x_3 = lean::cnstr_get(x_0, 0); lean::inc(x_3); lean::dec(x_0); -x_6 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__1(x_1, x_3); +x_6 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__1(x_1, x_3); if (lean::obj_tag(x_6) == 0) { obj* x_7; obj* x_8; x_7 = lean::box(0); -x_8 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__2(x_2, x_3, x_7); +x_8 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__2(x_2, x_3, x_7); return x_8; } else @@ -1575,15 +2625,15 @@ return x_2; } } } -obj* l___private_init_lean_compiler_ir_freevars_10__collectArg(obj* x_0, obj* x_1, obj* x_2) { +obj* l___private_init_lean_compiler_ir_freevars_22__collectArg(obj* x_0, obj* x_1, obj* x_2) { _start: { obj* x_3; -x_3 = l___private_init_lean_compiler_ir_freevars_10__collectArg___main(x_0, x_1, x_2); +x_3 = l___private_init_lean_compiler_ir_freevars_22__collectArg___main(x_0, x_1, x_2); return x_3; } } -obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_11__collectArray___spec__1___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_23__collectArray___spec__1___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { _start: { obj* x_6; uint8 x_7; @@ -1613,69 +2663,69 @@ goto _start; } } } -obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_11__collectArray___spec__1(obj* x_0) { +obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_23__collectArray___spec__1(obj* x_0) { _start: { obj* x_1; -x_1 = lean::alloc_closure(reinterpret_cast(l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_11__collectArray___spec__1___rarg___boxed), 6, 0); +x_1 = lean::alloc_closure(reinterpret_cast(l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_23__collectArray___spec__1___rarg___boxed), 6, 0); return x_1; } } -obj* l___private_init_lean_compiler_ir_freevars_11__collectArray___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { +obj* l___private_init_lean_compiler_ir_freevars_23__collectArray___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { obj* x_4; obj* x_5; x_4 = lean::mk_nat_obj(0ul); -x_5 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_11__collectArray___spec__1___rarg(x_0, x_1, x_2, x_0, x_4, x_3); +x_5 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_23__collectArray___spec__1___rarg(x_0, x_1, x_2, x_0, x_4, x_3); return x_5; } } -obj* l___private_init_lean_compiler_ir_freevars_11__collectArray(obj* x_0) { +obj* l___private_init_lean_compiler_ir_freevars_23__collectArray(obj* x_0) { _start: { obj* x_1; -x_1 = lean::alloc_closure(reinterpret_cast(l___private_init_lean_compiler_ir_freevars_11__collectArray___rarg___boxed), 4, 0); +x_1 = lean::alloc_closure(reinterpret_cast(l___private_init_lean_compiler_ir_freevars_23__collectArray___rarg___boxed), 4, 0); return x_1; } } -obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_11__collectArray___spec__1___rarg___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_23__collectArray___spec__1___rarg___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { _start: { obj* x_6; -x_6 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_11__collectArray___spec__1___rarg(x_0, x_1, x_2, x_3, x_4, x_5); +x_6 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_23__collectArray___spec__1___rarg(x_0, x_1, x_2, x_3, x_4, x_5); lean::dec(x_0); lean::dec(x_3); return x_6; } } -obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_11__collectArray___spec__1___boxed(obj* x_0) { +obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_23__collectArray___spec__1___boxed(obj* x_0) { _start: { obj* x_1; -x_1 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_11__collectArray___spec__1(x_0); +x_1 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_23__collectArray___spec__1(x_0); lean::dec(x_0); return x_1; } } -obj* l___private_init_lean_compiler_ir_freevars_11__collectArray___rarg___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { +obj* l___private_init_lean_compiler_ir_freevars_23__collectArray___rarg___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { obj* x_4; -x_4 = l___private_init_lean_compiler_ir_freevars_11__collectArray___rarg(x_0, x_1, x_2, x_3); +x_4 = l___private_init_lean_compiler_ir_freevars_23__collectArray___rarg(x_0, x_1, x_2, x_3); lean::dec(x_0); return x_4; } } -obj* l___private_init_lean_compiler_ir_freevars_11__collectArray___boxed(obj* x_0) { +obj* l___private_init_lean_compiler_ir_freevars_23__collectArray___boxed(obj* x_0) { _start: { obj* x_1; -x_1 = l___private_init_lean_compiler_ir_freevars_11__collectArray(x_0); +x_1 = l___private_init_lean_compiler_ir_freevars_23__collectArray(x_0); lean::dec(x_0); return x_1; } } -obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_12__collectArgs___spec__2(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { +obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_24__collectArgs___spec__2(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { obj* x_5; uint8 x_6; @@ -1693,7 +2743,7 @@ else obj* x_10; obj* x_12; obj* x_13; obj* x_14; x_10 = lean::array_fget(x_2, x_3); lean::inc(x_1); -x_12 = l___private_init_lean_compiler_ir_freevars_10__collectArg___main(x_10, x_1, x_4); +x_12 = l___private_init_lean_compiler_ir_freevars_22__collectArg___main(x_10, x_1, x_4); x_13 = lean::mk_nat_obj(1ul); x_14 = lean::nat_add(x_3, x_13); lean::dec(x_3); @@ -1703,53 +2753,53 @@ goto _start; } } } -obj* l___private_init_lean_compiler_ir_freevars_11__collectArray___at___private_init_lean_compiler_ir_freevars_12__collectArgs___spec__1(obj* x_0, obj* x_1, obj* x_2) { +obj* l___private_init_lean_compiler_ir_freevars_23__collectArray___at___private_init_lean_compiler_ir_freevars_24__collectArgs___spec__1(obj* x_0, obj* x_1, obj* x_2) { _start: { obj* x_3; obj* x_4; x_3 = lean::mk_nat_obj(0ul); -x_4 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_12__collectArgs___spec__2(x_0, x_1, x_0, x_3, x_2); +x_4 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_24__collectArgs___spec__2(x_0, x_1, x_0, x_3, x_2); return x_4; } } -obj* l___private_init_lean_compiler_ir_freevars_12__collectArgs(obj* x_0, obj* x_1, obj* x_2) { +obj* l___private_init_lean_compiler_ir_freevars_24__collectArgs(obj* x_0, obj* x_1, obj* x_2) { _start: { obj* x_3; obj* x_4; x_3 = lean::mk_nat_obj(0ul); -x_4 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_12__collectArgs___spec__2(x_0, x_1, x_0, x_3, x_2); +x_4 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_24__collectArgs___spec__2(x_0, x_1, x_0, x_3, x_2); return x_4; } } -obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_12__collectArgs___spec__2___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { +obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_24__collectArgs___spec__2___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { obj* x_5; -x_5 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_12__collectArgs___spec__2(x_0, x_1, x_2, x_3, x_4); +x_5 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_24__collectArgs___spec__2(x_0, x_1, x_2, x_3, x_4); lean::dec(x_0); lean::dec(x_2); return x_5; } } -obj* l___private_init_lean_compiler_ir_freevars_11__collectArray___at___private_init_lean_compiler_ir_freevars_12__collectArgs___spec__1___boxed(obj* x_0, obj* x_1, obj* x_2) { +obj* l___private_init_lean_compiler_ir_freevars_23__collectArray___at___private_init_lean_compiler_ir_freevars_24__collectArgs___spec__1___boxed(obj* x_0, obj* x_1, obj* x_2) { _start: { obj* x_3; -x_3 = l___private_init_lean_compiler_ir_freevars_11__collectArray___at___private_init_lean_compiler_ir_freevars_12__collectArgs___spec__1(x_0, x_1, x_2); +x_3 = l___private_init_lean_compiler_ir_freevars_23__collectArray___at___private_init_lean_compiler_ir_freevars_24__collectArgs___spec__1(x_0, x_1, x_2); lean::dec(x_0); return x_3; } } -obj* l___private_init_lean_compiler_ir_freevars_12__collectArgs___boxed(obj* x_0, obj* x_1, obj* x_2) { +obj* l___private_init_lean_compiler_ir_freevars_24__collectArgs___boxed(obj* x_0, obj* x_1, obj* x_2) { _start: { obj* x_3; -x_3 = l___private_init_lean_compiler_ir_freevars_12__collectArgs(x_0, x_1, x_2); +x_3 = l___private_init_lean_compiler_ir_freevars_24__collectArgs(x_0, x_1, x_2); lean::dec(x_0); return x_3; } } -obj* l___private_init_lean_compiler_ir_freevars_13__collectExpr___main(obj* x_0, obj* x_1, obj* x_2) { +obj* l___private_init_lean_compiler_ir_freevars_25__collectExpr___main(obj* x_0, obj* x_1, obj* x_2) { _start: { switch (lean::obj_tag(x_0)) { @@ -1759,12 +2809,12 @@ obj* x_3; obj* x_6; x_3 = lean::cnstr_get(x_0, 0); lean::inc(x_3); lean::dec(x_0); -x_6 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__1(x_1, x_3); +x_6 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__1(x_1, x_3); if (lean::obj_tag(x_6) == 0) { obj* x_7; obj* x_8; x_7 = lean::box(0); -x_8 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__2(x_2, x_3, x_7); +x_8 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__2(x_2, x_3, x_7); return x_8; } else @@ -1783,14 +2833,14 @@ x_13 = lean::cnstr_get(x_0, 2); lean::inc(x_13); lean::dec(x_0); lean::inc(x_1); -x_17 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__1(x_1, x_11); +x_17 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__1(x_1, x_11); if (lean::obj_tag(x_17) == 0) { obj* x_18; obj* x_19; obj* x_20; obj* x_21; x_18 = lean::box(0); -x_19 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__2(x_2, x_11, x_18); +x_19 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__2(x_2, x_11, x_18); x_20 = lean::mk_nat_obj(0ul); -x_21 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_12__collectArgs___spec__2(x_13, x_1, x_13, x_20, x_19); +x_21 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_24__collectArgs___spec__2(x_13, x_1, x_13, x_20, x_19); lean::dec(x_13); return x_21; } @@ -1800,7 +2850,7 @@ obj* x_25; obj* x_26; lean::dec(x_11); lean::dec(x_17); x_25 = lean::mk_nat_obj(0ul); -x_26 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_12__collectArgs___spec__2(x_13, x_1, x_13, x_25, x_2); +x_26 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_24__collectArgs___spec__2(x_13, x_1, x_13, x_25, x_2); lean::dec(x_13); return x_26; } @@ -1811,12 +2861,12 @@ obj* x_28; obj* x_31; x_28 = lean::cnstr_get(x_0, 1); lean::inc(x_28); lean::dec(x_0); -x_31 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__1(x_1, x_28); +x_31 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__1(x_1, x_28); if (lean::obj_tag(x_31) == 0) { obj* x_32; obj* x_33; x_32 = lean::box(0); -x_33 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__2(x_2, x_28, x_32); +x_33 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__2(x_2, x_28, x_32); return x_33; } else @@ -1832,12 +2882,12 @@ obj* x_36; obj* x_39; x_36 = lean::cnstr_get(x_0, 1); lean::inc(x_36); lean::dec(x_0); -x_39 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__1(x_1, x_36); +x_39 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__1(x_1, x_36); if (lean::obj_tag(x_39) == 0) { obj* x_40; obj* x_41; x_40 = lean::box(0); -x_41 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__2(x_2, x_36, x_40); +x_41 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__2(x_2, x_36, x_40); return x_41; } else @@ -1853,12 +2903,12 @@ obj* x_44; obj* x_47; x_44 = lean::cnstr_get(x_0, 2); lean::inc(x_44); lean::dec(x_0); -x_47 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__1(x_1, x_44); +x_47 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__1(x_1, x_44); if (lean::obj_tag(x_47) == 0) { obj* x_48; obj* x_49; x_48 = lean::box(0); -x_49 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__2(x_2, x_44, x_48); +x_49 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__2(x_2, x_44, x_48); return x_49; } else @@ -1877,14 +2927,14 @@ x_54 = lean::cnstr_get(x_0, 1); lean::inc(x_54); lean::dec(x_0); lean::inc(x_1); -x_58 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__1(x_1, x_52); +x_58 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__1(x_1, x_52); if (lean::obj_tag(x_58) == 0) { obj* x_59; obj* x_60; obj* x_61; obj* x_62; x_59 = lean::box(0); -x_60 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__2(x_2, x_52, x_59); +x_60 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__2(x_2, x_52, x_59); x_61 = lean::mk_nat_obj(0ul); -x_62 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_12__collectArgs___spec__2(x_54, x_1, x_54, x_61, x_60); +x_62 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_24__collectArgs___spec__2(x_54, x_1, x_54, x_61, x_60); lean::dec(x_54); return x_62; } @@ -1894,7 +2944,7 @@ obj* x_66; obj* x_67; lean::dec(x_52); lean::dec(x_58); x_66 = lean::mk_nat_obj(0ul); -x_67 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_12__collectArgs___spec__2(x_54, x_1, x_54, x_66, x_2); +x_67 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_24__collectArgs___spec__2(x_54, x_1, x_54, x_66, x_2); lean::dec(x_54); return x_67; } @@ -1905,12 +2955,12 @@ obj* x_69; obj* x_72; x_69 = lean::cnstr_get(x_0, 0); lean::inc(x_69); lean::dec(x_0); -x_72 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__1(x_1, x_69); +x_72 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__1(x_1, x_69); if (lean::obj_tag(x_72) == 0) { obj* x_73; obj* x_74; x_73 = lean::box(0); -x_74 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__2(x_2, x_69, x_73); +x_74 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__2(x_2, x_69, x_73); return x_74; } else @@ -1926,12 +2976,12 @@ obj* x_77; obj* x_80; x_77 = lean::cnstr_get(x_0, 0); lean::inc(x_77); lean::dec(x_0); -x_80 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__1(x_1, x_77); +x_80 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__1(x_1, x_77); if (lean::obj_tag(x_80) == 0) { obj* x_81; obj* x_82; x_81 = lean::box(0); -x_82 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__2(x_2, x_77, x_81); +x_82 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__2(x_2, x_77, x_81); return x_82; } else @@ -1953,12 +3003,12 @@ obj* x_87; obj* x_90; x_87 = lean::cnstr_get(x_0, 0); lean::inc(x_87); lean::dec(x_0); -x_90 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__1(x_1, x_87); +x_90 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__1(x_1, x_87); if (lean::obj_tag(x_90) == 0) { obj* x_91; obj* x_92; x_91 = lean::box(0); -x_92 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__2(x_2, x_87, x_91); +x_92 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__2(x_2, x_87, x_91); return x_92; } else @@ -1974,12 +3024,12 @@ obj* x_95; obj* x_98; x_95 = lean::cnstr_get(x_0, 0); lean::inc(x_95); lean::dec(x_0); -x_98 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__1(x_1, x_95); +x_98 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__1(x_1, x_95); if (lean::obj_tag(x_98) == 0) { obj* x_99; obj* x_100; x_99 = lean::box(0); -x_100 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__2(x_2, x_95, x_99); +x_100 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__2(x_2, x_95, x_99); return x_100; } else @@ -1996,22 +3046,22 @@ x_103 = lean::cnstr_get(x_0, 1); lean::inc(x_103); lean::dec(x_0); x_106 = lean::mk_nat_obj(0ul); -x_107 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_12__collectArgs___spec__2(x_103, x_1, x_103, x_106, x_2); +x_107 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_24__collectArgs___spec__2(x_103, x_1, x_103, x_106, x_2); lean::dec(x_103); return x_107; } } } } -obj* l___private_init_lean_compiler_ir_freevars_13__collectExpr(obj* x_0, obj* x_1, obj* x_2) { +obj* l___private_init_lean_compiler_ir_freevars_25__collectExpr(obj* x_0, obj* x_1, obj* x_2) { _start: { obj* x_3; -x_3 = l___private_init_lean_compiler_ir_freevars_13__collectExpr___main(x_0, x_1, x_2); +x_3 = l___private_init_lean_compiler_ir_freevars_25__collectExpr___main(x_0, x_1, x_2); return x_3; } } -obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_14__collectAlts___spec__2(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_26__collectAlts___spec__2(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { _start: { obj* x_6; uint8 x_7; @@ -2043,61 +3093,61 @@ goto _start; } } } -obj* l___private_init_lean_compiler_ir_freevars_11__collectArray___at___private_init_lean_compiler_ir_freevars_14__collectAlts___spec__1(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { +obj* l___private_init_lean_compiler_ir_freevars_23__collectArray___at___private_init_lean_compiler_ir_freevars_26__collectAlts___spec__1(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { obj* x_4; obj* x_5; x_4 = lean::mk_nat_obj(0ul); -x_5 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_14__collectAlts___spec__2(x_0, x_1, x_2, x_1, x_4, x_3); +x_5 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_26__collectAlts___spec__2(x_0, x_1, x_2, x_1, x_4, x_3); return x_5; } } -obj* l___private_init_lean_compiler_ir_freevars_14__collectAlts(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { +obj* l___private_init_lean_compiler_ir_freevars_26__collectAlts(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { obj* x_4; obj* x_5; x_4 = lean::mk_nat_obj(0ul); -x_5 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_14__collectAlts___spec__2(x_0, x_1, x_2, x_1, x_4, x_3); +x_5 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_26__collectAlts___spec__2(x_0, x_1, x_2, x_1, x_4, x_3); return x_5; } } -obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_14__collectAlts___spec__2___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_26__collectAlts___spec__2___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { _start: { obj* x_6; -x_6 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_14__collectAlts___spec__2(x_0, x_1, x_2, x_3, x_4, x_5); +x_6 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_26__collectAlts___spec__2(x_0, x_1, x_2, x_3, x_4, x_5); lean::dec(x_1); lean::dec(x_3); return x_6; } } -obj* l___private_init_lean_compiler_ir_freevars_11__collectArray___at___private_init_lean_compiler_ir_freevars_14__collectAlts___spec__1___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { +obj* l___private_init_lean_compiler_ir_freevars_23__collectArray___at___private_init_lean_compiler_ir_freevars_26__collectAlts___spec__1___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { obj* x_4; -x_4 = l___private_init_lean_compiler_ir_freevars_11__collectArray___at___private_init_lean_compiler_ir_freevars_14__collectAlts___spec__1(x_0, x_1, x_2, x_3); +x_4 = l___private_init_lean_compiler_ir_freevars_23__collectArray___at___private_init_lean_compiler_ir_freevars_26__collectAlts___spec__1(x_0, x_1, x_2, x_3); lean::dec(x_1); return x_4; } } -obj* l___private_init_lean_compiler_ir_freevars_14__collectAlts___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { +obj* l___private_init_lean_compiler_ir_freevars_26__collectAlts___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { obj* x_4; -x_4 = l___private_init_lean_compiler_ir_freevars_14__collectAlts(x_0, x_1, x_2, x_3); +x_4 = l___private_init_lean_compiler_ir_freevars_26__collectAlts(x_0, x_1, x_2, x_3); lean::dec(x_1); return x_4; } } -obj* _init_l_Lean_IR_FreeVariables_collectFnBody___main___closed__1() { +obj* _init_l_Lean_IR_FreeIndices_collectFnBody___main___closed__1() { _start: { obj* x_0; -x_0 = lean::alloc_closure(reinterpret_cast(l_Lean_IR_FreeVariables_collectFnBody___main), 3, 0); +x_0 = lean::alloc_closure(reinterpret_cast(l_Lean_IR_FreeIndices_collectFnBody___main), 3, 0); return x_0; } } -obj* l_Lean_IR_FreeVariables_collectFnBody___main(obj* x_0, obj* x_1, obj* x_2) { +obj* l_Lean_IR_FreeIndices_collectFnBody___main(obj* x_0, obj* x_1, obj* x_2) { _start: { switch (lean::obj_tag(x_0)) { @@ -2112,9 +3162,9 @@ x_7 = lean::cnstr_get(x_0, 2); lean::inc(x_7); lean::dec(x_0); lean::inc(x_1); -x_11 = l___private_init_lean_compiler_ir_freevars_13__collectExpr___main(x_5, x_1, x_2); +x_11 = l___private_init_lean_compiler_ir_freevars_25__collectExpr___main(x_5, x_1, x_2); x_12 = lean::box(0); -x_13 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__2(x_1, x_3, x_12); +x_13 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__2(x_1, x_3, x_12); x_0 = x_7; x_1 = x_13; x_2 = x_11; @@ -2134,11 +3184,11 @@ lean::inc(x_21); lean::dec(x_0); x_24 = lean::mk_nat_obj(0ul); lean::inc(x_1); -x_26 = l_Array_miterateAux___main___at_Lean_IR_FreeVariables_insertParams___spec__1(x_17, x_17, x_24, x_1); +x_26 = l_Array_miterateAux___main___at_Lean_IR_FreeIndices_insertParams___spec__1(x_17, x_17, x_24, x_1); lean::dec(x_17); -x_28 = l_Lean_IR_FreeVariables_collectFnBody___main(x_19, x_26, x_2); +x_28 = l_Lean_IR_FreeIndices_collectFnBody___main(x_19, x_26, x_2); x_29 = lean::box(0); -x_30 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__2(x_1, x_15, x_29); +x_30 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__2(x_1, x_15, x_29); x_0 = x_21; x_1 = x_30; x_2 = x_28; @@ -2155,18 +3205,18 @@ x_36 = lean::cnstr_get(x_0, 3); lean::inc(x_36); lean::dec(x_0); lean::inc(x_1); -x_40 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__1(x_1, x_32); +x_40 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__1(x_1, x_32); lean::inc(x_1); -x_42 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__1(x_1, x_34); +x_42 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__1(x_1, x_34); if (lean::obj_tag(x_40) == 0) { obj* x_43; obj* x_44; x_43 = lean::box(0); -x_44 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__2(x_2, x_32, x_43); +x_44 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__2(x_2, x_32, x_43); if (lean::obj_tag(x_42) == 0) { obj* x_45; -x_45 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__2(x_44, x_34, x_43); +x_45 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__2(x_44, x_34, x_43); x_0 = x_36; x_2 = x_45; goto _start; @@ -2188,7 +3238,7 @@ if (lean::obj_tag(x_42) == 0) { obj* x_52; obj* x_53; x_52 = lean::box(0); -x_53 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__2(x_2, x_34, x_52); +x_53 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__2(x_2, x_34, x_52); x_0 = x_36; x_2 = x_53; goto _start; @@ -2213,18 +3263,18 @@ x_62 = lean::cnstr_get(x_0, 3); lean::inc(x_62); lean::dec(x_0); lean::inc(x_1); -x_66 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__1(x_1, x_58); +x_66 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__1(x_1, x_58); lean::inc(x_1); -x_68 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__1(x_1, x_60); +x_68 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__1(x_1, x_60); if (lean::obj_tag(x_66) == 0) { obj* x_69; obj* x_70; x_69 = lean::box(0); -x_70 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__2(x_2, x_58, x_69); +x_70 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__2(x_2, x_58, x_69); if (lean::obj_tag(x_68) == 0) { obj* x_71; -x_71 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__2(x_70, x_60, x_69); +x_71 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__2(x_70, x_60, x_69); x_0 = x_62; x_2 = x_71; goto _start; @@ -2246,7 +3296,7 @@ if (lean::obj_tag(x_68) == 0) { obj* x_78; obj* x_79; x_78 = lean::box(0); -x_79 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__2(x_2, x_60, x_78); +x_79 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__2(x_2, x_60, x_78); x_0 = x_62; x_2 = x_79; goto _start; @@ -2271,26 +3321,26 @@ x_88 = lean::cnstr_get(x_0, 4); lean::inc(x_88); lean::dec(x_0); lean::inc(x_1); -x_92 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__1(x_1, x_84); +x_92 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__1(x_1, x_84); lean::inc(x_1); -x_94 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__1(x_1, x_86); +x_94 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__1(x_1, x_86); if (lean::obj_tag(x_92) == 0) { obj* x_95; obj* x_96; x_95 = lean::box(0); -x_96 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__2(x_2, x_84, x_95); +x_96 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__2(x_2, x_84, x_95); if (lean::obj_tag(x_94) == 0) { obj* x_97; -x_97 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__2(x_96, x_86, x_95); +x_97 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__2(x_96, x_86, x_95); x_0 = x_88; x_2 = x_97; goto _start; } else { -lean::dec(x_94); lean::dec(x_86); +lean::dec(x_94); x_0 = x_88; x_2 = x_96; goto _start; @@ -2298,106 +3348,133 @@ goto _start; } else { -lean::dec(x_84); lean::dec(x_92); +lean::dec(x_84); if (lean::obj_tag(x_94) == 0) { obj* x_104; obj* x_105; x_104 = lean::box(0); -x_105 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__2(x_2, x_86, x_104); +x_105 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__2(x_2, x_86, x_104); x_0 = x_88; x_2 = x_105; goto _start; } else { -lean::dec(x_94); lean::dec(x_86); +lean::dec(x_94); x_0 = x_88; goto _start; } } } +case 7: +{ +obj* x_110; obj* x_112; obj* x_116; +x_110 = lean::cnstr_get(x_0, 0); +lean::inc(x_110); +x_112 = lean::cnstr_get(x_0, 2); +lean::inc(x_112); +lean::dec(x_0); +lean::inc(x_1); +x_116 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__1(x_1, x_110); +if (lean::obj_tag(x_116) == 0) +{ +obj* x_117; obj* x_118; +x_117 = lean::box(0); +x_118 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__2(x_2, x_110, x_117); +x_0 = x_112; +x_2 = x_118; +goto _start; +} +else +{ +lean::dec(x_116); +lean::dec(x_110); +x_0 = x_112; +goto _start; +} +} case 8: { -obj* x_110; -x_110 = lean::cnstr_get(x_0, 1); -lean::inc(x_110); +obj* x_123; +x_123 = lean::cnstr_get(x_0, 1); +lean::inc(x_123); lean::dec(x_0); -x_0 = x_110; +x_0 = x_123; goto _start; } case 9: { -obj* x_114; obj* x_116; obj* x_120; -x_114 = lean::cnstr_get(x_0, 1); -lean::inc(x_114); -x_116 = lean::cnstr_get(x_0, 2); -lean::inc(x_116); +obj* x_127; obj* x_129; obj* x_133; +x_127 = lean::cnstr_get(x_0, 1); +lean::inc(x_127); +x_129 = lean::cnstr_get(x_0, 2); +lean::inc(x_129); lean::dec(x_0); lean::inc(x_1); -x_120 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__1(x_1, x_114); -if (lean::obj_tag(x_120) == 0) +x_133 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__1(x_1, x_127); +if (lean::obj_tag(x_133) == 0) { -obj* x_121; obj* x_122; obj* x_123; obj* x_124; obj* x_125; -x_121 = lean::box(0); -x_122 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__2(x_2, x_114, x_121); -x_123 = l_Lean_IR_FreeVariables_collectFnBody___main___closed__1; -x_124 = lean::mk_nat_obj(0ul); -x_125 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_14__collectAlts___spec__2(x_123, x_116, x_1, x_116, x_124, x_122); -lean::dec(x_116); -return x_125; +obj* x_134; obj* x_135; obj* x_136; obj* x_137; obj* x_138; +x_134 = lean::box(0); +x_135 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__2(x_2, x_127, x_134); +x_136 = l_Lean_IR_FreeIndices_collectFnBody___main___closed__1; +x_137 = lean::mk_nat_obj(0ul); +x_138 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_26__collectAlts___spec__2(x_136, x_129, x_1, x_129, x_137, x_135); +lean::dec(x_129); +return x_138; } else { -obj* x_129; obj* x_130; obj* x_131; -lean::dec(x_120); -lean::dec(x_114); -x_129 = l_Lean_IR_FreeVariables_collectFnBody___main___closed__1; -x_130 = lean::mk_nat_obj(0ul); -x_131 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_14__collectAlts___spec__2(x_129, x_116, x_1, x_116, x_130, x_2); -lean::dec(x_116); -return x_131; +obj* x_142; obj* x_143; obj* x_144; +lean::dec(x_133); +lean::dec(x_127); +x_142 = l_Lean_IR_FreeIndices_collectFnBody___main___closed__1; +x_143 = lean::mk_nat_obj(0ul); +x_144 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_26__collectAlts___spec__2(x_142, x_129, x_1, x_129, x_143, x_2); +lean::dec(x_129); +return x_144; } } case 10: { -obj* x_133; obj* x_136; -x_133 = lean::cnstr_get(x_0, 0); -lean::inc(x_133); +obj* x_146; obj* x_149; +x_146 = lean::cnstr_get(x_0, 0); +lean::inc(x_146); lean::dec(x_0); -x_136 = l___private_init_lean_compiler_ir_freevars_10__collectArg___main(x_133, x_1, x_2); -return x_136; +x_149 = l___private_init_lean_compiler_ir_freevars_22__collectArg___main(x_146, x_1, x_2); +return x_149; } case 11: { -obj* x_137; obj* x_139; obj* x_143; -x_137 = lean::cnstr_get(x_0, 0); -lean::inc(x_137); -x_139 = lean::cnstr_get(x_0, 1); -lean::inc(x_139); +obj* x_150; obj* x_152; obj* x_156; +x_150 = lean::cnstr_get(x_0, 0); +lean::inc(x_150); +x_152 = lean::cnstr_get(x_0, 1); +lean::inc(x_152); lean::dec(x_0); lean::inc(x_1); -x_143 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__1(x_1, x_137); -if (lean::obj_tag(x_143) == 0) +x_156 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__1(x_1, x_150); +if (lean::obj_tag(x_156) == 0) { -obj* x_144; obj* x_145; obj* x_146; obj* x_147; -x_144 = lean::box(0); -x_145 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__2(x_2, x_137, x_144); -x_146 = lean::mk_nat_obj(0ul); -x_147 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_12__collectArgs___spec__2(x_139, x_1, x_139, x_146, x_145); -lean::dec(x_139); -return x_147; +obj* x_157; obj* x_158; obj* x_159; obj* x_160; +x_157 = lean::box(0); +x_158 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__2(x_2, x_150, x_157); +x_159 = lean::mk_nat_obj(0ul); +x_160 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_24__collectArgs___spec__2(x_152, x_1, x_152, x_159, x_158); +lean::dec(x_152); +return x_160; } else { -obj* x_151; obj* x_152; -lean::dec(x_137); -lean::dec(x_143); -x_151 = lean::mk_nat_obj(0ul); -x_152 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_12__collectArgs___spec__2(x_139, x_1, x_139, x_151, x_2); -lean::dec(x_139); -return x_152; +obj* x_164; obj* x_165; +lean::dec(x_156); +lean::dec(x_150); +x_164 = lean::mk_nat_obj(0ul); +x_165 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_24__collectArgs___spec__2(x_152, x_1, x_152, x_164, x_2); +lean::dec(x_152); +return x_165; } } case 12: @@ -2407,1116 +3484,57 @@ return x_2; } default: { -obj* x_155; obj* x_157; obj* x_161; -x_155 = lean::cnstr_get(x_0, 0); -lean::inc(x_155); -x_157 = lean::cnstr_get(x_0, 2); -lean::inc(x_157); +obj* x_168; obj* x_170; obj* x_174; +x_168 = lean::cnstr_get(x_0, 0); +lean::inc(x_168); +x_170 = lean::cnstr_get(x_0, 2); +lean::inc(x_170); lean::dec(x_0); lean::inc(x_1); -x_161 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__1(x_1, x_155); -if (lean::obj_tag(x_161) == 0) +x_174 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__1(x_1, x_168); +if (lean::obj_tag(x_174) == 0) { -obj* x_162; obj* x_163; -x_162 = lean::box(0); -x_163 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__2(x_2, x_155, x_162); -x_0 = x_157; -x_2 = x_163; +obj* x_175; obj* x_176; +x_175 = lean::box(0); +x_176 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__2(x_2, x_168, x_175); +x_0 = x_170; +x_2 = x_176; goto _start; } else { -lean::dec(x_155); -lean::dec(x_161); -x_0 = x_157; +lean::dec(x_168); +lean::dec(x_174); +x_0 = x_170; goto _start; } } } } } -obj* l_Lean_IR_FreeVariables_collectFnBody(obj* x_0, obj* x_1, obj* x_2) { +obj* l_Lean_IR_FreeIndices_collectFnBody(obj* x_0, obj* x_1, obj* x_2) { _start: { obj* x_3; -x_3 = l_Lean_IR_FreeVariables_collectFnBody___main(x_0, x_1, x_2); +x_3 = l_Lean_IR_FreeIndices_collectFnBody___main(x_0, x_1, x_2); return x_3; } } -obj* l_Lean_IR_FnBody_collectFreeVars(obj* x_0, obj* x_1) { +obj* l_Lean_IR_FnBody_collectFreeIndices(obj* x_0, obj* x_1) { _start: { obj* x_2; obj* x_3; x_2 = lean::box(0); -x_3 = l_Lean_IR_FreeVariables_collectFnBody___main(x_0, x_2, x_1); +x_3 = l_Lean_IR_FreeIndices_collectFnBody___main(x_0, x_2, x_1); return x_3; } } -obj* l_Lean_IR_FnBody_freeVars(obj* x_0) { +obj* l_Lean_IR_FnBody_freeIndices(obj* x_0) { _start: { obj* x_1; obj* x_2; x_1 = lean::box(0); -x_2 = l_Lean_IR_FnBody_collectFreeVars(x_0, x_1); -return x_2; -} -} -obj* l___private_init_lean_compiler_ir_freevars_15__skip(obj* x_0) { -_start: -{ -lean::inc(x_0); -return x_0; -} -} -obj* l___private_init_lean_compiler_ir_freevars_15__skip___boxed(obj* x_0) { -_start: -{ -obj* x_1; -x_1 = l___private_init_lean_compiler_ir_freevars_15__skip(x_0); -lean::dec(x_0); -return x_1; -} -} -obj* l___private_init_lean_compiler_ir_freevars_16__collect(obj* x_0, obj* x_1) { -_start: -{ -uint8 x_2; -x_2 = lean::nat_dec_lt(x_1, x_0); -if (x_2 == 0) -{ -lean::inc(x_1); -return x_1; -} -else -{ -lean::inc(x_0); -return x_0; -} -} -} -obj* l___private_init_lean_compiler_ir_freevars_16__collect___boxed(obj* x_0, obj* x_1) { -_start: -{ -obj* x_2; -x_2 = l___private_init_lean_compiler_ir_freevars_16__collect(x_0, x_1); -lean::dec(x_0); -lean::dec(x_1); -return x_2; -} -} -obj* l___private_init_lean_compiler_ir_freevars_17__collectVar(obj* x_0, obj* x_1) { -_start: -{ -uint8 x_2; -x_2 = lean::nat_dec_lt(x_1, x_0); -if (x_2 == 0) -{ -lean::inc(x_1); -return x_1; -} -else -{ -lean::inc(x_0); -return x_0; -} -} -} -obj* l___private_init_lean_compiler_ir_freevars_17__collectVar___boxed(obj* x_0, obj* x_1) { -_start: -{ -obj* x_2; -x_2 = l___private_init_lean_compiler_ir_freevars_17__collectVar(x_0, x_1); -lean::dec(x_0); -lean::dec(x_1); -return x_2; -} -} -obj* l___private_init_lean_compiler_ir_freevars_18__collectJP(obj* x_0, obj* x_1) { -_start: -{ -uint8 x_2; -x_2 = lean::nat_dec_lt(x_1, x_0); -if (x_2 == 0) -{ -lean::inc(x_1); -return x_1; -} -else -{ -lean::inc(x_0); -return x_0; -} -} -} -obj* l___private_init_lean_compiler_ir_freevars_18__collectJP___boxed(obj* x_0, obj* x_1) { -_start: -{ -obj* x_2; -x_2 = l___private_init_lean_compiler_ir_freevars_18__collectJP(x_0, x_1); -lean::dec(x_0); -lean::dec(x_1); -return x_2; -} -} -obj* l___private_init_lean_compiler_ir_freevars_19__seq(obj* x_0, obj* x_1, obj* x_2) { -_start: -{ -obj* x_3; obj* x_4; -x_3 = lean::apply_1(x_0, x_2); -x_4 = lean::apply_1(x_1, x_3); -return x_4; -} -} -obj* _init_l_Lean_IR_MaxVar_HasAndthen() { -_start: -{ -obj* x_0; -x_0 = lean::alloc_closure(reinterpret_cast(l___private_init_lean_compiler_ir_freevars_19__seq), 3, 0); -return x_0; -} -} -obj* l___private_init_lean_compiler_ir_freevars_20__collectArg___main(obj* x_0, obj* x_1) { -_start: -{ -if (lean::obj_tag(x_0) == 0) -{ -obj* x_2; uint8 x_3; -x_2 = lean::cnstr_get(x_0, 0); -x_3 = lean::nat_dec_lt(x_1, x_2); -if (x_3 == 0) -{ -lean::inc(x_1); -return x_1; -} -else -{ -lean::inc(x_2); -return x_2; -} -} -else -{ -lean::inc(x_1); -return x_1; -} -} -} -obj* l___private_init_lean_compiler_ir_freevars_20__collectArg___main___boxed(obj* x_0, obj* x_1) { -_start: -{ -obj* x_2; -x_2 = l___private_init_lean_compiler_ir_freevars_20__collectArg___main(x_0, x_1); -lean::dec(x_0); -lean::dec(x_1); -return x_2; -} -} -obj* l___private_init_lean_compiler_ir_freevars_20__collectArg(obj* x_0, obj* x_1) { -_start: -{ -obj* x_2; -x_2 = l___private_init_lean_compiler_ir_freevars_20__collectArg___main(x_0, x_1); -return x_2; -} -} -obj* l___private_init_lean_compiler_ir_freevars_20__collectArg___boxed(obj* x_0, obj* x_1) { -_start: -{ -obj* x_2; -x_2 = l___private_init_lean_compiler_ir_freevars_20__collectArg(x_0, x_1); -lean::dec(x_0); -lean::dec(x_1); -return x_2; -} -} -obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_21__collectArray___spec__1___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { -_start: -{ -obj* x_5; uint8 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_1); -lean::dec(x_3); -return x_4; -} -else -{ -obj* x_10; obj* x_12; obj* x_13; obj* x_14; -x_10 = lean::array_fget(x_2, x_3); -lean::inc(x_1); -x_12 = lean::apply_2(x_1, x_10, x_4); -x_13 = lean::mk_nat_obj(1ul); -x_14 = lean::nat_add(x_3, x_13); -lean::dec(x_3); -x_3 = x_14; -x_4 = x_12; -goto _start; -} -} -} -obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_21__collectArray___spec__1(obj* x_0) { -_start: -{ -obj* x_1; -x_1 = lean::alloc_closure(reinterpret_cast(l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_21__collectArray___spec__1___rarg___boxed), 5, 0); -return x_1; -} -} -obj* l___private_init_lean_compiler_ir_freevars_21__collectArray___rarg(obj* x_0, obj* x_1, obj* x_2) { -_start: -{ -obj* x_3; obj* x_4; -x_3 = lean::mk_nat_obj(0ul); -x_4 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_21__collectArray___spec__1___rarg(x_0, x_1, x_0, x_3, x_2); -return x_4; -} -} -obj* l___private_init_lean_compiler_ir_freevars_21__collectArray(obj* x_0) { -_start: -{ -obj* x_1; -x_1 = lean::alloc_closure(reinterpret_cast(l___private_init_lean_compiler_ir_freevars_21__collectArray___rarg___boxed), 3, 0); -return x_1; -} -} -obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_21__collectArray___spec__1___rarg___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { -_start: -{ -obj* x_5; -x_5 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_21__collectArray___spec__1___rarg(x_0, x_1, x_2, x_3, x_4); -lean::dec(x_0); -lean::dec(x_2); -return x_5; -} -} -obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_21__collectArray___spec__1___boxed(obj* x_0) { -_start: -{ -obj* x_1; -x_1 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_21__collectArray___spec__1(x_0); -lean::dec(x_0); -return x_1; -} -} -obj* l___private_init_lean_compiler_ir_freevars_21__collectArray___rarg___boxed(obj* x_0, obj* x_1, obj* x_2) { -_start: -{ -obj* x_3; -x_3 = l___private_init_lean_compiler_ir_freevars_21__collectArray___rarg(x_0, x_1, x_2); -lean::dec(x_0); -return x_3; -} -} -obj* l___private_init_lean_compiler_ir_freevars_21__collectArray___boxed(obj* x_0) { -_start: -{ -obj* x_1; -x_1 = l___private_init_lean_compiler_ir_freevars_21__collectArray(x_0); -lean::dec(x_0); -return x_1; -} -} -obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_22__collectArgs___spec__2(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { -_start: -{ -obj* x_4; uint8 x_5; -x_4 = lean::array_get_size(x_1); -x_5 = lean::nat_dec_lt(x_2, x_4); -lean::dec(x_4); -if (x_5 == 0) -{ -lean::dec(x_2); -return x_3; -} -else -{ -obj* x_8; obj* x_9; obj* x_12; obj* x_13; -x_8 = lean::array_fget(x_1, x_2); -x_9 = l___private_init_lean_compiler_ir_freevars_20__collectArg___main(x_8, x_3); -lean::dec(x_3); -lean::dec(x_8); -x_12 = lean::mk_nat_obj(1ul); -x_13 = lean::nat_add(x_2, x_12); -lean::dec(x_2); -x_2 = x_13; -x_3 = x_9; -goto _start; -} -} -} -obj* l___private_init_lean_compiler_ir_freevars_21__collectArray___at___private_init_lean_compiler_ir_freevars_22__collectArgs___spec__1(obj* x_0, obj* x_1) { -_start: -{ -obj* x_2; obj* x_3; -x_2 = lean::mk_nat_obj(0ul); -x_3 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_22__collectArgs___spec__2(x_0, x_0, x_2, x_1); -return x_3; -} -} -obj* l___private_init_lean_compiler_ir_freevars_22__collectArgs(obj* x_0, obj* x_1) { -_start: -{ -obj* x_2; obj* x_3; -x_2 = lean::mk_nat_obj(0ul); -x_3 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_22__collectArgs___spec__2(x_0, x_0, x_2, x_1); -return x_3; -} -} -obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_22__collectArgs___spec__2___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { -_start: -{ -obj* x_4; -x_4 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_22__collectArgs___spec__2(x_0, x_1, x_2, x_3); -lean::dec(x_0); -lean::dec(x_1); -return x_4; -} -} -obj* l___private_init_lean_compiler_ir_freevars_21__collectArray___at___private_init_lean_compiler_ir_freevars_22__collectArgs___spec__1___boxed(obj* x_0, obj* x_1) { -_start: -{ -obj* x_2; -x_2 = l___private_init_lean_compiler_ir_freevars_21__collectArray___at___private_init_lean_compiler_ir_freevars_22__collectArgs___spec__1(x_0, x_1); -lean::dec(x_0); -return x_2; -} -} -obj* l___private_init_lean_compiler_ir_freevars_22__collectArgs___boxed(obj* x_0, obj* x_1) { -_start: -{ -obj* x_2; -x_2 = l___private_init_lean_compiler_ir_freevars_22__collectArgs(x_0, x_1); -lean::dec(x_0); -return x_2; -} -} -obj* l___private_init_lean_compiler_ir_freevars_23__collectParam(obj* x_0, obj* x_1) { -_start: -{ -obj* x_2; uint8 x_3; -x_2 = lean::cnstr_get(x_0, 0); -x_3 = lean::nat_dec_lt(x_1, x_2); -if (x_3 == 0) -{ -lean::inc(x_1); -return x_1; -} -else -{ -lean::inc(x_2); -return x_2; -} -} -} -obj* l___private_init_lean_compiler_ir_freevars_23__collectParam___boxed(obj* x_0, obj* x_1) { -_start: -{ -obj* x_2; -x_2 = l___private_init_lean_compiler_ir_freevars_23__collectParam(x_0, x_1); -lean::dec(x_0); -lean::dec(x_1); -return x_2; -} -} -obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_24__collectParams___spec__2(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { -_start: -{ -obj* x_4; uint8 x_5; -x_4 = lean::array_get_size(x_1); -x_5 = lean::nat_dec_lt(x_2, x_4); -lean::dec(x_4); -if (x_5 == 0) -{ -lean::dec(x_2); -return x_3; -} -else -{ -obj* x_8; obj* x_9; obj* x_12; obj* x_13; -x_8 = lean::array_fget(x_1, x_2); -x_9 = l___private_init_lean_compiler_ir_freevars_23__collectParam(x_8, x_3); -lean::dec(x_3); -lean::dec(x_8); -x_12 = lean::mk_nat_obj(1ul); -x_13 = lean::nat_add(x_2, x_12); -lean::dec(x_2); -x_2 = x_13; -x_3 = x_9; -goto _start; -} -} -} -obj* l___private_init_lean_compiler_ir_freevars_21__collectArray___at___private_init_lean_compiler_ir_freevars_24__collectParams___spec__1(obj* x_0, obj* x_1) { -_start: -{ -obj* x_2; obj* x_3; -x_2 = lean::mk_nat_obj(0ul); -x_3 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_24__collectParams___spec__2(x_0, x_0, x_2, x_1); -return x_3; -} -} -obj* l___private_init_lean_compiler_ir_freevars_24__collectParams(obj* x_0, obj* x_1) { -_start: -{ -obj* x_2; obj* x_3; -x_2 = lean::mk_nat_obj(0ul); -x_3 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_24__collectParams___spec__2(x_0, x_0, x_2, x_1); -return x_3; -} -} -obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_24__collectParams___spec__2___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { -_start: -{ -obj* x_4; -x_4 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_24__collectParams___spec__2(x_0, x_1, x_2, x_3); -lean::dec(x_0); -lean::dec(x_1); -return x_4; -} -} -obj* l___private_init_lean_compiler_ir_freevars_21__collectArray___at___private_init_lean_compiler_ir_freevars_24__collectParams___spec__1___boxed(obj* x_0, obj* x_1) { -_start: -{ -obj* x_2; -x_2 = l___private_init_lean_compiler_ir_freevars_21__collectArray___at___private_init_lean_compiler_ir_freevars_24__collectParams___spec__1(x_0, x_1); -lean::dec(x_0); -return x_2; -} -} -obj* l___private_init_lean_compiler_ir_freevars_24__collectParams___boxed(obj* x_0, obj* x_1) { -_start: -{ -obj* x_2; -x_2 = l___private_init_lean_compiler_ir_freevars_24__collectParams(x_0, x_1); -lean::dec(x_0); -return x_2; -} -} -obj* l___private_init_lean_compiler_ir_freevars_25__collectExpr___main(obj* x_0, obj* x_1) { -_start: -{ -switch (lean::obj_tag(x_0)) { -case 0: -{ -obj* x_2; obj* x_5; obj* x_6; -x_2 = lean::cnstr_get(x_0, 1); -lean::inc(x_2); -lean::dec(x_0); -x_5 = lean::mk_nat_obj(0ul); -x_6 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_22__collectArgs___spec__2(x_2, x_2, x_5, x_1); -lean::dec(x_2); -return x_6; -} -case 2: -{ -obj* x_8; obj* x_10; uint8 x_13; -x_8 = lean::cnstr_get(x_0, 0); -lean::inc(x_8); -x_10 = lean::cnstr_get(x_0, 2); -lean::inc(x_10); -lean::dec(x_0); -x_13 = lean::nat_dec_lt(x_1, x_8); -if (x_13 == 0) -{ -obj* x_15; obj* x_16; -lean::dec(x_8); -x_15 = lean::mk_nat_obj(0ul); -x_16 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_22__collectArgs___spec__2(x_10, x_10, x_15, x_1); -lean::dec(x_10); -return x_16; -} -else -{ -obj* x_19; obj* x_20; -lean::dec(x_1); -x_19 = lean::mk_nat_obj(0ul); -x_20 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_22__collectArgs___spec__2(x_10, x_10, x_19, x_8); -lean::dec(x_10); -return x_20; -} -} -case 3: -{ -obj* x_22; uint8 x_25; -x_22 = lean::cnstr_get(x_0, 1); -lean::inc(x_22); -lean::dec(x_0); -x_25 = lean::nat_dec_lt(x_1, x_22); -if (x_25 == 0) -{ -lean::dec(x_22); -return x_1; -} -else -{ -lean::dec(x_1); -return x_22; -} -} -case 4: -{ -obj* x_28; uint8 x_31; -x_28 = lean::cnstr_get(x_0, 1); -lean::inc(x_28); -lean::dec(x_0); -x_31 = lean::nat_dec_lt(x_1, x_28); -if (x_31 == 0) -{ -lean::dec(x_28); -return x_1; -} -else -{ -lean::dec(x_1); -return x_28; -} -} -case 5: -{ -obj* x_34; uint8 x_37; -x_34 = lean::cnstr_get(x_0, 2); -lean::inc(x_34); -lean::dec(x_0); -x_37 = lean::nat_dec_lt(x_1, x_34); -if (x_37 == 0) -{ -lean::dec(x_34); -return x_1; -} -else -{ -lean::dec(x_1); -return x_34; -} -} -case 6: -{ -obj* x_40; obj* x_43; obj* x_44; -x_40 = lean::cnstr_get(x_0, 1); -lean::inc(x_40); -lean::dec(x_0); -x_43 = lean::mk_nat_obj(0ul); -x_44 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_22__collectArgs___spec__2(x_40, x_40, x_43, x_1); -lean::dec(x_40); -return x_44; -} -case 7: -{ -obj* x_46; obj* x_49; obj* x_50; -x_46 = lean::cnstr_get(x_0, 1); -lean::inc(x_46); -lean::dec(x_0); -x_49 = lean::mk_nat_obj(0ul); -x_50 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_22__collectArgs___spec__2(x_46, x_46, x_49, x_1); -lean::dec(x_46); -return x_50; -} -case 8: -{ -obj* x_52; obj* x_54; uint8 x_57; -x_52 = lean::cnstr_get(x_0, 0); -lean::inc(x_52); -x_54 = lean::cnstr_get(x_0, 1); -lean::inc(x_54); -lean::dec(x_0); -x_57 = lean::nat_dec_lt(x_1, x_52); -if (x_57 == 0) -{ -obj* x_59; obj* x_60; -lean::dec(x_52); -x_59 = lean::mk_nat_obj(0ul); -x_60 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_22__collectArgs___spec__2(x_54, x_54, x_59, x_1); -lean::dec(x_54); -return x_60; -} -else -{ -obj* x_63; obj* x_64; -lean::dec(x_1); -x_63 = lean::mk_nat_obj(0ul); -x_64 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_22__collectArgs___spec__2(x_54, x_54, x_63, x_52); -lean::dec(x_54); -return x_64; -} -} -case 11: -{ -lean::dec(x_0); -return x_1; -} -default: -{ -obj* x_67; uint8 x_70; -x_67 = lean::cnstr_get(x_0, 0); -lean::inc(x_67); -lean::dec(x_0); -x_70 = lean::nat_dec_lt(x_1, x_67); -if (x_70 == 0) -{ -lean::dec(x_67); -return x_1; -} -else -{ -lean::dec(x_1); -return x_67; -} -} -} -} -} -obj* l___private_init_lean_compiler_ir_freevars_25__collectExpr(obj* x_0, obj* x_1) { -_start: -{ -obj* x_2; -x_2 = l___private_init_lean_compiler_ir_freevars_25__collectExpr___main(x_0, x_1); -return x_2; -} -} -obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_26__collectAlts___spec__2(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { -_start: -{ -obj* x_5; uint8 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); -lean::dec(x_0); -return x_4; -} -else -{ -obj* x_10; obj* x_11; obj* x_14; obj* x_15; obj* x_16; -x_10 = lean::array_fget(x_2, x_3); -x_11 = l_Lean_IR_AltCore_body___main(x_10); -lean::dec(x_10); -lean::inc(x_0); -x_14 = lean::apply_2(x_0, x_11, x_4); -x_15 = lean::mk_nat_obj(1ul); -x_16 = lean::nat_add(x_3, x_15); -lean::dec(x_3); -x_3 = x_16; -x_4 = x_14; -goto _start; -} -} -} -obj* l___private_init_lean_compiler_ir_freevars_21__collectArray___at___private_init_lean_compiler_ir_freevars_26__collectAlts___spec__1(obj* x_0, obj* x_1, obj* x_2) { -_start: -{ -obj* x_3; obj* x_4; -x_3 = lean::mk_nat_obj(0ul); -x_4 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_26__collectAlts___spec__2(x_0, x_1, x_1, x_3, x_2); -return x_4; -} -} -obj* l___private_init_lean_compiler_ir_freevars_26__collectAlts(obj* x_0, obj* x_1, obj* x_2) { -_start: -{ -obj* x_3; obj* x_4; -x_3 = lean::mk_nat_obj(0ul); -x_4 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_26__collectAlts___spec__2(x_0, x_1, x_1, x_3, x_2); -return x_4; -} -} -obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_26__collectAlts___spec__2___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { -_start: -{ -obj* x_5; -x_5 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_26__collectAlts___spec__2(x_0, x_1, x_2, x_3, x_4); -lean::dec(x_1); -lean::dec(x_2); -return x_5; -} -} -obj* l___private_init_lean_compiler_ir_freevars_21__collectArray___at___private_init_lean_compiler_ir_freevars_26__collectAlts___spec__1___boxed(obj* x_0, obj* x_1, obj* x_2) { -_start: -{ -obj* x_3; -x_3 = l___private_init_lean_compiler_ir_freevars_21__collectArray___at___private_init_lean_compiler_ir_freevars_26__collectAlts___spec__1(x_0, x_1, x_2); -lean::dec(x_1); -return x_3; -} -} -obj* l___private_init_lean_compiler_ir_freevars_26__collectAlts___boxed(obj* x_0, obj* x_1, obj* x_2) { -_start: -{ -obj* x_3; -x_3 = l___private_init_lean_compiler_ir_freevars_26__collectAlts(x_0, x_1, x_2); -lean::dec(x_1); -return x_3; -} -} -obj* _init_l_Lean_IR_MaxVar_collectFnBody___main___closed__1() { -_start: -{ -obj* x_0; -x_0 = lean::alloc_closure(reinterpret_cast(l_Lean_IR_MaxVar_collectFnBody___main), 2, 0); -return x_0; -} -} -obj* l_Lean_IR_MaxVar_collectFnBody___main(obj* x_0, obj* x_1) { -_start: -{ -switch (lean::obj_tag(x_0)) { -case 0: -{ -obj* x_2; obj* x_4; obj* x_7; -x_2 = lean::cnstr_get(x_0, 1); -lean::inc(x_2); -x_4 = lean::cnstr_get(x_0, 2); -lean::inc(x_4); -lean::dec(x_0); -x_7 = l___private_init_lean_compiler_ir_freevars_25__collectExpr___main(x_2, x_1); -x_0 = x_4; -x_1 = x_7; -goto _start; -} -case 1: -{ -obj* x_9; obj* x_11; obj* x_13; obj* x_16; obj* x_17; obj* x_18; -x_9 = lean::cnstr_get(x_0, 1); -lean::inc(x_9); -x_11 = lean::cnstr_get(x_0, 2); -lean::inc(x_11); -x_13 = lean::cnstr_get(x_0, 3); -lean::inc(x_13); -lean::dec(x_0); -x_16 = l_Lean_IR_MaxVar_collectFnBody___main(x_11, x_1); -x_17 = lean::mk_nat_obj(0ul); -x_18 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_24__collectParams___spec__2(x_9, x_9, x_17, x_16); -lean::dec(x_9); -x_0 = x_13; -x_1 = x_18; -goto _start; -} -case 2: -{ -obj* x_21; obj* x_23; obj* x_25; uint8 x_28; -x_21 = lean::cnstr_get(x_0, 0); -lean::inc(x_21); -x_23 = lean::cnstr_get(x_0, 2); -lean::inc(x_23); -x_25 = lean::cnstr_get(x_0, 3); -lean::inc(x_25); -lean::dec(x_0); -x_28 = lean::nat_dec_lt(x_1, x_21); -if (x_28 == 0) -{ -uint8 x_30; -lean::dec(x_21); -x_30 = lean::nat_dec_lt(x_1, x_23); -if (x_30 == 0) -{ -lean::dec(x_23); -x_0 = x_25; -goto _start; -} -else -{ -lean::dec(x_1); -x_0 = x_25; -x_1 = x_23; -goto _start; -} -} -else -{ -uint8 x_36; -lean::dec(x_1); -x_36 = lean::nat_dec_lt(x_21, x_23); -if (x_36 == 0) -{ -lean::dec(x_23); -x_0 = x_25; -x_1 = x_21; -goto _start; -} -else -{ -lean::dec(x_21); -x_0 = x_25; -x_1 = x_23; -goto _start; -} -} -} -case 3: -{ -obj* x_41; obj* x_43; obj* x_45; uint8 x_48; -x_41 = lean::cnstr_get(x_0, 0); -lean::inc(x_41); -x_43 = lean::cnstr_get(x_0, 2); -lean::inc(x_43); -x_45 = lean::cnstr_get(x_0, 3); -lean::inc(x_45); -lean::dec(x_0); -x_48 = lean::nat_dec_lt(x_1, x_41); -if (x_48 == 0) -{ -uint8 x_50; -lean::dec(x_41); -x_50 = lean::nat_dec_lt(x_1, x_43); -if (x_50 == 0) -{ -lean::dec(x_43); -x_0 = x_45; -goto _start; -} -else -{ -lean::dec(x_1); -x_0 = x_45; -x_1 = x_43; -goto _start; -} -} -else -{ -uint8 x_56; -lean::dec(x_1); -x_56 = lean::nat_dec_lt(x_41, x_43); -if (x_56 == 0) -{ -lean::dec(x_43); -x_0 = x_45; -x_1 = x_41; -goto _start; -} -else -{ -lean::dec(x_41); -x_0 = x_45; -x_1 = x_43; -goto _start; -} -} -} -case 4: -{ -obj* x_61; obj* x_63; obj* x_65; uint8 x_68; -x_61 = lean::cnstr_get(x_0, 0); -lean::inc(x_61); -x_63 = lean::cnstr_get(x_0, 3); -lean::inc(x_63); -x_65 = lean::cnstr_get(x_0, 4); -lean::inc(x_65); -lean::dec(x_0); -x_68 = lean::nat_dec_lt(x_1, x_61); -if (x_68 == 0) -{ -uint8 x_70; -lean::dec(x_61); -x_70 = lean::nat_dec_lt(x_1, x_63); -if (x_70 == 0) -{ -lean::dec(x_63); -x_0 = x_65; -goto _start; -} -else -{ -lean::dec(x_1); -x_0 = x_65; -x_1 = x_63; -goto _start; -} -} -else -{ -uint8 x_76; -lean::dec(x_1); -x_76 = lean::nat_dec_lt(x_61, x_63); -if (x_76 == 0) -{ -lean::dec(x_63); -x_0 = x_65; -x_1 = x_61; -goto _start; -} -else -{ -lean::dec(x_61); -x_0 = x_65; -x_1 = x_63; -goto _start; -} -} -} -case 8: -{ -obj* x_81; -x_81 = lean::cnstr_get(x_0, 1); -lean::inc(x_81); -lean::dec(x_0); -x_0 = x_81; -goto _start; -} -case 9: -{ -obj* x_85; obj* x_87; uint8 x_90; -x_85 = lean::cnstr_get(x_0, 1); -lean::inc(x_85); -x_87 = lean::cnstr_get(x_0, 2); -lean::inc(x_87); -lean::dec(x_0); -x_90 = lean::nat_dec_lt(x_1, x_85); -if (x_90 == 0) -{ -obj* x_92; obj* x_93; obj* x_94; -lean::dec(x_85); -x_92 = l_Lean_IR_MaxVar_collectFnBody___main___closed__1; -x_93 = lean::mk_nat_obj(0ul); -x_94 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_26__collectAlts___spec__2(x_92, x_87, x_87, x_93, x_1); -lean::dec(x_87); -return x_94; -} -else -{ -obj* x_97; obj* x_98; obj* x_99; -lean::dec(x_1); -x_97 = l_Lean_IR_MaxVar_collectFnBody___main___closed__1; -x_98 = lean::mk_nat_obj(0ul); -x_99 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_26__collectAlts___spec__2(x_97, x_87, x_87, x_98, x_85); -lean::dec(x_87); -return x_99; -} -} -case 10: -{ -obj* x_101; obj* x_104; -x_101 = lean::cnstr_get(x_0, 0); -lean::inc(x_101); -lean::dec(x_0); -x_104 = l___private_init_lean_compiler_ir_freevars_20__collectArg___main(x_101, x_1); -lean::dec(x_1); -lean::dec(x_101); -return x_104; -} -case 11: -{ -obj* x_107; obj* x_109; uint8 x_112; -x_107 = lean::cnstr_get(x_0, 0); -lean::inc(x_107); -x_109 = lean::cnstr_get(x_0, 1); -lean::inc(x_109); -lean::dec(x_0); -x_112 = lean::nat_dec_lt(x_1, x_107); -if (x_112 == 0) -{ -obj* x_114; obj* x_115; -lean::dec(x_107); -x_114 = lean::mk_nat_obj(0ul); -x_115 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_22__collectArgs___spec__2(x_109, x_109, x_114, x_1); -lean::dec(x_109); -return x_115; -} -else -{ -obj* x_118; obj* x_119; -lean::dec(x_1); -x_118 = lean::mk_nat_obj(0ul); -x_119 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_22__collectArgs___spec__2(x_109, x_109, x_118, x_107); -lean::dec(x_109); -return x_119; -} -} -case 12: -{ -return x_1; -} -default: -{ -obj* x_121; obj* x_123; uint8 x_126; -x_121 = lean::cnstr_get(x_0, 0); -lean::inc(x_121); -x_123 = lean::cnstr_get(x_0, 2); -lean::inc(x_123); -lean::dec(x_0); -x_126 = lean::nat_dec_lt(x_1, x_121); -if (x_126 == 0) -{ -lean::dec(x_121); -x_0 = x_123; -goto _start; -} -else -{ -lean::dec(x_1); -x_0 = x_123; -x_1 = x_121; -goto _start; -} -} -} -} -} -obj* l_Lean_IR_MaxVar_collectFnBody(obj* x_0, obj* x_1) { -_start: -{ -obj* x_2; -x_2 = l_Lean_IR_MaxVar_collectFnBody___main(x_0, x_1); -return x_2; -} -} -obj* l_Lean_IR_MaxVar_collectDecl___main(obj* x_0, obj* x_1) { -_start: -{ -if (lean::obj_tag(x_0) == 0) -{ -obj* x_2; obj* x_4; obj* x_7; obj* x_8; obj* x_10; -x_2 = lean::cnstr_get(x_0, 1); -lean::inc(x_2); -x_4 = lean::cnstr_get(x_0, 2); -lean::inc(x_4); -lean::dec(x_0); -x_7 = lean::mk_nat_obj(0ul); -x_8 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_24__collectParams___spec__2(x_2, x_2, x_7, x_1); -lean::dec(x_2); -x_10 = l_Lean_IR_MaxVar_collectFnBody___main(x_4, x_8); -return x_10; -} -else -{ -obj* x_11; obj* x_14; obj* x_15; -x_11 = lean::cnstr_get(x_0, 1); -lean::inc(x_11); -lean::dec(x_0); -x_14 = lean::mk_nat_obj(0ul); -x_15 = l_Array_miterateAux___main___at___private_init_lean_compiler_ir_freevars_24__collectParams___spec__2(x_11, x_11, x_14, x_1); -lean::dec(x_11); -return x_15; -} -} -} -obj* l_Lean_IR_MaxVar_collectDecl(obj* x_0, obj* x_1) { -_start: -{ -obj* x_2; -x_2 = l_Lean_IR_MaxVar_collectDecl___main(x_0, x_1); -return x_2; -} -} -obj* l_Lean_IR_FnBody_maxVar(obj* x_0) { -_start: -{ -obj* x_1; obj* x_2; -x_1 = lean::mk_nat_obj(0ul); -x_2 = l_Lean_IR_MaxVar_collectFnBody___main(x_0, x_1); -return x_2; -} -} -obj* l_Lean_IR_Decl_maxVar(obj* x_0) { -_start: -{ -obj* x_1; obj* x_2; -x_1 = lean::mk_nat_obj(0ul); -x_2 = l_Lean_IR_MaxVar_collectDecl___main(x_0, x_1); +x_2 = l_Lean_IR_FnBody_collectFreeIndices(x_0, x_1); return x_2; } } @@ -3606,7 +3624,7 @@ lean::dec(x_1); return x_3; } } -uint8 l_Array_anyAux___main___at_Lean_IR_HasIndex_visitArgs___spec__1(obj* x_0, obj* x_1, obj* x_2) { +uint8 l_Array_anyMAux___main___at_Lean_IR_HasIndex_visitArgs___spec__1(obj* x_0, obj* x_1, obj* x_2) { _start: { obj* x_3; uint8 x_4; @@ -3637,10 +3655,8 @@ goto _start; } else { -uint8 x_16; lean::dec(x_2); -x_16 = 1; -return x_16; +return x_9; } } } @@ -3650,15 +3666,15 @@ _start: { obj* x_2; uint8 x_3; x_2 = lean::mk_nat_obj(0ul); -x_3 = l_Array_anyAux___main___at_Lean_IR_HasIndex_visitArgs___spec__1(x_0, x_1, x_2); +x_3 = l_Array_anyMAux___main___at_Lean_IR_HasIndex_visitArgs___spec__1(x_0, x_1, x_2); return x_3; } } -obj* l_Array_anyAux___main___at_Lean_IR_HasIndex_visitArgs___spec__1___boxed(obj* x_0, obj* x_1, obj* x_2) { +obj* l_Array_anyMAux___main___at_Lean_IR_HasIndex_visitArgs___spec__1___boxed(obj* x_0, obj* x_1, obj* x_2) { _start: { uint8 x_3; obj* x_4; -x_3 = l_Array_anyAux___main___at_Lean_IR_HasIndex_visitArgs___spec__1(x_0, x_1, x_2); +x_3 = l_Array_anyMAux___main___at_Lean_IR_HasIndex_visitArgs___spec__1(x_0, x_1, x_2); x_4 = lean::box(x_3); lean::dec(x_0); lean::dec(x_1); @@ -3676,7 +3692,7 @@ lean::dec(x_1); return x_3; } } -uint8 l_Array_anyAux___main___at_Lean_IR_HasIndex_visitParams___spec__1(obj* x_0, obj* x_1, obj* x_2) { +uint8 l_Array_anyMAux___main___at_Lean_IR_HasIndex_visitParams___spec__1(obj* x_0, obj* x_1, obj* x_2) { _start: { obj* x_3; uint8 x_4; @@ -3710,10 +3726,8 @@ goto _start; } else { -uint8 x_19; lean::dec(x_2); -x_19 = 1; -return x_19; +return x_12; } } } @@ -3723,15 +3737,15 @@ _start: { obj* x_2; uint8 x_3; x_2 = lean::mk_nat_obj(0ul); -x_3 = l_Array_anyAux___main___at_Lean_IR_HasIndex_visitParams___spec__1(x_0, x_1, x_2); +x_3 = l_Array_anyMAux___main___at_Lean_IR_HasIndex_visitParams___spec__1(x_0, x_1, x_2); return x_3; } } -obj* l_Array_anyAux___main___at_Lean_IR_HasIndex_visitParams___spec__1___boxed(obj* x_0, obj* x_1, obj* x_2) { +obj* l_Array_anyMAux___main___at_Lean_IR_HasIndex_visitParams___spec__1___boxed(obj* x_0, obj* x_1, obj* x_2) { _start: { uint8 x_3; obj* x_4; -x_3 = l_Array_anyAux___main___at_Lean_IR_HasIndex_visitParams___spec__1(x_0, x_1, x_2); +x_3 = l_Array_anyMAux___main___at_Lean_IR_HasIndex_visitParams___spec__1(x_0, x_1, x_2); x_4 = lean::box(x_3); lean::dec(x_0); lean::dec(x_1); @@ -3758,7 +3772,7 @@ case 0: obj* x_2; obj* x_3; uint8 x_4; x_2 = lean::cnstr_get(x_1, 1); x_3 = lean::mk_nat_obj(0ul); -x_4 = l_Array_anyAux___main___at_Lean_IR_HasIndex_visitArgs___spec__1(x_0, x_2, x_3); +x_4 = l_Array_anyMAux___main___at_Lean_IR_HasIndex_visitArgs___spec__1(x_0, x_2, x_3); return x_4; } case 2: @@ -3771,7 +3785,7 @@ if (x_7 == 0) { obj* x_8; uint8 x_9; x_8 = lean::mk_nat_obj(0ul); -x_9 = l_Array_anyAux___main___at_Lean_IR_HasIndex_visitArgs___spec__1(x_0, x_6, x_8); +x_9 = l_Array_anyMAux___main___at_Lean_IR_HasIndex_visitArgs___spec__1(x_0, x_6, x_8); return x_9; } else @@ -3807,7 +3821,7 @@ case 6: obj* x_17; obj* x_18; uint8 x_19; x_17 = lean::cnstr_get(x_1, 1); x_18 = lean::mk_nat_obj(0ul); -x_19 = l_Array_anyAux___main___at_Lean_IR_HasIndex_visitArgs___spec__1(x_0, x_17, x_18); +x_19 = l_Array_anyMAux___main___at_Lean_IR_HasIndex_visitArgs___spec__1(x_0, x_17, x_18); return x_19; } case 7: @@ -3815,7 +3829,7 @@ case 7: obj* x_20; obj* x_21; uint8 x_22; x_20 = lean::cnstr_get(x_1, 1); x_21 = lean::mk_nat_obj(0ul); -x_22 = l_Array_anyAux___main___at_Lean_IR_HasIndex_visitArgs___spec__1(x_0, x_20, x_21); +x_22 = l_Array_anyMAux___main___at_Lean_IR_HasIndex_visitArgs___spec__1(x_0, x_20, x_21); return x_22; } case 8: @@ -3828,7 +3842,7 @@ if (x_25 == 0) { obj* x_26; uint8 x_27; x_26 = lean::mk_nat_obj(0ul); -x_27 = l_Array_anyAux___main___at_Lean_IR_HasIndex_visitArgs___spec__1(x_0, x_24, x_26); +x_27 = l_Array_anyMAux___main___at_Lean_IR_HasIndex_visitArgs___spec__1(x_0, x_24, x_26); return x_27; } else @@ -3884,7 +3898,7 @@ lean::dec(x_1); return x_3; } } -uint8 l_Array_anyAux___main___at_Lean_IR_HasIndex_visitFnBody___main___spec__1(obj* x_0, obj* x_1, obj* x_2) { +uint8 l_Array_anyMAux___main___at_Lean_IR_HasIndex_visitFnBody___main___spec__1(obj* x_0, obj* x_1, obj* x_2) { _start: { obj* x_3; uint8 x_4; @@ -3917,10 +3931,8 @@ goto _start; } else { -uint8 x_18; lean::dec(x_2); -x_18 = 1; -return x_18; +return x_11; } } } @@ -3931,59 +3943,56 @@ _start: switch (lean::obj_tag(x_1)) { case 0: { -obj* x_2; obj* x_3; obj* x_4; uint8 x_5; -x_2 = lean::cnstr_get(x_1, 0); -x_3 = lean::cnstr_get(x_1, 1); -x_4 = lean::cnstr_get(x_1, 2); -x_5 = l_Lean_IR_HasIndex_visitExpr___main(x_0, x_3); -if (x_5 == 0) +obj* x_2; obj* x_3; uint8 x_4; +x_2 = lean::cnstr_get(x_1, 1); +x_3 = lean::cnstr_get(x_1, 2); +x_4 = l_Lean_IR_HasIndex_visitExpr___main(x_0, x_2); +if (x_4 == 0) { -uint8 x_6; -x_6 = lean::nat_dec_eq(x_0, x_2); -if (x_6 == 0) -{ -x_1 = x_4; +x_1 = x_3; goto _start; } else { -return x_5; -} -} -else -{ -uint8 x_8; -x_8 = 1; -return x_8; +uint8 x_6; +x_6 = 1; +return x_6; } } case 1: { -obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; uint8 x_14; -x_9 = lean::cnstr_get(x_1, 0); -x_10 = lean::cnstr_get(x_1, 1); -x_11 = lean::cnstr_get(x_1, 2); -x_12 = lean::cnstr_get(x_1, 3); -x_13 = lean::mk_nat_obj(0ul); -x_14 = l_Array_anyAux___main___at_Lean_IR_HasIndex_visitParams___spec__1(x_0, x_10, x_13); -if (x_14 == 0) +obj* x_7; obj* x_8; uint8 x_9; +x_7 = lean::cnstr_get(x_1, 2); +x_8 = lean::cnstr_get(x_1, 3); +x_9 = l_Lean_IR_HasIndex_visitFnBody___main(x_0, x_7); +if (x_9 == 0) { -uint8 x_15; -x_15 = l_Lean_IR_HasIndex_visitFnBody___main(x_0, x_11); -if (x_15 == 0) -{ -uint8 x_16; -x_16 = lean::nat_dec_eq(x_0, x_9); -if (x_16 == 0) -{ -x_1 = x_12; +x_1 = x_8; goto _start; } else { -return x_15; +uint8 x_11; +x_11 = 1; +return x_11; } } +case 2: +{ +obj* x_12; obj* x_13; obj* x_14; uint8 x_15; +x_12 = lean::cnstr_get(x_1, 0); +x_13 = lean::cnstr_get(x_1, 2); +x_14 = lean::cnstr_get(x_1, 3); +x_15 = lean::nat_dec_eq(x_0, x_12); +if (x_15 == 0) +{ +uint8 x_16; +x_16 = lean::nat_dec_eq(x_0, x_13); +if (x_16 == 0) +{ +x_1 = x_14; +goto _start; +} else { uint8 x_18; @@ -3994,196 +4003,156 @@ return x_18; else { uint8 x_19; -x_19 = lean::nat_dec_eq(x_0, x_9); -if (x_19 == 0) -{ -x_1 = x_12; -goto _start; -} -else -{ -uint8 x_21; -x_21 = 0; -return x_21; -} -} -} -case 2: -{ -obj* x_22; obj* x_23; obj* x_24; uint8 x_25; -x_22 = lean::cnstr_get(x_1, 0); -x_23 = lean::cnstr_get(x_1, 2); -x_24 = lean::cnstr_get(x_1, 3); -x_25 = lean::nat_dec_eq(x_0, x_22); -if (x_25 == 0) -{ -uint8 x_26; -x_26 = lean::nat_dec_eq(x_0, x_23); -if (x_26 == 0) -{ -x_1 = x_24; -goto _start; -} -else -{ -uint8 x_28; -x_28 = 1; -return x_28; -} -} -else -{ -uint8 x_29; -x_29 = 1; -return x_29; +x_19 = 1; +return x_19; } } case 3: { -obj* x_30; obj* x_31; obj* x_32; uint8 x_33; -x_30 = lean::cnstr_get(x_1, 0); -x_31 = lean::cnstr_get(x_1, 2); -x_32 = lean::cnstr_get(x_1, 3); -x_33 = lean::nat_dec_eq(x_0, x_30); -if (x_33 == 0) +obj* x_20; obj* x_21; obj* x_22; uint8 x_23; +x_20 = lean::cnstr_get(x_1, 0); +x_21 = lean::cnstr_get(x_1, 2); +x_22 = lean::cnstr_get(x_1, 3); +x_23 = lean::nat_dec_eq(x_0, x_20); +if (x_23 == 0) { -uint8 x_34; -x_34 = lean::nat_dec_eq(x_0, x_31); -if (x_34 == 0) +uint8 x_24; +x_24 = lean::nat_dec_eq(x_0, x_21); +if (x_24 == 0) { -x_1 = x_32; +x_1 = x_22; goto _start; } else { -uint8 x_36; -x_36 = 1; -return x_36; +uint8 x_26; +x_26 = 1; +return x_26; } } else { -uint8 x_37; -x_37 = 1; -return x_37; +uint8 x_27; +x_27 = 1; +return x_27; } } case 4: { -obj* x_38; obj* x_39; obj* x_40; uint8 x_41; -x_38 = lean::cnstr_get(x_1, 0); -x_39 = lean::cnstr_get(x_1, 3); -x_40 = lean::cnstr_get(x_1, 4); -x_41 = lean::nat_dec_eq(x_0, x_38); -if (x_41 == 0) +obj* x_28; obj* x_29; obj* x_30; uint8 x_31; +x_28 = lean::cnstr_get(x_1, 0); +x_29 = lean::cnstr_get(x_1, 3); +x_30 = lean::cnstr_get(x_1, 4); +x_31 = lean::nat_dec_eq(x_0, x_28); +if (x_31 == 0) { -uint8 x_42; -x_42 = lean::nat_dec_eq(x_0, x_39); -if (x_42 == 0) +uint8 x_32; +x_32 = lean::nat_dec_eq(x_0, x_29); +if (x_32 == 0) { -x_1 = x_40; +x_1 = x_30; goto _start; } else { -uint8 x_44; -x_44 = 1; -return x_44; +uint8 x_34; +x_34 = 1; +return x_34; } } else { -uint8 x_45; -x_45 = 1; -return x_45; +uint8 x_35; +x_35 = 1; +return x_35; } } case 8: { -obj* x_46; -x_46 = lean::cnstr_get(x_1, 1); -x_1 = x_46; +obj* x_36; +x_36 = lean::cnstr_get(x_1, 1); +x_1 = x_36; goto _start; } case 9: { -obj* x_48; obj* x_49; uint8 x_50; -x_48 = lean::cnstr_get(x_1, 1); -x_49 = lean::cnstr_get(x_1, 2); -x_50 = lean::nat_dec_eq(x_0, x_48); -if (x_50 == 0) +obj* x_38; obj* x_39; uint8 x_40; +x_38 = lean::cnstr_get(x_1, 1); +x_39 = lean::cnstr_get(x_1, 2); +x_40 = lean::nat_dec_eq(x_0, x_38); +if (x_40 == 0) { -obj* x_51; uint8 x_52; -x_51 = lean::mk_nat_obj(0ul); -x_52 = l_Array_anyAux___main___at_Lean_IR_HasIndex_visitFnBody___main___spec__1(x_0, x_49, x_51); -return x_52; +obj* x_41; uint8 x_42; +x_41 = lean::mk_nat_obj(0ul); +x_42 = l_Array_anyMAux___main___at_Lean_IR_HasIndex_visitFnBody___main___spec__1(x_0, x_39, x_41); +return x_42; } else { -uint8 x_53; -x_53 = 1; -return x_53; +uint8 x_43; +x_43 = 1; +return x_43; } } case 10: { -obj* x_54; uint8 x_55; -x_54 = lean::cnstr_get(x_1, 0); -x_55 = l_Lean_IR_HasIndex_visitArg___main(x_0, x_54); -return x_55; +obj* x_44; uint8 x_45; +x_44 = lean::cnstr_get(x_1, 0); +x_45 = l_Lean_IR_HasIndex_visitArg___main(x_0, x_44); +return x_45; } case 11: { -obj* x_56; obj* x_57; uint8 x_58; -x_56 = lean::cnstr_get(x_1, 0); -x_57 = lean::cnstr_get(x_1, 1); -x_58 = lean::nat_dec_eq(x_0, x_56); -if (x_58 == 0) +obj* x_46; obj* x_47; uint8 x_48; +x_46 = lean::cnstr_get(x_1, 0); +x_47 = lean::cnstr_get(x_1, 1); +x_48 = lean::nat_dec_eq(x_0, x_46); +if (x_48 == 0) { -obj* x_59; uint8 x_60; -x_59 = lean::mk_nat_obj(0ul); -x_60 = l_Array_anyAux___main___at_Lean_IR_HasIndex_visitArgs___spec__1(x_0, x_57, x_59); -return x_60; +obj* x_49; uint8 x_50; +x_49 = lean::mk_nat_obj(0ul); +x_50 = l_Array_anyMAux___main___at_Lean_IR_HasIndex_visitArgs___spec__1(x_0, x_47, x_49); +return x_50; } else { -uint8 x_61; -x_61 = 1; -return x_61; +uint8 x_51; +x_51 = 1; +return x_51; } } case 12: { -uint8 x_62; -x_62 = 0; -return x_62; +uint8 x_52; +x_52 = 0; +return x_52; } default: { -obj* x_63; obj* x_64; uint8 x_65; -x_63 = lean::cnstr_get(x_1, 0); -x_64 = lean::cnstr_get(x_1, 2); -x_65 = lean::nat_dec_eq(x_0, x_63); -if (x_65 == 0) +obj* x_53; obj* x_54; uint8 x_55; +x_53 = lean::cnstr_get(x_1, 0); +x_54 = lean::cnstr_get(x_1, 2); +x_55 = lean::nat_dec_eq(x_0, x_53); +if (x_55 == 0) { -x_1 = x_64; +x_1 = x_54; goto _start; } else { -uint8 x_67; -x_67 = 1; -return x_67; +uint8 x_57; +x_57 = 1; +return x_57; } } } } } -obj* l_Array_anyAux___main___at_Lean_IR_HasIndex_visitFnBody___main___spec__1___boxed(obj* x_0, obj* x_1, obj* x_2) { +obj* l_Array_anyMAux___main___at_Lean_IR_HasIndex_visitFnBody___main___spec__1___boxed(obj* x_0, obj* x_1, obj* x_2) { _start: { uint8 x_3; obj* x_4; -x_3 = l_Array_anyAux___main___at_Lean_IR_HasIndex_visitFnBody___main___spec__1(x_0, x_1, x_2); +x_3 = l_Array_anyMAux___main___at_Lean_IR_HasIndex_visitFnBody___main___spec__1(x_0, x_1, x_2); x_4 = lean::box(x_3); lean::dec(x_0); lean::dec(x_1); @@ -4285,15 +4254,13 @@ obj* initialize_init_lean_compiler_ir_freevars(obj* w) { if (io_result_is_error(w)) return w; w = initialize_init_lean_compiler_ir_basic(w); if (io_result_is_error(w)) return w; - l_Lean_IR_vsetInh = _init_l_Lean_IR_vsetInh(); -lean::mark_persistent(l_Lean_IR_vsetInh); - l_Lean_IR_FreeVariables_HasAndthen = _init_l_Lean_IR_FreeVariables_HasAndthen(); -lean::mark_persistent(l_Lean_IR_FreeVariables_HasAndthen); - l_Lean_IR_FreeVariables_collectFnBody___main___closed__1 = _init_l_Lean_IR_FreeVariables_collectFnBody___main___closed__1(); -lean::mark_persistent(l_Lean_IR_FreeVariables_collectFnBody___main___closed__1); - l_Lean_IR_MaxVar_HasAndthen = _init_l_Lean_IR_MaxVar_HasAndthen(); -lean::mark_persistent(l_Lean_IR_MaxVar_HasAndthen); - l_Lean_IR_MaxVar_collectFnBody___main___closed__1 = _init_l_Lean_IR_MaxVar_collectFnBody___main___closed__1(); -lean::mark_persistent(l_Lean_IR_MaxVar_collectFnBody___main___closed__1); + l_Lean_IR_MaxIndex_HasAndthen = _init_l_Lean_IR_MaxIndex_HasAndthen(); +lean::mark_persistent(l_Lean_IR_MaxIndex_HasAndthen); + l_Lean_IR_MaxIndex_collectFnBody___main___closed__1 = _init_l_Lean_IR_MaxIndex_collectFnBody___main___closed__1(); +lean::mark_persistent(l_Lean_IR_MaxIndex_collectFnBody___main___closed__1); + l_Lean_IR_FreeIndices_HasAndthen = _init_l_Lean_IR_FreeIndices_HasAndthen(); +lean::mark_persistent(l_Lean_IR_FreeIndices_HasAndthen); + l_Lean_IR_FreeIndices_collectFnBody___main___closed__1 = _init_l_Lean_IR_FreeIndices_collectFnBody___main___closed__1(); +lean::mark_persistent(l_Lean_IR_FreeIndices_collectFnBody___main___closed__1); return w; } diff --git a/src/stage0/init/lean/compiler/ir/livevars.cpp b/src/stage0/init/lean/compiler/ir/livevars.cpp index c552ecb602..61547561e9 100644 --- a/src/stage0/init/lean/compiler/ir/livevars.cpp +++ b/src/stage0/init/lean/compiler/ir/livevars.cpp @@ -1,6 +1,6 @@ // Lean compiler output // Module: init.lean.compiler.ir.livevars -// Imports: init.default init.lean.compiler.ir.basic +// Imports: init.lean.compiler.ir.basic init.lean.compiler.ir.freevars init.control.reader init.control.conditional #include "runtime/object.h" #include "runtime/apply.h" typedef lean::object obj; typedef lean::usize usize; @@ -14,16 +14,639 @@ typedef lean::uint32 uint32; typedef lean::uint64 uint64; #pragma GCC diagnostic ignored "-Wunused-label" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif -obj* initialize_init_default(obj*); +obj* l_Lean_IR_IsLive_visitArgs___boxed(obj*, obj*, obj*); +uint8 l_Lean_IR_HasIndex_visitExpr___main(obj*, obj*); +uint8 l_Array_anyMAux___main___at_Lean_IR_HasIndex_visitArgs___spec__1(obj*, obj*, obj*); +obj* l_Lean_IR_IsLive_visitFnBody___main(obj*, obj*, obj*); +obj* l_Lean_IR_IsLive_visitArg(obj*, obj*, obj*); +obj* l_Lean_IR_IsLive_visitExpr___boxed(obj*, obj*, obj*); +obj* l_Lean_IR_IsLive_visitVar___boxed(obj*, obj*, obj*); +obj* l_Lean_IR_FnBody_hasLiveVar___boxed(obj*, obj*, obj*); +namespace lean { +uint8 nat_dec_lt(obj*, obj*); +} +namespace lean { +obj* nat_add(obj*, obj*); +} +namespace lean { +uint8 nat_dec_eq(obj*, obj*); +} +obj* l_Lean_IR_IsLive_visitFnBody___main___boxed(obj*, obj*, obj*); +obj* l_Lean_IR_FnBody_hasLiveVar(obj*, obj*, obj*); +obj* l_Lean_IR_IsLive_visitJP___boxed(obj*, obj*, obj*); +obj* l_Lean_IR_Context_eraseJoinPointDecl(obj*, obj*); +obj* l_Array_anyMAux___main___at_Lean_IR_IsLive_visitFnBody___main___spec__1(obj*, obj*, obj*, obj*); +obj* l_Lean_IR_IsLive_visitExpr(obj*, obj*, obj*); +obj* l_Lean_IR_AltCore_body___main(obj*); +obj* l_Lean_IR_IsLive_visitJP(obj*, obj*, obj*); +obj* l_Lean_IR_IsLive_visitArgs(obj*, obj*, obj*); +obj* l_Array_anyMAux___main___at_Lean_IR_IsLive_visitFnBody___main___spec__1___boxed(obj*, obj*, obj*, obj*); +obj* l_Lean_IR_IsLive_visitFnBody(obj*, obj*, obj*); +obj* l_Lean_IR_IsLive_visitFnBody___boxed(obj*, obj*, obj*); +obj* l_Lean_IR_IsLive_visitVar(obj*, obj*, obj*); +uint8 l_Lean_IR_HasIndex_visitArg___main(obj*, obj*); +obj* l_Lean_IR_Context_getJoinPointBody(obj*, obj*); +obj* l_Lean_IR_IsLive_visitArg___boxed(obj*, obj*, obj*); +obj* l_Lean_IR_IsLive_visitVar(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +uint8 x_3; obj* x_4; obj* x_5; +x_3 = lean::nat_dec_eq(x_0, x_1); +x_4 = lean::box(x_3); +x_5 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_5, 0, x_4); +lean::cnstr_set(x_5, 1, x_2); +return x_5; +} +} +obj* l_Lean_IR_IsLive_visitVar___boxed(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +obj* x_3; +x_3 = l_Lean_IR_IsLive_visitVar(x_0, x_1, x_2); +lean::dec(x_0); +lean::dec(x_1); +return x_3; +} +} +obj* l_Lean_IR_IsLive_visitJP(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +uint8 x_3; obj* x_4; obj* x_5; +x_3 = lean::nat_dec_eq(x_0, x_1); +x_4 = lean::box(x_3); +x_5 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_5, 0, x_4); +lean::cnstr_set(x_5, 1, x_2); +return x_5; +} +} +obj* l_Lean_IR_IsLive_visitJP___boxed(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +obj* x_3; +x_3 = l_Lean_IR_IsLive_visitJP(x_0, x_1, x_2); +lean::dec(x_0); +lean::dec(x_1); +return x_3; +} +} +obj* l_Lean_IR_IsLive_visitArg(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +uint8 x_3; obj* x_4; obj* x_5; +x_3 = l_Lean_IR_HasIndex_visitArg___main(x_0, x_1); +x_4 = lean::box(x_3); +x_5 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_5, 0, x_4); +lean::cnstr_set(x_5, 1, x_2); +return x_5; +} +} +obj* l_Lean_IR_IsLive_visitArg___boxed(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +obj* x_3; +x_3 = l_Lean_IR_IsLive_visitArg(x_0, x_1, x_2); +lean::dec(x_0); +lean::dec(x_1); +return x_3; +} +} +obj* l_Lean_IR_IsLive_visitArgs(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +obj* x_3; uint8 x_4; obj* x_5; obj* x_6; +x_3 = lean::mk_nat_obj(0ul); +x_4 = l_Array_anyMAux___main___at_Lean_IR_HasIndex_visitArgs___spec__1(x_0, x_1, x_3); +x_5 = lean::box(x_4); +x_6 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_6, 0, x_5); +lean::cnstr_set(x_6, 1, x_2); +return x_6; +} +} +obj* l_Lean_IR_IsLive_visitArgs___boxed(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +obj* x_3; +x_3 = l_Lean_IR_IsLive_visitArgs(x_0, x_1, x_2); +lean::dec(x_0); +lean::dec(x_1); +return x_3; +} +} +obj* l_Lean_IR_IsLive_visitExpr(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +uint8 x_3; obj* x_4; obj* x_5; +x_3 = l_Lean_IR_HasIndex_visitExpr___main(x_0, x_1); +x_4 = lean::box(x_3); +x_5 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_5, 0, x_4); +lean::cnstr_set(x_5, 1, x_2); +return x_5; +} +} +obj* l_Lean_IR_IsLive_visitExpr___boxed(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +obj* x_3; +x_3 = l_Lean_IR_IsLive_visitExpr(x_0, x_1, x_2); +lean::dec(x_0); +lean::dec(x_1); +return x_3; +} +} +obj* l_Array_anyMAux___main___at_Lean_IR_IsLive_visitFnBody___main___spec__1(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { +_start: +{ +obj* x_4; uint8 x_5; +x_4 = lean::array_get_size(x_1); +x_5 = lean::nat_dec_lt(x_2, x_4); +lean::dec(x_4); +if (x_5 == 0) +{ +uint8 x_8; obj* x_9; obj* x_10; +lean::dec(x_2); +x_8 = 0; +x_9 = lean::box(x_8); +x_10 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_10, 0, x_9); +lean::cnstr_set(x_10, 1, x_3); +return x_10; +} +else +{ +obj* x_11; obj* x_12; obj* x_14; obj* x_15; uint8 x_17; +x_11 = lean::array_fget(x_1, x_2); +x_12 = l_Lean_IR_AltCore_body___main(x_11); +lean::dec(x_11); +x_14 = l_Lean_IR_IsLive_visitFnBody___main(x_0, x_12, x_3); +x_15 = lean::cnstr_get(x_14, 0); +lean::inc(x_15); +x_17 = lean::unbox(x_15); +if (x_17 == 0) +{ +obj* x_18; obj* x_21; obj* x_22; +x_18 = lean::cnstr_get(x_14, 1); +lean::inc(x_18); +lean::dec(x_14); +x_21 = lean::mk_nat_obj(1ul); +x_22 = lean::nat_add(x_2, x_21); +lean::dec(x_2); +x_2 = x_22; +x_3 = x_18; +goto _start; +} +else +{ +obj* x_26; obj* x_28; obj* x_29; +lean::dec(x_2); +x_26 = lean::cnstr_get(x_14, 1); +if (lean::is_exclusive(x_14)) { + lean::cnstr_release(x_14, 0); + x_28 = x_14; +} else { + lean::inc(x_26); + lean::dec(x_14); + x_28 = lean::box(0); +} +if (lean::is_scalar(x_28)) { + x_29 = lean::alloc_cnstr(0, 2, 0); +} else { + x_29 = x_28; +} +lean::cnstr_set(x_29, 0, x_15); +lean::cnstr_set(x_29, 1, x_26); +return x_29; +} +} +} +} +obj* l_Lean_IR_IsLive_visitFnBody___main(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +switch (lean::obj_tag(x_1)) { +case 0: +{ +obj* x_3; obj* x_5; uint8 x_8; +x_3 = lean::cnstr_get(x_1, 1); +lean::inc(x_3); +x_5 = lean::cnstr_get(x_1, 2); +lean::inc(x_5); +lean::dec(x_1); +x_8 = l_Lean_IR_HasIndex_visitExpr___main(x_0, x_3); +lean::dec(x_3); +if (x_8 == 0) +{ +x_1 = x_5; +goto _start; +} +else +{ +obj* x_12; obj* x_13; +lean::dec(x_5); +x_12 = lean::box(x_8); +x_13 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_13, 0, x_12); +lean::cnstr_set(x_13, 1, x_2); +return x_13; +} +} +case 1: +{ +obj* x_14; obj* x_16; obj* x_19; obj* x_20; uint8 x_22; +x_14 = lean::cnstr_get(x_1, 2); +lean::inc(x_14); +x_16 = lean::cnstr_get(x_1, 3); +lean::inc(x_16); +lean::dec(x_1); +x_19 = l_Lean_IR_IsLive_visitFnBody___main(x_0, x_14, x_2); +x_20 = lean::cnstr_get(x_19, 0); +lean::inc(x_20); +x_22 = lean::unbox(x_20); +if (x_22 == 0) +{ +obj* x_23; +x_23 = lean::cnstr_get(x_19, 1); +lean::inc(x_23); +lean::dec(x_19); +x_1 = x_16; +x_2 = x_23; +goto _start; +} +else +{ +obj* x_28; obj* x_30; obj* x_31; +lean::dec(x_16); +x_28 = lean::cnstr_get(x_19, 1); +if (lean::is_exclusive(x_19)) { + lean::cnstr_release(x_19, 0); + x_30 = x_19; +} else { + lean::inc(x_28); + lean::dec(x_19); + x_30 = lean::box(0); +} +if (lean::is_scalar(x_30)) { + x_31 = lean::alloc_cnstr(0, 2, 0); +} else { + x_31 = x_30; +} +lean::cnstr_set(x_31, 0, x_20); +lean::cnstr_set(x_31, 1, x_28); +return x_31; +} +} +case 2: +{ +obj* x_32; obj* x_34; obj* x_36; uint8 x_39; +x_32 = lean::cnstr_get(x_1, 0); +lean::inc(x_32); +x_34 = lean::cnstr_get(x_1, 2); +lean::inc(x_34); +x_36 = lean::cnstr_get(x_1, 3); +lean::inc(x_36); +lean::dec(x_1); +x_39 = lean::nat_dec_eq(x_0, x_32); +lean::dec(x_32); +if (x_39 == 0) +{ +uint8 x_41; +x_41 = lean::nat_dec_eq(x_0, x_34); +lean::dec(x_34); +if (x_41 == 0) +{ +x_1 = x_36; +goto _start; +} +else +{ +obj* x_45; obj* x_46; +lean::dec(x_36); +x_45 = lean::box(x_41); +x_46 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_46, 0, x_45); +lean::cnstr_set(x_46, 1, x_2); +return x_46; +} +} +else +{ +obj* x_49; obj* x_50; +lean::dec(x_34); +lean::dec(x_36); +x_49 = lean::box(x_39); +x_50 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_50, 0, x_49); +lean::cnstr_set(x_50, 1, x_2); +return x_50; +} +} +case 3: +{ +obj* x_51; obj* x_53; obj* x_55; uint8 x_58; +x_51 = lean::cnstr_get(x_1, 0); +lean::inc(x_51); +x_53 = lean::cnstr_get(x_1, 2); +lean::inc(x_53); +x_55 = lean::cnstr_get(x_1, 3); +lean::inc(x_55); +lean::dec(x_1); +x_58 = lean::nat_dec_eq(x_0, x_51); +lean::dec(x_51); +if (x_58 == 0) +{ +uint8 x_60; +x_60 = lean::nat_dec_eq(x_0, x_53); +lean::dec(x_53); +if (x_60 == 0) +{ +x_1 = x_55; +goto _start; +} +else +{ +obj* x_64; obj* x_65; +lean::dec(x_55); +x_64 = lean::box(x_60); +x_65 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_65, 0, x_64); +lean::cnstr_set(x_65, 1, x_2); +return x_65; +} +} +else +{ +obj* x_68; obj* x_69; +lean::dec(x_53); +lean::dec(x_55); +x_68 = lean::box(x_58); +x_69 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_69, 0, x_68); +lean::cnstr_set(x_69, 1, x_2); +return x_69; +} +} +case 4: +{ +obj* x_70; obj* x_72; obj* x_74; uint8 x_77; +x_70 = lean::cnstr_get(x_1, 0); +lean::inc(x_70); +x_72 = lean::cnstr_get(x_1, 3); +lean::inc(x_72); +x_74 = lean::cnstr_get(x_1, 4); +lean::inc(x_74); +lean::dec(x_1); +x_77 = lean::nat_dec_eq(x_0, x_70); +lean::dec(x_70); +if (x_77 == 0) +{ +uint8 x_79; +x_79 = lean::nat_dec_eq(x_0, x_72); +lean::dec(x_72); +if (x_79 == 0) +{ +x_1 = x_74; +goto _start; +} +else +{ +obj* x_83; obj* x_84; +lean::dec(x_74); +x_83 = lean::box(x_79); +x_84 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_84, 0, x_83); +lean::cnstr_set(x_84, 1, x_2); +return x_84; +} +} +else +{ +obj* x_87; obj* x_88; +lean::dec(x_74); +lean::dec(x_72); +x_87 = lean::box(x_77); +x_88 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_88, 0, x_87); +lean::cnstr_set(x_88, 1, x_2); +return x_88; +} +} +case 8: +{ +obj* x_89; +x_89 = lean::cnstr_get(x_1, 1); +lean::inc(x_89); +lean::dec(x_1); +x_1 = x_89; +goto _start; +} +case 9: +{ +obj* x_93; obj* x_95; uint8 x_98; +x_93 = lean::cnstr_get(x_1, 1); +lean::inc(x_93); +x_95 = lean::cnstr_get(x_1, 2); +lean::inc(x_95); +lean::dec(x_1); +x_98 = lean::nat_dec_eq(x_0, x_93); +lean::dec(x_93); +if (x_98 == 0) +{ +obj* x_100; obj* x_101; +x_100 = lean::mk_nat_obj(0ul); +x_101 = l_Array_anyMAux___main___at_Lean_IR_IsLive_visitFnBody___main___spec__1(x_0, x_95, x_100, x_2); +lean::dec(x_95); +return x_101; +} +else +{ +obj* x_104; obj* x_105; +lean::dec(x_95); +x_104 = lean::box(x_98); +x_105 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_105, 0, x_104); +lean::cnstr_set(x_105, 1, x_2); +return x_105; +} +} +case 10: +{ +obj* x_106; uint8 x_109; obj* x_111; obj* x_112; +x_106 = lean::cnstr_get(x_1, 0); +lean::inc(x_106); +lean::dec(x_1); +x_109 = l_Lean_IR_HasIndex_visitArg___main(x_0, x_106); +lean::dec(x_106); +x_111 = lean::box(x_109); +x_112 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_112, 0, x_111); +lean::cnstr_set(x_112, 1, x_2); +return x_112; +} +case 11: +{ +obj* x_113; obj* x_115; obj* x_118; uint8 x_119; +x_113 = lean::cnstr_get(x_1, 0); +lean::inc(x_113); +x_115 = lean::cnstr_get(x_1, 1); +lean::inc(x_115); +lean::dec(x_1); +x_118 = lean::mk_nat_obj(0ul); +x_119 = l_Array_anyMAux___main___at_Lean_IR_HasIndex_visitArgs___spec__1(x_0, x_115, x_118); +lean::dec(x_115); +if (x_119 == 0) +{ +obj* x_122; +lean::inc(x_2); +x_122 = l_Lean_IR_Context_getJoinPointBody(x_2, x_113); +if (lean::obj_tag(x_122) == 0) +{ +obj* x_124; obj* x_125; +lean::dec(x_113); +x_124 = lean::box(x_119); +x_125 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_125, 0, x_124); +lean::cnstr_set(x_125, 1, x_2); +return x_125; +} +else +{ +obj* x_126; obj* x_129; +x_126 = lean::cnstr_get(x_122, 0); +lean::inc(x_126); +lean::dec(x_122); +x_129 = l_Lean_IR_Context_eraseJoinPointDecl(x_2, x_113); +lean::dec(x_113); +x_1 = x_126; +x_2 = x_129; +goto _start; +} +} +else +{ +obj* x_133; obj* x_134; +lean::dec(x_113); +x_133 = lean::box(x_119); +x_134 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_134, 0, x_133); +lean::cnstr_set(x_134, 1, x_2); +return x_134; +} +} +case 12: +{ +uint8 x_135; obj* x_136; obj* x_137; +x_135 = 0; +x_136 = lean::box(x_135); +x_137 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_137, 0, x_136); +lean::cnstr_set(x_137, 1, x_2); +return x_137; +} +default: +{ +obj* x_138; obj* x_140; uint8 x_143; +x_138 = lean::cnstr_get(x_1, 0); +lean::inc(x_138); +x_140 = lean::cnstr_get(x_1, 2); +lean::inc(x_140); +lean::dec(x_1); +x_143 = lean::nat_dec_eq(x_0, x_138); +lean::dec(x_138); +if (x_143 == 0) +{ +x_1 = x_140; +goto _start; +} +else +{ +obj* x_147; obj* x_148; +lean::dec(x_140); +x_147 = lean::box(x_143); +x_148 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_148, 0, x_147); +lean::cnstr_set(x_148, 1, x_2); +return x_148; +} +} +} +} +} +obj* l_Array_anyMAux___main___at_Lean_IR_IsLive_visitFnBody___main___spec__1___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { +_start: +{ +obj* x_4; +x_4 = l_Array_anyMAux___main___at_Lean_IR_IsLive_visitFnBody___main___spec__1(x_0, x_1, x_2, x_3); +lean::dec(x_0); +lean::dec(x_1); +return x_4; +} +} +obj* l_Lean_IR_IsLive_visitFnBody___main___boxed(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +obj* x_3; +x_3 = l_Lean_IR_IsLive_visitFnBody___main(x_0, x_1, x_2); +lean::dec(x_0); +return x_3; +} +} +obj* l_Lean_IR_IsLive_visitFnBody(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +obj* x_3; +x_3 = l_Lean_IR_IsLive_visitFnBody___main(x_0, x_1, x_2); +return x_3; +} +} +obj* l_Lean_IR_IsLive_visitFnBody___boxed(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +obj* x_3; +x_3 = l_Lean_IR_IsLive_visitFnBody(x_0, x_1, x_2); +lean::dec(x_0); +return x_3; +} +} +obj* l_Lean_IR_FnBody_hasLiveVar(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +obj* x_3; obj* x_4; +x_3 = l_Lean_IR_IsLive_visitFnBody___main(x_2, x_0, x_1); +x_4 = lean::cnstr_get(x_3, 0); +lean::inc(x_4); +lean::dec(x_3); +return x_4; +} +} +obj* l_Lean_IR_FnBody_hasLiveVar___boxed(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +obj* x_3; +x_3 = l_Lean_IR_FnBody_hasLiveVar(x_0, x_1, x_2); +lean::dec(x_2); +return x_3; +} +} obj* initialize_init_lean_compiler_ir_basic(obj*); +obj* initialize_init_lean_compiler_ir_freevars(obj*); +obj* initialize_init_control_reader(obj*); +obj* initialize_init_control_conditional(obj*); static bool _G_initialized = false; obj* initialize_init_lean_compiler_ir_livevars(obj* w) { if (_G_initialized) return w; _G_initialized = true; if (io_result_is_error(w)) return w; -w = initialize_init_default(w); -if (io_result_is_error(w)) return w; w = initialize_init_lean_compiler_ir_basic(w); if (io_result_is_error(w)) return w; +w = initialize_init_lean_compiler_ir_freevars(w); +if (io_result_is_error(w)) return w; +w = initialize_init_control_reader(w); +if (io_result_is_error(w)) return w; +w = initialize_init_control_conditional(w); +if (io_result_is_error(w)) return w; return w; } diff --git a/src/stage0/init/lean/compiler/ir/normids.cpp b/src/stage0/init/lean/compiler/ir/normids.cpp index d9f233824b..d314d1e3e4 100644 --- a/src/stage0/init/lean/compiler/ir/normids.cpp +++ b/src/stage0/init/lean/compiler/ir/normids.cpp @@ -1055,527 +1055,524 @@ return x_25; } case 1: { -obj* x_26; obj* x_28; uint8 x_30; obj* x_31; obj* x_33; obj* x_35; obj* x_36; obj* x_38; obj* x_39; obj* x_41; obj* x_45; obj* x_46; obj* x_47; obj* x_49; obj* x_52; obj* x_53; obj* x_55; obj* x_56; obj* x_57; obj* x_59; obj* x_61; obj* x_62; obj* x_63; obj* x_64; +obj* x_26; obj* x_28; obj* x_30; obj* x_32; obj* x_34; obj* x_35; obj* x_37; obj* x_38; obj* x_40; obj* x_44; obj* x_45; obj* x_46; obj* x_48; obj* x_51; obj* x_52; obj* x_54; obj* x_55; obj* x_56; obj* x_58; obj* x_60; obj* x_61; obj* x_62; x_26 = lean::cnstr_get(x_0, 0); x_28 = lean::cnstr_get(x_0, 1); -x_30 = lean::cnstr_get_scalar(x_0, sizeof(void*)*4); -x_31 = lean::cnstr_get(x_0, 2); -x_33 = lean::cnstr_get(x_0, 3); +x_30 = lean::cnstr_get(x_0, 2); +x_32 = lean::cnstr_get(x_0, 3); if (lean::is_exclusive(x_0)) { - x_35 = x_0; + x_34 = x_0; } else { lean::inc(x_26); lean::inc(x_28); - lean::inc(x_31); - lean::inc(x_33); + lean::inc(x_30); + lean::inc(x_32); lean::dec(x_0); - x_35 = lean::box(0); + x_34 = lean::box(0); } -x_36 = lean::mk_nat_obj(0ul); +x_35 = lean::mk_nat_obj(0ul); lean::inc(x_1); -x_38 = l_Array_miterateAux___main___at_Lean_IR_NormalizeIds_normFnBody___main___spec__1(x_28, x_28, x_36, x_1, x_2); -x_39 = lean::cnstr_get(x_38, 0); -lean::inc(x_39); -x_41 = lean::cnstr_get(x_38, 1); -lean::inc(x_41); -lean::dec(x_38); -lean::inc(x_39); -x_45 = l_Array_hmmapAux___main___at_Lean_IR_NormalizeIds_normFnBody___main___spec__2(x_39, x_36, x_28); -x_46 = l_Lean_IR_NormalizeIds_normFnBody___main(x_31, x_39, x_41); -x_47 = lean::cnstr_get(x_46, 0); -lean::inc(x_47); -x_49 = lean::cnstr_get(x_46, 1); -lean::inc(x_49); -lean::dec(x_46); -x_52 = lean::mk_nat_obj(1ul); -x_53 = lean::nat_add(x_49, x_52); -lean::inc(x_49); -x_55 = l_RBNode_insert___at_Lean_IR_addVarRename___spec__1(x_1, x_26, x_49); -x_56 = l_Lean_IR_NormalizeIds_normFnBody___main(x_33, x_55, x_53); -x_57 = lean::cnstr_get(x_56, 0); -x_59 = lean::cnstr_get(x_56, 1); -if (lean::is_exclusive(x_56)) { - x_61 = x_56; +x_37 = l_Array_miterateAux___main___at_Lean_IR_NormalizeIds_normFnBody___main___spec__1(x_28, x_28, x_35, x_1, x_2); +x_38 = lean::cnstr_get(x_37, 0); +lean::inc(x_38); +x_40 = lean::cnstr_get(x_37, 1); +lean::inc(x_40); +lean::dec(x_37); +lean::inc(x_38); +x_44 = l_Array_hmmapAux___main___at_Lean_IR_NormalizeIds_normFnBody___main___spec__2(x_38, x_35, x_28); +x_45 = l_Lean_IR_NormalizeIds_normFnBody___main(x_30, x_38, x_40); +x_46 = lean::cnstr_get(x_45, 0); +lean::inc(x_46); +x_48 = lean::cnstr_get(x_45, 1); +lean::inc(x_48); +lean::dec(x_45); +x_51 = lean::mk_nat_obj(1ul); +x_52 = lean::nat_add(x_48, x_51); +lean::inc(x_48); +x_54 = l_RBNode_insert___at_Lean_IR_addVarRename___spec__1(x_1, x_26, x_48); +x_55 = l_Lean_IR_NormalizeIds_normFnBody___main(x_32, x_54, x_52); +x_56 = lean::cnstr_get(x_55, 0); +x_58 = lean::cnstr_get(x_55, 1); +if (lean::is_exclusive(x_55)) { + x_60 = x_55; } else { - lean::inc(x_57); - lean::inc(x_59); - lean::dec(x_56); - x_61 = lean::box(0); + lean::inc(x_56); + lean::inc(x_58); + lean::dec(x_55); + x_60 = lean::box(0); } -if (lean::is_scalar(x_35)) { - x_62 = lean::alloc_cnstr(1, 4, 1); +if (lean::is_scalar(x_34)) { + x_61 = lean::alloc_cnstr(1, 4, 0); } else { - x_62 = x_35; + x_61 = x_34; } -lean::cnstr_set(x_62, 0, x_49); -lean::cnstr_set(x_62, 1, x_45); -lean::cnstr_set(x_62, 2, x_47); -lean::cnstr_set(x_62, 3, x_57); -lean::cnstr_set_scalar(x_62, sizeof(void*)*4, x_30); -x_63 = x_62; -if (lean::is_scalar(x_61)) { - x_64 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_61, 0, x_48); +lean::cnstr_set(x_61, 1, x_44); +lean::cnstr_set(x_61, 2, x_46); +lean::cnstr_set(x_61, 3, x_56); +if (lean::is_scalar(x_60)) { + x_62 = lean::alloc_cnstr(0, 2, 0); } else { - x_64 = x_61; + x_62 = x_60; } -lean::cnstr_set(x_64, 0, x_63); -lean::cnstr_set(x_64, 1, x_59); -return x_64; +lean::cnstr_set(x_62, 0, x_61); +lean::cnstr_set(x_62, 1, x_58); +return x_62; } case 2: { -obj* x_65; obj* x_67; obj* x_69; obj* x_71; obj* x_73; obj* x_75; obj* x_78; obj* x_80; obj* x_81; obj* x_83; obj* x_85; obj* x_86; obj* x_87; -x_65 = lean::cnstr_get(x_0, 0); -x_67 = lean::cnstr_get(x_0, 1); -x_69 = lean::cnstr_get(x_0, 2); -x_71 = lean::cnstr_get(x_0, 3); +obj* x_63; obj* x_65; obj* x_67; obj* x_69; obj* x_71; obj* x_73; obj* x_76; obj* x_78; obj* x_79; obj* x_81; obj* x_83; obj* x_84; obj* x_85; +x_63 = lean::cnstr_get(x_0, 0); +x_65 = lean::cnstr_get(x_0, 1); +x_67 = lean::cnstr_get(x_0, 2); +x_69 = lean::cnstr_get(x_0, 3); if (lean::is_exclusive(x_0)) { - x_73 = x_0; + x_71 = x_0; } else { + lean::inc(x_63); lean::inc(x_65); lean::inc(x_67); lean::inc(x_69); - lean::inc(x_71); lean::dec(x_0); - x_73 = lean::box(0); + x_71 = lean::box(0); } lean::inc(x_1); -x_75 = l_Lean_IR_NormalizeIds_normIndex(x_65, x_1); -lean::dec(x_65); +x_73 = l_Lean_IR_NormalizeIds_normIndex(x_63, x_1); +lean::dec(x_63); lean::inc(x_1); -x_78 = l_Lean_IR_NormalizeIds_normIndex(x_69, x_1); -lean::dec(x_69); -x_80 = l_Lean_IR_NormalizeIds_normFnBody___main(x_71, x_1, x_2); -x_81 = lean::cnstr_get(x_80, 0); -x_83 = lean::cnstr_get(x_80, 1); -if (lean::is_exclusive(x_80)) { - x_85 = x_80; +x_76 = l_Lean_IR_NormalizeIds_normIndex(x_67, x_1); +lean::dec(x_67); +x_78 = l_Lean_IR_NormalizeIds_normFnBody___main(x_69, x_1, x_2); +x_79 = lean::cnstr_get(x_78, 0); +x_81 = lean::cnstr_get(x_78, 1); +if (lean::is_exclusive(x_78)) { + x_83 = x_78; } else { + lean::inc(x_79); lean::inc(x_81); - lean::inc(x_83); - lean::dec(x_80); - x_85 = lean::box(0); + lean::dec(x_78); + x_83 = lean::box(0); } -if (lean::is_scalar(x_73)) { - x_86 = lean::alloc_cnstr(2, 4, 0); +if (lean::is_scalar(x_71)) { + x_84 = lean::alloc_cnstr(2, 4, 0); } else { - x_86 = x_73; + x_84 = x_71; } -lean::cnstr_set(x_86, 0, x_75); -lean::cnstr_set(x_86, 1, x_67); -lean::cnstr_set(x_86, 2, x_78); -lean::cnstr_set(x_86, 3, x_81); -if (lean::is_scalar(x_85)) { - x_87 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_84, 0, x_73); +lean::cnstr_set(x_84, 1, x_65); +lean::cnstr_set(x_84, 2, x_76); +lean::cnstr_set(x_84, 3, x_79); +if (lean::is_scalar(x_83)) { + x_85 = lean::alloc_cnstr(0, 2, 0); } else { - x_87 = x_85; + x_85 = x_83; } -lean::cnstr_set(x_87, 0, x_86); -lean::cnstr_set(x_87, 1, x_83); -return x_87; +lean::cnstr_set(x_85, 0, x_84); +lean::cnstr_set(x_85, 1, x_81); +return x_85; } case 3: { -obj* x_88; obj* x_90; obj* x_92; obj* x_94; obj* x_96; obj* x_98; obj* x_101; obj* x_103; obj* x_104; obj* x_106; obj* x_108; obj* x_109; obj* x_110; -x_88 = lean::cnstr_get(x_0, 0); -x_90 = lean::cnstr_get(x_0, 1); -x_92 = lean::cnstr_get(x_0, 2); -x_94 = lean::cnstr_get(x_0, 3); +obj* x_86; obj* x_88; obj* x_90; obj* x_92; obj* x_94; obj* x_96; obj* x_99; obj* x_101; obj* x_102; obj* x_104; obj* x_106; obj* x_107; obj* x_108; +x_86 = lean::cnstr_get(x_0, 0); +x_88 = lean::cnstr_get(x_0, 1); +x_90 = lean::cnstr_get(x_0, 2); +x_92 = lean::cnstr_get(x_0, 3); if (lean::is_exclusive(x_0)) { - x_96 = x_0; + x_94 = x_0; } else { + lean::inc(x_86); lean::inc(x_88); lean::inc(x_90); lean::inc(x_92); - lean::inc(x_94); lean::dec(x_0); - x_96 = lean::box(0); + x_94 = lean::box(0); } lean::inc(x_1); -x_98 = l_Lean_IR_NormalizeIds_normIndex(x_88, x_1); -lean::dec(x_88); +x_96 = l_Lean_IR_NormalizeIds_normIndex(x_86, x_1); +lean::dec(x_86); lean::inc(x_1); -x_101 = l_Lean_IR_NormalizeIds_normIndex(x_92, x_1); -lean::dec(x_92); -x_103 = l_Lean_IR_NormalizeIds_normFnBody___main(x_94, x_1, x_2); -x_104 = lean::cnstr_get(x_103, 0); -x_106 = lean::cnstr_get(x_103, 1); -if (lean::is_exclusive(x_103)) { - x_108 = x_103; +x_99 = l_Lean_IR_NormalizeIds_normIndex(x_90, x_1); +lean::dec(x_90); +x_101 = l_Lean_IR_NormalizeIds_normFnBody___main(x_92, x_1, x_2); +x_102 = lean::cnstr_get(x_101, 0); +x_104 = lean::cnstr_get(x_101, 1); +if (lean::is_exclusive(x_101)) { + x_106 = x_101; } else { + lean::inc(x_102); lean::inc(x_104); - lean::inc(x_106); - lean::dec(x_103); - x_108 = lean::box(0); + lean::dec(x_101); + x_106 = lean::box(0); } -if (lean::is_scalar(x_96)) { - x_109 = lean::alloc_cnstr(3, 4, 0); +if (lean::is_scalar(x_94)) { + x_107 = lean::alloc_cnstr(3, 4, 0); } else { - x_109 = x_96; + x_107 = x_94; } -lean::cnstr_set(x_109, 0, x_98); -lean::cnstr_set(x_109, 1, x_90); -lean::cnstr_set(x_109, 2, x_101); -lean::cnstr_set(x_109, 3, x_104); -if (lean::is_scalar(x_108)) { - x_110 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_107, 0, x_96); +lean::cnstr_set(x_107, 1, x_88); +lean::cnstr_set(x_107, 2, x_99); +lean::cnstr_set(x_107, 3, x_102); +if (lean::is_scalar(x_106)) { + x_108 = lean::alloc_cnstr(0, 2, 0); } else { - x_110 = x_108; + x_108 = x_106; } -lean::cnstr_set(x_110, 0, x_109); -lean::cnstr_set(x_110, 1, x_106); -return x_110; +lean::cnstr_set(x_108, 0, x_107); +lean::cnstr_set(x_108, 1, x_104); +return x_108; } case 4: { -obj* x_111; obj* x_113; obj* x_115; obj* x_117; uint8 x_119; obj* x_120; obj* x_122; obj* x_124; obj* x_127; obj* x_129; obj* x_130; obj* x_132; obj* x_134; obj* x_135; obj* x_136; obj* x_137; -x_111 = lean::cnstr_get(x_0, 0); -x_113 = lean::cnstr_get(x_0, 1); -x_115 = lean::cnstr_get(x_0, 2); -x_117 = lean::cnstr_get(x_0, 3); -x_119 = lean::cnstr_get_scalar(x_0, sizeof(void*)*5); -x_120 = lean::cnstr_get(x_0, 4); +obj* x_109; obj* x_111; obj* x_113; obj* x_115; uint8 x_117; obj* x_118; obj* x_120; obj* x_122; obj* x_125; obj* x_127; obj* x_128; obj* x_130; obj* x_132; obj* x_133; obj* x_134; obj* x_135; +x_109 = lean::cnstr_get(x_0, 0); +x_111 = lean::cnstr_get(x_0, 1); +x_113 = lean::cnstr_get(x_0, 2); +x_115 = lean::cnstr_get(x_0, 3); +x_117 = lean::cnstr_get_scalar(x_0, sizeof(void*)*5); +x_118 = lean::cnstr_get(x_0, 4); if (lean::is_exclusive(x_0)) { - x_122 = x_0; + x_120 = x_0; } else { + lean::inc(x_109); lean::inc(x_111); lean::inc(x_113); lean::inc(x_115); - lean::inc(x_117); - lean::inc(x_120); + lean::inc(x_118); lean::dec(x_0); - x_122 = lean::box(0); + x_120 = lean::box(0); } lean::inc(x_1); -x_124 = l_Lean_IR_NormalizeIds_normIndex(x_111, x_1); -lean::dec(x_111); +x_122 = l_Lean_IR_NormalizeIds_normIndex(x_109, x_1); +lean::dec(x_109); lean::inc(x_1); -x_127 = l_Lean_IR_NormalizeIds_normIndex(x_117, x_1); -lean::dec(x_117); -x_129 = l_Lean_IR_NormalizeIds_normFnBody___main(x_120, x_1, x_2); -x_130 = lean::cnstr_get(x_129, 0); -x_132 = lean::cnstr_get(x_129, 1); -if (lean::is_exclusive(x_129)) { - x_134 = x_129; +x_125 = l_Lean_IR_NormalizeIds_normIndex(x_115, x_1); +lean::dec(x_115); +x_127 = l_Lean_IR_NormalizeIds_normFnBody___main(x_118, x_1, x_2); +x_128 = lean::cnstr_get(x_127, 0); +x_130 = lean::cnstr_get(x_127, 1); +if (lean::is_exclusive(x_127)) { + x_132 = x_127; } else { + lean::inc(x_128); lean::inc(x_130); - lean::inc(x_132); - lean::dec(x_129); - x_134 = lean::box(0); + lean::dec(x_127); + x_132 = lean::box(0); } -if (lean::is_scalar(x_122)) { - x_135 = lean::alloc_cnstr(4, 5, 1); +if (lean::is_scalar(x_120)) { + x_133 = lean::alloc_cnstr(4, 5, 1); } else { - x_135 = x_122; + x_133 = x_120; } -lean::cnstr_set(x_135, 0, x_124); -lean::cnstr_set(x_135, 1, x_113); -lean::cnstr_set(x_135, 2, x_115); -lean::cnstr_set(x_135, 3, x_127); -lean::cnstr_set(x_135, 4, x_130); -lean::cnstr_set_scalar(x_135, sizeof(void*)*5, x_119); -x_136 = x_135; -if (lean::is_scalar(x_134)) { - x_137 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_133, 0, x_122); +lean::cnstr_set(x_133, 1, x_111); +lean::cnstr_set(x_133, 2, x_113); +lean::cnstr_set(x_133, 3, x_125); +lean::cnstr_set(x_133, 4, x_128); +lean::cnstr_set_scalar(x_133, sizeof(void*)*5, x_117); +x_134 = x_133; +if (lean::is_scalar(x_132)) { + x_135 = lean::alloc_cnstr(0, 2, 0); } else { - x_137 = x_134; + x_135 = x_132; } -lean::cnstr_set(x_137, 0, x_136); -lean::cnstr_set(x_137, 1, x_132); -return x_137; +lean::cnstr_set(x_135, 0, x_134); +lean::cnstr_set(x_135, 1, x_130); +return x_135; } case 5: { -obj* x_138; obj* x_140; obj* x_142; obj* x_144; obj* x_146; obj* x_148; obj* x_149; obj* x_151; obj* x_153; obj* x_154; obj* x_155; -x_138 = lean::cnstr_get(x_0, 0); -x_140 = lean::cnstr_get(x_0, 1); -x_142 = lean::cnstr_get(x_0, 2); +obj* x_136; obj* x_138; obj* x_140; obj* x_142; obj* x_144; obj* x_146; obj* x_147; obj* x_149; obj* x_151; obj* x_152; obj* x_153; +x_136 = lean::cnstr_get(x_0, 0); +x_138 = lean::cnstr_get(x_0, 1); +x_140 = lean::cnstr_get(x_0, 2); if (lean::is_exclusive(x_0)) { - x_144 = x_0; + x_142 = x_0; } else { + lean::inc(x_136); lean::inc(x_138); lean::inc(x_140); - lean::inc(x_142); lean::dec(x_0); - x_144 = lean::box(0); + x_142 = lean::box(0); } lean::inc(x_1); -x_146 = l_Lean_IR_NormalizeIds_normIndex(x_138, x_1); -lean::dec(x_138); -x_148 = l_Lean_IR_NormalizeIds_normFnBody___main(x_142, x_1, x_2); -x_149 = lean::cnstr_get(x_148, 0); -x_151 = lean::cnstr_get(x_148, 1); -if (lean::is_exclusive(x_148)) { - x_153 = x_148; +x_144 = l_Lean_IR_NormalizeIds_normIndex(x_136, x_1); +lean::dec(x_136); +x_146 = l_Lean_IR_NormalizeIds_normFnBody___main(x_140, x_1, x_2); +x_147 = lean::cnstr_get(x_146, 0); +x_149 = lean::cnstr_get(x_146, 1); +if (lean::is_exclusive(x_146)) { + x_151 = x_146; } else { + lean::inc(x_147); lean::inc(x_149); - lean::inc(x_151); - lean::dec(x_148); - x_153 = lean::box(0); + lean::dec(x_146); + x_151 = lean::box(0); } -if (lean::is_scalar(x_144)) { - x_154 = lean::alloc_cnstr(5, 3, 0); +if (lean::is_scalar(x_142)) { + x_152 = lean::alloc_cnstr(5, 3, 0); } else { - x_154 = x_144; + x_152 = x_142; } -lean::cnstr_set(x_154, 0, x_146); -lean::cnstr_set(x_154, 1, x_140); -lean::cnstr_set(x_154, 2, x_149); -if (lean::is_scalar(x_153)) { - x_155 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_152, 0, x_144); +lean::cnstr_set(x_152, 1, x_138); +lean::cnstr_set(x_152, 2, x_147); +if (lean::is_scalar(x_151)) { + x_153 = lean::alloc_cnstr(0, 2, 0); } else { - x_155 = x_153; + x_153 = x_151; } -lean::cnstr_set(x_155, 0, x_154); -lean::cnstr_set(x_155, 1, x_151); -return x_155; +lean::cnstr_set(x_153, 0, x_152); +lean::cnstr_set(x_153, 1, x_149); +return x_153; } case 6: { -obj* x_156; obj* x_158; uint8 x_160; obj* x_161; obj* x_163; obj* x_165; obj* x_167; obj* x_168; obj* x_170; obj* x_172; obj* x_173; obj* x_174; obj* x_175; -x_156 = lean::cnstr_get(x_0, 0); -x_158 = lean::cnstr_get(x_0, 1); -x_160 = lean::cnstr_get_scalar(x_0, sizeof(void*)*3); -x_161 = lean::cnstr_get(x_0, 2); +obj* x_154; obj* x_156; uint8 x_158; obj* x_159; obj* x_161; obj* x_163; obj* x_165; obj* x_166; obj* x_168; obj* x_170; obj* x_171; obj* x_172; obj* x_173; +x_154 = lean::cnstr_get(x_0, 0); +x_156 = lean::cnstr_get(x_0, 1); +x_158 = lean::cnstr_get_scalar(x_0, sizeof(void*)*3); +x_159 = lean::cnstr_get(x_0, 2); if (lean::is_exclusive(x_0)) { - x_163 = x_0; + x_161 = x_0; } else { + lean::inc(x_154); lean::inc(x_156); - lean::inc(x_158); - lean::inc(x_161); + lean::inc(x_159); lean::dec(x_0); - x_163 = lean::box(0); + x_161 = lean::box(0); } lean::inc(x_1); -x_165 = l_Lean_IR_NormalizeIds_normIndex(x_156, x_1); -lean::dec(x_156); -x_167 = l_Lean_IR_NormalizeIds_normFnBody___main(x_161, x_1, x_2); -x_168 = lean::cnstr_get(x_167, 0); -x_170 = lean::cnstr_get(x_167, 1); -if (lean::is_exclusive(x_167)) { - x_172 = x_167; +x_163 = l_Lean_IR_NormalizeIds_normIndex(x_154, x_1); +lean::dec(x_154); +x_165 = l_Lean_IR_NormalizeIds_normFnBody___main(x_159, x_1, x_2); +x_166 = lean::cnstr_get(x_165, 0); +x_168 = lean::cnstr_get(x_165, 1); +if (lean::is_exclusive(x_165)) { + x_170 = x_165; } else { + lean::inc(x_166); lean::inc(x_168); - lean::inc(x_170); - lean::dec(x_167); - x_172 = lean::box(0); + lean::dec(x_165); + x_170 = lean::box(0); } -if (lean::is_scalar(x_163)) { - x_173 = lean::alloc_cnstr(6, 3, 1); +if (lean::is_scalar(x_161)) { + x_171 = lean::alloc_cnstr(6, 3, 1); } else { - x_173 = x_163; + x_171 = x_161; } -lean::cnstr_set(x_173, 0, x_165); -lean::cnstr_set(x_173, 1, x_158); -lean::cnstr_set(x_173, 2, x_168); -lean::cnstr_set_scalar(x_173, sizeof(void*)*3, x_160); -x_174 = x_173; -if (lean::is_scalar(x_172)) { - x_175 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_171, 0, x_163); +lean::cnstr_set(x_171, 1, x_156); +lean::cnstr_set(x_171, 2, x_166); +lean::cnstr_set_scalar(x_171, sizeof(void*)*3, x_158); +x_172 = x_171; +if (lean::is_scalar(x_170)) { + x_173 = lean::alloc_cnstr(0, 2, 0); } else { - x_175 = x_172; + x_173 = x_170; } -lean::cnstr_set(x_175, 0, x_174); -lean::cnstr_set(x_175, 1, x_170); -return x_175; +lean::cnstr_set(x_173, 0, x_172); +lean::cnstr_set(x_173, 1, x_168); +return x_173; } case 7: { -obj* x_176; obj* x_178; uint8 x_180; obj* x_181; obj* x_183; obj* x_185; obj* x_187; obj* x_188; obj* x_190; obj* x_192; obj* x_193; obj* x_194; obj* x_195; -x_176 = lean::cnstr_get(x_0, 0); -x_178 = lean::cnstr_get(x_0, 1); -x_180 = lean::cnstr_get_scalar(x_0, sizeof(void*)*3); -x_181 = lean::cnstr_get(x_0, 2); +obj* x_174; obj* x_176; uint8 x_178; obj* x_179; obj* x_181; obj* x_183; obj* x_185; obj* x_186; obj* x_188; obj* x_190; obj* x_191; obj* x_192; obj* x_193; +x_174 = lean::cnstr_get(x_0, 0); +x_176 = lean::cnstr_get(x_0, 1); +x_178 = lean::cnstr_get_scalar(x_0, sizeof(void*)*3); +x_179 = lean::cnstr_get(x_0, 2); if (lean::is_exclusive(x_0)) { - x_183 = x_0; + x_181 = x_0; } else { + lean::inc(x_174); lean::inc(x_176); - lean::inc(x_178); - lean::inc(x_181); + lean::inc(x_179); lean::dec(x_0); - x_183 = lean::box(0); + x_181 = lean::box(0); } lean::inc(x_1); -x_185 = l_Lean_IR_NormalizeIds_normIndex(x_176, x_1); -lean::dec(x_176); -x_187 = l_Lean_IR_NormalizeIds_normFnBody___main(x_181, x_1, x_2); -x_188 = lean::cnstr_get(x_187, 0); -x_190 = lean::cnstr_get(x_187, 1); -if (lean::is_exclusive(x_187)) { - x_192 = x_187; +x_183 = l_Lean_IR_NormalizeIds_normIndex(x_174, x_1); +lean::dec(x_174); +x_185 = l_Lean_IR_NormalizeIds_normFnBody___main(x_179, x_1, x_2); +x_186 = lean::cnstr_get(x_185, 0); +x_188 = lean::cnstr_get(x_185, 1); +if (lean::is_exclusive(x_185)) { + x_190 = x_185; } else { + lean::inc(x_186); lean::inc(x_188); - lean::inc(x_190); - lean::dec(x_187); - x_192 = lean::box(0); + lean::dec(x_185); + x_190 = lean::box(0); } -if (lean::is_scalar(x_183)) { - x_193 = lean::alloc_cnstr(7, 3, 1); +if (lean::is_scalar(x_181)) { + x_191 = lean::alloc_cnstr(7, 3, 1); } else { - x_193 = x_183; + x_191 = x_181; } -lean::cnstr_set(x_193, 0, x_185); -lean::cnstr_set(x_193, 1, x_178); -lean::cnstr_set(x_193, 2, x_188); -lean::cnstr_set_scalar(x_193, sizeof(void*)*3, x_180); -x_194 = x_193; -if (lean::is_scalar(x_192)) { - x_195 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_191, 0, x_183); +lean::cnstr_set(x_191, 1, x_176); +lean::cnstr_set(x_191, 2, x_186); +lean::cnstr_set_scalar(x_191, sizeof(void*)*3, x_178); +x_192 = x_191; +if (lean::is_scalar(x_190)) { + x_193 = lean::alloc_cnstr(0, 2, 0); } else { - x_195 = x_192; + x_193 = x_190; } -lean::cnstr_set(x_195, 0, x_194); -lean::cnstr_set(x_195, 1, x_190); -return x_195; +lean::cnstr_set(x_193, 0, x_192); +lean::cnstr_set(x_193, 1, x_188); +return x_193; } case 8: { -obj* x_196; obj* x_198; obj* x_200; obj* x_201; obj* x_202; obj* x_204; obj* x_206; obj* x_207; obj* x_208; -x_196 = lean::cnstr_get(x_0, 0); -x_198 = lean::cnstr_get(x_0, 1); +obj* x_194; obj* x_196; obj* x_198; obj* x_199; obj* x_200; obj* x_202; obj* x_204; obj* x_205; obj* x_206; +x_194 = lean::cnstr_get(x_0, 0); +x_196 = lean::cnstr_get(x_0, 1); if (lean::is_exclusive(x_0)) { - x_200 = x_0; + x_198 = x_0; } else { + lean::inc(x_194); lean::inc(x_196); - lean::inc(x_198); lean::dec(x_0); - x_200 = lean::box(0); + x_198 = lean::box(0); } -x_201 = l_Lean_IR_NormalizeIds_normFnBody___main(x_198, x_1, x_2); -x_202 = lean::cnstr_get(x_201, 0); -x_204 = lean::cnstr_get(x_201, 1); -if (lean::is_exclusive(x_201)) { - x_206 = x_201; +x_199 = l_Lean_IR_NormalizeIds_normFnBody___main(x_196, x_1, x_2); +x_200 = lean::cnstr_get(x_199, 0); +x_202 = lean::cnstr_get(x_199, 1); +if (lean::is_exclusive(x_199)) { + x_204 = x_199; } else { + lean::inc(x_200); lean::inc(x_202); - lean::inc(x_204); - lean::dec(x_201); - x_206 = lean::box(0); + lean::dec(x_199); + x_204 = lean::box(0); } -if (lean::is_scalar(x_200)) { - x_207 = lean::alloc_cnstr(8, 2, 0); +if (lean::is_scalar(x_198)) { + x_205 = lean::alloc_cnstr(8, 2, 0); } else { - x_207 = x_200; + x_205 = x_198; } -lean::cnstr_set(x_207, 0, x_196); -lean::cnstr_set(x_207, 1, x_202); -if (lean::is_scalar(x_206)) { - x_208 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_205, 0, x_194); +lean::cnstr_set(x_205, 1, x_200); +if (lean::is_scalar(x_204)) { + x_206 = lean::alloc_cnstr(0, 2, 0); } else { - x_208 = x_206; + x_206 = x_204; } -lean::cnstr_set(x_208, 0, x_207); -lean::cnstr_set(x_208, 1, x_204); -return x_208; +lean::cnstr_set(x_206, 0, x_205); +lean::cnstr_set(x_206, 1, x_202); +return x_206; } case 9: { -obj* x_209; obj* x_211; obj* x_213; obj* x_215; obj* x_217; obj* x_219; obj* x_220; obj* x_221; obj* x_223; obj* x_225; obj* x_226; obj* x_227; -x_209 = lean::cnstr_get(x_0, 0); -x_211 = lean::cnstr_get(x_0, 1); -x_213 = lean::cnstr_get(x_0, 2); +obj* x_207; obj* x_209; obj* x_211; obj* x_213; obj* x_215; obj* x_217; obj* x_218; obj* x_219; obj* x_221; obj* x_223; obj* x_224; obj* x_225; +x_207 = lean::cnstr_get(x_0, 0); +x_209 = lean::cnstr_get(x_0, 1); +x_211 = lean::cnstr_get(x_0, 2); if (lean::is_exclusive(x_0)) { - x_215 = x_0; + x_213 = x_0; } else { + lean::inc(x_207); lean::inc(x_209); lean::inc(x_211); - lean::inc(x_213); lean::dec(x_0); - x_215 = lean::box(0); + x_213 = lean::box(0); } lean::inc(x_1); -x_217 = l_Lean_IR_NormalizeIds_normIndex(x_211, x_1); -lean::dec(x_211); -x_219 = lean::mk_nat_obj(0ul); -x_220 = l_Array_hmmapAux___main___at_Lean_IR_NormalizeIds_normFnBody___main___spec__3(x_219, x_213, x_1, x_2); -x_221 = lean::cnstr_get(x_220, 0); -x_223 = lean::cnstr_get(x_220, 1); -if (lean::is_exclusive(x_220)) { - x_225 = x_220; +x_215 = l_Lean_IR_NormalizeIds_normIndex(x_209, x_1); +lean::dec(x_209); +x_217 = lean::mk_nat_obj(0ul); +x_218 = l_Array_hmmapAux___main___at_Lean_IR_NormalizeIds_normFnBody___main___spec__3(x_217, x_211, x_1, x_2); +x_219 = lean::cnstr_get(x_218, 0); +x_221 = lean::cnstr_get(x_218, 1); +if (lean::is_exclusive(x_218)) { + x_223 = x_218; } else { + lean::inc(x_219); lean::inc(x_221); - lean::inc(x_223); - lean::dec(x_220); - x_225 = lean::box(0); + lean::dec(x_218); + x_223 = lean::box(0); } -if (lean::is_scalar(x_215)) { - x_226 = lean::alloc_cnstr(9, 3, 0); +if (lean::is_scalar(x_213)) { + x_224 = lean::alloc_cnstr(9, 3, 0); } else { - x_226 = x_215; + x_224 = x_213; } -lean::cnstr_set(x_226, 0, x_209); -lean::cnstr_set(x_226, 1, x_217); -lean::cnstr_set(x_226, 2, x_221); -if (lean::is_scalar(x_225)) { - x_227 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_224, 0, x_207); +lean::cnstr_set(x_224, 1, x_215); +lean::cnstr_set(x_224, 2, x_219); +if (lean::is_scalar(x_223)) { + x_225 = lean::alloc_cnstr(0, 2, 0); } else { - x_227 = x_225; + x_225 = x_223; } -lean::cnstr_set(x_227, 0, x_226); -lean::cnstr_set(x_227, 1, x_223); -return x_227; +lean::cnstr_set(x_225, 0, x_224); +lean::cnstr_set(x_225, 1, x_221); +return x_225; } case 10: { -obj* x_228; obj* x_230; obj* x_231; obj* x_232; obj* x_233; -x_228 = lean::cnstr_get(x_0, 0); +obj* x_226; obj* x_228; obj* x_229; obj* x_230; obj* x_231; +x_226 = lean::cnstr_get(x_0, 0); if (lean::is_exclusive(x_0)) { - x_230 = x_0; + x_228 = x_0; } else { - lean::inc(x_228); + lean::inc(x_226); lean::dec(x_0); - x_230 = lean::box(0); + x_228 = lean::box(0); } -x_231 = l_Lean_IR_NormalizeIds_normArg___main(x_228, x_1); -if (lean::is_scalar(x_230)) { - x_232 = lean::alloc_cnstr(10, 1, 0); +x_229 = l_Lean_IR_NormalizeIds_normArg___main(x_226, x_1); +if (lean::is_scalar(x_228)) { + x_230 = lean::alloc_cnstr(10, 1, 0); } else { - x_232 = x_230; + x_230 = x_228; } -lean::cnstr_set(x_232, 0, x_231); -x_233 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_233, 0, x_232); -lean::cnstr_set(x_233, 1, x_2); -return x_233; +lean::cnstr_set(x_230, 0, x_229); +x_231 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_231, 0, x_230); +lean::cnstr_set(x_231, 1, x_2); +return x_231; } case 11: { -obj* x_234; obj* x_236; obj* x_238; obj* x_240; obj* x_242; obj* x_243; obj* x_244; obj* x_245; -x_234 = lean::cnstr_get(x_0, 0); -x_236 = lean::cnstr_get(x_0, 1); +obj* x_232; obj* x_234; obj* x_236; obj* x_238; obj* x_240; obj* x_241; obj* x_242; obj* x_243; +x_232 = lean::cnstr_get(x_0, 0); +x_234 = lean::cnstr_get(x_0, 1); if (lean::is_exclusive(x_0)) { - x_238 = x_0; + x_236 = x_0; } else { + lean::inc(x_232); lean::inc(x_234); - lean::inc(x_236); lean::dec(x_0); - x_238 = lean::box(0); + x_236 = lean::box(0); } lean::inc(x_1); -x_240 = l_Lean_IR_NormalizeIds_normIndex(x_234, x_1); -lean::dec(x_234); -x_242 = lean::mk_nat_obj(0ul); -x_243 = l_Array_hmmapAux___main___at_Lean_IR_NormalizeIds_normArgs___spec__1(x_1, x_242, x_236); -if (lean::is_scalar(x_238)) { - x_244 = lean::alloc_cnstr(11, 2, 0); +x_238 = l_Lean_IR_NormalizeIds_normIndex(x_232, x_1); +lean::dec(x_232); +x_240 = lean::mk_nat_obj(0ul); +x_241 = l_Array_hmmapAux___main___at_Lean_IR_NormalizeIds_normArgs___spec__1(x_1, x_240, x_234); +if (lean::is_scalar(x_236)) { + x_242 = lean::alloc_cnstr(11, 2, 0); } else { - x_244 = x_238; + x_242 = x_236; } -lean::cnstr_set(x_244, 0, x_240); -lean::cnstr_set(x_244, 1, x_243); -x_245 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_245, 0, x_244); -lean::cnstr_set(x_245, 1, x_2); -return x_245; +lean::cnstr_set(x_242, 0, x_238); +lean::cnstr_set(x_242, 1, x_241); +x_243 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_243, 0, x_242); +lean::cnstr_set(x_243, 1, x_2); +return x_243; } default: { -obj* x_247; +obj* x_245; lean::dec(x_1); -x_247 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_247, 0, x_0); -lean::cnstr_set(x_247, 1, x_2); -return x_247; +x_245 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_245, 0, x_0); +lean::cnstr_set(x_245, 1, x_2); +return x_245; } } } diff --git a/src/stage0/init/lean/compiler/ir/pushproj.cpp b/src/stage0/init/lean/compiler/ir/pushproj.cpp index a0489ca4ad..59bba88f8b 100644 --- a/src/stage0/init/lean/compiler/ir/pushproj.cpp +++ b/src/stage0/init/lean/compiler/ir/pushproj.cpp @@ -14,20 +14,21 @@ typedef lean::uint32 uint32; typedef lean::uint64 uint64; #pragma GCC diagnostic ignored "-Wunused-label" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif -obj* l_Array_hmmapAux___main___at_Lean_IR_pushProjs___main___spec__3(obj*, obj*, obj*, obj*, obj*, obj*); -obj* l_Lean_IR_FnBody_collectFreeVars(obj*, obj*); +obj* l_Array_hmmapAux___main___at_Lean_IR_pushProjs___main___spec__3(obj*, obj*, obj*, obj*, obj*); extern obj* l_Array_empty___closed__1; namespace lean { obj* nat_sub(obj*, obj*); } extern obj* l_Lean_IR_vsetInh; obj* l_Lean_IR_Decl_pushProj(obj*); -obj* l_Lean_IR_pushProjs___main___closed__1; -obj* l_Array_hmmapAux___main___at_Lean_IR_pushProjs___main___spec__4___boxed(obj*, obj*, obj*, obj*, obj*); +uint8 l_Array_anyMAux___main___at_Lean_IR_pushProjs___main___spec__2(obj*, obj*, obj*); +obj* l_Lean_IR_FnBody_freeIndices(obj*); +obj* l_Array_anyMAux___main___at_Lean_IR_pushProjs___main___spec__2___boxed(obj*, obj*, obj*); +obj* l_Array_hmmapAux___main___at_Lean_IR_pushProjs___main___spec__4___boxed(obj*, obj*, obj*, obj*); obj* l_Lean_IR_Decl_pushProj___main(obj*); -obj* l_Lean_IR_FnBody_freeVars(obj*); +obj* l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__1(obj*, obj*); +obj* l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__2(obj*, obj*, obj*); obj* l_Lean_IR_reshape(obj*, obj*); -uint8 l_Array_anyAux___main___at_Lean_IR_pushProjs___main___spec__2(obj*, obj*, obj*, obj*); obj* l_Lean_IR_FnBody_pushProj(obj*); namespace lean { uint8 nat_dec_lt(obj*, obj*); @@ -39,23 +40,20 @@ obj* nat_add(obj*, obj*); uint8 l_Array_isEmpty___rarg(obj*); obj* l_Lean_IR_pushProjs(obj*, obj*, obj*, obj*, obj*); obj* l_Lean_IR_FnBody_pushProj___main(obj*); +obj* l_Lean_IR_FnBody_collectFreeIndices(obj*, obj*); obj* l_Array_hmmapAux___main___at_Lean_IR_FnBody_pushProj___main___spec__3(obj*, obj*); -obj* l_Nat_decLt___boxed(obj*, obj*); obj* l_Array_reverseAux___main___rarg(obj*, obj*); obj* l_Lean_IR_AltCore_body___main(obj*); obj* l_Lean_IR_pushProjs___main(obj*, obj*, obj*, obj*, obj*); obj* l_Array_back___at_Lean_IR_pushProjs___main___spec__1(obj*); -obj* l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__1(obj*, obj*); obj* l_Array_hmmapAux___main___at_Lean_IR_FnBody_pushProj___main___spec__1(obj*, obj*); -obj* l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__2(obj*, obj*, obj*); obj* l_Lean_IR_FnBody_setBody___main(obj*, obj*); -obj* l_Array_hmmapAux___main___at_Lean_IR_pushProjs___main___spec__4(obj*, obj*, obj*, obj*, obj*); +obj* l_Array_hmmapAux___main___at_Lean_IR_pushProjs___main___spec__4(obj*, obj*, obj*, obj*); obj* l_Array_miterateAux___main___at_Lean_IR_FnBody_pushProj___main___spec__2(obj*, obj*, obj*, obj*); -obj* l_Array_anyAux___main___at_Lean_IR_pushProjs___main___spec__2___boxed(obj*, obj*, obj*, obj*); obj* l_Array_back___at_Lean_IR_pushProjs___main___spec__1___boxed(obj*); obj* l_Array_miterateAux___main___at_Lean_IR_FnBody_pushProj___main___spec__2___boxed(obj*, obj*, obj*, obj*); obj* l_Array_hmmapAux___main___at_Lean_IR_pushProjs___main___spec__3___closed__1; -obj* l_Array_hmmapAux___main___at_Lean_IR_pushProjs___main___spec__3___boxed(obj*, obj*, obj*, obj*, obj*, obj*); +obj* l_Array_hmmapAux___main___at_Lean_IR_pushProjs___main___spec__3___boxed(obj*, obj*, obj*, obj*, obj*); obj* l_Array_miterateAux___main___at_Array_append___spec__1___rarg(obj*, obj*, obj*, obj*); extern obj* l_Lean_IR_Inhabited; obj* l_Array_back___at_Lean_IR_pushProjs___main___spec__1(obj* x_0) { @@ -72,40 +70,40 @@ lean::dec(x_3); return x_6; } } -uint8 l_Array_anyAux___main___at_Lean_IR_pushProjs___main___spec__2(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { +uint8 l_Array_anyMAux___main___at_Lean_IR_pushProjs___main___spec__2(obj* x_0, obj* x_1, obj* x_2) { _start: { -obj* x_4; uint8 x_5; -x_4 = lean::array_get_size(x_2); -x_5 = lean::nat_dec_lt(x_3, x_4); -lean::dec(x_4); -if (x_5 == 0) -{ -uint8 x_8; +obj* x_3; uint8 x_4; +x_3 = lean::array_get_size(x_1); +x_4 = lean::nat_dec_lt(x_2, x_3); lean::dec(x_3); -x_8 = 0; -return x_8; +if (x_4 == 0) +{ +uint8 x_7; +lean::dec(x_2); +x_7 = 0; +return x_7; } else { -obj* x_9; obj* x_10; -x_9 = lean::array_fget(x_2, x_3); -x_10 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__1(x_9, x_1); -if (lean::obj_tag(x_10) == 0) +obj* x_8; obj* x_9; +x_8 = lean::array_fget(x_1, x_2); +x_9 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__1(x_8, x_0); +if (lean::obj_tag(x_9) == 0) { -uint8 x_12; -lean::dec(x_3); -x_12 = 1; -return x_12; +uint8 x_11; +lean::dec(x_2); +x_11 = 1; +return x_11; } else { -obj* x_14; obj* x_15; -lean::dec(x_10); -x_14 = lean::mk_nat_obj(1ul); -x_15 = lean::nat_add(x_3, x_14); -lean::dec(x_3); -x_3 = x_15; +obj* x_13; obj* x_14; +lean::dec(x_9); +x_13 = lean::mk_nat_obj(1ul); +x_14 = lean::nat_add(x_2, x_13); +lean::dec(x_2); +x_2 = x_14; goto _start; } } @@ -121,134 +119,7 @@ lean::cnstr_set(x_1, 0, x_0); return x_1; } } -obj* l_Array_hmmapAux___main___at_Lean_IR_pushProjs___main___spec__3(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { -_start: -{ -obj* x_6; uint8 x_7; -x_6 = lean::array_get_size(x_5); -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 -{ -obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; -x_11 = lean::array_fget(x_5, x_4); -x_12 = l_Array_hmmapAux___main___at_Lean_IR_pushProjs___main___spec__3___closed__1; -x_13 = lean::array_fset(x_5, x_4, x_12); -x_14 = lean::mk_nat_obj(1ul); -x_15 = lean::nat_add(x_4, x_14); -if (lean::obj_tag(x_11) == 0) -{ -obj* x_16; obj* x_18; obj* x_20; obj* x_21; obj* x_22; obj* x_23; -x_16 = lean::cnstr_get(x_11, 0); -x_18 = lean::cnstr_get(x_11, 1); -if (lean::is_exclusive(x_11)) { - lean::cnstr_set(x_11, 0, lean::box(0)); - lean::cnstr_set(x_11, 1, lean::box(0)); - x_20 = x_11; -} else { - lean::inc(x_16); - lean::inc(x_18); - lean::dec(x_11); - x_20 = lean::box(0); -} -x_21 = l_Lean_IR_vsetInh; -x_22 = lean::array_get(x_21, x_0, x_4); -x_23 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__1(x_22, x_3); -if (lean::obj_tag(x_23) == 0) -{ -obj* x_24; obj* x_25; -if (lean::is_scalar(x_20)) { - x_24 = lean::alloc_cnstr(0, 2, 0); -} else { - x_24 = x_20; -} -lean::cnstr_set(x_24, 0, x_16); -lean::cnstr_set(x_24, 1, x_18); -x_25 = lean::array_fset(x_13, x_4, x_24); -lean::dec(x_4); -x_4 = x_15; -x_5 = x_25; -goto _start; -} -else -{ -obj* x_30; obj* x_31; obj* x_32; -lean::dec(x_23); -lean::inc(x_1); -x_30 = l_Lean_IR_FnBody_setBody___main(x_1, x_18); -if (lean::is_scalar(x_20)) { - x_31 = lean::alloc_cnstr(0, 2, 0); -} else { - x_31 = x_20; -} -lean::cnstr_set(x_31, 0, x_16); -lean::cnstr_set(x_31, 1, x_30); -x_32 = lean::array_fset(x_13, x_4, x_31); -lean::dec(x_4); -x_4 = x_15; -x_5 = x_32; -goto _start; -} -} -else -{ -obj* x_35; obj* x_37; obj* x_38; obj* x_39; obj* x_40; -x_35 = lean::cnstr_get(x_11, 0); -if (lean::is_exclusive(x_11)) { - lean::cnstr_set(x_11, 0, lean::box(0)); - x_37 = x_11; -} else { - lean::inc(x_35); - lean::dec(x_11); - x_37 = lean::box(0); -} -x_38 = l_Lean_IR_vsetInh; -x_39 = lean::array_get(x_38, x_0, x_4); -x_40 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__1(x_39, x_3); -if (lean::obj_tag(x_40) == 0) -{ -obj* x_41; obj* x_42; -if (lean::is_scalar(x_37)) { - x_41 = lean::alloc_cnstr(1, 1, 0); -} else { - x_41 = x_37; -} -lean::cnstr_set(x_41, 0, x_35); -x_42 = lean::array_fset(x_13, x_4, x_41); -lean::dec(x_4); -x_4 = x_15; -x_5 = x_42; -goto _start; -} -else -{ -obj* x_47; obj* x_48; obj* x_49; -lean::dec(x_40); -lean::inc(x_1); -x_47 = l_Lean_IR_FnBody_setBody___main(x_1, x_35); -if (lean::is_scalar(x_37)) { - x_48 = lean::alloc_cnstr(1, 1, 0); -} else { - x_48 = x_37; -} -lean::cnstr_set(x_48, 0, x_47); -x_49 = lean::array_fset(x_13, x_4, x_48); -lean::dec(x_4); -x_4 = x_15; -x_5 = x_49; -goto _start; -} -} -} -} -} -obj* l_Array_hmmapAux___main___at_Lean_IR_pushProjs___main___spec__4(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { +obj* l_Array_hmmapAux___main___at_Lean_IR_pushProjs___main___spec__3(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { obj* x_5; uint8 x_6; @@ -257,50 +128,169 @@ x_6 = lean::nat_dec_lt(x_3, x_5); lean::dec(x_5); if (x_6 == 0) { +lean::dec(x_1); lean::dec(x_3); -lean::dec(x_0); return x_4; } else { -obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_16; +obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; x_10 = lean::array_fget(x_4, x_3); -x_11 = lean::box(0); +x_11 = l_Array_hmmapAux___main___at_Lean_IR_pushProjs___main___spec__3___closed__1; x_12 = lean::array_fset(x_4, x_3, x_11); x_13 = lean::mk_nat_obj(1ul); x_14 = lean::nat_add(x_3, x_13); -lean::inc(x_10); -x_16 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__1(x_10, x_2); -if (lean::obj_tag(x_16) == 0) +if (lean::obj_tag(x_10) == 0) { -obj* x_17; -x_17 = lean::array_fset(x_12, x_3, x_10); +obj* x_15; obj* x_17; obj* x_19; obj* x_20; obj* x_21; obj* x_22; +x_15 = lean::cnstr_get(x_10, 0); +x_17 = lean::cnstr_get(x_10, 1); +if (lean::is_exclusive(x_10)) { + lean::cnstr_set(x_10, 0, lean::box(0)); + lean::cnstr_set(x_10, 1, lean::box(0)); + x_19 = x_10; +} else { + lean::inc(x_15); + lean::inc(x_17); + lean::dec(x_10); + x_19 = lean::box(0); +} +x_20 = l_Lean_IR_vsetInh; +x_21 = lean::array_get(x_20, x_0, x_3); +x_22 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__1(x_21, x_2); +if (lean::obj_tag(x_22) == 0) +{ +obj* x_23; obj* x_24; +if (lean::is_scalar(x_19)) { + x_23 = lean::alloc_cnstr(0, 2, 0); +} else { + x_23 = x_19; +} +lean::cnstr_set(x_23, 0, x_15); +lean::cnstr_set(x_23, 1, x_17); +x_24 = lean::array_fset(x_12, x_3, x_23); lean::dec(x_3); x_3 = x_14; -x_4 = x_17; +x_4 = x_24; goto _start; } else { -obj* x_22; obj* x_23; -lean::dec(x_16); -lean::inc(x_0); -x_22 = l_Lean_IR_FnBody_collectFreeVars(x_0, x_10); -x_23 = lean::array_fset(x_12, x_3, x_22); +obj* x_29; obj* x_30; obj* x_31; +lean::dec(x_22); +lean::inc(x_1); +x_29 = l_Lean_IR_FnBody_setBody___main(x_1, x_17); +if (lean::is_scalar(x_19)) { + x_30 = lean::alloc_cnstr(0, 2, 0); +} else { + x_30 = x_19; +} +lean::cnstr_set(x_30, 0, x_15); +lean::cnstr_set(x_30, 1, x_29); +x_31 = lean::array_fset(x_12, x_3, x_30); lean::dec(x_3); x_3 = x_14; -x_4 = x_23; +x_4 = x_31; +goto _start; +} +} +else +{ +obj* x_34; obj* x_36; obj* x_37; obj* x_38; obj* x_39; +x_34 = lean::cnstr_get(x_10, 0); +if (lean::is_exclusive(x_10)) { + lean::cnstr_set(x_10, 0, lean::box(0)); + x_36 = x_10; +} else { + lean::inc(x_34); + lean::dec(x_10); + x_36 = lean::box(0); +} +x_37 = l_Lean_IR_vsetInh; +x_38 = lean::array_get(x_37, x_0, x_3); +x_39 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__1(x_38, x_2); +if (lean::obj_tag(x_39) == 0) +{ +obj* x_40; obj* x_41; +if (lean::is_scalar(x_36)) { + x_40 = lean::alloc_cnstr(1, 1, 0); +} else { + x_40 = x_36; +} +lean::cnstr_set(x_40, 0, x_34); +x_41 = lean::array_fset(x_12, x_3, x_40); +lean::dec(x_3); +x_3 = x_14; +x_4 = x_41; +goto _start; +} +else +{ +obj* x_46; obj* x_47; obj* x_48; +lean::dec(x_39); +lean::inc(x_1); +x_46 = l_Lean_IR_FnBody_setBody___main(x_1, x_34); +if (lean::is_scalar(x_36)) { + x_47 = lean::alloc_cnstr(1, 1, 0); +} else { + x_47 = x_36; +} +lean::cnstr_set(x_47, 0, x_46); +x_48 = lean::array_fset(x_12, x_3, x_47); +lean::dec(x_3); +x_3 = x_14; +x_4 = x_48; goto _start; } } } } -obj* _init_l_Lean_IR_pushProjs___main___closed__1() { +} +obj* l_Array_hmmapAux___main___at_Lean_IR_pushProjs___main___spec__4(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { -obj* x_0; -x_0 = lean::alloc_closure(reinterpret_cast(l_Nat_decLt___boxed), 2, 0); -return x_0; +obj* x_4; uint8 x_5; +x_4 = lean::array_get_size(x_3); +x_5 = lean::nat_dec_lt(x_2, x_4); +lean::dec(x_4); +if (x_5 == 0) +{ +lean::dec(x_0); +lean::dec(x_2); +return x_3; +} +else +{ +obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_15; +x_9 = lean::array_fget(x_3, x_2); +x_10 = lean::box(0); +x_11 = lean::array_fset(x_3, x_2, x_10); +x_12 = lean::mk_nat_obj(1ul); +x_13 = lean::nat_add(x_2, x_12); +lean::inc(x_9); +x_15 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__1(x_9, x_1); +if (lean::obj_tag(x_15) == 0) +{ +obj* x_16; +x_16 = lean::array_fset(x_11, x_2, x_9); +lean::dec(x_2); +x_2 = x_13; +x_3 = x_16; +goto _start; +} +else +{ +obj* x_21; obj* x_22; +lean::dec(x_15); +lean::inc(x_0); +x_21 = l_Lean_IR_FnBody_collectFreeIndices(x_0, x_9); +x_22 = lean::array_fset(x_11, x_2, x_21); +lean::dec(x_2); +x_2 = x_13; +x_3 = x_22; +goto _start; +} +} } } obj* l_Lean_IR_pushProjs___main(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { @@ -327,121 +317,120 @@ lean::dec(x_12); x_15 = lean::cnstr_get(x_6, 0); lean::inc(x_15); lean::inc(x_4); -x_18 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__1(x_4, x_15); +x_18 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__1(x_4, x_15); if (lean::obj_tag(x_18) == 0) { -obj* x_19; obj* x_20; uint8 x_21; -x_19 = l_Lean_IR_pushProjs___main___closed__1; -x_20 = lean::mk_nat_obj(0ul); -x_21 = l_Array_anyAux___main___at_Lean_IR_pushProjs___main___spec__2(x_19, x_15, x_2, x_20); -if (x_21 == 0) +obj* x_19; uint8 x_20; +x_19 = lean::mk_nat_obj(0ul); +x_20 = l_Array_anyMAux___main___at_Lean_IR_pushProjs___main___spec__2(x_15, x_2, x_19); +if (x_20 == 0) { -obj* x_23; +obj* x_22; lean::dec(x_15); -x_23 = lean::box(0); -x_10 = x_23; +x_22 = lean::box(0); +x_10 = x_22; goto lbl_11; } else { -obj* x_25; obj* x_26; +obj* x_24; obj* x_25; lean::inc(x_6); -x_25 = l_Array_hmmapAux___main___at_Lean_IR_pushProjs___main___spec__3(x_2, x_6, x_19, x_15, x_20, x_1); -x_26 = l_Array_hmmapAux___main___at_Lean_IR_pushProjs___main___spec__4(x_6, x_19, x_15, x_20, x_2); +x_24 = l_Array_hmmapAux___main___at_Lean_IR_pushProjs___main___spec__3(x_2, x_6, x_15, x_19, x_1); +x_25 = l_Array_hmmapAux___main___at_Lean_IR_pushProjs___main___spec__4(x_6, x_15, x_19, x_2); lean::dec(x_15); x_0 = x_7; -x_1 = x_25; -x_2 = x_26; +x_1 = x_24; +x_2 = x_25; goto _start; } } else { -obj* x_31; +obj* x_30; lean::dec(x_15); lean::dec(x_18); -x_31 = lean::box(0); -x_10 = x_31; +x_30 = lean::box(0); +x_10 = x_30; goto lbl_11; } } case 4: { -obj* x_33; +obj* x_32; lean::dec(x_12); -x_33 = lean::box(0); -x_10 = x_33; +x_32 = lean::box(0); +x_10 = x_32; goto lbl_11; } case 5: { -obj* x_35; +obj* x_34; lean::dec(x_12); -x_35 = lean::box(0); -x_10 = x_35; +x_34 = lean::box(0); +x_10 = x_34; goto lbl_11; } default: { -obj* x_39; +obj* x_38; lean::dec(x_12); lean::dec(x_4); lean::dec(x_2); -x_39 = lean::box(0); -x_8 = x_39; +x_38 = lean::box(0); +x_8 = x_38; goto lbl_9; } } } default: { -obj* x_42; +obj* x_41; lean::dec(x_4); lean::dec(x_2); -x_42 = lean::box(0); -x_8 = x_42; +x_41 = lean::box(0); +x_8 = x_41; goto lbl_9; } } lbl_9: { -obj* x_44; obj* x_45; obj* x_46; obj* x_47; obj* x_49; +obj* x_43; obj* x_44; obj* x_45; obj* x_46; obj* x_48; lean::dec(x_8); -x_44 = lean::array_push(x_7, x_6); -x_45 = lean::mk_nat_obj(0ul); -x_46 = l_Array_reverseAux___main___rarg(x_3, x_45); -x_47 = l_Array_miterateAux___main___at_Array_append___spec__1___rarg(x_46, x_46, x_45, x_44); -lean::dec(x_46); -x_49 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_49, 0, x_47); -lean::cnstr_set(x_49, 1, x_1); -return x_49; +x_43 = lean::array_push(x_7, x_6); +x_44 = lean::mk_nat_obj(0ul); +x_45 = l_Array_reverseAux___main___rarg(x_3, x_44); +x_46 = l_Array_miterateAux___main___at_Array_append___spec__1___rarg(x_45, x_45, x_44, x_43); +lean::dec(x_45); +x_48 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_48, 0, x_46); +lean::cnstr_set(x_48, 1, x_1); +return x_48; } lbl_11: { -obj* x_52; obj* x_53; +obj* x_51; obj* x_52; lean::dec(x_10); lean::inc(x_6); -x_52 = lean::array_push(x_3, x_6); -x_53 = l_Lean_IR_FnBody_collectFreeVars(x_6, x_4); +x_51 = lean::array_push(x_3, x_6); +x_52 = l_Lean_IR_FnBody_collectFreeIndices(x_6, x_4); x_0 = x_7; -x_3 = x_52; -x_4 = x_53; +x_3 = x_51; +x_4 = x_52; goto _start; } } else { -obj* x_58; obj* x_59; obj* x_60; +obj* x_57; obj* x_58; obj* x_59; lean::dec(x_4); lean::dec(x_0); lean::dec(x_2); -x_58 = lean::mk_nat_obj(0ul); -x_59 = l_Array_reverseAux___main___rarg(x_3, x_58); -x_60 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_60, 0, x_59); -lean::cnstr_set(x_60, 1, x_1); -return x_60; +x_57 = lean::mk_nat_obj(0ul); +x_58 = l_Array_reverseAux___main___rarg(x_3, x_57); +x_59 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_59, 0, x_58); +lean::cnstr_set(x_59, 1, x_1); +return x_59; } } } @@ -454,39 +443,36 @@ lean::dec(x_0); return x_1; } } -obj* l_Array_anyAux___main___at_Lean_IR_pushProjs___main___spec__2___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { +obj* l_Array_anyMAux___main___at_Lean_IR_pushProjs___main___spec__2___boxed(obj* x_0, obj* x_1, obj* x_2) { _start: { -uint8 x_4; obj* x_5; -x_4 = l_Array_anyAux___main___at_Lean_IR_pushProjs___main___spec__2(x_0, x_1, x_2, x_3); -x_5 = lean::box(x_4); +uint8 x_3; obj* x_4; +x_3 = l_Array_anyMAux___main___at_Lean_IR_pushProjs___main___spec__2(x_0, x_1, x_2); +x_4 = lean::box(x_3); lean::dec(x_0); lean::dec(x_1); -lean::dec(x_2); -return x_5; +return x_4; } } -obj* l_Array_hmmapAux___main___at_Lean_IR_pushProjs___main___spec__3___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { -_start: -{ -obj* x_6; -x_6 = l_Array_hmmapAux___main___at_Lean_IR_pushProjs___main___spec__3(x_0, x_1, x_2, x_3, x_4, x_5); -lean::dec(x_0); -lean::dec(x_2); -lean::dec(x_3); -return x_6; -} -} -obj* l_Array_hmmapAux___main___at_Lean_IR_pushProjs___main___spec__4___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { +obj* l_Array_hmmapAux___main___at_Lean_IR_pushProjs___main___spec__3___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { obj* x_5; -x_5 = l_Array_hmmapAux___main___at_Lean_IR_pushProjs___main___spec__4(x_0, x_1, x_2, x_3, x_4); -lean::dec(x_1); +x_5 = l_Array_hmmapAux___main___at_Lean_IR_pushProjs___main___spec__3(x_0, x_1, x_2, x_3, x_4); +lean::dec(x_0); lean::dec(x_2); return x_5; } } +obj* l_Array_hmmapAux___main___at_Lean_IR_pushProjs___main___spec__4___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { +_start: +{ +obj* x_4; +x_4 = l_Array_hmmapAux___main___at_Lean_IR_pushProjs___main___spec__4(x_0, x_1, x_2, x_3); +lean::dec(x_1); +return x_4; +} +} obj* l_Lean_IR_pushProjs(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { @@ -518,47 +504,44 @@ x_10 = lean::nat_add(x_0, x_9); switch (lean::obj_tag(x_6)) { case 1: { -obj* x_11; obj* x_13; uint8 x_15; obj* x_16; obj* x_18; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; +obj* x_11; obj* x_13; obj* x_15; obj* x_17; obj* x_19; obj* x_20; obj* x_21; obj* x_22; x_11 = lean::cnstr_get(x_6, 0); x_13 = lean::cnstr_get(x_6, 1); -x_15 = lean::cnstr_get_scalar(x_6, sizeof(void*)*4); -x_16 = lean::cnstr_get(x_6, 2); -x_18 = lean::cnstr_get(x_6, 3); +x_15 = lean::cnstr_get(x_6, 2); +x_17 = lean::cnstr_get(x_6, 3); if (lean::is_exclusive(x_6)) { - x_20 = x_6; + x_19 = x_6; } else { lean::inc(x_11); lean::inc(x_13); - lean::inc(x_16); - lean::inc(x_18); + lean::inc(x_15); + lean::inc(x_17); lean::dec(x_6); - x_20 = lean::box(0); + x_19 = lean::box(0); } -x_21 = l_Lean_IR_FnBody_pushProj___main(x_16); -if (lean::is_scalar(x_20)) { - x_22 = lean::alloc_cnstr(1, 4, 1); +x_20 = l_Lean_IR_FnBody_pushProj___main(x_15); +if (lean::is_scalar(x_19)) { + x_21 = lean::alloc_cnstr(1, 4, 0); } else { - x_22 = x_20; + x_21 = x_19; } -lean::cnstr_set(x_22, 0, x_11); -lean::cnstr_set(x_22, 1, x_13); -lean::cnstr_set(x_22, 2, x_21); -lean::cnstr_set(x_22, 3, x_18); -lean::cnstr_set_scalar(x_22, sizeof(void*)*4, x_15); -x_23 = x_22; -x_24 = lean::array_fset(x_8, x_0, x_23); +lean::cnstr_set(x_21, 0, x_11); +lean::cnstr_set(x_21, 1, x_13); +lean::cnstr_set(x_21, 2, x_20); +lean::cnstr_set(x_21, 3, x_17); +x_22 = lean::array_fset(x_8, x_0, x_21); lean::dec(x_0); x_0 = x_10; -x_1 = x_24; +x_1 = x_22; goto _start; } default: { -obj* x_27; -x_27 = lean::array_fset(x_8, x_0, x_6); +obj* x_25; +x_25 = lean::array_fset(x_8, x_0, x_6); lean::dec(x_0); x_0 = x_10; -x_1 = x_27; +x_1 = x_25; goto _start; } } @@ -583,7 +566,7 @@ obj* x_8; obj* x_9; obj* x_11; obj* x_12; obj* x_13; obj* x_14; x_8 = lean::array_fget(x_1, x_2); x_9 = l_Lean_IR_AltCore_body___main(x_8); lean::dec(x_8); -x_11 = l_Lean_IR_FnBody_freeVars(x_9); +x_11 = l_Lean_IR_FnBody_freeIndices(x_9); x_12 = lean::array_push(x_3, x_11); x_13 = lean::mk_nat_obj(1ul); x_14 = lean::nat_add(x_2, x_13); @@ -703,7 +686,7 @@ x_19 = l_Array_miterateAux___main___at_Lean_IR_FnBody_pushProj___main___spec__2( x_20 = lean::box(0); x_21 = lean::box(0); lean::inc(x_11); -x_23 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_2__collectIndex___spec__2(x_20, x_11, x_21); +x_23 = l_RBNode_insert___at___private_init_lean_compiler_ir_freevars_14__collectIndex___spec__2(x_20, x_11, x_21); x_24 = l_Array_empty___closed__1; x_25 = l_Lean_IR_pushProjs___main(x_8, x_13, x_19, x_24, x_23); x_26 = lean::cnstr_get(x_25, 0); @@ -809,7 +792,5 @@ w = initialize_init_lean_compiler_ir_freevars(w); if (io_result_is_error(w)) return w; l_Array_hmmapAux___main___at_Lean_IR_pushProjs___main___spec__3___closed__1 = _init_l_Array_hmmapAux___main___at_Lean_IR_pushProjs___main___spec__3___closed__1(); lean::mark_persistent(l_Array_hmmapAux___main___at_Lean_IR_pushProjs___main___spec__3___closed__1); - l_Lean_IR_pushProjs___main___closed__1 = _init_l_Lean_IR_pushProjs___main___closed__1(); -lean::mark_persistent(l_Lean_IR_pushProjs___main___closed__1); return w; } diff --git a/src/stage0/init/lean/compiler/ir/resetreuse.cpp b/src/stage0/init/lean/compiler/ir/resetreuse.cpp index a350df9c02..fab9ae1f8e 100644 --- a/src/stage0/init/lean/compiler/ir/resetreuse.cpp +++ b/src/stage0/init/lean/compiler/ir/resetreuse.cpp @@ -1,6 +1,6 @@ // Lean compiler output // Module: init.lean.compiler.ir.resetreuse -// Imports: init.control.state init.lean.compiler.ir.basic init.lean.compiler.ir.freevars +// Imports: init.control.state init.control.reader init.lean.compiler.ir.basic init.lean.compiler.ir.livevars #include "runtime/object.h" #include "runtime/apply.h" typedef lean::object obj; typedef lean::usize usize; @@ -16,25 +16,27 @@ typedef lean::uint32 uint32; typedef lean::uint64 uint64; #endif obj* l___private_init_lean_compiler_ir_resetreuse_7__hasCtorUsing(obj*); extern "C" uint8 lean_name_dec_eq(obj*, obj*); -obj* l___private_init_lean_compiler_ir_resetreuse_9__R(obj*, obj*); -obj* l___private_init_lean_compiler_ir_resetreuse_8__D(obj*, obj*, obj*, obj*); -obj* l_Array_hmmapAux___main___at___private_init_lean_compiler_ir_resetreuse_9__R___main___spec__1(obj*, obj*, obj*); -obj* l___private_init_lean_compiler_ir_resetreuse_6__Dmain(obj*, obj*, obj*, obj*); +obj* l___private_init_lean_compiler_ir_resetreuse_3__mkFresh___boxed(obj*); +obj* l___private_init_lean_compiler_ir_resetreuse_9__R(obj*, obj*, obj*); +obj* l___private_init_lean_compiler_ir_resetreuse_8__D(obj*, obj*, obj*, obj*, obj*); +uint8 l_Array_anyMAux___main___at___private_init_lean_compiler_ir_resetreuse_7__hasCtorUsing___main___spec__1(obj*, obj*, obj*); +obj* l_Array_hmmapAux___main___at___private_init_lean_compiler_ir_resetreuse_9__R___main___spec__1(obj*, obj*, obj*, obj*, obj*); +obj* l_Lean_IR_Context_addDecl(obj*, obj*); +obj* l_Lean_IR_MaxIndex_collectDecl___main(obj*, obj*); +obj* l___private_init_lean_compiler_ir_resetreuse_6__Dmain(obj*, obj*, obj*, obj*, obj*); +obj* l___private_init_lean_compiler_ir_resetreuse_4__tryS___boxed(obj*, obj*, obj*, obj*, obj*); obj* l___private_init_lean_compiler_ir_resetreuse_2__S___main(obj*, obj*, obj*); -obj* l_Lean_IR_MaxVar_collectDecl___main(obj*, obj*); uint8 l___private_init_lean_compiler_ir_resetreuse_7__hasCtorUsing___main(obj*); -obj* l_Lean_IR_reshape(obj*, obj*); -obj* l_Array_hmmapAux___main___at___private_init_lean_compiler_ir_resetreuse_6__Dmain___main___spec__1(obj*, obj*, obj*, obj*, obj*); +obj* l_Array_hmmapAux___main___at___private_init_lean_compiler_ir_resetreuse_6__Dmain___main___spec__1(obj*, obj*, obj*, obj*, obj*, obj*); uint8 l___private_init_lean_compiler_ir_resetreuse_1__mayReuse(obj*, obj*); -obj* l___private_init_lean_compiler_ir_resetreuse_5__Dfinalize(obj*, obj*, obj*, obj*); -obj* l___private_init_lean_compiler_ir_resetreuse_9__R___main(obj*, obj*); +obj* l___private_init_lean_compiler_ir_resetreuse_5__Dfinalize(obj*, obj*, obj*, obj*, obj*); +obj* l___private_init_lean_compiler_ir_resetreuse_9__R___main(obj*, obj*, obj*); namespace lean { uint8 nat_dec_lt(obj*, obj*); } obj* l___private_init_lean_compiler_ir_resetreuse_7__hasCtorUsing___main___boxed(obj*); uint8 l_Lean_IR_FnBody_isTerminal___main(obj*); -obj* l___private_init_lean_compiler_ir_resetreuse_5__Dfinalize___main(obj*, obj*, obj*, obj*); -obj* l_Lean_IR_FnBody_flatten(obj*); +obj* l___private_init_lean_compiler_ir_resetreuse_5__Dfinalize___main(obj*, obj*, obj*, obj*, obj*); namespace lean { obj* nat_add(obj*, obj*); } @@ -42,26 +44,28 @@ obj* l_Array_hmmapAux___main___at___private_init_lean_compiler_ir_resetreuse_2__ namespace lean { uint8 nat_dec_eq(obj*, obj*); } +obj* l_Lean_IR_FnBody_hasLiveVar(obj*, obj*, obj*); obj* l_Lean_IR_Decl_insertResetReuse(obj*); obj* l___private_init_lean_compiler_ir_resetreuse_7__hasCtorUsing___rarg___boxed(obj*); obj* l_Array_hmmapAux___main___at___private_init_lean_compiler_ir_resetreuse_2__S___main___spec__1(obj*, obj*, obj*, obj*); uint8 l_Lean_IR_HasIndex_visitFnBody___main(obj*, obj*); obj* l_Lean_IR_Decl_insertResetReuse___main(obj*); -uint8 l_Array_anyAux___main___at___private_init_lean_compiler_ir_resetreuse_7__hasCtorUsing___main___spec__1(obj*, obj*, obj*); uint8 l_Lean_IR_FnBody_beq(obj*, obj*); -obj* l___private_init_lean_compiler_ir_resetreuse_4__tryS(obj*, obj*, obj*, obj*); -obj* l_Array_anyAux___main___at___private_init_lean_compiler_ir_resetreuse_7__hasCtorUsing___main___spec__1___boxed(obj*, obj*, obj*); +obj* l___private_init_lean_compiler_ir_resetreuse_5__Dfinalize___main___boxed(obj*, obj*, obj*, obj*, obj*); +obj* l_Array_anyMAux___main___at___private_init_lean_compiler_ir_resetreuse_7__hasCtorUsing___main___spec__1___boxed(obj*, obj*, obj*); +obj* l___private_init_lean_compiler_ir_resetreuse_4__tryS(obj*, obj*, obj*, obj*, obj*); obj* l_Lean_Name_getPrefix___main(obj*); uint8 l___private_init_lean_compiler_ir_resetreuse_7__hasCtorUsing___rarg(obj*); obj* l_Lean_IR_FnBody_setBody___main(obj*, obj*); obj* l_Lean_IR_FnBody_body___main(obj*); -obj* l_Array_hmmapAux___main___at___private_init_lean_compiler_ir_resetreuse_9__R___main___spec__2(obj*, obj*, obj*, obj*); +obj* l___private_init_lean_compiler_ir_resetreuse_3__mkFresh___rarg(obj*); obj* l___private_init_lean_compiler_ir_resetreuse_3__mkFresh(obj*); -obj* l___private_init_lean_compiler_ir_resetreuse_6__Dmain___main(obj*, obj*, obj*, obj*); +obj* l___private_init_lean_compiler_ir_resetreuse_6__Dmain___main(obj*, obj*, obj*, obj*, obj*); +obj* l___private_init_lean_compiler_ir_resetreuse_5__Dfinalize___boxed(obj*, obj*, obj*, obj*, obj*); obj* l___private_init_lean_compiler_ir_resetreuse_1__mayReuse___boxed(obj*, obj*); -uint8 l_Lean_IR_HasIndex_visitArg___main(obj*, obj*); obj* l___private_init_lean_compiler_ir_resetreuse_2__S(obj*, obj*, obj*); obj* l___private_init_lean_compiler_ir_resetreuse_7__hasCtorUsing___boxed(obj*); +obj* l_Lean_IR_Decl_insertResetReuse___main___closed__1; uint8 l___private_init_lean_compiler_ir_resetreuse_1__mayReuse(obj* x_0, obj* x_1) { _start: { @@ -337,120 +341,115 @@ goto lbl_4; } case 1: { -obj* x_44; obj* x_46; uint8 x_48; obj* x_49; obj* x_51; obj* x_53; obj* x_57; uint8 x_60; +obj* x_44; obj* x_46; obj* x_48; obj* x_50; obj* x_52; obj* x_56; uint8 x_59; x_44 = lean::cnstr_get(x_2, 0); x_46 = lean::cnstr_get(x_2, 1); -x_48 = lean::cnstr_get_scalar(x_2, sizeof(void*)*4); -x_49 = lean::cnstr_get(x_2, 2); -x_51 = lean::cnstr_get(x_2, 3); +x_48 = lean::cnstr_get(x_2, 2); +x_50 = lean::cnstr_get(x_2, 3); if (lean::is_exclusive(x_2)) { lean::cnstr_set(x_2, 0, lean::box(0)); lean::cnstr_set(x_2, 1, lean::box(0)); lean::cnstr_set(x_2, 2, lean::box(0)); lean::cnstr_set(x_2, 3, lean::box(0)); - x_53 = x_2; + x_52 = x_2; } else { lean::inc(x_44); lean::inc(x_46); - lean::inc(x_49); - lean::inc(x_51); + lean::inc(x_48); + lean::inc(x_50); lean::dec(x_2); - x_53 = lean::box(0); + x_52 = lean::box(0); } -lean::inc(x_49); +lean::inc(x_48); lean::inc(x_1); lean::inc(x_0); -x_57 = l___private_init_lean_compiler_ir_resetreuse_2__S___main(x_0, x_1, x_49); -lean::inc(x_57); -lean::inc(x_49); -x_60 = l_Lean_IR_FnBody_beq(x_49, x_57); -if (x_60 == 0) +x_56 = l___private_init_lean_compiler_ir_resetreuse_2__S___main(x_0, x_1, x_48); +lean::inc(x_56); +lean::inc(x_48); +x_59 = l_Lean_IR_FnBody_beq(x_48, x_56); +if (x_59 == 0) { -obj* x_64; obj* x_65; +obj* x_63; lean::dec(x_1); lean::dec(x_0); -lean::dec(x_49); -if (lean::is_scalar(x_53)) { - x_64 = lean::alloc_cnstr(1, 4, 1); +lean::dec(x_48); +if (lean::is_scalar(x_52)) { + x_63 = lean::alloc_cnstr(1, 4, 0); } else { - x_64 = x_53; + x_63 = x_52; } -lean::cnstr_set(x_64, 0, x_44); -lean::cnstr_set(x_64, 1, x_46); -lean::cnstr_set(x_64, 2, x_57); -lean::cnstr_set(x_64, 3, x_51); -lean::cnstr_set_scalar(x_64, sizeof(void*)*4, x_48); -x_65 = x_64; -return x_65; +lean::cnstr_set(x_63, 0, x_44); +lean::cnstr_set(x_63, 1, x_46); +lean::cnstr_set(x_63, 2, x_56); +lean::cnstr_set(x_63, 3, x_50); +return x_63; } else { -obj* x_67; obj* x_68; obj* x_69; -lean::dec(x_57); -x_67 = l___private_init_lean_compiler_ir_resetreuse_2__S___main(x_0, x_1, x_51); -if (lean::is_scalar(x_53)) { - x_68 = lean::alloc_cnstr(1, 4, 1); +obj* x_65; obj* x_66; +lean::dec(x_56); +x_65 = l___private_init_lean_compiler_ir_resetreuse_2__S___main(x_0, x_1, x_50); +if (lean::is_scalar(x_52)) { + x_66 = lean::alloc_cnstr(1, 4, 0); } else { - x_68 = x_53; + x_66 = x_52; } -lean::cnstr_set(x_68, 0, x_44); -lean::cnstr_set(x_68, 1, x_46); -lean::cnstr_set(x_68, 2, x_49); -lean::cnstr_set(x_68, 3, x_67); -lean::cnstr_set_scalar(x_68, sizeof(void*)*4, x_48); -x_69 = x_68; -return x_69; +lean::cnstr_set(x_66, 0, x_44); +lean::cnstr_set(x_66, 1, x_46); +lean::cnstr_set(x_66, 2, x_48); +lean::cnstr_set(x_66, 3, x_65); +return x_66; } } case 9: { -obj* x_70; obj* x_72; obj* x_74; obj* x_76; obj* x_77; obj* x_78; obj* x_79; -x_70 = lean::cnstr_get(x_2, 0); -x_72 = lean::cnstr_get(x_2, 1); -x_74 = lean::cnstr_get(x_2, 2); +obj* x_67; obj* x_69; obj* x_71; obj* x_73; obj* x_74; obj* x_75; obj* x_76; +x_67 = lean::cnstr_get(x_2, 0); +x_69 = lean::cnstr_get(x_2, 1); +x_71 = lean::cnstr_get(x_2, 2); if (lean::is_exclusive(x_2)) { - x_76 = x_2; + x_73 = x_2; } else { - lean::inc(x_70); - lean::inc(x_72); - lean::inc(x_74); + lean::inc(x_67); + lean::inc(x_69); + lean::inc(x_71); lean::dec(x_2); - x_76 = lean::box(0); + x_73 = lean::box(0); } -x_77 = lean::mk_nat_obj(0ul); -x_78 = l_Array_hmmapAux___main___at___private_init_lean_compiler_ir_resetreuse_2__S___main___spec__1(x_0, x_1, x_77, x_74); -if (lean::is_scalar(x_76)) { - x_79 = lean::alloc_cnstr(9, 3, 0); +x_74 = lean::mk_nat_obj(0ul); +x_75 = l_Array_hmmapAux___main___at___private_init_lean_compiler_ir_resetreuse_2__S___main___spec__1(x_0, x_1, x_74, x_71); +if (lean::is_scalar(x_73)) { + x_76 = lean::alloc_cnstr(9, 3, 0); } else { - x_79 = x_76; + x_76 = x_73; } -lean::cnstr_set(x_79, 0, x_70); -lean::cnstr_set(x_79, 1, x_72); -lean::cnstr_set(x_79, 2, x_78); -return x_79; +lean::cnstr_set(x_76, 0, x_67); +lean::cnstr_set(x_76, 1, x_69); +lean::cnstr_set(x_76, 2, x_75); +return x_76; } default: { -obj* x_80; -x_80 = lean::box(0); -x_3 = x_80; +obj* x_77; +x_77 = lean::box(0); +x_3 = x_77; goto lbl_4; } } lbl_4: { -uint8 x_82; +uint8 x_79; lean::dec(x_3); -x_82 = l_Lean_IR_FnBody_isTerminal___main(x_2); -if (x_82 == 0) +x_79 = l_Lean_IR_FnBody_isTerminal___main(x_2); +if (x_79 == 0) { -obj* x_83; obj* x_84; obj* x_85; obj* x_86; obj* x_87; -x_83 = l_Lean_IR_FnBody_body___main(x_2); -x_84 = lean::box(12); -x_85 = l_Lean_IR_FnBody_setBody___main(x_2, x_84); -x_86 = l___private_init_lean_compiler_ir_resetreuse_2__S___main(x_0, x_1, x_83); -x_87 = l_Lean_IR_FnBody_setBody___main(x_85, x_86); -return x_87; +obj* x_80; obj* x_81; obj* x_82; obj* x_83; obj* x_84; +x_80 = l_Lean_IR_FnBody_body___main(x_2); +x_81 = lean::box(12); +x_82 = l_Lean_IR_FnBody_setBody___main(x_2, x_81); +x_83 = l___private_init_lean_compiler_ir_resetreuse_2__S___main(x_0, x_1, x_80); +x_84 = l_Lean_IR_FnBody_setBody___main(x_82, x_83); +return x_84; } else { @@ -469,7 +468,7 @@ x_3 = l___private_init_lean_compiler_ir_resetreuse_2__S___main(x_0, x_1, x_2); return x_3; } } -obj* l___private_init_lean_compiler_ir_resetreuse_3__mkFresh(obj* x_0) { +obj* l___private_init_lean_compiler_ir_resetreuse_3__mkFresh___rarg(obj* x_0) { _start: { obj* x_1; obj* x_2; obj* x_3; @@ -481,487 +480,623 @@ lean::cnstr_set(x_3, 1, x_2); return x_3; } } -obj* l___private_init_lean_compiler_ir_resetreuse_4__tryS(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { +obj* l___private_init_lean_compiler_ir_resetreuse_3__mkFresh(obj* x_0) { _start: { -obj* x_4; obj* x_5; obj* x_7; obj* x_9; obj* x_12; uint8 x_15; -x_4 = l___private_init_lean_compiler_ir_resetreuse_3__mkFresh(x_3); -x_5 = lean::cnstr_get(x_4, 0); -x_7 = lean::cnstr_get(x_4, 1); -if (lean::is_exclusive(x_4)) { - lean::cnstr_set(x_4, 0, lean::box(0)); - lean::cnstr_set(x_4, 1, lean::box(0)); - x_9 = x_4; +obj* x_1; +x_1 = lean::alloc_closure(reinterpret_cast(l___private_init_lean_compiler_ir_resetreuse_3__mkFresh___rarg), 1, 0); +return x_1; +} +} +obj* l___private_init_lean_compiler_ir_resetreuse_3__mkFresh___boxed(obj* x_0) { +_start: +{ +obj* x_1; +x_1 = l___private_init_lean_compiler_ir_resetreuse_3__mkFresh(x_0); +lean::dec(x_0); +return x_1; +} +} +obj* l___private_init_lean_compiler_ir_resetreuse_4__tryS(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { +_start: +{ +obj* x_5; obj* x_6; obj* x_8; obj* x_10; obj* x_13; uint8 x_16; +x_5 = l___private_init_lean_compiler_ir_resetreuse_3__mkFresh___rarg(x_4); +x_6 = lean::cnstr_get(x_5, 0); +x_8 = lean::cnstr_get(x_5, 1); +if (lean::is_exclusive(x_5)) { + lean::cnstr_set(x_5, 0, lean::box(0)); + lean::cnstr_set(x_5, 1, lean::box(0)); + x_10 = x_5; } else { - lean::inc(x_5); - lean::inc(x_7); - lean::dec(x_4); - x_9 = lean::box(0); + lean::inc(x_6); + lean::inc(x_8); + lean::dec(x_5); + x_10 = lean::box(0); } lean::inc(x_2); +lean::inc(x_6); +x_13 = l___private_init_lean_compiler_ir_resetreuse_2__S___main(x_6, x_1, x_2); +lean::inc(x_13); +lean::inc(x_2); +x_16 = l_Lean_IR_FnBody_beq(x_2, x_13); +if (x_16 == 0) +{ +obj* x_18; uint8 x_19; obj* x_20; obj* x_21; obj* x_22; +lean::dec(x_2); +x_18 = lean::alloc_cnstr(1, 1, 0); +lean::cnstr_set(x_18, 0, x_0); +x_19 = 7; +x_20 = lean::alloc_cnstr(0, 3, 1); +lean::cnstr_set(x_20, 0, x_6); +lean::cnstr_set(x_20, 1, x_18); +lean::cnstr_set(x_20, 2, x_13); +lean::cnstr_set_scalar(x_20, sizeof(void*)*3, x_19); +x_21 = x_20; +if (lean::is_scalar(x_10)) { + x_22 = lean::alloc_cnstr(0, 2, 0); +} else { + x_22 = x_10; +} +lean::cnstr_set(x_22, 0, x_21); +lean::cnstr_set(x_22, 1, x_8); +return x_22; +} +else +{ +obj* x_26; +lean::dec(x_13); +lean::dec(x_6); +lean::dec(x_0); +if (lean::is_scalar(x_10)) { + x_26 = lean::alloc_cnstr(0, 2, 0); +} else { + x_26 = x_10; +} +lean::cnstr_set(x_26, 0, x_2); +lean::cnstr_set(x_26, 1, x_8); +return x_26; +} +} +} +obj* l___private_init_lean_compiler_ir_resetreuse_4__tryS___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { +_start: +{ +obj* x_5; +x_5 = l___private_init_lean_compiler_ir_resetreuse_4__tryS(x_0, x_1, x_2, x_3, x_4); +lean::dec(x_3); +return x_5; +} +} +obj* l___private_init_lean_compiler_ir_resetreuse_5__Dfinalize___main(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { +_start: +{ +obj* x_5; uint8 x_7; +x_5 = lean::cnstr_get(x_2, 1); lean::inc(x_5); -x_12 = l___private_init_lean_compiler_ir_resetreuse_2__S___main(x_5, x_1, x_2); -lean::inc(x_12); -lean::inc(x_2); -x_15 = l_Lean_IR_FnBody_beq(x_2, x_12); -if (x_15 == 0) +x_7 = lean::unbox(x_5); +if (x_7 == 0) { -obj* x_17; uint8 x_18; obj* x_19; obj* x_20; obj* x_21; +obj* x_8; obj* x_11; +x_8 = lean::cnstr_get(x_2, 0); +lean::inc(x_8); lean::dec(x_2); -x_17 = lean::alloc_cnstr(1, 1, 0); -lean::cnstr_set(x_17, 0, x_0); -x_18 = 7; -x_19 = lean::alloc_cnstr(0, 3, 1); -lean::cnstr_set(x_19, 0, x_5); -lean::cnstr_set(x_19, 1, x_17); -lean::cnstr_set(x_19, 2, x_12); -lean::cnstr_set_scalar(x_19, sizeof(void*)*3, x_18); -x_20 = x_19; -if (lean::is_scalar(x_9)) { - x_21 = lean::alloc_cnstr(0, 2, 0); -} else { - x_21 = x_9; -} -lean::cnstr_set(x_21, 0, x_20); -lean::cnstr_set(x_21, 1, x_7); -return x_21; -} -else -{ -obj* x_25; -lean::dec(x_5); -lean::dec(x_12); -lean::dec(x_0); -if (lean::is_scalar(x_9)) { - x_25 = lean::alloc_cnstr(0, 2, 0); -} else { - x_25 = x_9; -} -lean::cnstr_set(x_25, 0, x_2); -lean::cnstr_set(x_25, 1, x_7); -return x_25; -} -} -} -obj* l___private_init_lean_compiler_ir_resetreuse_5__Dfinalize___main(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { -_start: -{ -obj* x_4; uint8 x_6; -x_4 = lean::cnstr_get(x_2, 1); -lean::inc(x_4); -x_6 = lean::unbox(x_4); -if (x_6 == 0) -{ -obj* x_7; obj* x_10; -x_7 = lean::cnstr_get(x_2, 0); -lean::inc(x_7); -lean::dec(x_2); -x_10 = l___private_init_lean_compiler_ir_resetreuse_4__tryS(x_0, x_1, x_7, x_3); -return x_10; -} -else -{ -obj* x_13; obj* x_15; obj* x_16; -lean::dec(x_1); -lean::dec(x_0); -x_13 = lean::cnstr_get(x_2, 0); -if (lean::is_exclusive(x_2)) { - lean::cnstr_release(x_2, 1); - x_15 = x_2; -} else { - lean::inc(x_13); - lean::dec(x_2); - x_15 = lean::box(0); -} -if (lean::is_scalar(x_15)) { - x_16 = lean::alloc_cnstr(0, 2, 0); -} else { - x_16 = x_15; -} -lean::cnstr_set(x_16, 0, x_13); -lean::cnstr_set(x_16, 1, x_3); -return x_16; -} -} -} -obj* l___private_init_lean_compiler_ir_resetreuse_5__Dfinalize(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { -_start: -{ -obj* x_4; -x_4 = l___private_init_lean_compiler_ir_resetreuse_5__Dfinalize___main(x_0, x_1, x_2, x_3); -return x_4; -} -} -obj* l_Array_hmmapAux___main___at___private_init_lean_compiler_ir_resetreuse_6__Dmain___main___spec__1(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { -_start: -{ -obj* x_5; uint8 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) -{ -obj* x_11; -lean::dec(x_1); -lean::dec(x_0); -lean::dec(x_2); -x_11 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_11, 0, x_3); -lean::cnstr_set(x_11, 1, x_4); +x_11 = l___private_init_lean_compiler_ir_resetreuse_4__tryS(x_0, x_1, x_8, x_3, x_4); return x_11; } else { -obj* x_12; obj* x_13; obj* x_14; -x_12 = lean::array_fget(x_3, x_2); -x_13 = l_Array_hmmapAux___main___at___private_init_lean_compiler_ir_resetreuse_2__S___main___spec__1___closed__1; -x_14 = lean::array_fset(x_3, x_2, x_13); -if (lean::obj_tag(x_12) == 0) -{ -obj* x_15; obj* x_17; obj* x_19; obj* x_22; obj* x_23; obj* x_25; obj* x_30; obj* x_31; obj* x_33; obj* x_36; obj* x_37; obj* x_38; obj* x_39; -x_15 = lean::cnstr_get(x_12, 0); -x_17 = lean::cnstr_get(x_12, 1); -if (lean::is_exclusive(x_12)) { - x_19 = x_12; -} else { - lean::inc(x_15); - lean::inc(x_17); - lean::dec(x_12); - x_19 = lean::box(0); -} -lean::inc(x_1); -lean::inc(x_0); -x_22 = l___private_init_lean_compiler_ir_resetreuse_6__Dmain___main(x_0, x_1, x_17, x_4); -x_23 = lean::cnstr_get(x_22, 0); -lean::inc(x_23); -x_25 = lean::cnstr_get(x_22, 1); -lean::inc(x_25); -lean::dec(x_22); -lean::inc(x_1); -lean::inc(x_0); -x_30 = l___private_init_lean_compiler_ir_resetreuse_5__Dfinalize___main(x_0, x_1, x_23, x_25); -x_31 = lean::cnstr_get(x_30, 0); -lean::inc(x_31); -x_33 = lean::cnstr_get(x_30, 1); -lean::inc(x_33); -lean::dec(x_30); -if (lean::is_scalar(x_19)) { - x_36 = lean::alloc_cnstr(0, 2, 0); -} else { - x_36 = x_19; -} -lean::cnstr_set(x_36, 0, x_15); -lean::cnstr_set(x_36, 1, x_31); -x_37 = lean::mk_nat_obj(1ul); -x_38 = lean::nat_add(x_2, x_37); -x_39 = lean::array_fset(x_14, x_2, x_36); -lean::dec(x_2); -x_2 = x_38; -x_3 = x_39; -x_4 = x_33; -goto _start; -} -else -{ -obj* x_42; obj* x_44; obj* x_47; obj* x_48; obj* x_50; obj* x_55; obj* x_56; obj* x_58; obj* x_61; obj* x_62; obj* x_63; obj* x_64; -x_42 = lean::cnstr_get(x_12, 0); -if (lean::is_exclusive(x_12)) { - x_44 = x_12; -} else { - lean::inc(x_42); - lean::dec(x_12); - x_44 = lean::box(0); -} -lean::inc(x_1); -lean::inc(x_0); -x_47 = l___private_init_lean_compiler_ir_resetreuse_6__Dmain___main(x_0, x_1, x_42, x_4); -x_48 = lean::cnstr_get(x_47, 0); -lean::inc(x_48); -x_50 = lean::cnstr_get(x_47, 1); -lean::inc(x_50); -lean::dec(x_47); -lean::inc(x_1); -lean::inc(x_0); -x_55 = l___private_init_lean_compiler_ir_resetreuse_5__Dfinalize___main(x_0, x_1, x_48, x_50); -x_56 = lean::cnstr_get(x_55, 0); -lean::inc(x_56); -x_58 = lean::cnstr_get(x_55, 1); -lean::inc(x_58); -lean::dec(x_55); -if (lean::is_scalar(x_44)) { - x_61 = lean::alloc_cnstr(1, 1, 0); -} else { - x_61 = x_44; -} -lean::cnstr_set(x_61, 0, x_56); -x_62 = lean::mk_nat_obj(1ul); -x_63 = lean::nat_add(x_2, x_62); -x_64 = lean::array_fset(x_14, x_2, x_61); -lean::dec(x_2); -x_2 = x_63; -x_3 = x_64; -x_4 = x_58; -goto _start; -} -} -} -} -obj* l___private_init_lean_compiler_ir_resetreuse_6__Dmain___main(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { -_start: -{ -obj* x_4; -switch (lean::obj_tag(x_2)) { -case 9: -{ -obj* x_6; obj* x_8; obj* x_10; uint8 x_12; -x_6 = lean::cnstr_get(x_2, 0); -lean::inc(x_6); -x_8 = lean::cnstr_get(x_2, 1); -lean::inc(x_8); -x_10 = lean::cnstr_get(x_2, 2); -lean::inc(x_10); -x_12 = l_Lean_IR_HasIndex_visitFnBody___main(x_0, x_2); -if (x_12 == 0) -{ -uint8 x_18; obj* x_19; obj* x_20; obj* x_21; +obj* x_14; obj* x_16; obj* x_17; lean::dec(x_1); lean::dec(x_0); -lean::dec(x_10); +x_14 = lean::cnstr_get(x_2, 0); +if (lean::is_exclusive(x_2)) { + lean::cnstr_release(x_2, 1); + x_16 = x_2; +} else { + lean::inc(x_14); + lean::dec(x_2); + x_16 = lean::box(0); +} +if (lean::is_scalar(x_16)) { + x_17 = lean::alloc_cnstr(0, 2, 0); +} else { + x_17 = x_16; +} +lean::cnstr_set(x_17, 0, x_14); +lean::cnstr_set(x_17, 1, x_4); +return x_17; +} +} +} +obj* l___private_init_lean_compiler_ir_resetreuse_5__Dfinalize___main___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { +_start: +{ +obj* x_5; +x_5 = l___private_init_lean_compiler_ir_resetreuse_5__Dfinalize___main(x_0, x_1, x_2, x_3, x_4); +lean::dec(x_3); +return x_5; +} +} +obj* l___private_init_lean_compiler_ir_resetreuse_5__Dfinalize(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { +_start: +{ +obj* x_5; +x_5 = l___private_init_lean_compiler_ir_resetreuse_5__Dfinalize___main(x_0, x_1, x_2, x_3, x_4); +return x_5; +} +} +obj* l___private_init_lean_compiler_ir_resetreuse_5__Dfinalize___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { +_start: +{ +obj* x_5; +x_5 = l___private_init_lean_compiler_ir_resetreuse_5__Dfinalize(x_0, x_1, x_2, x_3, x_4); +lean::dec(x_3); +return x_5; +} +} +obj* l_Array_hmmapAux___main___at___private_init_lean_compiler_ir_resetreuse_6__Dmain___main___spec__1(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { +_start: +{ +obj* x_6; uint8 x_7; +x_6 = lean::array_get_size(x_3); +x_7 = lean::nat_dec_lt(x_2, x_6); lean::dec(x_6); -lean::dec(x_8); -x_18 = 0; -x_19 = lean::box(x_18); -x_20 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_20, 0, x_2); -lean::cnstr_set(x_20, 1, x_19); -x_21 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_21, 0, x_20); -lean::cnstr_set(x_21, 1, x_3); -return x_21; +if (x_7 == 0) +{ +obj* x_13; +lean::dec(x_4); +lean::dec(x_1); +lean::dec(x_0); +lean::dec(x_2); +x_13 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_13, 0, x_3); +lean::cnstr_set(x_13, 1, x_5); +return x_13; } else { -obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_27; obj* x_29; obj* x_30; uint8 x_31; obj* x_32; obj* x_33; obj* x_34; +obj* x_14; obj* x_15; obj* x_16; +x_14 = lean::array_fget(x_3, x_2); +x_15 = l_Array_hmmapAux___main___at___private_init_lean_compiler_ir_resetreuse_2__S___main___spec__1___closed__1; +x_16 = lean::array_fset(x_3, x_2, x_15); +if (lean::obj_tag(x_14) == 0) +{ +obj* x_17; obj* x_19; obj* x_21; obj* x_25; obj* x_26; obj* x_28; obj* x_33; obj* x_34; obj* x_36; obj* x_39; obj* x_40; obj* x_41; obj* x_42; +x_17 = lean::cnstr_get(x_14, 0); +x_19 = lean::cnstr_get(x_14, 1); +if (lean::is_exclusive(x_14)) { + x_21 = x_14; +} else { + lean::inc(x_17); + lean::inc(x_19); + lean::dec(x_14); + x_21 = lean::box(0); +} +lean::inc(x_4); +lean::inc(x_1); +lean::inc(x_0); +x_25 = l___private_init_lean_compiler_ir_resetreuse_6__Dmain___main(x_0, x_1, x_19, x_4, x_5); +x_26 = lean::cnstr_get(x_25, 0); +lean::inc(x_26); +x_28 = lean::cnstr_get(x_25, 1); +lean::inc(x_28); +lean::dec(x_25); +lean::inc(x_1); +lean::inc(x_0); +x_33 = l___private_init_lean_compiler_ir_resetreuse_5__Dfinalize___main(x_0, x_1, x_26, x_4, x_28); +x_34 = lean::cnstr_get(x_33, 0); +lean::inc(x_34); +x_36 = lean::cnstr_get(x_33, 1); +lean::inc(x_36); +lean::dec(x_33); +if (lean::is_scalar(x_21)) { + x_39 = lean::alloc_cnstr(0, 2, 0); +} else { + x_39 = x_21; +} +lean::cnstr_set(x_39, 0, x_17); +lean::cnstr_set(x_39, 1, x_34); +x_40 = lean::mk_nat_obj(1ul); +x_41 = lean::nat_add(x_2, x_40); +x_42 = lean::array_fset(x_16, x_2, x_39); +lean::dec(x_2); +x_2 = x_41; +x_3 = x_42; +x_5 = x_36; +goto _start; +} +else +{ +obj* x_45; obj* x_47; obj* x_51; obj* x_52; obj* x_54; obj* x_59; obj* x_60; obj* x_62; obj* x_65; obj* x_66; obj* x_67; obj* x_68; +x_45 = lean::cnstr_get(x_14, 0); +if (lean::is_exclusive(x_14)) { + x_47 = x_14; +} else { + lean::inc(x_45); + lean::dec(x_14); + x_47 = lean::box(0); +} +lean::inc(x_4); +lean::inc(x_1); +lean::inc(x_0); +x_51 = l___private_init_lean_compiler_ir_resetreuse_6__Dmain___main(x_0, x_1, x_45, x_4, x_5); +x_52 = lean::cnstr_get(x_51, 0); +lean::inc(x_52); +x_54 = lean::cnstr_get(x_51, 1); +lean::inc(x_54); +lean::dec(x_51); +lean::inc(x_1); +lean::inc(x_0); +x_59 = l___private_init_lean_compiler_ir_resetreuse_5__Dfinalize___main(x_0, x_1, x_52, x_4, x_54); +x_60 = lean::cnstr_get(x_59, 0); +lean::inc(x_60); +x_62 = lean::cnstr_get(x_59, 1); +lean::inc(x_62); +lean::dec(x_59); +if (lean::is_scalar(x_47)) { + x_65 = lean::alloc_cnstr(1, 1, 0); +} else { + x_65 = x_47; +} +lean::cnstr_set(x_65, 0, x_60); +x_66 = lean::mk_nat_obj(1ul); +x_67 = lean::nat_add(x_2, x_66); +x_68 = lean::array_fset(x_16, x_2, x_65); +lean::dec(x_2); +x_2 = x_67; +x_3 = x_68; +x_5 = x_62; +goto _start; +} +} +} +} +obj* l___private_init_lean_compiler_ir_resetreuse_6__Dmain___main(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { +_start: +{ +obj* x_5; +switch (lean::obj_tag(x_2)) { +case 1: +{ +obj* x_7; obj* x_9; obj* x_11; obj* x_13; obj* x_17; obj* x_18; obj* x_21; obj* x_22; obj* x_24; obj* x_27; obj* x_30; obj* x_31; obj* x_33; obj* x_35; obj* x_36; obj* x_38; obj* x_40; obj* x_41; obj* x_42; obj* x_43; +x_7 = lean::cnstr_get(x_2, 0); +lean::inc(x_7); +x_9 = lean::cnstr_get(x_2, 1); +lean::inc(x_9); +x_11 = lean::cnstr_get(x_2, 2); +lean::inc(x_11); +x_13 = lean::cnstr_get(x_2, 3); +lean::inc(x_13); +lean::inc(x_2); +lean::inc(x_3); +x_17 = l_Lean_IR_Context_addDecl(x_3, x_2); if (lean::is_exclusive(x_2)) { lean::cnstr_release(x_2, 0); lean::cnstr_release(x_2, 1); lean::cnstr_release(x_2, 2); - x_22 = x_2; + lean::cnstr_release(x_2, 3); + x_18 = x_2; } else { lean::dec(x_2); - x_22 = lean::box(0); + x_18 = lean::box(0); } -x_23 = lean::mk_nat_obj(0ul); -x_24 = l_Array_hmmapAux___main___at___private_init_lean_compiler_ir_resetreuse_6__Dmain___main___spec__1(x_0, x_1, x_23, x_10, x_3); -x_25 = lean::cnstr_get(x_24, 0); -x_27 = lean::cnstr_get(x_24, 1); -if (lean::is_exclusive(x_24)) { - x_29 = x_24; +lean::inc(x_1); +lean::inc(x_0); +x_21 = l___private_init_lean_compiler_ir_resetreuse_6__Dmain___main(x_0, x_1, x_13, x_17, x_4); +x_22 = lean::cnstr_get(x_21, 0); +lean::inc(x_22); +x_24 = lean::cnstr_get(x_21, 1); +lean::inc(x_24); +lean::dec(x_21); +x_27 = lean::cnstr_get(x_22, 0); +lean::inc(x_27); +lean::dec(x_22); +x_30 = l___private_init_lean_compiler_ir_resetreuse_6__Dmain___main(x_0, x_1, x_11, x_3, x_24); +x_31 = lean::cnstr_get(x_30, 0); +x_33 = lean::cnstr_get(x_30, 1); +if (lean::is_exclusive(x_30)) { + x_35 = x_30; } else { - lean::inc(x_25); - lean::inc(x_27); - lean::dec(x_24); - x_29 = lean::box(0); + lean::inc(x_31); + lean::inc(x_33); + lean::dec(x_30); + x_35 = lean::box(0); } -if (lean::is_scalar(x_22)) { - x_30 = lean::alloc_cnstr(9, 3, 0); +x_36 = lean::cnstr_get(x_31, 0); +x_38 = lean::cnstr_get(x_31, 1); +if (lean::is_exclusive(x_31)) { + x_40 = x_31; } else { - x_30 = x_22; + lean::inc(x_36); + lean::inc(x_38); + lean::dec(x_31); + x_40 = lean::box(0); } -lean::cnstr_set(x_30, 0, x_6); -lean::cnstr_set(x_30, 1, x_8); -lean::cnstr_set(x_30, 2, x_25); -x_31 = 1; -x_32 = lean::box(x_31); -if (lean::is_scalar(x_29)) { - x_33 = lean::alloc_cnstr(0, 2, 0); +if (lean::is_scalar(x_18)) { + x_41 = lean::alloc_cnstr(1, 4, 0); } else { - x_33 = x_29; + x_41 = x_18; } -lean::cnstr_set(x_33, 0, x_30); -lean::cnstr_set(x_33, 1, x_32); -x_34 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_34, 0, x_33); -lean::cnstr_set(x_34, 1, x_27); -return x_34; +lean::cnstr_set(x_41, 0, x_7); +lean::cnstr_set(x_41, 1, x_9); +lean::cnstr_set(x_41, 2, x_36); +lean::cnstr_set(x_41, 3, x_27); +if (lean::is_scalar(x_40)) { + x_42 = lean::alloc_cnstr(0, 2, 0); +} else { + x_42 = x_40; +} +lean::cnstr_set(x_42, 0, x_41); +lean::cnstr_set(x_42, 1, x_38); +if (lean::is_scalar(x_35)) { + x_43 = lean::alloc_cnstr(0, 2, 0); +} else { + x_43 = x_35; +} +lean::cnstr_set(x_43, 0, x_42); +lean::cnstr_set(x_43, 1, x_33); +return x_43; +} +case 9: +{ +obj* x_44; obj* x_46; obj* x_48; obj* x_52; uint8 x_53; +x_44 = lean::cnstr_get(x_2, 0); +lean::inc(x_44); +x_46 = lean::cnstr_get(x_2, 1); +lean::inc(x_46); +x_48 = lean::cnstr_get(x_2, 2); +lean::inc(x_48); +lean::inc(x_3); +lean::inc(x_2); +x_52 = l_Lean_IR_FnBody_hasLiveVar(x_2, x_3, x_0); +x_53 = lean::unbox(x_52); +if (x_53 == 0) +{ +uint8 x_60; obj* x_61; obj* x_62; obj* x_63; +lean::dec(x_1); +lean::dec(x_3); +lean::dec(x_0); +lean::dec(x_44); +lean::dec(x_46); +lean::dec(x_48); +x_60 = 0; +x_61 = lean::box(x_60); +x_62 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_62, 0, x_2); +lean::cnstr_set(x_62, 1, x_61); +x_63 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_63, 0, x_62); +lean::cnstr_set(x_63, 1, x_4); +return x_63; +} +else +{ +obj* x_64; obj* x_65; obj* x_66; obj* x_67; obj* x_69; obj* x_71; obj* x_72; uint8 x_73; obj* x_74; obj* x_75; obj* x_76; +if (lean::is_exclusive(x_2)) { + lean::cnstr_release(x_2, 0); + lean::cnstr_release(x_2, 1); + lean::cnstr_release(x_2, 2); + x_64 = x_2; +} else { + lean::dec(x_2); + x_64 = lean::box(0); +} +x_65 = lean::mk_nat_obj(0ul); +x_66 = l_Array_hmmapAux___main___at___private_init_lean_compiler_ir_resetreuse_6__Dmain___main___spec__1(x_0, x_1, x_65, x_48, x_3, x_4); +x_67 = lean::cnstr_get(x_66, 0); +x_69 = lean::cnstr_get(x_66, 1); +if (lean::is_exclusive(x_66)) { + x_71 = x_66; +} else { + lean::inc(x_67); + lean::inc(x_69); + lean::dec(x_66); + x_71 = lean::box(0); +} +if (lean::is_scalar(x_64)) { + x_72 = lean::alloc_cnstr(9, 3, 0); +} else { + x_72 = x_64; +} +lean::cnstr_set(x_72, 0, x_44); +lean::cnstr_set(x_72, 1, x_46); +lean::cnstr_set(x_72, 2, x_67); +x_73 = 1; +x_74 = lean::box(x_73); +if (lean::is_scalar(x_71)) { + x_75 = lean::alloc_cnstr(0, 2, 0); +} else { + x_75 = x_71; +} +lean::cnstr_set(x_75, 0, x_72); +lean::cnstr_set(x_75, 1, x_74); +x_76 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_76, 0, x_75); +lean::cnstr_set(x_76, 1, x_69); +return x_76; } } default: { -obj* x_35; -x_35 = lean::box(0); -x_4 = x_35; -goto lbl_5; +obj* x_77; +x_77 = lean::box(0); +x_5 = x_77; +goto lbl_6; } } -lbl_5: +lbl_6: { -uint8 x_37; -lean::dec(x_4); -x_37 = l_Lean_IR_FnBody_isTerminal___main(x_2); -if (x_37 == 0) +uint8 x_79; +lean::dec(x_5); +x_79 = l_Lean_IR_FnBody_isTerminal___main(x_2); +if (x_79 == 0) { -obj* x_38; obj* x_39; obj* x_40; obj* x_43; obj* x_44; obj* x_46; uint8 x_48; -x_38 = l_Lean_IR_FnBody_body___main(x_2); -x_39 = lean::box(12); -x_40 = l_Lean_IR_FnBody_setBody___main(x_2, x_39); +obj* x_80; obj* x_81; obj* x_82; obj* x_86; obj* x_87; obj* x_89; uint8 x_91; +x_80 = l_Lean_IR_FnBody_body___main(x_2); +x_81 = lean::box(12); +x_82 = l_Lean_IR_FnBody_setBody___main(x_2, x_81); +lean::inc(x_3); lean::inc(x_1); lean::inc(x_0); -x_43 = l___private_init_lean_compiler_ir_resetreuse_6__Dmain___main(x_0, x_1, x_38, x_3); -x_44 = lean::cnstr_get(x_43, 0); -lean::inc(x_44); -x_46 = lean::cnstr_get(x_44, 1); -lean::inc(x_46); -x_48 = lean::unbox(x_46); -if (x_48 == 0) +x_86 = l___private_init_lean_compiler_ir_resetreuse_6__Dmain___main(x_0, x_1, x_80, x_3, x_4); +x_87 = lean::cnstr_get(x_86, 0); +lean::inc(x_87); +x_89 = lean::cnstr_get(x_87, 1); +lean::inc(x_89); +x_91 = lean::unbox(x_89); +if (x_91 == 0) { -obj* x_49; obj* x_51; obj* x_52; obj* x_54; uint8 x_55; -x_49 = lean::cnstr_get(x_43, 1); -if (lean::is_exclusive(x_43)) { - lean::cnstr_release(x_43, 0); - lean::cnstr_set(x_43, 1, lean::box(0)); - x_51 = x_43; +obj* x_92; obj* x_94; obj* x_95; obj* x_97; uint8 x_98; +x_92 = lean::cnstr_get(x_86, 1); +if (lean::is_exclusive(x_86)) { + lean::cnstr_release(x_86, 0); + lean::cnstr_set(x_86, 1, lean::box(0)); + x_94 = x_86; } else { - lean::inc(x_49); - lean::dec(x_43); - x_51 = lean::box(0); + lean::inc(x_92); + lean::dec(x_86); + x_94 = lean::box(0); } -x_52 = lean::cnstr_get(x_44, 0); -if (lean::is_exclusive(x_44)) { - lean::cnstr_set(x_44, 0, lean::box(0)); - lean::cnstr_release(x_44, 1); - x_54 = x_44; +x_95 = lean::cnstr_get(x_87, 0); +if (lean::is_exclusive(x_87)) { + lean::cnstr_set(x_87, 0, lean::box(0)); + lean::cnstr_release(x_87, 1); + x_97 = x_87; } else { - lean::inc(x_52); - lean::dec(x_44); - x_54 = lean::box(0); + lean::inc(x_95); + lean::dec(x_87); + x_97 = lean::box(0); } -x_55 = l_Lean_IR_HasIndex_visitFnBody___main(x_0, x_40); -if (x_55 == 0) +x_98 = l_Lean_IR_HasIndex_visitFnBody___main(x_0, x_82); +if (x_98 == 0) { -obj* x_58; obj* x_59; obj* x_60; +obj* x_102; obj* x_103; obj* x_104; lean::dec(x_1); +lean::dec(x_3); lean::dec(x_0); -x_58 = l_Lean_IR_FnBody_setBody___main(x_40, x_52); -if (lean::is_scalar(x_54)) { - x_59 = lean::alloc_cnstr(0, 2, 0); +x_102 = l_Lean_IR_FnBody_setBody___main(x_82, x_95); +if (lean::is_scalar(x_97)) { + x_103 = lean::alloc_cnstr(0, 2, 0); } else { - x_59 = x_54; + x_103 = x_97; } -lean::cnstr_set(x_59, 0, x_58); -lean::cnstr_set(x_59, 1, x_46); -if (lean::is_scalar(x_51)) { - x_60 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_103, 0, x_102); +lean::cnstr_set(x_103, 1, x_89); +if (lean::is_scalar(x_94)) { + x_104 = lean::alloc_cnstr(0, 2, 0); } else { - x_60 = x_51; + x_104 = x_94; } -lean::cnstr_set(x_60, 0, x_59); -lean::cnstr_set(x_60, 1, x_49); -return x_60; +lean::cnstr_set(x_104, 0, x_103); +lean::cnstr_set(x_104, 1, x_92); +return x_104; } else { -obj* x_62; obj* x_63; obj* x_65; obj* x_67; obj* x_68; uint8 x_69; obj* x_70; obj* x_71; obj* x_72; -lean::dec(x_51); -x_62 = l___private_init_lean_compiler_ir_resetreuse_4__tryS(x_0, x_1, x_52, x_49); -x_63 = lean::cnstr_get(x_62, 0); -x_65 = lean::cnstr_get(x_62, 1); -if (lean::is_exclusive(x_62)) { - x_67 = x_62; +obj* x_106; obj* x_108; obj* x_110; obj* x_112; obj* x_113; uint8 x_114; obj* x_115; obj* x_116; obj* x_117; +lean::dec(x_94); +x_106 = l___private_init_lean_compiler_ir_resetreuse_4__tryS(x_0, x_1, x_95, x_3, x_92); +lean::dec(x_3); +x_108 = lean::cnstr_get(x_106, 0); +x_110 = lean::cnstr_get(x_106, 1); +if (lean::is_exclusive(x_106)) { + x_112 = x_106; } else { - lean::inc(x_63); - lean::inc(x_65); - lean::dec(x_62); - x_67 = lean::box(0); + lean::inc(x_108); + lean::inc(x_110); + lean::dec(x_106); + x_112 = lean::box(0); } -x_68 = l_Lean_IR_FnBody_setBody___main(x_40, x_63); -x_69 = 1; -x_70 = lean::box(x_69); -if (lean::is_scalar(x_67)) { - x_71 = lean::alloc_cnstr(0, 2, 0); +x_113 = l_Lean_IR_FnBody_setBody___main(x_82, x_108); +x_114 = 1; +x_115 = lean::box(x_114); +if (lean::is_scalar(x_112)) { + x_116 = lean::alloc_cnstr(0, 2, 0); } else { - x_71 = x_67; + x_116 = x_112; } -lean::cnstr_set(x_71, 0, x_68); -lean::cnstr_set(x_71, 1, x_70); -if (lean::is_scalar(x_54)) { - x_72 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_116, 0, x_113); +lean::cnstr_set(x_116, 1, x_115); +if (lean::is_scalar(x_97)) { + x_117 = lean::alloc_cnstr(0, 2, 0); } else { - x_72 = x_54; + x_117 = x_97; } -lean::cnstr_set(x_72, 0, x_71); -lean::cnstr_set(x_72, 1, x_65); -return x_72; +lean::cnstr_set(x_117, 0, x_116); +lean::cnstr_set(x_117, 1, x_110); +return x_117; } } else { -obj* x_75; obj* x_77; obj* x_78; obj* x_80; obj* x_81; obj* x_82; obj* x_83; +obj* x_121; obj* x_123; obj* x_124; obj* x_126; obj* x_127; obj* x_128; obj* x_129; lean::dec(x_1); +lean::dec(x_3); lean::dec(x_0); -x_75 = lean::cnstr_get(x_43, 1); -if (lean::is_exclusive(x_43)) { - lean::cnstr_release(x_43, 0); - x_77 = x_43; +x_121 = lean::cnstr_get(x_86, 1); +if (lean::is_exclusive(x_86)) { + lean::cnstr_release(x_86, 0); + x_123 = x_86; } else { - lean::inc(x_75); - lean::dec(x_43); - x_77 = lean::box(0); + lean::inc(x_121); + lean::dec(x_86); + x_123 = lean::box(0); } -x_78 = lean::cnstr_get(x_44, 0); -if (lean::is_exclusive(x_44)) { - lean::cnstr_release(x_44, 1); - x_80 = x_44; +x_124 = lean::cnstr_get(x_87, 0); +if (lean::is_exclusive(x_87)) { + lean::cnstr_release(x_87, 1); + x_126 = x_87; } else { - lean::inc(x_78); - lean::dec(x_44); - x_80 = lean::box(0); + lean::inc(x_124); + lean::dec(x_87); + x_126 = lean::box(0); } -x_81 = l_Lean_IR_FnBody_setBody___main(x_40, x_78); -if (lean::is_scalar(x_80)) { - x_82 = lean::alloc_cnstr(0, 2, 0); +x_127 = l_Lean_IR_FnBody_setBody___main(x_82, x_124); +if (lean::is_scalar(x_126)) { + x_128 = lean::alloc_cnstr(0, 2, 0); } else { - x_82 = x_80; + x_128 = x_126; } -lean::cnstr_set(x_82, 0, x_81); -lean::cnstr_set(x_82, 1, x_46); -if (lean::is_scalar(x_77)) { - x_83 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_128, 0, x_127); +lean::cnstr_set(x_128, 1, x_89); +if (lean::is_scalar(x_123)) { + x_129 = lean::alloc_cnstr(0, 2, 0); } else { - x_83 = x_77; + x_129 = x_123; } -lean::cnstr_set(x_83, 0, x_82); -lean::cnstr_set(x_83, 1, x_75); -return x_83; +lean::cnstr_set(x_129, 0, x_128); +lean::cnstr_set(x_129, 1, x_121); +return x_129; } } else { -uint8 x_85; obj* x_87; obj* x_88; obj* x_89; +obj* x_132; obj* x_134; obj* x_135; lean::dec(x_1); -x_85 = l_Lean_IR_HasIndex_visitFnBody___main(x_0, x_2); +lean::inc(x_2); +x_132 = l_Lean_IR_FnBody_hasLiveVar(x_2, x_3, x_0); lean::dec(x_0); -x_87 = lean::box(x_85); -x_88 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_88, 0, x_2); -lean::cnstr_set(x_88, 1, x_87); -x_89 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_89, 0, x_88); -lean::cnstr_set(x_89, 1, x_3); -return x_89; +x_134 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_134, 0, x_2); +lean::cnstr_set(x_134, 1, x_132); +x_135 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_135, 0, x_134); +lean::cnstr_set(x_135, 1, x_4); +return x_135; } } } } -obj* l___private_init_lean_compiler_ir_resetreuse_6__Dmain(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { +obj* l___private_init_lean_compiler_ir_resetreuse_6__Dmain(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { -obj* x_4; -x_4 = l___private_init_lean_compiler_ir_resetreuse_6__Dmain___main(x_0, x_1, x_2, x_3); -return x_4; +obj* x_5; +x_5 = l___private_init_lean_compiler_ir_resetreuse_6__Dmain___main(x_0, x_1, x_2, x_3, x_4); +return x_5; } } -uint8 l_Array_anyAux___main___at___private_init_lean_compiler_ir_resetreuse_7__hasCtorUsing___main___spec__1(obj* x_0, obj* x_1, obj* x_2) { +uint8 l_Array_anyMAux___main___at___private_init_lean_compiler_ir_resetreuse_7__hasCtorUsing___main___spec__1(obj* x_0, obj* x_1, obj* x_2) { _start: { obj* x_3; uint8 x_4; @@ -977,25 +1112,39 @@ return x_7; } else { -obj* x_8; uint8 x_9; +obj* x_8; x_8 = lean::array_fget(x_1, x_2); -x_9 = l_Lean_IR_HasIndex_visitArg___main(x_0, x_8); -lean::dec(x_8); -if (x_9 == 0) +if (lean::obj_tag(x_8) == 0) { -obj* x_11; obj* x_12; -x_11 = lean::mk_nat_obj(1ul); -x_12 = lean::nat_add(x_2, x_11); +obj* x_9; uint8 x_12; +x_9 = lean::cnstr_get(x_8, 0); +lean::inc(x_9); +lean::dec(x_8); +x_12 = lean::nat_dec_eq(x_0, x_9); +lean::dec(x_9); +if (x_12 == 0) +{ +obj* x_14; obj* x_15; +x_14 = lean::mk_nat_obj(1ul); +x_15 = lean::nat_add(x_2, x_14); lean::dec(x_2); -x_2 = x_12; +x_2 = x_15; goto _start; } else { -uint8 x_16; lean::dec(x_2); -x_16 = 1; -return x_16; +return x_12; +} +} +else +{ +obj* x_19; obj* x_20; +x_19 = lean::mk_nat_obj(1ul); +x_20 = lean::nat_add(x_2, x_19); +lean::dec(x_2); +x_2 = x_20; +goto _start; } } } @@ -1023,7 +1172,7 @@ x_10 = lean::cnstr_get(x_3, 1); lean::inc(x_10); lean::dec(x_3); x_13 = lean::mk_nat_obj(0ul); -x_14 = l_Array_anyAux___main___at___private_init_lean_compiler_ir_resetreuse_7__hasCtorUsing___main___spec__1(x_5, x_10, x_13); +x_14 = l_Array_anyMAux___main___at___private_init_lean_compiler_ir_resetreuse_7__hasCtorUsing___main___spec__1(x_5, x_10, x_13); lean::dec(x_10); lean::dec(x_5); if (x_14 == 0) @@ -1049,42 +1198,64 @@ goto lbl_2; } } } +case 1: +{ +obj* x_22; obj* x_24; uint8 x_27; +x_22 = lean::cnstr_get(x_0, 2); +lean::inc(x_22); +x_24 = lean::cnstr_get(x_0, 3); +lean::inc(x_24); +lean::dec(x_0); +x_27 = l___private_init_lean_compiler_ir_resetreuse_7__hasCtorUsing___main(x_22); +if (x_27 == 0) +{ +x_0 = x_24; +goto _start; +} +else +{ +uint8 x_30; +lean::dec(x_24); +x_30 = 1; +return x_30; +} +} default: { -obj* x_22; -x_22 = lean::box(0); -x_1 = x_22; +obj* x_31; +x_31 = lean::box(0); +x_1 = x_31; goto lbl_2; } } lbl_2: { -uint8 x_24; +uint8 x_33; lean::dec(x_1); -x_24 = l_Lean_IR_FnBody_isTerminal___main(x_0); -if (x_24 == 0) +x_33 = l_Lean_IR_FnBody_isTerminal___main(x_0); +if (x_33 == 0) { -obj* x_25; -x_25 = l_Lean_IR_FnBody_body___main(x_0); +obj* x_34; +x_34 = l_Lean_IR_FnBody_body___main(x_0); lean::dec(x_0); -x_0 = x_25; +x_0 = x_34; goto _start; } else { -uint8 x_29; +uint8 x_38; lean::dec(x_0); -x_29 = 0; -return x_29; +x_38 = 0; +return x_38; } } } } -obj* l_Array_anyAux___main___at___private_init_lean_compiler_ir_resetreuse_7__hasCtorUsing___main___spec__1___boxed(obj* x_0, obj* x_1, obj* x_2) { +obj* l_Array_anyMAux___main___at___private_init_lean_compiler_ir_resetreuse_7__hasCtorUsing___main___spec__1___boxed(obj* x_0, obj* x_1, obj* x_2) { _start: { uint8 x_3; obj* x_4; -x_3 = l_Array_anyAux___main___at___private_init_lean_compiler_ir_resetreuse_7__hasCtorUsing___main___spec__1(x_0, x_1, x_2); +x_3 = l_Array_anyMAux___main___at___private_init_lean_compiler_ir_resetreuse_7__hasCtorUsing___main___spec__1(x_0, x_1, x_2); x_4 = lean::box(x_3); lean::dec(x_0); lean::dec(x_1); @@ -1134,258 +1305,182 @@ lean::dec(x_0); return x_1; } } -obj* l___private_init_lean_compiler_ir_resetreuse_8__D(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { +obj* l___private_init_lean_compiler_ir_resetreuse_8__D(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { -uint8 x_5; +uint8 x_6; lean::inc(x_2); -x_5 = l___private_init_lean_compiler_ir_resetreuse_7__hasCtorUsing___main(x_2); -if (x_5 == 0) +x_6 = l___private_init_lean_compiler_ir_resetreuse_7__hasCtorUsing___main(x_2); +if (x_6 == 0) { -obj* x_8; obj* x_9; obj* x_11; obj* x_14; +obj* x_10; obj* x_11; obj* x_13; obj* x_16; +lean::inc(x_3); lean::inc(x_1); lean::inc(x_0); -x_8 = l___private_init_lean_compiler_ir_resetreuse_6__Dmain___main(x_0, x_1, x_2, x_3); -x_9 = lean::cnstr_get(x_8, 0); -lean::inc(x_9); -x_11 = lean::cnstr_get(x_8, 1); +x_10 = l___private_init_lean_compiler_ir_resetreuse_6__Dmain___main(x_0, x_1, x_2, x_3, x_4); +x_11 = lean::cnstr_get(x_10, 0); lean::inc(x_11); -lean::dec(x_8); -x_14 = l___private_init_lean_compiler_ir_resetreuse_5__Dfinalize___main(x_0, x_1, x_9, x_11); -return x_14; -} -else -{ -obj* x_17; -lean::dec(x_1); -lean::dec(x_0); -x_17 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_17, 0, x_2); -lean::cnstr_set(x_17, 1, x_3); -return x_17; -} -} -} -obj* l_Array_hmmapAux___main___at___private_init_lean_compiler_ir_resetreuse_9__R___main___spec__1(obj* x_0, obj* x_1, obj* x_2) { -_start: -{ -obj* x_3; uint8 x_4; -x_3 = lean::array_get_size(x_1); -x_4 = lean::nat_dec_lt(x_0, x_3); -lean::dec(x_3); -if (x_4 == 0) -{ -obj* x_7; -lean::dec(x_0); -x_7 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_7, 0, x_1); -lean::cnstr_set(x_7, 1, x_2); -return x_7; -} -else -{ -obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; -x_8 = lean::array_fget(x_1, x_0); -x_9 = lean::box(12); -x_10 = lean::array_fset(x_1, x_0, x_9); -switch (lean::obj_tag(x_8)) { -case 1: -{ -obj* x_14; obj* x_16; uint8 x_18; obj* x_19; obj* x_21; obj* x_23; obj* x_24; obj* x_25; obj* x_27; obj* x_30; obj* x_31; -x_14 = lean::cnstr_get(x_8, 0); -x_16 = lean::cnstr_get(x_8, 1); -x_18 = lean::cnstr_get_scalar(x_8, sizeof(void*)*4); -x_19 = lean::cnstr_get(x_8, 2); -x_21 = lean::cnstr_get(x_8, 3); -if (lean::is_exclusive(x_8)) { - x_23 = x_8; -} else { - lean::inc(x_14); - lean::inc(x_16); - lean::inc(x_19); - lean::inc(x_21); - lean::dec(x_8); - x_23 = lean::box(0); -} -x_24 = l___private_init_lean_compiler_ir_resetreuse_9__R___main(x_19, x_2); -x_25 = lean::cnstr_get(x_24, 0); -lean::inc(x_25); -x_27 = lean::cnstr_get(x_24, 1); -lean::inc(x_27); -lean::dec(x_24); -if (lean::is_scalar(x_23)) { - x_30 = lean::alloc_cnstr(1, 4, 1); -} else { - x_30 = x_23; -} -lean::cnstr_set(x_30, 0, x_14); -lean::cnstr_set(x_30, 1, x_16); -lean::cnstr_set(x_30, 2, x_25); -lean::cnstr_set(x_30, 3, x_21); -lean::cnstr_set_scalar(x_30, sizeof(void*)*4, x_18); -x_31 = x_30; -x_11 = x_31; -x_12 = x_27; -goto lbl_13; -} -default: -{ -x_11 = x_8; -x_12 = x_2; -goto lbl_13; -} -} -lbl_13: -{ -obj* x_32; obj* x_33; obj* x_34; -x_32 = lean::mk_nat_obj(1ul); -x_33 = lean::nat_add(x_0, x_32); -x_34 = lean::array_fset(x_10, x_0, x_11); -lean::dec(x_0); -x_0 = x_33; -x_1 = x_34; -x_2 = x_12; -goto _start; -} -} -} -} -obj* l_Array_hmmapAux___main___at___private_init_lean_compiler_ir_resetreuse_9__R___main___spec__2(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { -_start: -{ -obj* x_4; uint8 x_5; -x_4 = lean::array_get_size(x_2); -x_5 = lean::nat_dec_lt(x_1, x_4); -lean::dec(x_4); -if (x_5 == 0) -{ -obj* x_9; -lean::dec(x_1); -lean::dec(x_0); -x_9 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_9, 0, x_2); -lean::cnstr_set(x_9, 1, x_3); -return x_9; -} -else -{ -obj* x_10; obj* x_11; obj* x_12; -x_10 = lean::array_fget(x_2, x_1); -x_11 = l_Array_hmmapAux___main___at___private_init_lean_compiler_ir_resetreuse_2__S___main___spec__1___closed__1; -x_12 = lean::array_fset(x_2, x_1, x_11); -if (lean::obj_tag(x_10) == 0) -{ -obj* x_13; obj* x_15; obj* x_17; obj* x_18; obj* x_19; obj* x_21; obj* x_26; obj* x_27; obj* x_29; obj* x_32; obj* x_33; obj* x_34; obj* x_35; -x_13 = lean::cnstr_get(x_10, 0); -x_15 = lean::cnstr_get(x_10, 1); -if (lean::is_exclusive(x_10)) { - x_17 = x_10; -} else { - lean::inc(x_13); - lean::inc(x_15); - lean::dec(x_10); - x_17 = lean::box(0); -} -x_18 = l___private_init_lean_compiler_ir_resetreuse_9__R___main(x_15, x_3); -x_19 = lean::cnstr_get(x_18, 0); -lean::inc(x_19); -x_21 = lean::cnstr_get(x_18, 1); -lean::inc(x_21); -lean::dec(x_18); +x_13 = lean::cnstr_get(x_10, 1); lean::inc(x_13); -lean::inc(x_0); -x_26 = l___private_init_lean_compiler_ir_resetreuse_8__D(x_0, x_13, x_19, x_21); -x_27 = lean::cnstr_get(x_26, 0); -lean::inc(x_27); -x_29 = lean::cnstr_get(x_26, 1); -lean::inc(x_29); -lean::dec(x_26); -if (lean::is_scalar(x_17)) { - x_32 = lean::alloc_cnstr(0, 2, 0); -} else { - x_32 = x_17; -} -lean::cnstr_set(x_32, 0, x_13); -lean::cnstr_set(x_32, 1, x_27); -x_33 = lean::mk_nat_obj(1ul); -x_34 = lean::nat_add(x_1, x_33); -x_35 = lean::array_fset(x_12, x_1, x_32); -lean::dec(x_1); -x_1 = x_34; -x_2 = x_35; -x_3 = x_29; -goto _start; +lean::dec(x_10); +x_16 = l___private_init_lean_compiler_ir_resetreuse_5__Dfinalize___main(x_0, x_1, x_11, x_3, x_13); +lean::dec(x_3); +return x_16; } else { -obj* x_38; obj* x_40; obj* x_41; obj* x_42; obj* x_44; obj* x_47; obj* x_48; obj* x_49; obj* x_50; -x_38 = lean::cnstr_get(x_10, 0); -if (lean::is_exclusive(x_10)) { - x_40 = x_10; -} else { - lean::inc(x_38); - lean::dec(x_10); - x_40 = lean::box(0); -} -x_41 = l___private_init_lean_compiler_ir_resetreuse_9__R___main(x_38, x_3); -x_42 = lean::cnstr_get(x_41, 0); -lean::inc(x_42); -x_44 = lean::cnstr_get(x_41, 1); -lean::inc(x_44); -lean::dec(x_41); -if (lean::is_scalar(x_40)) { - x_47 = lean::alloc_cnstr(1, 1, 0); -} else { - x_47 = x_40; -} -lean::cnstr_set(x_47, 0, x_42); -x_48 = lean::mk_nat_obj(1ul); -x_49 = lean::nat_add(x_1, x_48); -x_50 = lean::array_fset(x_12, x_1, x_47); +obj* x_21; lean::dec(x_1); -x_1 = x_49; -x_2 = x_50; -x_3 = x_44; -goto _start; +lean::dec(x_3); +lean::dec(x_0); +x_21 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_21, 0, x_2); +lean::cnstr_set(x_21, 1, x_4); +return x_21; } } } -} -obj* l___private_init_lean_compiler_ir_resetreuse_9__R___main(obj* x_0, obj* x_1) { +obj* l_Array_hmmapAux___main___at___private_init_lean_compiler_ir_resetreuse_9__R___main___spec__1(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { -obj* x_2; obj* x_3; obj* x_5; obj* x_8; obj* x_9; -x_2 = l_Lean_IR_FnBody_flatten(x_0); -x_3 = lean::cnstr_get(x_2, 0); -lean::inc(x_3); -x_5 = lean::cnstr_get(x_2, 1); -lean::inc(x_5); -lean::dec(x_2); -x_8 = lean::mk_nat_obj(0ul); -x_9 = l_Array_hmmapAux___main___at___private_init_lean_compiler_ir_resetreuse_9__R___main___spec__1(x_8, x_3, x_1); -switch (lean::obj_tag(x_5)) { -case 9: +obj* x_5; uint8 x_6; +x_5 = lean::array_get_size(x_2); +x_6 = lean::nat_dec_lt(x_1, x_5); +lean::dec(x_5); +if (x_6 == 0) { -obj* x_10; obj* x_12; obj* x_15; obj* x_17; obj* x_19; obj* x_21; obj* x_23; obj* x_24; obj* x_26; obj* x_28; obj* x_29; obj* x_30; obj* x_31; -x_10 = lean::cnstr_get(x_9, 0); -lean::inc(x_10); -x_12 = lean::cnstr_get(x_9, 1); -lean::inc(x_12); -lean::dec(x_9); -x_15 = lean::cnstr_get(x_5, 0); -x_17 = lean::cnstr_get(x_5, 1); -x_19 = lean::cnstr_get(x_5, 2); -if (lean::is_exclusive(x_5)) { - x_21 = x_5; +obj* x_11; +lean::dec(x_1); +lean::dec(x_3); +lean::dec(x_0); +x_11 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_11, 0, x_2); +lean::cnstr_set(x_11, 1, x_4); +return x_11; +} +else +{ +obj* x_12; obj* x_13; obj* x_14; +x_12 = lean::array_fget(x_2, x_1); +x_13 = l_Array_hmmapAux___main___at___private_init_lean_compiler_ir_resetreuse_2__S___main___spec__1___closed__1; +x_14 = lean::array_fset(x_2, x_1, x_13); +if (lean::obj_tag(x_12) == 0) +{ +obj* x_15; obj* x_17; obj* x_19; obj* x_21; obj* x_22; obj* x_24; obj* x_30; obj* x_31; obj* x_33; obj* x_36; obj* x_37; obj* x_38; obj* x_39; +x_15 = lean::cnstr_get(x_12, 0); +x_17 = lean::cnstr_get(x_12, 1); +if (lean::is_exclusive(x_12)) { + x_19 = x_12; } else { lean::inc(x_15); lean::inc(x_17); - lean::inc(x_19); - lean::dec(x_5); - x_21 = lean::box(0); + lean::dec(x_12); + x_19 = lean::box(0); } +lean::inc(x_3); +x_21 = l___private_init_lean_compiler_ir_resetreuse_9__R___main(x_17, x_3, x_4); +x_22 = lean::cnstr_get(x_21, 0); +lean::inc(x_22); +x_24 = lean::cnstr_get(x_21, 1); +lean::inc(x_24); +lean::dec(x_21); +lean::inc(x_3); +lean::inc(x_15); +lean::inc(x_0); +x_30 = l___private_init_lean_compiler_ir_resetreuse_8__D(x_0, x_15, x_22, x_3, x_24); +x_31 = lean::cnstr_get(x_30, 0); +lean::inc(x_31); +x_33 = lean::cnstr_get(x_30, 1); +lean::inc(x_33); +lean::dec(x_30); +if (lean::is_scalar(x_19)) { + x_36 = lean::alloc_cnstr(0, 2, 0); +} else { + x_36 = x_19; +} +lean::cnstr_set(x_36, 0, x_15); +lean::cnstr_set(x_36, 1, x_31); +x_37 = lean::mk_nat_obj(1ul); +x_38 = lean::nat_add(x_1, x_37); +x_39 = lean::array_fset(x_14, x_1, x_36); +lean::dec(x_1); +x_1 = x_38; +x_2 = x_39; +x_4 = x_33; +goto _start; +} +else +{ +obj* x_42; obj* x_44; obj* x_46; obj* x_47; obj* x_49; obj* x_52; obj* x_53; obj* x_54; obj* x_55; +x_42 = lean::cnstr_get(x_12, 0); +if (lean::is_exclusive(x_12)) { + x_44 = x_12; +} else { + lean::inc(x_42); + lean::dec(x_12); + x_44 = lean::box(0); +} +lean::inc(x_3); +x_46 = l___private_init_lean_compiler_ir_resetreuse_9__R___main(x_42, x_3, x_4); +x_47 = lean::cnstr_get(x_46, 0); +lean::inc(x_47); +x_49 = lean::cnstr_get(x_46, 1); +lean::inc(x_49); +lean::dec(x_46); +if (lean::is_scalar(x_44)) { + x_52 = lean::alloc_cnstr(1, 1, 0); +} else { + x_52 = x_44; +} +lean::cnstr_set(x_52, 0, x_47); +x_53 = lean::mk_nat_obj(1ul); +x_54 = lean::nat_add(x_1, x_53); +x_55 = lean::array_fset(x_14, x_1, x_52); +lean::dec(x_1); +x_1 = x_54; +x_2 = x_55; +x_4 = x_49; +goto _start; +} +} +} +} +obj* l___private_init_lean_compiler_ir_resetreuse_9__R___main(obj* x_0, obj* x_1, obj* x_2) { +_start: +{ +obj* x_3; +switch (lean::obj_tag(x_0)) { +case 1: +{ +obj* x_5; obj* x_7; obj* x_9; obj* x_11; obj* x_14; obj* x_15; obj* x_17; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_26; obj* x_28; obj* x_29; obj* x_30; +x_5 = lean::cnstr_get(x_0, 0); +lean::inc(x_5); +x_7 = lean::cnstr_get(x_0, 1); +lean::inc(x_7); +x_9 = lean::cnstr_get(x_0, 2); +lean::inc(x_9); +x_11 = lean::cnstr_get(x_0, 3); +lean::inc(x_11); +lean::inc(x_1); +x_14 = l___private_init_lean_compiler_ir_resetreuse_9__R___main(x_9, x_1, x_2); +x_15 = lean::cnstr_get(x_14, 0); +lean::inc(x_15); +x_17 = lean::cnstr_get(x_14, 1); lean::inc(x_17); -x_23 = l_Array_hmmapAux___main___at___private_init_lean_compiler_ir_resetreuse_9__R___main___spec__2(x_17, x_8, x_19, x_12); +lean::dec(x_14); +lean::inc(x_0); +x_21 = l_Lean_IR_Context_addDecl(x_1, x_0); +if (lean::is_exclusive(x_0)) { + lean::cnstr_release(x_0, 0); + lean::cnstr_release(x_0, 1); + lean::cnstr_release(x_0, 2); + lean::cnstr_release(x_0, 3); + x_22 = x_0; +} else { + lean::dec(x_0); + x_22 = lean::box(0); +} +x_23 = l___private_init_lean_compiler_ir_resetreuse_9__R___main(x_11, x_21, x_17); x_24 = lean::cnstr_get(x_23, 0); x_26 = lean::cnstr_get(x_23, 1); if (lean::is_exclusive(x_23)) { @@ -1396,56 +1491,138 @@ if (lean::is_exclusive(x_23)) { lean::dec(x_23); x_28 = lean::box(0); } -if (lean::is_scalar(x_21)) { - x_29 = lean::alloc_cnstr(9, 3, 0); +if (lean::is_scalar(x_22)) { + x_29 = lean::alloc_cnstr(1, 4, 0); } else { - x_29 = x_21; + x_29 = x_22; } -lean::cnstr_set(x_29, 0, x_15); -lean::cnstr_set(x_29, 1, x_17); -lean::cnstr_set(x_29, 2, x_24); -x_30 = l_Lean_IR_reshape(x_10, x_29); +lean::cnstr_set(x_29, 0, x_5); +lean::cnstr_set(x_29, 1, x_7); +lean::cnstr_set(x_29, 2, x_15); +lean::cnstr_set(x_29, 3, x_24); if (lean::is_scalar(x_28)) { - x_31 = lean::alloc_cnstr(0, 2, 0); + x_30 = lean::alloc_cnstr(0, 2, 0); } else { - x_31 = x_28; + x_30 = x_28; } -lean::cnstr_set(x_31, 0, x_30); -lean::cnstr_set(x_31, 1, x_26); -return x_31; +lean::cnstr_set(x_30, 0, x_29); +lean::cnstr_set(x_30, 1, x_26); +return x_30; +} +case 9: +{ +obj* x_31; obj* x_33; obj* x_35; obj* x_37; obj* x_38; obj* x_40; obj* x_41; obj* x_43; obj* x_45; obj* x_46; obj* x_47; +x_31 = lean::cnstr_get(x_0, 0); +x_33 = lean::cnstr_get(x_0, 1); +x_35 = lean::cnstr_get(x_0, 2); +if (lean::is_exclusive(x_0)) { + x_37 = x_0; +} else { + lean::inc(x_31); + lean::inc(x_33); + lean::inc(x_35); + lean::dec(x_0); + x_37 = lean::box(0); +} +x_38 = lean::mk_nat_obj(0ul); +lean::inc(x_33); +x_40 = l_Array_hmmapAux___main___at___private_init_lean_compiler_ir_resetreuse_9__R___main___spec__1(x_33, x_38, x_35, x_1, x_2); +x_41 = lean::cnstr_get(x_40, 0); +x_43 = lean::cnstr_get(x_40, 1); +if (lean::is_exclusive(x_40)) { + x_45 = x_40; +} else { + lean::inc(x_41); + lean::inc(x_43); + lean::dec(x_40); + x_45 = lean::box(0); +} +if (lean::is_scalar(x_37)) { + x_46 = lean::alloc_cnstr(9, 3, 0); +} else { + x_46 = x_37; +} +lean::cnstr_set(x_46, 0, x_31); +lean::cnstr_set(x_46, 1, x_33); +lean::cnstr_set(x_46, 2, x_41); +if (lean::is_scalar(x_45)) { + x_47 = lean::alloc_cnstr(0, 2, 0); +} else { + x_47 = x_45; +} +lean::cnstr_set(x_47, 0, x_46); +lean::cnstr_set(x_47, 1, x_43); +return x_47; } default: { -obj* x_32; obj* x_34; obj* x_36; obj* x_37; obj* x_38; -x_32 = lean::cnstr_get(x_9, 0); -x_34 = lean::cnstr_get(x_9, 1); -if (lean::is_exclusive(x_9)) { - x_36 = x_9; +obj* x_48; +x_48 = lean::box(0); +x_3 = x_48; +goto lbl_4; +} +} +lbl_4: +{ +uint8 x_50; +lean::dec(x_3); +x_50 = l_Lean_IR_FnBody_isTerminal___main(x_0); +if (x_50 == 0) +{ +obj* x_51; obj* x_52; obj* x_53; obj* x_54; obj* x_55; obj* x_57; obj* x_59; obj* x_60; obj* x_61; +x_51 = l_Lean_IR_FnBody_body___main(x_0); +x_52 = lean::box(12); +x_53 = l_Lean_IR_FnBody_setBody___main(x_0, x_52); +x_54 = l___private_init_lean_compiler_ir_resetreuse_9__R___main(x_51, x_1, x_2); +x_55 = lean::cnstr_get(x_54, 0); +x_57 = lean::cnstr_get(x_54, 1); +if (lean::is_exclusive(x_54)) { + x_59 = x_54; } else { - lean::inc(x_32); - lean::inc(x_34); - lean::dec(x_9); - x_36 = lean::box(0); + lean::inc(x_55); + lean::inc(x_57); + lean::dec(x_54); + x_59 = lean::box(0); } -x_37 = l_Lean_IR_reshape(x_32, x_5); -if (lean::is_scalar(x_36)) { - x_38 = lean::alloc_cnstr(0, 2, 0); +x_60 = l_Lean_IR_FnBody_setBody___main(x_53, x_55); +if (lean::is_scalar(x_59)) { + x_61 = lean::alloc_cnstr(0, 2, 0); } else { - x_38 = x_36; + x_61 = x_59; } -lean::cnstr_set(x_38, 0, x_37); -lean::cnstr_set(x_38, 1, x_34); -return x_38; +lean::cnstr_set(x_61, 0, x_60); +lean::cnstr_set(x_61, 1, x_57); +return x_61; +} +else +{ +obj* x_63; +lean::dec(x_1); +x_63 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_63, 0, x_0); +lean::cnstr_set(x_63, 1, x_2); +return x_63; } } } } -obj* l___private_init_lean_compiler_ir_resetreuse_9__R(obj* x_0, obj* x_1) { +obj* l___private_init_lean_compiler_ir_resetreuse_9__R(obj* x_0, obj* x_1, obj* x_2) { _start: { -obj* x_2; -x_2 = l___private_init_lean_compiler_ir_resetreuse_9__R___main(x_0, x_1); -return x_2; +obj* x_3; +x_3 = l___private_init_lean_compiler_ir_resetreuse_9__R___main(x_0, x_1, x_2); +return x_3; +} +} +obj* _init_l_Lean_IR_Decl_insertResetReuse___main___closed__1() { +_start: +{ +obj* x_0; obj* x_1; +x_0 = lean::box(0); +x_1 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_1, 0, x_0); +lean::cnstr_set(x_1, 1, x_0); +return x_1; } } obj* l_Lean_IR_Decl_insertResetReuse___main(obj* x_0) { @@ -1453,7 +1630,7 @@ _start: { if (lean::obj_tag(x_0) == 0) { -obj* x_1; obj* x_3; uint8 x_5; obj* x_6; obj* x_8; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_15; obj* x_16; obj* x_19; obj* x_20; +obj* x_1; obj* x_3; uint8 x_5; obj* x_6; obj* x_8; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_15; obj* x_16; obj* x_17; obj* x_20; obj* x_21; x_1 = lean::cnstr_get(x_0, 0); lean::inc(x_1); x_3 = lean::cnstr_get(x_0, 1); @@ -1463,7 +1640,7 @@ x_6 = lean::cnstr_get(x_0, 2); lean::inc(x_6); x_8 = lean::mk_nat_obj(0ul); lean::inc(x_0); -x_10 = l_Lean_IR_MaxVar_collectDecl___main(x_0, x_8); +x_10 = l_Lean_IR_MaxIndex_collectDecl___main(x_0, x_8); if (lean::is_exclusive(x_0)) { lean::cnstr_release(x_0, 0); lean::cnstr_release(x_0, 1); @@ -1476,21 +1653,22 @@ if (lean::is_exclusive(x_0)) { x_12 = lean::mk_nat_obj(1ul); x_13 = lean::nat_add(x_10, x_12); lean::dec(x_10); -x_15 = l___private_init_lean_compiler_ir_resetreuse_9__R___main(x_6, x_13); -x_16 = lean::cnstr_get(x_15, 0); -lean::inc(x_16); -lean::dec(x_15); +x_15 = l_Lean_IR_Decl_insertResetReuse___main___closed__1; +x_16 = l___private_init_lean_compiler_ir_resetreuse_9__R___main(x_6, x_15, x_13); +x_17 = lean::cnstr_get(x_16, 0); +lean::inc(x_17); +lean::dec(x_16); if (lean::is_scalar(x_11)) { - x_19 = lean::alloc_cnstr(0, 3, 1); + x_20 = lean::alloc_cnstr(0, 3, 1); } else { - x_19 = x_11; + x_20 = x_11; } -lean::cnstr_set(x_19, 0, x_1); -lean::cnstr_set(x_19, 1, x_3); -lean::cnstr_set(x_19, 2, x_16); -lean::cnstr_set_scalar(x_19, sizeof(void*)*3, x_5); -x_20 = x_19; -return x_20; +lean::cnstr_set(x_20, 0, x_1); +lean::cnstr_set(x_20, 1, x_3); +lean::cnstr_set(x_20, 2, x_17); +lean::cnstr_set_scalar(x_20, sizeof(void*)*3, x_5); +x_21 = x_20; +return x_21; } else { @@ -1507,8 +1685,9 @@ return x_1; } } obj* initialize_init_control_state(obj*); +obj* initialize_init_control_reader(obj*); obj* initialize_init_lean_compiler_ir_basic(obj*); -obj* initialize_init_lean_compiler_ir_freevars(obj*); +obj* initialize_init_lean_compiler_ir_livevars(obj*); static bool _G_initialized = false; obj* initialize_init_lean_compiler_ir_resetreuse(obj* w) { if (_G_initialized) return w; @@ -1516,11 +1695,15 @@ obj* initialize_init_lean_compiler_ir_resetreuse(obj* w) { if (io_result_is_error(w)) return w; w = initialize_init_control_state(w); if (io_result_is_error(w)) return w; +w = initialize_init_control_reader(w); +if (io_result_is_error(w)) return w; w = initialize_init_lean_compiler_ir_basic(w); if (io_result_is_error(w)) return w; -w = initialize_init_lean_compiler_ir_freevars(w); +w = initialize_init_lean_compiler_ir_livevars(w); if (io_result_is_error(w)) return w; l_Array_hmmapAux___main___at___private_init_lean_compiler_ir_resetreuse_2__S___main___spec__1___closed__1 = _init_l_Array_hmmapAux___main___at___private_init_lean_compiler_ir_resetreuse_2__S___main___spec__1___closed__1(); lean::mark_persistent(l_Array_hmmapAux___main___at___private_init_lean_compiler_ir_resetreuse_2__S___main___spec__1___closed__1); + l_Lean_IR_Decl_insertResetReuse___main___closed__1 = _init_l_Lean_IR_Decl_insertResetReuse___main___closed__1(); +lean::mark_persistent(l_Lean_IR_Decl_insertResetReuse___main___closed__1); return w; } diff --git a/src/stage0/init/lean/compiler/ir/simpcase.cpp b/src/stage0/init/lean/compiler/ir/simpcase.cpp index acbf49f160..068bc98e88 100644 --- a/src/stage0/init/lean/compiler/ir/simpcase.cpp +++ b/src/stage0/init/lean/compiler/ir/simpcase.cpp @@ -14,6 +14,7 @@ typedef lean::uint32 uint32; typedef lean::uint64 uint64; #pragma GCC diagnostic ignored "-Wunused-label" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif +uint8 l_Array_anyMAux___main___at___private_init_lean_compiler_ir_simpcase_2__addDefault___spec__1(obj*, obj*); obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_simpcase_1__maxOccs___spec__1___boxed(obj*, obj*, obj*, obj*, obj*); obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_simpcase_1__maxOccs___spec__1(obj*, obj*, obj*, obj*, obj*); obj* l_Lean_IR_FnBody_simpCase(obj*); @@ -24,7 +25,6 @@ obj* l___private_init_lean_compiler_ir_simpcase_1__maxOccs(obj*); obj* l___private_init_lean_compiler_ir_simpcase_2__addDefault(obj*); obj* l_Lean_IR_reshape(obj*, obj*); obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_simpcase_1__maxOccs___spec__2(obj*, obj*, obj*, obj*); -obj* l_Array_anyAux___main___at___private_init_lean_compiler_ir_simpcase_2__addDefault___spec__1___boxed(obj*, obj*); namespace lean { uint8 nat_dec_lt(obj*, obj*); } @@ -42,7 +42,6 @@ obj* l_Array_hmmapAux___main___at_Lean_IR_FnBody_simpCase___main___spec__2(obj*, obj* l_Array_shrink___main___rarg(obj*, obj*); obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_simpcase_1__maxOccs___spec__2___boxed(obj*, obj*, obj*, obj*); obj* l_Lean_IR_AltCore_body___main(obj*); -uint8 l_Array_anyAux___main___at___private_init_lean_compiler_ir_simpcase_2__addDefault___spec__1(obj*, obj*); uint8 l_Lean_IR_FnBody_beq(obj*, obj*); obj* l___private_init_lean_compiler_ir_simpcase_3__mkSimpCase(obj*, obj*, obj*); obj* l_Array_filterAux___main___at___private_init_lean_compiler_ir_simpcase_2__addDefault___spec__2(obj*, obj*, obj*, obj*); @@ -52,6 +51,7 @@ uint8 nat_dec_le(obj*, obj*); obj* l___private_init_lean_compiler_ir_simpcase_1__maxOccs___boxed(obj*); obj* l_Lean_IR_Decl_simpCase___main(obj*); obj* l_Array_filterAux___main___at___private_init_lean_compiler_ir_simpcase_3__mkSimpCase___spec__1(obj*, obj*, obj*); +obj* l_Array_anyMAux___main___at___private_init_lean_compiler_ir_simpcase_2__addDefault___spec__1___boxed(obj*, obj*); obj* l_Array_hmmapAux___main___at_Lean_IR_FnBody_simpCase___main___spec__1(obj*, obj*); obj* l_Array_miterateAux___main___at___private_init_lean_compiler_ir_simpcase_1__maxOccs___spec__1(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: @@ -185,7 +185,7 @@ lean::dec(x_0); return x_1; } } -uint8 l_Array_anyAux___main___at___private_init_lean_compiler_ir_simpcase_2__addDefault___spec__1(obj* x_0, obj* x_1) { +uint8 l_Array_anyMAux___main___at___private_init_lean_compiler_ir_simpcase_2__addDefault___spec__1(obj* x_0, obj* x_1) { _start: { obj* x_2; uint8 x_3; @@ -216,10 +216,8 @@ goto _start; } else { -uint8 x_15; lean::dec(x_1); -x_15 = 1; -return x_15; +return x_8; } } } @@ -302,7 +300,7 @@ if (x_3 == 0) { obj* x_5; uint8 x_6; x_5 = lean::mk_nat_obj(0ul); -x_6 = l_Array_anyAux___main___at___private_init_lean_compiler_ir_simpcase_2__addDefault___spec__1(x_0, x_5); +x_6 = l_Array_anyMAux___main___at___private_init_lean_compiler_ir_simpcase_2__addDefault___spec__1(x_0, x_5); if (x_6 == 0) { obj* x_7; obj* x_8; obj* x_10; uint8 x_13; @@ -342,11 +340,11 @@ return x_0; } } } -obj* l_Array_anyAux___main___at___private_init_lean_compiler_ir_simpcase_2__addDefault___spec__1___boxed(obj* x_0, obj* x_1) { +obj* l_Array_anyMAux___main___at___private_init_lean_compiler_ir_simpcase_2__addDefault___spec__1___boxed(obj* x_0, obj* x_1) { _start: { uint8 x_2; obj* x_3; -x_2 = l_Array_anyAux___main___at___private_init_lean_compiler_ir_simpcase_2__addDefault___spec__1(x_0, x_1); +x_2 = l_Array_anyMAux___main___at___private_init_lean_compiler_ir_simpcase_2__addDefault___spec__1(x_0, x_1); x_3 = lean::box(x_2); lean::dec(x_0); return x_3; @@ -499,47 +497,44 @@ x_10 = lean::nat_add(x_0, x_9); switch (lean::obj_tag(x_6)) { case 1: { -obj* x_11; obj* x_13; uint8 x_15; obj* x_16; obj* x_18; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; +obj* x_11; obj* x_13; obj* x_15; obj* x_17; obj* x_19; obj* x_20; obj* x_21; obj* x_22; x_11 = lean::cnstr_get(x_6, 0); x_13 = lean::cnstr_get(x_6, 1); -x_15 = lean::cnstr_get_scalar(x_6, sizeof(void*)*4); -x_16 = lean::cnstr_get(x_6, 2); -x_18 = lean::cnstr_get(x_6, 3); +x_15 = lean::cnstr_get(x_6, 2); +x_17 = lean::cnstr_get(x_6, 3); if (lean::is_exclusive(x_6)) { - x_20 = x_6; + x_19 = x_6; } else { lean::inc(x_11); lean::inc(x_13); - lean::inc(x_16); - lean::inc(x_18); + lean::inc(x_15); + lean::inc(x_17); lean::dec(x_6); - x_20 = lean::box(0); + x_19 = lean::box(0); } -x_21 = l_Lean_IR_FnBody_simpCase___main(x_16); -if (lean::is_scalar(x_20)) { - x_22 = lean::alloc_cnstr(1, 4, 1); +x_20 = l_Lean_IR_FnBody_simpCase___main(x_15); +if (lean::is_scalar(x_19)) { + x_21 = lean::alloc_cnstr(1, 4, 0); } else { - x_22 = x_20; + x_21 = x_19; } -lean::cnstr_set(x_22, 0, x_11); -lean::cnstr_set(x_22, 1, x_13); -lean::cnstr_set(x_22, 2, x_21); -lean::cnstr_set(x_22, 3, x_18); -lean::cnstr_set_scalar(x_22, sizeof(void*)*4, x_15); -x_23 = x_22; -x_24 = lean::array_fset(x_8, x_0, x_23); +lean::cnstr_set(x_21, 0, x_11); +lean::cnstr_set(x_21, 1, x_13); +lean::cnstr_set(x_21, 2, x_20); +lean::cnstr_set(x_21, 3, x_17); +x_22 = lean::array_fset(x_8, x_0, x_21); lean::dec(x_0); x_0 = x_10; -x_1 = x_24; +x_1 = x_22; goto _start; } default: { -obj* x_27; -x_27 = lean::array_fset(x_8, x_0, x_6); +obj* x_25; +x_25 = lean::array_fset(x_8, x_0, x_6); lean::dec(x_0); x_0 = x_10; -x_1 = x_27; +x_1 = x_25; goto _start; } }