diff --git a/stage0/src/Lean/Compiler/LCNF.lean b/stage0/src/Lean/Compiler/LCNF.lean index dc8ed5af6f..e69c59f75f 100644 --- a/stage0/src/Lean/Compiler/LCNF.lean +++ b/stage0/src/Lean/Compiler/LCNF.lean @@ -35,4 +35,5 @@ import Lean.Compiler.LCNF.Types import Lean.Compiler.LCNF.Util import Lean.Compiler.LCNF.ConfigOptions import Lean.Compiler.LCNF.ForEachExpr -import Lean.Compiler.LCNF.MonoTypes \ No newline at end of file +import Lean.Compiler.LCNF.MonoTypes +import Lean.Compiler.LCNF.ToMono \ No newline at end of file diff --git a/stage0/src/Lean/Compiler/LCNF/Check.lean b/stage0/src/Lean/Compiler/LCNF/Check.lean index b248aad7f9..89e3cdd635 100644 --- a/stage0/src/Lean/Compiler/LCNF/Check.lean +++ b/stage0/src/Lean/Compiler/LCNF/Check.lean @@ -31,6 +31,12 @@ def checkFVar (fvarId : FVarId) : CheckM Unit := unless (← read).vars.contains fvarId do throwError "invalid out of scope free variable {← getBinderName fvarId}" +/-- Return true `f` is a constructor and `i` is less than its number of parameters. -/ +def isCtorParam (f : Expr) (i : Nat) : CoreM Bool := do + let .const declName _ := f | return false + let .ctorInfo info ← getConstInfo declName | return false + return i < info.numParams + def checkAppArgs (f : Expr) (args : Array Expr) : CheckM Unit := do let mut fType ← inferType f let mut j := 0 @@ -54,9 +60,12 @@ def checkAppArgs (f : Expr) (args : Array Expr) : CheckM Unit := do unless (← InferType.compatibleTypes argType expectedType) do throwError "type mismatch at LCNF application{indentExpr (mkAppN f args)}\nargument {arg} has type{indentExpr argType}\nbut is expected to have type{indentExpr expectedType}" unless (← pure (maybeTypeFormerType expectedType) <||> isErasedCompatible expectedType) do - unless arg.isFVar do - throwError "invalid LCNF application{indentExpr (mkAppN f args)}\nargument{indentExpr arg}\nhas type{indentExpr expectedType}\nmust be a free variable" - checkFVar arg.fvarId! + if arg.isFVar then + checkFVar arg.fvarId! + else + -- Constructor parameters that are not type formers are erased at phase .mono + unless arg.isErased && (← getPhase) ≥ .mono && (← isCtorParam f i) do + throwError "invalid LCNF application{indentExpr (mkAppN f args)}\nargument{indentExpr arg}\nhas type{indentExpr expectedType}\nmust be a free variable" fType := b def checkApp (f : Expr) (args : Array Expr) : CheckM Unit := do diff --git a/stage0/src/Lean/Compiler/LCNF/Main.lean b/stage0/src/Lean/Compiler/LCNF/Main.lean index c72feda8b9..ccaafaae57 100644 --- a/stage0/src/Lean/Compiler/LCNF/Main.lean +++ b/stage0/src/Lean/Compiler/LCNF/Main.lean @@ -73,7 +73,7 @@ def run (declNames : Array Name) : CompilerM (Array Decl) := withAtLeastMaxRecDe for pass in manager.passes do trace[Compiler] s!"Running pass: {pass.name}" decls ← withPhase pass.phase <| pass.run decls - withPhase pass.phase <| checkpoint pass.name decls + withPhase pass.phaseOut <| checkpoint pass.name decls if (← Lean.isTracingEnabledFor `Compiler.result) then for decl in decls do -- We display the declaration saved in the environment because the names have been normalized diff --git a/stage0/src/Lean/Compiler/LCNF/MonoTypes.lean b/stage0/src/Lean/Compiler/LCNF/MonoTypes.lean index e8f828858a..3d41428026 100644 --- a/stage0/src/Lean/Compiler/LCNF/MonoTypes.lean +++ b/stage0/src/Lean/Compiler/LCNF/MonoTypes.lean @@ -42,7 +42,7 @@ Return `some fieldIdx` if `declName` is the name of an inductive datatype s.t. def hasTrivialStructure? (declName : Name) : CoreM (Option TrivialStructureInfo) := do if isRuntimeBultinType declName then return none let .inductInfo info ← getConstInfo declName | return none - if info.isUnsafe then return none + if info.isUnsafe || info.isRec then return none let [ctorName] := info.ctors | return none let mask ← getRelevantCtorFields ctorName let mut result := none diff --git a/stage0/src/Lean/Compiler/LCNF/PassManager.lean b/stage0/src/Lean/Compiler/LCNF/PassManager.lean index 2ec91334cb..79774019a9 100644 --- a/stage0/src/Lean/Compiler/LCNF/PassManager.lean +++ b/stage0/src/Lean/Compiler/LCNF/PassManager.lean @@ -10,6 +10,23 @@ import Lean.Compiler.LCNF.CompilerM namespace Lean.Compiler.LCNF +def Phase.toNat : Phase → Nat + | .base => 0 + | .mono => 1 + | .impure => 2 + +instance : LT Phase where + lt l r := l.toNat < r.toNat + +instance : LE Phase where + le l r := l.toNat ≤ r.toNat + +instance {p1 p2 : Phase} : Decidable (p1 < p2) := Nat.decLt p1.toNat p2.toNat +instance {p1 p2 : Phase} : Decidable (p1 ≤ p2) := Nat.decLe p1.toNat p2.toNat + +@[simp] theorem Phase.le_refl (p : Phase) : p ≤ p := by + cases p <;> decide + /-- A single compiler `Pass`, consisting of the actual pass function operating on the `Decl`s as well as meta information. @@ -26,6 +43,11 @@ structure Pass where -/ phase : Phase /-- + Resulting phase. + -/ + phaseOut : Phase := phase + phaseInv : phaseOut ≥ phase := by simp + /-- The name of the `Pass` -/ name : Name @@ -33,7 +55,9 @@ structure Pass where The actual pass function, operating on the `Decl`s. -/ run : Array Decl → CompilerM (Array Decl) - deriving Inhabited + +instance : Inhabited Pass where + default := { phase := .base, name := default, run := fun decls => return decls } /-- Can be used to install, remove, replace etc. passes by tagging a declaration @@ -56,30 +80,12 @@ structure PassManager where passes : Array Pass deriving Inhabited -namespace Phase - -def toNat : Phase → Nat - | .base => 0 - | .mono => 1 - | .impure => 2 - -instance : LT Phase where - lt l r := l.toNat < r.toNat - -instance : LE Phase where - le l r := l.toNat ≤ r.toNat - -instance {p1 p2 : Phase} : Decidable (p1 < p2) := Nat.decLt p1.toNat p2.toNat -instance {p1 p2 : Phase} : Decidable (p1 ≤ p2) := Nat.decLe p1.toNat p2.toNat - instance : ToString Phase where toString | .base => "base" | .mono => "mono" | .impure => "impure" -end Phase - namespace Pass def mkPerDeclaration (name : Name) (run : Decl → CompilerM Decl) (phase : Phase) (occurrence : Nat := 0) : Pass where diff --git a/stage0/src/Lean/Compiler/LCNF/Passes.lean b/stage0/src/Lean/Compiler/LCNF/Passes.lean index e0494f84e1..d8062de059 100644 --- a/stage0/src/Lean/Compiler/LCNF/Passes.lean +++ b/stage0/src/Lean/Compiler/LCNF/Passes.lean @@ -12,6 +12,7 @@ import Lean.Compiler.LCNF.ReduceJpArity import Lean.Compiler.LCNF.JoinPoints import Lean.Compiler.LCNF.Specialize import Lean.Compiler.LCNF.PhaseExt +import Lean.Compiler.LCNF.ToMono namespace Lean.Compiler.LCNF @@ -35,6 +36,9 @@ def normalizeFVarIds (decl : Decl) : CoreM Decl := do def saveBase : Pass := .mkPerDeclaration `saveBase (fun decl => do (← normalizeFVarIds decl).saveBase; return decl) .base +def saveMono : Pass := + .mkPerDeclaration `saveMono (fun decl => do (← normalizeFVarIds decl).saveMono; return decl) .mono + def builtinPassManager : PassManager := { passes := #[ init, @@ -49,7 +53,10 @@ def builtinPassManager : PassManager := { specialize, simp (occurrence := 2), cse, - saveBase -- End of base phase + saveBase, -- End of base phase + toMono, + -- TODO: lambda lifting, reduce function arity + saveMono -- End of mono phase ] } diff --git a/stage0/src/Lean/Compiler/LCNF/ToMono.lean b/stage0/src/Lean/Compiler/LCNF/ToMono.lean index 5ea1efb0b9..a987a87694 100644 --- a/stage0/src/Lean/Compiler/LCNF/ToMono.lean +++ b/stage0/src/Lean/Compiler/LCNF/ToMono.lean @@ -8,60 +8,155 @@ import Lean.Compiler.LCNF.InferType namespace Lean.Compiler.LCNF -def Param.toMono (param : Param) : CompilerM Param := do +structure ToMonoM.State where + typeParams : FVarIdSet := {} + +abbrev ToMonoM := StateRefT ToMonoM.State CompilerM + +def Param.toMono (param : Param) : ToMonoM Param := do + if isTypeFormerType param.type then + modify fun { typeParams, .. } => { typeParams := typeParams.insert param.fvarId } param.update (← toMonoType param.type) -def _root_.Lean.Expr.toMono (e : Expr) : CompilerM Expr := do +def isTrivialConstructorApp? (e : Expr) : ToMonoM (Option Expr) := do + let some ctorInfo := e.isConstructorApp? (← getEnv) | return none + let some info ← hasTrivialStructure? ctorInfo.induct | return none + assert! ctorInfo.numParams + info.fieldIdx < e.getAppNumArgs + return e.getArg! (ctorInfo.numParams + info.fieldIdx) + +def fvarToMono (e : Expr) : ToMonoM Expr := do + if (← get).typeParams.contains e.fvarId! then + return erasedExpr + else + return e + +def argToMono (arg : Expr) : ToMonoM Expr := do + if arg.isFVar then + fvarToMono arg + else + return erasedExpr + +def ctorAppToMono (ctorInfo : ConstructorVal) (args : Array Expr) : ToMonoM Expr := do + let argsNew ← args[:ctorInfo.numParams].toArray.mapM fun param => do + -- We only preserve constructor parameters that are types + if isTypeFormerType (← inferType param) then + toMonoType param + else + return erasedExpr + let argsNew := argsNew ++ (← args[ctorInfo.numParams:].toArray.mapM argToMono) + return mkAppN (mkConst ctorInfo.name) argsNew + +partial def _root_.Lean.Expr.toMono (e : Expr) : ToMonoM Expr := do match e with - | .fvar .. => if isTypeFormerType (← inferType e) then return erasedExpr else return e - | .lit .. | .const .. => return e + | .fvar .. => fvarToMono e + | .lit .. => return e + | .const declName _ => return mkConst declName | .sort .. => return erasedExpr | .mvar .. | .bvar .. | .letE .. => unreachable! | .mdata _ b => return e.updateMData! (← b.toMono) - | .proj _ _ b => return e.updateProj! (← b.toMono) + | .proj structName fieldIdx b => + if let some info ← hasTrivialStructure? structName then + if info.fieldIdx == fieldIdx then + b.toMono + else + return erasedExpr + else + return e.updateProj! (← b.toMono) | .forallE .. | .lam .. => return erasedExpr - | .app f a => - let a ← if a.isFVar then a.toMono else pure erasedExpr - return e.updateApp! (← f.toMono) a + | .app .. => + if e.isAppOf ``Decidable.isTrue then + return mkConst ``Bool.true + else if e.isAppOf ``Decidable.isFalse then + return mkConst ``Bool.false + else if let some arg ← isTrivialConstructorApp? e then + arg.toMono + else if let some ctorInfo := e.isConstructorApp? (← getEnv) then + ctorAppToMono ctorInfo e.getAppArgs + else + let f := e.getAppFn + let args := e.getAppArgs + let args ← args.mapM argToMono + return mkAppN (← f.toMono) args -def LetDecl.toMono (decl : LetDecl) : CompilerM LetDecl := do +def LetDecl.toMono (decl : LetDecl) : ToMonoM LetDecl := do let type ← toMonoType decl.type let value ← decl.value.toMono decl.update type value mutual -partial def FunDeclCore.toMono (decl : FunDecl) : CompilerM FunDecl := do - -- TODO: constructor Decidable to Bool, Trivial Structure - -- TODO: eliminate projection for trivial structure +partial def FunDeclCore.toMono (decl : FunDecl) : ToMonoM FunDecl := do let type ← toMonoType decl.type let params ← decl.params.mapM (·.toMono) let value ← decl.value.toMono decl.update type params value -partial def AltCore.toMono (alt : Alt) : CompilerM Alt := do - -- TODO: Decidable to Bool, Trivial Structure - match alt with - | .default k => return alt.updateCode (← k.toMono) - | .alt _ ps k => return alt.updateAlt! (← ps.mapM (·.toMono)) (← k.toMono) +/-- Convert `cases` `Decidable` => `Bool` -/ +partial def decToMono (c : Cases) (_ : c.typeName == ``Decidable) : ToMonoM Code := do + let resultType ← toMonoType c.resultType + let alts ← c.alts.mapM fun alt => do + match alt with + | .default k => return alt.updateCode (← k.toMono) + | .alt ctorName ps k => + eraseParams ps + let ctorName := if ctorName == ``Decidable.isTrue then ``Bool.true else ``Bool.false + return .alt ctorName #[] (← k.toMono) + return .cases { c with resultType, alts, typeName := ``Bool } -partial def Code.toMono (code : Code) : CompilerM Code := do +/-- Eliminate `cases` for trivial structure. See `hasTrivialStructure?` -/ +partial def trivialStructToMono (info : TrivialStructureInfo) (c : Cases) : ToMonoM Code := do + assert! c.alts.size == 1 + let .alt ctorName ps k := c.alts[0]! | unreachable! + assert! ctorName == info.ctorName + assert! info.fieldIdx < ps.size + let p := ps[info.fieldIdx]! + eraseParams ps + /- We reuse `p`s `fvarId` to avoid substitution -/ + let decl := { fvarId := p.fvarId, binderName := p.binderName, type := (← toMonoType p.type), value := .fvar c.discr } + modifyLCtx fun lctx => lctx.addLetDecl decl + let k ← k.toMono + return .let decl k + +partial def Code.toMono (code : Code) : ToMonoM Code := do match code with | .let decl k => return code.updateLet! (← decl.toMono) (← k.toMono) | .fun decl k | .jp decl k => return code.updateFun! (← decl.toMono) (← k.toMono) | .unreach type => return .unreach (← toMonoType type) | .return .. | .jmp .. => return code | .cases c => - let type ← toMonoType c.resultType - let alts ← c.alts.mapM (·.toMono) - return code.updateCases! type c.discr alts + if h : c.typeName == ``Decidable then + decToMono c h + else if let some info ← hasTrivialStructure? c.typeName then + trivialStructToMono info c + else + -- TODO: `casesOn` `[implementedBy]` support + let type ← toMonoType c.resultType + let alts ← c.alts.mapM fun alt => + match alt with + | .default k => return alt.updateCode (← k.toMono) + | .alt _ ps k => return alt.updateAlt! (← ps.mapM (·.toMono)) (← k.toMono) + return code.updateCases! type c.discr alts end def Decl.toMono (decl : Decl) : CompilerM Decl := do - let type ← toMonoType decl.type - let params ← decl.params.mapM (·.toMono) - let value ← decl.value.toMono - return { decl with type, params, value, levelParams := [] } + go |>.run' {} +where + go : ToMonoM Decl := do + let type ← toMonoType decl.type + let params ← decl.params.mapM (·.toMono) + let value ← decl.value.toMono + let decl := { decl with type, params, value, levelParams := [] } + decl.saveMono + return decl + +def toMono : Pass where + name := `toMono + run := fun decls => decls.mapM (·.toMono) + phase := .base + phaseOut := .mono + +builtin_initialize + registerTraceClass `Compiler.toMono (inherited := true) end Lean.Compiler.LCNF \ No newline at end of file diff --git a/stage0/stdlib/Lean/Compiler/LCNF.c b/stage0/stdlib/Lean/Compiler/LCNF.c index 3355059b03..d27960b5df 100644 --- a/stage0/stdlib/Lean/Compiler/LCNF.c +++ b/stage0/stdlib/Lean/Compiler/LCNF.c @@ -1,6 +1,6 @@ // Lean compiler output // Module: Lean.Compiler.LCNF -// Imports: Init Lean.Compiler.LCNF.AlphaEqv Lean.Compiler.LCNF.Basic Lean.Compiler.LCNF.Bind Lean.Compiler.LCNF.Check Lean.Compiler.LCNF.CompilerM Lean.Compiler.LCNF.CSE Lean.Compiler.LCNF.DependsOn Lean.Compiler.LCNF.ElimDead Lean.Compiler.LCNF.FixedArgs Lean.Compiler.LCNF.InferType Lean.Compiler.LCNF.JoinPoints Lean.Compiler.LCNF.LCtx Lean.Compiler.LCNF.Level Lean.Compiler.LCNF.Main Lean.Compiler.LCNF.Passes Lean.Compiler.LCNF.PassManager Lean.Compiler.LCNF.PhaseExt Lean.Compiler.LCNF.PrettyPrinter Lean.Compiler.LCNF.PullFunDecls Lean.Compiler.LCNF.PullLetDecls Lean.Compiler.LCNF.ReduceJpArity Lean.Compiler.LCNF.Simp Lean.Compiler.LCNF.Specialize Lean.Compiler.LCNF.SpecInfo Lean.Compiler.LCNF.Testing Lean.Compiler.LCNF.ToDecl Lean.Compiler.LCNF.ToExpr Lean.Compiler.LCNF.ToLCNF Lean.Compiler.LCNF.Types Lean.Compiler.LCNF.Util Lean.Compiler.LCNF.ConfigOptions Lean.Compiler.LCNF.ForEachExpr Lean.Compiler.LCNF.MonoTypes +// Imports: Init Lean.Compiler.LCNF.AlphaEqv Lean.Compiler.LCNF.Basic Lean.Compiler.LCNF.Bind Lean.Compiler.LCNF.Check Lean.Compiler.LCNF.CompilerM Lean.Compiler.LCNF.CSE Lean.Compiler.LCNF.DependsOn Lean.Compiler.LCNF.ElimDead Lean.Compiler.LCNF.FixedArgs Lean.Compiler.LCNF.InferType Lean.Compiler.LCNF.JoinPoints Lean.Compiler.LCNF.LCtx Lean.Compiler.LCNF.Level Lean.Compiler.LCNF.Main Lean.Compiler.LCNF.Passes Lean.Compiler.LCNF.PassManager Lean.Compiler.LCNF.PhaseExt Lean.Compiler.LCNF.PrettyPrinter Lean.Compiler.LCNF.PullFunDecls Lean.Compiler.LCNF.PullLetDecls Lean.Compiler.LCNF.ReduceJpArity Lean.Compiler.LCNF.Simp Lean.Compiler.LCNF.Specialize Lean.Compiler.LCNF.SpecInfo Lean.Compiler.LCNF.Testing Lean.Compiler.LCNF.ToDecl Lean.Compiler.LCNF.ToExpr Lean.Compiler.LCNF.ToLCNF Lean.Compiler.LCNF.Types Lean.Compiler.LCNF.Util Lean.Compiler.LCNF.ConfigOptions Lean.Compiler.LCNF.ForEachExpr Lean.Compiler.LCNF.MonoTypes Lean.Compiler.LCNF.ToMono #include #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" @@ -47,6 +47,7 @@ lean_object* initialize_Lean_Compiler_LCNF_Util(uint8_t builtin, lean_object*); lean_object* initialize_Lean_Compiler_LCNF_ConfigOptions(uint8_t builtin, lean_object*); lean_object* initialize_Lean_Compiler_LCNF_ForEachExpr(uint8_t builtin, lean_object*); lean_object* initialize_Lean_Compiler_LCNF_MonoTypes(uint8_t builtin, lean_object*); +lean_object* initialize_Lean_Compiler_LCNF_ToMono(uint8_t builtin, lean_object*); static bool _G_initialized = false; LEAN_EXPORT lean_object* initialize_Lean_Compiler_LCNF(uint8_t builtin, lean_object* w) { lean_object * res; @@ -154,6 +155,9 @@ lean_dec_ref(res); res = initialize_Lean_Compiler_LCNF_MonoTypes(builtin, lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +res = initialize_Lean_Compiler_LCNF_ToMono(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); return lean_io_result_mk_ok(lean_box(0)); } #ifdef __cplusplus diff --git a/stage0/stdlib/Lean/Compiler/LCNF/Check.c b/stage0/stdlib/Lean/Compiler/LCNF/Check.c index 72c9702306..fce4f69e4e 100644 --- a/stage0/stdlib/Lean/Compiler/LCNF/Check.c +++ b/stage0/stdlib/Lean/Compiler/LCNF/Check.c @@ -13,8 +13,8 @@ #ifdef __cplusplus extern "C" { #endif +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__7(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_Check_check___closed__4; -static lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__6; size_t lean_usize_add(size_t, size_t); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Check_addFVarId(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Compiler_LCNF_checkDeadLocalDecls___spec__4(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -31,40 +31,42 @@ LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Check_State_all___default; static lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3___closed__5; uint8_t lean_usize_dec_eq(size_t, size_t); lean_object* lean_array_uget(lean_object*, size_t); +static lean_object* l_Lean_Compiler_LCNF_Check_checkAppArgs___closed__6; static lean_object* l_Lean_Compiler_LCNF_Check_check___closed__1; static lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_Check_checkCases___spec__4___lambda__1___closed__1; uint64_t l___private_Lean_Expr_0__Lean_hashFVarId____x40_Lean_Expr___hyg_1727_(lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Check_checkLetDecl___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3___closed__3; static lean_object* l_Lean_Compiler_LCNF_Check_checkLetDecl___lambda__1___closed__1; +static lean_object* l_Lean_Compiler_LCNF_Check_checkAppArgs___closed__2; +static lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__1; static lean_object* l_Lean_throwError___at_Lean_Compiler_LCNF_Check_checkFVar___spec__1___closed__6; -LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__9; lean_object* lean_array_uset(lean_object*, size_t, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Check_checkExpr(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__8; lean_object* l_Lean_Compiler_LCNF_InferType_compatibleTypes(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Compiler_LCNF_checkDeadLocalDecls___spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Expr_isErased(lean_object*); static lean_object* l_Lean_Compiler_LCNF_Check_check___closed__2; static lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__5___closed__1; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_checkDeadLocalDecls_visitParams___boxed(lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3___boxed(lean_object**); static lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3___closed__1; lean_object* lean_environment_find(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Check_Context_vars___default; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Check_checkParams(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Check_check___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_st_ref_get(lean_object*, lean_object*); -static lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__5___closed__2; uint8_t lean_name_eq(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Check_checkJpInScope___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l___private_Lean_Compiler_LCNF_Basic_0__Lean_Compiler_LCNF_beqParam____x40_Lean_Compiler_LCNF_Basic___hyg_51_(lean_object*, lean_object*); +static lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__6___closed__4; static lean_object* l_Lean_Compiler_LCNF_Check_checkCases___closed__2; -static lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__5; -static lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__5___closed__4; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Check_addFVarId___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Compiler_LCNF_Check_checkAppArgs___closed__4; +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_Check_checkFunDecl___closed__2; lean_object* lean_array_get_size(lean_object*); static lean_object* l_Lean_Compiler_LCNF_Check_checkCases___closed__1; @@ -74,12 +76,15 @@ LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Check_withJp___rarg(lean_object*, LEAN_EXPORT lean_object* l_List_elem___at_Lean_Compiler_LCNF_Check_addFVarId___spec__2___boxed(lean_object*, lean_object*); uint8_t l___private_Lean_Compiler_LCNF_Basic_0__Lean_Compiler_LCNF_beqLetDecl____x40_Lean_Compiler_LCNF_Basic___hyg_282_(lean_object*, lean_object*); static lean_object* l_Lean_throwError___at_Lean_Compiler_LCNF_Check_checkFVar___spec__1___closed__2; +static lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__7; static lean_object* l_Lean_throwError___at_Lean_Compiler_LCNF_Check_checkFVar___spec__1___closed__1; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Check_withJp(lean_object*); static lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3___closed__4; -LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_AssocList_forM___at_Lean_Compiler_LCNF_checkDeadLocalDecls___spec__1___closed__2; +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__7___boxed(lean_object**); +static lean_object* l_Lean_Compiler_LCNF_Check_checkAppArgs___closed__1; LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Compiler_LCNF_checkDeadLocalDecls_visitCode___spec__1(lean_object*, size_t, size_t, lean_object*, lean_object*); LEAN_EXPORT uint8_t l_List_elem___at_Lean_Compiler_LCNF_Check_addFVarId___spec__2(lean_object*, lean_object*); uint8_t l___private_Lean_Compiler_LCNF_Basic_0__Lean_Compiler_LCNF_eqFunDecl(lean_object*, lean_object*); @@ -95,11 +100,11 @@ lean_object* lean_nat_add(lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_Check_run___rarg___closed__1; LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Check_run(lean_object*); -static lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__8; LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Compiler_LCNF_Check_checkFVar___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkAppN(lean_object*, lean_object*); size_t lean_uint64_to_usize(uint64_t); -LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_ReaderT_instMonadLiftReaderT(lean_object*, lean_object*, lean_object*); static lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3___closed__7; static lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__4; static lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3___closed__2; @@ -114,9 +119,9 @@ static lean_object* l_Lean_Compiler_LCNF_Check_run___rarg___closed__4; static lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_Check_checkCases___spec__4___closed__3; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Check_checkFunDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_expr_instantiate_rev_range(lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__5___closed__3; uint8_t lean_nat_dec_eq(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Compiler_LCNF_checkDeadLocalDecls_visitCode___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_StateRefT_x27_lift(lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_Check_checkJpInScope___closed__2; lean_object* lean_st_ref_take(lean_object*, lean_object*); static lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_Check_checkCases___spec__4___lambda__3___closed__2; @@ -164,24 +169,29 @@ lean_object* l_Lean_RBNode_insert___at_Lean_NameSet_insert___spec__1(lean_object lean_object* l_Nat_repr(lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Check_check___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_st_mk_ref(lean_object*, lean_object*); +static lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__6; LEAN_EXPORT lean_object* l_Lean_AssocList_forM___at_Lean_Compiler_LCNF_checkDeadLocalDecls___spec__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_Check_checkParam___closed__4; LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_Check_checkCases___spec__4___lambda__4(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Check_isCtorParam___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_sort___override(lean_object*); static lean_object* l_Lean_Compiler_LCNF_Check_checkFunDecl___lambda__2___closed__4; static lean_object* l_Lean_Compiler_LCNF_Check_checkFVar___closed__4; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Check_checkApp___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_getConstInfo___at___private_Lean_Compiler_LCNF_Util_0__Lean_Compiler_LCNF_getCasesOnInductiveVal_x3f___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_HashSetImp_moveEntries___at_Lean_Compiler_LCNF_Check_addFVarId___spec__4(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Compiler_LCNF_Check_checkParams___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_Check_checkLetDecl___closed__1; static lean_object* l_Lean_getConstInfo___at_Lean_Compiler_LCNF_Check_checkCases___spec__1___closed__2; static lean_object* l_Lean_Compiler_LCNF_Check_addFVarId___closed__2; +static lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__6___closed__2; size_t lean_usize_modn(size_t, lean_object*); LEAN_EXPORT lean_object* l_Lean_HashSetImp_insert___at_Lean_Compiler_LCNF_Check_addFVarId___spec__1(lean_object*, lean_object*); lean_object* l___private_Init_Util_0__mkPanicMessageWithDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Expr_isConst(lean_object*); LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_Check_checkCases___spec__4___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Compiler_LCNF_checkDeadLocalDecls___spec__6(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Check_isCtorParam(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_RBNode_findCore___at_Lean_Compiler_LCNF_CompilerM_codeBind_go___spec__1(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Check_checkFunDecl___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Compiler_LCNF_checkDeadLocalDecls___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -201,6 +211,7 @@ static lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_Check_check LEAN_EXPORT lean_object* l_Lean_HashSetImp_expand___at_Lean_Compiler_LCNF_Check_addFVarId___spec__3(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Compiler_LCNF_Check_checkCases___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_Check_checkFunDecl___lambda__1___closed__3; +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_getConstInfo___at_Lean_Compiler_LCNF_Check_checkCases___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__1; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_checkDeadLocalDecls_visitDecls___boxed(lean_object*, lean_object*); @@ -210,6 +221,7 @@ LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Check_addFVarId___lambda__1(lean_o LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Check_checkApp___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_Check_checkParam___closed__1; static lean_object* l_Lean_getConstInfo___at_Lean_Compiler_LCNF_Check_checkCases___spec__1___closed__1; +uint8_t l_Lean_Compiler_LCNF_instDecidableLePhaseInstLEPhase(uint8_t, uint8_t); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Check_checkCases___lambda__1(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_Check_checkCases___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Compiler_LCNF_mkForallParams(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -233,7 +245,7 @@ static lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_Check_check static lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_Check_checkCases___spec__4___lambda__4___closed__1; uint8_t lean_nat_dec_le(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_Check_checkCases___spec__4___lambda__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___closed__3; +extern lean_object* l_Lean_Core_instMonadCoreM; static lean_object* l_Lean_Compiler_LCNF_Check_checkFunDecl___lambda__1___closed__1; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Check_checkFunDecl___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_Check_checkFunDecl___lambda__1___closed__2; @@ -242,9 +254,11 @@ static lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_Check_check static lean_object* l_Lean_Compiler_LCNF_Check_checkExpr___closed__1; static lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_Check_checkCases___spec__4___lambda__4___closed__4; static lean_object* l_Lean_Compiler_LCNF_Check_checkFunDecl___lambda__2___closed__2; +static lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__3; lean_object* l_Lean_throwError___at_Lean_Compiler_LCNF_mkCasesResultType___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Compiler_LCNF_isErasedCompatible_go(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_AssocList_forM___at_Lean_Compiler_LCNF_checkDeadLocalDecls___spec__1___closed__1; +static lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__5; LEAN_EXPORT lean_object* l_Lean_AssocList_forM___at_Lean_Compiler_LCNF_checkDeadLocalDecls___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_Check_checkCases___spec__4___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_Check_checkCases___spec__4___lambda__3___closed__1; @@ -256,7 +270,6 @@ LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Compiler_LCNF_Check static lean_object* l_Lean_getConstInfo___at_Lean_Compiler_LCNF_Check_checkCases___spec__1___closed__3; static lean_object* l_Lean_Compiler_LCNF_Check_checkLetDecl___closed__3; lean_object* lean_st_ref_set(lean_object*, lean_object*, lean_object*); -static lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___closed__4; uint8_t l_Lean_Expr_isFVar(lean_object*); static lean_object* l_Lean_Compiler_LCNF_Check_checkLetDecl___lambda__1___closed__4; uint8_t lean_nat_dec_eq(lean_object*, lean_object*); @@ -270,48 +283,52 @@ static lean_object* l_Lean_Compiler_LCNF_Check_run___rarg___closed__5; LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Compiler_LCNF_Check_checkCases___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Check_withParams(lean_object*); +static lean_object* l_Lean_Compiler_LCNF_Check_checkAppArgs___closed__3; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_checkDeadLocalDecls_visitParams(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_checkDeadLocalDecls_visitCode(lean_object*, lean_object*); lean_object* l_Lean_Compiler_LCNF_getFunDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Compiler_LCNF_Check_withParams___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3___closed__9; static lean_object* l_Lean_Compiler_LCNF_Check_checkParam___closed__3; lean_object* lean_mk_array(lean_object*, lean_object*); +static lean_object* l_Lean_Compiler_LCNF_Check_checkAppArgs___closed__5; static lean_object* l_Lean_throwError___at_Lean_Compiler_LCNF_Check_checkFVar___spec__1___closed__4; LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_Check_checkCases___spec__4___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3___closed__8; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Check_checkAppArgs(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___boxed(lean_object**); +static lean_object* l_Lean_Compiler_LCNF_Check_checkAppArgs___closed__7; LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_Check_checkCases___spec__4___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_Check_checkJpInScope___closed__4; LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Compiler_LCNF_checkDeadLocalDecls_visitParams___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__6___closed__3; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Check_checkCases(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_ReaderT_instMonadReaderT___rarg(lean_object*); uint8_t l_Lean_NameSet_contains(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_checkDeadLocalDecls_visitParam(lean_object*, lean_object*); -static lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___closed__2; LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Compiler_LCNF_checkDeadLocalDecls_visitDecls___spec__1(lean_object*, size_t, size_t, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Check_checkApp(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_getAppFn(lean_object*); +static lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__2; static lean_object* l_Lean_Compiler_LCNF_Check_checkFVar___closed__3; LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Compiler_LCNF_checkDeadLocalDecls___spec__2(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___closed__1; LEAN_EXPORT lean_object* l_List_foldl___at_Lean_Compiler_LCNF_Check_addFVarId___spec__5(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_checkDeadLocalDecls_visitDecl(lean_object*, lean_object*); +lean_object* l_Lean_Compiler_LCNF_getPhase(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Check_withFVarId(lean_object*); LEAN_EXPORT uint8_t l_Lean_HashSetImp_contains___at_Lean_Compiler_LCNF_Check_addFVarId___spec__7(lean_object*, lean_object*); static lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_Check_checkCases___spec__4___lambda__4___closed__2; static lean_object* l_Lean_Compiler_LCNF_Check_run___rarg___closed__6; lean_object* l_Lean_indentExpr(lean_object*); static lean_object* l_Lean_Compiler_LCNF_Check_check___closed__3; -LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___boxed(lean_object**); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Check_checkParam(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__4; LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Compiler_LCNF_Check_withParams___spec__2(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Check_withParams___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_Check_checkCases___spec__4___lambda__3___closed__3; LEAN_EXPORT lean_object* l_Lean_getConstInfo___at_Lean_Compiler_LCNF_Check_checkCases___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_Check_run___rarg___closed__3; -static lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__7; static lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_Check_checkCases___spec__4___lambda__3___closed__7; static lean_object* l_Lean_Compiler_LCNF_Check_checkCases___closed__6; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Check_checkFVar(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -635,6 +652,140 @@ lean_dec(x_2); return x_10; } } +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Check_isCtorParam(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +if (lean_obj_tag(x_1) == 4) +{ +lean_object* x_6; lean_object* x_7; +x_6 = lean_ctor_get(x_1, 0); +lean_inc(x_6); +lean_dec(x_1); +x_7 = l_Lean_getConstInfo___at___private_Lean_Compiler_LCNF_Util_0__Lean_Compiler_LCNF_getCasesOnInductiveVal_x3f___spec__1(x_6, x_3, x_4, x_5); +if (lean_obj_tag(x_7) == 0) +{ +lean_object* x_8; +x_8 = lean_ctor_get(x_7, 0); +lean_inc(x_8); +if (lean_obj_tag(x_8) == 6) +{ +uint8_t x_9; +x_9 = !lean_is_exclusive(x_7); +if (x_9 == 0) +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; lean_object* x_14; +x_10 = lean_ctor_get(x_7, 0); +lean_dec(x_10); +x_11 = lean_ctor_get(x_8, 0); +lean_inc(x_11); +lean_dec(x_8); +x_12 = lean_ctor_get(x_11, 3); +lean_inc(x_12); +lean_dec(x_11); +x_13 = lean_nat_dec_lt(x_2, x_12); +lean_dec(x_12); +x_14 = lean_box(x_13); +lean_ctor_set(x_7, 0, x_14); +return x_7; +} +else +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18; lean_object* x_19; lean_object* x_20; +x_15 = lean_ctor_get(x_7, 1); +lean_inc(x_15); +lean_dec(x_7); +x_16 = lean_ctor_get(x_8, 0); +lean_inc(x_16); +lean_dec(x_8); +x_17 = lean_ctor_get(x_16, 3); +lean_inc(x_17); +lean_dec(x_16); +x_18 = lean_nat_dec_lt(x_2, x_17); +lean_dec(x_17); +x_19 = lean_box(x_18); +x_20 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_20, 0, x_19); +lean_ctor_set(x_20, 1, x_15); +return x_20; +} +} +else +{ +uint8_t x_21; +lean_dec(x_8); +x_21 = !lean_is_exclusive(x_7); +if (x_21 == 0) +{ +lean_object* x_22; uint8_t x_23; lean_object* x_24; +x_22 = lean_ctor_get(x_7, 0); +lean_dec(x_22); +x_23 = 0; +x_24 = lean_box(x_23); +lean_ctor_set(x_7, 0, x_24); +return x_7; +} +else +{ +lean_object* x_25; uint8_t x_26; lean_object* x_27; lean_object* x_28; +x_25 = lean_ctor_get(x_7, 1); +lean_inc(x_25); +lean_dec(x_7); +x_26 = 0; +x_27 = lean_box(x_26); +x_28 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_28, 0, x_27); +lean_ctor_set(x_28, 1, x_25); +return x_28; +} +} +} +else +{ +uint8_t x_29; +x_29 = !lean_is_exclusive(x_7); +if (x_29 == 0) +{ +return x_7; +} +else +{ +lean_object* x_30; lean_object* x_31; lean_object* x_32; +x_30 = lean_ctor_get(x_7, 0); +x_31 = lean_ctor_get(x_7, 1); +lean_inc(x_31); +lean_inc(x_30); +lean_dec(x_7); +x_32 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_32, 0, x_30); +lean_ctor_set(x_32, 1, x_31); +return x_32; +} +} +} +else +{ +uint8_t x_33; lean_object* x_34; lean_object* x_35; +lean_dec(x_1); +x_33 = 0; +x_34 = lean_box(x_33); +x_35 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_35, 0, x_34); +lean_ctor_set(x_35, 1, x_5); +return x_35; +} +} +} +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Check_isCtorParam___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; +x_6 = l_Lean_Compiler_LCNF_Check_isCtorParam(x_1, x_2, x_3, x_4, x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +return x_6; +} +} LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { _start: { @@ -807,52 +958,435 @@ lean_ctor_set(x_17, 1, x_13); return x_17; } } -LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { +static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__1() { _start: { -lean_object* x_13; lean_object* x_14; -x_13 = l_Lean_Expr_fvarId_x21(x_1); -x_14 = l_Lean_Compiler_LCNF_Check_checkFVar(x_13, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12); -if (lean_obj_tag(x_14) == 0) +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("invalid LCNF application", 24); +return x_1; +} +} +static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__2() { +_start: { -lean_object* x_15; lean_object* x_16; lean_object* x_17; -x_15 = lean_ctor_get(x_14, 0); -lean_inc(x_15); -x_16 = lean_ctor_get(x_14, 1); +lean_object* x_1; lean_object* x_2; +x_1 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__1; +x_2 = l_Lean_stringToMessageData(x_1); +return x_2; +} +} +static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("\nargument", 9); +return x_1; +} +} +static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__3; +x_2 = l_Lean_stringToMessageData(x_1); +return x_2; +} +} +static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__5() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("\nhas type", 9); +return x_1; +} +} +static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__6() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__5; +x_2 = l_Lean_stringToMessageData(x_1); +return x_2; +} +} +static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__7() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("\nmust be a free variable", 24); +return x_1; +} +} +static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__8() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__7; +x_2 = l_Lean_stringToMessageData(x_1); +return x_2; +} +} +static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__9() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = lean_unsigned_to_nat(0u); +x_2 = lean_mk_empty_array_with_capacity(x_1); +return x_2; +} +} +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15, lean_object* x_16, lean_object* x_17, lean_object* x_18) { +_start: +{ +uint8_t x_19; uint8_t x_20; lean_object* x_21; +lean_dec(x_10); +lean_inc(x_1); +x_19 = l_Lean_Compiler_LCNF_maybeTypeFormerType(x_1); +if (x_19 == 0) +{ +lean_object* x_76; lean_object* x_77; +x_76 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__9; +lean_inc(x_17); lean_inc(x_16); -lean_dec(x_14); -x_17 = lean_apply_10(x_2, x_3, x_15, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_16); -return x_17; +lean_inc(x_15); +lean_inc(x_14); +lean_inc(x_1); +x_77 = l_Lean_Compiler_LCNF_isErasedCompatible_go(x_1, x_76, x_14, x_15, x_16, x_17, x_18); +if (lean_obj_tag(x_77) == 0) +{ +lean_object* x_78; lean_object* x_79; uint8_t x_80; +x_78 = lean_ctor_get(x_77, 0); +lean_inc(x_78); +x_79 = lean_ctor_get(x_77, 1); +lean_inc(x_79); +lean_dec(x_77); +x_80 = lean_unbox(x_78); +lean_dec(x_78); +x_20 = x_80; +x_21 = x_79; +goto block_75; } else { -uint8_t x_18; +uint8_t x_81; +lean_dec(x_17); +lean_dec(x_16); +lean_dec(x_15); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); lean_dec(x_11); -lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); +lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); -x_18 = !lean_is_exclusive(x_14); -if (x_18 == 0) +lean_dec(x_1); +x_81 = !lean_is_exclusive(x_77); +if (x_81 == 0) { -return x_14; +return x_77; } else { -lean_object* x_19; lean_object* x_20; lean_object* x_21; -x_19 = lean_ctor_get(x_14, 0); -x_20 = lean_ctor_get(x_14, 1); -lean_inc(x_20); -lean_inc(x_19); +lean_object* x_82; lean_object* x_83; lean_object* x_84; +x_82 = lean_ctor_get(x_77, 0); +x_83 = lean_ctor_get(x_77, 1); +lean_inc(x_83); +lean_inc(x_82); +lean_dec(x_77); +x_84 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_84, 0, x_82); +lean_ctor_set(x_84, 1, x_83); +return x_84; +} +} +} +else +{ +x_20 = x_19; +x_21 = x_18; +goto block_75; +} +block_75: +{ +if (x_20 == 0) +{ +uint8_t x_22; +x_22 = l_Lean_Expr_isFVar(x_5); +if (x_22 == 0) +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; +x_23 = l_Lean_Compiler_LCNF_getPhase(x_14, x_15, x_16, x_17, x_21); +x_24 = lean_ctor_get(x_23, 0); +lean_inc(x_24); +x_25 = lean_ctor_get(x_23, 1); +lean_inc(x_25); +lean_dec(x_23); +lean_inc(x_6); +x_26 = l_Lean_Compiler_LCNF_Check_isCtorParam(x_6, x_7, x_16, x_17, x_25); +lean_dec(x_7); +if (lean_obj_tag(x_26) == 0) +{ +lean_object* x_27; lean_object* x_28; lean_object* x_29; uint8_t x_50; +x_27 = lean_ctor_get(x_26, 0); +lean_inc(x_27); +x_28 = lean_ctor_get(x_26, 1); +lean_inc(x_28); +lean_dec(x_26); +x_50 = l_Lean_Expr_isErased(x_5); +if (x_50 == 0) +{ +lean_object* x_51; +lean_dec(x_27); +lean_dec(x_24); +lean_dec(x_9); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_51 = lean_box(0); +x_29 = x_51; +goto block_49; +} +else +{ +uint8_t x_52; uint8_t x_53; uint8_t x_54; +x_52 = 1; +x_53 = lean_unbox(x_24); +lean_dec(x_24); +x_54 = l_Lean_Compiler_LCNF_instDecidableLePhaseInstLEPhase(x_52, x_53); +if (x_54 == 0) +{ +lean_object* x_55; +lean_dec(x_27); +lean_dec(x_9); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_55 = lean_box(0); +x_29 = x_55; +goto block_49; +} +else +{ +uint8_t x_56; +x_56 = lean_unbox(x_27); +lean_dec(x_27); +if (x_56 == 0) +{ +lean_object* x_57; +lean_dec(x_9); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_57 = lean_box(0); +x_29 = x_57; +goto block_49; +} +else +{ +lean_object* x_58; lean_object* x_59; +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_1); +x_58 = lean_box(0); +x_59 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__1(x_2, x_3, x_4, x_9, x_58, x_11, x_12, x_13, x_14, x_15, x_16, x_17, x_28); +lean_dec(x_17); +lean_dec(x_16); +lean_dec(x_15); lean_dec(x_14); -x_21 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_21, 0, x_19); -lean_ctor_set(x_21, 1, x_20); -return x_21; +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_9); +return x_59; +} +} +} +block_49: +{ +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; uint8_t x_45; +lean_dec(x_29); +x_30 = l_Lean_mkAppN(x_6, x_8); +x_31 = l_Lean_indentExpr(x_30); +x_32 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__2; +x_33 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_33, 0, x_32); +lean_ctor_set(x_33, 1, x_31); +x_34 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__4; +x_35 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_35, 0, x_33); +lean_ctor_set(x_35, 1, x_34); +x_36 = l_Lean_indentExpr(x_5); +x_37 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_37, 0, x_35); +lean_ctor_set(x_37, 1, x_36); +x_38 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__6; +x_39 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_39, 0, x_37); +lean_ctor_set(x_39, 1, x_38); +x_40 = l_Lean_indentExpr(x_1); +x_41 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_41, 0, x_39); +lean_ctor_set(x_41, 1, x_40); +x_42 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__8; +x_43 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_43, 0, x_41); +lean_ctor_set(x_43, 1, x_42); +x_44 = l_Lean_throwError___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__1(x_43, x_11, x_12, x_13, x_14, x_15, x_16, x_17, x_28); +lean_dec(x_17); +lean_dec(x_16); +lean_dec(x_15); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_11); +x_45 = !lean_is_exclusive(x_44); +if (x_45 == 0) +{ +return x_44; +} +else +{ +lean_object* x_46; lean_object* x_47; lean_object* x_48; +x_46 = lean_ctor_get(x_44, 0); +x_47 = lean_ctor_get(x_44, 1); +lean_inc(x_47); +lean_inc(x_46); +lean_dec(x_44); +x_48 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_48, 0, x_46); +lean_ctor_set(x_48, 1, x_47); +return x_48; +} +} +} +else +{ +uint8_t x_60; +lean_dec(x_24); +lean_dec(x_17); +lean_dec(x_16); +lean_dec(x_15); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_60 = !lean_is_exclusive(x_26); +if (x_60 == 0) +{ +return x_26; +} +else +{ +lean_object* x_61; lean_object* x_62; lean_object* x_63; +x_61 = lean_ctor_get(x_26, 0); +x_62 = lean_ctor_get(x_26, 1); +lean_inc(x_62); +lean_inc(x_61); +lean_dec(x_26); +x_63 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_63, 0, x_61); +lean_ctor_set(x_63, 1, x_62); +return x_63; +} +} +} +else +{ +lean_object* x_64; lean_object* x_65; +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_1); +x_64 = l_Lean_Expr_fvarId_x21(x_5); +x_65 = l_Lean_Compiler_LCNF_Check_checkFVar(x_64, x_11, x_12, x_13, x_14, x_15, x_16, x_17, x_21); +if (lean_obj_tag(x_65) == 0) +{ +lean_object* x_66; lean_object* x_67; lean_object* x_68; +x_66 = lean_ctor_get(x_65, 0); +lean_inc(x_66); +x_67 = lean_ctor_get(x_65, 1); +lean_inc(x_67); +lean_dec(x_65); +x_68 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__1(x_2, x_3, x_4, x_9, x_66, x_11, x_12, x_13, x_14, x_15, x_16, x_17, x_67); +lean_dec(x_17); +lean_dec(x_16); +lean_dec(x_15); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_66); +lean_dec(x_9); +return x_68; +} +else +{ +uint8_t x_69; +lean_dec(x_17); +lean_dec(x_16); +lean_dec(x_15); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_9); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_69 = !lean_is_exclusive(x_65); +if (x_69 == 0) +{ +return x_65; +} +else +{ +lean_object* x_70; lean_object* x_71; lean_object* x_72; +x_70 = lean_ctor_get(x_65, 0); +x_71 = lean_ctor_get(x_65, 1); +lean_inc(x_71); +lean_inc(x_70); +lean_dec(x_65); +x_72 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_72, 0, x_70); +lean_ctor_set(x_72, 1, x_71); +return x_72; +} +} +} +} +else +{ +lean_object* x_73; lean_object* x_74; +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_1); +x_73 = lean_box(0); +x_74 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__1(x_2, x_3, x_4, x_9, x_73, x_11, x_12, x_13, x_14, x_15, x_16, x_17, x_21); +lean_dec(x_17); +lean_dec(x_16); +lean_dec(x_15); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_9); +return x_74; } } } @@ -861,7 +1395,7 @@ static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_c _start: { lean_object* x_1; -x_1 = lean_mk_string_from_bytes("invalid LCNF application", 24); +x_1 = lean_mk_string_from_bytes("type mismatch at LCNF application", 33); return x_1; } } @@ -878,7 +1412,7 @@ static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_c _start: { lean_object* x_1; -x_1 = lean_mk_string_from_bytes("\nargument", 9); +x_1 = lean_mk_string_from_bytes("\nargument ", 10); return x_1; } } @@ -895,7 +1429,7 @@ static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_c _start: { lean_object* x_1; -x_1 = lean_mk_string_from_bytes("\nhas type", 9); +x_1 = lean_mk_string_from_bytes(" has type", 9); return x_1; } } @@ -912,7 +1446,7 @@ static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_c _start: { lean_object* x_1; -x_1 = lean_mk_string_from_bytes("\nmust be a free variable", 24); +x_1 = lean_mk_string_from_bytes("\nbut is expected to have type", 29); return x_1; } } @@ -925,260 +1459,7 @@ x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } -static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3___closed__9() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = lean_unsigned_to_nat(0u); -x_2 = lean_mk_empty_array_with_capacity(x_1); -return x_2; -} -} -LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15, lean_object* x_16, lean_object* x_17) { -_start: -{ -uint8_t x_18; uint8_t x_19; lean_object* x_20; -lean_dec(x_9); -lean_inc(x_1); -x_18 = l_Lean_Compiler_LCNF_maybeTypeFormerType(x_1); -if (x_18 == 0) -{ -lean_object* x_47; lean_object* x_48; -x_47 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3___closed__9; -lean_inc(x_16); -lean_inc(x_15); -lean_inc(x_14); -lean_inc(x_13); -lean_inc(x_1); -x_48 = l_Lean_Compiler_LCNF_isErasedCompatible_go(x_1, x_47, x_13, x_14, x_15, x_16, x_17); -if (lean_obj_tag(x_48) == 0) -{ -lean_object* x_49; lean_object* x_50; uint8_t x_51; -x_49 = lean_ctor_get(x_48, 0); -lean_inc(x_49); -x_50 = lean_ctor_get(x_48, 1); -lean_inc(x_50); -lean_dec(x_48); -x_51 = lean_unbox(x_49); -lean_dec(x_49); -x_19 = x_51; -x_20 = x_50; -goto block_46; -} -else -{ -uint8_t x_52; -lean_dec(x_16); -lean_dec(x_15); -lean_dec(x_14); -lean_dec(x_13); -lean_dec(x_12); -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_52 = !lean_is_exclusive(x_48); -if (x_52 == 0) -{ -return x_48; -} -else -{ -lean_object* x_53; lean_object* x_54; lean_object* x_55; -x_53 = lean_ctor_get(x_48, 0); -x_54 = lean_ctor_get(x_48, 1); -lean_inc(x_54); -lean_inc(x_53); -lean_dec(x_48); -x_55 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_55, 0, x_53); -lean_ctor_set(x_55, 1, x_54); -return x_55; -} -} -} -else -{ -x_19 = x_18; -x_20 = x_17; -goto block_46; -} -block_46: -{ -if (x_19 == 0) -{ -lean_object* x_21; uint8_t x_22; -x_21 = lean_alloc_closure((void*)(l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__1___boxed), 13, 3); -lean_closure_set(x_21, 0, x_2); -lean_closure_set(x_21, 1, x_3); -lean_closure_set(x_21, 2, x_4); -x_22 = l_Lean_Expr_isFVar(x_5); -if (x_22 == 0) -{ -lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; uint8_t x_38; -lean_dec(x_21); -lean_dec(x_8); -x_23 = l_Lean_mkAppN(x_6, x_7); -x_24 = l_Lean_indentExpr(x_23); -x_25 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3___closed__2; -x_26 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_26, 0, x_25); -lean_ctor_set(x_26, 1, x_24); -x_27 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3___closed__4; -x_28 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_28, 0, x_26); -lean_ctor_set(x_28, 1, x_27); -x_29 = l_Lean_indentExpr(x_5); -x_30 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_30, 0, x_28); -lean_ctor_set(x_30, 1, x_29); -x_31 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3___closed__6; -x_32 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_32, 0, x_30); -lean_ctor_set(x_32, 1, x_31); -x_33 = l_Lean_indentExpr(x_1); -x_34 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_34, 0, x_32); -lean_ctor_set(x_34, 1, x_33); -x_35 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3___closed__8; -x_36 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_36, 0, x_34); -lean_ctor_set(x_36, 1, x_35); -x_37 = l_Lean_throwError___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__1(x_36, x_10, x_11, x_12, x_13, x_14, x_15, x_16, x_20); -lean_dec(x_16); -lean_dec(x_15); -lean_dec(x_14); -lean_dec(x_13); -lean_dec(x_12); -lean_dec(x_11); -lean_dec(x_10); -x_38 = !lean_is_exclusive(x_37); -if (x_38 == 0) -{ -return x_37; -} -else -{ -lean_object* x_39; lean_object* x_40; lean_object* x_41; -x_39 = lean_ctor_get(x_37, 0); -x_40 = lean_ctor_get(x_37, 1); -lean_inc(x_40); -lean_inc(x_39); -lean_dec(x_37); -x_41 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_41, 0, x_39); -lean_ctor_set(x_41, 1, x_40); -return x_41; -} -} -else -{ -lean_object* x_42; lean_object* x_43; -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_1); -x_42 = lean_box(0); -x_43 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2(x_5, x_21, x_8, x_42, x_10, x_11, x_12, x_13, x_14, x_15, x_16, x_20); -return x_43; -} -} -else -{ -lean_object* x_44; lean_object* x_45; -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_1); -x_44 = lean_box(0); -x_45 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__1(x_2, x_3, x_4, x_8, x_44, x_10, x_11, x_12, x_13, x_14, x_15, x_16, x_20); -lean_dec(x_16); -lean_dec(x_15); -lean_dec(x_14); -lean_dec(x_13); -lean_dec(x_12); -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_8); -return x_45; -} -} -} -} -static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string_from_bytes("type mismatch at LCNF application", 33); -return x_1; -} -} -static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__1; -x_2 = l_Lean_stringToMessageData(x_1); -return x_2; -} -} -static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__3() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string_from_bytes("\nargument ", 10); -return x_1; -} -} -static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__4() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__3; -x_2 = l_Lean_stringToMessageData(x_1); -return x_2; -} -} -static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__5() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string_from_bytes(" has type", 9); -return x_1; -} -} -static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__6() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__5; -x_2 = l_Lean_stringToMessageData(x_1); -return x_2; -} -} -static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__7() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string_from_bytes("\nbut is expected to have type", 29); -return x_1; -} -} -static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__8() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__7; -x_2 = l_Lean_stringToMessageData(x_1); -return x_2; -} -} -LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15, lean_object* x_16) { +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15, lean_object* x_16) { _start: { lean_object* x_17; lean_object* x_18; lean_object* x_19; @@ -1202,7 +1483,6 @@ x_21 = lean_ctor_get(x_19, 1); lean_inc(x_21); lean_dec(x_19); x_22 = lean_expr_instantiate_rev_range(x_17, x_7, x_2, x_3); -lean_dec(x_2); lean_dec(x_17); lean_inc(x_15); lean_inc(x_14); @@ -1226,16 +1506,17 @@ lean_dec(x_18); lean_dec(x_7); lean_dec(x_6); lean_dec(x_4); +lean_dec(x_2); x_26 = lean_ctor_get(x_23, 1); lean_inc(x_26); lean_dec(x_23); x_27 = l_Lean_mkAppN(x_5, x_3); x_28 = l_Lean_indentExpr(x_27); -x_29 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__2; +x_29 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3___closed__2; x_30 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_30, 0, x_29); lean_ctor_set(x_30, 1, x_28); -x_31 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__4; +x_31 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3___closed__4; x_32 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_32, 0, x_30); lean_ctor_set(x_32, 1, x_31); @@ -1244,7 +1525,7 @@ lean_ctor_set(x_33, 0, x_1); x_34 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_34, 0, x_32); lean_ctor_set(x_34, 1, x_33); -x_35 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__6; +x_35 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3___closed__6; x_36 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_36, 0, x_34); lean_ctor_set(x_36, 1, x_35); @@ -1252,7 +1533,7 @@ x_37 = l_Lean_indentExpr(x_20); x_38 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_38, 0, x_36); lean_ctor_set(x_38, 1, x_37); -x_39 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__8; +x_39 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3___closed__8; x_40 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_40, 0, x_38); lean_ctor_set(x_40, 1, x_39); @@ -1299,7 +1580,7 @@ x_50 = lean_ctor_get(x_23, 1); lean_inc(x_50); lean_dec(x_23); x_51 = lean_box(0); -x_52 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3(x_22, x_18, x_7, x_4, x_1, x_5, x_3, x_6, x_51, x_9, x_10, x_11, x_12, x_13, x_14, x_15, x_50); +x_52 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2(x_22, x_18, x_7, x_4, x_1, x_5, x_2, x_3, x_6, x_51, x_9, x_10, x_11, x_12, x_13, x_14, x_15, x_50); return x_52; } } @@ -1321,6 +1602,7 @@ lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); +lean_dec(x_2); lean_dec(x_1); x_53 = !lean_is_exclusive(x_23); if (x_53 == 0) @@ -1382,7 +1664,7 @@ return x_60; } } } -static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__5___closed__1() { +static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__1() { _start: { lean_object* x_1; @@ -1390,16 +1672,16 @@ x_1 = lean_mk_string_from_bytes("function expected at", 20); return x_1; } } -static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__5___closed__2() { +static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__2() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__5___closed__1; +x_1 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__1; x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } -static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__5___closed__3() { +static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__3() { _start: { lean_object* x_1; @@ -1407,26 +1689,26 @@ x_1 = lean_mk_string_from_bytes("\narrow type expected", 20); return x_1; } } -static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__5___closed__4() { +static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__4() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__5___closed__3; +x_1 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__3; x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } -LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__5(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14) { +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14) { _start: { lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; uint8_t x_26; x_15 = l_Lean_mkAppN(x_1, x_2); x_16 = l_Lean_indentExpr(x_15); -x_17 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__5___closed__2; +x_17 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__2; x_18 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_18, 0, x_17); lean_ctor_set(x_18, 1, x_16); -x_19 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__5___closed__4; +x_19 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__4; x_20 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_20, 0, x_18); lean_ctor_set(x_20, 1, x_19); @@ -1459,7 +1741,7 @@ return x_29; } } } -static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__6___closed__1() { +static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__5___closed__1() { _start: { lean_object* x_1; lean_object* x_2; @@ -1469,7 +1751,7 @@ lean_ctor_set(x_2, 0, x_1); return x_2; } } -LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__6(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15, lean_object* x_16) { +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__5(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15, lean_object* x_16) { _start: { lean_object* x_17; lean_object* x_18; @@ -1480,7 +1762,7 @@ lean_inc(x_4); lean_inc(x_3); lean_inc(x_2); lean_inc(x_1); -x_18 = lean_alloc_closure((void*)(l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4), 16, 5); +x_18 = lean_alloc_closure((void*)(l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3), 16, 5); lean_closure_set(x_18, 0, x_1); lean_closure_set(x_18, 1, x_2); lean_closure_set(x_18, 2, x_3); @@ -1497,7 +1779,7 @@ lean_inc(x_20); x_21 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_21, 0, x_19); lean_ctor_set(x_21, 1, x_20); -x_22 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4(x_1, x_2, x_3, x_4, x_5, x_17, x_7, x_21, x_9, x_10, x_11, x_12, x_13, x_14, x_15, x_16); +x_22 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3(x_1, x_2, x_3, x_4, x_5, x_17, x_7, x_21, x_9, x_10, x_11, x_12, x_13, x_14, x_15, x_16); return x_22; } else @@ -1519,7 +1801,7 @@ x_27 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_27, 0, x_25); lean_ctor_set(x_27, 1, x_26); lean_inc(x_2); -x_28 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4(x_1, x_2, x_3, x_4, x_5, x_24, x_2, x_27, x_9, x_10, x_11, x_12, x_13, x_14, x_15, x_16); +x_28 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3(x_1, x_2, x_3, x_4, x_5, x_24, x_2, x_27, x_9, x_10, x_11, x_12, x_13, x_14, x_15, x_16); return x_28; } else @@ -1533,7 +1815,7 @@ if (x_29 == 0) { lean_object* x_30; lean_object* x_31; x_30 = lean_box(0); -x_31 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__5(x_5, x_3, x_24, x_18, x_7, x_30, x_9, x_10, x_11, x_12, x_13, x_14, x_15, x_16); +x_31 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4(x_5, x_3, x_24, x_18, x_7, x_30, x_9, x_10, x_11, x_12, x_13, x_14, x_15, x_16); lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); @@ -1561,7 +1843,7 @@ lean_dec(x_3); x_32 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_32, 0, x_24); lean_ctor_set(x_32, 1, x_7); -x_33 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__6___closed__1; +x_33 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__5___closed__1; x_34 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_34, 0, x_33); lean_ctor_set(x_34, 1, x_32); @@ -1576,7 +1858,7 @@ return x_36; } } } -static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___closed__1() { +static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__6___closed__1() { _start: { lean_object* x_1; @@ -1584,7 +1866,7 @@ x_1 = lean_mk_string_from_bytes("Init.Util", 9); return x_1; } } -static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___closed__2() { +static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__6___closed__2() { _start: { lean_object* x_1; @@ -1592,7 +1874,7 @@ x_1 = lean_mk_string_from_bytes("getElem!", 8); return x_1; } } -static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___closed__3() { +static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__6___closed__3() { _start: { lean_object* x_1; @@ -1600,263 +1882,303 @@ x_1 = lean_mk_string_from_bytes("index out of bounds", 19); return x_1; } } -static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___closed__4() { +static lean_object* _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__6___closed__4() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; -x_1 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___closed__1; -x_2 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___closed__2; +x_1 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__6___closed__1; +x_2 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__6___closed__2; x_3 = lean_unsigned_to_nat(77u); x_4 = lean_unsigned_to_nat(36u); -x_5 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___closed__3; +x_5 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__6___closed__3; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); return x_6; } } -LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15, lean_object* x_16, lean_object* x_17) { +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__6(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14) { _start: { -uint8_t x_18; -x_18 = lean_nat_dec_le(x_7, x_6); -if (x_18 == 0) -{ -lean_object* x_19; uint8_t x_20; -x_19 = lean_unsigned_to_nat(0u); -x_20 = lean_nat_dec_eq(x_5, x_19); -if (x_20 == 0) -{ -lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; uint8_t x_27; uint8_t x_28; lean_object* x_29; -x_21 = lean_unsigned_to_nat(1u); -x_22 = lean_nat_sub(x_5, x_21); -lean_dec(x_5); -x_23 = lean_ctor_get(x_9, 1); -lean_inc(x_23); -lean_dec(x_9); -x_24 = lean_ctor_get(x_23, 0); -lean_inc(x_24); -x_25 = lean_ctor_get(x_23, 1); -lean_inc(x_25); -if (lean_is_exclusive(x_23)) { - lean_ctor_release(x_23, 0); - lean_ctor_release(x_23, 1); - x_26 = x_23; +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; uint8_t x_19; uint8_t x_20; lean_object* x_21; +x_15 = lean_ctor_get(x_1, 1); +lean_inc(x_15); +lean_dec(x_1); +x_16 = lean_ctor_get(x_15, 0); +lean_inc(x_16); +x_17 = lean_ctor_get(x_15, 1); +lean_inc(x_17); +if (lean_is_exclusive(x_15)) { + lean_ctor_release(x_15, 0); + lean_ctor_release(x_15, 1); + x_18 = x_15; } else { - lean_dec_ref(x_23); - x_26 = lean_box(0); + lean_dec_ref(x_15); + x_18 = lean_box(0); } -x_27 = lean_nat_dec_lt(x_6, x_3); -x_28 = l_Lean_Expr_isErased(x_24); -if (x_27 == 0) -{ -lean_object* x_52; lean_object* x_53; -x_52 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___closed__4; -x_53 = l_panic___at_Lean_Expr_getRevArg_x21___spec__1(x_52); -x_29 = x_53; -goto block_51; -} -else -{ -lean_object* x_54; -x_54 = lean_array_fget(x_2, x_6); -x_29 = x_54; -goto block_51; -} -block_51: -{ -if (x_28 == 0) +x_19 = lean_nat_dec_lt(x_2, x_3); +lean_dec(x_3); +x_20 = l_Lean_Expr_isErased(x_16); +if (x_19 == 0) { lean_object* x_30; lean_object* x_31; -lean_dec(x_26); -x_30 = lean_box(0); -lean_inc(x_16); -lean_inc(x_15); -lean_inc(x_14); -lean_inc(x_13); -lean_inc(x_12); -lean_inc(x_11); -lean_inc(x_10); -lean_inc(x_1); -lean_inc(x_4); -lean_inc(x_2); -lean_inc(x_6); -x_31 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__6(x_29, x_6, x_2, x_4, x_1, x_24, x_25, x_30, x_10, x_11, x_12, x_13, x_14, x_15, x_16, x_17); -if (lean_obj_tag(x_31) == 0) +x_30 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__6___closed__4; +x_31 = l_panic___at_Lean_Expr_getRevArg_x21___spec__1(x_30); +x_21 = x_31; +goto block_29; +} +else { lean_object* x_32; -x_32 = lean_ctor_get(x_31, 0); -lean_inc(x_32); -if (lean_obj_tag(x_32) == 0) +x_32 = lean_array_fget(x_4, x_2); +x_21 = x_32; +goto block_29; +} +block_29: { -uint8_t x_33; -lean_dec(x_22); -lean_dec(x_16); -lean_dec(x_15); -lean_dec(x_14); +if (x_20 == 0) +{ +lean_object* x_22; lean_object* x_23; +lean_dec(x_18); +x_22 = lean_box(0); +x_23 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__5(x_21, x_2, x_4, x_5, x_6, x_16, x_17, x_22, x_7, x_8, x_9, x_10, x_11, x_12, x_13, x_14); +return x_23; +} +else +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; +lean_dec(x_21); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); lean_dec(x_6); +lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); -lean_dec(x_1); -x_33 = !lean_is_exclusive(x_31); -if (x_33 == 0) -{ -lean_object* x_34; lean_object* x_35; -x_34 = lean_ctor_get(x_31, 0); -lean_dec(x_34); -x_35 = lean_ctor_get(x_32, 0); -lean_inc(x_35); -lean_dec(x_32); -lean_ctor_set(x_31, 0, x_35); -return x_31; -} -else -{ -lean_object* x_36; lean_object* x_37; lean_object* x_38; -x_36 = lean_ctor_get(x_31, 1); -lean_inc(x_36); -lean_dec(x_31); -x_37 = lean_ctor_get(x_32, 0); -lean_inc(x_37); -lean_dec(x_32); -x_38 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_38, 0, x_37); -lean_ctor_set(x_38, 1, x_36); -return x_38; -} -} -else -{ -lean_object* x_39; lean_object* x_40; lean_object* x_41; -x_39 = lean_ctor_get(x_31, 1); -lean_inc(x_39); -lean_dec(x_31); -x_40 = lean_ctor_get(x_32, 0); -lean_inc(x_40); -lean_dec(x_32); -x_41 = lean_nat_add(x_6, x_8); -lean_dec(x_6); -x_5 = x_22; -x_6 = x_41; -x_9 = x_40; -x_17 = x_39; -goto _start; -} -} -else -{ -uint8_t x_43; -lean_dec(x_22); -lean_dec(x_16); -lean_dec(x_15); -lean_dec(x_14); -lean_dec(x_13); -lean_dec(x_12); -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_6); -lean_dec(x_4); -lean_dec(x_2); -lean_dec(x_1); -x_43 = !lean_is_exclusive(x_31); -if (x_43 == 0) -{ -return x_31; -} -else -{ -lean_object* x_44; lean_object* x_45; lean_object* x_46; -x_44 = lean_ctor_get(x_31, 0); -x_45 = lean_ctor_get(x_31, 1); -lean_inc(x_45); -lean_inc(x_44); -lean_dec(x_31); -x_46 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_46, 0, x_44); -lean_ctor_set(x_46, 1, x_45); -return x_46; -} -} -} -else -{ -lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; -lean_dec(x_29); -lean_dec(x_22); -lean_dec(x_16); -lean_dec(x_15); -lean_dec(x_14); -lean_dec(x_13); -lean_dec(x_12); -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_6); -lean_dec(x_4); -lean_dec(x_2); -lean_dec(x_1); -if (lean_is_scalar(x_26)) { - x_47 = lean_alloc_ctor(0, 2, 0); +if (lean_is_scalar(x_18)) { + x_24 = lean_alloc_ctor(0, 2, 0); } else { - x_47 = x_26; + x_24 = x_18; } -lean_ctor_set(x_47, 0, x_24); -lean_ctor_set(x_47, 1, x_25); -x_48 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__6___closed__1; -x_49 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_49, 0, x_48); -lean_ctor_set(x_49, 1, x_47); -x_50 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_50, 0, x_49); -lean_ctor_set(x_50, 1, x_17); -return x_50; +lean_ctor_set(x_24, 0, x_16); +lean_ctor_set(x_24, 1, x_17); +x_25 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__5___closed__1; +x_26 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_26, 0, x_25); +lean_ctor_set(x_26, 1, x_24); +x_27 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_27, 0, x_26); +x_28 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_28, 0, x_27); +lean_ctor_set(x_28, 1, x_14); +return x_28; } } } -else +} +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__7(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15, lean_object* x_16, lean_object* x_17, lean_object* x_18, lean_object* x_19, lean_object* x_20, lean_object* x_21) { +_start: { -lean_object* x_55; -lean_dec(x_16); -lean_dec(x_15); -lean_dec(x_14); -lean_dec(x_13); +if (lean_obj_tag(x_13) == 0) +{ +lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_22 = lean_ctor_get(x_13, 0); +lean_inc(x_22); +lean_dec(x_13); +x_23 = lean_ctor_get(x_1, 0); +lean_inc(x_23); +lean_dec(x_1); +x_24 = lean_ctor_get(x_23, 1); +lean_inc(x_24); +lean_dec(x_23); +x_25 = lean_apply_10(x_24, lean_box(0), x_22, x_14, x_15, x_16, x_17, x_18, x_19, x_20, x_21); +return x_25; +} +else +{ +lean_object* x_26; lean_object* x_27; lean_object* x_28; +x_26 = lean_ctor_get(x_13, 0); +lean_inc(x_26); +lean_dec(x_13); +x_27 = lean_nat_add(x_2, x_3); +lean_dec(x_2); +x_28 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3(x_4, x_5, x_1, x_6, x_7, x_8, x_9, x_10, x_11, x_27, x_12, x_3, x_26, x_14, x_15, x_16, x_17, x_18, x_19, x_20, x_21); +lean_dec(x_11); +return x_28; +} +} +} +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15, lean_object* x_16, lean_object* x_17, lean_object* x_18, lean_object* x_19, lean_object* x_20, lean_object* x_21) { +_start: +{ +uint8_t x_22; +x_22 = lean_nat_dec_le(x_11, x_10); +if (x_22 == 0) +{ +lean_object* x_23; uint8_t x_24; +x_23 = lean_unsigned_to_nat(0u); +x_24 = lean_nat_dec_eq(x_9, x_23); +if (x_24 == 0) +{ +lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; +x_25 = lean_unsigned_to_nat(1u); +x_26 = lean_nat_sub(x_9, x_25); +x_27 = lean_ctor_get(x_3, 1); +lean_inc(x_27); +lean_inc(x_1); +lean_inc(x_8); +lean_inc(x_2); +lean_inc(x_7); +lean_inc(x_10); +x_28 = lean_alloc_closure((void*)(l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__6), 14, 6); +lean_closure_set(x_28, 0, x_13); +lean_closure_set(x_28, 1, x_10); +lean_closure_set(x_28, 2, x_7); +lean_closure_set(x_28, 3, x_2); +lean_closure_set(x_28, 4, x_8); +lean_closure_set(x_28, 5, x_1); +x_29 = lean_alloc_closure((void*)(l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__7___boxed), 21, 12); +lean_closure_set(x_29, 0, x_3); +lean_closure_set(x_29, 1, x_10); +lean_closure_set(x_29, 2, x_12); +lean_closure_set(x_29, 3, x_1); +lean_closure_set(x_29, 4, x_2); +lean_closure_set(x_29, 5, x_4); +lean_closure_set(x_29, 6, x_5); +lean_closure_set(x_29, 7, x_6); +lean_closure_set(x_29, 8, x_7); +lean_closure_set(x_29, 9, x_8); +lean_closure_set(x_29, 10, x_26); +lean_closure_set(x_29, 11, x_11); +x_30 = lean_apply_12(x_27, lean_box(0), lean_box(0), x_28, x_29, x_14, x_15, x_16, x_17, x_18, x_19, x_20, x_21); +return x_30; +} +else +{ +lean_object* x_31; lean_object* x_32; lean_object* x_33; +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_8); +lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); -x_55 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_55, 0, x_9); -lean_ctor_set(x_55, 1, x_17); -return x_55; +x_31 = lean_ctor_get(x_3, 0); +lean_inc(x_31); +lean_dec(x_3); +x_32 = lean_ctor_get(x_31, 1); +lean_inc(x_32); +lean_dec(x_31); +x_33 = lean_apply_10(x_32, lean_box(0), x_13, x_14, x_15, x_16, x_17, x_18, x_19, x_20, x_21); +return x_33; } } else { -lean_object* x_56; -lean_dec(x_16); -lean_dec(x_15); -lean_dec(x_14); -lean_dec(x_13); +lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); +lean_dec(x_8); +lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); -x_56 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_56, 0, x_9); -lean_ctor_set(x_56, 1, x_17); -return x_56; +x_34 = lean_ctor_get(x_3, 0); +lean_inc(x_34); +lean_dec(x_3); +x_35 = lean_ctor_get(x_34, 1); +lean_inc(x_35); +lean_dec(x_34); +x_36 = lean_apply_10(x_35, lean_box(0), x_13, x_14, x_15, x_16, x_17, x_18, x_19, x_20, x_21); +return x_36; } } } +static lean_object* _init_l_Lean_Compiler_LCNF_Check_checkAppArgs___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Core_instMonadCoreM; +x_2 = l_ReaderT_instMonadReaderT___rarg(x_1); +return x_2; +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_Check_checkAppArgs___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Compiler_LCNF_Check_checkAppArgs___closed__1; +x_2 = l_ReaderT_instMonadReaderT___rarg(x_1); +return x_2; +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_Check_checkAppArgs___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Compiler_LCNF_Check_checkAppArgs___closed__2; +x_2 = l_ReaderT_instMonadReaderT___rarg(x_1); +return x_2; +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_Check_checkAppArgs___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Compiler_LCNF_Check_checkAppArgs___closed__3; +x_2 = l_ReaderT_instMonadReaderT___rarg(x_1); +return x_2; +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_Check_checkAppArgs___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Compiler_LCNF_Check_checkAppArgs___closed__4; +x_2 = l_ReaderT_instMonadReaderT___rarg(x_1); +return x_2; +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_Check_checkAppArgs___closed__6() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_ReaderT_instMonadLiftReaderT), 3, 2); +lean_closure_set(x_1, 0, lean_box(0)); +lean_closure_set(x_1, 1, lean_box(0)); +return x_1; +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_Check_checkAppArgs___closed__7() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_StateRefT_x27_lift), 4, 3); +lean_closure_set(x_1, 0, lean_box(0)); +lean_closure_set(x_1, 1, lean_box(0)); +lean_closure_set(x_1, 2, lean_box(0)); +return x_1; +} +} LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Check_checkAppArgs(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { @@ -1869,7 +2191,7 @@ lean_inc(x_1); x_11 = l_Lean_Compiler_LCNF_inferType(x_1, x_6, x_7, x_8, x_9, x_10); if (lean_obj_tag(x_11) == 0) { -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; x_12 = lean_ctor_get(x_11, 0); lean_inc(x_12); x_13 = lean_ctor_get(x_11, 1); @@ -1884,101 +2206,104 @@ lean_ctor_set(x_17, 1, x_16); x_18 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_18, 0, x_15); lean_ctor_set(x_18, 1, x_17); -x_19 = lean_unsigned_to_nat(1u); -lean_inc(x_14); -x_20 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3(x_1, x_2, x_14, x_15, x_14, x_16, x_14, x_19, x_18, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_13); +x_19 = l_Lean_Compiler_LCNF_Check_checkAppArgs___closed__5; +x_20 = l_Lean_Compiler_LCNF_Check_checkAppArgs___closed__6; +x_21 = l_Lean_Compiler_LCNF_Check_checkAppArgs___closed__7; +x_22 = lean_unsigned_to_nat(1u); +lean_inc_n(x_14, 2); +x_23 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3(x_1, x_2, x_19, x_20, x_21, x_20, x_14, x_15, x_14, x_16, x_14, x_22, x_18, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_13); lean_dec(x_14); -if (lean_obj_tag(x_20) == 0) -{ -lean_object* x_21; lean_object* x_22; -x_21 = lean_ctor_get(x_20, 0); -lean_inc(x_21); -x_22 = lean_ctor_get(x_21, 0); -lean_inc(x_22); -lean_dec(x_21); -if (lean_obj_tag(x_22) == 0) -{ -uint8_t x_23; -x_23 = !lean_is_exclusive(x_20); -if (x_23 == 0) +if (lean_obj_tag(x_23) == 0) { lean_object* x_24; lean_object* x_25; -x_24 = lean_ctor_get(x_20, 0); +x_24 = lean_ctor_get(x_23, 0); +lean_inc(x_24); +x_25 = lean_ctor_get(x_24, 0); +lean_inc(x_25); lean_dec(x_24); -x_25 = lean_box(0); -lean_ctor_set(x_20, 0, x_25); -return x_20; +if (lean_obj_tag(x_25) == 0) +{ +uint8_t x_26; +x_26 = !lean_is_exclusive(x_23); +if (x_26 == 0) +{ +lean_object* x_27; lean_object* x_28; +x_27 = lean_ctor_get(x_23, 0); +lean_dec(x_27); +x_28 = lean_box(0); +lean_ctor_set(x_23, 0, x_28); +return x_23; } else { -lean_object* x_26; lean_object* x_27; lean_object* x_28; -x_26 = lean_ctor_get(x_20, 1); -lean_inc(x_26); -lean_dec(x_20); -x_27 = lean_box(0); -x_28 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_28, 0, x_27); -lean_ctor_set(x_28, 1, x_26); -return x_28; +lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_29 = lean_ctor_get(x_23, 1); +lean_inc(x_29); +lean_dec(x_23); +x_30 = lean_box(0); +x_31 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_31, 0, x_30); +lean_ctor_set(x_31, 1, x_29); +return x_31; } } else { -uint8_t x_29; -x_29 = !lean_is_exclusive(x_20); -if (x_29 == 0) +uint8_t x_32; +x_32 = !lean_is_exclusive(x_23); +if (x_32 == 0) { -lean_object* x_30; lean_object* x_31; -x_30 = lean_ctor_get(x_20, 0); -lean_dec(x_30); -x_31 = lean_ctor_get(x_22, 0); -lean_inc(x_31); -lean_dec(x_22); -lean_ctor_set(x_20, 0, x_31); -return x_20; +lean_object* x_33; lean_object* x_34; +x_33 = lean_ctor_get(x_23, 0); +lean_dec(x_33); +x_34 = lean_ctor_get(x_25, 0); +lean_inc(x_34); +lean_dec(x_25); +lean_ctor_set(x_23, 0, x_34); +return x_23; } else { -lean_object* x_32; lean_object* x_33; lean_object* x_34; -x_32 = lean_ctor_get(x_20, 1); -lean_inc(x_32); -lean_dec(x_20); -x_33 = lean_ctor_get(x_22, 0); -lean_inc(x_33); -lean_dec(x_22); -x_34 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_34, 0, x_33); -lean_ctor_set(x_34, 1, x_32); -return x_34; -} -} -} -else -{ -uint8_t x_35; -x_35 = !lean_is_exclusive(x_20); -if (x_35 == 0) -{ -return x_20; -} -else -{ -lean_object* x_36; lean_object* x_37; lean_object* x_38; -x_36 = lean_ctor_get(x_20, 0); -x_37 = lean_ctor_get(x_20, 1); -lean_inc(x_37); +lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_35 = lean_ctor_get(x_23, 1); +lean_inc(x_35); +lean_dec(x_23); +x_36 = lean_ctor_get(x_25, 0); lean_inc(x_36); -lean_dec(x_20); -x_38 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_38, 0, x_36); -lean_ctor_set(x_38, 1, x_37); -return x_38; +lean_dec(x_25); +x_37 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_37, 0, x_36); +lean_ctor_set(x_37, 1, x_35); +return x_37; } } } else { -uint8_t x_39; +uint8_t x_38; +x_38 = !lean_is_exclusive(x_23); +if (x_38 == 0) +{ +return x_23; +} +else +{ +lean_object* x_39; lean_object* x_40; lean_object* x_41; +x_39 = lean_ctor_get(x_23, 0); +x_40 = lean_ctor_get(x_23, 1); +lean_inc(x_40); +lean_inc(x_39); +lean_dec(x_23); +x_41 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_41, 0, x_39); +lean_ctor_set(x_41, 1, x_40); +return x_41; +} +} +} +else +{ +uint8_t x_42; lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); @@ -1988,23 +2313,23 @@ lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_39 = !lean_is_exclusive(x_11); -if (x_39 == 0) +x_42 = !lean_is_exclusive(x_11); +if (x_42 == 0) { return x_11; } else { -lean_object* x_40; lean_object* x_41; lean_object* x_42; -x_40 = lean_ctor_get(x_11, 0); -x_41 = lean_ctor_get(x_11, 1); -lean_inc(x_41); -lean_inc(x_40); +lean_object* x_43; lean_object* x_44; lean_object* x_45; +x_43 = lean_ctor_get(x_11, 0); +x_44 = lean_ctor_get(x_11, 1); +lean_inc(x_44); +lean_inc(x_43); lean_dec(x_11); -x_42 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_42, 0, x_40); -lean_ctor_set(x_42, 1, x_41); -return x_42; +x_45 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_45, 0, x_43); +lean_ctor_set(x_45, 1, x_44); +return x_45; } } } @@ -2056,16 +2381,7 @@ lean_dec(x_4); return x_14; } } -LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { -_start: -{ -lean_object* x_13; -x_13 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12); -lean_dec(x_4); -return x_13; -} -} -LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3___boxed(lean_object** _args) { +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___boxed(lean_object** _args) { lean_object* x_1 = _args[0]; lean_object* x_2 = _args[1]; lean_object* x_3 = _args[2]; @@ -2083,18 +2399,19 @@ lean_object* x_14 = _args[13]; lean_object* x_15 = _args[14]; lean_object* x_16 = _args[15]; lean_object* x_17 = _args[16]; +lean_object* x_18 = _args[17]; _start: { -lean_object* x_18; -x_18 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13, x_14, x_15, x_16, x_17); -return x_18; +lean_object* x_19; +x_19 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13, x_14, x_15, x_16, x_17, x_18); +return x_19; } } -LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__5___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14) { +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14) { _start: { lean_object* x_15; -x_15 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__5(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13, x_14); +x_15 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13, x_14); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); @@ -2108,6 +2425,35 @@ lean_dec(x_4); return x_15; } } +LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__7___boxed(lean_object** _args) { +lean_object* x_1 = _args[0]; +lean_object* x_2 = _args[1]; +lean_object* x_3 = _args[2]; +lean_object* x_4 = _args[3]; +lean_object* x_5 = _args[4]; +lean_object* x_6 = _args[5]; +lean_object* x_7 = _args[6]; +lean_object* x_8 = _args[7]; +lean_object* x_9 = _args[8]; +lean_object* x_10 = _args[9]; +lean_object* x_11 = _args[10]; +lean_object* x_12 = _args[11]; +lean_object* x_13 = _args[12]; +lean_object* x_14 = _args[13]; +lean_object* x_15 = _args[14]; +lean_object* x_16 = _args[15]; +lean_object* x_17 = _args[16]; +lean_object* x_18 = _args[17]; +lean_object* x_19 = _args[18]; +lean_object* x_20 = _args[19]; +lean_object* x_21 = _args[20]; +_start: +{ +lean_object* x_22; +x_22 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__7(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13, x_14, x_15, x_16, x_17, x_18, x_19, x_20, x_21); +return x_22; +} +} LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___boxed(lean_object** _args) { lean_object* x_1 = _args[0]; lean_object* x_2 = _args[1]; @@ -2126,14 +2472,16 @@ lean_object* x_14 = _args[13]; lean_object* x_15 = _args[14]; lean_object* x_16 = _args[15]; lean_object* x_17 = _args[16]; +lean_object* x_18 = _args[17]; +lean_object* x_19 = _args[18]; +lean_object* x_20 = _args[19]; +lean_object* x_21 = _args[20]; _start: { -lean_object* x_18; -x_18 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13, x_14, x_15, x_16, x_17); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_3); -return x_18; +lean_object* x_22; +x_22 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13, x_14, x_15, x_16, x_17, x_18, x_19, x_20, x_21); +lean_dec(x_9); +return x_22; } } LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Check_checkApp___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { @@ -3173,7 +3521,7 @@ x_27 = l_Lean_indentExpr(x_14); x_28 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_28, 0, x_26); lean_ctor_set(x_28, 1, x_27); -x_29 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__8; +x_29 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3___closed__8; x_30 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_30, 0, x_28); lean_ctor_set(x_30, 1, x_29); @@ -4475,7 +4823,7 @@ x_26 = l_Lean_indentExpr(x_15); x_27 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_27, 0, x_25); lean_ctor_set(x_27, 1, x_26); -x_28 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__8; +x_28 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3___closed__8; x_29 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_29, 0, x_27); lean_ctor_set(x_29, 1, x_28); @@ -6057,7 +6405,7 @@ x_19 = l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_Check_checkCases___spec_ x_20 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_20, 0, x_19); lean_ctor_set(x_20, 1, x_18); -x_21 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__8; +x_21 = l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3___closed__8; x_22 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_22, 0, x_20); lean_ctor_set(x_22, 1, x_21); @@ -9606,6 +9954,24 @@ l_Lean_Compiler_LCNF_Check_checkFVar___closed__3 = _init_l_Lean_Compiler_LCNF_Ch lean_mark_persistent(l_Lean_Compiler_LCNF_Check_checkFVar___closed__3); l_Lean_Compiler_LCNF_Check_checkFVar___closed__4 = _init_l_Lean_Compiler_LCNF_Check_checkFVar___closed__4(); lean_mark_persistent(l_Lean_Compiler_LCNF_Check_checkFVar___closed__4); +l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__1 = _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__1(); +lean_mark_persistent(l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__1); +l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__2 = _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__2(); +lean_mark_persistent(l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__2); +l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__3 = _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__3(); +lean_mark_persistent(l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__3); +l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__4 = _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__4(); +lean_mark_persistent(l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__4); +l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__5 = _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__5(); +lean_mark_persistent(l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__5); +l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__6 = _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__6(); +lean_mark_persistent(l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__6); +l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__7 = _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__7(); +lean_mark_persistent(l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__7); +l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__8 = _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__8(); +lean_mark_persistent(l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__8); +l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__9 = _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__9(); +lean_mark_persistent(l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__2___closed__9); l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3___closed__1 = _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3___closed__1(); lean_mark_persistent(l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3___closed__1); l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3___closed__2 = _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3___closed__2(); @@ -9622,8 +9988,6 @@ l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___la lean_mark_persistent(l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3___closed__7); l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3___closed__8 = _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3___closed__8(); lean_mark_persistent(l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3___closed__8); -l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3___closed__9 = _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3___closed__9(); -lean_mark_persistent(l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__3___closed__9); l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__1 = _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__1(); lean_mark_persistent(l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__1); l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__2 = _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__2(); @@ -9632,32 +9996,30 @@ l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___la lean_mark_persistent(l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__3); l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__4 = _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__4(); lean_mark_persistent(l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__4); -l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__5 = _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__5(); -lean_mark_persistent(l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__5); -l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__6 = _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__6(); -lean_mark_persistent(l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__6); -l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__7 = _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__7(); -lean_mark_persistent(l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__7); -l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__8 = _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__8(); -lean_mark_persistent(l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__4___closed__8); l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__5___closed__1 = _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__5___closed__1(); lean_mark_persistent(l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__5___closed__1); -l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__5___closed__2 = _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__5___closed__2(); -lean_mark_persistent(l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__5___closed__2); -l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__5___closed__3 = _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__5___closed__3(); -lean_mark_persistent(l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__5___closed__3); -l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__5___closed__4 = _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__5___closed__4(); -lean_mark_persistent(l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__5___closed__4); l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__6___closed__1 = _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__6___closed__1(); lean_mark_persistent(l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__6___closed__1); -l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___closed__1 = _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___closed__1(); -lean_mark_persistent(l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___closed__1); -l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___closed__2 = _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___closed__2(); -lean_mark_persistent(l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___closed__2); -l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___closed__3 = _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___closed__3(); -lean_mark_persistent(l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___closed__3); -l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___closed__4 = _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___closed__4(); -lean_mark_persistent(l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___closed__4); +l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__6___closed__2 = _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__6___closed__2(); +lean_mark_persistent(l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__6___closed__2); +l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__6___closed__3 = _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__6___closed__3(); +lean_mark_persistent(l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__6___closed__3); +l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__6___closed__4 = _init_l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__6___closed__4(); +lean_mark_persistent(l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_Check_checkAppArgs___spec__3___lambda__6___closed__4); +l_Lean_Compiler_LCNF_Check_checkAppArgs___closed__1 = _init_l_Lean_Compiler_LCNF_Check_checkAppArgs___closed__1(); +lean_mark_persistent(l_Lean_Compiler_LCNF_Check_checkAppArgs___closed__1); +l_Lean_Compiler_LCNF_Check_checkAppArgs___closed__2 = _init_l_Lean_Compiler_LCNF_Check_checkAppArgs___closed__2(); +lean_mark_persistent(l_Lean_Compiler_LCNF_Check_checkAppArgs___closed__2); +l_Lean_Compiler_LCNF_Check_checkAppArgs___closed__3 = _init_l_Lean_Compiler_LCNF_Check_checkAppArgs___closed__3(); +lean_mark_persistent(l_Lean_Compiler_LCNF_Check_checkAppArgs___closed__3); +l_Lean_Compiler_LCNF_Check_checkAppArgs___closed__4 = _init_l_Lean_Compiler_LCNF_Check_checkAppArgs___closed__4(); +lean_mark_persistent(l_Lean_Compiler_LCNF_Check_checkAppArgs___closed__4); +l_Lean_Compiler_LCNF_Check_checkAppArgs___closed__5 = _init_l_Lean_Compiler_LCNF_Check_checkAppArgs___closed__5(); +lean_mark_persistent(l_Lean_Compiler_LCNF_Check_checkAppArgs___closed__5); +l_Lean_Compiler_LCNF_Check_checkAppArgs___closed__6 = _init_l_Lean_Compiler_LCNF_Check_checkAppArgs___closed__6(); +lean_mark_persistent(l_Lean_Compiler_LCNF_Check_checkAppArgs___closed__6); +l_Lean_Compiler_LCNF_Check_checkAppArgs___closed__7 = _init_l_Lean_Compiler_LCNF_Check_checkAppArgs___closed__7(); +lean_mark_persistent(l_Lean_Compiler_LCNF_Check_checkAppArgs___closed__7); l_Lean_Compiler_LCNF_Check_checkApp___closed__1 = _init_l_Lean_Compiler_LCNF_Check_checkApp___closed__1(); lean_mark_persistent(l_Lean_Compiler_LCNF_Check_checkApp___closed__1); l_Lean_Compiler_LCNF_Check_checkApp___closed__2 = _init_l_Lean_Compiler_LCNF_Check_checkApp___closed__2(); diff --git a/stage0/stdlib/Lean/Compiler/LCNF/Main.c b/stage0/stdlib/Lean/Compiler/LCNF/Main.c index e1df45f785..02134a1c83 100644 --- a/stage0/stdlib/Lean/Compiler/LCNF/Main.c +++ b/stage0/stdlib/Lean/Compiler/LCNF/Main.c @@ -2184,211 +2184,220 @@ lean_inc(x_10); x_11 = !lean_is_exclusive(x_4); if (x_11 == 0) { -lean_object* x_12; +lean_object* x_12; lean_object* x_13; +x_12 = lean_ctor_get(x_4, 0); +lean_inc(x_12); lean_ctor_set_uint8(x_4, sizeof(void*)*1, x_9); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); -lean_inc(x_4); -x_12 = lean_apply_6(x_10, x_2, x_4, x_5, x_6, x_7, x_8); -if (lean_obj_tag(x_12) == 0) +x_13 = lean_apply_6(x_10, x_2, x_4, x_5, x_6, x_7, x_8); +if (lean_obj_tag(x_13) == 0) { -lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; -x_13 = lean_ctor_get(x_12, 0); -lean_inc(x_13); -x_14 = lean_ctor_get(x_12, 1); +lean_object* x_14; lean_object* x_15; uint8_t x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_14 = lean_ctor_get(x_13, 0); lean_inc(x_14); -lean_dec(x_12); -x_15 = lean_ctor_get(x_1, 1); +x_15 = lean_ctor_get(x_13, 1); lean_inc(x_15); -lean_dec(x_1); -lean_inc(x_13); -x_16 = l_Lean_Compiler_LCNF_checkpoint(x_15, x_13, x_4, x_5, x_6, x_7, x_14); -if (lean_obj_tag(x_16) == 0) -{ -uint8_t x_17; -x_17 = !lean_is_exclusive(x_16); -if (x_17 == 0) -{ -lean_object* x_18; lean_object* x_19; -x_18 = lean_ctor_get(x_16, 0); -lean_dec(x_18); -x_19 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_19, 0, x_13); -lean_ctor_set(x_16, 0, x_19); -return x_16; -} -else -{ -lean_object* x_20; lean_object* x_21; lean_object* x_22; -x_20 = lean_ctor_get(x_16, 1); -lean_inc(x_20); -lean_dec(x_16); -x_21 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_21, 0, x_13); -x_22 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_22, 0, x_21); -lean_ctor_set(x_22, 1, x_20); -return x_22; -} -} -else -{ -uint8_t x_23; lean_dec(x_13); -x_23 = !lean_is_exclusive(x_16); -if (x_23 == 0) +x_16 = lean_ctor_get_uint8(x_1, sizeof(void*)*3 + 1); +x_17 = lean_ctor_get(x_1, 1); +lean_inc(x_17); +lean_dec(x_1); +x_18 = lean_alloc_ctor(0, 1, 1); +lean_ctor_set(x_18, 0, x_12); +lean_ctor_set_uint8(x_18, sizeof(void*)*1, x_16); +lean_inc(x_14); +x_19 = l_Lean_Compiler_LCNF_checkpoint(x_17, x_14, x_18, x_5, x_6, x_7, x_15); +if (lean_obj_tag(x_19) == 0) { -return x_16; +uint8_t x_20; +x_20 = !lean_is_exclusive(x_19); +if (x_20 == 0) +{ +lean_object* x_21; lean_object* x_22; +x_21 = lean_ctor_get(x_19, 0); +lean_dec(x_21); +x_22 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_22, 0, x_14); +lean_ctor_set(x_19, 0, x_22); +return x_19; } else { -lean_object* x_24; lean_object* x_25; lean_object* x_26; -x_24 = lean_ctor_get(x_16, 0); -x_25 = lean_ctor_get(x_16, 1); -lean_inc(x_25); -lean_inc(x_24); -lean_dec(x_16); -x_26 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_26, 0, x_24); -lean_ctor_set(x_26, 1, x_25); -return x_26; +lean_object* x_23; lean_object* x_24; lean_object* x_25; +x_23 = lean_ctor_get(x_19, 1); +lean_inc(x_23); +lean_dec(x_19); +x_24 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_24, 0, x_14); +x_25 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_25, 0, x_24); +lean_ctor_set(x_25, 1, x_23); +return x_25; +} +} +else +{ +uint8_t x_26; +lean_dec(x_14); +x_26 = !lean_is_exclusive(x_19); +if (x_26 == 0) +{ +return x_19; +} +else +{ +lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_27 = lean_ctor_get(x_19, 0); +x_28 = lean_ctor_get(x_19, 1); +lean_inc(x_28); +lean_inc(x_27); +lean_dec(x_19); +x_29 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_29, 0, x_27); +lean_ctor_set(x_29, 1, x_28); +return x_29; } } } else { -uint8_t x_27; -lean_dec(x_4); +uint8_t x_30; +lean_dec(x_12); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_1); -x_27 = !lean_is_exclusive(x_12); -if (x_27 == 0) +x_30 = !lean_is_exclusive(x_13); +if (x_30 == 0) { -return x_12; -} -else -{ -lean_object* x_28; lean_object* x_29; lean_object* x_30; -x_28 = lean_ctor_get(x_12, 0); -x_29 = lean_ctor_get(x_12, 1); -lean_inc(x_29); -lean_inc(x_28); -lean_dec(x_12); -x_30 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_30, 0, x_28); -lean_ctor_set(x_30, 1, x_29); -return x_30; -} -} +return x_13; } else { lean_object* x_31; lean_object* x_32; lean_object* x_33; -x_31 = lean_ctor_get(x_4, 0); +x_31 = lean_ctor_get(x_13, 0); +x_32 = lean_ctor_get(x_13, 1); +lean_inc(x_32); lean_inc(x_31); +lean_dec(x_13); +x_33 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_33, 0, x_31); +lean_ctor_set(x_33, 1, x_32); +return x_33; +} +} +} +else +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; +x_34 = lean_ctor_get(x_4, 0); +lean_inc(x_34); lean_dec(x_4); -x_32 = lean_alloc_ctor(0, 1, 1); -lean_ctor_set(x_32, 0, x_31); -lean_ctor_set_uint8(x_32, sizeof(void*)*1, x_9); +lean_inc(x_34); +x_35 = lean_alloc_ctor(0, 1, 1); +lean_ctor_set(x_35, 0, x_34); +lean_ctor_set_uint8(x_35, sizeof(void*)*1, x_9); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); -lean_inc(x_32); -x_33 = lean_apply_6(x_10, x_2, x_32, x_5, x_6, x_7, x_8); -if (lean_obj_tag(x_33) == 0) +x_36 = lean_apply_6(x_10, x_2, x_35, x_5, x_6, x_7, x_8); +if (lean_obj_tag(x_36) == 0) { -lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; -x_34 = lean_ctor_get(x_33, 0); -lean_inc(x_34); -x_35 = lean_ctor_get(x_33, 1); -lean_inc(x_35); -lean_dec(x_33); -x_36 = lean_ctor_get(x_1, 1); -lean_inc(x_36); -lean_dec(x_1); -lean_inc(x_34); -x_37 = l_Lean_Compiler_LCNF_checkpoint(x_36, x_34, x_32, x_5, x_6, x_7, x_35); -if (lean_obj_tag(x_37) == 0) -{ -lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; -x_38 = lean_ctor_get(x_37, 1); +lean_object* x_37; lean_object* x_38; uint8_t x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; +x_37 = lean_ctor_get(x_36, 0); +lean_inc(x_37); +x_38 = lean_ctor_get(x_36, 1); lean_inc(x_38); -if (lean_is_exclusive(x_37)) { - lean_ctor_release(x_37, 0); - lean_ctor_release(x_37, 1); - x_39 = x_37; -} else { - lean_dec_ref(x_37); - x_39 = lean_box(0); -} -x_40 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_40, 0, x_34); -if (lean_is_scalar(x_39)) { - x_41 = lean_alloc_ctor(0, 2, 0); -} else { - x_41 = x_39; -} -lean_ctor_set(x_41, 0, x_40); -lean_ctor_set(x_41, 1, x_38); -return x_41; -} -else +lean_dec(x_36); +x_39 = lean_ctor_get_uint8(x_1, sizeof(void*)*3 + 1); +x_40 = lean_ctor_get(x_1, 1); +lean_inc(x_40); +lean_dec(x_1); +x_41 = lean_alloc_ctor(0, 1, 1); +lean_ctor_set(x_41, 0, x_34); +lean_ctor_set_uint8(x_41, sizeof(void*)*1, x_39); +lean_inc(x_37); +x_42 = l_Lean_Compiler_LCNF_checkpoint(x_40, x_37, x_41, x_5, x_6, x_7, x_38); +if (lean_obj_tag(x_42) == 0) { -lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; -lean_dec(x_34); -x_42 = lean_ctor_get(x_37, 0); -lean_inc(x_42); -x_43 = lean_ctor_get(x_37, 1); +lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; +x_43 = lean_ctor_get(x_42, 1); lean_inc(x_43); -if (lean_is_exclusive(x_37)) { - lean_ctor_release(x_37, 0); - lean_ctor_release(x_37, 1); - x_44 = x_37; +if (lean_is_exclusive(x_42)) { + lean_ctor_release(x_42, 0); + lean_ctor_release(x_42, 1); + x_44 = x_42; } else { - lean_dec_ref(x_37); + lean_dec_ref(x_42); x_44 = lean_box(0); } +x_45 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_45, 0, x_37); if (lean_is_scalar(x_44)) { - x_45 = lean_alloc_ctor(1, 2, 0); + x_46 = lean_alloc_ctor(0, 2, 0); } else { - x_45 = x_44; + x_46 = x_44; } -lean_ctor_set(x_45, 0, x_42); -lean_ctor_set(x_45, 1, x_43); -return x_45; +lean_ctor_set(x_46, 0, x_45); +lean_ctor_set(x_46, 1, x_43); +return x_46; +} +else +{ +lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; +lean_dec(x_37); +x_47 = lean_ctor_get(x_42, 0); +lean_inc(x_47); +x_48 = lean_ctor_get(x_42, 1); +lean_inc(x_48); +if (lean_is_exclusive(x_42)) { + lean_ctor_release(x_42, 0); + lean_ctor_release(x_42, 1); + x_49 = x_42; +} else { + lean_dec_ref(x_42); + x_49 = lean_box(0); +} +if (lean_is_scalar(x_49)) { + x_50 = lean_alloc_ctor(1, 2, 0); +} else { + x_50 = x_49; +} +lean_ctor_set(x_50, 0, x_47); +lean_ctor_set(x_50, 1, x_48); +return x_50; } } else { -lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; -lean_dec(x_32); +lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; +lean_dec(x_34); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_1); -x_46 = lean_ctor_get(x_33, 0); -lean_inc(x_46); -x_47 = lean_ctor_get(x_33, 1); -lean_inc(x_47); -if (lean_is_exclusive(x_33)) { - lean_ctor_release(x_33, 0); - lean_ctor_release(x_33, 1); - x_48 = x_33; +x_51 = lean_ctor_get(x_36, 0); +lean_inc(x_51); +x_52 = lean_ctor_get(x_36, 1); +lean_inc(x_52); +if (lean_is_exclusive(x_36)) { + lean_ctor_release(x_36, 0); + lean_ctor_release(x_36, 1); + x_53 = x_36; } else { - lean_dec_ref(x_33); - x_48 = lean_box(0); + lean_dec_ref(x_36); + x_53 = lean_box(0); } -if (lean_is_scalar(x_48)) { - x_49 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_53)) { + x_54 = lean_alloc_ctor(1, 2, 0); } else { - x_49 = x_48; + x_54 = x_53; } -lean_ctor_set(x_49, 0, x_46); -lean_ctor_set(x_49, 1, x_47); -return x_49; +lean_ctor_set(x_54, 0, x_51); +lean_ctor_set(x_54, 1, x_52); +return x_54; } } } diff --git a/stage0/stdlib/Lean/Compiler/LCNF/MonoTypes.c b/stage0/stdlib/Lean/Compiler/LCNF/MonoTypes.c index f1b57ef38b..6bc57f276d 100644 --- a/stage0/stdlib/Lean/Compiler/LCNF/MonoTypes.c +++ b/stage0/stdlib/Lean/Compiler/LCNF/MonoTypes.c @@ -58,7 +58,6 @@ static lean_object* l_Lean_Compiler_LCNF_getRelevantCtorFields___closed__6; static lean_object* l_Lean_Compiler_LCNF_getRelevantCtorFields___closed__8; extern lean_object* l_Lean_levelZero; lean_object* lean_nat_add(lean_object*, lean_object*); -static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_MonoTypes___hyg_1586____closed__1; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_hasTrivialStructure_x3f___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_Compiler_LCNF_MonoTypes_0__Lean_Compiler_LCNF_reprTrivialStructureInfo____x40_Lean_Compiler_LCNF_MonoTypes___hyg_242____closed__16; extern lean_object* l_Lean_Compiler_LCNF_erasedExpr; @@ -158,7 +157,8 @@ uint8_t l_Lean_Compiler_LCNF_isTypeFormerType(lean_object*); static lean_object* l_Lean_Compiler_LCNF_getRelevantCtorFields___closed__5; static lean_object* l_Lean_Compiler_LCNF_getRelevantCtorFields___closed__14; static lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_hasTrivialStructure_x3f___spec__2___closed__2; -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_MonoTypes___hyg_1586_(lean_object*); +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_MonoTypes___hyg_1592_(lean_object*); +static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_MonoTypes___hyg_1592____closed__1; static lean_object* l_Lean_Compiler_LCNF_getRelevantCtorFields___closed__20; static lean_object* l_Lean_Compiler_LCNF_getRelevantCtorFields___closed__10; lean_object* l_EStateM_pure___rarg(lean_object*, lean_object*); @@ -1833,96 +1833,130 @@ lean_dec(x_7); x_9 = lean_ctor_get_uint8(x_8, sizeof(void*)*5 + 1); if (x_9 == 0) { -lean_object* x_10; lean_object* x_11; lean_object* x_12; -x_10 = lean_ctor_get(x_6, 1); -lean_inc(x_10); +uint8_t x_10; +x_10 = lean_ctor_get_uint8(x_8, sizeof(void*)*5); +if (x_10 == 0) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_11 = lean_ctor_get(x_6, 1); +lean_inc(x_11); lean_dec(x_6); -x_11 = lean_box(0); -x_12 = l_Lean_Compiler_LCNF_hasTrivialStructure_x3f___lambda__2(x_8, x_11, x_3, x_4, x_10); -return x_12; +x_12 = lean_box(0); +x_13 = l_Lean_Compiler_LCNF_hasTrivialStructure_x3f___lambda__2(x_8, x_12, x_3, x_4, x_11); +return x_13; } else { -uint8_t x_13; +uint8_t x_14; lean_dec(x_8); lean_dec(x_4); lean_dec(x_3); -x_13 = !lean_is_exclusive(x_6); -if (x_13 == 0) +x_14 = !lean_is_exclusive(x_6); +if (x_14 == 0) { -lean_object* x_14; lean_object* x_15; -x_14 = lean_ctor_get(x_6, 0); -lean_dec(x_14); -x_15 = lean_box(0); -lean_ctor_set(x_6, 0, x_15); +lean_object* x_15; lean_object* x_16; +x_15 = lean_ctor_get(x_6, 0); +lean_dec(x_15); +x_16 = lean_box(0); +lean_ctor_set(x_6, 0, x_16); return x_6; } else { -lean_object* x_16; lean_object* x_17; lean_object* x_18; -x_16 = lean_ctor_get(x_6, 1); -lean_inc(x_16); +lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_17 = lean_ctor_get(x_6, 1); +lean_inc(x_17); lean_dec(x_6); -x_17 = lean_box(0); -x_18 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_18, 0, x_17); -lean_ctor_set(x_18, 1, x_16); -return x_18; +x_18 = lean_box(0); +x_19 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_19, 0, x_18); +lean_ctor_set(x_19, 1, x_17); +return x_19; } } } else { -uint8_t x_19; +uint8_t x_20; +lean_dec(x_8); +lean_dec(x_4); +lean_dec(x_3); +x_20 = !lean_is_exclusive(x_6); +if (x_20 == 0) +{ +lean_object* x_21; lean_object* x_22; +x_21 = lean_ctor_get(x_6, 0); +lean_dec(x_21); +x_22 = lean_box(0); +lean_ctor_set(x_6, 0, x_22); +return x_6; +} +else +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; +x_23 = lean_ctor_get(x_6, 1); +lean_inc(x_23); +lean_dec(x_6); +x_24 = lean_box(0); +x_25 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_25, 0, x_24); +lean_ctor_set(x_25, 1, x_23); +return x_25; +} +} +} +else +{ +uint8_t x_26; lean_dec(x_7); lean_dec(x_4); lean_dec(x_3); -x_19 = !lean_is_exclusive(x_6); -if (x_19 == 0) +x_26 = !lean_is_exclusive(x_6); +if (x_26 == 0) { -lean_object* x_20; lean_object* x_21; -x_20 = lean_ctor_get(x_6, 0); -lean_dec(x_20); -x_21 = lean_box(0); -lean_ctor_set(x_6, 0, x_21); +lean_object* x_27; lean_object* x_28; +x_27 = lean_ctor_get(x_6, 0); +lean_dec(x_27); +x_28 = lean_box(0); +lean_ctor_set(x_6, 0, x_28); return x_6; } else { -lean_object* x_22; lean_object* x_23; lean_object* x_24; -x_22 = lean_ctor_get(x_6, 1); -lean_inc(x_22); +lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_29 = lean_ctor_get(x_6, 1); +lean_inc(x_29); lean_dec(x_6); -x_23 = lean_box(0); -x_24 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_24, 0, x_23); -lean_ctor_set(x_24, 1, x_22); -return x_24; +x_30 = lean_box(0); +x_31 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_31, 0, x_30); +lean_ctor_set(x_31, 1, x_29); +return x_31; } } } else { -uint8_t x_25; +uint8_t x_32; lean_dec(x_4); lean_dec(x_3); -x_25 = !lean_is_exclusive(x_6); -if (x_25 == 0) +x_32 = !lean_is_exclusive(x_6); +if (x_32 == 0) { return x_6; } else { -lean_object* x_26; lean_object* x_27; lean_object* x_28; -x_26 = lean_ctor_get(x_6, 0); -x_27 = lean_ctor_get(x_6, 1); -lean_inc(x_27); -lean_inc(x_26); +lean_object* x_33; lean_object* x_34; lean_object* x_35; +x_33 = lean_ctor_get(x_6, 0); +x_34 = lean_ctor_get(x_6, 1); +lean_inc(x_34); +lean_inc(x_33); lean_dec(x_6); -x_28 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_28, 0, x_26); -lean_ctor_set(x_28, 1, x_27); -return x_28; +x_35 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_35, 0, x_33); +lean_ctor_set(x_35, 1, x_34); +return x_35; } } } @@ -2991,7 +3025,7 @@ x_1 = l_Lean_Compiler_LCNF_getRelevantCtorFields___closed__16; return x_1; } } -static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_MonoTypes___hyg_1586____closed__1() { +static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_MonoTypes___hyg_1592____closed__1() { _start: { lean_object* x_1; lean_object* x_2; @@ -3001,11 +3035,11 @@ lean_closure_set(x_2, 0, x_1); return x_2; } } -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_MonoTypes___hyg_1586_(lean_object* x_1) { +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_MonoTypes___hyg_1592_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; -x_2 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_MonoTypes___hyg_1586____closed__1; +x_2 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_MonoTypes___hyg_1592____closed__1; x_3 = l_Lean_EnvExtensionInterfaceUnsafe_registerExt___rarg(x_2, x_1); return x_3; } @@ -3582,9 +3616,9 @@ l_Lean_Compiler_LCNF_MonoTypeExtState_mono___default = _init_l_Lean_Compiler_LCN lean_mark_persistent(l_Lean_Compiler_LCNF_MonoTypeExtState_mono___default); l_Lean_Compiler_LCNF_instInhabitedMonoTypeExtState = _init_l_Lean_Compiler_LCNF_instInhabitedMonoTypeExtState(); lean_mark_persistent(l_Lean_Compiler_LCNF_instInhabitedMonoTypeExtState); -l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_MonoTypes___hyg_1586____closed__1 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_MonoTypes___hyg_1586____closed__1(); -lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_MonoTypes___hyg_1586____closed__1); -if (builtin) {res = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_MonoTypes___hyg_1586_(lean_io_mk_world()); +l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_MonoTypes___hyg_1592____closed__1 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_MonoTypes___hyg_1592____closed__1(); +lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_MonoTypes___hyg_1592____closed__1); +if (builtin) {res = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_MonoTypes___hyg_1592_(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; l_Lean_Compiler_LCNF_monoTypeExt = lean_io_result_get_value(res); lean_mark_persistent(l_Lean_Compiler_LCNF_monoTypeExt); diff --git a/stage0/stdlib/Lean/Compiler/LCNF/PassManager.c b/stage0/stdlib/Lean/Compiler/LCNF/PassManager.c index d0e12574fb..fccdf3289c 100644 --- a/stage0/stdlib/Lean/Compiler/LCNF/PassManager.c +++ b/stage0/stdlib/Lean/Compiler/LCNF/PassManager.c @@ -14,23 +14,27 @@ extern "C" { #endif LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_Pass_mkPerDeclaration___elambda__1___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT uint8_t l_Lean_Compiler_LCNF_Pass_phaseOut___default(uint8_t); lean_object* lean_array_set(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_addMessageContextPartial___at_Lean_Core_instAddMessageContextCoreM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__1; LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_findHighestOccurrence___spec__1(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_PassInstaller_replacePass(lean_object*, lean_object*, lean_object*); size_t lean_usize_add(size_t, size_t); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_instInhabitedPass; static lean_object* l_Lean_Compiler_LCNF_PassInstaller_installAfter___elambda__1___closed__4; lean_object* lean_mk_empty_array_with_capacity(lean_object*); +lean_object* l_Lean_Name_str___override(lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_PassInstaller_installAfter___elambda__1___closed__8; +static lean_object* l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__8; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_PassInstaller_withEachOccurrence___elambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Phase_instToStringPhase(uint8_t); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_PassInstaller_installAfter___elambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_Lean_Compiler_LCNF_instInhabitedPass___lambda__1___closed__1; lean_object* lean_array_uget(lean_object*, size_t); +static lean_object* l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__9; static lean_object* l_Lean_Compiler_LCNF_PassInstaller_installAfter___elambda__1___closed__1; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_PassInstaller_append(lean_object*); lean_object* l_Array_append___rarg(lean_object*, lean_object*); +static lean_object* l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__27; LEAN_EXPORT lean_object* l_Lean_ofExcept___at___private_Lean_Compiler_LCNF_PassManager_0__Lean_Compiler_LCNF_PassInstaller_getPassInstallerUnsafe___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_PassInstaller_withEachOccurrence___elambda__1___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_PassInstaller_installBefore___elambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -41,9 +45,12 @@ static lean_object* l_Lean_Compiler_LCNF_PassInstaller_installAfter___elambda__1 LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_instInhabitedPassInstaller___rarg(lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_PassInstaller_installAtEnd___elambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_uset(lean_object*, size_t, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Pass_phaseOut___default___boxed(lean_object*); +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_instDecidableLtPhaseInstLTPhase___boxed(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_instInhabitedPass___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__4; +static lean_object* l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__17; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_PassInstaller_installAfterEach(lean_object*, lean_object*); -static lean_object* l_Lean_Compiler_LCNF_Phase_instToStringPhase___closed__2; lean_object* lean_st_ref_get(lean_object*, lean_object*); uint8_t lean_name_eq(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_panic___at_Lean_Compiler_LCNF_PassInstaller_installAfter___elambda__1___spec__2(lean_object*); @@ -51,18 +58,23 @@ LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_PassInstaller_run(lean_object*, le lean_object* lean_array_push(lean_object*, lean_object*); lean_object* lean_array_get_size(lean_object*); lean_object* lean_string_append(lean_object*, lean_object*); +static lean_object* l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__18; +static lean_object* l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__15; LEAN_EXPORT lean_object* l_Lean_throwError___at___private_Lean_Compiler_LCNF_PassManager_0__Lean_Compiler_LCNF_PassInstaller_getPassInstallerUnsafe___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_findHighestOccurrence___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_Lean_Compiler_LCNF_Phase_instToStringPhase___closed__1; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Phase_toNat___boxed(lean_object*); +static lean_object* l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__22; uint8_t lean_usize_dec_lt(size_t, size_t); +static lean_object* l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__19; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Pass_mkPerDeclaration___elambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_nat_add(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_PassManager_validate___boxed(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Compiler_LCNF_PassInstaller_installAfter___elambda__1___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__5; +static lean_object* l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__14; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_PassInstaller_runFromDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Compiler_LCNF_PassManager_validate___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT uint8_t l_Lean_Compiler_LCNF_Phase_instDecidableLtPhaseInstLTPhase(uint8_t, uint8_t); +static lean_object* l_Lean_Compiler_LCNF_instToStringPhase___closed__3; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_instInhabitedPassManager; static lean_object* l_Lean_Compiler_LCNF_PassManager_findHighestOccurrence___closed__1; lean_object* lean_array_fget(lean_object*, lean_object*); @@ -70,27 +82,29 @@ static lean_object* l_Lean_Compiler_LCNF_PassInstaller_installAfter___elambda__1 uint8_t lean_nat_dec_eq(lean_object*, lean_object*); uint8_t l_instDecidableNot___rarg(uint8_t); LEAN_EXPORT lean_object* l_Lean_throwError___at___private_Lean_Compiler_LCNF_PassManager_0__Lean_Compiler_LCNF_PassInstaller_getPassInstallerUnsafe___spec__2(lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Phase_instDecidableLtPhaseInstLTPhase___boxed(lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Phase_instToStringPhase___boxed(lean_object*); lean_object* lean_nat_sub(lean_object*, lean_object*); LEAN_EXPORT uint8_t l_Lean_Compiler_LCNF_PassInstaller_installAfter___elambda__1___lambda__1(lean_object*, lean_object*, lean_object*); lean_object* l_Array_insertAt_x21___rarg(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Compiler_LCNF_PassManager_validate___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__25; static lean_object* l_Lean_Compiler_LCNF_PassInstaller_installAfter___elambda__1___closed__5; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_instInhabitedPassInstaller(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_PassInstaller_installBefore(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_instInhabitedPassInstaller___boxed(lean_object*, lean_object*, lean_object*); -static lean_object* l_Lean_Compiler_LCNF_Phase_instToStringPhase___closed__3; lean_object* l_Lean_Name_toString(lean_object*, uint8_t); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_PassInstaller_replacePass___elambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__6; static lean_object* l_Lean_Compiler_LCNF_PassInstaller_installAfter___elambda__1___closed__3; +static lean_object* l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__13; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_PassInstaller_installAtEnd___elambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126_; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_PassInstaller_withEachOccurrence(lean_object*, lean_object*); lean_object* l_Nat_repr(lean_object*); LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Compiler_LCNF_PassManager_findHighestOccurrence___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_PassManager_findHighestOccurrence(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Compiler_LCNF_PassInstaller_installAfter___elambda__1___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_PassInstaller_installAfter(lean_object*, lean_object*, lean_object*); +static lean_object* l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__23; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Pass_mkPerDeclaration(lean_object*, lean_object*, uint8_t, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Phase_toNat(uint8_t); LEAN_EXPORT lean_object* l_Lean_ofExcept___at___private_Lean_Compiler_LCNF_PassManager_0__Lean_Compiler_LCNF_PassInstaller_getPassInstallerUnsafe___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); @@ -98,57 +112,209 @@ static lean_object* l_Lean_Compiler_LCNF_PassInstaller_installAfter___elambda__1 static lean_object* l___private_Lean_Compiler_LCNF_PassManager_0__Lean_Compiler_LCNF_PassInstaller_getPassInstallerUnsafe___closed__2; lean_object* l___private_Init_Util_0__mkPanicMessageWithDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_Compiler_LCNF_PassManager_0__Lean_Compiler_LCNF_PassInstaller_getPassInstallerUnsafe___closed__4; +static lean_object* l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__20; LEAN_EXPORT lean_object* l___private_Lean_Compiler_LCNF_PassManager_0__Lean_Compiler_LCNF_PassInstaller_getPassInstallerUnsafe___boxed(lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_Compiler_LCNF_PassManager_0__Lean_Compiler_LCNF_PassInstaller_getPassInstallerUnsafe___closed__1; +static lean_object* l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__10; size_t lean_usize_of_nat(lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_PassInstaller_installAtEnd(lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_PassInstaller_replaceEachOccurrence(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_PassInstaller_append___elambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Environment_evalConstCheck___rarg(lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_instInhabitedPassInstaller___rarg___closed__1; -static lean_object* l___private_Lean_Compiler_LCNF_PassManager_0__Lean_Compiler_LCNF_PassInstaller_getPassInstallerUnsafe___closed__5; +LEAN_EXPORT uint8_t l_Lean_Compiler_LCNF_instDecidableLePhaseInstLEPhase(uint8_t, uint8_t); static lean_object* l_Lean_Compiler_LCNF_instInhabitedPassInstaller___rarg___closed__2; LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_validate___spec__2___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_Compiler_LCNF_PassManager_0__Lean_Compiler_LCNF_PassInstaller_getPassInstallerUnsafe___closed__3; -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Phase_instDecidableLePhaseInstLEPhase___boxed(lean_object*, lean_object*); +static lean_object* l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__16; +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_instToStringPhase(uint8_t); +static lean_object* l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__7; +static lean_object* l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__24; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Pass_occurrence___default; +static lean_object* l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__3; uint8_t lean_nat_dec_le(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_PassInstaller_withEachOccurrence___elambda__1___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_instLTPhase; +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_instLEPhase; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_PassManager_validate(lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_instInhabitedPass___closed__1; +static lean_object* l_Lean_Compiler_LCNF_instToStringPhase___closed__1; uint8_t lean_nat_dec_eq(lean_object*, lean_object*); static lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_validate___spec__2___closed__2; +static lean_object* l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__11; LEAN_EXPORT lean_object* l___private_Lean_Compiler_LCNF_PassManager_0__Lean_Compiler_LCNF_PassInstaller_getPassInstallerUnsafe(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_panic_fn(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_PassInstaller_append___elambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_PassInstaller_replacePass___elambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_validate___spec__2___lambda__1(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__12; +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_instToStringPhase___boxed(lean_object*); +static lean_object* l_Lean_Compiler_LCNF_instToStringPhase___closed__2; static lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_validate___spec__2___closed__1; +static lean_object* l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__26; LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_validate___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_PassInstaller_replacePass___elambda__1___closed__1; -LEAN_EXPORT uint8_t l_Lean_Compiler_LCNF_Phase_instDecidableLePhaseInstLEPhase(uint8_t, uint8_t); static lean_object* l_Lean_Compiler_LCNF_instInhabitedPass___closed__2; lean_object* l_Array_findIdx_x3f_loop___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_Pass_mkPerDeclaration___elambda__1___spec__1(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Name_mkStr4(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_PassInstaller_installAfter___elambda__1___lambda__1___boxed(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Pass_mkPerDeclaration___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_instDecidableLePhaseInstLEPhase___boxed(lean_object*, lean_object*); +LEAN_EXPORT uint8_t l_Lean_Compiler_LCNF_instDecidableLtPhaseInstLTPhase(uint8_t, uint8_t); LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Compiler_LCNF_PassManager_findHighestOccurrence___spec__2(lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__21; static lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_validate___spec__2___closed__3; -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Phase_instLEPhase; -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Phase_instLTPhase; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_PassInstaller_installBeforeEachOccurrence(lean_object*, lean_object*); +static lean_object* l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__2; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_instInhabitedPass___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); -static lean_object* _init_l_Lean_Compiler_LCNF_Pass_occurrence___default() { +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Phase_toNat(uint8_t x_1) { +_start: +{ +switch (x_1) { +case 0: +{ +lean_object* x_2; +x_2 = lean_unsigned_to_nat(0u); +return x_2; +} +case 1: +{ +lean_object* x_3; +x_3 = lean_unsigned_to_nat(1u); +return x_3; +} +default: +{ +lean_object* x_4; +x_4 = lean_unsigned_to_nat(2u); +return x_4; +} +} +} +} +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Phase_toNat___boxed(lean_object* x_1) { +_start: +{ +uint8_t x_2; lean_object* x_3; +x_2 = lean_unbox(x_1); +lean_dec(x_1); +x_3 = l_Lean_Compiler_LCNF_Phase_toNat(x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_instLTPhase() { _start: { lean_object* x_1; -x_1 = lean_unsigned_to_nat(0u); +x_1 = lean_box(0); return x_1; } } -static lean_object* _init_l_Lean_Compiler_LCNF_instInhabitedPass___lambda__1___closed__1() { +static lean_object* _init_l_Lean_Compiler_LCNF_instLEPhase() { +_start: +{ +lean_object* x_1; +x_1 = lean_box(0); +return x_1; +} +} +LEAN_EXPORT uint8_t l_Lean_Compiler_LCNF_instDecidableLtPhaseInstLTPhase(uint8_t x_1, uint8_t x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; uint8_t x_5; +x_3 = l_Lean_Compiler_LCNF_Phase_toNat(x_1); +x_4 = l_Lean_Compiler_LCNF_Phase_toNat(x_2); +x_5 = lean_nat_dec_lt(x_3, x_4); +lean_dec(x_4); +lean_dec(x_3); +return x_5; +} +} +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_instDecidableLtPhaseInstLTPhase___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +uint8_t x_3; uint8_t x_4; uint8_t x_5; lean_object* x_6; +x_3 = lean_unbox(x_1); +lean_dec(x_1); +x_4 = lean_unbox(x_2); +lean_dec(x_2); +x_5 = l_Lean_Compiler_LCNF_instDecidableLtPhaseInstLTPhase(x_3, x_4); +x_6 = lean_box(x_5); +return x_6; +} +} +LEAN_EXPORT uint8_t l_Lean_Compiler_LCNF_instDecidableLePhaseInstLEPhase(uint8_t x_1, uint8_t x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; uint8_t x_5; +x_3 = l_Lean_Compiler_LCNF_Phase_toNat(x_1); +x_4 = l_Lean_Compiler_LCNF_Phase_toNat(x_2); +x_5 = lean_nat_dec_le(x_3, x_4); +lean_dec(x_4); +lean_dec(x_3); +return x_5; +} +} +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_instDecidableLePhaseInstLEPhase___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +uint8_t x_3; uint8_t x_4; uint8_t x_5; lean_object* x_6; +x_3 = lean_unbox(x_1); +lean_dec(x_1); +x_4 = lean_unbox(x_2); +lean_dec(x_2); +x_5 = l_Lean_Compiler_LCNF_instDecidableLePhaseInstLEPhase(x_3, x_4); +x_6 = lean_box(x_5); +return x_6; +} +} +static lean_object* _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("Lean", 4); +return x_1; +} +} +static lean_object* _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__2() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("Parser", 6); +return x_1; +} +} +static lean_object* _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("Tactic", 6); +return x_1; +} +} +static lean_object* _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__4() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("tacticSeq", 9); +return x_1; +} +} +static lean_object* _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; +x_1 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__1; +x_2 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__2; +x_3 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__3; +x_4 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__4; +x_5 = l_Lean_Name_mkStr4(x_1, x_2, x_3, x_4); +return x_5; +} +} +static lean_object* _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__6() { _start: { lean_object* x_1; lean_object* x_2; @@ -157,15 +323,277 @@ x_2 = lean_mk_empty_array_with_capacity(x_1); return x_2; } } +static lean_object* _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__7() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("tacticSeq1Indented", 18); +return x_1; +} +} +static lean_object* _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__8() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; +x_1 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__1; +x_2 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__2; +x_3 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__3; +x_4 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__7; +x_5 = l_Lean_Name_mkStr4(x_1, x_2, x_3, x_4); +return x_5; +} +} +static lean_object* _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__9() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("null", 4); +return x_1; +} +} +static lean_object* _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__10() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__9; +x_3 = l_Lean_Name_str___override(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__11() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("simp", 4); +return x_1; +} +} +static lean_object* _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__12() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; +x_1 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__1; +x_2 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__2; +x_3 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__3; +x_4 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__11; +x_5 = l_Lean_Name_mkStr4(x_1, x_2, x_3, x_4); +return x_5; +} +} +static lean_object* _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__13() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(2); +x_2 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__11; +x_3 = lean_alloc_ctor(2, 2, 0); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set(x_3, 1, x_2); +return x_3; +} +} +static lean_object* _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__14() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__6; +x_2 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__13; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__15() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = lean_box(2); +x_2 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__10; +x_3 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__6; +x_4 = lean_alloc_ctor(1, 3, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_2); +lean_ctor_set(x_4, 2, x_3); +return x_4; +} +} +static lean_object* _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__16() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__14; +x_2 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__15; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__17() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__16; +x_2 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__15; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__18() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__17; +x_2 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__15; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__19() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__18; +x_2 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__15; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__20() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__19; +x_2 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__15; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__21() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = lean_box(2); +x_2 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__12; +x_3 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__20; +x_4 = lean_alloc_ctor(1, 3, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_2); +lean_ctor_set(x_4, 2, x_3); +return x_4; +} +} +static lean_object* _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__22() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__6; +x_2 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__21; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__23() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = lean_box(2); +x_2 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__10; +x_3 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__22; +x_4 = lean_alloc_ctor(1, 3, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_2); +lean_ctor_set(x_4, 2, x_3); +return x_4; +} +} +static lean_object* _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__24() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__6; +x_2 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__23; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__25() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = lean_box(2); +x_2 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__8; +x_3 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__24; +x_4 = lean_alloc_ctor(1, 3, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_2); +lean_ctor_set(x_4, 2, x_3); +return x_4; +} +} +static lean_object* _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__26() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__6; +x_2 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__25; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__27() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = lean_box(2); +x_2 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__5; +x_3 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__26; +x_4 = lean_alloc_ctor(1, 3, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_2); +lean_ctor_set(x_4, 2, x_3); +return x_4; +} +} +static lean_object* _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126_() { +_start: +{ +lean_object* x_1; +x_1 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__27; +return x_1; +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_Pass_occurrence___default() { +_start: +{ +lean_object* x_1; +x_1 = lean_unsigned_to_nat(0u); +return x_1; +} +} +LEAN_EXPORT uint8_t l_Lean_Compiler_LCNF_Pass_phaseOut___default(uint8_t x_1) { +_start: +{ +return x_1; +} +} +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Pass_phaseOut___default___boxed(lean_object* x_1) { +_start: +{ +uint8_t x_2; uint8_t x_3; lean_object* x_4; +x_2 = lean_unbox(x_1); +lean_dec(x_1); +x_3 = l_Lean_Compiler_LCNF_Pass_phaseOut___default(x_2); +x_4 = lean_box(x_3); +return x_4; +} +} LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_instInhabitedPass___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { -lean_object* x_7; lean_object* x_8; -x_7 = l_Lean_Compiler_LCNF_instInhabitedPass___lambda__1___closed__1; -x_8 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_8, 0, x_7); -lean_ctor_set(x_8, 1, x_6); -return x_8; +lean_object* x_7; +x_7 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_7, 0, x_1); +lean_ctor_set(x_7, 1, x_6); +return x_7; } } static lean_object* _init_l_Lean_Compiler_LCNF_instInhabitedPass___closed__1() { @@ -184,11 +612,12 @@ x_1 = lean_unsigned_to_nat(0u); x_2 = 0; x_3 = lean_box(0); x_4 = l_Lean_Compiler_LCNF_instInhabitedPass___closed__1; -x_5 = lean_alloc_ctor(0, 3, 1); +x_5 = lean_alloc_ctor(0, 3, 2); lean_ctor_set(x_5, 0, x_1); lean_ctor_set(x_5, 1, x_3); lean_ctor_set(x_5, 2, x_4); lean_ctor_set_uint8(x_5, sizeof(void*)*3, x_2); +lean_ctor_set_uint8(x_5, sizeof(void*)*3 + 1, x_2); return x_5; } } @@ -209,7 +638,6 @@ lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); -lean_dec(x_1); return x_7; } } @@ -269,112 +697,11 @@ static lean_object* _init_l_Lean_Compiler_LCNF_instInhabitedPassManager() { _start: { lean_object* x_1; -x_1 = l_Lean_Compiler_LCNF_instInhabitedPass___lambda__1___closed__1; +x_1 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__6; return x_1; } } -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Phase_toNat(uint8_t x_1) { -_start: -{ -switch (x_1) { -case 0: -{ -lean_object* x_2; -x_2 = lean_unsigned_to_nat(0u); -return x_2; -} -case 1: -{ -lean_object* x_3; -x_3 = lean_unsigned_to_nat(1u); -return x_3; -} -default: -{ -lean_object* x_4; -x_4 = lean_unsigned_to_nat(2u); -return x_4; -} -} -} -} -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Phase_toNat___boxed(lean_object* x_1) { -_start: -{ -uint8_t x_2; lean_object* x_3; -x_2 = lean_unbox(x_1); -lean_dec(x_1); -x_3 = l_Lean_Compiler_LCNF_Phase_toNat(x_2); -return x_3; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_Phase_instLTPhase() { -_start: -{ -lean_object* x_1; -x_1 = lean_box(0); -return x_1; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_Phase_instLEPhase() { -_start: -{ -lean_object* x_1; -x_1 = lean_box(0); -return x_1; -} -} -LEAN_EXPORT uint8_t l_Lean_Compiler_LCNF_Phase_instDecidableLtPhaseInstLTPhase(uint8_t x_1, uint8_t x_2) { -_start: -{ -lean_object* x_3; lean_object* x_4; uint8_t x_5; -x_3 = l_Lean_Compiler_LCNF_Phase_toNat(x_1); -x_4 = l_Lean_Compiler_LCNF_Phase_toNat(x_2); -x_5 = lean_nat_dec_lt(x_3, x_4); -lean_dec(x_4); -lean_dec(x_3); -return x_5; -} -} -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Phase_instDecidableLtPhaseInstLTPhase___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -uint8_t x_3; uint8_t x_4; uint8_t x_5; lean_object* x_6; -x_3 = lean_unbox(x_1); -lean_dec(x_1); -x_4 = lean_unbox(x_2); -lean_dec(x_2); -x_5 = l_Lean_Compiler_LCNF_Phase_instDecidableLtPhaseInstLTPhase(x_3, x_4); -x_6 = lean_box(x_5); -return x_6; -} -} -LEAN_EXPORT uint8_t l_Lean_Compiler_LCNF_Phase_instDecidableLePhaseInstLEPhase(uint8_t x_1, uint8_t x_2) { -_start: -{ -lean_object* x_3; lean_object* x_4; uint8_t x_5; -x_3 = l_Lean_Compiler_LCNF_Phase_toNat(x_1); -x_4 = l_Lean_Compiler_LCNF_Phase_toNat(x_2); -x_5 = lean_nat_dec_le(x_3, x_4); -lean_dec(x_4); -lean_dec(x_3); -return x_5; -} -} -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Phase_instDecidableLePhaseInstLEPhase___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -uint8_t x_3; uint8_t x_4; uint8_t x_5; lean_object* x_6; -x_3 = lean_unbox(x_1); -lean_dec(x_1); -x_4 = lean_unbox(x_2); -lean_dec(x_2); -x_5 = l_Lean_Compiler_LCNF_Phase_instDecidableLePhaseInstLEPhase(x_3, x_4); -x_6 = lean_box(x_5); -return x_6; -} -} -static lean_object* _init_l_Lean_Compiler_LCNF_Phase_instToStringPhase___closed__1() { +static lean_object* _init_l_Lean_Compiler_LCNF_instToStringPhase___closed__1() { _start: { lean_object* x_1; @@ -382,7 +709,7 @@ x_1 = lean_mk_string_from_bytes("base", 4); return x_1; } } -static lean_object* _init_l_Lean_Compiler_LCNF_Phase_instToStringPhase___closed__2() { +static lean_object* _init_l_Lean_Compiler_LCNF_instToStringPhase___closed__2() { _start: { lean_object* x_1; @@ -390,7 +717,7 @@ x_1 = lean_mk_string_from_bytes("mono", 4); return x_1; } } -static lean_object* _init_l_Lean_Compiler_LCNF_Phase_instToStringPhase___closed__3() { +static lean_object* _init_l_Lean_Compiler_LCNF_instToStringPhase___closed__3() { _start: { lean_object* x_1; @@ -398,38 +725,38 @@ x_1 = lean_mk_string_from_bytes("impure", 6); return x_1; } } -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Phase_instToStringPhase(uint8_t x_1) { +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_instToStringPhase(uint8_t x_1) { _start: { switch (x_1) { case 0: { lean_object* x_2; -x_2 = l_Lean_Compiler_LCNF_Phase_instToStringPhase___closed__1; +x_2 = l_Lean_Compiler_LCNF_instToStringPhase___closed__1; return x_2; } case 1: { lean_object* x_3; -x_3 = l_Lean_Compiler_LCNF_Phase_instToStringPhase___closed__2; +x_3 = l_Lean_Compiler_LCNF_instToStringPhase___closed__2; return x_3; } default: { lean_object* x_4; -x_4 = l_Lean_Compiler_LCNF_Phase_instToStringPhase___closed__3; +x_4 = l_Lean_Compiler_LCNF_instToStringPhase___closed__3; return x_4; } } } } -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Phase_instToStringPhase___boxed(lean_object* x_1) { +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_instToStringPhase___boxed(lean_object* x_1) { _start: { uint8_t x_2; lean_object* x_3; x_2 = lean_unbox(x_1); lean_dec(x_1); -x_3 = l_Lean_Compiler_LCNF_Phase_instToStringPhase(x_2); +x_3 = l_Lean_Compiler_LCNF_instToStringPhase(x_2); return x_3; } } @@ -528,11 +855,12 @@ _start: lean_object* x_5; lean_object* x_6; x_5 = lean_alloc_closure((void*)(l_Lean_Compiler_LCNF_Pass_mkPerDeclaration___elambda__1), 7, 1); lean_closure_set(x_5, 0, x_2); -x_6 = lean_alloc_ctor(0, 3, 1); +x_6 = lean_alloc_ctor(0, 3, 2); lean_ctor_set(x_6, 0, x_4); lean_ctor_set(x_6, 1, x_1); lean_ctor_set(x_6, 2, x_5); lean_ctor_set_uint8(x_6, sizeof(void*)*3, x_3); +lean_ctor_set_uint8(x_6, sizeof(void*)*3 + 1, x_3); return x_6; } } @@ -653,7 +981,7 @@ else lean_object* x_11; uint8_t x_12; uint8_t x_13; uint8_t x_14; x_11 = lean_array_uget(x_1, x_3); x_12 = lean_ctor_get_uint8(x_11, sizeof(void*)*3); -x_13 = l_Lean_Compiler_LCNF_Phase_instDecidableLePhaseInstLEPhase(x_4, x_12); +x_13 = l_Lean_Compiler_LCNF_instDecidableLePhaseInstLEPhase(x_4, x_12); x_14 = l_instDecidableNot___rarg(x_13); if (x_14 == 0) { @@ -695,21 +1023,21 @@ switch (x_12) { case 0: { lean_object* x_66; -x_66 = l_Lean_Compiler_LCNF_Phase_instToStringPhase___closed__1; +x_66 = l_Lean_Compiler_LCNF_instToStringPhase___closed__1; x_31 = x_66; goto block_65; } case 1: { lean_object* x_67; -x_67 = l_Lean_Compiler_LCNF_Phase_instToStringPhase___closed__2; +x_67 = l_Lean_Compiler_LCNF_instToStringPhase___closed__2; x_31 = x_67; goto block_65; } default: { lean_object* x_68; -x_68 = l_Lean_Compiler_LCNF_Phase_instToStringPhase___closed__3; +x_68 = l_Lean_Compiler_LCNF_instToStringPhase___closed__3; x_31 = x_68; goto block_65; } @@ -725,7 +1053,7 @@ switch (x_4) { case 0: { lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; uint8_t x_41; -x_35 = l_Lean_Compiler_LCNF_Phase_instToStringPhase___closed__1; +x_35 = l_Lean_Compiler_LCNF_instToStringPhase___closed__1; x_36 = lean_string_append(x_34, x_35); x_37 = lean_string_append(x_36, x_27); x_38 = lean_alloc_ctor(2, 1, 0); @@ -755,7 +1083,7 @@ return x_44; case 1: { lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; uint8_t x_51; -x_45 = l_Lean_Compiler_LCNF_Phase_instToStringPhase___closed__2; +x_45 = l_Lean_Compiler_LCNF_instToStringPhase___closed__2; x_46 = lean_string_append(x_34, x_45); x_47 = lean_string_append(x_46, x_27); x_48 = lean_alloc_ctor(2, 1, 0); @@ -785,7 +1113,7 @@ return x_54; default: { lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; uint8_t x_61; -x_55 = l_Lean_Compiler_LCNF_Phase_instToStringPhase___closed__3; +x_55 = l_Lean_Compiler_LCNF_instToStringPhase___closed__3; x_56 = lean_string_append(x_34, x_55); x_57 = lean_string_append(x_56, x_27); x_58 = lean_alloc_ctor(2, 1, 0); @@ -2028,7 +2356,7 @@ static lean_object* _init_l___private_Lean_Compiler_LCNF_PassManager_0__Lean_Com _start: { lean_object* x_1; -x_1 = lean_mk_string_from_bytes("Lean", 4); +x_1 = lean_mk_string_from_bytes("Compiler", 8); return x_1; } } @@ -2036,7 +2364,7 @@ static lean_object* _init_l___private_Lean_Compiler_LCNF_PassManager_0__Lean_Com _start: { lean_object* x_1; -x_1 = lean_mk_string_from_bytes("Compiler", 8); +x_1 = lean_mk_string_from_bytes("LCNF", 4); return x_1; } } @@ -2044,26 +2372,18 @@ static lean_object* _init_l___private_Lean_Compiler_LCNF_PassManager_0__Lean_Com _start: { lean_object* x_1; -x_1 = lean_mk_string_from_bytes("LCNF", 4); +x_1 = lean_mk_string_from_bytes("PassInstaller", 13); return x_1; } } static lean_object* _init_l___private_Lean_Compiler_LCNF_PassManager_0__Lean_Compiler_LCNF_PassInstaller_getPassInstallerUnsafe___closed__4() { _start: { -lean_object* x_1; -x_1 = lean_mk_string_from_bytes("PassInstaller", 13); -return x_1; -} -} -static lean_object* _init_l___private_Lean_Compiler_LCNF_PassManager_0__Lean_Compiler_LCNF_PassInstaller_getPassInstallerUnsafe___closed__5() { -_start: -{ lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; -x_1 = l___private_Lean_Compiler_LCNF_PassManager_0__Lean_Compiler_LCNF_PassInstaller_getPassInstallerUnsafe___closed__1; -x_2 = l___private_Lean_Compiler_LCNF_PassManager_0__Lean_Compiler_LCNF_PassInstaller_getPassInstallerUnsafe___closed__2; -x_3 = l___private_Lean_Compiler_LCNF_PassManager_0__Lean_Compiler_LCNF_PassInstaller_getPassInstallerUnsafe___closed__3; -x_4 = l___private_Lean_Compiler_LCNF_PassManager_0__Lean_Compiler_LCNF_PassInstaller_getPassInstallerUnsafe___closed__4; +x_1 = l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__1; +x_2 = l___private_Lean_Compiler_LCNF_PassManager_0__Lean_Compiler_LCNF_PassInstaller_getPassInstallerUnsafe___closed__1; +x_3 = l___private_Lean_Compiler_LCNF_PassManager_0__Lean_Compiler_LCNF_PassInstaller_getPassInstallerUnsafe___closed__2; +x_4 = l___private_Lean_Compiler_LCNF_PassManager_0__Lean_Compiler_LCNF_PassInstaller_getPassInstallerUnsafe___closed__3; x_5 = l_Lean_Name_mkStr4(x_1, x_2, x_3, x_4); return x_5; } @@ -2082,7 +2402,7 @@ x_8 = lean_ctor_get(x_6, 0); lean_inc(x_8); lean_dec(x_6); x_9 = lean_ctor_get(x_2, 2); -x_10 = l___private_Lean_Compiler_LCNF_PassManager_0__Lean_Compiler_LCNF_PassInstaller_getPassInstallerUnsafe___closed__5; +x_10 = l___private_Lean_Compiler_LCNF_PassManager_0__Lean_Compiler_LCNF_PassInstaller_getPassInstallerUnsafe___closed__4; x_11 = l_Lean_Environment_evalConstCheck___rarg(x_8, x_9, x_10, x_1); x_12 = l_Lean_ofExcept___at___private_Lean_Compiler_LCNF_PassManager_0__Lean_Compiler_LCNF_PassInstaller_getPassInstallerUnsafe___spec__1(x_11, x_2, x_3, x_7); return x_12; @@ -2270,10 +2590,68 @@ lean_dec_ref(res); res = initialize_Lean_Compiler_LCNF_CompilerM(builtin, lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +l_Lean_Compiler_LCNF_instLTPhase = _init_l_Lean_Compiler_LCNF_instLTPhase(); +lean_mark_persistent(l_Lean_Compiler_LCNF_instLTPhase); +l_Lean_Compiler_LCNF_instLEPhase = _init_l_Lean_Compiler_LCNF_instLEPhase(); +lean_mark_persistent(l_Lean_Compiler_LCNF_instLEPhase); +l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__1 = _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__1(); +lean_mark_persistent(l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__1); +l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__2 = _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__2(); +lean_mark_persistent(l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__2); +l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__3 = _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__3(); +lean_mark_persistent(l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__3); +l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__4 = _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__4(); +lean_mark_persistent(l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__4); +l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__5 = _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__5(); +lean_mark_persistent(l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__5); +l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__6 = _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__6(); +lean_mark_persistent(l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__6); +l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__7 = _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__7(); +lean_mark_persistent(l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__7); +l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__8 = _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__8(); +lean_mark_persistent(l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__8); +l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__9 = _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__9(); +lean_mark_persistent(l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__9); +l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__10 = _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__10(); +lean_mark_persistent(l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__10); +l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__11 = _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__11(); +lean_mark_persistent(l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__11); +l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__12 = _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__12(); +lean_mark_persistent(l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__12); +l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__13 = _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__13(); +lean_mark_persistent(l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__13); +l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__14 = _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__14(); +lean_mark_persistent(l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__14); +l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__15 = _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__15(); +lean_mark_persistent(l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__15); +l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__16 = _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__16(); +lean_mark_persistent(l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__16); +l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__17 = _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__17(); +lean_mark_persistent(l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__17); +l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__18 = _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__18(); +lean_mark_persistent(l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__18); +l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__19 = _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__19(); +lean_mark_persistent(l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__19); +l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__20 = _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__20(); +lean_mark_persistent(l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__20); +l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__21 = _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__21(); +lean_mark_persistent(l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__21); +l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__22 = _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__22(); +lean_mark_persistent(l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__22); +l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__23 = _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__23(); +lean_mark_persistent(l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__23); +l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__24 = _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__24(); +lean_mark_persistent(l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__24); +l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__25 = _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__25(); +lean_mark_persistent(l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__25); +l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__26 = _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__26(); +lean_mark_persistent(l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__26); +l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__27 = _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__27(); +lean_mark_persistent(l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126____closed__27); +l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126_ = _init_l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126_(); +lean_mark_persistent(l___auto____x40_Lean_Compiler_LCNF_PassManager___hyg_126_); l_Lean_Compiler_LCNF_Pass_occurrence___default = _init_l_Lean_Compiler_LCNF_Pass_occurrence___default(); lean_mark_persistent(l_Lean_Compiler_LCNF_Pass_occurrence___default); -l_Lean_Compiler_LCNF_instInhabitedPass___lambda__1___closed__1 = _init_l_Lean_Compiler_LCNF_instInhabitedPass___lambda__1___closed__1(); -lean_mark_persistent(l_Lean_Compiler_LCNF_instInhabitedPass___lambda__1___closed__1); l_Lean_Compiler_LCNF_instInhabitedPass___closed__1 = _init_l_Lean_Compiler_LCNF_instInhabitedPass___closed__1(); lean_mark_persistent(l_Lean_Compiler_LCNF_instInhabitedPass___closed__1); l_Lean_Compiler_LCNF_instInhabitedPass___closed__2 = _init_l_Lean_Compiler_LCNF_instInhabitedPass___closed__2(); @@ -2286,16 +2664,12 @@ l_Lean_Compiler_LCNF_instInhabitedPassInstaller___rarg___closed__2 = _init_l_Lea lean_mark_persistent(l_Lean_Compiler_LCNF_instInhabitedPassInstaller___rarg___closed__2); l_Lean_Compiler_LCNF_instInhabitedPassManager = _init_l_Lean_Compiler_LCNF_instInhabitedPassManager(); lean_mark_persistent(l_Lean_Compiler_LCNF_instInhabitedPassManager); -l_Lean_Compiler_LCNF_Phase_instLTPhase = _init_l_Lean_Compiler_LCNF_Phase_instLTPhase(); -lean_mark_persistent(l_Lean_Compiler_LCNF_Phase_instLTPhase); -l_Lean_Compiler_LCNF_Phase_instLEPhase = _init_l_Lean_Compiler_LCNF_Phase_instLEPhase(); -lean_mark_persistent(l_Lean_Compiler_LCNF_Phase_instLEPhase); -l_Lean_Compiler_LCNF_Phase_instToStringPhase___closed__1 = _init_l_Lean_Compiler_LCNF_Phase_instToStringPhase___closed__1(); -lean_mark_persistent(l_Lean_Compiler_LCNF_Phase_instToStringPhase___closed__1); -l_Lean_Compiler_LCNF_Phase_instToStringPhase___closed__2 = _init_l_Lean_Compiler_LCNF_Phase_instToStringPhase___closed__2(); -lean_mark_persistent(l_Lean_Compiler_LCNF_Phase_instToStringPhase___closed__2); -l_Lean_Compiler_LCNF_Phase_instToStringPhase___closed__3 = _init_l_Lean_Compiler_LCNF_Phase_instToStringPhase___closed__3(); -lean_mark_persistent(l_Lean_Compiler_LCNF_Phase_instToStringPhase___closed__3); +l_Lean_Compiler_LCNF_instToStringPhase___closed__1 = _init_l_Lean_Compiler_LCNF_instToStringPhase___closed__1(); +lean_mark_persistent(l_Lean_Compiler_LCNF_instToStringPhase___closed__1); +l_Lean_Compiler_LCNF_instToStringPhase___closed__2 = _init_l_Lean_Compiler_LCNF_instToStringPhase___closed__2(); +lean_mark_persistent(l_Lean_Compiler_LCNF_instToStringPhase___closed__2); +l_Lean_Compiler_LCNF_instToStringPhase___closed__3 = _init_l_Lean_Compiler_LCNF_instToStringPhase___closed__3(); +lean_mark_persistent(l_Lean_Compiler_LCNF_instToStringPhase___closed__3); l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_validate___spec__2___closed__1 = _init_l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_validate___spec__2___closed__1(); lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_validate___spec__2___closed__1); l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_validate___spec__2___closed__2 = _init_l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_validate___spec__2___closed__2(); @@ -2330,8 +2704,6 @@ l___private_Lean_Compiler_LCNF_PassManager_0__Lean_Compiler_LCNF_PassInstaller_g lean_mark_persistent(l___private_Lean_Compiler_LCNF_PassManager_0__Lean_Compiler_LCNF_PassInstaller_getPassInstallerUnsafe___closed__3); l___private_Lean_Compiler_LCNF_PassManager_0__Lean_Compiler_LCNF_PassInstaller_getPassInstallerUnsafe___closed__4 = _init_l___private_Lean_Compiler_LCNF_PassManager_0__Lean_Compiler_LCNF_PassInstaller_getPassInstallerUnsafe___closed__4(); lean_mark_persistent(l___private_Lean_Compiler_LCNF_PassManager_0__Lean_Compiler_LCNF_PassInstaller_getPassInstallerUnsafe___closed__4); -l___private_Lean_Compiler_LCNF_PassManager_0__Lean_Compiler_LCNF_PassInstaller_getPassInstallerUnsafe___closed__5 = _init_l___private_Lean_Compiler_LCNF_PassManager_0__Lean_Compiler_LCNF_PassInstaller_getPassInstallerUnsafe___closed__5(); -lean_mark_persistent(l___private_Lean_Compiler_LCNF_PassManager_0__Lean_Compiler_LCNF_PassInstaller_getPassInstallerUnsafe___closed__5); return lean_io_result_mk_ok(lean_box(0)); } #ifdef __cplusplus diff --git a/stage0/stdlib/Lean/Compiler/LCNF/Passes.c b/stage0/stdlib/Lean/Compiler/LCNF/Passes.c index eccba6f2e9..08791a0e91 100644 --- a/stage0/stdlib/Lean/Compiler/LCNF/Passes.c +++ b/stage0/stdlib/Lean/Compiler/LCNF/Passes.c @@ -1,6 +1,6 @@ // Lean compiler output // Module: Lean.Compiler.LCNF.Passes -// Imports: Init Lean.Compiler.LCNF.PassManager Lean.Compiler.LCNF.PullLetDecls Lean.Compiler.LCNF.CSE Lean.Compiler.LCNF.Simp Lean.Compiler.LCNF.PullFunDecls Lean.Compiler.LCNF.ReduceJpArity Lean.Compiler.LCNF.JoinPoints Lean.Compiler.LCNF.Specialize Lean.Compiler.LCNF.PhaseExt +// Imports: Init Lean.Compiler.LCNF.PassManager Lean.Compiler.LCNF.PullLetDecls Lean.Compiler.LCNF.CSE Lean.Compiler.LCNF.Simp Lean.Compiler.LCNF.PullFunDecls Lean.Compiler.LCNF.ReduceJpArity Lean.Compiler.LCNF.JoinPoints Lean.Compiler.LCNF.Specialize Lean.Compiler.LCNF.PhaseExt Lean.Compiler.LCNF.ToMono #include #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" @@ -13,105 +13,103 @@ #ifdef __cplusplus extern "C" { #endif -static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____closed__6; lean_object* l_List_reverse___rarg(lean_object*); +static lean_object* l_Lean_Compiler_LCNF_saveMono___closed__2; size_t lean_usize_add(size_t, size_t); +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____lambda__2(lean_object*, lean_object*); lean_object* l_Lean_registerTraceClass(lean_object*, uint8_t, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_builtinPassManager; +lean_object* l_Lean_Compiler_LCNF_Decl_saveMono(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_stringToMessageData(lean_object*); -static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____lambda__3___closed__2; lean_object* lean_mk_empty_array_with_capacity(lean_object*); +static lean_object* l_Lean_Compiler_LCNF_saveMono___closed__4; lean_object* l_Lean_Name_str___override(lean_object*, lean_object*); -static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__3; static lean_object* l_Lean_Compiler_LCNF_builtinPassManager___closed__1; -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____lambda__2(lean_object*, lean_object*); -static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__15; uint8_t lean_usize_dec_eq(size_t, size_t); lean_object* lean_array_uget(lean_object*, size_t); static lean_object* l_Lean_Compiler_LCNF_builtinPassManager___closed__17; -static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__2; -static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__8; static lean_object* l_Lean_Compiler_LCNF_normalizeFVarIds___closed__1; static lean_object* l_Lean_Compiler_LCNF_addPass___closed__11; -static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__18; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_getPassManager___rarg(lean_object*, lean_object*); -static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__14; -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__5; -static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____lambda__3___closed__1; static lean_object* l_Lean_Compiler_LCNF_normalizeFVarIds___closed__2; -static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__1; static lean_object* l_Lean_Compiler_LCNF_builtinPassManager___closed__2; lean_object* lean_st_ref_get(lean_object*, lean_object*); -static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____closed__2; -static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__6; +static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__6; static lean_object* l_Lean_Compiler_LCNF_normalizeFVarIds___closed__4; LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_runImportedDecls___spec__1(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____closed__1; +static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____closed__4; lean_object* l_Lean_Name_mkStr2(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____lambda__3(lean_object*); lean_object* lean_array_push(lean_object*, lean_object*); lean_object* lean_array_get_size(lean_object*); lean_object* l_Lean_Compiler_LCNF_Decl_internalize(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_builtinPassManager___closed__13; +static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____closed__5; +static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__20; +static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__10; static lean_object* l_Lean_Compiler_LCNF_addPass___closed__6; static lean_object* l_Lean_Compiler_LCNF_saveBase___closed__2; uint8_t lean_usize_dec_lt(size_t, size_t); static lean_object* l_Lean_Compiler_LCNF_builtinPassManager___closed__6; static lean_object* l_Lean_Compiler_LCNF_builtinPassManager___closed__14; -static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__13; -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Compiler_LCNF_PassInstaller_runFromDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____lambda__2___closed__1; extern lean_object* l_Lean_Compiler_LCNF_instInhabitedPassManager; static lean_object* l_Lean_Compiler_LCNF_normalizeFVarIds___closed__3; extern lean_object* l_Lean_Compiler_LCNF_findJoinPoints; -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____lambda__4___boxed(lean_object*); +static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__11; +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____lambda__2(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____lambda__4(lean_object*); lean_object* l_Lean_mkHashMapImp___rarg(lean_object*); uint8_t l___private_Lean_Attributes_0__Lean_beqAttributeKind____x40_Lean_Attributes___hyg_182_(uint8_t, uint8_t); -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____lambda__3(lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_builtinPassManager___closed__15; static lean_object* l_Lean_Compiler_LCNF_builtinPassManager___closed__3; lean_object* lean_st_ref_take(lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_getPassManager___rarg___closed__2; static lean_object* l_Lean_Compiler_LCNF_builtinPassManager___closed__5; +static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__19; static lean_object* l_Lean_Compiler_LCNF_builtinPassManager___closed__18; -static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____closed__7; -static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__17; +static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__8; +static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__4; extern lean_object* l_Lean_Compiler_LCNF_reduceJpArity; +static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__9; LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_runImportedDecls___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Name_num___override(lean_object*, lean_object*); +static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__7; lean_object* l_Lean_throwError___at_Lean_registerTagAttribute___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____lambda__4(lean_object*); -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__4; extern lean_object* l_Lean_Compiler_LCNF_specialize; +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_saveMono___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Compiler_LCNF_init___elambda__1___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___rarg(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_runImportedDecls___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____lambda__2___closed__2; +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____lambda__3(lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_builtinPassManager___closed__16; static lean_object* l_Lean_Compiler_LCNF_addPass___closed__9; +static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____closed__3; +static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__17; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_init; lean_object* l_Lean_getConstInfo___at___private_Lean_Compiler_LCNF_Util_0__Lean_Compiler_LCNF_getCasesOnInductiveVal_x3f___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Compiler_LCNF_Pass_mkPerDeclaration(lean_object*, lean_object*, uint8_t, lean_object*); -static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_848____closed__1; static lean_object* l_Lean_Compiler_LCNF_builtinPassManager___closed__7; -static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__9; static lean_object* l_Lean_Compiler_LCNF_addPass___closed__4; static lean_object* l_Lean_Compiler_LCNF_addPass___closed__3; -static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__19; +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____closed__7; +static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____lambda__2___closed__2; lean_object* l_Lean_Compiler_LCNF_Decl_saveBase(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Compiler_LCNF_pullFunDecls; lean_object* l_Lean_registerBuiltinAttribute(lean_object*, lean_object*); lean_object* l_Lean_throwError___at_Lean_AttributeImpl_erase___default___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____lambda__2___closed__1; static lean_object* l_Lean_Compiler_LCNF_builtinPassManager___closed__10; +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_runImportedDecls(lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Compiler_LCNF_builtinPassManager___closed__20; +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____lambda__2___boxed(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_saveBase___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__20; +static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__2; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_runImportedDecls___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_throwError___at_Lean_addDecl___spec__2(lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__10; size_t lean_usize_of_nat(lean_object*); lean_object* l_Lean_ConstantInfo_type(lean_object*); static lean_object* l_Lean_Compiler_LCNF_init___closed__3; @@ -119,23 +117,26 @@ lean_object* l_Lean_PersistentEnvExtension_addEntry___rarg(lean_object*, lean_ob LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_addPass(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_normalizeFVarIds(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_PersistentHashMap_mkEmptyEntriesArray(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_addPass___closed__5; -static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__11; +extern lean_object* l_Lean_Compiler_LCNF_toMono; +static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__13; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_passManagerExt; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_getPassManager___rarg___boxed(lean_object*, lean_object*); lean_object* l_List_redLength___rarg(lean_object*); LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_runImportedDecls___spec__2(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Compiler_LCNF_pullInstances; +static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__12; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_init___elambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Compiler_LCNF_simp(lean_object*, lean_object*); -static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__12; uint8_t lean_nat_dec_le(lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_getPassManager___rarg___closed__1; static lean_object* l_Lean_Compiler_LCNF_addPass___closed__10; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_init___elambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____lambda__2(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Compiler_LCNF_saveMono___closed__3; lean_object* l_Lean_Compiler_LCNF_CompilerM_run___rarg(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____lambda__3___closed__2; +static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__1; static lean_object* l_Lean_Compiler_LCNF_builtinPassManager___closed__12; static lean_object* l_Lean_Compiler_LCNF_addPass___closed__12; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_getPassManager___boxed(lean_object*); @@ -143,42 +144,52 @@ LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Compiler_LCNF_init_ lean_object* l_Lean_ImportM_runCoreM___rarg(lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_saveBase___closed__1; static lean_object* l_Lean_Compiler_LCNF_builtinPassManager___closed__11; +static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_908____closed__1; lean_object* lean_st_ref_set(lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_addPass___closed__8; -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699_(lean_object*); -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_848_(lean_object*); -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347_(lean_object*); +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759_(lean_object*); +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_908_(lean_object*); +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407_(lean_object*); +static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__3; lean_object* l_List_toArrayAux___rarg(lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____lambda__2___boxed(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_saveBase; static lean_object* l_Lean_Compiler_LCNF_saveBase___closed__3; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_saveBase___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Compiler_LCNF_cse; static lean_object* l_Lean_Compiler_LCNF_addPass___closed__1; +static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__5; +static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__18; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_getPassManager(lean_object*); +static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____lambda__3___closed__1; +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__14; lean_object* l_Lean_PersistentEnvExtension_getState___rarg(lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_addPass___closed__2; -static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____closed__4; +static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____closed__6; +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____lambda__4___boxed(lean_object*); +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_saveMono; +static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__15; lean_object* l_Lean_Attribute_Builtin_ensureNoArgs(lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_normalizeFVarIds___closed__5; static lean_object* l_Lean_Compiler_LCNF_normalizeFVarIds___closed__6; -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____lambda__3(lean_object*); -static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__16; +static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__16; +static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____closed__1; +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_saveMono___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_EStateM_pure___rarg(lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____closed__2; static lean_object* l_Lean_Compiler_LCNF_init___closed__4; +static lean_object* l_Lean_Compiler_LCNF_builtinPassManager___closed__19; static lean_object* l_Lean_Compiler_LCNF_builtinPassManager___closed__8; static lean_object* l_Lean_Compiler_LCNF_init___closed__1; -static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____closed__3; +static lean_object* l_Lean_Compiler_LCNF_saveMono___closed__1; static lean_object* l_Lean_Compiler_LCNF_builtinPassManager___closed__4; static lean_object* l_Lean_Compiler_LCNF_addPass___closed__7; static lean_object* l_Lean_Compiler_LCNF_saveBase___closed__4; static lean_object* l_Lean_Compiler_LCNF_builtinPassManager___closed__9; -static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__7; static lean_object* l_Lean_Compiler_LCNF_init___closed__2; uint8_t lean_string_dec_eq(lean_object*, lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); -static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____closed__5; LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Compiler_LCNF_init___elambda__1___spec__1(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { _start: { @@ -307,11 +318,12 @@ x_1 = lean_unsigned_to_nat(0u); x_2 = 0; x_3 = l_Lean_Compiler_LCNF_init___closed__2; x_4 = l_Lean_Compiler_LCNF_init___closed__3; -x_5 = lean_alloc_ctor(0, 3, 1); +x_5 = lean_alloc_ctor(0, 3, 2); lean_ctor_set(x_5, 0, x_1); lean_ctor_set(x_5, 1, x_3); lean_ctor_set(x_5, 2, x_4); lean_ctor_set_uint8(x_5, sizeof(void*)*3, x_2); +lean_ctor_set_uint8(x_5, sizeof(void*)*3 + 1, x_2); return x_5; } } @@ -945,6 +957,129 @@ lean_dec(x_2); return x_7; } } +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_saveMono___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; +lean_inc(x_5); +lean_inc(x_4); +lean_inc(x_1); +x_7 = l_Lean_Compiler_LCNF_normalizeFVarIds(x_1, x_4, x_5, x_6); +if (lean_obj_tag(x_7) == 0) +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; +x_8 = lean_ctor_get(x_7, 0); +lean_inc(x_8); +x_9 = lean_ctor_get(x_7, 1); +lean_inc(x_9); +lean_dec(x_7); +x_10 = l_Lean_Compiler_LCNF_Decl_saveMono(x_8, x_4, x_5, x_9); +lean_dec(x_5); +lean_dec(x_4); +x_11 = !lean_is_exclusive(x_10); +if (x_11 == 0) +{ +lean_object* x_12; +x_12 = lean_ctor_get(x_10, 0); +lean_dec(x_12); +lean_ctor_set(x_10, 0, x_1); +return x_10; +} +else +{ +lean_object* x_13; lean_object* x_14; +x_13 = lean_ctor_get(x_10, 1); +lean_inc(x_13); +lean_dec(x_10); +x_14 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_14, 0, x_1); +lean_ctor_set(x_14, 1, x_13); +return x_14; +} +} +else +{ +uint8_t x_15; +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_1); +x_15 = !lean_is_exclusive(x_7); +if (x_15 == 0) +{ +return x_7; +} +else +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_16 = lean_ctor_get(x_7, 0); +x_17 = lean_ctor_get(x_7, 1); +lean_inc(x_17); +lean_inc(x_16); +lean_dec(x_7); +x_18 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_18, 0, x_16); +lean_ctor_set(x_18, 1, x_17); +return x_18; +} +} +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_saveMono___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("saveMono", 8); +return x_1; +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_saveMono___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Compiler_LCNF_saveMono___closed__1; +x_3 = l_Lean_Name_str___override(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_saveMono___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Compiler_LCNF_saveMono___lambda__1___boxed), 6, 0); +return x_1; +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_saveMono___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; uint8_t x_3; lean_object* x_4; lean_object* x_5; +x_1 = l_Lean_Compiler_LCNF_saveMono___closed__2; +x_2 = l_Lean_Compiler_LCNF_saveMono___closed__3; +x_3 = 1; +x_4 = lean_unsigned_to_nat(0u); +x_5 = l_Lean_Compiler_LCNF_Pass_mkPerDeclaration(x_1, x_2, x_3, x_4); +return x_5; +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_saveMono() { +_start: +{ +lean_object* x_1; +x_1 = l_Lean_Compiler_LCNF_saveMono___closed__4; +return x_1; +} +} +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_saveMono___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; +x_7 = l_Lean_Compiler_LCNF_saveMono___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6); +lean_dec(x_3); +lean_dec(x_2); +return x_7; +} +} static lean_object* _init_l_Lean_Compiler_LCNF_builtinPassManager___closed__1() { _start: { @@ -1003,7 +1138,7 @@ static lean_object* _init_l_Lean_Compiler_LCNF_builtinPassManager___closed__6() _start: { lean_object* x_1; lean_object* x_2; -x_1 = lean_unsigned_to_nat(12u); +x_1 = lean_unsigned_to_nat(14u); x_2 = lean_mk_empty_array_with_capacity(x_1); return x_2; } @@ -1128,11 +1263,31 @@ x_3 = lean_array_push(x_1, x_2); return x_3; } } +static lean_object* _init_l_Lean_Compiler_LCNF_builtinPassManager___closed__19() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Compiler_LCNF_builtinPassManager___closed__18; +x_2 = l_Lean_Compiler_LCNF_toMono; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_builtinPassManager___closed__20() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Compiler_LCNF_builtinPassManager___closed__19; +x_2 = l_Lean_Compiler_LCNF_saveMono; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} static lean_object* _init_l_Lean_Compiler_LCNF_builtinPassManager() { _start: { lean_object* x_1; -x_1 = l_Lean_Compiler_LCNF_builtinPassManager___closed__18; +x_1 = l_Lean_Compiler_LCNF_builtinPassManager___closed__20; return x_1; } } @@ -1360,7 +1515,7 @@ lean_dec(x_1); return x_5; } } -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; @@ -1423,7 +1578,7 @@ return x_17; } } } -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____lambda__2(lean_object* x_1, lean_object* x_2) { +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____lambda__2(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; @@ -1460,7 +1615,7 @@ return x_11; } } } -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____lambda__3(lean_object* x_1) { +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____lambda__3(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; @@ -1475,7 +1630,7 @@ x_6 = l_List_toArrayAux___rarg(x_3, x_5); return x_6; } } -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____lambda__4(lean_object* x_1) { +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____lambda__4(lean_object* x_1) { _start: { lean_object* x_2; @@ -1483,7 +1638,7 @@ x_2 = lean_box(0); return x_2; } } -static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____closed__1() { +static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____closed__1() { _start: { lean_object* x_1; @@ -1491,17 +1646,17 @@ x_1 = lean_mk_string_from_bytes("cpass", 5); return x_1; } } -static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____closed__2() { +static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____closed__1; +x_2 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____closed__1; x_3 = l_Lean_Name_str___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____closed__3() { +static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____closed__3() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; @@ -1513,52 +1668,52 @@ lean_ctor_set(x_3, 1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____closed__4() { +static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____closed__4() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____closed__3; +x_1 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____closed__3; x_2 = lean_alloc_closure((void*)(l_EStateM_pure___rarg), 2, 1); lean_closure_set(x_2, 0, x_1); return x_2; } } -static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____closed__5() { +static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____closed__5() { _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____lambda__2___boxed), 2, 0); +x_1 = lean_alloc_closure((void*)(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____lambda__2___boxed), 2, 0); return x_1; } } -static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____closed__6() { +static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____closed__6() { _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____lambda__3), 1, 0); +x_1 = lean_alloc_closure((void*)(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____lambda__3), 1, 0); return x_1; } } -static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____closed__7() { +static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____closed__7() { _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____lambda__4___boxed), 1, 0); +x_1 = lean_alloc_closure((void*)(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____lambda__4___boxed), 1, 0); return x_1; } } -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347_(lean_object* x_1) { +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; x_2 = lean_box(0); -x_3 = lean_alloc_closure((void*)(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____lambda__1___boxed), 4, 1); +x_3 = lean_alloc_closure((void*)(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____lambda__1___boxed), 4, 1); lean_closure_set(x_3, 0, x_2); -x_4 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____closed__2; -x_5 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____closed__4; -x_6 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____closed__5; -x_7 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____closed__6; -x_8 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____closed__7; +x_4 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____closed__2; +x_5 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____closed__4; +x_6 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____closed__5; +x_7 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____closed__6; +x_8 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____closed__7; x_9 = lean_alloc_ctor(0, 6, 0); lean_ctor_set(x_9, 0, x_4); lean_ctor_set(x_9, 1, x_5); @@ -1570,29 +1725,29 @@ x_10 = l_Lean_registerPersistentEnvExtensionUnsafe___rarg(x_9, x_1); return x_10; } } -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; -x_5 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____lambda__1(x_1, x_2, x_3, x_4); +x_5 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____lambda__1(x_1, x_2, x_3, x_4); lean_dec(x_3); return x_5; } } -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____lambda__2___boxed(lean_object* x_1, lean_object* x_2) { +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____lambda__2___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; -x_3 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____lambda__2(x_1, x_2); +x_3 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____lambda__2(x_1, x_2); lean_dec(x_1); return x_3; } } -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____lambda__4___boxed(lean_object* x_1) { +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____lambda__4___boxed(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____lambda__4(x_1); +x_2 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____lambda__4(x_1); lean_dec(x_1); return x_2; } @@ -2227,7 +2382,7 @@ return x_120; } } } -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; @@ -2282,7 +2437,7 @@ return x_16; } } } -static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____lambda__2___closed__1() { +static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____lambda__2___closed__1() { _start: { lean_object* x_1; @@ -2290,16 +2445,16 @@ x_1 = lean_mk_string_from_bytes("invalid attribute 'cpass', must be global", 41) return x_1; } } -static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____lambda__2___closed__2() { +static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____lambda__2___closed__2() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____lambda__2___closed__1; +x_1 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____lambda__2___closed__1; x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____lambda__2(lean_object* x_1, lean_object* x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____lambda__2(lean_object* x_1, lean_object* x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { lean_object* x_7; @@ -2318,7 +2473,7 @@ if (x_10 == 0) { lean_object* x_11; lean_object* x_12; uint8_t x_13; lean_dec(x_1); -x_11 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____lambda__2___closed__2; +x_11 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____lambda__2___closed__2; x_12 = l_Lean_throwError___at_Lean_registerTagAttribute___spec__1(x_11, x_4, x_5, x_8); lean_dec(x_5); lean_dec(x_4); @@ -2345,7 +2500,7 @@ else { lean_object* x_17; lean_object* x_18; x_17 = lean_box(0); -x_18 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____lambda__1(x_1, x_17, x_4, x_5, x_8); +x_18 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____lambda__1(x_1, x_17, x_4, x_5, x_8); return x_18; } } @@ -2376,7 +2531,7 @@ return x_22; } } } -static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____lambda__3___closed__1() { +static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____lambda__3___closed__1() { _start: { lean_object* x_1; @@ -2384,25 +2539,25 @@ x_1 = lean_mk_string_from_bytes("attribute cannot be erased", 26); return x_1; } } -static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____lambda__3___closed__2() { +static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____lambda__3___closed__2() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____lambda__3___closed__1; +x_1 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____lambda__3___closed__1; x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____lambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____lambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; -x_5 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____lambda__3___closed__2; +x_5 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____lambda__3___closed__2; x_6 = l_Lean_throwError___at_Lean_AttributeImpl_erase___default___spec__1(x_5, x_2, x_3, x_4); return x_6; } } -static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__1() { +static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; @@ -2412,27 +2567,27 @@ x_3 = l_Lean_Name_str___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__2() { +static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__1; +x_1 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__1; x_2 = l_Lean_Compiler_LCNF_addPass___closed__6; x_3 = l_Lean_Name_str___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__3() { +static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__3() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__2; +x_1 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__2; x_2 = l_Lean_Compiler_LCNF_addPass___closed__7; x_3 = l_Lean_Name_str___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__4() { +static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__4() { _start: { lean_object* x_1; @@ -2440,17 +2595,17 @@ x_1 = lean_mk_string_from_bytes("initFn", 6); return x_1; } } -static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__5() { +static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__5() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__3; -x_2 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__4; +x_1 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__3; +x_2 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__4; x_3 = l_Lean_Name_str___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__6() { +static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__6() { _start: { lean_object* x_1; @@ -2458,47 +2613,47 @@ x_1 = lean_mk_string_from_bytes("_@", 2); return x_1; } } -static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__7() { +static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__7() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__5; -x_2 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__6; +x_1 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__5; +x_2 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__6; x_3 = l_Lean_Name_str___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__8() { +static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__8() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__7; +x_1 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__7; x_2 = l_Lean_Compiler_LCNF_addPass___closed__5; x_3 = l_Lean_Name_str___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__9() { +static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__9() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__8; +x_1 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__8; x_2 = l_Lean_Compiler_LCNF_addPass___closed__6; x_3 = l_Lean_Name_str___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__10() { +static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__10() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__9; +x_1 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__9; x_2 = l_Lean_Compiler_LCNF_addPass___closed__7; x_3 = l_Lean_Name_str___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__11() { +static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__11() { _start: { lean_object* x_1; @@ -2506,17 +2661,17 @@ x_1 = lean_mk_string_from_bytes("Passes", 6); return x_1; } } -static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__12() { +static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__12() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__10; -x_2 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__11; +x_1 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__10; +x_2 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__11; x_3 = l_Lean_Name_str___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__13() { +static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__13() { _start: { lean_object* x_1; @@ -2524,27 +2679,27 @@ x_1 = lean_mk_string_from_bytes("_hyg", 4); return x_1; } } -static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__14() { +static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__14() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__12; -x_2 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__13; +x_1 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__12; +x_2 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__13; x_3 = l_Lean_Name_str___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__15() { +static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__15() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__14; -x_2 = lean_unsigned_to_nat(699u); +x_1 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__14; +x_2 = lean_unsigned_to_nat(759u); x_3 = l_Lean_Name_num___override(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__16() { +static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__16() { _start: { lean_object* x_1; @@ -2552,13 +2707,13 @@ x_1 = lean_mk_string_from_bytes("compiler passes for the code generator", 38); return x_1; } } -static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__17() { +static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__17() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; uint8_t x_4; lean_object* x_5; -x_1 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__15; -x_2 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____closed__2; -x_3 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__16; +x_1 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__15; +x_2 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____closed__2; +x_3 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__16; x_4 = 1; x_5 = lean_alloc_ctor(0, 3, 1); lean_ctor_set(x_5, 0, x_1); @@ -2568,29 +2723,29 @@ lean_ctor_set_uint8(x_5, sizeof(void*)*3, x_4); return x_5; } } -static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__18() { +static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__18() { _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____lambda__2___boxed), 6, 0); +x_1 = lean_alloc_closure((void*)(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____lambda__2___boxed), 6, 0); return x_1; } } -static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__19() { +static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__19() { _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____lambda__3___boxed), 4, 0); +x_1 = lean_alloc_closure((void*)(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____lambda__3___boxed), 4, 0); return x_1; } } -static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__20() { +static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__20() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; -x_1 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__17; -x_2 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__18; -x_3 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__19; +x_1 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__17; +x_2 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__18; +x_3 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__19; x_4 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_4, 0, x_1); lean_ctor_set(x_4, 1, x_2); @@ -2598,46 +2753,46 @@ lean_ctor_set(x_4, 2, x_3); return x_4; } } -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699_(lean_object* x_1) { +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; -x_2 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__20; +x_2 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__20; x_3 = l_Lean_registerBuiltinAttribute(x_2, x_1); return x_3; } } -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; -x_6 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____lambda__1(x_1, x_2, x_3, x_4, x_5); +x_6 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____lambda__1(x_1, x_2, x_3, x_4, x_5); lean_dec(x_2); return x_6; } } -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { uint8_t x_7; lean_object* x_8; x_7 = lean_unbox(x_3); lean_dec(x_3); -x_8 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____lambda__2(x_1, x_2, x_7, x_4, x_5, x_6); +x_8 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____lambda__2(x_1, x_2, x_7, x_4, x_5, x_6); return x_8; } } -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____lambda__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____lambda__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; -x_5 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____lambda__3(x_1, x_2, x_3, x_4); +x_5 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____lambda__3(x_1, x_2, x_3, x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); return x_5; } } -static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_848____closed__1() { +static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_908____closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; @@ -2647,11 +2802,11 @@ x_3 = l_Lean_Name_mkStr2(x_1, x_2); return x_3; } } -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_848_(lean_object* x_1) { +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_908_(lean_object* x_1) { _start: { lean_object* x_2; uint8_t x_3; lean_object* x_4; -x_2 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_848____closed__1; +x_2 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_908____closed__1; x_3 = 1; x_4 = l_Lean_registerTraceClass(x_2, x_3, x_1); return x_4; @@ -2667,6 +2822,7 @@ lean_object* initialize_Lean_Compiler_LCNF_ReduceJpArity(uint8_t builtin, lean_o lean_object* initialize_Lean_Compiler_LCNF_JoinPoints(uint8_t builtin, lean_object*); lean_object* initialize_Lean_Compiler_LCNF_Specialize(uint8_t builtin, lean_object*); lean_object* initialize_Lean_Compiler_LCNF_PhaseExt(uint8_t builtin, lean_object*); +lean_object* initialize_Lean_Compiler_LCNF_ToMono(uint8_t builtin, lean_object*); static bool _G_initialized = false; LEAN_EXPORT lean_object* initialize_Lean_Compiler_LCNF_Passes(uint8_t builtin, lean_object* w) { lean_object * res; @@ -2702,6 +2858,9 @@ lean_dec_ref(res); res = initialize_Lean_Compiler_LCNF_PhaseExt(builtin, lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +res = initialize_Lean_Compiler_LCNF_ToMono(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); l_Lean_Compiler_LCNF_init___closed__1 = _init_l_Lean_Compiler_LCNF_init___closed__1(); lean_mark_persistent(l_Lean_Compiler_LCNF_init___closed__1); l_Lean_Compiler_LCNF_init___closed__2 = _init_l_Lean_Compiler_LCNF_init___closed__2(); @@ -2734,6 +2893,16 @@ l_Lean_Compiler_LCNF_saveBase___closed__4 = _init_l_Lean_Compiler_LCNF_saveBase_ lean_mark_persistent(l_Lean_Compiler_LCNF_saveBase___closed__4); l_Lean_Compiler_LCNF_saveBase = _init_l_Lean_Compiler_LCNF_saveBase(); lean_mark_persistent(l_Lean_Compiler_LCNF_saveBase); +l_Lean_Compiler_LCNF_saveMono___closed__1 = _init_l_Lean_Compiler_LCNF_saveMono___closed__1(); +lean_mark_persistent(l_Lean_Compiler_LCNF_saveMono___closed__1); +l_Lean_Compiler_LCNF_saveMono___closed__2 = _init_l_Lean_Compiler_LCNF_saveMono___closed__2(); +lean_mark_persistent(l_Lean_Compiler_LCNF_saveMono___closed__2); +l_Lean_Compiler_LCNF_saveMono___closed__3 = _init_l_Lean_Compiler_LCNF_saveMono___closed__3(); +lean_mark_persistent(l_Lean_Compiler_LCNF_saveMono___closed__3); +l_Lean_Compiler_LCNF_saveMono___closed__4 = _init_l_Lean_Compiler_LCNF_saveMono___closed__4(); +lean_mark_persistent(l_Lean_Compiler_LCNF_saveMono___closed__4); +l_Lean_Compiler_LCNF_saveMono = _init_l_Lean_Compiler_LCNF_saveMono(); +lean_mark_persistent(l_Lean_Compiler_LCNF_saveMono); l_Lean_Compiler_LCNF_builtinPassManager___closed__1 = _init_l_Lean_Compiler_LCNF_builtinPassManager___closed__1(); lean_mark_persistent(l_Lean_Compiler_LCNF_builtinPassManager___closed__1); l_Lean_Compiler_LCNF_builtinPassManager___closed__2 = _init_l_Lean_Compiler_LCNF_builtinPassManager___closed__2(); @@ -2770,23 +2939,27 @@ l_Lean_Compiler_LCNF_builtinPassManager___closed__17 = _init_l_Lean_Compiler_LCN lean_mark_persistent(l_Lean_Compiler_LCNF_builtinPassManager___closed__17); l_Lean_Compiler_LCNF_builtinPassManager___closed__18 = _init_l_Lean_Compiler_LCNF_builtinPassManager___closed__18(); lean_mark_persistent(l_Lean_Compiler_LCNF_builtinPassManager___closed__18); +l_Lean_Compiler_LCNF_builtinPassManager___closed__19 = _init_l_Lean_Compiler_LCNF_builtinPassManager___closed__19(); +lean_mark_persistent(l_Lean_Compiler_LCNF_builtinPassManager___closed__19); +l_Lean_Compiler_LCNF_builtinPassManager___closed__20 = _init_l_Lean_Compiler_LCNF_builtinPassManager___closed__20(); +lean_mark_persistent(l_Lean_Compiler_LCNF_builtinPassManager___closed__20); l_Lean_Compiler_LCNF_builtinPassManager = _init_l_Lean_Compiler_LCNF_builtinPassManager(); lean_mark_persistent(l_Lean_Compiler_LCNF_builtinPassManager); -l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____closed__1 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____closed__1(); -lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____closed__1); -l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____closed__2 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____closed__2(); -lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____closed__2); -l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____closed__3 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____closed__3(); -lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____closed__3); -l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____closed__4 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____closed__4(); -lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____closed__4); -l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____closed__5 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____closed__5(); -lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____closed__5); -l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____closed__6 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____closed__6(); -lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____closed__6); -l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____closed__7 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____closed__7(); -lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347____closed__7); -if (builtin) {res = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_347_(lean_io_mk_world()); +l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____closed__1 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____closed__1(); +lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____closed__1); +l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____closed__2 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____closed__2(); +lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____closed__2); +l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____closed__3 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____closed__3(); +lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____closed__3); +l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____closed__4 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____closed__4(); +lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____closed__4); +l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____closed__5 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____closed__5(); +lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____closed__5); +l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____closed__6 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____closed__6(); +lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____closed__6); +l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____closed__7 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____closed__7(); +lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407____closed__7); +if (builtin) {res = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_407_(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; l_Lean_Compiler_LCNF_passManagerExt = lean_io_result_get_value(res); lean_mark_persistent(l_Lean_Compiler_LCNF_passManagerExt); @@ -2819,60 +2992,60 @@ l_Lean_Compiler_LCNF_addPass___closed__11 = _init_l_Lean_Compiler_LCNF_addPass__ lean_mark_persistent(l_Lean_Compiler_LCNF_addPass___closed__11); l_Lean_Compiler_LCNF_addPass___closed__12 = _init_l_Lean_Compiler_LCNF_addPass___closed__12(); lean_mark_persistent(l_Lean_Compiler_LCNF_addPass___closed__12); -l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____lambda__2___closed__1 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____lambda__2___closed__1(); -lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____lambda__2___closed__1); -l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____lambda__2___closed__2 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____lambda__2___closed__2(); -lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____lambda__2___closed__2); -l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____lambda__3___closed__1 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____lambda__3___closed__1(); -lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____lambda__3___closed__1); -l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____lambda__3___closed__2 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____lambda__3___closed__2(); -lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____lambda__3___closed__2); -l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__1 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__1(); -lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__1); -l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__2 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__2(); -lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__2); -l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__3 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__3(); -lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__3); -l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__4 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__4(); -lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__4); -l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__5 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__5(); -lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__5); -l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__6 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__6(); -lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__6); -l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__7 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__7(); -lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__7); -l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__8 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__8(); -lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__8); -l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__9 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__9(); -lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__9); -l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__10 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__10(); -lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__10); -l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__11 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__11(); -lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__11); -l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__12 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__12(); -lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__12); -l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__13 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__13(); -lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__13); -l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__14 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__14(); -lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__14); -l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__15 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__15(); -lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__15); -l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__16 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__16(); -lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__16); -l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__17 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__17(); -lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__17); -l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__18 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__18(); -lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__18); -l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__19 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__19(); -lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__19); -l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__20 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__20(); -lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699____closed__20); -res = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_699_(lean_io_mk_world()); +l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____lambda__2___closed__1 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____lambda__2___closed__1(); +lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____lambda__2___closed__1); +l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____lambda__2___closed__2 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____lambda__2___closed__2(); +lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____lambda__2___closed__2); +l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____lambda__3___closed__1 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____lambda__3___closed__1(); +lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____lambda__3___closed__1); +l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____lambda__3___closed__2 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____lambda__3___closed__2(); +lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____lambda__3___closed__2); +l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__1 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__1(); +lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__1); +l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__2 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__2(); +lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__2); +l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__3 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__3(); +lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__3); +l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__4 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__4(); +lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__4); +l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__5 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__5(); +lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__5); +l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__6 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__6(); +lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__6); +l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__7 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__7(); +lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__7); +l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__8 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__8(); +lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__8); +l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__9 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__9(); +lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__9); +l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__10 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__10(); +lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__10); +l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__11 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__11(); +lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__11); +l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__12 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__12(); +lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__12); +l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__13 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__13(); +lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__13); +l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__14 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__14(); +lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__14); +l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__15 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__15(); +lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__15); +l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__16 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__16(); +lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__16); +l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__17 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__17(); +lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__17); +l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__18 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__18(); +lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__18); +l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__19 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__19(); +lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__19); +l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__20 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__20(); +lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759____closed__20); +res = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_759_(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); -l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_848____closed__1 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_848____closed__1(); -lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_848____closed__1); -res = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_848_(lean_io_mk_world()); +l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_908____closed__1 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_908____closed__1(); +lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_908____closed__1); +res = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Passes___hyg_908_(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); return lean_io_result_mk_ok(lean_box(0)); diff --git a/stage0/stdlib/Lean/Compiler/LCNF/Specialize.c b/stage0/stdlib/Lean/Compiler/LCNF/Specialize.c index 6de9405506..5d50945213 100644 --- a/stage0/stdlib/Lean/Compiler/LCNF/Specialize.c +++ b/stage0/stdlib/Lean/Compiler/LCNF/Specialize.c @@ -50,7 +50,7 @@ LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Specialize_shouldSpecialize(lean_o LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Specialize_Collector_collectCode(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_EnvExtensionInterfaceUnsafe_registerExt___rarg(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_isTracingEnabledFor___at_Lean_Compiler_LCNF_Specialize_specializeApp_x3f___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Specialize___hyg_4913_(lean_object*); +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Specialize___hyg_4917_(lean_object*); lean_object* l_Lean_EnvExtensionInterfaceUnsafe_imp___elambda__2___rarg(lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_Specialize_specializeApp_x3f___lambda__3___closed__10; lean_object* lean_st_ref_get(lean_object*, lean_object*); @@ -185,12 +185,12 @@ static lean_object* l_Lean_Compiler_LCNF_Specialize_specializeApp_x3f___lambda__ LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Specialize_expandCodeDecls_go___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Specialize_visitCode(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_Specialize_Collector_collectFVar___closed__4; -static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Specialize___hyg_4913____closed__1; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Specialize_specializeApp_x3f___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); size_t lean_usize_of_nat(lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Specialize_expandCodeDecls(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Compiler_LCNF_Specialize_specializeApp_x3f___lambda__5___closed__2; lean_object* l_Lean_Compiler_LCNF_findFunDecl_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Specialize___hyg_4917____closed__1; LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Specialize_Collector_collectExpr(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Compiler_LCNF_getDecl_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Compiler_LCNF_Simp_JpCases_0__Lean_Compiler_LCNF_Simp_mkJpAlt_go___spec__3(size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -14135,11 +14135,12 @@ x_1 = lean_unsigned_to_nat(0u); x_2 = 0; x_3 = l_Lean_Compiler_LCNF_specialize___closed__1; x_4 = l_Lean_Compiler_LCNF_specialize___closed__2; -x_5 = lean_alloc_ctor(0, 3, 1); +x_5 = lean_alloc_ctor(0, 3, 2); lean_ctor_set(x_5, 0, x_1); lean_ctor_set(x_5, 1, x_3); lean_ctor_set(x_5, 2, x_4); lean_ctor_set_uint8(x_5, sizeof(void*)*3, x_2); +lean_ctor_set_uint8(x_5, sizeof(void*)*3 + 1, x_2); return x_5; } } @@ -14173,7 +14174,7 @@ lean_dec(x_1); return x_7; } } -static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Specialize___hyg_4913____closed__1() { +static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Specialize___hyg_4917____closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; @@ -14183,11 +14184,11 @@ x_3 = l_Lean_Name_mkStr2(x_1, x_2); return x_3; } } -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Specialize___hyg_4913_(lean_object* x_1) { +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Specialize___hyg_4917_(lean_object* x_1) { _start: { lean_object* x_2; uint8_t x_3; lean_object* x_4; -x_2 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Specialize___hyg_4913____closed__1; +x_2 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Specialize___hyg_4917____closed__1; x_3 = 1; x_4 = l_Lean_registerTraceClass(x_2, x_3, x_1); if (lean_obj_tag(x_4) == 0) @@ -14448,9 +14449,9 @@ l_Lean_Compiler_LCNF_specialize___closed__3 = _init_l_Lean_Compiler_LCNF_special lean_mark_persistent(l_Lean_Compiler_LCNF_specialize___closed__3); l_Lean_Compiler_LCNF_specialize = _init_l_Lean_Compiler_LCNF_specialize(); lean_mark_persistent(l_Lean_Compiler_LCNF_specialize); -l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Specialize___hyg_4913____closed__1 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Specialize___hyg_4913____closed__1(); -lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Specialize___hyg_4913____closed__1); -res = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Specialize___hyg_4913_(lean_io_mk_world()); +l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Specialize___hyg_4917____closed__1 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Specialize___hyg_4917____closed__1(); +lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Specialize___hyg_4917____closed__1); +res = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Specialize___hyg_4917_(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); return lean_io_result_mk_ok(lean_box(0)); diff --git a/stage0/stdlib/Lean/Compiler/LCNF/Testing.c b/stage0/stdlib/Lean/Compiler/LCNF/Testing.c index 28372045d0..3d6a631c35 100644 --- a/stage0/stdlib/Lean/Compiler/LCNF/Testing.c +++ b/stage0/stdlib/Lean/Compiler/LCNF/Testing.c @@ -1511,6 +1511,7 @@ x_11 = lean_unsigned_to_nat(0u); lean_ctor_set(x_3, 2, x_6); lean_ctor_set(x_3, 1, x_4); lean_ctor_set(x_3, 0, x_11); +lean_ctor_set_uint8(x_3, sizeof(void*)*3 + 1, x_5); return x_3; } else @@ -1518,11 +1519,12 @@ else lean_object* x_12; lean_object* x_13; lean_dec(x_3); x_12 = lean_unsigned_to_nat(0u); -x_13 = lean_alloc_ctor(0, 3, 1); +x_13 = lean_alloc_ctor(0, 3, 2); lean_ctor_set(x_13, 0, x_12); lean_ctor_set(x_13, 1, x_4); lean_ctor_set(x_13, 2, x_6); lean_ctor_set_uint8(x_13, sizeof(void*)*3, x_5); +lean_ctor_set_uint8(x_13, sizeof(void*)*3 + 1, x_5); return x_13; } } @@ -2365,6 +2367,7 @@ lean_dec(x_11); x_12 = lean_unsigned_to_nat(0u); lean_ctor_set(x_3, 2, x_7); lean_ctor_set(x_3, 0, x_12); +lean_ctor_set_uint8(x_3, sizeof(void*)*3 + 1, x_5); return x_3; } else @@ -2372,11 +2375,12 @@ else lean_object* x_13; lean_object* x_14; lean_dec(x_3); x_13 = lean_unsigned_to_nat(0u); -x_14 = lean_alloc_ctor(0, 3, 1); +x_14 = lean_alloc_ctor(0, 3, 2); lean_ctor_set(x_14, 0, x_13); lean_ctor_set(x_14, 1, x_6); lean_ctor_set(x_14, 2, x_7); lean_ctor_set_uint8(x_14, sizeof(void*)*3, x_5); +lean_ctor_set_uint8(x_14, sizeof(void*)*3 + 1, x_5); return x_14; } } diff --git a/stage0/stdlib/Lean/Compiler/LCNF/ToMono.c b/stage0/stdlib/Lean/Compiler/LCNF/ToMono.c index ea763a2348..e671198fb2 100644 --- a/stage0/stdlib/Lean/Compiler/LCNF/ToMono.c +++ b/stage0/stdlib/Lean/Compiler/LCNF/ToMono.c @@ -13,319 +13,351 @@ #ifdef __cplusplus extern "C" { #endif +extern lean_object* l_Lean_Compiler_LCNF_instInhabitedCode; size_t lean_usize_add(size_t, size_t); -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_FunDeclCore_toMono___spec__1(size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_ctorAppToMono___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_registerTraceClass(lean_object*, uint8_t, lean_object*); +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_FunDeclCore_toMono___spec__1(size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Expr_toMono___closed__11; +static lean_object* l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__2; +lean_object* l_Lean_Compiler_LCNF_Decl_saveMono(lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_panic___at_Lean_Compiler_LCNF_trivialStructToMono___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_mk_empty_array_with_capacity(lean_object*); +lean_object* l_Lean_Name_str___override(lean_object*, lean_object*); +static lean_object* l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__6; lean_object* l___private_Lean_Compiler_LCNF_CompilerM_0__Lean_Compiler_LCNF_updateParamImp(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Compiler_LCNF_CompilerM_0__Lean_Compiler_LCNF_updateLetDeclImp(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_usize_dec_eq(size_t, size_t); lean_object* lean_array_uget(lean_object*, size_t); +static lean_object* l_Lean_Compiler_LCNF_trivialStructToMono___closed__11; +lean_object* l_Array_append___rarg(lean_object*, lean_object*); lean_object* lean_array_uset(lean_object*, size_t, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_ToMono___hyg_1997_(lean_object*); +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_argToMono(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_mdata___override(lean_object*, lean_object*); +static lean_object* l_Lean_Expr_toMono___closed__9; +lean_object* lean_st_ref_get(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_argToMono___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_name_eq(lean_object*, lean_object*); -static lean_object* l_Lean_Expr_toMono___lambda__1___closed__3; -static lean_object* l_Lean_Expr_toMono___lambda__1___closed__4; +static lean_object* l_Lean_Compiler_LCNF_toMono___closed__1; +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_trivialStructToMono(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_panic___at_Lean_Expr_toMono___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Compiler_LCNF_LCtx_addLetDecl(lean_object*, lean_object*); +static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_ToMono___hyg_1997____closed__1; +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_ctorAppToMono(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t l_Lean_Expr_isAppOf(lean_object*, lean_object*); +lean_object* l_Lean_Name_mkStr2(lean_object*, lean_object*); +static lean_object* l_Lean_Compiler_LCNF_toMono___closed__2; lean_object* l_Lean_Compiler_LCNF_toMonoType(lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_FunDeclCore_toMono___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_FunDeclCore_toMono___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Expr_toMono___closed__2; +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_fvarToMono___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_toSubarray___rarg(lean_object*, lean_object*, lean_object*); lean_object* lean_array_get_size(lean_object*); +lean_object* lean_string_append(lean_object*, lean_object*); +static lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_decToMono___spec__1___closed__1; static lean_object* l_Lean_Expr_toMono___closed__4; +lean_object* l_Lean_Expr_getRevArg_x21(lean_object*, lean_object*); lean_object* l___private_Lean_Compiler_LCNF_Basic_0__Lean_Compiler_LCNF_updateAltCodeImp(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_fvarToMono(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Compiler_LCNF_trivialStructToMono___closed__9; uint8_t lean_usize_dec_lt(size_t, size_t); -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Code_toMono(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Lean_Expr_toMono___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Lean_Expr_toMono(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_Lean_Expr_toMono___lambda__1___closed__2; +static lean_object* l_Lean_Expr_toMono___closed__8; +extern lean_object* l_Lean_levelZero; +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Code_toMono(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_nat_add(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_ctorAppToMono___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Expr_toMono(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Compiler_LCNF_Code_toMono___closed__1; +lean_object* l_Lean_mkAppN(lean_object*, lean_object*); +static lean_object* l_Lean_Compiler_LCNF_decToMono___closed__1; extern lean_object* l_Lean_Compiler_LCNF_erasedExpr; -static lean_object* l_Lean_Expr_toMono___lambda__1___closed__1; +lean_object* l___private_Lean_Expr_0__Lean_Expr_getAppArgsAux(lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_toMono___elambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_ToMono___hyg_1997____closed__2; +lean_object* lean_array_fget(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_decToMono(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__4; +lean_object* lean_st_ref_take(lean_object*, lean_object*); +lean_object* lean_nat_sub(lean_object*, lean_object*); static lean_object* l_Lean_Expr_toMono___closed__1; -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Param_toMono(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_RBNode_findCore___at_Lean_Compiler_LCNF_fvarToMono___spec__1(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_toMono___elambda__1___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Expr_toMono___closed__13; +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_decToMono___spec__1(size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Decl_toMono_go(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Expr_toMono___closed__6; +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Param_toMono___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_panic___at_Lean_Expr_toMono___spec__1___closed__1; +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Param_toMono(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Compiler_LCNF_inferType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_panic___at_Lean_Expr_getRevArg_x21___spec__1(lean_object*); -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_Code_toMono___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Expr_fvarId_x21(lean_object*); +static lean_object* l_Lean_Compiler_LCNF_trivialStructToMono___closed__10; +static lean_object* l_Lean_Compiler_LCNF_toMono___closed__3; +lean_object* l_instInhabited___rarg(lean_object*, lean_object*); +static lean_object* l_Lean_Compiler_LCNF_trivialStructToMono___closed__12; +uint8_t l_Lean_Name_quickCmp(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_Code_toMono___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_Expr_0__Lean_Expr_getAppNumArgsAux(lean_object*, lean_object*); +lean_object* lean_st_mk_ref(lean_object*, lean_object*); +lean_object* l_Lean_Expr_sort___override(lean_object*); +static lean_object* l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__1; +lean_object* l_Lean_Compiler_LCNF_hasTrivialStructure_x3f(lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_instInhabitedExpr; +static lean_object* l_Lean_Expr_toMono___closed__5; lean_object* l___private_Init_Util_0__mkPanicMessageWithDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_panic___at_Lean_Compiler_LCNF_getOtherDeclType___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Expr_toMono___closed__14; +static lean_object* l_Lean_Compiler_LCNF_toMono___closed__4; lean_object* l___private_Lean_Compiler_LCNF_CompilerM_0__Lean_Compiler_LCNF_updateFunDeclImp(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_panic___at_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___spec__1___closed__1; +lean_object* l_Lean_RBNode_insert___at___private_Lean_Compiler_LCNF_Basic_0__Lean_Compiler_LCNF_collectExpr___spec__1(lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Compiler_LCNF_trivialStructToMono___closed__14; size_t lean_usize_of_nat(lean_object*); +static lean_object* l_Lean_Expr_toMono___closed__15; +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_ctorAppToMono___spec__1(size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Compiler_LCNF_trivialStructToMono___closed__5; static lean_object* l_Lean_Expr_toMono___closed__3; -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_LetDecl_toMono(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_toMono; +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_LetDecl_toMono(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_toMono___elambda__1___spec__1(size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_panic___at_Lean_Compiler_LCNF_trivialStructToMono___spec__1___closed__1; +static lean_object* l_panic___at_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___spec__1___closed__4; +static lean_object* l_Lean_Expr_toMono___closed__7; +lean_object* l_Lean_Expr_fvar___override(lean_object*); size_t lean_ptr_addr(lean_object*); +lean_object* l_Lean_Expr_const___override(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_RBNode_findCore___at_Lean_Compiler_LCNF_fvarToMono___spec__1___boxed(lean_object*, lean_object*); +static lean_object* l_Lean_Expr_toMono___closed__10; +static lean_object* l_Lean_Compiler_LCNF_trivialStructToMono___closed__7; +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_ctorAppToMono___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Compiler_LCNF_eraseParams(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Core_instMonadCoreM; +static lean_object* l_Lean_Compiler_LCNF_trivialStructToMono___closed__15; +static lean_object* l_Lean_Compiler_LCNF_trivialStructToMono___closed__3; +static lean_object* l_panic___at_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___spec__1___closed__2; +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_ctorAppToMono___spec__2(size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_ofSubarray___rarg(lean_object*); +static lean_object* l_Lean_Expr_toMono___closed__16; +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_ToMonoM_State_typeParams___default; +lean_object* l_panic___at_Lean_Compiler_LCNF_CasesCore_extractAlt_x21___spec__2(lean_object*); +lean_object* lean_st_ref_set(lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Expr_isFVar(lean_object*); -lean_object* l_Lean_Expr_app___override(lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_AltCore_toMono(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t lean_nat_dec_eq(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_decToMono___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_panic_fn(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_panic___at_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Decl_toMono(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Param_toMono___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_mk_array(lean_object*, lean_object*); +static lean_object* l_Lean_Compiler_LCNF_trivialStructToMono___closed__2; +static lean_object* l_Lean_Compiler_LCNF_trivialStructToMono___closed__8; +static lean_object* l_Lean_Compiler_LCNF_trivialStructToMono___closed__4; lean_object* l_Lean_Expr_proj___override(lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Compiler_LCNF_isTypeFormerType(lean_object*); -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_Code_toMono___spec__1(size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_FunDeclCore_toMono(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Param_toMono___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_ReaderT_instMonadReaderT___rarg(lean_object*); +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_Code_toMono___spec__1(size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_FunDeclCore_toMono(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Expr_getAppFn(lean_object*); +static lean_object* l_Lean_Compiler_LCNF_trivialStructToMono___closed__13; +static lean_object* l_panic___at_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___spec__1___closed__3; +static lean_object* l_Lean_Expr_toMono___closed__12; +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Compiler_LCNF_trivialStructToMono___closed__6; +lean_object* l_Lean_Expr_isConstructorApp_x3f(lean_object*, lean_object*); lean_object* l___private_Lean_Compiler_LCNF_Basic_0__Lean_Compiler_LCNF_updateAltImp(lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Param_toMono(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +static lean_object* l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__5; +static lean_object* l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__3; +static lean_object* l_Lean_Compiler_LCNF_trivialStructToMono___closed__1; +uint8_t lean_nat_dec_lt(lean_object*, lean_object*); +static lean_object* _init_l_Lean_Compiler_LCNF_ToMonoM_State_typeParams___default() { _start: { -lean_object* x_7; lean_object* x_8; -x_7 = lean_ctor_get(x_1, 2); -lean_inc(x_7); -lean_inc(x_5); -lean_inc(x_4); -x_8 = l_Lean_Compiler_LCNF_toMonoType(x_7, x_4, x_5, x_6); -if (lean_obj_tag(x_8) == 0) +lean_object* x_1; +x_1 = lean_box(0); +return x_1; +} +} +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Param_toMono___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: { -lean_object* x_9; lean_object* x_10; lean_object* x_11; -x_9 = lean_ctor_get(x_8, 0); +lean_object* x_9; lean_object* x_10; +x_9 = lean_ctor_get(x_1, 2); lean_inc(x_9); -x_10 = lean_ctor_get(x_8, 1); -lean_inc(x_10); -lean_dec(x_8); -x_11 = l___private_Lean_Compiler_LCNF_CompilerM_0__Lean_Compiler_LCNF_updateParamImp(x_1, x_9, x_2, x_3, x_4, x_5, x_10); -lean_dec(x_5); +lean_inc(x_7); +lean_inc(x_6); +x_10 = l_Lean_Compiler_LCNF_toMonoType(x_9, x_6, x_7, x_8); +if (lean_obj_tag(x_10) == 0) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_11 = lean_ctor_get(x_10, 0); +lean_inc(x_11); +x_12 = lean_ctor_get(x_10, 1); +lean_inc(x_12); +lean_dec(x_10); +x_13 = l___private_Lean_Compiler_LCNF_CompilerM_0__Lean_Compiler_LCNF_updateParamImp(x_1, x_11, x_4, x_5, x_6, x_7, x_12); +lean_dec(x_7); +lean_dec(x_6); +return x_13; +} +else +{ +uint8_t x_14; +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_1); +x_14 = !lean_is_exclusive(x_10); +if (x_14 == 0) +{ +return x_10; +} +else +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_15 = lean_ctor_get(x_10, 0); +x_16 = lean_ctor_get(x_10, 1); +lean_inc(x_16); +lean_inc(x_15); +lean_dec(x_10); +x_17 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_17, 0, x_15); +lean_ctor_set(x_17, 1, x_16); +return x_17; +} +} +} +} +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Param_toMono(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +lean_object* x_8; uint8_t x_9; +x_8 = lean_ctor_get(x_1, 2); +lean_inc(x_8); +x_9 = l_Lean_Compiler_LCNF_isTypeFormerType(x_8); +if (x_9 == 0) +{ +lean_object* x_10; lean_object* x_11; +x_10 = lean_box(0); +x_11 = l_Lean_Compiler_LCNF_Param_toMono___lambda__1(x_1, x_10, x_2, x_3, x_4, x_5, x_6, x_7); lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); return x_11; } else { -uint8_t x_12; -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_1); -x_12 = !lean_is_exclusive(x_8); -if (x_12 == 0) -{ -return x_8; -} -else -{ -lean_object* x_13; lean_object* x_14; lean_object* x_15; -x_13 = lean_ctor_get(x_8, 0); -x_14 = lean_ctor_get(x_8, 1); -lean_inc(x_14); +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_12 = lean_st_ref_get(x_6, x_7); +x_13 = lean_ctor_get(x_12, 1); lean_inc(x_13); -lean_dec(x_8); -x_15 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_15, 0, x_13); -lean_ctor_set(x_15, 1, x_14); -return x_15; -} -} -} -} -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Param_toMono___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { -_start: -{ -lean_object* x_7; -x_7 = l_Lean_Compiler_LCNF_Param_toMono(x_1, x_2, x_3, x_4, x_5, x_6); +lean_dec(x_12); +x_14 = lean_st_ref_take(x_2, x_13); +x_15 = lean_ctor_get(x_14, 0); +lean_inc(x_15); +x_16 = lean_ctor_get(x_14, 1); +lean_inc(x_16); +lean_dec(x_14); +x_17 = lean_ctor_get(x_1, 0); +lean_inc(x_17); +x_18 = lean_box(0); +x_19 = l_Lean_RBNode_insert___at___private_Lean_Compiler_LCNF_Basic_0__Lean_Compiler_LCNF_collectExpr___spec__1(x_15, x_17, x_18); +x_20 = lean_st_ref_set(x_2, x_19, x_16); +x_21 = lean_ctor_get(x_20, 1); +lean_inc(x_21); +lean_dec(x_20); +x_22 = l_Lean_Compiler_LCNF_Param_toMono___lambda__1(x_1, x_18, x_2, x_3, x_4, x_5, x_6, x_21); +lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); -return x_7; +return x_22; } } -static lean_object* _init_l_Lean_Expr_toMono___lambda__1___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string_from_bytes("Lean.Expr", 9); -return x_1; } -} -static lean_object* _init_l_Lean_Expr_toMono___lambda__1___closed__2() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string_from_bytes("_private.Lean.Expr.0.Lean.Expr.updateApp!Impl", 45); -return x_1; -} -} -static lean_object* _init_l_Lean_Expr_toMono___lambda__1___closed__3() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string_from_bytes("application expected", 20); -return x_1; -} -} -static lean_object* _init_l_Lean_Expr_toMono___lambda__1___closed__4() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; -x_1 = l_Lean_Expr_toMono___lambda__1___closed__1; -x_2 = l_Lean_Expr_toMono___lambda__1___closed__2; -x_3 = lean_unsigned_to_nat(1472u); -x_4 = lean_unsigned_to_nat(18u); -x_5 = l_Lean_Expr_toMono___lambda__1___closed__3; -x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); -return x_6; -} -} -LEAN_EXPORT lean_object* l_Lean_Expr_toMono___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Param_toMono___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { lean_object* x_9; -x_9 = l_Lean_Expr_toMono(x_1, x_4, x_5, x_6, x_7, x_8); -if (lean_obj_tag(x_9) == 0) -{ -if (lean_obj_tag(x_2) == 5) -{ -uint8_t x_10; -x_10 = !lean_is_exclusive(x_9); -if (x_10 == 0) -{ -lean_object* x_11; lean_object* x_12; lean_object* x_13; size_t x_14; size_t x_15; uint8_t x_16; -x_11 = lean_ctor_get(x_9, 0); -x_12 = lean_ctor_get(x_2, 0); -lean_inc(x_12); -x_13 = lean_ctor_get(x_2, 1); -lean_inc(x_13); -x_14 = lean_ptr_addr(x_12); -lean_dec(x_12); -x_15 = lean_ptr_addr(x_11); -x_16 = lean_usize_dec_eq(x_14, x_15); -if (x_16 == 0) -{ -lean_object* x_17; -lean_dec(x_13); -lean_dec(x_2); -x_17 = l_Lean_Expr_app___override(x_11, x_3); -lean_ctor_set(x_9, 0, x_17); -return x_9; -} -else -{ -size_t x_18; size_t x_19; uint8_t x_20; -x_18 = lean_ptr_addr(x_13); -lean_dec(x_13); -x_19 = lean_ptr_addr(x_3); -x_20 = lean_usize_dec_eq(x_18, x_19); -if (x_20 == 0) -{ -lean_object* x_21; -lean_dec(x_2); -x_21 = l_Lean_Expr_app___override(x_11, x_3); -lean_ctor_set(x_9, 0, x_21); -return x_9; -} -else -{ -lean_dec(x_11); -lean_dec(x_3); -lean_ctor_set(x_9, 0, x_2); -return x_9; -} -} -} -else -{ -lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; size_t x_26; size_t x_27; uint8_t x_28; -x_22 = lean_ctor_get(x_9, 0); -x_23 = lean_ctor_get(x_9, 1); -lean_inc(x_23); -lean_inc(x_22); -lean_dec(x_9); -x_24 = lean_ctor_get(x_2, 0); -lean_inc(x_24); -x_25 = lean_ctor_get(x_2, 1); -lean_inc(x_25); -x_26 = lean_ptr_addr(x_24); -lean_dec(x_24); -x_27 = lean_ptr_addr(x_22); -x_28 = lean_usize_dec_eq(x_26, x_27); -if (x_28 == 0) -{ -lean_object* x_29; lean_object* x_30; -lean_dec(x_25); -lean_dec(x_2); -x_29 = l_Lean_Expr_app___override(x_22, x_3); -x_30 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_30, 0, x_29); -lean_ctor_set(x_30, 1, x_23); -return x_30; -} -else -{ -size_t x_31; size_t x_32; uint8_t x_33; -x_31 = lean_ptr_addr(x_25); -lean_dec(x_25); -x_32 = lean_ptr_addr(x_3); -x_33 = lean_usize_dec_eq(x_31, x_32); -if (x_33 == 0) -{ -lean_object* x_34; lean_object* x_35; -lean_dec(x_2); -x_34 = l_Lean_Expr_app___override(x_22, x_3); -x_35 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_35, 0, x_34); -lean_ctor_set(x_35, 1, x_23); -return x_35; -} -else -{ -lean_object* x_36; -lean_dec(x_22); -lean_dec(x_3); -x_36 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_36, 0, x_2); -lean_ctor_set(x_36, 1, x_23); -return x_36; -} -} -} -} -else -{ -uint8_t x_37; +x_9 = l_Lean_Compiler_LCNF_Param_toMono___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +lean_dec(x_5); +lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); -x_37 = !lean_is_exclusive(x_9); -if (x_37 == 0) -{ -lean_object* x_38; lean_object* x_39; lean_object* x_40; -x_38 = lean_ctor_get(x_9, 0); -lean_dec(x_38); -x_39 = l_Lean_Expr_toMono___lambda__1___closed__4; -x_40 = l_panic___at_Lean_Expr_getRevArg_x21___spec__1(x_39); -lean_ctor_set(x_9, 0, x_40); return x_9; } -else +} +static lean_object* _init_l_panic___at_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___spec__1___closed__1() { +_start: { -lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; -x_41 = lean_ctor_get(x_9, 1); -lean_inc(x_41); -lean_dec(x_9); -x_42 = l_Lean_Expr_toMono___lambda__1___closed__4; -x_43 = l_panic___at_Lean_Expr_getRevArg_x21___spec__1(x_42); -x_44 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_44, 0, x_43); -lean_ctor_set(x_44, 1, x_41); -return x_44; +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Core_instMonadCoreM; +x_2 = l_ReaderT_instMonadReaderT___rarg(x_1); +return x_2; } } -} -else +static lean_object* _init_l_panic___at_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___spec__1___closed__2() { +_start: { -uint8_t x_45; -lean_dec(x_3); -lean_dec(x_2); -x_45 = !lean_is_exclusive(x_9); -if (x_45 == 0) +lean_object* x_1; lean_object* x_2; +x_1 = l_panic___at_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___spec__1___closed__1; +x_2 = l_ReaderT_instMonadReaderT___rarg(x_1); +return x_2; +} +} +static lean_object* _init_l_panic___at_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___spec__1___closed__3() { +_start: { -return x_9; +lean_object* x_1; lean_object* x_2; +x_1 = l_panic___at_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___spec__1___closed__2; +x_2 = l_ReaderT_instMonadReaderT___rarg(x_1); +return x_2; } -else +} +static lean_object* _init_l_panic___at_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___spec__1___closed__4() { +_start: { -lean_object* x_46; lean_object* x_47; lean_object* x_48; -x_46 = lean_ctor_get(x_9, 0); -x_47 = lean_ctor_get(x_9, 1); -lean_inc(x_47); -lean_inc(x_46); -lean_dec(x_9); -x_48 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_48, 0, x_46); -lean_ctor_set(x_48, 1, x_47); -return x_48; +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_panic___at_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___spec__1___closed__3; +x_3 = l_instInhabited___rarg(x_2, x_1); +return x_3; } } +LEAN_EXPORT lean_object* l_panic___at_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_8 = l_panic___at_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___spec__1___closed__4; +x_9 = lean_panic_fn(x_8, x_1); +x_10 = lean_apply_6(x_9, x_2, x_3, x_4, x_5, x_6, x_7); +return x_10; } } -static lean_object* _init_l_Lean_Expr_toMono___closed__1() { +static lean_object* _init_l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("assertion violation: ", 21); +return x_1; +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__2() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("ctorInfo.numParams + info.fieldIdx < e.getAppNumArgs\n ", 55); +return x_1; +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__1; +x_2 = l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__2; +x_3 = lean_string_append(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__4() { _start: { lean_object* x_1; @@ -333,762 +365,764 @@ x_1 = lean_mk_string_from_bytes("Lean.Compiler.LCNF.ToMono", 25); return x_1; } } -static lean_object* _init_l_Lean_Expr_toMono___closed__2() { +static lean_object* _init_l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__5() { _start: { lean_object* x_1; -x_1 = lean_mk_string_from_bytes("Lean.Expr.toMono", 16); +x_1 = lean_mk_string_from_bytes("Lean.Compiler.LCNF.isTrivialConstructorApp?", 43); return x_1; } } -static lean_object* _init_l_Lean_Expr_toMono___closed__3() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string_from_bytes("unreachable code has been reached", 33); -return x_1; -} -} -static lean_object* _init_l_Lean_Expr_toMono___closed__4() { +static lean_object* _init_l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__6() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; -x_1 = l_Lean_Expr_toMono___closed__1; -x_2 = l_Lean_Expr_toMono___closed__2; -x_3 = lean_unsigned_to_nat(19u); -x_4 = lean_unsigned_to_nat(38u); -x_5 = l_Lean_Expr_toMono___closed__3; +x_1 = l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__4; +x_2 = l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__5; +x_3 = lean_unsigned_to_nat(24u); +x_4 = lean_unsigned_to_nat(2u); +x_5 = l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__3; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); return x_6; } } -LEAN_EXPORT lean_object* l_Lean_Expr_toMono(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { _start: { -switch (lean_obj_tag(x_1)) { -case 1: +lean_object* x_8; uint8_t x_9; +x_8 = lean_st_ref_get(x_6, x_7); +x_9 = !lean_is_exclusive(x_8); +if (x_9 == 0) { -lean_object* x_7; -lean_inc(x_1); -x_7 = l_Lean_Compiler_LCNF_inferType(x_1, x_2, x_3, x_4, x_5, x_6); -if (lean_obj_tag(x_7) == 0) -{ -uint8_t x_8; -x_8 = !lean_is_exclusive(x_7); -if (x_8 == 0) -{ -lean_object* x_9; uint8_t x_10; -x_9 = lean_ctor_get(x_7, 0); -x_10 = l_Lean_Compiler_LCNF_isTypeFormerType(x_9); -if (x_10 == 0) -{ -lean_ctor_set(x_7, 0, x_1); -return x_7; -} -else -{ -lean_object* x_11; -lean_dec(x_1); -x_11 = l_Lean_Compiler_LCNF_erasedExpr; -lean_ctor_set(x_7, 0, x_11); -return x_7; -} -} -else -{ -lean_object* x_12; lean_object* x_13; uint8_t x_14; -x_12 = lean_ctor_get(x_7, 0); -x_13 = lean_ctor_get(x_7, 1); -lean_inc(x_13); +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_10 = lean_ctor_get(x_8, 0); +x_11 = lean_ctor_get(x_8, 1); +x_12 = lean_ctor_get(x_10, 0); lean_inc(x_12); -lean_dec(x_7); -x_14 = l_Lean_Compiler_LCNF_isTypeFormerType(x_12); -if (x_14 == 0) +lean_dec(x_10); +x_13 = l_Lean_Expr_isConstructorApp_x3f(x_12, x_1); +if (lean_obj_tag(x_13) == 0) { -lean_object* x_15; -x_15 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_15, 0, x_1); -lean_ctor_set(x_15, 1, x_13); -return x_15; +lean_object* x_14; +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_14 = lean_box(0); +lean_ctor_set(x_8, 0, x_14); +return x_8; } else { -lean_object* x_16; lean_object* x_17; +lean_object* x_15; lean_object* x_16; lean_object* x_17; +lean_free_object(x_8); +x_15 = lean_ctor_get(x_13, 0); +lean_inc(x_15); +lean_dec(x_13); +x_16 = lean_ctor_get(x_15, 1); +lean_inc(x_16); +lean_inc(x_6); +lean_inc(x_5); +x_17 = l_Lean_Compiler_LCNF_hasTrivialStructure_x3f(x_16, x_5, x_6, x_11); +if (lean_obj_tag(x_17) == 0) +{ +lean_object* x_18; +x_18 = lean_ctor_get(x_17, 0); +lean_inc(x_18); +if (lean_obj_tag(x_18) == 0) +{ +uint8_t x_19; +lean_dec(x_15); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); lean_dec(x_1); -x_16 = l_Lean_Compiler_LCNF_erasedExpr; -x_17 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_17, 0, x_16); -lean_ctor_set(x_17, 1, x_13); +x_19 = !lean_is_exclusive(x_17); +if (x_19 == 0) +{ +lean_object* x_20; lean_object* x_21; +x_20 = lean_ctor_get(x_17, 0); +lean_dec(x_20); +x_21 = lean_box(0); +lean_ctor_set(x_17, 0, x_21); +return x_17; +} +else +{ +lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_22 = lean_ctor_get(x_17, 1); +lean_inc(x_22); +lean_dec(x_17); +x_23 = lean_box(0); +x_24 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_24, 0, x_23); +lean_ctor_set(x_24, 1, x_22); +return x_24; +} +} +else +{ +uint8_t x_25; +x_25 = !lean_is_exclusive(x_17); +if (x_25 == 0) +{ +lean_object* x_26; lean_object* x_27; uint8_t x_28; +x_26 = lean_ctor_get(x_17, 1); +x_27 = lean_ctor_get(x_17, 0); +lean_dec(x_27); +x_28 = !lean_is_exclusive(x_18); +if (x_28 == 0) +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; uint8_t x_35; +x_29 = lean_ctor_get(x_18, 0); +x_30 = lean_ctor_get(x_15, 3); +lean_inc(x_30); +lean_dec(x_15); +x_31 = lean_ctor_get(x_29, 1); +lean_inc(x_31); +lean_dec(x_29); +x_32 = lean_nat_add(x_30, x_31); +lean_dec(x_31); +lean_dec(x_30); +x_33 = lean_unsigned_to_nat(0u); +x_34 = l___private_Lean_Expr_0__Lean_Expr_getAppNumArgsAux(x_1, x_33); +x_35 = lean_nat_dec_lt(x_32, x_34); +if (x_35 == 0) +{ +lean_object* x_36; lean_object* x_37; +lean_dec(x_34); +lean_dec(x_32); +lean_free_object(x_18); +lean_free_object(x_17); +lean_dec(x_1); +x_36 = l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__6; +x_37 = l_panic___at_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___spec__1(x_36, x_2, x_3, x_4, x_5, x_6, x_26); +return x_37; +} +else +{ +lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_38 = lean_nat_sub(x_34, x_32); +lean_dec(x_32); +lean_dec(x_34); +x_39 = lean_unsigned_to_nat(1u); +x_40 = lean_nat_sub(x_38, x_39); +lean_dec(x_38); +x_41 = l_Lean_Expr_getRevArg_x21(x_1, x_40); +lean_ctor_set(x_18, 0, x_41); +return x_17; +} +} +else +{ +lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; uint8_t x_48; +x_42 = lean_ctor_get(x_18, 0); +lean_inc(x_42); +lean_dec(x_18); +x_43 = lean_ctor_get(x_15, 3); +lean_inc(x_43); +lean_dec(x_15); +x_44 = lean_ctor_get(x_42, 1); +lean_inc(x_44); +lean_dec(x_42); +x_45 = lean_nat_add(x_43, x_44); +lean_dec(x_44); +lean_dec(x_43); +x_46 = lean_unsigned_to_nat(0u); +x_47 = l___private_Lean_Expr_0__Lean_Expr_getAppNumArgsAux(x_1, x_46); +x_48 = lean_nat_dec_lt(x_45, x_47); +if (x_48 == 0) +{ +lean_object* x_49; lean_object* x_50; +lean_dec(x_47); +lean_dec(x_45); +lean_free_object(x_17); +lean_dec(x_1); +x_49 = l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__6; +x_50 = l_panic___at_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___spec__1(x_49, x_2, x_3, x_4, x_5, x_6, x_26); +return x_50; +} +else +{ +lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_51 = lean_nat_sub(x_47, x_45); +lean_dec(x_45); +lean_dec(x_47); +x_52 = lean_unsigned_to_nat(1u); +x_53 = lean_nat_sub(x_51, x_52); +lean_dec(x_51); +x_54 = l_Lean_Expr_getRevArg_x21(x_1, x_53); +x_55 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_55, 0, x_54); +lean_ctor_set(x_17, 0, x_55); return x_17; } } } else { -uint8_t x_18; -lean_dec(x_1); -x_18 = !lean_is_exclusive(x_7); -if (x_18 == 0) +lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; uint8_t x_64; +x_56 = lean_ctor_get(x_17, 1); +lean_inc(x_56); +lean_dec(x_17); +x_57 = lean_ctor_get(x_18, 0); +lean_inc(x_57); +if (lean_is_exclusive(x_18)) { + lean_ctor_release(x_18, 0); + x_58 = x_18; +} else { + lean_dec_ref(x_18); + x_58 = lean_box(0); +} +x_59 = lean_ctor_get(x_15, 3); +lean_inc(x_59); +lean_dec(x_15); +x_60 = lean_ctor_get(x_57, 1); +lean_inc(x_60); +lean_dec(x_57); +x_61 = lean_nat_add(x_59, x_60); +lean_dec(x_60); +lean_dec(x_59); +x_62 = lean_unsigned_to_nat(0u); +x_63 = l___private_Lean_Expr_0__Lean_Expr_getAppNumArgsAux(x_1, x_62); +x_64 = lean_nat_dec_lt(x_61, x_63); +if (x_64 == 0) { -return x_7; +lean_object* x_65; lean_object* x_66; +lean_dec(x_63); +lean_dec(x_61); +lean_dec(x_58); +lean_dec(x_1); +x_65 = l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__6; +x_66 = l_panic___at_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___spec__1(x_65, x_2, x_3, x_4, x_5, x_6, x_56); +return x_66; } else { -lean_object* x_19; lean_object* x_20; lean_object* x_21; -x_19 = lean_ctor_get(x_7, 0); -x_20 = lean_ctor_get(x_7, 1); -lean_inc(x_20); -lean_inc(x_19); -lean_dec(x_7); -x_21 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_21, 0, x_19); -lean_ctor_set(x_21, 1, x_20); -return x_21; +lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_67 = lean_nat_sub(x_63, x_61); +lean_dec(x_61); +lean_dec(x_63); +x_68 = lean_unsigned_to_nat(1u); +x_69 = lean_nat_sub(x_67, x_68); +lean_dec(x_67); +x_70 = l_Lean_Expr_getRevArg_x21(x_1, x_69); +if (lean_is_scalar(x_58)) { + x_71 = lean_alloc_ctor(1, 1, 0); +} else { + x_71 = x_58; +} +lean_ctor_set(x_71, 0, x_70); +x_72 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_72, 0, x_71); +lean_ctor_set(x_72, 1, x_56); +return x_72; } } } -case 3: +} +else { -lean_object* x_22; lean_object* x_23; +uint8_t x_73; +lean_dec(x_15); +lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_22 = l_Lean_Compiler_LCNF_erasedExpr; -x_23 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_23, 0, x_22); -lean_ctor_set(x_23, 1, x_6); -return x_23; -} -case 4: +x_73 = !lean_is_exclusive(x_17); +if (x_73 == 0) { -lean_object* x_24; -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_24 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_24, 0, x_1); -lean_ctor_set(x_24, 1, x_6); -return x_24; -} -case 5: -{ -lean_object* x_25; lean_object* x_26; uint8_t x_27; -x_25 = lean_ctor_get(x_1, 0); -lean_inc(x_25); -x_26 = lean_ctor_get(x_1, 1); -lean_inc(x_26); -x_27 = l_Lean_Expr_isFVar(x_26); -if (x_27 == 0) -{ -lean_object* x_28; lean_object* x_29; -lean_dec(x_26); -x_28 = l_Lean_Compiler_LCNF_erasedExpr; -x_29 = l_Lean_Expr_toMono___lambda__1(x_25, x_1, x_28, x_2, x_3, x_4, x_5, x_6); -return x_29; +return x_17; } else { -lean_object* x_30; -lean_inc(x_5); -lean_inc(x_4); -lean_inc(x_3); -lean_inc(x_2); -x_30 = l_Lean_Expr_toMono(x_26, x_2, x_3, x_4, x_5, x_6); -if (lean_obj_tag(x_30) == 0) -{ -lean_object* x_31; lean_object* x_32; lean_object* x_33; -x_31 = lean_ctor_get(x_30, 0); -lean_inc(x_31); -x_32 = lean_ctor_get(x_30, 1); -lean_inc(x_32); -lean_dec(x_30); -x_33 = l_Lean_Expr_toMono___lambda__1(x_25, x_1, x_31, x_2, x_3, x_4, x_5, x_32); -return x_33; -} -else -{ -uint8_t x_34; -lean_dec(x_25); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_34 = !lean_is_exclusive(x_30); -if (x_34 == 0) -{ -return x_30; -} -else -{ -lean_object* x_35; lean_object* x_36; lean_object* x_37; -x_35 = lean_ctor_get(x_30, 0); -x_36 = lean_ctor_get(x_30, 1); -lean_inc(x_36); -lean_inc(x_35); -lean_dec(x_30); -x_37 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_37, 0, x_35); -lean_ctor_set(x_37, 1, x_36); -return x_37; -} -} -} -} -case 6: -{ -lean_object* x_38; lean_object* x_39; -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_38 = l_Lean_Compiler_LCNF_erasedExpr; -x_39 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_39, 0, x_38); -lean_ctor_set(x_39, 1, x_6); -return x_39; -} -case 7: -{ -lean_object* x_40; lean_object* x_41; -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_40 = l_Lean_Compiler_LCNF_erasedExpr; -x_41 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_41, 0, x_40); -lean_ctor_set(x_41, 1, x_6); -return x_41; -} -case 9: -{ -lean_object* x_42; -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_42 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_42, 0, x_1); -lean_ctor_set(x_42, 1, x_6); -return x_42; -} -case 10: -{ -lean_object* x_43; lean_object* x_44; lean_object* x_45; -x_43 = lean_ctor_get(x_1, 0); -lean_inc(x_43); -x_44 = lean_ctor_get(x_1, 1); -lean_inc(x_44); -lean_inc(x_44); -x_45 = l_Lean_Expr_toMono(x_44, x_2, x_3, x_4, x_5, x_6); -if (lean_obj_tag(x_45) == 0) -{ -uint8_t x_46; -x_46 = !lean_is_exclusive(x_45); -if (x_46 == 0) -{ -lean_object* x_47; size_t x_48; size_t x_49; uint8_t x_50; -x_47 = lean_ctor_get(x_45, 0); -x_48 = lean_ptr_addr(x_44); -lean_dec(x_44); -x_49 = lean_ptr_addr(x_47); -x_50 = lean_usize_dec_eq(x_48, x_49); -if (x_50 == 0) -{ -lean_object* x_51; -lean_dec(x_1); -x_51 = l_Lean_Expr_mdata___override(x_43, x_47); -lean_ctor_set(x_45, 0, x_51); -return x_45; -} -else -{ -lean_dec(x_47); -lean_dec(x_43); -lean_ctor_set(x_45, 0, x_1); -return x_45; -} -} -else -{ -lean_object* x_52; lean_object* x_53; size_t x_54; size_t x_55; uint8_t x_56; -x_52 = lean_ctor_get(x_45, 0); -x_53 = lean_ctor_get(x_45, 1); -lean_inc(x_53); -lean_inc(x_52); -lean_dec(x_45); -x_54 = lean_ptr_addr(x_44); -lean_dec(x_44); -x_55 = lean_ptr_addr(x_52); -x_56 = lean_usize_dec_eq(x_54, x_55); -if (x_56 == 0) -{ -lean_object* x_57; lean_object* x_58; -lean_dec(x_1); -x_57 = l_Lean_Expr_mdata___override(x_43, x_52); -x_58 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_58, 0, x_57); -lean_ctor_set(x_58, 1, x_53); -return x_58; -} -else -{ -lean_object* x_59; -lean_dec(x_52); -lean_dec(x_43); -x_59 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_59, 0, x_1); -lean_ctor_set(x_59, 1, x_53); -return x_59; -} -} -} -else -{ -uint8_t x_60; -lean_dec(x_44); -lean_dec(x_43); -lean_dec(x_1); -x_60 = !lean_is_exclusive(x_45); -if (x_60 == 0) -{ -return x_45; -} -else -{ -lean_object* x_61; lean_object* x_62; lean_object* x_63; -x_61 = lean_ctor_get(x_45, 0); -x_62 = lean_ctor_get(x_45, 1); -lean_inc(x_62); -lean_inc(x_61); -lean_dec(x_45); -x_63 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_63, 0, x_61); -lean_ctor_set(x_63, 1, x_62); -return x_63; -} -} -} -case 11: -{ -lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; -x_64 = lean_ctor_get(x_1, 0); -lean_inc(x_64); -x_65 = lean_ctor_get(x_1, 1); -lean_inc(x_65); -x_66 = lean_ctor_get(x_1, 2); -lean_inc(x_66); -lean_inc(x_66); -x_67 = l_Lean_Expr_toMono(x_66, x_2, x_3, x_4, x_5, x_6); -if (lean_obj_tag(x_67) == 0) -{ -uint8_t x_68; -x_68 = !lean_is_exclusive(x_67); -if (x_68 == 0) -{ -lean_object* x_69; size_t x_70; size_t x_71; uint8_t x_72; -x_69 = lean_ctor_get(x_67, 0); -x_70 = lean_ptr_addr(x_66); -lean_dec(x_66); -x_71 = lean_ptr_addr(x_69); -x_72 = lean_usize_dec_eq(x_70, x_71); -if (x_72 == 0) -{ -lean_object* x_73; -lean_dec(x_1); -x_73 = l_Lean_Expr_proj___override(x_64, x_65, x_69); -lean_ctor_set(x_67, 0, x_73); -return x_67; -} -else -{ -lean_dec(x_69); -lean_dec(x_65); -lean_dec(x_64); -lean_ctor_set(x_67, 0, x_1); -return x_67; -} -} -else -{ -lean_object* x_74; lean_object* x_75; size_t x_76; size_t x_77; uint8_t x_78; -x_74 = lean_ctor_get(x_67, 0); -x_75 = lean_ctor_get(x_67, 1); +lean_object* x_74; lean_object* x_75; lean_object* x_76; +x_74 = lean_ctor_get(x_17, 0); +x_75 = lean_ctor_get(x_17, 1); lean_inc(x_75); lean_inc(x_74); -lean_dec(x_67); -x_76 = lean_ptr_addr(x_66); -lean_dec(x_66); -x_77 = lean_ptr_addr(x_74); -x_78 = lean_usize_dec_eq(x_76, x_77); -if (x_78 == 0) -{ -lean_object* x_79; lean_object* x_80; -lean_dec(x_1); -x_79 = l_Lean_Expr_proj___override(x_64, x_65, x_74); -x_80 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_80, 0, x_79); -lean_ctor_set(x_80, 1, x_75); -return x_80; +lean_dec(x_17); +x_76 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_76, 0, x_74); +lean_ctor_set(x_76, 1, x_75); +return x_76; } -else -{ -lean_object* x_81; -lean_dec(x_74); -lean_dec(x_65); -lean_dec(x_64); -x_81 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_81, 0, x_1); -lean_ctor_set(x_81, 1, x_75); -return x_81; } } } else { -uint8_t x_82; -lean_dec(x_66); -lean_dec(x_65); -lean_dec(x_64); -lean_dec(x_1); -x_82 = !lean_is_exclusive(x_67); -if (x_82 == 0) +lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; +x_77 = lean_ctor_get(x_8, 0); +x_78 = lean_ctor_get(x_8, 1); +lean_inc(x_78); +lean_inc(x_77); +lean_dec(x_8); +x_79 = lean_ctor_get(x_77, 0); +lean_inc(x_79); +lean_dec(x_77); +x_80 = l_Lean_Expr_isConstructorApp_x3f(x_79, x_1); +if (lean_obj_tag(x_80) == 0) { -return x_67; +lean_object* x_81; lean_object* x_82; +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_81 = lean_box(0); +x_82 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_82, 0, x_81); +lean_ctor_set(x_82, 1, x_78); +return x_82; } else { lean_object* x_83; lean_object* x_84; lean_object* x_85; -x_83 = lean_ctor_get(x_67, 0); -x_84 = lean_ctor_get(x_67, 1); -lean_inc(x_84); +x_83 = lean_ctor_get(x_80, 0); lean_inc(x_83); -lean_dec(x_67); -x_85 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_85, 0, x_83); -lean_ctor_set(x_85, 1, x_84); -return x_85; +lean_dec(x_80); +x_84 = lean_ctor_get(x_83, 1); +lean_inc(x_84); +lean_inc(x_6); +lean_inc(x_5); +x_85 = l_Lean_Compiler_LCNF_hasTrivialStructure_x3f(x_84, x_5, x_6, x_78); +if (lean_obj_tag(x_85) == 0) +{ +lean_object* x_86; +x_86 = lean_ctor_get(x_85, 0); +lean_inc(x_86); +if (lean_obj_tag(x_86) == 0) +{ +lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; +lean_dec(x_83); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_87 = lean_ctor_get(x_85, 1); +lean_inc(x_87); +if (lean_is_exclusive(x_85)) { + lean_ctor_release(x_85, 0); + lean_ctor_release(x_85, 1); + x_88 = x_85; +} else { + lean_dec_ref(x_85); + x_88 = lean_box(0); +} +x_89 = lean_box(0); +if (lean_is_scalar(x_88)) { + x_90 = lean_alloc_ctor(0, 2, 0); +} else { + x_90 = x_88; +} +lean_ctor_set(x_90, 0, x_89); +lean_ctor_set(x_90, 1, x_87); +return x_90; +} +else +{ +lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; uint8_t x_100; +x_91 = lean_ctor_get(x_85, 1); +lean_inc(x_91); +if (lean_is_exclusive(x_85)) { + lean_ctor_release(x_85, 0); + lean_ctor_release(x_85, 1); + x_92 = x_85; +} else { + lean_dec_ref(x_85); + x_92 = lean_box(0); +} +x_93 = lean_ctor_get(x_86, 0); +lean_inc(x_93); +if (lean_is_exclusive(x_86)) { + lean_ctor_release(x_86, 0); + x_94 = x_86; +} else { + lean_dec_ref(x_86); + x_94 = lean_box(0); +} +x_95 = lean_ctor_get(x_83, 3); +lean_inc(x_95); +lean_dec(x_83); +x_96 = lean_ctor_get(x_93, 1); +lean_inc(x_96); +lean_dec(x_93); +x_97 = lean_nat_add(x_95, x_96); +lean_dec(x_96); +lean_dec(x_95); +x_98 = lean_unsigned_to_nat(0u); +x_99 = l___private_Lean_Expr_0__Lean_Expr_getAppNumArgsAux(x_1, x_98); +x_100 = lean_nat_dec_lt(x_97, x_99); +if (x_100 == 0) +{ +lean_object* x_101; lean_object* x_102; +lean_dec(x_99); +lean_dec(x_97); +lean_dec(x_94); +lean_dec(x_92); +lean_dec(x_1); +x_101 = l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__6; +x_102 = l_panic___at_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___spec__1(x_101, x_2, x_3, x_4, x_5, x_6, x_91); +return x_102; +} +else +{ +lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_103 = lean_nat_sub(x_99, x_97); +lean_dec(x_97); +lean_dec(x_99); +x_104 = lean_unsigned_to_nat(1u); +x_105 = lean_nat_sub(x_103, x_104); +lean_dec(x_103); +x_106 = l_Lean_Expr_getRevArg_x21(x_1, x_105); +if (lean_is_scalar(x_94)) { + x_107 = lean_alloc_ctor(1, 1, 0); +} else { + x_107 = x_94; +} +lean_ctor_set(x_107, 0, x_106); +if (lean_is_scalar(x_92)) { + x_108 = lean_alloc_ctor(0, 2, 0); +} else { + x_108 = x_92; +} +lean_ctor_set(x_108, 0, x_107); +lean_ctor_set(x_108, 1, x_91); +return x_108; } } } +else +{ +lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; +lean_dec(x_83); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_109 = lean_ctor_get(x_85, 0); +lean_inc(x_109); +x_110 = lean_ctor_get(x_85, 1); +lean_inc(x_110); +if (lean_is_exclusive(x_85)) { + lean_ctor_release(x_85, 0); + lean_ctor_release(x_85, 1); + x_111 = x_85; +} else { + lean_dec_ref(x_85); + x_111 = lean_box(0); +} +if (lean_is_scalar(x_111)) { + x_112 = lean_alloc_ctor(1, 2, 0); +} else { + x_112 = x_111; +} +lean_ctor_set(x_112, 0, x_109); +lean_ctor_set(x_112, 1, x_110); +return x_112; +} +} +} +} +} +LEAN_EXPORT lean_object* l_Lean_RBNode_findCore___at_Lean_Compiler_LCNF_fvarToMono___spec__1(lean_object* x_1, lean_object* x_2) { +_start: +{ +if (lean_obj_tag(x_1) == 0) +{ +lean_object* x_3; +x_3 = lean_box(0); +return x_3; +} +else +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8; +x_4 = lean_ctor_get(x_1, 0); +x_5 = lean_ctor_get(x_1, 1); +x_6 = lean_ctor_get(x_1, 2); +x_7 = lean_ctor_get(x_1, 3); +x_8 = l_Lean_Name_quickCmp(x_2, x_5); +switch (x_8) { +case 0: +{ +x_1 = x_4; +goto _start; +} +case 1: +{ +lean_object* x_10; lean_object* x_11; +lean_inc(x_6); +lean_inc(x_5); +x_10 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_10, 0, x_5); +lean_ctor_set(x_10, 1, x_6); +x_11 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_11, 0, x_10); +return x_11; +} default: { -lean_object* x_86; lean_object* x_87; -lean_dec(x_1); -x_86 = l_Lean_Expr_toMono___closed__4; -x_87 = l_panic___at_Lean_Compiler_LCNF_getOtherDeclType___spec__1(x_86, x_2, x_3, x_4, x_5, x_6); -return x_87; +x_1 = x_7; +goto _start; } } } } -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_LetDecl_toMono(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +} +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_fvarToMono(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { _start: { -lean_object* x_7; lean_object* x_8; -x_7 = lean_ctor_get(x_1, 2); -lean_inc(x_7); -lean_inc(x_5); -lean_inc(x_4); -x_8 = l_Lean_Compiler_LCNF_toMonoType(x_7, x_4, x_5, x_6); -if (lean_obj_tag(x_8) == 0) -{ -lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; -x_9 = lean_ctor_get(x_8, 0); +lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; +x_8 = lean_st_ref_get(x_6, x_7); +x_9 = lean_ctor_get(x_8, 1); lean_inc(x_9); -x_10 = lean_ctor_get(x_8, 1); -lean_inc(x_10); lean_dec(x_8); -x_11 = lean_ctor_get(x_1, 3); -lean_inc(x_11); -lean_inc(x_5); -lean_inc(x_4); -lean_inc(x_3); -lean_inc(x_2); -x_12 = l_Lean_Expr_toMono(x_11, x_2, x_3, x_4, x_5, x_10); -if (lean_obj_tag(x_12) == 0) +x_10 = lean_st_ref_get(x_2, x_9); +x_11 = !lean_is_exclusive(x_10); +if (x_11 == 0) { -lean_object* x_13; lean_object* x_14; lean_object* x_15; -x_13 = lean_ctor_get(x_12, 0); -lean_inc(x_13); -x_14 = lean_ctor_get(x_12, 1); -lean_inc(x_14); +lean_object* x_12; lean_object* x_13; lean_object* x_14; +x_12 = lean_ctor_get(x_10, 0); +lean_inc(x_1); +x_13 = l_Lean_Expr_fvarId_x21(x_1); +x_14 = l_Lean_RBNode_findCore___at_Lean_Compiler_LCNF_fvarToMono___spec__1(x_12, x_13); +lean_dec(x_13); lean_dec(x_12); -x_15 = l___private_Lean_Compiler_LCNF_CompilerM_0__Lean_Compiler_LCNF_updateLetDeclImp(x_1, x_9, x_13, x_2, x_3, x_4, x_5, x_14); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -return x_15; -} -else +if (lean_obj_tag(x_14) == 0) { -uint8_t x_16; -lean_dec(x_9); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_16 = !lean_is_exclusive(x_12); -if (x_16 == 0) -{ -return x_12; -} -else -{ -lean_object* x_17; lean_object* x_18; lean_object* x_19; -x_17 = lean_ctor_get(x_12, 0); -x_18 = lean_ctor_get(x_12, 1); -lean_inc(x_18); -lean_inc(x_17); -lean_dec(x_12); -x_19 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_19, 0, x_17); -lean_ctor_set(x_19, 1, x_18); -return x_19; -} -} -} -else -{ -uint8_t x_20; -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_20 = !lean_is_exclusive(x_8); -if (x_20 == 0) -{ -return x_8; -} -else -{ -lean_object* x_21; lean_object* x_22; lean_object* x_23; -x_21 = lean_ctor_get(x_8, 0); -x_22 = lean_ctor_get(x_8, 1); -lean_inc(x_22); -lean_inc(x_21); -lean_dec(x_8); -x_23 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_23, 0, x_21); -lean_ctor_set(x_23, 1, x_22); -return x_23; -} -} -} -} -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_FunDeclCore_toMono___spec__1(size_t x_1, size_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { -_start: -{ -uint8_t x_9; -x_9 = lean_usize_dec_lt(x_2, x_1); -if (x_9 == 0) -{ -lean_object* x_10; -lean_dec(x_7); -lean_dec(x_6); -x_10 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_10, 0, x_3); -lean_ctor_set(x_10, 1, x_8); +lean_ctor_set(x_10, 0, x_1); return x_10; } else { -lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; -x_11 = lean_array_uget(x_3, x_2); -x_12 = lean_unsigned_to_nat(0u); -x_13 = lean_array_uset(x_3, x_2, x_12); -lean_inc(x_7); -lean_inc(x_6); -x_14 = l_Lean_Compiler_LCNF_Param_toMono(x_11, x_4, x_5, x_6, x_7, x_8); -if (lean_obj_tag(x_14) == 0) -{ -lean_object* x_15; lean_object* x_16; size_t x_17; size_t x_18; lean_object* x_19; -x_15 = lean_ctor_get(x_14, 0); -lean_inc(x_15); -x_16 = lean_ctor_get(x_14, 1); -lean_inc(x_16); +lean_object* x_15; lean_dec(x_14); -x_17 = 1; -x_18 = lean_usize_add(x_2, x_17); -x_19 = lean_array_uset(x_13, x_2, x_15); -x_2 = x_18; -x_3 = x_19; -x_8 = x_16; -goto _start; +lean_dec(x_1); +x_15 = l_Lean_Compiler_LCNF_erasedExpr; +lean_ctor_set(x_10, 0, x_15); +return x_10; +} } else { -uint8_t x_21; -lean_dec(x_13); -lean_dec(x_7); -lean_dec(x_6); -x_21 = !lean_is_exclusive(x_14); -if (x_21 == 0) -{ -return x_14; -} -else -{ -lean_object* x_22; lean_object* x_23; lean_object* x_24; -x_22 = lean_ctor_get(x_14, 0); -x_23 = lean_ctor_get(x_14, 1); -lean_inc(x_23); -lean_inc(x_22); -lean_dec(x_14); -x_24 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_24, 0, x_22); -lean_ctor_set(x_24, 1, x_23); -return x_24; -} -} -} -} -} -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_FunDeclCore_toMono(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { -_start: -{ -lean_object* x_7; lean_object* x_8; -x_7 = lean_ctor_get(x_1, 3); -lean_inc(x_7); -lean_inc(x_5); -lean_inc(x_4); -x_8 = l_Lean_Compiler_LCNF_toMonoType(x_7, x_4, x_5, x_6); -if (lean_obj_tag(x_8) == 0) -{ -lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; size_t x_13; size_t x_14; lean_object* x_15; -x_9 = lean_ctor_get(x_8, 0); -lean_inc(x_9); -x_10 = lean_ctor_get(x_8, 1); -lean_inc(x_10); -lean_dec(x_8); -x_11 = lean_ctor_get(x_1, 2); -lean_inc(x_11); -x_12 = lean_array_get_size(x_11); -x_13 = lean_usize_of_nat(x_12); -lean_dec(x_12); -x_14 = 0; -lean_inc(x_5); -lean_inc(x_4); -x_15 = l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_FunDeclCore_toMono___spec__1(x_13, x_14, x_11, x_2, x_3, x_4, x_5, x_10); -if (lean_obj_tag(x_15) == 0) -{ lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_16 = lean_ctor_get(x_10, 0); +x_17 = lean_ctor_get(x_10, 1); +lean_inc(x_17); +lean_inc(x_16); +lean_dec(x_10); +lean_inc(x_1); +x_18 = l_Lean_Expr_fvarId_x21(x_1); +x_19 = l_Lean_RBNode_findCore___at_Lean_Compiler_LCNF_fvarToMono___spec__1(x_16, x_18); +lean_dec(x_18); +lean_dec(x_16); +if (lean_obj_tag(x_19) == 0) +{ +lean_object* x_20; +x_20 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_20, 0, x_1); +lean_ctor_set(x_20, 1, x_17); +return x_20; +} +else +{ +lean_object* x_21; lean_object* x_22; +lean_dec(x_19); +lean_dec(x_1); +x_21 = l_Lean_Compiler_LCNF_erasedExpr; +x_22 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_22, 0, x_21); +lean_ctor_set(x_22, 1, x_17); +return x_22; +} +} +} +} +LEAN_EXPORT lean_object* l_Lean_RBNode_findCore___at_Lean_Compiler_LCNF_fvarToMono___spec__1___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_Lean_RBNode_findCore___at_Lean_Compiler_LCNF_fvarToMono___spec__1(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); +return x_3; +} +} +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_fvarToMono___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +lean_object* x_8; +x_8 = l_Lean_Compiler_LCNF_fvarToMono(x_1, x_2, x_3, x_4, x_5, x_6, x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +return x_8; +} +} +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_argToMono(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +uint8_t x_8; +x_8 = l_Lean_Expr_isFVar(x_1); +if (x_8 == 0) +{ +lean_object* x_9; lean_object* x_10; +lean_dec(x_1); +x_9 = l_Lean_Compiler_LCNF_erasedExpr; +x_10 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_10, 0, x_9); +lean_ctor_set(x_10, 1, x_7); +return x_10; +} +else +{ +lean_object* x_11; +x_11 = l_Lean_Compiler_LCNF_fvarToMono(x_1, x_2, x_3, x_4, x_5, x_6, x_7); +return x_11; +} +} +} +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_argToMono___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +lean_object* x_8; +x_8 = l_Lean_Compiler_LCNF_argToMono(x_1, x_2, x_3, x_4, x_5, x_6, x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +return x_8; +} +} +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_ctorAppToMono___spec__1(size_t x_1, size_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +_start: +{ +uint8_t x_10; +x_10 = lean_usize_dec_lt(x_2, x_1); +if (x_10 == 0) +{ +lean_object* x_11; +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_11 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_11, 0, x_3); +lean_ctor_set(x_11, 1, x_9); +return x_11; +} +else +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; +x_12 = lean_array_uget(x_3, x_2); +x_13 = lean_unsigned_to_nat(0u); +x_14 = lean_array_uset(x_3, x_2, x_13); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_12); +x_15 = l_Lean_Compiler_LCNF_inferType(x_12, x_5, x_6, x_7, x_8, x_9); +if (lean_obj_tag(x_15) == 0) +{ +lean_object* x_16; lean_object* x_17; uint8_t x_18; x_16 = lean_ctor_get(x_15, 0); lean_inc(x_16); x_17 = lean_ctor_get(x_15, 1); lean_inc(x_17); lean_dec(x_15); -x_18 = lean_ctor_get(x_1, 4); -lean_inc(x_18); -lean_inc(x_5); -lean_inc(x_4); -lean_inc(x_3); -lean_inc(x_2); -x_19 = l_Lean_Compiler_LCNF_Code_toMono(x_18, x_2, x_3, x_4, x_5, x_17); -if (lean_obj_tag(x_19) == 0) +x_18 = l_Lean_Compiler_LCNF_isTypeFormerType(x_16); +if (x_18 == 0) { -lean_object* x_20; lean_object* x_21; lean_object* x_22; -x_20 = lean_ctor_get(x_19, 0); -lean_inc(x_20); -x_21 = lean_ctor_get(x_19, 1); -lean_inc(x_21); -lean_dec(x_19); -x_22 = l___private_Lean_Compiler_LCNF_CompilerM_0__Lean_Compiler_LCNF_updateFunDeclImp(x_1, x_9, x_16, x_20, x_2, x_3, x_4, x_5, x_21); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -return x_22; +size_t x_19; size_t x_20; lean_object* x_21; lean_object* x_22; +lean_dec(x_12); +x_19 = 1; +x_20 = lean_usize_add(x_2, x_19); +x_21 = l_Lean_Compiler_LCNF_erasedExpr; +x_22 = lean_array_uset(x_14, x_2, x_21); +x_2 = x_20; +x_3 = x_22; +x_9 = x_17; +goto _start; } else { -uint8_t x_23; -lean_dec(x_16); -lean_dec(x_9); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_23 = !lean_is_exclusive(x_19); -if (x_23 == 0) +lean_object* x_24; +lean_inc(x_8); +lean_inc(x_7); +x_24 = l_Lean_Compiler_LCNF_toMonoType(x_12, x_7, x_8, x_17); +if (lean_obj_tag(x_24) == 0) { -return x_19; -} -else -{ -lean_object* x_24; lean_object* x_25; lean_object* x_26; -x_24 = lean_ctor_get(x_19, 0); -x_25 = lean_ctor_get(x_19, 1); +lean_object* x_25; lean_object* x_26; size_t x_27; size_t x_28; lean_object* x_29; +x_25 = lean_ctor_get(x_24, 0); lean_inc(x_25); -lean_inc(x_24); -lean_dec(x_19); -x_26 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_26, 0, x_24); -lean_ctor_set(x_26, 1, x_25); -return x_26; -} -} -} -else -{ -uint8_t x_27; -lean_dec(x_9); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_27 = !lean_is_exclusive(x_15); -if (x_27 == 0) -{ -return x_15; -} -else -{ -lean_object* x_28; lean_object* x_29; lean_object* x_30; -x_28 = lean_ctor_get(x_15, 0); -x_29 = lean_ctor_get(x_15, 1); -lean_inc(x_29); -lean_inc(x_28); -lean_dec(x_15); -x_30 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_30, 0, x_28); -lean_ctor_set(x_30, 1, x_29); -return x_30; -} -} +x_26 = lean_ctor_get(x_24, 1); +lean_inc(x_26); +lean_dec(x_24); +x_27 = 1; +x_28 = lean_usize_add(x_2, x_27); +x_29 = lean_array_uset(x_14, x_2, x_25); +x_2 = x_28; +x_3 = x_29; +x_9 = x_26; +goto _start; } else { uint8_t x_31; +lean_dec(x_14); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_31 = !lean_is_exclusive(x_8); +x_31 = !lean_is_exclusive(x_24); if (x_31 == 0) { -return x_8; +return x_24; } else { lean_object* x_32; lean_object* x_33; lean_object* x_34; -x_32 = lean_ctor_get(x_8, 0); -x_33 = lean_ctor_get(x_8, 1); +x_32 = lean_ctor_get(x_24, 0); +x_33 = lean_ctor_get(x_24, 1); lean_inc(x_33); lean_inc(x_32); -lean_dec(x_8); +lean_dec(x_24); x_34 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_34, 0, x_32); lean_ctor_set(x_34, 1, x_33); @@ -1097,71 +1131,1120 @@ return x_34; } } } -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_Code_toMono___spec__1(size_t x_1, size_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { -_start: +else { -uint8_t x_9; -x_9 = lean_usize_dec_lt(x_2, x_1); -if (x_9 == 0) -{ -lean_object* x_10; +uint8_t x_35; +lean_dec(x_14); +lean_dec(x_12); +lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); -lean_dec(x_4); -x_10 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_10, 0, x_3); -lean_ctor_set(x_10, 1, x_8); -return x_10; +x_35 = !lean_is_exclusive(x_15); +if (x_35 == 0) +{ +return x_15; } else { -lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; -x_11 = lean_array_uget(x_3, x_2); -x_12 = lean_unsigned_to_nat(0u); -x_13 = lean_array_uset(x_3, x_2, x_12); +lean_object* x_36; lean_object* x_37; lean_object* x_38; +x_36 = lean_ctor_get(x_15, 0); +x_37 = lean_ctor_get(x_15, 1); +lean_inc(x_37); +lean_inc(x_36); +lean_dec(x_15); +x_38 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_38, 0, x_36); +lean_ctor_set(x_38, 1, x_37); +return x_38; +} +} +} +} +} +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_ctorAppToMono___spec__2(size_t x_1, size_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +_start: +{ +uint8_t x_10; +x_10 = lean_usize_dec_lt(x_2, x_1); +if (x_10 == 0) +{ +lean_object* x_11; +x_11 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_11, 0, x_3); +lean_ctor_set(x_11, 1, x_9); +return x_11; +} +else +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; size_t x_18; size_t x_19; lean_object* x_20; +x_12 = lean_array_uget(x_3, x_2); +x_13 = lean_unsigned_to_nat(0u); +x_14 = lean_array_uset(x_3, x_2, x_13); +x_15 = l_Lean_Compiler_LCNF_argToMono(x_12, x_4, x_5, x_6, x_7, x_8, x_9); +x_16 = lean_ctor_get(x_15, 0); +lean_inc(x_16); +x_17 = lean_ctor_get(x_15, 1); +lean_inc(x_17); +lean_dec(x_15); +x_18 = 1; +x_19 = lean_usize_add(x_2, x_18); +x_20 = lean_array_uset(x_14, x_2, x_16); +x_2 = x_19; +x_3 = x_20; +x_9 = x_17; +goto _start; +} +} +} +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_ctorAppToMono(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; size_t x_14; size_t x_15; lean_object* x_16; +x_9 = lean_ctor_get(x_1, 3); +lean_inc(x_9); +x_10 = lean_unsigned_to_nat(0u); +lean_inc(x_9); +lean_inc(x_2); +x_11 = l_Array_toSubarray___rarg(x_2, x_10, x_9); +x_12 = l_Array_ofSubarray___rarg(x_11); +x_13 = lean_array_get_size(x_12); +x_14 = lean_usize_of_nat(x_13); +lean_dec(x_13); +x_15 = 0; lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); -x_14 = l_Lean_Compiler_LCNF_AltCore_toMono(x_11, x_4, x_5, x_6, x_7, x_8); -if (lean_obj_tag(x_14) == 0) +x_16 = l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_ctorAppToMono___spec__1(x_14, x_15, x_12, x_3, x_4, x_5, x_6, x_7, x_8); +if (lean_obj_tag(x_16) == 0) { -lean_object* x_15; lean_object* x_16; size_t x_17; size_t x_18; lean_object* x_19; -x_15 = lean_ctor_get(x_14, 0); -lean_inc(x_15); -x_16 = lean_ctor_get(x_14, 1); -lean_inc(x_16); -lean_dec(x_14); -x_17 = 1; -x_18 = lean_usize_add(x_2, x_17); -x_19 = lean_array_uset(x_13, x_2, x_15); -x_2 = x_18; -x_3 = x_19; -x_8 = x_16; -goto _start; -} -else -{ -uint8_t x_21; -lean_dec(x_13); +lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; size_t x_23; lean_object* x_24; uint8_t x_25; +x_17 = lean_ctor_get(x_16, 0); +lean_inc(x_17); +x_18 = lean_ctor_get(x_16, 1); +lean_inc(x_18); +lean_dec(x_16); +x_19 = lean_array_get_size(x_2); +x_20 = l_Array_toSubarray___rarg(x_2, x_9, x_19); +x_21 = l_Array_ofSubarray___rarg(x_20); +x_22 = lean_array_get_size(x_21); +x_23 = lean_usize_of_nat(x_22); +lean_dec(x_22); +x_24 = l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_ctorAppToMono___spec__2(x_23, x_15, x_21, x_3, x_4, x_5, x_6, x_7, x_18); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); -x_21 = !lean_is_exclusive(x_14); +x_25 = !lean_is_exclusive(x_24); +if (x_25 == 0) +{ +lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; +x_26 = lean_ctor_get(x_24, 0); +x_27 = l_Array_append___rarg(x_17, x_26); +x_28 = lean_ctor_get(x_1, 0); +lean_inc(x_28); +lean_dec(x_1); +x_29 = lean_ctor_get(x_28, 0); +lean_inc(x_29); +lean_dec(x_28); +x_30 = lean_box(0); +x_31 = l_Lean_Expr_const___override(x_29, x_30); +x_32 = l_Lean_mkAppN(x_31, x_27); +lean_ctor_set(x_24, 0, x_32); +return x_24; +} +else +{ +lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; +x_33 = lean_ctor_get(x_24, 0); +x_34 = lean_ctor_get(x_24, 1); +lean_inc(x_34); +lean_inc(x_33); +lean_dec(x_24); +x_35 = l_Array_append___rarg(x_17, x_33); +x_36 = lean_ctor_get(x_1, 0); +lean_inc(x_36); +lean_dec(x_1); +x_37 = lean_ctor_get(x_36, 0); +lean_inc(x_37); +lean_dec(x_36); +x_38 = lean_box(0); +x_39 = l_Lean_Expr_const___override(x_37, x_38); +x_40 = l_Lean_mkAppN(x_39, x_35); +x_41 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_41, 0, x_40); +lean_ctor_set(x_41, 1, x_34); +return x_41; +} +} +else +{ +uint8_t x_42; +lean_dec(x_9); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +lean_dec(x_1); +x_42 = !lean_is_exclusive(x_16); +if (x_42 == 0) +{ +return x_16; +} +else +{ +lean_object* x_43; lean_object* x_44; lean_object* x_45; +x_43 = lean_ctor_get(x_16, 0); +x_44 = lean_ctor_get(x_16, 1); +lean_inc(x_44); +lean_inc(x_43); +lean_dec(x_16); +x_45 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_45, 0, x_43); +lean_ctor_set(x_45, 1, x_44); +return x_45; +} +} +} +} +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_ctorAppToMono___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +_start: +{ +size_t x_10; size_t x_11; lean_object* x_12; +x_10 = lean_unbox_usize(x_1); +lean_dec(x_1); +x_11 = lean_unbox_usize(x_2); +lean_dec(x_2); +x_12 = l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_ctorAppToMono___spec__1(x_10, x_11, x_3, x_4, x_5, x_6, x_7, x_8, x_9); +lean_dec(x_4); +return x_12; +} +} +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_ctorAppToMono___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +_start: +{ +size_t x_10; size_t x_11; lean_object* x_12; +x_10 = lean_unbox_usize(x_1); +lean_dec(x_1); +x_11 = lean_unbox_usize(x_2); +lean_dec(x_2); +x_12 = l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_ctorAppToMono___spec__2(x_10, x_11, x_3, x_4, x_5, x_6, x_7, x_8, x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +return x_12; +} +} +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_ctorAppToMono___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; +x_9 = l_Lean_Compiler_LCNF_ctorAppToMono(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +lean_dec(x_3); +return x_9; +} +} +static lean_object* _init_l_panic___at_Lean_Expr_toMono___spec__1___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_panic___at_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___spec__1___closed__3; +x_2 = l_Lean_instInhabitedExpr; +x_3 = l_instInhabited___rarg(x_1, x_2); +return x_3; +} +} +LEAN_EXPORT lean_object* l_panic___at_Lean_Expr_toMono___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_8 = l_panic___at_Lean_Expr_toMono___spec__1___closed__1; +x_9 = lean_panic_fn(x_8, x_1); +x_10 = lean_apply_6(x_9, x_2, x_3, x_4, x_5, x_6, x_7); +return x_10; +} +} +static lean_object* _init_l_Lean_Expr_toMono___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("Lean.Expr.toMono", 16); +return x_1; +} +} +static lean_object* _init_l_Lean_Expr_toMono___closed__2() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("unreachable code has been reached", 33); +return x_1; +} +} +static lean_object* _init_l_Lean_Expr_toMono___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_1 = l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__4; +x_2 = l_Lean_Expr_toMono___closed__1; +x_3 = lean_unsigned_to_nat(55u); +x_4 = lean_unsigned_to_nat(38u); +x_5 = l_Lean_Expr_toMono___closed__2; +x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); +return x_6; +} +} +static lean_object* _init_l_Lean_Expr_toMono___closed__4() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("Decidable", 9); +return x_1; +} +} +static lean_object* _init_l_Lean_Expr_toMono___closed__5() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("isTrue", 6); +return x_1; +} +} +static lean_object* _init_l_Lean_Expr_toMono___closed__6() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Expr_toMono___closed__4; +x_2 = l_Lean_Expr_toMono___closed__5; +x_3 = l_Lean_Name_mkStr2(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Expr_toMono___closed__7() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("isFalse", 7); +return x_1; +} +} +static lean_object* _init_l_Lean_Expr_toMono___closed__8() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Expr_toMono___closed__4; +x_2 = l_Lean_Expr_toMono___closed__7; +x_3 = l_Lean_Name_mkStr2(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Expr_toMono___closed__9() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_levelZero; +x_2 = l_Lean_Expr_sort___override(x_1); +return x_2; +} +} +static lean_object* _init_l_Lean_Expr_toMono___closed__10() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("Bool", 4); +return x_1; +} +} +static lean_object* _init_l_Lean_Expr_toMono___closed__11() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("false", 5); +return x_1; +} +} +static lean_object* _init_l_Lean_Expr_toMono___closed__12() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Expr_toMono___closed__10; +x_2 = l_Lean_Expr_toMono___closed__11; +x_3 = l_Lean_Name_mkStr2(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Expr_toMono___closed__13() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Expr_toMono___closed__12; +x_3 = l_Lean_Expr_const___override(x_2, x_1); +return x_3; +} +} +static lean_object* _init_l_Lean_Expr_toMono___closed__14() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("true", 4); +return x_1; +} +} +static lean_object* _init_l_Lean_Expr_toMono___closed__15() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Expr_toMono___closed__10; +x_2 = l_Lean_Expr_toMono___closed__14; +x_3 = l_Lean_Name_mkStr2(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Expr_toMono___closed__16() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Expr_toMono___closed__15; +x_3 = l_Lean_Expr_const___override(x_2, x_1); +return x_3; +} +} +LEAN_EXPORT lean_object* l_Lean_Expr_toMono(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +switch (lean_obj_tag(x_1)) { +case 1: +{ +lean_object* x_8; +x_8 = l_Lean_Compiler_LCNF_fvarToMono(x_1, x_2, x_3, x_4, x_5, x_6, x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +return x_8; +} +case 3: +{ +lean_object* x_9; lean_object* x_10; +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_9 = l_Lean_Compiler_LCNF_erasedExpr; +x_10 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_10, 0, x_9); +lean_ctor_set(x_10, 1, x_7); +return x_10; +} +case 4: +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_11 = lean_ctor_get(x_1, 0); +lean_inc(x_11); +lean_dec(x_1); +x_12 = lean_box(0); +x_13 = l_Lean_Expr_const___override(x_11, x_12); +x_14 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_14, 0, x_13); +lean_ctor_set(x_14, 1, x_7); +return x_14; +} +case 5: +{ +lean_object* x_15; uint8_t x_16; +x_15 = l_Lean_Expr_toMono___closed__6; +x_16 = l_Lean_Expr_isAppOf(x_1, x_15); +if (x_16 == 0) +{ +lean_object* x_17; uint8_t x_18; +x_17 = l_Lean_Expr_toMono___closed__8; +x_18 = l_Lean_Expr_isAppOf(x_1, x_17); +if (x_18 == 0) +{ +lean_object* x_19; +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_2); +lean_inc(x_1); +x_19 = l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f(x_1, x_2, x_3, x_4, x_5, x_6, x_7); +if (lean_obj_tag(x_19) == 0) +{ +lean_object* x_20; +x_20 = lean_ctor_get(x_19, 0); +lean_inc(x_20); +if (lean_obj_tag(x_20) == 0) +{ +lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; +x_21 = lean_ctor_get(x_19, 1); +lean_inc(x_21); +lean_dec(x_19); +x_22 = lean_st_ref_get(x_6, x_21); +x_23 = lean_ctor_get(x_22, 0); +lean_inc(x_23); +x_24 = lean_ctor_get(x_22, 1); +lean_inc(x_24); +lean_dec(x_22); +x_25 = lean_ctor_get(x_23, 0); +lean_inc(x_25); +lean_dec(x_23); +x_26 = l_Lean_Expr_isConstructorApp_x3f(x_25, x_1); +if (lean_obj_tag(x_26) == 0) +{ +lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; size_t x_36; size_t x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; +x_27 = l_Lean_Expr_getAppFn(x_1); +x_28 = lean_unsigned_to_nat(0u); +x_29 = l___private_Lean_Expr_0__Lean_Expr_getAppNumArgsAux(x_1, x_28); +x_30 = l_Lean_Expr_toMono___closed__9; +lean_inc(x_29); +x_31 = lean_mk_array(x_29, x_30); +x_32 = lean_unsigned_to_nat(1u); +x_33 = lean_nat_sub(x_29, x_32); +lean_dec(x_29); +x_34 = l___private_Lean_Expr_0__Lean_Expr_getAppArgsAux(x_1, x_31, x_33); +x_35 = lean_array_get_size(x_34); +x_36 = lean_usize_of_nat(x_35); +lean_dec(x_35); +x_37 = 0; +x_38 = l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_ctorAppToMono___spec__2(x_36, x_37, x_34, x_2, x_3, x_4, x_5, x_6, x_24); +x_39 = lean_ctor_get(x_38, 0); +lean_inc(x_39); +x_40 = lean_ctor_get(x_38, 1); +lean_inc(x_40); +lean_dec(x_38); +x_41 = l_Lean_Expr_toMono(x_27, x_2, x_3, x_4, x_5, x_6, x_40); +if (lean_obj_tag(x_41) == 0) +{ +uint8_t x_42; +x_42 = !lean_is_exclusive(x_41); +if (x_42 == 0) +{ +lean_object* x_43; lean_object* x_44; +x_43 = lean_ctor_get(x_41, 0); +x_44 = l_Lean_mkAppN(x_43, x_39); +lean_ctor_set(x_41, 0, x_44); +return x_41; +} +else +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; +x_45 = lean_ctor_get(x_41, 0); +x_46 = lean_ctor_get(x_41, 1); +lean_inc(x_46); +lean_inc(x_45); +lean_dec(x_41); +x_47 = l_Lean_mkAppN(x_45, x_39); +x_48 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_48, 0, x_47); +lean_ctor_set(x_48, 1, x_46); +return x_48; +} +} +else +{ +uint8_t x_49; +lean_dec(x_39); +x_49 = !lean_is_exclusive(x_41); +if (x_49 == 0) +{ +return x_41; +} +else +{ +lean_object* x_50; lean_object* x_51; lean_object* x_52; +x_50 = lean_ctor_get(x_41, 0); +x_51 = lean_ctor_get(x_41, 1); +lean_inc(x_51); +lean_inc(x_50); +lean_dec(x_41); +x_52 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_52, 0, x_50); +lean_ctor_set(x_52, 1, x_51); +return x_52; +} +} +} +else +{ +lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; +x_53 = lean_ctor_get(x_26, 0); +lean_inc(x_53); +lean_dec(x_26); +x_54 = lean_unsigned_to_nat(0u); +x_55 = l___private_Lean_Expr_0__Lean_Expr_getAppNumArgsAux(x_1, x_54); +x_56 = l_Lean_Expr_toMono___closed__9; +lean_inc(x_55); +x_57 = lean_mk_array(x_55, x_56); +x_58 = lean_unsigned_to_nat(1u); +x_59 = lean_nat_sub(x_55, x_58); +lean_dec(x_55); +x_60 = l___private_Lean_Expr_0__Lean_Expr_getAppArgsAux(x_1, x_57, x_59); +x_61 = l_Lean_Compiler_LCNF_ctorAppToMono(x_53, x_60, x_2, x_3, x_4, x_5, x_6, x_24); +lean_dec(x_2); +return x_61; +} +} +else +{ +lean_object* x_62; lean_object* x_63; +lean_dec(x_1); +x_62 = lean_ctor_get(x_19, 1); +lean_inc(x_62); +lean_dec(x_19); +x_63 = lean_ctor_get(x_20, 0); +lean_inc(x_63); +lean_dec(x_20); +x_1 = x_63; +x_7 = x_62; +goto _start; +} +} +else +{ +uint8_t x_65; +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_65 = !lean_is_exclusive(x_19); +if (x_65 == 0) +{ +return x_19; +} +else +{ +lean_object* x_66; lean_object* x_67; lean_object* x_68; +x_66 = lean_ctor_get(x_19, 0); +x_67 = lean_ctor_get(x_19, 1); +lean_inc(x_67); +lean_inc(x_66); +lean_dec(x_19); +x_68 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_68, 0, x_66); +lean_ctor_set(x_68, 1, x_67); +return x_68; +} +} +} +else +{ +lean_object* x_69; lean_object* x_70; +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_69 = l_Lean_Expr_toMono___closed__13; +x_70 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_70, 0, x_69); +lean_ctor_set(x_70, 1, x_7); +return x_70; +} +} +else +{ +lean_object* x_71; lean_object* x_72; +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_71 = l_Lean_Expr_toMono___closed__16; +x_72 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_72, 0, x_71); +lean_ctor_set(x_72, 1, x_7); +return x_72; +} +} +case 6: +{ +lean_object* x_73; lean_object* x_74; +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_73 = l_Lean_Compiler_LCNF_erasedExpr; +x_74 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_74, 0, x_73); +lean_ctor_set(x_74, 1, x_7); +return x_74; +} +case 7: +{ +lean_object* x_75; lean_object* x_76; +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_75 = l_Lean_Compiler_LCNF_erasedExpr; +x_76 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_76, 0, x_75); +lean_ctor_set(x_76, 1, x_7); +return x_76; +} +case 9: +{ +lean_object* x_77; +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_77 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_77, 0, x_1); +lean_ctor_set(x_77, 1, x_7); +return x_77; +} +case 10: +{ +lean_object* x_78; lean_object* x_79; lean_object* x_80; +x_78 = lean_ctor_get(x_1, 0); +lean_inc(x_78); +x_79 = lean_ctor_get(x_1, 1); +lean_inc(x_79); +lean_inc(x_79); +x_80 = l_Lean_Expr_toMono(x_79, x_2, x_3, x_4, x_5, x_6, x_7); +if (lean_obj_tag(x_80) == 0) +{ +uint8_t x_81; +x_81 = !lean_is_exclusive(x_80); +if (x_81 == 0) +{ +lean_object* x_82; size_t x_83; size_t x_84; uint8_t x_85; +x_82 = lean_ctor_get(x_80, 0); +x_83 = lean_ptr_addr(x_79); +lean_dec(x_79); +x_84 = lean_ptr_addr(x_82); +x_85 = lean_usize_dec_eq(x_83, x_84); +if (x_85 == 0) +{ +lean_object* x_86; +lean_dec(x_1); +x_86 = l_Lean_Expr_mdata___override(x_78, x_82); +lean_ctor_set(x_80, 0, x_86); +return x_80; +} +else +{ +lean_dec(x_82); +lean_dec(x_78); +lean_ctor_set(x_80, 0, x_1); +return x_80; +} +} +else +{ +lean_object* x_87; lean_object* x_88; size_t x_89; size_t x_90; uint8_t x_91; +x_87 = lean_ctor_get(x_80, 0); +x_88 = lean_ctor_get(x_80, 1); +lean_inc(x_88); +lean_inc(x_87); +lean_dec(x_80); +x_89 = lean_ptr_addr(x_79); +lean_dec(x_79); +x_90 = lean_ptr_addr(x_87); +x_91 = lean_usize_dec_eq(x_89, x_90); +if (x_91 == 0) +{ +lean_object* x_92; lean_object* x_93; +lean_dec(x_1); +x_92 = l_Lean_Expr_mdata___override(x_78, x_87); +x_93 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_93, 0, x_92); +lean_ctor_set(x_93, 1, x_88); +return x_93; +} +else +{ +lean_object* x_94; +lean_dec(x_87); +lean_dec(x_78); +x_94 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_94, 0, x_1); +lean_ctor_set(x_94, 1, x_88); +return x_94; +} +} +} +else +{ +uint8_t x_95; +lean_dec(x_79); +lean_dec(x_78); +lean_dec(x_1); +x_95 = !lean_is_exclusive(x_80); +if (x_95 == 0) +{ +return x_80; +} +else +{ +lean_object* x_96; lean_object* x_97; lean_object* x_98; +x_96 = lean_ctor_get(x_80, 0); +x_97 = lean_ctor_get(x_80, 1); +lean_inc(x_97); +lean_inc(x_96); +lean_dec(x_80); +x_98 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_98, 0, x_96); +lean_ctor_set(x_98, 1, x_97); +return x_98; +} +} +} +case 11: +{ +lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; +x_99 = lean_ctor_get(x_1, 0); +lean_inc(x_99); +x_100 = lean_ctor_get(x_1, 1); +lean_inc(x_100); +x_101 = lean_ctor_get(x_1, 2); +lean_inc(x_101); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_99); +x_102 = l_Lean_Compiler_LCNF_hasTrivialStructure_x3f(x_99, x_5, x_6, x_7); +if (lean_obj_tag(x_102) == 0) +{ +lean_object* x_103; +x_103 = lean_ctor_get(x_102, 0); +lean_inc(x_103); +if (lean_obj_tag(x_103) == 0) +{ +lean_object* x_104; lean_object* x_105; +x_104 = lean_ctor_get(x_102, 1); +lean_inc(x_104); +lean_dec(x_102); +lean_inc(x_101); +x_105 = l_Lean_Expr_toMono(x_101, x_2, x_3, x_4, x_5, x_6, x_104); +if (lean_obj_tag(x_105) == 0) +{ +uint8_t x_106; +x_106 = !lean_is_exclusive(x_105); +if (x_106 == 0) +{ +lean_object* x_107; size_t x_108; size_t x_109; uint8_t x_110; +x_107 = lean_ctor_get(x_105, 0); +x_108 = lean_ptr_addr(x_101); +lean_dec(x_101); +x_109 = lean_ptr_addr(x_107); +x_110 = lean_usize_dec_eq(x_108, x_109); +if (x_110 == 0) +{ +lean_object* x_111; +lean_dec(x_1); +x_111 = l_Lean_Expr_proj___override(x_99, x_100, x_107); +lean_ctor_set(x_105, 0, x_111); +return x_105; +} +else +{ +lean_dec(x_107); +lean_dec(x_100); +lean_dec(x_99); +lean_ctor_set(x_105, 0, x_1); +return x_105; +} +} +else +{ +lean_object* x_112; lean_object* x_113; size_t x_114; size_t x_115; uint8_t x_116; +x_112 = lean_ctor_get(x_105, 0); +x_113 = lean_ctor_get(x_105, 1); +lean_inc(x_113); +lean_inc(x_112); +lean_dec(x_105); +x_114 = lean_ptr_addr(x_101); +lean_dec(x_101); +x_115 = lean_ptr_addr(x_112); +x_116 = lean_usize_dec_eq(x_114, x_115); +if (x_116 == 0) +{ +lean_object* x_117; lean_object* x_118; +lean_dec(x_1); +x_117 = l_Lean_Expr_proj___override(x_99, x_100, x_112); +x_118 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_118, 0, x_117); +lean_ctor_set(x_118, 1, x_113); +return x_118; +} +else +{ +lean_object* x_119; +lean_dec(x_112); +lean_dec(x_100); +lean_dec(x_99); +x_119 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_119, 0, x_1); +lean_ctor_set(x_119, 1, x_113); +return x_119; +} +} +} +else +{ +uint8_t x_120; +lean_dec(x_101); +lean_dec(x_100); +lean_dec(x_99); +lean_dec(x_1); +x_120 = !lean_is_exclusive(x_105); +if (x_120 == 0) +{ +return x_105; +} +else +{ +lean_object* x_121; lean_object* x_122; lean_object* x_123; +x_121 = lean_ctor_get(x_105, 0); +x_122 = lean_ctor_get(x_105, 1); +lean_inc(x_122); +lean_inc(x_121); +lean_dec(x_105); +x_123 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_123, 0, x_121); +lean_ctor_set(x_123, 1, x_122); +return x_123; +} +} +} +else +{ +uint8_t x_124; +lean_dec(x_99); +lean_dec(x_1); +x_124 = !lean_is_exclusive(x_102); +if (x_124 == 0) +{ +lean_object* x_125; lean_object* x_126; lean_object* x_127; lean_object* x_128; uint8_t x_129; +x_125 = lean_ctor_get(x_102, 1); +x_126 = lean_ctor_get(x_102, 0); +lean_dec(x_126); +x_127 = lean_ctor_get(x_103, 0); +lean_inc(x_127); +lean_dec(x_103); +x_128 = lean_ctor_get(x_127, 1); +lean_inc(x_128); +lean_dec(x_127); +x_129 = lean_nat_dec_eq(x_128, x_100); +lean_dec(x_100); +lean_dec(x_128); +if (x_129 == 0) +{ +lean_object* x_130; +lean_dec(x_101); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_130 = l_Lean_Compiler_LCNF_erasedExpr; +lean_ctor_set(x_102, 0, x_130); +return x_102; +} +else +{ +lean_free_object(x_102); +x_1 = x_101; +x_7 = x_125; +goto _start; +} +} +else +{ +lean_object* x_132; lean_object* x_133; lean_object* x_134; uint8_t x_135; +x_132 = lean_ctor_get(x_102, 1); +lean_inc(x_132); +lean_dec(x_102); +x_133 = lean_ctor_get(x_103, 0); +lean_inc(x_133); +lean_dec(x_103); +x_134 = lean_ctor_get(x_133, 1); +lean_inc(x_134); +lean_dec(x_133); +x_135 = lean_nat_dec_eq(x_134, x_100); +lean_dec(x_100); +lean_dec(x_134); +if (x_135 == 0) +{ +lean_object* x_136; lean_object* x_137; +lean_dec(x_101); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_136 = l_Lean_Compiler_LCNF_erasedExpr; +x_137 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_137, 0, x_136); +lean_ctor_set(x_137, 1, x_132); +return x_137; +} +else +{ +x_1 = x_101; +x_7 = x_132; +goto _start; +} +} +} +} +else +{ +uint8_t x_139; +lean_dec(x_101); +lean_dec(x_100); +lean_dec(x_99); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_139 = !lean_is_exclusive(x_102); +if (x_139 == 0) +{ +return x_102; +} +else +{ +lean_object* x_140; lean_object* x_141; lean_object* x_142; +x_140 = lean_ctor_get(x_102, 0); +x_141 = lean_ctor_get(x_102, 1); +lean_inc(x_141); +lean_inc(x_140); +lean_dec(x_102); +x_142 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_142, 0, x_140); +lean_ctor_set(x_142, 1, x_141); +return x_142; +} +} +} +default: +{ +lean_object* x_143; lean_object* x_144; +lean_dec(x_1); +x_143 = l_Lean_Expr_toMono___closed__3; +x_144 = l_panic___at_Lean_Expr_toMono___spec__1(x_143, x_2, x_3, x_4, x_5, x_6, x_7); +return x_144; +} +} +} +} +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_LetDecl_toMono(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +lean_object* x_8; lean_object* x_9; +x_8 = lean_ctor_get(x_1, 2); +lean_inc(x_8); +lean_inc(x_6); +lean_inc(x_5); +x_9 = l_Lean_Compiler_LCNF_toMonoType(x_8, x_5, x_6, x_7); +if (lean_obj_tag(x_9) == 0) +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_10 = lean_ctor_get(x_9, 0); +lean_inc(x_10); +x_11 = lean_ctor_get(x_9, 1); +lean_inc(x_11); +lean_dec(x_9); +x_12 = lean_ctor_get(x_1, 3); +lean_inc(x_12); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +lean_inc(x_3); +x_13 = l_Lean_Expr_toMono(x_12, x_2, x_3, x_4, x_5, x_6, x_11); +if (lean_obj_tag(x_13) == 0) +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_14 = lean_ctor_get(x_13, 0); +lean_inc(x_14); +x_15 = lean_ctor_get(x_13, 1); +lean_inc(x_15); +lean_dec(x_13); +x_16 = l___private_Lean_Compiler_LCNF_CompilerM_0__Lean_Compiler_LCNF_updateLetDeclImp(x_1, x_10, x_14, x_3, x_4, x_5, x_6, x_15); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +return x_16; +} +else +{ +uint8_t x_17; +lean_dec(x_10); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_1); +x_17 = !lean_is_exclusive(x_13); +if (x_17 == 0) +{ +return x_13; +} +else +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_18 = lean_ctor_get(x_13, 0); +x_19 = lean_ctor_get(x_13, 1); +lean_inc(x_19); +lean_inc(x_18); +lean_dec(x_13); +x_20 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_20, 0, x_18); +lean_ctor_set(x_20, 1, x_19); +return x_20; +} +} +} +else +{ +uint8_t x_21; +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_21 = !lean_is_exclusive(x_9); if (x_21 == 0) { -return x_14; +return x_9; } else { lean_object* x_22; lean_object* x_23; lean_object* x_24; -x_22 = lean_ctor_get(x_14, 0); -x_23 = lean_ctor_get(x_14, 1); +x_22 = lean_ctor_get(x_9, 0); +x_23 = lean_ctor_get(x_9, 1); lean_inc(x_23); lean_inc(x_22); -lean_dec(x_14); +lean_dec(x_9); x_24 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_24, 0, x_22); lean_ctor_set(x_24, 1, x_23); @@ -1170,246 +2253,417 @@ return x_24; } } } -} -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Code_toMono(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_FunDeclCore_toMono___spec__1(size_t x_1, size_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { _start: { -switch (lean_obj_tag(x_1)) { -case 0: +uint8_t x_10; +x_10 = lean_usize_dec_lt(x_2, x_1); +if (x_10 == 0) { -lean_object* x_7; lean_object* x_8; lean_object* x_9; -x_7 = lean_ctor_get(x_1, 0); -lean_inc(x_7); -x_8 = lean_ctor_get(x_1, 1); +lean_object* x_11; +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +x_11 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_11, 0, x_3); +lean_ctor_set(x_11, 1, x_9); +return x_11; +} +else +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; +x_12 = lean_array_uget(x_3, x_2); +x_13 = lean_unsigned_to_nat(0u); +x_14 = lean_array_uset(x_3, x_2, x_13); lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); -lean_inc(x_3); -lean_inc(x_2); -lean_inc(x_7); -x_9 = l_Lean_Compiler_LCNF_LetDecl_toMono(x_7, x_2, x_3, x_4, x_5, x_6); +x_15 = l_Lean_Compiler_LCNF_Param_toMono(x_12, x_4, x_5, x_6, x_7, x_8, x_9); +if (lean_obj_tag(x_15) == 0) +{ +lean_object* x_16; lean_object* x_17; size_t x_18; size_t x_19; lean_object* x_20; +x_16 = lean_ctor_get(x_15, 0); +lean_inc(x_16); +x_17 = lean_ctor_get(x_15, 1); +lean_inc(x_17); +lean_dec(x_15); +x_18 = 1; +x_19 = lean_usize_add(x_2, x_18); +x_20 = lean_array_uset(x_14, x_2, x_16); +x_2 = x_19; +x_3 = x_20; +x_9 = x_17; +goto _start; +} +else +{ +uint8_t x_22; +lean_dec(x_14); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +x_22 = !lean_is_exclusive(x_15); +if (x_22 == 0) +{ +return x_15; +} +else +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; +x_23 = lean_ctor_get(x_15, 0); +x_24 = lean_ctor_get(x_15, 1); +lean_inc(x_24); +lean_inc(x_23); +lean_dec(x_15); +x_25 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_25, 0, x_23); +lean_ctor_set(x_25, 1, x_24); +return x_25; +} +} +} +} +} +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_FunDeclCore_toMono(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +lean_object* x_8; lean_object* x_9; +x_8 = lean_ctor_get(x_1, 3); +lean_inc(x_8); +lean_inc(x_6); +lean_inc(x_5); +x_9 = l_Lean_Compiler_LCNF_toMonoType(x_8, x_5, x_6, x_7); if (lean_obj_tag(x_9) == 0) { -lean_object* x_10; lean_object* x_11; lean_object* x_12; +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; size_t x_14; size_t x_15; lean_object* x_16; x_10 = lean_ctor_get(x_9, 0); lean_inc(x_10); x_11 = lean_ctor_get(x_9, 1); lean_inc(x_11); lean_dec(x_9); -lean_inc(x_8); -x_12 = l_Lean_Compiler_LCNF_Code_toMono(x_8, x_2, x_3, x_4, x_5, x_11); -if (lean_obj_tag(x_12) == 0) +x_12 = lean_ctor_get(x_1, 2); +lean_inc(x_12); +x_13 = lean_array_get_size(x_12); +x_14 = lean_usize_of_nat(x_13); +lean_dec(x_13); +x_15 = 0; +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_2); +x_16 = l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_FunDeclCore_toMono___spec__1(x_14, x_15, x_12, x_2, x_3, x_4, x_5, x_6, x_11); +if (lean_obj_tag(x_16) == 0) { -uint8_t x_13; -x_13 = !lean_is_exclusive(x_12); -if (x_13 == 0) +lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_17 = lean_ctor_get(x_16, 0); +lean_inc(x_17); +x_18 = lean_ctor_get(x_16, 1); +lean_inc(x_18); +lean_dec(x_16); +x_19 = lean_ctor_get(x_1, 4); +lean_inc(x_19); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +lean_inc(x_3); +x_20 = l_Lean_Compiler_LCNF_Code_toMono(x_19, x_2, x_3, x_4, x_5, x_6, x_18); +if (lean_obj_tag(x_20) == 0) { -lean_object* x_14; size_t x_15; size_t x_16; uint8_t x_17; -x_14 = lean_ctor_get(x_12, 0); -x_15 = lean_ptr_addr(x_8); -lean_dec(x_8); -x_16 = lean_ptr_addr(x_14); -x_17 = lean_usize_dec_eq(x_15, x_16); -if (x_17 == 0) -{ -uint8_t x_18; -lean_dec(x_7); -x_18 = !lean_is_exclusive(x_1); -if (x_18 == 0) -{ -lean_object* x_19; lean_object* x_20; -x_19 = lean_ctor_get(x_1, 1); -lean_dec(x_19); -x_20 = lean_ctor_get(x_1, 0); +lean_object* x_21; lean_object* x_22; lean_object* x_23; +x_21 = lean_ctor_get(x_20, 0); +lean_inc(x_21); +x_22 = lean_ctor_get(x_20, 1); +lean_inc(x_22); lean_dec(x_20); -lean_ctor_set(x_1, 1, x_14); -lean_ctor_set(x_1, 0, x_10); -lean_ctor_set(x_12, 0, x_1); -return x_12; +x_23 = l___private_Lean_Compiler_LCNF_CompilerM_0__Lean_Compiler_LCNF_updateFunDeclImp(x_1, x_10, x_17, x_21, x_3, x_4, x_5, x_6, x_22); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +return x_23; } else { -lean_object* x_21; +uint8_t x_24; +lean_dec(x_17); +lean_dec(x_10); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); lean_dec(x_1); -x_21 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_21, 0, x_10); -lean_ctor_set(x_21, 1, x_14); -lean_ctor_set(x_12, 0, x_21); -return x_12; -} -} -else -{ -size_t x_22; size_t x_23; uint8_t x_24; -x_22 = lean_ptr_addr(x_7); -lean_dec(x_7); -x_23 = lean_ptr_addr(x_10); -x_24 = lean_usize_dec_eq(x_22, x_23); +x_24 = !lean_is_exclusive(x_20); if (x_24 == 0) { -uint8_t x_25; -x_25 = !lean_is_exclusive(x_1); -if (x_25 == 0) -{ -lean_object* x_26; lean_object* x_27; -x_26 = lean_ctor_get(x_1, 1); -lean_dec(x_26); -x_27 = lean_ctor_get(x_1, 0); -lean_dec(x_27); -lean_ctor_set(x_1, 1, x_14); -lean_ctor_set(x_1, 0, x_10); -lean_ctor_set(x_12, 0, x_1); -return x_12; +return x_20; } else { -lean_object* x_28; -lean_dec(x_1); -x_28 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_28, 0, x_10); -lean_ctor_set(x_28, 1, x_14); -lean_ctor_set(x_12, 0, x_28); -return x_12; +lean_object* x_25; lean_object* x_26; lean_object* x_27; +x_25 = lean_ctor_get(x_20, 0); +x_26 = lean_ctor_get(x_20, 1); +lean_inc(x_26); +lean_inc(x_25); +lean_dec(x_20); +x_27 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_27, 0, x_25); +lean_ctor_set(x_27, 1, x_26); +return x_27; +} } } else { -lean_dec(x_14); +uint8_t x_28; lean_dec(x_10); -lean_ctor_set(x_12, 0, x_1); -return x_12; -} -} -} -else -{ -lean_object* x_29; lean_object* x_30; size_t x_31; size_t x_32; uint8_t x_33; -x_29 = lean_ctor_get(x_12, 0); -x_30 = lean_ctor_get(x_12, 1); -lean_inc(x_30); -lean_inc(x_29); -lean_dec(x_12); -x_31 = lean_ptr_addr(x_8); -lean_dec(x_8); -x_32 = lean_ptr_addr(x_29); -x_33 = lean_usize_dec_eq(x_31, x_32); -if (x_33 == 0) -{ -lean_object* x_34; lean_object* x_35; lean_object* x_36; -lean_dec(x_7); -if (lean_is_exclusive(x_1)) { - lean_ctor_release(x_1, 0); - lean_ctor_release(x_1, 1); - x_34 = x_1; -} else { - lean_dec_ref(x_1); - x_34 = lean_box(0); -} -if (lean_is_scalar(x_34)) { - x_35 = lean_alloc_ctor(0, 2, 0); -} else { - x_35 = x_34; -} -lean_ctor_set(x_35, 0, x_10); -lean_ctor_set(x_35, 1, x_29); -x_36 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_36, 0, x_35); -lean_ctor_set(x_36, 1, x_30); -return x_36; -} -else -{ -size_t x_37; size_t x_38; uint8_t x_39; -x_37 = lean_ptr_addr(x_7); -lean_dec(x_7); -x_38 = lean_ptr_addr(x_10); -x_39 = lean_usize_dec_eq(x_37, x_38); -if (x_39 == 0) -{ -lean_object* x_40; lean_object* x_41; lean_object* x_42; -if (lean_is_exclusive(x_1)) { - lean_ctor_release(x_1, 0); - lean_ctor_release(x_1, 1); - x_40 = x_1; -} else { - lean_dec_ref(x_1); - x_40 = lean_box(0); -} -if (lean_is_scalar(x_40)) { - x_41 = lean_alloc_ctor(0, 2, 0); -} else { - x_41 = x_40; -} -lean_ctor_set(x_41, 0, x_10); -lean_ctor_set(x_41, 1, x_29); -x_42 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_42, 0, x_41); -lean_ctor_set(x_42, 1, x_30); -return x_42; -} -else -{ -lean_object* x_43; -lean_dec(x_29); -lean_dec(x_10); -x_43 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_43, 0, x_1); -lean_ctor_set(x_43, 1, x_30); -return x_43; -} -} -} -} -else -{ -uint8_t x_44; -lean_dec(x_10); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_1); -x_44 = !lean_is_exclusive(x_12); -if (x_44 == 0) -{ -return x_12; -} -else -{ -lean_object* x_45; lean_object* x_46; lean_object* x_47; -x_45 = lean_ctor_get(x_12, 0); -x_46 = lean_ctor_get(x_12, 1); -lean_inc(x_46); -lean_inc(x_45); -lean_dec(x_12); -x_47 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_47, 0, x_45); -lean_ctor_set(x_47, 1, x_46); -return x_47; -} -} -} -else -{ -uint8_t x_48; -lean_dec(x_8); -lean_dec(x_7); +lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_48 = !lean_is_exclusive(x_9); -if (x_48 == 0) +x_28 = !lean_is_exclusive(x_16); +if (x_28 == 0) +{ +return x_16; +} +else +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_29 = lean_ctor_get(x_16, 0); +x_30 = lean_ctor_get(x_16, 1); +lean_inc(x_30); +lean_inc(x_29); +lean_dec(x_16); +x_31 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_31, 0, x_29); +lean_ctor_set(x_31, 1, x_30); +return x_31; +} +} +} +else +{ +uint8_t x_32; +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_32 = !lean_is_exclusive(x_9); +if (x_32 == 0) { return x_9; } else { +lean_object* x_33; lean_object* x_34; lean_object* x_35; +x_33 = lean_ctor_get(x_9, 0); +x_34 = lean_ctor_get(x_9, 1); +lean_inc(x_34); +lean_inc(x_33); +lean_dec(x_9); +x_35 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_35, 0, x_33); +lean_ctor_set(x_35, 1, x_34); +return x_35; +} +} +} +} +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_Code_toMono___spec__1(size_t x_1, size_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +_start: +{ +uint8_t x_10; +x_10 = lean_usize_dec_lt(x_2, x_1); +if (x_10 == 0) +{ +lean_object* x_11; +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +x_11 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_11, 0, x_3); +lean_ctor_set(x_11, 1, x_9); +return x_11; +} +else +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; +x_12 = lean_array_uget(x_3, x_2); +x_13 = lean_unsigned_to_nat(0u); +x_14 = lean_array_uset(x_3, x_2, x_13); +if (lean_obj_tag(x_12) == 0) +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; size_t x_18; size_t x_19; lean_object* x_20; +x_15 = lean_ctor_get(x_12, 1); +lean_inc(x_15); +x_16 = lean_ctor_get(x_12, 2); +lean_inc(x_16); +x_17 = lean_array_get_size(x_15); +x_18 = lean_usize_of_nat(x_17); +lean_dec(x_17); +x_19 = 0; +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +x_20 = l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_FunDeclCore_toMono___spec__1(x_18, x_19, x_15, x_4, x_5, x_6, x_7, x_8, x_9); +if (lean_obj_tag(x_20) == 0) +{ +lean_object* x_21; lean_object* x_22; lean_object* x_23; +x_21 = lean_ctor_get(x_20, 0); +lean_inc(x_21); +x_22 = lean_ctor_get(x_20, 1); +lean_inc(x_22); +lean_dec(x_20); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +x_23 = l_Lean_Compiler_LCNF_Code_toMono(x_16, x_4, x_5, x_6, x_7, x_8, x_22); +if (lean_obj_tag(x_23) == 0) +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; size_t x_27; size_t x_28; lean_object* x_29; +x_24 = lean_ctor_get(x_23, 0); +lean_inc(x_24); +x_25 = lean_ctor_get(x_23, 1); +lean_inc(x_25); +lean_dec(x_23); +x_26 = l___private_Lean_Compiler_LCNF_Basic_0__Lean_Compiler_LCNF_updateAltImp(x_12, x_21, x_24); +x_27 = 1; +x_28 = lean_usize_add(x_2, x_27); +x_29 = lean_array_uset(x_14, x_2, x_26); +x_2 = x_28; +x_3 = x_29; +x_9 = x_25; +goto _start; +} +else +{ +uint8_t x_31; +lean_dec(x_21); +lean_dec(x_14); +lean_dec(x_12); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +x_31 = !lean_is_exclusive(x_23); +if (x_31 == 0) +{ +return x_23; +} +else +{ +lean_object* x_32; lean_object* x_33; lean_object* x_34; +x_32 = lean_ctor_get(x_23, 0); +x_33 = lean_ctor_get(x_23, 1); +lean_inc(x_33); +lean_inc(x_32); +lean_dec(x_23); +x_34 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_34, 0, x_32); +lean_ctor_set(x_34, 1, x_33); +return x_34; +} +} +} +else +{ +uint8_t x_35; +lean_dec(x_16); +lean_dec(x_14); +lean_dec(x_12); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +x_35 = !lean_is_exclusive(x_20); +if (x_35 == 0) +{ +return x_20; +} +else +{ +lean_object* x_36; lean_object* x_37; lean_object* x_38; +x_36 = lean_ctor_get(x_20, 0); +x_37 = lean_ctor_get(x_20, 1); +lean_inc(x_37); +lean_inc(x_36); +lean_dec(x_20); +x_38 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_38, 0, x_36); +lean_ctor_set(x_38, 1, x_37); +return x_38; +} +} +} +else +{ +lean_object* x_39; lean_object* x_40; +x_39 = lean_ctor_get(x_12, 0); +lean_inc(x_39); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +x_40 = l_Lean_Compiler_LCNF_Code_toMono(x_39, x_4, x_5, x_6, x_7, x_8, x_9); +if (lean_obj_tag(x_40) == 0) +{ +lean_object* x_41; lean_object* x_42; lean_object* x_43; size_t x_44; size_t x_45; lean_object* x_46; +x_41 = lean_ctor_get(x_40, 0); +lean_inc(x_41); +x_42 = lean_ctor_get(x_40, 1); +lean_inc(x_42); +lean_dec(x_40); +x_43 = l___private_Lean_Compiler_LCNF_Basic_0__Lean_Compiler_LCNF_updateAltCodeImp(x_12, x_41); +x_44 = 1; +x_45 = lean_usize_add(x_2, x_44); +x_46 = lean_array_uset(x_14, x_2, x_43); +x_2 = x_45; +x_3 = x_46; +x_9 = x_42; +goto _start; +} +else +{ +uint8_t x_48; +lean_dec(x_14); +lean_dec(x_12); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +x_48 = !lean_is_exclusive(x_40); +if (x_48 == 0) +{ +return x_40; +} +else +{ lean_object* x_49; lean_object* x_50; lean_object* x_51; -x_49 = lean_ctor_get(x_9, 0); -x_50 = lean_ctor_get(x_9, 1); +x_49 = lean_ctor_get(x_40, 0); +x_50 = lean_ctor_get(x_40, 1); lean_inc(x_50); lean_inc(x_49); -lean_dec(x_9); +lean_dec(x_40); x_51 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_51, 0, x_49); lean_ctor_set(x_51, 1, x_50); @@ -1417,709 +2671,949 @@ return x_51; } } } -case 1: +} +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_Code_toMono___closed__1() { +_start: { -lean_object* x_52; lean_object* x_53; lean_object* x_54; -x_52 = lean_ctor_get(x_1, 0); -lean_inc(x_52); -x_53 = lean_ctor_get(x_1, 1); -lean_inc(x_53); +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Expr_toMono___closed__4; +x_3 = l_Lean_Name_str___override(x_1, x_2); +return x_3; +} +} +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Code_toMono(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +switch (lean_obj_tag(x_1)) { +case 0: +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_8 = lean_ctor_get(x_1, 0); +lean_inc(x_8); +x_9 = lean_ctor_get(x_1, 1); +lean_inc(x_9); +lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); lean_inc(x_3); lean_inc(x_2); -lean_inc(x_52); -x_54 = l_Lean_Compiler_LCNF_FunDeclCore_toMono(x_52, x_2, x_3, x_4, x_5, x_6); -if (lean_obj_tag(x_54) == 0) +lean_inc(x_8); +x_10 = l_Lean_Compiler_LCNF_LetDecl_toMono(x_8, x_2, x_3, x_4, x_5, x_6, x_7); +if (lean_obj_tag(x_10) == 0) { -lean_object* x_55; lean_object* x_56; lean_object* x_57; -x_55 = lean_ctor_get(x_54, 0); -lean_inc(x_55); -x_56 = lean_ctor_get(x_54, 1); -lean_inc(x_56); -lean_dec(x_54); -lean_inc(x_53); -x_57 = l_Lean_Compiler_LCNF_Code_toMono(x_53, x_2, x_3, x_4, x_5, x_56); -if (lean_obj_tag(x_57) == 0) +lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_11 = lean_ctor_get(x_10, 0); +lean_inc(x_11); +x_12 = lean_ctor_get(x_10, 1); +lean_inc(x_12); +lean_dec(x_10); +lean_inc(x_9); +x_13 = l_Lean_Compiler_LCNF_Code_toMono(x_9, x_2, x_3, x_4, x_5, x_6, x_12); +if (lean_obj_tag(x_13) == 0) { -uint8_t x_58; -x_58 = !lean_is_exclusive(x_57); -if (x_58 == 0) +uint8_t x_14; +x_14 = !lean_is_exclusive(x_13); +if (x_14 == 0) { -lean_object* x_59; size_t x_60; size_t x_61; uint8_t x_62; -x_59 = lean_ctor_get(x_57, 0); -x_60 = lean_ptr_addr(x_53); -lean_dec(x_53); -x_61 = lean_ptr_addr(x_59); -x_62 = lean_usize_dec_eq(x_60, x_61); -if (x_62 == 0) +lean_object* x_15; size_t x_16; size_t x_17; uint8_t x_18; +x_15 = lean_ctor_get(x_13, 0); +x_16 = lean_ptr_addr(x_9); +lean_dec(x_9); +x_17 = lean_ptr_addr(x_15); +x_18 = lean_usize_dec_eq(x_16, x_17); +if (x_18 == 0) { -uint8_t x_63; -lean_dec(x_52); -x_63 = !lean_is_exclusive(x_1); -if (x_63 == 0) +uint8_t x_19; +lean_dec(x_8); +x_19 = !lean_is_exclusive(x_1); +if (x_19 == 0) { -lean_object* x_64; lean_object* x_65; -x_64 = lean_ctor_get(x_1, 1); -lean_dec(x_64); -x_65 = lean_ctor_get(x_1, 0); -lean_dec(x_65); -lean_ctor_set(x_1, 1, x_59); -lean_ctor_set(x_1, 0, x_55); -lean_ctor_set(x_57, 0, x_1); -return x_57; +lean_object* x_20; lean_object* x_21; +x_20 = lean_ctor_get(x_1, 1); +lean_dec(x_20); +x_21 = lean_ctor_get(x_1, 0); +lean_dec(x_21); +lean_ctor_set(x_1, 1, x_15); +lean_ctor_set(x_1, 0, x_11); +lean_ctor_set(x_13, 0, x_1); +return x_13; } else { -lean_object* x_66; +lean_object* x_22; lean_dec(x_1); -x_66 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_66, 0, x_55); -lean_ctor_set(x_66, 1, x_59); -lean_ctor_set(x_57, 0, x_66); -return x_57; +x_22 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_22, 0, x_11); +lean_ctor_set(x_22, 1, x_15); +lean_ctor_set(x_13, 0, x_22); +return x_13; } } else { -size_t x_67; size_t x_68; uint8_t x_69; -x_67 = lean_ptr_addr(x_52); -lean_dec(x_52); -x_68 = lean_ptr_addr(x_55); -x_69 = lean_usize_dec_eq(x_67, x_68); -if (x_69 == 0) +size_t x_23; size_t x_24; uint8_t x_25; +x_23 = lean_ptr_addr(x_8); +lean_dec(x_8); +x_24 = lean_ptr_addr(x_11); +x_25 = lean_usize_dec_eq(x_23, x_24); +if (x_25 == 0) { -uint8_t x_70; -x_70 = !lean_is_exclusive(x_1); -if (x_70 == 0) +uint8_t x_26; +x_26 = !lean_is_exclusive(x_1); +if (x_26 == 0) { -lean_object* x_71; lean_object* x_72; -x_71 = lean_ctor_get(x_1, 1); -lean_dec(x_71); -x_72 = lean_ctor_get(x_1, 0); -lean_dec(x_72); -lean_ctor_set(x_1, 1, x_59); -lean_ctor_set(x_1, 0, x_55); -lean_ctor_set(x_57, 0, x_1); -return x_57; +lean_object* x_27; lean_object* x_28; +x_27 = lean_ctor_get(x_1, 1); +lean_dec(x_27); +x_28 = lean_ctor_get(x_1, 0); +lean_dec(x_28); +lean_ctor_set(x_1, 1, x_15); +lean_ctor_set(x_1, 0, x_11); +lean_ctor_set(x_13, 0, x_1); +return x_13; } else { -lean_object* x_73; +lean_object* x_29; lean_dec(x_1); -x_73 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_73, 0, x_55); -lean_ctor_set(x_73, 1, x_59); -lean_ctor_set(x_57, 0, x_73); -return x_57; +x_29 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_29, 0, x_11); +lean_ctor_set(x_29, 1, x_15); +lean_ctor_set(x_13, 0, x_29); +return x_13; } } else { -lean_dec(x_59); -lean_dec(x_55); -lean_ctor_set(x_57, 0, x_1); -return x_57; +lean_dec(x_15); +lean_dec(x_11); +lean_ctor_set(x_13, 0, x_1); +return x_13; } } } else { -lean_object* x_74; lean_object* x_75; size_t x_76; size_t x_77; uint8_t x_78; -x_74 = lean_ctor_get(x_57, 0); -x_75 = lean_ctor_get(x_57, 1); -lean_inc(x_75); -lean_inc(x_74); -lean_dec(x_57); -x_76 = lean_ptr_addr(x_53); -lean_dec(x_53); -x_77 = lean_ptr_addr(x_74); -x_78 = lean_usize_dec_eq(x_76, x_77); -if (x_78 == 0) +lean_object* x_30; lean_object* x_31; size_t x_32; size_t x_33; uint8_t x_34; +x_30 = lean_ctor_get(x_13, 0); +x_31 = lean_ctor_get(x_13, 1); +lean_inc(x_31); +lean_inc(x_30); +lean_dec(x_13); +x_32 = lean_ptr_addr(x_9); +lean_dec(x_9); +x_33 = lean_ptr_addr(x_30); +x_34 = lean_usize_dec_eq(x_32, x_33); +if (x_34 == 0) { -lean_object* x_79; lean_object* x_80; lean_object* x_81; -lean_dec(x_52); +lean_object* x_35; lean_object* x_36; lean_object* x_37; +lean_dec(x_8); if (lean_is_exclusive(x_1)) { lean_ctor_release(x_1, 0); lean_ctor_release(x_1, 1); - x_79 = x_1; + x_35 = x_1; } else { lean_dec_ref(x_1); - x_79 = lean_box(0); + x_35 = lean_box(0); } -if (lean_is_scalar(x_79)) { - x_80 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_35)) { + x_36 = lean_alloc_ctor(0, 2, 0); } else { - x_80 = x_79; + x_36 = x_35; } -lean_ctor_set(x_80, 0, x_55); -lean_ctor_set(x_80, 1, x_74); -x_81 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_81, 0, x_80); -lean_ctor_set(x_81, 1, x_75); -return x_81; +lean_ctor_set(x_36, 0, x_11); +lean_ctor_set(x_36, 1, x_30); +x_37 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_37, 0, x_36); +lean_ctor_set(x_37, 1, x_31); +return x_37; } else { -size_t x_82; size_t x_83; uint8_t x_84; -x_82 = lean_ptr_addr(x_52); -lean_dec(x_52); -x_83 = lean_ptr_addr(x_55); -x_84 = lean_usize_dec_eq(x_82, x_83); -if (x_84 == 0) +size_t x_38; size_t x_39; uint8_t x_40; +x_38 = lean_ptr_addr(x_8); +lean_dec(x_8); +x_39 = lean_ptr_addr(x_11); +x_40 = lean_usize_dec_eq(x_38, x_39); +if (x_40 == 0) { -lean_object* x_85; lean_object* x_86; lean_object* x_87; +lean_object* x_41; lean_object* x_42; lean_object* x_43; if (lean_is_exclusive(x_1)) { lean_ctor_release(x_1, 0); lean_ctor_release(x_1, 1); - x_85 = x_1; + x_41 = x_1; } else { lean_dec_ref(x_1); - x_85 = lean_box(0); + x_41 = lean_box(0); } -if (lean_is_scalar(x_85)) { - x_86 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_41)) { + x_42 = lean_alloc_ctor(0, 2, 0); } else { - x_86 = x_85; + x_42 = x_41; } -lean_ctor_set(x_86, 0, x_55); -lean_ctor_set(x_86, 1, x_74); -x_87 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_87, 0, x_86); -lean_ctor_set(x_87, 1, x_75); -return x_87; +lean_ctor_set(x_42, 0, x_11); +lean_ctor_set(x_42, 1, x_30); +x_43 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_43, 0, x_42); +lean_ctor_set(x_43, 1, x_31); +return x_43; } else { -lean_object* x_88; -lean_dec(x_74); -lean_dec(x_55); -x_88 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_88, 0, x_1); -lean_ctor_set(x_88, 1, x_75); -return x_88; +lean_object* x_44; +lean_dec(x_30); +lean_dec(x_11); +x_44 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_44, 0, x_1); +lean_ctor_set(x_44, 1, x_31); +return x_44; } } } } else { -uint8_t x_89; -lean_dec(x_55); -lean_dec(x_53); -lean_dec(x_52); +uint8_t x_45; +lean_dec(x_11); +lean_dec(x_9); +lean_dec(x_8); lean_dec(x_1); -x_89 = !lean_is_exclusive(x_57); -if (x_89 == 0) +x_45 = !lean_is_exclusive(x_13); +if (x_45 == 0) { -return x_57; +return x_13; } else { -lean_object* x_90; lean_object* x_91; lean_object* x_92; -x_90 = lean_ctor_get(x_57, 0); -x_91 = lean_ctor_get(x_57, 1); -lean_inc(x_91); -lean_inc(x_90); -lean_dec(x_57); -x_92 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_92, 0, x_90); -lean_ctor_set(x_92, 1, x_91); -return x_92; +lean_object* x_46; lean_object* x_47; lean_object* x_48; +x_46 = lean_ctor_get(x_13, 0); +x_47 = lean_ctor_get(x_13, 1); +lean_inc(x_47); +lean_inc(x_46); +lean_dec(x_13); +x_48 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_48, 0, x_46); +lean_ctor_set(x_48, 1, x_47); +return x_48; } } } else { -uint8_t x_93; -lean_dec(x_53); -lean_dec(x_52); +uint8_t x_49; +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_93 = !lean_is_exclusive(x_54); -if (x_93 == 0) +x_49 = !lean_is_exclusive(x_10); +if (x_49 == 0) { -return x_54; +return x_10; } else { -lean_object* x_94; lean_object* x_95; lean_object* x_96; -x_94 = lean_ctor_get(x_54, 0); -x_95 = lean_ctor_get(x_54, 1); -lean_inc(x_95); -lean_inc(x_94); +lean_object* x_50; lean_object* x_51; lean_object* x_52; +x_50 = lean_ctor_get(x_10, 0); +x_51 = lean_ctor_get(x_10, 1); +lean_inc(x_51); +lean_inc(x_50); +lean_dec(x_10); +x_52 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_52, 0, x_50); +lean_ctor_set(x_52, 1, x_51); +return x_52; +} +} +} +case 1: +{ +lean_object* x_53; lean_object* x_54; lean_object* x_55; +x_53 = lean_ctor_get(x_1, 0); +lean_inc(x_53); +x_54 = lean_ctor_get(x_1, 1); +lean_inc(x_54); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_2); +lean_inc(x_53); +x_55 = l_Lean_Compiler_LCNF_FunDeclCore_toMono(x_53, x_2, x_3, x_4, x_5, x_6, x_7); +if (lean_obj_tag(x_55) == 0) +{ +lean_object* x_56; lean_object* x_57; lean_object* x_58; +x_56 = lean_ctor_get(x_55, 0); +lean_inc(x_56); +x_57 = lean_ctor_get(x_55, 1); +lean_inc(x_57); +lean_dec(x_55); +lean_inc(x_54); +x_58 = l_Lean_Compiler_LCNF_Code_toMono(x_54, x_2, x_3, x_4, x_5, x_6, x_57); +if (lean_obj_tag(x_58) == 0) +{ +uint8_t x_59; +x_59 = !lean_is_exclusive(x_58); +if (x_59 == 0) +{ +lean_object* x_60; size_t x_61; size_t x_62; uint8_t x_63; +x_60 = lean_ctor_get(x_58, 0); +x_61 = lean_ptr_addr(x_54); lean_dec(x_54); -x_96 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_96, 0, x_94); -lean_ctor_set(x_96, 1, x_95); -return x_96; +x_62 = lean_ptr_addr(x_60); +x_63 = lean_usize_dec_eq(x_61, x_62); +if (x_63 == 0) +{ +uint8_t x_64; +lean_dec(x_53); +x_64 = !lean_is_exclusive(x_1); +if (x_64 == 0) +{ +lean_object* x_65; lean_object* x_66; +x_65 = lean_ctor_get(x_1, 1); +lean_dec(x_65); +x_66 = lean_ctor_get(x_1, 0); +lean_dec(x_66); +lean_ctor_set(x_1, 1, x_60); +lean_ctor_set(x_1, 0, x_56); +lean_ctor_set(x_58, 0, x_1); +return x_58; +} +else +{ +lean_object* x_67; +lean_dec(x_1); +x_67 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_67, 0, x_56); +lean_ctor_set(x_67, 1, x_60); +lean_ctor_set(x_58, 0, x_67); +return x_58; +} +} +else +{ +size_t x_68; size_t x_69; uint8_t x_70; +x_68 = lean_ptr_addr(x_53); +lean_dec(x_53); +x_69 = lean_ptr_addr(x_56); +x_70 = lean_usize_dec_eq(x_68, x_69); +if (x_70 == 0) +{ +uint8_t x_71; +x_71 = !lean_is_exclusive(x_1); +if (x_71 == 0) +{ +lean_object* x_72; lean_object* x_73; +x_72 = lean_ctor_get(x_1, 1); +lean_dec(x_72); +x_73 = lean_ctor_get(x_1, 0); +lean_dec(x_73); +lean_ctor_set(x_1, 1, x_60); +lean_ctor_set(x_1, 0, x_56); +lean_ctor_set(x_58, 0, x_1); +return x_58; +} +else +{ +lean_object* x_74; +lean_dec(x_1); +x_74 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_74, 0, x_56); +lean_ctor_set(x_74, 1, x_60); +lean_ctor_set(x_58, 0, x_74); +return x_58; +} +} +else +{ +lean_dec(x_60); +lean_dec(x_56); +lean_ctor_set(x_58, 0, x_1); +return x_58; +} +} +} +else +{ +lean_object* x_75; lean_object* x_76; size_t x_77; size_t x_78; uint8_t x_79; +x_75 = lean_ctor_get(x_58, 0); +x_76 = lean_ctor_get(x_58, 1); +lean_inc(x_76); +lean_inc(x_75); +lean_dec(x_58); +x_77 = lean_ptr_addr(x_54); +lean_dec(x_54); +x_78 = lean_ptr_addr(x_75); +x_79 = lean_usize_dec_eq(x_77, x_78); +if (x_79 == 0) +{ +lean_object* x_80; lean_object* x_81; lean_object* x_82; +lean_dec(x_53); +if (lean_is_exclusive(x_1)) { + lean_ctor_release(x_1, 0); + lean_ctor_release(x_1, 1); + x_80 = x_1; +} else { + lean_dec_ref(x_1); + x_80 = lean_box(0); +} +if (lean_is_scalar(x_80)) { + x_81 = lean_alloc_ctor(1, 2, 0); +} else { + x_81 = x_80; +} +lean_ctor_set(x_81, 0, x_56); +lean_ctor_set(x_81, 1, x_75); +x_82 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_82, 0, x_81); +lean_ctor_set(x_82, 1, x_76); +return x_82; +} +else +{ +size_t x_83; size_t x_84; uint8_t x_85; +x_83 = lean_ptr_addr(x_53); +lean_dec(x_53); +x_84 = lean_ptr_addr(x_56); +x_85 = lean_usize_dec_eq(x_83, x_84); +if (x_85 == 0) +{ +lean_object* x_86; lean_object* x_87; lean_object* x_88; +if (lean_is_exclusive(x_1)) { + lean_ctor_release(x_1, 0); + lean_ctor_release(x_1, 1); + x_86 = x_1; +} else { + lean_dec_ref(x_1); + x_86 = lean_box(0); +} +if (lean_is_scalar(x_86)) { + x_87 = lean_alloc_ctor(1, 2, 0); +} else { + x_87 = x_86; +} +lean_ctor_set(x_87, 0, x_56); +lean_ctor_set(x_87, 1, x_75); +x_88 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_88, 0, x_87); +lean_ctor_set(x_88, 1, x_76); +return x_88; +} +else +{ +lean_object* x_89; +lean_dec(x_75); +lean_dec(x_56); +x_89 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_89, 0, x_1); +lean_ctor_set(x_89, 1, x_76); +return x_89; +} +} +} +} +else +{ +uint8_t x_90; +lean_dec(x_56); +lean_dec(x_54); +lean_dec(x_53); +lean_dec(x_1); +x_90 = !lean_is_exclusive(x_58); +if (x_90 == 0) +{ +return x_58; +} +else +{ +lean_object* x_91; lean_object* x_92; lean_object* x_93; +x_91 = lean_ctor_get(x_58, 0); +x_92 = lean_ctor_get(x_58, 1); +lean_inc(x_92); +lean_inc(x_91); +lean_dec(x_58); +x_93 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_93, 0, x_91); +lean_ctor_set(x_93, 1, x_92); +return x_93; +} +} +} +else +{ +uint8_t x_94; +lean_dec(x_54); +lean_dec(x_53); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_94 = !lean_is_exclusive(x_55); +if (x_94 == 0) +{ +return x_55; +} +else +{ +lean_object* x_95; lean_object* x_96; lean_object* x_97; +x_95 = lean_ctor_get(x_55, 0); +x_96 = lean_ctor_get(x_55, 1); +lean_inc(x_96); +lean_inc(x_95); +lean_dec(x_55); +x_97 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_97, 0, x_95); +lean_ctor_set(x_97, 1, x_96); +return x_97; } } } case 2: { -lean_object* x_97; lean_object* x_98; lean_object* x_99; -x_97 = lean_ctor_get(x_1, 0); -lean_inc(x_97); -x_98 = lean_ctor_get(x_1, 1); +lean_object* x_98; lean_object* x_99; lean_object* x_100; +x_98 = lean_ctor_get(x_1, 0); lean_inc(x_98); +x_99 = lean_ctor_get(x_1, 1); +lean_inc(x_99); +lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); lean_inc(x_3); lean_inc(x_2); -lean_inc(x_97); -x_99 = l_Lean_Compiler_LCNF_FunDeclCore_toMono(x_97, x_2, x_3, x_4, x_5, x_6); -if (lean_obj_tag(x_99) == 0) -{ -lean_object* x_100; lean_object* x_101; lean_object* x_102; -x_100 = lean_ctor_get(x_99, 0); -lean_inc(x_100); -x_101 = lean_ctor_get(x_99, 1); -lean_inc(x_101); -lean_dec(x_99); lean_inc(x_98); -x_102 = l_Lean_Compiler_LCNF_Code_toMono(x_98, x_2, x_3, x_4, x_5, x_101); -if (lean_obj_tag(x_102) == 0) +x_100 = l_Lean_Compiler_LCNF_FunDeclCore_toMono(x_98, x_2, x_3, x_4, x_5, x_6, x_7); +if (lean_obj_tag(x_100) == 0) { -uint8_t x_103; -x_103 = !lean_is_exclusive(x_102); -if (x_103 == 0) +lean_object* x_101; lean_object* x_102; lean_object* x_103; +x_101 = lean_ctor_get(x_100, 0); +lean_inc(x_101); +x_102 = lean_ctor_get(x_100, 1); +lean_inc(x_102); +lean_dec(x_100); +lean_inc(x_99); +x_103 = l_Lean_Compiler_LCNF_Code_toMono(x_99, x_2, x_3, x_4, x_5, x_6, x_102); +if (lean_obj_tag(x_103) == 0) { -lean_object* x_104; size_t x_105; size_t x_106; uint8_t x_107; -x_104 = lean_ctor_get(x_102, 0); -x_105 = lean_ptr_addr(x_98); -lean_dec(x_98); -x_106 = lean_ptr_addr(x_104); -x_107 = lean_usize_dec_eq(x_105, x_106); -if (x_107 == 0) +uint8_t x_104; +x_104 = !lean_is_exclusive(x_103); +if (x_104 == 0) { -uint8_t x_108; -lean_dec(x_97); -x_108 = !lean_is_exclusive(x_1); +lean_object* x_105; size_t x_106; size_t x_107; uint8_t x_108; +x_105 = lean_ctor_get(x_103, 0); +x_106 = lean_ptr_addr(x_99); +lean_dec(x_99); +x_107 = lean_ptr_addr(x_105); +x_108 = lean_usize_dec_eq(x_106, x_107); if (x_108 == 0) { -lean_object* x_109; lean_object* x_110; -x_109 = lean_ctor_get(x_1, 1); -lean_dec(x_109); -x_110 = lean_ctor_get(x_1, 0); +uint8_t x_109; +lean_dec(x_98); +x_109 = !lean_is_exclusive(x_1); +if (x_109 == 0) +{ +lean_object* x_110; lean_object* x_111; +x_110 = lean_ctor_get(x_1, 1); lean_dec(x_110); -lean_ctor_set(x_1, 1, x_104); -lean_ctor_set(x_1, 0, x_100); -lean_ctor_set(x_102, 0, x_1); -return x_102; +x_111 = lean_ctor_get(x_1, 0); +lean_dec(x_111); +lean_ctor_set(x_1, 1, x_105); +lean_ctor_set(x_1, 0, x_101); +lean_ctor_set(x_103, 0, x_1); +return x_103; } else { -lean_object* x_111; +lean_object* x_112; lean_dec(x_1); -x_111 = lean_alloc_ctor(2, 2, 0); -lean_ctor_set(x_111, 0, x_100); -lean_ctor_set(x_111, 1, x_104); -lean_ctor_set(x_102, 0, x_111); -return x_102; +x_112 = lean_alloc_ctor(2, 2, 0); +lean_ctor_set(x_112, 0, x_101); +lean_ctor_set(x_112, 1, x_105); +lean_ctor_set(x_103, 0, x_112); +return x_103; } } else { -size_t x_112; size_t x_113; uint8_t x_114; -x_112 = lean_ptr_addr(x_97); -lean_dec(x_97); -x_113 = lean_ptr_addr(x_100); -x_114 = lean_usize_dec_eq(x_112, x_113); -if (x_114 == 0) -{ -uint8_t x_115; -x_115 = !lean_is_exclusive(x_1); +size_t x_113; size_t x_114; uint8_t x_115; +x_113 = lean_ptr_addr(x_98); +lean_dec(x_98); +x_114 = lean_ptr_addr(x_101); +x_115 = lean_usize_dec_eq(x_113, x_114); if (x_115 == 0) { -lean_object* x_116; lean_object* x_117; -x_116 = lean_ctor_get(x_1, 1); -lean_dec(x_116); -x_117 = lean_ctor_get(x_1, 0); +uint8_t x_116; +x_116 = !lean_is_exclusive(x_1); +if (x_116 == 0) +{ +lean_object* x_117; lean_object* x_118; +x_117 = lean_ctor_get(x_1, 1); lean_dec(x_117); -lean_ctor_set(x_1, 1, x_104); -lean_ctor_set(x_1, 0, x_100); -lean_ctor_set(x_102, 0, x_1); -return x_102; +x_118 = lean_ctor_get(x_1, 0); +lean_dec(x_118); +lean_ctor_set(x_1, 1, x_105); +lean_ctor_set(x_1, 0, x_101); +lean_ctor_set(x_103, 0, x_1); +return x_103; } else { -lean_object* x_118; +lean_object* x_119; lean_dec(x_1); -x_118 = lean_alloc_ctor(2, 2, 0); -lean_ctor_set(x_118, 0, x_100); -lean_ctor_set(x_118, 1, x_104); -lean_ctor_set(x_102, 0, x_118); -return x_102; +x_119 = lean_alloc_ctor(2, 2, 0); +lean_ctor_set(x_119, 0, x_101); +lean_ctor_set(x_119, 1, x_105); +lean_ctor_set(x_103, 0, x_119); +return x_103; } } else { -lean_dec(x_104); -lean_dec(x_100); -lean_ctor_set(x_102, 0, x_1); -return x_102; +lean_dec(x_105); +lean_dec(x_101); +lean_ctor_set(x_103, 0, x_1); +return x_103; } } } else { -lean_object* x_119; lean_object* x_120; size_t x_121; size_t x_122; uint8_t x_123; -x_119 = lean_ctor_get(x_102, 0); -x_120 = lean_ctor_get(x_102, 1); +lean_object* x_120; lean_object* x_121; size_t x_122; size_t x_123; uint8_t x_124; +x_120 = lean_ctor_get(x_103, 0); +x_121 = lean_ctor_get(x_103, 1); +lean_inc(x_121); lean_inc(x_120); -lean_inc(x_119); -lean_dec(x_102); -x_121 = lean_ptr_addr(x_98); +lean_dec(x_103); +x_122 = lean_ptr_addr(x_99); +lean_dec(x_99); +x_123 = lean_ptr_addr(x_120); +x_124 = lean_usize_dec_eq(x_122, x_123); +if (x_124 == 0) +{ +lean_object* x_125; lean_object* x_126; lean_object* x_127; lean_dec(x_98); -x_122 = lean_ptr_addr(x_119); -x_123 = lean_usize_dec_eq(x_121, x_122); -if (x_123 == 0) -{ -lean_object* x_124; lean_object* x_125; lean_object* x_126; -lean_dec(x_97); if (lean_is_exclusive(x_1)) { lean_ctor_release(x_1, 0); lean_ctor_release(x_1, 1); - x_124 = x_1; + x_125 = x_1; } else { lean_dec_ref(x_1); - x_124 = lean_box(0); + x_125 = lean_box(0); } -if (lean_is_scalar(x_124)) { - x_125 = lean_alloc_ctor(2, 2, 0); +if (lean_is_scalar(x_125)) { + x_126 = lean_alloc_ctor(2, 2, 0); } else { - x_125 = x_124; + x_126 = x_125; } -lean_ctor_set(x_125, 0, x_100); -lean_ctor_set(x_125, 1, x_119); -x_126 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_126, 0, x_125); +lean_ctor_set(x_126, 0, x_101); lean_ctor_set(x_126, 1, x_120); -return x_126; +x_127 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_127, 0, x_126); +lean_ctor_set(x_127, 1, x_121); +return x_127; } else { -size_t x_127; size_t x_128; uint8_t x_129; -x_127 = lean_ptr_addr(x_97); -lean_dec(x_97); -x_128 = lean_ptr_addr(x_100); -x_129 = lean_usize_dec_eq(x_127, x_128); -if (x_129 == 0) +size_t x_128; size_t x_129; uint8_t x_130; +x_128 = lean_ptr_addr(x_98); +lean_dec(x_98); +x_129 = lean_ptr_addr(x_101); +x_130 = lean_usize_dec_eq(x_128, x_129); +if (x_130 == 0) { -lean_object* x_130; lean_object* x_131; lean_object* x_132; +lean_object* x_131; lean_object* x_132; lean_object* x_133; if (lean_is_exclusive(x_1)) { lean_ctor_release(x_1, 0); lean_ctor_release(x_1, 1); - x_130 = x_1; + x_131 = x_1; } else { lean_dec_ref(x_1); - x_130 = lean_box(0); + x_131 = lean_box(0); } -if (lean_is_scalar(x_130)) { - x_131 = lean_alloc_ctor(2, 2, 0); +if (lean_is_scalar(x_131)) { + x_132 = lean_alloc_ctor(2, 2, 0); } else { - x_131 = x_130; + x_132 = x_131; } -lean_ctor_set(x_131, 0, x_100); -lean_ctor_set(x_131, 1, x_119); -x_132 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_132, 0, x_131); +lean_ctor_set(x_132, 0, x_101); lean_ctor_set(x_132, 1, x_120); -return x_132; -} -else -{ -lean_object* x_133; -lean_dec(x_119); -lean_dec(x_100); x_133 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_133, 0, x_1); -lean_ctor_set(x_133, 1, x_120); +lean_ctor_set(x_133, 0, x_132); +lean_ctor_set(x_133, 1, x_121); return x_133; } +else +{ +lean_object* x_134; +lean_dec(x_120); +lean_dec(x_101); +x_134 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_134, 0, x_1); +lean_ctor_set(x_134, 1, x_121); +return x_134; +} } } } else { -uint8_t x_134; -lean_dec(x_100); +uint8_t x_135; +lean_dec(x_101); +lean_dec(x_99); lean_dec(x_98); -lean_dec(x_97); lean_dec(x_1); -x_134 = !lean_is_exclusive(x_102); -if (x_134 == 0) +x_135 = !lean_is_exclusive(x_103); +if (x_135 == 0) { -return x_102; +return x_103; } else { -lean_object* x_135; lean_object* x_136; lean_object* x_137; -x_135 = lean_ctor_get(x_102, 0); -x_136 = lean_ctor_get(x_102, 1); +lean_object* x_136; lean_object* x_137; lean_object* x_138; +x_136 = lean_ctor_get(x_103, 0); +x_137 = lean_ctor_get(x_103, 1); +lean_inc(x_137); lean_inc(x_136); -lean_inc(x_135); -lean_dec(x_102); -x_137 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_137, 0, x_135); -lean_ctor_set(x_137, 1, x_136); -return x_137; +lean_dec(x_103); +x_138 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_138, 0, x_136); +lean_ctor_set(x_138, 1, x_137); +return x_138; } } } else { -uint8_t x_138; +uint8_t x_139; +lean_dec(x_99); lean_dec(x_98); -lean_dec(x_97); +lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_138 = !lean_is_exclusive(x_99); -if (x_138 == 0) +x_139 = !lean_is_exclusive(x_100); +if (x_139 == 0) { -return x_99; +return x_100; } else { -lean_object* x_139; lean_object* x_140; lean_object* x_141; -x_139 = lean_ctor_get(x_99, 0); -x_140 = lean_ctor_get(x_99, 1); +lean_object* x_140; lean_object* x_141; lean_object* x_142; +x_140 = lean_ctor_get(x_100, 0); +x_141 = lean_ctor_get(x_100, 1); +lean_inc(x_141); lean_inc(x_140); -lean_inc(x_139); -lean_dec(x_99); -x_141 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_141, 0, x_139); -lean_ctor_set(x_141, 1, x_140); -return x_141; +lean_dec(x_100); +x_142 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_142, 0, x_140); +lean_ctor_set(x_142, 1, x_141); +return x_142; } } } case 4: { -lean_object* x_142; uint8_t x_143; -x_142 = lean_ctor_get(x_1, 0); -lean_inc(x_142); -x_143 = !lean_is_exclusive(x_142); -if (x_143 == 0) -{ -lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; -x_144 = lean_ctor_get(x_142, 0); -x_145 = lean_ctor_get(x_142, 1); -x_146 = lean_ctor_get(x_142, 2); -x_147 = lean_ctor_get(x_142, 3); -lean_inc(x_5); -lean_inc(x_4); +lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; uint8_t x_149; +x_143 = lean_ctor_get(x_1, 0); +lean_inc(x_143); +x_144 = lean_ctor_get(x_143, 0); +lean_inc(x_144); +x_145 = lean_ctor_get(x_143, 1); lean_inc(x_145); -x_148 = l_Lean_Compiler_LCNF_toMonoType(x_145, x_4, x_5, x_6); -if (lean_obj_tag(x_148) == 0) -{ -lean_object* x_149; lean_object* x_150; lean_object* x_151; size_t x_152; size_t x_153; lean_object* x_154; -x_149 = lean_ctor_get(x_148, 0); -lean_inc(x_149); -x_150 = lean_ctor_get(x_148, 1); -lean_inc(x_150); -lean_dec(x_148); -x_151 = lean_array_get_size(x_147); -x_152 = lean_usize_of_nat(x_151); -lean_dec(x_151); -x_153 = 0; +x_146 = lean_ctor_get(x_143, 2); +lean_inc(x_146); +x_147 = lean_ctor_get(x_143, 3); lean_inc(x_147); -x_154 = l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_Code_toMono___spec__1(x_152, x_153, x_147, x_2, x_3, x_4, x_5, x_150); -if (lean_obj_tag(x_154) == 0) +x_148 = l_Lean_Compiler_LCNF_Code_toMono___closed__1; +x_149 = lean_name_eq(x_144, x_148); +if (x_149 == 0) { -uint8_t x_155; -x_155 = !lean_is_exclusive(x_154); -if (x_155 == 0) +lean_object* x_150; +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_144); +x_150 = l_Lean_Compiler_LCNF_hasTrivialStructure_x3f(x_144, x_5, x_6, x_7); +if (lean_obj_tag(x_150) == 0) { -lean_object* x_156; size_t x_157; size_t x_158; uint8_t x_159; -x_156 = lean_ctor_get(x_154, 0); -x_157 = lean_ptr_addr(x_147); -lean_dec(x_147); -x_158 = lean_ptr_addr(x_156); -x_159 = lean_usize_dec_eq(x_157, x_158); -if (x_159 == 0) +lean_object* x_151; +x_151 = lean_ctor_get(x_150, 0); +lean_inc(x_151); +if (lean_obj_tag(x_151) == 0) { -uint8_t x_160; -lean_dec(x_145); -x_160 = !lean_is_exclusive(x_1); -if (x_160 == 0) +uint8_t x_152; +x_152 = !lean_is_exclusive(x_143); +if (x_152 == 0) { -lean_object* x_161; -x_161 = lean_ctor_get(x_1, 0); +lean_object* x_153; lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_158; +x_153 = lean_ctor_get(x_143, 3); +lean_dec(x_153); +x_154 = lean_ctor_get(x_143, 2); +lean_dec(x_154); +x_155 = lean_ctor_get(x_143, 1); +lean_dec(x_155); +x_156 = lean_ctor_get(x_143, 0); +lean_dec(x_156); +x_157 = lean_ctor_get(x_150, 1); +lean_inc(x_157); +lean_dec(x_150); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_145); +x_158 = l_Lean_Compiler_LCNF_toMonoType(x_145, x_5, x_6, x_157); +if (lean_obj_tag(x_158) == 0) +{ +lean_object* x_159; lean_object* x_160; lean_object* x_161; size_t x_162; size_t x_163; lean_object* x_164; +x_159 = lean_ctor_get(x_158, 0); +lean_inc(x_159); +x_160 = lean_ctor_get(x_158, 1); +lean_inc(x_160); +lean_dec(x_158); +x_161 = lean_array_get_size(x_147); +x_162 = lean_usize_of_nat(x_161); lean_dec(x_161); -lean_ctor_set(x_142, 3, x_156); -lean_ctor_set(x_142, 1, x_149); -lean_ctor_set(x_154, 0, x_1); -return x_154; -} -else +x_163 = 0; +lean_inc(x_147); +x_164 = l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_Code_toMono___spec__1(x_162, x_163, x_147, x_2, x_3, x_4, x_5, x_6, x_160); +if (lean_obj_tag(x_164) == 0) { -lean_object* x_162; -lean_dec(x_1); -lean_ctor_set(x_142, 3, x_156); -lean_ctor_set(x_142, 1, x_149); -x_162 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_162, 0, x_142); -lean_ctor_set(x_154, 0, x_162); -return x_154; -} -} -else -{ -size_t x_163; size_t x_164; uint8_t x_165; -x_163 = lean_ptr_addr(x_145); -lean_dec(x_145); -x_164 = lean_ptr_addr(x_149); -x_165 = lean_usize_dec_eq(x_163, x_164); +uint8_t x_165; +x_165 = !lean_is_exclusive(x_164); if (x_165 == 0) { -uint8_t x_166; -x_166 = !lean_is_exclusive(x_1); -if (x_166 == 0) -{ -lean_object* x_167; -x_167 = lean_ctor_get(x_1, 0); -lean_dec(x_167); -lean_ctor_set(x_142, 3, x_156); -lean_ctor_set(x_142, 1, x_149); -lean_ctor_set(x_154, 0, x_1); -return x_154; -} -else -{ -lean_object* x_168; -lean_dec(x_1); -lean_ctor_set(x_142, 3, x_156); -lean_ctor_set(x_142, 1, x_149); -x_168 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_168, 0, x_142); -lean_ctor_set(x_154, 0, x_168); -return x_154; -} -} -else -{ -uint8_t x_169; -x_169 = lean_name_eq(x_146, x_146); +lean_object* x_166; size_t x_167; size_t x_168; uint8_t x_169; +x_166 = lean_ctor_get(x_164, 0); +x_167 = lean_ptr_addr(x_147); +lean_dec(x_147); +x_168 = lean_ptr_addr(x_166); +x_169 = lean_usize_dec_eq(x_167, x_168); if (x_169 == 0) { uint8_t x_170; +lean_dec(x_145); x_170 = !lean_is_exclusive(x_1); if (x_170 == 0) { lean_object* x_171; x_171 = lean_ctor_get(x_1, 0); lean_dec(x_171); -lean_ctor_set(x_142, 3, x_156); -lean_ctor_set(x_142, 1, x_149); -lean_ctor_set(x_154, 0, x_1); -return x_154; +lean_ctor_set(x_143, 3, x_166); +lean_ctor_set(x_143, 1, x_159); +lean_ctor_set(x_164, 0, x_1); +return x_164; } else { lean_object* x_172; lean_dec(x_1); -lean_ctor_set(x_142, 3, x_156); -lean_ctor_set(x_142, 1, x_149); +lean_ctor_set(x_143, 3, x_166); +lean_ctor_set(x_143, 1, x_159); x_172 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_172, 0, x_142); -lean_ctor_set(x_154, 0, x_172); -return x_154; +lean_ctor_set(x_172, 0, x_143); +lean_ctor_set(x_164, 0, x_172); +return x_164; } } else { -lean_dec(x_156); -lean_dec(x_149); -lean_free_object(x_142); +size_t x_173; size_t x_174; uint8_t x_175; +x_173 = lean_ptr_addr(x_145); +lean_dec(x_145); +x_174 = lean_ptr_addr(x_159); +x_175 = lean_usize_dec_eq(x_173, x_174); +if (x_175 == 0) +{ +uint8_t x_176; +x_176 = !lean_is_exclusive(x_1); +if (x_176 == 0) +{ +lean_object* x_177; +x_177 = lean_ctor_get(x_1, 0); +lean_dec(x_177); +lean_ctor_set(x_143, 3, x_166); +lean_ctor_set(x_143, 1, x_159); +lean_ctor_set(x_164, 0, x_1); +return x_164; +} +else +{ +lean_object* x_178; +lean_dec(x_1); +lean_ctor_set(x_143, 3, x_166); +lean_ctor_set(x_143, 1, x_159); +x_178 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_178, 0, x_143); +lean_ctor_set(x_164, 0, x_178); +return x_164; +} +} +else +{ +uint8_t x_179; +x_179 = lean_name_eq(x_146, x_146); +if (x_179 == 0) +{ +uint8_t x_180; +x_180 = !lean_is_exclusive(x_1); +if (x_180 == 0) +{ +lean_object* x_181; +x_181 = lean_ctor_get(x_1, 0); +lean_dec(x_181); +lean_ctor_set(x_143, 3, x_166); +lean_ctor_set(x_143, 1, x_159); +lean_ctor_set(x_164, 0, x_1); +return x_164; +} +else +{ +lean_object* x_182; +lean_dec(x_1); +lean_ctor_set(x_143, 3, x_166); +lean_ctor_set(x_143, 1, x_159); +x_182 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_182, 0, x_143); +lean_ctor_set(x_164, 0, x_182); +return x_164; +} +} +else +{ +lean_dec(x_166); +lean_dec(x_159); +lean_free_object(x_143); lean_dec(x_146); lean_dec(x_144); -lean_ctor_set(x_154, 0, x_1); -return x_154; +lean_ctor_set(x_164, 0, x_1); +return x_164; } } } } else { -lean_object* x_173; lean_object* x_174; size_t x_175; size_t x_176; uint8_t x_177; -x_173 = lean_ctor_get(x_154, 0); -x_174 = lean_ctor_get(x_154, 1); -lean_inc(x_174); -lean_inc(x_173); -lean_dec(x_154); -x_175 = lean_ptr_addr(x_147); +lean_object* x_183; lean_object* x_184; size_t x_185; size_t x_186; uint8_t x_187; +x_183 = lean_ctor_get(x_164, 0); +x_184 = lean_ctor_get(x_164, 1); +lean_inc(x_184); +lean_inc(x_183); +lean_dec(x_164); +x_185 = lean_ptr_addr(x_147); lean_dec(x_147); -x_176 = lean_ptr_addr(x_173); -x_177 = lean_usize_dec_eq(x_175, x_176); -if (x_177 == 0) -{ -lean_object* x_178; lean_object* x_179; lean_object* x_180; -lean_dec(x_145); -if (lean_is_exclusive(x_1)) { - lean_ctor_release(x_1, 0); - x_178 = x_1; -} else { - lean_dec_ref(x_1); - x_178 = lean_box(0); -} -lean_ctor_set(x_142, 3, x_173); -lean_ctor_set(x_142, 1, x_149); -if (lean_is_scalar(x_178)) { - x_179 = lean_alloc_ctor(4, 1, 0); -} else { - x_179 = x_178; -} -lean_ctor_set(x_179, 0, x_142); -x_180 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_180, 0, x_179); -lean_ctor_set(x_180, 1, x_174); -return x_180; -} -else -{ -size_t x_181; size_t x_182; uint8_t x_183; -x_181 = lean_ptr_addr(x_145); -lean_dec(x_145); -x_182 = lean_ptr_addr(x_149); -x_183 = lean_usize_dec_eq(x_181, x_182); -if (x_183 == 0) -{ -lean_object* x_184; lean_object* x_185; lean_object* x_186; -if (lean_is_exclusive(x_1)) { - lean_ctor_release(x_1, 0); - x_184 = x_1; -} else { - lean_dec_ref(x_1); - x_184 = lean_box(0); -} -lean_ctor_set(x_142, 3, x_173); -lean_ctor_set(x_142, 1, x_149); -if (lean_is_scalar(x_184)) { - x_185 = lean_alloc_ctor(4, 1, 0); -} else { - x_185 = x_184; -} -lean_ctor_set(x_185, 0, x_142); -x_186 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_186, 0, x_185); -lean_ctor_set(x_186, 1, x_174); -return x_186; -} -else -{ -uint8_t x_187; -x_187 = lean_name_eq(x_146, x_146); +x_186 = lean_ptr_addr(x_183); +x_187 = lean_usize_dec_eq(x_185, x_186); if (x_187 == 0) { lean_object* x_188; lean_object* x_189; lean_object* x_190; +lean_dec(x_145); if (lean_is_exclusive(x_1)) { lean_ctor_release(x_1, 0); x_188 = x_1; @@ -2127,31 +3621,88 @@ if (lean_is_exclusive(x_1)) { lean_dec_ref(x_1); x_188 = lean_box(0); } -lean_ctor_set(x_142, 3, x_173); -lean_ctor_set(x_142, 1, x_149); +lean_ctor_set(x_143, 3, x_183); +lean_ctor_set(x_143, 1, x_159); if (lean_is_scalar(x_188)) { x_189 = lean_alloc_ctor(4, 1, 0); } else { x_189 = x_188; } -lean_ctor_set(x_189, 0, x_142); +lean_ctor_set(x_189, 0, x_143); x_190 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_190, 0, x_189); -lean_ctor_set(x_190, 1, x_174); +lean_ctor_set(x_190, 1, x_184); return x_190; } else { -lean_object* x_191; -lean_dec(x_173); -lean_dec(x_149); -lean_free_object(x_142); +size_t x_191; size_t x_192; uint8_t x_193; +x_191 = lean_ptr_addr(x_145); +lean_dec(x_145); +x_192 = lean_ptr_addr(x_159); +x_193 = lean_usize_dec_eq(x_191, x_192); +if (x_193 == 0) +{ +lean_object* x_194; lean_object* x_195; lean_object* x_196; +if (lean_is_exclusive(x_1)) { + lean_ctor_release(x_1, 0); + x_194 = x_1; +} else { + lean_dec_ref(x_1); + x_194 = lean_box(0); +} +lean_ctor_set(x_143, 3, x_183); +lean_ctor_set(x_143, 1, x_159); +if (lean_is_scalar(x_194)) { + x_195 = lean_alloc_ctor(4, 1, 0); +} else { + x_195 = x_194; +} +lean_ctor_set(x_195, 0, x_143); +x_196 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_196, 0, x_195); +lean_ctor_set(x_196, 1, x_184); +return x_196; +} +else +{ +uint8_t x_197; +x_197 = lean_name_eq(x_146, x_146); +if (x_197 == 0) +{ +lean_object* x_198; lean_object* x_199; lean_object* x_200; +if (lean_is_exclusive(x_1)) { + lean_ctor_release(x_1, 0); + x_198 = x_1; +} else { + lean_dec_ref(x_1); + x_198 = lean_box(0); +} +lean_ctor_set(x_143, 3, x_183); +lean_ctor_set(x_143, 1, x_159); +if (lean_is_scalar(x_198)) { + x_199 = lean_alloc_ctor(4, 1, 0); +} else { + x_199 = x_198; +} +lean_ctor_set(x_199, 0, x_143); +x_200 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_200, 0, x_199); +lean_ctor_set(x_200, 1, x_184); +return x_200; +} +else +{ +lean_object* x_201; +lean_dec(x_183); +lean_dec(x_159); +lean_free_object(x_143); lean_dec(x_146); lean_dec(x_144); -x_191 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_191, 0, x_1); -lean_ctor_set(x_191, 1, x_174); -return x_191; +x_201 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_201, 0, x_1); +lean_ctor_set(x_201, 1, x_184); +return x_201; } } } @@ -2159,157 +3710,116 @@ return x_191; } else { -uint8_t x_192; -lean_dec(x_149); -lean_free_object(x_142); +uint8_t x_202; +lean_dec(x_159); +lean_free_object(x_143); lean_dec(x_147); lean_dec(x_146); lean_dec(x_145); lean_dec(x_144); lean_dec(x_1); -x_192 = !lean_is_exclusive(x_154); -if (x_192 == 0) +x_202 = !lean_is_exclusive(x_164); +if (x_202 == 0) { -return x_154; +return x_164; } else { -lean_object* x_193; lean_object* x_194; lean_object* x_195; -x_193 = lean_ctor_get(x_154, 0); -x_194 = lean_ctor_get(x_154, 1); -lean_inc(x_194); -lean_inc(x_193); -lean_dec(x_154); -x_195 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_195, 0, x_193); -lean_ctor_set(x_195, 1, x_194); -return x_195; +lean_object* x_203; lean_object* x_204; lean_object* x_205; +x_203 = lean_ctor_get(x_164, 0); +x_204 = lean_ctor_get(x_164, 1); +lean_inc(x_204); +lean_inc(x_203); +lean_dec(x_164); +x_205 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_205, 0, x_203); +lean_ctor_set(x_205, 1, x_204); +return x_205; } } } else { -uint8_t x_196; -lean_free_object(x_142); +uint8_t x_206; +lean_free_object(x_143); lean_dec(x_147); lean_dec(x_146); lean_dec(x_145); lean_dec(x_144); +lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_196 = !lean_is_exclusive(x_148); -if (x_196 == 0) +x_206 = !lean_is_exclusive(x_158); +if (x_206 == 0) { -return x_148; +return x_158; } else { -lean_object* x_197; lean_object* x_198; lean_object* x_199; -x_197 = lean_ctor_get(x_148, 0); -x_198 = lean_ctor_get(x_148, 1); -lean_inc(x_198); -lean_inc(x_197); -lean_dec(x_148); -x_199 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_199, 0, x_197); -lean_ctor_set(x_199, 1, x_198); -return x_199; +lean_object* x_207; lean_object* x_208; lean_object* x_209; +x_207 = lean_ctor_get(x_158, 0); +x_208 = lean_ctor_get(x_158, 1); +lean_inc(x_208); +lean_inc(x_207); +lean_dec(x_158); +x_209 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_209, 0, x_207); +lean_ctor_set(x_209, 1, x_208); +return x_209; } } } else { -lean_object* x_200; lean_object* x_201; lean_object* x_202; lean_object* x_203; lean_object* x_204; -x_200 = lean_ctor_get(x_142, 0); -x_201 = lean_ctor_get(x_142, 1); -x_202 = lean_ctor_get(x_142, 2); -x_203 = lean_ctor_get(x_142, 3); -lean_inc(x_203); -lean_inc(x_202); -lean_inc(x_201); -lean_inc(x_200); -lean_dec(x_142); +lean_object* x_210; lean_object* x_211; +lean_dec(x_143); +x_210 = lean_ctor_get(x_150, 1); +lean_inc(x_210); +lean_dec(x_150); +lean_inc(x_6); lean_inc(x_5); -lean_inc(x_4); -lean_inc(x_201); -x_204 = l_Lean_Compiler_LCNF_toMonoType(x_201, x_4, x_5, x_6); -if (lean_obj_tag(x_204) == 0) +lean_inc(x_145); +x_211 = l_Lean_Compiler_LCNF_toMonoType(x_145, x_5, x_6, x_210); +if (lean_obj_tag(x_211) == 0) { -lean_object* x_205; lean_object* x_206; lean_object* x_207; size_t x_208; size_t x_209; lean_object* x_210; -x_205 = lean_ctor_get(x_204, 0); -lean_inc(x_205); -x_206 = lean_ctor_get(x_204, 1); -lean_inc(x_206); -lean_dec(x_204); -x_207 = lean_array_get_size(x_203); -x_208 = lean_usize_of_nat(x_207); -lean_dec(x_207); -x_209 = 0; -lean_inc(x_203); -x_210 = l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_Code_toMono___spec__1(x_208, x_209, x_203, x_2, x_3, x_4, x_5, x_206); -if (lean_obj_tag(x_210) == 0) -{ -lean_object* x_211; lean_object* x_212; lean_object* x_213; size_t x_214; size_t x_215; uint8_t x_216; -x_211 = lean_ctor_get(x_210, 0); -lean_inc(x_211); -x_212 = lean_ctor_get(x_210, 1); +lean_object* x_212; lean_object* x_213; lean_object* x_214; size_t x_215; size_t x_216; lean_object* x_217; +x_212 = lean_ctor_get(x_211, 0); lean_inc(x_212); -if (lean_is_exclusive(x_210)) { - lean_ctor_release(x_210, 0); - lean_ctor_release(x_210, 1); - x_213 = x_210; -} else { - lean_dec_ref(x_210); - x_213 = lean_box(0); -} -x_214 = lean_ptr_addr(x_203); -lean_dec(x_203); -x_215 = lean_ptr_addr(x_211); -x_216 = lean_usize_dec_eq(x_214, x_215); -if (x_216 == 0) +x_213 = lean_ctor_get(x_211, 1); +lean_inc(x_213); +lean_dec(x_211); +x_214 = lean_array_get_size(x_147); +x_215 = lean_usize_of_nat(x_214); +lean_dec(x_214); +x_216 = 0; +lean_inc(x_147); +x_217 = l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_Code_toMono___spec__1(x_215, x_216, x_147, x_2, x_3, x_4, x_5, x_6, x_213); +if (lean_obj_tag(x_217) == 0) { -lean_object* x_217; lean_object* x_218; lean_object* x_219; lean_object* x_220; -lean_dec(x_201); -if (lean_is_exclusive(x_1)) { - lean_ctor_release(x_1, 0); - x_217 = x_1; +lean_object* x_218; lean_object* x_219; lean_object* x_220; size_t x_221; size_t x_222; uint8_t x_223; +x_218 = lean_ctor_get(x_217, 0); +lean_inc(x_218); +x_219 = lean_ctor_get(x_217, 1); +lean_inc(x_219); +if (lean_is_exclusive(x_217)) { + lean_ctor_release(x_217, 0); + lean_ctor_release(x_217, 1); + x_220 = x_217; } else { - lean_dec_ref(x_1); - x_217 = lean_box(0); + lean_dec_ref(x_217); + x_220 = lean_box(0); } -x_218 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_218, 0, x_200); -lean_ctor_set(x_218, 1, x_205); -lean_ctor_set(x_218, 2, x_202); -lean_ctor_set(x_218, 3, x_211); -if (lean_is_scalar(x_217)) { - x_219 = lean_alloc_ctor(4, 1, 0); -} else { - x_219 = x_217; -} -lean_ctor_set(x_219, 0, x_218); -if (lean_is_scalar(x_213)) { - x_220 = lean_alloc_ctor(0, 2, 0); -} else { - x_220 = x_213; -} -lean_ctor_set(x_220, 0, x_219); -lean_ctor_set(x_220, 1, x_212); -return x_220; -} -else -{ -size_t x_221; size_t x_222; uint8_t x_223; -x_221 = lean_ptr_addr(x_201); -lean_dec(x_201); -x_222 = lean_ptr_addr(x_205); +x_221 = lean_ptr_addr(x_147); +lean_dec(x_147); +x_222 = lean_ptr_addr(x_218); x_223 = lean_usize_dec_eq(x_221, x_222); if (x_223 == 0) { lean_object* x_224; lean_object* x_225; lean_object* x_226; lean_object* x_227; +lean_dec(x_145); if (lean_is_exclusive(x_1)) { lean_ctor_release(x_1, 0); x_224 = x_1; @@ -2318,568 +3828,1324 @@ if (lean_is_exclusive(x_1)) { x_224 = lean_box(0); } x_225 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_225, 0, x_200); -lean_ctor_set(x_225, 1, x_205); -lean_ctor_set(x_225, 2, x_202); -lean_ctor_set(x_225, 3, x_211); +lean_ctor_set(x_225, 0, x_144); +lean_ctor_set(x_225, 1, x_212); +lean_ctor_set(x_225, 2, x_146); +lean_ctor_set(x_225, 3, x_218); if (lean_is_scalar(x_224)) { x_226 = lean_alloc_ctor(4, 1, 0); } else { x_226 = x_224; } lean_ctor_set(x_226, 0, x_225); -if (lean_is_scalar(x_213)) { +if (lean_is_scalar(x_220)) { x_227 = lean_alloc_ctor(0, 2, 0); } else { - x_227 = x_213; + x_227 = x_220; } lean_ctor_set(x_227, 0, x_226); -lean_ctor_set(x_227, 1, x_212); +lean_ctor_set(x_227, 1, x_219); return x_227; } else { -uint8_t x_228; -x_228 = lean_name_eq(x_202, x_202); -if (x_228 == 0) +size_t x_228; size_t x_229; uint8_t x_230; +x_228 = lean_ptr_addr(x_145); +lean_dec(x_145); +x_229 = lean_ptr_addr(x_212); +x_230 = lean_usize_dec_eq(x_228, x_229); +if (x_230 == 0) { -lean_object* x_229; lean_object* x_230; lean_object* x_231; lean_object* x_232; +lean_object* x_231; lean_object* x_232; lean_object* x_233; lean_object* x_234; if (lean_is_exclusive(x_1)) { lean_ctor_release(x_1, 0); - x_229 = x_1; + x_231 = x_1; } else { lean_dec_ref(x_1); - x_229 = lean_box(0); + x_231 = lean_box(0); } -x_230 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_230, 0, x_200); -lean_ctor_set(x_230, 1, x_205); -lean_ctor_set(x_230, 2, x_202); -lean_ctor_set(x_230, 3, x_211); -if (lean_is_scalar(x_229)) { - x_231 = lean_alloc_ctor(4, 1, 0); -} else { - x_231 = x_229; -} -lean_ctor_set(x_231, 0, x_230); -if (lean_is_scalar(x_213)) { - x_232 = lean_alloc_ctor(0, 2, 0); -} else { - x_232 = x_213; -} -lean_ctor_set(x_232, 0, x_231); +x_232 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_232, 0, x_144); lean_ctor_set(x_232, 1, x_212); -return x_232; +lean_ctor_set(x_232, 2, x_146); +lean_ctor_set(x_232, 3, x_218); +if (lean_is_scalar(x_231)) { + x_233 = lean_alloc_ctor(4, 1, 0); +} else { + x_233 = x_231; +} +lean_ctor_set(x_233, 0, x_232); +if (lean_is_scalar(x_220)) { + x_234 = lean_alloc_ctor(0, 2, 0); +} else { + x_234 = x_220; +} +lean_ctor_set(x_234, 0, x_233); +lean_ctor_set(x_234, 1, x_219); +return x_234; } else { -lean_object* x_233; -lean_dec(x_211); -lean_dec(x_205); -lean_dec(x_202); -lean_dec(x_200); -if (lean_is_scalar(x_213)) { - x_233 = lean_alloc_ctor(0, 2, 0); -} else { - x_233 = x_213; -} -lean_ctor_set(x_233, 0, x_1); -lean_ctor_set(x_233, 1, x_212); -return x_233; -} -} -} -} -else +uint8_t x_235; +x_235 = lean_name_eq(x_146, x_146); +if (x_235 == 0) { -lean_object* x_234; lean_object* x_235; lean_object* x_236; lean_object* x_237; -lean_dec(x_205); -lean_dec(x_203); -lean_dec(x_202); -lean_dec(x_201); -lean_dec(x_200); -lean_dec(x_1); -x_234 = lean_ctor_get(x_210, 0); -lean_inc(x_234); -x_235 = lean_ctor_get(x_210, 1); -lean_inc(x_235); -if (lean_is_exclusive(x_210)) { - lean_ctor_release(x_210, 0); - lean_ctor_release(x_210, 1); - x_236 = x_210; +lean_object* x_236; lean_object* x_237; lean_object* x_238; lean_object* x_239; +if (lean_is_exclusive(x_1)) { + lean_ctor_release(x_1, 0); + x_236 = x_1; } else { - lean_dec_ref(x_210); + lean_dec_ref(x_1); x_236 = lean_box(0); } +x_237 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_237, 0, x_144); +lean_ctor_set(x_237, 1, x_212); +lean_ctor_set(x_237, 2, x_146); +lean_ctor_set(x_237, 3, x_218); if (lean_is_scalar(x_236)) { - x_237 = lean_alloc_ctor(1, 2, 0); + x_238 = lean_alloc_ctor(4, 1, 0); } else { - x_237 = x_236; + x_238 = x_236; +} +lean_ctor_set(x_238, 0, x_237); +if (lean_is_scalar(x_220)) { + x_239 = lean_alloc_ctor(0, 2, 0); +} else { + x_239 = x_220; +} +lean_ctor_set(x_239, 0, x_238); +lean_ctor_set(x_239, 1, x_219); +return x_239; +} +else +{ +lean_object* x_240; +lean_dec(x_218); +lean_dec(x_212); +lean_dec(x_146); +lean_dec(x_144); +if (lean_is_scalar(x_220)) { + x_240 = lean_alloc_ctor(0, 2, 0); +} else { + x_240 = x_220; +} +lean_ctor_set(x_240, 0, x_1); +lean_ctor_set(x_240, 1, x_219); +return x_240; +} } -lean_ctor_set(x_237, 0, x_234); -lean_ctor_set(x_237, 1, x_235); -return x_237; } } else { -lean_object* x_238; lean_object* x_239; lean_object* x_240; lean_object* x_241; -lean_dec(x_203); -lean_dec(x_202); -lean_dec(x_201); -lean_dec(x_200); +lean_object* x_241; lean_object* x_242; lean_object* x_243; lean_object* x_244; +lean_dec(x_212); +lean_dec(x_147); +lean_dec(x_146); +lean_dec(x_145); +lean_dec(x_144); +lean_dec(x_1); +x_241 = lean_ctor_get(x_217, 0); +lean_inc(x_241); +x_242 = lean_ctor_get(x_217, 1); +lean_inc(x_242); +if (lean_is_exclusive(x_217)) { + lean_ctor_release(x_217, 0); + lean_ctor_release(x_217, 1); + x_243 = x_217; +} else { + lean_dec_ref(x_217); + x_243 = lean_box(0); +} +if (lean_is_scalar(x_243)) { + x_244 = lean_alloc_ctor(1, 2, 0); +} else { + x_244 = x_243; +} +lean_ctor_set(x_244, 0, x_241); +lean_ctor_set(x_244, 1, x_242); +return x_244; +} +} +else +{ +lean_object* x_245; lean_object* x_246; lean_object* x_247; lean_object* x_248; +lean_dec(x_147); +lean_dec(x_146); +lean_dec(x_145); +lean_dec(x_144); +lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_238 = lean_ctor_get(x_204, 0); -lean_inc(x_238); -x_239 = lean_ctor_get(x_204, 1); -lean_inc(x_239); -if (lean_is_exclusive(x_204)) { - lean_ctor_release(x_204, 0); - lean_ctor_release(x_204, 1); - x_240 = x_204; +x_245 = lean_ctor_get(x_211, 0); +lean_inc(x_245); +x_246 = lean_ctor_get(x_211, 1); +lean_inc(x_246); +if (lean_is_exclusive(x_211)) { + lean_ctor_release(x_211, 0); + lean_ctor_release(x_211, 1); + x_247 = x_211; } else { - lean_dec_ref(x_204); - x_240 = lean_box(0); + lean_dec_ref(x_211); + x_247 = lean_box(0); } -if (lean_is_scalar(x_240)) { - x_241 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_247)) { + x_248 = lean_alloc_ctor(1, 2, 0); } else { - x_241 = x_240; + x_248 = x_247; } -lean_ctor_set(x_241, 0, x_238); -lean_ctor_set(x_241, 1, x_239); -return x_241; +lean_ctor_set(x_248, 0, x_245); +lean_ctor_set(x_248, 1, x_246); +return x_248; } } } +else +{ +lean_object* x_249; lean_object* x_250; lean_object* x_251; +lean_dec(x_147); +lean_dec(x_146); +lean_dec(x_145); +lean_dec(x_144); +lean_dec(x_1); +x_249 = lean_ctor_get(x_150, 1); +lean_inc(x_249); +lean_dec(x_150); +x_250 = lean_ctor_get(x_151, 0); +lean_inc(x_250); +lean_dec(x_151); +x_251 = l_Lean_Compiler_LCNF_trivialStructToMono(x_250, x_143, x_2, x_3, x_4, x_5, x_6, x_249); +return x_251; +} +} +else +{ +uint8_t x_252; +lean_dec(x_147); +lean_dec(x_146); +lean_dec(x_145); +lean_dec(x_144); +lean_dec(x_143); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_252 = !lean_is_exclusive(x_150); +if (x_252 == 0) +{ +return x_150; +} +else +{ +lean_object* x_253; lean_object* x_254; lean_object* x_255; +x_253 = lean_ctor_get(x_150, 0); +x_254 = lean_ctor_get(x_150, 1); +lean_inc(x_254); +lean_inc(x_253); +lean_dec(x_150); +x_255 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_255, 0, x_253); +lean_ctor_set(x_255, 1, x_254); +return x_255; +} +} +} +else +{ +lean_object* x_256; +lean_dec(x_147); +lean_dec(x_146); +lean_dec(x_145); +lean_dec(x_144); +lean_dec(x_1); +x_256 = l_Lean_Compiler_LCNF_decToMono(x_143, lean_box(0), x_2, x_3, x_4, x_5, x_6, x_7); +return x_256; +} +} case 6: { -uint8_t x_242; +uint8_t x_257; +lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); -x_242 = !lean_is_exclusive(x_1); -if (x_242 == 0) +x_257 = !lean_is_exclusive(x_1); +if (x_257 == 0) { -lean_object* x_243; lean_object* x_244; -x_243 = lean_ctor_get(x_1, 0); -x_244 = l_Lean_Compiler_LCNF_toMonoType(x_243, x_4, x_5, x_6); -if (lean_obj_tag(x_244) == 0) +lean_object* x_258; lean_object* x_259; +x_258 = lean_ctor_get(x_1, 0); +x_259 = l_Lean_Compiler_LCNF_toMonoType(x_258, x_5, x_6, x_7); +if (lean_obj_tag(x_259) == 0) { -uint8_t x_245; -x_245 = !lean_is_exclusive(x_244); -if (x_245 == 0) +uint8_t x_260; +x_260 = !lean_is_exclusive(x_259); +if (x_260 == 0) { -lean_object* x_246; -x_246 = lean_ctor_get(x_244, 0); -lean_ctor_set(x_1, 0, x_246); -lean_ctor_set(x_244, 0, x_1); -return x_244; +lean_object* x_261; +x_261 = lean_ctor_get(x_259, 0); +lean_ctor_set(x_1, 0, x_261); +lean_ctor_set(x_259, 0, x_1); +return x_259; } else { -lean_object* x_247; lean_object* x_248; lean_object* x_249; -x_247 = lean_ctor_get(x_244, 0); -x_248 = lean_ctor_get(x_244, 1); -lean_inc(x_248); -lean_inc(x_247); -lean_dec(x_244); -lean_ctor_set(x_1, 0, x_247); -x_249 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_249, 0, x_1); -lean_ctor_set(x_249, 1, x_248); -return x_249; -} -} -else -{ -uint8_t x_250; -lean_free_object(x_1); -x_250 = !lean_is_exclusive(x_244); -if (x_250 == 0) -{ -return x_244; -} -else -{ -lean_object* x_251; lean_object* x_252; lean_object* x_253; -x_251 = lean_ctor_get(x_244, 0); -x_252 = lean_ctor_get(x_244, 1); -lean_inc(x_252); -lean_inc(x_251); -lean_dec(x_244); -x_253 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_253, 0, x_251); -lean_ctor_set(x_253, 1, x_252); -return x_253; -} -} -} -else -{ -lean_object* x_254; lean_object* x_255; -x_254 = lean_ctor_get(x_1, 0); -lean_inc(x_254); -lean_dec(x_1); -x_255 = l_Lean_Compiler_LCNF_toMonoType(x_254, x_4, x_5, x_6); -if (lean_obj_tag(x_255) == 0) -{ -lean_object* x_256; lean_object* x_257; lean_object* x_258; lean_object* x_259; lean_object* x_260; -x_256 = lean_ctor_get(x_255, 0); -lean_inc(x_256); -x_257 = lean_ctor_get(x_255, 1); -lean_inc(x_257); -if (lean_is_exclusive(x_255)) { - lean_ctor_release(x_255, 0); - lean_ctor_release(x_255, 1); - x_258 = x_255; -} else { - lean_dec_ref(x_255); - x_258 = lean_box(0); -} -x_259 = lean_alloc_ctor(6, 1, 0); -lean_ctor_set(x_259, 0, x_256); -if (lean_is_scalar(x_258)) { - x_260 = lean_alloc_ctor(0, 2, 0); -} else { - x_260 = x_258; -} -lean_ctor_set(x_260, 0, x_259); -lean_ctor_set(x_260, 1, x_257); -return x_260; -} -else -{ -lean_object* x_261; lean_object* x_262; lean_object* x_263; lean_object* x_264; -x_261 = lean_ctor_get(x_255, 0); -lean_inc(x_261); -x_262 = lean_ctor_get(x_255, 1); +lean_object* x_262; lean_object* x_263; lean_object* x_264; +x_262 = lean_ctor_get(x_259, 0); +x_263 = lean_ctor_get(x_259, 1); +lean_inc(x_263); lean_inc(x_262); -if (lean_is_exclusive(x_255)) { - lean_ctor_release(x_255, 0); - lean_ctor_release(x_255, 1); - x_263 = x_255; -} else { - lean_dec_ref(x_255); - x_263 = lean_box(0); -} -if (lean_is_scalar(x_263)) { - x_264 = lean_alloc_ctor(1, 2, 0); -} else { - x_264 = x_263; -} -lean_ctor_set(x_264, 0, x_261); -lean_ctor_set(x_264, 1, x_262); +lean_dec(x_259); +lean_ctor_set(x_1, 0, x_262); +x_264 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_264, 0, x_1); +lean_ctor_set(x_264, 1, x_263); return x_264; } } +else +{ +uint8_t x_265; +lean_free_object(x_1); +x_265 = !lean_is_exclusive(x_259); +if (x_265 == 0) +{ +return x_259; +} +else +{ +lean_object* x_266; lean_object* x_267; lean_object* x_268; +x_266 = lean_ctor_get(x_259, 0); +x_267 = lean_ctor_get(x_259, 1); +lean_inc(x_267); +lean_inc(x_266); +lean_dec(x_259); +x_268 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_268, 0, x_266); +lean_ctor_set(x_268, 1, x_267); +return x_268; +} +} +} +else +{ +lean_object* x_269; lean_object* x_270; +x_269 = lean_ctor_get(x_1, 0); +lean_inc(x_269); +lean_dec(x_1); +x_270 = l_Lean_Compiler_LCNF_toMonoType(x_269, x_5, x_6, x_7); +if (lean_obj_tag(x_270) == 0) +{ +lean_object* x_271; lean_object* x_272; lean_object* x_273; lean_object* x_274; lean_object* x_275; +x_271 = lean_ctor_get(x_270, 0); +lean_inc(x_271); +x_272 = lean_ctor_get(x_270, 1); +lean_inc(x_272); +if (lean_is_exclusive(x_270)) { + lean_ctor_release(x_270, 0); + lean_ctor_release(x_270, 1); + x_273 = x_270; +} else { + lean_dec_ref(x_270); + x_273 = lean_box(0); +} +x_274 = lean_alloc_ctor(6, 1, 0); +lean_ctor_set(x_274, 0, x_271); +if (lean_is_scalar(x_273)) { + x_275 = lean_alloc_ctor(0, 2, 0); +} else { + x_275 = x_273; +} +lean_ctor_set(x_275, 0, x_274); +lean_ctor_set(x_275, 1, x_272); +return x_275; +} +else +{ +lean_object* x_276; lean_object* x_277; lean_object* x_278; lean_object* x_279; +x_276 = lean_ctor_get(x_270, 0); +lean_inc(x_276); +x_277 = lean_ctor_get(x_270, 1); +lean_inc(x_277); +if (lean_is_exclusive(x_270)) { + lean_ctor_release(x_270, 0); + lean_ctor_release(x_270, 1); + x_278 = x_270; +} else { + lean_dec_ref(x_270); + x_278 = lean_box(0); +} +if (lean_is_scalar(x_278)) { + x_279 = lean_alloc_ctor(1, 2, 0); +} else { + x_279 = x_278; +} +lean_ctor_set(x_279, 0, x_276); +lean_ctor_set(x_279, 1, x_277); +return x_279; +} +} } default: { -lean_object* x_265; +lean_object* x_280; +lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); -x_265 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_265, 0, x_1); -lean_ctor_set(x_265, 1, x_6); -return x_265; +x_280 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_280, 0, x_1); +lean_ctor_set(x_280, 1, x_7); +return x_280; } } } } -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_AltCore_toMono(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +static lean_object* _init_l_panic___at_Lean_Compiler_LCNF_trivialStructToMono___spec__1___closed__1() { _start: { -if (lean_obj_tag(x_1) == 0) +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_panic___at_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___spec__1___closed__3; +x_2 = l_Lean_Compiler_LCNF_instInhabitedCode; +x_3 = l_instInhabited___rarg(x_1, x_2); +return x_3; +} +} +LEAN_EXPORT lean_object* l_panic___at_Lean_Compiler_LCNF_trivialStructToMono___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: { -lean_object* x_7; lean_object* x_8; lean_object* x_9; size_t x_10; size_t x_11; lean_object* x_12; -x_7 = lean_ctor_get(x_1, 1); -lean_inc(x_7); -x_8 = lean_ctor_get(x_1, 2); -lean_inc(x_8); -x_9 = lean_array_get_size(x_7); -x_10 = lean_usize_of_nat(x_9); +lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_8 = l_panic___at_Lean_Compiler_LCNF_trivialStructToMono___spec__1___closed__1; +x_9 = lean_panic_fn(x_8, x_1); +x_10 = lean_apply_6(x_9, x_2, x_3, x_4, x_5, x_6, x_7); +return x_10; +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_trivialStructToMono___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("ctorName == info.ctorName\n ", 28); +return x_1; +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_trivialStructToMono___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__1; +x_2 = l_Lean_Compiler_LCNF_trivialStructToMono___closed__1; +x_3 = lean_string_append(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_trivialStructToMono___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("Lean.Compiler.LCNF.trivialStructToMono", 38); +return x_1; +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_trivialStructToMono___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_1 = l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__4; +x_2 = l_Lean_Compiler_LCNF_trivialStructToMono___closed__3; +x_3 = lean_unsigned_to_nat(110u); +x_4 = lean_unsigned_to_nat(2u); +x_5 = l_Lean_Compiler_LCNF_trivialStructToMono___closed__2; +x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); +return x_6; +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_trivialStructToMono___closed__5() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("info.fieldIdx < ps.size\n ", 26); +return x_1; +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_trivialStructToMono___closed__6() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__1; +x_2 = l_Lean_Compiler_LCNF_trivialStructToMono___closed__5; +x_3 = lean_string_append(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_trivialStructToMono___closed__7() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_1 = l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__4; +x_2 = l_Lean_Compiler_LCNF_trivialStructToMono___closed__3; +x_3 = lean_unsigned_to_nat(111u); +x_4 = lean_unsigned_to_nat(2u); +x_5 = l_Lean_Compiler_LCNF_trivialStructToMono___closed__6; +x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); +return x_6; +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_trivialStructToMono___closed__8() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_1 = l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__4; +x_2 = l_Lean_Compiler_LCNF_trivialStructToMono___closed__3; +x_3 = lean_unsigned_to_nat(109u); +x_4 = lean_unsigned_to_nat(41u); +x_5 = l_Lean_Expr_toMono___closed__2; +x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); +return x_6; +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_trivialStructToMono___closed__9() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("c.alts.size == 1\n ", 19); +return x_1; +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_trivialStructToMono___closed__10() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__1; +x_2 = l_Lean_Compiler_LCNF_trivialStructToMono___closed__9; +x_3 = lean_string_append(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_trivialStructToMono___closed__11() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_1 = l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__4; +x_2 = l_Lean_Compiler_LCNF_trivialStructToMono___closed__3; +x_3 = lean_unsigned_to_nat(108u); +x_4 = lean_unsigned_to_nat(2u); +x_5 = l_Lean_Compiler_LCNF_trivialStructToMono___closed__10; +x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); +return x_6; +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_trivialStructToMono___closed__12() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("Init.Util", 9); +return x_1; +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_trivialStructToMono___closed__13() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("getElem!", 8); +return x_1; +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_trivialStructToMono___closed__14() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("index out of bounds", 19); +return x_1; +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_trivialStructToMono___closed__15() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_1 = l_Lean_Compiler_LCNF_trivialStructToMono___closed__12; +x_2 = l_Lean_Compiler_LCNF_trivialStructToMono___closed__13; +x_3 = lean_unsigned_to_nat(77u); +x_4 = lean_unsigned_to_nat(36u); +x_5 = l_Lean_Compiler_LCNF_trivialStructToMono___closed__14; +x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); +return x_6; +} +} +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_trivialStructToMono(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; lean_object* x_77; lean_object* x_78; lean_object* x_79; uint8_t x_80; +x_77 = lean_ctor_get(x_2, 3); +lean_inc(x_77); +x_78 = lean_array_get_size(x_77); +x_79 = lean_unsigned_to_nat(1u); +x_80 = lean_nat_dec_eq(x_78, x_79); +if (x_80 == 0) +{ +lean_object* x_81; lean_object* x_82; +lean_dec(x_78); +lean_dec(x_77); +lean_dec(x_2); +lean_dec(x_1); +x_81 = l_Lean_Compiler_LCNF_trivialStructToMono___closed__11; +x_82 = l_panic___at_Lean_Compiler_LCNF_trivialStructToMono___spec__1(x_81, x_3, x_4, x_5, x_6, x_7, x_8); +return x_82; +} +else +{ +lean_object* x_83; uint8_t x_84; +x_83 = lean_unsigned_to_nat(0u); +x_84 = lean_nat_dec_lt(x_83, x_78); +lean_dec(x_78); +if (x_84 == 0) +{ +lean_object* x_85; lean_object* x_86; +lean_dec(x_77); +x_85 = l_Lean_Compiler_LCNF_trivialStructToMono___closed__15; +x_86 = l_panic___at_Lean_Compiler_LCNF_CasesCore_extractAlt_x21___spec__2(x_85); +x_9 = x_86; +goto block_76; +} +else +{ +lean_object* x_87; +x_87 = lean_array_fget(x_77, x_83); +lean_dec(x_77); +x_9 = x_87; +goto block_76; +} +} +block_76: +{ +if (lean_obj_tag(x_9) == 0) +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; +x_10 = lean_ctor_get(x_9, 0); +lean_inc(x_10); +x_11 = lean_ctor_get(x_9, 1); +lean_inc(x_11); +x_12 = lean_ctor_get(x_9, 2); +lean_inc(x_12); lean_dec(x_9); -x_11 = 0; -lean_inc(x_5); -lean_inc(x_4); -x_12 = l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_FunDeclCore_toMono___spec__1(x_10, x_11, x_7, x_2, x_3, x_4, x_5, x_6); +x_13 = lean_ctor_get(x_1, 0); +lean_inc(x_13); +x_14 = lean_name_eq(x_10, x_13); +lean_dec(x_13); +lean_dec(x_10); +if (x_14 == 0) +{ +lean_object* x_15; lean_object* x_16; +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_2); +lean_dec(x_1); +x_15 = l_Lean_Compiler_LCNF_trivialStructToMono___closed__4; +x_16 = l_panic___at_Lean_Compiler_LCNF_trivialStructToMono___spec__1(x_15, x_3, x_4, x_5, x_6, x_7, x_8); +return x_16; +} +else +{ +lean_object* x_17; lean_object* x_18; uint8_t x_19; +x_17 = lean_ctor_get(x_1, 1); +lean_inc(x_17); +lean_dec(x_1); +x_18 = lean_array_get_size(x_11); +x_19 = lean_nat_dec_lt(x_17, x_18); +lean_dec(x_18); +if (x_19 == 0) +{ +lean_object* x_20; lean_object* x_21; +lean_dec(x_17); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_2); +x_20 = l_Lean_Compiler_LCNF_trivialStructToMono___closed__7; +x_21 = l_panic___at_Lean_Compiler_LCNF_trivialStructToMono___spec__1(x_20, x_3, x_4, x_5, x_6, x_7, x_8); +return x_21; +} +else +{ +lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; +x_22 = lean_array_fget(x_11, x_17); +lean_dec(x_17); +x_23 = l_Lean_Compiler_LCNF_eraseParams(x_11, x_4, x_5, x_6, x_7, x_8); +lean_dec(x_11); +x_24 = lean_ctor_get(x_23, 1); +lean_inc(x_24); +lean_dec(x_23); +x_25 = lean_ctor_get(x_22, 0); +lean_inc(x_25); +x_26 = lean_ctor_get(x_22, 1); +lean_inc(x_26); +x_27 = lean_ctor_get(x_22, 2); +lean_inc(x_27); +lean_dec(x_22); +lean_inc(x_7); +lean_inc(x_6); +x_28 = l_Lean_Compiler_LCNF_toMonoType(x_27, x_6, x_7, x_24); +if (lean_obj_tag(x_28) == 0) +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; uint8_t x_37; +x_29 = lean_ctor_get(x_28, 0); +lean_inc(x_29); +x_30 = lean_ctor_get(x_28, 1); +lean_inc(x_30); +lean_dec(x_28); +x_31 = lean_ctor_get(x_2, 2); +lean_inc(x_31); +lean_dec(x_2); +x_32 = l_Lean_Expr_fvar___override(x_31); +x_33 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_33, 0, x_25); +lean_ctor_set(x_33, 1, x_26); +lean_ctor_set(x_33, 2, x_29); +lean_ctor_set(x_33, 3, x_32); +x_34 = lean_st_ref_take(x_5, x_30); +x_35 = lean_ctor_get(x_34, 0); +lean_inc(x_35); +x_36 = lean_ctor_get(x_34, 1); +lean_inc(x_36); +lean_dec(x_34); +x_37 = !lean_is_exclusive(x_35); +if (x_37 == 0) +{ +lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; +x_38 = lean_ctor_get(x_35, 0); +lean_inc(x_33); +x_39 = l_Lean_Compiler_LCNF_LCtx_addLetDecl(x_38, x_33); +lean_ctor_set(x_35, 0, x_39); +x_40 = lean_st_ref_set(x_5, x_35, x_36); +x_41 = lean_ctor_get(x_40, 1); +lean_inc(x_41); +lean_dec(x_40); +x_42 = l_Lean_Compiler_LCNF_Code_toMono(x_12, x_3, x_4, x_5, x_6, x_7, x_41); +if (lean_obj_tag(x_42) == 0) +{ +uint8_t x_43; +x_43 = !lean_is_exclusive(x_42); +if (x_43 == 0) +{ +lean_object* x_44; lean_object* x_45; +x_44 = lean_ctor_get(x_42, 0); +x_45 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_45, 0, x_33); +lean_ctor_set(x_45, 1, x_44); +lean_ctor_set(x_42, 0, x_45); +return x_42; +} +else +{ +lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; +x_46 = lean_ctor_get(x_42, 0); +x_47 = lean_ctor_get(x_42, 1); +lean_inc(x_47); +lean_inc(x_46); +lean_dec(x_42); +x_48 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_48, 0, x_33); +lean_ctor_set(x_48, 1, x_46); +x_49 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_49, 0, x_48); +lean_ctor_set(x_49, 1, x_47); +return x_49; +} +} +else +{ +uint8_t x_50; +lean_dec(x_33); +x_50 = !lean_is_exclusive(x_42); +if (x_50 == 0) +{ +return x_42; +} +else +{ +lean_object* x_51; lean_object* x_52; lean_object* x_53; +x_51 = lean_ctor_get(x_42, 0); +x_52 = lean_ctor_get(x_42, 1); +lean_inc(x_52); +lean_inc(x_51); +lean_dec(x_42); +x_53 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_53, 0, x_51); +lean_ctor_set(x_53, 1, x_52); +return x_53; +} +} +} +else +{ +lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; +x_54 = lean_ctor_get(x_35, 0); +x_55 = lean_ctor_get(x_35, 1); +lean_inc(x_55); +lean_inc(x_54); +lean_dec(x_35); +lean_inc(x_33); +x_56 = l_Lean_Compiler_LCNF_LCtx_addLetDecl(x_54, x_33); +x_57 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_57, 0, x_56); +lean_ctor_set(x_57, 1, x_55); +x_58 = lean_st_ref_set(x_5, x_57, x_36); +x_59 = lean_ctor_get(x_58, 1); +lean_inc(x_59); +lean_dec(x_58); +x_60 = l_Lean_Compiler_LCNF_Code_toMono(x_12, x_3, x_4, x_5, x_6, x_7, x_59); +if (lean_obj_tag(x_60) == 0) +{ +lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; +x_61 = lean_ctor_get(x_60, 0); +lean_inc(x_61); +x_62 = lean_ctor_get(x_60, 1); +lean_inc(x_62); +if (lean_is_exclusive(x_60)) { + lean_ctor_release(x_60, 0); + lean_ctor_release(x_60, 1); + x_63 = x_60; +} else { + lean_dec_ref(x_60); + x_63 = lean_box(0); +} +x_64 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_64, 0, x_33); +lean_ctor_set(x_64, 1, x_61); +if (lean_is_scalar(x_63)) { + x_65 = lean_alloc_ctor(0, 2, 0); +} else { + x_65 = x_63; +} +lean_ctor_set(x_65, 0, x_64); +lean_ctor_set(x_65, 1, x_62); +return x_65; +} +else +{ +lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; +lean_dec(x_33); +x_66 = lean_ctor_get(x_60, 0); +lean_inc(x_66); +x_67 = lean_ctor_get(x_60, 1); +lean_inc(x_67); +if (lean_is_exclusive(x_60)) { + lean_ctor_release(x_60, 0); + lean_ctor_release(x_60, 1); + x_68 = x_60; +} else { + lean_dec_ref(x_60); + x_68 = lean_box(0); +} +if (lean_is_scalar(x_68)) { + x_69 = lean_alloc_ctor(1, 2, 0); +} else { + x_69 = x_68; +} +lean_ctor_set(x_69, 0, x_66); +lean_ctor_set(x_69, 1, x_67); +return x_69; +} +} +} +else +{ +uint8_t x_70; +lean_dec(x_26); +lean_dec(x_25); +lean_dec(x_12); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_70 = !lean_is_exclusive(x_28); +if (x_70 == 0) +{ +return x_28; +} +else +{ +lean_object* x_71; lean_object* x_72; lean_object* x_73; +x_71 = lean_ctor_get(x_28, 0); +x_72 = lean_ctor_get(x_28, 1); +lean_inc(x_72); +lean_inc(x_71); +lean_dec(x_28); +x_73 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_73, 0, x_71); +lean_ctor_set(x_73, 1, x_72); +return x_73; +} +} +} +} +} +else +{ +lean_object* x_74; lean_object* x_75; +lean_dec(x_9); +lean_dec(x_2); +lean_dec(x_1); +x_74 = l_Lean_Compiler_LCNF_trivialStructToMono___closed__8; +x_75 = l_panic___at_Lean_Compiler_LCNF_trivialStructToMono___spec__1(x_74, x_3, x_4, x_5, x_6, x_7, x_8); +return x_75; +} +} +} +} +static lean_object* _init_l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_decToMono___spec__1___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = lean_unsigned_to_nat(0u); +x_2 = lean_mk_empty_array_with_capacity(x_1); +return x_2; +} +} +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_decToMono___spec__1(size_t x_1, size_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +_start: +{ +uint8_t x_10; +x_10 = lean_usize_dec_lt(x_2, x_1); +if (x_10 == 0) +{ +lean_object* x_11; +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +x_11 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_11, 0, x_3); +lean_ctor_set(x_11, 1, x_9); +return x_11; +} +else +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_12 = lean_array_uget(x_3, x_2); +x_13 = lean_unsigned_to_nat(0u); +x_14 = lean_array_uset(x_3, x_2, x_13); if (lean_obj_tag(x_12) == 0) { -lean_object* x_13; lean_object* x_14; lean_object* x_15; -x_13 = lean_ctor_get(x_12, 0); -lean_inc(x_13); -x_14 = lean_ctor_get(x_12, 1); -lean_inc(x_14); -lean_dec(x_12); -x_15 = l_Lean_Compiler_LCNF_Code_toMono(x_8, x_2, x_3, x_4, x_5, x_14); -if (lean_obj_tag(x_15) == 0) +uint8_t x_22; +x_22 = !lean_is_exclusive(x_12); +if (x_22 == 0) { -uint8_t x_16; -x_16 = !lean_is_exclusive(x_15); -if (x_16 == 0) +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; uint8_t x_29; lean_object* x_30; +x_23 = lean_ctor_get(x_12, 0); +x_24 = lean_ctor_get(x_12, 1); +x_25 = lean_ctor_get(x_12, 2); +x_26 = l_Lean_Compiler_LCNF_eraseParams(x_24, x_5, x_6, x_7, x_8, x_9); +lean_dec(x_24); +x_27 = lean_ctor_get(x_26, 1); +lean_inc(x_27); +lean_dec(x_26); +x_28 = l_Lean_Expr_toMono___closed__6; +x_29 = lean_name_eq(x_23, x_28); +lean_dec(x_23); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +x_30 = l_Lean_Compiler_LCNF_Code_toMono(x_25, x_4, x_5, x_6, x_7, x_8, x_27); +if (x_29 == 0) { -lean_object* x_17; lean_object* x_18; -x_17 = lean_ctor_get(x_15, 0); -x_18 = l___private_Lean_Compiler_LCNF_Basic_0__Lean_Compiler_LCNF_updateAltImp(x_1, x_13, x_17); -lean_ctor_set(x_15, 0, x_18); -return x_15; +if (lean_obj_tag(x_30) == 0) +{ +lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; +x_31 = lean_ctor_get(x_30, 0); +lean_inc(x_31); +x_32 = lean_ctor_get(x_30, 1); +lean_inc(x_32); +lean_dec(x_30); +x_33 = l_Lean_Expr_toMono___closed__12; +x_34 = l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_decToMono___spec__1___closed__1; +lean_ctor_set(x_12, 2, x_31); +lean_ctor_set(x_12, 1, x_34); +lean_ctor_set(x_12, 0, x_33); +x_15 = x_12; +x_16 = x_32; +goto block_21; } else { -lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; -x_19 = lean_ctor_get(x_15, 0); -x_20 = lean_ctor_get(x_15, 1); -lean_inc(x_20); -lean_inc(x_19); -lean_dec(x_15); -x_21 = l___private_Lean_Compiler_LCNF_Basic_0__Lean_Compiler_LCNF_updateAltImp(x_1, x_13, x_19); -x_22 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_22, 0, x_21); -lean_ctor_set(x_22, 1, x_20); -return x_22; -} -} -else -{ -uint8_t x_23; -lean_dec(x_13); -lean_dec(x_1); -x_23 = !lean_is_exclusive(x_15); -if (x_23 == 0) -{ -return x_15; -} -else -{ -lean_object* x_24; lean_object* x_25; lean_object* x_26; -x_24 = lean_ctor_get(x_15, 0); -x_25 = lean_ctor_get(x_15, 1); -lean_inc(x_25); -lean_inc(x_24); -lean_dec(x_15); -x_26 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_26, 0, x_24); -lean_ctor_set(x_26, 1, x_25); -return x_26; -} -} -} -else -{ -uint8_t x_27; +uint8_t x_35; +lean_free_object(x_12); +lean_dec(x_14); lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_27 = !lean_is_exclusive(x_12); -if (x_27 == 0) +x_35 = !lean_is_exclusive(x_30); +if (x_35 == 0) { -return x_12; -} -else -{ -lean_object* x_28; lean_object* x_29; lean_object* x_30; -x_28 = lean_ctor_get(x_12, 0); -x_29 = lean_ctor_get(x_12, 1); -lean_inc(x_29); -lean_inc(x_28); -lean_dec(x_12); -x_30 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_30, 0, x_28); -lean_ctor_set(x_30, 1, x_29); return x_30; } -} -} else { -lean_object* x_31; lean_object* x_32; -x_31 = lean_ctor_get(x_1, 0); -lean_inc(x_31); -x_32 = l_Lean_Compiler_LCNF_Code_toMono(x_31, x_2, x_3, x_4, x_5, x_6); -if (lean_obj_tag(x_32) == 0) -{ -uint8_t x_33; -x_33 = !lean_is_exclusive(x_32); -if (x_33 == 0) -{ -lean_object* x_34; lean_object* x_35; -x_34 = lean_ctor_get(x_32, 0); -x_35 = l___private_Lean_Compiler_LCNF_Basic_0__Lean_Compiler_LCNF_updateAltCodeImp(x_1, x_34); -lean_ctor_set(x_32, 0, x_35); -return x_32; -} -else -{ -lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; -x_36 = lean_ctor_get(x_32, 0); -x_37 = lean_ctor_get(x_32, 1); +lean_object* x_36; lean_object* x_37; lean_object* x_38; +x_36 = lean_ctor_get(x_30, 0); +x_37 = lean_ctor_get(x_30, 1); lean_inc(x_37); lean_inc(x_36); -lean_dec(x_32); -x_38 = l___private_Lean_Compiler_LCNF_Basic_0__Lean_Compiler_LCNF_updateAltCodeImp(x_1, x_36); -x_39 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_39, 0, x_38); -lean_ctor_set(x_39, 1, x_37); -return x_39; +lean_dec(x_30); +x_38 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_38, 0, x_36); +lean_ctor_set(x_38, 1, x_37); +return x_38; +} } } else { -uint8_t x_40; -lean_dec(x_1); -x_40 = !lean_is_exclusive(x_32); -if (x_40 == 0) +if (lean_obj_tag(x_30) == 0) { -return x_32; +lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; +x_39 = lean_ctor_get(x_30, 0); +lean_inc(x_39); +x_40 = lean_ctor_get(x_30, 1); +lean_inc(x_40); +lean_dec(x_30); +x_41 = l_Lean_Expr_toMono___closed__15; +x_42 = l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_decToMono___spec__1___closed__1; +lean_ctor_set(x_12, 2, x_39); +lean_ctor_set(x_12, 1, x_42); +lean_ctor_set(x_12, 0, x_41); +x_15 = x_12; +x_16 = x_40; +goto block_21; } else { -lean_object* x_41; lean_object* x_42; lean_object* x_43; -x_41 = lean_ctor_get(x_32, 0); -x_42 = lean_ctor_get(x_32, 1); -lean_inc(x_42); -lean_inc(x_41); -lean_dec(x_32); -x_43 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_43, 0, x_41); -lean_ctor_set(x_43, 1, x_42); -return x_43; -} -} -} -} -} -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_FunDeclCore_toMono___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { -_start: -{ -size_t x_9; size_t x_10; lean_object* x_11; -x_9 = lean_unbox_usize(x_1); -lean_dec(x_1); -x_10 = lean_unbox_usize(x_2); -lean_dec(x_2); -x_11 = l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_FunDeclCore_toMono___spec__1(x_9, x_10, x_3, x_4, x_5, x_6, x_7, x_8); +uint8_t x_43; +lean_free_object(x_12); +lean_dec(x_14); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); -return x_11; -} -} -LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_Code_toMono___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { -_start: +x_43 = !lean_is_exclusive(x_30); +if (x_43 == 0) { -size_t x_9; size_t x_10; lean_object* x_11; -x_9 = lean_unbox_usize(x_1); -lean_dec(x_1); -x_10 = lean_unbox_usize(x_2); -lean_dec(x_2); -x_11 = l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_Code_toMono___spec__1(x_9, x_10, x_3, x_4, x_5, x_6, x_7, x_8); -return x_11; -} -} -LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Decl_toMono(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { -_start: -{ -uint8_t x_7; -x_7 = !lean_is_exclusive(x_1); -if (x_7 == 0) -{ -lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; -x_8 = lean_ctor_get(x_1, 0); -x_9 = lean_ctor_get(x_1, 2); -x_10 = lean_ctor_get(x_1, 3); -x_11 = lean_ctor_get(x_1, 4); -x_12 = lean_ctor_get(x_1, 1); -lean_dec(x_12); -lean_inc(x_5); -lean_inc(x_4); -x_13 = l_Lean_Compiler_LCNF_toMonoType(x_9, x_4, x_5, x_6); -if (lean_obj_tag(x_13) == 0) -{ -lean_object* x_14; lean_object* x_15; lean_object* x_16; size_t x_17; size_t x_18; lean_object* x_19; -x_14 = lean_ctor_get(x_13, 0); -lean_inc(x_14); -x_15 = lean_ctor_get(x_13, 1); -lean_inc(x_15); -lean_dec(x_13); -x_16 = lean_array_get_size(x_10); -x_17 = lean_usize_of_nat(x_16); -lean_dec(x_16); -x_18 = 0; -lean_inc(x_5); -lean_inc(x_4); -x_19 = l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_FunDeclCore_toMono___spec__1(x_17, x_18, x_10, x_2, x_3, x_4, x_5, x_15); -if (lean_obj_tag(x_19) == 0) -{ -lean_object* x_20; lean_object* x_21; lean_object* x_22; -x_20 = lean_ctor_get(x_19, 0); -lean_inc(x_20); -x_21 = lean_ctor_get(x_19, 1); -lean_inc(x_21); -lean_dec(x_19); -x_22 = l_Lean_Compiler_LCNF_Code_toMono(x_11, x_2, x_3, x_4, x_5, x_21); -if (lean_obj_tag(x_22) == 0) -{ -uint8_t x_23; -x_23 = !lean_is_exclusive(x_22); -if (x_23 == 0) -{ -lean_object* x_24; lean_object* x_25; -x_24 = lean_ctor_get(x_22, 0); -x_25 = lean_box(0); -lean_ctor_set(x_1, 4, x_24); -lean_ctor_set(x_1, 3, x_20); -lean_ctor_set(x_1, 2, x_14); -lean_ctor_set(x_1, 1, x_25); -lean_ctor_set(x_22, 0, x_1); -return x_22; +return x_30; } else { -lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; -x_26 = lean_ctor_get(x_22, 0); -x_27 = lean_ctor_get(x_22, 1); -lean_inc(x_27); +lean_object* x_44; lean_object* x_45; lean_object* x_46; +x_44 = lean_ctor_get(x_30, 0); +x_45 = lean_ctor_get(x_30, 1); +lean_inc(x_45); +lean_inc(x_44); +lean_dec(x_30); +x_46 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_46, 0, x_44); +lean_ctor_set(x_46, 1, x_45); +return x_46; +} +} +} +} +else +{ +lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; uint8_t x_53; lean_object* x_54; +x_47 = lean_ctor_get(x_12, 0); +x_48 = lean_ctor_get(x_12, 1); +x_49 = lean_ctor_get(x_12, 2); +lean_inc(x_49); +lean_inc(x_48); +lean_inc(x_47); +lean_dec(x_12); +x_50 = l_Lean_Compiler_LCNF_eraseParams(x_48, x_5, x_6, x_7, x_8, x_9); +lean_dec(x_48); +x_51 = lean_ctor_get(x_50, 1); +lean_inc(x_51); +lean_dec(x_50); +x_52 = l_Lean_Expr_toMono___closed__6; +x_53 = lean_name_eq(x_47, x_52); +lean_dec(x_47); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +x_54 = l_Lean_Compiler_LCNF_Code_toMono(x_49, x_4, x_5, x_6, x_7, x_8, x_51); +if (x_53 == 0) +{ +if (lean_obj_tag(x_54) == 0) +{ +lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; +x_55 = lean_ctor_get(x_54, 0); +lean_inc(x_55); +x_56 = lean_ctor_get(x_54, 1); +lean_inc(x_56); +lean_dec(x_54); +x_57 = l_Lean_Expr_toMono___closed__12; +x_58 = l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_decToMono___spec__1___closed__1; +x_59 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_59, 0, x_57); +lean_ctor_set(x_59, 1, x_58); +lean_ctor_set(x_59, 2, x_55); +x_15 = x_59; +x_16 = x_56; +goto block_21; +} +else +{ +lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; +lean_dec(x_14); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +x_60 = lean_ctor_get(x_54, 0); +lean_inc(x_60); +x_61 = lean_ctor_get(x_54, 1); +lean_inc(x_61); +if (lean_is_exclusive(x_54)) { + lean_ctor_release(x_54, 0); + lean_ctor_release(x_54, 1); + x_62 = x_54; +} else { + lean_dec_ref(x_54); + x_62 = lean_box(0); +} +if (lean_is_scalar(x_62)) { + x_63 = lean_alloc_ctor(1, 2, 0); +} else { + x_63 = x_62; +} +lean_ctor_set(x_63, 0, x_60); +lean_ctor_set(x_63, 1, x_61); +return x_63; +} +} +else +{ +if (lean_obj_tag(x_54) == 0) +{ +lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; +x_64 = lean_ctor_get(x_54, 0); +lean_inc(x_64); +x_65 = lean_ctor_get(x_54, 1); +lean_inc(x_65); +lean_dec(x_54); +x_66 = l_Lean_Expr_toMono___closed__15; +x_67 = l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_decToMono___spec__1___closed__1; +x_68 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_68, 0, x_66); +lean_ctor_set(x_68, 1, x_67); +lean_ctor_set(x_68, 2, x_64); +x_15 = x_68; +x_16 = x_65; +goto block_21; +} +else +{ +lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; +lean_dec(x_14); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +x_69 = lean_ctor_get(x_54, 0); +lean_inc(x_69); +x_70 = lean_ctor_get(x_54, 1); +lean_inc(x_70); +if (lean_is_exclusive(x_54)) { + lean_ctor_release(x_54, 0); + lean_ctor_release(x_54, 1); + x_71 = x_54; +} else { + lean_dec_ref(x_54); + x_71 = lean_box(0); +} +if (lean_is_scalar(x_71)) { + x_72 = lean_alloc_ctor(1, 2, 0); +} else { + x_72 = x_71; +} +lean_ctor_set(x_72, 0, x_69); +lean_ctor_set(x_72, 1, x_70); +return x_72; +} +} +} +} +else +{ +lean_object* x_73; lean_object* x_74; +x_73 = lean_ctor_get(x_12, 0); +lean_inc(x_73); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +x_74 = l_Lean_Compiler_LCNF_Code_toMono(x_73, x_4, x_5, x_6, x_7, x_8, x_9); +if (lean_obj_tag(x_74) == 0) +{ +lean_object* x_75; lean_object* x_76; lean_object* x_77; +x_75 = lean_ctor_get(x_74, 0); +lean_inc(x_75); +x_76 = lean_ctor_get(x_74, 1); +lean_inc(x_76); +lean_dec(x_74); +x_77 = l___private_Lean_Compiler_LCNF_Basic_0__Lean_Compiler_LCNF_updateAltCodeImp(x_12, x_75); +x_15 = x_77; +x_16 = x_76; +goto block_21; +} +else +{ +uint8_t x_78; +lean_dec(x_14); +lean_dec(x_12); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +x_78 = !lean_is_exclusive(x_74); +if (x_78 == 0) +{ +return x_74; +} +else +{ +lean_object* x_79; lean_object* x_80; lean_object* x_81; +x_79 = lean_ctor_get(x_74, 0); +x_80 = lean_ctor_get(x_74, 1); +lean_inc(x_80); +lean_inc(x_79); +lean_dec(x_74); +x_81 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_81, 0, x_79); +lean_ctor_set(x_81, 1, x_80); +return x_81; +} +} +} +block_21: +{ +size_t x_17; size_t x_18; lean_object* x_19; +x_17 = 1; +x_18 = lean_usize_add(x_2, x_17); +x_19 = lean_array_uset(x_14, x_2, x_15); +x_2 = x_18; +x_3 = x_19; +x_9 = x_16; +goto _start; +} +} +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_decToMono___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Expr_toMono___closed__10; +x_3 = l_Lean_Name_str___override(x_1, x_2); +return x_3; +} +} +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_decToMono(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +uint8_t x_9; +x_9 = !lean_is_exclusive(x_1); +if (x_9 == 0) +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; +x_10 = lean_ctor_get(x_1, 1); +x_11 = lean_ctor_get(x_1, 2); +x_12 = lean_ctor_get(x_1, 3); +x_13 = lean_ctor_get(x_1, 0); +lean_dec(x_13); +lean_inc(x_7); +lean_inc(x_6); +x_14 = l_Lean_Compiler_LCNF_toMonoType(x_10, x_6, x_7, x_8); +if (lean_obj_tag(x_14) == 0) +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; size_t x_18; size_t x_19; lean_object* x_20; +x_15 = lean_ctor_get(x_14, 0); +lean_inc(x_15); +x_16 = lean_ctor_get(x_14, 1); +lean_inc(x_16); +lean_dec(x_14); +x_17 = lean_array_get_size(x_12); +x_18 = lean_usize_of_nat(x_17); +lean_dec(x_17); +x_19 = 0; +x_20 = l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_decToMono___spec__1(x_18, x_19, x_12, x_3, x_4, x_5, x_6, x_7, x_16); +if (lean_obj_tag(x_20) == 0) +{ +uint8_t x_21; +x_21 = !lean_is_exclusive(x_20); +if (x_21 == 0) +{ +lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_22 = lean_ctor_get(x_20, 0); +x_23 = l_Lean_Compiler_LCNF_decToMono___closed__1; +lean_ctor_set(x_1, 3, x_22); +lean_ctor_set(x_1, 1, x_15); +lean_ctor_set(x_1, 0, x_23); +x_24 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_24, 0, x_1); +lean_ctor_set(x_20, 0, x_24); +return x_20; +} +else +{ +lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_25 = lean_ctor_get(x_20, 0); +x_26 = lean_ctor_get(x_20, 1); lean_inc(x_26); -lean_dec(x_22); -x_28 = lean_box(0); -lean_ctor_set(x_1, 4, x_26); -lean_ctor_set(x_1, 3, x_20); -lean_ctor_set(x_1, 2, x_14); -lean_ctor_set(x_1, 1, x_28); +lean_inc(x_25); +lean_dec(x_20); +x_27 = l_Lean_Compiler_LCNF_decToMono___closed__1; +lean_ctor_set(x_1, 3, x_25); +lean_ctor_set(x_1, 1, x_15); +lean_ctor_set(x_1, 0, x_27); +x_28 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_28, 0, x_1); x_29 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_29, 0, x_1); -lean_ctor_set(x_29, 1, x_27); +lean_ctor_set(x_29, 0, x_28); +lean_ctor_set(x_29, 1, x_26); return x_29; } } else { uint8_t x_30; -lean_dec(x_20); -lean_dec(x_14); +lean_dec(x_15); lean_free_object(x_1); -lean_dec(x_8); -x_30 = !lean_is_exclusive(x_22); +lean_dec(x_11); +x_30 = !lean_is_exclusive(x_20); if (x_30 == 0) { -return x_22; +return x_20; } else { lean_object* x_31; lean_object* x_32; lean_object* x_33; -x_31 = lean_ctor_get(x_22, 0); -x_32 = lean_ctor_get(x_22, 1); +x_31 = lean_ctor_get(x_20, 0); +x_32 = lean_ctor_get(x_20, 1); lean_inc(x_32); lean_inc(x_31); -lean_dec(x_22); +lean_dec(x_20); x_33 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_33, 0, x_31); lean_ctor_set(x_33, 1, x_32); @@ -2890,27 +5156,27 @@ return x_33; else { uint8_t x_34; -lean_dec(x_14); lean_free_object(x_1); +lean_dec(x_12); lean_dec(x_11); -lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); -lean_dec(x_2); -x_34 = !lean_is_exclusive(x_19); +x_34 = !lean_is_exclusive(x_14); if (x_34 == 0) { -return x_19; +return x_14; } else { lean_object* x_35; lean_object* x_36; lean_object* x_37; -x_35 = lean_ctor_get(x_19, 0); -x_36 = lean_ctor_get(x_19, 1); +x_35 = lean_ctor_get(x_14, 0); +x_36 = lean_ctor_get(x_14, 1); lean_inc(x_36); lean_inc(x_35); -lean_dec(x_19); +lean_dec(x_14); x_37 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_37, 0, x_35); lean_ctor_set(x_37, 1, x_36); @@ -2920,157 +5186,440 @@ return x_37; } else { -uint8_t x_38; +lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; +x_38 = lean_ctor_get(x_1, 1); +x_39 = lean_ctor_get(x_1, 2); +x_40 = lean_ctor_get(x_1, 3); +lean_inc(x_40); +lean_inc(x_39); +lean_inc(x_38); +lean_dec(x_1); +lean_inc(x_7); +lean_inc(x_6); +x_41 = l_Lean_Compiler_LCNF_toMonoType(x_38, x_6, x_7, x_8); +if (lean_obj_tag(x_41) == 0) +{ +lean_object* x_42; lean_object* x_43; lean_object* x_44; size_t x_45; size_t x_46; lean_object* x_47; +x_42 = lean_ctor_get(x_41, 0); +lean_inc(x_42); +x_43 = lean_ctor_get(x_41, 1); +lean_inc(x_43); +lean_dec(x_41); +x_44 = lean_array_get_size(x_40); +x_45 = lean_usize_of_nat(x_44); +lean_dec(x_44); +x_46 = 0; +x_47 = l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_decToMono___spec__1(x_45, x_46, x_40, x_3, x_4, x_5, x_6, x_7, x_43); +if (lean_obj_tag(x_47) == 0) +{ +lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; +x_48 = lean_ctor_get(x_47, 0); +lean_inc(x_48); +x_49 = lean_ctor_get(x_47, 1); +lean_inc(x_49); +if (lean_is_exclusive(x_47)) { + lean_ctor_release(x_47, 0); + lean_ctor_release(x_47, 1); + x_50 = x_47; +} else { + lean_dec_ref(x_47); + x_50 = lean_box(0); +} +x_51 = l_Lean_Compiler_LCNF_decToMono___closed__1; +x_52 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_52, 0, x_51); +lean_ctor_set(x_52, 1, x_42); +lean_ctor_set(x_52, 2, x_39); +lean_ctor_set(x_52, 3, x_48); +x_53 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_53, 0, x_52); +if (lean_is_scalar(x_50)) { + x_54 = lean_alloc_ctor(0, 2, 0); +} else { + x_54 = x_50; +} +lean_ctor_set(x_54, 0, x_53); +lean_ctor_set(x_54, 1, x_49); +return x_54; +} +else +{ +lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; +lean_dec(x_42); +lean_dec(x_39); +x_55 = lean_ctor_get(x_47, 0); +lean_inc(x_55); +x_56 = lean_ctor_get(x_47, 1); +lean_inc(x_56); +if (lean_is_exclusive(x_47)) { + lean_ctor_release(x_47, 0); + lean_ctor_release(x_47, 1); + x_57 = x_47; +} else { + lean_dec_ref(x_47); + x_57 = lean_box(0); +} +if (lean_is_scalar(x_57)) { + x_58 = lean_alloc_ctor(1, 2, 0); +} else { + x_58 = x_57; +} +lean_ctor_set(x_58, 0, x_55); +lean_ctor_set(x_58, 1, x_56); +return x_58; +} +} +else +{ +lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; +lean_dec(x_40); +lean_dec(x_39); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +x_59 = lean_ctor_get(x_41, 0); +lean_inc(x_59); +x_60 = lean_ctor_get(x_41, 1); +lean_inc(x_60); +if (lean_is_exclusive(x_41)) { + lean_ctor_release(x_41, 0); + lean_ctor_release(x_41, 1); + x_61 = x_41; +} else { + lean_dec_ref(x_41); + x_61 = lean_box(0); +} +if (lean_is_scalar(x_61)) { + x_62 = lean_alloc_ctor(1, 2, 0); +} else { + x_62 = x_61; +} +lean_ctor_set(x_62, 0, x_59); +lean_ctor_set(x_62, 1, x_60); +return x_62; +} +} +} +} +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_FunDeclCore_toMono___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +_start: +{ +size_t x_10; size_t x_11; lean_object* x_12; +x_10 = lean_unbox_usize(x_1); +lean_dec(x_1); +x_11 = lean_unbox_usize(x_2); +lean_dec(x_2); +x_12 = l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_FunDeclCore_toMono___spec__1(x_10, x_11, x_3, x_4, x_5, x_6, x_7, x_8, x_9); +return x_12; +} +} +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_Code_toMono___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +_start: +{ +size_t x_10; size_t x_11; lean_object* x_12; +x_10 = lean_unbox_usize(x_1); +lean_dec(x_1); +x_11 = lean_unbox_usize(x_2); +lean_dec(x_2); +x_12 = l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_Code_toMono___spec__1(x_10, x_11, x_3, x_4, x_5, x_6, x_7, x_8, x_9); +return x_12; +} +} +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_decToMono___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +_start: +{ +size_t x_10; size_t x_11; lean_object* x_12; +x_10 = lean_unbox_usize(x_1); +lean_dec(x_1); +x_11 = lean_unbox_usize(x_2); +lean_dec(x_2); +x_12 = l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_decToMono___spec__1(x_10, x_11, x_3, x_4, x_5, x_6, x_7, x_8, x_9); +return x_12; +} +} +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Decl_toMono_go(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +uint8_t x_8; +x_8 = !lean_is_exclusive(x_1); +if (x_8 == 0) +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; +x_9 = lean_ctor_get(x_1, 0); +x_10 = lean_ctor_get(x_1, 2); +x_11 = lean_ctor_get(x_1, 3); +x_12 = lean_ctor_get(x_1, 4); +x_13 = lean_ctor_get(x_1, 1); +lean_dec(x_13); +lean_inc(x_6); +lean_inc(x_5); +x_14 = l_Lean_Compiler_LCNF_toMonoType(x_10, x_5, x_6, x_7); +if (lean_obj_tag(x_14) == 0) +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; size_t x_18; size_t x_19; lean_object* x_20; +x_15 = lean_ctor_get(x_14, 0); +lean_inc(x_15); +x_16 = lean_ctor_get(x_14, 1); +lean_inc(x_16); +lean_dec(x_14); +x_17 = lean_array_get_size(x_11); +x_18 = lean_usize_of_nat(x_17); +lean_dec(x_17); +x_19 = 0; +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_2); +x_20 = l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_FunDeclCore_toMono___spec__1(x_18, x_19, x_11, x_2, x_3, x_4, x_5, x_6, x_16); +if (lean_obj_tag(x_20) == 0) +{ +lean_object* x_21; lean_object* x_22; lean_object* x_23; +x_21 = lean_ctor_get(x_20, 0); +lean_inc(x_21); +x_22 = lean_ctor_get(x_20, 1); +lean_inc(x_22); +lean_dec(x_20); +lean_inc(x_6); +lean_inc(x_5); +x_23 = l_Lean_Compiler_LCNF_Code_toMono(x_12, x_2, x_3, x_4, x_5, x_6, x_22); +if (lean_obj_tag(x_23) == 0) +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; uint8_t x_28; +x_24 = lean_ctor_get(x_23, 0); +lean_inc(x_24); +x_25 = lean_ctor_get(x_23, 1); +lean_inc(x_25); +lean_dec(x_23); +x_26 = lean_box(0); +lean_ctor_set(x_1, 4, x_24); +lean_ctor_set(x_1, 3, x_21); +lean_ctor_set(x_1, 2, x_15); +lean_ctor_set(x_1, 1, x_26); +lean_inc(x_1); +x_27 = l_Lean_Compiler_LCNF_Decl_saveMono(x_1, x_5, x_6, x_25); +lean_dec(x_6); +lean_dec(x_5); +x_28 = !lean_is_exclusive(x_27); +if (x_28 == 0) +{ +lean_object* x_29; +x_29 = lean_ctor_get(x_27, 0); +lean_dec(x_29); +lean_ctor_set(x_27, 0, x_1); +return x_27; +} +else +{ +lean_object* x_30; lean_object* x_31; +x_30 = lean_ctor_get(x_27, 1); +lean_inc(x_30); +lean_dec(x_27); +x_31 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_31, 0, x_1); +lean_ctor_set(x_31, 1, x_30); +return x_31; +} +} +else +{ +uint8_t x_32; +lean_dec(x_21); +lean_dec(x_15); lean_free_object(x_1); -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_8); +lean_dec(x_9); +lean_dec(x_6); +lean_dec(x_5); +x_32 = !lean_is_exclusive(x_23); +if (x_32 == 0) +{ +return x_23; +} +else +{ +lean_object* x_33; lean_object* x_34; lean_object* x_35; +x_33 = lean_ctor_get(x_23, 0); +x_34 = lean_ctor_get(x_23, 1); +lean_inc(x_34); +lean_inc(x_33); +lean_dec(x_23); +x_35 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_35, 0, x_33); +lean_ctor_set(x_35, 1, x_34); +return x_35; +} +} +} +else +{ +uint8_t x_36; +lean_dec(x_15); +lean_free_object(x_1); +lean_dec(x_12); +lean_dec(x_9); +lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); -x_38 = !lean_is_exclusive(x_13); -if (x_38 == 0) +x_36 = !lean_is_exclusive(x_20); +if (x_36 == 0) { -return x_13; +return x_20; } else { -lean_object* x_39; lean_object* x_40; lean_object* x_41; -x_39 = lean_ctor_get(x_13, 0); -x_40 = lean_ctor_get(x_13, 1); -lean_inc(x_40); -lean_inc(x_39); -lean_dec(x_13); -x_41 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_41, 0, x_39); -lean_ctor_set(x_41, 1, x_40); -return x_41; +lean_object* x_37; lean_object* x_38; lean_object* x_39; +x_37 = lean_ctor_get(x_20, 0); +x_38 = lean_ctor_get(x_20, 1); +lean_inc(x_38); +lean_inc(x_37); +lean_dec(x_20); +x_39 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_39, 0, x_37); +lean_ctor_set(x_39, 1, x_38); +return x_39; } } } else { -lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; uint8_t x_46; uint8_t x_47; lean_object* x_48; -x_42 = lean_ctor_get(x_1, 0); -x_43 = lean_ctor_get(x_1, 2); -x_44 = lean_ctor_get(x_1, 3); -x_45 = lean_ctor_get(x_1, 4); -x_46 = lean_ctor_get_uint8(x_1, sizeof(void*)*5); -x_47 = lean_ctor_get_uint8(x_1, sizeof(void*)*5 + 1); +uint8_t x_40; +lean_free_object(x_1); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_9); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_40 = !lean_is_exclusive(x_14); +if (x_40 == 0) +{ +return x_14; +} +else +{ +lean_object* x_41; lean_object* x_42; lean_object* x_43; +x_41 = lean_ctor_get(x_14, 0); +x_42 = lean_ctor_get(x_14, 1); +lean_inc(x_42); +lean_inc(x_41); +lean_dec(x_14); +x_43 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_43, 0, x_41); +lean_ctor_set(x_43, 1, x_42); +return x_43; +} +} +} +else +{ +lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; uint8_t x_48; uint8_t x_49; lean_object* x_50; +x_44 = lean_ctor_get(x_1, 0); +x_45 = lean_ctor_get(x_1, 2); +x_46 = lean_ctor_get(x_1, 3); +x_47 = lean_ctor_get(x_1, 4); +x_48 = lean_ctor_get_uint8(x_1, sizeof(void*)*5); +x_49 = lean_ctor_get_uint8(x_1, sizeof(void*)*5 + 1); +lean_inc(x_47); +lean_inc(x_46); lean_inc(x_45); lean_inc(x_44); -lean_inc(x_43); -lean_inc(x_42); lean_dec(x_1); +lean_inc(x_6); +lean_inc(x_5); +x_50 = l_Lean_Compiler_LCNF_toMonoType(x_45, x_5, x_6, x_7); +if (lean_obj_tag(x_50) == 0) +{ +lean_object* x_51; lean_object* x_52; lean_object* x_53; size_t x_54; size_t x_55; lean_object* x_56; +x_51 = lean_ctor_get(x_50, 0); +lean_inc(x_51); +x_52 = lean_ctor_get(x_50, 1); +lean_inc(x_52); +lean_dec(x_50); +x_53 = lean_array_get_size(x_46); +x_54 = lean_usize_of_nat(x_53); +lean_dec(x_53); +x_55 = 0; +lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); -x_48 = l_Lean_Compiler_LCNF_toMonoType(x_43, x_4, x_5, x_6); -if (lean_obj_tag(x_48) == 0) +lean_inc(x_3); +lean_inc(x_2); +x_56 = l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_FunDeclCore_toMono___spec__1(x_54, x_55, x_46, x_2, x_3, x_4, x_5, x_6, x_52); +if (lean_obj_tag(x_56) == 0) { -lean_object* x_49; lean_object* x_50; lean_object* x_51; size_t x_52; size_t x_53; lean_object* x_54; -x_49 = lean_ctor_get(x_48, 0); -lean_inc(x_49); -x_50 = lean_ctor_get(x_48, 1); -lean_inc(x_50); -lean_dec(x_48); -x_51 = lean_array_get_size(x_44); -x_52 = lean_usize_of_nat(x_51); -lean_dec(x_51); -x_53 = 0; -lean_inc(x_5); -lean_inc(x_4); -x_54 = l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_FunDeclCore_toMono___spec__1(x_52, x_53, x_44, x_2, x_3, x_4, x_5, x_50); -if (lean_obj_tag(x_54) == 0) -{ -lean_object* x_55; lean_object* x_56; lean_object* x_57; -x_55 = lean_ctor_get(x_54, 0); -lean_inc(x_55); -x_56 = lean_ctor_get(x_54, 1); -lean_inc(x_56); -lean_dec(x_54); -x_57 = l_Lean_Compiler_LCNF_Code_toMono(x_45, x_2, x_3, x_4, x_5, x_56); -if (lean_obj_tag(x_57) == 0) -{ -lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; -x_58 = lean_ctor_get(x_57, 0); +lean_object* x_57; lean_object* x_58; lean_object* x_59; +x_57 = lean_ctor_get(x_56, 0); +lean_inc(x_57); +x_58 = lean_ctor_get(x_56, 1); lean_inc(x_58); -x_59 = lean_ctor_get(x_57, 1); -lean_inc(x_59); -if (lean_is_exclusive(x_57)) { - lean_ctor_release(x_57, 0); - lean_ctor_release(x_57, 1); - x_60 = x_57; -} else { - lean_dec_ref(x_57); - x_60 = lean_box(0); -} -x_61 = lean_box(0); -x_62 = lean_alloc_ctor(0, 5, 2); -lean_ctor_set(x_62, 0, x_42); -lean_ctor_set(x_62, 1, x_61); -lean_ctor_set(x_62, 2, x_49); -lean_ctor_set(x_62, 3, x_55); -lean_ctor_set(x_62, 4, x_58); -lean_ctor_set_uint8(x_62, sizeof(void*)*5, x_46); -lean_ctor_set_uint8(x_62, sizeof(void*)*5 + 1, x_47); -if (lean_is_scalar(x_60)) { - x_63 = lean_alloc_ctor(0, 2, 0); -} else { - x_63 = x_60; -} -lean_ctor_set(x_63, 0, x_62); -lean_ctor_set(x_63, 1, x_59); -return x_63; -} -else +lean_dec(x_56); +lean_inc(x_6); +lean_inc(x_5); +x_59 = l_Lean_Compiler_LCNF_Code_toMono(x_47, x_2, x_3, x_4, x_5, x_6, x_58); +if (lean_obj_tag(x_59) == 0) { -lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; -lean_dec(x_55); -lean_dec(x_49); -lean_dec(x_42); -x_64 = lean_ctor_get(x_57, 0); -lean_inc(x_64); -x_65 = lean_ctor_get(x_57, 1); +lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; +x_60 = lean_ctor_get(x_59, 0); +lean_inc(x_60); +x_61 = lean_ctor_get(x_59, 1); +lean_inc(x_61); +lean_dec(x_59); +x_62 = lean_box(0); +x_63 = lean_alloc_ctor(0, 5, 2); +lean_ctor_set(x_63, 0, x_44); +lean_ctor_set(x_63, 1, x_62); +lean_ctor_set(x_63, 2, x_51); +lean_ctor_set(x_63, 3, x_57); +lean_ctor_set(x_63, 4, x_60); +lean_ctor_set_uint8(x_63, sizeof(void*)*5, x_48); +lean_ctor_set_uint8(x_63, sizeof(void*)*5 + 1, x_49); +lean_inc(x_63); +x_64 = l_Lean_Compiler_LCNF_Decl_saveMono(x_63, x_5, x_6, x_61); +lean_dec(x_6); +lean_dec(x_5); +x_65 = lean_ctor_get(x_64, 1); lean_inc(x_65); -if (lean_is_exclusive(x_57)) { - lean_ctor_release(x_57, 0); - lean_ctor_release(x_57, 1); - x_66 = x_57; +if (lean_is_exclusive(x_64)) { + lean_ctor_release(x_64, 0); + lean_ctor_release(x_64, 1); + x_66 = x_64; } else { - lean_dec_ref(x_57); + lean_dec_ref(x_64); x_66 = lean_box(0); } if (lean_is_scalar(x_66)) { - x_67 = lean_alloc_ctor(1, 2, 0); + x_67 = lean_alloc_ctor(0, 2, 0); } else { x_67 = x_66; } -lean_ctor_set(x_67, 0, x_64); +lean_ctor_set(x_67, 0, x_63); lean_ctor_set(x_67, 1, x_65); return x_67; } -} else { lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; -lean_dec(x_49); -lean_dec(x_45); -lean_dec(x_42); +lean_dec(x_57); +lean_dec(x_51); +lean_dec(x_44); +lean_dec(x_6); lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_68 = lean_ctor_get(x_54, 0); +x_68 = lean_ctor_get(x_59, 0); lean_inc(x_68); -x_69 = lean_ctor_get(x_54, 1); +x_69 = lean_ctor_get(x_59, 1); lean_inc(x_69); -if (lean_is_exclusive(x_54)) { - lean_ctor_release(x_54, 0); - lean_ctor_release(x_54, 1); - x_70 = x_54; +if (lean_is_exclusive(x_59)) { + lean_ctor_release(x_59, 0); + lean_ctor_release(x_59, 1); + x_70 = x_59; } else { - lean_dec_ref(x_54); + lean_dec_ref(x_59); x_70 = lean_box(0); } if (lean_is_scalar(x_70)) { @@ -3086,23 +5635,24 @@ return x_71; else { lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; -lean_dec(x_45); +lean_dec(x_51); +lean_dec(x_47); lean_dec(x_44); -lean_dec(x_42); +lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); -x_72 = lean_ctor_get(x_48, 0); +x_72 = lean_ctor_get(x_56, 0); lean_inc(x_72); -x_73 = lean_ctor_get(x_48, 1); +x_73 = lean_ctor_get(x_56, 1); lean_inc(x_73); -if (lean_is_exclusive(x_48)) { - lean_ctor_release(x_48, 0); - lean_ctor_release(x_48, 1); - x_74 = x_48; +if (lean_is_exclusive(x_56)) { + lean_ctor_release(x_56, 0); + lean_ctor_release(x_56, 1); + x_74 = x_56; } else { - lean_dec_ref(x_48); + lean_dec_ref(x_56); x_74 = lean_box(0); } if (lean_is_scalar(x_74)) { @@ -3115,6 +5665,297 @@ lean_ctor_set(x_75, 1, x_73); return x_75; } } +else +{ +lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; +lean_dec(x_47); +lean_dec(x_46); +lean_dec(x_44); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_76 = lean_ctor_get(x_50, 0); +lean_inc(x_76); +x_77 = lean_ctor_get(x_50, 1); +lean_inc(x_77); +if (lean_is_exclusive(x_50)) { + lean_ctor_release(x_50, 0); + lean_ctor_release(x_50, 1); + x_78 = x_50; +} else { + lean_dec_ref(x_50); + x_78 = lean_box(0); +} +if (lean_is_scalar(x_78)) { + x_79 = lean_alloc_ctor(1, 2, 0); +} else { + x_79 = x_78; +} +lean_ctor_set(x_79, 0, x_76); +lean_ctor_set(x_79, 1, x_77); +return x_79; +} +} +} +} +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Decl_toMono(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_7 = lean_box(0); +x_8 = lean_st_ref_get(x_5, x_6); +x_9 = lean_ctor_get(x_8, 1); +lean_inc(x_9); +lean_dec(x_8); +x_10 = lean_st_mk_ref(x_7, x_9); +x_11 = lean_ctor_get(x_10, 0); +lean_inc(x_11); +x_12 = lean_ctor_get(x_10, 1); +lean_inc(x_12); +lean_dec(x_10); +lean_inc(x_5); +lean_inc(x_11); +x_13 = l_Lean_Compiler_LCNF_Decl_toMono_go(x_1, x_11, x_2, x_3, x_4, x_5, x_12); +if (lean_obj_tag(x_13) == 0) +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; uint8_t x_19; +x_14 = lean_ctor_get(x_13, 0); +lean_inc(x_14); +x_15 = lean_ctor_get(x_13, 1); +lean_inc(x_15); +lean_dec(x_13); +x_16 = lean_st_ref_get(x_5, x_15); +lean_dec(x_5); +x_17 = lean_ctor_get(x_16, 1); +lean_inc(x_17); +lean_dec(x_16); +x_18 = lean_st_ref_get(x_11, x_17); +lean_dec(x_11); +x_19 = !lean_is_exclusive(x_18); +if (x_19 == 0) +{ +lean_object* x_20; +x_20 = lean_ctor_get(x_18, 0); +lean_dec(x_20); +lean_ctor_set(x_18, 0, x_14); +return x_18; +} +else +{ +lean_object* x_21; lean_object* x_22; +x_21 = lean_ctor_get(x_18, 1); +lean_inc(x_21); +lean_dec(x_18); +x_22 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_22, 0, x_14); +lean_ctor_set(x_22, 1, x_21); +return x_22; +} +} +else +{ +uint8_t x_23; +lean_dec(x_11); +lean_dec(x_5); +x_23 = !lean_is_exclusive(x_13); +if (x_23 == 0) +{ +return x_13; +} +else +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; +x_24 = lean_ctor_get(x_13, 0); +x_25 = lean_ctor_get(x_13, 1); +lean_inc(x_25); +lean_inc(x_24); +lean_dec(x_13); +x_26 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_26, 0, x_24); +lean_ctor_set(x_26, 1, x_25); +return x_26; +} +} +} +} +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_toMono___elambda__1___spec__1(size_t x_1, size_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +uint8_t x_9; +x_9 = lean_usize_dec_lt(x_2, x_1); +if (x_9 == 0) +{ +lean_object* x_10; +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +x_10 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_10, 0, x_3); +lean_ctor_set(x_10, 1, x_8); +return x_10; +} +else +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; +x_11 = lean_array_uget(x_3, x_2); +x_12 = lean_unsigned_to_nat(0u); +x_13 = lean_array_uset(x_3, x_2, x_12); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +x_14 = l_Lean_Compiler_LCNF_Decl_toMono(x_11, x_4, x_5, x_6, x_7, x_8); +if (lean_obj_tag(x_14) == 0) +{ +lean_object* x_15; lean_object* x_16; size_t x_17; size_t x_18; lean_object* x_19; +x_15 = lean_ctor_get(x_14, 0); +lean_inc(x_15); +x_16 = lean_ctor_get(x_14, 1); +lean_inc(x_16); +lean_dec(x_14); +x_17 = 1; +x_18 = lean_usize_add(x_2, x_17); +x_19 = lean_array_uset(x_13, x_2, x_15); +x_2 = x_18; +x_3 = x_19; +x_8 = x_16; +goto _start; +} +else +{ +uint8_t x_21; +lean_dec(x_13); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +x_21 = !lean_is_exclusive(x_14); +if (x_21 == 0) +{ +return x_14; +} +else +{ +lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_22 = lean_ctor_get(x_14, 0); +x_23 = lean_ctor_get(x_14, 1); +lean_inc(x_23); +lean_inc(x_22); +lean_dec(x_14); +x_24 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_24, 0, x_22); +lean_ctor_set(x_24, 1, x_23); +return x_24; +} +} +} +} +} +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_toMono___elambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; size_t x_8; size_t x_9; lean_object* x_10; +x_7 = lean_array_get_size(x_1); +x_8 = lean_usize_of_nat(x_7); +lean_dec(x_7); +x_9 = 0; +x_10 = l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_toMono___elambda__1___spec__1(x_8, x_9, x_1, x_2, x_3, x_4, x_5, x_6); +return x_10; +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_toMono___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("toMono", 6); +return x_1; +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_toMono___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Compiler_LCNF_toMono___closed__1; +x_3 = l_Lean_Name_str___override(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_toMono___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Compiler_LCNF_toMono___elambda__1), 6, 0); +return x_1; +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_toMono___closed__4() { +_start: +{ +lean_object* x_1; uint8_t x_2; uint8_t x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_1 = lean_unsigned_to_nat(0u); +x_2 = 0; +x_3 = 1; +x_4 = l_Lean_Compiler_LCNF_toMono___closed__2; +x_5 = l_Lean_Compiler_LCNF_toMono___closed__3; +x_6 = lean_alloc_ctor(0, 3, 2); +lean_ctor_set(x_6, 0, x_1); +lean_ctor_set(x_6, 1, x_4); +lean_ctor_set(x_6, 2, x_5); +lean_ctor_set_uint8(x_6, sizeof(void*)*3, x_2); +lean_ctor_set_uint8(x_6, sizeof(void*)*3 + 1, x_3); +return x_6; +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_toMono() { +_start: +{ +lean_object* x_1; +x_1 = l_Lean_Compiler_LCNF_toMono___closed__4; +return x_1; +} +} +LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_toMono___elambda__1___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +size_t x_9; size_t x_10; lean_object* x_11; +x_9 = lean_unbox_usize(x_1); +lean_dec(x_1); +x_10 = lean_unbox_usize(x_2); +lean_dec(x_2); +x_11 = l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_toMono___elambda__1___spec__1(x_9, x_10, x_3, x_4, x_5, x_6, x_7, x_8); +return x_11; +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_ToMono___hyg_1997____closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("Compiler", 8); +return x_1; +} +} +static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_ToMono___hyg_1997____closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_ToMono___hyg_1997____closed__1; +x_2 = l_Lean_Compiler_LCNF_toMono___closed__1; +x_3 = l_Lean_Name_mkStr2(x_1, x_2); +return x_3; +} +} +LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_ToMono___hyg_1997_(lean_object* x_1) { +_start: +{ +lean_object* x_2; uint8_t x_3; lean_object* x_4; +x_2 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_ToMono___hyg_1997____closed__2; +x_3 = 1; +x_4 = l_Lean_registerTraceClass(x_2, x_3, x_1); +return x_4; } } lean_object* initialize_Init(uint8_t builtin, lean_object*); @@ -3134,14 +5975,30 @@ lean_dec_ref(res); res = initialize_Lean_Compiler_LCNF_InferType(builtin, lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); -l_Lean_Expr_toMono___lambda__1___closed__1 = _init_l_Lean_Expr_toMono___lambda__1___closed__1(); -lean_mark_persistent(l_Lean_Expr_toMono___lambda__1___closed__1); -l_Lean_Expr_toMono___lambda__1___closed__2 = _init_l_Lean_Expr_toMono___lambda__1___closed__2(); -lean_mark_persistent(l_Lean_Expr_toMono___lambda__1___closed__2); -l_Lean_Expr_toMono___lambda__1___closed__3 = _init_l_Lean_Expr_toMono___lambda__1___closed__3(); -lean_mark_persistent(l_Lean_Expr_toMono___lambda__1___closed__3); -l_Lean_Expr_toMono___lambda__1___closed__4 = _init_l_Lean_Expr_toMono___lambda__1___closed__4(); -lean_mark_persistent(l_Lean_Expr_toMono___lambda__1___closed__4); +l_Lean_Compiler_LCNF_ToMonoM_State_typeParams___default = _init_l_Lean_Compiler_LCNF_ToMonoM_State_typeParams___default(); +lean_mark_persistent(l_Lean_Compiler_LCNF_ToMonoM_State_typeParams___default); +l_panic___at_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___spec__1___closed__1 = _init_l_panic___at_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___spec__1___closed__1(); +lean_mark_persistent(l_panic___at_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___spec__1___closed__1); +l_panic___at_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___spec__1___closed__2 = _init_l_panic___at_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___spec__1___closed__2(); +lean_mark_persistent(l_panic___at_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___spec__1___closed__2); +l_panic___at_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___spec__1___closed__3 = _init_l_panic___at_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___spec__1___closed__3(); +lean_mark_persistent(l_panic___at_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___spec__1___closed__3); +l_panic___at_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___spec__1___closed__4 = _init_l_panic___at_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___spec__1___closed__4(); +lean_mark_persistent(l_panic___at_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___spec__1___closed__4); +l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__1 = _init_l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__1(); +lean_mark_persistent(l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__1); +l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__2 = _init_l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__2(); +lean_mark_persistent(l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__2); +l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__3 = _init_l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__3(); +lean_mark_persistent(l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__3); +l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__4 = _init_l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__4(); +lean_mark_persistent(l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__4); +l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__5 = _init_l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__5(); +lean_mark_persistent(l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__5); +l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__6 = _init_l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__6(); +lean_mark_persistent(l_Lean_Compiler_LCNF_isTrivialConstructorApp_x3f___closed__6); +l_panic___at_Lean_Expr_toMono___spec__1___closed__1 = _init_l_panic___at_Lean_Expr_toMono___spec__1___closed__1(); +lean_mark_persistent(l_panic___at_Lean_Expr_toMono___spec__1___closed__1); l_Lean_Expr_toMono___closed__1 = _init_l_Lean_Expr_toMono___closed__1(); lean_mark_persistent(l_Lean_Expr_toMono___closed__1); l_Lean_Expr_toMono___closed__2 = _init_l_Lean_Expr_toMono___closed__2(); @@ -3150,6 +6007,85 @@ l_Lean_Expr_toMono___closed__3 = _init_l_Lean_Expr_toMono___closed__3(); lean_mark_persistent(l_Lean_Expr_toMono___closed__3); l_Lean_Expr_toMono___closed__4 = _init_l_Lean_Expr_toMono___closed__4(); lean_mark_persistent(l_Lean_Expr_toMono___closed__4); +l_Lean_Expr_toMono___closed__5 = _init_l_Lean_Expr_toMono___closed__5(); +lean_mark_persistent(l_Lean_Expr_toMono___closed__5); +l_Lean_Expr_toMono___closed__6 = _init_l_Lean_Expr_toMono___closed__6(); +lean_mark_persistent(l_Lean_Expr_toMono___closed__6); +l_Lean_Expr_toMono___closed__7 = _init_l_Lean_Expr_toMono___closed__7(); +lean_mark_persistent(l_Lean_Expr_toMono___closed__7); +l_Lean_Expr_toMono___closed__8 = _init_l_Lean_Expr_toMono___closed__8(); +lean_mark_persistent(l_Lean_Expr_toMono___closed__8); +l_Lean_Expr_toMono___closed__9 = _init_l_Lean_Expr_toMono___closed__9(); +lean_mark_persistent(l_Lean_Expr_toMono___closed__9); +l_Lean_Expr_toMono___closed__10 = _init_l_Lean_Expr_toMono___closed__10(); +lean_mark_persistent(l_Lean_Expr_toMono___closed__10); +l_Lean_Expr_toMono___closed__11 = _init_l_Lean_Expr_toMono___closed__11(); +lean_mark_persistent(l_Lean_Expr_toMono___closed__11); +l_Lean_Expr_toMono___closed__12 = _init_l_Lean_Expr_toMono___closed__12(); +lean_mark_persistent(l_Lean_Expr_toMono___closed__12); +l_Lean_Expr_toMono___closed__13 = _init_l_Lean_Expr_toMono___closed__13(); +lean_mark_persistent(l_Lean_Expr_toMono___closed__13); +l_Lean_Expr_toMono___closed__14 = _init_l_Lean_Expr_toMono___closed__14(); +lean_mark_persistent(l_Lean_Expr_toMono___closed__14); +l_Lean_Expr_toMono___closed__15 = _init_l_Lean_Expr_toMono___closed__15(); +lean_mark_persistent(l_Lean_Expr_toMono___closed__15); +l_Lean_Expr_toMono___closed__16 = _init_l_Lean_Expr_toMono___closed__16(); +lean_mark_persistent(l_Lean_Expr_toMono___closed__16); +l_Lean_Compiler_LCNF_Code_toMono___closed__1 = _init_l_Lean_Compiler_LCNF_Code_toMono___closed__1(); +lean_mark_persistent(l_Lean_Compiler_LCNF_Code_toMono___closed__1); +l_panic___at_Lean_Compiler_LCNF_trivialStructToMono___spec__1___closed__1 = _init_l_panic___at_Lean_Compiler_LCNF_trivialStructToMono___spec__1___closed__1(); +lean_mark_persistent(l_panic___at_Lean_Compiler_LCNF_trivialStructToMono___spec__1___closed__1); +l_Lean_Compiler_LCNF_trivialStructToMono___closed__1 = _init_l_Lean_Compiler_LCNF_trivialStructToMono___closed__1(); +lean_mark_persistent(l_Lean_Compiler_LCNF_trivialStructToMono___closed__1); +l_Lean_Compiler_LCNF_trivialStructToMono___closed__2 = _init_l_Lean_Compiler_LCNF_trivialStructToMono___closed__2(); +lean_mark_persistent(l_Lean_Compiler_LCNF_trivialStructToMono___closed__2); +l_Lean_Compiler_LCNF_trivialStructToMono___closed__3 = _init_l_Lean_Compiler_LCNF_trivialStructToMono___closed__3(); +lean_mark_persistent(l_Lean_Compiler_LCNF_trivialStructToMono___closed__3); +l_Lean_Compiler_LCNF_trivialStructToMono___closed__4 = _init_l_Lean_Compiler_LCNF_trivialStructToMono___closed__4(); +lean_mark_persistent(l_Lean_Compiler_LCNF_trivialStructToMono___closed__4); +l_Lean_Compiler_LCNF_trivialStructToMono___closed__5 = _init_l_Lean_Compiler_LCNF_trivialStructToMono___closed__5(); +lean_mark_persistent(l_Lean_Compiler_LCNF_trivialStructToMono___closed__5); +l_Lean_Compiler_LCNF_trivialStructToMono___closed__6 = _init_l_Lean_Compiler_LCNF_trivialStructToMono___closed__6(); +lean_mark_persistent(l_Lean_Compiler_LCNF_trivialStructToMono___closed__6); +l_Lean_Compiler_LCNF_trivialStructToMono___closed__7 = _init_l_Lean_Compiler_LCNF_trivialStructToMono___closed__7(); +lean_mark_persistent(l_Lean_Compiler_LCNF_trivialStructToMono___closed__7); +l_Lean_Compiler_LCNF_trivialStructToMono___closed__8 = _init_l_Lean_Compiler_LCNF_trivialStructToMono___closed__8(); +lean_mark_persistent(l_Lean_Compiler_LCNF_trivialStructToMono___closed__8); +l_Lean_Compiler_LCNF_trivialStructToMono___closed__9 = _init_l_Lean_Compiler_LCNF_trivialStructToMono___closed__9(); +lean_mark_persistent(l_Lean_Compiler_LCNF_trivialStructToMono___closed__9); +l_Lean_Compiler_LCNF_trivialStructToMono___closed__10 = _init_l_Lean_Compiler_LCNF_trivialStructToMono___closed__10(); +lean_mark_persistent(l_Lean_Compiler_LCNF_trivialStructToMono___closed__10); +l_Lean_Compiler_LCNF_trivialStructToMono___closed__11 = _init_l_Lean_Compiler_LCNF_trivialStructToMono___closed__11(); +lean_mark_persistent(l_Lean_Compiler_LCNF_trivialStructToMono___closed__11); +l_Lean_Compiler_LCNF_trivialStructToMono___closed__12 = _init_l_Lean_Compiler_LCNF_trivialStructToMono___closed__12(); +lean_mark_persistent(l_Lean_Compiler_LCNF_trivialStructToMono___closed__12); +l_Lean_Compiler_LCNF_trivialStructToMono___closed__13 = _init_l_Lean_Compiler_LCNF_trivialStructToMono___closed__13(); +lean_mark_persistent(l_Lean_Compiler_LCNF_trivialStructToMono___closed__13); +l_Lean_Compiler_LCNF_trivialStructToMono___closed__14 = _init_l_Lean_Compiler_LCNF_trivialStructToMono___closed__14(); +lean_mark_persistent(l_Lean_Compiler_LCNF_trivialStructToMono___closed__14); +l_Lean_Compiler_LCNF_trivialStructToMono___closed__15 = _init_l_Lean_Compiler_LCNF_trivialStructToMono___closed__15(); +lean_mark_persistent(l_Lean_Compiler_LCNF_trivialStructToMono___closed__15); +l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_decToMono___spec__1___closed__1 = _init_l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_decToMono___spec__1___closed__1(); +lean_mark_persistent(l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_decToMono___spec__1___closed__1); +l_Lean_Compiler_LCNF_decToMono___closed__1 = _init_l_Lean_Compiler_LCNF_decToMono___closed__1(); +lean_mark_persistent(l_Lean_Compiler_LCNF_decToMono___closed__1); +l_Lean_Compiler_LCNF_toMono___closed__1 = _init_l_Lean_Compiler_LCNF_toMono___closed__1(); +lean_mark_persistent(l_Lean_Compiler_LCNF_toMono___closed__1); +l_Lean_Compiler_LCNF_toMono___closed__2 = _init_l_Lean_Compiler_LCNF_toMono___closed__2(); +lean_mark_persistent(l_Lean_Compiler_LCNF_toMono___closed__2); +l_Lean_Compiler_LCNF_toMono___closed__3 = _init_l_Lean_Compiler_LCNF_toMono___closed__3(); +lean_mark_persistent(l_Lean_Compiler_LCNF_toMono___closed__3); +l_Lean_Compiler_LCNF_toMono___closed__4 = _init_l_Lean_Compiler_LCNF_toMono___closed__4(); +lean_mark_persistent(l_Lean_Compiler_LCNF_toMono___closed__4); +l_Lean_Compiler_LCNF_toMono = _init_l_Lean_Compiler_LCNF_toMono(); +lean_mark_persistent(l_Lean_Compiler_LCNF_toMono); +l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_ToMono___hyg_1997____closed__1 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_ToMono___hyg_1997____closed__1(); +lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_ToMono___hyg_1997____closed__1); +l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_ToMono___hyg_1997____closed__2 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_ToMono___hyg_1997____closed__2(); +lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_ToMono___hyg_1997____closed__2); +res = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_ToMono___hyg_1997_(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); return lean_io_result_mk_ok(lean_box(0)); } #ifdef __cplusplus