diff --git a/stage0/src/Init/Prelude.lean b/stage0/src/Init/Prelude.lean index 77c7521e17..9e4da15fd0 100644 --- a/stage0/src/Init/Prelude.lean +++ b/stage0/src/Init/Prelude.lean @@ -1729,12 +1729,6 @@ def isMissing : Syntax → Bool def isNodeOf (stx : Syntax) (k : SyntaxNodeKind) (n : Nat) : Bool := and (stx.isOfKind k) (beq stx.getNumArgs n) -/-- - We use this function to implement `Syntax` pattern matching. - We can use it to tweak the behavior of the matcher for special node such as `Syntax.missing`. -/ -def isNodeOf' (stx : Syntax) (k : SyntaxNodeKind) (n : Nat) : Bool := - stx.isNodeOf k n - def isIdent : Syntax → Bool | ident _ _ _ _ => true | _ => false diff --git a/stage0/src/Lean/Elab/Binders.lean b/stage0/src/Lean/Elab/Binders.lean index 6c38785e58..1f8b3a56fe 100644 --- a/stage0/src/Lean/Elab/Binders.lean +++ b/stage0/src/Lean/Elab/Binders.lean @@ -113,34 +113,32 @@ def expandOptType (ref : Syntax) (optType : Syntax) : Syntax := else optType[0][1] -private def matchBinder (stx : Syntax) : TermElabM (Array BinderView) := - match stx with - | Syntax.node k args => do - if k == `Lean.Parser.Term.simpleBinder then - -- binderIdent+ >> optType - let ids ← getBinderIds args[0] - let type := expandOptType stx args[1] - ids.mapM fun id => do pure { id := (← expandBinderIdent id), type := type, bi := BinderInfo.default } - else if k == `Lean.Parser.Term.explicitBinder then - -- `(` binderIdent+ binderType (binderDefault <|> binderTactic)? `)` - let ids ← getBinderIds args[1] - let type := expandBinderType stx args[2] - let optModifier := args[3] - let type ← expandBinderModifier type optModifier - ids.mapM fun id => do pure { id := (← expandBinderIdent id), type := type, bi := BinderInfo.default } - else if k == `Lean.Parser.Term.implicitBinder then - -- `{` binderIdent+ binderType `}` - let ids ← getBinderIds args[1] - let type := expandBinderType stx args[2] - ids.mapM fun id => do pure { id := (← expandBinderIdent id), type := type, bi := BinderInfo.implicit } - else if k == `Lean.Parser.Term.instBinder then - -- `[` optIdent type `]` - let id ← expandOptIdent args[1] - let type := args[2] - pure #[ { id := id, type := type, bi := BinderInfo.instImplicit } ] - else - throwUnsupportedSyntax - | _ => throwUnsupportedSyntax +private def matchBinder (stx : Syntax) : TermElabM (Array BinderView) := do + let k := stx.getKind + if k == `Lean.Parser.Term.simpleBinder then + -- binderIdent+ >> optType + let ids ← getBinderIds stx[0] + let type := expandOptType stx stx[1] + ids.mapM fun id => do pure { id := (← expandBinderIdent id), type := type, bi := BinderInfo.default } + else if k == `Lean.Parser.Term.explicitBinder then + -- `(` binderIdent+ binderType (binderDefault <|> binderTactic)? `)` + let ids ← getBinderIds stx[1] + let type := expandBinderType stx stx[2] + let optModifier := stx[3] + let type ← expandBinderModifier type optModifier + ids.mapM fun id => do pure { id := (← expandBinderIdent id), type := type, bi := BinderInfo.default } + else if k == `Lean.Parser.Term.implicitBinder then + -- `{` binderIdent+ binderType `}` + let ids ← getBinderIds stx[1] + let type := expandBinderType stx stx[2] + ids.mapM fun id => do pure { id := (← expandBinderIdent id), type := type, bi := BinderInfo.implicit } + else if k == `Lean.Parser.Term.instBinder then + -- `[` optIdent type `]` + let id ← expandOptIdent stx[1] + let type := stx[2] + pure #[ { id := id, type := type, bi := BinderInfo.instImplicit } ] + else + throwUnsupportedSyntax private def registerFailedToInferBinderTypeInfo (type : Expr) (ref : Syntax) : TermElabM Unit := registerCustomErrorIfMVar type ref "failed to infer binder type" diff --git a/stage0/src/Lean/Elab/Match.lean b/stage0/src/Lean/Elab/Match.lean index 86a21c3b2c..d0c2225ed3 100644 --- a/stage0/src/Lean/Elab/Match.lean +++ b/stage0/src/Lean/Elab/Match.lean @@ -308,98 +308,96 @@ private def doubleQuotedNameToPattern (stx : Syntax) : TermElabM Syntax := do | some val => nameToPattern (← resolveGlobalConstNoOverloadWithInfo stx[1] val) | none => throwIllFormedSyntax -partial def collect (stx : Syntax) : M Syntax := do - match stx with - | Syntax.node k args => withRef stx <| withFreshMacroScope do - if k == ``Lean.Parser.Term.app then - processCtorApp stx - else if k == ``Lean.Parser.Term.anonymousCtor then - let elems ← args[1].getArgs.mapSepElemsM collect - return Syntax.node k (args.set! 1 <| mkNullNode elems) - else if k == ``Lean.Parser.Term.structInst then - /- - ``` - leading_parser "{" >> optional (atomic (termParser >> " with ")) - >> manyIndent (group (structInstField >> optional ", ")) - >> optional ".." - >> optional (" : " >> termParser) - >> " }" - ``` - -/ - let withMod := args[1] - unless withMod.isNone do - throwErrorAt withMod "invalid struct instance pattern, 'with' is not allowed in patterns" - let fields ← args[2].getArgs.mapM fun p => do - -- p is of the form (group (structInstField >> optional ", ")) - let field := p[0] - -- leading_parser structInstLVal >> " := " >> termParser - let newVal ← collect field[2] - let field := field.setArg 2 newVal - pure <| field.setArg 0 field - return Syntax.node k (args.set! 2 <| mkNullNode fields) - else if k == ``Lean.Parser.Term.hole then - let r ← mkMVarSyntax - modify fun s => { s with vars := s.vars.push <| PatternVar.anonymousVar <| getMVarSyntaxMVarId r } - return r - else if k == ``Lean.Parser.Term.paren then - let arg := args[1] - if arg.isNone then - return stx -- `()` - else - let t := arg[0] - let s := arg[1] - if s.isNone || s[0].getKind == ``Lean.Parser.Term.typeAscription then - -- Ignore `s`, since it empty or it is a type ascription - let t ← collect t - let arg := arg.setArg 0 t - return Syntax.node k (args.set! 1 arg) - else - -- Tuple literal is a constructor - let t ← collect t - let arg := arg.setArg 0 t - let tupleTail := s[0] - let tupleTailElems := tupleTail[1].getArgs - let tupleTailElems ← tupleTailElems.mapSepElemsM collect - let tupleTail := tupleTail.setArg 1 <| mkNullNode tupleTailElems - let s := s.setArg 0 tupleTail - let arg := arg.setArg 1 s - return Syntax.node k (args.set! 1 arg) - else if k == ``Lean.Parser.Term.explicitUniv then - processCtor stx[0] - else if k == ``Lean.Parser.Term.namedPattern then - /- Recall that - def namedPattern := check... >> trailing_parser "@" >> termParser -/ - let id := stx[0] - discard <| processVar id - let pat := stx[2] - let pat ← collect pat - `(_root_.namedPattern $id $pat) - else if k == ``Lean.Parser.Term.inaccessible then - return stx - else if k == strLitKind then - return stx - else if k == numLitKind then - return stx - else if k == scientificLitKind then - return stx - else if k == charLitKind then - return stx - else if k == ``Lean.Parser.Term.quotedName then - /- Quoted names have an elaboration function associated with them, and they will not be macro expanded. - Note that macro expansion is not a good option since it produces a term using the smart constructors `Name.mkStr`, `Name.mkNum` - instead of the constructors `Name.str` and `Name.num` -/ - quotedNameToPattern stx - else if k == ``Lean.Parser.Term.doubleQuotedName then - /- Similar to previous case -/ - doubleQuotedNameToPattern stx - else if k == choiceKind then - throwError "invalid pattern, notation is ambiguous" - else - throwInvalidPattern - | Syntax.ident .. => +partial def collect (stx : Syntax) : M Syntax := withRef stx <| withFreshMacroScope do + let k := stx.getKind + if k == identKind then processId stx - | stx => + else if k == ``Lean.Parser.Term.app then + processCtorApp stx + else if k == ``Lean.Parser.Term.anonymousCtor then + let elems ← stx[1].getArgs.mapSepElemsM collect + return stx.setArg 1 <| mkNullNode elems + else if k == ``Lean.Parser.Term.structInst then + /- + ``` + leading_parser "{" >> optional (atomic (termParser >> " with ")) + >> manyIndent (group (structInstField >> optional ", ")) + >> optional ".." + >> optional (" : " >> termParser) + >> " }" + ``` + -/ + let withMod := stx[1] + unless withMod.isNone do + throwErrorAt withMod "invalid struct instance pattern, 'with' is not allowed in patterns" + let fields ← stx[2].getArgs.mapM fun p => do + -- p is of the form (group (structInstField >> optional ", ")) + let field := p[0] + -- leading_parser structInstLVal >> " := " >> termParser + let newVal ← collect field[2] + let field := field.setArg 2 newVal + pure <| field.setArg 0 field + return stx.setArg 2 <| mkNullNode fields + else if k == ``Lean.Parser.Term.hole then + let r ← mkMVarSyntax + modify fun s => { s with vars := s.vars.push <| PatternVar.anonymousVar <| getMVarSyntaxMVarId r } + return r + else if k == ``Lean.Parser.Term.paren then + let arg := stx[1] + if arg.isNone then + return stx -- `()` + else + let t := arg[0] + let s := arg[1] + if s.isNone || s[0].getKind == ``Lean.Parser.Term.typeAscription then + -- Ignore `s`, since it empty or it is a type ascription + let t ← collect t + let arg := arg.setArg 0 t + return stx.setArg 1 arg + else + -- Tuple literal is a constructor + let t ← collect t + let arg := arg.setArg 0 t + let tupleTail := s[0] + let tupleTailElems := tupleTail[1].getArgs + let tupleTailElems ← tupleTailElems.mapSepElemsM collect + let tupleTail := tupleTail.setArg 1 <| mkNullNode tupleTailElems + let s := s.setArg 0 tupleTail + let arg := arg.setArg 1 s + return stx.setArg 1 arg + else if k == ``Lean.Parser.Term.explicitUniv then + processCtor stx[0] + else if k == ``Lean.Parser.Term.namedPattern then + /- Recall that + def namedPattern := check... >> trailing_parser "@" >> termParser -/ + let id := stx[0] + discard <| processVar id + let pat := stx[2] + let pat ← collect pat + `(_root_.namedPattern $id $pat) + else if k == ``Lean.Parser.Term.inaccessible then + return stx + else if k == strLitKind then + return stx + else if k == numLitKind then + return stx + else if k == scientificLitKind then + return stx + else if k == charLitKind then + return stx + else if k == ``Lean.Parser.Term.quotedName then + /- Quoted names have an elaboration function associated with them, and they will not be macro expanded. + Note that macro expansion is not a good option since it produces a term using the smart constructors `Name.mkStr`, `Name.mkNum` + instead of the constructors `Name.str` and `Name.num` -/ + quotedNameToPattern stx + else if k == ``Lean.Parser.Term.doubleQuotedName then + /- Similar to previous case -/ + doubleQuotedNameToPattern stx + else if k == choiceKind then + throwError "invalid pattern, notation is ambiguous" + else throwInvalidPattern + where processCtorApp (stx : Syntax) : M Syntax := do diff --git a/stage0/src/Lean/Elab/MutualDef.lean b/stage0/src/Lean/Elab/MutualDef.lean index 2f9d74fb0b..497b3b3ff1 100644 --- a/stage0/src/Lean/Elab/MutualDef.lean +++ b/stage0/src/Lean/Elab/MutualDef.lean @@ -502,7 +502,7 @@ abbrev Replacement := NameMap Expr def insertReplacementForMainFns (r : Replacement) (sectionVars : Array Expr) (mainHeaders : Array DefViewElabHeader) (mainFVars : Array Expr) : Replacement := mainFVars.size.fold (init := r) fun i r => - r.insert (mainFVars.get! i).fvarId! (mkAppN (Lean.mkConst (mainHeaders.get! i).declName) sectionVars) + r.insert mainFVars[i].fvarId! (mkAppN (Lean.mkConst mainHeaders[i].declName) sectionVars) def insertReplacementForLetRecs (r : Replacement) (letRecClosures : List LetRecClosure) : Replacement := diff --git a/stage0/src/Lean/Server/Watchdog.lean b/stage0/src/Lean/Server/Watchdog.lean index 3e3de6144d..b37230ef6f 100644 --- a/stage0/src/Lean/Server/Watchdog.lean +++ b/stage0/src/Lean/Server/Watchdog.lean @@ -112,6 +112,8 @@ section FileWorker params : DidChangeTextDocumentParams /-- Signals when `applyTime` has been reached. -/ signalTask : Task WorkerEvent + /-- We should not reorder messages when delaying edits, so we queue other messages since the last request here. -/ + queuedMsgs : Array JsonRpc.Message structure FileWorker where doc : OpenDocument @@ -124,8 +126,6 @@ section FileWorker namespace FileWorker - variable [ToJson α] - def stdin (fw : FileWorker) : FS.Stream := FS.Stream.ofHandle fw.proc.stdin @@ -140,22 +140,13 @@ section FileWorker fw.pendingRequestsRef.modify (fun pendingRequests => pendingRequests.erase id) return msg - def writeMessage (fw : FileWorker) (msg : JsonRpc.Message) : IO Unit := - fw.stdin.writeLspMessage msg - - def writeNotification (fw : FileWorker) (n : Notification α) : IO Unit := - fw.stdin.writeLspNotification n - - def writeRequest (fw : FileWorker) (r : Request α) : IO Unit := do - fw.stdin.writeLspRequest r - fw.pendingRequestsRef.modify (fun pendingRequests => pendingRequests.insert r.id r) - def errorPendingRequests (fw : FileWorker) (hError : FS.Stream) (code : ErrorCode) (msg : String) : IO Unit := do let pendingRequests ← fw.pendingRequestsRef.modifyGet (fun pendingRequests => (pendingRequests, RBMap.empty)) for ⟨id, _⟩ in pendingRequests do hError.writeLspResponseError { id := id, code := code, message := msg } partial def runEditsSignalTask (fw : FileWorker) : IO (Task WorkerEvent) := do + -- check `applyTime` in a loop since it might have been postponed by a subsequent edit notification let rec loopAction : IO WorkerEvent := do let now ← monoMsNow let some ge ← fw.groupedEditsRef.get @@ -258,7 +249,7 @@ section ServerM let commTask ← forwardMessages fw let fw : FileWorker := { fw with commTask := commTask } fw.stdin.writeLspRequest ⟨0, "initialize", st.initParams⟩ - fw.writeNotification { + fw.stdin.writeLspNotification { method := "textDocument/didOpen" param := { textDocument := { @@ -278,7 +269,7 @@ section ServerM when the header changed we'll start a new one right after anyways and when we're shutting down the server it's over either way.) -/ - try (←findFileWorker uri).writeMessage (Message.notification "exit" none) + try (←findFileWorker uri).stdin.writeLspMessage (Message.notification "exit" none) catch err => () eraseFileWorker uri @@ -289,9 +280,14 @@ section ServerM and restarts the file worker if the `crashed` flag was already set. Messages that couldn't be sent can be queued up via the queueFailedMessage flag and will be discharged after the FileWorker is restarted. -/ - def tryWriteMessage [Coe α JsonRpc.Message] (uri : DocumentUri) (msg : α) (writeAction : FileWorker → α → IO Unit) - (queueFailedMessage := true) (restartCrashedWorker := false) : ServerM Unit := do + def tryWriteMessage (uri : DocumentUri) (msg : JsonRpc.Message) (queueFailedMessage := true) (restartCrashedWorker := false) : + ServerM Unit := do let fw ← findFileWorker uri + let pendingEdit ← fw.groupedEditsRef.modifyGet fun + | some ge => (true, some { ge with queuedMsgs := ge.queuedMsgs.push msg }) + | none => (false, none) + if pendingEdit then + return match fw.state with | WorkerState.crashed queuedMsgs => let mut queuedMsgs := queuedMsgs @@ -307,7 +303,7 @@ section ServerM -- try to discharge all queued msgs, tracking the ones that we can't discharge for msg in queuedMsgs do try - newFw.writeMessage msg + newFw.stdin.writeLspMessage msg catch _ => crashedMsgs := crashedMsgs.push msg if ¬ crashedMsgs.isEmpty then @@ -319,9 +315,9 @@ section ServerM else #[] try - writeAction fw msg + fw.stdin.writeLspMessage msg catch _ => - handleCrash uri (initialQueuedMsgs.map Coe.coe) + handleCrash uri initialQueuedMsgs end ServerM section NotificationHandling @@ -355,7 +351,9 @@ section NotificationHandling else let newDoc : OpenDocument := ⟨newMeta, oldDoc.headerAst⟩ updateFileWorkers { fw with doc := newDoc } - tryWriteMessage doc.uri ⟨"textDocument/didChange", ge.params⟩ FileWorker.writeNotification (restartCrashedWorker := true) + tryWriteMessage doc.uri (Notification.mk "textDocument/didChange" ge.params) (restartCrashedWorker := true) + for msg in ge.queuedMsgs do + tryWriteMessage doc.uri msg def handleDidClose (p : DidCloseTextDocumentParams) : ServerM Unit := terminateFileWorker p.textDocument.uri @@ -366,7 +364,7 @@ section NotificationHandling let req? ← fw.pendingRequestsRef.modifyGet (fun pendingRequests => (pendingRequests.find? p.id, pendingRequests.erase p.id)) if let some req := req? then - tryWriteMessage uri ⟨"$/cancelRequest", p⟩ FileWorker.writeNotification (queueFailedMessage := false) + tryWriteMessage uri (Notification.mk "$/cancelRequest" p) (queueFailedMessage := false) end NotificationHandling section MessageHandling @@ -379,7 +377,7 @@ section MessageHandling let handle := fun α [FromJson α] [ToJson α] [FileSource α] => do let parsedParams ← parseParams α params let uri := fileSource parsedParams - try + let fw ← try findFileWorker uri catch _ => -- VS Code sometimes sends us requests just after closing a file? @@ -390,7 +388,9 @@ section MessageHandling code := ErrorCode.contentModified message := s!"Cannot process request to closed file '{uri}'" } return - tryWriteMessage uri ⟨id, method, parsedParams⟩ FileWorker.writeRequest + let r := Request.mk id method params + fw.pendingRequestsRef.modify (·.insert id r) + tryWriteMessage uri r match method with | "textDocument/waitForDiagnostics" => handle WaitForDiagnosticsParams | "textDocument/completion" => handle CompletionParams @@ -469,15 +469,22 @@ section MainLoop let now ← monoMsNow /- We wait `editDelay`ms since last edit before applying the changes. -/ let applyTime := now + st.editDelay - let startingGroup? ← fw.groupedEditsRef.modifyGet fun - | some ge => (false, some { ge with applyTime := applyTime - params.textDocument := p.textDocument - params.contentChanges := ge.params.contentChanges ++ p.contentChanges } ) - | none => (true, some { applyTime := applyTime - params := p - /- This is overwritten just below. -/ - signalTask := Task.pure WorkerEvent.processGroupedEdits } ) - if startingGroup? then + let pendingEdit ← fw.groupedEditsRef.modifyGet fun + | some ge => (true, some { ge with + applyTime := applyTime + params.textDocument := p.textDocument + params.contentChanges := ge.params.contentChanges ++ p.contentChanges + -- drain now-outdated messages and respond with `contentModified` below + queuedMsgs := #[] }) + | none => (false, some { + applyTime := applyTime + params := p + /- This is overwritten just below. -/ + signalTask := Task.pure WorkerEvent.processGroupedEdits + queuedMsgs := #[] }) + if pendingEdit then + fw.errorPendingRequests (←read).hOut ErrorCode.contentModified "File changed." + else let t ← fw.runEditsSignalTask fw.groupedEditsRef.modify (Option.map fun ge => { ge with signalTask := t } ) mainLoop (←runClientTask) diff --git a/stage0/src/runtime/object.cpp b/stage0/src/runtime/object.cpp index f94fb96897..1ae0beedcb 100644 --- a/stage0/src/runtime/object.cpp +++ b/stage0/src/runtime/object.cpp @@ -41,21 +41,6 @@ extern "C" void lean_internal_panic_rc_overflow() { lean_internal_panic("reference counter overflowed"); } -/* - The panic message buffering feature is used to implement - `Environment.evalConst`. -*/ -std::string g_panic_messages; - - - - -/* -- Exit on panic (no) -- Show error (yes) -- (internal) Send error to buffer -*/ - bool g_exit_on_panic = false; extern "C" void lean_set_exit_on_panic(bool flag) { diff --git a/stage0/stdlib/Init/Prelude.c b/stage0/stdlib/Init/Prelude.c index 746fac2bf5..4b2ab7b34d 100644 --- a/stage0/stdlib/Init/Prelude.c +++ b/stage0/stdlib/Init/Prelude.c @@ -248,7 +248,6 @@ lean_object* l_instInhabitedArrow__1___rarg(lean_object*); lean_object* l_instMonadExcept(lean_object*, lean_object*); lean_object* l_Lean_Syntax_getKind___closed__1; lean_object* l_Lean_PrettyPrinter_instMonadQuotationUnexpandM___lambda__2(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Syntax_isNodeOf_x27___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_ReaderT_instMonadLiftReaderT(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Macro_throwErrorAt___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_monadFunctorRefl___rarg(lean_object*, lean_object*); @@ -486,7 +485,6 @@ lean_object* l_namedPattern___boxed(lean_object*, lean_object*); uint8_t l_or(uint8_t, uint8_t); lean_object* l_instInhabitedExcept(lean_object*, lean_object*); lean_object* l_Monad_map___default(lean_object*); -uint8_t l_Lean_Syntax_isNodeOf_x27(lean_object*, lean_object*, lean_object*); lean_object* l_instBEq(lean_object*); lean_object* l_Nat_add___boxed(lean_object*, lean_object*); lean_object* l_UInt64_ofNatCore___boxed(lean_object*, lean_object*); @@ -8689,25 +8687,6 @@ x_5 = lean_box(x_4); return x_5; } } -uint8_t l_Lean_Syntax_isNodeOf_x27(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -uint8_t x_4; -x_4 = l_Lean_Syntax_isNodeOf(x_1, x_2, x_3); -return x_4; -} -} -lean_object* l_Lean_Syntax_isNodeOf_x27___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -uint8_t x_4; lean_object* x_5; -x_4 = l_Lean_Syntax_isNodeOf_x27(x_1, x_2, x_3); -lean_dec(x_3); -lean_dec(x_2); -x_5 = lean_box(x_4); -return x_5; -} -} lean_object* l_Lean_Syntax_isIdent_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { diff --git a/stage0/stdlib/Lean/Elab/Binders.c b/stage0/stdlib/Lean/Elab/Binders.c index ffb8dcac5c..656f74263a 100644 --- a/stage0/stdlib/Lean/Elab/Binders.c +++ b/stage0/stdlib/Lean/Elab/Binders.c @@ -223,7 +223,7 @@ lean_object* l___private_Lean_Elab_Binders_0__Lean_Elab_Term_addLocalVarInfo(lea lean_object* l_Lean_Meta_mkLambdaFVars(lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Binders_0__Lean_Elab_Term_getFunBinderIds_x3f___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Syntax_addPrec___closed__5; -lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Binders___hyg_5427_(lean_object*); +lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Binders___hyg_5413_(lean_object*); lean_object* l_Lean_Elab_Term_quoteAutoTactic___closed__20; lean_object* l___private_Lean_Elab_Binders_0__Lean_Elab_Term_expandBinderModifier___closed__8; lean_object* l___private_Lean_Elab_Binders_0__Lean_Elab_Term_registerFailedToInferBinderTypeInfo(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -279,7 +279,6 @@ extern lean_object* l_Lean_instInhabitedExpr; lean_object* l_Lean_Elab_Term_quoteAutoTactic___closed__19; extern lean_object* l_myMacro____x40_Init_Notation___hyg_13352____closed__7; lean_object* l___regBuiltin_Lean_Elab_Term_elabLetDelayedDecl(lean_object*); -lean_object* l___private_Lean_Elab_Binders_0__Lean_Elab_Term_matchBinder_match__1(lean_object*); lean_object* l___private_Init_Util_0__mkPanicMessageWithDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Term_expandMatchAltsWhereDecls_loop___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_KernelException_toMessageData___closed__15; @@ -450,7 +449,6 @@ lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Term_expandFunBinders_loop___ extern lean_object* l_myMacro____x40_Init_Notation___hyg_15419____closed__4; lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_throwStuckAtUniverseCnstr(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_expandExplicitBindersAux_loop___closed__4; -lean_object* l___private_Lean_Elab_Binders_0__Lean_Elab_Term_matchBinder_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabArrow___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Tactic_intro___closed__3; lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*); @@ -482,7 +480,6 @@ lean_object* l_Lean_Elab_Term_expandWhereDeclsOpt(lean_object*, lean_object*, le lean_object* l_Lean_mkFreshId___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__1___rarg___boxed(lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Binders_0__Lean_Elab_Term_getMatchAltsNumPatterns___boxed(lean_object*); lean_object* l___regBuiltin_Lean_Elab_Term_elabLetDecl___closed__1; -lean_object* l___private_Lean_Elab_Binders_0__Lean_Elab_Term_matchBinder___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_propagateExpectedType_match__1___rarg(lean_object*, lean_object*, lean_object*); extern lean_object* l_Array_forInUnsafe_loop___at_myMacro____x40_Init_NotationExtra___hyg_5461____spec__3___closed__2; lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_matchBinder___spec__3(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -4274,38 +4271,6 @@ lean_dec(x_1); return x_3; } } -lean_object* l___private_Lean_Elab_Binders_0__Lean_Elab_Term_matchBinder_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -if (lean_obj_tag(x_1) == 1) -{ -lean_object* x_4; lean_object* x_5; lean_object* x_6; -lean_dec(x_3); -x_4 = lean_ctor_get(x_1, 0); -lean_inc(x_4); -x_5 = lean_ctor_get(x_1, 1); -lean_inc(x_5); -lean_dec(x_1); -x_6 = lean_apply_2(x_2, x_4, x_5); -return x_6; -} -else -{ -lean_object* x_7; -lean_dec(x_2); -x_7 = lean_apply_1(x_3, x_1); -return x_7; -} -} -} -lean_object* l___private_Lean_Elab_Binders_0__Lean_Elab_Term_matchBinder_match__1(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l___private_Lean_Elab_Binders_0__Lean_Elab_Term_matchBinder_match__1___rarg), 3, 0); -return x_2; -} -} lean_object* l_Lean_Elab_throwUnsupportedSyntax___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_matchBinder___spec__1___rarg(lean_object* x_1) { _start: { @@ -4478,247 +4443,281 @@ return x_2; lean_object* l___private_Lean_Elab_Binders_0__Lean_Elab_Term_matchBinder(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: { -if (lean_obj_tag(x_1) == 1) +lean_object* x_9; lean_object* x_10; uint8_t x_11; +lean_inc(x_1); +x_9 = l_Lean_Syntax_getKind(x_1); +x_10 = l_Lean_expandExplicitBindersAux_loop___closed__2; +x_11 = lean_name_eq(x_9, x_10); +if (x_11 == 0) { -lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12; -x_9 = lean_ctor_get(x_1, 0); -x_10 = lean_ctor_get(x_1, 1); -x_11 = l_Lean_expandExplicitBindersAux_loop___closed__2; -x_12 = lean_name_eq(x_9, x_11); -if (x_12 == 0) +lean_object* x_12; uint8_t x_13; +x_12 = l_Lean_Parser_Term_explicitBinder___elambda__1___closed__1; +x_13 = lean_name_eq(x_9, x_12); +if (x_13 == 0) { -lean_object* x_13; uint8_t x_14; -x_13 = l_Lean_Parser_Term_explicitBinder___elambda__1___closed__1; -x_14 = lean_name_eq(x_9, x_13); -if (x_14 == 0) +lean_object* x_14; uint8_t x_15; +x_14 = l_Lean_Parser_Term_implicitBinder___elambda__1___closed__1; +x_15 = lean_name_eq(x_9, x_14); +if (x_15 == 0) { -lean_object* x_15; uint8_t x_16; -x_15 = l_Lean_Parser_Term_implicitBinder___elambda__1___closed__1; -x_16 = lean_name_eq(x_9, x_15); -if (x_16 == 0) +lean_object* x_16; uint8_t x_17; +x_16 = l_Lean_Parser_Term_instBinder___elambda__1___closed__1; +x_17 = lean_name_eq(x_9, x_16); +lean_dec(x_9); +if (x_17 == 0) { -lean_object* x_17; uint8_t x_18; -x_17 = l_Lean_Parser_Term_instBinder___elambda__1___closed__1; -x_18 = lean_name_eq(x_9, x_17); -if (x_18 == 0) -{ -lean_object* x_19; +lean_object* x_18; 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_19 = l_Lean_Elab_throwUnsupportedSyntax___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_matchBinder___spec__1___rarg(x_8); -return x_19; +lean_dec(x_1); +x_18 = l_Lean_Elab_throwUnsupportedSyntax___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_matchBinder___spec__1___rarg(x_8); +return x_18; } else { -lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; uint8_t x_24; -x_20 = l_Lean_instInhabitedSyntax; -x_21 = lean_unsigned_to_nat(1u); -x_22 = lean_array_get(x_20, x_10, x_21); -x_23 = l___private_Lean_Elab_Binders_0__Lean_Elab_Term_expandOptIdent(x_22, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +lean_object* x_19; lean_object* x_20; lean_object* x_21; uint8_t x_22; +x_19 = lean_unsigned_to_nat(1u); +x_20 = l_Lean_Syntax_getArg(x_1, x_19); +x_21 = l___private_Lean_Elab_Binders_0__Lean_Elab_Term_expandOptIdent(x_20, x_2, x_3, x_4, x_5, x_6, x_7, 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_22); -x_24 = !lean_is_exclusive(x_23); -if (x_24 == 0) +lean_dec(x_20); +x_22 = !lean_is_exclusive(x_21); +if (x_22 == 0) { -lean_object* x_25; lean_object* x_26; lean_object* x_27; uint8_t x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; -x_25 = lean_ctor_get(x_23, 0); -x_26 = lean_unsigned_to_nat(2u); -x_27 = lean_array_get(x_20, x_10, x_26); -x_28 = 3; -x_29 = lean_alloc_ctor(0, 2, 1); -lean_ctor_set(x_29, 0, x_25); -lean_ctor_set(x_29, 1, x_27); -lean_ctor_set_uint8(x_29, sizeof(void*)*2, x_28); -x_30 = l_Lean_mkOptionalNode___closed__2; -x_31 = lean_array_push(x_30, x_29); -lean_ctor_set(x_23, 0, x_31); -return x_23; +lean_object* x_23; lean_object* x_24; lean_object* x_25; uint8_t x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_23 = lean_ctor_get(x_21, 0); +x_24 = lean_unsigned_to_nat(2u); +x_25 = l_Lean_Syntax_getArg(x_1, x_24); +lean_dec(x_1); +x_26 = 3; +x_27 = lean_alloc_ctor(0, 2, 1); +lean_ctor_set(x_27, 0, x_23); +lean_ctor_set(x_27, 1, x_25); +lean_ctor_set_uint8(x_27, sizeof(void*)*2, x_26); +x_28 = l_Lean_mkOptionalNode___closed__2; +x_29 = lean_array_push(x_28, x_27); +lean_ctor_set(x_21, 0, x_29); +return x_21; } else { -lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; uint8_t x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; -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_unsigned_to_nat(2u); -x_35 = lean_array_get(x_20, x_10, x_34); -x_36 = 3; -x_37 = lean_alloc_ctor(0, 2, 1); -lean_ctor_set(x_37, 0, x_32); -lean_ctor_set(x_37, 1, x_35); -lean_ctor_set_uint8(x_37, sizeof(void*)*2, x_36); -x_38 = l_Lean_mkOptionalNode___closed__2; -x_39 = lean_array_push(x_38, x_37); -x_40 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_40, 0, x_39); -lean_ctor_set(x_40, 1, x_33); -return x_40; +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; uint8_t x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; +x_30 = lean_ctor_get(x_21, 0); +x_31 = lean_ctor_get(x_21, 1); +lean_inc(x_31); +lean_inc(x_30); +lean_dec(x_21); +x_32 = lean_unsigned_to_nat(2u); +x_33 = l_Lean_Syntax_getArg(x_1, x_32); +lean_dec(x_1); +x_34 = 3; +x_35 = lean_alloc_ctor(0, 2, 1); +lean_ctor_set(x_35, 0, x_30); +lean_ctor_set(x_35, 1, x_33); +lean_ctor_set_uint8(x_35, sizeof(void*)*2, x_34); +x_36 = l_Lean_mkOptionalNode___closed__2; +x_37 = lean_array_push(x_36, x_35); +x_38 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_38, 0, x_37); +lean_ctor_set(x_38, 1, x_31); +return x_38; } } } else { -lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; -x_41 = l_Lean_instInhabitedSyntax; -x_42 = lean_unsigned_to_nat(1u); -x_43 = lean_array_get(x_41, x_10, x_42); +lean_object* x_39; lean_object* x_40; lean_object* x_41; +lean_dec(x_9); +x_39 = lean_unsigned_to_nat(1u); +x_40 = l_Lean_Syntax_getArg(x_1, x_39); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); lean_inc(x_3); lean_inc(x_2); -x_44 = l___private_Lean_Elab_Binders_0__Lean_Elab_Term_getBinderIds(x_43, x_2, x_3, x_4, x_5, x_6, x_7, x_8); -lean_dec(x_43); -if (lean_obj_tag(x_44) == 0) +x_41 = l___private_Lean_Elab_Binders_0__Lean_Elab_Term_getBinderIds(x_40, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +lean_dec(x_40); +if (lean_obj_tag(x_41) == 0) { -lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; size_t x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; -x_45 = lean_ctor_get(x_44, 0); -lean_inc(x_45); -x_46 = lean_ctor_get(x_44, 1); -lean_inc(x_46); -lean_dec(x_44); -x_47 = lean_unsigned_to_nat(2u); -x_48 = lean_array_get(x_41, x_10, x_47); -x_49 = l___private_Lean_Elab_Binders_0__Lean_Elab_Term_expandBinderType(x_1, x_48); -lean_dec(x_48); -x_50 = lean_array_get_size(x_45); -x_51 = lean_usize_of_nat(x_50); -lean_dec(x_50); -x_52 = x_45; -x_53 = lean_box_usize(x_51); -x_54 = l___private_Lean_Elab_Binders_0__Lean_Elab_Term_matchBinder___boxed__const__1; -x_55 = lean_alloc_closure((void*)(l_Array_mapMUnsafe_map___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_matchBinder___spec__2___boxed), 11, 4); -lean_closure_set(x_55, 0, x_49); -lean_closure_set(x_55, 1, x_53); -lean_closure_set(x_55, 2, x_54); -lean_closure_set(x_55, 3, x_52); -x_56 = x_55; -x_57 = lean_apply_7(x_56, x_2, x_3, x_4, x_5, x_6, x_7, x_46); -return x_57; +lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; size_t 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_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_unsigned_to_nat(2u); +x_45 = l_Lean_Syntax_getArg(x_1, x_44); +x_46 = l___private_Lean_Elab_Binders_0__Lean_Elab_Term_expandBinderType(x_1, x_45); +lean_dec(x_45); +lean_dec(x_1); +x_47 = lean_array_get_size(x_42); +x_48 = lean_usize_of_nat(x_47); +lean_dec(x_47); +x_49 = x_42; +x_50 = lean_box_usize(x_48); +x_51 = l___private_Lean_Elab_Binders_0__Lean_Elab_Term_matchBinder___boxed__const__1; +x_52 = lean_alloc_closure((void*)(l_Array_mapMUnsafe_map___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_matchBinder___spec__2___boxed), 11, 4); +lean_closure_set(x_52, 0, x_46); +lean_closure_set(x_52, 1, x_50); +lean_closure_set(x_52, 2, x_51); +lean_closure_set(x_52, 3, x_49); +x_53 = x_52; +x_54 = lean_apply_7(x_53, x_2, x_3, x_4, x_5, x_6, x_7, x_43); +return x_54; } else { -uint8_t x_58; +uint8_t x_55; 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_58 = !lean_is_exclusive(x_44); -if (x_58 == 0) +lean_dec(x_1); +x_55 = !lean_is_exclusive(x_41); +if (x_55 == 0) { -return x_44; +return x_41; +} +else +{ +lean_object* x_56; lean_object* x_57; lean_object* x_58; +x_56 = lean_ctor_get(x_41, 0); +x_57 = lean_ctor_get(x_41, 1); +lean_inc(x_57); +lean_inc(x_56); +lean_dec(x_41); +x_58 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_58, 0, x_56); +lean_ctor_set(x_58, 1, x_57); +return x_58; +} +} +} } else { lean_object* x_59; lean_object* x_60; lean_object* x_61; -x_59 = lean_ctor_get(x_44, 0); -x_60 = lean_ctor_get(x_44, 1); -lean_inc(x_60); -lean_inc(x_59); -lean_dec(x_44); -x_61 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_61, 0, x_59); -lean_ctor_set(x_61, 1, x_60); -return x_61; -} -} -} -} -else -{ -lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; -x_62 = l_Lean_instInhabitedSyntax; -x_63 = lean_unsigned_to_nat(1u); -x_64 = lean_array_get(x_62, x_10, x_63); +lean_dec(x_9); +x_59 = lean_unsigned_to_nat(1u); +x_60 = l_Lean_Syntax_getArg(x_1, x_59); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); lean_inc(x_3); lean_inc(x_2); -x_65 = l___private_Lean_Elab_Binders_0__Lean_Elab_Term_getBinderIds(x_64, x_2, x_3, x_4, x_5, x_6, x_7, x_8); -lean_dec(x_64); -if (lean_obj_tag(x_65) == 0) +x_61 = l___private_Lean_Elab_Binders_0__Lean_Elab_Term_getBinderIds(x_60, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +lean_dec(x_60); +if (lean_obj_tag(x_61) == 0) { -lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; -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_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; +x_62 = lean_ctor_get(x_61, 0); +lean_inc(x_62); +x_63 = lean_ctor_get(x_61, 1); +lean_inc(x_63); +lean_dec(x_61); +x_64 = lean_unsigned_to_nat(2u); +x_65 = l_Lean_Syntax_getArg(x_1, x_64); +x_66 = l___private_Lean_Elab_Binders_0__Lean_Elab_Term_expandBinderType(x_1, x_65); lean_dec(x_65); -x_68 = lean_unsigned_to_nat(2u); -x_69 = lean_array_get(x_62, x_10, x_68); -x_70 = l___private_Lean_Elab_Binders_0__Lean_Elab_Term_expandBinderType(x_1, x_69); -lean_dec(x_69); -x_71 = lean_unsigned_to_nat(3u); -x_72 = lean_array_get(x_62, x_10, x_71); +x_67 = lean_unsigned_to_nat(3u); +x_68 = l_Lean_Syntax_getArg(x_1, x_67); +lean_dec(x_1); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); lean_inc(x_3); lean_inc(x_2); -x_73 = l___private_Lean_Elab_Binders_0__Lean_Elab_Term_expandBinderModifier(x_70, x_72, x_2, x_3, x_4, x_5, x_6, x_7, x_67); -lean_dec(x_72); -if (lean_obj_tag(x_73) == 0) +x_69 = l___private_Lean_Elab_Binders_0__Lean_Elab_Term_expandBinderModifier(x_66, x_68, x_2, x_3, x_4, x_5, x_6, x_7, x_63); +lean_dec(x_68); +if (lean_obj_tag(x_69) == 0) { -lean_object* x_74; lean_object* x_75; lean_object* x_76; size_t x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; -x_74 = lean_ctor_get(x_73, 0); -lean_inc(x_74); -x_75 = lean_ctor_get(x_73, 1); -lean_inc(x_75); -lean_dec(x_73); -x_76 = lean_array_get_size(x_66); -x_77 = lean_usize_of_nat(x_76); -lean_dec(x_76); -x_78 = x_66; -x_79 = lean_box_usize(x_77); -x_80 = l___private_Lean_Elab_Binders_0__Lean_Elab_Term_matchBinder___boxed__const__1; -x_81 = lean_alloc_closure((void*)(l_Array_mapMUnsafe_map___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_matchBinder___spec__3___boxed), 11, 4); -lean_closure_set(x_81, 0, x_74); -lean_closure_set(x_81, 1, x_79); -lean_closure_set(x_81, 2, x_80); -lean_closure_set(x_81, 3, x_78); -x_82 = x_81; -x_83 = lean_apply_7(x_82, x_2, x_3, x_4, x_5, x_6, x_7, x_75); -return x_83; +lean_object* x_70; lean_object* x_71; lean_object* x_72; size_t x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; +x_70 = lean_ctor_get(x_69, 0); +lean_inc(x_70); +x_71 = lean_ctor_get(x_69, 1); +lean_inc(x_71); +lean_dec(x_69); +x_72 = lean_array_get_size(x_62); +x_73 = lean_usize_of_nat(x_72); +lean_dec(x_72); +x_74 = x_62; +x_75 = lean_box_usize(x_73); +x_76 = l___private_Lean_Elab_Binders_0__Lean_Elab_Term_matchBinder___boxed__const__1; +x_77 = lean_alloc_closure((void*)(l_Array_mapMUnsafe_map___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_matchBinder___spec__3___boxed), 11, 4); +lean_closure_set(x_77, 0, x_70); +lean_closure_set(x_77, 1, x_75); +lean_closure_set(x_77, 2, x_76); +lean_closure_set(x_77, 3, x_74); +x_78 = x_77; +x_79 = lean_apply_7(x_78, x_2, x_3, x_4, x_5, x_6, x_7, x_71); +return x_79; } else { -uint8_t x_84; -lean_dec(x_66); +uint8_t x_80; +lean_dec(x_62); 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_84 = !lean_is_exclusive(x_73); +x_80 = !lean_is_exclusive(x_69); +if (x_80 == 0) +{ +return x_69; +} +else +{ +lean_object* x_81; lean_object* x_82; lean_object* x_83; +x_81 = lean_ctor_get(x_69, 0); +x_82 = lean_ctor_get(x_69, 1); +lean_inc(x_82); +lean_inc(x_81); +lean_dec(x_69); +x_83 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_83, 0, x_81); +lean_ctor_set(x_83, 1, x_82); +return x_83; +} +} +} +else +{ +uint8_t x_84; +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_84 = !lean_is_exclusive(x_61); if (x_84 == 0) { -return x_73; +return x_61; } else { lean_object* x_85; lean_object* x_86; lean_object* x_87; -x_85 = lean_ctor_get(x_73, 0); -x_86 = lean_ctor_get(x_73, 1); +x_85 = lean_ctor_get(x_61, 0); +x_86 = lean_ctor_get(x_61, 1); lean_inc(x_86); lean_inc(x_85); -lean_dec(x_73); +lean_dec(x_61); x_87 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_87, 0, x_85); lean_ctor_set(x_87, 1, x_86); @@ -4726,120 +4725,80 @@ return x_87; } } } -else -{ -uint8_t x_88; -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_88 = !lean_is_exclusive(x_65); -if (x_88 == 0) -{ -return x_65; } else { -lean_object* x_89; lean_object* x_90; lean_object* x_91; -x_89 = lean_ctor_get(x_65, 0); -x_90 = lean_ctor_get(x_65, 1); -lean_inc(x_90); -lean_inc(x_89); -lean_dec(x_65); -x_91 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_91, 0, x_89); -lean_ctor_set(x_91, 1, x_90); -return x_91; -} -} -} -} -else -{ -lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; -x_92 = l_Lean_instInhabitedSyntax; -x_93 = lean_unsigned_to_nat(0u); -x_94 = lean_array_get(x_92, x_10, x_93); +lean_object* x_88; lean_object* x_89; lean_object* x_90; +lean_dec(x_9); +x_88 = lean_unsigned_to_nat(0u); +x_89 = l_Lean_Syntax_getArg(x_1, x_88); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); lean_inc(x_3); lean_inc(x_2); -x_95 = l___private_Lean_Elab_Binders_0__Lean_Elab_Term_getBinderIds(x_94, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +x_90 = l___private_Lean_Elab_Binders_0__Lean_Elab_Term_getBinderIds(x_89, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +lean_dec(x_89); +if (lean_obj_tag(x_90) == 0) +{ +lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; size_t x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; +x_91 = lean_ctor_get(x_90, 0); +lean_inc(x_91); +x_92 = lean_ctor_get(x_90, 1); +lean_inc(x_92); +lean_dec(x_90); +x_93 = lean_unsigned_to_nat(1u); +x_94 = l_Lean_Syntax_getArg(x_1, x_93); +x_95 = l_Lean_Elab_Term_expandOptType(x_1, x_94); lean_dec(x_94); -if (lean_obj_tag(x_95) == 0) -{ -lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; size_t x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; -x_96 = lean_ctor_get(x_95, 0); -lean_inc(x_96); -x_97 = lean_ctor_get(x_95, 1); -lean_inc(x_97); -lean_dec(x_95); -x_98 = lean_unsigned_to_nat(1u); -x_99 = lean_array_get(x_92, x_10, x_98); -x_100 = l_Lean_Elab_Term_expandOptType(x_1, x_99); -lean_dec(x_99); -x_101 = lean_array_get_size(x_96); -x_102 = lean_usize_of_nat(x_101); -lean_dec(x_101); -x_103 = x_96; -x_104 = lean_box_usize(x_102); -x_105 = l___private_Lean_Elab_Binders_0__Lean_Elab_Term_matchBinder___boxed__const__1; -x_106 = lean_alloc_closure((void*)(l_Array_mapMUnsafe_map___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_matchBinder___spec__4___boxed), 11, 4); -lean_closure_set(x_106, 0, x_100); -lean_closure_set(x_106, 1, x_104); -lean_closure_set(x_106, 2, x_105); -lean_closure_set(x_106, 3, x_103); -x_107 = x_106; -x_108 = lean_apply_7(x_107, x_2, x_3, x_4, x_5, x_6, x_7, x_97); -return x_108; +lean_dec(x_1); +x_96 = lean_array_get_size(x_91); +x_97 = lean_usize_of_nat(x_96); +lean_dec(x_96); +x_98 = x_91; +x_99 = lean_box_usize(x_97); +x_100 = l___private_Lean_Elab_Binders_0__Lean_Elab_Term_matchBinder___boxed__const__1; +x_101 = lean_alloc_closure((void*)(l_Array_mapMUnsafe_map___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_matchBinder___spec__4___boxed), 11, 4); +lean_closure_set(x_101, 0, x_95); +lean_closure_set(x_101, 1, x_99); +lean_closure_set(x_101, 2, x_100); +lean_closure_set(x_101, 3, x_98); +x_102 = x_101; +x_103 = lean_apply_7(x_102, x_2, x_3, x_4, x_5, x_6, x_7, x_92); +return x_103; } else { -uint8_t x_109; +uint8_t x_104; 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_109 = !lean_is_exclusive(x_95); -if (x_109 == 0) +lean_dec(x_1); +x_104 = !lean_is_exclusive(x_90); +if (x_104 == 0) { -return x_95; +return x_90; } else { -lean_object* x_110; lean_object* x_111; lean_object* x_112; -x_110 = lean_ctor_get(x_95, 0); -x_111 = lean_ctor_get(x_95, 1); -lean_inc(x_111); -lean_inc(x_110); -lean_dec(x_95); -x_112 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_112, 0, x_110); -lean_ctor_set(x_112, 1, x_111); -return x_112; +lean_object* x_105; lean_object* x_106; lean_object* x_107; +x_105 = lean_ctor_get(x_90, 0); +x_106 = lean_ctor_get(x_90, 1); +lean_inc(x_106); +lean_inc(x_105); +lean_dec(x_90); +x_107 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_107, 0, x_105); +lean_ctor_set(x_107, 1, x_106); +return x_107; } } } } -else -{ -lean_object* x_113; -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_113 = l_Lean_Elab_throwUnsupportedSyntax___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_matchBinder___spec__1___rarg(x_8); -return x_113; -} -} } lean_object* l_Lean_Elab_throwUnsupportedSyntax___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_matchBinder___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) { _start: @@ -4906,15 +4865,6 @@ lean_dec(x_6); return x_14; } } -lean_object* l___private_Lean_Elab_Binders_0__Lean_Elab_Term_matchBinder___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___private_Lean_Elab_Binders_0__Lean_Elab_Term_matchBinder(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); -lean_dec(x_1); -return x_9; -} -} static lean_object* _init_l___private_Lean_Elab_Binders_0__Lean_Elab_Term_registerFailedToInferBinderTypeInfo___closed__1() { _start: { @@ -5367,7 +5317,6 @@ lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); x_16 = l___private_Lean_Elab_Binders_0__Lean_Elab_Term_matchBinder(x_15, x_5, x_6, x_7, x_8, x_9, x_10, x_11); -lean_dec(x_15); if (lean_obj_tag(x_16) == 0) { 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; @@ -18163,7 +18112,6 @@ lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); x_15 = l___private_Lean_Elab_Binders_0__Lean_Elab_Term_matchBinder(x_14, x_4, x_5, x_6, x_7, x_8, x_9, x_10); -lean_dec(x_14); if (lean_obj_tag(x_15) == 0) { lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; @@ -22216,7 +22164,7 @@ _start: lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; x_1 = l_Lean_Elab_Term_quoteAutoTactic___closed__1; x_2 = l_Lean_Elab_Term_elabLetDeclCore___closed__1; -x_3 = lean_unsigned_to_nat(592u); +x_3 = lean_unsigned_to_nat(590u); x_4 = lean_unsigned_to_nat(24u); x_5 = l_Lean_Name_getString_x21___closed__3; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -22721,7 +22669,7 @@ x_5 = l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(x_2, x_3, x_4, x_1); return x_5; } } -lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Binders___hyg_5427_(lean_object* x_1) { +lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Binders___hyg_5413_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; @@ -22934,7 +22882,7 @@ lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_elabLetDelayedDecl___closed__ res = l___regBuiltin_Lean_Elab_Term_elabLetDelayedDecl(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); -res = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Binders___hyg_5427_(lean_io_mk_world()); +res = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Binders___hyg_5413_(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/Elab/Match.c b/stage0/stdlib/Lean/Elab/Match.c index 0e8839d17d..5674d3c95a 100644 --- a/stage0/stdlib/Lean/Elab/Match.c +++ b/stage0/stdlib/Lean/Elab/Match.c @@ -18,7 +18,6 @@ lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_withExistingLocalDeclsImp_ lean_object* l_Lean_Elab_Term_elabMatch_elabMatchDefault_match__1(lean_object*); extern lean_object* l_Lean_Name_toString___closed__1; lean_object* l_Lean_throwErrorAt___at___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_processVar___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* lean_array_set(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabNoMatch___closed__1; lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_getNumExplicitCtorParams___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_CollectPatternVars_collect___closed__8; @@ -57,7 +56,6 @@ lean_object* l_Std_fmt___at_Lean_Position_instToFormatPosition___spec__1(lean_ob lean_object* lean_nat_div(lean_object*, lean_object*); lean_object* l_Std_RBNode_insert___at_Lean_NameSet_insert___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_mkForallFVars(lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7149____closed__5; lean_object* l_Lean_throwErrorAt___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux___spec__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_nameToPattern___closed__18; lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabDiscrsWitMatchType___spec__1___lambda__2___closed__2; @@ -123,6 +121,7 @@ lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_mkMVarSyntax___boxed( lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_ToDepElimPattern_mkLocalDeclFor___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_uset(lean_object*, size_t, lean_object*); lean_object* l_Lean_Elab_Term_expandMacrosInPatterns___boxed__const__1; +lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7106____closed__1; lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_isNextArgAccessible___boxed(lean_object*); lean_object* l_Array_qpartition_loop___at___private_Lean_Elab_Tactic_Basic_0__Lean_Elab_Tactic_sortFVarIds___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_identKind___closed__2; @@ -150,6 +149,7 @@ uint8_t l_Lean_checkTraceOption(lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f_match__1___rarg(lean_object*, lean_object*, lean_object*); extern lean_object* l___private_Lean_Meta_ExprDefEq_0__Lean_Meta_checkTypesAndAssign___closed__7; lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_nameToPattern___closed__8; +lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7106____closed__2; lean_object* l_List_forIn_loop___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux___spec__4___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_throwErrorAt___at_Lean_Elab_Term_quoteAutoTactic___spec__2(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*); @@ -206,7 +206,7 @@ lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux___closed lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_getNextParam(lean_object*); lean_object* l_Lean_getConstInfo___at_Lean_Elab_Term_CollectPatternVars_collect_processCtorAppCore___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_throwError___at___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_throwInvalidPattern___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Term_CollectPatternVars_collect___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_Elab_Term_CollectPatternVars_collect___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Expr_getAppArgs___closed__1; lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltViews_collectDeps___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_getNumExplicitCtorParams(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -271,7 +271,6 @@ lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_collectPatternVars_ma lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_nameToPattern___closed__13; lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_doubleQuotedNameToPattern___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltViews_loop___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* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7149____closed__2; lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Term_CollectPatternVars_main___spec__3___closed__1; lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchTypeAndDiscrs_loop___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_finalizePatternDecls(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -281,6 +280,7 @@ lean_object* l_Lean_Elab_Term_elabMatch_elabMatchDefault___lambda__1___boxed(lea lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltViews_updateMatchType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_CollectPatternVars_collect_processExplicitArg_match__1(lean_object*); lean_object* l_Lean_throwError___at_Lean_Elab_Term_CollectPatternVars_collect_processCtorAppCore___spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7106____closed__5; lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Term_CollectPatternVars_main___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_instToExprUnit___lambda__1___closed__1; lean_object* l_Lean_mkAppN(lean_object*, lean_object*); @@ -294,9 +294,9 @@ lean_object* l_List_map___at_Lean_Elab_Term_CollectPatternVars_collect_processEx lean_object* l_Lean_throwError___at___private_Lean_Elab_Term_0__Lean_Elab_Term_applyAttributesCore___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_nameToPattern___closed__21; lean_object* l_Lean_Elab_throwUnsupportedSyntax___at_Lean_Elab_Term_getPatternsVars___spec__3___rarg(lean_object*); +lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7106____closed__3; lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_getDiscrs(lean_object*); lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Term_expandMacrosInPatterns___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Term_CollectPatternVars_collect_match__1(lean_object*); lean_object* l_Lean_throwErrorAt___at___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppAux___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Term_CollectPatternVars_collect___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* l___private_Lean_Elab_Match_0__Lean_Elab_Term_ToDepElimPattern_markAsVisited(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -413,6 +413,7 @@ lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_isPatternVar_match__1 lean_object* l_Lean_throwErrorAt___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux___spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Subarray_forInUnsafe_loop___at___private_Lean_Elab_Match_0__Lean_Elab_Term_getIndicesToInclude___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*); lean_object* l_Lean_Elab_Term_CollectPatternVars_collect_processCtorApp___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7106____closed__4; lean_object* l_Lean_MonadRef_mkInfoFromRefPos___at_Lean_Elab_Term_CollectPatternVars_collect___spec__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabPatterns___spec__2___closed__2; lean_object* l_Lean_MonadRef_mkInfoFromRefPos___at_Lean_Elab_Term_quoteAutoTactic___spec__4___rarg(lean_object*, lean_object*, lean_object*); @@ -514,7 +515,6 @@ lean_object* l_Lean_Elab_Term_CollectPatternVars_collect_processCtorAppCore___la lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_withPatternVars_loop___rarg___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* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltViews_updateFirst___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltViews_addWildcardPatterns___spec__1(lean_object*, size_t, size_t, lean_object*); -lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7149____closed__4; lean_object* l_Array_anyMUnsafe_any___at_Lean_Elab_Term_elabMatch_elabMatchDefault___spec__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltViews_addWildcardPatterns___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Term_expandMacrosInPatterns___spec__2(size_t, size_t, lean_object*, lean_object*, lean_object*); @@ -585,6 +585,7 @@ lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_Term_finalizePatternDecls__ extern uint8_t l_Lean_instInhabitedBinderInfo; lean_object* l_Lean_Elab_Term_reportMatcherResultErrors___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_synthesizeSyntheticMVarsUsingDefault(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_identKind; lean_object* l_Lean_Elab_Term_getPatternVars(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_throwError___at___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_throwCtorExpected___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_assignExprMVar(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -697,8 +698,7 @@ lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_getMatchAlts(lean_obj lean_object* l_Array_anyMUnsafe_any___at_Lean_Elab_Term_ToDepElimPattern_main___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Elab_Term_elabMatch___closed__1; lean_object* l_List_forIn_loop___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltViews_collectDeps___spec__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* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7149____closed__1; -lean_object* l_Lean_Elab_Term_CollectPatternVars_collect___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* l_Lean_Elab_Term_CollectPatternVars_collect___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* l_List_forIn_loop___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux___spec__3___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Meta_Tactic_Intro_0__Lean_Meta_introNImp___spec__1(size_t, size_t, lean_object*); extern lean_object* l_Lean_initFn____x40_Lean_Parser_Extra___hyg_938____closed__7; @@ -784,7 +784,6 @@ lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_pr uint8_t l_Lean_NameSet_contains(lean_object*, lean_object*); lean_object* l_Lean_MonadRef_mkInfoFromRefPos___at___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_finalize___spec__2___rarg___boxed(lean_object*, lean_object*, lean_object*); extern lean_object* l_Std_Range_myMacro____x40_Init_Data_Range___hyg_365____closed__2; -lean_object* l_Lean_Elab_Term_CollectPatternVars_collect_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_whnfD(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_isPatternVar___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_CollectPatternVars_collect_processId_match__1(lean_object*); @@ -857,7 +856,6 @@ lean_object* l_Lean_Elab_Term_CollectPatternVars_collect_processCtorAppCore_matc lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabDiscrsWitMatchType_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Elab_Term_elabMVarWithIdKind___closed__1; lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux_match__4___rarg(lean_object*, lean_object*); -lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7149____closed__3; lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltView___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* l_Lean_indentExpr(lean_object*); lean_object* l_Lean_Meta_mkFreshExprMVarWithId(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -870,9 +868,9 @@ lean_object* l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux_match__3 lean_object* l_Lean_Elab_Term_isLocalIdent_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_forIn_loop___at___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAux___spec__4___lambda__1___closed__1; lean_object* l_Array_mapMUnsafe_map___at_Lean_Meta_Closure_mkBinding___spec__1(size_t, size_t, lean_object*); -lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_9603_(lean_object*); +lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_9560_(lean_object*); lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_1540_(lean_object*); -lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7149_(lean_object*); +lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7106_(lean_object*); lean_object* l_Lean_mkConst(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_reportMatcherResultErrors___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkSimpleThunk(lean_object*); @@ -6806,59 +6804,6 @@ x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Term_CollectPatternVars_collect_pro return x_2; } } -lean_object* l_Lean_Elab_Term_CollectPatternVars_collect_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -switch (lean_obj_tag(x_1)) { -case 1: -{ -lean_object* x_5; lean_object* x_6; lean_object* x_7; -lean_dec(x_4); -lean_dec(x_3); -x_5 = lean_ctor_get(x_1, 0); -lean_inc(x_5); -x_6 = lean_ctor_get(x_1, 1); -lean_inc(x_6); -lean_dec(x_1); -x_7 = lean_apply_2(x_2, x_5, x_6); -return x_7; -} -case 3: -{ -lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; -lean_dec(x_4); -lean_dec(x_2); -x_8 = lean_ctor_get(x_1, 0); -lean_inc(x_8); -x_9 = lean_ctor_get(x_1, 1); -lean_inc(x_9); -x_10 = lean_ctor_get(x_1, 2); -lean_inc(x_10); -x_11 = lean_ctor_get(x_1, 3); -lean_inc(x_11); -lean_dec(x_1); -x_12 = lean_apply_4(x_3, x_8, x_9, x_10, x_11); -return x_12; -} -default: -{ -lean_object* x_13; -lean_dec(x_3); -lean_dec(x_2); -x_13 = lean_apply_1(x_4, x_1); -return x_13; -} -} -} -} -lean_object* l_Lean_Elab_Term_CollectPatternVars_collect_match__1(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Term_CollectPatternVars_collect_match__1___rarg), 4, 0); -return x_2; -} -} lean_object* l_Lean_Elab_Term_CollectPatternVars_collect_processCtorApp(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: { @@ -8685,7 +8630,7 @@ _start: lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; x_1 = l_Lean_Elab_Term_CollectPatternVars_collect_pushNewArg___closed__3; x_2 = l_Lean_Elab_Term_CollectPatternVars_collect_pushNewArg___closed__4; -x_3 = lean_unsigned_to_nat(433u); +x_3 = lean_unsigned_to_nat(431u); x_4 = lean_unsigned_to_nat(11u); x_5 = l_Lean_Name_getString_x21___closed__3; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -9032,90 +8977,82 @@ x_2 = lean_box_usize(x_1); return x_2; } } -lean_object* l_Lean_Elab_Term_CollectPatternVars_collect___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) { +lean_object* l_Lean_Elab_Term_CollectPatternVars_collect___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) { _start: { -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; size_t 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 = l_Lean_instInhabitedSyntax; -x_13 = lean_unsigned_to_nat(2u); -x_14 = lean_array_get(x_12, x_1, x_13); -x_15 = l_Lean_Syntax_getArgs(x_14); +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; size_t 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; +x_11 = lean_unsigned_to_nat(2u); +x_12 = l_Lean_Syntax_getArg(x_1, x_11); +x_13 = l_Lean_Syntax_getArgs(x_12); +lean_dec(x_12); +x_14 = lean_array_get_size(x_13); +x_15 = lean_usize_of_nat(x_14); lean_dec(x_14); -x_16 = lean_array_get_size(x_15); -x_17 = lean_usize_of_nat(x_16); -lean_dec(x_16); -x_18 = x_15; -x_19 = lean_box_usize(x_17); -x_20 = l_Lean_Elab_Term_CollectPatternVars_collect___lambda__1___boxed__const__1; -x_21 = lean_alloc_closure((void*)(l_Array_mapMUnsafe_map___at_Lean_Elab_Term_CollectPatternVars_collect___spec__4___boxed), 11, 3); -lean_closure_set(x_21, 0, x_19); -lean_closure_set(x_21, 1, x_20); -lean_closure_set(x_21, 2, x_18); -x_22 = x_21; -x_23 = lean_apply_8(x_22, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11); -if (lean_obj_tag(x_23) == 0) +x_16 = x_13; +x_17 = lean_box_usize(x_15); +x_18 = l_Lean_Elab_Term_CollectPatternVars_collect___lambda__1___boxed__const__1; +x_19 = lean_alloc_closure((void*)(l_Array_mapMUnsafe_map___at_Lean_Elab_Term_CollectPatternVars_collect___spec__4___boxed), 11, 3); +lean_closure_set(x_19, 0, x_17); +lean_closure_set(x_19, 1, x_18); +lean_closure_set(x_19, 2, x_16); +x_20 = x_19; +x_21 = lean_apply_8(x_20, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +if (lean_obj_tag(x_21) == 0) { -uint8_t x_24; -x_24 = !lean_is_exclusive(x_23); -if (x_24 == 0) +uint8_t x_22; +x_22 = !lean_is_exclusive(x_21); +if (x_22 == 0) { -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_23, 0); -x_26 = l_Lean_nullKind; -x_27 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_27, 0, x_26); -lean_ctor_set(x_27, 1, x_25); -x_28 = lean_array_set(x_1, x_13, x_27); -x_29 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_29, 0, x_2); -lean_ctor_set(x_29, 1, x_28); -lean_ctor_set(x_23, 0, x_29); -return x_23; +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; +x_23 = lean_ctor_get(x_21, 0); +x_24 = l_Lean_nullKind; +x_25 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_25, 0, x_24); +lean_ctor_set(x_25, 1, x_23); +x_26 = l_Lean_Syntax_setArg(x_1, x_11, x_25); +lean_ctor_set(x_21, 0, x_26); +return x_21; } else { -lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; -x_30 = lean_ctor_get(x_23, 0); -x_31 = lean_ctor_get(x_23, 1); -lean_inc(x_31); -lean_inc(x_30); -lean_dec(x_23); -x_32 = l_Lean_nullKind; -x_33 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_33, 0, x_32); -lean_ctor_set(x_33, 1, x_30); -x_34 = lean_array_set(x_1, x_13, x_33); -x_35 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_35, 0, x_2); -lean_ctor_set(x_35, 1, x_34); -x_36 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_36, 0, x_35); -lean_ctor_set(x_36, 1, x_31); -return x_36; +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_27 = lean_ctor_get(x_21, 0); +x_28 = lean_ctor_get(x_21, 1); +lean_inc(x_28); +lean_inc(x_27); +lean_dec(x_21); +x_29 = l_Lean_nullKind; +x_30 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_30, 0, x_29); +lean_ctor_set(x_30, 1, x_27); +x_31 = l_Lean_Syntax_setArg(x_1, x_11, x_30); +x_32 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_32, 0, x_31); +lean_ctor_set(x_32, 1, x_28); +return x_32; } } else { -uint8_t x_37; -lean_dec(x_2); +uint8_t x_33; lean_dec(x_1); -x_37 = !lean_is_exclusive(x_23); -if (x_37 == 0) +x_33 = !lean_is_exclusive(x_21); +if (x_33 == 0) { -return x_23; +return x_21; } else { -lean_object* x_38; lean_object* x_39; lean_object* x_40; -x_38 = lean_ctor_get(x_23, 0); -x_39 = lean_ctor_get(x_23, 1); -lean_inc(x_39); -lean_inc(x_38); -lean_dec(x_23); -x_40 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_40, 0, x_38); -lean_ctor_set(x_40, 1, x_39); -return x_40; +lean_object* x_34; lean_object* x_35; lean_object* x_36; +x_34 = lean_ctor_get(x_21, 0); +x_35 = lean_ctor_get(x_21, 1); +lean_inc(x_35); +lean_inc(x_34); +lean_dec(x_21); +x_36 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_36, 0, x_34); +lean_ctor_set(x_36, 1, x_35); +return x_36; } } } @@ -9240,148 +9177,156 @@ return x_2; lean_object* l_Lean_Elab_Term_CollectPatternVars_collect(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: { -switch (lean_obj_tag(x_1)) { -case 1: -{ -lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; uint8_t x_14; -x_10 = lean_ctor_get(x_1, 0); -lean_inc(x_10); -x_11 = lean_ctor_get(x_1, 1); -lean_inc(x_11); -x_12 = l_myMacro____x40_Init_Notation___hyg_2278____closed__4; -x_13 = lean_name_eq(x_10, x_12); +lean_object* x_10; lean_object* x_11; uint8_t x_12; uint8_t x_13; +lean_inc(x_1); +x_10 = l_Lean_Syntax_getKind(x_1); +x_11 = l_Lean_identKind; +x_12 = lean_name_eq(x_10, x_11); +x_13 = !lean_is_exclusive(x_7); if (x_13 == 0) { -uint8_t x_1233; -x_1233 = 0; -x_14 = x_1233; -goto block_1232; -} -else +lean_object* x_14; lean_object* x_15; lean_object* x_16; uint8_t x_17; lean_object* x_18; lean_object* x_19; +x_14 = lean_ctor_get(x_7, 3); +x_15 = l_Lean_replaceRef(x_1, x_14); +lean_dec(x_14); +lean_ctor_set(x_7, 3, x_15); +x_16 = lean_st_ref_take(x_8, x_9); +if (x_12 == 0) { -uint8_t x_1234; -x_1234 = 1; -x_14 = x_1234; -goto block_1232; -} -block_1232: -{ -uint8_t x_15; -x_15 = !lean_is_exclusive(x_7); -if (x_15 == 0) -{ -lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; uint8_t x_21; -x_16 = lean_ctor_get(x_7, 3); -x_17 = l_Lean_replaceRef(x_1, x_16); +lean_object* x_864; lean_object* x_865; uint8_t x_866; +x_864 = lean_ctor_get(x_16, 0); +lean_inc(x_864); +x_865 = lean_ctor_get(x_16, 1); +lean_inc(x_865); lean_dec(x_16); -lean_ctor_set(x_7, 3, x_17); -x_18 = lean_st_ref_take(x_8, x_9); -x_19 = lean_ctor_get(x_18, 0); -lean_inc(x_19); -x_20 = lean_ctor_get(x_18, 1); -lean_inc(x_20); -lean_dec(x_18); -x_21 = !lean_is_exclusive(x_19); -if (x_21 == 0) +x_866 = 0; +x_17 = x_866; +x_18 = x_864; +x_19 = x_865; +goto block_863; +} +else { -lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; uint8_t x_26; -x_22 = lean_ctor_get(x_19, 1); -x_23 = lean_unsigned_to_nat(1u); -x_24 = lean_nat_add(x_22, x_23); -lean_ctor_set(x_19, 1, x_24); -x_25 = lean_st_ref_set(x_8, x_19, x_20); -x_26 = !lean_is_exclusive(x_25); -if (x_26 == 0) +lean_object* x_867; lean_object* x_868; uint8_t x_869; +x_867 = lean_ctor_get(x_16, 0); +lean_inc(x_867); +x_868 = lean_ctor_get(x_16, 1); +lean_inc(x_868); +lean_dec(x_16); +x_869 = 1; +x_17 = x_869; +x_18 = x_867; +x_19 = x_868; +goto block_863; +} +block_863: { -lean_object* x_27; lean_object* x_28; uint8_t x_29; -x_27 = lean_ctor_get(x_25, 1); -x_28 = lean_ctor_get(x_25, 0); -lean_dec(x_28); -x_29 = !lean_is_exclusive(x_3); -if (x_29 == 0) +uint8_t x_20; +x_20 = !lean_is_exclusive(x_18); +if (x_20 == 0) { -lean_object* x_30; -x_30 = lean_ctor_get(x_3, 4); -lean_dec(x_30); -lean_ctor_set(x_3, 4, x_22); -if (x_14 == 0) +lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; uint8_t x_25; +x_21 = lean_ctor_get(x_18, 1); +x_22 = lean_unsigned_to_nat(1u); +x_23 = lean_nat_add(x_21, x_22); +lean_ctor_set(x_18, 1, x_23); +x_24 = lean_st_ref_set(x_8, x_18, x_19); +x_25 = !lean_is_exclusive(x_24); +if (x_25 == 0) { -lean_object* x_31; uint8_t x_32; -x_31 = l_Lean_Parser_Term_anonymousCtor___elambda__1___closed__2; -x_32 = lean_name_eq(x_10, x_31); -if (x_32 == 0) +lean_object* x_26; lean_object* x_27; uint8_t x_28; +x_26 = lean_ctor_get(x_24, 1); +x_27 = lean_ctor_get(x_24, 0); +lean_dec(x_27); +x_28 = !lean_is_exclusive(x_3); +if (x_28 == 0) { -lean_object* x_33; uint8_t x_34; -x_33 = l_Std_Range_myMacro____x40_Init_Data_Range___hyg_365____closed__2; -x_34 = lean_name_eq(x_10, x_33); -if (x_34 == 0) +lean_object* x_29; +x_29 = lean_ctor_get(x_3, 4); +lean_dec(x_29); +lean_ctor_set(x_3, 4, x_21); +if (x_17 == 0) { -lean_object* x_35; uint8_t x_36; -x_35 = l_myMacro____x40_Init_Notation___hyg_13954____closed__13; -x_36 = lean_name_eq(x_10, x_35); -if (x_36 == 0) +lean_object* x_30; uint8_t x_31; +x_30 = l_myMacro____x40_Init_Notation___hyg_2278____closed__4; +x_31 = lean_name_eq(x_10, x_30); +if (x_31 == 0) { -lean_object* x_37; uint8_t x_38; -x_37 = l_myMacro____x40_Init_Notation___hyg_13352____closed__8; -x_38 = lean_name_eq(x_10, x_37); -if (x_38 == 0) +lean_object* x_32; uint8_t x_33; +x_32 = l_Lean_Parser_Term_anonymousCtor___elambda__1___closed__2; +x_33 = lean_name_eq(x_10, x_32); +if (x_33 == 0) { -lean_object* x_39; uint8_t x_40; -lean_dec(x_11); -x_39 = l_Lean_Parser_Term_explicitUniv___elambda__1___closed__2; -x_40 = lean_name_eq(x_10, x_39); -if (x_40 == 0) +lean_object* x_34; uint8_t x_35; +x_34 = l_Std_Range_myMacro____x40_Init_Data_Range___hyg_365____closed__2; +x_35 = lean_name_eq(x_10, x_34); +if (x_35 == 0) { -lean_object* x_41; uint8_t x_42; -x_41 = l_Lean_Parser_Term_namedPattern___elambda__1___closed__2; -x_42 = lean_name_eq(x_10, x_41); -if (x_42 == 0) +lean_object* x_36; uint8_t x_37; +x_36 = l_myMacro____x40_Init_Notation___hyg_13954____closed__13; +x_37 = lean_name_eq(x_10, x_36); +if (x_37 == 0) { -lean_object* x_43; uint8_t x_44; -x_43 = l_Lean_Parser_Term_inaccessible___elambda__1___closed__2; -x_44 = lean_name_eq(x_10, x_43); -if (x_44 == 0) +lean_object* x_38; uint8_t x_39; +x_38 = l_myMacro____x40_Init_Notation___hyg_13352____closed__8; +x_39 = lean_name_eq(x_10, x_38); +if (x_39 == 0) { -lean_object* x_45; uint8_t x_46; -x_45 = l_Lean_strLitKind; -x_46 = lean_name_eq(x_10, x_45); -if (x_46 == 0) +lean_object* x_40; uint8_t x_41; +x_40 = l_Lean_Parser_Term_explicitUniv___elambda__1___closed__2; +x_41 = lean_name_eq(x_10, x_40); +if (x_41 == 0) { -lean_object* x_47; uint8_t x_48; -x_47 = l_Lean_numLitKind; -x_48 = lean_name_eq(x_10, x_47); -if (x_48 == 0) +lean_object* x_42; uint8_t x_43; +x_42 = l_Lean_Parser_Term_namedPattern___elambda__1___closed__2; +x_43 = lean_name_eq(x_10, x_42); +if (x_43 == 0) { -lean_object* x_49; uint8_t x_50; -x_49 = l_Lean_scientificLitKind; -x_50 = lean_name_eq(x_10, x_49); -if (x_50 == 0) +lean_object* x_44; uint8_t x_45; +x_44 = l_Lean_Parser_Term_inaccessible___elambda__1___closed__2; +x_45 = lean_name_eq(x_10, x_44); +if (x_45 == 0) { -lean_object* x_51; uint8_t x_52; -x_51 = l_Lean_charLitKind; -x_52 = lean_name_eq(x_10, x_51); -if (x_52 == 0) +lean_object* x_46; uint8_t x_47; +x_46 = l_Lean_strLitKind; +x_47 = lean_name_eq(x_10, x_46); +if (x_47 == 0) { -lean_object* x_53; uint8_t x_54; -lean_free_object(x_25); -x_53 = l_Lean_Parser_Term_quotedName___elambda__1___closed__2; -x_54 = lean_name_eq(x_10, x_53); -if (x_54 == 0) +lean_object* x_48; uint8_t x_49; +x_48 = l_Lean_numLitKind; +x_49 = lean_name_eq(x_10, x_48); +if (x_49 == 0) { -lean_object* x_55; uint8_t x_56; -x_55 = l_Lean_Parser_Term_doubleQuotedName___elambda__1___closed__2; -x_56 = lean_name_eq(x_10, x_55); -if (x_56 == 0) +lean_object* x_50; uint8_t x_51; +x_50 = l_Lean_scientificLitKind; +x_51 = lean_name_eq(x_10, x_50); +if (x_51 == 0) { -lean_object* x_57; uint8_t x_58; +lean_object* x_52; uint8_t x_53; +x_52 = l_Lean_charLitKind; +x_53 = lean_name_eq(x_10, x_52); +if (x_53 == 0) +{ +lean_object* x_54; uint8_t x_55; +lean_free_object(x_24); +x_54 = l_Lean_Parser_Term_quotedName___elambda__1___closed__2; +x_55 = lean_name_eq(x_10, x_54); +if (x_55 == 0) +{ +lean_object* x_56; uint8_t x_57; +x_56 = l_Lean_Parser_Term_doubleQuotedName___elambda__1___closed__2; +x_57 = lean_name_eq(x_10, x_56); +if (x_57 == 0) +{ +lean_object* x_58; uint8_t x_59; lean_dec(x_1); -x_57 = l_Lean_choiceKind; -x_58 = lean_name_eq(x_10, x_57); +x_58 = l_Lean_choiceKind; +x_59 = lean_name_eq(x_10, x_58); lean_dec(x_10); -if (x_58 == 0) +if (x_59 == 0) { -lean_object* x_59; -x_59 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_throwInvalidPattern___rarg(x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_27); +lean_object* x_60; +x_60 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_throwInvalidPattern___rarg(x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_26); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); @@ -9389,13 +9334,13 @@ lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); -return x_59; +return x_60; } else { -lean_object* x_60; lean_object* x_61; -x_60 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__2; -x_61 = l_Lean_throwError___at___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_finalize___spec__1(x_60, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_27); +lean_object* x_61; lean_object* x_62; +x_61 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__2; +x_62 = l_Lean_throwError___at___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_finalize___spec__1(x_61, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_26); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); @@ -9403,20 +9348,6 @@ lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); -return x_61; -} -} -else -{ -lean_object* x_62; -lean_dec(x_10); -lean_dec(x_2); -x_62 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_doubleQuotedNameToPattern(x_1, x_3, x_4, x_5, x_6, x_7, x_8, x_27); -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_1); return x_62; } } @@ -9425,9 +9356,8 @@ else lean_object* x_63; lean_dec(x_10); lean_dec(x_2); -x_63 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_quotedNameToPattern(x_1, x_3, x_4, x_5, x_6, x_7, x_8, x_27); +x_63 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_doubleQuotedNameToPattern(x_1, x_3, x_4, x_5, x_6, x_7, x_8, x_26); lean_dec(x_8); -lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); @@ -9437,16 +9367,17 @@ return x_63; } else { -lean_dec(x_3); -lean_dec(x_7); +lean_object* x_64; lean_dec(x_10); +lean_dec(x_2); +x_64 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_quotedNameToPattern(x_1, x_3, x_4, x_5, x_6, x_7, x_8, x_26); 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_ctor_set(x_25, 0, x_1); -return x_25; +lean_dec(x_1); +return x_64; } } else @@ -9459,8 +9390,8 @@ lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); -lean_ctor_set(x_25, 0, x_1); -return x_25; +lean_ctor_set(x_24, 0, x_1); +return x_24; } } else @@ -9473,8 +9404,8 @@ lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); -lean_ctor_set(x_25, 0, x_1); -return x_25; +lean_ctor_set(x_24, 0, x_1); +return x_24; } } else @@ -9487,8 +9418,8 @@ lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); -lean_ctor_set(x_25, 0, x_1); -return x_25; +lean_ctor_set(x_24, 0, x_1); +return x_24; } } else @@ -9501,156 +9432,164 @@ lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); -lean_ctor_set(x_25, 0, x_1); -return x_25; +lean_ctor_set(x_24, 0, x_1); +return x_24; } } else { -lean_object* x_64; lean_object* x_65; lean_object* x_66; -lean_free_object(x_25); +lean_dec(x_3); +lean_dec(x_7); lean_dec(x_10); -x_64 = lean_unsigned_to_nat(0u); -x_65 = l_Lean_Syntax_getArg(x_1, x_64); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +lean_ctor_set(x_24, 0, x_1); +return x_24; +} +} +else +{ +lean_object* x_65; lean_object* x_66; lean_object* x_67; +lean_free_object(x_24); +lean_dec(x_10); +x_65 = lean_unsigned_to_nat(0u); +x_66 = l_Lean_Syntax_getArg(x_1, x_65); lean_inc(x_7); -lean_inc(x_65); -x_66 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_processVar(x_65, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_27); -if (lean_obj_tag(x_66) == 0) +lean_inc(x_66); +x_67 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_processVar(x_66, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_26); +if (lean_obj_tag(x_67) == 0) { -lean_object* x_67; lean_object* x_68; lean_object* x_69; uint8_t x_70; -x_67 = lean_ctor_get(x_66, 1); -lean_inc(x_67); -lean_dec(x_66); -x_68 = lean_unsigned_to_nat(2u); -x_69 = l_Lean_Syntax_getArg(x_1, x_68); -x_70 = !lean_is_exclusive(x_1); -if (x_70 == 0) -{ -lean_object* x_71; lean_object* x_72; lean_object* x_73; -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_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; +x_68 = lean_ctor_get(x_67, 1); +lean_inc(x_68); +lean_dec(x_67); +x_69 = lean_unsigned_to_nat(2u); +x_70 = l_Lean_Syntax_getArg(x_1, x_69); +lean_dec(x_1); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); lean_inc(x_3); -x_73 = l_Lean_Elab_Term_CollectPatternVars_collect(x_69, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_67); -if (lean_obj_tag(x_73) == 0) +x_71 = l_Lean_Elab_Term_CollectPatternVars_collect(x_70, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_68); +if (lean_obj_tag(x_71) == 0) { -lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; uint8_t x_83; -x_74 = lean_ctor_get(x_73, 0); -lean_inc(x_74); -x_75 = lean_ctor_get(x_73, 1); +lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; uint8_t x_81; +x_72 = lean_ctor_get(x_71, 0); +lean_inc(x_72); +x_73 = lean_ctor_get(x_71, 1); +lean_inc(x_73); +lean_dec(x_71); +x_74 = l_Lean_MonadRef_mkInfoFromRefPos___at_Lean_Elab_Term_CollectPatternVars_collect___spec__1___rarg(x_7, x_8, x_73); +x_75 = lean_ctor_get(x_74, 0); lean_inc(x_75); -lean_dec(x_73); -x_76 = l_Lean_MonadRef_mkInfoFromRefPos___at_Lean_Elab_Term_CollectPatternVars_collect___spec__1___rarg(x_7, x_8, x_75); -x_77 = lean_ctor_get(x_76, 0); -lean_inc(x_77); -x_78 = lean_ctor_get(x_76, 1); -lean_inc(x_78); -lean_dec(x_76); -x_79 = l_Lean_Elab_Term_getCurrMacroScope(x_3, x_4, x_5, x_6, x_7, x_8, x_78); +x_76 = lean_ctor_get(x_74, 1); +lean_inc(x_76); +lean_dec(x_74); +x_77 = l_Lean_Elab_Term_getCurrMacroScope(x_3, x_4, x_5, x_6, x_7, x_8, x_76); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); -x_80 = lean_ctor_get(x_79, 0); -lean_inc(x_80); -x_81 = lean_ctor_get(x_79, 1); -lean_inc(x_81); -lean_dec(x_79); -x_82 = l_Lean_Elab_Term_getMainModule___rarg(x_8, x_81); +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 = l_Lean_Elab_Term_getMainModule___rarg(x_8, x_79); lean_dec(x_8); -x_83 = !lean_is_exclusive(x_82); -if (x_83 == 0) +x_81 = !lean_is_exclusive(x_80); +if (x_81 == 0) { -lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; -x_84 = lean_ctor_get(x_82, 0); -x_85 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__6; -x_86 = l_Lean_addMacroScope(x_84, x_85, x_80); -x_87 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__5; -x_88 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__9; -x_89 = lean_alloc_ctor(3, 4, 0); -lean_ctor_set(x_89, 0, x_77); -lean_ctor_set(x_89, 1, x_87); -lean_ctor_set(x_89, 2, x_86); -lean_ctor_set(x_89, 3, x_88); -x_90 = l_Array_empty___closed__1; -x_91 = lean_array_push(x_90, x_89); -x_92 = lean_array_push(x_90, x_65); -x_93 = lean_array_push(x_92, x_74); -x_94 = l_Lean_nullKind___closed__2; -lean_ctor_set(x_1, 1, x_93); -lean_ctor_set(x_1, 0, x_94); -x_95 = lean_array_push(x_91, x_1); -x_96 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_96, 0, x_12); -lean_ctor_set(x_96, 1, x_95); -lean_ctor_set(x_82, 0, x_96); -return x_82; +lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; +x_82 = lean_ctor_get(x_80, 0); +x_83 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__6; +x_84 = l_Lean_addMacroScope(x_82, x_83, x_78); +x_85 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__5; +x_86 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__9; +x_87 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_87, 0, x_75); +lean_ctor_set(x_87, 1, x_85); +lean_ctor_set(x_87, 2, x_84); +lean_ctor_set(x_87, 3, x_86); +x_88 = l_Array_empty___closed__1; +x_89 = lean_array_push(x_88, x_87); +x_90 = lean_array_push(x_88, x_66); +x_91 = lean_array_push(x_90, x_72); +x_92 = l_Lean_nullKind___closed__2; +x_93 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_93, 0, x_92); +lean_ctor_set(x_93, 1, x_91); +x_94 = lean_array_push(x_89, x_93); +x_95 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_95, 0, x_30); +lean_ctor_set(x_95, 1, x_94); +lean_ctor_set(x_80, 0, x_95); +return x_80; } else { -lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; -x_97 = lean_ctor_get(x_82, 0); -x_98 = lean_ctor_get(x_82, 1); -lean_inc(x_98); +lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; +x_96 = lean_ctor_get(x_80, 0); +x_97 = lean_ctor_get(x_80, 1); lean_inc(x_97); -lean_dec(x_82); -x_99 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__6; -x_100 = l_Lean_addMacroScope(x_97, x_99, x_80); -x_101 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__5; -x_102 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__9; -x_103 = lean_alloc_ctor(3, 4, 0); -lean_ctor_set(x_103, 0, x_77); -lean_ctor_set(x_103, 1, x_101); -lean_ctor_set(x_103, 2, x_100); -lean_ctor_set(x_103, 3, x_102); -x_104 = l_Array_empty___closed__1; -x_105 = lean_array_push(x_104, x_103); -x_106 = lean_array_push(x_104, x_65); -x_107 = lean_array_push(x_106, x_74); -x_108 = l_Lean_nullKind___closed__2; -lean_ctor_set(x_1, 1, x_107); -lean_ctor_set(x_1, 0, x_108); -x_109 = lean_array_push(x_105, x_1); +lean_inc(x_96); +lean_dec(x_80); +x_98 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__6; +x_99 = l_Lean_addMacroScope(x_96, x_98, x_78); +x_100 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__5; +x_101 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__9; +x_102 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_102, 0, x_75); +lean_ctor_set(x_102, 1, x_100); +lean_ctor_set(x_102, 2, x_99); +lean_ctor_set(x_102, 3, x_101); +x_103 = l_Array_empty___closed__1; +x_104 = lean_array_push(x_103, x_102); +x_105 = lean_array_push(x_103, x_66); +x_106 = lean_array_push(x_105, x_72); +x_107 = l_Lean_nullKind___closed__2; +x_108 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_108, 0, x_107); +lean_ctor_set(x_108, 1, x_106); +x_109 = lean_array_push(x_104, x_108); x_110 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_110, 0, x_12); +lean_ctor_set(x_110, 0, x_30); lean_ctor_set(x_110, 1, x_109); x_111 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_111, 0, x_110); -lean_ctor_set(x_111, 1, x_98); +lean_ctor_set(x_111, 1, x_97); return x_111; } } else { uint8_t x_112; -lean_free_object(x_1); -lean_dec(x_65); +lean_dec(x_66); lean_dec(x_3); lean_dec(x_7); lean_dec(x_8); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); -x_112 = !lean_is_exclusive(x_73); +x_112 = !lean_is_exclusive(x_71); if (x_112 == 0) { -return x_73; +return x_71; } else { lean_object* x_113; lean_object* x_114; lean_object* x_115; -x_113 = lean_ctor_get(x_73, 0); -x_114 = lean_ctor_get(x_73, 1); +x_113 = lean_ctor_get(x_71, 0); +x_114 = lean_ctor_get(x_71, 1); lean_inc(x_114); lean_inc(x_113); -lean_dec(x_73); +lean_dec(x_71); x_115 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_115, 0, x_113); lean_ctor_set(x_115, 1, x_114); @@ -9660,121 +9599,8 @@ return x_115; } else { -lean_object* x_116; -lean_dec(x_1); -lean_inc(x_8); -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_4); -lean_inc(x_3); -x_116 = l_Lean_Elab_Term_CollectPatternVars_collect(x_69, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_67); -if (lean_obj_tag(x_116) == 0) -{ -lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_125; lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; -x_117 = lean_ctor_get(x_116, 0); -lean_inc(x_117); -x_118 = lean_ctor_get(x_116, 1); -lean_inc(x_118); -lean_dec(x_116); -x_119 = l_Lean_MonadRef_mkInfoFromRefPos___at_Lean_Elab_Term_CollectPatternVars_collect___spec__1___rarg(x_7, x_8, x_118); -x_120 = lean_ctor_get(x_119, 0); -lean_inc(x_120); -x_121 = lean_ctor_get(x_119, 1); -lean_inc(x_121); -lean_dec(x_119); -x_122 = l_Lean_Elab_Term_getCurrMacroScope(x_3, x_4, x_5, x_6, x_7, x_8, x_121); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -x_123 = lean_ctor_get(x_122, 0); -lean_inc(x_123); -x_124 = lean_ctor_get(x_122, 1); -lean_inc(x_124); -lean_dec(x_122); -x_125 = l_Lean_Elab_Term_getMainModule___rarg(x_8, x_124); -lean_dec(x_8); -x_126 = lean_ctor_get(x_125, 0); -lean_inc(x_126); -x_127 = lean_ctor_get(x_125, 1); -lean_inc(x_127); -if (lean_is_exclusive(x_125)) { - lean_ctor_release(x_125, 0); - lean_ctor_release(x_125, 1); - x_128 = x_125; -} else { - lean_dec_ref(x_125); - x_128 = lean_box(0); -} -x_129 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__6; -x_130 = l_Lean_addMacroScope(x_126, x_129, x_123); -x_131 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__5; -x_132 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__9; -x_133 = lean_alloc_ctor(3, 4, 0); -lean_ctor_set(x_133, 0, x_120); -lean_ctor_set(x_133, 1, x_131); -lean_ctor_set(x_133, 2, x_130); -lean_ctor_set(x_133, 3, x_132); -x_134 = l_Array_empty___closed__1; -x_135 = lean_array_push(x_134, x_133); -x_136 = lean_array_push(x_134, x_65); -x_137 = lean_array_push(x_136, x_117); -x_138 = l_Lean_nullKind___closed__2; -x_139 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_139, 0, x_138); -lean_ctor_set(x_139, 1, x_137); -x_140 = lean_array_push(x_135, x_139); -x_141 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_141, 0, x_12); -lean_ctor_set(x_141, 1, x_140); -if (lean_is_scalar(x_128)) { - x_142 = lean_alloc_ctor(0, 2, 0); -} else { - x_142 = x_128; -} -lean_ctor_set(x_142, 0, x_141); -lean_ctor_set(x_142, 1, x_127); -return x_142; -} -else -{ -lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; -lean_dec(x_65); -lean_dec(x_3); -lean_dec(x_7); -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -x_143 = lean_ctor_get(x_116, 0); -lean_inc(x_143); -x_144 = lean_ctor_get(x_116, 1); -lean_inc(x_144); -if (lean_is_exclusive(x_116)) { - lean_ctor_release(x_116, 0); - lean_ctor_release(x_116, 1); - x_145 = x_116; -} else { - lean_dec_ref(x_116); - x_145 = lean_box(0); -} -if (lean_is_scalar(x_145)) { - x_146 = lean_alloc_ctor(1, 2, 0); -} else { - x_146 = x_145; -} -lean_ctor_set(x_146, 0, x_143); -lean_ctor_set(x_146, 1, x_144); -return x_146; -} -} -} -else -{ -uint8_t x_147; -lean_dec(x_65); +uint8_t x_116; +lean_dec(x_66); lean_dec(x_3); lean_dec(x_7); lean_dec(x_8); @@ -9783,1931 +9609,2451 @@ lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); -x_147 = !lean_is_exclusive(x_66); -if (x_147 == 0) +x_116 = !lean_is_exclusive(x_67); +if (x_116 == 0) { -return x_66; +return x_67; } else { -lean_object* x_148; lean_object* x_149; lean_object* x_150; -x_148 = lean_ctor_get(x_66, 0); -x_149 = lean_ctor_get(x_66, 1); -lean_inc(x_149); -lean_inc(x_148); -lean_dec(x_66); -x_150 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_150, 0, x_148); -lean_ctor_set(x_150, 1, x_149); -return x_150; +lean_object* x_117; lean_object* x_118; lean_object* x_119; +x_117 = lean_ctor_get(x_67, 0); +x_118 = lean_ctor_get(x_67, 1); +lean_inc(x_118); +lean_inc(x_117); +lean_dec(x_67); +x_119 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_119, 0, x_117); +lean_ctor_set(x_119, 1, x_118); +return x_119; } } } } else { -lean_object* x_151; lean_object* x_152; lean_object* x_153; -lean_free_object(x_25); +lean_object* x_120; lean_object* x_121; lean_object* x_122; +lean_free_object(x_24); lean_dec(x_10); -x_151 = lean_unsigned_to_nat(0u); -x_152 = l_Lean_Syntax_getArg(x_1, x_151); +x_120 = lean_unsigned_to_nat(0u); +x_121 = l_Lean_Syntax_getArg(x_1, x_120); lean_dec(x_1); -x_153 = l_Lean_Elab_Term_CollectPatternVars_collect_processCtor(x_152, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_27); -return x_153; +x_122 = l_Lean_Elab_Term_CollectPatternVars_collect_processCtor(x_121, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_26); +return x_122; } } else { -lean_object* x_154; lean_object* x_155; uint8_t x_156; -x_154 = l_Lean_instInhabitedSyntax; -x_155 = lean_array_get(x_154, x_11, x_23); -x_156 = l_Lean_Syntax_isNone(x_155); -if (x_156 == 0) +lean_object* x_123; uint8_t x_124; +lean_dec(x_10); +x_123 = l_Lean_Syntax_getArg(x_1, x_22); +x_124 = l_Lean_Syntax_isNone(x_123); +if (x_124 == 0) { -uint8_t x_157; -lean_free_object(x_25); -x_157 = !lean_is_exclusive(x_1); -if (x_157 == 0) +lean_object* x_125; lean_object* x_126; lean_object* x_127; uint8_t x_128; +lean_free_object(x_24); +x_125 = lean_unsigned_to_nat(0u); +x_126 = l_Lean_Syntax_getArg(x_123, x_125); +x_127 = l_Lean_Syntax_getArg(x_123, x_22); +x_128 = l_Lean_Syntax_isNone(x_127); +if (x_128 == 0) { -lean_object* x_158; lean_object* x_159; lean_object* x_160; lean_object* x_161; lean_object* x_162; uint8_t x_163; -x_158 = lean_ctor_get(x_1, 1); -lean_dec(x_158); -x_159 = lean_ctor_get(x_1, 0); -lean_dec(x_159); -x_160 = lean_unsigned_to_nat(0u); -x_161 = l_Lean_Syntax_getArg(x_155, x_160); -x_162 = l_Lean_Syntax_getArg(x_155, x_23); -x_163 = l_Lean_Syntax_isNone(x_162); -if (x_163 == 0) +lean_object* x_129; lean_object* x_130; lean_object* x_131; uint8_t x_132; +x_129 = l_Lean_Syntax_getArg(x_127, x_125); +lean_inc(x_129); +x_130 = l_Lean_Syntax_getKind(x_129); +x_131 = l_myMacro____x40_Init_Notation___hyg_14874____closed__8; +x_132 = lean_name_eq(x_130, x_131); +lean_dec(x_130); +if (x_132 == 0) { -lean_object* x_164; lean_object* x_165; lean_object* x_166; uint8_t x_167; -x_164 = l_Lean_Syntax_getArg(x_162, x_160); +lean_object* x_133; +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); +x_133 = l_Lean_Elab_Term_CollectPatternVars_collect(x_126, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_26); +if (lean_obj_tag(x_133) == 0) +{ +lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_140; +x_134 = lean_ctor_get(x_133, 0); +lean_inc(x_134); +x_135 = lean_ctor_get(x_133, 1); +lean_inc(x_135); +lean_dec(x_133); +x_136 = l_Lean_Syntax_setArg(x_123, x_125, x_134); +x_137 = l_Lean_Syntax_getArg(x_129, x_22); +x_138 = l_Lean_Syntax_getArgs(x_137); +lean_dec(x_137); +x_139 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__10; +x_140 = l_Array_mapSepElemsM___at_Lean_Elab_Term_CollectPatternVars_collect___spec__2(x_138, x_139, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_135); +lean_dec(x_138); +if (lean_obj_tag(x_140) == 0) +{ +uint8_t x_141; +x_141 = !lean_is_exclusive(x_140); +if (x_141 == 0) +{ +lean_object* x_142; lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; +x_142 = lean_ctor_get(x_140, 0); +x_143 = l_Lean_nullKind; +x_144 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_144, 0, x_143); +lean_ctor_set(x_144, 1, x_142); +x_145 = l_Lean_Syntax_setArg(x_129, x_22, x_144); +x_146 = l_Lean_Syntax_setArg(x_127, x_125, x_145); +x_147 = l_Lean_Syntax_setArg(x_136, x_22, x_146); +x_148 = l_Lean_Syntax_setArg(x_1, x_22, x_147); +lean_ctor_set(x_140, 0, x_148); +return x_140; +} +else +{ +lean_object* x_149; lean_object* x_150; lean_object* x_151; lean_object* x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; +x_149 = lean_ctor_get(x_140, 0); +x_150 = lean_ctor_get(x_140, 1); +lean_inc(x_150); +lean_inc(x_149); +lean_dec(x_140); +x_151 = l_Lean_nullKind; +x_152 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_152, 0, x_151); +lean_ctor_set(x_152, 1, x_149); +x_153 = l_Lean_Syntax_setArg(x_129, x_22, x_152); +x_154 = l_Lean_Syntax_setArg(x_127, x_125, x_153); +x_155 = l_Lean_Syntax_setArg(x_136, x_22, x_154); +x_156 = l_Lean_Syntax_setArg(x_1, x_22, x_155); +x_157 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_157, 0, x_156); +lean_ctor_set(x_157, 1, x_150); +return x_157; +} +} +else +{ +uint8_t x_158; +lean_dec(x_136); +lean_dec(x_129); +lean_dec(x_127); +lean_dec(x_1); +x_158 = !lean_is_exclusive(x_140); +if (x_158 == 0) +{ +return x_140; +} +else +{ +lean_object* x_159; lean_object* x_160; lean_object* x_161; +x_159 = lean_ctor_get(x_140, 0); +x_160 = lean_ctor_get(x_140, 1); +lean_inc(x_160); +lean_inc(x_159); +lean_dec(x_140); +x_161 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_161, 0, x_159); +lean_ctor_set(x_161, 1, x_160); +return x_161; +} +} +} +else +{ +uint8_t x_162; +lean_dec(x_129); +lean_dec(x_127); +lean_dec(x_123); +lean_dec(x_3); +lean_dec(x_7); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +lean_dec(x_1); +x_162 = !lean_is_exclusive(x_133); +if (x_162 == 0) +{ +return x_133; +} +else +{ +lean_object* x_163; lean_object* x_164; lean_object* x_165; +x_163 = lean_ctor_get(x_133, 0); +x_164 = lean_ctor_get(x_133, 1); lean_inc(x_164); -x_165 = l_Lean_Syntax_getKind(x_164); -x_166 = l_myMacro____x40_Init_Notation___hyg_14874____closed__8; -x_167 = lean_name_eq(x_165, x_166); -lean_dec(x_165); +lean_inc(x_163); +lean_dec(x_133); +x_165 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_165, 0, x_163); +lean_ctor_set(x_165, 1, x_164); +return x_165; +} +} +} +else +{ +lean_object* x_166; +lean_dec(x_129); +lean_dec(x_127); +x_166 = l_Lean_Elab_Term_CollectPatternVars_collect(x_126, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_26); +if (lean_obj_tag(x_166) == 0) +{ +uint8_t x_167; +x_167 = !lean_is_exclusive(x_166); if (x_167 == 0) { -lean_object* x_168; -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); -x_168 = l_Lean_Elab_Term_CollectPatternVars_collect(x_161, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_27); -if (lean_obj_tag(x_168) == 0) +lean_object* x_168; lean_object* x_169; lean_object* x_170; +x_168 = lean_ctor_get(x_166, 0); +x_169 = l_Lean_Syntax_setArg(x_123, x_125, x_168); +x_170 = l_Lean_Syntax_setArg(x_1, x_22, x_169); +lean_ctor_set(x_166, 0, x_170); +return x_166; +} +else { -lean_object* x_169; lean_object* x_170; lean_object* x_171; lean_object* x_172; lean_object* x_173; lean_object* x_174; lean_object* x_175; -x_169 = lean_ctor_get(x_168, 0); -lean_inc(x_169); -x_170 = lean_ctor_get(x_168, 1); -lean_inc(x_170); -lean_dec(x_168); -x_171 = l_Lean_Syntax_setArg(x_155, x_160, x_169); -x_172 = l_Lean_Syntax_getArg(x_164, x_23); -x_173 = l_Lean_Syntax_getArgs(x_172); -lean_dec(x_172); -x_174 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__10; -x_175 = l_Array_mapSepElemsM___at_Lean_Elab_Term_CollectPatternVars_collect___spec__2(x_173, x_174, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_170); -lean_dec(x_173); -if (lean_obj_tag(x_175) == 0) +lean_object* x_171; lean_object* x_172; lean_object* x_173; lean_object* x_174; lean_object* x_175; +x_171 = lean_ctor_get(x_166, 0); +x_172 = lean_ctor_get(x_166, 1); +lean_inc(x_172); +lean_inc(x_171); +lean_dec(x_166); +x_173 = l_Lean_Syntax_setArg(x_123, x_125, x_171); +x_174 = l_Lean_Syntax_setArg(x_1, x_22, x_173); +x_175 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_175, 0, x_174); +lean_ctor_set(x_175, 1, x_172); +return x_175; +} +} +else { uint8_t x_176; -x_176 = !lean_is_exclusive(x_175); +lean_dec(x_123); +lean_dec(x_1); +x_176 = !lean_is_exclusive(x_166); if (x_176 == 0) { -lean_object* x_177; lean_object* x_178; lean_object* x_179; lean_object* x_180; lean_object* x_181; lean_object* x_182; lean_object* x_183; -x_177 = lean_ctor_get(x_175, 0); -x_178 = l_Lean_nullKind; -lean_ctor_set(x_1, 1, x_177); -lean_ctor_set(x_1, 0, x_178); -x_179 = l_Lean_Syntax_setArg(x_164, x_23, x_1); -x_180 = l_Lean_Syntax_setArg(x_162, x_160, x_179); -x_181 = l_Lean_Syntax_setArg(x_171, x_23, x_180); -x_182 = lean_array_set(x_11, x_23, x_181); -x_183 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_183, 0, x_10); -lean_ctor_set(x_183, 1, x_182); -lean_ctor_set(x_175, 0, x_183); -return x_175; +return x_166; } else { -lean_object* x_184; lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; lean_object* x_189; lean_object* x_190; lean_object* x_191; lean_object* x_192; -x_184 = lean_ctor_get(x_175, 0); -x_185 = lean_ctor_get(x_175, 1); +lean_object* x_177; lean_object* x_178; lean_object* x_179; +x_177 = lean_ctor_get(x_166, 0); +x_178 = lean_ctor_get(x_166, 1); +lean_inc(x_178); +lean_inc(x_177); +lean_dec(x_166); +x_179 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_179, 0, x_177); +lean_ctor_set(x_179, 1, x_178); +return x_179; +} +} +} +} +else +{ +lean_object* x_180; +lean_dec(x_127); +x_180 = l_Lean_Elab_Term_CollectPatternVars_collect(x_126, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_26); +if (lean_obj_tag(x_180) == 0) +{ +uint8_t x_181; +x_181 = !lean_is_exclusive(x_180); +if (x_181 == 0) +{ +lean_object* x_182; lean_object* x_183; lean_object* x_184; +x_182 = lean_ctor_get(x_180, 0); +x_183 = l_Lean_Syntax_setArg(x_123, x_125, x_182); +x_184 = l_Lean_Syntax_setArg(x_1, x_22, x_183); +lean_ctor_set(x_180, 0, x_184); +return x_180; +} +else +{ +lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; lean_object* x_189; +x_185 = lean_ctor_get(x_180, 0); +x_186 = lean_ctor_get(x_180, 1); +lean_inc(x_186); lean_inc(x_185); -lean_inc(x_184); -lean_dec(x_175); -x_186 = l_Lean_nullKind; -lean_ctor_set(x_1, 1, x_184); -lean_ctor_set(x_1, 0, x_186); -x_187 = l_Lean_Syntax_setArg(x_164, x_23, x_1); -x_188 = l_Lean_Syntax_setArg(x_162, x_160, x_187); -x_189 = l_Lean_Syntax_setArg(x_171, x_23, x_188); -x_190 = lean_array_set(x_11, x_23, x_189); -x_191 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_191, 0, x_10); -lean_ctor_set(x_191, 1, x_190); -x_192 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_192, 0, x_191); -lean_ctor_set(x_192, 1, x_185); -return x_192; +lean_dec(x_180); +x_187 = l_Lean_Syntax_setArg(x_123, x_125, x_185); +x_188 = l_Lean_Syntax_setArg(x_1, x_22, x_187); +x_189 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_189, 0, x_188); +lean_ctor_set(x_189, 1, x_186); +return x_189; } } else { -uint8_t x_193; -lean_dec(x_171); -lean_dec(x_164); -lean_dec(x_162); -lean_free_object(x_1); -lean_dec(x_11); -lean_dec(x_10); -x_193 = !lean_is_exclusive(x_175); -if (x_193 == 0) +uint8_t x_190; +lean_dec(x_123); +lean_dec(x_1); +x_190 = !lean_is_exclusive(x_180); +if (x_190 == 0) { -return x_175; +return x_180; } else { -lean_object* x_194; lean_object* x_195; lean_object* x_196; -x_194 = lean_ctor_get(x_175, 0); -x_195 = lean_ctor_get(x_175, 1); -lean_inc(x_195); -lean_inc(x_194); -lean_dec(x_175); -x_196 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_196, 0, x_194); -lean_ctor_set(x_196, 1, x_195); -return x_196; +lean_object* x_191; lean_object* x_192; lean_object* x_193; +x_191 = lean_ctor_get(x_180, 0); +x_192 = lean_ctor_get(x_180, 1); +lean_inc(x_192); +lean_inc(x_191); +lean_dec(x_180); +x_193 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_193, 0, x_191); +lean_ctor_set(x_193, 1, x_192); +return x_193; +} } } } else { -uint8_t x_197; -lean_dec(x_164); -lean_dec(x_162); -lean_free_object(x_1); -lean_dec(x_155); +lean_dec(x_123); lean_dec(x_3); lean_dec(x_7); -lean_dec(x_11); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +lean_ctor_set(x_24, 0, x_1); +return x_24; +} +} +} +else +{ +lean_object* x_194; lean_object* x_195; lean_object* x_196; lean_object* x_197; lean_object* x_198; lean_object* x_199; lean_object* x_200; lean_object* x_201; uint8_t x_202; +lean_dec(x_3); +lean_free_object(x_24); +lean_dec(x_7); +lean_dec(x_10); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_1); +x_194 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_mkMVarSyntax___rarg(x_8, x_26); +x_195 = lean_ctor_get(x_194, 0); +lean_inc(x_195); +x_196 = lean_ctor_get(x_194, 1); +lean_inc(x_196); +lean_dec(x_194); +x_197 = lean_st_ref_get(x_8, x_196); +lean_dec(x_8); +x_198 = lean_ctor_get(x_197, 1); +lean_inc(x_198); +lean_dec(x_197); +x_199 = lean_st_ref_take(x_2, x_198); +x_200 = lean_ctor_get(x_199, 0); +lean_inc(x_200); +x_201 = lean_ctor_get(x_199, 1); +lean_inc(x_201); +lean_dec(x_199); +x_202 = !lean_is_exclusive(x_200); +if (x_202 == 0) +{ +lean_object* x_203; lean_object* x_204; lean_object* x_205; lean_object* x_206; lean_object* x_207; uint8_t x_208; +x_203 = lean_ctor_get(x_200, 1); +x_204 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_getMVarSyntaxMVarId(x_195); +x_205 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_205, 0, x_204); +x_206 = lean_array_push(x_203, x_205); +lean_ctor_set(x_200, 1, x_206); +x_207 = lean_st_ref_set(x_2, x_200, x_201); +lean_dec(x_2); +x_208 = !lean_is_exclusive(x_207); +if (x_208 == 0) +{ +lean_object* x_209; +x_209 = lean_ctor_get(x_207, 0); +lean_dec(x_209); +lean_ctor_set(x_207, 0, x_195); +return x_207; +} +else +{ +lean_object* x_210; lean_object* x_211; +x_210 = lean_ctor_get(x_207, 1); +lean_inc(x_210); +lean_dec(x_207); +x_211 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_211, 0, x_195); +lean_ctor_set(x_211, 1, x_210); +return x_211; +} +} +else +{ +lean_object* x_212; lean_object* x_213; lean_object* x_214; lean_object* x_215; lean_object* x_216; lean_object* x_217; lean_object* x_218; lean_object* x_219; lean_object* x_220; lean_object* x_221; +x_212 = lean_ctor_get(x_200, 0); +x_213 = lean_ctor_get(x_200, 1); +lean_inc(x_213); +lean_inc(x_212); +lean_dec(x_200); +x_214 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_getMVarSyntaxMVarId(x_195); +x_215 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_215, 0, x_214); +x_216 = lean_array_push(x_213, x_215); +x_217 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_217, 0, x_212); +lean_ctor_set(x_217, 1, x_216); +x_218 = lean_st_ref_set(x_2, x_217, x_201); +lean_dec(x_2); +x_219 = lean_ctor_get(x_218, 1); +lean_inc(x_219); +if (lean_is_exclusive(x_218)) { + lean_ctor_release(x_218, 0); + lean_ctor_release(x_218, 1); + x_220 = x_218; +} else { + lean_dec_ref(x_218); + x_220 = lean_box(0); +} +if (lean_is_scalar(x_220)) { + x_221 = lean_alloc_ctor(0, 2, 0); +} else { + x_221 = x_220; +} +lean_ctor_set(x_221, 0, x_195); +lean_ctor_set(x_221, 1, x_219); +return x_221; +} +} +} +else +{ +lean_object* x_222; uint8_t x_223; +lean_free_object(x_24); +lean_dec(x_10); +x_222 = l_Lean_Syntax_getArg(x_1, x_22); +x_223 = l_Lean_Syntax_isNone(x_222); +if (x_223 == 0) +{ +lean_object* x_224; lean_object* x_225; uint8_t x_226; +lean_dec(x_1); +x_224 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__12; +x_225 = l_Lean_throwErrorAt___at___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_processVar___spec__2(x_222, x_224, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_26); +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_222); +x_226 = !lean_is_exclusive(x_225); +if (x_226 == 0) +{ +return x_225; +} +else +{ +lean_object* x_227; lean_object* x_228; lean_object* x_229; +x_227 = lean_ctor_get(x_225, 0); +x_228 = lean_ctor_get(x_225, 1); +lean_inc(x_228); +lean_inc(x_227); +lean_dec(x_225); +x_229 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_229, 0, x_227); +lean_ctor_set(x_229, 1, x_228); +return x_229; +} +} +else +{ +lean_object* x_230; lean_object* x_231; +lean_dec(x_222); +x_230 = lean_box(0); +x_231 = l_Lean_Elab_Term_CollectPatternVars_collect___lambda__1(x_1, x_230, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_26); +return x_231; +} +} +} +else +{ +lean_object* x_232; lean_object* x_233; lean_object* x_234; lean_object* x_235; +lean_free_object(x_24); +lean_dec(x_10); +x_232 = l_Lean_Syntax_getArg(x_1, x_22); +x_233 = l_Lean_Syntax_getArgs(x_232); +lean_dec(x_232); +x_234 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__10; +x_235 = l_Array_mapSepElemsM___at_Lean_Elab_Term_CollectPatternVars_collect___spec__2(x_233, x_234, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_26); +lean_dec(x_233); +if (lean_obj_tag(x_235) == 0) +{ +uint8_t x_236; +x_236 = !lean_is_exclusive(x_235); +if (x_236 == 0) +{ +lean_object* x_237; lean_object* x_238; lean_object* x_239; lean_object* x_240; +x_237 = lean_ctor_get(x_235, 0); +x_238 = l_Lean_nullKind; +x_239 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_239, 0, x_238); +lean_ctor_set(x_239, 1, x_237); +x_240 = l_Lean_Syntax_setArg(x_1, x_22, x_239); +lean_ctor_set(x_235, 0, x_240); +return x_235; +} +else +{ +lean_object* x_241; lean_object* x_242; lean_object* x_243; lean_object* x_244; lean_object* x_245; lean_object* x_246; +x_241 = lean_ctor_get(x_235, 0); +x_242 = lean_ctor_get(x_235, 1); +lean_inc(x_242); +lean_inc(x_241); +lean_dec(x_235); +x_243 = l_Lean_nullKind; +x_244 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_244, 0, x_243); +lean_ctor_set(x_244, 1, x_241); +x_245 = l_Lean_Syntax_setArg(x_1, x_22, x_244); +x_246 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_246, 0, x_245); +lean_ctor_set(x_246, 1, x_242); +return x_246; +} +} +else +{ +uint8_t x_247; +lean_dec(x_1); +x_247 = !lean_is_exclusive(x_235); +if (x_247 == 0) +{ +return x_235; +} +else +{ +lean_object* x_248; lean_object* x_249; lean_object* x_250; +x_248 = lean_ctor_get(x_235, 0); +x_249 = lean_ctor_get(x_235, 1); +lean_inc(x_249); +lean_inc(x_248); +lean_dec(x_235); +x_250 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_250, 0, x_248); +lean_ctor_set(x_250, 1, x_249); +return x_250; +} +} +} +} +else +{ +lean_object* x_251; +lean_free_object(x_24); +lean_dec(x_10); +x_251 = l_Lean_Elab_Term_CollectPatternVars_collect_processCtorApp(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_26); +lean_dec(x_1); +return x_251; +} +} +else +{ +lean_object* x_252; +lean_free_object(x_24); +lean_dec(x_10); +x_252 = l_Lean_Elab_Term_CollectPatternVars_collect_processId(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_26); +return x_252; +} +} +else +{ +lean_object* x_253; lean_object* x_254; lean_object* x_255; lean_object* x_256; uint8_t x_257; uint8_t x_258; uint8_t x_259; lean_object* x_260; lean_object* x_261; lean_object* x_262; uint8_t x_263; lean_object* x_264; +x_253 = lean_ctor_get(x_3, 0); +x_254 = lean_ctor_get(x_3, 1); +x_255 = lean_ctor_get(x_3, 2); +x_256 = lean_ctor_get(x_3, 3); +x_257 = lean_ctor_get_uint8(x_3, sizeof(void*)*8); +x_258 = lean_ctor_get_uint8(x_3, sizeof(void*)*8 + 1); +x_259 = lean_ctor_get_uint8(x_3, sizeof(void*)*8 + 2); +x_260 = lean_ctor_get(x_3, 5); +x_261 = lean_ctor_get(x_3, 6); +x_262 = lean_ctor_get(x_3, 7); +x_263 = lean_ctor_get_uint8(x_3, sizeof(void*)*8 + 3); +lean_inc(x_262); +lean_inc(x_261); +lean_inc(x_260); +lean_inc(x_256); +lean_inc(x_255); +lean_inc(x_254); +lean_inc(x_253); +lean_dec(x_3); +x_264 = lean_alloc_ctor(0, 8, 4); +lean_ctor_set(x_264, 0, x_253); +lean_ctor_set(x_264, 1, x_254); +lean_ctor_set(x_264, 2, x_255); +lean_ctor_set(x_264, 3, x_256); +lean_ctor_set(x_264, 4, x_21); +lean_ctor_set(x_264, 5, x_260); +lean_ctor_set(x_264, 6, x_261); +lean_ctor_set(x_264, 7, x_262); +lean_ctor_set_uint8(x_264, sizeof(void*)*8, x_257); +lean_ctor_set_uint8(x_264, sizeof(void*)*8 + 1, x_258); +lean_ctor_set_uint8(x_264, sizeof(void*)*8 + 2, x_259); +lean_ctor_set_uint8(x_264, sizeof(void*)*8 + 3, x_263); +if (x_17 == 0) +{ +lean_object* x_265; uint8_t x_266; +x_265 = l_myMacro____x40_Init_Notation___hyg_2278____closed__4; +x_266 = lean_name_eq(x_10, x_265); +if (x_266 == 0) +{ +lean_object* x_267; uint8_t x_268; +x_267 = l_Lean_Parser_Term_anonymousCtor___elambda__1___closed__2; +x_268 = lean_name_eq(x_10, x_267); +if (x_268 == 0) +{ +lean_object* x_269; uint8_t x_270; +x_269 = l_Std_Range_myMacro____x40_Init_Data_Range___hyg_365____closed__2; +x_270 = lean_name_eq(x_10, x_269); +if (x_270 == 0) +{ +lean_object* x_271; uint8_t x_272; +x_271 = l_myMacro____x40_Init_Notation___hyg_13954____closed__13; +x_272 = lean_name_eq(x_10, x_271); +if (x_272 == 0) +{ +lean_object* x_273; uint8_t x_274; +x_273 = l_myMacro____x40_Init_Notation___hyg_13352____closed__8; +x_274 = lean_name_eq(x_10, x_273); +if (x_274 == 0) +{ +lean_object* x_275; uint8_t x_276; +x_275 = l_Lean_Parser_Term_explicitUniv___elambda__1___closed__2; +x_276 = lean_name_eq(x_10, x_275); +if (x_276 == 0) +{ +lean_object* x_277; uint8_t x_278; +x_277 = l_Lean_Parser_Term_namedPattern___elambda__1___closed__2; +x_278 = lean_name_eq(x_10, x_277); +if (x_278 == 0) +{ +lean_object* x_279; uint8_t x_280; +x_279 = l_Lean_Parser_Term_inaccessible___elambda__1___closed__2; +x_280 = lean_name_eq(x_10, x_279); +if (x_280 == 0) +{ +lean_object* x_281; uint8_t x_282; +x_281 = l_Lean_strLitKind; +x_282 = lean_name_eq(x_10, x_281); +if (x_282 == 0) +{ +lean_object* x_283; uint8_t x_284; +x_283 = l_Lean_numLitKind; +x_284 = lean_name_eq(x_10, x_283); +if (x_284 == 0) +{ +lean_object* x_285; uint8_t x_286; +x_285 = l_Lean_scientificLitKind; +x_286 = lean_name_eq(x_10, x_285); +if (x_286 == 0) +{ +lean_object* x_287; uint8_t x_288; +x_287 = l_Lean_charLitKind; +x_288 = lean_name_eq(x_10, x_287); +if (x_288 == 0) +{ +lean_object* x_289; uint8_t x_290; +lean_free_object(x_24); +x_289 = l_Lean_Parser_Term_quotedName___elambda__1___closed__2; +x_290 = lean_name_eq(x_10, x_289); +if (x_290 == 0) +{ +lean_object* x_291; uint8_t x_292; +x_291 = l_Lean_Parser_Term_doubleQuotedName___elambda__1___closed__2; +x_292 = lean_name_eq(x_10, x_291); +if (x_292 == 0) +{ +lean_object* x_293; uint8_t x_294; +lean_dec(x_1); +x_293 = l_Lean_choiceKind; +x_294 = lean_name_eq(x_10, x_293); +lean_dec(x_10); +if (x_294 == 0) +{ +lean_object* x_295; +x_295 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_throwInvalidPattern___rarg(x_2, x_264, x_4, x_5, x_6, x_7, x_8, x_26); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_264); +lean_dec(x_2); +return x_295; +} +else +{ +lean_object* x_296; lean_object* x_297; +x_296 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__2; +x_297 = l_Lean_throwError___at___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_finalize___spec__1(x_296, x_2, x_264, x_4, x_5, x_6, x_7, x_8, x_26); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_264); +lean_dec(x_2); +return x_297; +} +} +else +{ +lean_object* x_298; +lean_dec(x_10); +lean_dec(x_2); +x_298 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_doubleQuotedNameToPattern(x_1, x_264, x_4, x_5, x_6, x_7, x_8, x_26); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_1); +return x_298; +} +} +else +{ +lean_object* x_299; +lean_dec(x_10); +lean_dec(x_2); +x_299 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_quotedNameToPattern(x_1, x_264, x_4, x_5, x_6, x_7, x_8, x_26); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_1); +return x_299; +} +} +else +{ +lean_dec(x_264); +lean_dec(x_7); lean_dec(x_10); lean_dec(x_8); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); -x_197 = !lean_is_exclusive(x_168); -if (x_197 == 0) -{ -return x_168; -} -else -{ -lean_object* x_198; lean_object* x_199; lean_object* x_200; -x_198 = lean_ctor_get(x_168, 0); -x_199 = lean_ctor_get(x_168, 1); -lean_inc(x_199); -lean_inc(x_198); -lean_dec(x_168); -x_200 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_200, 0, x_198); -lean_ctor_set(x_200, 1, x_199); -return x_200; -} -} -} -else -{ -lean_object* x_201; -lean_dec(x_164); -lean_dec(x_162); -x_201 = l_Lean_Elab_Term_CollectPatternVars_collect(x_161, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_27); -if (lean_obj_tag(x_201) == 0) -{ -uint8_t x_202; -x_202 = !lean_is_exclusive(x_201); -if (x_202 == 0) -{ -lean_object* x_203; lean_object* x_204; lean_object* x_205; -x_203 = lean_ctor_get(x_201, 0); -x_204 = l_Lean_Syntax_setArg(x_155, x_160, x_203); -x_205 = lean_array_set(x_11, x_23, x_204); -lean_ctor_set(x_1, 1, x_205); -lean_ctor_set(x_201, 0, x_1); -return x_201; -} -else -{ -lean_object* x_206; lean_object* x_207; lean_object* x_208; lean_object* x_209; lean_object* x_210; -x_206 = lean_ctor_get(x_201, 0); -x_207 = lean_ctor_get(x_201, 1); -lean_inc(x_207); -lean_inc(x_206); -lean_dec(x_201); -x_208 = l_Lean_Syntax_setArg(x_155, x_160, x_206); -x_209 = lean_array_set(x_11, x_23, x_208); -lean_ctor_set(x_1, 1, x_209); -x_210 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_210, 0, x_1); -lean_ctor_set(x_210, 1, x_207); -return x_210; +lean_ctor_set(x_24, 0, x_1); +return x_24; } } else { -uint8_t x_211; -lean_free_object(x_1); -lean_dec(x_155); -lean_dec(x_11); +lean_dec(x_264); +lean_dec(x_7); lean_dec(x_10); -x_211 = !lean_is_exclusive(x_201); -if (x_211 == 0) -{ -return x_201; -} -else -{ -lean_object* x_212; lean_object* x_213; lean_object* x_214; -x_212 = lean_ctor_get(x_201, 0); -x_213 = lean_ctor_get(x_201, 1); -lean_inc(x_213); -lean_inc(x_212); -lean_dec(x_201); -x_214 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_214, 0, x_212); -lean_ctor_set(x_214, 1, x_213); -return x_214; -} -} +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +lean_ctor_set(x_24, 0, x_1); +return x_24; } } else { -lean_object* x_215; -lean_dec(x_162); -x_215 = l_Lean_Elab_Term_CollectPatternVars_collect(x_161, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_27); -if (lean_obj_tag(x_215) == 0) -{ -uint8_t x_216; -x_216 = !lean_is_exclusive(x_215); -if (x_216 == 0) -{ -lean_object* x_217; lean_object* x_218; lean_object* x_219; -x_217 = lean_ctor_get(x_215, 0); -x_218 = l_Lean_Syntax_setArg(x_155, x_160, x_217); -x_219 = lean_array_set(x_11, x_23, x_218); -lean_ctor_set(x_1, 1, x_219); -lean_ctor_set(x_215, 0, x_1); -return x_215; -} -else -{ -lean_object* x_220; lean_object* x_221; lean_object* x_222; lean_object* x_223; lean_object* x_224; -x_220 = lean_ctor_get(x_215, 0); -x_221 = lean_ctor_get(x_215, 1); -lean_inc(x_221); -lean_inc(x_220); -lean_dec(x_215); -x_222 = l_Lean_Syntax_setArg(x_155, x_160, x_220); -x_223 = lean_array_set(x_11, x_23, x_222); -lean_ctor_set(x_1, 1, x_223); -x_224 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_224, 0, x_1); -lean_ctor_set(x_224, 1, x_221); -return x_224; -} -} -else -{ -uint8_t x_225; -lean_free_object(x_1); -lean_dec(x_155); -lean_dec(x_11); +lean_dec(x_264); +lean_dec(x_7); lean_dec(x_10); -x_225 = !lean_is_exclusive(x_215); -if (x_225 == 0) -{ -return x_215; -} -else -{ -lean_object* x_226; lean_object* x_227; lean_object* x_228; -x_226 = lean_ctor_get(x_215, 0); -x_227 = lean_ctor_get(x_215, 1); -lean_inc(x_227); -lean_inc(x_226); -lean_dec(x_215); -x_228 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_228, 0, x_226); -lean_ctor_set(x_228, 1, x_227); -return x_228; -} -} +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +lean_ctor_set(x_24, 0, x_1); +return x_24; } } else { -lean_object* x_229; lean_object* x_230; lean_object* x_231; uint8_t x_232; +lean_dec(x_264); +lean_dec(x_7); +lean_dec(x_10); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +lean_ctor_set(x_24, 0, x_1); +return x_24; +} +} +else +{ +lean_dec(x_264); +lean_dec(x_7); +lean_dec(x_10); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +lean_ctor_set(x_24, 0, x_1); +return x_24; +} +} +else +{ +lean_object* x_300; lean_object* x_301; lean_object* x_302; +lean_free_object(x_24); +lean_dec(x_10); +x_300 = lean_unsigned_to_nat(0u); +x_301 = l_Lean_Syntax_getArg(x_1, x_300); +lean_inc(x_7); +lean_inc(x_301); +x_302 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_processVar(x_301, x_2, x_264, x_4, x_5, x_6, x_7, x_8, x_26); +if (lean_obj_tag(x_302) == 0) +{ +lean_object* x_303; lean_object* x_304; lean_object* x_305; lean_object* x_306; +x_303 = lean_ctor_get(x_302, 1); +lean_inc(x_303); +lean_dec(x_302); +x_304 = lean_unsigned_to_nat(2u); +x_305 = l_Lean_Syntax_getArg(x_1, x_304); lean_dec(x_1); -x_229 = lean_unsigned_to_nat(0u); -x_230 = l_Lean_Syntax_getArg(x_155, x_229); -x_231 = l_Lean_Syntax_getArg(x_155, x_23); -x_232 = l_Lean_Syntax_isNone(x_231); -if (x_232 == 0) -{ -lean_object* x_233; lean_object* x_234; lean_object* x_235; uint8_t x_236; -x_233 = l_Lean_Syntax_getArg(x_231, x_229); -lean_inc(x_233); -x_234 = l_Lean_Syntax_getKind(x_233); -x_235 = l_myMacro____x40_Init_Notation___hyg_14874____closed__8; -x_236 = lean_name_eq(x_234, x_235); -lean_dec(x_234); -if (x_236 == 0) -{ -lean_object* x_237; 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); -x_237 = l_Lean_Elab_Term_CollectPatternVars_collect(x_230, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_27); -if (lean_obj_tag(x_237) == 0) +lean_inc(x_264); +x_306 = l_Lean_Elab_Term_CollectPatternVars_collect(x_305, x_2, x_264, x_4, x_5, x_6, x_7, x_8, x_303); +if (lean_obj_tag(x_306) == 0) { -lean_object* x_238; lean_object* x_239; lean_object* x_240; lean_object* x_241; lean_object* x_242; lean_object* x_243; lean_object* x_244; -x_238 = lean_ctor_get(x_237, 0); -lean_inc(x_238); -x_239 = lean_ctor_get(x_237, 1); -lean_inc(x_239); -lean_dec(x_237); -x_240 = l_Lean_Syntax_setArg(x_155, x_229, x_238); -x_241 = l_Lean_Syntax_getArg(x_233, x_23); -x_242 = l_Lean_Syntax_getArgs(x_241); -lean_dec(x_241); -x_243 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__10; -x_244 = l_Array_mapSepElemsM___at_Lean_Elab_Term_CollectPatternVars_collect___spec__2(x_242, x_243, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_239); -lean_dec(x_242); -if (lean_obj_tag(x_244) == 0) -{ -lean_object* x_245; lean_object* x_246; lean_object* x_247; lean_object* x_248; lean_object* x_249; lean_object* x_250; lean_object* x_251; lean_object* x_252; lean_object* x_253; lean_object* x_254; lean_object* x_255; -x_245 = lean_ctor_get(x_244, 0); -lean_inc(x_245); -x_246 = lean_ctor_get(x_244, 1); -lean_inc(x_246); -if (lean_is_exclusive(x_244)) { - lean_ctor_release(x_244, 0); - lean_ctor_release(x_244, 1); - x_247 = x_244; -} else { - lean_dec_ref(x_244); - x_247 = lean_box(0); -} -x_248 = l_Lean_nullKind; -x_249 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_249, 0, x_248); -lean_ctor_set(x_249, 1, x_245); -x_250 = l_Lean_Syntax_setArg(x_233, x_23, x_249); -x_251 = l_Lean_Syntax_setArg(x_231, x_229, x_250); -x_252 = l_Lean_Syntax_setArg(x_240, x_23, x_251); -x_253 = lean_array_set(x_11, x_23, x_252); -x_254 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_254, 0, x_10); -lean_ctor_set(x_254, 1, x_253); -if (lean_is_scalar(x_247)) { - x_255 = lean_alloc_ctor(0, 2, 0); -} else { - x_255 = x_247; -} -lean_ctor_set(x_255, 0, x_254); -lean_ctor_set(x_255, 1, x_246); -return x_255; -} -else -{ -lean_object* x_256; lean_object* x_257; lean_object* x_258; lean_object* x_259; -lean_dec(x_240); -lean_dec(x_233); -lean_dec(x_231); -lean_dec(x_11); -lean_dec(x_10); -x_256 = lean_ctor_get(x_244, 0); -lean_inc(x_256); -x_257 = lean_ctor_get(x_244, 1); -lean_inc(x_257); -if (lean_is_exclusive(x_244)) { - lean_ctor_release(x_244, 0); - lean_ctor_release(x_244, 1); - x_258 = x_244; -} else { - lean_dec_ref(x_244); - x_258 = lean_box(0); -} -if (lean_is_scalar(x_258)) { - x_259 = lean_alloc_ctor(1, 2, 0); -} else { - x_259 = x_258; -} -lean_ctor_set(x_259, 0, x_256); -lean_ctor_set(x_259, 1, x_257); -return x_259; -} -} -else -{ -lean_object* x_260; lean_object* x_261; lean_object* x_262; lean_object* x_263; -lean_dec(x_233); -lean_dec(x_231); -lean_dec(x_155); -lean_dec(x_3); -lean_dec(x_7); -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -x_260 = lean_ctor_get(x_237, 0); -lean_inc(x_260); -x_261 = lean_ctor_get(x_237, 1); -lean_inc(x_261); -if (lean_is_exclusive(x_237)) { - lean_ctor_release(x_237, 0); - lean_ctor_release(x_237, 1); - x_262 = x_237; -} else { - lean_dec_ref(x_237); - x_262 = lean_box(0); -} -if (lean_is_scalar(x_262)) { - x_263 = lean_alloc_ctor(1, 2, 0); -} else { - x_263 = x_262; -} -lean_ctor_set(x_263, 0, x_260); -lean_ctor_set(x_263, 1, x_261); -return x_263; -} -} -else -{ -lean_object* x_264; -lean_dec(x_233); -lean_dec(x_231); -x_264 = l_Lean_Elab_Term_CollectPatternVars_collect(x_230, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_27); -if (lean_obj_tag(x_264) == 0) -{ -lean_object* x_265; lean_object* x_266; lean_object* x_267; lean_object* x_268; lean_object* x_269; lean_object* x_270; lean_object* x_271; -x_265 = lean_ctor_get(x_264, 0); -lean_inc(x_265); -x_266 = lean_ctor_get(x_264, 1); -lean_inc(x_266); -if (lean_is_exclusive(x_264)) { - lean_ctor_release(x_264, 0); - lean_ctor_release(x_264, 1); - x_267 = x_264; -} else { - lean_dec_ref(x_264); - x_267 = lean_box(0); -} -x_268 = l_Lean_Syntax_setArg(x_155, x_229, x_265); -x_269 = lean_array_set(x_11, x_23, x_268); -x_270 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_270, 0, x_10); -lean_ctor_set(x_270, 1, x_269); -if (lean_is_scalar(x_267)) { - x_271 = lean_alloc_ctor(0, 2, 0); -} else { - x_271 = x_267; -} -lean_ctor_set(x_271, 0, x_270); -lean_ctor_set(x_271, 1, x_266); -return x_271; -} -else -{ -lean_object* x_272; lean_object* x_273; lean_object* x_274; lean_object* x_275; -lean_dec(x_155); -lean_dec(x_11); -lean_dec(x_10); -x_272 = lean_ctor_get(x_264, 0); -lean_inc(x_272); -x_273 = lean_ctor_get(x_264, 1); -lean_inc(x_273); -if (lean_is_exclusive(x_264)) { - lean_ctor_release(x_264, 0); - lean_ctor_release(x_264, 1); - x_274 = x_264; -} else { - lean_dec_ref(x_264); - x_274 = lean_box(0); -} -if (lean_is_scalar(x_274)) { - x_275 = lean_alloc_ctor(1, 2, 0); -} else { - x_275 = x_274; -} -lean_ctor_set(x_275, 0, x_272); -lean_ctor_set(x_275, 1, x_273); -return x_275; -} -} -} -else -{ -lean_object* x_276; -lean_dec(x_231); -x_276 = l_Lean_Elab_Term_CollectPatternVars_collect(x_230, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_27); -if (lean_obj_tag(x_276) == 0) -{ -lean_object* x_277; lean_object* x_278; lean_object* x_279; lean_object* x_280; lean_object* x_281; lean_object* x_282; lean_object* x_283; -x_277 = lean_ctor_get(x_276, 0); -lean_inc(x_277); -x_278 = lean_ctor_get(x_276, 1); -lean_inc(x_278); -if (lean_is_exclusive(x_276)) { - lean_ctor_release(x_276, 0); - lean_ctor_release(x_276, 1); - x_279 = x_276; -} else { - lean_dec_ref(x_276); - x_279 = lean_box(0); -} -x_280 = l_Lean_Syntax_setArg(x_155, x_229, x_277); -x_281 = lean_array_set(x_11, x_23, x_280); -x_282 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_282, 0, x_10); -lean_ctor_set(x_282, 1, x_281); -if (lean_is_scalar(x_279)) { - x_283 = lean_alloc_ctor(0, 2, 0); -} else { - x_283 = x_279; -} -lean_ctor_set(x_283, 0, x_282); -lean_ctor_set(x_283, 1, x_278); -return x_283; -} -else -{ -lean_object* x_284; lean_object* x_285; lean_object* x_286; lean_object* x_287; -lean_dec(x_155); -lean_dec(x_11); -lean_dec(x_10); -x_284 = lean_ctor_get(x_276, 0); -lean_inc(x_284); -x_285 = lean_ctor_get(x_276, 1); -lean_inc(x_285); -if (lean_is_exclusive(x_276)) { - lean_ctor_release(x_276, 0); - lean_ctor_release(x_276, 1); - x_286 = x_276; -} else { - lean_dec_ref(x_276); - x_286 = lean_box(0); -} -if (lean_is_scalar(x_286)) { - x_287 = lean_alloc_ctor(1, 2, 0); -} else { - x_287 = x_286; -} -lean_ctor_set(x_287, 0, x_284); -lean_ctor_set(x_287, 1, x_285); -return x_287; -} -} -} -} -else -{ -lean_dec(x_155); -lean_dec(x_3); -lean_dec(x_7); -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -lean_ctor_set(x_25, 0, x_1); -return x_25; -} -} -} -else -{ -lean_object* x_288; lean_object* x_289; lean_object* x_290; lean_object* x_291; lean_object* x_292; lean_object* x_293; lean_object* x_294; lean_object* x_295; uint8_t x_296; -lean_dec(x_3); -lean_free_object(x_25); -lean_dec(x_7); -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_1); -x_288 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_mkMVarSyntax___rarg(x_8, x_27); -x_289 = lean_ctor_get(x_288, 0); -lean_inc(x_289); -x_290 = lean_ctor_get(x_288, 1); -lean_inc(x_290); -lean_dec(x_288); -x_291 = lean_st_ref_get(x_8, x_290); -lean_dec(x_8); -x_292 = lean_ctor_get(x_291, 1); -lean_inc(x_292); -lean_dec(x_291); -x_293 = lean_st_ref_take(x_2, x_292); -x_294 = lean_ctor_get(x_293, 0); -lean_inc(x_294); -x_295 = lean_ctor_get(x_293, 1); -lean_inc(x_295); -lean_dec(x_293); -x_296 = !lean_is_exclusive(x_294); -if (x_296 == 0) -{ -lean_object* x_297; lean_object* x_298; lean_object* x_299; lean_object* x_300; lean_object* x_301; uint8_t x_302; -x_297 = lean_ctor_get(x_294, 1); -x_298 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_getMVarSyntaxMVarId(x_289); -x_299 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_299, 0, x_298); -x_300 = lean_array_push(x_297, x_299); -lean_ctor_set(x_294, 1, x_300); -x_301 = lean_st_ref_set(x_2, x_294, x_295); -lean_dec(x_2); -x_302 = !lean_is_exclusive(x_301); -if (x_302 == 0) -{ -lean_object* x_303; -x_303 = lean_ctor_get(x_301, 0); -lean_dec(x_303); -lean_ctor_set(x_301, 0, x_289); -return x_301; -} -else -{ -lean_object* x_304; lean_object* x_305; -x_304 = lean_ctor_get(x_301, 1); -lean_inc(x_304); -lean_dec(x_301); -x_305 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_305, 0, x_289); -lean_ctor_set(x_305, 1, x_304); -return x_305; -} -} -else -{ -lean_object* x_306; lean_object* x_307; lean_object* x_308; lean_object* x_309; lean_object* x_310; lean_object* x_311; lean_object* x_312; lean_object* x_313; lean_object* x_314; lean_object* x_315; -x_306 = lean_ctor_get(x_294, 0); -x_307 = lean_ctor_get(x_294, 1); +lean_object* x_307; lean_object* x_308; lean_object* x_309; lean_object* x_310; lean_object* x_311; lean_object* x_312; lean_object* x_313; lean_object* x_314; lean_object* x_315; lean_object* x_316; lean_object* x_317; lean_object* x_318; lean_object* x_319; lean_object* x_320; lean_object* x_321; lean_object* x_322; lean_object* x_323; lean_object* x_324; lean_object* x_325; lean_object* x_326; lean_object* x_327; lean_object* x_328; lean_object* x_329; lean_object* x_330; lean_object* x_331; lean_object* x_332; +x_307 = lean_ctor_get(x_306, 0); lean_inc(x_307); -lean_inc(x_306); -lean_dec(x_294); -x_308 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_getMVarSyntaxMVarId(x_289); -x_309 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_309, 0, x_308); -x_310 = lean_array_push(x_307, x_309); -x_311 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_311, 0, x_306); -lean_ctor_set(x_311, 1, x_310); -x_312 = lean_st_ref_set(x_2, x_311, x_295); -lean_dec(x_2); -x_313 = lean_ctor_get(x_312, 1); +x_308 = lean_ctor_get(x_306, 1); +lean_inc(x_308); +lean_dec(x_306); +x_309 = l_Lean_MonadRef_mkInfoFromRefPos___at_Lean_Elab_Term_CollectPatternVars_collect___spec__1___rarg(x_7, x_8, x_308); +x_310 = lean_ctor_get(x_309, 0); +lean_inc(x_310); +x_311 = lean_ctor_get(x_309, 1); +lean_inc(x_311); +lean_dec(x_309); +x_312 = l_Lean_Elab_Term_getCurrMacroScope(x_264, x_4, x_5, x_6, x_7, x_8, x_311); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_264); +x_313 = lean_ctor_get(x_312, 0); lean_inc(x_313); -if (lean_is_exclusive(x_312)) { - lean_ctor_release(x_312, 0); - lean_ctor_release(x_312, 1); - x_314 = x_312; +x_314 = lean_ctor_get(x_312, 1); +lean_inc(x_314); +lean_dec(x_312); +x_315 = l_Lean_Elab_Term_getMainModule___rarg(x_8, x_314); +lean_dec(x_8); +x_316 = lean_ctor_get(x_315, 0); +lean_inc(x_316); +x_317 = lean_ctor_get(x_315, 1); +lean_inc(x_317); +if (lean_is_exclusive(x_315)) { + lean_ctor_release(x_315, 0); + lean_ctor_release(x_315, 1); + x_318 = x_315; } else { - lean_dec_ref(x_312); - x_314 = lean_box(0); + lean_dec_ref(x_315); + x_318 = lean_box(0); } -if (lean_is_scalar(x_314)) { - x_315 = lean_alloc_ctor(0, 2, 0); +x_319 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__6; +x_320 = l_Lean_addMacroScope(x_316, x_319, x_313); +x_321 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__5; +x_322 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__9; +x_323 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_323, 0, x_310); +lean_ctor_set(x_323, 1, x_321); +lean_ctor_set(x_323, 2, x_320); +lean_ctor_set(x_323, 3, x_322); +x_324 = l_Array_empty___closed__1; +x_325 = lean_array_push(x_324, x_323); +x_326 = lean_array_push(x_324, x_301); +x_327 = lean_array_push(x_326, x_307); +x_328 = l_Lean_nullKind___closed__2; +x_329 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_329, 0, x_328); +lean_ctor_set(x_329, 1, x_327); +x_330 = lean_array_push(x_325, x_329); +x_331 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_331, 0, x_265); +lean_ctor_set(x_331, 1, x_330); +if (lean_is_scalar(x_318)) { + x_332 = lean_alloc_ctor(0, 2, 0); } else { - x_315 = x_314; -} -lean_ctor_set(x_315, 0, x_289); -lean_ctor_set(x_315, 1, x_313); -return x_315; -} + x_332 = x_318; } +lean_ctor_set(x_332, 0, x_331); +lean_ctor_set(x_332, 1, x_317); +return x_332; } else { -lean_object* x_316; lean_object* x_317; uint8_t x_318; -lean_free_object(x_25); -lean_dec(x_1); -x_316 = l_Lean_instInhabitedSyntax; -x_317 = lean_array_get(x_316, x_11, x_23); -x_318 = l_Lean_Syntax_isNone(x_317); -if (x_318 == 0) -{ -lean_object* x_319; lean_object* x_320; uint8_t x_321; -lean_dec(x_11); -lean_dec(x_10); -x_319 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__12; -x_320 = l_Lean_throwErrorAt___at___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_processVar___spec__2(x_317, x_319, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_27); +lean_object* x_333; lean_object* x_334; lean_object* x_335; lean_object* x_336; +lean_dec(x_301); +lean_dec(x_264); +lean_dec(x_7); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +x_333 = lean_ctor_get(x_306, 0); +lean_inc(x_333); +x_334 = lean_ctor_get(x_306, 1); +lean_inc(x_334); +if (lean_is_exclusive(x_306)) { + lean_ctor_release(x_306, 0); + lean_ctor_release(x_306, 1); + x_335 = x_306; +} else { + lean_dec_ref(x_306); + x_335 = lean_box(0); +} +if (lean_is_scalar(x_335)) { + x_336 = lean_alloc_ctor(1, 2, 0); +} else { + x_336 = x_335; +} +lean_ctor_set(x_336, 0, x_333); +lean_ctor_set(x_336, 1, x_334); +return x_336; +} +} +else +{ +lean_object* x_337; lean_object* x_338; lean_object* x_339; lean_object* x_340; +lean_dec(x_301); +lean_dec(x_264); +lean_dec(x_7); 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_317); -x_321 = !lean_is_exclusive(x_320); -if (x_321 == 0) -{ -return x_320; -} -else -{ -lean_object* x_322; lean_object* x_323; lean_object* x_324; -x_322 = lean_ctor_get(x_320, 0); -x_323 = lean_ctor_get(x_320, 1); -lean_inc(x_323); -lean_inc(x_322); -lean_dec(x_320); -x_324 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_324, 0, x_322); -lean_ctor_set(x_324, 1, x_323); -return x_324; -} -} -else -{ -lean_object* x_325; lean_object* x_326; -lean_dec(x_317); -x_325 = lean_box(0); -x_326 = l_Lean_Elab_Term_CollectPatternVars_collect___lambda__1(x_11, x_10, x_325, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_27); -return x_326; -} -} -} -else -{ -uint8_t x_327; -lean_free_object(x_25); -x_327 = !lean_is_exclusive(x_1); -if (x_327 == 0) -{ -lean_object* x_328; lean_object* x_329; lean_object* x_330; lean_object* x_331; lean_object* x_332; lean_object* x_333; lean_object* x_334; -x_328 = lean_ctor_get(x_1, 1); -lean_dec(x_328); -x_329 = lean_ctor_get(x_1, 0); -lean_dec(x_329); -x_330 = l_Lean_instInhabitedSyntax; -x_331 = lean_array_get(x_330, x_11, x_23); -x_332 = l_Lean_Syntax_getArgs(x_331); -lean_dec(x_331); -x_333 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__10; -x_334 = l_Array_mapSepElemsM___at_Lean_Elab_Term_CollectPatternVars_collect___spec__2(x_332, x_333, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_27); -lean_dec(x_332); -if (lean_obj_tag(x_334) == 0) -{ -uint8_t x_335; -x_335 = !lean_is_exclusive(x_334); -if (x_335 == 0) -{ -lean_object* x_336; lean_object* x_337; lean_object* x_338; lean_object* x_339; -x_336 = lean_ctor_get(x_334, 0); -x_337 = l_Lean_nullKind; -lean_ctor_set(x_1, 1, x_336); -lean_ctor_set(x_1, 0, x_337); -x_338 = lean_array_set(x_11, x_23, x_1); -x_339 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_339, 0, x_10); -lean_ctor_set(x_339, 1, x_338); -lean_ctor_set(x_334, 0, x_339); -return x_334; -} -else -{ -lean_object* x_340; lean_object* x_341; lean_object* x_342; lean_object* x_343; lean_object* x_344; lean_object* x_345; -x_340 = lean_ctor_get(x_334, 0); -x_341 = lean_ctor_get(x_334, 1); -lean_inc(x_341); -lean_inc(x_340); -lean_dec(x_334); -x_342 = l_Lean_nullKind; -lean_ctor_set(x_1, 1, x_340); -lean_ctor_set(x_1, 0, x_342); -x_343 = lean_array_set(x_11, x_23, x_1); -x_344 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_344, 0, x_10); -lean_ctor_set(x_344, 1, x_343); -x_345 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_345, 0, x_344); -lean_ctor_set(x_345, 1, x_341); -return x_345; -} -} -else -{ -uint8_t x_346; -lean_free_object(x_1); -lean_dec(x_11); -lean_dec(x_10); -x_346 = !lean_is_exclusive(x_334); -if (x_346 == 0) -{ -return x_334; -} -else -{ -lean_object* x_347; lean_object* x_348; lean_object* x_349; -x_347 = lean_ctor_get(x_334, 0); -x_348 = lean_ctor_get(x_334, 1); -lean_inc(x_348); -lean_inc(x_347); -lean_dec(x_334); -x_349 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_349, 0, x_347); -lean_ctor_set(x_349, 1, x_348); -return x_349; -} -} -} -else -{ -lean_object* x_350; lean_object* x_351; lean_object* x_352; lean_object* x_353; lean_object* x_354; lean_dec(x_1); -x_350 = l_Lean_instInhabitedSyntax; -x_351 = lean_array_get(x_350, x_11, x_23); -x_352 = l_Lean_Syntax_getArgs(x_351); +x_337 = lean_ctor_get(x_302, 0); +lean_inc(x_337); +x_338 = lean_ctor_get(x_302, 1); +lean_inc(x_338); +if (lean_is_exclusive(x_302)) { + lean_ctor_release(x_302, 0); + lean_ctor_release(x_302, 1); + x_339 = x_302; +} else { + lean_dec_ref(x_302); + x_339 = lean_box(0); +} +if (lean_is_scalar(x_339)) { + x_340 = lean_alloc_ctor(1, 2, 0); +} else { + x_340 = x_339; +} +lean_ctor_set(x_340, 0, x_337); +lean_ctor_set(x_340, 1, x_338); +return x_340; +} +} +} +else +{ +lean_object* x_341; lean_object* x_342; lean_object* x_343; +lean_free_object(x_24); +lean_dec(x_10); +x_341 = lean_unsigned_to_nat(0u); +x_342 = l_Lean_Syntax_getArg(x_1, x_341); +lean_dec(x_1); +x_343 = l_Lean_Elab_Term_CollectPatternVars_collect_processCtor(x_342, x_2, x_264, x_4, x_5, x_6, x_7, x_8, x_26); +return x_343; +} +} +else +{ +lean_object* x_344; uint8_t x_345; +lean_dec(x_10); +x_344 = l_Lean_Syntax_getArg(x_1, x_22); +x_345 = l_Lean_Syntax_isNone(x_344); +if (x_345 == 0) +{ +lean_object* x_346; lean_object* x_347; lean_object* x_348; uint8_t x_349; +lean_free_object(x_24); +x_346 = lean_unsigned_to_nat(0u); +x_347 = l_Lean_Syntax_getArg(x_344, x_346); +x_348 = l_Lean_Syntax_getArg(x_344, x_22); +x_349 = l_Lean_Syntax_isNone(x_348); +if (x_349 == 0) +{ +lean_object* x_350; lean_object* x_351; lean_object* x_352; uint8_t x_353; +x_350 = l_Lean_Syntax_getArg(x_348, x_346); +lean_inc(x_350); +x_351 = l_Lean_Syntax_getKind(x_350); +x_352 = l_myMacro____x40_Init_Notation___hyg_14874____closed__8; +x_353 = lean_name_eq(x_351, x_352); lean_dec(x_351); -x_353 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__10; -x_354 = l_Array_mapSepElemsM___at_Lean_Elab_Term_CollectPatternVars_collect___spec__2(x_352, x_353, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_27); -lean_dec(x_352); +if (x_353 == 0) +{ +lean_object* x_354; +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +lean_inc(x_264); +lean_inc(x_2); +x_354 = l_Lean_Elab_Term_CollectPatternVars_collect(x_347, x_2, x_264, x_4, x_5, x_6, x_7, x_8, x_26); if (lean_obj_tag(x_354) == 0) { -lean_object* x_355; lean_object* x_356; lean_object* x_357; lean_object* x_358; lean_object* x_359; lean_object* x_360; lean_object* x_361; lean_object* x_362; +lean_object* x_355; lean_object* x_356; lean_object* x_357; lean_object* x_358; lean_object* x_359; lean_object* x_360; lean_object* x_361; x_355 = lean_ctor_get(x_354, 0); lean_inc(x_355); x_356 = lean_ctor_get(x_354, 1); lean_inc(x_356); -if (lean_is_exclusive(x_354)) { - lean_ctor_release(x_354, 0); - lean_ctor_release(x_354, 1); - x_357 = x_354; -} else { - lean_dec_ref(x_354); - x_357 = lean_box(0); -} -x_358 = l_Lean_nullKind; -x_359 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_359, 0, x_358); -lean_ctor_set(x_359, 1, x_355); -x_360 = lean_array_set(x_11, x_23, x_359); -x_361 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_361, 0, x_10); -lean_ctor_set(x_361, 1, x_360); -if (lean_is_scalar(x_357)) { - x_362 = lean_alloc_ctor(0, 2, 0); -} else { - x_362 = x_357; -} -lean_ctor_set(x_362, 0, x_361); -lean_ctor_set(x_362, 1, x_356); -return x_362; -} -else +lean_dec(x_354); +x_357 = l_Lean_Syntax_setArg(x_344, x_346, x_355); +x_358 = l_Lean_Syntax_getArg(x_350, x_22); +x_359 = l_Lean_Syntax_getArgs(x_358); +lean_dec(x_358); +x_360 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__10; +x_361 = l_Array_mapSepElemsM___at_Lean_Elab_Term_CollectPatternVars_collect___spec__2(x_359, x_360, x_2, x_264, x_4, x_5, x_6, x_7, x_8, x_356); +lean_dec(x_359); +if (lean_obj_tag(x_361) == 0) { -lean_object* x_363; lean_object* x_364; lean_object* x_365; lean_object* x_366; -lean_dec(x_11); -lean_dec(x_10); -x_363 = lean_ctor_get(x_354, 0); +lean_object* x_362; lean_object* x_363; lean_object* x_364; lean_object* x_365; lean_object* x_366; lean_object* x_367; lean_object* x_368; lean_object* x_369; lean_object* x_370; lean_object* x_371; +x_362 = lean_ctor_get(x_361, 0); +lean_inc(x_362); +x_363 = lean_ctor_get(x_361, 1); lean_inc(x_363); -x_364 = lean_ctor_get(x_354, 1); -lean_inc(x_364); +if (lean_is_exclusive(x_361)) { + lean_ctor_release(x_361, 0); + lean_ctor_release(x_361, 1); + x_364 = x_361; +} else { + lean_dec_ref(x_361); + x_364 = lean_box(0); +} +x_365 = l_Lean_nullKind; +x_366 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_366, 0, x_365); +lean_ctor_set(x_366, 1, x_362); +x_367 = l_Lean_Syntax_setArg(x_350, x_22, x_366); +x_368 = l_Lean_Syntax_setArg(x_348, x_346, x_367); +x_369 = l_Lean_Syntax_setArg(x_357, x_22, x_368); +x_370 = l_Lean_Syntax_setArg(x_1, x_22, x_369); +if (lean_is_scalar(x_364)) { + x_371 = lean_alloc_ctor(0, 2, 0); +} else { + x_371 = x_364; +} +lean_ctor_set(x_371, 0, x_370); +lean_ctor_set(x_371, 1, x_363); +return x_371; +} +else +{ +lean_object* x_372; lean_object* x_373; lean_object* x_374; lean_object* x_375; +lean_dec(x_357); +lean_dec(x_350); +lean_dec(x_348); +lean_dec(x_1); +x_372 = lean_ctor_get(x_361, 0); +lean_inc(x_372); +x_373 = lean_ctor_get(x_361, 1); +lean_inc(x_373); +if (lean_is_exclusive(x_361)) { + lean_ctor_release(x_361, 0); + lean_ctor_release(x_361, 1); + x_374 = x_361; +} else { + lean_dec_ref(x_361); + x_374 = lean_box(0); +} +if (lean_is_scalar(x_374)) { + x_375 = lean_alloc_ctor(1, 2, 0); +} else { + x_375 = x_374; +} +lean_ctor_set(x_375, 0, x_372); +lean_ctor_set(x_375, 1, x_373); +return x_375; +} +} +else +{ +lean_object* x_376; lean_object* x_377; lean_object* x_378; lean_object* x_379; +lean_dec(x_350); +lean_dec(x_348); +lean_dec(x_344); +lean_dec(x_264); +lean_dec(x_7); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +lean_dec(x_1); +x_376 = lean_ctor_get(x_354, 0); +lean_inc(x_376); +x_377 = lean_ctor_get(x_354, 1); +lean_inc(x_377); if (lean_is_exclusive(x_354)) { lean_ctor_release(x_354, 0); lean_ctor_release(x_354, 1); - x_365 = x_354; + x_378 = x_354; } else { lean_dec_ref(x_354); - x_365 = lean_box(0); + x_378 = lean_box(0); } -if (lean_is_scalar(x_365)) { - x_366 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_378)) { + x_379 = lean_alloc_ctor(1, 2, 0); } else { - x_366 = x_365; -} -lean_ctor_set(x_366, 0, x_363); -lean_ctor_set(x_366, 1, x_364); -return x_366; -} + x_379 = x_378; } +lean_ctor_set(x_379, 0, x_376); +lean_ctor_set(x_379, 1, x_377); +return x_379; } } else { -lean_object* x_367; -lean_free_object(x_25); -lean_dec(x_11); -lean_dec(x_10); -x_367 = l_Lean_Elab_Term_CollectPatternVars_collect_processCtorApp(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_27); -lean_dec(x_1); -return x_367; -} -} -else +lean_object* x_380; +lean_dec(x_350); +lean_dec(x_348); +x_380 = l_Lean_Elab_Term_CollectPatternVars_collect(x_347, x_2, x_264, x_4, x_5, x_6, x_7, x_8, x_26); +if (lean_obj_tag(x_380) == 0) { -lean_object* x_368; lean_object* x_369; lean_object* x_370; lean_object* x_371; uint8_t x_372; uint8_t x_373; uint8_t x_374; lean_object* x_375; lean_object* x_376; lean_object* x_377; uint8_t x_378; lean_object* x_379; -x_368 = lean_ctor_get(x_3, 0); -x_369 = lean_ctor_get(x_3, 1); -x_370 = lean_ctor_get(x_3, 2); -x_371 = lean_ctor_get(x_3, 3); -x_372 = lean_ctor_get_uint8(x_3, sizeof(void*)*8); -x_373 = lean_ctor_get_uint8(x_3, sizeof(void*)*8 + 1); -x_374 = lean_ctor_get_uint8(x_3, sizeof(void*)*8 + 2); -x_375 = lean_ctor_get(x_3, 5); -x_376 = lean_ctor_get(x_3, 6); -x_377 = lean_ctor_get(x_3, 7); -x_378 = lean_ctor_get_uint8(x_3, sizeof(void*)*8 + 3); -lean_inc(x_377); -lean_inc(x_376); -lean_inc(x_375); -lean_inc(x_371); -lean_inc(x_370); -lean_inc(x_369); -lean_inc(x_368); -lean_dec(x_3); -x_379 = lean_alloc_ctor(0, 8, 4); -lean_ctor_set(x_379, 0, x_368); -lean_ctor_set(x_379, 1, x_369); -lean_ctor_set(x_379, 2, x_370); -lean_ctor_set(x_379, 3, x_371); -lean_ctor_set(x_379, 4, x_22); -lean_ctor_set(x_379, 5, x_375); -lean_ctor_set(x_379, 6, x_376); -lean_ctor_set(x_379, 7, x_377); -lean_ctor_set_uint8(x_379, sizeof(void*)*8, x_372); -lean_ctor_set_uint8(x_379, sizeof(void*)*8 + 1, x_373); -lean_ctor_set_uint8(x_379, sizeof(void*)*8 + 2, x_374); -lean_ctor_set_uint8(x_379, sizeof(void*)*8 + 3, x_378); -if (x_14 == 0) -{ -lean_object* x_380; uint8_t x_381; -x_380 = l_Lean_Parser_Term_anonymousCtor___elambda__1___closed__2; -x_381 = lean_name_eq(x_10, x_380); -if (x_381 == 0) -{ -lean_object* x_382; uint8_t x_383; -x_382 = l_Std_Range_myMacro____x40_Init_Data_Range___hyg_365____closed__2; -x_383 = lean_name_eq(x_10, x_382); -if (x_383 == 0) -{ -lean_object* x_384; uint8_t x_385; -x_384 = l_myMacro____x40_Init_Notation___hyg_13954____closed__13; -x_385 = lean_name_eq(x_10, x_384); -if (x_385 == 0) -{ -lean_object* x_386; uint8_t x_387; -x_386 = l_myMacro____x40_Init_Notation___hyg_13352____closed__8; -x_387 = lean_name_eq(x_10, x_386); -if (x_387 == 0) -{ -lean_object* x_388; uint8_t x_389; -lean_dec(x_11); -x_388 = l_Lean_Parser_Term_explicitUniv___elambda__1___closed__2; -x_389 = lean_name_eq(x_10, x_388); -if (x_389 == 0) -{ -lean_object* x_390; uint8_t x_391; -x_390 = l_Lean_Parser_Term_namedPattern___elambda__1___closed__2; -x_391 = lean_name_eq(x_10, x_390); -if (x_391 == 0) -{ -lean_object* x_392; uint8_t x_393; -x_392 = l_Lean_Parser_Term_inaccessible___elambda__1___closed__2; -x_393 = lean_name_eq(x_10, x_392); -if (x_393 == 0) -{ -lean_object* x_394; uint8_t x_395; -x_394 = l_Lean_strLitKind; -x_395 = lean_name_eq(x_10, x_394); -if (x_395 == 0) -{ -lean_object* x_396; uint8_t x_397; -x_396 = l_Lean_numLitKind; -x_397 = lean_name_eq(x_10, x_396); -if (x_397 == 0) -{ -lean_object* x_398; uint8_t x_399; -x_398 = l_Lean_scientificLitKind; -x_399 = lean_name_eq(x_10, x_398); -if (x_399 == 0) -{ -lean_object* x_400; uint8_t x_401; -x_400 = l_Lean_charLitKind; -x_401 = lean_name_eq(x_10, x_400); -if (x_401 == 0) -{ -lean_object* x_402; uint8_t x_403; -lean_free_object(x_25); -x_402 = l_Lean_Parser_Term_quotedName___elambda__1___closed__2; -x_403 = lean_name_eq(x_10, x_402); -if (x_403 == 0) -{ -lean_object* x_404; uint8_t x_405; -x_404 = l_Lean_Parser_Term_doubleQuotedName___elambda__1___closed__2; -x_405 = lean_name_eq(x_10, x_404); -if (x_405 == 0) -{ -lean_object* x_406; uint8_t x_407; -lean_dec(x_1); -x_406 = l_Lean_choiceKind; -x_407 = lean_name_eq(x_10, x_406); -lean_dec(x_10); -if (x_407 == 0) -{ -lean_object* x_408; -x_408 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_throwInvalidPattern___rarg(x_2, x_379, x_4, x_5, x_6, x_7, x_8, x_27); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_379); -lean_dec(x_2); -return x_408; -} -else -{ -lean_object* x_409; lean_object* x_410; -x_409 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__2; -x_410 = l_Lean_throwError___at___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_finalize___spec__1(x_409, x_2, x_379, x_4, x_5, x_6, x_7, x_8, x_27); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_379); -lean_dec(x_2); -return x_410; -} -} -else -{ -lean_object* x_411; -lean_dec(x_10); -lean_dec(x_2); -x_411 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_doubleQuotedNameToPattern(x_1, x_379, x_4, x_5, x_6, x_7, x_8, x_27); -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_1); -return x_411; -} -} -else -{ -lean_object* x_412; -lean_dec(x_10); -lean_dec(x_2); -x_412 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_quotedNameToPattern(x_1, x_379, x_4, x_5, x_6, x_7, x_8, x_27); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_1); -return x_412; -} -} -else -{ -lean_dec(x_379); -lean_dec(x_7); -lean_dec(x_10); -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -lean_ctor_set(x_25, 0, x_1); -return x_25; -} -} -else -{ -lean_dec(x_379); -lean_dec(x_7); -lean_dec(x_10); -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -lean_ctor_set(x_25, 0, x_1); -return x_25; -} -} -else -{ -lean_dec(x_379); -lean_dec(x_7); -lean_dec(x_10); -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -lean_ctor_set(x_25, 0, x_1); -return x_25; -} -} -else -{ -lean_dec(x_379); -lean_dec(x_7); -lean_dec(x_10); -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -lean_ctor_set(x_25, 0, x_1); -return x_25; -} -} -else -{ -lean_dec(x_379); -lean_dec(x_7); -lean_dec(x_10); -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -lean_ctor_set(x_25, 0, x_1); -return x_25; -} -} -else -{ -lean_object* x_413; lean_object* x_414; lean_object* x_415; -lean_free_object(x_25); -lean_dec(x_10); -x_413 = lean_unsigned_to_nat(0u); -x_414 = l_Lean_Syntax_getArg(x_1, x_413); -lean_inc(x_7); -lean_inc(x_414); -x_415 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_processVar(x_414, x_2, x_379, x_4, x_5, x_6, x_7, x_8, x_27); -if (lean_obj_tag(x_415) == 0) -{ -lean_object* x_416; lean_object* x_417; lean_object* x_418; lean_object* x_419; lean_object* x_420; -x_416 = lean_ctor_get(x_415, 1); -lean_inc(x_416); -lean_dec(x_415); -x_417 = lean_unsigned_to_nat(2u); -x_418 = l_Lean_Syntax_getArg(x_1, x_417); -if (lean_is_exclusive(x_1)) { - lean_ctor_release(x_1, 0); - lean_ctor_release(x_1, 1); - x_419 = x_1; +lean_object* x_381; lean_object* x_382; lean_object* x_383; lean_object* x_384; lean_object* x_385; lean_object* x_386; +x_381 = lean_ctor_get(x_380, 0); +lean_inc(x_381); +x_382 = lean_ctor_get(x_380, 1); +lean_inc(x_382); +if (lean_is_exclusive(x_380)) { + lean_ctor_release(x_380, 0); + lean_ctor_release(x_380, 1); + x_383 = x_380; } else { - lean_dec_ref(x_1); + lean_dec_ref(x_380); + x_383 = lean_box(0); +} +x_384 = l_Lean_Syntax_setArg(x_344, x_346, x_381); +x_385 = l_Lean_Syntax_setArg(x_1, x_22, x_384); +if (lean_is_scalar(x_383)) { + x_386 = lean_alloc_ctor(0, 2, 0); +} else { + x_386 = x_383; +} +lean_ctor_set(x_386, 0, x_385); +lean_ctor_set(x_386, 1, x_382); +return x_386; +} +else +{ +lean_object* x_387; lean_object* x_388; lean_object* x_389; lean_object* x_390; +lean_dec(x_344); +lean_dec(x_1); +x_387 = lean_ctor_get(x_380, 0); +lean_inc(x_387); +x_388 = lean_ctor_get(x_380, 1); +lean_inc(x_388); +if (lean_is_exclusive(x_380)) { + lean_ctor_release(x_380, 0); + lean_ctor_release(x_380, 1); + x_389 = x_380; +} else { + lean_dec_ref(x_380); + x_389 = lean_box(0); +} +if (lean_is_scalar(x_389)) { + x_390 = lean_alloc_ctor(1, 2, 0); +} else { + x_390 = x_389; +} +lean_ctor_set(x_390, 0, x_387); +lean_ctor_set(x_390, 1, x_388); +return x_390; +} +} +} +else +{ +lean_object* x_391; +lean_dec(x_348); +x_391 = l_Lean_Elab_Term_CollectPatternVars_collect(x_347, x_2, x_264, x_4, x_5, x_6, x_7, x_8, x_26); +if (lean_obj_tag(x_391) == 0) +{ +lean_object* x_392; lean_object* x_393; lean_object* x_394; lean_object* x_395; lean_object* x_396; lean_object* x_397; +x_392 = lean_ctor_get(x_391, 0); +lean_inc(x_392); +x_393 = lean_ctor_get(x_391, 1); +lean_inc(x_393); +if (lean_is_exclusive(x_391)) { + lean_ctor_release(x_391, 0); + lean_ctor_release(x_391, 1); + x_394 = x_391; +} else { + lean_dec_ref(x_391); + x_394 = lean_box(0); +} +x_395 = l_Lean_Syntax_setArg(x_344, x_346, x_392); +x_396 = l_Lean_Syntax_setArg(x_1, x_22, x_395); +if (lean_is_scalar(x_394)) { + x_397 = lean_alloc_ctor(0, 2, 0); +} else { + x_397 = x_394; +} +lean_ctor_set(x_397, 0, x_396); +lean_ctor_set(x_397, 1, x_393); +return x_397; +} +else +{ +lean_object* x_398; lean_object* x_399; lean_object* x_400; lean_object* x_401; +lean_dec(x_344); +lean_dec(x_1); +x_398 = lean_ctor_get(x_391, 0); +lean_inc(x_398); +x_399 = lean_ctor_get(x_391, 1); +lean_inc(x_399); +if (lean_is_exclusive(x_391)) { + lean_ctor_release(x_391, 0); + lean_ctor_release(x_391, 1); + x_400 = x_391; +} else { + lean_dec_ref(x_391); + x_400 = lean_box(0); +} +if (lean_is_scalar(x_400)) { + x_401 = lean_alloc_ctor(1, 2, 0); +} else { + x_401 = x_400; +} +lean_ctor_set(x_401, 0, x_398); +lean_ctor_set(x_401, 1, x_399); +return x_401; +} +} +} +else +{ +lean_dec(x_344); +lean_dec(x_264); +lean_dec(x_7); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +lean_ctor_set(x_24, 0, x_1); +return x_24; +} +} +} +else +{ +lean_object* x_402; lean_object* x_403; lean_object* x_404; lean_object* x_405; lean_object* x_406; lean_object* x_407; lean_object* x_408; lean_object* x_409; lean_object* x_410; lean_object* x_411; lean_object* x_412; lean_object* x_413; lean_object* x_414; lean_object* x_415; lean_object* x_416; lean_object* x_417; lean_object* x_418; lean_object* x_419; lean_object* x_420; +lean_dec(x_264); +lean_free_object(x_24); +lean_dec(x_7); +lean_dec(x_10); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_1); +x_402 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_mkMVarSyntax___rarg(x_8, x_26); +x_403 = lean_ctor_get(x_402, 0); +lean_inc(x_403); +x_404 = lean_ctor_get(x_402, 1); +lean_inc(x_404); +lean_dec(x_402); +x_405 = lean_st_ref_get(x_8, x_404); +lean_dec(x_8); +x_406 = lean_ctor_get(x_405, 1); +lean_inc(x_406); +lean_dec(x_405); +x_407 = lean_st_ref_take(x_2, x_406); +x_408 = lean_ctor_get(x_407, 0); +lean_inc(x_408); +x_409 = lean_ctor_get(x_407, 1); +lean_inc(x_409); +lean_dec(x_407); +x_410 = lean_ctor_get(x_408, 0); +lean_inc(x_410); +x_411 = lean_ctor_get(x_408, 1); +lean_inc(x_411); +if (lean_is_exclusive(x_408)) { + lean_ctor_release(x_408, 0); + lean_ctor_release(x_408, 1); + x_412 = x_408; +} else { + lean_dec_ref(x_408); + x_412 = lean_box(0); +} +x_413 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_getMVarSyntaxMVarId(x_403); +x_414 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_414, 0, x_413); +x_415 = lean_array_push(x_411, x_414); +if (lean_is_scalar(x_412)) { + x_416 = lean_alloc_ctor(0, 2, 0); +} else { + x_416 = x_412; +} +lean_ctor_set(x_416, 0, x_410); +lean_ctor_set(x_416, 1, x_415); +x_417 = lean_st_ref_set(x_2, x_416, x_409); +lean_dec(x_2); +x_418 = lean_ctor_get(x_417, 1); +lean_inc(x_418); +if (lean_is_exclusive(x_417)) { + lean_ctor_release(x_417, 0); + lean_ctor_release(x_417, 1); + x_419 = x_417; +} else { + lean_dec_ref(x_417); x_419 = lean_box(0); } -lean_inc(x_8); -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_4); -lean_inc(x_379); -x_420 = l_Lean_Elab_Term_CollectPatternVars_collect(x_418, x_2, x_379, x_4, x_5, x_6, x_7, x_8, x_416); -if (lean_obj_tag(x_420) == 0) +if (lean_is_scalar(x_419)) { + x_420 = lean_alloc_ctor(0, 2, 0); +} else { + x_420 = x_419; +} +lean_ctor_set(x_420, 0, x_403); +lean_ctor_set(x_420, 1, x_418); +return x_420; +} +} +else { -lean_object* x_421; lean_object* x_422; lean_object* x_423; lean_object* x_424; lean_object* x_425; lean_object* x_426; lean_object* x_427; lean_object* x_428; lean_object* x_429; lean_object* x_430; lean_object* x_431; lean_object* x_432; lean_object* x_433; lean_object* x_434; lean_object* x_435; lean_object* x_436; lean_object* x_437; lean_object* x_438; lean_object* x_439; lean_object* x_440; lean_object* x_441; lean_object* x_442; lean_object* x_443; lean_object* x_444; lean_object* x_445; lean_object* x_446; -x_421 = lean_ctor_get(x_420, 0); -lean_inc(x_421); -x_422 = lean_ctor_get(x_420, 1); -lean_inc(x_422); -lean_dec(x_420); -x_423 = l_Lean_MonadRef_mkInfoFromRefPos___at_Lean_Elab_Term_CollectPatternVars_collect___spec__1___rarg(x_7, x_8, x_422); -x_424 = lean_ctor_get(x_423, 0); -lean_inc(x_424); -x_425 = lean_ctor_get(x_423, 1); -lean_inc(x_425); -lean_dec(x_423); -x_426 = l_Lean_Elab_Term_getCurrMacroScope(x_379, x_4, x_5, x_6, x_7, x_8, x_425); -lean_dec(x_7); +lean_object* x_421; uint8_t x_422; +lean_free_object(x_24); +lean_dec(x_10); +x_421 = l_Lean_Syntax_getArg(x_1, x_22); +x_422 = l_Lean_Syntax_isNone(x_421); +if (x_422 == 0) +{ +lean_object* x_423; lean_object* x_424; lean_object* x_425; lean_object* x_426; lean_object* x_427; lean_object* x_428; +lean_dec(x_1); +x_423 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__12; +x_424 = l_Lean_throwErrorAt___at___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_processVar___spec__2(x_421, x_423, x_2, x_264, x_4, x_5, x_6, x_7, x_8, x_26); +lean_dec(x_8); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); -lean_dec(x_379); -x_427 = lean_ctor_get(x_426, 0); -lean_inc(x_427); -x_428 = lean_ctor_get(x_426, 1); -lean_inc(x_428); -lean_dec(x_426); -x_429 = l_Lean_Elab_Term_getMainModule___rarg(x_8, x_428); -lean_dec(x_8); -x_430 = lean_ctor_get(x_429, 0); -lean_inc(x_430); -x_431 = lean_ctor_get(x_429, 1); -lean_inc(x_431); -if (lean_is_exclusive(x_429)) { - lean_ctor_release(x_429, 0); - lean_ctor_release(x_429, 1); - x_432 = x_429; +lean_dec(x_264); +lean_dec(x_2); +lean_dec(x_421); +x_425 = lean_ctor_get(x_424, 0); +lean_inc(x_425); +x_426 = lean_ctor_get(x_424, 1); +lean_inc(x_426); +if (lean_is_exclusive(x_424)) { + lean_ctor_release(x_424, 0); + lean_ctor_release(x_424, 1); + x_427 = x_424; } else { - lean_dec_ref(x_429); - x_432 = lean_box(0); + lean_dec_ref(x_424); + x_427 = lean_box(0); } -x_433 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__6; -x_434 = l_Lean_addMacroScope(x_430, x_433, x_427); -x_435 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__5; -x_436 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__9; -x_437 = lean_alloc_ctor(3, 4, 0); -lean_ctor_set(x_437, 0, x_424); -lean_ctor_set(x_437, 1, x_435); -lean_ctor_set(x_437, 2, x_434); -lean_ctor_set(x_437, 3, x_436); -x_438 = l_Array_empty___closed__1; -x_439 = lean_array_push(x_438, x_437); -x_440 = lean_array_push(x_438, x_414); -x_441 = lean_array_push(x_440, x_421); -x_442 = l_Lean_nullKind___closed__2; -if (lean_is_scalar(x_419)) { - x_443 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_427)) { + x_428 = lean_alloc_ctor(1, 2, 0); } else { - x_443 = x_419; + x_428 = x_427; } -lean_ctor_set(x_443, 0, x_442); -lean_ctor_set(x_443, 1, x_441); -x_444 = lean_array_push(x_439, x_443); -x_445 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_445, 0, x_12); -lean_ctor_set(x_445, 1, x_444); -if (lean_is_scalar(x_432)) { - x_446 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_428, 0, x_425); +lean_ctor_set(x_428, 1, x_426); +return x_428; +} +else +{ +lean_object* x_429; lean_object* x_430; +lean_dec(x_421); +x_429 = lean_box(0); +x_430 = l_Lean_Elab_Term_CollectPatternVars_collect___lambda__1(x_1, x_429, x_2, x_264, x_4, x_5, x_6, x_7, x_8, x_26); +return x_430; +} +} +} +else +{ +lean_object* x_431; lean_object* x_432; lean_object* x_433; lean_object* x_434; +lean_free_object(x_24); +lean_dec(x_10); +x_431 = l_Lean_Syntax_getArg(x_1, x_22); +x_432 = l_Lean_Syntax_getArgs(x_431); +lean_dec(x_431); +x_433 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__10; +x_434 = l_Array_mapSepElemsM___at_Lean_Elab_Term_CollectPatternVars_collect___spec__2(x_432, x_433, x_2, x_264, x_4, x_5, x_6, x_7, x_8, x_26); +lean_dec(x_432); +if (lean_obj_tag(x_434) == 0) +{ +lean_object* x_435; lean_object* x_436; lean_object* x_437; lean_object* x_438; lean_object* x_439; lean_object* x_440; lean_object* x_441; +x_435 = lean_ctor_get(x_434, 0); +lean_inc(x_435); +x_436 = lean_ctor_get(x_434, 1); +lean_inc(x_436); +if (lean_is_exclusive(x_434)) { + lean_ctor_release(x_434, 0); + lean_ctor_release(x_434, 1); + x_437 = x_434; } else { - x_446 = x_432; + lean_dec_ref(x_434); + x_437 = lean_box(0); } -lean_ctor_set(x_446, 0, x_445); -lean_ctor_set(x_446, 1, x_431); +x_438 = l_Lean_nullKind; +x_439 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_439, 0, x_438); +lean_ctor_set(x_439, 1, x_435); +x_440 = l_Lean_Syntax_setArg(x_1, x_22, x_439); +if (lean_is_scalar(x_437)) { + x_441 = lean_alloc_ctor(0, 2, 0); +} else { + x_441 = x_437; +} +lean_ctor_set(x_441, 0, x_440); +lean_ctor_set(x_441, 1, x_436); +return x_441; +} +else +{ +lean_object* x_442; lean_object* x_443; lean_object* x_444; lean_object* x_445; +lean_dec(x_1); +x_442 = lean_ctor_get(x_434, 0); +lean_inc(x_442); +x_443 = lean_ctor_get(x_434, 1); +lean_inc(x_443); +if (lean_is_exclusive(x_434)) { + lean_ctor_release(x_434, 0); + lean_ctor_release(x_434, 1); + x_444 = x_434; +} else { + lean_dec_ref(x_434); + x_444 = lean_box(0); +} +if (lean_is_scalar(x_444)) { + x_445 = lean_alloc_ctor(1, 2, 0); +} else { + x_445 = x_444; +} +lean_ctor_set(x_445, 0, x_442); +lean_ctor_set(x_445, 1, x_443); +return x_445; +} +} +} +else +{ +lean_object* x_446; +lean_free_object(x_24); +lean_dec(x_10); +x_446 = l_Lean_Elab_Term_CollectPatternVars_collect_processCtorApp(x_1, x_2, x_264, x_4, x_5, x_6, x_7, x_8, x_26); +lean_dec(x_1); return x_446; } -else -{ -lean_object* x_447; lean_object* x_448; lean_object* x_449; lean_object* x_450; -lean_dec(x_419); -lean_dec(x_414); -lean_dec(x_379); -lean_dec(x_7); -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -x_447 = lean_ctor_get(x_420, 0); -lean_inc(x_447); -x_448 = lean_ctor_get(x_420, 1); -lean_inc(x_448); -if (lean_is_exclusive(x_420)) { - lean_ctor_release(x_420, 0); - lean_ctor_release(x_420, 1); - x_449 = x_420; -} else { - lean_dec_ref(x_420); - x_449 = lean_box(0); -} -if (lean_is_scalar(x_449)) { - x_450 = lean_alloc_ctor(1, 2, 0); -} else { - x_450 = x_449; -} -lean_ctor_set(x_450, 0, x_447); -lean_ctor_set(x_450, 1, x_448); -return x_450; -} } else { -lean_object* x_451; lean_object* x_452; lean_object* x_453; lean_object* x_454; -lean_dec(x_414); -lean_dec(x_379); -lean_dec(x_7); -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -lean_dec(x_1); -x_451 = lean_ctor_get(x_415, 0); -lean_inc(x_451); -x_452 = lean_ctor_get(x_415, 1); -lean_inc(x_452); -if (lean_is_exclusive(x_415)) { - lean_ctor_release(x_415, 0); - lean_ctor_release(x_415, 1); - x_453 = x_415; -} else { - lean_dec_ref(x_415); - x_453 = lean_box(0); -} -if (lean_is_scalar(x_453)) { - x_454 = lean_alloc_ctor(1, 2, 0); -} else { - x_454 = x_453; -} -lean_ctor_set(x_454, 0, x_451); -lean_ctor_set(x_454, 1, x_452); -return x_454; -} -} -} -else -{ -lean_object* x_455; lean_object* x_456; lean_object* x_457; -lean_free_object(x_25); +lean_object* x_447; +lean_free_object(x_24); lean_dec(x_10); -x_455 = lean_unsigned_to_nat(0u); -x_456 = l_Lean_Syntax_getArg(x_1, x_455); -lean_dec(x_1); -x_457 = l_Lean_Elab_Term_CollectPatternVars_collect_processCtor(x_456, x_2, x_379, x_4, x_5, x_6, x_7, x_8, x_27); -return x_457; +x_447 = l_Lean_Elab_Term_CollectPatternVars_collect_processId(x_1, x_2, x_264, x_4, x_5, x_6, x_7, x_8, x_26); +return x_447; +} } } else { -lean_object* x_458; lean_object* x_459; uint8_t x_460; -x_458 = l_Lean_instInhabitedSyntax; -x_459 = lean_array_get(x_458, x_11, x_23); -x_460 = l_Lean_Syntax_isNone(x_459); -if (x_460 == 0) -{ -lean_object* x_461; lean_object* x_462; lean_object* x_463; lean_object* x_464; uint8_t x_465; -lean_free_object(x_25); -if (lean_is_exclusive(x_1)) { - lean_ctor_release(x_1, 0); - lean_ctor_release(x_1, 1); - x_461 = x_1; +lean_object* x_448; lean_object* x_449; lean_object* x_450; lean_object* x_451; lean_object* x_452; uint8_t x_453; uint8_t x_454; uint8_t x_455; lean_object* x_456; lean_object* x_457; lean_object* x_458; uint8_t x_459; lean_object* x_460; lean_object* x_461; +x_448 = lean_ctor_get(x_24, 1); +lean_inc(x_448); +lean_dec(x_24); +x_449 = lean_ctor_get(x_3, 0); +lean_inc(x_449); +x_450 = lean_ctor_get(x_3, 1); +lean_inc(x_450); +x_451 = lean_ctor_get(x_3, 2); +lean_inc(x_451); +x_452 = lean_ctor_get(x_3, 3); +lean_inc(x_452); +x_453 = lean_ctor_get_uint8(x_3, sizeof(void*)*8); +x_454 = lean_ctor_get_uint8(x_3, sizeof(void*)*8 + 1); +x_455 = lean_ctor_get_uint8(x_3, sizeof(void*)*8 + 2); +x_456 = lean_ctor_get(x_3, 5); +lean_inc(x_456); +x_457 = lean_ctor_get(x_3, 6); +lean_inc(x_457); +x_458 = lean_ctor_get(x_3, 7); +lean_inc(x_458); +x_459 = lean_ctor_get_uint8(x_3, sizeof(void*)*8 + 3); +if (lean_is_exclusive(x_3)) { + lean_ctor_release(x_3, 0); + lean_ctor_release(x_3, 1); + lean_ctor_release(x_3, 2); + lean_ctor_release(x_3, 3); + lean_ctor_release(x_3, 4); + lean_ctor_release(x_3, 5); + lean_ctor_release(x_3, 6); + lean_ctor_release(x_3, 7); + x_460 = x_3; } else { - lean_dec_ref(x_1); - x_461 = lean_box(0); + lean_dec_ref(x_3); + x_460 = lean_box(0); } -x_462 = lean_unsigned_to_nat(0u); -x_463 = l_Lean_Syntax_getArg(x_459, x_462); -x_464 = l_Lean_Syntax_getArg(x_459, x_23); -x_465 = l_Lean_Syntax_isNone(x_464); +if (lean_is_scalar(x_460)) { + x_461 = lean_alloc_ctor(0, 8, 4); +} else { + x_461 = x_460; +} +lean_ctor_set(x_461, 0, x_449); +lean_ctor_set(x_461, 1, x_450); +lean_ctor_set(x_461, 2, x_451); +lean_ctor_set(x_461, 3, x_452); +lean_ctor_set(x_461, 4, x_21); +lean_ctor_set(x_461, 5, x_456); +lean_ctor_set(x_461, 6, x_457); +lean_ctor_set(x_461, 7, x_458); +lean_ctor_set_uint8(x_461, sizeof(void*)*8, x_453); +lean_ctor_set_uint8(x_461, sizeof(void*)*8 + 1, x_454); +lean_ctor_set_uint8(x_461, sizeof(void*)*8 + 2, x_455); +lean_ctor_set_uint8(x_461, sizeof(void*)*8 + 3, x_459); +if (x_17 == 0) +{ +lean_object* x_462; uint8_t x_463; +x_462 = l_myMacro____x40_Init_Notation___hyg_2278____closed__4; +x_463 = lean_name_eq(x_10, x_462); +if (x_463 == 0) +{ +lean_object* x_464; uint8_t x_465; +x_464 = l_Lean_Parser_Term_anonymousCtor___elambda__1___closed__2; +x_465 = lean_name_eq(x_10, x_464); if (x_465 == 0) { -lean_object* x_466; lean_object* x_467; lean_object* x_468; uint8_t x_469; -x_466 = l_Lean_Syntax_getArg(x_464, x_462); -lean_inc(x_466); -x_467 = l_Lean_Syntax_getKind(x_466); -x_468 = l_myMacro____x40_Init_Notation___hyg_14874____closed__8; -x_469 = lean_name_eq(x_467, x_468); -lean_dec(x_467); +lean_object* x_466; uint8_t x_467; +x_466 = l_Std_Range_myMacro____x40_Init_Data_Range___hyg_365____closed__2; +x_467 = lean_name_eq(x_10, x_466); +if (x_467 == 0) +{ +lean_object* x_468; uint8_t x_469; +x_468 = l_myMacro____x40_Init_Notation___hyg_13954____closed__13; +x_469 = lean_name_eq(x_10, x_468); if (x_469 == 0) { -lean_object* x_470; -lean_inc(x_8); -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_4); -lean_inc(x_379); -lean_inc(x_2); -x_470 = l_Lean_Elab_Term_CollectPatternVars_collect(x_463, x_2, x_379, x_4, x_5, x_6, x_7, x_8, x_27); -if (lean_obj_tag(x_470) == 0) +lean_object* x_470; uint8_t x_471; +x_470 = l_myMacro____x40_Init_Notation___hyg_13352____closed__8; +x_471 = lean_name_eq(x_10, x_470); +if (x_471 == 0) { -lean_object* x_471; lean_object* x_472; lean_object* x_473; lean_object* x_474; lean_object* x_475; lean_object* x_476; lean_object* x_477; -x_471 = lean_ctor_get(x_470, 0); -lean_inc(x_471); -x_472 = lean_ctor_get(x_470, 1); -lean_inc(x_472); -lean_dec(x_470); -x_473 = l_Lean_Syntax_setArg(x_459, x_462, x_471); -x_474 = l_Lean_Syntax_getArg(x_466, x_23); -x_475 = l_Lean_Syntax_getArgs(x_474); -lean_dec(x_474); -x_476 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__10; -x_477 = l_Array_mapSepElemsM___at_Lean_Elab_Term_CollectPatternVars_collect___spec__2(x_475, x_476, x_2, x_379, x_4, x_5, x_6, x_7, x_8, x_472); -lean_dec(x_475); -if (lean_obj_tag(x_477) == 0) +lean_object* x_472; uint8_t x_473; +x_472 = l_Lean_Parser_Term_explicitUniv___elambda__1___closed__2; +x_473 = lean_name_eq(x_10, x_472); +if (x_473 == 0) { -lean_object* x_478; lean_object* x_479; lean_object* x_480; lean_object* x_481; lean_object* x_482; lean_object* x_483; lean_object* x_484; lean_object* x_485; lean_object* x_486; lean_object* x_487; lean_object* x_488; -x_478 = lean_ctor_get(x_477, 0); -lean_inc(x_478); -x_479 = lean_ctor_get(x_477, 1); -lean_inc(x_479); -if (lean_is_exclusive(x_477)) { - lean_ctor_release(x_477, 0); - lean_ctor_release(x_477, 1); - x_480 = x_477; -} else { - lean_dec_ref(x_477); - x_480 = lean_box(0); -} -x_481 = l_Lean_nullKind; -if (lean_is_scalar(x_461)) { - x_482 = lean_alloc_ctor(1, 2, 0); -} else { - x_482 = x_461; -} -lean_ctor_set(x_482, 0, x_481); -lean_ctor_set(x_482, 1, x_478); -x_483 = l_Lean_Syntax_setArg(x_466, x_23, x_482); -x_484 = l_Lean_Syntax_setArg(x_464, x_462, x_483); -x_485 = l_Lean_Syntax_setArg(x_473, x_23, x_484); -x_486 = lean_array_set(x_11, x_23, x_485); -x_487 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_487, 0, x_10); -lean_ctor_set(x_487, 1, x_486); -if (lean_is_scalar(x_480)) { - x_488 = lean_alloc_ctor(0, 2, 0); -} else { - x_488 = x_480; -} -lean_ctor_set(x_488, 0, x_487); -lean_ctor_set(x_488, 1, x_479); -return x_488; -} -else +lean_object* x_474; uint8_t x_475; +x_474 = l_Lean_Parser_Term_namedPattern___elambda__1___closed__2; +x_475 = lean_name_eq(x_10, x_474); +if (x_475 == 0) { -lean_object* x_489; lean_object* x_490; lean_object* x_491; lean_object* x_492; -lean_dec(x_473); -lean_dec(x_466); -lean_dec(x_464); -lean_dec(x_461); -lean_dec(x_11); +lean_object* x_476; uint8_t x_477; +x_476 = l_Lean_Parser_Term_inaccessible___elambda__1___closed__2; +x_477 = lean_name_eq(x_10, x_476); +if (x_477 == 0) +{ +lean_object* x_478; uint8_t x_479; +x_478 = l_Lean_strLitKind; +x_479 = lean_name_eq(x_10, x_478); +if (x_479 == 0) +{ +lean_object* x_480; uint8_t x_481; +x_480 = l_Lean_numLitKind; +x_481 = lean_name_eq(x_10, x_480); +if (x_481 == 0) +{ +lean_object* x_482; uint8_t x_483; +x_482 = l_Lean_scientificLitKind; +x_483 = lean_name_eq(x_10, x_482); +if (x_483 == 0) +{ +lean_object* x_484; uint8_t x_485; +x_484 = l_Lean_charLitKind; +x_485 = lean_name_eq(x_10, x_484); +if (x_485 == 0) +{ +lean_object* x_486; uint8_t x_487; +x_486 = l_Lean_Parser_Term_quotedName___elambda__1___closed__2; +x_487 = lean_name_eq(x_10, x_486); +if (x_487 == 0) +{ +lean_object* x_488; uint8_t x_489; +x_488 = l_Lean_Parser_Term_doubleQuotedName___elambda__1___closed__2; +x_489 = lean_name_eq(x_10, x_488); +if (x_489 == 0) +{ +lean_object* x_490; uint8_t x_491; +lean_dec(x_1); +x_490 = l_Lean_choiceKind; +x_491 = lean_name_eq(x_10, x_490); lean_dec(x_10); -x_489 = lean_ctor_get(x_477, 0); -lean_inc(x_489); -x_490 = lean_ctor_get(x_477, 1); -lean_inc(x_490); -if (lean_is_exclusive(x_477)) { - lean_ctor_release(x_477, 0); - lean_ctor_release(x_477, 1); - x_491 = x_477; -} else { - lean_dec_ref(x_477); - x_491 = lean_box(0); -} -if (lean_is_scalar(x_491)) { - x_492 = lean_alloc_ctor(1, 2, 0); -} else { - x_492 = x_491; -} -lean_ctor_set(x_492, 0, x_489); -lean_ctor_set(x_492, 1, x_490); +if (x_491 == 0) +{ +lean_object* x_492; +x_492 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_throwInvalidPattern___rarg(x_2, x_461, x_4, x_5, x_6, x_7, x_8, x_448); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_461); +lean_dec(x_2); return x_492; } +else +{ +lean_object* x_493; lean_object* x_494; +x_493 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__2; +x_494 = l_Lean_throwError___at___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_finalize___spec__1(x_493, x_2, x_461, x_4, x_5, x_6, x_7, x_8, x_448); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_461); +lean_dec(x_2); +return x_494; +} } else { -lean_object* x_493; lean_object* x_494; lean_object* x_495; lean_object* x_496; -lean_dec(x_466); -lean_dec(x_464); -lean_dec(x_461); -lean_dec(x_459); -lean_dec(x_379); -lean_dec(x_7); -lean_dec(x_11); +lean_object* x_495; lean_dec(x_10); +lean_dec(x_2); +x_495 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_doubleQuotedNameToPattern(x_1, x_461, x_4, x_5, x_6, x_7, x_8, x_448); lean_dec(x_8); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); +lean_dec(x_1); +return x_495; +} +} +else +{ +lean_object* x_496; +lean_dec(x_10); lean_dec(x_2); -x_493 = lean_ctor_get(x_470, 0); -lean_inc(x_493); -x_494 = lean_ctor_get(x_470, 1); -lean_inc(x_494); -if (lean_is_exclusive(x_470)) { - lean_ctor_release(x_470, 0); - lean_ctor_release(x_470, 1); - x_495 = x_470; -} else { - lean_dec_ref(x_470); - x_495 = lean_box(0); -} -if (lean_is_scalar(x_495)) { - x_496 = lean_alloc_ctor(1, 2, 0); -} else { - x_496 = x_495; -} -lean_ctor_set(x_496, 0, x_493); -lean_ctor_set(x_496, 1, x_494); +x_496 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_quotedNameToPattern(x_1, x_461, x_4, x_5, x_6, x_7, x_8, x_448); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_1); return x_496; } } else { lean_object* x_497; -lean_dec(x_466); -lean_dec(x_464); -x_497 = l_Lean_Elab_Term_CollectPatternVars_collect(x_463, x_2, x_379, x_4, x_5, x_6, x_7, x_8, x_27); -if (lean_obj_tag(x_497) == 0) -{ -lean_object* x_498; lean_object* x_499; lean_object* x_500; lean_object* x_501; lean_object* x_502; lean_object* x_503; lean_object* x_504; -x_498 = lean_ctor_get(x_497, 0); -lean_inc(x_498); -x_499 = lean_ctor_get(x_497, 1); -lean_inc(x_499); -if (lean_is_exclusive(x_497)) { - lean_ctor_release(x_497, 0); - lean_ctor_release(x_497, 1); - x_500 = x_497; -} else { - lean_dec_ref(x_497); - x_500 = lean_box(0); +lean_dec(x_461); +lean_dec(x_7); +lean_dec(x_10); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +x_497 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_497, 0, x_1); +lean_ctor_set(x_497, 1, x_448); +return x_497; } -x_501 = l_Lean_Syntax_setArg(x_459, x_462, x_498); -x_502 = lean_array_set(x_11, x_23, x_501); -if (lean_is_scalar(x_461)) { - x_503 = lean_alloc_ctor(1, 2, 0); -} else { - x_503 = x_461; -} -lean_ctor_set(x_503, 0, x_10); -lean_ctor_set(x_503, 1, x_502); -if (lean_is_scalar(x_500)) { - x_504 = lean_alloc_ctor(0, 2, 0); -} else { - x_504 = x_500; -} -lean_ctor_set(x_504, 0, x_503); -lean_ctor_set(x_504, 1, x_499); -return x_504; } else { +lean_object* x_498; +lean_dec(x_461); +lean_dec(x_7); +lean_dec(x_10); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +x_498 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_498, 0, x_1); +lean_ctor_set(x_498, 1, x_448); +return x_498; +} +} +else +{ +lean_object* x_499; +lean_dec(x_461); +lean_dec(x_7); +lean_dec(x_10); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +x_499 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_499, 0, x_1); +lean_ctor_set(x_499, 1, x_448); +return x_499; +} +} +else +{ +lean_object* x_500; +lean_dec(x_461); +lean_dec(x_7); +lean_dec(x_10); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +x_500 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_500, 0, x_1); +lean_ctor_set(x_500, 1, x_448); +return x_500; +} +} +else +{ +lean_object* x_501; +lean_dec(x_461); +lean_dec(x_7); +lean_dec(x_10); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +x_501 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_501, 0, x_1); +lean_ctor_set(x_501, 1, x_448); +return x_501; +} +} +else +{ +lean_object* x_502; lean_object* x_503; lean_object* x_504; +lean_dec(x_10); +x_502 = lean_unsigned_to_nat(0u); +x_503 = l_Lean_Syntax_getArg(x_1, x_502); +lean_inc(x_7); +lean_inc(x_503); +x_504 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_processVar(x_503, x_2, x_461, x_4, x_5, x_6, x_7, x_8, x_448); +if (lean_obj_tag(x_504) == 0) +{ lean_object* x_505; lean_object* x_506; lean_object* x_507; lean_object* x_508; -lean_dec(x_461); -lean_dec(x_459); -lean_dec(x_11); -lean_dec(x_10); -x_505 = lean_ctor_get(x_497, 0); +x_505 = lean_ctor_get(x_504, 1); lean_inc(x_505); -x_506 = lean_ctor_get(x_497, 1); -lean_inc(x_506); -if (lean_is_exclusive(x_497)) { - lean_ctor_release(x_497, 0); - lean_ctor_release(x_497, 1); - x_507 = x_497; -} else { - lean_dec_ref(x_497); - x_507 = lean_box(0); -} -if (lean_is_scalar(x_507)) { - x_508 = lean_alloc_ctor(1, 2, 0); -} else { - x_508 = x_507; -} -lean_ctor_set(x_508, 0, x_505); -lean_ctor_set(x_508, 1, x_506); -return x_508; -} -} -} -else +lean_dec(x_504); +x_506 = lean_unsigned_to_nat(2u); +x_507 = l_Lean_Syntax_getArg(x_1, x_506); +lean_dec(x_1); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +lean_inc(x_461); +x_508 = l_Lean_Elab_Term_CollectPatternVars_collect(x_507, x_2, x_461, x_4, x_5, x_6, x_7, x_8, x_505); +if (lean_obj_tag(x_508) == 0) { -lean_object* x_509; -lean_dec(x_464); -x_509 = l_Lean_Elab_Term_CollectPatternVars_collect(x_463, x_2, x_379, x_4, x_5, x_6, x_7, x_8, x_27); -if (lean_obj_tag(x_509) == 0) -{ -lean_object* x_510; lean_object* x_511; lean_object* x_512; lean_object* x_513; lean_object* x_514; lean_object* x_515; lean_object* x_516; -x_510 = lean_ctor_get(x_509, 0); +lean_object* x_509; lean_object* x_510; lean_object* x_511; lean_object* x_512; lean_object* x_513; lean_object* x_514; lean_object* x_515; lean_object* x_516; lean_object* x_517; lean_object* x_518; lean_object* x_519; lean_object* x_520; lean_object* x_521; lean_object* x_522; lean_object* x_523; lean_object* x_524; lean_object* x_525; lean_object* x_526; lean_object* x_527; lean_object* x_528; lean_object* x_529; lean_object* x_530; lean_object* x_531; lean_object* x_532; lean_object* x_533; lean_object* x_534; +x_509 = lean_ctor_get(x_508, 0); +lean_inc(x_509); +x_510 = lean_ctor_get(x_508, 1); lean_inc(x_510); -x_511 = lean_ctor_get(x_509, 1); -lean_inc(x_511); -if (lean_is_exclusive(x_509)) { - lean_ctor_release(x_509, 0); - lean_ctor_release(x_509, 1); - x_512 = x_509; -} else { - lean_dec_ref(x_509); - x_512 = lean_box(0); -} -x_513 = l_Lean_Syntax_setArg(x_459, x_462, x_510); -x_514 = lean_array_set(x_11, x_23, x_513); -if (lean_is_scalar(x_461)) { - x_515 = lean_alloc_ctor(1, 2, 0); -} else { - x_515 = x_461; -} -lean_ctor_set(x_515, 0, x_10); -lean_ctor_set(x_515, 1, x_514); -if (lean_is_scalar(x_512)) { - x_516 = lean_alloc_ctor(0, 2, 0); -} else { - x_516 = x_512; -} -lean_ctor_set(x_516, 0, x_515); -lean_ctor_set(x_516, 1, x_511); -return x_516; -} -else -{ -lean_object* x_517; lean_object* x_518; lean_object* x_519; lean_object* x_520; +lean_dec(x_508); +x_511 = l_Lean_MonadRef_mkInfoFromRefPos___at_Lean_Elab_Term_CollectPatternVars_collect___spec__1___rarg(x_7, x_8, x_510); +x_512 = lean_ctor_get(x_511, 0); +lean_inc(x_512); +x_513 = lean_ctor_get(x_511, 1); +lean_inc(x_513); +lean_dec(x_511); +x_514 = l_Lean_Elab_Term_getCurrMacroScope(x_461, x_4, x_5, x_6, x_7, x_8, x_513); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); lean_dec(x_461); -lean_dec(x_459); -lean_dec(x_11); -lean_dec(x_10); -x_517 = lean_ctor_get(x_509, 0); -lean_inc(x_517); -x_518 = lean_ctor_get(x_509, 1); +x_515 = lean_ctor_get(x_514, 0); +lean_inc(x_515); +x_516 = lean_ctor_get(x_514, 1); +lean_inc(x_516); +lean_dec(x_514); +x_517 = l_Lean_Elab_Term_getMainModule___rarg(x_8, x_516); +lean_dec(x_8); +x_518 = lean_ctor_get(x_517, 0); lean_inc(x_518); -if (lean_is_exclusive(x_509)) { - lean_ctor_release(x_509, 0); - lean_ctor_release(x_509, 1); - x_519 = x_509; +x_519 = lean_ctor_get(x_517, 1); +lean_inc(x_519); +if (lean_is_exclusive(x_517)) { + lean_ctor_release(x_517, 0); + lean_ctor_release(x_517, 1); + x_520 = x_517; } else { - lean_dec_ref(x_509); - x_519 = lean_box(0); + lean_dec_ref(x_517); + x_520 = lean_box(0); } -if (lean_is_scalar(x_519)) { - x_520 = lean_alloc_ctor(1, 2, 0); +x_521 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__6; +x_522 = l_Lean_addMacroScope(x_518, x_521, x_515); +x_523 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__5; +x_524 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__9; +x_525 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_525, 0, x_512); +lean_ctor_set(x_525, 1, x_523); +lean_ctor_set(x_525, 2, x_522); +lean_ctor_set(x_525, 3, x_524); +x_526 = l_Array_empty___closed__1; +x_527 = lean_array_push(x_526, x_525); +x_528 = lean_array_push(x_526, x_503); +x_529 = lean_array_push(x_528, x_509); +x_530 = l_Lean_nullKind___closed__2; +x_531 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_531, 0, x_530); +lean_ctor_set(x_531, 1, x_529); +x_532 = lean_array_push(x_527, x_531); +x_533 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_533, 0, x_462); +lean_ctor_set(x_533, 1, x_532); +if (lean_is_scalar(x_520)) { + x_534 = lean_alloc_ctor(0, 2, 0); } else { - x_520 = x_519; -} -lean_ctor_set(x_520, 0, x_517); -lean_ctor_set(x_520, 1, x_518); -return x_520; -} + x_534 = x_520; } +lean_ctor_set(x_534, 0, x_533); +lean_ctor_set(x_534, 1, x_519); +return x_534; } else { -lean_dec(x_459); -lean_dec(x_379); +lean_object* x_535; lean_object* x_536; lean_object* x_537; lean_object* x_538; +lean_dec(x_503); +lean_dec(x_461); lean_dec(x_7); -lean_dec(x_11); -lean_dec(x_10); lean_dec(x_8); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); -lean_dec(x_2); -lean_ctor_set(x_25, 0, x_1); -return x_25; +x_535 = lean_ctor_get(x_508, 0); +lean_inc(x_535); +x_536 = lean_ctor_get(x_508, 1); +lean_inc(x_536); +if (lean_is_exclusive(x_508)) { + lean_ctor_release(x_508, 0); + lean_ctor_release(x_508, 1); + x_537 = x_508; +} else { + lean_dec_ref(x_508); + x_537 = lean_box(0); } +if (lean_is_scalar(x_537)) { + x_538 = lean_alloc_ctor(1, 2, 0); +} else { + x_538 = x_537; +} +lean_ctor_set(x_538, 0, x_535); +lean_ctor_set(x_538, 1, x_536); +return x_538; } } else { -lean_object* x_521; lean_object* x_522; lean_object* x_523; lean_object* x_524; lean_object* x_525; lean_object* x_526; lean_object* x_527; lean_object* x_528; lean_object* x_529; lean_object* x_530; lean_object* x_531; lean_object* x_532; lean_object* x_533; lean_object* x_534; lean_object* x_535; lean_object* x_536; lean_object* x_537; lean_object* x_538; lean_object* x_539; -lean_dec(x_379); -lean_free_object(x_25); +lean_object* x_539; lean_object* x_540; lean_object* x_541; lean_object* x_542; +lean_dec(x_503); +lean_dec(x_461); lean_dec(x_7); -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_1); -x_521 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_mkMVarSyntax___rarg(x_8, x_27); -x_522 = lean_ctor_get(x_521, 0); -lean_inc(x_522); -x_523 = lean_ctor_get(x_521, 1); -lean_inc(x_523); -lean_dec(x_521); -x_524 = lean_st_ref_get(x_8, x_523); -lean_dec(x_8); -x_525 = lean_ctor_get(x_524, 1); -lean_inc(x_525); -lean_dec(x_524); -x_526 = lean_st_ref_take(x_2, x_525); -x_527 = lean_ctor_get(x_526, 0); -lean_inc(x_527); -x_528 = lean_ctor_get(x_526, 1); -lean_inc(x_528); -lean_dec(x_526); -x_529 = lean_ctor_get(x_527, 0); -lean_inc(x_529); -x_530 = lean_ctor_get(x_527, 1); -lean_inc(x_530); -if (lean_is_exclusive(x_527)) { - lean_ctor_release(x_527, 0); - lean_ctor_release(x_527, 1); - x_531 = x_527; -} else { - lean_dec_ref(x_527); - x_531 = lean_box(0); -} -x_532 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_getMVarSyntaxMVarId(x_522); -x_533 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_533, 0, x_532); -x_534 = lean_array_push(x_530, x_533); -if (lean_is_scalar(x_531)) { - x_535 = lean_alloc_ctor(0, 2, 0); -} else { - x_535 = x_531; -} -lean_ctor_set(x_535, 0, x_529); -lean_ctor_set(x_535, 1, x_534); -x_536 = lean_st_ref_set(x_2, x_535, x_528); -lean_dec(x_2); -x_537 = lean_ctor_get(x_536, 1); -lean_inc(x_537); -if (lean_is_exclusive(x_536)) { - lean_ctor_release(x_536, 0); - lean_ctor_release(x_536, 1); - x_538 = x_536; -} else { - lean_dec_ref(x_536); - x_538 = lean_box(0); -} -if (lean_is_scalar(x_538)) { - x_539 = lean_alloc_ctor(0, 2, 0); -} else { - x_539 = x_538; -} -lean_ctor_set(x_539, 0, x_522); -lean_ctor_set(x_539, 1, x_537); -return x_539; -} -} -else -{ -lean_object* x_540; lean_object* x_541; uint8_t x_542; -lean_free_object(x_25); -lean_dec(x_1); -x_540 = l_Lean_instInhabitedSyntax; -x_541 = lean_array_get(x_540, x_11, x_23); -x_542 = l_Lean_Syntax_isNone(x_541); -if (x_542 == 0) -{ -lean_object* x_543; lean_object* x_544; lean_object* x_545; lean_object* x_546; lean_object* x_547; lean_object* x_548; -lean_dec(x_11); -lean_dec(x_10); -x_543 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__12; -x_544 = l_Lean_throwErrorAt___at___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_processVar___spec__2(x_541, x_543, x_2, x_379, x_4, x_5, x_6, x_7, x_8, x_27); lean_dec(x_8); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); -lean_dec(x_379); lean_dec(x_2); -lean_dec(x_541); -x_545 = lean_ctor_get(x_544, 0); -lean_inc(x_545); -x_546 = lean_ctor_get(x_544, 1); -lean_inc(x_546); -if (lean_is_exclusive(x_544)) { - lean_ctor_release(x_544, 0); - lean_ctor_release(x_544, 1); - x_547 = x_544; +lean_dec(x_1); +x_539 = lean_ctor_get(x_504, 0); +lean_inc(x_539); +x_540 = lean_ctor_get(x_504, 1); +lean_inc(x_540); +if (lean_is_exclusive(x_504)) { + lean_ctor_release(x_504, 0); + lean_ctor_release(x_504, 1); + x_541 = x_504; } else { - lean_dec_ref(x_544); - x_547 = lean_box(0); + lean_dec_ref(x_504); + x_541 = lean_box(0); } -if (lean_is_scalar(x_547)) { - x_548 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_541)) { + x_542 = lean_alloc_ctor(1, 2, 0); } else { - x_548 = x_547; + x_542 = x_541; } -lean_ctor_set(x_548, 0, x_545); -lean_ctor_set(x_548, 1, x_546); -return x_548; -} -else -{ -lean_object* x_549; lean_object* x_550; -lean_dec(x_541); -x_549 = lean_box(0); -x_550 = l_Lean_Elab_Term_CollectPatternVars_collect___lambda__1(x_11, x_10, x_549, x_2, x_379, x_4, x_5, x_6, x_7, x_8, x_27); -return x_550; +lean_ctor_set(x_542, 0, x_539); +lean_ctor_set(x_542, 1, x_540); +return x_542; } } } else { -lean_object* x_551; lean_object* x_552; lean_object* x_553; lean_object* x_554; lean_object* x_555; lean_object* x_556; -lean_free_object(x_25); -if (lean_is_exclusive(x_1)) { - lean_ctor_release(x_1, 0); - lean_ctor_release(x_1, 1); - x_551 = x_1; -} else { - lean_dec_ref(x_1); - x_551 = lean_box(0); +lean_object* x_543; lean_object* x_544; lean_object* x_545; +lean_dec(x_10); +x_543 = lean_unsigned_to_nat(0u); +x_544 = l_Lean_Syntax_getArg(x_1, x_543); +lean_dec(x_1); +x_545 = l_Lean_Elab_Term_CollectPatternVars_collect_processCtor(x_544, x_2, x_461, x_4, x_5, x_6, x_7, x_8, x_448); +return x_545; } -x_552 = l_Lean_instInhabitedSyntax; -x_553 = lean_array_get(x_552, x_11, x_23); -x_554 = l_Lean_Syntax_getArgs(x_553); +} +else +{ +lean_object* x_546; uint8_t x_547; +lean_dec(x_10); +x_546 = l_Lean_Syntax_getArg(x_1, x_22); +x_547 = l_Lean_Syntax_isNone(x_546); +if (x_547 == 0) +{ +lean_object* x_548; lean_object* x_549; lean_object* x_550; uint8_t x_551; +x_548 = lean_unsigned_to_nat(0u); +x_549 = l_Lean_Syntax_getArg(x_546, x_548); +x_550 = l_Lean_Syntax_getArg(x_546, x_22); +x_551 = l_Lean_Syntax_isNone(x_550); +if (x_551 == 0) +{ +lean_object* x_552; lean_object* x_553; lean_object* x_554; uint8_t x_555; +x_552 = l_Lean_Syntax_getArg(x_550, x_548); +lean_inc(x_552); +x_553 = l_Lean_Syntax_getKind(x_552); +x_554 = l_myMacro____x40_Init_Notation___hyg_14874____closed__8; +x_555 = lean_name_eq(x_553, x_554); lean_dec(x_553); -x_555 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__10; -x_556 = l_Array_mapSepElemsM___at_Lean_Elab_Term_CollectPatternVars_collect___spec__2(x_554, x_555, x_2, x_379, x_4, x_5, x_6, x_7, x_8, x_27); -lean_dec(x_554); +if (x_555 == 0) +{ +lean_object* x_556; +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +lean_inc(x_461); +lean_inc(x_2); +x_556 = l_Lean_Elab_Term_CollectPatternVars_collect(x_549, x_2, x_461, x_4, x_5, x_6, x_7, x_8, x_448); if (lean_obj_tag(x_556) == 0) { -lean_object* x_557; lean_object* x_558; lean_object* x_559; lean_object* x_560; lean_object* x_561; lean_object* x_562; lean_object* x_563; lean_object* x_564; +lean_object* x_557; lean_object* x_558; lean_object* x_559; lean_object* x_560; lean_object* x_561; lean_object* x_562; lean_object* x_563; x_557 = lean_ctor_get(x_556, 0); lean_inc(x_557); x_558 = lean_ctor_get(x_556, 1); lean_inc(x_558); -if (lean_is_exclusive(x_556)) { - lean_ctor_release(x_556, 0); - lean_ctor_release(x_556, 1); - x_559 = x_556; -} else { - lean_dec_ref(x_556); - x_559 = lean_box(0); -} -x_560 = l_Lean_nullKind; -if (lean_is_scalar(x_551)) { - x_561 = lean_alloc_ctor(1, 2, 0); -} else { - x_561 = x_551; -} -lean_ctor_set(x_561, 0, x_560); -lean_ctor_set(x_561, 1, x_557); -x_562 = lean_array_set(x_11, x_23, x_561); -x_563 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_563, 0, x_10); -lean_ctor_set(x_563, 1, x_562); -if (lean_is_scalar(x_559)) { - x_564 = lean_alloc_ctor(0, 2, 0); -} else { - x_564 = x_559; -} -lean_ctor_set(x_564, 0, x_563); -lean_ctor_set(x_564, 1, x_558); -return x_564; -} -else +lean_dec(x_556); +x_559 = l_Lean_Syntax_setArg(x_546, x_548, x_557); +x_560 = l_Lean_Syntax_getArg(x_552, x_22); +x_561 = l_Lean_Syntax_getArgs(x_560); +lean_dec(x_560); +x_562 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__10; +x_563 = l_Array_mapSepElemsM___at_Lean_Elab_Term_CollectPatternVars_collect___spec__2(x_561, x_562, x_2, x_461, x_4, x_5, x_6, x_7, x_8, x_558); +lean_dec(x_561); +if (lean_obj_tag(x_563) == 0) { -lean_object* x_565; lean_object* x_566; lean_object* x_567; lean_object* x_568; -lean_dec(x_551); -lean_dec(x_11); -lean_dec(x_10); -x_565 = lean_ctor_get(x_556, 0); +lean_object* x_564; lean_object* x_565; lean_object* x_566; lean_object* x_567; lean_object* x_568; lean_object* x_569; lean_object* x_570; lean_object* x_571; lean_object* x_572; lean_object* x_573; +x_564 = lean_ctor_get(x_563, 0); +lean_inc(x_564); +x_565 = lean_ctor_get(x_563, 1); lean_inc(x_565); -x_566 = lean_ctor_get(x_556, 1); -lean_inc(x_566); +if (lean_is_exclusive(x_563)) { + lean_ctor_release(x_563, 0); + lean_ctor_release(x_563, 1); + x_566 = x_563; +} else { + lean_dec_ref(x_563); + x_566 = lean_box(0); +} +x_567 = l_Lean_nullKind; +x_568 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_568, 0, x_567); +lean_ctor_set(x_568, 1, x_564); +x_569 = l_Lean_Syntax_setArg(x_552, x_22, x_568); +x_570 = l_Lean_Syntax_setArg(x_550, x_548, x_569); +x_571 = l_Lean_Syntax_setArg(x_559, x_22, x_570); +x_572 = l_Lean_Syntax_setArg(x_1, x_22, x_571); +if (lean_is_scalar(x_566)) { + x_573 = lean_alloc_ctor(0, 2, 0); +} else { + x_573 = x_566; +} +lean_ctor_set(x_573, 0, x_572); +lean_ctor_set(x_573, 1, x_565); +return x_573; +} +else +{ +lean_object* x_574; lean_object* x_575; lean_object* x_576; lean_object* x_577; +lean_dec(x_559); +lean_dec(x_552); +lean_dec(x_550); +lean_dec(x_1); +x_574 = lean_ctor_get(x_563, 0); +lean_inc(x_574); +x_575 = lean_ctor_get(x_563, 1); +lean_inc(x_575); +if (lean_is_exclusive(x_563)) { + lean_ctor_release(x_563, 0); + lean_ctor_release(x_563, 1); + x_576 = x_563; +} else { + lean_dec_ref(x_563); + x_576 = lean_box(0); +} +if (lean_is_scalar(x_576)) { + x_577 = lean_alloc_ctor(1, 2, 0); +} else { + x_577 = x_576; +} +lean_ctor_set(x_577, 0, x_574); +lean_ctor_set(x_577, 1, x_575); +return x_577; +} +} +else +{ +lean_object* x_578; lean_object* x_579; lean_object* x_580; lean_object* x_581; +lean_dec(x_552); +lean_dec(x_550); +lean_dec(x_546); +lean_dec(x_461); +lean_dec(x_7); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +lean_dec(x_1); +x_578 = lean_ctor_get(x_556, 0); +lean_inc(x_578); +x_579 = lean_ctor_get(x_556, 1); +lean_inc(x_579); if (lean_is_exclusive(x_556)) { lean_ctor_release(x_556, 0); lean_ctor_release(x_556, 1); - x_567 = x_556; + x_580 = x_556; } else { lean_dec_ref(x_556); - x_567 = lean_box(0); + x_580 = lean_box(0); } -if (lean_is_scalar(x_567)) { - x_568 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_580)) { + x_581 = lean_alloc_ctor(1, 2, 0); } else { - x_568 = x_567; -} -lean_ctor_set(x_568, 0, x_565); -lean_ctor_set(x_568, 1, x_566); -return x_568; + x_581 = x_580; } +lean_ctor_set(x_581, 0, x_578); +lean_ctor_set(x_581, 1, x_579); +return x_581; } } else { -lean_object* x_569; -lean_free_object(x_25); -lean_dec(x_11); -lean_dec(x_10); -x_569 = l_Lean_Elab_Term_CollectPatternVars_collect_processCtorApp(x_1, x_2, x_379, x_4, x_5, x_6, x_7, x_8, x_27); +lean_object* x_582; +lean_dec(x_552); +lean_dec(x_550); +x_582 = l_Lean_Elab_Term_CollectPatternVars_collect(x_549, x_2, x_461, x_4, x_5, x_6, x_7, x_8, x_448); +if (lean_obj_tag(x_582) == 0) +{ +lean_object* x_583; lean_object* x_584; lean_object* x_585; lean_object* x_586; lean_object* x_587; lean_object* x_588; +x_583 = lean_ctor_get(x_582, 0); +lean_inc(x_583); +x_584 = lean_ctor_get(x_582, 1); +lean_inc(x_584); +if (lean_is_exclusive(x_582)) { + lean_ctor_release(x_582, 0); + lean_ctor_release(x_582, 1); + x_585 = x_582; +} else { + lean_dec_ref(x_582); + x_585 = lean_box(0); +} +x_586 = l_Lean_Syntax_setArg(x_546, x_548, x_583); +x_587 = l_Lean_Syntax_setArg(x_1, x_22, x_586); +if (lean_is_scalar(x_585)) { + x_588 = lean_alloc_ctor(0, 2, 0); +} else { + x_588 = x_585; +} +lean_ctor_set(x_588, 0, x_587); +lean_ctor_set(x_588, 1, x_584); +return x_588; +} +else +{ +lean_object* x_589; lean_object* x_590; lean_object* x_591; lean_object* x_592; +lean_dec(x_546); lean_dec(x_1); -return x_569; +x_589 = lean_ctor_get(x_582, 0); +lean_inc(x_589); +x_590 = lean_ctor_get(x_582, 1); +lean_inc(x_590); +if (lean_is_exclusive(x_582)) { + lean_ctor_release(x_582, 0); + lean_ctor_release(x_582, 1); + x_591 = x_582; +} else { + lean_dec_ref(x_582); + x_591 = lean_box(0); +} +if (lean_is_scalar(x_591)) { + x_592 = lean_alloc_ctor(1, 2, 0); +} else { + x_592 = x_591; +} +lean_ctor_set(x_592, 0, x_589); +lean_ctor_set(x_592, 1, x_590); +return x_592; } } } else { -lean_object* x_570; lean_object* x_571; lean_object* x_572; lean_object* x_573; lean_object* x_574; uint8_t x_575; uint8_t x_576; uint8_t x_577; lean_object* x_578; lean_object* x_579; lean_object* x_580; uint8_t x_581; lean_object* x_582; lean_object* x_583; -x_570 = lean_ctor_get(x_25, 1); -lean_inc(x_570); -lean_dec(x_25); -x_571 = lean_ctor_get(x_3, 0); -lean_inc(x_571); -x_572 = lean_ctor_get(x_3, 1); -lean_inc(x_572); -x_573 = lean_ctor_get(x_3, 2); -lean_inc(x_573); -x_574 = lean_ctor_get(x_3, 3); -lean_inc(x_574); -x_575 = lean_ctor_get_uint8(x_3, sizeof(void*)*8); -x_576 = lean_ctor_get_uint8(x_3, sizeof(void*)*8 + 1); -x_577 = lean_ctor_get_uint8(x_3, sizeof(void*)*8 + 2); -x_578 = lean_ctor_get(x_3, 5); -lean_inc(x_578); -x_579 = lean_ctor_get(x_3, 6); -lean_inc(x_579); -x_580 = lean_ctor_get(x_3, 7); -lean_inc(x_580); -x_581 = lean_ctor_get_uint8(x_3, sizeof(void*)*8 + 3); +lean_object* x_593; +lean_dec(x_550); +x_593 = l_Lean_Elab_Term_CollectPatternVars_collect(x_549, x_2, x_461, x_4, x_5, x_6, x_7, x_8, x_448); +if (lean_obj_tag(x_593) == 0) +{ +lean_object* x_594; lean_object* x_595; lean_object* x_596; lean_object* x_597; lean_object* x_598; lean_object* x_599; +x_594 = lean_ctor_get(x_593, 0); +lean_inc(x_594); +x_595 = lean_ctor_get(x_593, 1); +lean_inc(x_595); +if (lean_is_exclusive(x_593)) { + lean_ctor_release(x_593, 0); + lean_ctor_release(x_593, 1); + x_596 = x_593; +} else { + lean_dec_ref(x_593); + x_596 = lean_box(0); +} +x_597 = l_Lean_Syntax_setArg(x_546, x_548, x_594); +x_598 = l_Lean_Syntax_setArg(x_1, x_22, x_597); +if (lean_is_scalar(x_596)) { + x_599 = lean_alloc_ctor(0, 2, 0); +} else { + x_599 = x_596; +} +lean_ctor_set(x_599, 0, x_598); +lean_ctor_set(x_599, 1, x_595); +return x_599; +} +else +{ +lean_object* x_600; lean_object* x_601; lean_object* x_602; lean_object* x_603; +lean_dec(x_546); +lean_dec(x_1); +x_600 = lean_ctor_get(x_593, 0); +lean_inc(x_600); +x_601 = lean_ctor_get(x_593, 1); +lean_inc(x_601); +if (lean_is_exclusive(x_593)) { + lean_ctor_release(x_593, 0); + lean_ctor_release(x_593, 1); + x_602 = x_593; +} else { + lean_dec_ref(x_593); + x_602 = lean_box(0); +} +if (lean_is_scalar(x_602)) { + x_603 = lean_alloc_ctor(1, 2, 0); +} else { + x_603 = x_602; +} +lean_ctor_set(x_603, 0, x_600); +lean_ctor_set(x_603, 1, x_601); +return x_603; +} +} +} +else +{ +lean_object* x_604; +lean_dec(x_546); +lean_dec(x_461); +lean_dec(x_7); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +x_604 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_604, 0, x_1); +lean_ctor_set(x_604, 1, x_448); +return x_604; +} +} +} +else +{ +lean_object* x_605; lean_object* x_606; lean_object* x_607; lean_object* x_608; lean_object* x_609; lean_object* x_610; lean_object* x_611; lean_object* x_612; lean_object* x_613; lean_object* x_614; lean_object* x_615; lean_object* x_616; lean_object* x_617; lean_object* x_618; lean_object* x_619; lean_object* x_620; lean_object* x_621; lean_object* x_622; lean_object* x_623; +lean_dec(x_461); +lean_dec(x_7); +lean_dec(x_10); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_1); +x_605 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_mkMVarSyntax___rarg(x_8, x_448); +x_606 = lean_ctor_get(x_605, 0); +lean_inc(x_606); +x_607 = lean_ctor_get(x_605, 1); +lean_inc(x_607); +lean_dec(x_605); +x_608 = lean_st_ref_get(x_8, x_607); +lean_dec(x_8); +x_609 = lean_ctor_get(x_608, 1); +lean_inc(x_609); +lean_dec(x_608); +x_610 = lean_st_ref_take(x_2, x_609); +x_611 = lean_ctor_get(x_610, 0); +lean_inc(x_611); +x_612 = lean_ctor_get(x_610, 1); +lean_inc(x_612); +lean_dec(x_610); +x_613 = lean_ctor_get(x_611, 0); +lean_inc(x_613); +x_614 = lean_ctor_get(x_611, 1); +lean_inc(x_614); +if (lean_is_exclusive(x_611)) { + lean_ctor_release(x_611, 0); + lean_ctor_release(x_611, 1); + x_615 = x_611; +} else { + lean_dec_ref(x_611); + x_615 = lean_box(0); +} +x_616 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_getMVarSyntaxMVarId(x_606); +x_617 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_617, 0, x_616); +x_618 = lean_array_push(x_614, x_617); +if (lean_is_scalar(x_615)) { + x_619 = lean_alloc_ctor(0, 2, 0); +} else { + x_619 = x_615; +} +lean_ctor_set(x_619, 0, x_613); +lean_ctor_set(x_619, 1, x_618); +x_620 = lean_st_ref_set(x_2, x_619, x_612); +lean_dec(x_2); +x_621 = lean_ctor_get(x_620, 1); +lean_inc(x_621); +if (lean_is_exclusive(x_620)) { + lean_ctor_release(x_620, 0); + lean_ctor_release(x_620, 1); + x_622 = x_620; +} else { + lean_dec_ref(x_620); + x_622 = lean_box(0); +} +if (lean_is_scalar(x_622)) { + x_623 = lean_alloc_ctor(0, 2, 0); +} else { + x_623 = x_622; +} +lean_ctor_set(x_623, 0, x_606); +lean_ctor_set(x_623, 1, x_621); +return x_623; +} +} +else +{ +lean_object* x_624; uint8_t x_625; +lean_dec(x_10); +x_624 = l_Lean_Syntax_getArg(x_1, x_22); +x_625 = l_Lean_Syntax_isNone(x_624); +if (x_625 == 0) +{ +lean_object* x_626; lean_object* x_627; lean_object* x_628; lean_object* x_629; lean_object* x_630; lean_object* x_631; +lean_dec(x_1); +x_626 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__12; +x_627 = l_Lean_throwErrorAt___at___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_processVar___spec__2(x_624, x_626, x_2, x_461, x_4, x_5, x_6, x_7, x_8, x_448); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_461); +lean_dec(x_2); +lean_dec(x_624); +x_628 = lean_ctor_get(x_627, 0); +lean_inc(x_628); +x_629 = lean_ctor_get(x_627, 1); +lean_inc(x_629); +if (lean_is_exclusive(x_627)) { + lean_ctor_release(x_627, 0); + lean_ctor_release(x_627, 1); + x_630 = x_627; +} else { + lean_dec_ref(x_627); + x_630 = lean_box(0); +} +if (lean_is_scalar(x_630)) { + x_631 = lean_alloc_ctor(1, 2, 0); +} else { + x_631 = x_630; +} +lean_ctor_set(x_631, 0, x_628); +lean_ctor_set(x_631, 1, x_629); +return x_631; +} +else +{ +lean_object* x_632; lean_object* x_633; +lean_dec(x_624); +x_632 = lean_box(0); +x_633 = l_Lean_Elab_Term_CollectPatternVars_collect___lambda__1(x_1, x_632, x_2, x_461, x_4, x_5, x_6, x_7, x_8, x_448); +return x_633; +} +} +} +else +{ +lean_object* x_634; lean_object* x_635; lean_object* x_636; lean_object* x_637; +lean_dec(x_10); +x_634 = l_Lean_Syntax_getArg(x_1, x_22); +x_635 = l_Lean_Syntax_getArgs(x_634); +lean_dec(x_634); +x_636 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__10; +x_637 = l_Array_mapSepElemsM___at_Lean_Elab_Term_CollectPatternVars_collect___spec__2(x_635, x_636, x_2, x_461, x_4, x_5, x_6, x_7, x_8, x_448); +lean_dec(x_635); +if (lean_obj_tag(x_637) == 0) +{ +lean_object* x_638; lean_object* x_639; lean_object* x_640; lean_object* x_641; lean_object* x_642; lean_object* x_643; lean_object* x_644; +x_638 = lean_ctor_get(x_637, 0); +lean_inc(x_638); +x_639 = lean_ctor_get(x_637, 1); +lean_inc(x_639); +if (lean_is_exclusive(x_637)) { + lean_ctor_release(x_637, 0); + lean_ctor_release(x_637, 1); + x_640 = x_637; +} else { + lean_dec_ref(x_637); + x_640 = lean_box(0); +} +x_641 = l_Lean_nullKind; +x_642 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_642, 0, x_641); +lean_ctor_set(x_642, 1, x_638); +x_643 = l_Lean_Syntax_setArg(x_1, x_22, x_642); +if (lean_is_scalar(x_640)) { + x_644 = lean_alloc_ctor(0, 2, 0); +} else { + x_644 = x_640; +} +lean_ctor_set(x_644, 0, x_643); +lean_ctor_set(x_644, 1, x_639); +return x_644; +} +else +{ +lean_object* x_645; lean_object* x_646; lean_object* x_647; lean_object* x_648; +lean_dec(x_1); +x_645 = lean_ctor_get(x_637, 0); +lean_inc(x_645); +x_646 = lean_ctor_get(x_637, 1); +lean_inc(x_646); +if (lean_is_exclusive(x_637)) { + lean_ctor_release(x_637, 0); + lean_ctor_release(x_637, 1); + x_647 = x_637; +} else { + lean_dec_ref(x_637); + x_647 = lean_box(0); +} +if (lean_is_scalar(x_647)) { + x_648 = lean_alloc_ctor(1, 2, 0); +} else { + x_648 = x_647; +} +lean_ctor_set(x_648, 0, x_645); +lean_ctor_set(x_648, 1, x_646); +return x_648; +} +} +} +else +{ +lean_object* x_649; +lean_dec(x_10); +x_649 = l_Lean_Elab_Term_CollectPatternVars_collect_processCtorApp(x_1, x_2, x_461, x_4, x_5, x_6, x_7, x_8, x_448); +lean_dec(x_1); +return x_649; +} +} +else +{ +lean_object* x_650; +lean_dec(x_10); +x_650 = l_Lean_Elab_Term_CollectPatternVars_collect_processId(x_1, x_2, x_461, x_4, x_5, x_6, x_7, x_8, x_448); +return x_650; +} +} +} +else +{ +lean_object* x_651; lean_object* x_652; lean_object* x_653; lean_object* x_654; lean_object* x_655; lean_object* x_656; lean_object* x_657; lean_object* x_658; lean_object* x_659; lean_object* x_660; lean_object* x_661; lean_object* x_662; lean_object* x_663; lean_object* x_664; uint8_t x_665; uint8_t x_666; uint8_t x_667; lean_object* x_668; lean_object* x_669; lean_object* x_670; uint8_t x_671; lean_object* x_672; lean_object* x_673; +x_651 = lean_ctor_get(x_18, 0); +x_652 = lean_ctor_get(x_18, 1); +x_653 = lean_ctor_get(x_18, 2); +x_654 = lean_ctor_get(x_18, 3); +lean_inc(x_654); +lean_inc(x_653); +lean_inc(x_652); +lean_inc(x_651); +lean_dec(x_18); +x_655 = lean_unsigned_to_nat(1u); +x_656 = lean_nat_add(x_652, x_655); +x_657 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_657, 0, x_651); +lean_ctor_set(x_657, 1, x_656); +lean_ctor_set(x_657, 2, x_653); +lean_ctor_set(x_657, 3, x_654); +x_658 = lean_st_ref_set(x_8, x_657, x_19); +x_659 = lean_ctor_get(x_658, 1); +lean_inc(x_659); +if (lean_is_exclusive(x_658)) { + lean_ctor_release(x_658, 0); + lean_ctor_release(x_658, 1); + x_660 = x_658; +} else { + lean_dec_ref(x_658); + x_660 = lean_box(0); +} +x_661 = lean_ctor_get(x_3, 0); +lean_inc(x_661); +x_662 = lean_ctor_get(x_3, 1); +lean_inc(x_662); +x_663 = lean_ctor_get(x_3, 2); +lean_inc(x_663); +x_664 = lean_ctor_get(x_3, 3); +lean_inc(x_664); +x_665 = lean_ctor_get_uint8(x_3, sizeof(void*)*8); +x_666 = lean_ctor_get_uint8(x_3, sizeof(void*)*8 + 1); +x_667 = lean_ctor_get_uint8(x_3, sizeof(void*)*8 + 2); +x_668 = lean_ctor_get(x_3, 5); +lean_inc(x_668); +x_669 = lean_ctor_get(x_3, 6); +lean_inc(x_669); +x_670 = lean_ctor_get(x_3, 7); +lean_inc(x_670); +x_671 = lean_ctor_get_uint8(x_3, sizeof(void*)*8 + 3); if (lean_is_exclusive(x_3)) { lean_ctor_release(x_3, 0); lean_ctor_release(x_3, 1); @@ -11717,2112 +12063,1062 @@ if (lean_is_exclusive(x_3)) { lean_ctor_release(x_3, 5); lean_ctor_release(x_3, 6); lean_ctor_release(x_3, 7); - x_582 = x_3; + x_672 = x_3; } else { lean_dec_ref(x_3); - x_582 = lean_box(0); + x_672 = lean_box(0); } -if (lean_is_scalar(x_582)) { - x_583 = lean_alloc_ctor(0, 8, 4); +if (lean_is_scalar(x_672)) { + x_673 = lean_alloc_ctor(0, 8, 4); } else { - x_583 = x_582; + x_673 = x_672; } -lean_ctor_set(x_583, 0, x_571); -lean_ctor_set(x_583, 1, x_572); -lean_ctor_set(x_583, 2, x_573); -lean_ctor_set(x_583, 3, x_574); -lean_ctor_set(x_583, 4, x_22); -lean_ctor_set(x_583, 5, x_578); -lean_ctor_set(x_583, 6, x_579); -lean_ctor_set(x_583, 7, x_580); -lean_ctor_set_uint8(x_583, sizeof(void*)*8, x_575); -lean_ctor_set_uint8(x_583, sizeof(void*)*8 + 1, x_576); -lean_ctor_set_uint8(x_583, sizeof(void*)*8 + 2, x_577); -lean_ctor_set_uint8(x_583, sizeof(void*)*8 + 3, x_581); -if (x_14 == 0) +lean_ctor_set(x_673, 0, x_661); +lean_ctor_set(x_673, 1, x_662); +lean_ctor_set(x_673, 2, x_663); +lean_ctor_set(x_673, 3, x_664); +lean_ctor_set(x_673, 4, x_652); +lean_ctor_set(x_673, 5, x_668); +lean_ctor_set(x_673, 6, x_669); +lean_ctor_set(x_673, 7, x_670); +lean_ctor_set_uint8(x_673, sizeof(void*)*8, x_665); +lean_ctor_set_uint8(x_673, sizeof(void*)*8 + 1, x_666); +lean_ctor_set_uint8(x_673, sizeof(void*)*8 + 2, x_667); +lean_ctor_set_uint8(x_673, sizeof(void*)*8 + 3, x_671); +if (x_17 == 0) { -lean_object* x_584; uint8_t x_585; -x_584 = l_Lean_Parser_Term_anonymousCtor___elambda__1___closed__2; -x_585 = lean_name_eq(x_10, x_584); -if (x_585 == 0) +lean_object* x_674; uint8_t x_675; +x_674 = l_myMacro____x40_Init_Notation___hyg_2278____closed__4; +x_675 = lean_name_eq(x_10, x_674); +if (x_675 == 0) { -lean_object* x_586; uint8_t x_587; -x_586 = l_Std_Range_myMacro____x40_Init_Data_Range___hyg_365____closed__2; -x_587 = lean_name_eq(x_10, x_586); -if (x_587 == 0) +lean_object* x_676; uint8_t x_677; +x_676 = l_Lean_Parser_Term_anonymousCtor___elambda__1___closed__2; +x_677 = lean_name_eq(x_10, x_676); +if (x_677 == 0) { -lean_object* x_588; uint8_t x_589; -x_588 = l_myMacro____x40_Init_Notation___hyg_13954____closed__13; -x_589 = lean_name_eq(x_10, x_588); -if (x_589 == 0) +lean_object* x_678; uint8_t x_679; +x_678 = l_Std_Range_myMacro____x40_Init_Data_Range___hyg_365____closed__2; +x_679 = lean_name_eq(x_10, x_678); +if (x_679 == 0) { -lean_object* x_590; uint8_t x_591; -x_590 = l_myMacro____x40_Init_Notation___hyg_13352____closed__8; -x_591 = lean_name_eq(x_10, x_590); -if (x_591 == 0) +lean_object* x_680; uint8_t x_681; +x_680 = l_myMacro____x40_Init_Notation___hyg_13954____closed__13; +x_681 = lean_name_eq(x_10, x_680); +if (x_681 == 0) { -lean_object* x_592; uint8_t x_593; -lean_dec(x_11); -x_592 = l_Lean_Parser_Term_explicitUniv___elambda__1___closed__2; -x_593 = lean_name_eq(x_10, x_592); -if (x_593 == 0) +lean_object* x_682; uint8_t x_683; +x_682 = l_myMacro____x40_Init_Notation___hyg_13352____closed__8; +x_683 = lean_name_eq(x_10, x_682); +if (x_683 == 0) { -lean_object* x_594; uint8_t x_595; -x_594 = l_Lean_Parser_Term_namedPattern___elambda__1___closed__2; -x_595 = lean_name_eq(x_10, x_594); -if (x_595 == 0) +lean_object* x_684; uint8_t x_685; +x_684 = l_Lean_Parser_Term_explicitUniv___elambda__1___closed__2; +x_685 = lean_name_eq(x_10, x_684); +if (x_685 == 0) { -lean_object* x_596; uint8_t x_597; -x_596 = l_Lean_Parser_Term_inaccessible___elambda__1___closed__2; -x_597 = lean_name_eq(x_10, x_596); -if (x_597 == 0) +lean_object* x_686; uint8_t x_687; +x_686 = l_Lean_Parser_Term_namedPattern___elambda__1___closed__2; +x_687 = lean_name_eq(x_10, x_686); +if (x_687 == 0) { -lean_object* x_598; uint8_t x_599; -x_598 = l_Lean_strLitKind; -x_599 = lean_name_eq(x_10, x_598); -if (x_599 == 0) +lean_object* x_688; uint8_t x_689; +x_688 = l_Lean_Parser_Term_inaccessible___elambda__1___closed__2; +x_689 = lean_name_eq(x_10, x_688); +if (x_689 == 0) { -lean_object* x_600; uint8_t x_601; -x_600 = l_Lean_numLitKind; -x_601 = lean_name_eq(x_10, x_600); -if (x_601 == 0) +lean_object* x_690; uint8_t x_691; +x_690 = l_Lean_strLitKind; +x_691 = lean_name_eq(x_10, x_690); +if (x_691 == 0) { -lean_object* x_602; uint8_t x_603; -x_602 = l_Lean_scientificLitKind; -x_603 = lean_name_eq(x_10, x_602); -if (x_603 == 0) +lean_object* x_692; uint8_t x_693; +x_692 = l_Lean_numLitKind; +x_693 = lean_name_eq(x_10, x_692); +if (x_693 == 0) { -lean_object* x_604; uint8_t x_605; -x_604 = l_Lean_charLitKind; -x_605 = lean_name_eq(x_10, x_604); -if (x_605 == 0) +lean_object* x_694; uint8_t x_695; +x_694 = l_Lean_scientificLitKind; +x_695 = lean_name_eq(x_10, x_694); +if (x_695 == 0) { -lean_object* x_606; uint8_t x_607; -x_606 = l_Lean_Parser_Term_quotedName___elambda__1___closed__2; -x_607 = lean_name_eq(x_10, x_606); -if (x_607 == 0) +lean_object* x_696; uint8_t x_697; +x_696 = l_Lean_charLitKind; +x_697 = lean_name_eq(x_10, x_696); +if (x_697 == 0) { -lean_object* x_608; uint8_t x_609; -x_608 = l_Lean_Parser_Term_doubleQuotedName___elambda__1___closed__2; -x_609 = lean_name_eq(x_10, x_608); -if (x_609 == 0) +lean_object* x_698; uint8_t x_699; +lean_dec(x_660); +x_698 = l_Lean_Parser_Term_quotedName___elambda__1___closed__2; +x_699 = lean_name_eq(x_10, x_698); +if (x_699 == 0) { -lean_object* x_610; uint8_t x_611; +lean_object* x_700; uint8_t x_701; +x_700 = l_Lean_Parser_Term_doubleQuotedName___elambda__1___closed__2; +x_701 = lean_name_eq(x_10, x_700); +if (x_701 == 0) +{ +lean_object* x_702; uint8_t x_703; lean_dec(x_1); -x_610 = l_Lean_choiceKind; -x_611 = lean_name_eq(x_10, x_610); +x_702 = l_Lean_choiceKind; +x_703 = lean_name_eq(x_10, x_702); lean_dec(x_10); -if (x_611 == 0) +if (x_703 == 0) { -lean_object* x_612; -x_612 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_throwInvalidPattern___rarg(x_2, x_583, x_4, x_5, x_6, x_7, x_8, x_570); +lean_object* x_704; +x_704 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_throwInvalidPattern___rarg(x_2, x_673, x_4, x_5, x_6, x_7, x_8, x_659); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); -lean_dec(x_583); -lean_dec(x_2); -return x_612; -} -else -{ -lean_object* x_613; lean_object* x_614; -x_613 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__2; -x_614 = l_Lean_throwError___at___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_finalize___spec__1(x_613, x_2, x_583, x_4, x_5, x_6, x_7, x_8, x_570); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_583); -lean_dec(x_2); -return x_614; -} -} -else -{ -lean_object* x_615; -lean_dec(x_10); -lean_dec(x_2); -x_615 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_doubleQuotedNameToPattern(x_1, x_583, x_4, x_5, x_6, x_7, x_8, x_570); -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_1); -return x_615; -} -} -else -{ -lean_object* x_616; -lean_dec(x_10); -lean_dec(x_2); -x_616 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_quotedNameToPattern(x_1, x_583, x_4, x_5, x_6, x_7, x_8, x_570); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_1); -return x_616; -} -} -else -{ -lean_object* x_617; -lean_dec(x_583); -lean_dec(x_7); -lean_dec(x_10); -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -x_617 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_617, 0, x_1); -lean_ctor_set(x_617, 1, x_570); -return x_617; -} -} -else -{ -lean_object* x_618; -lean_dec(x_583); -lean_dec(x_7); -lean_dec(x_10); -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -x_618 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_618, 0, x_1); -lean_ctor_set(x_618, 1, x_570); -return x_618; -} -} -else -{ -lean_object* x_619; -lean_dec(x_583); -lean_dec(x_7); -lean_dec(x_10); -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -x_619 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_619, 0, x_1); -lean_ctor_set(x_619, 1, x_570); -return x_619; -} -} -else -{ -lean_object* x_620; -lean_dec(x_583); -lean_dec(x_7); -lean_dec(x_10); -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -x_620 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_620, 0, x_1); -lean_ctor_set(x_620, 1, x_570); -return x_620; -} -} -else -{ -lean_object* x_621; -lean_dec(x_583); -lean_dec(x_7); -lean_dec(x_10); -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -x_621 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_621, 0, x_1); -lean_ctor_set(x_621, 1, x_570); -return x_621; -} -} -else -{ -lean_object* x_622; lean_object* x_623; lean_object* x_624; -lean_dec(x_10); -x_622 = lean_unsigned_to_nat(0u); -x_623 = l_Lean_Syntax_getArg(x_1, x_622); -lean_inc(x_7); -lean_inc(x_623); -x_624 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_processVar(x_623, x_2, x_583, x_4, x_5, x_6, x_7, x_8, x_570); -if (lean_obj_tag(x_624) == 0) -{ -lean_object* x_625; lean_object* x_626; lean_object* x_627; lean_object* x_628; lean_object* x_629; -x_625 = lean_ctor_get(x_624, 1); -lean_inc(x_625); -lean_dec(x_624); -x_626 = lean_unsigned_to_nat(2u); -x_627 = l_Lean_Syntax_getArg(x_1, x_626); -if (lean_is_exclusive(x_1)) { - lean_ctor_release(x_1, 0); - lean_ctor_release(x_1, 1); - x_628 = x_1; -} else { - lean_dec_ref(x_1); - x_628 = lean_box(0); -} -lean_inc(x_8); -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_4); -lean_inc(x_583); -x_629 = l_Lean_Elab_Term_CollectPatternVars_collect(x_627, x_2, x_583, x_4, x_5, x_6, x_7, x_8, x_625); -if (lean_obj_tag(x_629) == 0) -{ -lean_object* x_630; lean_object* x_631; lean_object* x_632; lean_object* x_633; lean_object* x_634; lean_object* x_635; lean_object* x_636; lean_object* x_637; lean_object* x_638; lean_object* x_639; lean_object* x_640; lean_object* x_641; lean_object* x_642; lean_object* x_643; lean_object* x_644; lean_object* x_645; lean_object* x_646; lean_object* x_647; lean_object* x_648; lean_object* x_649; lean_object* x_650; lean_object* x_651; lean_object* x_652; lean_object* x_653; lean_object* x_654; lean_object* x_655; -x_630 = lean_ctor_get(x_629, 0); -lean_inc(x_630); -x_631 = lean_ctor_get(x_629, 1); -lean_inc(x_631); -lean_dec(x_629); -x_632 = l_Lean_MonadRef_mkInfoFromRefPos___at_Lean_Elab_Term_CollectPatternVars_collect___spec__1___rarg(x_7, x_8, x_631); -x_633 = lean_ctor_get(x_632, 0); -lean_inc(x_633); -x_634 = lean_ctor_get(x_632, 1); -lean_inc(x_634); -lean_dec(x_632); -x_635 = l_Lean_Elab_Term_getCurrMacroScope(x_583, x_4, x_5, x_6, x_7, x_8, x_634); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_583); -x_636 = lean_ctor_get(x_635, 0); -lean_inc(x_636); -x_637 = lean_ctor_get(x_635, 1); -lean_inc(x_637); -lean_dec(x_635); -x_638 = l_Lean_Elab_Term_getMainModule___rarg(x_8, x_637); -lean_dec(x_8); -x_639 = lean_ctor_get(x_638, 0); -lean_inc(x_639); -x_640 = lean_ctor_get(x_638, 1); -lean_inc(x_640); -if (lean_is_exclusive(x_638)) { - lean_ctor_release(x_638, 0); - lean_ctor_release(x_638, 1); - x_641 = x_638; -} else { - lean_dec_ref(x_638); - x_641 = lean_box(0); -} -x_642 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__6; -x_643 = l_Lean_addMacroScope(x_639, x_642, x_636); -x_644 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__5; -x_645 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__9; -x_646 = lean_alloc_ctor(3, 4, 0); -lean_ctor_set(x_646, 0, x_633); -lean_ctor_set(x_646, 1, x_644); -lean_ctor_set(x_646, 2, x_643); -lean_ctor_set(x_646, 3, x_645); -x_647 = l_Array_empty___closed__1; -x_648 = lean_array_push(x_647, x_646); -x_649 = lean_array_push(x_647, x_623); -x_650 = lean_array_push(x_649, x_630); -x_651 = l_Lean_nullKind___closed__2; -if (lean_is_scalar(x_628)) { - x_652 = lean_alloc_ctor(1, 2, 0); -} else { - x_652 = x_628; -} -lean_ctor_set(x_652, 0, x_651); -lean_ctor_set(x_652, 1, x_650); -x_653 = lean_array_push(x_648, x_652); -x_654 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_654, 0, x_12); -lean_ctor_set(x_654, 1, x_653); -if (lean_is_scalar(x_641)) { - x_655 = lean_alloc_ctor(0, 2, 0); -} else { - x_655 = x_641; -} -lean_ctor_set(x_655, 0, x_654); -lean_ctor_set(x_655, 1, x_640); -return x_655; -} -else -{ -lean_object* x_656; lean_object* x_657; lean_object* x_658; lean_object* x_659; -lean_dec(x_628); -lean_dec(x_623); -lean_dec(x_583); -lean_dec(x_7); -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -x_656 = lean_ctor_get(x_629, 0); -lean_inc(x_656); -x_657 = lean_ctor_get(x_629, 1); -lean_inc(x_657); -if (lean_is_exclusive(x_629)) { - lean_ctor_release(x_629, 0); - lean_ctor_release(x_629, 1); - x_658 = x_629; -} else { - lean_dec_ref(x_629); - x_658 = lean_box(0); -} -if (lean_is_scalar(x_658)) { - x_659 = lean_alloc_ctor(1, 2, 0); -} else { - x_659 = x_658; -} -lean_ctor_set(x_659, 0, x_656); -lean_ctor_set(x_659, 1, x_657); -return x_659; -} -} -else -{ -lean_object* x_660; lean_object* x_661; lean_object* x_662; lean_object* x_663; -lean_dec(x_623); -lean_dec(x_583); -lean_dec(x_7); -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -lean_dec(x_1); -x_660 = lean_ctor_get(x_624, 0); -lean_inc(x_660); -x_661 = lean_ctor_get(x_624, 1); -lean_inc(x_661); -if (lean_is_exclusive(x_624)) { - lean_ctor_release(x_624, 0); - lean_ctor_release(x_624, 1); - x_662 = x_624; -} else { - lean_dec_ref(x_624); - x_662 = lean_box(0); -} -if (lean_is_scalar(x_662)) { - x_663 = lean_alloc_ctor(1, 2, 0); -} else { - x_663 = x_662; -} -lean_ctor_set(x_663, 0, x_660); -lean_ctor_set(x_663, 1, x_661); -return x_663; -} -} -} -else -{ -lean_object* x_664; lean_object* x_665; lean_object* x_666; -lean_dec(x_10); -x_664 = lean_unsigned_to_nat(0u); -x_665 = l_Lean_Syntax_getArg(x_1, x_664); -lean_dec(x_1); -x_666 = l_Lean_Elab_Term_CollectPatternVars_collect_processCtor(x_665, x_2, x_583, x_4, x_5, x_6, x_7, x_8, x_570); -return x_666; -} -} -else -{ -lean_object* x_667; lean_object* x_668; uint8_t x_669; -x_667 = l_Lean_instInhabitedSyntax; -x_668 = lean_array_get(x_667, x_11, x_23); -x_669 = l_Lean_Syntax_isNone(x_668); -if (x_669 == 0) -{ -lean_object* x_670; lean_object* x_671; lean_object* x_672; lean_object* x_673; uint8_t x_674; -if (lean_is_exclusive(x_1)) { - lean_ctor_release(x_1, 0); - lean_ctor_release(x_1, 1); - x_670 = x_1; -} else { - lean_dec_ref(x_1); - x_670 = lean_box(0); -} -x_671 = lean_unsigned_to_nat(0u); -x_672 = l_Lean_Syntax_getArg(x_668, x_671); -x_673 = l_Lean_Syntax_getArg(x_668, x_23); -x_674 = l_Lean_Syntax_isNone(x_673); -if (x_674 == 0) -{ -lean_object* x_675; lean_object* x_676; lean_object* x_677; uint8_t x_678; -x_675 = l_Lean_Syntax_getArg(x_673, x_671); -lean_inc(x_675); -x_676 = l_Lean_Syntax_getKind(x_675); -x_677 = l_myMacro____x40_Init_Notation___hyg_14874____closed__8; -x_678 = lean_name_eq(x_676, x_677); -lean_dec(x_676); -if (x_678 == 0) -{ -lean_object* x_679; -lean_inc(x_8); -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_4); -lean_inc(x_583); -lean_inc(x_2); -x_679 = l_Lean_Elab_Term_CollectPatternVars_collect(x_672, x_2, x_583, x_4, x_5, x_6, x_7, x_8, x_570); -if (lean_obj_tag(x_679) == 0) -{ -lean_object* x_680; lean_object* x_681; lean_object* x_682; lean_object* x_683; lean_object* x_684; lean_object* x_685; lean_object* x_686; -x_680 = lean_ctor_get(x_679, 0); -lean_inc(x_680); -x_681 = lean_ctor_get(x_679, 1); -lean_inc(x_681); -lean_dec(x_679); -x_682 = l_Lean_Syntax_setArg(x_668, x_671, x_680); -x_683 = l_Lean_Syntax_getArg(x_675, x_23); -x_684 = l_Lean_Syntax_getArgs(x_683); -lean_dec(x_683); -x_685 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__10; -x_686 = l_Array_mapSepElemsM___at_Lean_Elab_Term_CollectPatternVars_collect___spec__2(x_684, x_685, x_2, x_583, x_4, x_5, x_6, x_7, x_8, x_681); -lean_dec(x_684); -if (lean_obj_tag(x_686) == 0) -{ -lean_object* x_687; lean_object* x_688; lean_object* x_689; lean_object* x_690; lean_object* x_691; lean_object* x_692; lean_object* x_693; lean_object* x_694; lean_object* x_695; lean_object* x_696; lean_object* x_697; -x_687 = lean_ctor_get(x_686, 0); -lean_inc(x_687); -x_688 = lean_ctor_get(x_686, 1); -lean_inc(x_688); -if (lean_is_exclusive(x_686)) { - lean_ctor_release(x_686, 0); - lean_ctor_release(x_686, 1); - x_689 = x_686; -} else { - lean_dec_ref(x_686); - x_689 = lean_box(0); -} -x_690 = l_Lean_nullKind; -if (lean_is_scalar(x_670)) { - x_691 = lean_alloc_ctor(1, 2, 0); -} else { - x_691 = x_670; -} -lean_ctor_set(x_691, 0, x_690); -lean_ctor_set(x_691, 1, x_687); -x_692 = l_Lean_Syntax_setArg(x_675, x_23, x_691); -x_693 = l_Lean_Syntax_setArg(x_673, x_671, x_692); -x_694 = l_Lean_Syntax_setArg(x_682, x_23, x_693); -x_695 = lean_array_set(x_11, x_23, x_694); -x_696 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_696, 0, x_10); -lean_ctor_set(x_696, 1, x_695); -if (lean_is_scalar(x_689)) { - x_697 = lean_alloc_ctor(0, 2, 0); -} else { - x_697 = x_689; -} -lean_ctor_set(x_697, 0, x_696); -lean_ctor_set(x_697, 1, x_688); -return x_697; -} -else -{ -lean_object* x_698; lean_object* x_699; lean_object* x_700; lean_object* x_701; -lean_dec(x_682); -lean_dec(x_675); lean_dec(x_673); -lean_dec(x_670); -lean_dec(x_11); -lean_dec(x_10); -x_698 = lean_ctor_get(x_686, 0); -lean_inc(x_698); -x_699 = lean_ctor_get(x_686, 1); -lean_inc(x_699); -if (lean_is_exclusive(x_686)) { - lean_ctor_release(x_686, 0); - lean_ctor_release(x_686, 1); - x_700 = x_686; -} else { - lean_dec_ref(x_686); - x_700 = lean_box(0); +lean_dec(x_2); +return x_704; } -if (lean_is_scalar(x_700)) { - x_701 = lean_alloc_ctor(1, 2, 0); -} else { - x_701 = x_700; -} -lean_ctor_set(x_701, 0, x_698); -lean_ctor_set(x_701, 1, x_699); -return x_701; +else +{ +lean_object* x_705; lean_object* x_706; +x_705 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__2; +x_706 = l_Lean_throwError___at___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_finalize___spec__1(x_705, x_2, x_673, x_4, x_5, x_6, x_7, x_8, x_659); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_673); +lean_dec(x_2); +return x_706; } } else { -lean_object* x_702; lean_object* x_703; lean_object* x_704; lean_object* x_705; -lean_dec(x_675); -lean_dec(x_673); -lean_dec(x_670); -lean_dec(x_668); -lean_dec(x_583); +lean_object* x_707; +lean_dec(x_10); +lean_dec(x_2); +x_707 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_doubleQuotedNameToPattern(x_1, x_673, x_4, x_5, x_6, x_7, x_8, x_659); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_1); +return x_707; +} +} +else +{ +lean_object* x_708; +lean_dec(x_10); +lean_dec(x_2); +x_708 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_quotedNameToPattern(x_1, x_673, x_4, x_5, x_6, x_7, x_8, x_659); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_1); +return x_708; +} +} +else +{ +lean_object* x_709; +lean_dec(x_673); lean_dec(x_7); -lean_dec(x_11); lean_dec(x_10); lean_dec(x_8); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); -x_702 = lean_ctor_get(x_679, 0); -lean_inc(x_702); -x_703 = lean_ctor_get(x_679, 1); -lean_inc(x_703); -if (lean_is_exclusive(x_679)) { - lean_ctor_release(x_679, 0); - lean_ctor_release(x_679, 1); - x_704 = x_679; +if (lean_is_scalar(x_660)) { + x_709 = lean_alloc_ctor(0, 2, 0); } else { - lean_dec_ref(x_679); - x_704 = lean_box(0); + x_709 = x_660; } -if (lean_is_scalar(x_704)) { - x_705 = lean_alloc_ctor(1, 2, 0); -} else { - x_705 = x_704; -} -lean_ctor_set(x_705, 0, x_702); -lean_ctor_set(x_705, 1, x_703); -return x_705; +lean_ctor_set(x_709, 0, x_1); +lean_ctor_set(x_709, 1, x_659); +return x_709; } } else { -lean_object* x_706; -lean_dec(x_675); +lean_object* x_710; lean_dec(x_673); -x_706 = l_Lean_Elab_Term_CollectPatternVars_collect(x_672, x_2, x_583, x_4, x_5, x_6, x_7, x_8, x_570); -if (lean_obj_tag(x_706) == 0) +lean_dec(x_7); +lean_dec(x_10); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +if (lean_is_scalar(x_660)) { + x_710 = lean_alloc_ctor(0, 2, 0); +} else { + x_710 = x_660; +} +lean_ctor_set(x_710, 0, x_1); +lean_ctor_set(x_710, 1, x_659); +return x_710; +} +} +else { -lean_object* x_707; lean_object* x_708; lean_object* x_709; lean_object* x_710; lean_object* x_711; lean_object* x_712; lean_object* x_713; -x_707 = lean_ctor_get(x_706, 0); -lean_inc(x_707); -x_708 = lean_ctor_get(x_706, 1); -lean_inc(x_708); -if (lean_is_exclusive(x_706)) { - lean_ctor_release(x_706, 0); - lean_ctor_release(x_706, 1); - x_709 = x_706; +lean_object* x_711; +lean_dec(x_673); +lean_dec(x_7); +lean_dec(x_10); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +if (lean_is_scalar(x_660)) { + x_711 = lean_alloc_ctor(0, 2, 0); } else { - lean_dec_ref(x_706); - x_709 = lean_box(0); + x_711 = x_660; } -x_710 = l_Lean_Syntax_setArg(x_668, x_671, x_707); -x_711 = lean_array_set(x_11, x_23, x_710); -if (lean_is_scalar(x_670)) { - x_712 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_711, 0, x_1); +lean_ctor_set(x_711, 1, x_659); +return x_711; +} +} +else +{ +lean_object* x_712; +lean_dec(x_673); +lean_dec(x_7); +lean_dec(x_10); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +if (lean_is_scalar(x_660)) { + x_712 = lean_alloc_ctor(0, 2, 0); } else { - x_712 = x_670; + x_712 = x_660; } -lean_ctor_set(x_712, 0, x_10); -lean_ctor_set(x_712, 1, x_711); -if (lean_is_scalar(x_709)) { +lean_ctor_set(x_712, 0, x_1); +lean_ctor_set(x_712, 1, x_659); +return x_712; +} +} +else +{ +lean_object* x_713; +lean_dec(x_673); +lean_dec(x_7); +lean_dec(x_10); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +if (lean_is_scalar(x_660)) { x_713 = lean_alloc_ctor(0, 2, 0); } else { - x_713 = x_709; + x_713 = x_660; } -lean_ctor_set(x_713, 0, x_712); -lean_ctor_set(x_713, 1, x_708); +lean_ctor_set(x_713, 0, x_1); +lean_ctor_set(x_713, 1, x_659); return x_713; } +} else { -lean_object* x_714; lean_object* x_715; lean_object* x_716; lean_object* x_717; -lean_dec(x_670); -lean_dec(x_668); -lean_dec(x_11); +lean_object* x_714; lean_object* x_715; lean_object* x_716; +lean_dec(x_660); lean_dec(x_10); -x_714 = lean_ctor_get(x_706, 0); -lean_inc(x_714); -x_715 = lean_ctor_get(x_706, 1); +x_714 = lean_unsigned_to_nat(0u); +x_715 = l_Lean_Syntax_getArg(x_1, x_714); +lean_inc(x_7); lean_inc(x_715); -if (lean_is_exclusive(x_706)) { - lean_ctor_release(x_706, 0); - lean_ctor_release(x_706, 1); - x_716 = x_706; -} else { - lean_dec_ref(x_706); - x_716 = lean_box(0); -} -if (lean_is_scalar(x_716)) { - x_717 = lean_alloc_ctor(1, 2, 0); -} else { - x_717 = x_716; -} -lean_ctor_set(x_717, 0, x_714); -lean_ctor_set(x_717, 1, x_715); -return x_717; -} -} -} -else +x_716 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_processVar(x_715, x_2, x_673, x_4, x_5, x_6, x_7, x_8, x_659); +if (lean_obj_tag(x_716) == 0) { -lean_object* x_718; +lean_object* x_717; lean_object* x_718; lean_object* x_719; lean_object* x_720; +x_717 = lean_ctor_get(x_716, 1); +lean_inc(x_717); +lean_dec(x_716); +x_718 = lean_unsigned_to_nat(2u); +x_719 = l_Lean_Syntax_getArg(x_1, x_718); +lean_dec(x_1); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +lean_inc(x_673); +x_720 = l_Lean_Elab_Term_CollectPatternVars_collect(x_719, x_2, x_673, x_4, x_5, x_6, x_7, x_8, x_717); +if (lean_obj_tag(x_720) == 0) +{ +lean_object* x_721; lean_object* x_722; lean_object* x_723; lean_object* x_724; lean_object* x_725; lean_object* x_726; lean_object* x_727; lean_object* x_728; lean_object* x_729; lean_object* x_730; lean_object* x_731; lean_object* x_732; lean_object* x_733; lean_object* x_734; lean_object* x_735; lean_object* x_736; lean_object* x_737; lean_object* x_738; lean_object* x_739; lean_object* x_740; lean_object* x_741; lean_object* x_742; lean_object* x_743; lean_object* x_744; lean_object* x_745; lean_object* x_746; +x_721 = lean_ctor_get(x_720, 0); +lean_inc(x_721); +x_722 = lean_ctor_get(x_720, 1); +lean_inc(x_722); +lean_dec(x_720); +x_723 = l_Lean_MonadRef_mkInfoFromRefPos___at_Lean_Elab_Term_CollectPatternVars_collect___spec__1___rarg(x_7, x_8, x_722); +x_724 = lean_ctor_get(x_723, 0); +lean_inc(x_724); +x_725 = lean_ctor_get(x_723, 1); +lean_inc(x_725); +lean_dec(x_723); +x_726 = l_Lean_Elab_Term_getCurrMacroScope(x_673, x_4, x_5, x_6, x_7, x_8, x_725); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); lean_dec(x_673); -x_718 = l_Lean_Elab_Term_CollectPatternVars_collect(x_672, x_2, x_583, x_4, x_5, x_6, x_7, x_8, x_570); -if (lean_obj_tag(x_718) == 0) -{ -lean_object* x_719; lean_object* x_720; lean_object* x_721; lean_object* x_722; lean_object* x_723; lean_object* x_724; lean_object* x_725; -x_719 = lean_ctor_get(x_718, 0); -lean_inc(x_719); -x_720 = lean_ctor_get(x_718, 1); -lean_inc(x_720); -if (lean_is_exclusive(x_718)) { - lean_ctor_release(x_718, 0); - lean_ctor_release(x_718, 1); - x_721 = x_718; -} else { - lean_dec_ref(x_718); - x_721 = lean_box(0); -} -x_722 = l_Lean_Syntax_setArg(x_668, x_671, x_719); -x_723 = lean_array_set(x_11, x_23, x_722); -if (lean_is_scalar(x_670)) { - x_724 = lean_alloc_ctor(1, 2, 0); -} else { - x_724 = x_670; -} -lean_ctor_set(x_724, 0, x_10); -lean_ctor_set(x_724, 1, x_723); -if (lean_is_scalar(x_721)) { - x_725 = lean_alloc_ctor(0, 2, 0); -} else { - x_725 = x_721; -} -lean_ctor_set(x_725, 0, x_724); -lean_ctor_set(x_725, 1, x_720); -return x_725; -} -else -{ -lean_object* x_726; lean_object* x_727; lean_object* x_728; lean_object* x_729; -lean_dec(x_670); -lean_dec(x_668); -lean_dec(x_11); -lean_dec(x_10); -x_726 = lean_ctor_get(x_718, 0); -lean_inc(x_726); -x_727 = lean_ctor_get(x_718, 1); +x_727 = lean_ctor_get(x_726, 0); lean_inc(x_727); -if (lean_is_exclusive(x_718)) { - lean_ctor_release(x_718, 0); - lean_ctor_release(x_718, 1); - x_728 = x_718; -} else { - lean_dec_ref(x_718); - x_728 = lean_box(0); -} -if (lean_is_scalar(x_728)) { - x_729 = lean_alloc_ctor(1, 2, 0); -} else { - x_729 = x_728; -} -lean_ctor_set(x_729, 0, x_726); -lean_ctor_set(x_729, 1, x_727); -return x_729; -} -} -} -else -{ -lean_object* x_730; -lean_dec(x_668); -lean_dec(x_583); -lean_dec(x_7); -lean_dec(x_11); -lean_dec(x_10); +x_728 = lean_ctor_get(x_726, 1); +lean_inc(x_728); +lean_dec(x_726); +x_729 = l_Lean_Elab_Term_getMainModule___rarg(x_8, x_728); lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -x_730 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_730, 0, x_1); -lean_ctor_set(x_730, 1, x_570); -return x_730; -} -} -} -else -{ -lean_object* x_731; lean_object* x_732; lean_object* x_733; lean_object* x_734; lean_object* x_735; lean_object* x_736; lean_object* x_737; lean_object* x_738; lean_object* x_739; lean_object* x_740; lean_object* x_741; lean_object* x_742; lean_object* x_743; lean_object* x_744; lean_object* x_745; lean_object* x_746; lean_object* x_747; lean_object* x_748; lean_object* x_749; -lean_dec(x_583); -lean_dec(x_7); -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_1); -x_731 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_mkMVarSyntax___rarg(x_8, x_570); -x_732 = lean_ctor_get(x_731, 0); -lean_inc(x_732); -x_733 = lean_ctor_get(x_731, 1); -lean_inc(x_733); -lean_dec(x_731); -x_734 = lean_st_ref_get(x_8, x_733); -lean_dec(x_8); -x_735 = lean_ctor_get(x_734, 1); -lean_inc(x_735); -lean_dec(x_734); -x_736 = lean_st_ref_take(x_2, x_735); -x_737 = lean_ctor_get(x_736, 0); -lean_inc(x_737); -x_738 = lean_ctor_get(x_736, 1); -lean_inc(x_738); -lean_dec(x_736); -x_739 = lean_ctor_get(x_737, 0); -lean_inc(x_739); -x_740 = lean_ctor_get(x_737, 1); -lean_inc(x_740); -if (lean_is_exclusive(x_737)) { - lean_ctor_release(x_737, 0); - lean_ctor_release(x_737, 1); - x_741 = x_737; +x_730 = lean_ctor_get(x_729, 0); +lean_inc(x_730); +x_731 = lean_ctor_get(x_729, 1); +lean_inc(x_731); +if (lean_is_exclusive(x_729)) { + lean_ctor_release(x_729, 0); + lean_ctor_release(x_729, 1); + x_732 = x_729; } else { - lean_dec_ref(x_737); - x_741 = lean_box(0); + lean_dec_ref(x_729); + x_732 = lean_box(0); } -x_742 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_getMVarSyntaxMVarId(x_732); -x_743 = lean_alloc_ctor(1, 1, 0); +x_733 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__6; +x_734 = l_Lean_addMacroScope(x_730, x_733, x_727); +x_735 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__5; +x_736 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__9; +x_737 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_737, 0, x_724); +lean_ctor_set(x_737, 1, x_735); +lean_ctor_set(x_737, 2, x_734); +lean_ctor_set(x_737, 3, x_736); +x_738 = l_Array_empty___closed__1; +x_739 = lean_array_push(x_738, x_737); +x_740 = lean_array_push(x_738, x_715); +x_741 = lean_array_push(x_740, x_721); +x_742 = l_Lean_nullKind___closed__2; +x_743 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_743, 0, x_742); -x_744 = lean_array_push(x_740, x_743); -if (lean_is_scalar(x_741)) { - x_745 = lean_alloc_ctor(0, 2, 0); -} else { - x_745 = x_741; -} -lean_ctor_set(x_745, 0, x_739); +lean_ctor_set(x_743, 1, x_741); +x_744 = lean_array_push(x_739, x_743); +x_745 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_745, 0, x_674); lean_ctor_set(x_745, 1, x_744); -x_746 = lean_st_ref_set(x_2, x_745, x_738); -lean_dec(x_2); -x_747 = lean_ctor_get(x_746, 1); +if (lean_is_scalar(x_732)) { + x_746 = lean_alloc_ctor(0, 2, 0); +} else { + x_746 = x_732; +} +lean_ctor_set(x_746, 0, x_745); +lean_ctor_set(x_746, 1, x_731); +return x_746; +} +else +{ +lean_object* x_747; lean_object* x_748; lean_object* x_749; lean_object* x_750; +lean_dec(x_715); +lean_dec(x_673); +lean_dec(x_7); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +x_747 = lean_ctor_get(x_720, 0); lean_inc(x_747); -if (lean_is_exclusive(x_746)) { - lean_ctor_release(x_746, 0); - lean_ctor_release(x_746, 1); - x_748 = x_746; +x_748 = lean_ctor_get(x_720, 1); +lean_inc(x_748); +if (lean_is_exclusive(x_720)) { + lean_ctor_release(x_720, 0); + lean_ctor_release(x_720, 1); + x_749 = x_720; } else { - lean_dec_ref(x_746); - x_748 = lean_box(0); + lean_dec_ref(x_720); + x_749 = lean_box(0); } -if (lean_is_scalar(x_748)) { - x_749 = lean_alloc_ctor(0, 2, 0); +if (lean_is_scalar(x_749)) { + x_750 = lean_alloc_ctor(1, 2, 0); } else { - x_749 = x_748; + x_750 = x_749; } -lean_ctor_set(x_749, 0, x_732); -lean_ctor_set(x_749, 1, x_747); -return x_749; +lean_ctor_set(x_750, 0, x_747); +lean_ctor_set(x_750, 1, x_748); +return x_750; } } else { -lean_object* x_750; lean_object* x_751; uint8_t x_752; -lean_dec(x_1); -x_750 = l_Lean_instInhabitedSyntax; -x_751 = lean_array_get(x_750, x_11, x_23); -x_752 = l_Lean_Syntax_isNone(x_751); -if (x_752 == 0) -{ -lean_object* x_753; lean_object* x_754; lean_object* x_755; lean_object* x_756; lean_object* x_757; lean_object* x_758; -lean_dec(x_11); -lean_dec(x_10); -x_753 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__12; -x_754 = l_Lean_throwErrorAt___at___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_processVar___spec__2(x_751, x_753, x_2, x_583, x_4, x_5, x_6, x_7, x_8, x_570); +lean_object* x_751; lean_object* x_752; lean_object* x_753; lean_object* x_754; +lean_dec(x_715); +lean_dec(x_673); +lean_dec(x_7); lean_dec(x_8); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); -lean_dec(x_583); lean_dec(x_2); -lean_dec(x_751); -x_755 = lean_ctor_get(x_754, 0); -lean_inc(x_755); -x_756 = lean_ctor_get(x_754, 1); -lean_inc(x_756); -if (lean_is_exclusive(x_754)) { - lean_ctor_release(x_754, 0); - lean_ctor_release(x_754, 1); - x_757 = x_754; +lean_dec(x_1); +x_751 = lean_ctor_get(x_716, 0); +lean_inc(x_751); +x_752 = lean_ctor_get(x_716, 1); +lean_inc(x_752); +if (lean_is_exclusive(x_716)) { + lean_ctor_release(x_716, 0); + lean_ctor_release(x_716, 1); + x_753 = x_716; } else { - lean_dec_ref(x_754); - x_757 = lean_box(0); + lean_dec_ref(x_716); + x_753 = lean_box(0); } -if (lean_is_scalar(x_757)) { - x_758 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_753)) { + x_754 = lean_alloc_ctor(1, 2, 0); } else { - x_758 = x_757; + x_754 = x_753; } -lean_ctor_set(x_758, 0, x_755); -lean_ctor_set(x_758, 1, x_756); -return x_758; -} -else -{ -lean_object* x_759; lean_object* x_760; -lean_dec(x_751); -x_759 = lean_box(0); -x_760 = l_Lean_Elab_Term_CollectPatternVars_collect___lambda__1(x_11, x_10, x_759, x_2, x_583, x_4, x_5, x_6, x_7, x_8, x_570); -return x_760; +lean_ctor_set(x_754, 0, x_751); +lean_ctor_set(x_754, 1, x_752); +return x_754; } } } else { -lean_object* x_761; lean_object* x_762; lean_object* x_763; lean_object* x_764; lean_object* x_765; lean_object* x_766; -if (lean_is_exclusive(x_1)) { - lean_ctor_release(x_1, 0); - lean_ctor_release(x_1, 1); - x_761 = x_1; -} else { - lean_dec_ref(x_1); - x_761 = lean_box(0); -} -x_762 = l_Lean_instInhabitedSyntax; -x_763 = lean_array_get(x_762, x_11, x_23); -x_764 = l_Lean_Syntax_getArgs(x_763); -lean_dec(x_763); -x_765 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__10; -x_766 = l_Array_mapSepElemsM___at_Lean_Elab_Term_CollectPatternVars_collect___spec__2(x_764, x_765, x_2, x_583, x_4, x_5, x_6, x_7, x_8, x_570); -lean_dec(x_764); -if (lean_obj_tag(x_766) == 0) -{ -lean_object* x_767; lean_object* x_768; lean_object* x_769; lean_object* x_770; lean_object* x_771; lean_object* x_772; lean_object* x_773; lean_object* x_774; -x_767 = lean_ctor_get(x_766, 0); -lean_inc(x_767); -x_768 = lean_ctor_get(x_766, 1); -lean_inc(x_768); -if (lean_is_exclusive(x_766)) { - lean_ctor_release(x_766, 0); - lean_ctor_release(x_766, 1); - x_769 = x_766; -} else { - lean_dec_ref(x_766); - x_769 = lean_box(0); -} -x_770 = l_Lean_nullKind; -if (lean_is_scalar(x_761)) { - x_771 = lean_alloc_ctor(1, 2, 0); -} else { - x_771 = x_761; -} -lean_ctor_set(x_771, 0, x_770); -lean_ctor_set(x_771, 1, x_767); -x_772 = lean_array_set(x_11, x_23, x_771); -x_773 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_773, 0, x_10); -lean_ctor_set(x_773, 1, x_772); -if (lean_is_scalar(x_769)) { - x_774 = lean_alloc_ctor(0, 2, 0); -} else { - x_774 = x_769; -} -lean_ctor_set(x_774, 0, x_773); -lean_ctor_set(x_774, 1, x_768); -return x_774; -} -else -{ -lean_object* x_775; lean_object* x_776; lean_object* x_777; lean_object* x_778; -lean_dec(x_761); -lean_dec(x_11); +lean_object* x_755; lean_object* x_756; lean_object* x_757; +lean_dec(x_660); lean_dec(x_10); -x_775 = lean_ctor_get(x_766, 0); -lean_inc(x_775); -x_776 = lean_ctor_get(x_766, 1); +x_755 = lean_unsigned_to_nat(0u); +x_756 = l_Lean_Syntax_getArg(x_1, x_755); +lean_dec(x_1); +x_757 = l_Lean_Elab_Term_CollectPatternVars_collect_processCtor(x_756, x_2, x_673, x_4, x_5, x_6, x_7, x_8, x_659); +return x_757; +} +} +else +{ +lean_object* x_758; uint8_t x_759; +lean_dec(x_10); +x_758 = l_Lean_Syntax_getArg(x_1, x_655); +x_759 = l_Lean_Syntax_isNone(x_758); +if (x_759 == 0) +{ +lean_object* x_760; lean_object* x_761; lean_object* x_762; uint8_t x_763; +lean_dec(x_660); +x_760 = lean_unsigned_to_nat(0u); +x_761 = l_Lean_Syntax_getArg(x_758, x_760); +x_762 = l_Lean_Syntax_getArg(x_758, x_655); +x_763 = l_Lean_Syntax_isNone(x_762); +if (x_763 == 0) +{ +lean_object* x_764; lean_object* x_765; lean_object* x_766; uint8_t x_767; +x_764 = l_Lean_Syntax_getArg(x_762, x_760); +lean_inc(x_764); +x_765 = l_Lean_Syntax_getKind(x_764); +x_766 = l_myMacro____x40_Init_Notation___hyg_14874____closed__8; +x_767 = lean_name_eq(x_765, x_766); +lean_dec(x_765); +if (x_767 == 0) +{ +lean_object* x_768; +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +lean_inc(x_673); +lean_inc(x_2); +x_768 = l_Lean_Elab_Term_CollectPatternVars_collect(x_761, x_2, x_673, x_4, x_5, x_6, x_7, x_8, x_659); +if (lean_obj_tag(x_768) == 0) +{ +lean_object* x_769; lean_object* x_770; lean_object* x_771; lean_object* x_772; lean_object* x_773; lean_object* x_774; lean_object* x_775; +x_769 = lean_ctor_get(x_768, 0); +lean_inc(x_769); +x_770 = lean_ctor_get(x_768, 1); +lean_inc(x_770); +lean_dec(x_768); +x_771 = l_Lean_Syntax_setArg(x_758, x_760, x_769); +x_772 = l_Lean_Syntax_getArg(x_764, x_655); +x_773 = l_Lean_Syntax_getArgs(x_772); +lean_dec(x_772); +x_774 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__10; +x_775 = l_Array_mapSepElemsM___at_Lean_Elab_Term_CollectPatternVars_collect___spec__2(x_773, x_774, x_2, x_673, x_4, x_5, x_6, x_7, x_8, x_770); +lean_dec(x_773); +if (lean_obj_tag(x_775) == 0) +{ +lean_object* x_776; lean_object* x_777; lean_object* x_778; lean_object* x_779; lean_object* x_780; lean_object* x_781; lean_object* x_782; lean_object* x_783; lean_object* x_784; lean_object* x_785; +x_776 = lean_ctor_get(x_775, 0); lean_inc(x_776); -if (lean_is_exclusive(x_766)) { - lean_ctor_release(x_766, 0); - lean_ctor_release(x_766, 1); - x_777 = x_766; +x_777 = lean_ctor_get(x_775, 1); +lean_inc(x_777); +if (lean_is_exclusive(x_775)) { + lean_ctor_release(x_775, 0); + lean_ctor_release(x_775, 1); + x_778 = x_775; } else { - lean_dec_ref(x_766); - x_777 = lean_box(0); + lean_dec_ref(x_775); + x_778 = lean_box(0); } -if (lean_is_scalar(x_777)) { - x_778 = lean_alloc_ctor(1, 2, 0); +x_779 = l_Lean_nullKind; +x_780 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_780, 0, x_779); +lean_ctor_set(x_780, 1, x_776); +x_781 = l_Lean_Syntax_setArg(x_764, x_655, x_780); +x_782 = l_Lean_Syntax_setArg(x_762, x_760, x_781); +x_783 = l_Lean_Syntax_setArg(x_771, x_655, x_782); +x_784 = l_Lean_Syntax_setArg(x_1, x_655, x_783); +if (lean_is_scalar(x_778)) { + x_785 = lean_alloc_ctor(0, 2, 0); } else { - x_778 = x_777; -} -lean_ctor_set(x_778, 0, x_775); -lean_ctor_set(x_778, 1, x_776); -return x_778; -} + x_785 = x_778; } +lean_ctor_set(x_785, 0, x_784); +lean_ctor_set(x_785, 1, x_777); +return x_785; } else { -lean_object* x_779; -lean_dec(x_11); -lean_dec(x_10); -x_779 = l_Lean_Elab_Term_CollectPatternVars_collect_processCtorApp(x_1, x_2, x_583, x_4, x_5, x_6, x_7, x_8, x_570); +lean_object* x_786; lean_object* x_787; lean_object* x_788; lean_object* x_789; +lean_dec(x_771); +lean_dec(x_764); +lean_dec(x_762); lean_dec(x_1); -return x_779; +x_786 = lean_ctor_get(x_775, 0); +lean_inc(x_786); +x_787 = lean_ctor_get(x_775, 1); +lean_inc(x_787); +if (lean_is_exclusive(x_775)) { + lean_ctor_release(x_775, 0); + lean_ctor_release(x_775, 1); + x_788 = x_775; +} else { + lean_dec_ref(x_775); + x_788 = lean_box(0); } +if (lean_is_scalar(x_788)) { + x_789 = lean_alloc_ctor(1, 2, 0); +} else { + x_789 = x_788; +} +lean_ctor_set(x_789, 0, x_786); +lean_ctor_set(x_789, 1, x_787); +return x_789; } } else { -lean_object* x_780; lean_object* x_781; lean_object* x_782; lean_object* x_783; lean_object* x_784; lean_object* x_785; lean_object* x_786; lean_object* x_787; lean_object* x_788; lean_object* x_789; lean_object* x_790; lean_object* x_791; lean_object* x_792; lean_object* x_793; uint8_t x_794; uint8_t x_795; uint8_t x_796; lean_object* x_797; lean_object* x_798; lean_object* x_799; uint8_t x_800; lean_object* x_801; lean_object* x_802; -x_780 = lean_ctor_get(x_19, 0); -x_781 = lean_ctor_get(x_19, 1); -x_782 = lean_ctor_get(x_19, 2); -x_783 = lean_ctor_get(x_19, 3); -lean_inc(x_783); -lean_inc(x_782); -lean_inc(x_781); -lean_inc(x_780); -lean_dec(x_19); -x_784 = lean_unsigned_to_nat(1u); -x_785 = lean_nat_add(x_781, x_784); -x_786 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_786, 0, x_780); -lean_ctor_set(x_786, 1, x_785); -lean_ctor_set(x_786, 2, x_782); -lean_ctor_set(x_786, 3, x_783); -x_787 = lean_st_ref_set(x_8, x_786, x_20); -x_788 = lean_ctor_get(x_787, 1); -lean_inc(x_788); -if (lean_is_exclusive(x_787)) { - lean_ctor_release(x_787, 0); - lean_ctor_release(x_787, 1); - x_789 = x_787; -} else { - lean_dec_ref(x_787); - x_789 = lean_box(0); -} -x_790 = lean_ctor_get(x_3, 0); +lean_object* x_790; lean_object* x_791; lean_object* x_792; lean_object* x_793; +lean_dec(x_764); +lean_dec(x_762); +lean_dec(x_758); +lean_dec(x_673); +lean_dec(x_7); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +lean_dec(x_1); +x_790 = lean_ctor_get(x_768, 0); lean_inc(x_790); -x_791 = lean_ctor_get(x_3, 1); +x_791 = lean_ctor_get(x_768, 1); lean_inc(x_791); -x_792 = lean_ctor_get(x_3, 2); -lean_inc(x_792); -x_793 = lean_ctor_get(x_3, 3); -lean_inc(x_793); -x_794 = lean_ctor_get_uint8(x_3, sizeof(void*)*8); -x_795 = lean_ctor_get_uint8(x_3, sizeof(void*)*8 + 1); -x_796 = lean_ctor_get_uint8(x_3, sizeof(void*)*8 + 2); -x_797 = lean_ctor_get(x_3, 5); -lean_inc(x_797); -x_798 = lean_ctor_get(x_3, 6); -lean_inc(x_798); -x_799 = lean_ctor_get(x_3, 7); -lean_inc(x_799); -x_800 = lean_ctor_get_uint8(x_3, sizeof(void*)*8 + 3); -if (lean_is_exclusive(x_3)) { - lean_ctor_release(x_3, 0); - lean_ctor_release(x_3, 1); - lean_ctor_release(x_3, 2); - lean_ctor_release(x_3, 3); - lean_ctor_release(x_3, 4); - lean_ctor_release(x_3, 5); - lean_ctor_release(x_3, 6); - lean_ctor_release(x_3, 7); - x_801 = x_3; +if (lean_is_exclusive(x_768)) { + lean_ctor_release(x_768, 0); + lean_ctor_release(x_768, 1); + x_792 = x_768; } else { - lean_dec_ref(x_3); - x_801 = lean_box(0); + lean_dec_ref(x_768); + x_792 = lean_box(0); } -if (lean_is_scalar(x_801)) { - x_802 = lean_alloc_ctor(0, 8, 4); +if (lean_is_scalar(x_792)) { + x_793 = lean_alloc_ctor(1, 2, 0); } else { - x_802 = x_801; + x_793 = x_792; } -lean_ctor_set(x_802, 0, x_790); -lean_ctor_set(x_802, 1, x_791); -lean_ctor_set(x_802, 2, x_792); -lean_ctor_set(x_802, 3, x_793); -lean_ctor_set(x_802, 4, x_781); -lean_ctor_set(x_802, 5, x_797); -lean_ctor_set(x_802, 6, x_798); -lean_ctor_set(x_802, 7, x_799); -lean_ctor_set_uint8(x_802, sizeof(void*)*8, x_794); -lean_ctor_set_uint8(x_802, sizeof(void*)*8 + 1, x_795); -lean_ctor_set_uint8(x_802, sizeof(void*)*8 + 2, x_796); -lean_ctor_set_uint8(x_802, sizeof(void*)*8 + 3, x_800); -if (x_14 == 0) -{ -lean_object* x_803; uint8_t x_804; -x_803 = l_Lean_Parser_Term_anonymousCtor___elambda__1___closed__2; -x_804 = lean_name_eq(x_10, x_803); -if (x_804 == 0) -{ -lean_object* x_805; uint8_t x_806; -x_805 = l_Std_Range_myMacro____x40_Init_Data_Range___hyg_365____closed__2; -x_806 = lean_name_eq(x_10, x_805); -if (x_806 == 0) -{ -lean_object* x_807; uint8_t x_808; -x_807 = l_myMacro____x40_Init_Notation___hyg_13954____closed__13; -x_808 = lean_name_eq(x_10, x_807); -if (x_808 == 0) -{ -lean_object* x_809; uint8_t x_810; -x_809 = l_myMacro____x40_Init_Notation___hyg_13352____closed__8; -x_810 = lean_name_eq(x_10, x_809); -if (x_810 == 0) -{ -lean_object* x_811; uint8_t x_812; -lean_dec(x_11); -x_811 = l_Lean_Parser_Term_explicitUniv___elambda__1___closed__2; -x_812 = lean_name_eq(x_10, x_811); -if (x_812 == 0) -{ -lean_object* x_813; uint8_t x_814; -x_813 = l_Lean_Parser_Term_namedPattern___elambda__1___closed__2; -x_814 = lean_name_eq(x_10, x_813); -if (x_814 == 0) -{ -lean_object* x_815; uint8_t x_816; -x_815 = l_Lean_Parser_Term_inaccessible___elambda__1___closed__2; -x_816 = lean_name_eq(x_10, x_815); -if (x_816 == 0) -{ -lean_object* x_817; uint8_t x_818; -x_817 = l_Lean_strLitKind; -x_818 = lean_name_eq(x_10, x_817); -if (x_818 == 0) -{ -lean_object* x_819; uint8_t x_820; -x_819 = l_Lean_numLitKind; -x_820 = lean_name_eq(x_10, x_819); -if (x_820 == 0) -{ -lean_object* x_821; uint8_t x_822; -x_821 = l_Lean_scientificLitKind; -x_822 = lean_name_eq(x_10, x_821); -if (x_822 == 0) -{ -lean_object* x_823; uint8_t x_824; -x_823 = l_Lean_charLitKind; -x_824 = lean_name_eq(x_10, x_823); -if (x_824 == 0) -{ -lean_object* x_825; uint8_t x_826; -lean_dec(x_789); -x_825 = l_Lean_Parser_Term_quotedName___elambda__1___closed__2; -x_826 = lean_name_eq(x_10, x_825); -if (x_826 == 0) -{ -lean_object* x_827; uint8_t x_828; -x_827 = l_Lean_Parser_Term_doubleQuotedName___elambda__1___closed__2; -x_828 = lean_name_eq(x_10, x_827); -if (x_828 == 0) -{ -lean_object* x_829; uint8_t x_830; -lean_dec(x_1); -x_829 = l_Lean_choiceKind; -x_830 = lean_name_eq(x_10, x_829); -lean_dec(x_10); -if (x_830 == 0) -{ -lean_object* x_831; -x_831 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_throwInvalidPattern___rarg(x_2, x_802, x_4, x_5, x_6, x_7, x_8, x_788); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_802); -lean_dec(x_2); -return x_831; -} -else -{ -lean_object* x_832; lean_object* x_833; -x_832 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__2; -x_833 = l_Lean_throwError___at___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_finalize___spec__1(x_832, x_2, x_802, x_4, x_5, x_6, x_7, x_8, x_788); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_802); -lean_dec(x_2); -return x_833; +lean_ctor_set(x_793, 0, x_790); +lean_ctor_set(x_793, 1, x_791); +return x_793; } } else { -lean_object* x_834; -lean_dec(x_10); -lean_dec(x_2); -x_834 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_doubleQuotedNameToPattern(x_1, x_802, x_4, x_5, x_6, x_7, x_8, x_788); -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); +lean_object* x_794; +lean_dec(x_764); +lean_dec(x_762); +x_794 = l_Lean_Elab_Term_CollectPatternVars_collect(x_761, x_2, x_673, x_4, x_5, x_6, x_7, x_8, x_659); +if (lean_obj_tag(x_794) == 0) +{ +lean_object* x_795; lean_object* x_796; lean_object* x_797; lean_object* x_798; lean_object* x_799; lean_object* x_800; +x_795 = lean_ctor_get(x_794, 0); +lean_inc(x_795); +x_796 = lean_ctor_get(x_794, 1); +lean_inc(x_796); +if (lean_is_exclusive(x_794)) { + lean_ctor_release(x_794, 0); + lean_ctor_release(x_794, 1); + x_797 = x_794; +} else { + lean_dec_ref(x_794); + x_797 = lean_box(0); +} +x_798 = l_Lean_Syntax_setArg(x_758, x_760, x_795); +x_799 = l_Lean_Syntax_setArg(x_1, x_655, x_798); +if (lean_is_scalar(x_797)) { + x_800 = lean_alloc_ctor(0, 2, 0); +} else { + x_800 = x_797; +} +lean_ctor_set(x_800, 0, x_799); +lean_ctor_set(x_800, 1, x_796); +return x_800; +} +else +{ +lean_object* x_801; lean_object* x_802; lean_object* x_803; lean_object* x_804; +lean_dec(x_758); lean_dec(x_1); -return x_834; +x_801 = lean_ctor_get(x_794, 0); +lean_inc(x_801); +x_802 = lean_ctor_get(x_794, 1); +lean_inc(x_802); +if (lean_is_exclusive(x_794)) { + lean_ctor_release(x_794, 0); + lean_ctor_release(x_794, 1); + x_803 = x_794; +} else { + lean_dec_ref(x_794); + x_803 = lean_box(0); +} +if (lean_is_scalar(x_803)) { + x_804 = lean_alloc_ctor(1, 2, 0); +} else { + x_804 = x_803; +} +lean_ctor_set(x_804, 0, x_801); +lean_ctor_set(x_804, 1, x_802); +return x_804; +} } } else { -lean_object* x_835; -lean_dec(x_10); -lean_dec(x_2); -x_835 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_quotedNameToPattern(x_1, x_802, x_4, x_5, x_6, x_7, x_8, x_788); -lean_dec(x_8); +lean_object* x_805; +lean_dec(x_762); +x_805 = l_Lean_Elab_Term_CollectPatternVars_collect(x_761, x_2, x_673, x_4, x_5, x_6, x_7, x_8, x_659); +if (lean_obj_tag(x_805) == 0) +{ +lean_object* x_806; lean_object* x_807; lean_object* x_808; lean_object* x_809; lean_object* x_810; lean_object* x_811; +x_806 = lean_ctor_get(x_805, 0); +lean_inc(x_806); +x_807 = lean_ctor_get(x_805, 1); +lean_inc(x_807); +if (lean_is_exclusive(x_805)) { + lean_ctor_release(x_805, 0); + lean_ctor_release(x_805, 1); + x_808 = x_805; +} else { + lean_dec_ref(x_805); + x_808 = lean_box(0); +} +x_809 = l_Lean_Syntax_setArg(x_758, x_760, x_806); +x_810 = l_Lean_Syntax_setArg(x_1, x_655, x_809); +if (lean_is_scalar(x_808)) { + x_811 = lean_alloc_ctor(0, 2, 0); +} else { + x_811 = x_808; +} +lean_ctor_set(x_811, 0, x_810); +lean_ctor_set(x_811, 1, x_807); +return x_811; +} +else +{ +lean_object* x_812; lean_object* x_813; lean_object* x_814; lean_object* x_815; +lean_dec(x_758); +lean_dec(x_1); +x_812 = lean_ctor_get(x_805, 0); +lean_inc(x_812); +x_813 = lean_ctor_get(x_805, 1); +lean_inc(x_813); +if (lean_is_exclusive(x_805)) { + lean_ctor_release(x_805, 0); + lean_ctor_release(x_805, 1); + x_814 = x_805; +} else { + lean_dec_ref(x_805); + x_814 = lean_box(0); +} +if (lean_is_scalar(x_814)) { + x_815 = lean_alloc_ctor(1, 2, 0); +} else { + x_815 = x_814; +} +lean_ctor_set(x_815, 0, x_812); +lean_ctor_set(x_815, 1, x_813); +return x_815; +} +} +} +else +{ +lean_object* x_816; +lean_dec(x_758); +lean_dec(x_673); lean_dec(x_7); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +if (lean_is_scalar(x_660)) { + x_816 = lean_alloc_ctor(0, 2, 0); +} else { + x_816 = x_660; +} +lean_ctor_set(x_816, 0, x_1); +lean_ctor_set(x_816, 1, x_659); +return x_816; +} +} +} +else +{ +lean_object* x_817; lean_object* x_818; lean_object* x_819; lean_object* x_820; lean_object* x_821; lean_object* x_822; lean_object* x_823; lean_object* x_824; lean_object* x_825; lean_object* x_826; lean_object* x_827; lean_object* x_828; lean_object* x_829; lean_object* x_830; lean_object* x_831; lean_object* x_832; lean_object* x_833; lean_object* x_834; lean_object* x_835; +lean_dec(x_673); +lean_dec(x_660); +lean_dec(x_7); +lean_dec(x_10); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_1); +x_817 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_mkMVarSyntax___rarg(x_8, x_659); +x_818 = lean_ctor_get(x_817, 0); +lean_inc(x_818); +x_819 = lean_ctor_get(x_817, 1); +lean_inc(x_819); +lean_dec(x_817); +x_820 = lean_st_ref_get(x_8, x_819); +lean_dec(x_8); +x_821 = lean_ctor_get(x_820, 1); +lean_inc(x_821); +lean_dec(x_820); +x_822 = lean_st_ref_take(x_2, x_821); +x_823 = lean_ctor_get(x_822, 0); +lean_inc(x_823); +x_824 = lean_ctor_get(x_822, 1); +lean_inc(x_824); +lean_dec(x_822); +x_825 = lean_ctor_get(x_823, 0); +lean_inc(x_825); +x_826 = lean_ctor_get(x_823, 1); +lean_inc(x_826); +if (lean_is_exclusive(x_823)) { + lean_ctor_release(x_823, 0); + lean_ctor_release(x_823, 1); + x_827 = x_823; +} else { + lean_dec_ref(x_823); + x_827 = lean_box(0); +} +x_828 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_getMVarSyntaxMVarId(x_818); +x_829 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_829, 0, x_828); +x_830 = lean_array_push(x_826, x_829); +if (lean_is_scalar(x_827)) { + x_831 = lean_alloc_ctor(0, 2, 0); +} else { + x_831 = x_827; +} +lean_ctor_set(x_831, 0, x_825); +lean_ctor_set(x_831, 1, x_830); +x_832 = lean_st_ref_set(x_2, x_831, x_824); +lean_dec(x_2); +x_833 = lean_ctor_get(x_832, 1); +lean_inc(x_833); +if (lean_is_exclusive(x_832)) { + lean_ctor_release(x_832, 0); + lean_ctor_release(x_832, 1); + x_834 = x_832; +} else { + lean_dec_ref(x_832); + x_834 = lean_box(0); +} +if (lean_is_scalar(x_834)) { + x_835 = lean_alloc_ctor(0, 2, 0); +} else { + x_835 = x_834; +} +lean_ctor_set(x_835, 0, x_818); +lean_ctor_set(x_835, 1, x_833); return x_835; } } else { -lean_object* x_836; -lean_dec(x_802); -lean_dec(x_7); +lean_object* x_836; uint8_t x_837; +lean_dec(x_660); lean_dec(x_10); +x_836 = l_Lean_Syntax_getArg(x_1, x_655); +x_837 = l_Lean_Syntax_isNone(x_836); +if (x_837 == 0) +{ +lean_object* x_838; lean_object* x_839; lean_object* x_840; lean_object* x_841; lean_object* x_842; lean_object* x_843; +lean_dec(x_1); +x_838 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__12; +x_839 = l_Lean_throwErrorAt___at___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_processVar___spec__2(x_836, x_838, x_2, x_673, x_4, x_5, x_6, x_7, x_8, x_659); lean_dec(x_8); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); +lean_dec(x_673); lean_dec(x_2); -if (lean_is_scalar(x_789)) { - x_836 = lean_alloc_ctor(0, 2, 0); +lean_dec(x_836); +x_840 = lean_ctor_get(x_839, 0); +lean_inc(x_840); +x_841 = lean_ctor_get(x_839, 1); +lean_inc(x_841); +if (lean_is_exclusive(x_839)) { + lean_ctor_release(x_839, 0); + lean_ctor_release(x_839, 1); + x_842 = x_839; } else { - x_836 = x_789; + lean_dec_ref(x_839); + x_842 = lean_box(0); +} +if (lean_is_scalar(x_842)) { + x_843 = lean_alloc_ctor(1, 2, 0); +} else { + x_843 = x_842; +} +lean_ctor_set(x_843, 0, x_840); +lean_ctor_set(x_843, 1, x_841); +return x_843; +} +else +{ +lean_object* x_844; lean_object* x_845; +lean_dec(x_836); +x_844 = lean_box(0); +x_845 = l_Lean_Elab_Term_CollectPatternVars_collect___lambda__1(x_1, x_844, x_2, x_673, x_4, x_5, x_6, x_7, x_8, x_659); +return x_845; } -lean_ctor_set(x_836, 0, x_1); -lean_ctor_set(x_836, 1, x_788); -return x_836; } } else { -lean_object* x_837; -lean_dec(x_802); -lean_dec(x_7); +lean_object* x_846; lean_object* x_847; lean_object* x_848; lean_object* x_849; +lean_dec(x_660); lean_dec(x_10); -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -if (lean_is_scalar(x_789)) { - x_837 = lean_alloc_ctor(0, 2, 0); -} else { - x_837 = x_789; -} -lean_ctor_set(x_837, 0, x_1); -lean_ctor_set(x_837, 1, x_788); -return x_837; -} -} -else -{ -lean_object* x_838; -lean_dec(x_802); -lean_dec(x_7); -lean_dec(x_10); -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -if (lean_is_scalar(x_789)) { - x_838 = lean_alloc_ctor(0, 2, 0); -} else { - x_838 = x_789; -} -lean_ctor_set(x_838, 0, x_1); -lean_ctor_set(x_838, 1, x_788); -return x_838; -} -} -else -{ -lean_object* x_839; -lean_dec(x_802); -lean_dec(x_7); -lean_dec(x_10); -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -if (lean_is_scalar(x_789)) { - x_839 = lean_alloc_ctor(0, 2, 0); -} else { - x_839 = x_789; -} -lean_ctor_set(x_839, 0, x_1); -lean_ctor_set(x_839, 1, x_788); -return x_839; -} -} -else -{ -lean_object* x_840; -lean_dec(x_802); -lean_dec(x_7); -lean_dec(x_10); -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -if (lean_is_scalar(x_789)) { - x_840 = lean_alloc_ctor(0, 2, 0); -} else { - x_840 = x_789; -} -lean_ctor_set(x_840, 0, x_1); -lean_ctor_set(x_840, 1, x_788); -return x_840; -} -} -else -{ -lean_object* x_841; lean_object* x_842; lean_object* x_843; -lean_dec(x_789); -lean_dec(x_10); -x_841 = lean_unsigned_to_nat(0u); -x_842 = l_Lean_Syntax_getArg(x_1, x_841); -lean_inc(x_7); -lean_inc(x_842); -x_843 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_processVar(x_842, x_2, x_802, x_4, x_5, x_6, x_7, x_8, x_788); -if (lean_obj_tag(x_843) == 0) -{ -lean_object* x_844; lean_object* x_845; lean_object* x_846; lean_object* x_847; lean_object* x_848; -x_844 = lean_ctor_get(x_843, 1); -lean_inc(x_844); -lean_dec(x_843); -x_845 = lean_unsigned_to_nat(2u); -x_846 = l_Lean_Syntax_getArg(x_1, x_845); -if (lean_is_exclusive(x_1)) { - lean_ctor_release(x_1, 0); - lean_ctor_release(x_1, 1); - x_847 = x_1; -} else { - lean_dec_ref(x_1); - x_847 = lean_box(0); -} -lean_inc(x_8); -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_4); -lean_inc(x_802); -x_848 = l_Lean_Elab_Term_CollectPatternVars_collect(x_846, x_2, x_802, x_4, x_5, x_6, x_7, x_8, x_844); -if (lean_obj_tag(x_848) == 0) -{ -lean_object* x_849; lean_object* x_850; lean_object* x_851; lean_object* x_852; lean_object* x_853; lean_object* x_854; lean_object* x_855; lean_object* x_856; lean_object* x_857; lean_object* x_858; lean_object* x_859; lean_object* x_860; lean_object* x_861; lean_object* x_862; lean_object* x_863; lean_object* x_864; lean_object* x_865; lean_object* x_866; lean_object* x_867; lean_object* x_868; lean_object* x_869; lean_object* x_870; lean_object* x_871; lean_object* x_872; lean_object* x_873; lean_object* x_874; -x_849 = lean_ctor_get(x_848, 0); -lean_inc(x_849); -x_850 = lean_ctor_get(x_848, 1); -lean_inc(x_850); -lean_dec(x_848); -x_851 = l_Lean_MonadRef_mkInfoFromRefPos___at_Lean_Elab_Term_CollectPatternVars_collect___spec__1___rarg(x_7, x_8, x_850); -x_852 = lean_ctor_get(x_851, 0); -lean_inc(x_852); -x_853 = lean_ctor_get(x_851, 1); -lean_inc(x_853); -lean_dec(x_851); -x_854 = l_Lean_Elab_Term_getCurrMacroScope(x_802, x_4, x_5, x_6, x_7, x_8, x_853); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_802); -x_855 = lean_ctor_get(x_854, 0); -lean_inc(x_855); -x_856 = lean_ctor_get(x_854, 1); -lean_inc(x_856); -lean_dec(x_854); -x_857 = l_Lean_Elab_Term_getMainModule___rarg(x_8, x_856); -lean_dec(x_8); -x_858 = lean_ctor_get(x_857, 0); -lean_inc(x_858); -x_859 = lean_ctor_get(x_857, 1); -lean_inc(x_859); -if (lean_is_exclusive(x_857)) { - lean_ctor_release(x_857, 0); - lean_ctor_release(x_857, 1); - x_860 = x_857; -} else { - lean_dec_ref(x_857); - x_860 = lean_box(0); -} -x_861 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__6; -x_862 = l_Lean_addMacroScope(x_858, x_861, x_855); -x_863 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__5; -x_864 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__9; -x_865 = lean_alloc_ctor(3, 4, 0); -lean_ctor_set(x_865, 0, x_852); -lean_ctor_set(x_865, 1, x_863); -lean_ctor_set(x_865, 2, x_862); -lean_ctor_set(x_865, 3, x_864); -x_866 = l_Array_empty___closed__1; -x_867 = lean_array_push(x_866, x_865); -x_868 = lean_array_push(x_866, x_842); -x_869 = lean_array_push(x_868, x_849); -x_870 = l_Lean_nullKind___closed__2; -if (lean_is_scalar(x_847)) { - x_871 = lean_alloc_ctor(1, 2, 0); -} else { - x_871 = x_847; -} -lean_ctor_set(x_871, 0, x_870); -lean_ctor_set(x_871, 1, x_869); -x_872 = lean_array_push(x_867, x_871); -x_873 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_873, 0, x_12); -lean_ctor_set(x_873, 1, x_872); -if (lean_is_scalar(x_860)) { - x_874 = lean_alloc_ctor(0, 2, 0); -} else { - x_874 = x_860; -} -lean_ctor_set(x_874, 0, x_873); -lean_ctor_set(x_874, 1, x_859); -return x_874; -} -else -{ -lean_object* x_875; lean_object* x_876; lean_object* x_877; lean_object* x_878; +x_846 = l_Lean_Syntax_getArg(x_1, x_655); +x_847 = l_Lean_Syntax_getArgs(x_846); +lean_dec(x_846); +x_848 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__10; +x_849 = l_Array_mapSepElemsM___at_Lean_Elab_Term_CollectPatternVars_collect___spec__2(x_847, x_848, x_2, x_673, x_4, x_5, x_6, x_7, x_8, x_659); lean_dec(x_847); -lean_dec(x_842); -lean_dec(x_802); -lean_dec(x_7); -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -x_875 = lean_ctor_get(x_848, 0); -lean_inc(x_875); -x_876 = lean_ctor_get(x_848, 1); +if (lean_obj_tag(x_849) == 0) +{ +lean_object* x_850; lean_object* x_851; lean_object* x_852; lean_object* x_853; lean_object* x_854; lean_object* x_855; lean_object* x_856; +x_850 = lean_ctor_get(x_849, 0); +lean_inc(x_850); +x_851 = lean_ctor_get(x_849, 1); +lean_inc(x_851); +if (lean_is_exclusive(x_849)) { + lean_ctor_release(x_849, 0); + lean_ctor_release(x_849, 1); + x_852 = x_849; +} else { + lean_dec_ref(x_849); + x_852 = lean_box(0); +} +x_853 = l_Lean_nullKind; +x_854 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_854, 0, x_853); +lean_ctor_set(x_854, 1, x_850); +x_855 = l_Lean_Syntax_setArg(x_1, x_655, x_854); +if (lean_is_scalar(x_852)) { + x_856 = lean_alloc_ctor(0, 2, 0); +} else { + x_856 = x_852; +} +lean_ctor_set(x_856, 0, x_855); +lean_ctor_set(x_856, 1, x_851); +return x_856; +} +else +{ +lean_object* x_857; lean_object* x_858; lean_object* x_859; lean_object* x_860; +lean_dec(x_1); +x_857 = lean_ctor_get(x_849, 0); +lean_inc(x_857); +x_858 = lean_ctor_get(x_849, 1); +lean_inc(x_858); +if (lean_is_exclusive(x_849)) { + lean_ctor_release(x_849, 0); + lean_ctor_release(x_849, 1); + x_859 = x_849; +} else { + lean_dec_ref(x_849); + x_859 = lean_box(0); +} +if (lean_is_scalar(x_859)) { + x_860 = lean_alloc_ctor(1, 2, 0); +} else { + x_860 = x_859; +} +lean_ctor_set(x_860, 0, x_857); +lean_ctor_set(x_860, 1, x_858); +return x_860; +} +} +} +else +{ +lean_object* x_861; +lean_dec(x_660); +lean_dec(x_10); +x_861 = l_Lean_Elab_Term_CollectPatternVars_collect_processCtorApp(x_1, x_2, x_673, x_4, x_5, x_6, x_7, x_8, x_659); +lean_dec(x_1); +return x_861; +} +} +else +{ +lean_object* x_862; +lean_dec(x_660); +lean_dec(x_10); +x_862 = l_Lean_Elab_Term_CollectPatternVars_collect_processId(x_1, x_2, x_673, x_4, x_5, x_6, x_7, x_8, x_659); +return x_862; +} +} +} +} +else +{ +lean_object* x_870; lean_object* x_871; lean_object* x_872; lean_object* x_873; lean_object* x_874; lean_object* x_875; lean_object* x_876; lean_object* x_877; lean_object* x_878; lean_object* x_879; lean_object* x_880; uint8_t x_881; lean_object* x_882; lean_object* x_883; +x_870 = lean_ctor_get(x_7, 0); +x_871 = lean_ctor_get(x_7, 1); +x_872 = lean_ctor_get(x_7, 2); +x_873 = lean_ctor_get(x_7, 3); +x_874 = lean_ctor_get(x_7, 4); +x_875 = lean_ctor_get(x_7, 5); +x_876 = lean_ctor_get(x_7, 6); +x_877 = lean_ctor_get(x_7, 7); +lean_inc(x_877); lean_inc(x_876); -if (lean_is_exclusive(x_848)) { - lean_ctor_release(x_848, 0); - lean_ctor_release(x_848, 1); - x_877 = x_848; -} else { - lean_dec_ref(x_848); - x_877 = lean_box(0); -} -if (lean_is_scalar(x_877)) { - x_878 = lean_alloc_ctor(1, 2, 0); -} else { - x_878 = x_877; -} -lean_ctor_set(x_878, 0, x_875); -lean_ctor_set(x_878, 1, x_876); -return x_878; -} -} -else -{ -lean_object* x_879; lean_object* x_880; lean_object* x_881; lean_object* x_882; -lean_dec(x_842); -lean_dec(x_802); +lean_inc(x_875); +lean_inc(x_874); +lean_inc(x_873); +lean_inc(x_872); +lean_inc(x_871); +lean_inc(x_870); lean_dec(x_7); -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -lean_dec(x_1); -x_879 = lean_ctor_get(x_843, 0); -lean_inc(x_879); -x_880 = lean_ctor_get(x_843, 1); -lean_inc(x_880); -if (lean_is_exclusive(x_843)) { - lean_ctor_release(x_843, 0); - lean_ctor_release(x_843, 1); - x_881 = x_843; -} else { - lean_dec_ref(x_843); - x_881 = lean_box(0); -} -if (lean_is_scalar(x_881)) { - x_882 = lean_alloc_ctor(1, 2, 0); -} else { - x_882 = x_881; -} -lean_ctor_set(x_882, 0, x_879); -lean_ctor_set(x_882, 1, x_880); -return x_882; -} -} +x_878 = l_Lean_replaceRef(x_1, x_873); +lean_dec(x_873); +x_879 = lean_alloc_ctor(0, 8, 0); +lean_ctor_set(x_879, 0, x_870); +lean_ctor_set(x_879, 1, x_871); +lean_ctor_set(x_879, 2, x_872); +lean_ctor_set(x_879, 3, x_878); +lean_ctor_set(x_879, 4, x_874); +lean_ctor_set(x_879, 5, x_875); +lean_ctor_set(x_879, 6, x_876); +lean_ctor_set(x_879, 7, x_877); +x_880 = lean_st_ref_take(x_8, x_9); +if (x_12 == 0) +{ +lean_object* x_1098; lean_object* x_1099; uint8_t x_1100; +x_1098 = lean_ctor_get(x_880, 0); +lean_inc(x_1098); +x_1099 = lean_ctor_get(x_880, 1); +lean_inc(x_1099); +lean_dec(x_880); +x_1100 = 0; +x_881 = x_1100; +x_882 = x_1098; +x_883 = x_1099; +goto block_1097; } else { -lean_object* x_883; lean_object* x_884; lean_object* x_885; -lean_dec(x_789); -lean_dec(x_10); -x_883 = lean_unsigned_to_nat(0u); -x_884 = l_Lean_Syntax_getArg(x_1, x_883); -lean_dec(x_1); -x_885 = l_Lean_Elab_Term_CollectPatternVars_collect_processCtor(x_884, x_2, x_802, x_4, x_5, x_6, x_7, x_8, x_788); -return x_885; +lean_object* x_1101; lean_object* x_1102; uint8_t x_1103; +x_1101 = lean_ctor_get(x_880, 0); +lean_inc(x_1101); +x_1102 = lean_ctor_get(x_880, 1); +lean_inc(x_1102); +lean_dec(x_880); +x_1103 = 1; +x_881 = x_1103; +x_882 = x_1101; +x_883 = x_1102; +goto block_1097; } -} -else +block_1097: { -lean_object* x_886; lean_object* x_887; uint8_t x_888; -x_886 = l_Lean_instInhabitedSyntax; -x_887 = lean_array_get(x_886, x_11, x_784); -x_888 = l_Lean_Syntax_isNone(x_887); -if (x_888 == 0) -{ -lean_object* x_889; lean_object* x_890; lean_object* x_891; lean_object* x_892; uint8_t x_893; -lean_dec(x_789); -if (lean_is_exclusive(x_1)) { - lean_ctor_release(x_1, 0); - lean_ctor_release(x_1, 1); - x_889 = x_1; +lean_object* x_884; lean_object* x_885; lean_object* x_886; lean_object* x_887; lean_object* x_888; lean_object* x_889; lean_object* x_890; lean_object* x_891; lean_object* x_892; lean_object* x_893; lean_object* x_894; lean_object* x_895; lean_object* x_896; lean_object* x_897; lean_object* x_898; uint8_t x_899; uint8_t x_900; uint8_t x_901; lean_object* x_902; lean_object* x_903; lean_object* x_904; uint8_t x_905; lean_object* x_906; lean_object* x_907; +x_884 = lean_ctor_get(x_882, 0); +lean_inc(x_884); +x_885 = lean_ctor_get(x_882, 1); +lean_inc(x_885); +x_886 = lean_ctor_get(x_882, 2); +lean_inc(x_886); +x_887 = lean_ctor_get(x_882, 3); +lean_inc(x_887); +if (lean_is_exclusive(x_882)) { + lean_ctor_release(x_882, 0); + lean_ctor_release(x_882, 1); + lean_ctor_release(x_882, 2); + lean_ctor_release(x_882, 3); + x_888 = x_882; } else { - lean_dec_ref(x_1); - x_889 = lean_box(0); + lean_dec_ref(x_882); + x_888 = lean_box(0); } -x_890 = lean_unsigned_to_nat(0u); -x_891 = l_Lean_Syntax_getArg(x_887, x_890); -x_892 = l_Lean_Syntax_getArg(x_887, x_784); -x_893 = l_Lean_Syntax_isNone(x_892); -if (x_893 == 0) -{ -lean_object* x_894; lean_object* x_895; lean_object* x_896; uint8_t x_897; -x_894 = l_Lean_Syntax_getArg(x_892, x_890); -lean_inc(x_894); -x_895 = l_Lean_Syntax_getKind(x_894); -x_896 = l_myMacro____x40_Init_Notation___hyg_14874____closed__8; -x_897 = lean_name_eq(x_895, x_896); -lean_dec(x_895); -if (x_897 == 0) -{ -lean_object* x_898; -lean_inc(x_8); -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_4); -lean_inc(x_802); -lean_inc(x_2); -x_898 = l_Lean_Elab_Term_CollectPatternVars_collect(x_891, x_2, x_802, x_4, x_5, x_6, x_7, x_8, x_788); -if (lean_obj_tag(x_898) == 0) -{ -lean_object* x_899; lean_object* x_900; lean_object* x_901; lean_object* x_902; lean_object* x_903; lean_object* x_904; lean_object* x_905; -x_899 = lean_ctor_get(x_898, 0); -lean_inc(x_899); -x_900 = lean_ctor_get(x_898, 1); -lean_inc(x_900); -lean_dec(x_898); -x_901 = l_Lean_Syntax_setArg(x_887, x_890, x_899); -x_902 = l_Lean_Syntax_getArg(x_894, x_784); -x_903 = l_Lean_Syntax_getArgs(x_902); -lean_dec(x_902); -x_904 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__10; -x_905 = l_Array_mapSepElemsM___at_Lean_Elab_Term_CollectPatternVars_collect___spec__2(x_903, x_904, x_2, x_802, x_4, x_5, x_6, x_7, x_8, x_900); -lean_dec(x_903); -if (lean_obj_tag(x_905) == 0) -{ -lean_object* x_906; lean_object* x_907; lean_object* x_908; lean_object* x_909; lean_object* x_910; lean_object* x_911; lean_object* x_912; lean_object* x_913; lean_object* x_914; lean_object* x_915; lean_object* x_916; -x_906 = lean_ctor_get(x_905, 0); -lean_inc(x_906); -x_907 = lean_ctor_get(x_905, 1); -lean_inc(x_907); -if (lean_is_exclusive(x_905)) { - lean_ctor_release(x_905, 0); - lean_ctor_release(x_905, 1); - x_908 = x_905; +x_889 = lean_unsigned_to_nat(1u); +x_890 = lean_nat_add(x_885, x_889); +if (lean_is_scalar(x_888)) { + x_891 = lean_alloc_ctor(0, 4, 0); } else { - lean_dec_ref(x_905); - x_908 = lean_box(0); + x_891 = x_888; } -x_909 = l_Lean_nullKind; -if (lean_is_scalar(x_889)) { - x_910 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_891, 0, x_884); +lean_ctor_set(x_891, 1, x_890); +lean_ctor_set(x_891, 2, x_886); +lean_ctor_set(x_891, 3, x_887); +x_892 = lean_st_ref_set(x_8, x_891, x_883); +x_893 = lean_ctor_get(x_892, 1); +lean_inc(x_893); +if (lean_is_exclusive(x_892)) { + lean_ctor_release(x_892, 0); + lean_ctor_release(x_892, 1); + x_894 = x_892; } else { - x_910 = x_889; + lean_dec_ref(x_892); + x_894 = lean_box(0); } -lean_ctor_set(x_910, 0, x_909); -lean_ctor_set(x_910, 1, x_906); -x_911 = l_Lean_Syntax_setArg(x_894, x_784, x_910); -x_912 = l_Lean_Syntax_setArg(x_892, x_890, x_911); -x_913 = l_Lean_Syntax_setArg(x_901, x_784, x_912); -x_914 = lean_array_set(x_11, x_784, x_913); -x_915 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_915, 0, x_10); -lean_ctor_set(x_915, 1, x_914); -if (lean_is_scalar(x_908)) { - x_916 = lean_alloc_ctor(0, 2, 0); -} else { - x_916 = x_908; -} -lean_ctor_set(x_916, 0, x_915); -lean_ctor_set(x_916, 1, x_907); -return x_916; -} -else -{ -lean_object* x_917; lean_object* x_918; lean_object* x_919; lean_object* x_920; -lean_dec(x_901); -lean_dec(x_894); -lean_dec(x_892); -lean_dec(x_889); -lean_dec(x_11); -lean_dec(x_10); -x_917 = lean_ctor_get(x_905, 0); -lean_inc(x_917); -x_918 = lean_ctor_get(x_905, 1); -lean_inc(x_918); -if (lean_is_exclusive(x_905)) { - lean_ctor_release(x_905, 0); - lean_ctor_release(x_905, 1); - x_919 = x_905; -} else { - lean_dec_ref(x_905); - x_919 = lean_box(0); -} -if (lean_is_scalar(x_919)) { - x_920 = lean_alloc_ctor(1, 2, 0); -} else { - x_920 = x_919; -} -lean_ctor_set(x_920, 0, x_917); -lean_ctor_set(x_920, 1, x_918); -return x_920; -} -} -else -{ -lean_object* x_921; lean_object* x_922; lean_object* x_923; lean_object* x_924; -lean_dec(x_894); -lean_dec(x_892); -lean_dec(x_889); -lean_dec(x_887); -lean_dec(x_802); -lean_dec(x_7); -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -x_921 = lean_ctor_get(x_898, 0); -lean_inc(x_921); -x_922 = lean_ctor_get(x_898, 1); -lean_inc(x_922); -if (lean_is_exclusive(x_898)) { - lean_ctor_release(x_898, 0); - lean_ctor_release(x_898, 1); - x_923 = x_898; -} else { - lean_dec_ref(x_898); - x_923 = lean_box(0); -} -if (lean_is_scalar(x_923)) { - x_924 = lean_alloc_ctor(1, 2, 0); -} else { - x_924 = x_923; -} -lean_ctor_set(x_924, 0, x_921); -lean_ctor_set(x_924, 1, x_922); -return x_924; -} -} -else -{ -lean_object* x_925; -lean_dec(x_894); -lean_dec(x_892); -x_925 = l_Lean_Elab_Term_CollectPatternVars_collect(x_891, x_2, x_802, x_4, x_5, x_6, x_7, x_8, x_788); -if (lean_obj_tag(x_925) == 0) -{ -lean_object* x_926; lean_object* x_927; lean_object* x_928; lean_object* x_929; lean_object* x_930; lean_object* x_931; lean_object* x_932; -x_926 = lean_ctor_get(x_925, 0); -lean_inc(x_926); -x_927 = lean_ctor_get(x_925, 1); -lean_inc(x_927); -if (lean_is_exclusive(x_925)) { - lean_ctor_release(x_925, 0); - lean_ctor_release(x_925, 1); - x_928 = x_925; -} else { - lean_dec_ref(x_925); - x_928 = lean_box(0); -} -x_929 = l_Lean_Syntax_setArg(x_887, x_890, x_926); -x_930 = lean_array_set(x_11, x_784, x_929); -if (lean_is_scalar(x_889)) { - x_931 = lean_alloc_ctor(1, 2, 0); -} else { - x_931 = x_889; -} -lean_ctor_set(x_931, 0, x_10); -lean_ctor_set(x_931, 1, x_930); -if (lean_is_scalar(x_928)) { - x_932 = lean_alloc_ctor(0, 2, 0); -} else { - x_932 = x_928; -} -lean_ctor_set(x_932, 0, x_931); -lean_ctor_set(x_932, 1, x_927); -return x_932; -} -else -{ -lean_object* x_933; lean_object* x_934; lean_object* x_935; lean_object* x_936; -lean_dec(x_889); -lean_dec(x_887); -lean_dec(x_11); -lean_dec(x_10); -x_933 = lean_ctor_get(x_925, 0); -lean_inc(x_933); -x_934 = lean_ctor_get(x_925, 1); -lean_inc(x_934); -if (lean_is_exclusive(x_925)) { - lean_ctor_release(x_925, 0); - lean_ctor_release(x_925, 1); - x_935 = x_925; -} else { - lean_dec_ref(x_925); - x_935 = lean_box(0); -} -if (lean_is_scalar(x_935)) { - x_936 = lean_alloc_ctor(1, 2, 0); -} else { - x_936 = x_935; -} -lean_ctor_set(x_936, 0, x_933); -lean_ctor_set(x_936, 1, x_934); -return x_936; -} -} -} -else -{ -lean_object* x_937; -lean_dec(x_892); -x_937 = l_Lean_Elab_Term_CollectPatternVars_collect(x_891, x_2, x_802, x_4, x_5, x_6, x_7, x_8, x_788); -if (lean_obj_tag(x_937) == 0) -{ -lean_object* x_938; lean_object* x_939; lean_object* x_940; lean_object* x_941; lean_object* x_942; lean_object* x_943; lean_object* x_944; -x_938 = lean_ctor_get(x_937, 0); -lean_inc(x_938); -x_939 = lean_ctor_get(x_937, 1); -lean_inc(x_939); -if (lean_is_exclusive(x_937)) { - lean_ctor_release(x_937, 0); - lean_ctor_release(x_937, 1); - x_940 = x_937; -} else { - lean_dec_ref(x_937); - x_940 = lean_box(0); -} -x_941 = l_Lean_Syntax_setArg(x_887, x_890, x_938); -x_942 = lean_array_set(x_11, x_784, x_941); -if (lean_is_scalar(x_889)) { - x_943 = lean_alloc_ctor(1, 2, 0); -} else { - x_943 = x_889; -} -lean_ctor_set(x_943, 0, x_10); -lean_ctor_set(x_943, 1, x_942); -if (lean_is_scalar(x_940)) { - x_944 = lean_alloc_ctor(0, 2, 0); -} else { - x_944 = x_940; -} -lean_ctor_set(x_944, 0, x_943); -lean_ctor_set(x_944, 1, x_939); -return x_944; -} -else -{ -lean_object* x_945; lean_object* x_946; lean_object* x_947; lean_object* x_948; -lean_dec(x_889); -lean_dec(x_887); -lean_dec(x_11); -lean_dec(x_10); -x_945 = lean_ctor_get(x_937, 0); -lean_inc(x_945); -x_946 = lean_ctor_get(x_937, 1); -lean_inc(x_946); -if (lean_is_exclusive(x_937)) { - lean_ctor_release(x_937, 0); - lean_ctor_release(x_937, 1); - x_947 = x_937; -} else { - lean_dec_ref(x_937); - x_947 = lean_box(0); -} -if (lean_is_scalar(x_947)) { - x_948 = lean_alloc_ctor(1, 2, 0); -} else { - x_948 = x_947; -} -lean_ctor_set(x_948, 0, x_945); -lean_ctor_set(x_948, 1, x_946); -return x_948; -} -} -} -else -{ -lean_object* x_949; -lean_dec(x_887); -lean_dec(x_802); -lean_dec(x_7); -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -if (lean_is_scalar(x_789)) { - x_949 = lean_alloc_ctor(0, 2, 0); -} else { - x_949 = x_789; -} -lean_ctor_set(x_949, 0, x_1); -lean_ctor_set(x_949, 1, x_788); -return x_949; -} -} -} -else -{ -lean_object* x_950; lean_object* x_951; lean_object* x_952; lean_object* x_953; lean_object* x_954; lean_object* x_955; lean_object* x_956; lean_object* x_957; lean_object* x_958; lean_object* x_959; lean_object* x_960; lean_object* x_961; lean_object* x_962; lean_object* x_963; lean_object* x_964; lean_object* x_965; lean_object* x_966; lean_object* x_967; lean_object* x_968; -lean_dec(x_802); -lean_dec(x_789); -lean_dec(x_7); -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_1); -x_950 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_mkMVarSyntax___rarg(x_8, x_788); -x_951 = lean_ctor_get(x_950, 0); -lean_inc(x_951); -x_952 = lean_ctor_get(x_950, 1); -lean_inc(x_952); -lean_dec(x_950); -x_953 = lean_st_ref_get(x_8, x_952); -lean_dec(x_8); -x_954 = lean_ctor_get(x_953, 1); -lean_inc(x_954); -lean_dec(x_953); -x_955 = lean_st_ref_take(x_2, x_954); -x_956 = lean_ctor_get(x_955, 0); -lean_inc(x_956); -x_957 = lean_ctor_get(x_955, 1); -lean_inc(x_957); -lean_dec(x_955); -x_958 = lean_ctor_get(x_956, 0); -lean_inc(x_958); -x_959 = lean_ctor_get(x_956, 1); -lean_inc(x_959); -if (lean_is_exclusive(x_956)) { - lean_ctor_release(x_956, 0); - lean_ctor_release(x_956, 1); - x_960 = x_956; -} else { - lean_dec_ref(x_956); - x_960 = lean_box(0); -} -x_961 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_getMVarSyntaxMVarId(x_951); -x_962 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_962, 0, x_961); -x_963 = lean_array_push(x_959, x_962); -if (lean_is_scalar(x_960)) { - x_964 = lean_alloc_ctor(0, 2, 0); -} else { - x_964 = x_960; -} -lean_ctor_set(x_964, 0, x_958); -lean_ctor_set(x_964, 1, x_963); -x_965 = lean_st_ref_set(x_2, x_964, x_957); -lean_dec(x_2); -x_966 = lean_ctor_get(x_965, 1); -lean_inc(x_966); -if (lean_is_exclusive(x_965)) { - lean_ctor_release(x_965, 0); - lean_ctor_release(x_965, 1); - x_967 = x_965; -} else { - lean_dec_ref(x_965); - x_967 = lean_box(0); -} -if (lean_is_scalar(x_967)) { - x_968 = lean_alloc_ctor(0, 2, 0); -} else { - x_968 = x_967; -} -lean_ctor_set(x_968, 0, x_951); -lean_ctor_set(x_968, 1, x_966); -return x_968; -} -} -else -{ -lean_object* x_969; lean_object* x_970; uint8_t x_971; -lean_dec(x_789); -lean_dec(x_1); -x_969 = l_Lean_instInhabitedSyntax; -x_970 = lean_array_get(x_969, x_11, x_784); -x_971 = l_Lean_Syntax_isNone(x_970); -if (x_971 == 0) -{ -lean_object* x_972; lean_object* x_973; lean_object* x_974; lean_object* x_975; lean_object* x_976; lean_object* x_977; -lean_dec(x_11); -lean_dec(x_10); -x_972 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__12; -x_973 = l_Lean_throwErrorAt___at___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_processVar___spec__2(x_970, x_972, x_2, x_802, x_4, x_5, x_6, x_7, x_8, x_788); -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_802); -lean_dec(x_2); -lean_dec(x_970); -x_974 = lean_ctor_get(x_973, 0); -lean_inc(x_974); -x_975 = lean_ctor_get(x_973, 1); -lean_inc(x_975); -if (lean_is_exclusive(x_973)) { - lean_ctor_release(x_973, 0); - lean_ctor_release(x_973, 1); - x_976 = x_973; -} else { - lean_dec_ref(x_973); - x_976 = lean_box(0); -} -if (lean_is_scalar(x_976)) { - x_977 = lean_alloc_ctor(1, 2, 0); -} else { - x_977 = x_976; -} -lean_ctor_set(x_977, 0, x_974); -lean_ctor_set(x_977, 1, x_975); -return x_977; -} -else -{ -lean_object* x_978; lean_object* x_979; -lean_dec(x_970); -x_978 = lean_box(0); -x_979 = l_Lean_Elab_Term_CollectPatternVars_collect___lambda__1(x_11, x_10, x_978, x_2, x_802, x_4, x_5, x_6, x_7, x_8, x_788); -return x_979; -} -} -} -else -{ -lean_object* x_980; lean_object* x_981; lean_object* x_982; lean_object* x_983; lean_object* x_984; lean_object* x_985; -lean_dec(x_789); -if (lean_is_exclusive(x_1)) { - lean_ctor_release(x_1, 0); - lean_ctor_release(x_1, 1); - x_980 = x_1; -} else { - lean_dec_ref(x_1); - x_980 = lean_box(0); -} -x_981 = l_Lean_instInhabitedSyntax; -x_982 = lean_array_get(x_981, x_11, x_784); -x_983 = l_Lean_Syntax_getArgs(x_982); -lean_dec(x_982); -x_984 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__10; -x_985 = l_Array_mapSepElemsM___at_Lean_Elab_Term_CollectPatternVars_collect___spec__2(x_983, x_984, x_2, x_802, x_4, x_5, x_6, x_7, x_8, x_788); -lean_dec(x_983); -if (lean_obj_tag(x_985) == 0) -{ -lean_object* x_986; lean_object* x_987; lean_object* x_988; lean_object* x_989; lean_object* x_990; lean_object* x_991; lean_object* x_992; lean_object* x_993; -x_986 = lean_ctor_get(x_985, 0); -lean_inc(x_986); -x_987 = lean_ctor_get(x_985, 1); -lean_inc(x_987); -if (lean_is_exclusive(x_985)) { - lean_ctor_release(x_985, 0); - lean_ctor_release(x_985, 1); - x_988 = x_985; -} else { - lean_dec_ref(x_985); - x_988 = lean_box(0); -} -x_989 = l_Lean_nullKind; -if (lean_is_scalar(x_980)) { - x_990 = lean_alloc_ctor(1, 2, 0); -} else { - x_990 = x_980; -} -lean_ctor_set(x_990, 0, x_989); -lean_ctor_set(x_990, 1, x_986); -x_991 = lean_array_set(x_11, x_784, x_990); -x_992 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_992, 0, x_10); -lean_ctor_set(x_992, 1, x_991); -if (lean_is_scalar(x_988)) { - x_993 = lean_alloc_ctor(0, 2, 0); -} else { - x_993 = x_988; -} -lean_ctor_set(x_993, 0, x_992); -lean_ctor_set(x_993, 1, x_987); -return x_993; -} -else -{ -lean_object* x_994; lean_object* x_995; lean_object* x_996; lean_object* x_997; -lean_dec(x_980); -lean_dec(x_11); -lean_dec(x_10); -x_994 = lean_ctor_get(x_985, 0); -lean_inc(x_994); -x_995 = lean_ctor_get(x_985, 1); -lean_inc(x_995); -if (lean_is_exclusive(x_985)) { - lean_ctor_release(x_985, 0); - lean_ctor_release(x_985, 1); - x_996 = x_985; -} else { - lean_dec_ref(x_985); - x_996 = lean_box(0); -} -if (lean_is_scalar(x_996)) { - x_997 = lean_alloc_ctor(1, 2, 0); -} else { - x_997 = x_996; -} -lean_ctor_set(x_997, 0, x_994); -lean_ctor_set(x_997, 1, x_995); -return x_997; -} -} -} -else -{ -lean_object* x_998; -lean_dec(x_789); -lean_dec(x_11); -lean_dec(x_10); -x_998 = l_Lean_Elab_Term_CollectPatternVars_collect_processCtorApp(x_1, x_2, x_802, x_4, x_5, x_6, x_7, x_8, x_788); -lean_dec(x_1); -return x_998; -} -} -} -else -{ -lean_object* x_999; lean_object* x_1000; lean_object* x_1001; lean_object* x_1002; lean_object* x_1003; lean_object* x_1004; lean_object* x_1005; lean_object* x_1006; lean_object* x_1007; lean_object* x_1008; lean_object* x_1009; lean_object* x_1010; lean_object* x_1011; lean_object* x_1012; lean_object* x_1013; lean_object* x_1014; lean_object* x_1015; lean_object* x_1016; lean_object* x_1017; lean_object* x_1018; lean_object* x_1019; lean_object* x_1020; lean_object* x_1021; lean_object* x_1022; lean_object* x_1023; lean_object* x_1024; lean_object* x_1025; lean_object* x_1026; uint8_t x_1027; uint8_t x_1028; uint8_t x_1029; lean_object* x_1030; lean_object* x_1031; lean_object* x_1032; uint8_t x_1033; lean_object* x_1034; lean_object* x_1035; -x_999 = lean_ctor_get(x_7, 0); -x_1000 = lean_ctor_get(x_7, 1); -x_1001 = lean_ctor_get(x_7, 2); -x_1002 = lean_ctor_get(x_7, 3); -x_1003 = lean_ctor_get(x_7, 4); -x_1004 = lean_ctor_get(x_7, 5); -x_1005 = lean_ctor_get(x_7, 6); -x_1006 = lean_ctor_get(x_7, 7); -lean_inc(x_1006); -lean_inc(x_1005); -lean_inc(x_1004); -lean_inc(x_1003); -lean_inc(x_1002); -lean_inc(x_1001); -lean_inc(x_1000); -lean_inc(x_999); -lean_dec(x_7); -x_1007 = l_Lean_replaceRef(x_1, x_1002); -lean_dec(x_1002); -x_1008 = lean_alloc_ctor(0, 8, 0); -lean_ctor_set(x_1008, 0, x_999); -lean_ctor_set(x_1008, 1, x_1000); -lean_ctor_set(x_1008, 2, x_1001); -lean_ctor_set(x_1008, 3, x_1007); -lean_ctor_set(x_1008, 4, x_1003); -lean_ctor_set(x_1008, 5, x_1004); -lean_ctor_set(x_1008, 6, x_1005); -lean_ctor_set(x_1008, 7, x_1006); -x_1009 = lean_st_ref_take(x_8, x_9); -x_1010 = lean_ctor_get(x_1009, 0); -lean_inc(x_1010); -x_1011 = lean_ctor_get(x_1009, 1); -lean_inc(x_1011); -lean_dec(x_1009); -x_1012 = lean_ctor_get(x_1010, 0); -lean_inc(x_1012); -x_1013 = lean_ctor_get(x_1010, 1); -lean_inc(x_1013); -x_1014 = lean_ctor_get(x_1010, 2); -lean_inc(x_1014); -x_1015 = lean_ctor_get(x_1010, 3); -lean_inc(x_1015); -if (lean_is_exclusive(x_1010)) { - lean_ctor_release(x_1010, 0); - lean_ctor_release(x_1010, 1); - lean_ctor_release(x_1010, 2); - lean_ctor_release(x_1010, 3); - x_1016 = x_1010; -} else { - lean_dec_ref(x_1010); - x_1016 = lean_box(0); -} -x_1017 = lean_unsigned_to_nat(1u); -x_1018 = lean_nat_add(x_1013, x_1017); -if (lean_is_scalar(x_1016)) { - x_1019 = lean_alloc_ctor(0, 4, 0); -} else { - x_1019 = x_1016; -} -lean_ctor_set(x_1019, 0, x_1012); -lean_ctor_set(x_1019, 1, x_1018); -lean_ctor_set(x_1019, 2, x_1014); -lean_ctor_set(x_1019, 3, x_1015); -x_1020 = lean_st_ref_set(x_8, x_1019, x_1011); -x_1021 = lean_ctor_get(x_1020, 1); -lean_inc(x_1021); -if (lean_is_exclusive(x_1020)) { - lean_ctor_release(x_1020, 0); - lean_ctor_release(x_1020, 1); - x_1022 = x_1020; -} else { - lean_dec_ref(x_1020); - x_1022 = lean_box(0); -} -x_1023 = lean_ctor_get(x_3, 0); -lean_inc(x_1023); -x_1024 = lean_ctor_get(x_3, 1); -lean_inc(x_1024); -x_1025 = lean_ctor_get(x_3, 2); -lean_inc(x_1025); -x_1026 = lean_ctor_get(x_3, 3); -lean_inc(x_1026); -x_1027 = lean_ctor_get_uint8(x_3, sizeof(void*)*8); -x_1028 = lean_ctor_get_uint8(x_3, sizeof(void*)*8 + 1); -x_1029 = lean_ctor_get_uint8(x_3, sizeof(void*)*8 + 2); -x_1030 = lean_ctor_get(x_3, 5); -lean_inc(x_1030); -x_1031 = lean_ctor_get(x_3, 6); -lean_inc(x_1031); -x_1032 = lean_ctor_get(x_3, 7); -lean_inc(x_1032); -x_1033 = lean_ctor_get_uint8(x_3, sizeof(void*)*8 + 3); +x_895 = lean_ctor_get(x_3, 0); +lean_inc(x_895); +x_896 = lean_ctor_get(x_3, 1); +lean_inc(x_896); +x_897 = lean_ctor_get(x_3, 2); +lean_inc(x_897); +x_898 = lean_ctor_get(x_3, 3); +lean_inc(x_898); +x_899 = lean_ctor_get_uint8(x_3, sizeof(void*)*8); +x_900 = lean_ctor_get_uint8(x_3, sizeof(void*)*8 + 1); +x_901 = lean_ctor_get_uint8(x_3, sizeof(void*)*8 + 2); +x_902 = lean_ctor_get(x_3, 5); +lean_inc(x_902); +x_903 = lean_ctor_get(x_3, 6); +lean_inc(x_903); +x_904 = lean_ctor_get(x_3, 7); +lean_inc(x_904); +x_905 = lean_ctor_get_uint8(x_3, sizeof(void*)*8 + 3); if (lean_is_exclusive(x_3)) { lean_ctor_release(x_3, 0); lean_ctor_release(x_3, 1); @@ -13832,1020 +13128,939 @@ if (lean_is_exclusive(x_3)) { lean_ctor_release(x_3, 5); lean_ctor_release(x_3, 6); lean_ctor_release(x_3, 7); - x_1034 = x_3; + x_906 = x_3; } else { lean_dec_ref(x_3); - x_1034 = lean_box(0); + x_906 = lean_box(0); } -if (lean_is_scalar(x_1034)) { - x_1035 = lean_alloc_ctor(0, 8, 4); +if (lean_is_scalar(x_906)) { + x_907 = lean_alloc_ctor(0, 8, 4); } else { - x_1035 = x_1034; + x_907 = x_906; } -lean_ctor_set(x_1035, 0, x_1023); -lean_ctor_set(x_1035, 1, x_1024); -lean_ctor_set(x_1035, 2, x_1025); -lean_ctor_set(x_1035, 3, x_1026); -lean_ctor_set(x_1035, 4, x_1013); -lean_ctor_set(x_1035, 5, x_1030); -lean_ctor_set(x_1035, 6, x_1031); -lean_ctor_set(x_1035, 7, x_1032); -lean_ctor_set_uint8(x_1035, sizeof(void*)*8, x_1027); -lean_ctor_set_uint8(x_1035, sizeof(void*)*8 + 1, x_1028); -lean_ctor_set_uint8(x_1035, sizeof(void*)*8 + 2, x_1029); -lean_ctor_set_uint8(x_1035, sizeof(void*)*8 + 3, x_1033); -if (x_14 == 0) +lean_ctor_set(x_907, 0, x_895); +lean_ctor_set(x_907, 1, x_896); +lean_ctor_set(x_907, 2, x_897); +lean_ctor_set(x_907, 3, x_898); +lean_ctor_set(x_907, 4, x_885); +lean_ctor_set(x_907, 5, x_902); +lean_ctor_set(x_907, 6, x_903); +lean_ctor_set(x_907, 7, x_904); +lean_ctor_set_uint8(x_907, sizeof(void*)*8, x_899); +lean_ctor_set_uint8(x_907, sizeof(void*)*8 + 1, x_900); +lean_ctor_set_uint8(x_907, sizeof(void*)*8 + 2, x_901); +lean_ctor_set_uint8(x_907, sizeof(void*)*8 + 3, x_905); +if (x_881 == 0) { -lean_object* x_1036; uint8_t x_1037; -x_1036 = l_Lean_Parser_Term_anonymousCtor___elambda__1___closed__2; -x_1037 = lean_name_eq(x_10, x_1036); -if (x_1037 == 0) +lean_object* x_908; uint8_t x_909; +x_908 = l_myMacro____x40_Init_Notation___hyg_2278____closed__4; +x_909 = lean_name_eq(x_10, x_908); +if (x_909 == 0) { -lean_object* x_1038; uint8_t x_1039; -x_1038 = l_Std_Range_myMacro____x40_Init_Data_Range___hyg_365____closed__2; -x_1039 = lean_name_eq(x_10, x_1038); -if (x_1039 == 0) +lean_object* x_910; uint8_t x_911; +x_910 = l_Lean_Parser_Term_anonymousCtor___elambda__1___closed__2; +x_911 = lean_name_eq(x_10, x_910); +if (x_911 == 0) { -lean_object* x_1040; uint8_t x_1041; -x_1040 = l_myMacro____x40_Init_Notation___hyg_13954____closed__13; -x_1041 = lean_name_eq(x_10, x_1040); -if (x_1041 == 0) +lean_object* x_912; uint8_t x_913; +x_912 = l_Std_Range_myMacro____x40_Init_Data_Range___hyg_365____closed__2; +x_913 = lean_name_eq(x_10, x_912); +if (x_913 == 0) { -lean_object* x_1042; uint8_t x_1043; -x_1042 = l_myMacro____x40_Init_Notation___hyg_13352____closed__8; -x_1043 = lean_name_eq(x_10, x_1042); -if (x_1043 == 0) +lean_object* x_914; uint8_t x_915; +x_914 = l_myMacro____x40_Init_Notation___hyg_13954____closed__13; +x_915 = lean_name_eq(x_10, x_914); +if (x_915 == 0) { -lean_object* x_1044; uint8_t x_1045; -lean_dec(x_11); -x_1044 = l_Lean_Parser_Term_explicitUniv___elambda__1___closed__2; -x_1045 = lean_name_eq(x_10, x_1044); -if (x_1045 == 0) +lean_object* x_916; uint8_t x_917; +x_916 = l_myMacro____x40_Init_Notation___hyg_13352____closed__8; +x_917 = lean_name_eq(x_10, x_916); +if (x_917 == 0) { -lean_object* x_1046; uint8_t x_1047; -x_1046 = l_Lean_Parser_Term_namedPattern___elambda__1___closed__2; -x_1047 = lean_name_eq(x_10, x_1046); -if (x_1047 == 0) +lean_object* x_918; uint8_t x_919; +x_918 = l_Lean_Parser_Term_explicitUniv___elambda__1___closed__2; +x_919 = lean_name_eq(x_10, x_918); +if (x_919 == 0) { -lean_object* x_1048; uint8_t x_1049; -x_1048 = l_Lean_Parser_Term_inaccessible___elambda__1___closed__2; -x_1049 = lean_name_eq(x_10, x_1048); -if (x_1049 == 0) +lean_object* x_920; uint8_t x_921; +x_920 = l_Lean_Parser_Term_namedPattern___elambda__1___closed__2; +x_921 = lean_name_eq(x_10, x_920); +if (x_921 == 0) { -lean_object* x_1050; uint8_t x_1051; -x_1050 = l_Lean_strLitKind; -x_1051 = lean_name_eq(x_10, x_1050); -if (x_1051 == 0) +lean_object* x_922; uint8_t x_923; +x_922 = l_Lean_Parser_Term_inaccessible___elambda__1___closed__2; +x_923 = lean_name_eq(x_10, x_922); +if (x_923 == 0) { -lean_object* x_1052; uint8_t x_1053; -x_1052 = l_Lean_numLitKind; -x_1053 = lean_name_eq(x_10, x_1052); -if (x_1053 == 0) +lean_object* x_924; uint8_t x_925; +x_924 = l_Lean_strLitKind; +x_925 = lean_name_eq(x_10, x_924); +if (x_925 == 0) { -lean_object* x_1054; uint8_t x_1055; -x_1054 = l_Lean_scientificLitKind; -x_1055 = lean_name_eq(x_10, x_1054); -if (x_1055 == 0) +lean_object* x_926; uint8_t x_927; +x_926 = l_Lean_numLitKind; +x_927 = lean_name_eq(x_10, x_926); +if (x_927 == 0) { -lean_object* x_1056; uint8_t x_1057; -x_1056 = l_Lean_charLitKind; -x_1057 = lean_name_eq(x_10, x_1056); -if (x_1057 == 0) +lean_object* x_928; uint8_t x_929; +x_928 = l_Lean_scientificLitKind; +x_929 = lean_name_eq(x_10, x_928); +if (x_929 == 0) { -lean_object* x_1058; uint8_t x_1059; -lean_dec(x_1022); -x_1058 = l_Lean_Parser_Term_quotedName___elambda__1___closed__2; -x_1059 = lean_name_eq(x_10, x_1058); -if (x_1059 == 0) +lean_object* x_930; uint8_t x_931; +x_930 = l_Lean_charLitKind; +x_931 = lean_name_eq(x_10, x_930); +if (x_931 == 0) { -lean_object* x_1060; uint8_t x_1061; -x_1060 = l_Lean_Parser_Term_doubleQuotedName___elambda__1___closed__2; -x_1061 = lean_name_eq(x_10, x_1060); -if (x_1061 == 0) +lean_object* x_932; uint8_t x_933; +lean_dec(x_894); +x_932 = l_Lean_Parser_Term_quotedName___elambda__1___closed__2; +x_933 = lean_name_eq(x_10, x_932); +if (x_933 == 0) { -lean_object* x_1062; uint8_t x_1063; +lean_object* x_934; uint8_t x_935; +x_934 = l_Lean_Parser_Term_doubleQuotedName___elambda__1___closed__2; +x_935 = lean_name_eq(x_10, x_934); +if (x_935 == 0) +{ +lean_object* x_936; uint8_t x_937; lean_dec(x_1); -x_1062 = l_Lean_choiceKind; -x_1063 = lean_name_eq(x_10, x_1062); +x_936 = l_Lean_choiceKind; +x_937 = lean_name_eq(x_10, x_936); lean_dec(x_10); -if (x_1063 == 0) +if (x_937 == 0) { -lean_object* x_1064; -x_1064 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_throwInvalidPattern___rarg(x_2, x_1035, x_4, x_5, x_6, x_1008, x_8, x_1021); +lean_object* x_938; +x_938 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_throwInvalidPattern___rarg(x_2, x_907, x_4, x_5, x_6, x_879, x_8, x_893); lean_dec(x_8); -lean_dec(x_1008); +lean_dec(x_879); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); -lean_dec(x_1035); +lean_dec(x_907); lean_dec(x_2); -return x_1064; +return x_938; } else { -lean_object* x_1065; lean_object* x_1066; -x_1065 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__2; -x_1066 = l_Lean_throwError___at___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_finalize___spec__1(x_1065, x_2, x_1035, x_4, x_5, x_6, x_1008, x_8, x_1021); +lean_object* x_939; lean_object* x_940; +x_939 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__2; +x_940 = l_Lean_throwError___at___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_finalize___spec__1(x_939, x_2, x_907, x_4, x_5, x_6, x_879, x_8, x_893); lean_dec(x_8); -lean_dec(x_1008); +lean_dec(x_879); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); -lean_dec(x_1035); +lean_dec(x_907); lean_dec(x_2); -return x_1066; +return x_940; } } else { -lean_object* x_1067; +lean_object* x_941; lean_dec(x_10); lean_dec(x_2); -x_1067 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_doubleQuotedNameToPattern(x_1, x_1035, x_4, x_5, x_6, x_1008, x_8, x_1021); +x_941 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_doubleQuotedNameToPattern(x_1, x_907, x_4, x_5, x_6, x_879, x_8, x_893); lean_dec(x_8); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_1); -return x_1067; +return x_941; } } else { -lean_object* x_1068; +lean_object* x_942; lean_dec(x_10); lean_dec(x_2); -x_1068 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_quotedNameToPattern(x_1, x_1035, x_4, x_5, x_6, x_1008, x_8, x_1021); +x_942 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_quotedNameToPattern(x_1, x_907, x_4, x_5, x_6, x_879, x_8, x_893); lean_dec(x_8); -lean_dec(x_1008); +lean_dec(x_879); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_1); -return x_1068; +return x_942; } } else { -lean_object* x_1069; -lean_dec(x_1035); -lean_dec(x_1008); +lean_object* x_943; +lean_dec(x_907); +lean_dec(x_879); lean_dec(x_10); lean_dec(x_8); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); +if (lean_is_scalar(x_894)) { + x_943 = lean_alloc_ctor(0, 2, 0); +} else { + x_943 = x_894; +} +lean_ctor_set(x_943, 0, x_1); +lean_ctor_set(x_943, 1, x_893); +return x_943; +} +} +else +{ +lean_object* x_944; +lean_dec(x_907); +lean_dec(x_879); +lean_dec(x_10); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +if (lean_is_scalar(x_894)) { + x_944 = lean_alloc_ctor(0, 2, 0); +} else { + x_944 = x_894; +} +lean_ctor_set(x_944, 0, x_1); +lean_ctor_set(x_944, 1, x_893); +return x_944; +} +} +else +{ +lean_object* x_945; +lean_dec(x_907); +lean_dec(x_879); +lean_dec(x_10); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +if (lean_is_scalar(x_894)) { + x_945 = lean_alloc_ctor(0, 2, 0); +} else { + x_945 = x_894; +} +lean_ctor_set(x_945, 0, x_1); +lean_ctor_set(x_945, 1, x_893); +return x_945; +} +} +else +{ +lean_object* x_946; +lean_dec(x_907); +lean_dec(x_879); +lean_dec(x_10); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +if (lean_is_scalar(x_894)) { + x_946 = lean_alloc_ctor(0, 2, 0); +} else { + x_946 = x_894; +} +lean_ctor_set(x_946, 0, x_1); +lean_ctor_set(x_946, 1, x_893); +return x_946; +} +} +else +{ +lean_object* x_947; +lean_dec(x_907); +lean_dec(x_879); +lean_dec(x_10); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +if (lean_is_scalar(x_894)) { + x_947 = lean_alloc_ctor(0, 2, 0); +} else { + x_947 = x_894; +} +lean_ctor_set(x_947, 0, x_1); +lean_ctor_set(x_947, 1, x_893); +return x_947; +} +} +else +{ +lean_object* x_948; lean_object* x_949; lean_object* x_950; +lean_dec(x_894); +lean_dec(x_10); +x_948 = lean_unsigned_to_nat(0u); +x_949 = l_Lean_Syntax_getArg(x_1, x_948); +lean_inc(x_879); +lean_inc(x_949); +x_950 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_processVar(x_949, x_2, x_907, x_4, x_5, x_6, x_879, x_8, x_893); +if (lean_obj_tag(x_950) == 0) +{ +lean_object* x_951; lean_object* x_952; lean_object* x_953; lean_object* x_954; +x_951 = lean_ctor_get(x_950, 1); +lean_inc(x_951); +lean_dec(x_950); +x_952 = lean_unsigned_to_nat(2u); +x_953 = l_Lean_Syntax_getArg(x_1, x_952); +lean_dec(x_1); +lean_inc(x_8); +lean_inc(x_879); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +lean_inc(x_907); +x_954 = l_Lean_Elab_Term_CollectPatternVars_collect(x_953, x_2, x_907, x_4, x_5, x_6, x_879, x_8, x_951); +if (lean_obj_tag(x_954) == 0) +{ +lean_object* x_955; lean_object* x_956; lean_object* x_957; lean_object* x_958; lean_object* x_959; lean_object* x_960; lean_object* x_961; lean_object* x_962; lean_object* x_963; lean_object* x_964; lean_object* x_965; lean_object* x_966; lean_object* x_967; lean_object* x_968; lean_object* x_969; lean_object* x_970; lean_object* x_971; lean_object* x_972; lean_object* x_973; lean_object* x_974; lean_object* x_975; lean_object* x_976; lean_object* x_977; lean_object* x_978; lean_object* x_979; lean_object* x_980; +x_955 = lean_ctor_get(x_954, 0); +lean_inc(x_955); +x_956 = lean_ctor_get(x_954, 1); +lean_inc(x_956); +lean_dec(x_954); +x_957 = l_Lean_MonadRef_mkInfoFromRefPos___at_Lean_Elab_Term_CollectPatternVars_collect___spec__1___rarg(x_879, x_8, x_956); +x_958 = lean_ctor_get(x_957, 0); +lean_inc(x_958); +x_959 = lean_ctor_get(x_957, 1); +lean_inc(x_959); +lean_dec(x_957); +x_960 = l_Lean_Elab_Term_getCurrMacroScope(x_907, x_4, x_5, x_6, x_879, x_8, x_959); +lean_dec(x_879); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_907); +x_961 = lean_ctor_get(x_960, 0); +lean_inc(x_961); +x_962 = lean_ctor_get(x_960, 1); +lean_inc(x_962); +lean_dec(x_960); +x_963 = l_Lean_Elab_Term_getMainModule___rarg(x_8, x_962); +lean_dec(x_8); +x_964 = lean_ctor_get(x_963, 0); +lean_inc(x_964); +x_965 = lean_ctor_get(x_963, 1); +lean_inc(x_965); +if (lean_is_exclusive(x_963)) { + lean_ctor_release(x_963, 0); + lean_ctor_release(x_963, 1); + x_966 = x_963; +} else { + lean_dec_ref(x_963); + x_966 = lean_box(0); +} +x_967 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__6; +x_968 = l_Lean_addMacroScope(x_964, x_967, x_961); +x_969 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__5; +x_970 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__9; +x_971 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_971, 0, x_958); +lean_ctor_set(x_971, 1, x_969); +lean_ctor_set(x_971, 2, x_968); +lean_ctor_set(x_971, 3, x_970); +x_972 = l_Array_empty___closed__1; +x_973 = lean_array_push(x_972, x_971); +x_974 = lean_array_push(x_972, x_949); +x_975 = lean_array_push(x_974, x_955); +x_976 = l_Lean_nullKind___closed__2; +x_977 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_977, 0, x_976); +lean_ctor_set(x_977, 1, x_975); +x_978 = lean_array_push(x_973, x_977); +x_979 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_979, 0, x_908); +lean_ctor_set(x_979, 1, x_978); +if (lean_is_scalar(x_966)) { + x_980 = lean_alloc_ctor(0, 2, 0); +} else { + x_980 = x_966; +} +lean_ctor_set(x_980, 0, x_979); +lean_ctor_set(x_980, 1, x_965); +return x_980; +} +else +{ +lean_object* x_981; lean_object* x_982; lean_object* x_983; lean_object* x_984; +lean_dec(x_949); +lean_dec(x_907); +lean_dec(x_879); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +x_981 = lean_ctor_get(x_954, 0); +lean_inc(x_981); +x_982 = lean_ctor_get(x_954, 1); +lean_inc(x_982); +if (lean_is_exclusive(x_954)) { + lean_ctor_release(x_954, 0); + lean_ctor_release(x_954, 1); + x_983 = x_954; +} else { + lean_dec_ref(x_954); + x_983 = lean_box(0); +} +if (lean_is_scalar(x_983)) { + x_984 = lean_alloc_ctor(1, 2, 0); +} else { + x_984 = x_983; +} +lean_ctor_set(x_984, 0, x_981); +lean_ctor_set(x_984, 1, x_982); +return x_984; +} +} +else +{ +lean_object* x_985; lean_object* x_986; lean_object* x_987; lean_object* x_988; +lean_dec(x_949); +lean_dec(x_907); +lean_dec(x_879); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +lean_dec(x_1); +x_985 = lean_ctor_get(x_950, 0); +lean_inc(x_985); +x_986 = lean_ctor_get(x_950, 1); +lean_inc(x_986); +if (lean_is_exclusive(x_950)) { + lean_ctor_release(x_950, 0); + lean_ctor_release(x_950, 1); + x_987 = x_950; +} else { + lean_dec_ref(x_950); + x_987 = lean_box(0); +} +if (lean_is_scalar(x_987)) { + x_988 = lean_alloc_ctor(1, 2, 0); +} else { + x_988 = x_987; +} +lean_ctor_set(x_988, 0, x_985); +lean_ctor_set(x_988, 1, x_986); +return x_988; +} +} +} +else +{ +lean_object* x_989; lean_object* x_990; lean_object* x_991; +lean_dec(x_894); +lean_dec(x_10); +x_989 = lean_unsigned_to_nat(0u); +x_990 = l_Lean_Syntax_getArg(x_1, x_989); +lean_dec(x_1); +x_991 = l_Lean_Elab_Term_CollectPatternVars_collect_processCtor(x_990, x_2, x_907, x_4, x_5, x_6, x_879, x_8, x_893); +return x_991; +} +} +else +{ +lean_object* x_992; uint8_t x_993; +lean_dec(x_10); +x_992 = l_Lean_Syntax_getArg(x_1, x_889); +x_993 = l_Lean_Syntax_isNone(x_992); +if (x_993 == 0) +{ +lean_object* x_994; lean_object* x_995; lean_object* x_996; uint8_t x_997; +lean_dec(x_894); +x_994 = lean_unsigned_to_nat(0u); +x_995 = l_Lean_Syntax_getArg(x_992, x_994); +x_996 = l_Lean_Syntax_getArg(x_992, x_889); +x_997 = l_Lean_Syntax_isNone(x_996); +if (x_997 == 0) +{ +lean_object* x_998; lean_object* x_999; lean_object* x_1000; uint8_t x_1001; +x_998 = l_Lean_Syntax_getArg(x_996, x_994); +lean_inc(x_998); +x_999 = l_Lean_Syntax_getKind(x_998); +x_1000 = l_myMacro____x40_Init_Notation___hyg_14874____closed__8; +x_1001 = lean_name_eq(x_999, x_1000); +lean_dec(x_999); +if (x_1001 == 0) +{ +lean_object* x_1002; +lean_inc(x_8); +lean_inc(x_879); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +lean_inc(x_907); +lean_inc(x_2); +x_1002 = l_Lean_Elab_Term_CollectPatternVars_collect(x_995, x_2, x_907, x_4, x_5, x_6, x_879, x_8, x_893); +if (lean_obj_tag(x_1002) == 0) +{ +lean_object* x_1003; lean_object* x_1004; lean_object* x_1005; lean_object* x_1006; lean_object* x_1007; lean_object* x_1008; lean_object* x_1009; +x_1003 = lean_ctor_get(x_1002, 0); +lean_inc(x_1003); +x_1004 = lean_ctor_get(x_1002, 1); +lean_inc(x_1004); +lean_dec(x_1002); +x_1005 = l_Lean_Syntax_setArg(x_992, x_994, x_1003); +x_1006 = l_Lean_Syntax_getArg(x_998, x_889); +x_1007 = l_Lean_Syntax_getArgs(x_1006); +lean_dec(x_1006); +x_1008 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__10; +x_1009 = l_Array_mapSepElemsM___at_Lean_Elab_Term_CollectPatternVars_collect___spec__2(x_1007, x_1008, x_2, x_907, x_4, x_5, x_6, x_879, x_8, x_1004); +lean_dec(x_1007); +if (lean_obj_tag(x_1009) == 0) +{ +lean_object* x_1010; lean_object* x_1011; lean_object* x_1012; lean_object* x_1013; lean_object* x_1014; lean_object* x_1015; lean_object* x_1016; lean_object* x_1017; lean_object* x_1018; lean_object* x_1019; +x_1010 = lean_ctor_get(x_1009, 0); +lean_inc(x_1010); +x_1011 = lean_ctor_get(x_1009, 1); +lean_inc(x_1011); +if (lean_is_exclusive(x_1009)) { + lean_ctor_release(x_1009, 0); + lean_ctor_release(x_1009, 1); + x_1012 = x_1009; +} else { + lean_dec_ref(x_1009); + x_1012 = lean_box(0); +} +x_1013 = l_Lean_nullKind; +x_1014 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1014, 0, x_1013); +lean_ctor_set(x_1014, 1, x_1010); +x_1015 = l_Lean_Syntax_setArg(x_998, x_889, x_1014); +x_1016 = l_Lean_Syntax_setArg(x_996, x_994, x_1015); +x_1017 = l_Lean_Syntax_setArg(x_1005, x_889, x_1016); +x_1018 = l_Lean_Syntax_setArg(x_1, x_889, x_1017); +if (lean_is_scalar(x_1012)) { + x_1019 = lean_alloc_ctor(0, 2, 0); +} else { + x_1019 = x_1012; +} +lean_ctor_set(x_1019, 0, x_1018); +lean_ctor_set(x_1019, 1, x_1011); +return x_1019; +} +else +{ +lean_object* x_1020; lean_object* x_1021; lean_object* x_1022; lean_object* x_1023; +lean_dec(x_1005); +lean_dec(x_998); +lean_dec(x_996); +lean_dec(x_1); +x_1020 = lean_ctor_get(x_1009, 0); +lean_inc(x_1020); +x_1021 = lean_ctor_get(x_1009, 1); +lean_inc(x_1021); +if (lean_is_exclusive(x_1009)) { + lean_ctor_release(x_1009, 0); + lean_ctor_release(x_1009, 1); + x_1022 = x_1009; +} else { + lean_dec_ref(x_1009); + x_1022 = lean_box(0); +} if (lean_is_scalar(x_1022)) { + x_1023 = lean_alloc_ctor(1, 2, 0); +} else { + x_1023 = x_1022; +} +lean_ctor_set(x_1023, 0, x_1020); +lean_ctor_set(x_1023, 1, x_1021); +return x_1023; +} +} +else +{ +lean_object* x_1024; lean_object* x_1025; lean_object* x_1026; lean_object* x_1027; +lean_dec(x_998); +lean_dec(x_996); +lean_dec(x_992); +lean_dec(x_907); +lean_dec(x_879); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +lean_dec(x_1); +x_1024 = lean_ctor_get(x_1002, 0); +lean_inc(x_1024); +x_1025 = lean_ctor_get(x_1002, 1); +lean_inc(x_1025); +if (lean_is_exclusive(x_1002)) { + lean_ctor_release(x_1002, 0); + lean_ctor_release(x_1002, 1); + x_1026 = x_1002; +} else { + lean_dec_ref(x_1002); + x_1026 = lean_box(0); +} +if (lean_is_scalar(x_1026)) { + x_1027 = lean_alloc_ctor(1, 2, 0); +} else { + x_1027 = x_1026; +} +lean_ctor_set(x_1027, 0, x_1024); +lean_ctor_set(x_1027, 1, x_1025); +return x_1027; +} +} +else +{ +lean_object* x_1028; +lean_dec(x_998); +lean_dec(x_996); +x_1028 = l_Lean_Elab_Term_CollectPatternVars_collect(x_995, x_2, x_907, x_4, x_5, x_6, x_879, x_8, x_893); +if (lean_obj_tag(x_1028) == 0) +{ +lean_object* x_1029; lean_object* x_1030; lean_object* x_1031; lean_object* x_1032; lean_object* x_1033; lean_object* x_1034; +x_1029 = lean_ctor_get(x_1028, 0); +lean_inc(x_1029); +x_1030 = lean_ctor_get(x_1028, 1); +lean_inc(x_1030); +if (lean_is_exclusive(x_1028)) { + lean_ctor_release(x_1028, 0); + lean_ctor_release(x_1028, 1); + x_1031 = x_1028; +} else { + lean_dec_ref(x_1028); + x_1031 = lean_box(0); +} +x_1032 = l_Lean_Syntax_setArg(x_992, x_994, x_1029); +x_1033 = l_Lean_Syntax_setArg(x_1, x_889, x_1032); +if (lean_is_scalar(x_1031)) { + x_1034 = lean_alloc_ctor(0, 2, 0); +} else { + x_1034 = x_1031; +} +lean_ctor_set(x_1034, 0, x_1033); +lean_ctor_set(x_1034, 1, x_1030); +return x_1034; +} +else +{ +lean_object* x_1035; lean_object* x_1036; lean_object* x_1037; lean_object* x_1038; +lean_dec(x_992); +lean_dec(x_1); +x_1035 = lean_ctor_get(x_1028, 0); +lean_inc(x_1035); +x_1036 = lean_ctor_get(x_1028, 1); +lean_inc(x_1036); +if (lean_is_exclusive(x_1028)) { + lean_ctor_release(x_1028, 0); + lean_ctor_release(x_1028, 1); + x_1037 = x_1028; +} else { + lean_dec_ref(x_1028); + x_1037 = lean_box(0); +} +if (lean_is_scalar(x_1037)) { + x_1038 = lean_alloc_ctor(1, 2, 0); +} else { + x_1038 = x_1037; +} +lean_ctor_set(x_1038, 0, x_1035); +lean_ctor_set(x_1038, 1, x_1036); +return x_1038; +} +} +} +else +{ +lean_object* x_1039; +lean_dec(x_996); +x_1039 = l_Lean_Elab_Term_CollectPatternVars_collect(x_995, x_2, x_907, x_4, x_5, x_6, x_879, x_8, x_893); +if (lean_obj_tag(x_1039) == 0) +{ +lean_object* x_1040; lean_object* x_1041; lean_object* x_1042; lean_object* x_1043; lean_object* x_1044; lean_object* x_1045; +x_1040 = lean_ctor_get(x_1039, 0); +lean_inc(x_1040); +x_1041 = lean_ctor_get(x_1039, 1); +lean_inc(x_1041); +if (lean_is_exclusive(x_1039)) { + lean_ctor_release(x_1039, 0); + lean_ctor_release(x_1039, 1); + x_1042 = x_1039; +} else { + lean_dec_ref(x_1039); + x_1042 = lean_box(0); +} +x_1043 = l_Lean_Syntax_setArg(x_992, x_994, x_1040); +x_1044 = l_Lean_Syntax_setArg(x_1, x_889, x_1043); +if (lean_is_scalar(x_1042)) { + x_1045 = lean_alloc_ctor(0, 2, 0); +} else { + x_1045 = x_1042; +} +lean_ctor_set(x_1045, 0, x_1044); +lean_ctor_set(x_1045, 1, x_1041); +return x_1045; +} +else +{ +lean_object* x_1046; lean_object* x_1047; lean_object* x_1048; lean_object* x_1049; +lean_dec(x_992); +lean_dec(x_1); +x_1046 = lean_ctor_get(x_1039, 0); +lean_inc(x_1046); +x_1047 = lean_ctor_get(x_1039, 1); +lean_inc(x_1047); +if (lean_is_exclusive(x_1039)) { + lean_ctor_release(x_1039, 0); + lean_ctor_release(x_1039, 1); + x_1048 = x_1039; +} else { + lean_dec_ref(x_1039); + x_1048 = lean_box(0); +} +if (lean_is_scalar(x_1048)) { + x_1049 = lean_alloc_ctor(1, 2, 0); +} else { + x_1049 = x_1048; +} +lean_ctor_set(x_1049, 0, x_1046); +lean_ctor_set(x_1049, 1, x_1047); +return x_1049; +} +} +} +else +{ +lean_object* x_1050; +lean_dec(x_992); +lean_dec(x_907); +lean_dec(x_879); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +if (lean_is_scalar(x_894)) { + x_1050 = lean_alloc_ctor(0, 2, 0); +} else { + x_1050 = x_894; +} +lean_ctor_set(x_1050, 0, x_1); +lean_ctor_set(x_1050, 1, x_893); +return x_1050; +} +} +} +else +{ +lean_object* x_1051; lean_object* x_1052; lean_object* x_1053; lean_object* x_1054; lean_object* x_1055; lean_object* x_1056; lean_object* x_1057; lean_object* x_1058; lean_object* x_1059; lean_object* x_1060; lean_object* x_1061; lean_object* x_1062; lean_object* x_1063; lean_object* x_1064; lean_object* x_1065; lean_object* x_1066; lean_object* x_1067; lean_object* x_1068; lean_object* x_1069; +lean_dec(x_907); +lean_dec(x_894); +lean_dec(x_879); +lean_dec(x_10); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_1); +x_1051 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_mkMVarSyntax___rarg(x_8, x_893); +x_1052 = lean_ctor_get(x_1051, 0); +lean_inc(x_1052); +x_1053 = lean_ctor_get(x_1051, 1); +lean_inc(x_1053); +lean_dec(x_1051); +x_1054 = lean_st_ref_get(x_8, x_1053); +lean_dec(x_8); +x_1055 = lean_ctor_get(x_1054, 1); +lean_inc(x_1055); +lean_dec(x_1054); +x_1056 = lean_st_ref_take(x_2, x_1055); +x_1057 = lean_ctor_get(x_1056, 0); +lean_inc(x_1057); +x_1058 = lean_ctor_get(x_1056, 1); +lean_inc(x_1058); +lean_dec(x_1056); +x_1059 = lean_ctor_get(x_1057, 0); +lean_inc(x_1059); +x_1060 = lean_ctor_get(x_1057, 1); +lean_inc(x_1060); +if (lean_is_exclusive(x_1057)) { + lean_ctor_release(x_1057, 0); + lean_ctor_release(x_1057, 1); + x_1061 = x_1057; +} else { + lean_dec_ref(x_1057); + x_1061 = lean_box(0); +} +x_1062 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_getMVarSyntaxMVarId(x_1052); +x_1063 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_1063, 0, x_1062); +x_1064 = lean_array_push(x_1060, x_1063); +if (lean_is_scalar(x_1061)) { + x_1065 = lean_alloc_ctor(0, 2, 0); +} else { + x_1065 = x_1061; +} +lean_ctor_set(x_1065, 0, x_1059); +lean_ctor_set(x_1065, 1, x_1064); +x_1066 = lean_st_ref_set(x_2, x_1065, x_1058); +lean_dec(x_2); +x_1067 = lean_ctor_get(x_1066, 1); +lean_inc(x_1067); +if (lean_is_exclusive(x_1066)) { + lean_ctor_release(x_1066, 0); + lean_ctor_release(x_1066, 1); + x_1068 = x_1066; +} else { + lean_dec_ref(x_1066); + x_1068 = lean_box(0); +} +if (lean_is_scalar(x_1068)) { x_1069 = lean_alloc_ctor(0, 2, 0); } else { - x_1069 = x_1022; + x_1069 = x_1068; } -lean_ctor_set(x_1069, 0, x_1); -lean_ctor_set(x_1069, 1, x_1021); +lean_ctor_set(x_1069, 0, x_1052); +lean_ctor_set(x_1069, 1, x_1067); return x_1069; } } else { -lean_object* x_1070; -lean_dec(x_1035); -lean_dec(x_1008); +lean_object* x_1070; uint8_t x_1071; +lean_dec(x_894); lean_dec(x_10); +x_1070 = l_Lean_Syntax_getArg(x_1, x_889); +x_1071 = l_Lean_Syntax_isNone(x_1070); +if (x_1071 == 0) +{ +lean_object* x_1072; lean_object* x_1073; lean_object* x_1074; lean_object* x_1075; lean_object* x_1076; lean_object* x_1077; +lean_dec(x_1); +x_1072 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__12; +x_1073 = l_Lean_throwErrorAt___at___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_processVar___spec__2(x_1070, x_1072, x_2, x_907, x_4, x_5, x_6, x_879, x_8, x_893); lean_dec(x_8); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); +lean_dec(x_907); lean_dec(x_2); -if (lean_is_scalar(x_1022)) { - x_1070 = lean_alloc_ctor(0, 2, 0); -} else { - x_1070 = x_1022; -} -lean_ctor_set(x_1070, 0, x_1); -lean_ctor_set(x_1070, 1, x_1021); -return x_1070; -} -} -else -{ -lean_object* x_1071; -lean_dec(x_1035); -lean_dec(x_1008); -lean_dec(x_10); -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -if (lean_is_scalar(x_1022)) { - x_1071 = lean_alloc_ctor(0, 2, 0); -} else { - x_1071 = x_1022; -} -lean_ctor_set(x_1071, 0, x_1); -lean_ctor_set(x_1071, 1, x_1021); -return x_1071; -} -} -else -{ -lean_object* x_1072; -lean_dec(x_1035); -lean_dec(x_1008); -lean_dec(x_10); -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -if (lean_is_scalar(x_1022)) { - x_1072 = lean_alloc_ctor(0, 2, 0); -} else { - x_1072 = x_1022; -} -lean_ctor_set(x_1072, 0, x_1); -lean_ctor_set(x_1072, 1, x_1021); -return x_1072; -} -} -else -{ -lean_object* x_1073; -lean_dec(x_1035); -lean_dec(x_1008); -lean_dec(x_10); -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -if (lean_is_scalar(x_1022)) { - x_1073 = lean_alloc_ctor(0, 2, 0); -} else { - x_1073 = x_1022; -} -lean_ctor_set(x_1073, 0, x_1); -lean_ctor_set(x_1073, 1, x_1021); -return x_1073; -} -} -else -{ -lean_object* x_1074; lean_object* x_1075; lean_object* x_1076; -lean_dec(x_1022); -lean_dec(x_10); -x_1074 = lean_unsigned_to_nat(0u); -x_1075 = l_Lean_Syntax_getArg(x_1, x_1074); -lean_inc(x_1008); +lean_dec(x_1070); +x_1074 = lean_ctor_get(x_1073, 0); +lean_inc(x_1074); +x_1075 = lean_ctor_get(x_1073, 1); lean_inc(x_1075); -x_1076 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_processVar(x_1075, x_2, x_1035, x_4, x_5, x_6, x_1008, x_8, x_1021); -if (lean_obj_tag(x_1076) == 0) -{ -lean_object* x_1077; lean_object* x_1078; lean_object* x_1079; lean_object* x_1080; lean_object* x_1081; -x_1077 = lean_ctor_get(x_1076, 1); -lean_inc(x_1077); -lean_dec(x_1076); -x_1078 = lean_unsigned_to_nat(2u); -x_1079 = l_Lean_Syntax_getArg(x_1, x_1078); -if (lean_is_exclusive(x_1)) { - lean_ctor_release(x_1, 0); - lean_ctor_release(x_1, 1); - x_1080 = x_1; +if (lean_is_exclusive(x_1073)) { + lean_ctor_release(x_1073, 0); + lean_ctor_release(x_1073, 1); + x_1076 = x_1073; } else { - lean_dec_ref(x_1); - x_1080 = lean_box(0); + lean_dec_ref(x_1073); + x_1076 = lean_box(0); } -lean_inc(x_8); -lean_inc(x_1008); -lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_4); -lean_inc(x_1035); -x_1081 = l_Lean_Elab_Term_CollectPatternVars_collect(x_1079, x_2, x_1035, x_4, x_5, x_6, x_1008, x_8, x_1077); -if (lean_obj_tag(x_1081) == 0) -{ -lean_object* x_1082; lean_object* x_1083; lean_object* x_1084; lean_object* x_1085; lean_object* x_1086; lean_object* x_1087; lean_object* x_1088; lean_object* x_1089; lean_object* x_1090; lean_object* x_1091; lean_object* x_1092; lean_object* x_1093; lean_object* x_1094; lean_object* x_1095; lean_object* x_1096; lean_object* x_1097; lean_object* x_1098; lean_object* x_1099; lean_object* x_1100; lean_object* x_1101; lean_object* x_1102; lean_object* x_1103; lean_object* x_1104; lean_object* x_1105; lean_object* x_1106; lean_object* x_1107; -x_1082 = lean_ctor_get(x_1081, 0); -lean_inc(x_1082); -x_1083 = lean_ctor_get(x_1081, 1); -lean_inc(x_1083); -lean_dec(x_1081); -x_1084 = l_Lean_MonadRef_mkInfoFromRefPos___at_Lean_Elab_Term_CollectPatternVars_collect___spec__1___rarg(x_1008, x_8, x_1083); -x_1085 = lean_ctor_get(x_1084, 0); -lean_inc(x_1085); -x_1086 = lean_ctor_get(x_1084, 1); -lean_inc(x_1086); -lean_dec(x_1084); -x_1087 = l_Lean_Elab_Term_getCurrMacroScope(x_1035, x_4, x_5, x_6, x_1008, x_8, x_1086); -lean_dec(x_1008); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_1035); -x_1088 = lean_ctor_get(x_1087, 0); -lean_inc(x_1088); -x_1089 = lean_ctor_get(x_1087, 1); -lean_inc(x_1089); -lean_dec(x_1087); -x_1090 = l_Lean_Elab_Term_getMainModule___rarg(x_8, x_1089); -lean_dec(x_8); -x_1091 = lean_ctor_get(x_1090, 0); -lean_inc(x_1091); -x_1092 = lean_ctor_get(x_1090, 1); -lean_inc(x_1092); -if (lean_is_exclusive(x_1090)) { - lean_ctor_release(x_1090, 0); - lean_ctor_release(x_1090, 1); - x_1093 = x_1090; +if (lean_is_scalar(x_1076)) { + x_1077 = lean_alloc_ctor(1, 2, 0); } else { - lean_dec_ref(x_1090); + x_1077 = x_1076; +} +lean_ctor_set(x_1077, 0, x_1074); +lean_ctor_set(x_1077, 1, x_1075); +return x_1077; +} +else +{ +lean_object* x_1078; lean_object* x_1079; +lean_dec(x_1070); +x_1078 = lean_box(0); +x_1079 = l_Lean_Elab_Term_CollectPatternVars_collect___lambda__1(x_1, x_1078, x_2, x_907, x_4, x_5, x_6, x_879, x_8, x_893); +return x_1079; +} +} +} +else +{ +lean_object* x_1080; lean_object* x_1081; lean_object* x_1082; lean_object* x_1083; +lean_dec(x_894); +lean_dec(x_10); +x_1080 = l_Lean_Syntax_getArg(x_1, x_889); +x_1081 = l_Lean_Syntax_getArgs(x_1080); +lean_dec(x_1080); +x_1082 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__10; +x_1083 = l_Array_mapSepElemsM___at_Lean_Elab_Term_CollectPatternVars_collect___spec__2(x_1081, x_1082, x_2, x_907, x_4, x_5, x_6, x_879, x_8, x_893); +lean_dec(x_1081); +if (lean_obj_tag(x_1083) == 0) +{ +lean_object* x_1084; lean_object* x_1085; lean_object* x_1086; lean_object* x_1087; lean_object* x_1088; lean_object* x_1089; lean_object* x_1090; +x_1084 = lean_ctor_get(x_1083, 0); +lean_inc(x_1084); +x_1085 = lean_ctor_get(x_1083, 1); +lean_inc(x_1085); +if (lean_is_exclusive(x_1083)) { + lean_ctor_release(x_1083, 0); + lean_ctor_release(x_1083, 1); + x_1086 = x_1083; +} else { + lean_dec_ref(x_1083); + x_1086 = lean_box(0); +} +x_1087 = l_Lean_nullKind; +x_1088 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_1088, 0, x_1087); +lean_ctor_set(x_1088, 1, x_1084); +x_1089 = l_Lean_Syntax_setArg(x_1, x_889, x_1088); +if (lean_is_scalar(x_1086)) { + x_1090 = lean_alloc_ctor(0, 2, 0); +} else { + x_1090 = x_1086; +} +lean_ctor_set(x_1090, 0, x_1089); +lean_ctor_set(x_1090, 1, x_1085); +return x_1090; +} +else +{ +lean_object* x_1091; lean_object* x_1092; lean_object* x_1093; lean_object* x_1094; +lean_dec(x_1); +x_1091 = lean_ctor_get(x_1083, 0); +lean_inc(x_1091); +x_1092 = lean_ctor_get(x_1083, 1); +lean_inc(x_1092); +if (lean_is_exclusive(x_1083)) { + lean_ctor_release(x_1083, 0); + lean_ctor_release(x_1083, 1); + x_1093 = x_1083; +} else { + lean_dec_ref(x_1083); x_1093 = lean_box(0); } -x_1094 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__6; -x_1095 = l_Lean_addMacroScope(x_1091, x_1094, x_1088); -x_1096 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__5; -x_1097 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__9; -x_1098 = lean_alloc_ctor(3, 4, 0); -lean_ctor_set(x_1098, 0, x_1085); -lean_ctor_set(x_1098, 1, x_1096); -lean_ctor_set(x_1098, 2, x_1095); -lean_ctor_set(x_1098, 3, x_1097); -x_1099 = l_Array_empty___closed__1; -x_1100 = lean_array_push(x_1099, x_1098); -x_1101 = lean_array_push(x_1099, x_1075); -x_1102 = lean_array_push(x_1101, x_1082); -x_1103 = l_Lean_nullKind___closed__2; -if (lean_is_scalar(x_1080)) { - x_1104 = lean_alloc_ctor(1, 2, 0); -} else { - x_1104 = x_1080; -} -lean_ctor_set(x_1104, 0, x_1103); -lean_ctor_set(x_1104, 1, x_1102); -x_1105 = lean_array_push(x_1100, x_1104); -x_1106 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_1106, 0, x_12); -lean_ctor_set(x_1106, 1, x_1105); if (lean_is_scalar(x_1093)) { - x_1107 = lean_alloc_ctor(0, 2, 0); + x_1094 = lean_alloc_ctor(1, 2, 0); } else { - x_1107 = x_1093; + x_1094 = x_1093; } -lean_ctor_set(x_1107, 0, x_1106); -lean_ctor_set(x_1107, 1, x_1092); -return x_1107; +lean_ctor_set(x_1094, 0, x_1091); +lean_ctor_set(x_1094, 1, x_1092); +return x_1094; } -else -{ -lean_object* x_1108; lean_object* x_1109; lean_object* x_1110; lean_object* x_1111; -lean_dec(x_1080); -lean_dec(x_1075); -lean_dec(x_1035); -lean_dec(x_1008); -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -x_1108 = lean_ctor_get(x_1081, 0); -lean_inc(x_1108); -x_1109 = lean_ctor_get(x_1081, 1); -lean_inc(x_1109); -if (lean_is_exclusive(x_1081)) { - lean_ctor_release(x_1081, 0); - lean_ctor_release(x_1081, 1); - x_1110 = x_1081; -} else { - lean_dec_ref(x_1081); - x_1110 = lean_box(0); -} -if (lean_is_scalar(x_1110)) { - x_1111 = lean_alloc_ctor(1, 2, 0); -} else { - x_1111 = x_1110; -} -lean_ctor_set(x_1111, 0, x_1108); -lean_ctor_set(x_1111, 1, x_1109); -return x_1111; } } else { -lean_object* x_1112; lean_object* x_1113; lean_object* x_1114; lean_object* x_1115; -lean_dec(x_1075); -lean_dec(x_1035); -lean_dec(x_1008); -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); +lean_object* x_1095; +lean_dec(x_894); +lean_dec(x_10); +x_1095 = l_Lean_Elab_Term_CollectPatternVars_collect_processCtorApp(x_1, x_2, x_907, x_4, x_5, x_6, x_879, x_8, x_893); lean_dec(x_1); -x_1112 = lean_ctor_get(x_1076, 0); -lean_inc(x_1112); -x_1113 = lean_ctor_get(x_1076, 1); -lean_inc(x_1113); -if (lean_is_exclusive(x_1076)) { - lean_ctor_release(x_1076, 0); - lean_ctor_release(x_1076, 1); - x_1114 = x_1076; -} else { - lean_dec_ref(x_1076); - x_1114 = lean_box(0); -} -if (lean_is_scalar(x_1114)) { - x_1115 = lean_alloc_ctor(1, 2, 0); -} else { - x_1115 = x_1114; -} -lean_ctor_set(x_1115, 0, x_1112); -lean_ctor_set(x_1115, 1, x_1113); -return x_1115; -} +return x_1095; } } else { -lean_object* x_1116; lean_object* x_1117; lean_object* x_1118; -lean_dec(x_1022); +lean_object* x_1096; +lean_dec(x_894); lean_dec(x_10); -x_1116 = lean_unsigned_to_nat(0u); -x_1117 = l_Lean_Syntax_getArg(x_1, x_1116); -lean_dec(x_1); -x_1118 = l_Lean_Elab_Term_CollectPatternVars_collect_processCtor(x_1117, x_2, x_1035, x_4, x_5, x_6, x_1008, x_8, x_1021); -return x_1118; +x_1096 = l_Lean_Elab_Term_CollectPatternVars_collect_processId(x_1, x_2, x_907, x_4, x_5, x_6, x_879, x_8, x_893); +return x_1096; } } -else -{ -lean_object* x_1119; lean_object* x_1120; uint8_t x_1121; -x_1119 = l_Lean_instInhabitedSyntax; -x_1120 = lean_array_get(x_1119, x_11, x_1017); -x_1121 = l_Lean_Syntax_isNone(x_1120); -if (x_1121 == 0) -{ -lean_object* x_1122; lean_object* x_1123; lean_object* x_1124; lean_object* x_1125; uint8_t x_1126; -lean_dec(x_1022); -if (lean_is_exclusive(x_1)) { - lean_ctor_release(x_1, 0); - lean_ctor_release(x_1, 1); - x_1122 = x_1; -} else { - lean_dec_ref(x_1); - x_1122 = lean_box(0); -} -x_1123 = lean_unsigned_to_nat(0u); -x_1124 = l_Lean_Syntax_getArg(x_1120, x_1123); -x_1125 = l_Lean_Syntax_getArg(x_1120, x_1017); -x_1126 = l_Lean_Syntax_isNone(x_1125); -if (x_1126 == 0) -{ -lean_object* x_1127; lean_object* x_1128; lean_object* x_1129; uint8_t x_1130; -x_1127 = l_Lean_Syntax_getArg(x_1125, x_1123); -lean_inc(x_1127); -x_1128 = l_Lean_Syntax_getKind(x_1127); -x_1129 = l_myMacro____x40_Init_Notation___hyg_14874____closed__8; -x_1130 = lean_name_eq(x_1128, x_1129); -lean_dec(x_1128); -if (x_1130 == 0) -{ -lean_object* x_1131; -lean_inc(x_8); -lean_inc(x_1008); -lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_4); -lean_inc(x_1035); -lean_inc(x_2); -x_1131 = l_Lean_Elab_Term_CollectPatternVars_collect(x_1124, x_2, x_1035, x_4, x_5, x_6, x_1008, x_8, x_1021); -if (lean_obj_tag(x_1131) == 0) -{ -lean_object* x_1132; lean_object* x_1133; lean_object* x_1134; lean_object* x_1135; lean_object* x_1136; lean_object* x_1137; lean_object* x_1138; -x_1132 = lean_ctor_get(x_1131, 0); -lean_inc(x_1132); -x_1133 = lean_ctor_get(x_1131, 1); -lean_inc(x_1133); -lean_dec(x_1131); -x_1134 = l_Lean_Syntax_setArg(x_1120, x_1123, x_1132); -x_1135 = l_Lean_Syntax_getArg(x_1127, x_1017); -x_1136 = l_Lean_Syntax_getArgs(x_1135); -lean_dec(x_1135); -x_1137 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__10; -x_1138 = l_Array_mapSepElemsM___at_Lean_Elab_Term_CollectPatternVars_collect___spec__2(x_1136, x_1137, x_2, x_1035, x_4, x_5, x_6, x_1008, x_8, x_1133); -lean_dec(x_1136); -if (lean_obj_tag(x_1138) == 0) -{ -lean_object* x_1139; lean_object* x_1140; lean_object* x_1141; lean_object* x_1142; lean_object* x_1143; lean_object* x_1144; lean_object* x_1145; lean_object* x_1146; lean_object* x_1147; lean_object* x_1148; lean_object* x_1149; -x_1139 = lean_ctor_get(x_1138, 0); -lean_inc(x_1139); -x_1140 = lean_ctor_get(x_1138, 1); -lean_inc(x_1140); -if (lean_is_exclusive(x_1138)) { - lean_ctor_release(x_1138, 0); - lean_ctor_release(x_1138, 1); - x_1141 = x_1138; -} else { - lean_dec_ref(x_1138); - x_1141 = lean_box(0); -} -x_1142 = l_Lean_nullKind; -if (lean_is_scalar(x_1122)) { - x_1143 = lean_alloc_ctor(1, 2, 0); -} else { - x_1143 = x_1122; -} -lean_ctor_set(x_1143, 0, x_1142); -lean_ctor_set(x_1143, 1, x_1139); -x_1144 = l_Lean_Syntax_setArg(x_1127, x_1017, x_1143); -x_1145 = l_Lean_Syntax_setArg(x_1125, x_1123, x_1144); -x_1146 = l_Lean_Syntax_setArg(x_1134, x_1017, x_1145); -x_1147 = lean_array_set(x_11, x_1017, x_1146); -x_1148 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_1148, 0, x_10); -lean_ctor_set(x_1148, 1, x_1147); -if (lean_is_scalar(x_1141)) { - x_1149 = lean_alloc_ctor(0, 2, 0); -} else { - x_1149 = x_1141; -} -lean_ctor_set(x_1149, 0, x_1148); -lean_ctor_set(x_1149, 1, x_1140); -return x_1149; -} -else -{ -lean_object* x_1150; lean_object* x_1151; lean_object* x_1152; lean_object* x_1153; -lean_dec(x_1134); -lean_dec(x_1127); -lean_dec(x_1125); -lean_dec(x_1122); -lean_dec(x_11); -lean_dec(x_10); -x_1150 = lean_ctor_get(x_1138, 0); -lean_inc(x_1150); -x_1151 = lean_ctor_get(x_1138, 1); -lean_inc(x_1151); -if (lean_is_exclusive(x_1138)) { - lean_ctor_release(x_1138, 0); - lean_ctor_release(x_1138, 1); - x_1152 = x_1138; -} else { - lean_dec_ref(x_1138); - x_1152 = lean_box(0); -} -if (lean_is_scalar(x_1152)) { - x_1153 = lean_alloc_ctor(1, 2, 0); -} else { - x_1153 = x_1152; -} -lean_ctor_set(x_1153, 0, x_1150); -lean_ctor_set(x_1153, 1, x_1151); -return x_1153; -} -} -else -{ -lean_object* x_1154; lean_object* x_1155; lean_object* x_1156; lean_object* x_1157; -lean_dec(x_1127); -lean_dec(x_1125); -lean_dec(x_1122); -lean_dec(x_1120); -lean_dec(x_1035); -lean_dec(x_1008); -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -x_1154 = lean_ctor_get(x_1131, 0); -lean_inc(x_1154); -x_1155 = lean_ctor_get(x_1131, 1); -lean_inc(x_1155); -if (lean_is_exclusive(x_1131)) { - lean_ctor_release(x_1131, 0); - lean_ctor_release(x_1131, 1); - x_1156 = x_1131; -} else { - lean_dec_ref(x_1131); - x_1156 = lean_box(0); -} -if (lean_is_scalar(x_1156)) { - x_1157 = lean_alloc_ctor(1, 2, 0); -} else { - x_1157 = x_1156; -} -lean_ctor_set(x_1157, 0, x_1154); -lean_ctor_set(x_1157, 1, x_1155); -return x_1157; -} -} -else -{ -lean_object* x_1158; -lean_dec(x_1127); -lean_dec(x_1125); -x_1158 = l_Lean_Elab_Term_CollectPatternVars_collect(x_1124, x_2, x_1035, x_4, x_5, x_6, x_1008, x_8, x_1021); -if (lean_obj_tag(x_1158) == 0) -{ -lean_object* x_1159; lean_object* x_1160; lean_object* x_1161; lean_object* x_1162; lean_object* x_1163; lean_object* x_1164; lean_object* x_1165; -x_1159 = lean_ctor_get(x_1158, 0); -lean_inc(x_1159); -x_1160 = lean_ctor_get(x_1158, 1); -lean_inc(x_1160); -if (lean_is_exclusive(x_1158)) { - lean_ctor_release(x_1158, 0); - lean_ctor_release(x_1158, 1); - x_1161 = x_1158; -} else { - lean_dec_ref(x_1158); - x_1161 = lean_box(0); -} -x_1162 = l_Lean_Syntax_setArg(x_1120, x_1123, x_1159); -x_1163 = lean_array_set(x_11, x_1017, x_1162); -if (lean_is_scalar(x_1122)) { - x_1164 = lean_alloc_ctor(1, 2, 0); -} else { - x_1164 = x_1122; -} -lean_ctor_set(x_1164, 0, x_10); -lean_ctor_set(x_1164, 1, x_1163); -if (lean_is_scalar(x_1161)) { - x_1165 = lean_alloc_ctor(0, 2, 0); -} else { - x_1165 = x_1161; -} -lean_ctor_set(x_1165, 0, x_1164); -lean_ctor_set(x_1165, 1, x_1160); -return x_1165; -} -else -{ -lean_object* x_1166; lean_object* x_1167; lean_object* x_1168; lean_object* x_1169; -lean_dec(x_1122); -lean_dec(x_1120); -lean_dec(x_11); -lean_dec(x_10); -x_1166 = lean_ctor_get(x_1158, 0); -lean_inc(x_1166); -x_1167 = lean_ctor_get(x_1158, 1); -lean_inc(x_1167); -if (lean_is_exclusive(x_1158)) { - lean_ctor_release(x_1158, 0); - lean_ctor_release(x_1158, 1); - x_1168 = x_1158; -} else { - lean_dec_ref(x_1158); - x_1168 = lean_box(0); -} -if (lean_is_scalar(x_1168)) { - x_1169 = lean_alloc_ctor(1, 2, 0); -} else { - x_1169 = x_1168; -} -lean_ctor_set(x_1169, 0, x_1166); -lean_ctor_set(x_1169, 1, x_1167); -return x_1169; -} -} -} -else -{ -lean_object* x_1170; -lean_dec(x_1125); -x_1170 = l_Lean_Elab_Term_CollectPatternVars_collect(x_1124, x_2, x_1035, x_4, x_5, x_6, x_1008, x_8, x_1021); -if (lean_obj_tag(x_1170) == 0) -{ -lean_object* x_1171; lean_object* x_1172; lean_object* x_1173; lean_object* x_1174; lean_object* x_1175; lean_object* x_1176; lean_object* x_1177; -x_1171 = lean_ctor_get(x_1170, 0); -lean_inc(x_1171); -x_1172 = lean_ctor_get(x_1170, 1); -lean_inc(x_1172); -if (lean_is_exclusive(x_1170)) { - lean_ctor_release(x_1170, 0); - lean_ctor_release(x_1170, 1); - x_1173 = x_1170; -} else { - lean_dec_ref(x_1170); - x_1173 = lean_box(0); -} -x_1174 = l_Lean_Syntax_setArg(x_1120, x_1123, x_1171); -x_1175 = lean_array_set(x_11, x_1017, x_1174); -if (lean_is_scalar(x_1122)) { - x_1176 = lean_alloc_ctor(1, 2, 0); -} else { - x_1176 = x_1122; -} -lean_ctor_set(x_1176, 0, x_10); -lean_ctor_set(x_1176, 1, x_1175); -if (lean_is_scalar(x_1173)) { - x_1177 = lean_alloc_ctor(0, 2, 0); -} else { - x_1177 = x_1173; -} -lean_ctor_set(x_1177, 0, x_1176); -lean_ctor_set(x_1177, 1, x_1172); -return x_1177; -} -else -{ -lean_object* x_1178; lean_object* x_1179; lean_object* x_1180; lean_object* x_1181; -lean_dec(x_1122); -lean_dec(x_1120); -lean_dec(x_11); -lean_dec(x_10); -x_1178 = lean_ctor_get(x_1170, 0); -lean_inc(x_1178); -x_1179 = lean_ctor_get(x_1170, 1); -lean_inc(x_1179); -if (lean_is_exclusive(x_1170)) { - lean_ctor_release(x_1170, 0); - lean_ctor_release(x_1170, 1); - x_1180 = x_1170; -} else { - lean_dec_ref(x_1170); - x_1180 = lean_box(0); -} -if (lean_is_scalar(x_1180)) { - x_1181 = lean_alloc_ctor(1, 2, 0); -} else { - x_1181 = x_1180; -} -lean_ctor_set(x_1181, 0, x_1178); -lean_ctor_set(x_1181, 1, x_1179); -return x_1181; -} -} -} -else -{ -lean_object* x_1182; -lean_dec(x_1120); -lean_dec(x_1035); -lean_dec(x_1008); -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -if (lean_is_scalar(x_1022)) { - x_1182 = lean_alloc_ctor(0, 2, 0); -} else { - x_1182 = x_1022; -} -lean_ctor_set(x_1182, 0, x_1); -lean_ctor_set(x_1182, 1, x_1021); -return x_1182; -} -} -} -else -{ -lean_object* x_1183; lean_object* x_1184; lean_object* x_1185; lean_object* x_1186; lean_object* x_1187; lean_object* x_1188; lean_object* x_1189; lean_object* x_1190; lean_object* x_1191; lean_object* x_1192; lean_object* x_1193; lean_object* x_1194; lean_object* x_1195; lean_object* x_1196; lean_object* x_1197; lean_object* x_1198; lean_object* x_1199; lean_object* x_1200; lean_object* x_1201; -lean_dec(x_1035); -lean_dec(x_1022); -lean_dec(x_1008); -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_1); -x_1183 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_mkMVarSyntax___rarg(x_8, x_1021); -x_1184 = lean_ctor_get(x_1183, 0); -lean_inc(x_1184); -x_1185 = lean_ctor_get(x_1183, 1); -lean_inc(x_1185); -lean_dec(x_1183); -x_1186 = lean_st_ref_get(x_8, x_1185); -lean_dec(x_8); -x_1187 = lean_ctor_get(x_1186, 1); -lean_inc(x_1187); -lean_dec(x_1186); -x_1188 = lean_st_ref_take(x_2, x_1187); -x_1189 = lean_ctor_get(x_1188, 0); -lean_inc(x_1189); -x_1190 = lean_ctor_get(x_1188, 1); -lean_inc(x_1190); -lean_dec(x_1188); -x_1191 = lean_ctor_get(x_1189, 0); -lean_inc(x_1191); -x_1192 = lean_ctor_get(x_1189, 1); -lean_inc(x_1192); -if (lean_is_exclusive(x_1189)) { - lean_ctor_release(x_1189, 0); - lean_ctor_release(x_1189, 1); - x_1193 = x_1189; -} else { - lean_dec_ref(x_1189); - x_1193 = lean_box(0); -} -x_1194 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_getMVarSyntaxMVarId(x_1184); -x_1195 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_1195, 0, x_1194); -x_1196 = lean_array_push(x_1192, x_1195); -if (lean_is_scalar(x_1193)) { - x_1197 = lean_alloc_ctor(0, 2, 0); -} else { - x_1197 = x_1193; -} -lean_ctor_set(x_1197, 0, x_1191); -lean_ctor_set(x_1197, 1, x_1196); -x_1198 = lean_st_ref_set(x_2, x_1197, x_1190); -lean_dec(x_2); -x_1199 = lean_ctor_get(x_1198, 1); -lean_inc(x_1199); -if (lean_is_exclusive(x_1198)) { - lean_ctor_release(x_1198, 0); - lean_ctor_release(x_1198, 1); - x_1200 = x_1198; -} else { - lean_dec_ref(x_1198); - x_1200 = lean_box(0); -} -if (lean_is_scalar(x_1200)) { - x_1201 = lean_alloc_ctor(0, 2, 0); -} else { - x_1201 = x_1200; -} -lean_ctor_set(x_1201, 0, x_1184); -lean_ctor_set(x_1201, 1, x_1199); -return x_1201; -} -} -else -{ -lean_object* x_1202; lean_object* x_1203; uint8_t x_1204; -lean_dec(x_1022); -lean_dec(x_1); -x_1202 = l_Lean_instInhabitedSyntax; -x_1203 = lean_array_get(x_1202, x_11, x_1017); -x_1204 = l_Lean_Syntax_isNone(x_1203); -if (x_1204 == 0) -{ -lean_object* x_1205; lean_object* x_1206; lean_object* x_1207; lean_object* x_1208; lean_object* x_1209; lean_object* x_1210; -lean_dec(x_11); -lean_dec(x_10); -x_1205 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__12; -x_1206 = l_Lean_throwErrorAt___at___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_processVar___spec__2(x_1203, x_1205, x_2, x_1035, x_4, x_5, x_6, x_1008, x_8, x_1021); -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_1035); -lean_dec(x_2); -lean_dec(x_1203); -x_1207 = lean_ctor_get(x_1206, 0); -lean_inc(x_1207); -x_1208 = lean_ctor_get(x_1206, 1); -lean_inc(x_1208); -if (lean_is_exclusive(x_1206)) { - lean_ctor_release(x_1206, 0); - lean_ctor_release(x_1206, 1); - x_1209 = x_1206; -} else { - lean_dec_ref(x_1206); - x_1209 = lean_box(0); -} -if (lean_is_scalar(x_1209)) { - x_1210 = lean_alloc_ctor(1, 2, 0); -} else { - x_1210 = x_1209; -} -lean_ctor_set(x_1210, 0, x_1207); -lean_ctor_set(x_1210, 1, x_1208); -return x_1210; -} -else -{ -lean_object* x_1211; lean_object* x_1212; -lean_dec(x_1203); -x_1211 = lean_box(0); -x_1212 = l_Lean_Elab_Term_CollectPatternVars_collect___lambda__1(x_11, x_10, x_1211, x_2, x_1035, x_4, x_5, x_6, x_1008, x_8, x_1021); -return x_1212; -} -} -} -else -{ -lean_object* x_1213; lean_object* x_1214; lean_object* x_1215; lean_object* x_1216; lean_object* x_1217; lean_object* x_1218; -lean_dec(x_1022); -if (lean_is_exclusive(x_1)) { - lean_ctor_release(x_1, 0); - lean_ctor_release(x_1, 1); - x_1213 = x_1; -} else { - lean_dec_ref(x_1); - x_1213 = lean_box(0); -} -x_1214 = l_Lean_instInhabitedSyntax; -x_1215 = lean_array_get(x_1214, x_11, x_1017); -x_1216 = l_Lean_Syntax_getArgs(x_1215); -lean_dec(x_1215); -x_1217 = l_Lean_Elab_Term_CollectPatternVars_collect___closed__10; -x_1218 = l_Array_mapSepElemsM___at_Lean_Elab_Term_CollectPatternVars_collect___spec__2(x_1216, x_1217, x_2, x_1035, x_4, x_5, x_6, x_1008, x_8, x_1021); -lean_dec(x_1216); -if (lean_obj_tag(x_1218) == 0) -{ -lean_object* x_1219; lean_object* x_1220; lean_object* x_1221; lean_object* x_1222; lean_object* x_1223; lean_object* x_1224; lean_object* x_1225; lean_object* x_1226; -x_1219 = lean_ctor_get(x_1218, 0); -lean_inc(x_1219); -x_1220 = lean_ctor_get(x_1218, 1); -lean_inc(x_1220); -if (lean_is_exclusive(x_1218)) { - lean_ctor_release(x_1218, 0); - lean_ctor_release(x_1218, 1); - x_1221 = x_1218; -} else { - lean_dec_ref(x_1218); - x_1221 = lean_box(0); -} -x_1222 = l_Lean_nullKind; -if (lean_is_scalar(x_1213)) { - x_1223 = lean_alloc_ctor(1, 2, 0); -} else { - x_1223 = x_1213; -} -lean_ctor_set(x_1223, 0, x_1222); -lean_ctor_set(x_1223, 1, x_1219); -x_1224 = lean_array_set(x_11, x_1017, x_1223); -x_1225 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_1225, 0, x_10); -lean_ctor_set(x_1225, 1, x_1224); -if (lean_is_scalar(x_1221)) { - x_1226 = lean_alloc_ctor(0, 2, 0); -} else { - x_1226 = x_1221; -} -lean_ctor_set(x_1226, 0, x_1225); -lean_ctor_set(x_1226, 1, x_1220); -return x_1226; -} -else -{ -lean_object* x_1227; lean_object* x_1228; lean_object* x_1229; lean_object* x_1230; -lean_dec(x_1213); -lean_dec(x_11); -lean_dec(x_10); -x_1227 = lean_ctor_get(x_1218, 0); -lean_inc(x_1227); -x_1228 = lean_ctor_get(x_1218, 1); -lean_inc(x_1228); -if (lean_is_exclusive(x_1218)) { - lean_ctor_release(x_1218, 0); - lean_ctor_release(x_1218, 1); - x_1229 = x_1218; -} else { - lean_dec_ref(x_1218); - x_1229 = lean_box(0); -} -if (lean_is_scalar(x_1229)) { - x_1230 = lean_alloc_ctor(1, 2, 0); -} else { - x_1230 = x_1229; -} -lean_ctor_set(x_1230, 0, x_1227); -lean_ctor_set(x_1230, 1, x_1228); -return x_1230; -} -} -} -else -{ -lean_object* x_1231; -lean_dec(x_1022); -lean_dec(x_11); -lean_dec(x_10); -x_1231 = l_Lean_Elab_Term_CollectPatternVars_collect_processCtorApp(x_1, x_2, x_1035, x_4, x_5, x_6, x_1008, x_8, x_1021); -lean_dec(x_1); -return x_1231; -} -} -} -} -case 3: -{ -lean_object* x_1235; -x_1235 = l_Lean_Elab_Term_CollectPatternVars_collect_processId(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); -return x_1235; -} -default: -{ -lean_object* x_1236; -lean_dec(x_1); -x_1236 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_CollectPatternVars_throwInvalidPattern___rarg(x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -return x_1236; -} } } } @@ -15304,13 +14519,13 @@ x_14 = l_Array_mapMUnsafe_map___at_Lean_Elab_Term_CollectPatternVars_collect___s return x_14; } } -lean_object* l_Lean_Elab_Term_CollectPatternVars_collect___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { +lean_object* l_Lean_Elab_Term_CollectPatternVars_collect___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { -lean_object* x_12; -x_12 = l_Lean_Elab_Term_CollectPatternVars_collect___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11); -lean_dec(x_3); -return x_12; +lean_object* x_11; +x_11 = l_Lean_Elab_Term_CollectPatternVars_collect___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +lean_dec(x_2); +return x_11; } } lean_object* l_Lean_Elab_Term_CollectPatternVars_collect_processImplicitArg___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) { @@ -26420,7 +25635,7 @@ lean_dec(x_5); return x_12; } } -static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7149____closed__1() { +static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7106____closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; @@ -26430,7 +25645,7 @@ x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7149____closed__2() { +static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7106____closed__2() { _start: { lean_object* x_1; @@ -26438,17 +25653,17 @@ x_1 = lean_mk_string("ignoreUnusedAlts"); return x_1; } } -static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7149____closed__3() { +static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7106____closed__3() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7149____closed__1; -x_2 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7149____closed__2; +x_1 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7106____closed__1; +x_2 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7106____closed__2; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7149____closed__4() { +static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7106____closed__4() { _start: { lean_object* x_1; @@ -26456,13 +25671,13 @@ x_1 = lean_mk_string("if true, do not generate error if an alternative is not us return x_1; } } -static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7149____closed__5() { +static lean_object* _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7106____closed__5() { _start: { uint8_t x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_1 = 0; x_2 = l_Lean_instInhabitedParserDescr___closed__1; -x_3 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7149____closed__4; +x_3 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7106____closed__4; x_4 = lean_box(x_1); x_5 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_5, 0, x_4); @@ -26471,12 +25686,12 @@ lean_ctor_set(x_5, 2, x_3); return x_5; } } -lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7149_(lean_object* x_1) { +lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7106_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; -x_2 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7149____closed__3; -x_3 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7149____closed__5; +x_2 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7106____closed__3; +x_3 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7106____closed__5; x_4 = l_Lean_Option_register___at_Lean_Elab_initFn____x40_Lean_Elab_AutoBound___hyg_4____spec__1(x_2, x_3, x_1); return x_4; } @@ -28502,7 +27717,7 @@ _start: lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; x_1 = l_Lean_Elab_Term_CollectPatternVars_collect_pushNewArg___closed__3; x_2 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f___closed__3; -x_3 = lean_unsigned_to_nat(873u); +x_3 = lean_unsigned_to_nat(871u); x_4 = lean_unsigned_to_nat(2u); x_5 = l___private_Lean_Elab_Match_0__Lean_Elab_Term_isMatchUnit_x3f___closed__2; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -30624,7 +29839,7 @@ x_29 = lean_ctor_get(x_27, 1); lean_inc(x_29); lean_dec(x_27); x_30 = lean_array_get_size(x_23); -x_31 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7149____closed__1; +x_31 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7106____closed__1; lean_inc(x_5); x_32 = l_Lean_Elab_Term_mkAuxName(x_31, x_5, x_6, x_7, x_8, x_9, x_10, x_29); if (lean_obj_tag(x_32) == 0) @@ -31030,7 +30245,7 @@ x_107 = lean_ctor_get(x_19, 1); lean_inc(x_107); lean_dec(x_19); x_108 = lean_array_get_size(x_104); -x_109 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7149____closed__1; +x_109 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7106____closed__1; lean_inc(x_5); x_110 = l_Lean_Elab_Term_mkAuxName(x_109, x_5, x_6, x_7, x_8, x_9, x_10, x_103); if (lean_obj_tag(x_110) == 0) @@ -34494,7 +33709,7 @@ x_5 = l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(x_2, x_3, x_4, x_1); return x_5; } } -lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_9603_(lean_object* x_1) { +lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_9560_(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; @@ -34999,17 +34214,17 @@ l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltViews_collectDeps___cl lean_mark_persistent(l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltViews_collectDeps___closed__1); l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltViews_loop___boxed__const__1 = _init_l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltViews_loop___boxed__const__1(); lean_mark_persistent(l___private_Lean_Elab_Match_0__Lean_Elab_Term_elabMatchAltViews_loop___boxed__const__1); -l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7149____closed__1 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7149____closed__1(); -lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7149____closed__1); -l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7149____closed__2 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7149____closed__2(); -lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7149____closed__2); -l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7149____closed__3 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7149____closed__3(); -lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7149____closed__3); -l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7149____closed__4 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7149____closed__4(); -lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7149____closed__4); -l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7149____closed__5 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7149____closed__5(); -lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7149____closed__5); -res = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7149_(lean_io_mk_world()); +l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7106____closed__1 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7106____closed__1(); +lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7106____closed__1); +l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7106____closed__2 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7106____closed__2(); +lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7106____closed__2); +l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7106____closed__3 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7106____closed__3(); +lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7106____closed__3); +l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7106____closed__4 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7106____closed__4(); +lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7106____closed__4); +l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7106____closed__5 = _init_l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7106____closed__5(); +lean_mark_persistent(l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7106____closed__5); +res = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7106_(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; l_Lean_Elab_Term_match_ignoreUnusedAlts = lean_io_result_get_value(res); lean_mark_persistent(l_Lean_Elab_Term_match_ignoreUnusedAlts); @@ -35083,7 +34298,7 @@ lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_elabMatch___closed__1); res = l___regBuiltin_Lean_Elab_Term_elabMatch(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); -res = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_9603_(lean_io_mk_world()); +res = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_9560_(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); l_Lean_Elab_Term_elabNoMatch___closed__1 = _init_l_Lean_Elab_Term_elabNoMatch___closed__1(); diff --git a/stage0/stdlib/Lean/Elab/Tactic/Match.c b/stage0/stdlib/Lean/Elab/Tactic/Match.c index 04771ffdaf..4592bf60ed 100644 --- a/stage0/stdlib/Lean/Elab/Tactic/Match.c +++ b/stage0/stdlib/Lean/Elab/Tactic/Match.c @@ -33,6 +33,7 @@ lean_object* l_ReaderT_bind___at_Lean_Elab_Tactic_liftMetaMAtMain___spec__1___ra lean_object* l___private_Lean_Elab_Tactic_Match_0__Lean_Elab_Tactic_mkAuxiliaryMatchTermAux(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_uset(lean_object*, size_t, lean_object*); lean_object* l_Lean_Elab_throwUnsupportedSyntax___at_Lean_Elab_Tactic_evalMatch___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7106____closed__1; lean_object* l_Lean_Elab_withMacroExpansionInfo___at_Lean_Elab_Tactic_adaptExpander___spec__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*); extern lean_object* l_myMacro____x40_Init_Notation___hyg_13954____closed__8; lean_object* l_Lean_Elab_Tactic_AuxMatchTermState_cases___default; @@ -121,7 +122,6 @@ extern lean_object* l_myMacro____x40_Init_Notation___hyg_15419____closed__12; lean_object* l_Lean_Elab_Tactic_evalMatch(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Tactic_match___elambda__1___closed__1; lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_Tactic_evalEraseAuxDiscrs___spec__6(lean_object*, size_t, size_t, lean_object*); -extern lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7149____closed__1; lean_object* l___private_Lean_Elab_Tactic_Match_0__Lean_Elab_Tactic_mkAuxiliaryMatchTermAux___boxed__const__1; extern lean_object* l_Lean_Parser_Tactic_case___closed__2; lean_object* l_Lean_LocalContext_foldlM___at_Lean_Elab_Tactic_evalEraseAuxDiscrs___spec__1___boxed(lean_object*, lean_object*, lean_object*); @@ -1378,7 +1378,7 @@ lean_dec(x_183); x_222 = lean_ctor_get(x_6, 0); lean_inc(x_222); lean_dec(x_6); -x_223 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7149____closed__1; +x_223 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_Match___hyg_7106____closed__1; x_224 = l_Lean_Name_appendIndexAfter(x_223, x_222); x_225 = l_Lean_Name_append(x_1, x_224); x_226 = l_Lean_mkIdentFrom(x_30, x_225); diff --git a/stage0/stdlib/Lean/Server/Watchdog.c b/stage0/stdlib/Lean/Server/Watchdog.c index 2b51313f8c..1bfd55f515 100644 --- a/stage0/stdlib/Lean/Server/Watchdog.c +++ b/stage0/stdlib/Lean/Server/Watchdog.c @@ -13,116 +13,74 @@ #ifdef __cplusplus extern "C" { #endif -lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleEdits___spec__3(lean_object*); lean_object* l_Lean_Server_Watchdog_mainLoop_match__1(lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__47___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_handleRequest___spec__38(lean_object*, lean_object*, lean_object*); -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_tryWriteMessage___spec__2___rarg(lean_object*, size_t, size_t, lean_object*); lean_object* lean_string_push(lean_object*, uint32_t); extern lean_object* l_Lean_Name_toString___closed__1; -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_tryWriteMessage___spec__3___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_handleCancelRequest___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_handleRequest_match__2___rarg___closed__10; -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_FileWorker_readMessage___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__15___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__1___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__42(size_t, size_t, lean_object*); lean_object* l_Lean_Server_Watchdog_startFileWorker(lean_object*, lean_object*, lean_object*); size_t l_USize_add(size_t, size_t); lean_object* l_Lean_Server_Watchdog_runClientTask_match__1(lean_object*); -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_tryWriteMessage___spec__2(lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__20___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__12___boxed(lean_object*, lean_object*, lean_object*); lean_object* lean_get_stdin(lean_object*); -lean_object* l_IO_FS_Stream_writeLspRequest___rarg(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_IO_FS_Stream_writeLspNotification___at_Lean_Server_Watchdog_handleCancelRequest___spec__3(lean_object*, lean_object*, lean_object*); lean_object* l_Std_RBNode_insert___at_Lean_Server_Watchdog_updateFileWorkers___spec__1(lean_object*, lean_object*, lean_object*); lean_object* lean_mk_empty_array_with_capacity(lean_object*); lean_object* lean_io_mono_ms_now(lean_object*); lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidOpenTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_89_(lean_object*); -lean_object* l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__2(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26(lean_object*, lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__40___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleEdits___spec__4___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__5___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_handleDidOpen(lean_object*, lean_object*, lean_object*); extern lean_object* l_Char_quote___closed__1; lean_object* l_Lean_Server_Watchdog_handleRequest___closed__1; -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__5___closed__2; +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__11___boxed(lean_object*, lean_object*, lean_object*); lean_object* lean_io_wait_any(lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_initAndRunWatchdog___closed__1; lean_object* l_Lean_Parser_parseHeader(lean_object*, lean_object*); lean_object* lean_array_uget(lean_object*, size_t); +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__9___boxed(lean_object*, lean_object*, lean_object*); lean_object* lean_io_error_to_string(lean_object*); lean_object* l_Lean_Server_Watchdog_handleNotification___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_handleEdits___lambda__1___closed__1; -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleEdits___spec__4(lean_object*, lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_fromJsonHoverParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_464_(lean_object*); lean_object* l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonPlainGoalParams____x40_Lean_Data_Lsp_Extra___hyg_110_(lean_object*); lean_object* l_IO_FS_Stream_putStrLn___at_Lean_Server_Watchdog_log___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__3; lean_object* l_Lean_Server_Watchdog_FileWorker_runEditsSignalTask_match__1(lean_object*); lean_object* l_Lean_Server_Watchdog_handleRequest___closed__2; -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__54___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_handleNotification___closed__1; lean_object* l_Array_append___rarg(lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_initAndRunWatchdog___closed__2; -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__75(size_t, size_t, lean_object*); lean_object* l_IO_FS_Stream_putStrLn___at_Lean_Server_Watchdog_handleNotification___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_terminateFileWorker___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_FileWorker_runEditsSignalTask_loopAction_match__1___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__5___closed__1; -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12(lean_object*, lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*); -lean_object* l_IO_FS_Stream_writeLspRequest___at_Lean_Lsp_Ipc_collectDiagnostics___spec__2(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_startFileWorker___closed__3; -lean_object* l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__37(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_startFileWorker___closed__5; extern lean_object* l_Lean_Lsp_Ipc_ipcStdioConfig___closed__1; -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__54___closed__2; -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__40___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* lean_array_uset(lean_object*, size_t, lean_object*); extern lean_object* l_Lean_Lsp_Ipc_collectDiagnostics___closed__1; lean_object* l_Std_RBNode_erase___at_Lean_Server_Watchdog_eraseFileWorker___spec__1___boxed(lean_object*, lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonErrorCode___closed__28; lean_object* l_Lean_Server_Watchdog_findFileWorker_match__1(lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__57(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonMessage___closed__6; -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleEdits___spec__4___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_FileWorker_writeNotification___rarg(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Syntax_structEq(lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__64___boxed(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Server_Watchdog_0__Lean_Server_Watchdog_forwardMessages_loop(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__41___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_handleEdits___closed__3; -lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Lsp_Ipc_collectDiagnostics___spec__3(lean_object*); -lean_object* l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_handleRequest___spec__45(lean_object*, lean_object*, lean_object*); extern lean_object* l_Array_empty___closed__1; extern lean_object* l_Lean_JsonRpc_instToJsonErrorCode___closed__16; -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__73___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Json_toStructured_x3f___rarg(lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__73___closed__1; -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleCancelRequest___spec__6(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___lambda__2(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__6___boxed(lean_object*, lean_object*, lean_object*); lean_object* lean_st_ref_get(lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleNotification___spec__4___boxed(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_instInhabitedParserDescr___closed__1; lean_object* l_List_append___rarg(lean_object*, lean_object*); lean_object* l_IO_mkRef___at_Lean_Server_Watchdog_initAndRunWatchdog___spec__1(lean_object*, lean_object*); lean_object* lean_get_stderr(lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__54___closed__1; lean_object* l_Lean_Server_Watchdog_mkLeanServerCapabilities___closed__2; lean_object* l___private_Lean_Server_Watchdog_0__Lean_Server_Watchdog_forwardMessages_loop___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_shutdown___boxed(lean_object*, lean_object*); -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__14___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_eraseFileWorker___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_IO_getStdin___at_Lean_Server_Watchdog_watchdogMain___spec__1(lean_object*); lean_object* l_IO_FS_Stream_readLspMessage(lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleNotification___spec__2___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__56(size_t, size_t, lean_object*); -lean_object* l_IO_FS_Stream_writeLspNotification___at_Lean_Server_Watchdog_startFileWorker___spec__6(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__61___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__58(lean_object*, lean_object*, lean_object*); +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleEdits___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__12(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_runClientTask(lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_watchdogMain___boxed__const__2; lean_object* l_Lean_Server_Watchdog_terminateFileWorker___closed__1; @@ -135,8 +93,9 @@ lean_object* l_Std_RBNode_del___at_Lean_Server_Watchdog_FileWorker_readMessage__ lean_object* l_IO_FS_Stream_readLspRequestAs___at_Lean_Server_Watchdog_initAndRunWatchdog___spec__2(lean_object*, lean_object*, lean_object*); lean_object* lean_array_push(lean_object*, lean_object*); lean_object* lean_array_get_size(lean_object*); +lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_startFileWorker___spec__6(lean_object*); lean_object* lean_string_append(lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__9(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__13___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_mkLeanServerCapabilities___closed__4; lean_object* l___private_Lean_Server_Watchdog_0__Lean_Server_Watchdog_forwardMessages_loop___closed__3; lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_fromJsonDeclarationParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_546_(lean_object*); @@ -146,37 +105,25 @@ lean_object* l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_mainLoop___spec_ lean_object* l_IO_FS_Stream_readNotificationAs___at_Lean_Server_Watchdog_initAndRunWatchdogAux___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_initAndRunWatchdogAux(lean_object*, lean_object*); lean_object* l_IO_sleep(uint32_t, lean_object*); -lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentHighlightParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_837_(lean_object*); lean_object* l_IO_throwServerError___rarg(lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__22(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_FileWorker_writeNotification___at_Lean_Server_Watchdog_startFileWorker___spec__5(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_mkLeanServerCapabilities___closed__8; extern lean_object* l___private_Lean_Data_Lsp_InitShutdown_0__Lean_Lsp_toJsonInitializeParams____x40_Lean_Data_Lsp_InitShutdown___hyg_222____closed__8; lean_object* l___private_Lean_Server_Watchdog_0__Lean_Server_Watchdog_forwardMessages_loop___closed__5; lean_object* l___private_Lean_Server_Watchdog_0__Lean_Server_Watchdog_parseHeaderAst_match__1(lean_object*); lean_object* l_Lean_Server_Watchdog_FileWorker_readMessage___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_startFileWorker___spec__3(lean_object*, lean_object*, lean_object*); -lean_object* l_Std_RBNode_insert___at_Lean_Server_Watchdog_FileWorker_writeRequest___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_Stream_readLspNotificationAs___at_Lean_Server_Watchdog_initAndRunWatchdogAux___spec__1(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__47___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__13(lean_object*, lean_object*, lean_object*); lean_object* lean_io_process_spawn(lean_object*, lean_object*); lean_object* lean_io_getenv(lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_FileWorker_writeRequest(lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonErrorCode___closed__24; lean_object* l_Lean_Server_Watchdog_startFileWorker___closed__4; extern lean_object* l_Lean_Lsp_SemanticTokenType_names; extern lean_object* l___private_Lean_Data_Lsp_InitShutdown_0__Lean_Lsp_toJsonInitializeParams____x40_Lean_Data_Lsp_InitShutdown___hyg_222____closed__9; uint32_t lean_uint32_of_nat(lean_object*); uint8_t l_USize_decLt(size_t, size_t); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__68___lambda__2(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_FileWorker_writeNotification___at_Lean_Server_Watchdog_handleEdits___spec__1(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__73___closed__2; -lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonTypeDefinitionParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_755_(lean_object*); lean_object* l_IO_FS_Stream_readRequestAs___at_Lean_Server_Watchdog_initAndRunWatchdog___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_Stream_readMessage(lean_object*, lean_object*, lean_object*); -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__7___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_initAndRunWatchdogAux___closed__2; lean_object* lean_nat_add(lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__8(lean_object*, lean_object*, lean_object*); @@ -184,70 +131,43 @@ extern lean_object* l_Lean_Elab_parseImports___closed__1; lean_object* l_Lean_Server_Watchdog_parseParams(lean_object*); lean_object* l_Lean_Server_Watchdog_handleEdits(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_mainLoop___closed__4; -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleEdits___spec__5(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); -lean_object* l_IO_FS_Stream_writeLspNotification___at_Lean_Server_Watchdog_handleCancelRequest___spec__3___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleEdits___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Json_getObjValAs_x3f___at_Lean_Lsp_instFromJsonInitializeParams___spec__6(lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleEdits___spec__4___closed__1; lean_object* l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_shutdown___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_FileWorker_writeMessage___boxed(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Server_Watchdog_0__Lean_Server_Watchdog_forwardMessages(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonMessage___closed__10; lean_object* l_Lean_Server_Watchdog_workerCfg; -lean_object* l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__44(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_startFileWorker___spec__4(lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__5___lambda__2(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_handleRequest___spec__59(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonMessage___closed__5; -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__54___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_FileWorker_errorPendingRequests_match__1___rarg(lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_parseParams___rarg(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__40___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_FileWorker_readMessage_match__1(lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__40___closed__1; -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__41(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_mainLoop_match__5(lean_object*); -lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_findFileWorker_match__1___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleEdits___spec__6(size_t, size_t, lean_object*); lean_object* l_Lean_Server_Watchdog_initAndRunWatchdog___lambda__1___closed__5; -lean_object* l_Lean_Server_Watchdog_mainLoop_match__5___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_io_as_task(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_initAndRunWatchdog___lambda__1___closed__3; -lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__39(lean_object*); -lean_object* l_Lean_Server_Watchdog_handleEdits___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_object* l_Lean_Server_Watchdog_handleEdits___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_object*); +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__9(lean_object*, lean_object*, lean_object*); lean_object* l_Std_RBNode_erase___at_Lean_Server_Watchdog_eraseFileWorker___spec__1(lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__8___closed__1; -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__61___lambda__2(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_RBNode_setBlack___rarg(lean_object*); extern lean_object* l___private_Lean_Data_Lsp_InitShutdown_0__Lean_Lsp_toJsonInitializeParams____x40_Lean_Data_Lsp_InitShutdown___hyg_222____closed__3; lean_object* l_IO_mkRef___at_Lean_Server_Watchdog_startFileWorker___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_mainLoop___closed__1; lean_object* l_Lean_Server_Watchdog_terminateFileWorker(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Server_Watchdog_0__Lean_Server_Watchdog_forwardMessages_loop_match__1___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__51(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_fromJsonWaitForDiagnosticsParams____x40_Lean_Data_Lsp_Extra___hyg_42_(lean_object*); lean_object* l_Std_RBNode_find___at_Lean_Server_Watchdog_findFileWorker___spec__1___boxed(lean_object*, lean_object*); lean_object* l_IO_mkRef___at_Lean_Server_Watchdog_startFileWorker___spec__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_shutdown___spec__2(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleCancelRequest___spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleNotification___spec__3(lean_object*, lean_object*, lean_object*); uint8_t l_instDecidableNot___rarg(uint8_t); extern lean_object* l_Lean_Parser_Command_initialize___elambda__1___closed__1; -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__40___lambda__2(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_runClientTask___closed__1; -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__61___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__46(lean_object*); lean_object* l_Lean_Server_Watchdog_handleDidClose(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_initAndRunWatchdog___lambda__1___closed__7; lean_object* l_Lean_Json_compress(lean_object*); lean_object* lean_st_ref_take(lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Command_exit___elambda__1___closed__1; -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__34(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); lean_object* l_EStateM_bind___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Json_getObjValAs_x3f___at_Lean_Lsp_instFromJsonInitializeParams___spec__1(lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_handleRequest_match__2___rarg___closed__6; @@ -257,62 +177,33 @@ lean_object* lean_nat_sub(lean_object*, lean_object*); lean_object* l_IO_FS_Stream_readNotificationAs___at_Lean_Server_Watchdog_initAndRunWatchdogAux___spec__2(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Server_Watchdog_0__Lean_Server_Watchdog_parseHeaderAst(lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_runClientTask___closed__2; -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__7(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__55___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__75___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_handleRequest_match__1(lean_object*); -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__42___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_mainLoop___closed__2; extern lean_object* l_Lean_JsonRpc_instToJsonMessage___closed__7; -lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__11___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -size_t l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__2; lean_object* l_Lean_Server_Watchdog_initAndRunWatchdog_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_parseParams___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_FileWorker_runEditsSignalTask(lean_object*, lean_object*); -lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonCompletionParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_347_(lean_object*); lean_object* l___private_Lean_Server_Watchdog_0__Lean_Server_Watchdog_forwardMessages_loop___closed__4; lean_object* l_Lean_Server_Watchdog_initAndRunWatchdog___lambda__1___closed__4; -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___rarg(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__57___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__47___lambda__2(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_FileWorker_runEditsSignalTask___closed__1; lean_object* l_Lean_Server_Watchdog_mainLoop___lambda__1(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleCancelRequest___spec__4___boxed(lean_object*); extern lean_object* l_IO_FS_Stream_readLspNotificationAs___closed__1; -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__7(size_t, size_t, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__40(lean_object*, lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*); lean_object* lean_io_wait(lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_eraseFileWorker(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__54___lambda__2(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleEdits___spec__6___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__69(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_runClientTask___lambda__1(lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_handleDidClose___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__47(lean_object*, lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleNotification___spec__4(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__5(lean_object*, lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*); lean_object* l_Std_RBNode_appendTrees___rarg(lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_RBNode_find___at_Lean_Server_Watchdog_handleCancelRequest___spec__1(lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__4___closed__1; lean_object* l_Lean_Server_Watchdog_parseParams___rarg___closed__1; lean_object* l_Lean_Server_Watchdog_mainLoop_match__3(lean_object*); -lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__1___closed__1; -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__68___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_mainLoop___spec__2(lean_object*, lean_object*, lean_object*); lean_object* l_Std_RBNode_balRight___rarg(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_FileWorker_writeMessage(lean_object*, lean_object*, lean_object*); uint8_t l_Std_RBNode_isBlack___rarg(lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___lambda__2(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_initAndRunWatchdog___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_fromJsonSemanticTokensRangeParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_1482_(lean_object*); -lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleCancelRequest___spec__4(lean_object*); lean_object* l_Lean_Server_Watchdog_FileWorker_errorPendingRequests(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*); extern lean_object* l___private_Init_Util_0__mkPanicMessage___closed__2; -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__40___closed__2; -lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDeclarationParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_591_(lean_object*); lean_object* l_Lean_Server_Watchdog_FileWorker_errorPendingRequests_match__1(lean_object*); lean_object* l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_toJsonCancelParams____x40_Lean_Data_Lsp_Basic___hyg_61_(lean_object*); lean_object* lean_task_map(lean_object*, lean_object*, lean_object*); @@ -324,187 +215,122 @@ extern lean_object* l_IO_FS_Stream_readRequestAs___closed__5; lean_object* l_IO_FS_Stream_writeLspResponseError(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_initAndRunWatchdog___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_Stream_writeLspMessage(lean_object*, lean_object*, lean_object*); -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__48(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__8___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_handleCancelRequest___spec__8___closed__1; -lean_object* l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_toJsonPlainGoalParams____x40_Lean_Data_Lsp_Extra___hyg_155_(lean_object*); lean_object* lean_st_mk_ref(lean_object*, lean_object*); -lean_object* l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_handleCancelRequest___spec__8___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_initAndRunWatchdog___lambda__1___closed__8; -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleCancelRequest___spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_Stream_putStrLn___at_Lean_Server_Watchdog_watchdogMain___spec__2(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__4(lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleCancelRequest___spec__5___lambda__2(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_handleCrash(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_initAndRunWatchdogAux___closed__1; -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__74___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12___closed__2; -lean_object* l_Lean_Server_Watchdog_mainLoop_match__2___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleCancelRequest___spec__7(size_t, size_t, lean_object*); -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__14(size_t, size_t, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__1; +lean_object* l_Lean_Server_Watchdog_mainLoop_match__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_shutdown___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleCancelRequest___spec__5___closed__1; lean_object* l_Lean_Json_getObjValAs_x3f___at_Lean_Lsp_instFromJsonInitializeParams___spec__2(lean_object*, lean_object*); lean_object* l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_FileWorker_errorPendingRequests___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_stream_of_handle(lean_object*); lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_mainLoop___spec__2___boxed(lean_object*, lean_object*, lean_object*); lean_object* lean_array_to_list(lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_fromJsonSemanticTokensParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_1422_(lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12___closed__1; -lean_object* l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_handleCancelRequest___spec__8___closed__2; +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___lambda__2(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__71___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_handleRequest_match__2___rarg___closed__2; -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__62(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__21(size_t, size_t, lean_object*); lean_object* l_Lean_Server_Watchdog_FileWorker_stdout(lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__68___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_server_watchdog_main(lean_object*, lean_object*); +uint8_t l_Lean_Server_Watchdog_tryWriteMessage___lambda__1___closed__2; lean_object* l_Lean_Json_opt___at_Lean_JsonRpc_instToJsonMessage___spec__1(lean_object*, lean_object*); lean_object* l_IO_mkRef___at_Lean_Server_Watchdog_startFileWorker___spec__2___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_handleRequest___spec__66(lean_object*, lean_object*, lean_object*); +lean_object* l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_handleCancelRequest___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Server_Watchdog_0__Lean_Server_Watchdog_forwardMessages_loop___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDefinitionParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_673_(lean_object*); +lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleCancelRequest___spec__2(lean_object*); lean_object* l_Lean_Server_Watchdog_handleNotification_match__1(lean_object*); lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_fromJsonDocumentSymbolParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_932_(lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___closed__1; -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__6(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__10___boxed(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_Basic_0__Lean_Lsp_fromJsonCancelParams____x40_Lean_Data_Lsp_Basic___hyg_86_(lean_object*); extern lean_object* l___private_Lean_Data_Lsp_InitShutdown_0__Lean_Lsp_toJsonInitializeParams____x40_Lean_Data_Lsp_InitShutdown___hyg_222____closed__2; lean_object* l_Lean_Server_Watchdog_initAndRunWatchdog___lambda__1___closed__2; -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__69___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleCancelRequest___spec__5___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Array_isEmpty___rarg(lean_object*); -lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__2___closed__1; -lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_handleRequest_match__2___rarg___closed__1; lean_object* l_Lean_Server_Watchdog_mainLoop_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_mkLeanServerCapabilities___closed__6; -lean_object* l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_handleRequest___spec__10(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_handleRequest_match__2___rarg___closed__9; +lean_object* l_Std_RBNode_insert___at_Lean_Server_Watchdog_handleRequest___spec__3(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonErrorCode___closed__44; lean_object* l_Lean_FileMap_ofString(lean_object*); lean_object* l_IO_FS_Stream_writeLspResponse___at_Lean_Server_Watchdog_initAndRunWatchdog___spec__4(lean_object*, lean_object*, lean_object*); lean_object* l_Std_RBNode_balLeft___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_FileWorker_errorPendingRequests___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleNotification___spec__3___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__47___closed__1; lean_object* l_Lean_Server_Watchdog_mainLoop(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__32(lean_object*); extern lean_object* l___private_Lean_Data_Lsp_InitShutdown_0__Lean_Lsp_toJsonInitializeParams____x40_Lean_Data_Lsp_InitShutdown___hyg_222____closed__1; +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_fromJsonCompletionParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_302_(lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__47___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleEdits___spec__4___closed__2; extern lean_object* l_Task_Priority_default; lean_object* l_Lean_Server_Watchdog_handleRequest_match__2___rarg___closed__8; -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__70___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__27___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_mainLoop___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_handleNotification(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidCloseTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_441_(lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33(lean_object*, lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_watchdogMain___boxed__const__1; -lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__7___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); size_t lean_usize_of_nat(lean_object*); lean_object* l_Lean_Server_Watchdog_handleRequest_match__2___rarg___closed__4; -lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonSemanticTokensRangeParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_1527_(lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__61___closed__1; +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__11(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_handleEdits___closed__2; lean_object* l___private_Lean_Server_Watchdog_0__Lean_Server_Watchdog_forwardMessages_loop___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage(lean_object*); +lean_object* l_Lean_Server_Watchdog_tryWriteMessage(lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_Json_getObjValAs_x3f___at_Lean_Lsp_instFromJsonInitializeParams___spec__5(lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleEdits___spec__4___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__8(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_IO_FS_Stream_writeLspNotification___at_Lean_Server_Watchdog_startFileWorker___spec__5(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleEdits___spec__1(lean_object*); lean_object* l_IO_FS_Stream_readRequestAs___at_Lean_Server_Watchdog_initAndRunWatchdog___spec__3(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_parseParams_match__1(lean_object*, lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonErrorCode___closed__36; -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__27(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__68___closed__1; -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__68___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Server_Watchdog_0__Lean_Server_Watchdog_forwardMessages_loop___closed__1; -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__61(lean_object*, lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___closed__2; -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__40___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__10(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_handleEdits___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* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__67(lean_object*); +lean_object* l_Lean_Server_Watchdog_handleEdits___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* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__14___boxed(lean_object*, lean_object*, lean_object*); extern lean_object* l_IO_FS_Stream_readNotificationAs___closed__1; -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_tryWriteMessage___spec__3(lean_object*); +lean_object* l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_handleCancelRequest___spec__3___closed__1; lean_object* l_Lean_Server_Watchdog_initAndRunWatchdog___lambda__1___closed__6; -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__61___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__2(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__61___closed__2; -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__73___lambda__2(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_mainLoop___closed__6; lean_object* l___private_Lean_Server_Watchdog_0__Lean_Server_Watchdog_forwardMessages_loop___closed__8; lean_object* l_Lean_Server_Watchdog_handleRequest_match__2___rarg___closed__7; -lean_object* l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_handleRequest___spec__17(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__7___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Std_RBNode_del___at_Lean_Server_Watchdog_eraseFileWorker___spec__2(lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__7___closed__1; -lean_object* l_Lean_Server_Watchdog_mainLoop_match__3___rarg___closed__1; lean_object* l___private_Lean_Server_Watchdog_0__Lean_Server_Watchdog_forwardMessages_loop___closed__2; -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__28(size_t, size_t, lean_object*); -lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__10___closed__1; +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__14(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_handleCancelRequest_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_initAndRunWatchdogAux_match__1___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___lambda__2(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_tryWriteMessage_match__2___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_mainLoop___spec__3___lambda__1(lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_shutdown(lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__10___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_FileWorker_writeNotification___at_Lean_Server_Watchdog_handleCancelRequest___spec__2___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__73(lean_object*, lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleCancelRequest___spec__5___closed__2; lean_object* l_Lean_Server_Watchdog_mkLeanServerCapabilities___closed__10; -lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_startFileWorker___spec__7(lean_object*); uint8_t l_UInt32_decEq(uint32_t, uint32_t); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__68___closed__2; -lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__11(lean_object*); +lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleCancelRequest___spec__2___boxed(lean_object*); lean_object* l_Lean_Server_Watchdog_mkLeanServerCapabilities; lean_object* l_List_redLength___rarg(lean_object*); lean_object* l_Lean_Json_opt___at_Lean_JsonRpc_instToJsonMessage___spec__2(lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_handleCancelRequest_match__1(lean_object*); +lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__2___boxed(lean_object*); +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_initAndRunWatchdog(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_FileWorker_runEditsSignalTask_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Server_Watchdog_0__Lean_Server_Watchdog_forwardMessages_loop_match__1(lean_object*); -lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___lambda__3(lean_object*, uint8_t, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_mainLoop___closed__5; lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___closed__2; -lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_FileWorker_writeNotification___at_Lean_Server_Watchdog_handleCancelRequest___spec__2(lean_object*, lean_object*, lean_object*); -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__13___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___closed__1; +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__7(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_handleNotification_match__1___rarg___closed__1; -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__62___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_tryWriteMessage___spec__2___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__23(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Server_Watchdog_0__Lean_Server_Watchdog_forwardMessages_loop___closed__7; extern lean_object* l_Lean_JsonRpc_instToJsonMessage___closed__12; -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__11(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__5___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_handleRequest_match__2___rarg___closed__3; extern lean_object* l_Lean_JsonRpc_instToJsonErrorCode___closed__8; -lean_object* l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__16(lean_object*, lean_object*, lean_object*); lean_object* lean_io_process_child_wait(lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_le(lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_mainLoop___closed__3; -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__13(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); uint8_t l_Std_RBNode_isRed___rarg(lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonErrorCode___closed__32; lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonDidChangeTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_275_(lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__47___closed__2; -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__49___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__25(lean_object*); -lean_object* l_Lean_Server_Watchdog_mainLoop_match__4___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_mainLoop_match__4___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_tryWriteMessage___spec__1(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonErrorCode___closed__20; -lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonHoverParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_509_(lean_object*); lean_object* l_Lean_Server_Watchdog_handleRequest(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_handleRequest___spec__52(lean_object*, lean_object*, lean_object*); lean_object* l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_shutdown___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_handleRequest_match__2___rarg___closed__5; lean_object* l_Lean_Server_Watchdog_FileWorker_readMessage_match__2(lean_object*); @@ -512,189 +338,110 @@ lean_object* l_Lean_Server_Watchdog_runClientTask___lambda__2(lean_object*); lean_object* l_Std_RBNode_find___at_Lean_Server_Watchdog_findFileWorker___spec__1(lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_handleCancelRequest_match__2(lean_object*); lean_object* l_Lean_Server_Watchdog_FileWorker_runEditsSignalTask___lambda__1(lean_object*); -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__35(size_t, size_t, lean_object*); lean_object* l_IO_FS_Stream_putStrLn___at_Lean_Server_Watchdog_log___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleCancelRequest___spec__7___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_get_stdout(lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__68___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_tryWriteMessage___spec__3___rarg(lean_object*, size_t, size_t, lean_object*); lean_object* l___private_Lean_Data_Lsp_Communication_0__IO_FS_Stream_readLspHeader(lean_object*, lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonErrorCode___closed__4; +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__5(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonErrorCode___closed__40; lean_object* l_Lean_Server_Watchdog_watchdogMain___closed__1; -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_FileWorker_runEditsSignalTask_loopAction___closed__1; lean_object* l_Lean_Json_mkObj(lean_object*); lean_object* l_IO_mkRef___at_Lean_Server_Watchdog_startFileWorker___spec__2(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonMessage___closed__11; -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__54___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_FileWorker_stdin(lean_object*); -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__34___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_handleEdits___closed__1; extern lean_object* l_IO_FS_Stream_readRequestAs___closed__2; -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__63___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleEdits___spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_updateFileWorkers(lean_object*, lean_object*, lean_object*); lean_object* lean_st_ref_set(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_handleCrash___boxed(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonMessage___closed__8; -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__54___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__9___closed__1; lean_object* l_Lean_Server_Watchdog_initAndRunWatchdog_match__1(lean_object*); -lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleCancelRequest___spec__5___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_mainLoop_match__2___rarg___closed__1; extern lean_object* l_IO_FS_Stream_readRequestAs___closed__1; -lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__53(lean_object*); -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__63(size_t, size_t, lean_object*); -lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__15(lean_object*, lean_object*, lean_object*); lean_object* l_List_toArrayAux___rarg(lean_object*, lean_object*); extern lean_object* l_IO_FS_Stream_readLspRequestAs___closed__1; -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__73___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__6___closed__1; lean_object* l_Lean_Server_Watchdog_mkLeanServerCapabilities___closed__7; -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__20(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_handleEdits_match__2(lean_object*); lean_object* l_Lean_Server_Watchdog_findFileWorker___closed__1; -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__68(lean_object*, lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_runClientTask_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_mkLeanServerCapabilities___closed__5; -lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__29(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_tryWriteMessage_match__2(lean_object*); lean_object* l_Lean_Server_foldDocumentChanges(lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_handleEdits_match__1___rarg(lean_object*, lean_object*); lean_object* l___private_Lean_Server_Watchdog_0__Lean_Server_Watchdog_parseHeaderAst_match__1___rarg(lean_object*, lean_object*); -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__74(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_mainLoop_match__3___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__47___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_mainLoop_match__3___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonDidOpenTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_64_(lean_object*); -lean_object* l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__65(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___closed__1; -lean_object* l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__72(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_parseParams_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_startFileWorker___closed__2; -lean_object* l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_handleCancelRequest___spec__8(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleNotification___spec__2(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_FileWorker_runEditsSignalTask_loopAction___boxed(lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_startFileWorker___closed__1; +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleEdits___spec__2(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_Stream_writeLspResponse___at_Lean_Server_Watchdog_mainLoop___spec__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_tryWriteMessage_match__1___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__5___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_updateFileWorkers___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12___lambda__2(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_FileWorker_runEditsSignalTask_loopAction(lean_object*, lean_object*); -lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__60(lean_object*); lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_fromJsonTypeDefinitionParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_710_(lean_object*); -lean_object* l_IO_FS_Stream_writeLspNotification___at_Lean_Server_Watchdog_handleEdits___spec__2(lean_object*, lean_object*, lean_object*); -lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonSemanticTokensParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_1453_(lean_object*); -lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__43(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_mkLeanServerCapabilities___closed__3; extern lean_object* l_Lean_JsonRpc_instToJsonMessage___closed__4; extern lean_object* l_prec_x28___x29___closed__7; -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__21___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_FileWorker_writeNotification(lean_object*); lean_object* l_Lean_Server_Watchdog_findFileWorker___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_mainLoop___lambda__1___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__9___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Lsp_instToJsonTextDocumentSyncKind___closed__1; -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__56___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_handleEdits_match__2___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__11___closed__1; -lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__43___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_handleCancelRequest_match__2___rarg(lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_handleEdits___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* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__71(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_handleEdits___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*); extern lean_object* l_Lean_mkOptionalNode___closed__2; -lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__22___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_FileWorker_readMessage(lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__30(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_FileWorker_readMessage_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_maybeTee(lean_object*, uint8_t, lean_object*, lean_object*); lean_object* lean_io_app_dir(lean_object*); -lean_object* l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_handleRequest___spec__31(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_mkLeanServerCapabilities___closed__1; -lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_963_(lean_object*); lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_tryWriteMessage___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_FileWorker_errorPendingRequests___spec__1(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__36___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleCancelRequest___spec__5(lean_object*, lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__10(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__2(lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonMessage___closed__13; -lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*); -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__28___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__6(lean_object*, lean_object*, lean_object*); extern lean_object* l_System_FilePath_exeSuffix; lean_object* l_Lean_Server_Watchdog_handleCancelRequest(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_log(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__50___boxed(lean_object*, lean_object*, lean_object*); -uint8_t l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__1; lean_object* l_Std_RBNode_ins___at_Lean_Server_Watchdog_updateFileWorkers___spec__2(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19(lean_object*, lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonDidChangeTextDocumentParams____x40_Lean_Data_Lsp_TextSync___hyg_309_(lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleEdits___spec__4___lambda__2(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_mainLoop_match__2(lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonErrorCode___closed__12; lean_object* l_Lean_Server_Watchdog_initAndRunWatchdogAux_match__1(lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__61___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_handleEdits___lambda__1___closed__2; -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_handleRequest___spec__3(lean_object*, lean_object*, lean_object*); -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__70(size_t, size_t, lean_object*); -lean_object* l_Std_RBNode_ins___at_Lean_Server_Watchdog_FileWorker_writeRequest___spec__2(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_InitShutdown_0__Lean_Lsp_toJsonInitializeParams____x40_Lean_Data_Lsp_InitShutdown___hyg_222_(lean_object*); -lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__5___closed__1; lean_object* l___private_Lean_Server_Watchdog_0__Lean_Server_Watchdog_forwardMessages_loop___closed__6; extern lean_object* l_Lean_getBuiltinSearchPath___closed__3; -lean_object* l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_handleRequest___spec__24(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__5___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__73___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_FileWorker_writeRequest___rarg(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_JsonRpc_instToJsonMessage___closed__9; -lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__9(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -uint8_t l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__2; -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__48___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_handleEdits___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_object* l_Lean_Server_Watchdog_handleEdits___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_object*); lean_object* l_Lean_Server_Watchdog_initAndRunWatchdog___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_Stream_writeLspResponse___at_Lean_Server_Watchdog_mainLoop___spec__1(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__3___closed__1; lean_object* l_Lean_Server_Watchdog_tryWriteMessage_match__1(lean_object*); lean_object* lean_task_pure(lean_object*); lean_object* l_Lean_Server_Watchdog_handleNotification_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Json_getObjValAs_x3f___at_Lean_Lsp_instFromJsonInitializeParams___spec__3(lean_object*, lean_object*); -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__35___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_findFileWorker(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__50(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_handleRequest_match__1___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleCancelRequest___spec__5___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__64(lean_object*, lean_object*, lean_object*); -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__55(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__8___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__49(size_t, size_t, lean_object*); -lean_object* l_IO_FS_Stream_writeLspNotification___rarg(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___closed__2; +lean_object* l_Std_RBNode_ins___at_Lean_Server_Watchdog_handleRequest___spec__4(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_initAndRunWatchdog___lambda__2___closed__1; +uint8_t l_Lean_Server_Watchdog_tryWriteMessage___lambda__1___closed__1; lean_object* l___private_Lean_Data_Lsp_InitShutdown_0__Lean_Lsp_toJsonInitializeResult____x40_Lean_Data_Lsp_InitShutdown___hyg_454_(lean_object*); uint8_t l___private_Lean_Data_JsonRpc_0__Lean_JsonRpc_RequestID_lt(lean_object*, lean_object*); -lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__29___boxed(lean_object*, lean_object*, lean_object*); uint8_t lean_string_dec_lt(lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_handleRequest_match__2(lean_object*); -lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__36(lean_object*, lean_object*, lean_object*); uint8_t lean_string_dec_eq(lean_object*, lean_object*); lean_object* l_Std_RBNode_erase___at_Lean_Server_Watchdog_FileWorker_readMessage___spec__1(lean_object*, lean_object*); lean_object* l_Std_RBNode_del___at_Lean_Server_Watchdog_eraseFileWorker___spec__2___boxed(lean_object*, lean_object*); lean_object* l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_fromJsonDocumentHighlightParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_792_(lean_object*); -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__54(lean_object*, lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_initAndRunWatchdog___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_initAndRunWatchdog___lambda__1___closed__1; -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__73___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Json_getObjValAs_x3f___at_Lean_JsonRpc_instFromJsonMessage___spec__2(lean_object*, lean_object*); lean_object* l_Lean_Server_Watchdog_runClientTask___lambda__2___boxed(lean_object*); -lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__18(lean_object*); static lean_object* _init_l_Lean_Server_Watchdog_workerCfg() { _start: { @@ -1203,2633 +950,6 @@ lean_dec(x_2); return x_5; } } -lean_object* l_Lean_Server_Watchdog_FileWorker_writeMessage(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; lean_object* x_5; -x_4 = l_Lean_Server_Watchdog_FileWorker_stdin(x_1); -x_5 = l_IO_FS_Stream_writeLspMessage(x_4, x_2, x_3); -return x_5; -} -} -lean_object* l_Lean_Server_Watchdog_FileWorker_writeMessage___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l_Lean_Server_Watchdog_FileWorker_writeMessage(x_1, x_2, x_3); -lean_dec(x_2); -return x_4; -} -} -lean_object* l_Lean_Server_Watchdog_FileWorker_writeNotification___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; lean_object* x_6; -x_5 = l_Lean_Server_Watchdog_FileWorker_stdin(x_2); -x_6 = l_IO_FS_Stream_writeLspNotification___rarg(x_1, x_5, x_3, x_4); -return x_6; -} -} -lean_object* l_Lean_Server_Watchdog_FileWorker_writeNotification(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_Server_Watchdog_FileWorker_writeNotification___rarg), 4, 0); -return x_2; -} -} -lean_object* l_Std_RBNode_ins___at_Lean_Server_Watchdog_FileWorker_writeRequest___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -if (lean_obj_tag(x_1) == 0) -{ -lean_object* x_4; uint8_t x_5; lean_object* x_6; -x_4 = lean_box(0); -x_5 = 0; -x_6 = lean_alloc_ctor(1, 4, 1); -lean_ctor_set(x_6, 0, x_4); -lean_ctor_set(x_6, 1, x_2); -lean_ctor_set(x_6, 2, x_3); -lean_ctor_set(x_6, 3, x_4); -lean_ctor_set_uint8(x_6, sizeof(void*)*4, x_5); -return x_6; -} -else -{ -uint8_t x_7; -x_7 = lean_ctor_get_uint8(x_1, sizeof(void*)*4); -if (x_7 == 0) -{ -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; uint8_t x_13; -x_9 = lean_ctor_get(x_1, 0); -x_10 = lean_ctor_get(x_1, 1); -x_11 = lean_ctor_get(x_1, 2); -x_12 = lean_ctor_get(x_1, 3); -lean_inc(x_10); -lean_inc(x_2); -x_13 = l___private_Lean_Data_JsonRpc_0__Lean_JsonRpc_RequestID_lt(x_2, x_10); -if (x_13 == 0) -{ -uint8_t x_14; -lean_inc(x_2); -lean_inc(x_10); -x_14 = l___private_Lean_Data_JsonRpc_0__Lean_JsonRpc_RequestID_lt(x_10, x_2); -if (x_14 == 0) -{ -uint8_t x_15; -lean_dec(x_11); -lean_dec(x_10); -x_15 = 0; -lean_ctor_set(x_1, 2, x_3); -lean_ctor_set(x_1, 1, x_2); -lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_15); -return x_1; -} -else -{ -lean_object* x_16; uint8_t x_17; -x_16 = l_Std_RBNode_ins___at_Lean_Server_Watchdog_FileWorker_writeRequest___spec__2(x_12, x_2, x_3); -x_17 = 0; -lean_ctor_set(x_1, 3, x_16); -lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_17); -return x_1; -} -} -else -{ -lean_object* x_18; uint8_t x_19; -x_18 = l_Std_RBNode_ins___at_Lean_Server_Watchdog_FileWorker_writeRequest___spec__2(x_9, x_2, x_3); -x_19 = 0; -lean_ctor_set(x_1, 0, x_18); -lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_19); -return x_1; -} -} -else -{ -lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; uint8_t x_24; -x_20 = lean_ctor_get(x_1, 0); -x_21 = lean_ctor_get(x_1, 1); -x_22 = lean_ctor_get(x_1, 2); -x_23 = lean_ctor_get(x_1, 3); -lean_inc(x_23); -lean_inc(x_22); -lean_inc(x_21); -lean_inc(x_20); -lean_dec(x_1); -lean_inc(x_21); -lean_inc(x_2); -x_24 = l___private_Lean_Data_JsonRpc_0__Lean_JsonRpc_RequestID_lt(x_2, x_21); -if (x_24 == 0) -{ -uint8_t x_25; -lean_inc(x_2); -lean_inc(x_21); -x_25 = l___private_Lean_Data_JsonRpc_0__Lean_JsonRpc_RequestID_lt(x_21, x_2); -if (x_25 == 0) -{ -uint8_t x_26; lean_object* x_27; -lean_dec(x_22); -lean_dec(x_21); -x_26 = 0; -x_27 = lean_alloc_ctor(1, 4, 1); -lean_ctor_set(x_27, 0, x_20); -lean_ctor_set(x_27, 1, x_2); -lean_ctor_set(x_27, 2, x_3); -lean_ctor_set(x_27, 3, x_23); -lean_ctor_set_uint8(x_27, sizeof(void*)*4, x_26); -return x_27; -} -else -{ -lean_object* x_28; uint8_t x_29; lean_object* x_30; -x_28 = l_Std_RBNode_ins___at_Lean_Server_Watchdog_FileWorker_writeRequest___spec__2(x_23, x_2, x_3); -x_29 = 0; -x_30 = lean_alloc_ctor(1, 4, 1); -lean_ctor_set(x_30, 0, x_20); -lean_ctor_set(x_30, 1, x_21); -lean_ctor_set(x_30, 2, x_22); -lean_ctor_set(x_30, 3, x_28); -lean_ctor_set_uint8(x_30, sizeof(void*)*4, x_29); -return x_30; -} -} -else -{ -lean_object* x_31; uint8_t x_32; lean_object* x_33; -x_31 = l_Std_RBNode_ins___at_Lean_Server_Watchdog_FileWorker_writeRequest___spec__2(x_20, x_2, x_3); -x_32 = 0; -x_33 = lean_alloc_ctor(1, 4, 1); -lean_ctor_set(x_33, 0, x_31); -lean_ctor_set(x_33, 1, x_21); -lean_ctor_set(x_33, 2, x_22); -lean_ctor_set(x_33, 3, x_23); -lean_ctor_set_uint8(x_33, sizeof(void*)*4, x_32); -return x_33; -} -} -} -else -{ -uint8_t x_34; -x_34 = !lean_is_exclusive(x_1); -if (x_34 == 0) -{ -lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; uint8_t x_39; -x_35 = lean_ctor_get(x_1, 0); -x_36 = lean_ctor_get(x_1, 1); -x_37 = lean_ctor_get(x_1, 2); -x_38 = lean_ctor_get(x_1, 3); -lean_inc(x_36); -lean_inc(x_2); -x_39 = l___private_Lean_Data_JsonRpc_0__Lean_JsonRpc_RequestID_lt(x_2, x_36); -if (x_39 == 0) -{ -uint8_t x_40; -lean_inc(x_2); -lean_inc(x_36); -x_40 = l___private_Lean_Data_JsonRpc_0__Lean_JsonRpc_RequestID_lt(x_36, x_2); -if (x_40 == 0) -{ -uint8_t x_41; -lean_dec(x_37); -lean_dec(x_36); -x_41 = 1; -lean_ctor_set(x_1, 2, x_3); -lean_ctor_set(x_1, 1, x_2); -lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_41); -return x_1; -} -else -{ -uint8_t x_42; -x_42 = l_Std_RBNode_isRed___rarg(x_38); -if (x_42 == 0) -{ -lean_object* x_43; uint8_t x_44; -x_43 = l_Std_RBNode_ins___at_Lean_Server_Watchdog_FileWorker_writeRequest___spec__2(x_38, x_2, x_3); -x_44 = 1; -lean_ctor_set(x_1, 3, x_43); -lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_44); -return x_1; -} -else -{ -lean_object* x_45; lean_object* x_46; -x_45 = l_Std_RBNode_ins___at_Lean_Server_Watchdog_FileWorker_writeRequest___spec__2(x_38, x_2, x_3); -x_46 = lean_ctor_get(x_45, 0); -lean_inc(x_46); -if (lean_obj_tag(x_46) == 0) -{ -lean_object* x_47; -x_47 = lean_ctor_get(x_45, 3); -lean_inc(x_47); -if (lean_obj_tag(x_47) == 0) -{ -uint8_t x_48; -x_48 = !lean_is_exclusive(x_45); -if (x_48 == 0) -{ -lean_object* x_49; lean_object* x_50; uint8_t x_51; uint8_t x_52; -x_49 = lean_ctor_get(x_45, 3); -lean_dec(x_49); -x_50 = lean_ctor_get(x_45, 0); -lean_dec(x_50); -x_51 = 0; -lean_ctor_set(x_45, 0, x_47); -lean_ctor_set_uint8(x_45, sizeof(void*)*4, x_51); -x_52 = 1; -lean_ctor_set(x_1, 3, x_45); -lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_52); -return x_1; -} -else -{ -lean_object* x_53; lean_object* x_54; uint8_t x_55; lean_object* x_56; uint8_t x_57; -x_53 = lean_ctor_get(x_45, 1); -x_54 = lean_ctor_get(x_45, 2); -lean_inc(x_54); -lean_inc(x_53); -lean_dec(x_45); -x_55 = 0; -x_56 = lean_alloc_ctor(1, 4, 1); -lean_ctor_set(x_56, 0, x_47); -lean_ctor_set(x_56, 1, x_53); -lean_ctor_set(x_56, 2, x_54); -lean_ctor_set(x_56, 3, x_47); -lean_ctor_set_uint8(x_56, sizeof(void*)*4, x_55); -x_57 = 1; -lean_ctor_set(x_1, 3, x_56); -lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_57); -return x_1; -} -} -else -{ -uint8_t x_58; -x_58 = lean_ctor_get_uint8(x_47, sizeof(void*)*4); -if (x_58 == 0) -{ -uint8_t x_59; -x_59 = !lean_is_exclusive(x_45); -if (x_59 == 0) -{ -lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; uint8_t x_64; -x_60 = lean_ctor_get(x_45, 1); -x_61 = lean_ctor_get(x_45, 2); -x_62 = lean_ctor_get(x_45, 3); -lean_dec(x_62); -x_63 = lean_ctor_get(x_45, 0); -lean_dec(x_63); -x_64 = !lean_is_exclusive(x_47); -if (x_64 == 0) -{ -lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; uint8_t x_69; uint8_t x_70; -x_65 = lean_ctor_get(x_47, 0); -x_66 = lean_ctor_get(x_47, 1); -x_67 = lean_ctor_get(x_47, 2); -x_68 = lean_ctor_get(x_47, 3); -x_69 = 1; -lean_ctor_set(x_47, 3, x_46); -lean_ctor_set(x_47, 2, x_37); -lean_ctor_set(x_47, 1, x_36); -lean_ctor_set(x_47, 0, x_35); -lean_ctor_set_uint8(x_47, sizeof(void*)*4, x_69); -lean_ctor_set(x_45, 3, x_68); -lean_ctor_set(x_45, 2, x_67); -lean_ctor_set(x_45, 1, x_66); -lean_ctor_set(x_45, 0, x_65); -lean_ctor_set_uint8(x_45, sizeof(void*)*4, x_69); -x_70 = 0; -lean_ctor_set(x_1, 3, x_45); -lean_ctor_set(x_1, 2, x_61); -lean_ctor_set(x_1, 1, x_60); -lean_ctor_set(x_1, 0, x_47); -lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_70); -return x_1; -} -else -{ -lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; uint8_t x_75; lean_object* x_76; uint8_t x_77; -x_71 = lean_ctor_get(x_47, 0); -x_72 = lean_ctor_get(x_47, 1); -x_73 = lean_ctor_get(x_47, 2); -x_74 = lean_ctor_get(x_47, 3); -lean_inc(x_74); -lean_inc(x_73); -lean_inc(x_72); -lean_inc(x_71); -lean_dec(x_47); -x_75 = 1; -x_76 = lean_alloc_ctor(1, 4, 1); -lean_ctor_set(x_76, 0, x_35); -lean_ctor_set(x_76, 1, x_36); -lean_ctor_set(x_76, 2, x_37); -lean_ctor_set(x_76, 3, x_46); -lean_ctor_set_uint8(x_76, sizeof(void*)*4, x_75); -lean_ctor_set(x_45, 3, x_74); -lean_ctor_set(x_45, 2, x_73); -lean_ctor_set(x_45, 1, x_72); -lean_ctor_set(x_45, 0, x_71); -lean_ctor_set_uint8(x_45, sizeof(void*)*4, x_75); -x_77 = 0; -lean_ctor_set(x_1, 3, x_45); -lean_ctor_set(x_1, 2, x_61); -lean_ctor_set(x_1, 1, x_60); -lean_ctor_set(x_1, 0, x_76); -lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_77); -return x_1; -} -} -else -{ -lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; uint8_t x_85; lean_object* x_86; lean_object* x_87; uint8_t x_88; -x_78 = lean_ctor_get(x_45, 1); -x_79 = lean_ctor_get(x_45, 2); -lean_inc(x_79); -lean_inc(x_78); -lean_dec(x_45); -x_80 = lean_ctor_get(x_47, 0); -lean_inc(x_80); -x_81 = lean_ctor_get(x_47, 1); -lean_inc(x_81); -x_82 = lean_ctor_get(x_47, 2); -lean_inc(x_82); -x_83 = lean_ctor_get(x_47, 3); -lean_inc(x_83); -if (lean_is_exclusive(x_47)) { - lean_ctor_release(x_47, 0); - lean_ctor_release(x_47, 1); - lean_ctor_release(x_47, 2); - lean_ctor_release(x_47, 3); - x_84 = x_47; -} else { - lean_dec_ref(x_47); - x_84 = lean_box(0); -} -x_85 = 1; -if (lean_is_scalar(x_84)) { - x_86 = lean_alloc_ctor(1, 4, 1); -} else { - x_86 = x_84; -} -lean_ctor_set(x_86, 0, x_35); -lean_ctor_set(x_86, 1, x_36); -lean_ctor_set(x_86, 2, x_37); -lean_ctor_set(x_86, 3, x_46); -lean_ctor_set_uint8(x_86, sizeof(void*)*4, x_85); -x_87 = lean_alloc_ctor(1, 4, 1); -lean_ctor_set(x_87, 0, x_80); -lean_ctor_set(x_87, 1, x_81); -lean_ctor_set(x_87, 2, x_82); -lean_ctor_set(x_87, 3, x_83); -lean_ctor_set_uint8(x_87, sizeof(void*)*4, x_85); -x_88 = 0; -lean_ctor_set(x_1, 3, x_87); -lean_ctor_set(x_1, 2, x_79); -lean_ctor_set(x_1, 1, x_78); -lean_ctor_set(x_1, 0, x_86); -lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_88); -return x_1; -} -} -else -{ -uint8_t x_89; -x_89 = !lean_is_exclusive(x_45); -if (x_89 == 0) -{ -lean_object* x_90; lean_object* x_91; uint8_t x_92; uint8_t x_93; -x_90 = lean_ctor_get(x_45, 3); -lean_dec(x_90); -x_91 = lean_ctor_get(x_45, 0); -lean_dec(x_91); -x_92 = 0; -lean_ctor_set_uint8(x_45, sizeof(void*)*4, x_92); -x_93 = 1; -lean_ctor_set(x_1, 3, x_45); -lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_93); -return x_1; -} -else -{ -lean_object* x_94; lean_object* x_95; uint8_t x_96; lean_object* x_97; uint8_t x_98; -x_94 = lean_ctor_get(x_45, 1); -x_95 = lean_ctor_get(x_45, 2); -lean_inc(x_95); -lean_inc(x_94); -lean_dec(x_45); -x_96 = 0; -x_97 = lean_alloc_ctor(1, 4, 1); -lean_ctor_set(x_97, 0, x_46); -lean_ctor_set(x_97, 1, x_94); -lean_ctor_set(x_97, 2, x_95); -lean_ctor_set(x_97, 3, x_47); -lean_ctor_set_uint8(x_97, sizeof(void*)*4, x_96); -x_98 = 1; -lean_ctor_set(x_1, 3, x_97); -lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_98); -return x_1; -} -} -} -} -else -{ -uint8_t x_99; -x_99 = lean_ctor_get_uint8(x_46, sizeof(void*)*4); -if (x_99 == 0) -{ -uint8_t x_100; -x_100 = !lean_is_exclusive(x_45); -if (x_100 == 0) -{ -lean_object* x_101; uint8_t x_102; -x_101 = lean_ctor_get(x_45, 0); -lean_dec(x_101); -x_102 = !lean_is_exclusive(x_46); -if (x_102 == 0) -{ -lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; uint8_t x_107; uint8_t x_108; -x_103 = lean_ctor_get(x_46, 0); -x_104 = lean_ctor_get(x_46, 1); -x_105 = lean_ctor_get(x_46, 2); -x_106 = lean_ctor_get(x_46, 3); -x_107 = 1; -lean_ctor_set(x_46, 3, x_103); -lean_ctor_set(x_46, 2, x_37); -lean_ctor_set(x_46, 1, x_36); -lean_ctor_set(x_46, 0, x_35); -lean_ctor_set_uint8(x_46, sizeof(void*)*4, x_107); -lean_ctor_set(x_45, 0, x_106); -lean_ctor_set_uint8(x_45, sizeof(void*)*4, x_107); -x_108 = 0; -lean_ctor_set(x_1, 3, x_45); -lean_ctor_set(x_1, 2, x_105); -lean_ctor_set(x_1, 1, x_104); -lean_ctor_set(x_1, 0, x_46); -lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_108); -return x_1; -} -else -{ -lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; uint8_t x_113; lean_object* x_114; uint8_t x_115; -x_109 = lean_ctor_get(x_46, 0); -x_110 = lean_ctor_get(x_46, 1); -x_111 = lean_ctor_get(x_46, 2); -x_112 = lean_ctor_get(x_46, 3); -lean_inc(x_112); -lean_inc(x_111); -lean_inc(x_110); -lean_inc(x_109); -lean_dec(x_46); -x_113 = 1; -x_114 = lean_alloc_ctor(1, 4, 1); -lean_ctor_set(x_114, 0, x_35); -lean_ctor_set(x_114, 1, x_36); -lean_ctor_set(x_114, 2, x_37); -lean_ctor_set(x_114, 3, x_109); -lean_ctor_set_uint8(x_114, sizeof(void*)*4, x_113); -lean_ctor_set(x_45, 0, x_112); -lean_ctor_set_uint8(x_45, sizeof(void*)*4, x_113); -x_115 = 0; -lean_ctor_set(x_1, 3, x_45); -lean_ctor_set(x_1, 2, x_111); -lean_ctor_set(x_1, 1, x_110); -lean_ctor_set(x_1, 0, x_114); -lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_115); -return x_1; -} -} -else -{ -lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; uint8_t x_124; lean_object* x_125; lean_object* x_126; uint8_t x_127; -x_116 = lean_ctor_get(x_45, 1); -x_117 = lean_ctor_get(x_45, 2); -x_118 = lean_ctor_get(x_45, 3); -lean_inc(x_118); -lean_inc(x_117); -lean_inc(x_116); -lean_dec(x_45); -x_119 = lean_ctor_get(x_46, 0); -lean_inc(x_119); -x_120 = lean_ctor_get(x_46, 1); -lean_inc(x_120); -x_121 = lean_ctor_get(x_46, 2); -lean_inc(x_121); -x_122 = lean_ctor_get(x_46, 3); -lean_inc(x_122); -if (lean_is_exclusive(x_46)) { - lean_ctor_release(x_46, 0); - lean_ctor_release(x_46, 1); - lean_ctor_release(x_46, 2); - lean_ctor_release(x_46, 3); - x_123 = x_46; -} else { - lean_dec_ref(x_46); - x_123 = lean_box(0); -} -x_124 = 1; -if (lean_is_scalar(x_123)) { - x_125 = lean_alloc_ctor(1, 4, 1); -} else { - x_125 = x_123; -} -lean_ctor_set(x_125, 0, x_35); -lean_ctor_set(x_125, 1, x_36); -lean_ctor_set(x_125, 2, x_37); -lean_ctor_set(x_125, 3, x_119); -lean_ctor_set_uint8(x_125, sizeof(void*)*4, x_124); -x_126 = lean_alloc_ctor(1, 4, 1); -lean_ctor_set(x_126, 0, x_122); -lean_ctor_set(x_126, 1, x_116); -lean_ctor_set(x_126, 2, x_117); -lean_ctor_set(x_126, 3, x_118); -lean_ctor_set_uint8(x_126, sizeof(void*)*4, x_124); -x_127 = 0; -lean_ctor_set(x_1, 3, x_126); -lean_ctor_set(x_1, 2, x_121); -lean_ctor_set(x_1, 1, x_120); -lean_ctor_set(x_1, 0, x_125); -lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_127); -return x_1; -} -} -else -{ -lean_object* x_128; -x_128 = lean_ctor_get(x_45, 3); -lean_inc(x_128); -if (lean_obj_tag(x_128) == 0) -{ -uint8_t x_129; -x_129 = !lean_is_exclusive(x_45); -if (x_129 == 0) -{ -lean_object* x_130; lean_object* x_131; uint8_t x_132; uint8_t x_133; -x_130 = lean_ctor_get(x_45, 3); -lean_dec(x_130); -x_131 = lean_ctor_get(x_45, 0); -lean_dec(x_131); -x_132 = 0; -lean_ctor_set_uint8(x_45, sizeof(void*)*4, x_132); -x_133 = 1; -lean_ctor_set(x_1, 3, x_45); -lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_133); -return x_1; -} -else -{ -lean_object* x_134; lean_object* x_135; uint8_t x_136; lean_object* x_137; uint8_t x_138; -x_134 = lean_ctor_get(x_45, 1); -x_135 = lean_ctor_get(x_45, 2); -lean_inc(x_135); -lean_inc(x_134); -lean_dec(x_45); -x_136 = 0; -x_137 = lean_alloc_ctor(1, 4, 1); -lean_ctor_set(x_137, 0, x_46); -lean_ctor_set(x_137, 1, x_134); -lean_ctor_set(x_137, 2, x_135); -lean_ctor_set(x_137, 3, x_128); -lean_ctor_set_uint8(x_137, sizeof(void*)*4, x_136); -x_138 = 1; -lean_ctor_set(x_1, 3, x_137); -lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_138); -return x_1; -} -} -else -{ -uint8_t x_139; -x_139 = lean_ctor_get_uint8(x_128, sizeof(void*)*4); -if (x_139 == 0) -{ -uint8_t x_140; -lean_free_object(x_1); -x_140 = !lean_is_exclusive(x_45); -if (x_140 == 0) -{ -lean_object* x_141; lean_object* x_142; uint8_t x_143; -x_141 = lean_ctor_get(x_45, 3); -lean_dec(x_141); -x_142 = lean_ctor_get(x_45, 0); -lean_dec(x_142); -x_143 = !lean_is_exclusive(x_128); -if (x_143 == 0) -{ -lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147; uint8_t x_148; uint8_t x_149; -x_144 = lean_ctor_get(x_128, 0); -x_145 = lean_ctor_get(x_128, 1); -x_146 = lean_ctor_get(x_128, 2); -x_147 = lean_ctor_get(x_128, 3); -x_148 = 1; -lean_inc(x_46); -lean_ctor_set(x_128, 3, x_46); -lean_ctor_set(x_128, 2, x_37); -lean_ctor_set(x_128, 1, x_36); -lean_ctor_set(x_128, 0, x_35); -x_149 = !lean_is_exclusive(x_46); -if (x_149 == 0) -{ -lean_object* x_150; lean_object* x_151; lean_object* x_152; lean_object* x_153; uint8_t x_154; -x_150 = lean_ctor_get(x_46, 3); -lean_dec(x_150); -x_151 = lean_ctor_get(x_46, 2); -lean_dec(x_151); -x_152 = lean_ctor_get(x_46, 1); -lean_dec(x_152); -x_153 = lean_ctor_get(x_46, 0); -lean_dec(x_153); -lean_ctor_set_uint8(x_128, sizeof(void*)*4, x_148); -lean_ctor_set(x_46, 3, x_147); -lean_ctor_set(x_46, 2, x_146); -lean_ctor_set(x_46, 1, x_145); -lean_ctor_set(x_46, 0, x_144); -lean_ctor_set_uint8(x_46, sizeof(void*)*4, x_148); -x_154 = 0; -lean_ctor_set(x_45, 3, x_46); -lean_ctor_set(x_45, 0, x_128); -lean_ctor_set_uint8(x_45, sizeof(void*)*4, x_154); -return x_45; -} -else -{ -lean_object* x_155; uint8_t x_156; -lean_dec(x_46); -lean_ctor_set_uint8(x_128, sizeof(void*)*4, x_148); -x_155 = lean_alloc_ctor(1, 4, 1); -lean_ctor_set(x_155, 0, x_144); -lean_ctor_set(x_155, 1, x_145); -lean_ctor_set(x_155, 2, x_146); -lean_ctor_set(x_155, 3, x_147); -lean_ctor_set_uint8(x_155, sizeof(void*)*4, x_148); -x_156 = 0; -lean_ctor_set(x_45, 3, x_155); -lean_ctor_set(x_45, 0, x_128); -lean_ctor_set_uint8(x_45, sizeof(void*)*4, x_156); -return x_45; -} -} -else -{ -lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_object* x_160; uint8_t x_161; lean_object* x_162; lean_object* x_163; lean_object* x_164; uint8_t x_165; -x_157 = lean_ctor_get(x_128, 0); -x_158 = lean_ctor_get(x_128, 1); -x_159 = lean_ctor_get(x_128, 2); -x_160 = lean_ctor_get(x_128, 3); -lean_inc(x_160); -lean_inc(x_159); -lean_inc(x_158); -lean_inc(x_157); -lean_dec(x_128); -x_161 = 1; -lean_inc(x_46); -x_162 = lean_alloc_ctor(1, 4, 1); -lean_ctor_set(x_162, 0, x_35); -lean_ctor_set(x_162, 1, x_36); -lean_ctor_set(x_162, 2, x_37); -lean_ctor_set(x_162, 3, x_46); -if (lean_is_exclusive(x_46)) { - lean_ctor_release(x_46, 0); - lean_ctor_release(x_46, 1); - lean_ctor_release(x_46, 2); - lean_ctor_release(x_46, 3); - x_163 = x_46; -} else { - lean_dec_ref(x_46); - x_163 = lean_box(0); -} -lean_ctor_set_uint8(x_162, sizeof(void*)*4, x_161); -if (lean_is_scalar(x_163)) { - x_164 = lean_alloc_ctor(1, 4, 1); -} else { - x_164 = x_163; -} -lean_ctor_set(x_164, 0, x_157); -lean_ctor_set(x_164, 1, x_158); -lean_ctor_set(x_164, 2, x_159); -lean_ctor_set(x_164, 3, x_160); -lean_ctor_set_uint8(x_164, sizeof(void*)*4, x_161); -x_165 = 0; -lean_ctor_set(x_45, 3, x_164); -lean_ctor_set(x_45, 0, x_162); -lean_ctor_set_uint8(x_45, sizeof(void*)*4, x_165); -return x_45; -} -} -else -{ -lean_object* x_166; lean_object* x_167; lean_object* x_168; lean_object* x_169; lean_object* x_170; lean_object* x_171; lean_object* x_172; uint8_t x_173; lean_object* x_174; lean_object* x_175; lean_object* x_176; uint8_t x_177; lean_object* x_178; -x_166 = lean_ctor_get(x_45, 1); -x_167 = lean_ctor_get(x_45, 2); -lean_inc(x_167); -lean_inc(x_166); -lean_dec(x_45); -x_168 = lean_ctor_get(x_128, 0); -lean_inc(x_168); -x_169 = lean_ctor_get(x_128, 1); -lean_inc(x_169); -x_170 = lean_ctor_get(x_128, 2); -lean_inc(x_170); -x_171 = lean_ctor_get(x_128, 3); -lean_inc(x_171); -if (lean_is_exclusive(x_128)) { - lean_ctor_release(x_128, 0); - lean_ctor_release(x_128, 1); - lean_ctor_release(x_128, 2); - lean_ctor_release(x_128, 3); - x_172 = x_128; -} else { - lean_dec_ref(x_128); - x_172 = lean_box(0); -} -x_173 = 1; -lean_inc(x_46); -if (lean_is_scalar(x_172)) { - x_174 = lean_alloc_ctor(1, 4, 1); -} else { - x_174 = x_172; -} -lean_ctor_set(x_174, 0, x_35); -lean_ctor_set(x_174, 1, x_36); -lean_ctor_set(x_174, 2, x_37); -lean_ctor_set(x_174, 3, x_46); -if (lean_is_exclusive(x_46)) { - lean_ctor_release(x_46, 0); - lean_ctor_release(x_46, 1); - lean_ctor_release(x_46, 2); - lean_ctor_release(x_46, 3); - x_175 = x_46; -} else { - lean_dec_ref(x_46); - x_175 = lean_box(0); -} -lean_ctor_set_uint8(x_174, sizeof(void*)*4, x_173); -if (lean_is_scalar(x_175)) { - x_176 = lean_alloc_ctor(1, 4, 1); -} else { - x_176 = x_175; -} -lean_ctor_set(x_176, 0, x_168); -lean_ctor_set(x_176, 1, x_169); -lean_ctor_set(x_176, 2, x_170); -lean_ctor_set(x_176, 3, x_171); -lean_ctor_set_uint8(x_176, sizeof(void*)*4, x_173); -x_177 = 0; -x_178 = lean_alloc_ctor(1, 4, 1); -lean_ctor_set(x_178, 0, x_174); -lean_ctor_set(x_178, 1, x_166); -lean_ctor_set(x_178, 2, x_167); -lean_ctor_set(x_178, 3, x_176); -lean_ctor_set_uint8(x_178, sizeof(void*)*4, x_177); -return x_178; -} -} -else -{ -uint8_t x_179; -x_179 = !lean_is_exclusive(x_45); -if (x_179 == 0) -{ -lean_object* x_180; lean_object* x_181; uint8_t x_182; -x_180 = lean_ctor_get(x_45, 3); -lean_dec(x_180); -x_181 = lean_ctor_get(x_45, 0); -lean_dec(x_181); -x_182 = !lean_is_exclusive(x_46); -if (x_182 == 0) -{ -uint8_t x_183; uint8_t x_184; -lean_ctor_set_uint8(x_46, sizeof(void*)*4, x_139); -x_183 = 0; -lean_ctor_set_uint8(x_45, sizeof(void*)*4, x_183); -x_184 = 1; -lean_ctor_set(x_1, 3, x_45); -lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_184); -return x_1; -} -else -{ -lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; lean_object* x_189; uint8_t x_190; uint8_t x_191; -x_185 = lean_ctor_get(x_46, 0); -x_186 = lean_ctor_get(x_46, 1); -x_187 = lean_ctor_get(x_46, 2); -x_188 = lean_ctor_get(x_46, 3); -lean_inc(x_188); -lean_inc(x_187); -lean_inc(x_186); -lean_inc(x_185); -lean_dec(x_46); -x_189 = lean_alloc_ctor(1, 4, 1); -lean_ctor_set(x_189, 0, x_185); -lean_ctor_set(x_189, 1, x_186); -lean_ctor_set(x_189, 2, x_187); -lean_ctor_set(x_189, 3, x_188); -lean_ctor_set_uint8(x_189, sizeof(void*)*4, x_139); -x_190 = 0; -lean_ctor_set(x_45, 0, x_189); -lean_ctor_set_uint8(x_45, sizeof(void*)*4, x_190); -x_191 = 1; -lean_ctor_set(x_1, 3, x_45); -lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_191); -return x_1; -} -} -else -{ -lean_object* x_192; lean_object* x_193; lean_object* x_194; lean_object* x_195; lean_object* x_196; lean_object* x_197; lean_object* x_198; lean_object* x_199; uint8_t x_200; lean_object* x_201; uint8_t x_202; -x_192 = lean_ctor_get(x_45, 1); -x_193 = lean_ctor_get(x_45, 2); -lean_inc(x_193); -lean_inc(x_192); -lean_dec(x_45); -x_194 = lean_ctor_get(x_46, 0); -lean_inc(x_194); -x_195 = lean_ctor_get(x_46, 1); -lean_inc(x_195); -x_196 = lean_ctor_get(x_46, 2); -lean_inc(x_196); -x_197 = lean_ctor_get(x_46, 3); -lean_inc(x_197); -if (lean_is_exclusive(x_46)) { - lean_ctor_release(x_46, 0); - lean_ctor_release(x_46, 1); - lean_ctor_release(x_46, 2); - lean_ctor_release(x_46, 3); - x_198 = x_46; -} else { - lean_dec_ref(x_46); - x_198 = lean_box(0); -} -if (lean_is_scalar(x_198)) { - x_199 = lean_alloc_ctor(1, 4, 1); -} else { - x_199 = x_198; -} -lean_ctor_set(x_199, 0, x_194); -lean_ctor_set(x_199, 1, x_195); -lean_ctor_set(x_199, 2, x_196); -lean_ctor_set(x_199, 3, x_197); -lean_ctor_set_uint8(x_199, sizeof(void*)*4, x_139); -x_200 = 0; -x_201 = lean_alloc_ctor(1, 4, 1); -lean_ctor_set(x_201, 0, x_199); -lean_ctor_set(x_201, 1, x_192); -lean_ctor_set(x_201, 2, x_193); -lean_ctor_set(x_201, 3, x_128); -lean_ctor_set_uint8(x_201, sizeof(void*)*4, x_200); -x_202 = 1; -lean_ctor_set(x_1, 3, x_201); -lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_202); -return x_1; -} -} -} -} -} -} -} -} -else -{ -uint8_t x_203; -x_203 = l_Std_RBNode_isRed___rarg(x_35); -if (x_203 == 0) -{ -lean_object* x_204; uint8_t x_205; -x_204 = l_Std_RBNode_ins___at_Lean_Server_Watchdog_FileWorker_writeRequest___spec__2(x_35, x_2, x_3); -x_205 = 1; -lean_ctor_set(x_1, 0, x_204); -lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_205); -return x_1; -} -else -{ -lean_object* x_206; lean_object* x_207; -x_206 = l_Std_RBNode_ins___at_Lean_Server_Watchdog_FileWorker_writeRequest___spec__2(x_35, x_2, x_3); -x_207 = lean_ctor_get(x_206, 0); -lean_inc(x_207); -if (lean_obj_tag(x_207) == 0) -{ -lean_object* x_208; -x_208 = lean_ctor_get(x_206, 3); -lean_inc(x_208); -if (lean_obj_tag(x_208) == 0) -{ -uint8_t x_209; -x_209 = !lean_is_exclusive(x_206); -if (x_209 == 0) -{ -lean_object* x_210; lean_object* x_211; uint8_t x_212; uint8_t x_213; -x_210 = lean_ctor_get(x_206, 3); -lean_dec(x_210); -x_211 = lean_ctor_get(x_206, 0); -lean_dec(x_211); -x_212 = 0; -lean_ctor_set(x_206, 0, x_208); -lean_ctor_set_uint8(x_206, sizeof(void*)*4, x_212); -x_213 = 1; -lean_ctor_set(x_1, 0, x_206); -lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_213); -return x_1; -} -else -{ -lean_object* x_214; lean_object* x_215; uint8_t x_216; lean_object* x_217; uint8_t x_218; -x_214 = lean_ctor_get(x_206, 1); -x_215 = lean_ctor_get(x_206, 2); -lean_inc(x_215); -lean_inc(x_214); -lean_dec(x_206); -x_216 = 0; -x_217 = lean_alloc_ctor(1, 4, 1); -lean_ctor_set(x_217, 0, x_208); -lean_ctor_set(x_217, 1, x_214); -lean_ctor_set(x_217, 2, x_215); -lean_ctor_set(x_217, 3, x_208); -lean_ctor_set_uint8(x_217, sizeof(void*)*4, x_216); -x_218 = 1; -lean_ctor_set(x_1, 0, x_217); -lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_218); -return x_1; -} -} -else -{ -uint8_t x_219; -x_219 = lean_ctor_get_uint8(x_208, sizeof(void*)*4); -if (x_219 == 0) -{ -uint8_t x_220; -x_220 = !lean_is_exclusive(x_206); -if (x_220 == 0) -{ -lean_object* x_221; lean_object* x_222; lean_object* x_223; lean_object* x_224; uint8_t x_225; -x_221 = lean_ctor_get(x_206, 1); -x_222 = lean_ctor_get(x_206, 2); -x_223 = lean_ctor_get(x_206, 3); -lean_dec(x_223); -x_224 = lean_ctor_get(x_206, 0); -lean_dec(x_224); -x_225 = !lean_is_exclusive(x_208); -if (x_225 == 0) -{ -lean_object* x_226; lean_object* x_227; lean_object* x_228; lean_object* x_229; uint8_t x_230; uint8_t x_231; -x_226 = lean_ctor_get(x_208, 0); -x_227 = lean_ctor_get(x_208, 1); -x_228 = lean_ctor_get(x_208, 2); -x_229 = lean_ctor_get(x_208, 3); -x_230 = 1; -lean_ctor_set(x_208, 3, x_226); -lean_ctor_set(x_208, 2, x_222); -lean_ctor_set(x_208, 1, x_221); -lean_ctor_set(x_208, 0, x_207); -lean_ctor_set_uint8(x_208, sizeof(void*)*4, x_230); -lean_ctor_set(x_206, 3, x_38); -lean_ctor_set(x_206, 2, x_37); -lean_ctor_set(x_206, 1, x_36); -lean_ctor_set(x_206, 0, x_229); -lean_ctor_set_uint8(x_206, sizeof(void*)*4, x_230); -x_231 = 0; -lean_ctor_set(x_1, 3, x_206); -lean_ctor_set(x_1, 2, x_228); -lean_ctor_set(x_1, 1, x_227); -lean_ctor_set(x_1, 0, x_208); -lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_231); -return x_1; -} -else -{ -lean_object* x_232; lean_object* x_233; lean_object* x_234; lean_object* x_235; uint8_t x_236; lean_object* x_237; uint8_t x_238; -x_232 = lean_ctor_get(x_208, 0); -x_233 = lean_ctor_get(x_208, 1); -x_234 = lean_ctor_get(x_208, 2); -x_235 = lean_ctor_get(x_208, 3); -lean_inc(x_235); -lean_inc(x_234); -lean_inc(x_233); -lean_inc(x_232); -lean_dec(x_208); -x_236 = 1; -x_237 = lean_alloc_ctor(1, 4, 1); -lean_ctor_set(x_237, 0, x_207); -lean_ctor_set(x_237, 1, x_221); -lean_ctor_set(x_237, 2, x_222); -lean_ctor_set(x_237, 3, x_232); -lean_ctor_set_uint8(x_237, sizeof(void*)*4, x_236); -lean_ctor_set(x_206, 3, x_38); -lean_ctor_set(x_206, 2, x_37); -lean_ctor_set(x_206, 1, x_36); -lean_ctor_set(x_206, 0, x_235); -lean_ctor_set_uint8(x_206, sizeof(void*)*4, x_236); -x_238 = 0; -lean_ctor_set(x_1, 3, x_206); -lean_ctor_set(x_1, 2, x_234); -lean_ctor_set(x_1, 1, x_233); -lean_ctor_set(x_1, 0, x_237); -lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_238); -return x_1; -} -} -else -{ -lean_object* x_239; lean_object* x_240; lean_object* x_241; lean_object* x_242; lean_object* x_243; lean_object* x_244; lean_object* x_245; uint8_t x_246; lean_object* x_247; lean_object* x_248; uint8_t x_249; -x_239 = lean_ctor_get(x_206, 1); -x_240 = lean_ctor_get(x_206, 2); -lean_inc(x_240); -lean_inc(x_239); -lean_dec(x_206); -x_241 = lean_ctor_get(x_208, 0); -lean_inc(x_241); -x_242 = lean_ctor_get(x_208, 1); -lean_inc(x_242); -x_243 = lean_ctor_get(x_208, 2); -lean_inc(x_243); -x_244 = lean_ctor_get(x_208, 3); -lean_inc(x_244); -if (lean_is_exclusive(x_208)) { - lean_ctor_release(x_208, 0); - lean_ctor_release(x_208, 1); - lean_ctor_release(x_208, 2); - lean_ctor_release(x_208, 3); - x_245 = x_208; -} else { - lean_dec_ref(x_208); - x_245 = lean_box(0); -} -x_246 = 1; -if (lean_is_scalar(x_245)) { - x_247 = lean_alloc_ctor(1, 4, 1); -} else { - x_247 = x_245; -} -lean_ctor_set(x_247, 0, x_207); -lean_ctor_set(x_247, 1, x_239); -lean_ctor_set(x_247, 2, x_240); -lean_ctor_set(x_247, 3, x_241); -lean_ctor_set_uint8(x_247, sizeof(void*)*4, x_246); -x_248 = lean_alloc_ctor(1, 4, 1); -lean_ctor_set(x_248, 0, x_244); -lean_ctor_set(x_248, 1, x_36); -lean_ctor_set(x_248, 2, x_37); -lean_ctor_set(x_248, 3, x_38); -lean_ctor_set_uint8(x_248, sizeof(void*)*4, x_246); -x_249 = 0; -lean_ctor_set(x_1, 3, x_248); -lean_ctor_set(x_1, 2, x_243); -lean_ctor_set(x_1, 1, x_242); -lean_ctor_set(x_1, 0, x_247); -lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_249); -return x_1; -} -} -else -{ -uint8_t x_250; -x_250 = !lean_is_exclusive(x_206); -if (x_250 == 0) -{ -lean_object* x_251; lean_object* x_252; uint8_t x_253; uint8_t x_254; -x_251 = lean_ctor_get(x_206, 3); -lean_dec(x_251); -x_252 = lean_ctor_get(x_206, 0); -lean_dec(x_252); -x_253 = 0; -lean_ctor_set_uint8(x_206, sizeof(void*)*4, x_253); -x_254 = 1; -lean_ctor_set(x_1, 0, x_206); -lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_254); -return x_1; -} -else -{ -lean_object* x_255; lean_object* x_256; uint8_t x_257; lean_object* x_258; uint8_t x_259; -x_255 = lean_ctor_get(x_206, 1); -x_256 = lean_ctor_get(x_206, 2); -lean_inc(x_256); -lean_inc(x_255); -lean_dec(x_206); -x_257 = 0; -x_258 = lean_alloc_ctor(1, 4, 1); -lean_ctor_set(x_258, 0, x_207); -lean_ctor_set(x_258, 1, x_255); -lean_ctor_set(x_258, 2, x_256); -lean_ctor_set(x_258, 3, x_208); -lean_ctor_set_uint8(x_258, sizeof(void*)*4, x_257); -x_259 = 1; -lean_ctor_set(x_1, 0, x_258); -lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_259); -return x_1; -} -} -} -} -else -{ -uint8_t x_260; -x_260 = lean_ctor_get_uint8(x_207, sizeof(void*)*4); -if (x_260 == 0) -{ -uint8_t x_261; -x_261 = !lean_is_exclusive(x_206); -if (x_261 == 0) -{ -lean_object* x_262; lean_object* x_263; lean_object* x_264; lean_object* x_265; uint8_t x_266; -x_262 = lean_ctor_get(x_206, 1); -x_263 = lean_ctor_get(x_206, 2); -x_264 = lean_ctor_get(x_206, 3); -x_265 = lean_ctor_get(x_206, 0); -lean_dec(x_265); -x_266 = !lean_is_exclusive(x_207); -if (x_266 == 0) -{ -uint8_t x_267; uint8_t x_268; -x_267 = 1; -lean_ctor_set_uint8(x_207, sizeof(void*)*4, x_267); -lean_ctor_set(x_206, 3, x_38); -lean_ctor_set(x_206, 2, x_37); -lean_ctor_set(x_206, 1, x_36); -lean_ctor_set(x_206, 0, x_264); -lean_ctor_set_uint8(x_206, sizeof(void*)*4, x_267); -x_268 = 0; -lean_ctor_set(x_1, 3, x_206); -lean_ctor_set(x_1, 2, x_263); -lean_ctor_set(x_1, 1, x_262); -lean_ctor_set(x_1, 0, x_207); -lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_268); -return x_1; -} -else -{ -lean_object* x_269; lean_object* x_270; lean_object* x_271; lean_object* x_272; uint8_t x_273; lean_object* x_274; uint8_t x_275; -x_269 = lean_ctor_get(x_207, 0); -x_270 = lean_ctor_get(x_207, 1); -x_271 = lean_ctor_get(x_207, 2); -x_272 = lean_ctor_get(x_207, 3); -lean_inc(x_272); -lean_inc(x_271); -lean_inc(x_270); -lean_inc(x_269); -lean_dec(x_207); -x_273 = 1; -x_274 = lean_alloc_ctor(1, 4, 1); -lean_ctor_set(x_274, 0, x_269); -lean_ctor_set(x_274, 1, x_270); -lean_ctor_set(x_274, 2, x_271); -lean_ctor_set(x_274, 3, x_272); -lean_ctor_set_uint8(x_274, sizeof(void*)*4, x_273); -lean_ctor_set(x_206, 3, x_38); -lean_ctor_set(x_206, 2, x_37); -lean_ctor_set(x_206, 1, x_36); -lean_ctor_set(x_206, 0, x_264); -lean_ctor_set_uint8(x_206, sizeof(void*)*4, x_273); -x_275 = 0; -lean_ctor_set(x_1, 3, x_206); -lean_ctor_set(x_1, 2, x_263); -lean_ctor_set(x_1, 1, x_262); -lean_ctor_set(x_1, 0, x_274); -lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_275); -return x_1; -} -} -else -{ -lean_object* x_276; lean_object* x_277; lean_object* x_278; lean_object* x_279; lean_object* x_280; lean_object* x_281; lean_object* x_282; lean_object* x_283; uint8_t x_284; lean_object* x_285; lean_object* x_286; uint8_t x_287; -x_276 = lean_ctor_get(x_206, 1); -x_277 = lean_ctor_get(x_206, 2); -x_278 = lean_ctor_get(x_206, 3); -lean_inc(x_278); -lean_inc(x_277); -lean_inc(x_276); -lean_dec(x_206); -x_279 = lean_ctor_get(x_207, 0); -lean_inc(x_279); -x_280 = lean_ctor_get(x_207, 1); -lean_inc(x_280); -x_281 = lean_ctor_get(x_207, 2); -lean_inc(x_281); -x_282 = lean_ctor_get(x_207, 3); -lean_inc(x_282); -if (lean_is_exclusive(x_207)) { - lean_ctor_release(x_207, 0); - lean_ctor_release(x_207, 1); - lean_ctor_release(x_207, 2); - lean_ctor_release(x_207, 3); - x_283 = x_207; -} else { - lean_dec_ref(x_207); - x_283 = lean_box(0); -} -x_284 = 1; -if (lean_is_scalar(x_283)) { - x_285 = lean_alloc_ctor(1, 4, 1); -} else { - x_285 = x_283; -} -lean_ctor_set(x_285, 0, x_279); -lean_ctor_set(x_285, 1, x_280); -lean_ctor_set(x_285, 2, x_281); -lean_ctor_set(x_285, 3, x_282); -lean_ctor_set_uint8(x_285, sizeof(void*)*4, x_284); -x_286 = lean_alloc_ctor(1, 4, 1); -lean_ctor_set(x_286, 0, x_278); -lean_ctor_set(x_286, 1, x_36); -lean_ctor_set(x_286, 2, x_37); -lean_ctor_set(x_286, 3, x_38); -lean_ctor_set_uint8(x_286, sizeof(void*)*4, x_284); -x_287 = 0; -lean_ctor_set(x_1, 3, x_286); -lean_ctor_set(x_1, 2, x_277); -lean_ctor_set(x_1, 1, x_276); -lean_ctor_set(x_1, 0, x_285); -lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_287); -return x_1; -} -} -else -{ -lean_object* x_288; -x_288 = lean_ctor_get(x_206, 3); -lean_inc(x_288); -if (lean_obj_tag(x_288) == 0) -{ -uint8_t x_289; -x_289 = !lean_is_exclusive(x_206); -if (x_289 == 0) -{ -lean_object* x_290; lean_object* x_291; uint8_t x_292; uint8_t x_293; -x_290 = lean_ctor_get(x_206, 3); -lean_dec(x_290); -x_291 = lean_ctor_get(x_206, 0); -lean_dec(x_291); -x_292 = 0; -lean_ctor_set_uint8(x_206, sizeof(void*)*4, x_292); -x_293 = 1; -lean_ctor_set(x_1, 0, x_206); -lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_293); -return x_1; -} -else -{ -lean_object* x_294; lean_object* x_295; uint8_t x_296; lean_object* x_297; uint8_t x_298; -x_294 = lean_ctor_get(x_206, 1); -x_295 = lean_ctor_get(x_206, 2); -lean_inc(x_295); -lean_inc(x_294); -lean_dec(x_206); -x_296 = 0; -x_297 = lean_alloc_ctor(1, 4, 1); -lean_ctor_set(x_297, 0, x_207); -lean_ctor_set(x_297, 1, x_294); -lean_ctor_set(x_297, 2, x_295); -lean_ctor_set(x_297, 3, x_288); -lean_ctor_set_uint8(x_297, sizeof(void*)*4, x_296); -x_298 = 1; -lean_ctor_set(x_1, 0, x_297); -lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_298); -return x_1; -} -} -else -{ -uint8_t x_299; -x_299 = lean_ctor_get_uint8(x_288, sizeof(void*)*4); -if (x_299 == 0) -{ -uint8_t x_300; -lean_free_object(x_1); -x_300 = !lean_is_exclusive(x_206); -if (x_300 == 0) -{ -lean_object* x_301; lean_object* x_302; lean_object* x_303; lean_object* x_304; uint8_t x_305; -x_301 = lean_ctor_get(x_206, 1); -x_302 = lean_ctor_get(x_206, 2); -x_303 = lean_ctor_get(x_206, 3); -lean_dec(x_303); -x_304 = lean_ctor_get(x_206, 0); -lean_dec(x_304); -x_305 = !lean_is_exclusive(x_288); -if (x_305 == 0) -{ -lean_object* x_306; lean_object* x_307; lean_object* x_308; lean_object* x_309; uint8_t x_310; uint8_t x_311; -x_306 = lean_ctor_get(x_288, 0); -x_307 = lean_ctor_get(x_288, 1); -x_308 = lean_ctor_get(x_288, 2); -x_309 = lean_ctor_get(x_288, 3); -x_310 = 1; -lean_inc(x_207); -lean_ctor_set(x_288, 3, x_306); -lean_ctor_set(x_288, 2, x_302); -lean_ctor_set(x_288, 1, x_301); -lean_ctor_set(x_288, 0, x_207); -x_311 = !lean_is_exclusive(x_207); -if (x_311 == 0) -{ -lean_object* x_312; lean_object* x_313; lean_object* x_314; lean_object* x_315; uint8_t x_316; -x_312 = lean_ctor_get(x_207, 3); -lean_dec(x_312); -x_313 = lean_ctor_get(x_207, 2); -lean_dec(x_313); -x_314 = lean_ctor_get(x_207, 1); -lean_dec(x_314); -x_315 = lean_ctor_get(x_207, 0); -lean_dec(x_315); -lean_ctor_set_uint8(x_288, sizeof(void*)*4, x_310); -lean_ctor_set(x_207, 3, x_38); -lean_ctor_set(x_207, 2, x_37); -lean_ctor_set(x_207, 1, x_36); -lean_ctor_set(x_207, 0, x_309); -lean_ctor_set_uint8(x_207, sizeof(void*)*4, x_310); -x_316 = 0; -lean_ctor_set(x_206, 3, x_207); -lean_ctor_set(x_206, 2, x_308); -lean_ctor_set(x_206, 1, x_307); -lean_ctor_set(x_206, 0, x_288); -lean_ctor_set_uint8(x_206, sizeof(void*)*4, x_316); -return x_206; -} -else -{ -lean_object* x_317; uint8_t x_318; -lean_dec(x_207); -lean_ctor_set_uint8(x_288, sizeof(void*)*4, x_310); -x_317 = lean_alloc_ctor(1, 4, 1); -lean_ctor_set(x_317, 0, x_309); -lean_ctor_set(x_317, 1, x_36); -lean_ctor_set(x_317, 2, x_37); -lean_ctor_set(x_317, 3, x_38); -lean_ctor_set_uint8(x_317, sizeof(void*)*4, x_310); -x_318 = 0; -lean_ctor_set(x_206, 3, x_317); -lean_ctor_set(x_206, 2, x_308); -lean_ctor_set(x_206, 1, x_307); -lean_ctor_set(x_206, 0, x_288); -lean_ctor_set_uint8(x_206, sizeof(void*)*4, x_318); -return x_206; -} -} -else -{ -lean_object* x_319; lean_object* x_320; lean_object* x_321; lean_object* x_322; uint8_t x_323; lean_object* x_324; lean_object* x_325; lean_object* x_326; uint8_t x_327; -x_319 = lean_ctor_get(x_288, 0); -x_320 = lean_ctor_get(x_288, 1); -x_321 = lean_ctor_get(x_288, 2); -x_322 = lean_ctor_get(x_288, 3); -lean_inc(x_322); -lean_inc(x_321); -lean_inc(x_320); -lean_inc(x_319); -lean_dec(x_288); -x_323 = 1; -lean_inc(x_207); -x_324 = lean_alloc_ctor(1, 4, 1); -lean_ctor_set(x_324, 0, x_207); -lean_ctor_set(x_324, 1, x_301); -lean_ctor_set(x_324, 2, x_302); -lean_ctor_set(x_324, 3, x_319); -if (lean_is_exclusive(x_207)) { - lean_ctor_release(x_207, 0); - lean_ctor_release(x_207, 1); - lean_ctor_release(x_207, 2); - lean_ctor_release(x_207, 3); - x_325 = x_207; -} else { - lean_dec_ref(x_207); - x_325 = lean_box(0); -} -lean_ctor_set_uint8(x_324, sizeof(void*)*4, x_323); -if (lean_is_scalar(x_325)) { - x_326 = lean_alloc_ctor(1, 4, 1); -} else { - x_326 = x_325; -} -lean_ctor_set(x_326, 0, x_322); -lean_ctor_set(x_326, 1, x_36); -lean_ctor_set(x_326, 2, x_37); -lean_ctor_set(x_326, 3, x_38); -lean_ctor_set_uint8(x_326, sizeof(void*)*4, x_323); -x_327 = 0; -lean_ctor_set(x_206, 3, x_326); -lean_ctor_set(x_206, 2, x_321); -lean_ctor_set(x_206, 1, x_320); -lean_ctor_set(x_206, 0, x_324); -lean_ctor_set_uint8(x_206, sizeof(void*)*4, x_327); -return x_206; -} -} -else -{ -lean_object* x_328; lean_object* x_329; lean_object* x_330; lean_object* x_331; lean_object* x_332; lean_object* x_333; lean_object* x_334; uint8_t x_335; lean_object* x_336; lean_object* x_337; lean_object* x_338; uint8_t x_339; lean_object* x_340; -x_328 = lean_ctor_get(x_206, 1); -x_329 = lean_ctor_get(x_206, 2); -lean_inc(x_329); -lean_inc(x_328); -lean_dec(x_206); -x_330 = lean_ctor_get(x_288, 0); -lean_inc(x_330); -x_331 = lean_ctor_get(x_288, 1); -lean_inc(x_331); -x_332 = lean_ctor_get(x_288, 2); -lean_inc(x_332); -x_333 = lean_ctor_get(x_288, 3); -lean_inc(x_333); -if (lean_is_exclusive(x_288)) { - lean_ctor_release(x_288, 0); - lean_ctor_release(x_288, 1); - lean_ctor_release(x_288, 2); - lean_ctor_release(x_288, 3); - x_334 = x_288; -} else { - lean_dec_ref(x_288); - x_334 = lean_box(0); -} -x_335 = 1; -lean_inc(x_207); -if (lean_is_scalar(x_334)) { - x_336 = lean_alloc_ctor(1, 4, 1); -} else { - x_336 = x_334; -} -lean_ctor_set(x_336, 0, x_207); -lean_ctor_set(x_336, 1, x_328); -lean_ctor_set(x_336, 2, x_329); -lean_ctor_set(x_336, 3, x_330); -if (lean_is_exclusive(x_207)) { - lean_ctor_release(x_207, 0); - lean_ctor_release(x_207, 1); - lean_ctor_release(x_207, 2); - lean_ctor_release(x_207, 3); - x_337 = x_207; -} else { - lean_dec_ref(x_207); - x_337 = lean_box(0); -} -lean_ctor_set_uint8(x_336, sizeof(void*)*4, x_335); -if (lean_is_scalar(x_337)) { - x_338 = lean_alloc_ctor(1, 4, 1); -} else { - x_338 = x_337; -} -lean_ctor_set(x_338, 0, x_333); -lean_ctor_set(x_338, 1, x_36); -lean_ctor_set(x_338, 2, x_37); -lean_ctor_set(x_338, 3, x_38); -lean_ctor_set_uint8(x_338, sizeof(void*)*4, x_335); -x_339 = 0; -x_340 = lean_alloc_ctor(1, 4, 1); -lean_ctor_set(x_340, 0, x_336); -lean_ctor_set(x_340, 1, x_331); -lean_ctor_set(x_340, 2, x_332); -lean_ctor_set(x_340, 3, x_338); -lean_ctor_set_uint8(x_340, sizeof(void*)*4, x_339); -return x_340; -} -} -else -{ -uint8_t x_341; -x_341 = !lean_is_exclusive(x_206); -if (x_341 == 0) -{ -lean_object* x_342; lean_object* x_343; uint8_t x_344; -x_342 = lean_ctor_get(x_206, 3); -lean_dec(x_342); -x_343 = lean_ctor_get(x_206, 0); -lean_dec(x_343); -x_344 = !lean_is_exclusive(x_207); -if (x_344 == 0) -{ -uint8_t x_345; uint8_t x_346; -lean_ctor_set_uint8(x_207, sizeof(void*)*4, x_299); -x_345 = 0; -lean_ctor_set_uint8(x_206, sizeof(void*)*4, x_345); -x_346 = 1; -lean_ctor_set(x_1, 0, x_206); -lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_346); -return x_1; -} -else -{ -lean_object* x_347; lean_object* x_348; lean_object* x_349; lean_object* x_350; lean_object* x_351; uint8_t x_352; uint8_t x_353; -x_347 = lean_ctor_get(x_207, 0); -x_348 = lean_ctor_get(x_207, 1); -x_349 = lean_ctor_get(x_207, 2); -x_350 = lean_ctor_get(x_207, 3); -lean_inc(x_350); -lean_inc(x_349); -lean_inc(x_348); -lean_inc(x_347); -lean_dec(x_207); -x_351 = lean_alloc_ctor(1, 4, 1); -lean_ctor_set(x_351, 0, x_347); -lean_ctor_set(x_351, 1, x_348); -lean_ctor_set(x_351, 2, x_349); -lean_ctor_set(x_351, 3, x_350); -lean_ctor_set_uint8(x_351, sizeof(void*)*4, x_299); -x_352 = 0; -lean_ctor_set(x_206, 0, x_351); -lean_ctor_set_uint8(x_206, sizeof(void*)*4, x_352); -x_353 = 1; -lean_ctor_set(x_1, 0, x_206); -lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_353); -return x_1; -} -} -else -{ -lean_object* x_354; lean_object* x_355; lean_object* x_356; lean_object* x_357; lean_object* x_358; lean_object* x_359; lean_object* x_360; lean_object* x_361; uint8_t x_362; lean_object* x_363; uint8_t x_364; -x_354 = lean_ctor_get(x_206, 1); -x_355 = lean_ctor_get(x_206, 2); -lean_inc(x_355); -lean_inc(x_354); -lean_dec(x_206); -x_356 = lean_ctor_get(x_207, 0); -lean_inc(x_356); -x_357 = lean_ctor_get(x_207, 1); -lean_inc(x_357); -x_358 = lean_ctor_get(x_207, 2); -lean_inc(x_358); -x_359 = lean_ctor_get(x_207, 3); -lean_inc(x_359); -if (lean_is_exclusive(x_207)) { - lean_ctor_release(x_207, 0); - lean_ctor_release(x_207, 1); - lean_ctor_release(x_207, 2); - lean_ctor_release(x_207, 3); - x_360 = x_207; -} else { - lean_dec_ref(x_207); - x_360 = lean_box(0); -} -if (lean_is_scalar(x_360)) { - x_361 = lean_alloc_ctor(1, 4, 1); -} else { - x_361 = x_360; -} -lean_ctor_set(x_361, 0, x_356); -lean_ctor_set(x_361, 1, x_357); -lean_ctor_set(x_361, 2, x_358); -lean_ctor_set(x_361, 3, x_359); -lean_ctor_set_uint8(x_361, sizeof(void*)*4, x_299); -x_362 = 0; -x_363 = lean_alloc_ctor(1, 4, 1); -lean_ctor_set(x_363, 0, x_361); -lean_ctor_set(x_363, 1, x_354); -lean_ctor_set(x_363, 2, x_355); -lean_ctor_set(x_363, 3, x_288); -lean_ctor_set_uint8(x_363, sizeof(void*)*4, x_362); -x_364 = 1; -lean_ctor_set(x_1, 0, x_363); -lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_364); -return x_1; -} -} -} -} -} -} -} -} -else -{ -lean_object* x_365; lean_object* x_366; lean_object* x_367; lean_object* x_368; uint8_t x_369; -x_365 = lean_ctor_get(x_1, 0); -x_366 = lean_ctor_get(x_1, 1); -x_367 = lean_ctor_get(x_1, 2); -x_368 = lean_ctor_get(x_1, 3); -lean_inc(x_368); -lean_inc(x_367); -lean_inc(x_366); -lean_inc(x_365); -lean_dec(x_1); -lean_inc(x_366); -lean_inc(x_2); -x_369 = l___private_Lean_Data_JsonRpc_0__Lean_JsonRpc_RequestID_lt(x_2, x_366); -if (x_369 == 0) -{ -uint8_t x_370; -lean_inc(x_2); -lean_inc(x_366); -x_370 = l___private_Lean_Data_JsonRpc_0__Lean_JsonRpc_RequestID_lt(x_366, x_2); -if (x_370 == 0) -{ -uint8_t x_371; lean_object* x_372; -lean_dec(x_367); -lean_dec(x_366); -x_371 = 1; -x_372 = lean_alloc_ctor(1, 4, 1); -lean_ctor_set(x_372, 0, x_365); -lean_ctor_set(x_372, 1, x_2); -lean_ctor_set(x_372, 2, x_3); -lean_ctor_set(x_372, 3, x_368); -lean_ctor_set_uint8(x_372, sizeof(void*)*4, x_371); -return x_372; -} -else -{ -uint8_t x_373; -x_373 = l_Std_RBNode_isRed___rarg(x_368); -if (x_373 == 0) -{ -lean_object* x_374; uint8_t x_375; lean_object* x_376; -x_374 = l_Std_RBNode_ins___at_Lean_Server_Watchdog_FileWorker_writeRequest___spec__2(x_368, x_2, x_3); -x_375 = 1; -x_376 = lean_alloc_ctor(1, 4, 1); -lean_ctor_set(x_376, 0, x_365); -lean_ctor_set(x_376, 1, x_366); -lean_ctor_set(x_376, 2, x_367); -lean_ctor_set(x_376, 3, x_374); -lean_ctor_set_uint8(x_376, sizeof(void*)*4, x_375); -return x_376; -} -else -{ -lean_object* x_377; lean_object* x_378; -x_377 = l_Std_RBNode_ins___at_Lean_Server_Watchdog_FileWorker_writeRequest___spec__2(x_368, x_2, x_3); -x_378 = lean_ctor_get(x_377, 0); -lean_inc(x_378); -if (lean_obj_tag(x_378) == 0) -{ -lean_object* x_379; -x_379 = lean_ctor_get(x_377, 3); -lean_inc(x_379); -if (lean_obj_tag(x_379) == 0) -{ -lean_object* x_380; lean_object* x_381; lean_object* x_382; uint8_t x_383; lean_object* x_384; uint8_t x_385; lean_object* x_386; -x_380 = lean_ctor_get(x_377, 1); -lean_inc(x_380); -x_381 = lean_ctor_get(x_377, 2); -lean_inc(x_381); -if (lean_is_exclusive(x_377)) { - lean_ctor_release(x_377, 0); - lean_ctor_release(x_377, 1); - lean_ctor_release(x_377, 2); - lean_ctor_release(x_377, 3); - x_382 = x_377; -} else { - lean_dec_ref(x_377); - x_382 = lean_box(0); -} -x_383 = 0; -if (lean_is_scalar(x_382)) { - x_384 = lean_alloc_ctor(1, 4, 1); -} else { - x_384 = x_382; -} -lean_ctor_set(x_384, 0, x_379); -lean_ctor_set(x_384, 1, x_380); -lean_ctor_set(x_384, 2, x_381); -lean_ctor_set(x_384, 3, x_379); -lean_ctor_set_uint8(x_384, sizeof(void*)*4, x_383); -x_385 = 1; -x_386 = lean_alloc_ctor(1, 4, 1); -lean_ctor_set(x_386, 0, x_365); -lean_ctor_set(x_386, 1, x_366); -lean_ctor_set(x_386, 2, x_367); -lean_ctor_set(x_386, 3, x_384); -lean_ctor_set_uint8(x_386, sizeof(void*)*4, x_385); -return x_386; -} -else -{ -uint8_t x_387; -x_387 = lean_ctor_get_uint8(x_379, sizeof(void*)*4); -if (x_387 == 0) -{ -lean_object* x_388; lean_object* x_389; lean_object* x_390; lean_object* x_391; lean_object* x_392; lean_object* x_393; lean_object* x_394; lean_object* x_395; uint8_t x_396; lean_object* x_397; lean_object* x_398; uint8_t x_399; lean_object* x_400; -x_388 = lean_ctor_get(x_377, 1); -lean_inc(x_388); -x_389 = lean_ctor_get(x_377, 2); -lean_inc(x_389); -if (lean_is_exclusive(x_377)) { - lean_ctor_release(x_377, 0); - lean_ctor_release(x_377, 1); - lean_ctor_release(x_377, 2); - lean_ctor_release(x_377, 3); - x_390 = x_377; -} else { - lean_dec_ref(x_377); - x_390 = lean_box(0); -} -x_391 = lean_ctor_get(x_379, 0); -lean_inc(x_391); -x_392 = lean_ctor_get(x_379, 1); -lean_inc(x_392); -x_393 = lean_ctor_get(x_379, 2); -lean_inc(x_393); -x_394 = lean_ctor_get(x_379, 3); -lean_inc(x_394); -if (lean_is_exclusive(x_379)) { - lean_ctor_release(x_379, 0); - lean_ctor_release(x_379, 1); - lean_ctor_release(x_379, 2); - lean_ctor_release(x_379, 3); - x_395 = x_379; -} else { - lean_dec_ref(x_379); - x_395 = lean_box(0); -} -x_396 = 1; -if (lean_is_scalar(x_395)) { - x_397 = lean_alloc_ctor(1, 4, 1); -} else { - x_397 = x_395; -} -lean_ctor_set(x_397, 0, x_365); -lean_ctor_set(x_397, 1, x_366); -lean_ctor_set(x_397, 2, x_367); -lean_ctor_set(x_397, 3, x_378); -lean_ctor_set_uint8(x_397, sizeof(void*)*4, x_396); -if (lean_is_scalar(x_390)) { - x_398 = lean_alloc_ctor(1, 4, 1); -} else { - x_398 = x_390; -} -lean_ctor_set(x_398, 0, x_391); -lean_ctor_set(x_398, 1, x_392); -lean_ctor_set(x_398, 2, x_393); -lean_ctor_set(x_398, 3, x_394); -lean_ctor_set_uint8(x_398, sizeof(void*)*4, x_396); -x_399 = 0; -x_400 = lean_alloc_ctor(1, 4, 1); -lean_ctor_set(x_400, 0, x_397); -lean_ctor_set(x_400, 1, x_388); -lean_ctor_set(x_400, 2, x_389); -lean_ctor_set(x_400, 3, x_398); -lean_ctor_set_uint8(x_400, sizeof(void*)*4, x_399); -return x_400; -} -else -{ -lean_object* x_401; lean_object* x_402; lean_object* x_403; uint8_t x_404; lean_object* x_405; uint8_t x_406; lean_object* x_407; -x_401 = lean_ctor_get(x_377, 1); -lean_inc(x_401); -x_402 = lean_ctor_get(x_377, 2); -lean_inc(x_402); -if (lean_is_exclusive(x_377)) { - lean_ctor_release(x_377, 0); - lean_ctor_release(x_377, 1); - lean_ctor_release(x_377, 2); - lean_ctor_release(x_377, 3); - x_403 = x_377; -} else { - lean_dec_ref(x_377); - x_403 = lean_box(0); -} -x_404 = 0; -if (lean_is_scalar(x_403)) { - x_405 = lean_alloc_ctor(1, 4, 1); -} else { - x_405 = x_403; -} -lean_ctor_set(x_405, 0, x_378); -lean_ctor_set(x_405, 1, x_401); -lean_ctor_set(x_405, 2, x_402); -lean_ctor_set(x_405, 3, x_379); -lean_ctor_set_uint8(x_405, sizeof(void*)*4, x_404); -x_406 = 1; -x_407 = lean_alloc_ctor(1, 4, 1); -lean_ctor_set(x_407, 0, x_365); -lean_ctor_set(x_407, 1, x_366); -lean_ctor_set(x_407, 2, x_367); -lean_ctor_set(x_407, 3, x_405); -lean_ctor_set_uint8(x_407, sizeof(void*)*4, x_406); -return x_407; -} -} -} -else -{ -uint8_t x_408; -x_408 = lean_ctor_get_uint8(x_378, sizeof(void*)*4); -if (x_408 == 0) -{ -lean_object* x_409; lean_object* x_410; lean_object* x_411; lean_object* x_412; lean_object* x_413; lean_object* x_414; lean_object* x_415; lean_object* x_416; lean_object* x_417; uint8_t x_418; lean_object* x_419; lean_object* x_420; uint8_t x_421; lean_object* x_422; -x_409 = lean_ctor_get(x_377, 1); -lean_inc(x_409); -x_410 = lean_ctor_get(x_377, 2); -lean_inc(x_410); -x_411 = lean_ctor_get(x_377, 3); -lean_inc(x_411); -if (lean_is_exclusive(x_377)) { - lean_ctor_release(x_377, 0); - lean_ctor_release(x_377, 1); - lean_ctor_release(x_377, 2); - lean_ctor_release(x_377, 3); - x_412 = x_377; -} else { - lean_dec_ref(x_377); - x_412 = lean_box(0); -} -x_413 = lean_ctor_get(x_378, 0); -lean_inc(x_413); -x_414 = lean_ctor_get(x_378, 1); -lean_inc(x_414); -x_415 = lean_ctor_get(x_378, 2); -lean_inc(x_415); -x_416 = lean_ctor_get(x_378, 3); -lean_inc(x_416); -if (lean_is_exclusive(x_378)) { - lean_ctor_release(x_378, 0); - lean_ctor_release(x_378, 1); - lean_ctor_release(x_378, 2); - lean_ctor_release(x_378, 3); - x_417 = x_378; -} else { - lean_dec_ref(x_378); - x_417 = lean_box(0); -} -x_418 = 1; -if (lean_is_scalar(x_417)) { - x_419 = lean_alloc_ctor(1, 4, 1); -} else { - x_419 = x_417; -} -lean_ctor_set(x_419, 0, x_365); -lean_ctor_set(x_419, 1, x_366); -lean_ctor_set(x_419, 2, x_367); -lean_ctor_set(x_419, 3, x_413); -lean_ctor_set_uint8(x_419, sizeof(void*)*4, x_418); -if (lean_is_scalar(x_412)) { - x_420 = lean_alloc_ctor(1, 4, 1); -} else { - x_420 = x_412; -} -lean_ctor_set(x_420, 0, x_416); -lean_ctor_set(x_420, 1, x_409); -lean_ctor_set(x_420, 2, x_410); -lean_ctor_set(x_420, 3, x_411); -lean_ctor_set_uint8(x_420, sizeof(void*)*4, x_418); -x_421 = 0; -x_422 = lean_alloc_ctor(1, 4, 1); -lean_ctor_set(x_422, 0, x_419); -lean_ctor_set(x_422, 1, x_414); -lean_ctor_set(x_422, 2, x_415); -lean_ctor_set(x_422, 3, x_420); -lean_ctor_set_uint8(x_422, sizeof(void*)*4, x_421); -return x_422; -} -else -{ -lean_object* x_423; -x_423 = lean_ctor_get(x_377, 3); -lean_inc(x_423); -if (lean_obj_tag(x_423) == 0) -{ -lean_object* x_424; lean_object* x_425; lean_object* x_426; uint8_t x_427; lean_object* x_428; uint8_t x_429; lean_object* x_430; -x_424 = lean_ctor_get(x_377, 1); -lean_inc(x_424); -x_425 = lean_ctor_get(x_377, 2); -lean_inc(x_425); -if (lean_is_exclusive(x_377)) { - lean_ctor_release(x_377, 0); - lean_ctor_release(x_377, 1); - lean_ctor_release(x_377, 2); - lean_ctor_release(x_377, 3); - x_426 = x_377; -} else { - lean_dec_ref(x_377); - x_426 = lean_box(0); -} -x_427 = 0; -if (lean_is_scalar(x_426)) { - x_428 = lean_alloc_ctor(1, 4, 1); -} else { - x_428 = x_426; -} -lean_ctor_set(x_428, 0, x_378); -lean_ctor_set(x_428, 1, x_424); -lean_ctor_set(x_428, 2, x_425); -lean_ctor_set(x_428, 3, x_423); -lean_ctor_set_uint8(x_428, sizeof(void*)*4, x_427); -x_429 = 1; -x_430 = lean_alloc_ctor(1, 4, 1); -lean_ctor_set(x_430, 0, x_365); -lean_ctor_set(x_430, 1, x_366); -lean_ctor_set(x_430, 2, x_367); -lean_ctor_set(x_430, 3, x_428); -lean_ctor_set_uint8(x_430, sizeof(void*)*4, x_429); -return x_430; -} -else -{ -uint8_t x_431; -x_431 = lean_ctor_get_uint8(x_423, sizeof(void*)*4); -if (x_431 == 0) -{ -lean_object* x_432; lean_object* x_433; lean_object* x_434; lean_object* x_435; lean_object* x_436; lean_object* x_437; lean_object* x_438; lean_object* x_439; uint8_t x_440; lean_object* x_441; lean_object* x_442; lean_object* x_443; uint8_t x_444; lean_object* x_445; -x_432 = lean_ctor_get(x_377, 1); -lean_inc(x_432); -x_433 = lean_ctor_get(x_377, 2); -lean_inc(x_433); -if (lean_is_exclusive(x_377)) { - lean_ctor_release(x_377, 0); - lean_ctor_release(x_377, 1); - lean_ctor_release(x_377, 2); - lean_ctor_release(x_377, 3); - x_434 = x_377; -} else { - lean_dec_ref(x_377); - x_434 = lean_box(0); -} -x_435 = lean_ctor_get(x_423, 0); -lean_inc(x_435); -x_436 = lean_ctor_get(x_423, 1); -lean_inc(x_436); -x_437 = lean_ctor_get(x_423, 2); -lean_inc(x_437); -x_438 = lean_ctor_get(x_423, 3); -lean_inc(x_438); -if (lean_is_exclusive(x_423)) { - lean_ctor_release(x_423, 0); - lean_ctor_release(x_423, 1); - lean_ctor_release(x_423, 2); - lean_ctor_release(x_423, 3); - x_439 = x_423; -} else { - lean_dec_ref(x_423); - x_439 = lean_box(0); -} -x_440 = 1; -lean_inc(x_378); -if (lean_is_scalar(x_439)) { - x_441 = lean_alloc_ctor(1, 4, 1); -} else { - x_441 = x_439; -} -lean_ctor_set(x_441, 0, x_365); -lean_ctor_set(x_441, 1, x_366); -lean_ctor_set(x_441, 2, x_367); -lean_ctor_set(x_441, 3, x_378); -if (lean_is_exclusive(x_378)) { - lean_ctor_release(x_378, 0); - lean_ctor_release(x_378, 1); - lean_ctor_release(x_378, 2); - lean_ctor_release(x_378, 3); - x_442 = x_378; -} else { - lean_dec_ref(x_378); - x_442 = lean_box(0); -} -lean_ctor_set_uint8(x_441, sizeof(void*)*4, x_440); -if (lean_is_scalar(x_442)) { - x_443 = lean_alloc_ctor(1, 4, 1); -} else { - x_443 = x_442; -} -lean_ctor_set(x_443, 0, x_435); -lean_ctor_set(x_443, 1, x_436); -lean_ctor_set(x_443, 2, x_437); -lean_ctor_set(x_443, 3, x_438); -lean_ctor_set_uint8(x_443, sizeof(void*)*4, x_440); -x_444 = 0; -if (lean_is_scalar(x_434)) { - x_445 = lean_alloc_ctor(1, 4, 1); -} else { - x_445 = x_434; -} -lean_ctor_set(x_445, 0, x_441); -lean_ctor_set(x_445, 1, x_432); -lean_ctor_set(x_445, 2, x_433); -lean_ctor_set(x_445, 3, x_443); -lean_ctor_set_uint8(x_445, sizeof(void*)*4, x_444); -return x_445; -} -else -{ -lean_object* x_446; lean_object* x_447; lean_object* x_448; lean_object* x_449; lean_object* x_450; lean_object* x_451; lean_object* x_452; lean_object* x_453; lean_object* x_454; uint8_t x_455; lean_object* x_456; uint8_t x_457; lean_object* x_458; -x_446 = lean_ctor_get(x_377, 1); -lean_inc(x_446); -x_447 = lean_ctor_get(x_377, 2); -lean_inc(x_447); -if (lean_is_exclusive(x_377)) { - lean_ctor_release(x_377, 0); - lean_ctor_release(x_377, 1); - lean_ctor_release(x_377, 2); - lean_ctor_release(x_377, 3); - x_448 = x_377; -} else { - lean_dec_ref(x_377); - x_448 = lean_box(0); -} -x_449 = lean_ctor_get(x_378, 0); -lean_inc(x_449); -x_450 = lean_ctor_get(x_378, 1); -lean_inc(x_450); -x_451 = lean_ctor_get(x_378, 2); -lean_inc(x_451); -x_452 = lean_ctor_get(x_378, 3); -lean_inc(x_452); -if (lean_is_exclusive(x_378)) { - lean_ctor_release(x_378, 0); - lean_ctor_release(x_378, 1); - lean_ctor_release(x_378, 2); - lean_ctor_release(x_378, 3); - x_453 = x_378; -} else { - lean_dec_ref(x_378); - x_453 = lean_box(0); -} -if (lean_is_scalar(x_453)) { - x_454 = lean_alloc_ctor(1, 4, 1); -} else { - x_454 = x_453; -} -lean_ctor_set(x_454, 0, x_449); -lean_ctor_set(x_454, 1, x_450); -lean_ctor_set(x_454, 2, x_451); -lean_ctor_set(x_454, 3, x_452); -lean_ctor_set_uint8(x_454, sizeof(void*)*4, x_431); -x_455 = 0; -if (lean_is_scalar(x_448)) { - x_456 = lean_alloc_ctor(1, 4, 1); -} else { - x_456 = x_448; -} -lean_ctor_set(x_456, 0, x_454); -lean_ctor_set(x_456, 1, x_446); -lean_ctor_set(x_456, 2, x_447); -lean_ctor_set(x_456, 3, x_423); -lean_ctor_set_uint8(x_456, sizeof(void*)*4, x_455); -x_457 = 1; -x_458 = lean_alloc_ctor(1, 4, 1); -lean_ctor_set(x_458, 0, x_365); -lean_ctor_set(x_458, 1, x_366); -lean_ctor_set(x_458, 2, x_367); -lean_ctor_set(x_458, 3, x_456); -lean_ctor_set_uint8(x_458, sizeof(void*)*4, x_457); -return x_458; -} -} -} -} -} -} -} -else -{ -uint8_t x_459; -x_459 = l_Std_RBNode_isRed___rarg(x_365); -if (x_459 == 0) -{ -lean_object* x_460; uint8_t x_461; lean_object* x_462; -x_460 = l_Std_RBNode_ins___at_Lean_Server_Watchdog_FileWorker_writeRequest___spec__2(x_365, x_2, x_3); -x_461 = 1; -x_462 = lean_alloc_ctor(1, 4, 1); -lean_ctor_set(x_462, 0, x_460); -lean_ctor_set(x_462, 1, x_366); -lean_ctor_set(x_462, 2, x_367); -lean_ctor_set(x_462, 3, x_368); -lean_ctor_set_uint8(x_462, sizeof(void*)*4, x_461); -return x_462; -} -else -{ -lean_object* x_463; lean_object* x_464; -x_463 = l_Std_RBNode_ins___at_Lean_Server_Watchdog_FileWorker_writeRequest___spec__2(x_365, x_2, x_3); -x_464 = lean_ctor_get(x_463, 0); -lean_inc(x_464); -if (lean_obj_tag(x_464) == 0) -{ -lean_object* x_465; -x_465 = lean_ctor_get(x_463, 3); -lean_inc(x_465); -if (lean_obj_tag(x_465) == 0) -{ -lean_object* x_466; lean_object* x_467; lean_object* x_468; uint8_t x_469; lean_object* x_470; uint8_t x_471; lean_object* x_472; -x_466 = lean_ctor_get(x_463, 1); -lean_inc(x_466); -x_467 = lean_ctor_get(x_463, 2); -lean_inc(x_467); -if (lean_is_exclusive(x_463)) { - lean_ctor_release(x_463, 0); - lean_ctor_release(x_463, 1); - lean_ctor_release(x_463, 2); - lean_ctor_release(x_463, 3); - x_468 = x_463; -} else { - lean_dec_ref(x_463); - x_468 = lean_box(0); -} -x_469 = 0; -if (lean_is_scalar(x_468)) { - x_470 = lean_alloc_ctor(1, 4, 1); -} else { - x_470 = x_468; -} -lean_ctor_set(x_470, 0, x_465); -lean_ctor_set(x_470, 1, x_466); -lean_ctor_set(x_470, 2, x_467); -lean_ctor_set(x_470, 3, x_465); -lean_ctor_set_uint8(x_470, sizeof(void*)*4, x_469); -x_471 = 1; -x_472 = lean_alloc_ctor(1, 4, 1); -lean_ctor_set(x_472, 0, x_470); -lean_ctor_set(x_472, 1, x_366); -lean_ctor_set(x_472, 2, x_367); -lean_ctor_set(x_472, 3, x_368); -lean_ctor_set_uint8(x_472, sizeof(void*)*4, x_471); -return x_472; -} -else -{ -uint8_t x_473; -x_473 = lean_ctor_get_uint8(x_465, sizeof(void*)*4); -if (x_473 == 0) -{ -lean_object* x_474; lean_object* x_475; lean_object* x_476; lean_object* x_477; lean_object* x_478; lean_object* x_479; lean_object* x_480; lean_object* x_481; uint8_t x_482; lean_object* x_483; lean_object* x_484; uint8_t x_485; lean_object* x_486; -x_474 = lean_ctor_get(x_463, 1); -lean_inc(x_474); -x_475 = lean_ctor_get(x_463, 2); -lean_inc(x_475); -if (lean_is_exclusive(x_463)) { - lean_ctor_release(x_463, 0); - lean_ctor_release(x_463, 1); - lean_ctor_release(x_463, 2); - lean_ctor_release(x_463, 3); - x_476 = x_463; -} else { - lean_dec_ref(x_463); - x_476 = lean_box(0); -} -x_477 = lean_ctor_get(x_465, 0); -lean_inc(x_477); -x_478 = lean_ctor_get(x_465, 1); -lean_inc(x_478); -x_479 = lean_ctor_get(x_465, 2); -lean_inc(x_479); -x_480 = lean_ctor_get(x_465, 3); -lean_inc(x_480); -if (lean_is_exclusive(x_465)) { - lean_ctor_release(x_465, 0); - lean_ctor_release(x_465, 1); - lean_ctor_release(x_465, 2); - lean_ctor_release(x_465, 3); - x_481 = x_465; -} else { - lean_dec_ref(x_465); - x_481 = lean_box(0); -} -x_482 = 1; -if (lean_is_scalar(x_481)) { - x_483 = lean_alloc_ctor(1, 4, 1); -} else { - x_483 = x_481; -} -lean_ctor_set(x_483, 0, x_464); -lean_ctor_set(x_483, 1, x_474); -lean_ctor_set(x_483, 2, x_475); -lean_ctor_set(x_483, 3, x_477); -lean_ctor_set_uint8(x_483, sizeof(void*)*4, x_482); -if (lean_is_scalar(x_476)) { - x_484 = lean_alloc_ctor(1, 4, 1); -} else { - x_484 = x_476; -} -lean_ctor_set(x_484, 0, x_480); -lean_ctor_set(x_484, 1, x_366); -lean_ctor_set(x_484, 2, x_367); -lean_ctor_set(x_484, 3, x_368); -lean_ctor_set_uint8(x_484, sizeof(void*)*4, x_482); -x_485 = 0; -x_486 = lean_alloc_ctor(1, 4, 1); -lean_ctor_set(x_486, 0, x_483); -lean_ctor_set(x_486, 1, x_478); -lean_ctor_set(x_486, 2, x_479); -lean_ctor_set(x_486, 3, x_484); -lean_ctor_set_uint8(x_486, sizeof(void*)*4, x_485); -return x_486; -} -else -{ -lean_object* x_487; lean_object* x_488; lean_object* x_489; uint8_t x_490; lean_object* x_491; uint8_t x_492; lean_object* x_493; -x_487 = lean_ctor_get(x_463, 1); -lean_inc(x_487); -x_488 = lean_ctor_get(x_463, 2); -lean_inc(x_488); -if (lean_is_exclusive(x_463)) { - lean_ctor_release(x_463, 0); - lean_ctor_release(x_463, 1); - lean_ctor_release(x_463, 2); - lean_ctor_release(x_463, 3); - x_489 = x_463; -} else { - lean_dec_ref(x_463); - x_489 = lean_box(0); -} -x_490 = 0; -if (lean_is_scalar(x_489)) { - x_491 = lean_alloc_ctor(1, 4, 1); -} else { - x_491 = x_489; -} -lean_ctor_set(x_491, 0, x_464); -lean_ctor_set(x_491, 1, x_487); -lean_ctor_set(x_491, 2, x_488); -lean_ctor_set(x_491, 3, x_465); -lean_ctor_set_uint8(x_491, sizeof(void*)*4, x_490); -x_492 = 1; -x_493 = lean_alloc_ctor(1, 4, 1); -lean_ctor_set(x_493, 0, x_491); -lean_ctor_set(x_493, 1, x_366); -lean_ctor_set(x_493, 2, x_367); -lean_ctor_set(x_493, 3, x_368); -lean_ctor_set_uint8(x_493, sizeof(void*)*4, x_492); -return x_493; -} -} -} -else -{ -uint8_t x_494; -x_494 = lean_ctor_get_uint8(x_464, sizeof(void*)*4); -if (x_494 == 0) -{ -lean_object* x_495; lean_object* x_496; lean_object* x_497; lean_object* x_498; lean_object* x_499; lean_object* x_500; lean_object* x_501; lean_object* x_502; lean_object* x_503; uint8_t x_504; lean_object* x_505; lean_object* x_506; uint8_t x_507; lean_object* x_508; -x_495 = lean_ctor_get(x_463, 1); -lean_inc(x_495); -x_496 = lean_ctor_get(x_463, 2); -lean_inc(x_496); -x_497 = lean_ctor_get(x_463, 3); -lean_inc(x_497); -if (lean_is_exclusive(x_463)) { - lean_ctor_release(x_463, 0); - lean_ctor_release(x_463, 1); - lean_ctor_release(x_463, 2); - lean_ctor_release(x_463, 3); - x_498 = x_463; -} else { - lean_dec_ref(x_463); - x_498 = lean_box(0); -} -x_499 = lean_ctor_get(x_464, 0); -lean_inc(x_499); -x_500 = lean_ctor_get(x_464, 1); -lean_inc(x_500); -x_501 = lean_ctor_get(x_464, 2); -lean_inc(x_501); -x_502 = lean_ctor_get(x_464, 3); -lean_inc(x_502); -if (lean_is_exclusive(x_464)) { - lean_ctor_release(x_464, 0); - lean_ctor_release(x_464, 1); - lean_ctor_release(x_464, 2); - lean_ctor_release(x_464, 3); - x_503 = x_464; -} else { - lean_dec_ref(x_464); - x_503 = lean_box(0); -} -x_504 = 1; -if (lean_is_scalar(x_503)) { - x_505 = lean_alloc_ctor(1, 4, 1); -} else { - x_505 = x_503; -} -lean_ctor_set(x_505, 0, x_499); -lean_ctor_set(x_505, 1, x_500); -lean_ctor_set(x_505, 2, x_501); -lean_ctor_set(x_505, 3, x_502); -lean_ctor_set_uint8(x_505, sizeof(void*)*4, x_504); -if (lean_is_scalar(x_498)) { - x_506 = lean_alloc_ctor(1, 4, 1); -} else { - x_506 = x_498; -} -lean_ctor_set(x_506, 0, x_497); -lean_ctor_set(x_506, 1, x_366); -lean_ctor_set(x_506, 2, x_367); -lean_ctor_set(x_506, 3, x_368); -lean_ctor_set_uint8(x_506, sizeof(void*)*4, x_504); -x_507 = 0; -x_508 = lean_alloc_ctor(1, 4, 1); -lean_ctor_set(x_508, 0, x_505); -lean_ctor_set(x_508, 1, x_495); -lean_ctor_set(x_508, 2, x_496); -lean_ctor_set(x_508, 3, x_506); -lean_ctor_set_uint8(x_508, sizeof(void*)*4, x_507); -return x_508; -} -else -{ -lean_object* x_509; -x_509 = lean_ctor_get(x_463, 3); -lean_inc(x_509); -if (lean_obj_tag(x_509) == 0) -{ -lean_object* x_510; lean_object* x_511; lean_object* x_512; uint8_t x_513; lean_object* x_514; uint8_t x_515; lean_object* x_516; -x_510 = lean_ctor_get(x_463, 1); -lean_inc(x_510); -x_511 = lean_ctor_get(x_463, 2); -lean_inc(x_511); -if (lean_is_exclusive(x_463)) { - lean_ctor_release(x_463, 0); - lean_ctor_release(x_463, 1); - lean_ctor_release(x_463, 2); - lean_ctor_release(x_463, 3); - x_512 = x_463; -} else { - lean_dec_ref(x_463); - x_512 = lean_box(0); -} -x_513 = 0; -if (lean_is_scalar(x_512)) { - x_514 = lean_alloc_ctor(1, 4, 1); -} else { - x_514 = x_512; -} -lean_ctor_set(x_514, 0, x_464); -lean_ctor_set(x_514, 1, x_510); -lean_ctor_set(x_514, 2, x_511); -lean_ctor_set(x_514, 3, x_509); -lean_ctor_set_uint8(x_514, sizeof(void*)*4, x_513); -x_515 = 1; -x_516 = lean_alloc_ctor(1, 4, 1); -lean_ctor_set(x_516, 0, x_514); -lean_ctor_set(x_516, 1, x_366); -lean_ctor_set(x_516, 2, x_367); -lean_ctor_set(x_516, 3, x_368); -lean_ctor_set_uint8(x_516, sizeof(void*)*4, x_515); -return x_516; -} -else -{ -uint8_t x_517; -x_517 = lean_ctor_get_uint8(x_509, sizeof(void*)*4); -if (x_517 == 0) -{ -lean_object* x_518; lean_object* x_519; lean_object* x_520; lean_object* x_521; lean_object* x_522; lean_object* x_523; lean_object* x_524; lean_object* x_525; uint8_t x_526; lean_object* x_527; lean_object* x_528; lean_object* x_529; uint8_t x_530; lean_object* x_531; -x_518 = lean_ctor_get(x_463, 1); -lean_inc(x_518); -x_519 = lean_ctor_get(x_463, 2); -lean_inc(x_519); -if (lean_is_exclusive(x_463)) { - lean_ctor_release(x_463, 0); - lean_ctor_release(x_463, 1); - lean_ctor_release(x_463, 2); - lean_ctor_release(x_463, 3); - x_520 = x_463; -} else { - lean_dec_ref(x_463); - x_520 = lean_box(0); -} -x_521 = lean_ctor_get(x_509, 0); -lean_inc(x_521); -x_522 = lean_ctor_get(x_509, 1); -lean_inc(x_522); -x_523 = lean_ctor_get(x_509, 2); -lean_inc(x_523); -x_524 = lean_ctor_get(x_509, 3); -lean_inc(x_524); -if (lean_is_exclusive(x_509)) { - lean_ctor_release(x_509, 0); - lean_ctor_release(x_509, 1); - lean_ctor_release(x_509, 2); - lean_ctor_release(x_509, 3); - x_525 = x_509; -} else { - lean_dec_ref(x_509); - x_525 = lean_box(0); -} -x_526 = 1; -lean_inc(x_464); -if (lean_is_scalar(x_525)) { - x_527 = lean_alloc_ctor(1, 4, 1); -} else { - x_527 = x_525; -} -lean_ctor_set(x_527, 0, x_464); -lean_ctor_set(x_527, 1, x_518); -lean_ctor_set(x_527, 2, x_519); -lean_ctor_set(x_527, 3, x_521); -if (lean_is_exclusive(x_464)) { - lean_ctor_release(x_464, 0); - lean_ctor_release(x_464, 1); - lean_ctor_release(x_464, 2); - lean_ctor_release(x_464, 3); - x_528 = x_464; -} else { - lean_dec_ref(x_464); - x_528 = lean_box(0); -} -lean_ctor_set_uint8(x_527, sizeof(void*)*4, x_526); -if (lean_is_scalar(x_528)) { - x_529 = lean_alloc_ctor(1, 4, 1); -} else { - x_529 = x_528; -} -lean_ctor_set(x_529, 0, x_524); -lean_ctor_set(x_529, 1, x_366); -lean_ctor_set(x_529, 2, x_367); -lean_ctor_set(x_529, 3, x_368); -lean_ctor_set_uint8(x_529, sizeof(void*)*4, x_526); -x_530 = 0; -if (lean_is_scalar(x_520)) { - x_531 = lean_alloc_ctor(1, 4, 1); -} else { - x_531 = x_520; -} -lean_ctor_set(x_531, 0, x_527); -lean_ctor_set(x_531, 1, x_522); -lean_ctor_set(x_531, 2, x_523); -lean_ctor_set(x_531, 3, x_529); -lean_ctor_set_uint8(x_531, sizeof(void*)*4, x_530); -return x_531; -} -else -{ -lean_object* x_532; lean_object* x_533; lean_object* x_534; lean_object* x_535; lean_object* x_536; lean_object* x_537; lean_object* x_538; lean_object* x_539; lean_object* x_540; uint8_t x_541; lean_object* x_542; uint8_t x_543; lean_object* x_544; -x_532 = lean_ctor_get(x_463, 1); -lean_inc(x_532); -x_533 = lean_ctor_get(x_463, 2); -lean_inc(x_533); -if (lean_is_exclusive(x_463)) { - lean_ctor_release(x_463, 0); - lean_ctor_release(x_463, 1); - lean_ctor_release(x_463, 2); - lean_ctor_release(x_463, 3); - x_534 = x_463; -} else { - lean_dec_ref(x_463); - x_534 = lean_box(0); -} -x_535 = lean_ctor_get(x_464, 0); -lean_inc(x_535); -x_536 = lean_ctor_get(x_464, 1); -lean_inc(x_536); -x_537 = lean_ctor_get(x_464, 2); -lean_inc(x_537); -x_538 = lean_ctor_get(x_464, 3); -lean_inc(x_538); -if (lean_is_exclusive(x_464)) { - lean_ctor_release(x_464, 0); - lean_ctor_release(x_464, 1); - lean_ctor_release(x_464, 2); - lean_ctor_release(x_464, 3); - x_539 = x_464; -} else { - lean_dec_ref(x_464); - x_539 = lean_box(0); -} -if (lean_is_scalar(x_539)) { - x_540 = lean_alloc_ctor(1, 4, 1); -} else { - x_540 = x_539; -} -lean_ctor_set(x_540, 0, x_535); -lean_ctor_set(x_540, 1, x_536); -lean_ctor_set(x_540, 2, x_537); -lean_ctor_set(x_540, 3, x_538); -lean_ctor_set_uint8(x_540, sizeof(void*)*4, x_517); -x_541 = 0; -if (lean_is_scalar(x_534)) { - x_542 = lean_alloc_ctor(1, 4, 1); -} else { - x_542 = x_534; -} -lean_ctor_set(x_542, 0, x_540); -lean_ctor_set(x_542, 1, x_532); -lean_ctor_set(x_542, 2, x_533); -lean_ctor_set(x_542, 3, x_509); -lean_ctor_set_uint8(x_542, sizeof(void*)*4, x_541); -x_543 = 1; -x_544 = lean_alloc_ctor(1, 4, 1); -lean_ctor_set(x_544, 0, x_542); -lean_ctor_set(x_544, 1, x_366); -lean_ctor_set(x_544, 2, x_367); -lean_ctor_set(x_544, 3, x_368); -lean_ctor_set_uint8(x_544, sizeof(void*)*4, x_543); -return x_544; -} -} -} -} -} -} -} -} -} -} -} -lean_object* l_Std_RBNode_insert___at_Lean_Server_Watchdog_FileWorker_writeRequest___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -uint8_t x_4; -x_4 = l_Std_RBNode_isRed___rarg(x_1); -if (x_4 == 0) -{ -lean_object* x_5; -x_5 = l_Std_RBNode_ins___at_Lean_Server_Watchdog_FileWorker_writeRequest___spec__2(x_1, x_2, x_3); -return x_5; -} -else -{ -lean_object* x_6; lean_object* x_7; -x_6 = l_Std_RBNode_ins___at_Lean_Server_Watchdog_FileWorker_writeRequest___spec__2(x_1, x_2, x_3); -x_7 = l_Std_RBNode_setBlack___rarg(x_6); -return x_7; -} -} -} -lean_object* l_Lean_Server_Watchdog_FileWorker_writeRequest___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; lean_object* x_6; -lean_inc(x_2); -x_5 = l_Lean_Server_Watchdog_FileWorker_stdin(x_2); -lean_inc(x_3); -lean_inc(x_1); -x_6 = l_IO_FS_Stream_writeLspRequest___rarg(x_1, x_5, x_3, x_4); -if (lean_obj_tag(x_6) == 0) -{ -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; uint8_t x_19; -x_7 = lean_ctor_get(x_6, 1); -lean_inc(x_7); -lean_dec(x_6); -x_8 = lean_ctor_get(x_2, 4); -lean_inc(x_8); -lean_dec(x_2); -x_9 = lean_st_ref_take(x_8, x_7); -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_3, 0); -lean_inc(x_12); -x_13 = lean_ctor_get(x_3, 1); -lean_inc(x_13); -x_14 = lean_ctor_get(x_3, 2); -lean_inc(x_14); -lean_dec(x_3); -x_15 = l_Lean_Json_toStructured_x3f___rarg(x_1, x_14); -lean_inc(x_12); -x_16 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_16, 0, x_12); -lean_ctor_set(x_16, 1, x_13); -lean_ctor_set(x_16, 2, x_15); -x_17 = l_Std_RBNode_insert___at_Lean_Server_Watchdog_FileWorker_writeRequest___spec__1(x_10, x_12, x_16); -x_18 = lean_st_ref_set(x_8, x_17, x_11); -lean_dec(x_8); -x_19 = !lean_is_exclusive(x_18); -if (x_19 == 0) -{ -return x_18; -} -else -{ -lean_object* x_20; lean_object* x_21; lean_object* x_22; -x_20 = lean_ctor_get(x_18, 0); -x_21 = lean_ctor_get(x_18, 1); -lean_inc(x_21); -lean_inc(x_20); -lean_dec(x_18); -x_22 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_22, 0, x_20); -lean_ctor_set(x_22, 1, x_21); -return x_22; -} -} -else -{ -uint8_t x_23; -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_23 = !lean_is_exclusive(x_6); -if (x_23 == 0) -{ -return x_6; -} -else -{ -lean_object* x_24; lean_object* x_25; lean_object* x_26; -x_24 = lean_ctor_get(x_6, 0); -x_25 = lean_ctor_get(x_6, 1); -lean_inc(x_25); -lean_inc(x_24); -lean_dec(x_6); -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* l_Lean_Server_Watchdog_FileWorker_writeRequest(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_Server_Watchdog_FileWorker_writeRequest___rarg), 4, 0); -return x_2; -} -} lean_object* l_Lean_Server_Watchdog_FileWorker_errorPendingRequests_match__1___rarg(lean_object* x_1, lean_object* x_2) { _start: { @@ -8033,7 +5153,7 @@ lean_dec(x_8); return x_9; } } -lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_startFileWorker___spec__7(lean_object* x_1) { +lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_startFileWorker___spec__6(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; @@ -8048,7 +5168,7 @@ lean_ctor_set(x_5, 0, x_4); return x_5; } } -lean_object* l_IO_FS_Stream_writeLspNotification___at_Lean_Server_Watchdog_startFileWorker___spec__6(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_IO_FS_Stream_writeLspNotification___at_Lean_Server_Watchdog_startFileWorker___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; @@ -8057,7 +5177,7 @@ lean_inc(x_4); x_5 = lean_ctor_get(x_2, 1); lean_inc(x_5); lean_dec(x_2); -x_6 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_startFileWorker___spec__7(x_5); +x_6 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_startFileWorker___spec__6(x_5); x_7 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_7, 0, x_4); lean_ctor_set(x_7, 1, x_6); @@ -8066,15 +5186,6 @@ lean_dec(x_7); return x_8; } } -lean_object* l_Lean_Server_Watchdog_FileWorker_writeNotification___at_Lean_Server_Watchdog_startFileWorker___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; lean_object* x_5; -x_4 = l_Lean_Server_Watchdog_FileWorker_stdin(x_1); -x_5 = l_IO_FS_Stream_writeLspNotification___at_Lean_Server_Watchdog_startFileWorker___spec__6(x_4, x_2, x_3); -return x_5; -} -} static lean_object* _init_l_Lean_Server_Watchdog_startFileWorker___closed__1() { _start: { @@ -8228,6 +5339,7 @@ x_44 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_44, 0, x_42); lean_ctor_set(x_44, 1, x_43); lean_ctor_set(x_44, 2, x_41); +lean_inc(x_40); x_45 = l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_startFileWorker___spec__3(x_40, x_44, x_38); if (lean_obj_tag(x_45) == 0) { @@ -8245,8 +5357,7 @@ x_49 = l_Lean_Server_Watchdog_startFileWorker___closed__5; x_50 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_50, 0, x_49); lean_ctor_set(x_50, 1, x_48); -lean_inc(x_39); -x_51 = l_Lean_Server_Watchdog_FileWorker_writeNotification___at_Lean_Server_Watchdog_startFileWorker___spec__5(x_39, x_50, x_46); +x_51 = l_IO_FS_Stream_writeLspNotification___at_Lean_Server_Watchdog_startFileWorker___spec__5(x_40, x_50, x_46); if (lean_obj_tag(x_51) == 0) { lean_object* x_52; lean_object* x_53; @@ -8285,6 +5396,7 @@ return x_57; else { uint8_t x_58; +lean_dec(x_40); lean_dec(x_39); lean_dec(x_7); lean_dec(x_5); @@ -8436,28 +5548,29 @@ lean_object* x_4; x_4 = l_Lean_Server_Watchdog_findFileWorker(x_1, x_2, x_3); if (lean_obj_tag(x_4) == 0) { -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_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; x_5 = lean_ctor_get(x_4, 0); lean_inc(x_5); x_6 = lean_ctor_get(x_4, 1); lean_inc(x_6); lean_dec(x_4); -x_7 = l_Lean_Server_Watchdog_terminateFileWorker___closed__1; -x_8 = l_Lean_Server_Watchdog_FileWorker_writeMessage(x_5, x_7, x_6); -x_9 = lean_ctor_get(x_8, 1); -lean_inc(x_9); -lean_dec(x_8); -x_10 = l_Lean_Server_Watchdog_eraseFileWorker(x_1, x_2, x_9); -return x_10; +x_7 = l_Lean_Server_Watchdog_FileWorker_stdin(x_5); +x_8 = l_Lean_Server_Watchdog_terminateFileWorker___closed__1; +x_9 = l_IO_FS_Stream_writeLspMessage(x_7, x_8, x_6); +x_10 = lean_ctor_get(x_9, 1); +lean_inc(x_10); +lean_dec(x_9); +x_11 = l_Lean_Server_Watchdog_eraseFileWorker(x_1, x_2, x_10); +return x_11; } else { -lean_object* x_11; lean_object* x_12; -x_11 = lean_ctor_get(x_4, 1); -lean_inc(x_11); +lean_object* x_12; lean_object* x_13; +x_12 = lean_ctor_get(x_4, 1); +lean_inc(x_12); lean_dec(x_4); -x_12 = l_Lean_Server_Watchdog_eraseFileWorker(x_1, x_2, x_11); -return x_12; +x_13 = l_Lean_Server_Watchdog_eraseFileWorker(x_1, x_2, x_12); +return x_13; } } } @@ -8564,6 +5677,37 @@ _start: if (lean_obj_tag(x_1) == 0) { lean_object* x_4; lean_object* x_5; +lean_dec(x_2); +x_4 = lean_box(0); +x_5 = lean_apply_1(x_3, x_4); +return x_5; +} +else +{ +lean_object* x_6; lean_object* x_7; +lean_dec(x_3); +x_6 = lean_ctor_get(x_1, 0); +lean_inc(x_6); +lean_dec(x_1); +x_7 = lean_apply_1(x_2, x_6); +return x_7; +} +} +} +lean_object* l_Lean_Server_Watchdog_tryWriteMessage_match__1(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Server_Watchdog_tryWriteMessage_match__1___rarg), 3, 0); +return x_2; +} +} +lean_object* l_Lean_Server_Watchdog_tryWriteMessage_match__2___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +if (lean_obj_tag(x_1) == 0) +{ +lean_object* x_4; lean_object* x_5; lean_dec(x_3); x_4 = lean_ctor_get(x_1, 0); lean_inc(x_4); @@ -8581,11 +5725,11 @@ return x_7; } } } -lean_object* l_Lean_Server_Watchdog_tryWriteMessage_match__1(lean_object* x_1) { +lean_object* l_Lean_Server_Watchdog_tryWriteMessage_match__2(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_Server_Watchdog_tryWriteMessage_match__1___rarg), 3, 0); +x_2 = lean_alloc_closure((void*)(l_Lean_Server_Watchdog_tryWriteMessage_match__2___rarg), 3, 0); return x_2; } } @@ -8605,119 +5749,42 @@ return x_9; } else { -lean_object* x_10; lean_object* x_11; +lean_object* x_10; lean_object* x_11; lean_object* x_12; x_10 = lean_array_uget(x_2, x_4); lean_inc(x_1); -x_11 = l_Lean_Server_Watchdog_FileWorker_writeMessage(x_1, x_10, x_7); -if (lean_obj_tag(x_11) == 0) +x_11 = l_Lean_Server_Watchdog_FileWorker_stdin(x_1); +x_12 = l_IO_FS_Stream_writeLspMessage(x_11, x_10, x_7); +if (lean_obj_tag(x_12) == 0) { -lean_object* x_12; size_t x_13; size_t x_14; +lean_object* x_13; size_t x_14; size_t x_15; lean_dec(x_10); -x_12 = lean_ctor_get(x_11, 1); -lean_inc(x_12); -lean_dec(x_11); -x_13 = 1; -x_14 = x_4 + x_13; -x_4 = x_14; -x_7 = x_12; -goto _start; -} -else -{ -lean_object* x_16; lean_object* x_17; size_t x_18; size_t x_19; -x_16 = lean_ctor_get(x_11, 1); -lean_inc(x_16); -lean_dec(x_11); -x_17 = lean_array_push(x_5, x_10); -x_18 = 1; -x_19 = x_4 + x_18; -x_4 = x_19; -x_5 = x_17; -x_7 = x_16; -goto _start; -} -} -} -} -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_tryWriteMessage___spec__2___rarg(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4) { -_start: -{ -uint8_t x_5; -x_5 = x_3 < x_2; -if (x_5 == 0) -{ -lean_object* x_6; -lean_dec(x_1); -x_6 = x_4; -return x_6; -} -else -{ -lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; size_t x_12; size_t x_13; lean_object* x_14; lean_object* x_15; -x_7 = lean_array_uget(x_4, x_3); -x_8 = lean_unsigned_to_nat(0u); -x_9 = lean_array_uset(x_4, x_3, x_8); -x_10 = x_7; -lean_inc(x_1); -x_11 = lean_apply_1(x_1, x_10); -x_12 = 1; -x_13 = x_3 + x_12; -x_14 = x_11; -x_15 = lean_array_uset(x_9, x_3, x_14); -x_3 = x_13; +x_13 = lean_ctor_get(x_12, 1); +lean_inc(x_13); +lean_dec(x_12); +x_14 = 1; +x_15 = x_4 + x_14; x_4 = x_15; +x_7 = x_13; goto _start; } -} -} -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_tryWriteMessage___spec__2(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_tryWriteMessage___spec__2___rarg___boxed), 4, 0); -return x_2; -} -} -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_tryWriteMessage___spec__3___rarg(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4) { -_start: -{ -uint8_t x_5; -x_5 = x_3 < x_2; -if (x_5 == 0) -{ -lean_object* x_6; -lean_dec(x_1); -x_6 = x_4; -return x_6; -} else { -lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; size_t x_12; size_t x_13; lean_object* x_14; lean_object* x_15; -x_7 = lean_array_uget(x_4, x_3); -x_8 = lean_unsigned_to_nat(0u); -x_9 = lean_array_uset(x_4, x_3, x_8); -x_10 = x_7; -lean_inc(x_1); -x_11 = lean_apply_1(x_1, x_10); -x_12 = 1; -x_13 = x_3 + x_12; -x_14 = x_11; -x_15 = lean_array_uset(x_9, x_3, x_14); -x_3 = x_13; -x_4 = x_15; +lean_object* x_17; lean_object* x_18; size_t x_19; size_t x_20; +x_17 = lean_ctor_get(x_12, 1); +lean_inc(x_17); +lean_dec(x_12); +x_18 = lean_array_push(x_5, x_10); +x_19 = 1; +x_20 = x_4 + x_19; +x_4 = x_20; +x_5 = x_18; +x_7 = x_17; goto _start; } } } -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_tryWriteMessage___spec__3(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_tryWriteMessage___spec__3___rarg___boxed), 4, 0); -return x_2; } -} -static uint8_t _init_l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__1() { +static uint8_t _init_l_Lean_Server_Watchdog_tryWriteMessage___lambda__1___closed__1() { _start: { uint8_t x_1; uint8_t x_2; @@ -8726,7 +5793,7 @@ x_2 = l_instDecidableNot___rarg(x_1); return x_2; } } -static uint8_t _init_l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__2() { +static uint8_t _init_l_Lean_Server_Watchdog_tryWriteMessage___lambda__1___closed__2() { _start: { uint8_t x_1; uint8_t x_2; @@ -8735,7 +5802,7 @@ x_2 = l_instDecidableNot___rarg(x_1); return x_2; } } -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___rarg___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* l_Lean_Server_Watchdog_tryWriteMessage___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; lean_object* x_9; lean_object* x_10; lean_object* x_11; @@ -8782,7 +5849,7 @@ x_24 = l_Array_isEmpty___rarg(x_22); if (x_24 == 0) { uint8_t x_25; -x_25 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__1; +x_25 = l_Lean_Server_Watchdog_tryWriteMessage___lambda__1___closed__1; if (x_25 == 0) { lean_object* x_26; @@ -8804,7 +5871,7 @@ return x_27; else { uint8_t x_28; -x_28 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__2; +x_28 = l_Lean_Server_Watchdog_tryWriteMessage___lambda__1___closed__2; if (x_28 == 0) { lean_object* x_29; @@ -8836,7 +5903,7 @@ x_33 = l_Array_isEmpty___rarg(x_31); if (x_33 == 0) { uint8_t x_34; -x_34 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__1; +x_34 = l_Lean_Server_Watchdog_tryWriteMessage___lambda__1___closed__1; if (x_34 == 0) { lean_object* x_35; lean_object* x_36; @@ -8859,7 +5926,7 @@ return x_37; else { uint8_t x_38; -x_38 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__2; +x_38 = l_Lean_Server_Watchdog_tryWriteMessage___lambda__1___closed__2; if (x_38 == 0) { lean_object* x_39; lean_object* x_40; @@ -8930,7 +5997,7 @@ return x_49; } } } -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__2(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___lambda__2(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { _start: { if (x_1 == 0) @@ -8948,188 +6015,303 @@ else { lean_object* x_10; lean_object* x_11; x_10 = lean_box(0); -x_11 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1(x_2, x_3, x_4, x_10, x_6, x_7); +x_11 = l_Lean_Server_Watchdog_tryWriteMessage___lambda__1(x_2, x_3, x_4, x_10, x_6, x_7); return x_11; } } } -static lean_object* _init_l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__1() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Array_empty___closed__1; -x_2 = lean_array_get_size(x_1); -return x_2; -} -} -static size_t _init_l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__2() { -_start: -{ -lean_object* x_1; size_t x_2; -x_1 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__1; -x_2 = lean_usize_of_nat(x_1); -return x_2; -} -} -static lean_object* _init_l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__3() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Array_empty___closed__1; -x_2 = x_1; -return x_2; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, uint8_t x_5, uint8_t x_6, lean_object* x_7, lean_object* x_8) { +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___lambda__3(lean_object* x_1, uint8_t x_2, lean_object* x_3, uint8_t 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_Server_Watchdog_findFileWorker(x_2, x_7, x_8); +x_9 = lean_ctor_get(x_1, 3); +lean_inc(x_9); if (lean_obj_tag(x_9) == 0) { -lean_object* x_10; lean_object* x_11; +if (x_4 == 0) +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; +lean_dec(x_5); x_10 = lean_ctor_get(x_9, 0); lean_inc(x_10); -x_11 = lean_ctor_get(x_10, 3); -lean_inc(x_11); -if (lean_obj_tag(x_11) == 0) -{ -lean_dec(x_4); -if (x_5 == 0) -{ -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; -lean_dec(x_3); -lean_dec(x_1); -x_12 = lean_ctor_get(x_9, 1); -lean_inc(x_12); lean_dec(x_9); -x_13 = lean_ctor_get(x_11, 0); -lean_inc(x_13); -lean_dec(x_11); -x_14 = lean_box(0); -x_15 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__2(x_6, x_2, x_10, x_13, x_14, x_7, x_12); -lean_dec(x_13); -return x_15; +x_11 = lean_box(0); +x_12 = l_Lean_Server_Watchdog_tryWriteMessage___lambda__2(x_2, x_3, x_1, x_10, x_11, x_7, x_8); +lean_dec(x_10); +return x_12; } else { -lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; -x_16 = lean_ctor_get(x_9, 1); -lean_inc(x_16); +lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_13 = lean_ctor_get(x_9, 0); +lean_inc(x_13); lean_dec(x_9); -x_17 = lean_ctor_get(x_11, 0); -lean_inc(x_17); -lean_dec(x_11); -x_18 = lean_apply_1(x_1, x_3); -x_19 = lean_array_push(x_17, x_18); -x_20 = lean_box(0); -x_21 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__2(x_6, x_2, x_10, x_19, x_20, x_7, x_16); -lean_dec(x_19); +x_14 = lean_array_push(x_13, x_5); +x_15 = lean_box(0); +x_16 = l_Lean_Server_Watchdog_tryWriteMessage___lambda__2(x_2, x_3, x_1, x_14, x_15, x_7, x_8); +lean_dec(x_14); +return x_16; +} +} +else +{ +lean_object* x_17; +x_17 = l_Lean_Server_Watchdog_FileWorker_stdin(x_1); +if (x_4 == 0) +{ +lean_object* x_18; +x_18 = l_IO_FS_Stream_writeLspMessage(x_17, x_5, x_8); +lean_dec(x_5); +if (lean_obj_tag(x_18) == 0) +{ +lean_dec(x_7); +return x_18; +} +else +{ +lean_object* x_19; lean_object* x_20; lean_object* x_21; +x_19 = lean_ctor_get(x_18, 1); +lean_inc(x_19); +lean_dec(x_18); +x_20 = l_Array_empty___closed__1; +x_21 = l_Lean_Server_Watchdog_handleCrash(x_3, x_20, x_7, x_19); +lean_dec(x_7); return x_21; } } else { -if (x_5 == 0) -{ -lean_object* x_22; lean_object* x_23; -x_22 = lean_ctor_get(x_9, 1); -lean_inc(x_22); -lean_dec(x_9); -x_23 = lean_apply_3(x_4, x_10, x_3, x_22); -if (lean_obj_tag(x_23) == 0) +lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_22 = l_Lean_mkOptionalNode___closed__2; +lean_inc(x_5); +x_23 = lean_array_push(x_22, x_5); +x_24 = l_IO_FS_Stream_writeLspMessage(x_17, x_5, x_8); +lean_dec(x_5); +if (lean_obj_tag(x_24) == 0) { +lean_dec(x_23); lean_dec(x_7); -lean_dec(x_1); -return x_23; +return x_24; } else { -lean_object* x_24; size_t x_25; size_t x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; +lean_object* x_25; lean_object* x_26; +x_25 = lean_ctor_get(x_24, 1); +lean_inc(x_25); +lean_dec(x_24); +x_26 = l_Lean_Server_Watchdog_handleCrash(x_3, x_23, x_7, x_25); +lean_dec(x_7); +return x_26; +} +} +} +} +} +lean_object* l_Lean_Server_Watchdog_tryWriteMessage(lean_object* x_1, lean_object* x_2, uint8_t x_3, uint8_t x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; +x_7 = l_Lean_Server_Watchdog_findFileWorker(x_1, 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; lean_object* x_12; lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_8 = lean_ctor_get(x_7, 0); +lean_inc(x_8); +x_9 = lean_ctor_get(x_7, 1); +lean_inc(x_9); +if (lean_is_exclusive(x_7)) { + lean_ctor_release(x_7, 0); + lean_ctor_release(x_7, 1); + x_10 = x_7; +} else { + lean_dec_ref(x_7); + x_10 = lean_box(0); +} +x_18 = lean_ctor_get(x_8, 5); +lean_inc(x_18); +x_19 = lean_st_ref_take(x_18, x_9); +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; uint8_t x_25; +x_21 = lean_ctor_get(x_19, 1); +lean_inc(x_21); +lean_dec(x_19); +x_22 = lean_box(0); +x_23 = lean_st_ref_set(x_18, x_22, x_21); +lean_dec(x_18); x_24 = lean_ctor_get(x_23, 1); lean_inc(x_24); lean_dec(x_23); x_25 = 0; -x_26 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__2; -x_27 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__3; -x_28 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_tryWriteMessage___spec__2___rarg(x_1, x_26, x_25, x_27); -x_29 = x_28; -x_30 = l_Lean_Server_Watchdog_handleCrash(x_2, x_29, x_7, x_24); -lean_dec(x_7); -return x_30; -} +x_11 = x_25; +x_12 = x_24; +goto block_17; } else { -lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; -x_31 = lean_ctor_get(x_9, 1); -lean_inc(x_31); -lean_dec(x_9); -x_32 = l_Lean_mkOptionalNode___closed__2; -lean_inc(x_3); -x_33 = lean_array_push(x_32, x_3); -x_34 = lean_apply_3(x_4, x_10, x_3, x_31); -if (lean_obj_tag(x_34) == 0) +uint8_t x_26; +x_26 = !lean_is_exclusive(x_20); +if (x_26 == 0) { -lean_dec(x_33); -lean_dec(x_7); -lean_dec(x_1); -return x_34; +lean_object* x_27; lean_object* x_28; uint8_t x_29; +x_27 = lean_ctor_get(x_20, 0); +x_28 = lean_ctor_get(x_19, 1); +lean_inc(x_28); +lean_dec(x_19); +x_29 = !lean_is_exclusive(x_27); +if (x_29 == 0) +{ +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; uint8_t x_34; +x_30 = lean_ctor_get(x_27, 3); +lean_inc(x_2); +x_31 = lean_array_push(x_30, x_2); +lean_ctor_set(x_27, 3, x_31); +x_32 = lean_st_ref_set(x_18, x_20, x_28); +lean_dec(x_18); +x_33 = lean_ctor_get(x_32, 1); +lean_inc(x_33); +lean_dec(x_32); +x_34 = 1; +x_11 = x_34; +x_12 = x_33; +goto block_17; } else { -lean_object* x_35; lean_object* x_36; size_t x_37; size_t x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; -x_35 = lean_ctor_get(x_34, 1); +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; uint8_t x_43; +x_35 = lean_ctor_get(x_27, 0); +x_36 = lean_ctor_get(x_27, 1); +x_37 = lean_ctor_get(x_27, 2); +x_38 = lean_ctor_get(x_27, 3); +lean_inc(x_38); +lean_inc(x_37); +lean_inc(x_36); lean_inc(x_35); -lean_dec(x_34); -x_36 = lean_array_get_size(x_33); -x_37 = lean_usize_of_nat(x_36); -lean_dec(x_36); -x_38 = 0; -x_39 = x_33; -x_40 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_tryWriteMessage___spec__3___rarg(x_1, x_37, x_38, x_39); -x_41 = x_40; -x_42 = l_Lean_Server_Watchdog_handleCrash(x_2, x_41, x_7, x_35); -lean_dec(x_7); -return x_42; -} -} +lean_dec(x_27); +lean_inc(x_2); +x_39 = lean_array_push(x_38, x_2); +x_40 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_40, 0, x_35); +lean_ctor_set(x_40, 1, x_36); +lean_ctor_set(x_40, 2, x_37); +lean_ctor_set(x_40, 3, x_39); +lean_ctor_set(x_20, 0, x_40); +x_41 = lean_st_ref_set(x_18, x_20, x_28); +lean_dec(x_18); +x_42 = lean_ctor_get(x_41, 1); +lean_inc(x_42); +lean_dec(x_41); +x_43 = 1; +x_11 = x_43; +x_12 = x_42; +goto block_17; } } else { -uint8_t x_43; -lean_dec(x_7); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_1); -x_43 = !lean_is_exclusive(x_9); -if (x_43 == 0) -{ -return x_9; -} -else -{ -lean_object* x_44; lean_object* x_45; lean_object* x_46; -x_44 = lean_ctor_get(x_9, 0); -x_45 = lean_ctor_get(x_9, 1); -lean_inc(x_45); +lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; uint8_t x_56; +x_44 = lean_ctor_get(x_20, 0); lean_inc(x_44); -lean_dec(x_9); -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; +lean_dec(x_20); +x_45 = lean_ctor_get(x_19, 1); +lean_inc(x_45); +lean_dec(x_19); +x_46 = lean_ctor_get(x_44, 0); +lean_inc(x_46); +x_47 = lean_ctor_get(x_44, 1); +lean_inc(x_47); +x_48 = lean_ctor_get(x_44, 2); +lean_inc(x_48); +x_49 = lean_ctor_get(x_44, 3); +lean_inc(x_49); +if (lean_is_exclusive(x_44)) { + lean_ctor_release(x_44, 0); + lean_ctor_release(x_44, 1); + lean_ctor_release(x_44, 2); + lean_ctor_release(x_44, 3); + x_50 = x_44; +} else { + lean_dec_ref(x_44); + x_50 = lean_box(0); +} +lean_inc(x_2); +x_51 = lean_array_push(x_49, x_2); +if (lean_is_scalar(x_50)) { + x_52 = lean_alloc_ctor(0, 4, 0); +} else { + x_52 = x_50; +} +lean_ctor_set(x_52, 0, x_46); +lean_ctor_set(x_52, 1, x_47); +lean_ctor_set(x_52, 2, x_48); +lean_ctor_set(x_52, 3, x_51); +x_53 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_53, 0, x_52); +x_54 = lean_st_ref_set(x_18, x_53, x_45); +lean_dec(x_18); +x_55 = lean_ctor_get(x_54, 1); +lean_inc(x_55); +lean_dec(x_54); +x_56 = 1; +x_11 = x_56; +x_12 = x_55; +goto block_17; } } -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage(lean_object* x_1) { -_start: +block_17: { -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_Server_Watchdog_tryWriteMessage___rarg___boxed), 8, 0); -return x_2; +if (x_11 == 0) +{ +lean_object* x_13; lean_object* x_14; +lean_dec(x_10); +x_13 = lean_box(0); +x_14 = l_Lean_Server_Watchdog_tryWriteMessage___lambda__3(x_8, x_4, x_1, x_3, x_2, x_13, x_5, x_12); +return x_14; +} +else +{ +lean_object* x_15; lean_object* x_16; +lean_dec(x_8); +lean_dec(x_5); +lean_dec(x_2); +x_15 = lean_box(0); +if (lean_is_scalar(x_10)) { + x_16 = lean_alloc_ctor(0, 2, 0); +} else { + x_16 = x_10; +} +lean_ctor_set(x_16, 0, x_15); +lean_ctor_set(x_16, 1, x_12); +return x_16; +} +} +} +else +{ +uint8_t x_57; +lean_dec(x_5); +lean_dec(x_2); +x_57 = !lean_is_exclusive(x_7); +if (x_57 == 0) +{ +return x_7; +} +else +{ +lean_object* x_58; lean_object* x_59; lean_object* x_60; +x_58 = lean_ctor_get(x_7, 0); +x_59 = lean_ctor_get(x_7, 1); +lean_inc(x_59); +lean_inc(x_58); +lean_dec(x_7); +x_60 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_60, 0, x_58); +lean_ctor_set(x_60, 1, x_59); +return x_60; +} +} } } lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_tryWriteMessage___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) { @@ -9146,67 +6328,57 @@ lean_dec(x_2); return x_10; } } -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_tryWriteMessage___spec__2___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -size_t x_5; size_t x_6; lean_object* x_7; -x_5 = lean_unbox_usize(x_2); -lean_dec(x_2); -x_6 = lean_unbox_usize(x_3); -lean_dec(x_3); -x_7 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_tryWriteMessage___spec__2___rarg(x_1, x_5, x_6, x_4); -return x_7; -} -} -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_tryWriteMessage___spec__3___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -size_t x_5; size_t x_6; lean_object* x_7; -x_5 = lean_unbox_usize(x_2); -lean_dec(x_2); -x_6 = lean_unbox_usize(x_3); -lean_dec(x_3); -x_7 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_tryWriteMessage___spec__3___rarg(x_1, x_5, x_6, x_4); -return x_7; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___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_Server_Watchdog_tryWriteMessage___rarg___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6); +x_7 = l_Lean_Server_Watchdog_tryWriteMessage___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6); lean_dec(x_4); lean_dec(x_3); lean_dec(x_1); return x_7; } } -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___rarg___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* l_Lean_Server_Watchdog_tryWriteMessage___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) { _start: { uint8_t x_8; lean_object* x_9; x_8 = lean_unbox(x_1); lean_dec(x_1); -x_9 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__2(x_8, x_2, x_3, x_4, x_5, x_6, x_7); +x_9 = l_Lean_Server_Watchdog_tryWriteMessage___lambda__2(x_8, x_2, x_3, x_4, x_5, x_6, x_7); lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); return x_9; } } -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___lambda__3___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: { uint8_t x_9; uint8_t x_10; lean_object* x_11; -x_9 = lean_unbox(x_5); -lean_dec(x_5); -x_10 = lean_unbox(x_6); -lean_dec(x_6); -x_11 = l_Lean_Server_Watchdog_tryWriteMessage___rarg(x_1, x_2, x_3, x_4, x_9, x_10, x_7, x_8); +x_9 = lean_unbox(x_2); lean_dec(x_2); +x_10 = lean_unbox(x_4); +lean_dec(x_4); +x_11 = l_Lean_Server_Watchdog_tryWriteMessage___lambda__3(x_1, x_9, x_3, x_10, x_5, x_6, x_7, x_8); +lean_dec(x_6); +lean_dec(x_3); return x_11; } } +lean_object* l_Lean_Server_Watchdog_tryWriteMessage___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; uint8_t x_8; lean_object* x_9; +x_7 = lean_unbox(x_3); +lean_dec(x_3); +x_8 = lean_unbox(x_4); +lean_dec(x_4); +x_9 = l_Lean_Server_Watchdog_tryWriteMessage(x_1, x_2, x_7, x_8, x_5, x_6); +lean_dec(x_1); +return x_9; +} +} lean_object* l_Lean_Server_Watchdog_handleDidOpen(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { @@ -9278,7 +6450,7 @@ x_2 = lean_alloc_closure((void*)(l_Lean_Server_Watchdog_handleEdits_match__2___r return x_2; } } -lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleEdits___spec__3(lean_object* x_1) { +lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleEdits___spec__1(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; @@ -9293,34 +6465,7 @@ lean_ctor_set(x_5, 0, x_4); return x_5; } } -lean_object* l_IO_FS_Stream_writeLspNotification___at_Lean_Server_Watchdog_handleEdits___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; -x_4 = lean_ctor_get(x_2, 0); -lean_inc(x_4); -x_5 = lean_ctor_get(x_2, 1); -lean_inc(x_5); -lean_dec(x_2); -x_6 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleEdits___spec__3(x_5); -x_7 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_7, 0, x_4); -lean_ctor_set(x_7, 1, x_6); -x_8 = l_IO_FS_Stream_writeLspMessage(x_1, x_7, x_3); -lean_dec(x_7); -return x_8; -} -} -lean_object* l_Lean_Server_Watchdog_FileWorker_writeNotification___at_Lean_Server_Watchdog_handleEdits___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; lean_object* x_5; -x_4 = l_Lean_Server_Watchdog_FileWorker_stdin(x_1); -x_5 = l_IO_FS_Stream_writeLspNotification___at_Lean_Server_Watchdog_handleEdits___spec__2(x_4, x_2, x_3); -return x_5; -} -} -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleEdits___spec__5(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleEdits___spec__2(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { _start: { uint8_t x_8; @@ -9328,7 +6473,7 @@ x_8 = x_4 < x_3; if (x_8 == 0) { lean_object* x_9; -lean_dec(x_1); +lean_dec(x_6); x_9 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_9, 0, x_5); lean_ctor_set(x_9, 1, x_7); @@ -9336,457 +6481,51 @@ return x_9; } else { -lean_object* x_10; lean_object* x_11; +lean_object* x_10; uint8_t x_11; uint8_t x_12; lean_object* x_13; +lean_dec(x_5); x_10 = lean_array_uget(x_2, x_4); -lean_inc(x_1); -x_11 = l_Lean_Server_Watchdog_FileWorker_writeMessage(x_1, x_10, x_7); -if (lean_obj_tag(x_11) == 0) -{ -lean_object* x_12; size_t x_13; size_t x_14; -lean_dec(x_10); -x_12 = lean_ctor_get(x_11, 1); -lean_inc(x_12); -lean_dec(x_11); -x_13 = 1; -x_14 = x_4 + x_13; -x_4 = x_14; -x_7 = x_12; -goto _start; -} -else -{ -lean_object* x_16; lean_object* x_17; size_t x_18; size_t x_19; -x_16 = lean_ctor_get(x_11, 1); -lean_inc(x_16); -lean_dec(x_11); -x_17 = lean_array_push(x_5, x_10); -x_18 = 1; -x_19 = x_4 + x_18; -x_4 = x_19; -x_5 = x_17; -x_7 = x_16; -goto _start; -} -} -} -} -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleEdits___spec__6(size_t x_1, size_t x_2, lean_object* x_3) { -_start: -{ -uint8_t x_4; -x_4 = x_2 < x_1; -if (x_4 == 0) -{ -lean_object* x_5; -x_5 = x_3; -return x_5; -} -else -{ -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; size_t x_14; size_t x_15; lean_object* x_16; lean_object* x_17; -x_6 = lean_array_uget(x_3, x_2); -x_7 = lean_unsigned_to_nat(0u); -x_8 = lean_array_uset(x_3, x_2, x_7); -x_9 = x_6; -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 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleEdits___spec__3(x_11); -x_13 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_13, 0, x_10); -lean_ctor_set(x_13, 1, x_12); -x_14 = 1; -x_15 = x_2 + x_14; -x_16 = x_13; -x_17 = lean_array_uset(x_8, x_2, x_16); -x_2 = x_15; -x_3 = x_17; -goto _start; -} -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleEdits___spec__4___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; lean_object* x_9; lean_object* x_10; lean_object* x_11; -x_7 = l_Lean_Server_Watchdog_eraseFileWorker(x_1, x_5, x_6); -x_8 = lean_ctor_get(x_7, 1); -lean_inc(x_8); -lean_dec(x_7); -x_9 = lean_ctor_get(x_2, 0); -lean_inc(x_9); -lean_dec(x_2); -x_10 = lean_ctor_get(x_9, 0); -lean_inc(x_10); -lean_dec(x_9); -lean_inc(x_5); -x_11 = l_Lean_Server_Watchdog_startFileWorker(x_10, x_5, x_8); -if (lean_obj_tag(x_11) == 0) -{ -lean_object* x_12; lean_object* x_13; -x_12 = lean_ctor_get(x_11, 1); -lean_inc(x_12); -lean_dec(x_11); -x_13 = l_Lean_Server_Watchdog_findFileWorker(x_1, x_5, x_12); +x_11 = 1; +x_12 = 0; +lean_inc(x_6); +x_13 = l_Lean_Server_Watchdog_tryWriteMessage(x_1, x_10, x_11, x_12, x_6, x_7); 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; lean_object* x_20; uint8_t x_21; -x_14 = lean_ctor_get(x_13, 0); +lean_object* x_14; size_t x_15; size_t x_16; lean_object* x_17; +x_14 = lean_ctor_get(x_13, 1); 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_3); -x_17 = lean_usize_of_nat(x_16); -lean_dec(x_16); -x_18 = 0; -x_19 = l_Array_empty___closed__1; -x_20 = l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleEdits___spec__5(x_14, x_3, x_17, x_18, x_19, x_5, x_15); -x_21 = !lean_is_exclusive(x_20); -if (x_21 == 0) -{ -lean_object* x_22; lean_object* x_23; uint8_t x_24; -x_22 = lean_ctor_get(x_20, 0); -x_23 = lean_ctor_get(x_20, 1); -x_24 = l_Array_isEmpty___rarg(x_22); -if (x_24 == 0) -{ -uint8_t x_25; -x_25 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__1; -if (x_25 == 0) -{ -lean_object* x_26; -lean_dec(x_22); -lean_dec(x_5); -x_26 = lean_box(0); -lean_ctor_set(x_20, 0, x_26); -return x_20; +x_15 = 1; +x_16 = x_4 + x_15; +x_17 = lean_box(0); +x_4 = x_16; +x_5 = x_17; +x_7 = x_14; +goto _start; } else { -lean_object* x_27; -lean_free_object(x_20); -x_27 = l_Lean_Server_Watchdog_handleCrash(x_1, x_22, x_5, x_23); -lean_dec(x_5); -return x_27; -} -} -else -{ -uint8_t x_28; -x_28 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__2; -if (x_28 == 0) -{ -lean_object* x_29; -lean_dec(x_22); -lean_dec(x_5); -x_29 = lean_box(0); -lean_ctor_set(x_20, 0, x_29); -return x_20; -} -else -{ -lean_object* x_30; -lean_free_object(x_20); -x_30 = l_Lean_Server_Watchdog_handleCrash(x_1, x_22, x_5, x_23); -lean_dec(x_5); -return x_30; -} -} -} -else -{ -lean_object* x_31; lean_object* x_32; uint8_t x_33; -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_20); -x_33 = l_Array_isEmpty___rarg(x_31); -if (x_33 == 0) -{ -uint8_t x_34; -x_34 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__1; -if (x_34 == 0) -{ -lean_object* x_35; lean_object* x_36; -lean_dec(x_31); -lean_dec(x_5); -x_35 = lean_box(0); -x_36 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_36, 0, x_35); -lean_ctor_set(x_36, 1, x_32); -return x_36; -} -else -{ -lean_object* x_37; -x_37 = l_Lean_Server_Watchdog_handleCrash(x_1, x_31, x_5, x_32); -lean_dec(x_5); -return x_37; -} -} -else -{ -uint8_t x_38; -x_38 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__2; -if (x_38 == 0) -{ -lean_object* x_39; lean_object* x_40; -lean_dec(x_31); -lean_dec(x_5); -x_39 = lean_box(0); -x_40 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_40, 0, x_39); -lean_ctor_set(x_40, 1, x_32); -return x_40; -} -else -{ -lean_object* x_41; -x_41 = l_Lean_Server_Watchdog_handleCrash(x_1, x_31, x_5, x_32); -lean_dec(x_5); -return x_41; -} -} -} -} -else -{ -uint8_t x_42; -lean_dec(x_5); -x_42 = !lean_is_exclusive(x_13); -if (x_42 == 0) +uint8_t x_19; +lean_dec(x_6); +x_19 = !lean_is_exclusive(x_13); +if (x_19 == 0) { return x_13; } else { -lean_object* x_43; lean_object* x_44; lean_object* x_45; -x_43 = lean_ctor_get(x_13, 0); -x_44 = lean_ctor_get(x_13, 1); -lean_inc(x_44); -lean_inc(x_43); +lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_20 = lean_ctor_get(x_13, 0); +x_21 = lean_ctor_get(x_13, 1); +lean_inc(x_21); +lean_inc(x_20); lean_dec(x_13); -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; +x_22 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_22, 0, x_20); +lean_ctor_set(x_22, 1, x_21); +return x_22; } } } -else -{ -uint8_t x_46; -lean_dec(x_5); -x_46 = !lean_is_exclusive(x_11); -if (x_46 == 0) -{ -return x_11; -} -else -{ -lean_object* x_47; lean_object* x_48; lean_object* x_49; -x_47 = lean_ctor_get(x_11, 0); -x_48 = lean_ctor_get(x_11, 1); -lean_inc(x_48); -lean_inc(x_47); -lean_dec(x_11); -x_49 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_49, 0, x_47); -lean_ctor_set(x_49, 1, x_48); -return x_49; -} -} -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleEdits___spec__4___lambda__2(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -if (x_1 == 0) -{ -lean_object* x_8; lean_object* x_9; -lean_dec(x_6); -lean_dec(x_3); -x_8 = lean_box(0); -x_9 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_9, 0, x_8); -lean_ctor_set(x_9, 1, x_7); -return x_9; -} -else -{ -lean_object* x_10; lean_object* x_11; -x_10 = lean_box(0); -x_11 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleEdits___spec__4___lambda__1(x_2, x_3, x_4, x_10, x_6, x_7); -return x_11; -} -} -} -static lean_object* _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleEdits___spec__4___closed__1() { -_start: -{ -size_t x_1; size_t x_2; lean_object* x_3; lean_object* x_4; -x_1 = 0; -x_2 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__2; -x_3 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__3; -x_4 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleEdits___spec__6(x_2, x_1, x_3); -return x_4; -} -} -static lean_object* _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleEdits___spec__4___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleEdits___spec__4___closed__1; -x_2 = x_1; -return x_2; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleEdits___spec__4(lean_object* x_1, lean_object* x_2, lean_object* x_3, uint8_t x_4, uint8_t x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -lean_object* x_8; -x_8 = l_Lean_Server_Watchdog_findFileWorker(x_1, x_6, x_7); -if (lean_obj_tag(x_8) == 0) -{ -lean_object* x_9; lean_object* x_10; -x_9 = lean_ctor_get(x_8, 0); -lean_inc(x_9); -x_10 = lean_ctor_get(x_9, 3); -lean_inc(x_10); -if (lean_obj_tag(x_10) == 0) -{ -lean_dec(x_3); -if (x_4 == 0) -{ -lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; -lean_dec(x_2); -x_11 = lean_ctor_get(x_8, 1); -lean_inc(x_11); -lean_dec(x_8); -x_12 = lean_ctor_get(x_10, 0); -lean_inc(x_12); -lean_dec(x_10); -x_13 = lean_box(0); -x_14 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleEdits___spec__4___lambda__2(x_5, x_1, x_9, x_12, x_13, x_6, x_11); -lean_dec(x_12); -return x_14; -} -else -{ -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_15 = lean_ctor_get(x_8, 1); -lean_inc(x_15); -lean_dec(x_8); -x_16 = lean_ctor_get(x_10, 0); -lean_inc(x_16); -lean_dec(x_10); -x_17 = lean_ctor_get(x_2, 0); -lean_inc(x_17); -x_18 = lean_ctor_get(x_2, 1); -lean_inc(x_18); -lean_dec(x_2); -x_19 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleEdits___spec__3(x_18); -x_20 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_20, 0, x_17); -lean_ctor_set(x_20, 1, x_19); -x_21 = lean_array_push(x_16, x_20); -x_22 = lean_box(0); -x_23 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleEdits___spec__4___lambda__2(x_5, x_1, x_9, x_21, x_22, x_6, x_15); -lean_dec(x_21); -return x_23; -} -} -else -{ -if (x_4 == 0) -{ -lean_object* x_24; lean_object* x_25; -x_24 = lean_ctor_get(x_8, 1); -lean_inc(x_24); -lean_dec(x_8); -x_25 = lean_apply_3(x_3, x_9, x_2, x_24); -if (lean_obj_tag(x_25) == 0) -{ -lean_dec(x_6); -return x_25; -} -else -{ -lean_object* x_26; lean_object* x_27; lean_object* x_28; -x_26 = lean_ctor_get(x_25, 1); -lean_inc(x_26); -lean_dec(x_25); -x_27 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleEdits___spec__4___closed__2; -x_28 = l_Lean_Server_Watchdog_handleCrash(x_1, x_27, x_6, x_26); -lean_dec(x_6); -return x_28; -} -} -else -{ -lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; -x_29 = lean_ctor_get(x_8, 1); -lean_inc(x_29); -lean_dec(x_8); -x_30 = l_Lean_mkOptionalNode___closed__2; -lean_inc(x_2); -x_31 = lean_array_push(x_30, x_2); -x_32 = lean_apply_3(x_3, x_9, x_2, x_29); -if (lean_obj_tag(x_32) == 0) -{ -lean_dec(x_31); -lean_dec(x_6); -return x_32; -} -else -{ -lean_object* x_33; lean_object* x_34; size_t x_35; size_t x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; -x_33 = lean_ctor_get(x_32, 1); -lean_inc(x_33); -lean_dec(x_32); -x_34 = lean_array_get_size(x_31); -x_35 = lean_usize_of_nat(x_34); -lean_dec(x_34); -x_36 = 0; -x_37 = x_31; -x_38 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleEdits___spec__6(x_35, x_36, x_37); -x_39 = x_38; -x_40 = l_Lean_Server_Watchdog_handleCrash(x_1, x_39, x_6, x_33); -lean_dec(x_6); -return x_40; -} -} -} -} -else -{ -uint8_t x_41; -lean_dec(x_6); -lean_dec(x_3); -lean_dec(x_2); -x_41 = !lean_is_exclusive(x_8); -if (x_41 == 0) -{ -return x_8; -} -else -{ -lean_object* x_42; lean_object* x_43; lean_object* x_44; -x_42 = lean_ctor_get(x_8, 0); -x_43 = lean_ctor_get(x_8, 1); -lean_inc(x_43); -lean_inc(x_42); -lean_dec(x_8); -x_44 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_44, 0, x_42); -lean_ctor_set(x_44, 1, x_43); -return x_44; -} -} } } static lean_object* _init_l_Lean_Server_Watchdog_handleEdits___lambda__1___closed__1() { @@ -9797,217 +6536,179 @@ x_1 = lean_mk_string("textDocument/didChange"); return x_1; } } -static lean_object* _init_l_Lean_Server_Watchdog_handleEdits___lambda__1___closed__2() { +lean_object* l_Lean_Server_Watchdog_handleEdits___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, lean_object* x_12, lean_object* x_13, lean_object* x_14) { _start: { -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Server_Watchdog_FileWorker_writeNotification___at_Lean_Server_Watchdog_handleEdits___spec__1), 3, 0); -return x_1; -} -} -lean_object* l_Lean_Server_Watchdog_handleEdits___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, lean_object* x_12, lean_object* x_13) { -_start: +uint8_t x_15; +x_15 = !lean_is_exclusive(x_1); +if (x_15 == 0) { -uint8_t x_14; -x_14 = !lean_is_exclusive(x_1); -if (x_14 == 0) -{ -lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; -x_15 = lean_ctor_get(x_1, 0); -x_16 = lean_ctor_get(x_1, 1); -x_17 = lean_ctor_get(x_15, 2); -lean_inc(x_17); -lean_dec(x_15); -x_18 = l_Lean_Server_foldDocumentChanges(x_2, x_17); -x_19 = lean_ctor_get(x_18, 0); -lean_inc(x_19); -lean_dec(x_18); -lean_inc(x_19); -lean_inc(x_3); -x_20 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_20, 0, x_3); -lean_ctor_set(x_20, 1, x_4); -lean_ctor_set(x_20, 2, x_19); -x_21 = lean_ctor_get(x_19, 0); -lean_inc(x_21); +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_16 = lean_ctor_get(x_1, 0); +x_17 = lean_ctor_get(x_1, 1); +x_18 = lean_ctor_get(x_16, 2); +lean_inc(x_18); +lean_dec(x_16); +x_19 = l_Lean_Server_foldDocumentChanges(x_2, x_18); +x_20 = lean_ctor_get(x_19, 0); +lean_inc(x_20); lean_dec(x_19); -x_22 = l___private_Lean_Server_Watchdog_0__Lean_Server_Watchdog_parseHeaderAst(x_21, x_13); -if (lean_obj_tag(x_22) == 0) -{ -lean_object* x_23; lean_object* x_24; uint8_t x_25; -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 = l_Lean_Syntax_structEq(x_23, x_16); -lean_dec(x_23); -if (x_25 == 0) -{ -lean_object* x_26; lean_object* x_27; lean_object* x_28; -lean_free_object(x_1); -lean_dec(x_16); -lean_dec(x_10); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -x_26 = l_Lean_Server_Watchdog_terminateFileWorker(x_3, x_12, x_24); -lean_dec(x_3); -x_27 = lean_ctor_get(x_26, 1); -lean_inc(x_27); -lean_dec(x_26); -x_28 = l_Lean_Server_Watchdog_startFileWorker(x_20, x_12, x_27); -return x_28; -} -else -{ -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; lean_object* x_36; -lean_ctor_set(x_1, 0, x_20); -x_29 = lean_alloc_ctor(0, 6, 0); -lean_ctor_set(x_29, 0, x_1); -lean_ctor_set(x_29, 1, x_5); -lean_ctor_set(x_29, 2, x_6); -lean_ctor_set(x_29, 3, x_7); -lean_ctor_set(x_29, 4, x_8); -lean_ctor_set(x_29, 5, x_9); -x_30 = l_Lean_Server_Watchdog_updateFileWorkers(x_29, x_12, x_24); -x_31 = lean_ctor_get(x_30, 1); -lean_inc(x_31); -lean_dec(x_30); -x_32 = l_Lean_Server_Watchdog_handleEdits___lambda__1___closed__1; -x_33 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_33, 0, x_32); -lean_ctor_set(x_33, 1, x_10); -x_34 = l_Lean_Server_Watchdog_handleEdits___lambda__1___closed__2; -x_35 = 1; -x_36 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleEdits___spec__4(x_3, x_33, x_34, x_35, x_35, x_12, x_31); -lean_dec(x_3); -return x_36; -} -} -else -{ -uint8_t x_37; -lean_dec(x_20); -lean_free_object(x_1); -lean_dec(x_16); -lean_dec(x_12); -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_3); -x_37 = !lean_is_exclusive(x_22); -if (x_37 == 0) -{ -return x_22; -} -else -{ -lean_object* x_38; lean_object* x_39; lean_object* x_40; -x_38 = lean_ctor_get(x_22, 0); -x_39 = lean_ctor_get(x_22, 1); -lean_inc(x_39); -lean_inc(x_38); -lean_dec(x_22); -x_40 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_40, 0, x_38); -lean_ctor_set(x_40, 1, x_39); -return x_40; -} -} -} -else -{ -lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; -x_41 = lean_ctor_get(x_1, 0); -x_42 = lean_ctor_get(x_1, 1); -lean_inc(x_42); -lean_inc(x_41); -lean_dec(x_1); -x_43 = lean_ctor_get(x_41, 2); -lean_inc(x_43); -lean_dec(x_41); -x_44 = l_Lean_Server_foldDocumentChanges(x_2, x_43); -x_45 = lean_ctor_get(x_44, 0); -lean_inc(x_45); -lean_dec(x_44); -lean_inc(x_45); +lean_inc(x_20); lean_inc(x_3); -x_46 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_46, 0, x_3); -lean_ctor_set(x_46, 1, x_4); -lean_ctor_set(x_46, 2, x_45); -x_47 = lean_ctor_get(x_45, 0); -lean_inc(x_47); -lean_dec(x_45); -x_48 = l___private_Lean_Server_Watchdog_0__Lean_Server_Watchdog_parseHeaderAst(x_47, x_13); -if (lean_obj_tag(x_48) == 0) +x_21 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_21, 0, x_3); +lean_ctor_set(x_21, 1, x_4); +lean_ctor_set(x_21, 2, x_20); +x_22 = lean_ctor_get(x_20, 0); +lean_inc(x_22); +lean_dec(x_20); +x_23 = l___private_Lean_Server_Watchdog_0__Lean_Server_Watchdog_parseHeaderAst(x_22, x_14); +if (lean_obj_tag(x_23) == 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 = l_Lean_Syntax_structEq(x_49, x_42); -lean_dec(x_49); -if (x_51 == 0) +lean_object* x_24; lean_object* x_25; uint8_t x_26; +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_Lean_Syntax_structEq(x_24, x_17); +lean_dec(x_24); +if (x_26 == 0) { -lean_object* x_52; lean_object* x_53; lean_object* x_54; -lean_dec(x_42); +lean_object* x_27; lean_object* x_28; lean_object* x_29; +lean_free_object(x_1); +lean_dec(x_17); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); -x_52 = l_Lean_Server_Watchdog_terminateFileWorker(x_3, x_12, x_50); +x_27 = l_Lean_Server_Watchdog_terminateFileWorker(x_3, x_13, x_25); lean_dec(x_3); -x_53 = lean_ctor_get(x_52, 1); -lean_inc(x_53); -lean_dec(x_52); -x_54 = l_Lean_Server_Watchdog_startFileWorker(x_46, x_12, x_53); -return x_54; +x_28 = lean_ctor_get(x_27, 1); +lean_inc(x_28); +lean_dec(x_27); +x_29 = l_Lean_Server_Watchdog_startFileWorker(x_21, x_13, x_28); +return x_29; } else { -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; uint8_t x_62; lean_object* x_63; -x_55 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_55, 0, x_46); -lean_ctor_set(x_55, 1, x_42); -x_56 = lean_alloc_ctor(0, 6, 0); -lean_ctor_set(x_56, 0, x_55); -lean_ctor_set(x_56, 1, x_5); -lean_ctor_set(x_56, 2, x_6); -lean_ctor_set(x_56, 3, x_7); -lean_ctor_set(x_56, 4, x_8); -lean_ctor_set(x_56, 5, x_9); -x_57 = l_Lean_Server_Watchdog_updateFileWorkers(x_56, x_12, x_50); -x_58 = lean_ctor_get(x_57, 1); -lean_inc(x_58); -lean_dec(x_57); -x_59 = l_Lean_Server_Watchdog_handleEdits___lambda__1___closed__1; -x_60 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_60, 0, x_59); -lean_ctor_set(x_60, 1, x_10); -x_61 = l_Lean_Server_Watchdog_handleEdits___lambda__1___closed__2; -x_62 = 1; -x_63 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleEdits___spec__4(x_3, x_60, x_61, x_62, x_62, x_12, x_58); -lean_dec(x_3); -return x_63; -} -} -else +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; uint8_t x_36; lean_object* x_37; +lean_ctor_set(x_1, 0, x_21); +x_30 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_30, 0, x_1); +lean_ctor_set(x_30, 1, x_5); +lean_ctor_set(x_30, 2, x_6); +lean_ctor_set(x_30, 3, x_7); +lean_ctor_set(x_30, 4, x_8); +lean_ctor_set(x_30, 5, x_9); +x_31 = l_Lean_Server_Watchdog_updateFileWorkers(x_30, x_13, x_25); +x_32 = lean_ctor_get(x_31, 1); +lean_inc(x_32); +lean_dec(x_31); +x_33 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleEdits___spec__1(x_10); +x_34 = l_Lean_Server_Watchdog_handleEdits___lambda__1___closed__1; +x_35 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_35, 0, x_34); +lean_ctor_set(x_35, 1, x_33); +x_36 = 1; +lean_inc(x_13); +x_37 = l_Lean_Server_Watchdog_tryWriteMessage(x_3, x_35, x_36, x_36, x_13, x_32); +if (lean_obj_tag(x_37) == 0) { -lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; +lean_object* x_38; lean_object* x_39; lean_object* x_40; size_t x_41; size_t x_42; lean_object* x_43; lean_object* x_44; +x_38 = lean_ctor_get(x_37, 1); +lean_inc(x_38); +lean_dec(x_37); +x_39 = lean_ctor_get(x_11, 3); +x_40 = lean_array_get_size(x_39); +x_41 = lean_usize_of_nat(x_40); +lean_dec(x_40); +x_42 = 0; +x_43 = lean_box(0); +x_44 = l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleEdits___spec__2(x_3, x_39, x_41, x_42, x_43, x_13, x_38); +lean_dec(x_3); +if (lean_obj_tag(x_44) == 0) +{ +uint8_t x_45; +x_45 = !lean_is_exclusive(x_44); +if (x_45 == 0) +{ +lean_object* x_46; +x_46 = lean_ctor_get(x_44, 0); lean_dec(x_46); -lean_dec(x_42); -lean_dec(x_12); +lean_ctor_set(x_44, 0, x_43); +return x_44; +} +else +{ +lean_object* x_47; lean_object* x_48; +x_47 = lean_ctor_get(x_44, 1); +lean_inc(x_47); +lean_dec(x_44); +x_48 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_48, 0, x_43); +lean_ctor_set(x_48, 1, x_47); +return x_48; +} +} +else +{ +uint8_t x_49; +x_49 = !lean_is_exclusive(x_44); +if (x_49 == 0) +{ +return x_44; +} +else +{ +lean_object* x_50; lean_object* x_51; lean_object* x_52; +x_50 = lean_ctor_get(x_44, 0); +x_51 = lean_ctor_get(x_44, 1); +lean_inc(x_51); +lean_inc(x_50); +lean_dec(x_44); +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 +{ +uint8_t x_53; +lean_dec(x_13); +lean_dec(x_3); +x_53 = !lean_is_exclusive(x_37); +if (x_53 == 0) +{ +return x_37; +} +else +{ +lean_object* x_54; lean_object* x_55; lean_object* x_56; +x_54 = lean_ctor_get(x_37, 0); +x_55 = lean_ctor_get(x_37, 1); +lean_inc(x_55); +lean_inc(x_54); +lean_dec(x_37); +x_56 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_56, 0, x_54); +lean_ctor_set(x_56, 1, x_55); +return x_56; +} +} +} +} +else +{ +uint8_t x_57; +lean_dec(x_21); +lean_free_object(x_1); +lean_dec(x_17); +lean_dec(x_13); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); @@ -10015,46 +6716,246 @@ lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_3); -x_64 = lean_ctor_get(x_48, 0); -lean_inc(x_64); -x_65 = lean_ctor_get(x_48, 1); +x_57 = !lean_is_exclusive(x_23); +if (x_57 == 0) +{ +return x_23; +} +else +{ +lean_object* x_58; lean_object* x_59; lean_object* x_60; +x_58 = lean_ctor_get(x_23, 0); +x_59 = lean_ctor_get(x_23, 1); +lean_inc(x_59); +lean_inc(x_58); +lean_dec(x_23); +x_60 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_60, 0, x_58); +lean_ctor_set(x_60, 1, x_59); +return x_60; +} +} +} +else +{ +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; lean_object* x_68; +x_61 = lean_ctor_get(x_1, 0); +x_62 = lean_ctor_get(x_1, 1); +lean_inc(x_62); +lean_inc(x_61); +lean_dec(x_1); +x_63 = lean_ctor_get(x_61, 2); +lean_inc(x_63); +lean_dec(x_61); +x_64 = l_Lean_Server_foldDocumentChanges(x_2, x_63); +x_65 = lean_ctor_get(x_64, 0); lean_inc(x_65); -if (lean_is_exclusive(x_48)) { - lean_ctor_release(x_48, 0); - lean_ctor_release(x_48, 1); - x_66 = x_48; +lean_dec(x_64); +lean_inc(x_65); +lean_inc(x_3); +x_66 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_66, 0, x_3); +lean_ctor_set(x_66, 1, x_4); +lean_ctor_set(x_66, 2, x_65); +x_67 = lean_ctor_get(x_65, 0); +lean_inc(x_67); +lean_dec(x_65); +x_68 = l___private_Lean_Server_Watchdog_0__Lean_Server_Watchdog_parseHeaderAst(x_67, x_14); +if (lean_obj_tag(x_68) == 0) +{ +lean_object* x_69; lean_object* x_70; uint8_t x_71; +x_69 = lean_ctor_get(x_68, 0); +lean_inc(x_69); +x_70 = lean_ctor_get(x_68, 1); +lean_inc(x_70); +lean_dec(x_68); +x_71 = l_Lean_Syntax_structEq(x_69, x_62); +lean_dec(x_69); +if (x_71 == 0) +{ +lean_object* x_72; lean_object* x_73; lean_object* x_74; +lean_dec(x_62); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_72 = l_Lean_Server_Watchdog_terminateFileWorker(x_3, x_13, x_70); +lean_dec(x_3); +x_73 = lean_ctor_get(x_72, 1); +lean_inc(x_73); +lean_dec(x_72); +x_74 = l_Lean_Server_Watchdog_startFileWorker(x_66, x_13, x_73); +return x_74; +} +else +{ +lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; uint8_t x_82; lean_object* x_83; +x_75 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_75, 0, x_66); +lean_ctor_set(x_75, 1, x_62); +x_76 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_76, 0, x_75); +lean_ctor_set(x_76, 1, x_5); +lean_ctor_set(x_76, 2, x_6); +lean_ctor_set(x_76, 3, x_7); +lean_ctor_set(x_76, 4, x_8); +lean_ctor_set(x_76, 5, x_9); +x_77 = l_Lean_Server_Watchdog_updateFileWorkers(x_76, x_13, x_70); +x_78 = lean_ctor_get(x_77, 1); +lean_inc(x_78); +lean_dec(x_77); +x_79 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleEdits___spec__1(x_10); +x_80 = l_Lean_Server_Watchdog_handleEdits___lambda__1___closed__1; +x_81 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_81, 0, x_80); +lean_ctor_set(x_81, 1, x_79); +x_82 = 1; +lean_inc(x_13); +x_83 = l_Lean_Server_Watchdog_tryWriteMessage(x_3, x_81, x_82, x_82, x_13, x_78); +if (lean_obj_tag(x_83) == 0) +{ +lean_object* x_84; lean_object* x_85; lean_object* x_86; size_t x_87; size_t x_88; lean_object* x_89; lean_object* x_90; +x_84 = lean_ctor_get(x_83, 1); +lean_inc(x_84); +lean_dec(x_83); +x_85 = lean_ctor_get(x_11, 3); +x_86 = lean_array_get_size(x_85); +x_87 = lean_usize_of_nat(x_86); +lean_dec(x_86); +x_88 = 0; +x_89 = lean_box(0); +x_90 = l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleEdits___spec__2(x_3, x_85, x_87, x_88, x_89, x_13, x_84); +lean_dec(x_3); +if (lean_obj_tag(x_90) == 0) +{ +lean_object* x_91; lean_object* x_92; lean_object* x_93; +x_91 = lean_ctor_get(x_90, 1); +lean_inc(x_91); +if (lean_is_exclusive(x_90)) { + lean_ctor_release(x_90, 0); + lean_ctor_release(x_90, 1); + x_92 = x_90; } else { - lean_dec_ref(x_48); - x_66 = lean_box(0); + lean_dec_ref(x_90); + x_92 = lean_box(0); } -if (lean_is_scalar(x_66)) { - x_67 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_92)) { + x_93 = lean_alloc_ctor(0, 2, 0); } else { - x_67 = x_66; + x_93 = x_92; } -lean_ctor_set(x_67, 0, x_64); -lean_ctor_set(x_67, 1, x_65); -return x_67; +lean_ctor_set(x_93, 0, x_89); +lean_ctor_set(x_93, 1, x_91); +return x_93; +} +else +{ +lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; +x_94 = lean_ctor_get(x_90, 0); +lean_inc(x_94); +x_95 = lean_ctor_get(x_90, 1); +lean_inc(x_95); +if (lean_is_exclusive(x_90)) { + lean_ctor_release(x_90, 0); + lean_ctor_release(x_90, 1); + x_96 = x_90; +} else { + lean_dec_ref(x_90); + x_96 = lean_box(0); +} +if (lean_is_scalar(x_96)) { + x_97 = lean_alloc_ctor(1, 2, 0); +} else { + x_97 = x_96; +} +lean_ctor_set(x_97, 0, x_94); +lean_ctor_set(x_97, 1, x_95); +return x_97; +} +} +else +{ +lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; +lean_dec(x_13); +lean_dec(x_3); +x_98 = lean_ctor_get(x_83, 0); +lean_inc(x_98); +x_99 = lean_ctor_get(x_83, 1); +lean_inc(x_99); +if (lean_is_exclusive(x_83)) { + lean_ctor_release(x_83, 0); + lean_ctor_release(x_83, 1); + x_100 = x_83; +} else { + lean_dec_ref(x_83); + x_100 = lean_box(0); +} +if (lean_is_scalar(x_100)) { + x_101 = lean_alloc_ctor(1, 2, 0); +} else { + x_101 = x_100; +} +lean_ctor_set(x_101, 0, x_98); +lean_ctor_set(x_101, 1, x_99); +return x_101; +} +} +} +else +{ +lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; +lean_dec(x_66); +lean_dec(x_62); +lean_dec(x_13); +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_3); +x_102 = lean_ctor_get(x_68, 0); +lean_inc(x_102); +x_103 = lean_ctor_get(x_68, 1); +lean_inc(x_103); +if (lean_is_exclusive(x_68)) { + lean_ctor_release(x_68, 0); + lean_ctor_release(x_68, 1); + x_104 = x_68; +} else { + lean_dec_ref(x_68); + x_104 = lean_box(0); +} +if (lean_is_scalar(x_104)) { + x_105 = lean_alloc_ctor(1, 2, 0); +} else { + x_105 = x_104; +} +lean_ctor_set(x_105, 0, x_102); +lean_ctor_set(x_105, 1, x_103); +return x_105; } } } } -lean_object* l_Lean_Server_Watchdog_handleEdits___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* l_Lean_Server_Watchdog_handleEdits___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) { _start: { -uint8_t x_14; -x_14 = l_Array_isEmpty___rarg(x_2); -if (x_14 == 0) +uint8_t x_15; +x_15 = l_Array_isEmpty___rarg(x_2); +if (x_15 == 0) { -lean_object* x_15; lean_object* x_16; -x_15 = lean_box(0); -x_16 = l_Lean_Server_Watchdog_handleEdits___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_15, x_12, x_13); -return x_16; +lean_object* x_16; lean_object* x_17; +x_16 = lean_box(0); +x_17 = l_Lean_Server_Watchdog_handleEdits___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_16, x_13, x_14); +return x_17; } else { -lean_object* x_17; lean_object* x_18; -lean_dec(x_12); +lean_object* x_18; lean_object* x_19; +lean_dec(x_13); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); @@ -10064,11 +6965,11 @@ lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_1); -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_13); -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_14); +return x_19; } } } @@ -10146,7 +7047,6 @@ lean_inc(x_18); lean_dec(x_11); x_19 = lean_ctor_get(x_18, 1); lean_inc(x_19); -lean_dec(x_18); x_20 = lean_ctor_get(x_19, 0); lean_inc(x_20); x_21 = lean_ctor_get(x_20, 1); @@ -10156,6 +7056,7 @@ if (lean_obj_tag(x_21) == 0) lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_dec(x_20); lean_dec(x_19); +lean_dec(x_18); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); @@ -10195,7 +7096,8 @@ if (x_31 == 0) { lean_object* x_32; lean_object* x_33; x_32 = lean_box(0); -x_33 = l_Lean_Server_Watchdog_handleEdits___lambda__2(x_4, x_28, x_26, x_27, x_5, x_6, x_7, x_8, x_9, x_19, x_32, x_2, x_25); +x_33 = l_Lean_Server_Watchdog_handleEdits___lambda__2(x_4, x_28, x_26, x_27, x_5, x_6, x_7, x_8, x_9, x_19, x_18, x_32, x_2, x_25); +lean_dec(x_18); lean_dec(x_28); return x_33; } @@ -10206,6 +7108,7 @@ lean_dec(x_28); lean_dec(x_27); lean_dec(x_26); lean_dec(x_19); +lean_dec(x_18); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); @@ -10238,7 +7141,7 @@ return x_39; } } } -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleEdits___spec__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* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleEdits___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) { _start: { size_t x_8; size_t x_9; lean_object* x_10; @@ -10246,79 +7149,32 @@ x_8 = lean_unbox_usize(x_3); lean_dec(x_3); x_9 = lean_unbox_usize(x_4); lean_dec(x_4); -x_10 = l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleEdits___spec__5(x_1, x_2, x_8, x_9, x_5, x_6, x_7); -lean_dec(x_6); +x_10 = l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleEdits___spec__2(x_1, x_2, x_8, x_9, x_5, x_6, x_7); lean_dec(x_2); -return x_10; -} -} -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleEdits___spec__6___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -size_t x_4; size_t x_5; lean_object* x_6; -x_4 = lean_unbox_usize(x_1); -lean_dec(x_1); -x_5 = lean_unbox_usize(x_2); -lean_dec(x_2); -x_6 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleEdits___spec__6(x_4, x_5, x_3); -return x_6; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleEdits___spec__4___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_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleEdits___spec__4___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_1); -return x_7; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleEdits___spec__4___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) { -_start: -{ -uint8_t x_8; lean_object* x_9; -x_8 = lean_unbox(x_1); -lean_dec(x_1); -x_9 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleEdits___spec__4___lambda__2(x_8, x_2, x_3, x_4, x_5, x_6, x_7); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -return x_9; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleEdits___spec__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) { -_start: -{ -uint8_t x_8; uint8_t x_9; lean_object* x_10; -x_8 = lean_unbox(x_4); -lean_dec(x_4); -x_9 = lean_unbox(x_5); -lean_dec(x_5); -x_10 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleEdits___spec__4(x_1, x_2, x_3, x_8, x_9, x_6, x_7); lean_dec(x_1); return x_10; } } -lean_object* l_Lean_Server_Watchdog_handleEdits___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { +lean_object* l_Lean_Server_Watchdog_handleEdits___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14) { _start: { -lean_object* x_14; -x_14 = l_Lean_Server_Watchdog_handleEdits___lambda__1(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); +lean_object* x_15; +x_15 = l_Lean_Server_Watchdog_handleEdits___lambda__1(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_12); lean_dec(x_11); lean_dec(x_2); -return x_14; +return x_15; } } -lean_object* l_Lean_Server_Watchdog_handleEdits___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, lean_object* x_13) { +lean_object* l_Lean_Server_Watchdog_handleEdits___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, lean_object* x_13, lean_object* x_14) { _start: { -lean_object* x_14; -x_14 = l_Lean_Server_Watchdog_handleEdits___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); +lean_object* x_15; +x_15 = l_Lean_Server_Watchdog_handleEdits___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); +lean_dec(x_12); lean_dec(x_11); lean_dec(x_2); -return x_14; +return x_15; } } lean_object* l_Lean_Server_Watchdog_handleDidClose(lean_object* x_1, lean_object* x_2, lean_object* x_3) { @@ -10448,7 +7304,7 @@ goto _start; } } } -lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleCancelRequest___spec__4(lean_object* x_1) { +lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleCancelRequest___spec__2(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; @@ -10463,503 +7319,7 @@ lean_ctor_set(x_5, 0, x_4); return x_5; } } -lean_object* l_IO_FS_Stream_writeLspNotification___at_Lean_Server_Watchdog_handleCancelRequest___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; -x_4 = lean_ctor_get(x_2, 0); -x_5 = lean_ctor_get(x_2, 1); -x_6 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleCancelRequest___spec__4(x_5); -lean_inc(x_4); -x_7 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_7, 0, x_4); -lean_ctor_set(x_7, 1, x_6); -x_8 = l_IO_FS_Stream_writeLspMessage(x_1, x_7, x_3); -lean_dec(x_7); -return x_8; -} -} -lean_object* l_Lean_Server_Watchdog_FileWorker_writeNotification___at_Lean_Server_Watchdog_handleCancelRequest___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; lean_object* x_5; -x_4 = l_Lean_Server_Watchdog_FileWorker_stdin(x_1); -x_5 = l_IO_FS_Stream_writeLspNotification___at_Lean_Server_Watchdog_handleCancelRequest___spec__3(x_4, x_2, x_3); -return x_5; -} -} -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleCancelRequest___spec__6(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -uint8_t x_8; -x_8 = x_4 < x_3; -if (x_8 == 0) -{ -lean_object* x_9; -lean_dec(x_1); -x_9 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_9, 0, x_5); -lean_ctor_set(x_9, 1, x_7); -return x_9; -} -else -{ -lean_object* x_10; lean_object* x_11; -x_10 = lean_array_uget(x_2, x_4); -lean_inc(x_1); -x_11 = l_Lean_Server_Watchdog_FileWorker_writeMessage(x_1, x_10, x_7); -if (lean_obj_tag(x_11) == 0) -{ -lean_object* x_12; size_t x_13; size_t x_14; -lean_dec(x_10); -x_12 = lean_ctor_get(x_11, 1); -lean_inc(x_12); -lean_dec(x_11); -x_13 = 1; -x_14 = x_4 + x_13; -x_4 = x_14; -x_7 = x_12; -goto _start; -} -else -{ -lean_object* x_16; lean_object* x_17; size_t x_18; size_t x_19; -x_16 = lean_ctor_get(x_11, 1); -lean_inc(x_16); -lean_dec(x_11); -x_17 = lean_array_push(x_5, x_10); -x_18 = 1; -x_19 = x_4 + x_18; -x_4 = x_19; -x_5 = x_17; -x_7 = x_16; -goto _start; -} -} -} -} -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleCancelRequest___spec__7(size_t x_1, size_t x_2, lean_object* x_3) { -_start: -{ -uint8_t x_4; -x_4 = x_2 < x_1; -if (x_4 == 0) -{ -lean_object* x_5; -x_5 = x_3; -return x_5; -} -else -{ -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; size_t x_14; size_t x_15; lean_object* x_16; lean_object* x_17; -x_6 = lean_array_uget(x_3, x_2); -x_7 = lean_unsigned_to_nat(0u); -x_8 = lean_array_uset(x_3, x_2, x_7); -x_9 = x_6; -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 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleCancelRequest___spec__4(x_11); -lean_dec(x_11); -x_13 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_13, 0, x_10); -lean_ctor_set(x_13, 1, x_12); -x_14 = 1; -x_15 = x_2 + x_14; -x_16 = x_13; -x_17 = lean_array_uset(x_8, x_2, x_16); -x_2 = x_15; -x_3 = x_17; -goto _start; -} -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleCancelRequest___spec__5___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; lean_object* x_9; lean_object* x_10; lean_object* x_11; -x_7 = l_Lean_Server_Watchdog_eraseFileWorker(x_1, x_5, x_6); -x_8 = lean_ctor_get(x_7, 1); -lean_inc(x_8); -lean_dec(x_7); -x_9 = lean_ctor_get(x_2, 0); -lean_inc(x_9); -lean_dec(x_2); -x_10 = lean_ctor_get(x_9, 0); -lean_inc(x_10); -lean_dec(x_9); -lean_inc(x_5); -x_11 = l_Lean_Server_Watchdog_startFileWorker(x_10, x_5, x_8); -if (lean_obj_tag(x_11) == 0) -{ -lean_object* x_12; lean_object* x_13; -x_12 = lean_ctor_get(x_11, 1); -lean_inc(x_12); -lean_dec(x_11); -x_13 = l_Lean_Server_Watchdog_findFileWorker(x_1, x_5, x_12); -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; lean_object* x_20; uint8_t x_21; -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_3); -x_17 = lean_usize_of_nat(x_16); -lean_dec(x_16); -x_18 = 0; -x_19 = l_Array_empty___closed__1; -x_20 = l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleCancelRequest___spec__6(x_14, x_3, x_17, x_18, x_19, x_5, x_15); -x_21 = !lean_is_exclusive(x_20); -if (x_21 == 0) -{ -lean_object* x_22; lean_object* x_23; uint8_t x_24; -x_22 = lean_ctor_get(x_20, 0); -x_23 = lean_ctor_get(x_20, 1); -x_24 = l_Array_isEmpty___rarg(x_22); -if (x_24 == 0) -{ -uint8_t x_25; -x_25 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__1; -if (x_25 == 0) -{ -lean_object* x_26; -lean_dec(x_22); -lean_dec(x_5); -x_26 = lean_box(0); -lean_ctor_set(x_20, 0, x_26); -return x_20; -} -else -{ -lean_object* x_27; -lean_free_object(x_20); -x_27 = l_Lean_Server_Watchdog_handleCrash(x_1, x_22, x_5, x_23); -lean_dec(x_5); -return x_27; -} -} -else -{ -uint8_t x_28; -x_28 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__2; -if (x_28 == 0) -{ -lean_object* x_29; -lean_dec(x_22); -lean_dec(x_5); -x_29 = lean_box(0); -lean_ctor_set(x_20, 0, x_29); -return x_20; -} -else -{ -lean_object* x_30; -lean_free_object(x_20); -x_30 = l_Lean_Server_Watchdog_handleCrash(x_1, x_22, x_5, x_23); -lean_dec(x_5); -return x_30; -} -} -} -else -{ -lean_object* x_31; lean_object* x_32; uint8_t x_33; -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_20); -x_33 = l_Array_isEmpty___rarg(x_31); -if (x_33 == 0) -{ -uint8_t x_34; -x_34 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__1; -if (x_34 == 0) -{ -lean_object* x_35; lean_object* x_36; -lean_dec(x_31); -lean_dec(x_5); -x_35 = lean_box(0); -x_36 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_36, 0, x_35); -lean_ctor_set(x_36, 1, x_32); -return x_36; -} -else -{ -lean_object* x_37; -x_37 = l_Lean_Server_Watchdog_handleCrash(x_1, x_31, x_5, x_32); -lean_dec(x_5); -return x_37; -} -} -else -{ -uint8_t x_38; -x_38 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__2; -if (x_38 == 0) -{ -lean_object* x_39; lean_object* x_40; -lean_dec(x_31); -lean_dec(x_5); -x_39 = lean_box(0); -x_40 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_40, 0, x_39); -lean_ctor_set(x_40, 1, x_32); -return x_40; -} -else -{ -lean_object* x_41; -x_41 = l_Lean_Server_Watchdog_handleCrash(x_1, x_31, x_5, x_32); -lean_dec(x_5); -return x_41; -} -} -} -} -else -{ -uint8_t x_42; -lean_dec(x_5); -x_42 = !lean_is_exclusive(x_13); -if (x_42 == 0) -{ -return x_13; -} -else -{ -lean_object* x_43; lean_object* x_44; lean_object* x_45; -x_43 = lean_ctor_get(x_13, 0); -x_44 = lean_ctor_get(x_13, 1); -lean_inc(x_44); -lean_inc(x_43); -lean_dec(x_13); -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; -} -} -} -else -{ -uint8_t x_46; -lean_dec(x_5); -x_46 = !lean_is_exclusive(x_11); -if (x_46 == 0) -{ -return x_11; -} -else -{ -lean_object* x_47; lean_object* x_48; lean_object* x_49; -x_47 = lean_ctor_get(x_11, 0); -x_48 = lean_ctor_get(x_11, 1); -lean_inc(x_48); -lean_inc(x_47); -lean_dec(x_11); -x_49 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_49, 0, x_47); -lean_ctor_set(x_49, 1, x_48); -return x_49; -} -} -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleCancelRequest___spec__5___lambda__2(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -if (x_1 == 0) -{ -lean_object* x_8; lean_object* x_9; -lean_dec(x_6); -lean_dec(x_3); -x_8 = lean_box(0); -x_9 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_9, 0, x_8); -lean_ctor_set(x_9, 1, x_7); -return x_9; -} -else -{ -lean_object* x_10; lean_object* x_11; -x_10 = lean_box(0); -x_11 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleCancelRequest___spec__5___lambda__1(x_2, x_3, x_4, x_10, x_6, x_7); -return x_11; -} -} -} -static lean_object* _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleCancelRequest___spec__5___closed__1() { -_start: -{ -size_t x_1; size_t x_2; lean_object* x_3; lean_object* x_4; -x_1 = 0; -x_2 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__2; -x_3 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__3; -x_4 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleCancelRequest___spec__7(x_2, x_1, x_3); -return x_4; -} -} -static lean_object* _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleCancelRequest___spec__5___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleCancelRequest___spec__5___closed__1; -x_2 = x_1; -return x_2; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleCancelRequest___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3, uint8_t x_4, uint8_t x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -lean_object* x_8; -x_8 = l_Lean_Server_Watchdog_findFileWorker(x_1, x_6, x_7); -if (lean_obj_tag(x_8) == 0) -{ -lean_object* x_9; lean_object* x_10; -x_9 = lean_ctor_get(x_8, 0); -lean_inc(x_9); -x_10 = lean_ctor_get(x_9, 3); -lean_inc(x_10); -if (lean_obj_tag(x_10) == 0) -{ -lean_dec(x_3); -if (x_4 == 0) -{ -lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; -lean_dec(x_2); -x_11 = lean_ctor_get(x_8, 1); -lean_inc(x_11); -lean_dec(x_8); -x_12 = lean_ctor_get(x_10, 0); -lean_inc(x_12); -lean_dec(x_10); -x_13 = lean_box(0); -x_14 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleCancelRequest___spec__5___lambda__2(x_5, x_1, x_9, x_12, x_13, x_6, x_11); -lean_dec(x_12); -return x_14; -} -else -{ -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_15 = lean_ctor_get(x_8, 1); -lean_inc(x_15); -lean_dec(x_8); -x_16 = lean_ctor_get(x_10, 0); -lean_inc(x_16); -lean_dec(x_10); -x_17 = lean_ctor_get(x_2, 0); -lean_inc(x_17); -x_18 = lean_ctor_get(x_2, 1); -lean_inc(x_18); -lean_dec(x_2); -x_19 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleCancelRequest___spec__4(x_18); -lean_dec(x_18); -x_20 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_20, 0, x_17); -lean_ctor_set(x_20, 1, x_19); -x_21 = lean_array_push(x_16, x_20); -x_22 = lean_box(0); -x_23 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleCancelRequest___spec__5___lambda__2(x_5, x_1, x_9, x_21, x_22, x_6, x_15); -lean_dec(x_21); -return x_23; -} -} -else -{ -if (x_4 == 0) -{ -lean_object* x_24; lean_object* x_25; -x_24 = lean_ctor_get(x_8, 1); -lean_inc(x_24); -lean_dec(x_8); -x_25 = lean_apply_3(x_3, x_9, x_2, x_24); -if (lean_obj_tag(x_25) == 0) -{ -lean_dec(x_6); -return x_25; -} -else -{ -lean_object* x_26; lean_object* x_27; lean_object* x_28; -x_26 = lean_ctor_get(x_25, 1); -lean_inc(x_26); -lean_dec(x_25); -x_27 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleCancelRequest___spec__5___closed__2; -x_28 = l_Lean_Server_Watchdog_handleCrash(x_1, x_27, x_6, x_26); -lean_dec(x_6); -return x_28; -} -} -else -{ -lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; -x_29 = lean_ctor_get(x_8, 1); -lean_inc(x_29); -lean_dec(x_8); -x_30 = l_Lean_mkOptionalNode___closed__2; -lean_inc(x_2); -x_31 = lean_array_push(x_30, x_2); -x_32 = lean_apply_3(x_3, x_9, x_2, x_29); -if (lean_obj_tag(x_32) == 0) -{ -lean_dec(x_31); -lean_dec(x_6); -return x_32; -} -else -{ -lean_object* x_33; lean_object* x_34; size_t x_35; size_t x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; -x_33 = lean_ctor_get(x_32, 1); -lean_inc(x_33); -lean_dec(x_32); -x_34 = lean_array_get_size(x_31); -x_35 = lean_usize_of_nat(x_34); -lean_dec(x_34); -x_36 = 0; -x_37 = x_31; -x_38 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleCancelRequest___spec__7(x_35, x_36, x_37); -x_39 = x_38; -x_40 = l_Lean_Server_Watchdog_handleCrash(x_1, x_39, x_6, x_33); -lean_dec(x_6); -return x_40; -} -} -} -} -else -{ -uint8_t x_41; -lean_dec(x_6); -lean_dec(x_3); -lean_dec(x_2); -x_41 = !lean_is_exclusive(x_8); -if (x_41 == 0) -{ -return x_8; -} -else -{ -lean_object* x_42; lean_object* x_43; lean_object* x_44; -x_42 = lean_ctor_get(x_8, 0); -x_43 = lean_ctor_get(x_8, 1); -lean_inc(x_43); -lean_inc(x_42); -lean_dec(x_8); -x_44 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_44, 0, x_42); -lean_ctor_set(x_44, 1, x_43); -return x_44; -} -} -} -} -static lean_object* _init_l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_handleCancelRequest___spec__8___closed__1() { +static lean_object* _init_l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_handleCancelRequest___spec__3___closed__1() { _start: { lean_object* x_1; @@ -10967,15 +7327,7 @@ x_1 = lean_mk_string("$/cancelRequest"); return x_1; } } -static lean_object* _init_l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_handleCancelRequest___spec__8___closed__2() { -_start: -{ -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Server_Watchdog_FileWorker_writeNotification___at_Lean_Server_Watchdog_handleCancelRequest___spec__2___boxed), 3, 0); -return x_1; -} -} -lean_object* l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_handleCancelRequest___spec__8(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +lean_object* l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_handleCancelRequest___spec__3(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_2) == 0) @@ -10999,7 +7351,7 @@ x_10 = lean_ctor_get(x_2, 2); x_11 = lean_ctor_get(x_2, 3); lean_inc(x_4); lean_inc(x_1); -x_12 = l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_handleCancelRequest___spec__8(x_1, x_8, x_3, x_4, x_5); +x_12 = l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_handleCancelRequest___spec__3(x_1, x_8, x_3, x_4, x_5); if (lean_obj_tag(x_12) == 0) { lean_object* x_13; @@ -11069,15 +7421,14 @@ lean_dec(x_23); x_29 = lean_ctor_get(x_25, 1); lean_inc(x_29); lean_dec(x_25); -x_30 = l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_handleCancelRequest___spec__8___closed__1; -lean_inc(x_1); -x_31 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_31, 0, x_30); -lean_ctor_set(x_31, 1, x_1); -x_32 = l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_handleCancelRequest___spec__8___closed__2; +x_30 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleCancelRequest___spec__2(x_1); +x_31 = l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_handleCancelRequest___spec__3___closed__1; +x_32 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_32, 0, x_31); +lean_ctor_set(x_32, 1, x_30); x_33 = 0; lean_inc(x_4); -x_34 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleCancelRequest___spec__5(x_9, x_31, x_32, x_33, x_33, x_4, x_29); +x_34 = l_Lean_Server_Watchdog_tryWriteMessage(x_9, x_32, x_33, x_33, x_4, x_29); if (lean_obj_tag(x_34) == 0) { lean_object* x_35; lean_object* x_36; @@ -11158,7 +7509,7 @@ x_7 = lean_ctor_get(x_5, 1); lean_inc(x_7); lean_dec(x_5); x_8 = lean_box(0); -x_9 = l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_handleCancelRequest___spec__8(x_1, x_6, x_8, x_2, x_7); +x_9 = l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_handleCancelRequest___spec__3(x_1, x_6, x_8, x_2, x_7); lean_dec(x_6); if (lean_obj_tag(x_9) == 0) { @@ -11208,101 +7559,20 @@ return x_17; } } } -lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleCancelRequest___spec__4___boxed(lean_object* x_1) { +lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleCancelRequest___spec__2___boxed(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleCancelRequest___spec__4(x_1); +x_2 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleCancelRequest___spec__2(x_1); lean_dec(x_1); return x_2; } } -lean_object* l_IO_FS_Stream_writeLspNotification___at_Lean_Server_Watchdog_handleCancelRequest___spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l_IO_FS_Stream_writeLspNotification___at_Lean_Server_Watchdog_handleCancelRequest___spec__3(x_1, x_2, x_3); -lean_dec(x_2); -return x_4; -} -} -lean_object* l_Lean_Server_Watchdog_FileWorker_writeNotification___at_Lean_Server_Watchdog_handleCancelRequest___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l_Lean_Server_Watchdog_FileWorker_writeNotification___at_Lean_Server_Watchdog_handleCancelRequest___spec__2(x_1, x_2, x_3); -lean_dec(x_2); -return x_4; -} -} -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleCancelRequest___spec__6___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -size_t x_8; size_t x_9; lean_object* x_10; -x_8 = lean_unbox_usize(x_3); -lean_dec(x_3); -x_9 = lean_unbox_usize(x_4); -lean_dec(x_4); -x_10 = l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleCancelRequest___spec__6(x_1, x_2, x_8, x_9, x_5, x_6, x_7); -lean_dec(x_6); -lean_dec(x_2); -return x_10; -} -} -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleCancelRequest___spec__7___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -size_t x_4; size_t x_5; lean_object* x_6; -x_4 = lean_unbox_usize(x_1); -lean_dec(x_1); -x_5 = lean_unbox_usize(x_2); -lean_dec(x_2); -x_6 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleCancelRequest___spec__7(x_4, x_5, x_3); -return x_6; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleCancelRequest___spec__5___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_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleCancelRequest___spec__5___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_1); -return x_7; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleCancelRequest___spec__5___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) { -_start: -{ -uint8_t x_8; lean_object* x_9; -x_8 = lean_unbox(x_1); -lean_dec(x_1); -x_9 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleCancelRequest___spec__5___lambda__2(x_8, x_2, x_3, x_4, x_5, x_6, x_7); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -return x_9; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleCancelRequest___spec__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) { -_start: -{ -uint8_t x_8; uint8_t x_9; lean_object* x_10; -x_8 = lean_unbox(x_4); -lean_dec(x_4); -x_9 = lean_unbox(x_5); -lean_dec(x_5); -x_10 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleCancelRequest___spec__5(x_1, x_2, x_3, x_8, x_9, x_6, x_7); -lean_dec(x_1); -return x_10; -} -} -lean_object* l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_handleCancelRequest___spec__8___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +lean_object* l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_handleCancelRequest___spec__3___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_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_handleCancelRequest___spec__8(x_1, x_2, x_3, x_4, x_5); +x_6 = l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_handleCancelRequest___spec__3(x_1, x_2, x_3, x_4, x_5); lean_dec(x_2); return x_6; } @@ -11790,602 +8060,2540 @@ return x_12; } } } -lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__4(lean_object* x_1) { +lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__2(lean_object* x_1) { _start: { -lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; -x_2 = l___private_Lean_Data_Lsp_Extra_0__Lean_Lsp_toJsonPlainGoalParams____x40_Lean_Data_Lsp_Extra___hyg_155_(x_1); -x_3 = lean_ctor_get(x_2, 0); -lean_inc(x_3); -lean_dec(x_2); +switch (lean_obj_tag(x_1)) { +case 4: +{ +lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_2 = lean_ctor_get(x_1, 0); +lean_inc(x_2); +x_3 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_3, 0, x_2); x_4 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_4, 0, x_3); -x_5 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_5, 0, x_4); -return x_5; +return x_4; } -} -lean_object* l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_handleRequest___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: +case 5: { -lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; -x_4 = lean_ctor_get(x_2, 0); -lean_inc(x_4); -x_5 = lean_ctor_get(x_2, 1); +lean_object* x_5; lean_object* x_6; lean_object* x_7; +x_5 = lean_ctor_get(x_1, 0); lean_inc(x_5); -x_6 = lean_ctor_get(x_2, 2); -lean_inc(x_6); -lean_dec(x_2); -x_7 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__4(x_6); -x_8 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_8, 0, x_4); -lean_ctor_set(x_8, 1, x_5); -lean_ctor_set(x_8, 2, x_7); -x_9 = l_IO_FS_Stream_writeLspMessage(x_1, x_8, x_3); -lean_dec(x_8); -return x_9; +x_6 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_6, 0, x_5); +x_7 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_7, 0, x_6); +return x_7; +} +default: +{ +lean_object* x_8; +x_8 = lean_box(0); +return x_8; } } -lean_object* l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +} +} +lean_object* l_Std_RBNode_ins___at_Lean_Server_Watchdog_handleRequest___spec__4(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { -lean_object* x_4; lean_object* x_5; -lean_inc(x_1); -x_4 = l_Lean_Server_Watchdog_FileWorker_stdin(x_1); -lean_inc(x_2); -x_5 = l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_handleRequest___spec__3(x_4, x_2, x_3); -if (lean_obj_tag(x_5) == 0) +if (lean_obj_tag(x_1) == 0) { -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; uint8_t x_18; -x_6 = lean_ctor_get(x_5, 1); -lean_inc(x_6); -lean_dec(x_5); -x_7 = lean_ctor_get(x_1, 4); -lean_inc(x_7); -lean_dec(x_1); -x_8 = lean_st_ref_take(x_7, x_6); -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_2, 0); -lean_inc(x_11); -x_12 = lean_ctor_get(x_2, 1); -lean_inc(x_12); -x_13 = lean_ctor_get(x_2, 2); -lean_inc(x_13); -lean_dec(x_2); -x_14 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__4(x_13); -lean_inc(x_11); -x_15 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_15, 0, x_11); -lean_ctor_set(x_15, 1, x_12); -lean_ctor_set(x_15, 2, x_14); -x_16 = l_Std_RBNode_insert___at_Lean_Server_Watchdog_FileWorker_writeRequest___spec__1(x_9, x_11, x_15); -x_17 = lean_st_ref_set(x_7, x_16, x_10); -lean_dec(x_7); -x_18 = !lean_is_exclusive(x_17); -if (x_18 == 0) -{ -return x_17; +lean_object* x_4; uint8_t x_5; lean_object* x_6; +x_4 = lean_box(0); +x_5 = 0; +x_6 = lean_alloc_ctor(1, 4, 1); +lean_ctor_set(x_6, 0, x_4); +lean_ctor_set(x_6, 1, x_2); +lean_ctor_set(x_6, 2, x_3); +lean_ctor_set(x_6, 3, x_4); +lean_ctor_set_uint8(x_6, sizeof(void*)*4, x_5); +return x_6; } else { -lean_object* x_19; lean_object* x_20; lean_object* x_21; -x_19 = lean_ctor_get(x_17, 0); -x_20 = lean_ctor_get(x_17, 1); -lean_inc(x_20); -lean_inc(x_19); -lean_dec(x_17); -x_21 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_21, 0, x_19); -lean_ctor_set(x_21, 1, x_20); -return x_21; -} -} -else -{ -uint8_t x_22; -lean_dec(x_2); -lean_dec(x_1); -x_22 = !lean_is_exclusive(x_5); -if (x_22 == 0) -{ -return x_5; -} -else -{ -lean_object* x_23; lean_object* x_24; lean_object* x_25; -x_23 = lean_ctor_get(x_5, 0); -x_24 = lean_ctor_get(x_5, 1); -lean_inc(x_24); -lean_inc(x_23); -lean_dec(x_5); -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_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__6(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: +uint8_t x_7; +x_7 = lean_ctor_get_uint8(x_1, sizeof(void*)*4); +if (x_7 == 0) { uint8_t x_8; -x_8 = x_4 < x_3; +x_8 = !lean_is_exclusive(x_1); if (x_8 == 0) { -lean_object* x_9; -lean_dec(x_1); -x_9 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_9, 0, x_5); -lean_ctor_set(x_9, 1, x_7); -return x_9; -} -else +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; +x_9 = lean_ctor_get(x_1, 0); +x_10 = lean_ctor_get(x_1, 1); +x_11 = lean_ctor_get(x_1, 2); +x_12 = lean_ctor_get(x_1, 3); +lean_inc(x_10); +lean_inc(x_2); +x_13 = l___private_Lean_Data_JsonRpc_0__Lean_JsonRpc_RequestID_lt(x_2, x_10); +if (x_13 == 0) { -lean_object* x_10; lean_object* x_11; -x_10 = lean_array_uget(x_2, x_4); -lean_inc(x_1); -x_11 = l_Lean_Server_Watchdog_FileWorker_writeMessage(x_1, x_10, x_7); -if (lean_obj_tag(x_11) == 0) +uint8_t x_14; +lean_inc(x_2); +lean_inc(x_10); +x_14 = l___private_Lean_Data_JsonRpc_0__Lean_JsonRpc_RequestID_lt(x_10, x_2); +if (x_14 == 0) { -lean_object* x_12; size_t x_13; size_t x_14; +uint8_t x_15; +lean_dec(x_11); lean_dec(x_10); -x_12 = lean_ctor_get(x_11, 1); -lean_inc(x_12); -lean_dec(x_11); -x_13 = 1; -x_14 = x_4 + x_13; -x_4 = x_14; -x_7 = x_12; -goto _start; +x_15 = 0; +lean_ctor_set(x_1, 2, x_3); +lean_ctor_set(x_1, 1, x_2); +lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_15); +return x_1; } else { -lean_object* x_16; lean_object* x_17; size_t x_18; size_t x_19; -x_16 = lean_ctor_get(x_11, 1); -lean_inc(x_16); -lean_dec(x_11); -x_17 = lean_array_push(x_5, x_10); -x_18 = 1; -x_19 = x_4 + x_18; -x_4 = x_19; -x_5 = x_17; -x_7 = x_16; -goto _start; +lean_object* x_16; uint8_t x_17; +x_16 = l_Std_RBNode_ins___at_Lean_Server_Watchdog_handleRequest___spec__4(x_12, x_2, x_3); +x_17 = 0; +lean_ctor_set(x_1, 3, x_16); +lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_17); +return x_1; } } -} -} -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__7(size_t x_1, size_t x_2, lean_object* x_3) { -_start: -{ -uint8_t x_4; -x_4 = x_2 < x_1; -if (x_4 == 0) -{ -lean_object* x_5; -x_5 = x_3; -return x_5; -} else { -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; size_t x_15; size_t x_16; lean_object* x_17; lean_object* x_18; -x_6 = lean_array_uget(x_3, x_2); -x_7 = lean_unsigned_to_nat(0u); -x_8 = lean_array_uset(x_3, x_2, x_7); -x_9 = x_6; -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_13 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__4(x_12); -x_14 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_14, 0, x_10); -lean_ctor_set(x_14, 1, x_11); -lean_ctor_set(x_14, 2, x_13); -x_15 = 1; -x_16 = x_2 + x_15; -x_17 = x_14; -x_18 = lean_array_uset(x_8, x_2, x_17); -x_2 = x_16; -x_3 = x_18; -goto _start; +lean_object* x_18; uint8_t x_19; +x_18 = l_Std_RBNode_ins___at_Lean_Server_Watchdog_handleRequest___spec__4(x_9, x_2, x_3); +x_19 = 0; +lean_ctor_set(x_1, 0, x_18); +lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_19); +return x_1; } } -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__5___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: +else { -lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; -x_7 = l_Lean_Server_Watchdog_eraseFileWorker(x_1, x_5, x_6); -x_8 = lean_ctor_get(x_7, 1); -lean_inc(x_8); -lean_dec(x_7); -x_9 = lean_ctor_get(x_2, 0); -lean_inc(x_9); -lean_dec(x_2); -x_10 = lean_ctor_get(x_9, 0); -lean_inc(x_10); -lean_dec(x_9); -lean_inc(x_5); -x_11 = l_Lean_Server_Watchdog_startFileWorker(x_10, x_5, x_8); -if (lean_obj_tag(x_11) == 0) -{ -lean_object* x_12; lean_object* x_13; -x_12 = lean_ctor_get(x_11, 1); -lean_inc(x_12); -lean_dec(x_11); -x_13 = l_Lean_Server_Watchdog_findFileWorker(x_1, x_5, x_12); -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; lean_object* x_20; uint8_t x_21; -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_3); -x_17 = lean_usize_of_nat(x_16); -lean_dec(x_16); -x_18 = 0; -x_19 = l_Array_empty___closed__1; -x_20 = l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__6(x_14, x_3, x_17, x_18, x_19, x_5, x_15); -x_21 = !lean_is_exclusive(x_20); -if (x_21 == 0) -{ -lean_object* x_22; lean_object* x_23; uint8_t x_24; -x_22 = lean_ctor_get(x_20, 0); -x_23 = lean_ctor_get(x_20, 1); -x_24 = l_Array_isEmpty___rarg(x_22); +lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; uint8_t x_24; +x_20 = lean_ctor_get(x_1, 0); +x_21 = lean_ctor_get(x_1, 1); +x_22 = lean_ctor_get(x_1, 2); +x_23 = lean_ctor_get(x_1, 3); +lean_inc(x_23); +lean_inc(x_22); +lean_inc(x_21); +lean_inc(x_20); +lean_dec(x_1); +lean_inc(x_21); +lean_inc(x_2); +x_24 = l___private_Lean_Data_JsonRpc_0__Lean_JsonRpc_RequestID_lt(x_2, x_21); if (x_24 == 0) { uint8_t x_25; -x_25 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__1; +lean_inc(x_2); +lean_inc(x_21); +x_25 = l___private_Lean_Data_JsonRpc_0__Lean_JsonRpc_RequestID_lt(x_21, x_2); if (x_25 == 0) { -lean_object* x_26; +uint8_t x_26; lean_object* x_27; lean_dec(x_22); -lean_dec(x_5); -x_26 = lean_box(0); -lean_ctor_set(x_20, 0, x_26); -return x_20; -} -else -{ -lean_object* x_27; -lean_free_object(x_20); -x_27 = l_Lean_Server_Watchdog_handleCrash(x_1, x_22, x_5, x_23); -lean_dec(x_5); +lean_dec(x_21); +x_26 = 0; +x_27 = lean_alloc_ctor(1, 4, 1); +lean_ctor_set(x_27, 0, x_20); +lean_ctor_set(x_27, 1, x_2); +lean_ctor_set(x_27, 2, x_3); +lean_ctor_set(x_27, 3, x_23); +lean_ctor_set_uint8(x_27, sizeof(void*)*4, x_26); return x_27; } -} else { -uint8_t x_28; -x_28 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__2; -if (x_28 == 0) -{ -lean_object* x_29; -lean_dec(x_22); -lean_dec(x_5); -x_29 = lean_box(0); -lean_ctor_set(x_20, 0, x_29); -return x_20; -} -else -{ -lean_object* x_30; -lean_free_object(x_20); -x_30 = l_Lean_Server_Watchdog_handleCrash(x_1, x_22, x_5, x_23); -lean_dec(x_5); +lean_object* x_28; uint8_t x_29; lean_object* x_30; +x_28 = l_Std_RBNode_ins___at_Lean_Server_Watchdog_handleRequest___spec__4(x_23, x_2, x_3); +x_29 = 0; +x_30 = lean_alloc_ctor(1, 4, 1); +lean_ctor_set(x_30, 0, x_20); +lean_ctor_set(x_30, 1, x_21); +lean_ctor_set(x_30, 2, x_22); +lean_ctor_set(x_30, 3, x_28); +lean_ctor_set_uint8(x_30, sizeof(void*)*4, x_29); return x_30; } } -} else { -lean_object* x_31; lean_object* x_32; uint8_t x_33; -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_20); -x_33 = l_Array_isEmpty___rarg(x_31); -if (x_33 == 0) -{ -uint8_t x_34; -x_34 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__1; -if (x_34 == 0) -{ -lean_object* x_35; lean_object* x_36; -lean_dec(x_31); -lean_dec(x_5); -x_35 = lean_box(0); -x_36 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_36, 0, x_35); -lean_ctor_set(x_36, 1, x_32); -return x_36; -} -else -{ -lean_object* x_37; -x_37 = l_Lean_Server_Watchdog_handleCrash(x_1, x_31, x_5, x_32); -lean_dec(x_5); -return x_37; -} -} -else -{ -uint8_t x_38; -x_38 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__2; -if (x_38 == 0) -{ -lean_object* x_39; lean_object* x_40; -lean_dec(x_31); -lean_dec(x_5); -x_39 = lean_box(0); -x_40 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_40, 0, x_39); -lean_ctor_set(x_40, 1, x_32); -return x_40; -} -else -{ -lean_object* x_41; -x_41 = l_Lean_Server_Watchdog_handleCrash(x_1, x_31, x_5, x_32); -lean_dec(x_5); -return x_41; -} -} -} -} -else -{ -uint8_t x_42; -lean_dec(x_5); -x_42 = !lean_is_exclusive(x_13); -if (x_42 == 0) -{ -return x_13; -} -else -{ -lean_object* x_43; lean_object* x_44; lean_object* x_45; -x_43 = lean_ctor_get(x_13, 0); -x_44 = lean_ctor_get(x_13, 1); -lean_inc(x_44); -lean_inc(x_43); -lean_dec(x_13); -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; -} -} -} -else -{ -uint8_t x_46; -lean_dec(x_5); -x_46 = !lean_is_exclusive(x_11); -if (x_46 == 0) -{ -return x_11; -} -else -{ -lean_object* x_47; lean_object* x_48; lean_object* x_49; -x_47 = lean_ctor_get(x_11, 0); -x_48 = lean_ctor_get(x_11, 1); -lean_inc(x_48); -lean_inc(x_47); -lean_dec(x_11); -x_49 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_49, 0, x_47); -lean_ctor_set(x_49, 1, x_48); -return x_49; -} -} -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__5___lambda__2(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -if (x_1 == 0) -{ -lean_object* x_8; lean_object* x_9; -lean_dec(x_6); -lean_dec(x_3); -x_8 = lean_box(0); -x_9 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_9, 0, x_8); -lean_ctor_set(x_9, 1, x_7); -return x_9; -} -else -{ -lean_object* x_10; lean_object* x_11; -x_10 = lean_box(0); -x_11 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__5___lambda__1(x_2, x_3, x_4, x_10, x_6, x_7); -return x_11; -} -} -} -static lean_object* _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__5___closed__1() { -_start: -{ -size_t x_1; size_t x_2; lean_object* x_3; lean_object* x_4; -x_1 = 0; -x_2 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__2; -x_3 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__3; -x_4 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__7(x_2, x_1, x_3); -return x_4; -} -} -static lean_object* _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__5___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__5___closed__1; -x_2 = x_1; -return x_2; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3, uint8_t x_4, uint8_t x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -lean_object* x_8; -x_8 = l_Lean_Server_Watchdog_findFileWorker(x_1, x_6, x_7); -if (lean_obj_tag(x_8) == 0) -{ -lean_object* x_9; lean_object* x_10; -x_9 = lean_ctor_get(x_8, 0); -lean_inc(x_9); -x_10 = lean_ctor_get(x_9, 3); -lean_inc(x_10); -if (lean_obj_tag(x_10) == 0) -{ -lean_dec(x_3); -if (x_4 == 0) -{ -lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; -lean_dec(x_2); -x_11 = lean_ctor_get(x_8, 1); -lean_inc(x_11); -lean_dec(x_8); -x_12 = lean_ctor_get(x_10, 0); -lean_inc(x_12); -lean_dec(x_10); -x_13 = lean_box(0); -x_14 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__5___lambda__2(x_5, x_1, x_9, x_12, x_13, x_6, x_11); -lean_dec(x_12); -return x_14; -} -else -{ -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; -x_15 = lean_ctor_get(x_8, 1); -lean_inc(x_15); -lean_dec(x_8); -x_16 = lean_ctor_get(x_10, 0); -lean_inc(x_16); -lean_dec(x_10); -x_17 = lean_ctor_get(x_2, 0); -lean_inc(x_17); -x_18 = lean_ctor_get(x_2, 1); -lean_inc(x_18); -x_19 = lean_ctor_get(x_2, 2); -lean_inc(x_19); -lean_dec(x_2); -x_20 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__4(x_19); -x_21 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_21, 0, x_17); -lean_ctor_set(x_21, 1, x_18); -lean_ctor_set(x_21, 2, x_20); -x_22 = lean_array_push(x_16, x_21); -x_23 = lean_box(0); -x_24 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__5___lambda__2(x_5, x_1, x_9, x_22, x_23, x_6, x_15); -lean_dec(x_22); -return x_24; -} -} -else -{ -if (x_4 == 0) -{ -lean_object* x_25; lean_object* x_26; -x_25 = lean_ctor_get(x_8, 1); -lean_inc(x_25); -lean_dec(x_8); -x_26 = lean_apply_3(x_3, x_9, x_2, x_25); -if (lean_obj_tag(x_26) == 0) -{ -lean_dec(x_6); -return x_26; -} -else -{ -lean_object* x_27; lean_object* x_28; lean_object* x_29; -x_27 = lean_ctor_get(x_26, 1); -lean_inc(x_27); -lean_dec(x_26); -x_28 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__5___closed__2; -x_29 = l_Lean_Server_Watchdog_handleCrash(x_1, x_28, x_6, x_27); -lean_dec(x_6); -return x_29; -} -} -else -{ -lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; -x_30 = lean_ctor_get(x_8, 1); -lean_inc(x_30); -lean_dec(x_8); -x_31 = l_Lean_mkOptionalNode___closed__2; -lean_inc(x_2); -x_32 = lean_array_push(x_31, x_2); -x_33 = lean_apply_3(x_3, x_9, x_2, x_30); -if (lean_obj_tag(x_33) == 0) -{ -lean_dec(x_32); -lean_dec(x_6); +lean_object* x_31; uint8_t x_32; lean_object* x_33; +x_31 = l_Std_RBNode_ins___at_Lean_Server_Watchdog_handleRequest___spec__4(x_20, x_2, x_3); +x_32 = 0; +x_33 = lean_alloc_ctor(1, 4, 1); +lean_ctor_set(x_33, 0, x_31); +lean_ctor_set(x_33, 1, x_21); +lean_ctor_set(x_33, 2, x_22); +lean_ctor_set(x_33, 3, x_23); +lean_ctor_set_uint8(x_33, sizeof(void*)*4, x_32); return x_33; } +} +} else { -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_34 = lean_ctor_get(x_33, 1); -lean_inc(x_34); -lean_dec(x_33); -x_35 = lean_array_get_size(x_32); -x_36 = lean_usize_of_nat(x_35); -lean_dec(x_35); -x_37 = 0; -x_38 = x_32; -x_39 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__7(x_36, x_37, x_38); -x_40 = x_39; -x_41 = l_Lean_Server_Watchdog_handleCrash(x_1, x_40, x_6, x_34); -lean_dec(x_6); -return x_41; -} -} -} +uint8_t x_34; +x_34 = !lean_is_exclusive(x_1); +if (x_34 == 0) +{ +lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; uint8_t x_39; +x_35 = lean_ctor_get(x_1, 0); +x_36 = lean_ctor_get(x_1, 1); +x_37 = lean_ctor_get(x_1, 2); +x_38 = lean_ctor_get(x_1, 3); +lean_inc(x_36); +lean_inc(x_2); +x_39 = l___private_Lean_Data_JsonRpc_0__Lean_JsonRpc_RequestID_lt(x_2, x_36); +if (x_39 == 0) +{ +uint8_t x_40; +lean_inc(x_2); +lean_inc(x_36); +x_40 = l___private_Lean_Data_JsonRpc_0__Lean_JsonRpc_RequestID_lt(x_36, x_2); +if (x_40 == 0) +{ +uint8_t x_41; +lean_dec(x_37); +lean_dec(x_36); +x_41 = 1; +lean_ctor_set(x_1, 2, x_3); +lean_ctor_set(x_1, 1, x_2); +lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_41); +return x_1; } else { uint8_t x_42; -lean_dec(x_6); -lean_dec(x_3); -lean_dec(x_2); -x_42 = !lean_is_exclusive(x_8); +x_42 = l_Std_RBNode_isRed___rarg(x_38); if (x_42 == 0) { -return x_8; +lean_object* x_43; uint8_t x_44; +x_43 = l_Std_RBNode_ins___at_Lean_Server_Watchdog_handleRequest___spec__4(x_38, x_2, x_3); +x_44 = 1; +lean_ctor_set(x_1, 3, x_43); +lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_44); +return x_1; } else { -lean_object* x_43; lean_object* x_44; lean_object* x_45; -x_43 = lean_ctor_get(x_8, 0); -x_44 = lean_ctor_get(x_8, 1); -lean_inc(x_44); -lean_inc(x_43); -lean_dec(x_8); -x_45 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_45, 0, x_43); -lean_ctor_set(x_45, 1, x_44); +lean_object* x_45; lean_object* x_46; +x_45 = l_Std_RBNode_ins___at_Lean_Server_Watchdog_handleRequest___spec__4(x_38, x_2, x_3); +x_46 = lean_ctor_get(x_45, 0); +lean_inc(x_46); +if (lean_obj_tag(x_46) == 0) +{ +lean_object* x_47; +x_47 = lean_ctor_get(x_45, 3); +lean_inc(x_47); +if (lean_obj_tag(x_47) == 0) +{ +uint8_t x_48; +x_48 = !lean_is_exclusive(x_45); +if (x_48 == 0) +{ +lean_object* x_49; lean_object* x_50; uint8_t x_51; uint8_t x_52; +x_49 = lean_ctor_get(x_45, 3); +lean_dec(x_49); +x_50 = lean_ctor_get(x_45, 0); +lean_dec(x_50); +x_51 = 0; +lean_ctor_set(x_45, 0, x_47); +lean_ctor_set_uint8(x_45, sizeof(void*)*4, x_51); +x_52 = 1; +lean_ctor_set(x_1, 3, x_45); +lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_52); +return x_1; +} +else +{ +lean_object* x_53; lean_object* x_54; uint8_t x_55; lean_object* x_56; uint8_t x_57; +x_53 = lean_ctor_get(x_45, 1); +x_54 = lean_ctor_get(x_45, 2); +lean_inc(x_54); +lean_inc(x_53); +lean_dec(x_45); +x_55 = 0; +x_56 = lean_alloc_ctor(1, 4, 1); +lean_ctor_set(x_56, 0, x_47); +lean_ctor_set(x_56, 1, x_53); +lean_ctor_set(x_56, 2, x_54); +lean_ctor_set(x_56, 3, x_47); +lean_ctor_set_uint8(x_56, sizeof(void*)*4, x_55); +x_57 = 1; +lean_ctor_set(x_1, 3, x_56); +lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_57); +return x_1; +} +} +else +{ +uint8_t x_58; +x_58 = lean_ctor_get_uint8(x_47, sizeof(void*)*4); +if (x_58 == 0) +{ +uint8_t x_59; +x_59 = !lean_is_exclusive(x_45); +if (x_59 == 0) +{ +lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; uint8_t x_64; +x_60 = lean_ctor_get(x_45, 1); +x_61 = lean_ctor_get(x_45, 2); +x_62 = lean_ctor_get(x_45, 3); +lean_dec(x_62); +x_63 = lean_ctor_get(x_45, 0); +lean_dec(x_63); +x_64 = !lean_is_exclusive(x_47); +if (x_64 == 0) +{ +lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; uint8_t x_69; uint8_t x_70; +x_65 = lean_ctor_get(x_47, 0); +x_66 = lean_ctor_get(x_47, 1); +x_67 = lean_ctor_get(x_47, 2); +x_68 = lean_ctor_get(x_47, 3); +x_69 = 1; +lean_ctor_set(x_47, 3, x_46); +lean_ctor_set(x_47, 2, x_37); +lean_ctor_set(x_47, 1, x_36); +lean_ctor_set(x_47, 0, x_35); +lean_ctor_set_uint8(x_47, sizeof(void*)*4, x_69); +lean_ctor_set(x_45, 3, x_68); +lean_ctor_set(x_45, 2, x_67); +lean_ctor_set(x_45, 1, x_66); +lean_ctor_set(x_45, 0, x_65); +lean_ctor_set_uint8(x_45, sizeof(void*)*4, x_69); +x_70 = 0; +lean_ctor_set(x_1, 3, x_45); +lean_ctor_set(x_1, 2, x_61); +lean_ctor_set(x_1, 1, x_60); +lean_ctor_set(x_1, 0, x_47); +lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_70); +return x_1; +} +else +{ +lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; uint8_t x_75; lean_object* x_76; uint8_t x_77; +x_71 = lean_ctor_get(x_47, 0); +x_72 = lean_ctor_get(x_47, 1); +x_73 = lean_ctor_get(x_47, 2); +x_74 = lean_ctor_get(x_47, 3); +lean_inc(x_74); +lean_inc(x_73); +lean_inc(x_72); +lean_inc(x_71); +lean_dec(x_47); +x_75 = 1; +x_76 = lean_alloc_ctor(1, 4, 1); +lean_ctor_set(x_76, 0, x_35); +lean_ctor_set(x_76, 1, x_36); +lean_ctor_set(x_76, 2, x_37); +lean_ctor_set(x_76, 3, x_46); +lean_ctor_set_uint8(x_76, sizeof(void*)*4, x_75); +lean_ctor_set(x_45, 3, x_74); +lean_ctor_set(x_45, 2, x_73); +lean_ctor_set(x_45, 1, x_72); +lean_ctor_set(x_45, 0, x_71); +lean_ctor_set_uint8(x_45, sizeof(void*)*4, x_75); +x_77 = 0; +lean_ctor_set(x_1, 3, x_45); +lean_ctor_set(x_1, 2, x_61); +lean_ctor_set(x_1, 1, x_60); +lean_ctor_set(x_1, 0, x_76); +lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_77); +return x_1; +} +} +else +{ +lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; uint8_t x_85; lean_object* x_86; lean_object* x_87; uint8_t x_88; +x_78 = lean_ctor_get(x_45, 1); +x_79 = lean_ctor_get(x_45, 2); +lean_inc(x_79); +lean_inc(x_78); +lean_dec(x_45); +x_80 = lean_ctor_get(x_47, 0); +lean_inc(x_80); +x_81 = lean_ctor_get(x_47, 1); +lean_inc(x_81); +x_82 = lean_ctor_get(x_47, 2); +lean_inc(x_82); +x_83 = lean_ctor_get(x_47, 3); +lean_inc(x_83); +if (lean_is_exclusive(x_47)) { + lean_ctor_release(x_47, 0); + lean_ctor_release(x_47, 1); + lean_ctor_release(x_47, 2); + lean_ctor_release(x_47, 3); + x_84 = x_47; +} else { + lean_dec_ref(x_47); + x_84 = lean_box(0); +} +x_85 = 1; +if (lean_is_scalar(x_84)) { + x_86 = lean_alloc_ctor(1, 4, 1); +} else { + x_86 = x_84; +} +lean_ctor_set(x_86, 0, x_35); +lean_ctor_set(x_86, 1, x_36); +lean_ctor_set(x_86, 2, x_37); +lean_ctor_set(x_86, 3, x_46); +lean_ctor_set_uint8(x_86, sizeof(void*)*4, x_85); +x_87 = lean_alloc_ctor(1, 4, 1); +lean_ctor_set(x_87, 0, x_80); +lean_ctor_set(x_87, 1, x_81); +lean_ctor_set(x_87, 2, x_82); +lean_ctor_set(x_87, 3, x_83); +lean_ctor_set_uint8(x_87, sizeof(void*)*4, x_85); +x_88 = 0; +lean_ctor_set(x_1, 3, x_87); +lean_ctor_set(x_1, 2, x_79); +lean_ctor_set(x_1, 1, x_78); +lean_ctor_set(x_1, 0, x_86); +lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_88); +return x_1; +} +} +else +{ +uint8_t x_89; +x_89 = !lean_is_exclusive(x_45); +if (x_89 == 0) +{ +lean_object* x_90; lean_object* x_91; uint8_t x_92; uint8_t x_93; +x_90 = lean_ctor_get(x_45, 3); +lean_dec(x_90); +x_91 = lean_ctor_get(x_45, 0); +lean_dec(x_91); +x_92 = 0; +lean_ctor_set_uint8(x_45, sizeof(void*)*4, x_92); +x_93 = 1; +lean_ctor_set(x_1, 3, x_45); +lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_93); +return x_1; +} +else +{ +lean_object* x_94; lean_object* x_95; uint8_t x_96; lean_object* x_97; uint8_t x_98; +x_94 = lean_ctor_get(x_45, 1); +x_95 = lean_ctor_get(x_45, 2); +lean_inc(x_95); +lean_inc(x_94); +lean_dec(x_45); +x_96 = 0; +x_97 = lean_alloc_ctor(1, 4, 1); +lean_ctor_set(x_97, 0, x_46); +lean_ctor_set(x_97, 1, x_94); +lean_ctor_set(x_97, 2, x_95); +lean_ctor_set(x_97, 3, x_47); +lean_ctor_set_uint8(x_97, sizeof(void*)*4, x_96); +x_98 = 1; +lean_ctor_set(x_1, 3, x_97); +lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_98); +return x_1; +} +} +} +} +else +{ +uint8_t x_99; +x_99 = lean_ctor_get_uint8(x_46, sizeof(void*)*4); +if (x_99 == 0) +{ +uint8_t x_100; +x_100 = !lean_is_exclusive(x_45); +if (x_100 == 0) +{ +lean_object* x_101; uint8_t x_102; +x_101 = lean_ctor_get(x_45, 0); +lean_dec(x_101); +x_102 = !lean_is_exclusive(x_46); +if (x_102 == 0) +{ +lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; uint8_t x_107; uint8_t x_108; +x_103 = lean_ctor_get(x_46, 0); +x_104 = lean_ctor_get(x_46, 1); +x_105 = lean_ctor_get(x_46, 2); +x_106 = lean_ctor_get(x_46, 3); +x_107 = 1; +lean_ctor_set(x_46, 3, x_103); +lean_ctor_set(x_46, 2, x_37); +lean_ctor_set(x_46, 1, x_36); +lean_ctor_set(x_46, 0, x_35); +lean_ctor_set_uint8(x_46, sizeof(void*)*4, x_107); +lean_ctor_set(x_45, 0, x_106); +lean_ctor_set_uint8(x_45, sizeof(void*)*4, x_107); +x_108 = 0; +lean_ctor_set(x_1, 3, x_45); +lean_ctor_set(x_1, 2, x_105); +lean_ctor_set(x_1, 1, x_104); +lean_ctor_set(x_1, 0, x_46); +lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_108); +return x_1; +} +else +{ +lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; uint8_t x_113; lean_object* x_114; uint8_t x_115; +x_109 = lean_ctor_get(x_46, 0); +x_110 = lean_ctor_get(x_46, 1); +x_111 = lean_ctor_get(x_46, 2); +x_112 = lean_ctor_get(x_46, 3); +lean_inc(x_112); +lean_inc(x_111); +lean_inc(x_110); +lean_inc(x_109); +lean_dec(x_46); +x_113 = 1; +x_114 = lean_alloc_ctor(1, 4, 1); +lean_ctor_set(x_114, 0, x_35); +lean_ctor_set(x_114, 1, x_36); +lean_ctor_set(x_114, 2, x_37); +lean_ctor_set(x_114, 3, x_109); +lean_ctor_set_uint8(x_114, sizeof(void*)*4, x_113); +lean_ctor_set(x_45, 0, x_112); +lean_ctor_set_uint8(x_45, sizeof(void*)*4, x_113); +x_115 = 0; +lean_ctor_set(x_1, 3, x_45); +lean_ctor_set(x_1, 2, x_111); +lean_ctor_set(x_1, 1, x_110); +lean_ctor_set(x_1, 0, x_114); +lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_115); +return x_1; +} +} +else +{ +lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; uint8_t x_124; lean_object* x_125; lean_object* x_126; uint8_t x_127; +x_116 = lean_ctor_get(x_45, 1); +x_117 = lean_ctor_get(x_45, 2); +x_118 = lean_ctor_get(x_45, 3); +lean_inc(x_118); +lean_inc(x_117); +lean_inc(x_116); +lean_dec(x_45); +x_119 = lean_ctor_get(x_46, 0); +lean_inc(x_119); +x_120 = lean_ctor_get(x_46, 1); +lean_inc(x_120); +x_121 = lean_ctor_get(x_46, 2); +lean_inc(x_121); +x_122 = lean_ctor_get(x_46, 3); +lean_inc(x_122); +if (lean_is_exclusive(x_46)) { + lean_ctor_release(x_46, 0); + lean_ctor_release(x_46, 1); + lean_ctor_release(x_46, 2); + lean_ctor_release(x_46, 3); + x_123 = x_46; +} else { + lean_dec_ref(x_46); + x_123 = lean_box(0); +} +x_124 = 1; +if (lean_is_scalar(x_123)) { + x_125 = lean_alloc_ctor(1, 4, 1); +} else { + x_125 = x_123; +} +lean_ctor_set(x_125, 0, x_35); +lean_ctor_set(x_125, 1, x_36); +lean_ctor_set(x_125, 2, x_37); +lean_ctor_set(x_125, 3, x_119); +lean_ctor_set_uint8(x_125, sizeof(void*)*4, x_124); +x_126 = lean_alloc_ctor(1, 4, 1); +lean_ctor_set(x_126, 0, x_122); +lean_ctor_set(x_126, 1, x_116); +lean_ctor_set(x_126, 2, x_117); +lean_ctor_set(x_126, 3, x_118); +lean_ctor_set_uint8(x_126, sizeof(void*)*4, x_124); +x_127 = 0; +lean_ctor_set(x_1, 3, x_126); +lean_ctor_set(x_1, 2, x_121); +lean_ctor_set(x_1, 1, x_120); +lean_ctor_set(x_1, 0, x_125); +lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_127); +return x_1; +} +} +else +{ +lean_object* x_128; +x_128 = lean_ctor_get(x_45, 3); +lean_inc(x_128); +if (lean_obj_tag(x_128) == 0) +{ +uint8_t x_129; +x_129 = !lean_is_exclusive(x_45); +if (x_129 == 0) +{ +lean_object* x_130; lean_object* x_131; uint8_t x_132; uint8_t x_133; +x_130 = lean_ctor_get(x_45, 3); +lean_dec(x_130); +x_131 = lean_ctor_get(x_45, 0); +lean_dec(x_131); +x_132 = 0; +lean_ctor_set_uint8(x_45, sizeof(void*)*4, x_132); +x_133 = 1; +lean_ctor_set(x_1, 3, x_45); +lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_133); +return x_1; +} +else +{ +lean_object* x_134; lean_object* x_135; uint8_t x_136; lean_object* x_137; uint8_t x_138; +x_134 = lean_ctor_get(x_45, 1); +x_135 = lean_ctor_get(x_45, 2); +lean_inc(x_135); +lean_inc(x_134); +lean_dec(x_45); +x_136 = 0; +x_137 = lean_alloc_ctor(1, 4, 1); +lean_ctor_set(x_137, 0, x_46); +lean_ctor_set(x_137, 1, x_134); +lean_ctor_set(x_137, 2, x_135); +lean_ctor_set(x_137, 3, x_128); +lean_ctor_set_uint8(x_137, sizeof(void*)*4, x_136); +x_138 = 1; +lean_ctor_set(x_1, 3, x_137); +lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_138); +return x_1; +} +} +else +{ +uint8_t x_139; +x_139 = lean_ctor_get_uint8(x_128, sizeof(void*)*4); +if (x_139 == 0) +{ +uint8_t x_140; +lean_free_object(x_1); +x_140 = !lean_is_exclusive(x_45); +if (x_140 == 0) +{ +lean_object* x_141; lean_object* x_142; uint8_t x_143; +x_141 = lean_ctor_get(x_45, 3); +lean_dec(x_141); +x_142 = lean_ctor_get(x_45, 0); +lean_dec(x_142); +x_143 = !lean_is_exclusive(x_128); +if (x_143 == 0) +{ +lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147; uint8_t x_148; uint8_t x_149; +x_144 = lean_ctor_get(x_128, 0); +x_145 = lean_ctor_get(x_128, 1); +x_146 = lean_ctor_get(x_128, 2); +x_147 = lean_ctor_get(x_128, 3); +x_148 = 1; +lean_inc(x_46); +lean_ctor_set(x_128, 3, x_46); +lean_ctor_set(x_128, 2, x_37); +lean_ctor_set(x_128, 1, x_36); +lean_ctor_set(x_128, 0, x_35); +x_149 = !lean_is_exclusive(x_46); +if (x_149 == 0) +{ +lean_object* x_150; lean_object* x_151; lean_object* x_152; lean_object* x_153; uint8_t x_154; +x_150 = lean_ctor_get(x_46, 3); +lean_dec(x_150); +x_151 = lean_ctor_get(x_46, 2); +lean_dec(x_151); +x_152 = lean_ctor_get(x_46, 1); +lean_dec(x_152); +x_153 = lean_ctor_get(x_46, 0); +lean_dec(x_153); +lean_ctor_set_uint8(x_128, sizeof(void*)*4, x_148); +lean_ctor_set(x_46, 3, x_147); +lean_ctor_set(x_46, 2, x_146); +lean_ctor_set(x_46, 1, x_145); +lean_ctor_set(x_46, 0, x_144); +lean_ctor_set_uint8(x_46, sizeof(void*)*4, x_148); +x_154 = 0; +lean_ctor_set(x_45, 3, x_46); +lean_ctor_set(x_45, 0, x_128); +lean_ctor_set_uint8(x_45, sizeof(void*)*4, x_154); +return x_45; +} +else +{ +lean_object* x_155; uint8_t x_156; +lean_dec(x_46); +lean_ctor_set_uint8(x_128, sizeof(void*)*4, x_148); +x_155 = lean_alloc_ctor(1, 4, 1); +lean_ctor_set(x_155, 0, x_144); +lean_ctor_set(x_155, 1, x_145); +lean_ctor_set(x_155, 2, x_146); +lean_ctor_set(x_155, 3, x_147); +lean_ctor_set_uint8(x_155, sizeof(void*)*4, x_148); +x_156 = 0; +lean_ctor_set(x_45, 3, x_155); +lean_ctor_set(x_45, 0, x_128); +lean_ctor_set_uint8(x_45, sizeof(void*)*4, x_156); return x_45; } } +else +{ +lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_object* x_160; uint8_t x_161; lean_object* x_162; lean_object* x_163; lean_object* x_164; uint8_t x_165; +x_157 = lean_ctor_get(x_128, 0); +x_158 = lean_ctor_get(x_128, 1); +x_159 = lean_ctor_get(x_128, 2); +x_160 = lean_ctor_get(x_128, 3); +lean_inc(x_160); +lean_inc(x_159); +lean_inc(x_158); +lean_inc(x_157); +lean_dec(x_128); +x_161 = 1; +lean_inc(x_46); +x_162 = lean_alloc_ctor(1, 4, 1); +lean_ctor_set(x_162, 0, x_35); +lean_ctor_set(x_162, 1, x_36); +lean_ctor_set(x_162, 2, x_37); +lean_ctor_set(x_162, 3, x_46); +if (lean_is_exclusive(x_46)) { + lean_ctor_release(x_46, 0); + lean_ctor_release(x_46, 1); + lean_ctor_release(x_46, 2); + lean_ctor_release(x_46, 3); + x_163 = x_46; +} else { + lean_dec_ref(x_46); + x_163 = lean_box(0); +} +lean_ctor_set_uint8(x_162, sizeof(void*)*4, x_161); +if (lean_is_scalar(x_163)) { + x_164 = lean_alloc_ctor(1, 4, 1); +} else { + x_164 = x_163; +} +lean_ctor_set(x_164, 0, x_157); +lean_ctor_set(x_164, 1, x_158); +lean_ctor_set(x_164, 2, x_159); +lean_ctor_set(x_164, 3, x_160); +lean_ctor_set_uint8(x_164, sizeof(void*)*4, x_161); +x_165 = 0; +lean_ctor_set(x_45, 3, x_164); +lean_ctor_set(x_45, 0, x_162); +lean_ctor_set_uint8(x_45, sizeof(void*)*4, x_165); +return x_45; } } -lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__8(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +else +{ +lean_object* x_166; lean_object* x_167; lean_object* x_168; lean_object* x_169; lean_object* x_170; lean_object* x_171; lean_object* x_172; uint8_t x_173; lean_object* x_174; lean_object* x_175; lean_object* x_176; uint8_t x_177; lean_object* x_178; +x_166 = lean_ctor_get(x_45, 1); +x_167 = lean_ctor_get(x_45, 2); +lean_inc(x_167); +lean_inc(x_166); +lean_dec(x_45); +x_168 = lean_ctor_get(x_128, 0); +lean_inc(x_168); +x_169 = lean_ctor_get(x_128, 1); +lean_inc(x_169); +x_170 = lean_ctor_get(x_128, 2); +lean_inc(x_170); +x_171 = lean_ctor_get(x_128, 3); +lean_inc(x_171); +if (lean_is_exclusive(x_128)) { + lean_ctor_release(x_128, 0); + lean_ctor_release(x_128, 1); + lean_ctor_release(x_128, 2); + lean_ctor_release(x_128, 3); + x_172 = x_128; +} else { + lean_dec_ref(x_128); + x_172 = lean_box(0); +} +x_173 = 1; +lean_inc(x_46); +if (lean_is_scalar(x_172)) { + x_174 = lean_alloc_ctor(1, 4, 1); +} else { + x_174 = x_172; +} +lean_ctor_set(x_174, 0, x_35); +lean_ctor_set(x_174, 1, x_36); +lean_ctor_set(x_174, 2, x_37); +lean_ctor_set(x_174, 3, x_46); +if (lean_is_exclusive(x_46)) { + lean_ctor_release(x_46, 0); + lean_ctor_release(x_46, 1); + lean_ctor_release(x_46, 2); + lean_ctor_release(x_46, 3); + x_175 = x_46; +} else { + lean_dec_ref(x_46); + x_175 = lean_box(0); +} +lean_ctor_set_uint8(x_174, sizeof(void*)*4, x_173); +if (lean_is_scalar(x_175)) { + x_176 = lean_alloc_ctor(1, 4, 1); +} else { + x_176 = x_175; +} +lean_ctor_set(x_176, 0, x_168); +lean_ctor_set(x_176, 1, x_169); +lean_ctor_set(x_176, 2, x_170); +lean_ctor_set(x_176, 3, x_171); +lean_ctor_set_uint8(x_176, sizeof(void*)*4, x_173); +x_177 = 0; +x_178 = lean_alloc_ctor(1, 4, 1); +lean_ctor_set(x_178, 0, x_174); +lean_ctor_set(x_178, 1, x_166); +lean_ctor_set(x_178, 2, x_167); +lean_ctor_set(x_178, 3, x_176); +lean_ctor_set_uint8(x_178, sizeof(void*)*4, x_177); +return x_178; +} +} +else +{ +uint8_t x_179; +x_179 = !lean_is_exclusive(x_45); +if (x_179 == 0) +{ +lean_object* x_180; lean_object* x_181; uint8_t x_182; +x_180 = lean_ctor_get(x_45, 3); +lean_dec(x_180); +x_181 = lean_ctor_get(x_45, 0); +lean_dec(x_181); +x_182 = !lean_is_exclusive(x_46); +if (x_182 == 0) +{ +uint8_t x_183; uint8_t x_184; +lean_ctor_set_uint8(x_46, sizeof(void*)*4, x_139); +x_183 = 0; +lean_ctor_set_uint8(x_45, sizeof(void*)*4, x_183); +x_184 = 1; +lean_ctor_set(x_1, 3, x_45); +lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_184); +return x_1; +} +else +{ +lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; lean_object* x_189; uint8_t x_190; uint8_t x_191; +x_185 = lean_ctor_get(x_46, 0); +x_186 = lean_ctor_get(x_46, 1); +x_187 = lean_ctor_get(x_46, 2); +x_188 = lean_ctor_get(x_46, 3); +lean_inc(x_188); +lean_inc(x_187); +lean_inc(x_186); +lean_inc(x_185); +lean_dec(x_46); +x_189 = lean_alloc_ctor(1, 4, 1); +lean_ctor_set(x_189, 0, x_185); +lean_ctor_set(x_189, 1, x_186); +lean_ctor_set(x_189, 2, x_187); +lean_ctor_set(x_189, 3, x_188); +lean_ctor_set_uint8(x_189, sizeof(void*)*4, x_139); +x_190 = 0; +lean_ctor_set(x_45, 0, x_189); +lean_ctor_set_uint8(x_45, sizeof(void*)*4, x_190); +x_191 = 1; +lean_ctor_set(x_1, 3, x_45); +lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_191); +return x_1; +} +} +else +{ +lean_object* x_192; lean_object* x_193; lean_object* x_194; lean_object* x_195; lean_object* x_196; lean_object* x_197; lean_object* x_198; lean_object* x_199; uint8_t x_200; lean_object* x_201; uint8_t x_202; +x_192 = lean_ctor_get(x_45, 1); +x_193 = lean_ctor_get(x_45, 2); +lean_inc(x_193); +lean_inc(x_192); +lean_dec(x_45); +x_194 = lean_ctor_get(x_46, 0); +lean_inc(x_194); +x_195 = lean_ctor_get(x_46, 1); +lean_inc(x_195); +x_196 = lean_ctor_get(x_46, 2); +lean_inc(x_196); +x_197 = lean_ctor_get(x_46, 3); +lean_inc(x_197); +if (lean_is_exclusive(x_46)) { + lean_ctor_release(x_46, 0); + lean_ctor_release(x_46, 1); + lean_ctor_release(x_46, 2); + lean_ctor_release(x_46, 3); + x_198 = x_46; +} else { + lean_dec_ref(x_46); + x_198 = lean_box(0); +} +if (lean_is_scalar(x_198)) { + x_199 = lean_alloc_ctor(1, 4, 1); +} else { + x_199 = x_198; +} +lean_ctor_set(x_199, 0, x_194); +lean_ctor_set(x_199, 1, x_195); +lean_ctor_set(x_199, 2, x_196); +lean_ctor_set(x_199, 3, x_197); +lean_ctor_set_uint8(x_199, sizeof(void*)*4, x_139); +x_200 = 0; +x_201 = lean_alloc_ctor(1, 4, 1); +lean_ctor_set(x_201, 0, x_199); +lean_ctor_set(x_201, 1, x_192); +lean_ctor_set(x_201, 2, x_193); +lean_ctor_set(x_201, 3, x_128); +lean_ctor_set_uint8(x_201, sizeof(void*)*4, x_200); +x_202 = 1; +lean_ctor_set(x_1, 3, x_201); +lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_202); +return x_1; +} +} +} +} +} +} +} +} +else +{ +uint8_t x_203; +x_203 = l_Std_RBNode_isRed___rarg(x_35); +if (x_203 == 0) +{ +lean_object* x_204; uint8_t x_205; +x_204 = l_Std_RBNode_ins___at_Lean_Server_Watchdog_handleRequest___spec__4(x_35, x_2, x_3); +x_205 = 1; +lean_ctor_set(x_1, 0, x_204); +lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_205); +return x_1; +} +else +{ +lean_object* x_206; lean_object* x_207; +x_206 = l_Std_RBNode_ins___at_Lean_Server_Watchdog_handleRequest___spec__4(x_35, x_2, x_3); +x_207 = lean_ctor_get(x_206, 0); +lean_inc(x_207); +if (lean_obj_tag(x_207) == 0) +{ +lean_object* x_208; +x_208 = lean_ctor_get(x_206, 3); +lean_inc(x_208); +if (lean_obj_tag(x_208) == 0) +{ +uint8_t x_209; +x_209 = !lean_is_exclusive(x_206); +if (x_209 == 0) +{ +lean_object* x_210; lean_object* x_211; uint8_t x_212; uint8_t x_213; +x_210 = lean_ctor_get(x_206, 3); +lean_dec(x_210); +x_211 = lean_ctor_get(x_206, 0); +lean_dec(x_211); +x_212 = 0; +lean_ctor_set(x_206, 0, x_208); +lean_ctor_set_uint8(x_206, sizeof(void*)*4, x_212); +x_213 = 1; +lean_ctor_set(x_1, 0, x_206); +lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_213); +return x_1; +} +else +{ +lean_object* x_214; lean_object* x_215; uint8_t x_216; lean_object* x_217; uint8_t x_218; +x_214 = lean_ctor_get(x_206, 1); +x_215 = lean_ctor_get(x_206, 2); +lean_inc(x_215); +lean_inc(x_214); +lean_dec(x_206); +x_216 = 0; +x_217 = lean_alloc_ctor(1, 4, 1); +lean_ctor_set(x_217, 0, x_208); +lean_ctor_set(x_217, 1, x_214); +lean_ctor_set(x_217, 2, x_215); +lean_ctor_set(x_217, 3, x_208); +lean_ctor_set_uint8(x_217, sizeof(void*)*4, x_216); +x_218 = 1; +lean_ctor_set(x_1, 0, x_217); +lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_218); +return x_1; +} +} +else +{ +uint8_t x_219; +x_219 = lean_ctor_get_uint8(x_208, sizeof(void*)*4); +if (x_219 == 0) +{ +uint8_t x_220; +x_220 = !lean_is_exclusive(x_206); +if (x_220 == 0) +{ +lean_object* x_221; lean_object* x_222; lean_object* x_223; lean_object* x_224; uint8_t x_225; +x_221 = lean_ctor_get(x_206, 1); +x_222 = lean_ctor_get(x_206, 2); +x_223 = lean_ctor_get(x_206, 3); +lean_dec(x_223); +x_224 = lean_ctor_get(x_206, 0); +lean_dec(x_224); +x_225 = !lean_is_exclusive(x_208); +if (x_225 == 0) +{ +lean_object* x_226; lean_object* x_227; lean_object* x_228; lean_object* x_229; uint8_t x_230; uint8_t x_231; +x_226 = lean_ctor_get(x_208, 0); +x_227 = lean_ctor_get(x_208, 1); +x_228 = lean_ctor_get(x_208, 2); +x_229 = lean_ctor_get(x_208, 3); +x_230 = 1; +lean_ctor_set(x_208, 3, x_226); +lean_ctor_set(x_208, 2, x_222); +lean_ctor_set(x_208, 1, x_221); +lean_ctor_set(x_208, 0, x_207); +lean_ctor_set_uint8(x_208, sizeof(void*)*4, x_230); +lean_ctor_set(x_206, 3, x_38); +lean_ctor_set(x_206, 2, x_37); +lean_ctor_set(x_206, 1, x_36); +lean_ctor_set(x_206, 0, x_229); +lean_ctor_set_uint8(x_206, sizeof(void*)*4, x_230); +x_231 = 0; +lean_ctor_set(x_1, 3, x_206); +lean_ctor_set(x_1, 2, x_228); +lean_ctor_set(x_1, 1, x_227); +lean_ctor_set(x_1, 0, x_208); +lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_231); +return x_1; +} +else +{ +lean_object* x_232; lean_object* x_233; lean_object* x_234; lean_object* x_235; uint8_t x_236; lean_object* x_237; uint8_t x_238; +x_232 = lean_ctor_get(x_208, 0); +x_233 = lean_ctor_get(x_208, 1); +x_234 = lean_ctor_get(x_208, 2); +x_235 = lean_ctor_get(x_208, 3); +lean_inc(x_235); +lean_inc(x_234); +lean_inc(x_233); +lean_inc(x_232); +lean_dec(x_208); +x_236 = 1; +x_237 = lean_alloc_ctor(1, 4, 1); +lean_ctor_set(x_237, 0, x_207); +lean_ctor_set(x_237, 1, x_221); +lean_ctor_set(x_237, 2, x_222); +lean_ctor_set(x_237, 3, x_232); +lean_ctor_set_uint8(x_237, sizeof(void*)*4, x_236); +lean_ctor_set(x_206, 3, x_38); +lean_ctor_set(x_206, 2, x_37); +lean_ctor_set(x_206, 1, x_36); +lean_ctor_set(x_206, 0, x_235); +lean_ctor_set_uint8(x_206, sizeof(void*)*4, x_236); +x_238 = 0; +lean_ctor_set(x_1, 3, x_206); +lean_ctor_set(x_1, 2, x_234); +lean_ctor_set(x_1, 1, x_233); +lean_ctor_set(x_1, 0, x_237); +lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_238); +return x_1; +} +} +else +{ +lean_object* x_239; lean_object* x_240; lean_object* x_241; lean_object* x_242; lean_object* x_243; lean_object* x_244; lean_object* x_245; uint8_t x_246; lean_object* x_247; lean_object* x_248; uint8_t x_249; +x_239 = lean_ctor_get(x_206, 1); +x_240 = lean_ctor_get(x_206, 2); +lean_inc(x_240); +lean_inc(x_239); +lean_dec(x_206); +x_241 = lean_ctor_get(x_208, 0); +lean_inc(x_241); +x_242 = lean_ctor_get(x_208, 1); +lean_inc(x_242); +x_243 = lean_ctor_get(x_208, 2); +lean_inc(x_243); +x_244 = lean_ctor_get(x_208, 3); +lean_inc(x_244); +if (lean_is_exclusive(x_208)) { + lean_ctor_release(x_208, 0); + lean_ctor_release(x_208, 1); + lean_ctor_release(x_208, 2); + lean_ctor_release(x_208, 3); + x_245 = x_208; +} else { + lean_dec_ref(x_208); + x_245 = lean_box(0); +} +x_246 = 1; +if (lean_is_scalar(x_245)) { + x_247 = lean_alloc_ctor(1, 4, 1); +} else { + x_247 = x_245; +} +lean_ctor_set(x_247, 0, x_207); +lean_ctor_set(x_247, 1, x_239); +lean_ctor_set(x_247, 2, x_240); +lean_ctor_set(x_247, 3, x_241); +lean_ctor_set_uint8(x_247, sizeof(void*)*4, x_246); +x_248 = lean_alloc_ctor(1, 4, 1); +lean_ctor_set(x_248, 0, x_244); +lean_ctor_set(x_248, 1, x_36); +lean_ctor_set(x_248, 2, x_37); +lean_ctor_set(x_248, 3, x_38); +lean_ctor_set_uint8(x_248, sizeof(void*)*4, x_246); +x_249 = 0; +lean_ctor_set(x_1, 3, x_248); +lean_ctor_set(x_1, 2, x_243); +lean_ctor_set(x_1, 1, x_242); +lean_ctor_set(x_1, 0, x_247); +lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_249); +return x_1; +} +} +else +{ +uint8_t x_250; +x_250 = !lean_is_exclusive(x_206); +if (x_250 == 0) +{ +lean_object* x_251; lean_object* x_252; uint8_t x_253; uint8_t x_254; +x_251 = lean_ctor_get(x_206, 3); +lean_dec(x_251); +x_252 = lean_ctor_get(x_206, 0); +lean_dec(x_252); +x_253 = 0; +lean_ctor_set_uint8(x_206, sizeof(void*)*4, x_253); +x_254 = 1; +lean_ctor_set(x_1, 0, x_206); +lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_254); +return x_1; +} +else +{ +lean_object* x_255; lean_object* x_256; uint8_t x_257; lean_object* x_258; uint8_t x_259; +x_255 = lean_ctor_get(x_206, 1); +x_256 = lean_ctor_get(x_206, 2); +lean_inc(x_256); +lean_inc(x_255); +lean_dec(x_206); +x_257 = 0; +x_258 = lean_alloc_ctor(1, 4, 1); +lean_ctor_set(x_258, 0, x_207); +lean_ctor_set(x_258, 1, x_255); +lean_ctor_set(x_258, 2, x_256); +lean_ctor_set(x_258, 3, x_208); +lean_ctor_set_uint8(x_258, sizeof(void*)*4, x_257); +x_259 = 1; +lean_ctor_set(x_1, 0, x_258); +lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_259); +return x_1; +} +} +} +} +else +{ +uint8_t x_260; +x_260 = lean_ctor_get_uint8(x_207, sizeof(void*)*4); +if (x_260 == 0) +{ +uint8_t x_261; +x_261 = !lean_is_exclusive(x_206); +if (x_261 == 0) +{ +lean_object* x_262; lean_object* x_263; lean_object* x_264; lean_object* x_265; uint8_t x_266; +x_262 = lean_ctor_get(x_206, 1); +x_263 = lean_ctor_get(x_206, 2); +x_264 = lean_ctor_get(x_206, 3); +x_265 = lean_ctor_get(x_206, 0); +lean_dec(x_265); +x_266 = !lean_is_exclusive(x_207); +if (x_266 == 0) +{ +uint8_t x_267; uint8_t x_268; +x_267 = 1; +lean_ctor_set_uint8(x_207, sizeof(void*)*4, x_267); +lean_ctor_set(x_206, 3, x_38); +lean_ctor_set(x_206, 2, x_37); +lean_ctor_set(x_206, 1, x_36); +lean_ctor_set(x_206, 0, x_264); +lean_ctor_set_uint8(x_206, sizeof(void*)*4, x_267); +x_268 = 0; +lean_ctor_set(x_1, 3, x_206); +lean_ctor_set(x_1, 2, x_263); +lean_ctor_set(x_1, 1, x_262); +lean_ctor_set(x_1, 0, x_207); +lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_268); +return x_1; +} +else +{ +lean_object* x_269; lean_object* x_270; lean_object* x_271; lean_object* x_272; uint8_t x_273; lean_object* x_274; uint8_t x_275; +x_269 = lean_ctor_get(x_207, 0); +x_270 = lean_ctor_get(x_207, 1); +x_271 = lean_ctor_get(x_207, 2); +x_272 = lean_ctor_get(x_207, 3); +lean_inc(x_272); +lean_inc(x_271); +lean_inc(x_270); +lean_inc(x_269); +lean_dec(x_207); +x_273 = 1; +x_274 = lean_alloc_ctor(1, 4, 1); +lean_ctor_set(x_274, 0, x_269); +lean_ctor_set(x_274, 1, x_270); +lean_ctor_set(x_274, 2, x_271); +lean_ctor_set(x_274, 3, x_272); +lean_ctor_set_uint8(x_274, sizeof(void*)*4, x_273); +lean_ctor_set(x_206, 3, x_38); +lean_ctor_set(x_206, 2, x_37); +lean_ctor_set(x_206, 1, x_36); +lean_ctor_set(x_206, 0, x_264); +lean_ctor_set_uint8(x_206, sizeof(void*)*4, x_273); +x_275 = 0; +lean_ctor_set(x_1, 3, x_206); +lean_ctor_set(x_1, 2, x_263); +lean_ctor_set(x_1, 1, x_262); +lean_ctor_set(x_1, 0, x_274); +lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_275); +return x_1; +} +} +else +{ +lean_object* x_276; lean_object* x_277; lean_object* x_278; lean_object* x_279; lean_object* x_280; lean_object* x_281; lean_object* x_282; lean_object* x_283; uint8_t x_284; lean_object* x_285; lean_object* x_286; uint8_t x_287; +x_276 = lean_ctor_get(x_206, 1); +x_277 = lean_ctor_get(x_206, 2); +x_278 = lean_ctor_get(x_206, 3); +lean_inc(x_278); +lean_inc(x_277); +lean_inc(x_276); +lean_dec(x_206); +x_279 = lean_ctor_get(x_207, 0); +lean_inc(x_279); +x_280 = lean_ctor_get(x_207, 1); +lean_inc(x_280); +x_281 = lean_ctor_get(x_207, 2); +lean_inc(x_281); +x_282 = lean_ctor_get(x_207, 3); +lean_inc(x_282); +if (lean_is_exclusive(x_207)) { + lean_ctor_release(x_207, 0); + lean_ctor_release(x_207, 1); + lean_ctor_release(x_207, 2); + lean_ctor_release(x_207, 3); + x_283 = x_207; +} else { + lean_dec_ref(x_207); + x_283 = lean_box(0); +} +x_284 = 1; +if (lean_is_scalar(x_283)) { + x_285 = lean_alloc_ctor(1, 4, 1); +} else { + x_285 = x_283; +} +lean_ctor_set(x_285, 0, x_279); +lean_ctor_set(x_285, 1, x_280); +lean_ctor_set(x_285, 2, x_281); +lean_ctor_set(x_285, 3, x_282); +lean_ctor_set_uint8(x_285, sizeof(void*)*4, x_284); +x_286 = lean_alloc_ctor(1, 4, 1); +lean_ctor_set(x_286, 0, x_278); +lean_ctor_set(x_286, 1, x_36); +lean_ctor_set(x_286, 2, x_37); +lean_ctor_set(x_286, 3, x_38); +lean_ctor_set_uint8(x_286, sizeof(void*)*4, x_284); +x_287 = 0; +lean_ctor_set(x_1, 3, x_286); +lean_ctor_set(x_1, 2, x_277); +lean_ctor_set(x_1, 1, x_276); +lean_ctor_set(x_1, 0, x_285); +lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_287); +return x_1; +} +} +else +{ +lean_object* x_288; +x_288 = lean_ctor_get(x_206, 3); +lean_inc(x_288); +if (lean_obj_tag(x_288) == 0) +{ +uint8_t x_289; +x_289 = !lean_is_exclusive(x_206); +if (x_289 == 0) +{ +lean_object* x_290; lean_object* x_291; uint8_t x_292; uint8_t x_293; +x_290 = lean_ctor_get(x_206, 3); +lean_dec(x_290); +x_291 = lean_ctor_get(x_206, 0); +lean_dec(x_291); +x_292 = 0; +lean_ctor_set_uint8(x_206, sizeof(void*)*4, x_292); +x_293 = 1; +lean_ctor_set(x_1, 0, x_206); +lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_293); +return x_1; +} +else +{ +lean_object* x_294; lean_object* x_295; uint8_t x_296; lean_object* x_297; uint8_t x_298; +x_294 = lean_ctor_get(x_206, 1); +x_295 = lean_ctor_get(x_206, 2); +lean_inc(x_295); +lean_inc(x_294); +lean_dec(x_206); +x_296 = 0; +x_297 = lean_alloc_ctor(1, 4, 1); +lean_ctor_set(x_297, 0, x_207); +lean_ctor_set(x_297, 1, x_294); +lean_ctor_set(x_297, 2, x_295); +lean_ctor_set(x_297, 3, x_288); +lean_ctor_set_uint8(x_297, sizeof(void*)*4, x_296); +x_298 = 1; +lean_ctor_set(x_1, 0, x_297); +lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_298); +return x_1; +} +} +else +{ +uint8_t x_299; +x_299 = lean_ctor_get_uint8(x_288, sizeof(void*)*4); +if (x_299 == 0) +{ +uint8_t x_300; +lean_free_object(x_1); +x_300 = !lean_is_exclusive(x_206); +if (x_300 == 0) +{ +lean_object* x_301; lean_object* x_302; lean_object* x_303; lean_object* x_304; uint8_t x_305; +x_301 = lean_ctor_get(x_206, 1); +x_302 = lean_ctor_get(x_206, 2); +x_303 = lean_ctor_get(x_206, 3); +lean_dec(x_303); +x_304 = lean_ctor_get(x_206, 0); +lean_dec(x_304); +x_305 = !lean_is_exclusive(x_288); +if (x_305 == 0) +{ +lean_object* x_306; lean_object* x_307; lean_object* x_308; lean_object* x_309; uint8_t x_310; uint8_t x_311; +x_306 = lean_ctor_get(x_288, 0); +x_307 = lean_ctor_get(x_288, 1); +x_308 = lean_ctor_get(x_288, 2); +x_309 = lean_ctor_get(x_288, 3); +x_310 = 1; +lean_inc(x_207); +lean_ctor_set(x_288, 3, x_306); +lean_ctor_set(x_288, 2, x_302); +lean_ctor_set(x_288, 1, x_301); +lean_ctor_set(x_288, 0, x_207); +x_311 = !lean_is_exclusive(x_207); +if (x_311 == 0) +{ +lean_object* x_312; lean_object* x_313; lean_object* x_314; lean_object* x_315; uint8_t x_316; +x_312 = lean_ctor_get(x_207, 3); +lean_dec(x_312); +x_313 = lean_ctor_get(x_207, 2); +lean_dec(x_313); +x_314 = lean_ctor_get(x_207, 1); +lean_dec(x_314); +x_315 = lean_ctor_get(x_207, 0); +lean_dec(x_315); +lean_ctor_set_uint8(x_288, sizeof(void*)*4, x_310); +lean_ctor_set(x_207, 3, x_38); +lean_ctor_set(x_207, 2, x_37); +lean_ctor_set(x_207, 1, x_36); +lean_ctor_set(x_207, 0, x_309); +lean_ctor_set_uint8(x_207, sizeof(void*)*4, x_310); +x_316 = 0; +lean_ctor_set(x_206, 3, x_207); +lean_ctor_set(x_206, 2, x_308); +lean_ctor_set(x_206, 1, x_307); +lean_ctor_set(x_206, 0, x_288); +lean_ctor_set_uint8(x_206, sizeof(void*)*4, x_316); +return x_206; +} +else +{ +lean_object* x_317; uint8_t x_318; +lean_dec(x_207); +lean_ctor_set_uint8(x_288, sizeof(void*)*4, x_310); +x_317 = lean_alloc_ctor(1, 4, 1); +lean_ctor_set(x_317, 0, x_309); +lean_ctor_set(x_317, 1, x_36); +lean_ctor_set(x_317, 2, x_37); +lean_ctor_set(x_317, 3, x_38); +lean_ctor_set_uint8(x_317, sizeof(void*)*4, x_310); +x_318 = 0; +lean_ctor_set(x_206, 3, x_317); +lean_ctor_set(x_206, 2, x_308); +lean_ctor_set(x_206, 1, x_307); +lean_ctor_set(x_206, 0, x_288); +lean_ctor_set_uint8(x_206, sizeof(void*)*4, x_318); +return x_206; +} +} +else +{ +lean_object* x_319; lean_object* x_320; lean_object* x_321; lean_object* x_322; uint8_t x_323; lean_object* x_324; lean_object* x_325; lean_object* x_326; uint8_t x_327; +x_319 = lean_ctor_get(x_288, 0); +x_320 = lean_ctor_get(x_288, 1); +x_321 = lean_ctor_get(x_288, 2); +x_322 = lean_ctor_get(x_288, 3); +lean_inc(x_322); +lean_inc(x_321); +lean_inc(x_320); +lean_inc(x_319); +lean_dec(x_288); +x_323 = 1; +lean_inc(x_207); +x_324 = lean_alloc_ctor(1, 4, 1); +lean_ctor_set(x_324, 0, x_207); +lean_ctor_set(x_324, 1, x_301); +lean_ctor_set(x_324, 2, x_302); +lean_ctor_set(x_324, 3, x_319); +if (lean_is_exclusive(x_207)) { + lean_ctor_release(x_207, 0); + lean_ctor_release(x_207, 1); + lean_ctor_release(x_207, 2); + lean_ctor_release(x_207, 3); + x_325 = x_207; +} else { + lean_dec_ref(x_207); + x_325 = lean_box(0); +} +lean_ctor_set_uint8(x_324, sizeof(void*)*4, x_323); +if (lean_is_scalar(x_325)) { + x_326 = lean_alloc_ctor(1, 4, 1); +} else { + x_326 = x_325; +} +lean_ctor_set(x_326, 0, x_322); +lean_ctor_set(x_326, 1, x_36); +lean_ctor_set(x_326, 2, x_37); +lean_ctor_set(x_326, 3, x_38); +lean_ctor_set_uint8(x_326, sizeof(void*)*4, x_323); +x_327 = 0; +lean_ctor_set(x_206, 3, x_326); +lean_ctor_set(x_206, 2, x_321); +lean_ctor_set(x_206, 1, x_320); +lean_ctor_set(x_206, 0, x_324); +lean_ctor_set_uint8(x_206, sizeof(void*)*4, x_327); +return x_206; +} +} +else +{ +lean_object* x_328; lean_object* x_329; lean_object* x_330; lean_object* x_331; lean_object* x_332; lean_object* x_333; lean_object* x_334; uint8_t x_335; lean_object* x_336; lean_object* x_337; lean_object* x_338; uint8_t x_339; lean_object* x_340; +x_328 = lean_ctor_get(x_206, 1); +x_329 = lean_ctor_get(x_206, 2); +lean_inc(x_329); +lean_inc(x_328); +lean_dec(x_206); +x_330 = lean_ctor_get(x_288, 0); +lean_inc(x_330); +x_331 = lean_ctor_get(x_288, 1); +lean_inc(x_331); +x_332 = lean_ctor_get(x_288, 2); +lean_inc(x_332); +x_333 = lean_ctor_get(x_288, 3); +lean_inc(x_333); +if (lean_is_exclusive(x_288)) { + lean_ctor_release(x_288, 0); + lean_ctor_release(x_288, 1); + lean_ctor_release(x_288, 2); + lean_ctor_release(x_288, 3); + x_334 = x_288; +} else { + lean_dec_ref(x_288); + x_334 = lean_box(0); +} +x_335 = 1; +lean_inc(x_207); +if (lean_is_scalar(x_334)) { + x_336 = lean_alloc_ctor(1, 4, 1); +} else { + x_336 = x_334; +} +lean_ctor_set(x_336, 0, x_207); +lean_ctor_set(x_336, 1, x_328); +lean_ctor_set(x_336, 2, x_329); +lean_ctor_set(x_336, 3, x_330); +if (lean_is_exclusive(x_207)) { + lean_ctor_release(x_207, 0); + lean_ctor_release(x_207, 1); + lean_ctor_release(x_207, 2); + lean_ctor_release(x_207, 3); + x_337 = x_207; +} else { + lean_dec_ref(x_207); + x_337 = lean_box(0); +} +lean_ctor_set_uint8(x_336, sizeof(void*)*4, x_335); +if (lean_is_scalar(x_337)) { + x_338 = lean_alloc_ctor(1, 4, 1); +} else { + x_338 = x_337; +} +lean_ctor_set(x_338, 0, x_333); +lean_ctor_set(x_338, 1, x_36); +lean_ctor_set(x_338, 2, x_37); +lean_ctor_set(x_338, 3, x_38); +lean_ctor_set_uint8(x_338, sizeof(void*)*4, x_335); +x_339 = 0; +x_340 = lean_alloc_ctor(1, 4, 1); +lean_ctor_set(x_340, 0, x_336); +lean_ctor_set(x_340, 1, x_331); +lean_ctor_set(x_340, 2, x_332); +lean_ctor_set(x_340, 3, x_338); +lean_ctor_set_uint8(x_340, sizeof(void*)*4, x_339); +return x_340; +} +} +else +{ +uint8_t x_341; +x_341 = !lean_is_exclusive(x_206); +if (x_341 == 0) +{ +lean_object* x_342; lean_object* x_343; uint8_t x_344; +x_342 = lean_ctor_get(x_206, 3); +lean_dec(x_342); +x_343 = lean_ctor_get(x_206, 0); +lean_dec(x_343); +x_344 = !lean_is_exclusive(x_207); +if (x_344 == 0) +{ +uint8_t x_345; uint8_t x_346; +lean_ctor_set_uint8(x_207, sizeof(void*)*4, x_299); +x_345 = 0; +lean_ctor_set_uint8(x_206, sizeof(void*)*4, x_345); +x_346 = 1; +lean_ctor_set(x_1, 0, x_206); +lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_346); +return x_1; +} +else +{ +lean_object* x_347; lean_object* x_348; lean_object* x_349; lean_object* x_350; lean_object* x_351; uint8_t x_352; uint8_t x_353; +x_347 = lean_ctor_get(x_207, 0); +x_348 = lean_ctor_get(x_207, 1); +x_349 = lean_ctor_get(x_207, 2); +x_350 = lean_ctor_get(x_207, 3); +lean_inc(x_350); +lean_inc(x_349); +lean_inc(x_348); +lean_inc(x_347); +lean_dec(x_207); +x_351 = lean_alloc_ctor(1, 4, 1); +lean_ctor_set(x_351, 0, x_347); +lean_ctor_set(x_351, 1, x_348); +lean_ctor_set(x_351, 2, x_349); +lean_ctor_set(x_351, 3, x_350); +lean_ctor_set_uint8(x_351, sizeof(void*)*4, x_299); +x_352 = 0; +lean_ctor_set(x_206, 0, x_351); +lean_ctor_set_uint8(x_206, sizeof(void*)*4, x_352); +x_353 = 1; +lean_ctor_set(x_1, 0, x_206); +lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_353); +return x_1; +} +} +else +{ +lean_object* x_354; lean_object* x_355; lean_object* x_356; lean_object* x_357; lean_object* x_358; lean_object* x_359; lean_object* x_360; lean_object* x_361; uint8_t x_362; lean_object* x_363; uint8_t x_364; +x_354 = lean_ctor_get(x_206, 1); +x_355 = lean_ctor_get(x_206, 2); +lean_inc(x_355); +lean_inc(x_354); +lean_dec(x_206); +x_356 = lean_ctor_get(x_207, 0); +lean_inc(x_356); +x_357 = lean_ctor_get(x_207, 1); +lean_inc(x_357); +x_358 = lean_ctor_get(x_207, 2); +lean_inc(x_358); +x_359 = lean_ctor_get(x_207, 3); +lean_inc(x_359); +if (lean_is_exclusive(x_207)) { + lean_ctor_release(x_207, 0); + lean_ctor_release(x_207, 1); + lean_ctor_release(x_207, 2); + lean_ctor_release(x_207, 3); + x_360 = x_207; +} else { + lean_dec_ref(x_207); + x_360 = lean_box(0); +} +if (lean_is_scalar(x_360)) { + x_361 = lean_alloc_ctor(1, 4, 1); +} else { + x_361 = x_360; +} +lean_ctor_set(x_361, 0, x_356); +lean_ctor_set(x_361, 1, x_357); +lean_ctor_set(x_361, 2, x_358); +lean_ctor_set(x_361, 3, x_359); +lean_ctor_set_uint8(x_361, sizeof(void*)*4, x_299); +x_362 = 0; +x_363 = lean_alloc_ctor(1, 4, 1); +lean_ctor_set(x_363, 0, x_361); +lean_ctor_set(x_363, 1, x_354); +lean_ctor_set(x_363, 2, x_355); +lean_ctor_set(x_363, 3, x_288); +lean_ctor_set_uint8(x_363, sizeof(void*)*4, x_362); +x_364 = 1; +lean_ctor_set(x_1, 0, x_363); +lean_ctor_set_uint8(x_1, sizeof(void*)*4, x_364); +return x_1; +} +} +} +} +} +} +} +} +else +{ +lean_object* x_365; lean_object* x_366; lean_object* x_367; lean_object* x_368; uint8_t x_369; +x_365 = lean_ctor_get(x_1, 0); +x_366 = lean_ctor_get(x_1, 1); +x_367 = lean_ctor_get(x_1, 2); +x_368 = lean_ctor_get(x_1, 3); +lean_inc(x_368); +lean_inc(x_367); +lean_inc(x_366); +lean_inc(x_365); +lean_dec(x_1); +lean_inc(x_366); +lean_inc(x_2); +x_369 = l___private_Lean_Data_JsonRpc_0__Lean_JsonRpc_RequestID_lt(x_2, x_366); +if (x_369 == 0) +{ +uint8_t x_370; +lean_inc(x_2); +lean_inc(x_366); +x_370 = l___private_Lean_Data_JsonRpc_0__Lean_JsonRpc_RequestID_lt(x_366, x_2); +if (x_370 == 0) +{ +uint8_t x_371; lean_object* x_372; +lean_dec(x_367); +lean_dec(x_366); +x_371 = 1; +x_372 = lean_alloc_ctor(1, 4, 1); +lean_ctor_set(x_372, 0, x_365); +lean_ctor_set(x_372, 1, x_2); +lean_ctor_set(x_372, 2, x_3); +lean_ctor_set(x_372, 3, x_368); +lean_ctor_set_uint8(x_372, sizeof(void*)*4, x_371); +return x_372; +} +else +{ +uint8_t x_373; +x_373 = l_Std_RBNode_isRed___rarg(x_368); +if (x_373 == 0) +{ +lean_object* x_374; uint8_t x_375; lean_object* x_376; +x_374 = l_Std_RBNode_ins___at_Lean_Server_Watchdog_handleRequest___spec__4(x_368, x_2, x_3); +x_375 = 1; +x_376 = lean_alloc_ctor(1, 4, 1); +lean_ctor_set(x_376, 0, x_365); +lean_ctor_set(x_376, 1, x_366); +lean_ctor_set(x_376, 2, x_367); +lean_ctor_set(x_376, 3, x_374); +lean_ctor_set_uint8(x_376, sizeof(void*)*4, x_375); +return x_376; +} +else +{ +lean_object* x_377; lean_object* x_378; +x_377 = l_Std_RBNode_ins___at_Lean_Server_Watchdog_handleRequest___spec__4(x_368, x_2, x_3); +x_378 = lean_ctor_get(x_377, 0); +lean_inc(x_378); +if (lean_obj_tag(x_378) == 0) +{ +lean_object* x_379; +x_379 = lean_ctor_get(x_377, 3); +lean_inc(x_379); +if (lean_obj_tag(x_379) == 0) +{ +lean_object* x_380; lean_object* x_381; lean_object* x_382; uint8_t x_383; lean_object* x_384; uint8_t x_385; lean_object* x_386; +x_380 = lean_ctor_get(x_377, 1); +lean_inc(x_380); +x_381 = lean_ctor_get(x_377, 2); +lean_inc(x_381); +if (lean_is_exclusive(x_377)) { + lean_ctor_release(x_377, 0); + lean_ctor_release(x_377, 1); + lean_ctor_release(x_377, 2); + lean_ctor_release(x_377, 3); + x_382 = x_377; +} else { + lean_dec_ref(x_377); + x_382 = lean_box(0); +} +x_383 = 0; +if (lean_is_scalar(x_382)) { + x_384 = lean_alloc_ctor(1, 4, 1); +} else { + x_384 = x_382; +} +lean_ctor_set(x_384, 0, x_379); +lean_ctor_set(x_384, 1, x_380); +lean_ctor_set(x_384, 2, x_381); +lean_ctor_set(x_384, 3, x_379); +lean_ctor_set_uint8(x_384, sizeof(void*)*4, x_383); +x_385 = 1; +x_386 = lean_alloc_ctor(1, 4, 1); +lean_ctor_set(x_386, 0, x_365); +lean_ctor_set(x_386, 1, x_366); +lean_ctor_set(x_386, 2, x_367); +lean_ctor_set(x_386, 3, x_384); +lean_ctor_set_uint8(x_386, sizeof(void*)*4, x_385); +return x_386; +} +else +{ +uint8_t x_387; +x_387 = lean_ctor_get_uint8(x_379, sizeof(void*)*4); +if (x_387 == 0) +{ +lean_object* x_388; lean_object* x_389; lean_object* x_390; lean_object* x_391; lean_object* x_392; lean_object* x_393; lean_object* x_394; lean_object* x_395; uint8_t x_396; lean_object* x_397; lean_object* x_398; uint8_t x_399; lean_object* x_400; +x_388 = lean_ctor_get(x_377, 1); +lean_inc(x_388); +x_389 = lean_ctor_get(x_377, 2); +lean_inc(x_389); +if (lean_is_exclusive(x_377)) { + lean_ctor_release(x_377, 0); + lean_ctor_release(x_377, 1); + lean_ctor_release(x_377, 2); + lean_ctor_release(x_377, 3); + x_390 = x_377; +} else { + lean_dec_ref(x_377); + x_390 = lean_box(0); +} +x_391 = lean_ctor_get(x_379, 0); +lean_inc(x_391); +x_392 = lean_ctor_get(x_379, 1); +lean_inc(x_392); +x_393 = lean_ctor_get(x_379, 2); +lean_inc(x_393); +x_394 = lean_ctor_get(x_379, 3); +lean_inc(x_394); +if (lean_is_exclusive(x_379)) { + lean_ctor_release(x_379, 0); + lean_ctor_release(x_379, 1); + lean_ctor_release(x_379, 2); + lean_ctor_release(x_379, 3); + x_395 = x_379; +} else { + lean_dec_ref(x_379); + x_395 = lean_box(0); +} +x_396 = 1; +if (lean_is_scalar(x_395)) { + x_397 = lean_alloc_ctor(1, 4, 1); +} else { + x_397 = x_395; +} +lean_ctor_set(x_397, 0, x_365); +lean_ctor_set(x_397, 1, x_366); +lean_ctor_set(x_397, 2, x_367); +lean_ctor_set(x_397, 3, x_378); +lean_ctor_set_uint8(x_397, sizeof(void*)*4, x_396); +if (lean_is_scalar(x_390)) { + x_398 = lean_alloc_ctor(1, 4, 1); +} else { + x_398 = x_390; +} +lean_ctor_set(x_398, 0, x_391); +lean_ctor_set(x_398, 1, x_392); +lean_ctor_set(x_398, 2, x_393); +lean_ctor_set(x_398, 3, x_394); +lean_ctor_set_uint8(x_398, sizeof(void*)*4, x_396); +x_399 = 0; +x_400 = lean_alloc_ctor(1, 4, 1); +lean_ctor_set(x_400, 0, x_397); +lean_ctor_set(x_400, 1, x_388); +lean_ctor_set(x_400, 2, x_389); +lean_ctor_set(x_400, 3, x_398); +lean_ctor_set_uint8(x_400, sizeof(void*)*4, x_399); +return x_400; +} +else +{ +lean_object* x_401; lean_object* x_402; lean_object* x_403; uint8_t x_404; lean_object* x_405; uint8_t x_406; lean_object* x_407; +x_401 = lean_ctor_get(x_377, 1); +lean_inc(x_401); +x_402 = lean_ctor_get(x_377, 2); +lean_inc(x_402); +if (lean_is_exclusive(x_377)) { + lean_ctor_release(x_377, 0); + lean_ctor_release(x_377, 1); + lean_ctor_release(x_377, 2); + lean_ctor_release(x_377, 3); + x_403 = x_377; +} else { + lean_dec_ref(x_377); + x_403 = lean_box(0); +} +x_404 = 0; +if (lean_is_scalar(x_403)) { + x_405 = lean_alloc_ctor(1, 4, 1); +} else { + x_405 = x_403; +} +lean_ctor_set(x_405, 0, x_378); +lean_ctor_set(x_405, 1, x_401); +lean_ctor_set(x_405, 2, x_402); +lean_ctor_set(x_405, 3, x_379); +lean_ctor_set_uint8(x_405, sizeof(void*)*4, x_404); +x_406 = 1; +x_407 = lean_alloc_ctor(1, 4, 1); +lean_ctor_set(x_407, 0, x_365); +lean_ctor_set(x_407, 1, x_366); +lean_ctor_set(x_407, 2, x_367); +lean_ctor_set(x_407, 3, x_405); +lean_ctor_set_uint8(x_407, sizeof(void*)*4, x_406); +return x_407; +} +} +} +else +{ +uint8_t x_408; +x_408 = lean_ctor_get_uint8(x_378, sizeof(void*)*4); +if (x_408 == 0) +{ +lean_object* x_409; lean_object* x_410; lean_object* x_411; lean_object* x_412; lean_object* x_413; lean_object* x_414; lean_object* x_415; lean_object* x_416; lean_object* x_417; uint8_t x_418; lean_object* x_419; lean_object* x_420; uint8_t x_421; lean_object* x_422; +x_409 = lean_ctor_get(x_377, 1); +lean_inc(x_409); +x_410 = lean_ctor_get(x_377, 2); +lean_inc(x_410); +x_411 = lean_ctor_get(x_377, 3); +lean_inc(x_411); +if (lean_is_exclusive(x_377)) { + lean_ctor_release(x_377, 0); + lean_ctor_release(x_377, 1); + lean_ctor_release(x_377, 2); + lean_ctor_release(x_377, 3); + x_412 = x_377; +} else { + lean_dec_ref(x_377); + x_412 = lean_box(0); +} +x_413 = lean_ctor_get(x_378, 0); +lean_inc(x_413); +x_414 = lean_ctor_get(x_378, 1); +lean_inc(x_414); +x_415 = lean_ctor_get(x_378, 2); +lean_inc(x_415); +x_416 = lean_ctor_get(x_378, 3); +lean_inc(x_416); +if (lean_is_exclusive(x_378)) { + lean_ctor_release(x_378, 0); + lean_ctor_release(x_378, 1); + lean_ctor_release(x_378, 2); + lean_ctor_release(x_378, 3); + x_417 = x_378; +} else { + lean_dec_ref(x_378); + x_417 = lean_box(0); +} +x_418 = 1; +if (lean_is_scalar(x_417)) { + x_419 = lean_alloc_ctor(1, 4, 1); +} else { + x_419 = x_417; +} +lean_ctor_set(x_419, 0, x_365); +lean_ctor_set(x_419, 1, x_366); +lean_ctor_set(x_419, 2, x_367); +lean_ctor_set(x_419, 3, x_413); +lean_ctor_set_uint8(x_419, sizeof(void*)*4, x_418); +if (lean_is_scalar(x_412)) { + x_420 = lean_alloc_ctor(1, 4, 1); +} else { + x_420 = x_412; +} +lean_ctor_set(x_420, 0, x_416); +lean_ctor_set(x_420, 1, x_409); +lean_ctor_set(x_420, 2, x_410); +lean_ctor_set(x_420, 3, x_411); +lean_ctor_set_uint8(x_420, sizeof(void*)*4, x_418); +x_421 = 0; +x_422 = lean_alloc_ctor(1, 4, 1); +lean_ctor_set(x_422, 0, x_419); +lean_ctor_set(x_422, 1, x_414); +lean_ctor_set(x_422, 2, x_415); +lean_ctor_set(x_422, 3, x_420); +lean_ctor_set_uint8(x_422, sizeof(void*)*4, x_421); +return x_422; +} +else +{ +lean_object* x_423; +x_423 = lean_ctor_get(x_377, 3); +lean_inc(x_423); +if (lean_obj_tag(x_423) == 0) +{ +lean_object* x_424; lean_object* x_425; lean_object* x_426; uint8_t x_427; lean_object* x_428; uint8_t x_429; lean_object* x_430; +x_424 = lean_ctor_get(x_377, 1); +lean_inc(x_424); +x_425 = lean_ctor_get(x_377, 2); +lean_inc(x_425); +if (lean_is_exclusive(x_377)) { + lean_ctor_release(x_377, 0); + lean_ctor_release(x_377, 1); + lean_ctor_release(x_377, 2); + lean_ctor_release(x_377, 3); + x_426 = x_377; +} else { + lean_dec_ref(x_377); + x_426 = lean_box(0); +} +x_427 = 0; +if (lean_is_scalar(x_426)) { + x_428 = lean_alloc_ctor(1, 4, 1); +} else { + x_428 = x_426; +} +lean_ctor_set(x_428, 0, x_378); +lean_ctor_set(x_428, 1, x_424); +lean_ctor_set(x_428, 2, x_425); +lean_ctor_set(x_428, 3, x_423); +lean_ctor_set_uint8(x_428, sizeof(void*)*4, x_427); +x_429 = 1; +x_430 = lean_alloc_ctor(1, 4, 1); +lean_ctor_set(x_430, 0, x_365); +lean_ctor_set(x_430, 1, x_366); +lean_ctor_set(x_430, 2, x_367); +lean_ctor_set(x_430, 3, x_428); +lean_ctor_set_uint8(x_430, sizeof(void*)*4, x_429); +return x_430; +} +else +{ +uint8_t x_431; +x_431 = lean_ctor_get_uint8(x_423, sizeof(void*)*4); +if (x_431 == 0) +{ +lean_object* x_432; lean_object* x_433; lean_object* x_434; lean_object* x_435; lean_object* x_436; lean_object* x_437; lean_object* x_438; lean_object* x_439; uint8_t x_440; lean_object* x_441; lean_object* x_442; lean_object* x_443; uint8_t x_444; lean_object* x_445; +x_432 = lean_ctor_get(x_377, 1); +lean_inc(x_432); +x_433 = lean_ctor_get(x_377, 2); +lean_inc(x_433); +if (lean_is_exclusive(x_377)) { + lean_ctor_release(x_377, 0); + lean_ctor_release(x_377, 1); + lean_ctor_release(x_377, 2); + lean_ctor_release(x_377, 3); + x_434 = x_377; +} else { + lean_dec_ref(x_377); + x_434 = lean_box(0); +} +x_435 = lean_ctor_get(x_423, 0); +lean_inc(x_435); +x_436 = lean_ctor_get(x_423, 1); +lean_inc(x_436); +x_437 = lean_ctor_get(x_423, 2); +lean_inc(x_437); +x_438 = lean_ctor_get(x_423, 3); +lean_inc(x_438); +if (lean_is_exclusive(x_423)) { + lean_ctor_release(x_423, 0); + lean_ctor_release(x_423, 1); + lean_ctor_release(x_423, 2); + lean_ctor_release(x_423, 3); + x_439 = x_423; +} else { + lean_dec_ref(x_423); + x_439 = lean_box(0); +} +x_440 = 1; +lean_inc(x_378); +if (lean_is_scalar(x_439)) { + x_441 = lean_alloc_ctor(1, 4, 1); +} else { + x_441 = x_439; +} +lean_ctor_set(x_441, 0, x_365); +lean_ctor_set(x_441, 1, x_366); +lean_ctor_set(x_441, 2, x_367); +lean_ctor_set(x_441, 3, x_378); +if (lean_is_exclusive(x_378)) { + lean_ctor_release(x_378, 0); + lean_ctor_release(x_378, 1); + lean_ctor_release(x_378, 2); + lean_ctor_release(x_378, 3); + x_442 = x_378; +} else { + lean_dec_ref(x_378); + x_442 = lean_box(0); +} +lean_ctor_set_uint8(x_441, sizeof(void*)*4, x_440); +if (lean_is_scalar(x_442)) { + x_443 = lean_alloc_ctor(1, 4, 1); +} else { + x_443 = x_442; +} +lean_ctor_set(x_443, 0, x_435); +lean_ctor_set(x_443, 1, x_436); +lean_ctor_set(x_443, 2, x_437); +lean_ctor_set(x_443, 3, x_438); +lean_ctor_set_uint8(x_443, sizeof(void*)*4, x_440); +x_444 = 0; +if (lean_is_scalar(x_434)) { + x_445 = lean_alloc_ctor(1, 4, 1); +} else { + x_445 = x_434; +} +lean_ctor_set(x_445, 0, x_441); +lean_ctor_set(x_445, 1, x_432); +lean_ctor_set(x_445, 2, x_433); +lean_ctor_set(x_445, 3, x_443); +lean_ctor_set_uint8(x_445, sizeof(void*)*4, x_444); +return x_445; +} +else +{ +lean_object* x_446; lean_object* x_447; lean_object* x_448; lean_object* x_449; lean_object* x_450; lean_object* x_451; lean_object* x_452; lean_object* x_453; lean_object* x_454; uint8_t x_455; lean_object* x_456; uint8_t x_457; lean_object* x_458; +x_446 = lean_ctor_get(x_377, 1); +lean_inc(x_446); +x_447 = lean_ctor_get(x_377, 2); +lean_inc(x_447); +if (lean_is_exclusive(x_377)) { + lean_ctor_release(x_377, 0); + lean_ctor_release(x_377, 1); + lean_ctor_release(x_377, 2); + lean_ctor_release(x_377, 3); + x_448 = x_377; +} else { + lean_dec_ref(x_377); + x_448 = lean_box(0); +} +x_449 = lean_ctor_get(x_378, 0); +lean_inc(x_449); +x_450 = lean_ctor_get(x_378, 1); +lean_inc(x_450); +x_451 = lean_ctor_get(x_378, 2); +lean_inc(x_451); +x_452 = lean_ctor_get(x_378, 3); +lean_inc(x_452); +if (lean_is_exclusive(x_378)) { + lean_ctor_release(x_378, 0); + lean_ctor_release(x_378, 1); + lean_ctor_release(x_378, 2); + lean_ctor_release(x_378, 3); + x_453 = x_378; +} else { + lean_dec_ref(x_378); + x_453 = lean_box(0); +} +if (lean_is_scalar(x_453)) { + x_454 = lean_alloc_ctor(1, 4, 1); +} else { + x_454 = x_453; +} +lean_ctor_set(x_454, 0, x_449); +lean_ctor_set(x_454, 1, x_450); +lean_ctor_set(x_454, 2, x_451); +lean_ctor_set(x_454, 3, x_452); +lean_ctor_set_uint8(x_454, sizeof(void*)*4, x_431); +x_455 = 0; +if (lean_is_scalar(x_448)) { + x_456 = lean_alloc_ctor(1, 4, 1); +} else { + x_456 = x_448; +} +lean_ctor_set(x_456, 0, x_454); +lean_ctor_set(x_456, 1, x_446); +lean_ctor_set(x_456, 2, x_447); +lean_ctor_set(x_456, 3, x_423); +lean_ctor_set_uint8(x_456, sizeof(void*)*4, x_455); +x_457 = 1; +x_458 = lean_alloc_ctor(1, 4, 1); +lean_ctor_set(x_458, 0, x_365); +lean_ctor_set(x_458, 1, x_366); +lean_ctor_set(x_458, 2, x_367); +lean_ctor_set(x_458, 3, x_456); +lean_ctor_set_uint8(x_458, sizeof(void*)*4, x_457); +return x_458; +} +} +} +} +} +} +} +else +{ +uint8_t x_459; +x_459 = l_Std_RBNode_isRed___rarg(x_365); +if (x_459 == 0) +{ +lean_object* x_460; uint8_t x_461; lean_object* x_462; +x_460 = l_Std_RBNode_ins___at_Lean_Server_Watchdog_handleRequest___spec__4(x_365, x_2, x_3); +x_461 = 1; +x_462 = lean_alloc_ctor(1, 4, 1); +lean_ctor_set(x_462, 0, x_460); +lean_ctor_set(x_462, 1, x_366); +lean_ctor_set(x_462, 2, x_367); +lean_ctor_set(x_462, 3, x_368); +lean_ctor_set_uint8(x_462, sizeof(void*)*4, x_461); +return x_462; +} +else +{ +lean_object* x_463; lean_object* x_464; +x_463 = l_Std_RBNode_ins___at_Lean_Server_Watchdog_handleRequest___spec__4(x_365, x_2, x_3); +x_464 = lean_ctor_get(x_463, 0); +lean_inc(x_464); +if (lean_obj_tag(x_464) == 0) +{ +lean_object* x_465; +x_465 = lean_ctor_get(x_463, 3); +lean_inc(x_465); +if (lean_obj_tag(x_465) == 0) +{ +lean_object* x_466; lean_object* x_467; lean_object* x_468; uint8_t x_469; lean_object* x_470; uint8_t x_471; lean_object* x_472; +x_466 = lean_ctor_get(x_463, 1); +lean_inc(x_466); +x_467 = lean_ctor_get(x_463, 2); +lean_inc(x_467); +if (lean_is_exclusive(x_463)) { + lean_ctor_release(x_463, 0); + lean_ctor_release(x_463, 1); + lean_ctor_release(x_463, 2); + lean_ctor_release(x_463, 3); + x_468 = x_463; +} else { + lean_dec_ref(x_463); + x_468 = lean_box(0); +} +x_469 = 0; +if (lean_is_scalar(x_468)) { + x_470 = lean_alloc_ctor(1, 4, 1); +} else { + x_470 = x_468; +} +lean_ctor_set(x_470, 0, x_465); +lean_ctor_set(x_470, 1, x_466); +lean_ctor_set(x_470, 2, x_467); +lean_ctor_set(x_470, 3, x_465); +lean_ctor_set_uint8(x_470, sizeof(void*)*4, x_469); +x_471 = 1; +x_472 = lean_alloc_ctor(1, 4, 1); +lean_ctor_set(x_472, 0, x_470); +lean_ctor_set(x_472, 1, x_366); +lean_ctor_set(x_472, 2, x_367); +lean_ctor_set(x_472, 3, x_368); +lean_ctor_set_uint8(x_472, sizeof(void*)*4, x_471); +return x_472; +} +else +{ +uint8_t x_473; +x_473 = lean_ctor_get_uint8(x_465, sizeof(void*)*4); +if (x_473 == 0) +{ +lean_object* x_474; lean_object* x_475; lean_object* x_476; lean_object* x_477; lean_object* x_478; lean_object* x_479; lean_object* x_480; lean_object* x_481; uint8_t x_482; lean_object* x_483; lean_object* x_484; uint8_t x_485; lean_object* x_486; +x_474 = lean_ctor_get(x_463, 1); +lean_inc(x_474); +x_475 = lean_ctor_get(x_463, 2); +lean_inc(x_475); +if (lean_is_exclusive(x_463)) { + lean_ctor_release(x_463, 0); + lean_ctor_release(x_463, 1); + lean_ctor_release(x_463, 2); + lean_ctor_release(x_463, 3); + x_476 = x_463; +} else { + lean_dec_ref(x_463); + x_476 = lean_box(0); +} +x_477 = lean_ctor_get(x_465, 0); +lean_inc(x_477); +x_478 = lean_ctor_get(x_465, 1); +lean_inc(x_478); +x_479 = lean_ctor_get(x_465, 2); +lean_inc(x_479); +x_480 = lean_ctor_get(x_465, 3); +lean_inc(x_480); +if (lean_is_exclusive(x_465)) { + lean_ctor_release(x_465, 0); + lean_ctor_release(x_465, 1); + lean_ctor_release(x_465, 2); + lean_ctor_release(x_465, 3); + x_481 = x_465; +} else { + lean_dec_ref(x_465); + x_481 = lean_box(0); +} +x_482 = 1; +if (lean_is_scalar(x_481)) { + x_483 = lean_alloc_ctor(1, 4, 1); +} else { + x_483 = x_481; +} +lean_ctor_set(x_483, 0, x_464); +lean_ctor_set(x_483, 1, x_474); +lean_ctor_set(x_483, 2, x_475); +lean_ctor_set(x_483, 3, x_477); +lean_ctor_set_uint8(x_483, sizeof(void*)*4, x_482); +if (lean_is_scalar(x_476)) { + x_484 = lean_alloc_ctor(1, 4, 1); +} else { + x_484 = x_476; +} +lean_ctor_set(x_484, 0, x_480); +lean_ctor_set(x_484, 1, x_366); +lean_ctor_set(x_484, 2, x_367); +lean_ctor_set(x_484, 3, x_368); +lean_ctor_set_uint8(x_484, sizeof(void*)*4, x_482); +x_485 = 0; +x_486 = lean_alloc_ctor(1, 4, 1); +lean_ctor_set(x_486, 0, x_483); +lean_ctor_set(x_486, 1, x_478); +lean_ctor_set(x_486, 2, x_479); +lean_ctor_set(x_486, 3, x_484); +lean_ctor_set_uint8(x_486, sizeof(void*)*4, x_485); +return x_486; +} +else +{ +lean_object* x_487; lean_object* x_488; lean_object* x_489; uint8_t x_490; lean_object* x_491; uint8_t x_492; lean_object* x_493; +x_487 = lean_ctor_get(x_463, 1); +lean_inc(x_487); +x_488 = lean_ctor_get(x_463, 2); +lean_inc(x_488); +if (lean_is_exclusive(x_463)) { + lean_ctor_release(x_463, 0); + lean_ctor_release(x_463, 1); + lean_ctor_release(x_463, 2); + lean_ctor_release(x_463, 3); + x_489 = x_463; +} else { + lean_dec_ref(x_463); + x_489 = lean_box(0); +} +x_490 = 0; +if (lean_is_scalar(x_489)) { + x_491 = lean_alloc_ctor(1, 4, 1); +} else { + x_491 = x_489; +} +lean_ctor_set(x_491, 0, x_464); +lean_ctor_set(x_491, 1, x_487); +lean_ctor_set(x_491, 2, x_488); +lean_ctor_set(x_491, 3, x_465); +lean_ctor_set_uint8(x_491, sizeof(void*)*4, x_490); +x_492 = 1; +x_493 = lean_alloc_ctor(1, 4, 1); +lean_ctor_set(x_493, 0, x_491); +lean_ctor_set(x_493, 1, x_366); +lean_ctor_set(x_493, 2, x_367); +lean_ctor_set(x_493, 3, x_368); +lean_ctor_set_uint8(x_493, sizeof(void*)*4, x_492); +return x_493; +} +} +} +else +{ +uint8_t x_494; +x_494 = lean_ctor_get_uint8(x_464, sizeof(void*)*4); +if (x_494 == 0) +{ +lean_object* x_495; lean_object* x_496; lean_object* x_497; lean_object* x_498; lean_object* x_499; lean_object* x_500; lean_object* x_501; lean_object* x_502; lean_object* x_503; uint8_t x_504; lean_object* x_505; lean_object* x_506; uint8_t x_507; lean_object* x_508; +x_495 = lean_ctor_get(x_463, 1); +lean_inc(x_495); +x_496 = lean_ctor_get(x_463, 2); +lean_inc(x_496); +x_497 = lean_ctor_get(x_463, 3); +lean_inc(x_497); +if (lean_is_exclusive(x_463)) { + lean_ctor_release(x_463, 0); + lean_ctor_release(x_463, 1); + lean_ctor_release(x_463, 2); + lean_ctor_release(x_463, 3); + x_498 = x_463; +} else { + lean_dec_ref(x_463); + x_498 = lean_box(0); +} +x_499 = lean_ctor_get(x_464, 0); +lean_inc(x_499); +x_500 = lean_ctor_get(x_464, 1); +lean_inc(x_500); +x_501 = lean_ctor_get(x_464, 2); +lean_inc(x_501); +x_502 = lean_ctor_get(x_464, 3); +lean_inc(x_502); +if (lean_is_exclusive(x_464)) { + lean_ctor_release(x_464, 0); + lean_ctor_release(x_464, 1); + lean_ctor_release(x_464, 2); + lean_ctor_release(x_464, 3); + x_503 = x_464; +} else { + lean_dec_ref(x_464); + x_503 = lean_box(0); +} +x_504 = 1; +if (lean_is_scalar(x_503)) { + x_505 = lean_alloc_ctor(1, 4, 1); +} else { + x_505 = x_503; +} +lean_ctor_set(x_505, 0, x_499); +lean_ctor_set(x_505, 1, x_500); +lean_ctor_set(x_505, 2, x_501); +lean_ctor_set(x_505, 3, x_502); +lean_ctor_set_uint8(x_505, sizeof(void*)*4, x_504); +if (lean_is_scalar(x_498)) { + x_506 = lean_alloc_ctor(1, 4, 1); +} else { + x_506 = x_498; +} +lean_ctor_set(x_506, 0, x_497); +lean_ctor_set(x_506, 1, x_366); +lean_ctor_set(x_506, 2, x_367); +lean_ctor_set(x_506, 3, x_368); +lean_ctor_set_uint8(x_506, sizeof(void*)*4, x_504); +x_507 = 0; +x_508 = lean_alloc_ctor(1, 4, 1); +lean_ctor_set(x_508, 0, x_505); +lean_ctor_set(x_508, 1, x_495); +lean_ctor_set(x_508, 2, x_496); +lean_ctor_set(x_508, 3, x_506); +lean_ctor_set_uint8(x_508, sizeof(void*)*4, x_507); +return x_508; +} +else +{ +lean_object* x_509; +x_509 = lean_ctor_get(x_463, 3); +lean_inc(x_509); +if (lean_obj_tag(x_509) == 0) +{ +lean_object* x_510; lean_object* x_511; lean_object* x_512; uint8_t x_513; lean_object* x_514; uint8_t x_515; lean_object* x_516; +x_510 = lean_ctor_get(x_463, 1); +lean_inc(x_510); +x_511 = lean_ctor_get(x_463, 2); +lean_inc(x_511); +if (lean_is_exclusive(x_463)) { + lean_ctor_release(x_463, 0); + lean_ctor_release(x_463, 1); + lean_ctor_release(x_463, 2); + lean_ctor_release(x_463, 3); + x_512 = x_463; +} else { + lean_dec_ref(x_463); + x_512 = lean_box(0); +} +x_513 = 0; +if (lean_is_scalar(x_512)) { + x_514 = lean_alloc_ctor(1, 4, 1); +} else { + x_514 = x_512; +} +lean_ctor_set(x_514, 0, x_464); +lean_ctor_set(x_514, 1, x_510); +lean_ctor_set(x_514, 2, x_511); +lean_ctor_set(x_514, 3, x_509); +lean_ctor_set_uint8(x_514, sizeof(void*)*4, x_513); +x_515 = 1; +x_516 = lean_alloc_ctor(1, 4, 1); +lean_ctor_set(x_516, 0, x_514); +lean_ctor_set(x_516, 1, x_366); +lean_ctor_set(x_516, 2, x_367); +lean_ctor_set(x_516, 3, x_368); +lean_ctor_set_uint8(x_516, sizeof(void*)*4, x_515); +return x_516; +} +else +{ +uint8_t x_517; +x_517 = lean_ctor_get_uint8(x_509, sizeof(void*)*4); +if (x_517 == 0) +{ +lean_object* x_518; lean_object* x_519; lean_object* x_520; lean_object* x_521; lean_object* x_522; lean_object* x_523; lean_object* x_524; lean_object* x_525; uint8_t x_526; lean_object* x_527; lean_object* x_528; lean_object* x_529; uint8_t x_530; lean_object* x_531; +x_518 = lean_ctor_get(x_463, 1); +lean_inc(x_518); +x_519 = lean_ctor_get(x_463, 2); +lean_inc(x_519); +if (lean_is_exclusive(x_463)) { + lean_ctor_release(x_463, 0); + lean_ctor_release(x_463, 1); + lean_ctor_release(x_463, 2); + lean_ctor_release(x_463, 3); + x_520 = x_463; +} else { + lean_dec_ref(x_463); + x_520 = lean_box(0); +} +x_521 = lean_ctor_get(x_509, 0); +lean_inc(x_521); +x_522 = lean_ctor_get(x_509, 1); +lean_inc(x_522); +x_523 = lean_ctor_get(x_509, 2); +lean_inc(x_523); +x_524 = lean_ctor_get(x_509, 3); +lean_inc(x_524); +if (lean_is_exclusive(x_509)) { + lean_ctor_release(x_509, 0); + lean_ctor_release(x_509, 1); + lean_ctor_release(x_509, 2); + lean_ctor_release(x_509, 3); + x_525 = x_509; +} else { + lean_dec_ref(x_509); + x_525 = lean_box(0); +} +x_526 = 1; +lean_inc(x_464); +if (lean_is_scalar(x_525)) { + x_527 = lean_alloc_ctor(1, 4, 1); +} else { + x_527 = x_525; +} +lean_ctor_set(x_527, 0, x_464); +lean_ctor_set(x_527, 1, x_518); +lean_ctor_set(x_527, 2, x_519); +lean_ctor_set(x_527, 3, x_521); +if (lean_is_exclusive(x_464)) { + lean_ctor_release(x_464, 0); + lean_ctor_release(x_464, 1); + lean_ctor_release(x_464, 2); + lean_ctor_release(x_464, 3); + x_528 = x_464; +} else { + lean_dec_ref(x_464); + x_528 = lean_box(0); +} +lean_ctor_set_uint8(x_527, sizeof(void*)*4, x_526); +if (lean_is_scalar(x_528)) { + x_529 = lean_alloc_ctor(1, 4, 1); +} else { + x_529 = x_528; +} +lean_ctor_set(x_529, 0, x_524); +lean_ctor_set(x_529, 1, x_366); +lean_ctor_set(x_529, 2, x_367); +lean_ctor_set(x_529, 3, x_368); +lean_ctor_set_uint8(x_529, sizeof(void*)*4, x_526); +x_530 = 0; +if (lean_is_scalar(x_520)) { + x_531 = lean_alloc_ctor(1, 4, 1); +} else { + x_531 = x_520; +} +lean_ctor_set(x_531, 0, x_527); +lean_ctor_set(x_531, 1, x_522); +lean_ctor_set(x_531, 2, x_523); +lean_ctor_set(x_531, 3, x_529); +lean_ctor_set_uint8(x_531, sizeof(void*)*4, x_530); +return x_531; +} +else +{ +lean_object* x_532; lean_object* x_533; lean_object* x_534; lean_object* x_535; lean_object* x_536; lean_object* x_537; lean_object* x_538; lean_object* x_539; lean_object* x_540; uint8_t x_541; lean_object* x_542; uint8_t x_543; lean_object* x_544; +x_532 = lean_ctor_get(x_463, 1); +lean_inc(x_532); +x_533 = lean_ctor_get(x_463, 2); +lean_inc(x_533); +if (lean_is_exclusive(x_463)) { + lean_ctor_release(x_463, 0); + lean_ctor_release(x_463, 1); + lean_ctor_release(x_463, 2); + lean_ctor_release(x_463, 3); + x_534 = x_463; +} else { + lean_dec_ref(x_463); + x_534 = lean_box(0); +} +x_535 = lean_ctor_get(x_464, 0); +lean_inc(x_535); +x_536 = lean_ctor_get(x_464, 1); +lean_inc(x_536); +x_537 = lean_ctor_get(x_464, 2); +lean_inc(x_537); +x_538 = lean_ctor_get(x_464, 3); +lean_inc(x_538); +if (lean_is_exclusive(x_464)) { + lean_ctor_release(x_464, 0); + lean_ctor_release(x_464, 1); + lean_ctor_release(x_464, 2); + lean_ctor_release(x_464, 3); + x_539 = x_464; +} else { + lean_dec_ref(x_464); + x_539 = lean_box(0); +} +if (lean_is_scalar(x_539)) { + x_540 = lean_alloc_ctor(1, 4, 1); +} else { + x_540 = x_539; +} +lean_ctor_set(x_540, 0, x_535); +lean_ctor_set(x_540, 1, x_536); +lean_ctor_set(x_540, 2, x_537); +lean_ctor_set(x_540, 3, x_538); +lean_ctor_set_uint8(x_540, sizeof(void*)*4, x_517); +x_541 = 0; +if (lean_is_scalar(x_534)) { + x_542 = lean_alloc_ctor(1, 4, 1); +} else { + x_542 = x_534; +} +lean_ctor_set(x_542, 0, x_540); +lean_ctor_set(x_542, 1, x_532); +lean_ctor_set(x_542, 2, x_533); +lean_ctor_set(x_542, 3, x_509); +lean_ctor_set_uint8(x_542, sizeof(void*)*4, x_541); +x_543 = 1; +x_544 = lean_alloc_ctor(1, 4, 1); +lean_ctor_set(x_544, 0, x_542); +lean_ctor_set(x_544, 1, x_366); +lean_ctor_set(x_544, 2, x_367); +lean_ctor_set(x_544, 3, x_368); +lean_ctor_set_uint8(x_544, sizeof(void*)*4, x_543); +return x_544; +} +} +} +} +} +} +} +} +} +} +} +lean_object* l_Std_RBNode_insert___at_Lean_Server_Watchdog_handleRequest___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +uint8_t x_4; +x_4 = l_Std_RBNode_isRed___rarg(x_1); +if (x_4 == 0) +{ +lean_object* x_5; +x_5 = l_Std_RBNode_ins___at_Lean_Server_Watchdog_handleRequest___spec__4(x_1, x_2, x_3); +return x_5; +} +else +{ +lean_object* x_6; lean_object* x_7; +x_6 = l_Std_RBNode_ins___at_Lean_Server_Watchdog_handleRequest___spec__4(x_1, x_2, x_3); +x_7 = l_Std_RBNode_setBlack___rarg(x_6); +return x_7; +} +} +} +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; @@ -12416,602 +10624,7 @@ return x_12; } } } -lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__11(lean_object* x_1) { -_start: -{ -lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; -x_2 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonSemanticTokensParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_1453_(x_1); -x_3 = lean_ctor_get(x_2, 0); -lean_inc(x_3); -lean_dec(x_2); -x_4 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_4, 0, x_3); -x_5 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_5, 0, x_4); -return x_5; -} -} -lean_object* l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_handleRequest___spec__10(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; -x_4 = lean_ctor_get(x_2, 0); -lean_inc(x_4); -x_5 = lean_ctor_get(x_2, 1); -lean_inc(x_5); -x_6 = lean_ctor_get(x_2, 2); -lean_inc(x_6); -lean_dec(x_2); -x_7 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__11(x_6); -x_8 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_8, 0, x_4); -lean_ctor_set(x_8, 1, x_5); -lean_ctor_set(x_8, 2, x_7); -x_9 = l_IO_FS_Stream_writeLspMessage(x_1, x_8, x_3); -lean_dec(x_8); -return x_9; -} -} -lean_object* l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__9(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; lean_object* x_5; -lean_inc(x_1); -x_4 = l_Lean_Server_Watchdog_FileWorker_stdin(x_1); -lean_inc(x_2); -x_5 = l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_handleRequest___spec__10(x_4, x_2, x_3); -if (lean_obj_tag(x_5) == 0) -{ -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; uint8_t x_18; -x_6 = lean_ctor_get(x_5, 1); -lean_inc(x_6); -lean_dec(x_5); -x_7 = lean_ctor_get(x_1, 4); -lean_inc(x_7); -lean_dec(x_1); -x_8 = lean_st_ref_take(x_7, x_6); -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_2, 0); -lean_inc(x_11); -x_12 = lean_ctor_get(x_2, 1); -lean_inc(x_12); -x_13 = lean_ctor_get(x_2, 2); -lean_inc(x_13); -lean_dec(x_2); -x_14 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__11(x_13); -lean_inc(x_11); -x_15 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_15, 0, x_11); -lean_ctor_set(x_15, 1, x_12); -lean_ctor_set(x_15, 2, x_14); -x_16 = l_Std_RBNode_insert___at_Lean_Server_Watchdog_FileWorker_writeRequest___spec__1(x_9, x_11, x_15); -x_17 = lean_st_ref_set(x_7, x_16, x_10); -lean_dec(x_7); -x_18 = !lean_is_exclusive(x_17); -if (x_18 == 0) -{ -return x_17; -} -else -{ -lean_object* x_19; lean_object* x_20; lean_object* x_21; -x_19 = lean_ctor_get(x_17, 0); -x_20 = lean_ctor_get(x_17, 1); -lean_inc(x_20); -lean_inc(x_19); -lean_dec(x_17); -x_21 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_21, 0, x_19); -lean_ctor_set(x_21, 1, x_20); -return x_21; -} -} -else -{ -uint8_t x_22; -lean_dec(x_2); -lean_dec(x_1); -x_22 = !lean_is_exclusive(x_5); -if (x_22 == 0) -{ -return x_5; -} -else -{ -lean_object* x_23; lean_object* x_24; lean_object* x_25; -x_23 = lean_ctor_get(x_5, 0); -x_24 = lean_ctor_get(x_5, 1); -lean_inc(x_24); -lean_inc(x_23); -lean_dec(x_5); -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_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__13(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -uint8_t x_8; -x_8 = x_4 < x_3; -if (x_8 == 0) -{ -lean_object* x_9; -lean_dec(x_1); -x_9 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_9, 0, x_5); -lean_ctor_set(x_9, 1, x_7); -return x_9; -} -else -{ -lean_object* x_10; lean_object* x_11; -x_10 = lean_array_uget(x_2, x_4); -lean_inc(x_1); -x_11 = l_Lean_Server_Watchdog_FileWorker_writeMessage(x_1, x_10, x_7); -if (lean_obj_tag(x_11) == 0) -{ -lean_object* x_12; size_t x_13; size_t x_14; -lean_dec(x_10); -x_12 = lean_ctor_get(x_11, 1); -lean_inc(x_12); -lean_dec(x_11); -x_13 = 1; -x_14 = x_4 + x_13; -x_4 = x_14; -x_7 = x_12; -goto _start; -} -else -{ -lean_object* x_16; lean_object* x_17; size_t x_18; size_t x_19; -x_16 = lean_ctor_get(x_11, 1); -lean_inc(x_16); -lean_dec(x_11); -x_17 = lean_array_push(x_5, x_10); -x_18 = 1; -x_19 = x_4 + x_18; -x_4 = x_19; -x_5 = x_17; -x_7 = x_16; -goto _start; -} -} -} -} -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__14(size_t x_1, size_t x_2, lean_object* x_3) { -_start: -{ -uint8_t x_4; -x_4 = x_2 < x_1; -if (x_4 == 0) -{ -lean_object* x_5; -x_5 = x_3; -return x_5; -} -else -{ -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; size_t x_15; size_t x_16; lean_object* x_17; lean_object* x_18; -x_6 = lean_array_uget(x_3, x_2); -x_7 = lean_unsigned_to_nat(0u); -x_8 = lean_array_uset(x_3, x_2, x_7); -x_9 = x_6; -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_13 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__11(x_12); -x_14 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_14, 0, x_10); -lean_ctor_set(x_14, 1, x_11); -lean_ctor_set(x_14, 2, x_13); -x_15 = 1; -x_16 = x_2 + x_15; -x_17 = x_14; -x_18 = lean_array_uset(x_8, x_2, x_17); -x_2 = x_16; -x_3 = x_18; -goto _start; -} -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12___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; lean_object* x_9; lean_object* x_10; lean_object* x_11; -x_7 = l_Lean_Server_Watchdog_eraseFileWorker(x_1, x_5, x_6); -x_8 = lean_ctor_get(x_7, 1); -lean_inc(x_8); -lean_dec(x_7); -x_9 = lean_ctor_get(x_2, 0); -lean_inc(x_9); -lean_dec(x_2); -x_10 = lean_ctor_get(x_9, 0); -lean_inc(x_10); -lean_dec(x_9); -lean_inc(x_5); -x_11 = l_Lean_Server_Watchdog_startFileWorker(x_10, x_5, x_8); -if (lean_obj_tag(x_11) == 0) -{ -lean_object* x_12; lean_object* x_13; -x_12 = lean_ctor_get(x_11, 1); -lean_inc(x_12); -lean_dec(x_11); -x_13 = l_Lean_Server_Watchdog_findFileWorker(x_1, x_5, x_12); -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; lean_object* x_20; uint8_t x_21; -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_3); -x_17 = lean_usize_of_nat(x_16); -lean_dec(x_16); -x_18 = 0; -x_19 = l_Array_empty___closed__1; -x_20 = l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__13(x_14, x_3, x_17, x_18, x_19, x_5, x_15); -x_21 = !lean_is_exclusive(x_20); -if (x_21 == 0) -{ -lean_object* x_22; lean_object* x_23; uint8_t x_24; -x_22 = lean_ctor_get(x_20, 0); -x_23 = lean_ctor_get(x_20, 1); -x_24 = l_Array_isEmpty___rarg(x_22); -if (x_24 == 0) -{ -uint8_t x_25; -x_25 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__1; -if (x_25 == 0) -{ -lean_object* x_26; -lean_dec(x_22); -lean_dec(x_5); -x_26 = lean_box(0); -lean_ctor_set(x_20, 0, x_26); -return x_20; -} -else -{ -lean_object* x_27; -lean_free_object(x_20); -x_27 = l_Lean_Server_Watchdog_handleCrash(x_1, x_22, x_5, x_23); -lean_dec(x_5); -return x_27; -} -} -else -{ -uint8_t x_28; -x_28 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__2; -if (x_28 == 0) -{ -lean_object* x_29; -lean_dec(x_22); -lean_dec(x_5); -x_29 = lean_box(0); -lean_ctor_set(x_20, 0, x_29); -return x_20; -} -else -{ -lean_object* x_30; -lean_free_object(x_20); -x_30 = l_Lean_Server_Watchdog_handleCrash(x_1, x_22, x_5, x_23); -lean_dec(x_5); -return x_30; -} -} -} -else -{ -lean_object* x_31; lean_object* x_32; uint8_t x_33; -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_20); -x_33 = l_Array_isEmpty___rarg(x_31); -if (x_33 == 0) -{ -uint8_t x_34; -x_34 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__1; -if (x_34 == 0) -{ -lean_object* x_35; lean_object* x_36; -lean_dec(x_31); -lean_dec(x_5); -x_35 = lean_box(0); -x_36 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_36, 0, x_35); -lean_ctor_set(x_36, 1, x_32); -return x_36; -} -else -{ -lean_object* x_37; -x_37 = l_Lean_Server_Watchdog_handleCrash(x_1, x_31, x_5, x_32); -lean_dec(x_5); -return x_37; -} -} -else -{ -uint8_t x_38; -x_38 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__2; -if (x_38 == 0) -{ -lean_object* x_39; lean_object* x_40; -lean_dec(x_31); -lean_dec(x_5); -x_39 = lean_box(0); -x_40 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_40, 0, x_39); -lean_ctor_set(x_40, 1, x_32); -return x_40; -} -else -{ -lean_object* x_41; -x_41 = l_Lean_Server_Watchdog_handleCrash(x_1, x_31, x_5, x_32); -lean_dec(x_5); -return x_41; -} -} -} -} -else -{ -uint8_t x_42; -lean_dec(x_5); -x_42 = !lean_is_exclusive(x_13); -if (x_42 == 0) -{ -return x_13; -} -else -{ -lean_object* x_43; lean_object* x_44; lean_object* x_45; -x_43 = lean_ctor_get(x_13, 0); -x_44 = lean_ctor_get(x_13, 1); -lean_inc(x_44); -lean_inc(x_43); -lean_dec(x_13); -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; -} -} -} -else -{ -uint8_t x_46; -lean_dec(x_5); -x_46 = !lean_is_exclusive(x_11); -if (x_46 == 0) -{ -return x_11; -} -else -{ -lean_object* x_47; lean_object* x_48; lean_object* x_49; -x_47 = lean_ctor_get(x_11, 0); -x_48 = lean_ctor_get(x_11, 1); -lean_inc(x_48); -lean_inc(x_47); -lean_dec(x_11); -x_49 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_49, 0, x_47); -lean_ctor_set(x_49, 1, x_48); -return x_49; -} -} -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12___lambda__2(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -if (x_1 == 0) -{ -lean_object* x_8; lean_object* x_9; -lean_dec(x_6); -lean_dec(x_3); -x_8 = lean_box(0); -x_9 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_9, 0, x_8); -lean_ctor_set(x_9, 1, x_7); -return x_9; -} -else -{ -lean_object* x_10; lean_object* x_11; -x_10 = lean_box(0); -x_11 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12___lambda__1(x_2, x_3, x_4, x_10, x_6, x_7); -return x_11; -} -} -} -static lean_object* _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12___closed__1() { -_start: -{ -size_t x_1; size_t x_2; lean_object* x_3; lean_object* x_4; -x_1 = 0; -x_2 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__2; -x_3 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__3; -x_4 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__14(x_2, x_1, x_3); -return x_4; -} -} -static lean_object* _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12___closed__1; -x_2 = x_1; -return x_2; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12(lean_object* x_1, lean_object* x_2, lean_object* x_3, uint8_t x_4, uint8_t x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -lean_object* x_8; -x_8 = l_Lean_Server_Watchdog_findFileWorker(x_1, x_6, x_7); -if (lean_obj_tag(x_8) == 0) -{ -lean_object* x_9; lean_object* x_10; -x_9 = lean_ctor_get(x_8, 0); -lean_inc(x_9); -x_10 = lean_ctor_get(x_9, 3); -lean_inc(x_10); -if (lean_obj_tag(x_10) == 0) -{ -lean_dec(x_3); -if (x_4 == 0) -{ -lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; -lean_dec(x_2); -x_11 = lean_ctor_get(x_8, 1); -lean_inc(x_11); -lean_dec(x_8); -x_12 = lean_ctor_get(x_10, 0); -lean_inc(x_12); -lean_dec(x_10); -x_13 = lean_box(0); -x_14 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12___lambda__2(x_5, x_1, x_9, x_12, x_13, x_6, x_11); -lean_dec(x_12); -return x_14; -} -else -{ -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; -x_15 = lean_ctor_get(x_8, 1); -lean_inc(x_15); -lean_dec(x_8); -x_16 = lean_ctor_get(x_10, 0); -lean_inc(x_16); -lean_dec(x_10); -x_17 = lean_ctor_get(x_2, 0); -lean_inc(x_17); -x_18 = lean_ctor_get(x_2, 1); -lean_inc(x_18); -x_19 = lean_ctor_get(x_2, 2); -lean_inc(x_19); -lean_dec(x_2); -x_20 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__11(x_19); -x_21 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_21, 0, x_17); -lean_ctor_set(x_21, 1, x_18); -lean_ctor_set(x_21, 2, x_20); -x_22 = lean_array_push(x_16, x_21); -x_23 = lean_box(0); -x_24 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12___lambda__2(x_5, x_1, x_9, x_22, x_23, x_6, x_15); -lean_dec(x_22); -return x_24; -} -} -else -{ -if (x_4 == 0) -{ -lean_object* x_25; lean_object* x_26; -x_25 = lean_ctor_get(x_8, 1); -lean_inc(x_25); -lean_dec(x_8); -x_26 = lean_apply_3(x_3, x_9, x_2, x_25); -if (lean_obj_tag(x_26) == 0) -{ -lean_dec(x_6); -return x_26; -} -else -{ -lean_object* x_27; lean_object* x_28; lean_object* x_29; -x_27 = lean_ctor_get(x_26, 1); -lean_inc(x_27); -lean_dec(x_26); -x_28 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12___closed__2; -x_29 = l_Lean_Server_Watchdog_handleCrash(x_1, x_28, x_6, x_27); -lean_dec(x_6); -return x_29; -} -} -else -{ -lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; -x_30 = lean_ctor_get(x_8, 1); -lean_inc(x_30); -lean_dec(x_8); -x_31 = l_Lean_mkOptionalNode___closed__2; -lean_inc(x_2); -x_32 = lean_array_push(x_31, x_2); -x_33 = lean_apply_3(x_3, x_9, x_2, x_30); -if (lean_obj_tag(x_33) == 0) -{ -lean_dec(x_32); -lean_dec(x_6); -return x_33; -} -else -{ -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_34 = lean_ctor_get(x_33, 1); -lean_inc(x_34); -lean_dec(x_33); -x_35 = lean_array_get_size(x_32); -x_36 = lean_usize_of_nat(x_35); -lean_dec(x_35); -x_37 = 0; -x_38 = x_32; -x_39 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__14(x_36, x_37, x_38); -x_40 = x_39; -x_41 = l_Lean_Server_Watchdog_handleCrash(x_1, x_40, x_6, x_34); -lean_dec(x_6); -return x_41; -} -} -} -} -else -{ -uint8_t x_42; -lean_dec(x_6); -lean_dec(x_3); -lean_dec(x_2); -x_42 = !lean_is_exclusive(x_8); -if (x_42 == 0) -{ -return x_8; -} -else -{ -lean_object* x_43; lean_object* x_44; lean_object* x_45; -x_43 = lean_ctor_get(x_8, 0); -x_44 = lean_ctor_get(x_8, 1); -lean_inc(x_44); -lean_inc(x_43); -lean_dec(x_8); -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_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__15(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__6(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; @@ -13042,602 +10655,7 @@ return x_12; } } } -lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__18(lean_object* x_1) { -_start: -{ -lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; -x_2 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonSemanticTokensRangeParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_1527_(x_1); -x_3 = lean_ctor_get(x_2, 0); -lean_inc(x_3); -lean_dec(x_2); -x_4 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_4, 0, x_3); -x_5 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_5, 0, x_4); -return x_5; -} -} -lean_object* l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_handleRequest___spec__17(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; -x_4 = lean_ctor_get(x_2, 0); -lean_inc(x_4); -x_5 = lean_ctor_get(x_2, 1); -lean_inc(x_5); -x_6 = lean_ctor_get(x_2, 2); -lean_inc(x_6); -lean_dec(x_2); -x_7 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__18(x_6); -x_8 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_8, 0, x_4); -lean_ctor_set(x_8, 1, x_5); -lean_ctor_set(x_8, 2, x_7); -x_9 = l_IO_FS_Stream_writeLspMessage(x_1, x_8, x_3); -lean_dec(x_8); -return x_9; -} -} -lean_object* l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__16(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; lean_object* x_5; -lean_inc(x_1); -x_4 = l_Lean_Server_Watchdog_FileWorker_stdin(x_1); -lean_inc(x_2); -x_5 = l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_handleRequest___spec__17(x_4, x_2, x_3); -if (lean_obj_tag(x_5) == 0) -{ -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; uint8_t x_18; -x_6 = lean_ctor_get(x_5, 1); -lean_inc(x_6); -lean_dec(x_5); -x_7 = lean_ctor_get(x_1, 4); -lean_inc(x_7); -lean_dec(x_1); -x_8 = lean_st_ref_take(x_7, x_6); -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_2, 0); -lean_inc(x_11); -x_12 = lean_ctor_get(x_2, 1); -lean_inc(x_12); -x_13 = lean_ctor_get(x_2, 2); -lean_inc(x_13); -lean_dec(x_2); -x_14 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__18(x_13); -lean_inc(x_11); -x_15 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_15, 0, x_11); -lean_ctor_set(x_15, 1, x_12); -lean_ctor_set(x_15, 2, x_14); -x_16 = l_Std_RBNode_insert___at_Lean_Server_Watchdog_FileWorker_writeRequest___spec__1(x_9, x_11, x_15); -x_17 = lean_st_ref_set(x_7, x_16, x_10); -lean_dec(x_7); -x_18 = !lean_is_exclusive(x_17); -if (x_18 == 0) -{ -return x_17; -} -else -{ -lean_object* x_19; lean_object* x_20; lean_object* x_21; -x_19 = lean_ctor_get(x_17, 0); -x_20 = lean_ctor_get(x_17, 1); -lean_inc(x_20); -lean_inc(x_19); -lean_dec(x_17); -x_21 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_21, 0, x_19); -lean_ctor_set(x_21, 1, x_20); -return x_21; -} -} -else -{ -uint8_t x_22; -lean_dec(x_2); -lean_dec(x_1); -x_22 = !lean_is_exclusive(x_5); -if (x_22 == 0) -{ -return x_5; -} -else -{ -lean_object* x_23; lean_object* x_24; lean_object* x_25; -x_23 = lean_ctor_get(x_5, 0); -x_24 = lean_ctor_get(x_5, 1); -lean_inc(x_24); -lean_inc(x_23); -lean_dec(x_5); -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_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__20(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -uint8_t x_8; -x_8 = x_4 < x_3; -if (x_8 == 0) -{ -lean_object* x_9; -lean_dec(x_1); -x_9 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_9, 0, x_5); -lean_ctor_set(x_9, 1, x_7); -return x_9; -} -else -{ -lean_object* x_10; lean_object* x_11; -x_10 = lean_array_uget(x_2, x_4); -lean_inc(x_1); -x_11 = l_Lean_Server_Watchdog_FileWorker_writeMessage(x_1, x_10, x_7); -if (lean_obj_tag(x_11) == 0) -{ -lean_object* x_12; size_t x_13; size_t x_14; -lean_dec(x_10); -x_12 = lean_ctor_get(x_11, 1); -lean_inc(x_12); -lean_dec(x_11); -x_13 = 1; -x_14 = x_4 + x_13; -x_4 = x_14; -x_7 = x_12; -goto _start; -} -else -{ -lean_object* x_16; lean_object* x_17; size_t x_18; size_t x_19; -x_16 = lean_ctor_get(x_11, 1); -lean_inc(x_16); -lean_dec(x_11); -x_17 = lean_array_push(x_5, x_10); -x_18 = 1; -x_19 = x_4 + x_18; -x_4 = x_19; -x_5 = x_17; -x_7 = x_16; -goto _start; -} -} -} -} -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__21(size_t x_1, size_t x_2, lean_object* x_3) { -_start: -{ -uint8_t x_4; -x_4 = x_2 < x_1; -if (x_4 == 0) -{ -lean_object* x_5; -x_5 = x_3; -return x_5; -} -else -{ -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; size_t x_15; size_t x_16; lean_object* x_17; lean_object* x_18; -x_6 = lean_array_uget(x_3, x_2); -x_7 = lean_unsigned_to_nat(0u); -x_8 = lean_array_uset(x_3, x_2, x_7); -x_9 = x_6; -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_13 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__18(x_12); -x_14 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_14, 0, x_10); -lean_ctor_set(x_14, 1, x_11); -lean_ctor_set(x_14, 2, x_13); -x_15 = 1; -x_16 = x_2 + x_15; -x_17 = x_14; -x_18 = lean_array_uset(x_8, x_2, x_17); -x_2 = x_16; -x_3 = x_18; -goto _start; -} -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___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; lean_object* x_9; lean_object* x_10; lean_object* x_11; -x_7 = l_Lean_Server_Watchdog_eraseFileWorker(x_1, x_5, x_6); -x_8 = lean_ctor_get(x_7, 1); -lean_inc(x_8); -lean_dec(x_7); -x_9 = lean_ctor_get(x_2, 0); -lean_inc(x_9); -lean_dec(x_2); -x_10 = lean_ctor_get(x_9, 0); -lean_inc(x_10); -lean_dec(x_9); -lean_inc(x_5); -x_11 = l_Lean_Server_Watchdog_startFileWorker(x_10, x_5, x_8); -if (lean_obj_tag(x_11) == 0) -{ -lean_object* x_12; lean_object* x_13; -x_12 = lean_ctor_get(x_11, 1); -lean_inc(x_12); -lean_dec(x_11); -x_13 = l_Lean_Server_Watchdog_findFileWorker(x_1, x_5, x_12); -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; lean_object* x_20; uint8_t x_21; -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_3); -x_17 = lean_usize_of_nat(x_16); -lean_dec(x_16); -x_18 = 0; -x_19 = l_Array_empty___closed__1; -x_20 = l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__20(x_14, x_3, x_17, x_18, x_19, x_5, x_15); -x_21 = !lean_is_exclusive(x_20); -if (x_21 == 0) -{ -lean_object* x_22; lean_object* x_23; uint8_t x_24; -x_22 = lean_ctor_get(x_20, 0); -x_23 = lean_ctor_get(x_20, 1); -x_24 = l_Array_isEmpty___rarg(x_22); -if (x_24 == 0) -{ -uint8_t x_25; -x_25 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__1; -if (x_25 == 0) -{ -lean_object* x_26; -lean_dec(x_22); -lean_dec(x_5); -x_26 = lean_box(0); -lean_ctor_set(x_20, 0, x_26); -return x_20; -} -else -{ -lean_object* x_27; -lean_free_object(x_20); -x_27 = l_Lean_Server_Watchdog_handleCrash(x_1, x_22, x_5, x_23); -lean_dec(x_5); -return x_27; -} -} -else -{ -uint8_t x_28; -x_28 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__2; -if (x_28 == 0) -{ -lean_object* x_29; -lean_dec(x_22); -lean_dec(x_5); -x_29 = lean_box(0); -lean_ctor_set(x_20, 0, x_29); -return x_20; -} -else -{ -lean_object* x_30; -lean_free_object(x_20); -x_30 = l_Lean_Server_Watchdog_handleCrash(x_1, x_22, x_5, x_23); -lean_dec(x_5); -return x_30; -} -} -} -else -{ -lean_object* x_31; lean_object* x_32; uint8_t x_33; -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_20); -x_33 = l_Array_isEmpty___rarg(x_31); -if (x_33 == 0) -{ -uint8_t x_34; -x_34 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__1; -if (x_34 == 0) -{ -lean_object* x_35; lean_object* x_36; -lean_dec(x_31); -lean_dec(x_5); -x_35 = lean_box(0); -x_36 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_36, 0, x_35); -lean_ctor_set(x_36, 1, x_32); -return x_36; -} -else -{ -lean_object* x_37; -x_37 = l_Lean_Server_Watchdog_handleCrash(x_1, x_31, x_5, x_32); -lean_dec(x_5); -return x_37; -} -} -else -{ -uint8_t x_38; -x_38 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__2; -if (x_38 == 0) -{ -lean_object* x_39; lean_object* x_40; -lean_dec(x_31); -lean_dec(x_5); -x_39 = lean_box(0); -x_40 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_40, 0, x_39); -lean_ctor_set(x_40, 1, x_32); -return x_40; -} -else -{ -lean_object* x_41; -x_41 = l_Lean_Server_Watchdog_handleCrash(x_1, x_31, x_5, x_32); -lean_dec(x_5); -return x_41; -} -} -} -} -else -{ -uint8_t x_42; -lean_dec(x_5); -x_42 = !lean_is_exclusive(x_13); -if (x_42 == 0) -{ -return x_13; -} -else -{ -lean_object* x_43; lean_object* x_44; lean_object* x_45; -x_43 = lean_ctor_get(x_13, 0); -x_44 = lean_ctor_get(x_13, 1); -lean_inc(x_44); -lean_inc(x_43); -lean_dec(x_13); -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; -} -} -} -else -{ -uint8_t x_46; -lean_dec(x_5); -x_46 = !lean_is_exclusive(x_11); -if (x_46 == 0) -{ -return x_11; -} -else -{ -lean_object* x_47; lean_object* x_48; lean_object* x_49; -x_47 = lean_ctor_get(x_11, 0); -x_48 = lean_ctor_get(x_11, 1); -lean_inc(x_48); -lean_inc(x_47); -lean_dec(x_11); -x_49 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_49, 0, x_47); -lean_ctor_set(x_49, 1, x_48); -return x_49; -} -} -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___lambda__2(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -if (x_1 == 0) -{ -lean_object* x_8; lean_object* x_9; -lean_dec(x_6); -lean_dec(x_3); -x_8 = lean_box(0); -x_9 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_9, 0, x_8); -lean_ctor_set(x_9, 1, x_7); -return x_9; -} -else -{ -lean_object* x_10; lean_object* x_11; -x_10 = lean_box(0); -x_11 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___lambda__1(x_2, x_3, x_4, x_10, x_6, x_7); -return x_11; -} -} -} -static lean_object* _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___closed__1() { -_start: -{ -size_t x_1; size_t x_2; lean_object* x_3; lean_object* x_4; -x_1 = 0; -x_2 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__2; -x_3 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__3; -x_4 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__21(x_2, x_1, x_3); -return x_4; -} -} -static lean_object* _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___closed__1; -x_2 = x_1; -return x_2; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19(lean_object* x_1, lean_object* x_2, lean_object* x_3, uint8_t x_4, uint8_t x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -lean_object* x_8; -x_8 = l_Lean_Server_Watchdog_findFileWorker(x_1, x_6, x_7); -if (lean_obj_tag(x_8) == 0) -{ -lean_object* x_9; lean_object* x_10; -x_9 = lean_ctor_get(x_8, 0); -lean_inc(x_9); -x_10 = lean_ctor_get(x_9, 3); -lean_inc(x_10); -if (lean_obj_tag(x_10) == 0) -{ -lean_dec(x_3); -if (x_4 == 0) -{ -lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; -lean_dec(x_2); -x_11 = lean_ctor_get(x_8, 1); -lean_inc(x_11); -lean_dec(x_8); -x_12 = lean_ctor_get(x_10, 0); -lean_inc(x_12); -lean_dec(x_10); -x_13 = lean_box(0); -x_14 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___lambda__2(x_5, x_1, x_9, x_12, x_13, x_6, x_11); -lean_dec(x_12); -return x_14; -} -else -{ -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; -x_15 = lean_ctor_get(x_8, 1); -lean_inc(x_15); -lean_dec(x_8); -x_16 = lean_ctor_get(x_10, 0); -lean_inc(x_16); -lean_dec(x_10); -x_17 = lean_ctor_get(x_2, 0); -lean_inc(x_17); -x_18 = lean_ctor_get(x_2, 1); -lean_inc(x_18); -x_19 = lean_ctor_get(x_2, 2); -lean_inc(x_19); -lean_dec(x_2); -x_20 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__18(x_19); -x_21 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_21, 0, x_17); -lean_ctor_set(x_21, 1, x_18); -lean_ctor_set(x_21, 2, x_20); -x_22 = lean_array_push(x_16, x_21); -x_23 = lean_box(0); -x_24 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___lambda__2(x_5, x_1, x_9, x_22, x_23, x_6, x_15); -lean_dec(x_22); -return x_24; -} -} -else -{ -if (x_4 == 0) -{ -lean_object* x_25; lean_object* x_26; -x_25 = lean_ctor_get(x_8, 1); -lean_inc(x_25); -lean_dec(x_8); -x_26 = lean_apply_3(x_3, x_9, x_2, x_25); -if (lean_obj_tag(x_26) == 0) -{ -lean_dec(x_6); -return x_26; -} -else -{ -lean_object* x_27; lean_object* x_28; lean_object* x_29; -x_27 = lean_ctor_get(x_26, 1); -lean_inc(x_27); -lean_dec(x_26); -x_28 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___closed__2; -x_29 = l_Lean_Server_Watchdog_handleCrash(x_1, x_28, x_6, x_27); -lean_dec(x_6); -return x_29; -} -} -else -{ -lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; -x_30 = lean_ctor_get(x_8, 1); -lean_inc(x_30); -lean_dec(x_8); -x_31 = l_Lean_mkOptionalNode___closed__2; -lean_inc(x_2); -x_32 = lean_array_push(x_31, x_2); -x_33 = lean_apply_3(x_3, x_9, x_2, x_30); -if (lean_obj_tag(x_33) == 0) -{ -lean_dec(x_32); -lean_dec(x_6); -return x_33; -} -else -{ -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_34 = lean_ctor_get(x_33, 1); -lean_inc(x_34); -lean_dec(x_33); -x_35 = lean_array_get_size(x_32); -x_36 = lean_usize_of_nat(x_35); -lean_dec(x_35); -x_37 = 0; -x_38 = x_32; -x_39 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__21(x_36, x_37, x_38); -x_40 = x_39; -x_41 = l_Lean_Server_Watchdog_handleCrash(x_1, x_40, x_6, x_34); -lean_dec(x_6); -return x_41; -} -} -} -} -else -{ -uint8_t x_42; -lean_dec(x_6); -lean_dec(x_3); -lean_dec(x_2); -x_42 = !lean_is_exclusive(x_8); -if (x_42 == 0) -{ -return x_8; -} -else -{ -lean_object* x_43; lean_object* x_44; lean_object* x_45; -x_43 = lean_ctor_get(x_8, 0); -x_44 = lean_ctor_get(x_8, 1); -lean_inc(x_44); -lean_inc(x_43); -lean_dec(x_8); -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_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__22(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__7(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; @@ -13668,602 +10686,7 @@ return x_12; } } } -lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__25(lean_object* x_1) { -_start: -{ -lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; -x_2 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentSymbolParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_963_(x_1); -x_3 = lean_ctor_get(x_2, 0); -lean_inc(x_3); -lean_dec(x_2); -x_4 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_4, 0, x_3); -x_5 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_5, 0, x_4); -return x_5; -} -} -lean_object* l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_handleRequest___spec__24(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; -x_4 = lean_ctor_get(x_2, 0); -lean_inc(x_4); -x_5 = lean_ctor_get(x_2, 1); -lean_inc(x_5); -x_6 = lean_ctor_get(x_2, 2); -lean_inc(x_6); -lean_dec(x_2); -x_7 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__25(x_6); -x_8 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_8, 0, x_4); -lean_ctor_set(x_8, 1, x_5); -lean_ctor_set(x_8, 2, x_7); -x_9 = l_IO_FS_Stream_writeLspMessage(x_1, x_8, x_3); -lean_dec(x_8); -return x_9; -} -} -lean_object* l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__23(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; lean_object* x_5; -lean_inc(x_1); -x_4 = l_Lean_Server_Watchdog_FileWorker_stdin(x_1); -lean_inc(x_2); -x_5 = l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_handleRequest___spec__24(x_4, x_2, x_3); -if (lean_obj_tag(x_5) == 0) -{ -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; uint8_t x_18; -x_6 = lean_ctor_get(x_5, 1); -lean_inc(x_6); -lean_dec(x_5); -x_7 = lean_ctor_get(x_1, 4); -lean_inc(x_7); -lean_dec(x_1); -x_8 = lean_st_ref_take(x_7, x_6); -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_2, 0); -lean_inc(x_11); -x_12 = lean_ctor_get(x_2, 1); -lean_inc(x_12); -x_13 = lean_ctor_get(x_2, 2); -lean_inc(x_13); -lean_dec(x_2); -x_14 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__25(x_13); -lean_inc(x_11); -x_15 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_15, 0, x_11); -lean_ctor_set(x_15, 1, x_12); -lean_ctor_set(x_15, 2, x_14); -x_16 = l_Std_RBNode_insert___at_Lean_Server_Watchdog_FileWorker_writeRequest___spec__1(x_9, x_11, x_15); -x_17 = lean_st_ref_set(x_7, x_16, x_10); -lean_dec(x_7); -x_18 = !lean_is_exclusive(x_17); -if (x_18 == 0) -{ -return x_17; -} -else -{ -lean_object* x_19; lean_object* x_20; lean_object* x_21; -x_19 = lean_ctor_get(x_17, 0); -x_20 = lean_ctor_get(x_17, 1); -lean_inc(x_20); -lean_inc(x_19); -lean_dec(x_17); -x_21 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_21, 0, x_19); -lean_ctor_set(x_21, 1, x_20); -return x_21; -} -} -else -{ -uint8_t x_22; -lean_dec(x_2); -lean_dec(x_1); -x_22 = !lean_is_exclusive(x_5); -if (x_22 == 0) -{ -return x_5; -} -else -{ -lean_object* x_23; lean_object* x_24; lean_object* x_25; -x_23 = lean_ctor_get(x_5, 0); -x_24 = lean_ctor_get(x_5, 1); -lean_inc(x_24); -lean_inc(x_23); -lean_dec(x_5); -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_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__27(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -uint8_t x_8; -x_8 = x_4 < x_3; -if (x_8 == 0) -{ -lean_object* x_9; -lean_dec(x_1); -x_9 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_9, 0, x_5); -lean_ctor_set(x_9, 1, x_7); -return x_9; -} -else -{ -lean_object* x_10; lean_object* x_11; -x_10 = lean_array_uget(x_2, x_4); -lean_inc(x_1); -x_11 = l_Lean_Server_Watchdog_FileWorker_writeMessage(x_1, x_10, x_7); -if (lean_obj_tag(x_11) == 0) -{ -lean_object* x_12; size_t x_13; size_t x_14; -lean_dec(x_10); -x_12 = lean_ctor_get(x_11, 1); -lean_inc(x_12); -lean_dec(x_11); -x_13 = 1; -x_14 = x_4 + x_13; -x_4 = x_14; -x_7 = x_12; -goto _start; -} -else -{ -lean_object* x_16; lean_object* x_17; size_t x_18; size_t x_19; -x_16 = lean_ctor_get(x_11, 1); -lean_inc(x_16); -lean_dec(x_11); -x_17 = lean_array_push(x_5, x_10); -x_18 = 1; -x_19 = x_4 + x_18; -x_4 = x_19; -x_5 = x_17; -x_7 = x_16; -goto _start; -} -} -} -} -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__28(size_t x_1, size_t x_2, lean_object* x_3) { -_start: -{ -uint8_t x_4; -x_4 = x_2 < x_1; -if (x_4 == 0) -{ -lean_object* x_5; -x_5 = x_3; -return x_5; -} -else -{ -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; size_t x_15; size_t x_16; lean_object* x_17; lean_object* x_18; -x_6 = lean_array_uget(x_3, x_2); -x_7 = lean_unsigned_to_nat(0u); -x_8 = lean_array_uset(x_3, x_2, x_7); -x_9 = x_6; -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_13 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__25(x_12); -x_14 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_14, 0, x_10); -lean_ctor_set(x_14, 1, x_11); -lean_ctor_set(x_14, 2, x_13); -x_15 = 1; -x_16 = x_2 + x_15; -x_17 = x_14; -x_18 = lean_array_uset(x_8, x_2, x_17); -x_2 = x_16; -x_3 = x_18; -goto _start; -} -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___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; lean_object* x_9; lean_object* x_10; lean_object* x_11; -x_7 = l_Lean_Server_Watchdog_eraseFileWorker(x_1, x_5, x_6); -x_8 = lean_ctor_get(x_7, 1); -lean_inc(x_8); -lean_dec(x_7); -x_9 = lean_ctor_get(x_2, 0); -lean_inc(x_9); -lean_dec(x_2); -x_10 = lean_ctor_get(x_9, 0); -lean_inc(x_10); -lean_dec(x_9); -lean_inc(x_5); -x_11 = l_Lean_Server_Watchdog_startFileWorker(x_10, x_5, x_8); -if (lean_obj_tag(x_11) == 0) -{ -lean_object* x_12; lean_object* x_13; -x_12 = lean_ctor_get(x_11, 1); -lean_inc(x_12); -lean_dec(x_11); -x_13 = l_Lean_Server_Watchdog_findFileWorker(x_1, x_5, x_12); -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; lean_object* x_20; uint8_t x_21; -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_3); -x_17 = lean_usize_of_nat(x_16); -lean_dec(x_16); -x_18 = 0; -x_19 = l_Array_empty___closed__1; -x_20 = l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__27(x_14, x_3, x_17, x_18, x_19, x_5, x_15); -x_21 = !lean_is_exclusive(x_20); -if (x_21 == 0) -{ -lean_object* x_22; lean_object* x_23; uint8_t x_24; -x_22 = lean_ctor_get(x_20, 0); -x_23 = lean_ctor_get(x_20, 1); -x_24 = l_Array_isEmpty___rarg(x_22); -if (x_24 == 0) -{ -uint8_t x_25; -x_25 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__1; -if (x_25 == 0) -{ -lean_object* x_26; -lean_dec(x_22); -lean_dec(x_5); -x_26 = lean_box(0); -lean_ctor_set(x_20, 0, x_26); -return x_20; -} -else -{ -lean_object* x_27; -lean_free_object(x_20); -x_27 = l_Lean_Server_Watchdog_handleCrash(x_1, x_22, x_5, x_23); -lean_dec(x_5); -return x_27; -} -} -else -{ -uint8_t x_28; -x_28 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__2; -if (x_28 == 0) -{ -lean_object* x_29; -lean_dec(x_22); -lean_dec(x_5); -x_29 = lean_box(0); -lean_ctor_set(x_20, 0, x_29); -return x_20; -} -else -{ -lean_object* x_30; -lean_free_object(x_20); -x_30 = l_Lean_Server_Watchdog_handleCrash(x_1, x_22, x_5, x_23); -lean_dec(x_5); -return x_30; -} -} -} -else -{ -lean_object* x_31; lean_object* x_32; uint8_t x_33; -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_20); -x_33 = l_Array_isEmpty___rarg(x_31); -if (x_33 == 0) -{ -uint8_t x_34; -x_34 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__1; -if (x_34 == 0) -{ -lean_object* x_35; lean_object* x_36; -lean_dec(x_31); -lean_dec(x_5); -x_35 = lean_box(0); -x_36 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_36, 0, x_35); -lean_ctor_set(x_36, 1, x_32); -return x_36; -} -else -{ -lean_object* x_37; -x_37 = l_Lean_Server_Watchdog_handleCrash(x_1, x_31, x_5, x_32); -lean_dec(x_5); -return x_37; -} -} -else -{ -uint8_t x_38; -x_38 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__2; -if (x_38 == 0) -{ -lean_object* x_39; lean_object* x_40; -lean_dec(x_31); -lean_dec(x_5); -x_39 = lean_box(0); -x_40 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_40, 0, x_39); -lean_ctor_set(x_40, 1, x_32); -return x_40; -} -else -{ -lean_object* x_41; -x_41 = l_Lean_Server_Watchdog_handleCrash(x_1, x_31, x_5, x_32); -lean_dec(x_5); -return x_41; -} -} -} -} -else -{ -uint8_t x_42; -lean_dec(x_5); -x_42 = !lean_is_exclusive(x_13); -if (x_42 == 0) -{ -return x_13; -} -else -{ -lean_object* x_43; lean_object* x_44; lean_object* x_45; -x_43 = lean_ctor_get(x_13, 0); -x_44 = lean_ctor_get(x_13, 1); -lean_inc(x_44); -lean_inc(x_43); -lean_dec(x_13); -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; -} -} -} -else -{ -uint8_t x_46; -lean_dec(x_5); -x_46 = !lean_is_exclusive(x_11); -if (x_46 == 0) -{ -return x_11; -} -else -{ -lean_object* x_47; lean_object* x_48; lean_object* x_49; -x_47 = lean_ctor_get(x_11, 0); -x_48 = lean_ctor_get(x_11, 1); -lean_inc(x_48); -lean_inc(x_47); -lean_dec(x_11); -x_49 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_49, 0, x_47); -lean_ctor_set(x_49, 1, x_48); -return x_49; -} -} -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___lambda__2(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -if (x_1 == 0) -{ -lean_object* x_8; lean_object* x_9; -lean_dec(x_6); -lean_dec(x_3); -x_8 = lean_box(0); -x_9 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_9, 0, x_8); -lean_ctor_set(x_9, 1, x_7); -return x_9; -} -else -{ -lean_object* x_10; lean_object* x_11; -x_10 = lean_box(0); -x_11 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___lambda__1(x_2, x_3, x_4, x_10, x_6, x_7); -return x_11; -} -} -} -static lean_object* _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___closed__1() { -_start: -{ -size_t x_1; size_t x_2; lean_object* x_3; lean_object* x_4; -x_1 = 0; -x_2 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__2; -x_3 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__3; -x_4 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__28(x_2, x_1, x_3); -return x_4; -} -} -static lean_object* _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___closed__1; -x_2 = x_1; -return x_2; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26(lean_object* x_1, lean_object* x_2, lean_object* x_3, uint8_t x_4, uint8_t x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -lean_object* x_8; -x_8 = l_Lean_Server_Watchdog_findFileWorker(x_1, x_6, x_7); -if (lean_obj_tag(x_8) == 0) -{ -lean_object* x_9; lean_object* x_10; -x_9 = lean_ctor_get(x_8, 0); -lean_inc(x_9); -x_10 = lean_ctor_get(x_9, 3); -lean_inc(x_10); -if (lean_obj_tag(x_10) == 0) -{ -lean_dec(x_3); -if (x_4 == 0) -{ -lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; -lean_dec(x_2); -x_11 = lean_ctor_get(x_8, 1); -lean_inc(x_11); -lean_dec(x_8); -x_12 = lean_ctor_get(x_10, 0); -lean_inc(x_12); -lean_dec(x_10); -x_13 = lean_box(0); -x_14 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___lambda__2(x_5, x_1, x_9, x_12, x_13, x_6, x_11); -lean_dec(x_12); -return x_14; -} -else -{ -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; -x_15 = lean_ctor_get(x_8, 1); -lean_inc(x_15); -lean_dec(x_8); -x_16 = lean_ctor_get(x_10, 0); -lean_inc(x_16); -lean_dec(x_10); -x_17 = lean_ctor_get(x_2, 0); -lean_inc(x_17); -x_18 = lean_ctor_get(x_2, 1); -lean_inc(x_18); -x_19 = lean_ctor_get(x_2, 2); -lean_inc(x_19); -lean_dec(x_2); -x_20 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__25(x_19); -x_21 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_21, 0, x_17); -lean_ctor_set(x_21, 1, x_18); -lean_ctor_set(x_21, 2, x_20); -x_22 = lean_array_push(x_16, x_21); -x_23 = lean_box(0); -x_24 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___lambda__2(x_5, x_1, x_9, x_22, x_23, x_6, x_15); -lean_dec(x_22); -return x_24; -} -} -else -{ -if (x_4 == 0) -{ -lean_object* x_25; lean_object* x_26; -x_25 = lean_ctor_get(x_8, 1); -lean_inc(x_25); -lean_dec(x_8); -x_26 = lean_apply_3(x_3, x_9, x_2, x_25); -if (lean_obj_tag(x_26) == 0) -{ -lean_dec(x_6); -return x_26; -} -else -{ -lean_object* x_27; lean_object* x_28; lean_object* x_29; -x_27 = lean_ctor_get(x_26, 1); -lean_inc(x_27); -lean_dec(x_26); -x_28 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___closed__2; -x_29 = l_Lean_Server_Watchdog_handleCrash(x_1, x_28, x_6, x_27); -lean_dec(x_6); -return x_29; -} -} -else -{ -lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; -x_30 = lean_ctor_get(x_8, 1); -lean_inc(x_30); -lean_dec(x_8); -x_31 = l_Lean_mkOptionalNode___closed__2; -lean_inc(x_2); -x_32 = lean_array_push(x_31, x_2); -x_33 = lean_apply_3(x_3, x_9, x_2, x_30); -if (lean_obj_tag(x_33) == 0) -{ -lean_dec(x_32); -lean_dec(x_6); -return x_33; -} -else -{ -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_34 = lean_ctor_get(x_33, 1); -lean_inc(x_34); -lean_dec(x_33); -x_35 = lean_array_get_size(x_32); -x_36 = lean_usize_of_nat(x_35); -lean_dec(x_35); -x_37 = 0; -x_38 = x_32; -x_39 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__28(x_36, x_37, x_38); -x_40 = x_39; -x_41 = l_Lean_Server_Watchdog_handleCrash(x_1, x_40, x_6, x_34); -lean_dec(x_6); -return x_41; -} -} -} -} -else -{ -uint8_t x_42; -lean_dec(x_6); -lean_dec(x_3); -lean_dec(x_2); -x_42 = !lean_is_exclusive(x_8); -if (x_42 == 0) -{ -return x_8; -} -else -{ -lean_object* x_43; lean_object* x_44; lean_object* x_45; -x_43 = lean_ctor_get(x_8, 0); -x_44 = lean_ctor_get(x_8, 1); -lean_inc(x_44); -lean_inc(x_43); -lean_dec(x_8); -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_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__29(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__8(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; @@ -14294,602 +10717,7 @@ return x_12; } } } -lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__32(lean_object* x_1) { -_start: -{ -lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; -x_2 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDocumentHighlightParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_837_(x_1); -x_3 = lean_ctor_get(x_2, 0); -lean_inc(x_3); -lean_dec(x_2); -x_4 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_4, 0, x_3); -x_5 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_5, 0, x_4); -return x_5; -} -} -lean_object* l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_handleRequest___spec__31(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; -x_4 = lean_ctor_get(x_2, 0); -lean_inc(x_4); -x_5 = lean_ctor_get(x_2, 1); -lean_inc(x_5); -x_6 = lean_ctor_get(x_2, 2); -lean_inc(x_6); -lean_dec(x_2); -x_7 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__32(x_6); -x_8 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_8, 0, x_4); -lean_ctor_set(x_8, 1, x_5); -lean_ctor_set(x_8, 2, x_7); -x_9 = l_IO_FS_Stream_writeLspMessage(x_1, x_8, x_3); -lean_dec(x_8); -return x_9; -} -} -lean_object* l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__30(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; lean_object* x_5; -lean_inc(x_1); -x_4 = l_Lean_Server_Watchdog_FileWorker_stdin(x_1); -lean_inc(x_2); -x_5 = l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_handleRequest___spec__31(x_4, x_2, x_3); -if (lean_obj_tag(x_5) == 0) -{ -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; uint8_t x_18; -x_6 = lean_ctor_get(x_5, 1); -lean_inc(x_6); -lean_dec(x_5); -x_7 = lean_ctor_get(x_1, 4); -lean_inc(x_7); -lean_dec(x_1); -x_8 = lean_st_ref_take(x_7, x_6); -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_2, 0); -lean_inc(x_11); -x_12 = lean_ctor_get(x_2, 1); -lean_inc(x_12); -x_13 = lean_ctor_get(x_2, 2); -lean_inc(x_13); -lean_dec(x_2); -x_14 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__32(x_13); -lean_inc(x_11); -x_15 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_15, 0, x_11); -lean_ctor_set(x_15, 1, x_12); -lean_ctor_set(x_15, 2, x_14); -x_16 = l_Std_RBNode_insert___at_Lean_Server_Watchdog_FileWorker_writeRequest___spec__1(x_9, x_11, x_15); -x_17 = lean_st_ref_set(x_7, x_16, x_10); -lean_dec(x_7); -x_18 = !lean_is_exclusive(x_17); -if (x_18 == 0) -{ -return x_17; -} -else -{ -lean_object* x_19; lean_object* x_20; lean_object* x_21; -x_19 = lean_ctor_get(x_17, 0); -x_20 = lean_ctor_get(x_17, 1); -lean_inc(x_20); -lean_inc(x_19); -lean_dec(x_17); -x_21 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_21, 0, x_19); -lean_ctor_set(x_21, 1, x_20); -return x_21; -} -} -else -{ -uint8_t x_22; -lean_dec(x_2); -lean_dec(x_1); -x_22 = !lean_is_exclusive(x_5); -if (x_22 == 0) -{ -return x_5; -} -else -{ -lean_object* x_23; lean_object* x_24; lean_object* x_25; -x_23 = lean_ctor_get(x_5, 0); -x_24 = lean_ctor_get(x_5, 1); -lean_inc(x_24); -lean_inc(x_23); -lean_dec(x_5); -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_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__34(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -uint8_t x_8; -x_8 = x_4 < x_3; -if (x_8 == 0) -{ -lean_object* x_9; -lean_dec(x_1); -x_9 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_9, 0, x_5); -lean_ctor_set(x_9, 1, x_7); -return x_9; -} -else -{ -lean_object* x_10; lean_object* x_11; -x_10 = lean_array_uget(x_2, x_4); -lean_inc(x_1); -x_11 = l_Lean_Server_Watchdog_FileWorker_writeMessage(x_1, x_10, x_7); -if (lean_obj_tag(x_11) == 0) -{ -lean_object* x_12; size_t x_13; size_t x_14; -lean_dec(x_10); -x_12 = lean_ctor_get(x_11, 1); -lean_inc(x_12); -lean_dec(x_11); -x_13 = 1; -x_14 = x_4 + x_13; -x_4 = x_14; -x_7 = x_12; -goto _start; -} -else -{ -lean_object* x_16; lean_object* x_17; size_t x_18; size_t x_19; -x_16 = lean_ctor_get(x_11, 1); -lean_inc(x_16); -lean_dec(x_11); -x_17 = lean_array_push(x_5, x_10); -x_18 = 1; -x_19 = x_4 + x_18; -x_4 = x_19; -x_5 = x_17; -x_7 = x_16; -goto _start; -} -} -} -} -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__35(size_t x_1, size_t x_2, lean_object* x_3) { -_start: -{ -uint8_t x_4; -x_4 = x_2 < x_1; -if (x_4 == 0) -{ -lean_object* x_5; -x_5 = x_3; -return x_5; -} -else -{ -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; size_t x_15; size_t x_16; lean_object* x_17; lean_object* x_18; -x_6 = lean_array_uget(x_3, x_2); -x_7 = lean_unsigned_to_nat(0u); -x_8 = lean_array_uset(x_3, x_2, x_7); -x_9 = x_6; -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_13 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__32(x_12); -x_14 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_14, 0, x_10); -lean_ctor_set(x_14, 1, x_11); -lean_ctor_set(x_14, 2, x_13); -x_15 = 1; -x_16 = x_2 + x_15; -x_17 = x_14; -x_18 = lean_array_uset(x_8, x_2, x_17); -x_2 = x_16; -x_3 = x_18; -goto _start; -} -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___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; lean_object* x_9; lean_object* x_10; lean_object* x_11; -x_7 = l_Lean_Server_Watchdog_eraseFileWorker(x_1, x_5, x_6); -x_8 = lean_ctor_get(x_7, 1); -lean_inc(x_8); -lean_dec(x_7); -x_9 = lean_ctor_get(x_2, 0); -lean_inc(x_9); -lean_dec(x_2); -x_10 = lean_ctor_get(x_9, 0); -lean_inc(x_10); -lean_dec(x_9); -lean_inc(x_5); -x_11 = l_Lean_Server_Watchdog_startFileWorker(x_10, x_5, x_8); -if (lean_obj_tag(x_11) == 0) -{ -lean_object* x_12; lean_object* x_13; -x_12 = lean_ctor_get(x_11, 1); -lean_inc(x_12); -lean_dec(x_11); -x_13 = l_Lean_Server_Watchdog_findFileWorker(x_1, x_5, x_12); -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; lean_object* x_20; uint8_t x_21; -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_3); -x_17 = lean_usize_of_nat(x_16); -lean_dec(x_16); -x_18 = 0; -x_19 = l_Array_empty___closed__1; -x_20 = l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__34(x_14, x_3, x_17, x_18, x_19, x_5, x_15); -x_21 = !lean_is_exclusive(x_20); -if (x_21 == 0) -{ -lean_object* x_22; lean_object* x_23; uint8_t x_24; -x_22 = lean_ctor_get(x_20, 0); -x_23 = lean_ctor_get(x_20, 1); -x_24 = l_Array_isEmpty___rarg(x_22); -if (x_24 == 0) -{ -uint8_t x_25; -x_25 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__1; -if (x_25 == 0) -{ -lean_object* x_26; -lean_dec(x_22); -lean_dec(x_5); -x_26 = lean_box(0); -lean_ctor_set(x_20, 0, x_26); -return x_20; -} -else -{ -lean_object* x_27; -lean_free_object(x_20); -x_27 = l_Lean_Server_Watchdog_handleCrash(x_1, x_22, x_5, x_23); -lean_dec(x_5); -return x_27; -} -} -else -{ -uint8_t x_28; -x_28 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__2; -if (x_28 == 0) -{ -lean_object* x_29; -lean_dec(x_22); -lean_dec(x_5); -x_29 = lean_box(0); -lean_ctor_set(x_20, 0, x_29); -return x_20; -} -else -{ -lean_object* x_30; -lean_free_object(x_20); -x_30 = l_Lean_Server_Watchdog_handleCrash(x_1, x_22, x_5, x_23); -lean_dec(x_5); -return x_30; -} -} -} -else -{ -lean_object* x_31; lean_object* x_32; uint8_t x_33; -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_20); -x_33 = l_Array_isEmpty___rarg(x_31); -if (x_33 == 0) -{ -uint8_t x_34; -x_34 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__1; -if (x_34 == 0) -{ -lean_object* x_35; lean_object* x_36; -lean_dec(x_31); -lean_dec(x_5); -x_35 = lean_box(0); -x_36 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_36, 0, x_35); -lean_ctor_set(x_36, 1, x_32); -return x_36; -} -else -{ -lean_object* x_37; -x_37 = l_Lean_Server_Watchdog_handleCrash(x_1, x_31, x_5, x_32); -lean_dec(x_5); -return x_37; -} -} -else -{ -uint8_t x_38; -x_38 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__2; -if (x_38 == 0) -{ -lean_object* x_39; lean_object* x_40; -lean_dec(x_31); -lean_dec(x_5); -x_39 = lean_box(0); -x_40 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_40, 0, x_39); -lean_ctor_set(x_40, 1, x_32); -return x_40; -} -else -{ -lean_object* x_41; -x_41 = l_Lean_Server_Watchdog_handleCrash(x_1, x_31, x_5, x_32); -lean_dec(x_5); -return x_41; -} -} -} -} -else -{ -uint8_t x_42; -lean_dec(x_5); -x_42 = !lean_is_exclusive(x_13); -if (x_42 == 0) -{ -return x_13; -} -else -{ -lean_object* x_43; lean_object* x_44; lean_object* x_45; -x_43 = lean_ctor_get(x_13, 0); -x_44 = lean_ctor_get(x_13, 1); -lean_inc(x_44); -lean_inc(x_43); -lean_dec(x_13); -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; -} -} -} -else -{ -uint8_t x_46; -lean_dec(x_5); -x_46 = !lean_is_exclusive(x_11); -if (x_46 == 0) -{ -return x_11; -} -else -{ -lean_object* x_47; lean_object* x_48; lean_object* x_49; -x_47 = lean_ctor_get(x_11, 0); -x_48 = lean_ctor_get(x_11, 1); -lean_inc(x_48); -lean_inc(x_47); -lean_dec(x_11); -x_49 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_49, 0, x_47); -lean_ctor_set(x_49, 1, x_48); -return x_49; -} -} -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___lambda__2(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -if (x_1 == 0) -{ -lean_object* x_8; lean_object* x_9; -lean_dec(x_6); -lean_dec(x_3); -x_8 = lean_box(0); -x_9 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_9, 0, x_8); -lean_ctor_set(x_9, 1, x_7); -return x_9; -} -else -{ -lean_object* x_10; lean_object* x_11; -x_10 = lean_box(0); -x_11 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___lambda__1(x_2, x_3, x_4, x_10, x_6, x_7); -return x_11; -} -} -} -static lean_object* _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___closed__1() { -_start: -{ -size_t x_1; size_t x_2; lean_object* x_3; lean_object* x_4; -x_1 = 0; -x_2 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__2; -x_3 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__3; -x_4 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__35(x_2, x_1, x_3); -return x_4; -} -} -static lean_object* _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___closed__1; -x_2 = x_1; -return x_2; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33(lean_object* x_1, lean_object* x_2, lean_object* x_3, uint8_t x_4, uint8_t x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -lean_object* x_8; -x_8 = l_Lean_Server_Watchdog_findFileWorker(x_1, x_6, x_7); -if (lean_obj_tag(x_8) == 0) -{ -lean_object* x_9; lean_object* x_10; -x_9 = lean_ctor_get(x_8, 0); -lean_inc(x_9); -x_10 = lean_ctor_get(x_9, 3); -lean_inc(x_10); -if (lean_obj_tag(x_10) == 0) -{ -lean_dec(x_3); -if (x_4 == 0) -{ -lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; -lean_dec(x_2); -x_11 = lean_ctor_get(x_8, 1); -lean_inc(x_11); -lean_dec(x_8); -x_12 = lean_ctor_get(x_10, 0); -lean_inc(x_12); -lean_dec(x_10); -x_13 = lean_box(0); -x_14 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___lambda__2(x_5, x_1, x_9, x_12, x_13, x_6, x_11); -lean_dec(x_12); -return x_14; -} -else -{ -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; -x_15 = lean_ctor_get(x_8, 1); -lean_inc(x_15); -lean_dec(x_8); -x_16 = lean_ctor_get(x_10, 0); -lean_inc(x_16); -lean_dec(x_10); -x_17 = lean_ctor_get(x_2, 0); -lean_inc(x_17); -x_18 = lean_ctor_get(x_2, 1); -lean_inc(x_18); -x_19 = lean_ctor_get(x_2, 2); -lean_inc(x_19); -lean_dec(x_2); -x_20 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__32(x_19); -x_21 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_21, 0, x_17); -lean_ctor_set(x_21, 1, x_18); -lean_ctor_set(x_21, 2, x_20); -x_22 = lean_array_push(x_16, x_21); -x_23 = lean_box(0); -x_24 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___lambda__2(x_5, x_1, x_9, x_22, x_23, x_6, x_15); -lean_dec(x_22); -return x_24; -} -} -else -{ -if (x_4 == 0) -{ -lean_object* x_25; lean_object* x_26; -x_25 = lean_ctor_get(x_8, 1); -lean_inc(x_25); -lean_dec(x_8); -x_26 = lean_apply_3(x_3, x_9, x_2, x_25); -if (lean_obj_tag(x_26) == 0) -{ -lean_dec(x_6); -return x_26; -} -else -{ -lean_object* x_27; lean_object* x_28; lean_object* x_29; -x_27 = lean_ctor_get(x_26, 1); -lean_inc(x_27); -lean_dec(x_26); -x_28 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___closed__2; -x_29 = l_Lean_Server_Watchdog_handleCrash(x_1, x_28, x_6, x_27); -lean_dec(x_6); -return x_29; -} -} -else -{ -lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; -x_30 = lean_ctor_get(x_8, 1); -lean_inc(x_30); -lean_dec(x_8); -x_31 = l_Lean_mkOptionalNode___closed__2; -lean_inc(x_2); -x_32 = lean_array_push(x_31, x_2); -x_33 = lean_apply_3(x_3, x_9, x_2, x_30); -if (lean_obj_tag(x_33) == 0) -{ -lean_dec(x_32); -lean_dec(x_6); -return x_33; -} -else -{ -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_34 = lean_ctor_get(x_33, 1); -lean_inc(x_34); -lean_dec(x_33); -x_35 = lean_array_get_size(x_32); -x_36 = lean_usize_of_nat(x_35); -lean_dec(x_35); -x_37 = 0; -x_38 = x_32; -x_39 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__35(x_36, x_37, x_38); -x_40 = x_39; -x_41 = l_Lean_Server_Watchdog_handleCrash(x_1, x_40, x_6, x_34); -lean_dec(x_6); -return x_41; -} -} -} -} -else -{ -uint8_t x_42; -lean_dec(x_6); -lean_dec(x_3); -lean_dec(x_2); -x_42 = !lean_is_exclusive(x_8); -if (x_42 == 0) -{ -return x_8; -} -else -{ -lean_object* x_43; lean_object* x_44; lean_object* x_45; -x_43 = lean_ctor_get(x_8, 0); -x_44 = lean_ctor_get(x_8, 1); -lean_inc(x_44); -lean_inc(x_43); -lean_dec(x_8); -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_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__36(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__9(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; @@ -14920,602 +10748,7 @@ return x_12; } } } -lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__39(lean_object* x_1) { -_start: -{ -lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; -x_2 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonTypeDefinitionParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_755_(x_1); -x_3 = lean_ctor_get(x_2, 0); -lean_inc(x_3); -lean_dec(x_2); -x_4 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_4, 0, x_3); -x_5 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_5, 0, x_4); -return x_5; -} -} -lean_object* l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_handleRequest___spec__38(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; -x_4 = lean_ctor_get(x_2, 0); -lean_inc(x_4); -x_5 = lean_ctor_get(x_2, 1); -lean_inc(x_5); -x_6 = lean_ctor_get(x_2, 2); -lean_inc(x_6); -lean_dec(x_2); -x_7 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__39(x_6); -x_8 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_8, 0, x_4); -lean_ctor_set(x_8, 1, x_5); -lean_ctor_set(x_8, 2, x_7); -x_9 = l_IO_FS_Stream_writeLspMessage(x_1, x_8, x_3); -lean_dec(x_8); -return x_9; -} -} -lean_object* l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__37(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; lean_object* x_5; -lean_inc(x_1); -x_4 = l_Lean_Server_Watchdog_FileWorker_stdin(x_1); -lean_inc(x_2); -x_5 = l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_handleRequest___spec__38(x_4, x_2, x_3); -if (lean_obj_tag(x_5) == 0) -{ -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; uint8_t x_18; -x_6 = lean_ctor_get(x_5, 1); -lean_inc(x_6); -lean_dec(x_5); -x_7 = lean_ctor_get(x_1, 4); -lean_inc(x_7); -lean_dec(x_1); -x_8 = lean_st_ref_take(x_7, x_6); -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_2, 0); -lean_inc(x_11); -x_12 = lean_ctor_get(x_2, 1); -lean_inc(x_12); -x_13 = lean_ctor_get(x_2, 2); -lean_inc(x_13); -lean_dec(x_2); -x_14 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__39(x_13); -lean_inc(x_11); -x_15 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_15, 0, x_11); -lean_ctor_set(x_15, 1, x_12); -lean_ctor_set(x_15, 2, x_14); -x_16 = l_Std_RBNode_insert___at_Lean_Server_Watchdog_FileWorker_writeRequest___spec__1(x_9, x_11, x_15); -x_17 = lean_st_ref_set(x_7, x_16, x_10); -lean_dec(x_7); -x_18 = !lean_is_exclusive(x_17); -if (x_18 == 0) -{ -return x_17; -} -else -{ -lean_object* x_19; lean_object* x_20; lean_object* x_21; -x_19 = lean_ctor_get(x_17, 0); -x_20 = lean_ctor_get(x_17, 1); -lean_inc(x_20); -lean_inc(x_19); -lean_dec(x_17); -x_21 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_21, 0, x_19); -lean_ctor_set(x_21, 1, x_20); -return x_21; -} -} -else -{ -uint8_t x_22; -lean_dec(x_2); -lean_dec(x_1); -x_22 = !lean_is_exclusive(x_5); -if (x_22 == 0) -{ -return x_5; -} -else -{ -lean_object* x_23; lean_object* x_24; lean_object* x_25; -x_23 = lean_ctor_get(x_5, 0); -x_24 = lean_ctor_get(x_5, 1); -lean_inc(x_24); -lean_inc(x_23); -lean_dec(x_5); -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_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__41(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -uint8_t x_8; -x_8 = x_4 < x_3; -if (x_8 == 0) -{ -lean_object* x_9; -lean_dec(x_1); -x_9 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_9, 0, x_5); -lean_ctor_set(x_9, 1, x_7); -return x_9; -} -else -{ -lean_object* x_10; lean_object* x_11; -x_10 = lean_array_uget(x_2, x_4); -lean_inc(x_1); -x_11 = l_Lean_Server_Watchdog_FileWorker_writeMessage(x_1, x_10, x_7); -if (lean_obj_tag(x_11) == 0) -{ -lean_object* x_12; size_t x_13; size_t x_14; -lean_dec(x_10); -x_12 = lean_ctor_get(x_11, 1); -lean_inc(x_12); -lean_dec(x_11); -x_13 = 1; -x_14 = x_4 + x_13; -x_4 = x_14; -x_7 = x_12; -goto _start; -} -else -{ -lean_object* x_16; lean_object* x_17; size_t x_18; size_t x_19; -x_16 = lean_ctor_get(x_11, 1); -lean_inc(x_16); -lean_dec(x_11); -x_17 = lean_array_push(x_5, x_10); -x_18 = 1; -x_19 = x_4 + x_18; -x_4 = x_19; -x_5 = x_17; -x_7 = x_16; -goto _start; -} -} -} -} -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__42(size_t x_1, size_t x_2, lean_object* x_3) { -_start: -{ -uint8_t x_4; -x_4 = x_2 < x_1; -if (x_4 == 0) -{ -lean_object* x_5; -x_5 = x_3; -return x_5; -} -else -{ -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; size_t x_15; size_t x_16; lean_object* x_17; lean_object* x_18; -x_6 = lean_array_uget(x_3, x_2); -x_7 = lean_unsigned_to_nat(0u); -x_8 = lean_array_uset(x_3, x_2, x_7); -x_9 = x_6; -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_13 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__39(x_12); -x_14 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_14, 0, x_10); -lean_ctor_set(x_14, 1, x_11); -lean_ctor_set(x_14, 2, x_13); -x_15 = 1; -x_16 = x_2 + x_15; -x_17 = x_14; -x_18 = lean_array_uset(x_8, x_2, x_17); -x_2 = x_16; -x_3 = x_18; -goto _start; -} -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__40___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; lean_object* x_9; lean_object* x_10; lean_object* x_11; -x_7 = l_Lean_Server_Watchdog_eraseFileWorker(x_1, x_5, x_6); -x_8 = lean_ctor_get(x_7, 1); -lean_inc(x_8); -lean_dec(x_7); -x_9 = lean_ctor_get(x_2, 0); -lean_inc(x_9); -lean_dec(x_2); -x_10 = lean_ctor_get(x_9, 0); -lean_inc(x_10); -lean_dec(x_9); -lean_inc(x_5); -x_11 = l_Lean_Server_Watchdog_startFileWorker(x_10, x_5, x_8); -if (lean_obj_tag(x_11) == 0) -{ -lean_object* x_12; lean_object* x_13; -x_12 = lean_ctor_get(x_11, 1); -lean_inc(x_12); -lean_dec(x_11); -x_13 = l_Lean_Server_Watchdog_findFileWorker(x_1, x_5, x_12); -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; lean_object* x_20; uint8_t x_21; -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_3); -x_17 = lean_usize_of_nat(x_16); -lean_dec(x_16); -x_18 = 0; -x_19 = l_Array_empty___closed__1; -x_20 = l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__41(x_14, x_3, x_17, x_18, x_19, x_5, x_15); -x_21 = !lean_is_exclusive(x_20); -if (x_21 == 0) -{ -lean_object* x_22; lean_object* x_23; uint8_t x_24; -x_22 = lean_ctor_get(x_20, 0); -x_23 = lean_ctor_get(x_20, 1); -x_24 = l_Array_isEmpty___rarg(x_22); -if (x_24 == 0) -{ -uint8_t x_25; -x_25 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__1; -if (x_25 == 0) -{ -lean_object* x_26; -lean_dec(x_22); -lean_dec(x_5); -x_26 = lean_box(0); -lean_ctor_set(x_20, 0, x_26); -return x_20; -} -else -{ -lean_object* x_27; -lean_free_object(x_20); -x_27 = l_Lean_Server_Watchdog_handleCrash(x_1, x_22, x_5, x_23); -lean_dec(x_5); -return x_27; -} -} -else -{ -uint8_t x_28; -x_28 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__2; -if (x_28 == 0) -{ -lean_object* x_29; -lean_dec(x_22); -lean_dec(x_5); -x_29 = lean_box(0); -lean_ctor_set(x_20, 0, x_29); -return x_20; -} -else -{ -lean_object* x_30; -lean_free_object(x_20); -x_30 = l_Lean_Server_Watchdog_handleCrash(x_1, x_22, x_5, x_23); -lean_dec(x_5); -return x_30; -} -} -} -else -{ -lean_object* x_31; lean_object* x_32; uint8_t x_33; -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_20); -x_33 = l_Array_isEmpty___rarg(x_31); -if (x_33 == 0) -{ -uint8_t x_34; -x_34 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__1; -if (x_34 == 0) -{ -lean_object* x_35; lean_object* x_36; -lean_dec(x_31); -lean_dec(x_5); -x_35 = lean_box(0); -x_36 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_36, 0, x_35); -lean_ctor_set(x_36, 1, x_32); -return x_36; -} -else -{ -lean_object* x_37; -x_37 = l_Lean_Server_Watchdog_handleCrash(x_1, x_31, x_5, x_32); -lean_dec(x_5); -return x_37; -} -} -else -{ -uint8_t x_38; -x_38 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__2; -if (x_38 == 0) -{ -lean_object* x_39; lean_object* x_40; -lean_dec(x_31); -lean_dec(x_5); -x_39 = lean_box(0); -x_40 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_40, 0, x_39); -lean_ctor_set(x_40, 1, x_32); -return x_40; -} -else -{ -lean_object* x_41; -x_41 = l_Lean_Server_Watchdog_handleCrash(x_1, x_31, x_5, x_32); -lean_dec(x_5); -return x_41; -} -} -} -} -else -{ -uint8_t x_42; -lean_dec(x_5); -x_42 = !lean_is_exclusive(x_13); -if (x_42 == 0) -{ -return x_13; -} -else -{ -lean_object* x_43; lean_object* x_44; lean_object* x_45; -x_43 = lean_ctor_get(x_13, 0); -x_44 = lean_ctor_get(x_13, 1); -lean_inc(x_44); -lean_inc(x_43); -lean_dec(x_13); -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; -} -} -} -else -{ -uint8_t x_46; -lean_dec(x_5); -x_46 = !lean_is_exclusive(x_11); -if (x_46 == 0) -{ -return x_11; -} -else -{ -lean_object* x_47; lean_object* x_48; lean_object* x_49; -x_47 = lean_ctor_get(x_11, 0); -x_48 = lean_ctor_get(x_11, 1); -lean_inc(x_48); -lean_inc(x_47); -lean_dec(x_11); -x_49 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_49, 0, x_47); -lean_ctor_set(x_49, 1, x_48); -return x_49; -} -} -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__40___lambda__2(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -if (x_1 == 0) -{ -lean_object* x_8; lean_object* x_9; -lean_dec(x_6); -lean_dec(x_3); -x_8 = lean_box(0); -x_9 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_9, 0, x_8); -lean_ctor_set(x_9, 1, x_7); -return x_9; -} -else -{ -lean_object* x_10; lean_object* x_11; -x_10 = lean_box(0); -x_11 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__40___lambda__1(x_2, x_3, x_4, x_10, x_6, x_7); -return x_11; -} -} -} -static lean_object* _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__40___closed__1() { -_start: -{ -size_t x_1; size_t x_2; lean_object* x_3; lean_object* x_4; -x_1 = 0; -x_2 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__2; -x_3 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__3; -x_4 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__42(x_2, x_1, x_3); -return x_4; -} -} -static lean_object* _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__40___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__40___closed__1; -x_2 = x_1; -return x_2; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__40(lean_object* x_1, lean_object* x_2, lean_object* x_3, uint8_t x_4, uint8_t x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -lean_object* x_8; -x_8 = l_Lean_Server_Watchdog_findFileWorker(x_1, x_6, x_7); -if (lean_obj_tag(x_8) == 0) -{ -lean_object* x_9; lean_object* x_10; -x_9 = lean_ctor_get(x_8, 0); -lean_inc(x_9); -x_10 = lean_ctor_get(x_9, 3); -lean_inc(x_10); -if (lean_obj_tag(x_10) == 0) -{ -lean_dec(x_3); -if (x_4 == 0) -{ -lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; -lean_dec(x_2); -x_11 = lean_ctor_get(x_8, 1); -lean_inc(x_11); -lean_dec(x_8); -x_12 = lean_ctor_get(x_10, 0); -lean_inc(x_12); -lean_dec(x_10); -x_13 = lean_box(0); -x_14 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__40___lambda__2(x_5, x_1, x_9, x_12, x_13, x_6, x_11); -lean_dec(x_12); -return x_14; -} -else -{ -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; -x_15 = lean_ctor_get(x_8, 1); -lean_inc(x_15); -lean_dec(x_8); -x_16 = lean_ctor_get(x_10, 0); -lean_inc(x_16); -lean_dec(x_10); -x_17 = lean_ctor_get(x_2, 0); -lean_inc(x_17); -x_18 = lean_ctor_get(x_2, 1); -lean_inc(x_18); -x_19 = lean_ctor_get(x_2, 2); -lean_inc(x_19); -lean_dec(x_2); -x_20 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__39(x_19); -x_21 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_21, 0, x_17); -lean_ctor_set(x_21, 1, x_18); -lean_ctor_set(x_21, 2, x_20); -x_22 = lean_array_push(x_16, x_21); -x_23 = lean_box(0); -x_24 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__40___lambda__2(x_5, x_1, x_9, x_22, x_23, x_6, x_15); -lean_dec(x_22); -return x_24; -} -} -else -{ -if (x_4 == 0) -{ -lean_object* x_25; lean_object* x_26; -x_25 = lean_ctor_get(x_8, 1); -lean_inc(x_25); -lean_dec(x_8); -x_26 = lean_apply_3(x_3, x_9, x_2, x_25); -if (lean_obj_tag(x_26) == 0) -{ -lean_dec(x_6); -return x_26; -} -else -{ -lean_object* x_27; lean_object* x_28; lean_object* x_29; -x_27 = lean_ctor_get(x_26, 1); -lean_inc(x_27); -lean_dec(x_26); -x_28 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__40___closed__2; -x_29 = l_Lean_Server_Watchdog_handleCrash(x_1, x_28, x_6, x_27); -lean_dec(x_6); -return x_29; -} -} -else -{ -lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; -x_30 = lean_ctor_get(x_8, 1); -lean_inc(x_30); -lean_dec(x_8); -x_31 = l_Lean_mkOptionalNode___closed__2; -lean_inc(x_2); -x_32 = lean_array_push(x_31, x_2); -x_33 = lean_apply_3(x_3, x_9, x_2, x_30); -if (lean_obj_tag(x_33) == 0) -{ -lean_dec(x_32); -lean_dec(x_6); -return x_33; -} -else -{ -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_34 = lean_ctor_get(x_33, 1); -lean_inc(x_34); -lean_dec(x_33); -x_35 = lean_array_get_size(x_32); -x_36 = lean_usize_of_nat(x_35); -lean_dec(x_35); -x_37 = 0; -x_38 = x_32; -x_39 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__42(x_36, x_37, x_38); -x_40 = x_39; -x_41 = l_Lean_Server_Watchdog_handleCrash(x_1, x_40, x_6, x_34); -lean_dec(x_6); -return x_41; -} -} -} -} -else -{ -uint8_t x_42; -lean_dec(x_6); -lean_dec(x_3); -lean_dec(x_2); -x_42 = !lean_is_exclusive(x_8); -if (x_42 == 0) -{ -return x_8; -} -else -{ -lean_object* x_43; lean_object* x_44; lean_object* x_45; -x_43 = lean_ctor_get(x_8, 0); -x_44 = lean_ctor_get(x_8, 1); -lean_inc(x_44); -lean_inc(x_43); -lean_dec(x_8); -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_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__43(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__10(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; @@ -15546,602 +10779,7 @@ return x_12; } } } -lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__46(lean_object* x_1) { -_start: -{ -lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; -x_2 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDefinitionParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_673_(x_1); -x_3 = lean_ctor_get(x_2, 0); -lean_inc(x_3); -lean_dec(x_2); -x_4 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_4, 0, x_3); -x_5 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_5, 0, x_4); -return x_5; -} -} -lean_object* l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_handleRequest___spec__45(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; -x_4 = lean_ctor_get(x_2, 0); -lean_inc(x_4); -x_5 = lean_ctor_get(x_2, 1); -lean_inc(x_5); -x_6 = lean_ctor_get(x_2, 2); -lean_inc(x_6); -lean_dec(x_2); -x_7 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__46(x_6); -x_8 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_8, 0, x_4); -lean_ctor_set(x_8, 1, x_5); -lean_ctor_set(x_8, 2, x_7); -x_9 = l_IO_FS_Stream_writeLspMessage(x_1, x_8, x_3); -lean_dec(x_8); -return x_9; -} -} -lean_object* l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__44(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; lean_object* x_5; -lean_inc(x_1); -x_4 = l_Lean_Server_Watchdog_FileWorker_stdin(x_1); -lean_inc(x_2); -x_5 = l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_handleRequest___spec__45(x_4, x_2, x_3); -if (lean_obj_tag(x_5) == 0) -{ -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; uint8_t x_18; -x_6 = lean_ctor_get(x_5, 1); -lean_inc(x_6); -lean_dec(x_5); -x_7 = lean_ctor_get(x_1, 4); -lean_inc(x_7); -lean_dec(x_1); -x_8 = lean_st_ref_take(x_7, x_6); -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_2, 0); -lean_inc(x_11); -x_12 = lean_ctor_get(x_2, 1); -lean_inc(x_12); -x_13 = lean_ctor_get(x_2, 2); -lean_inc(x_13); -lean_dec(x_2); -x_14 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__46(x_13); -lean_inc(x_11); -x_15 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_15, 0, x_11); -lean_ctor_set(x_15, 1, x_12); -lean_ctor_set(x_15, 2, x_14); -x_16 = l_Std_RBNode_insert___at_Lean_Server_Watchdog_FileWorker_writeRequest___spec__1(x_9, x_11, x_15); -x_17 = lean_st_ref_set(x_7, x_16, x_10); -lean_dec(x_7); -x_18 = !lean_is_exclusive(x_17); -if (x_18 == 0) -{ -return x_17; -} -else -{ -lean_object* x_19; lean_object* x_20; lean_object* x_21; -x_19 = lean_ctor_get(x_17, 0); -x_20 = lean_ctor_get(x_17, 1); -lean_inc(x_20); -lean_inc(x_19); -lean_dec(x_17); -x_21 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_21, 0, x_19); -lean_ctor_set(x_21, 1, x_20); -return x_21; -} -} -else -{ -uint8_t x_22; -lean_dec(x_2); -lean_dec(x_1); -x_22 = !lean_is_exclusive(x_5); -if (x_22 == 0) -{ -return x_5; -} -else -{ -lean_object* x_23; lean_object* x_24; lean_object* x_25; -x_23 = lean_ctor_get(x_5, 0); -x_24 = lean_ctor_get(x_5, 1); -lean_inc(x_24); -lean_inc(x_23); -lean_dec(x_5); -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_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__48(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -uint8_t x_8; -x_8 = x_4 < x_3; -if (x_8 == 0) -{ -lean_object* x_9; -lean_dec(x_1); -x_9 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_9, 0, x_5); -lean_ctor_set(x_9, 1, x_7); -return x_9; -} -else -{ -lean_object* x_10; lean_object* x_11; -x_10 = lean_array_uget(x_2, x_4); -lean_inc(x_1); -x_11 = l_Lean_Server_Watchdog_FileWorker_writeMessage(x_1, x_10, x_7); -if (lean_obj_tag(x_11) == 0) -{ -lean_object* x_12; size_t x_13; size_t x_14; -lean_dec(x_10); -x_12 = lean_ctor_get(x_11, 1); -lean_inc(x_12); -lean_dec(x_11); -x_13 = 1; -x_14 = x_4 + x_13; -x_4 = x_14; -x_7 = x_12; -goto _start; -} -else -{ -lean_object* x_16; lean_object* x_17; size_t x_18; size_t x_19; -x_16 = lean_ctor_get(x_11, 1); -lean_inc(x_16); -lean_dec(x_11); -x_17 = lean_array_push(x_5, x_10); -x_18 = 1; -x_19 = x_4 + x_18; -x_4 = x_19; -x_5 = x_17; -x_7 = x_16; -goto _start; -} -} -} -} -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__49(size_t x_1, size_t x_2, lean_object* x_3) { -_start: -{ -uint8_t x_4; -x_4 = x_2 < x_1; -if (x_4 == 0) -{ -lean_object* x_5; -x_5 = x_3; -return x_5; -} -else -{ -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; size_t x_15; size_t x_16; lean_object* x_17; lean_object* x_18; -x_6 = lean_array_uget(x_3, x_2); -x_7 = lean_unsigned_to_nat(0u); -x_8 = lean_array_uset(x_3, x_2, x_7); -x_9 = x_6; -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_13 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__46(x_12); -x_14 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_14, 0, x_10); -lean_ctor_set(x_14, 1, x_11); -lean_ctor_set(x_14, 2, x_13); -x_15 = 1; -x_16 = x_2 + x_15; -x_17 = x_14; -x_18 = lean_array_uset(x_8, x_2, x_17); -x_2 = x_16; -x_3 = x_18; -goto _start; -} -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__47___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; lean_object* x_9; lean_object* x_10; lean_object* x_11; -x_7 = l_Lean_Server_Watchdog_eraseFileWorker(x_1, x_5, x_6); -x_8 = lean_ctor_get(x_7, 1); -lean_inc(x_8); -lean_dec(x_7); -x_9 = lean_ctor_get(x_2, 0); -lean_inc(x_9); -lean_dec(x_2); -x_10 = lean_ctor_get(x_9, 0); -lean_inc(x_10); -lean_dec(x_9); -lean_inc(x_5); -x_11 = l_Lean_Server_Watchdog_startFileWorker(x_10, x_5, x_8); -if (lean_obj_tag(x_11) == 0) -{ -lean_object* x_12; lean_object* x_13; -x_12 = lean_ctor_get(x_11, 1); -lean_inc(x_12); -lean_dec(x_11); -x_13 = l_Lean_Server_Watchdog_findFileWorker(x_1, x_5, x_12); -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; lean_object* x_20; uint8_t x_21; -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_3); -x_17 = lean_usize_of_nat(x_16); -lean_dec(x_16); -x_18 = 0; -x_19 = l_Array_empty___closed__1; -x_20 = l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__48(x_14, x_3, x_17, x_18, x_19, x_5, x_15); -x_21 = !lean_is_exclusive(x_20); -if (x_21 == 0) -{ -lean_object* x_22; lean_object* x_23; uint8_t x_24; -x_22 = lean_ctor_get(x_20, 0); -x_23 = lean_ctor_get(x_20, 1); -x_24 = l_Array_isEmpty___rarg(x_22); -if (x_24 == 0) -{ -uint8_t x_25; -x_25 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__1; -if (x_25 == 0) -{ -lean_object* x_26; -lean_dec(x_22); -lean_dec(x_5); -x_26 = lean_box(0); -lean_ctor_set(x_20, 0, x_26); -return x_20; -} -else -{ -lean_object* x_27; -lean_free_object(x_20); -x_27 = l_Lean_Server_Watchdog_handleCrash(x_1, x_22, x_5, x_23); -lean_dec(x_5); -return x_27; -} -} -else -{ -uint8_t x_28; -x_28 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__2; -if (x_28 == 0) -{ -lean_object* x_29; -lean_dec(x_22); -lean_dec(x_5); -x_29 = lean_box(0); -lean_ctor_set(x_20, 0, x_29); -return x_20; -} -else -{ -lean_object* x_30; -lean_free_object(x_20); -x_30 = l_Lean_Server_Watchdog_handleCrash(x_1, x_22, x_5, x_23); -lean_dec(x_5); -return x_30; -} -} -} -else -{ -lean_object* x_31; lean_object* x_32; uint8_t x_33; -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_20); -x_33 = l_Array_isEmpty___rarg(x_31); -if (x_33 == 0) -{ -uint8_t x_34; -x_34 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__1; -if (x_34 == 0) -{ -lean_object* x_35; lean_object* x_36; -lean_dec(x_31); -lean_dec(x_5); -x_35 = lean_box(0); -x_36 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_36, 0, x_35); -lean_ctor_set(x_36, 1, x_32); -return x_36; -} -else -{ -lean_object* x_37; -x_37 = l_Lean_Server_Watchdog_handleCrash(x_1, x_31, x_5, x_32); -lean_dec(x_5); -return x_37; -} -} -else -{ -uint8_t x_38; -x_38 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__2; -if (x_38 == 0) -{ -lean_object* x_39; lean_object* x_40; -lean_dec(x_31); -lean_dec(x_5); -x_39 = lean_box(0); -x_40 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_40, 0, x_39); -lean_ctor_set(x_40, 1, x_32); -return x_40; -} -else -{ -lean_object* x_41; -x_41 = l_Lean_Server_Watchdog_handleCrash(x_1, x_31, x_5, x_32); -lean_dec(x_5); -return x_41; -} -} -} -} -else -{ -uint8_t x_42; -lean_dec(x_5); -x_42 = !lean_is_exclusive(x_13); -if (x_42 == 0) -{ -return x_13; -} -else -{ -lean_object* x_43; lean_object* x_44; lean_object* x_45; -x_43 = lean_ctor_get(x_13, 0); -x_44 = lean_ctor_get(x_13, 1); -lean_inc(x_44); -lean_inc(x_43); -lean_dec(x_13); -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; -} -} -} -else -{ -uint8_t x_46; -lean_dec(x_5); -x_46 = !lean_is_exclusive(x_11); -if (x_46 == 0) -{ -return x_11; -} -else -{ -lean_object* x_47; lean_object* x_48; lean_object* x_49; -x_47 = lean_ctor_get(x_11, 0); -x_48 = lean_ctor_get(x_11, 1); -lean_inc(x_48); -lean_inc(x_47); -lean_dec(x_11); -x_49 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_49, 0, x_47); -lean_ctor_set(x_49, 1, x_48); -return x_49; -} -} -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__47___lambda__2(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -if (x_1 == 0) -{ -lean_object* x_8; lean_object* x_9; -lean_dec(x_6); -lean_dec(x_3); -x_8 = lean_box(0); -x_9 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_9, 0, x_8); -lean_ctor_set(x_9, 1, x_7); -return x_9; -} -else -{ -lean_object* x_10; lean_object* x_11; -x_10 = lean_box(0); -x_11 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__47___lambda__1(x_2, x_3, x_4, x_10, x_6, x_7); -return x_11; -} -} -} -static lean_object* _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__47___closed__1() { -_start: -{ -size_t x_1; size_t x_2; lean_object* x_3; lean_object* x_4; -x_1 = 0; -x_2 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__2; -x_3 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__3; -x_4 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__49(x_2, x_1, x_3); -return x_4; -} -} -static lean_object* _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__47___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__47___closed__1; -x_2 = x_1; -return x_2; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__47(lean_object* x_1, lean_object* x_2, lean_object* x_3, uint8_t x_4, uint8_t x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -lean_object* x_8; -x_8 = l_Lean_Server_Watchdog_findFileWorker(x_1, x_6, x_7); -if (lean_obj_tag(x_8) == 0) -{ -lean_object* x_9; lean_object* x_10; -x_9 = lean_ctor_get(x_8, 0); -lean_inc(x_9); -x_10 = lean_ctor_get(x_9, 3); -lean_inc(x_10); -if (lean_obj_tag(x_10) == 0) -{ -lean_dec(x_3); -if (x_4 == 0) -{ -lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; -lean_dec(x_2); -x_11 = lean_ctor_get(x_8, 1); -lean_inc(x_11); -lean_dec(x_8); -x_12 = lean_ctor_get(x_10, 0); -lean_inc(x_12); -lean_dec(x_10); -x_13 = lean_box(0); -x_14 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__47___lambda__2(x_5, x_1, x_9, x_12, x_13, x_6, x_11); -lean_dec(x_12); -return x_14; -} -else -{ -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; -x_15 = lean_ctor_get(x_8, 1); -lean_inc(x_15); -lean_dec(x_8); -x_16 = lean_ctor_get(x_10, 0); -lean_inc(x_16); -lean_dec(x_10); -x_17 = lean_ctor_get(x_2, 0); -lean_inc(x_17); -x_18 = lean_ctor_get(x_2, 1); -lean_inc(x_18); -x_19 = lean_ctor_get(x_2, 2); -lean_inc(x_19); -lean_dec(x_2); -x_20 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__46(x_19); -x_21 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_21, 0, x_17); -lean_ctor_set(x_21, 1, x_18); -lean_ctor_set(x_21, 2, x_20); -x_22 = lean_array_push(x_16, x_21); -x_23 = lean_box(0); -x_24 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__47___lambda__2(x_5, x_1, x_9, x_22, x_23, x_6, x_15); -lean_dec(x_22); -return x_24; -} -} -else -{ -if (x_4 == 0) -{ -lean_object* x_25; lean_object* x_26; -x_25 = lean_ctor_get(x_8, 1); -lean_inc(x_25); -lean_dec(x_8); -x_26 = lean_apply_3(x_3, x_9, x_2, x_25); -if (lean_obj_tag(x_26) == 0) -{ -lean_dec(x_6); -return x_26; -} -else -{ -lean_object* x_27; lean_object* x_28; lean_object* x_29; -x_27 = lean_ctor_get(x_26, 1); -lean_inc(x_27); -lean_dec(x_26); -x_28 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__47___closed__2; -x_29 = l_Lean_Server_Watchdog_handleCrash(x_1, x_28, x_6, x_27); -lean_dec(x_6); -return x_29; -} -} -else -{ -lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; -x_30 = lean_ctor_get(x_8, 1); -lean_inc(x_30); -lean_dec(x_8); -x_31 = l_Lean_mkOptionalNode___closed__2; -lean_inc(x_2); -x_32 = lean_array_push(x_31, x_2); -x_33 = lean_apply_3(x_3, x_9, x_2, x_30); -if (lean_obj_tag(x_33) == 0) -{ -lean_dec(x_32); -lean_dec(x_6); -return x_33; -} -else -{ -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_34 = lean_ctor_get(x_33, 1); -lean_inc(x_34); -lean_dec(x_33); -x_35 = lean_array_get_size(x_32); -x_36 = lean_usize_of_nat(x_35); -lean_dec(x_35); -x_37 = 0; -x_38 = x_32; -x_39 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__49(x_36, x_37, x_38); -x_40 = x_39; -x_41 = l_Lean_Server_Watchdog_handleCrash(x_1, x_40, x_6, x_34); -lean_dec(x_6); -return x_41; -} -} -} -} -else -{ -uint8_t x_42; -lean_dec(x_6); -lean_dec(x_3); -lean_dec(x_2); -x_42 = !lean_is_exclusive(x_8); -if (x_42 == 0) -{ -return x_8; -} -else -{ -lean_object* x_43; lean_object* x_44; lean_object* x_45; -x_43 = lean_ctor_get(x_8, 0); -x_44 = lean_ctor_get(x_8, 1); -lean_inc(x_44); -lean_inc(x_43); -lean_dec(x_8); -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_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__50(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__11(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; @@ -16172,602 +10810,7 @@ return x_12; } } } -lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__53(lean_object* x_1) { -_start: -{ -lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; -x_2 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonDeclarationParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_591_(x_1); -x_3 = lean_ctor_get(x_2, 0); -lean_inc(x_3); -lean_dec(x_2); -x_4 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_4, 0, x_3); -x_5 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_5, 0, x_4); -return x_5; -} -} -lean_object* l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_handleRequest___spec__52(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; -x_4 = lean_ctor_get(x_2, 0); -lean_inc(x_4); -x_5 = lean_ctor_get(x_2, 1); -lean_inc(x_5); -x_6 = lean_ctor_get(x_2, 2); -lean_inc(x_6); -lean_dec(x_2); -x_7 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__53(x_6); -x_8 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_8, 0, x_4); -lean_ctor_set(x_8, 1, x_5); -lean_ctor_set(x_8, 2, x_7); -x_9 = l_IO_FS_Stream_writeLspMessage(x_1, x_8, x_3); -lean_dec(x_8); -return x_9; -} -} -lean_object* l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__51(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; lean_object* x_5; -lean_inc(x_1); -x_4 = l_Lean_Server_Watchdog_FileWorker_stdin(x_1); -lean_inc(x_2); -x_5 = l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_handleRequest___spec__52(x_4, x_2, x_3); -if (lean_obj_tag(x_5) == 0) -{ -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; uint8_t x_18; -x_6 = lean_ctor_get(x_5, 1); -lean_inc(x_6); -lean_dec(x_5); -x_7 = lean_ctor_get(x_1, 4); -lean_inc(x_7); -lean_dec(x_1); -x_8 = lean_st_ref_take(x_7, x_6); -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_2, 0); -lean_inc(x_11); -x_12 = lean_ctor_get(x_2, 1); -lean_inc(x_12); -x_13 = lean_ctor_get(x_2, 2); -lean_inc(x_13); -lean_dec(x_2); -x_14 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__53(x_13); -lean_inc(x_11); -x_15 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_15, 0, x_11); -lean_ctor_set(x_15, 1, x_12); -lean_ctor_set(x_15, 2, x_14); -x_16 = l_Std_RBNode_insert___at_Lean_Server_Watchdog_FileWorker_writeRequest___spec__1(x_9, x_11, x_15); -x_17 = lean_st_ref_set(x_7, x_16, x_10); -lean_dec(x_7); -x_18 = !lean_is_exclusive(x_17); -if (x_18 == 0) -{ -return x_17; -} -else -{ -lean_object* x_19; lean_object* x_20; lean_object* x_21; -x_19 = lean_ctor_get(x_17, 0); -x_20 = lean_ctor_get(x_17, 1); -lean_inc(x_20); -lean_inc(x_19); -lean_dec(x_17); -x_21 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_21, 0, x_19); -lean_ctor_set(x_21, 1, x_20); -return x_21; -} -} -else -{ -uint8_t x_22; -lean_dec(x_2); -lean_dec(x_1); -x_22 = !lean_is_exclusive(x_5); -if (x_22 == 0) -{ -return x_5; -} -else -{ -lean_object* x_23; lean_object* x_24; lean_object* x_25; -x_23 = lean_ctor_get(x_5, 0); -x_24 = lean_ctor_get(x_5, 1); -lean_inc(x_24); -lean_inc(x_23); -lean_dec(x_5); -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_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__55(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -uint8_t x_8; -x_8 = x_4 < x_3; -if (x_8 == 0) -{ -lean_object* x_9; -lean_dec(x_1); -x_9 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_9, 0, x_5); -lean_ctor_set(x_9, 1, x_7); -return x_9; -} -else -{ -lean_object* x_10; lean_object* x_11; -x_10 = lean_array_uget(x_2, x_4); -lean_inc(x_1); -x_11 = l_Lean_Server_Watchdog_FileWorker_writeMessage(x_1, x_10, x_7); -if (lean_obj_tag(x_11) == 0) -{ -lean_object* x_12; size_t x_13; size_t x_14; -lean_dec(x_10); -x_12 = lean_ctor_get(x_11, 1); -lean_inc(x_12); -lean_dec(x_11); -x_13 = 1; -x_14 = x_4 + x_13; -x_4 = x_14; -x_7 = x_12; -goto _start; -} -else -{ -lean_object* x_16; lean_object* x_17; size_t x_18; size_t x_19; -x_16 = lean_ctor_get(x_11, 1); -lean_inc(x_16); -lean_dec(x_11); -x_17 = lean_array_push(x_5, x_10); -x_18 = 1; -x_19 = x_4 + x_18; -x_4 = x_19; -x_5 = x_17; -x_7 = x_16; -goto _start; -} -} -} -} -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__56(size_t x_1, size_t x_2, lean_object* x_3) { -_start: -{ -uint8_t x_4; -x_4 = x_2 < x_1; -if (x_4 == 0) -{ -lean_object* x_5; -x_5 = x_3; -return x_5; -} -else -{ -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; size_t x_15; size_t x_16; lean_object* x_17; lean_object* x_18; -x_6 = lean_array_uget(x_3, x_2); -x_7 = lean_unsigned_to_nat(0u); -x_8 = lean_array_uset(x_3, x_2, x_7); -x_9 = x_6; -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_13 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__53(x_12); -x_14 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_14, 0, x_10); -lean_ctor_set(x_14, 1, x_11); -lean_ctor_set(x_14, 2, x_13); -x_15 = 1; -x_16 = x_2 + x_15; -x_17 = x_14; -x_18 = lean_array_uset(x_8, x_2, x_17); -x_2 = x_16; -x_3 = x_18; -goto _start; -} -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__54___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; lean_object* x_9; lean_object* x_10; lean_object* x_11; -x_7 = l_Lean_Server_Watchdog_eraseFileWorker(x_1, x_5, x_6); -x_8 = lean_ctor_get(x_7, 1); -lean_inc(x_8); -lean_dec(x_7); -x_9 = lean_ctor_get(x_2, 0); -lean_inc(x_9); -lean_dec(x_2); -x_10 = lean_ctor_get(x_9, 0); -lean_inc(x_10); -lean_dec(x_9); -lean_inc(x_5); -x_11 = l_Lean_Server_Watchdog_startFileWorker(x_10, x_5, x_8); -if (lean_obj_tag(x_11) == 0) -{ -lean_object* x_12; lean_object* x_13; -x_12 = lean_ctor_get(x_11, 1); -lean_inc(x_12); -lean_dec(x_11); -x_13 = l_Lean_Server_Watchdog_findFileWorker(x_1, x_5, x_12); -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; lean_object* x_20; uint8_t x_21; -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_3); -x_17 = lean_usize_of_nat(x_16); -lean_dec(x_16); -x_18 = 0; -x_19 = l_Array_empty___closed__1; -x_20 = l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__55(x_14, x_3, x_17, x_18, x_19, x_5, x_15); -x_21 = !lean_is_exclusive(x_20); -if (x_21 == 0) -{ -lean_object* x_22; lean_object* x_23; uint8_t x_24; -x_22 = lean_ctor_get(x_20, 0); -x_23 = lean_ctor_get(x_20, 1); -x_24 = l_Array_isEmpty___rarg(x_22); -if (x_24 == 0) -{ -uint8_t x_25; -x_25 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__1; -if (x_25 == 0) -{ -lean_object* x_26; -lean_dec(x_22); -lean_dec(x_5); -x_26 = lean_box(0); -lean_ctor_set(x_20, 0, x_26); -return x_20; -} -else -{ -lean_object* x_27; -lean_free_object(x_20); -x_27 = l_Lean_Server_Watchdog_handleCrash(x_1, x_22, x_5, x_23); -lean_dec(x_5); -return x_27; -} -} -else -{ -uint8_t x_28; -x_28 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__2; -if (x_28 == 0) -{ -lean_object* x_29; -lean_dec(x_22); -lean_dec(x_5); -x_29 = lean_box(0); -lean_ctor_set(x_20, 0, x_29); -return x_20; -} -else -{ -lean_object* x_30; -lean_free_object(x_20); -x_30 = l_Lean_Server_Watchdog_handleCrash(x_1, x_22, x_5, x_23); -lean_dec(x_5); -return x_30; -} -} -} -else -{ -lean_object* x_31; lean_object* x_32; uint8_t x_33; -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_20); -x_33 = l_Array_isEmpty___rarg(x_31); -if (x_33 == 0) -{ -uint8_t x_34; -x_34 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__1; -if (x_34 == 0) -{ -lean_object* x_35; lean_object* x_36; -lean_dec(x_31); -lean_dec(x_5); -x_35 = lean_box(0); -x_36 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_36, 0, x_35); -lean_ctor_set(x_36, 1, x_32); -return x_36; -} -else -{ -lean_object* x_37; -x_37 = l_Lean_Server_Watchdog_handleCrash(x_1, x_31, x_5, x_32); -lean_dec(x_5); -return x_37; -} -} -else -{ -uint8_t x_38; -x_38 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__2; -if (x_38 == 0) -{ -lean_object* x_39; lean_object* x_40; -lean_dec(x_31); -lean_dec(x_5); -x_39 = lean_box(0); -x_40 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_40, 0, x_39); -lean_ctor_set(x_40, 1, x_32); -return x_40; -} -else -{ -lean_object* x_41; -x_41 = l_Lean_Server_Watchdog_handleCrash(x_1, x_31, x_5, x_32); -lean_dec(x_5); -return x_41; -} -} -} -} -else -{ -uint8_t x_42; -lean_dec(x_5); -x_42 = !lean_is_exclusive(x_13); -if (x_42 == 0) -{ -return x_13; -} -else -{ -lean_object* x_43; lean_object* x_44; lean_object* x_45; -x_43 = lean_ctor_get(x_13, 0); -x_44 = lean_ctor_get(x_13, 1); -lean_inc(x_44); -lean_inc(x_43); -lean_dec(x_13); -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; -} -} -} -else -{ -uint8_t x_46; -lean_dec(x_5); -x_46 = !lean_is_exclusive(x_11); -if (x_46 == 0) -{ -return x_11; -} -else -{ -lean_object* x_47; lean_object* x_48; lean_object* x_49; -x_47 = lean_ctor_get(x_11, 0); -x_48 = lean_ctor_get(x_11, 1); -lean_inc(x_48); -lean_inc(x_47); -lean_dec(x_11); -x_49 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_49, 0, x_47); -lean_ctor_set(x_49, 1, x_48); -return x_49; -} -} -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__54___lambda__2(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -if (x_1 == 0) -{ -lean_object* x_8; lean_object* x_9; -lean_dec(x_6); -lean_dec(x_3); -x_8 = lean_box(0); -x_9 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_9, 0, x_8); -lean_ctor_set(x_9, 1, x_7); -return x_9; -} -else -{ -lean_object* x_10; lean_object* x_11; -x_10 = lean_box(0); -x_11 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__54___lambda__1(x_2, x_3, x_4, x_10, x_6, x_7); -return x_11; -} -} -} -static lean_object* _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__54___closed__1() { -_start: -{ -size_t x_1; size_t x_2; lean_object* x_3; lean_object* x_4; -x_1 = 0; -x_2 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__2; -x_3 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__3; -x_4 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__56(x_2, x_1, x_3); -return x_4; -} -} -static lean_object* _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__54___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__54___closed__1; -x_2 = x_1; -return x_2; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__54(lean_object* x_1, lean_object* x_2, lean_object* x_3, uint8_t x_4, uint8_t x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -lean_object* x_8; -x_8 = l_Lean_Server_Watchdog_findFileWorker(x_1, x_6, x_7); -if (lean_obj_tag(x_8) == 0) -{ -lean_object* x_9; lean_object* x_10; -x_9 = lean_ctor_get(x_8, 0); -lean_inc(x_9); -x_10 = lean_ctor_get(x_9, 3); -lean_inc(x_10); -if (lean_obj_tag(x_10) == 0) -{ -lean_dec(x_3); -if (x_4 == 0) -{ -lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; -lean_dec(x_2); -x_11 = lean_ctor_get(x_8, 1); -lean_inc(x_11); -lean_dec(x_8); -x_12 = lean_ctor_get(x_10, 0); -lean_inc(x_12); -lean_dec(x_10); -x_13 = lean_box(0); -x_14 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__54___lambda__2(x_5, x_1, x_9, x_12, x_13, x_6, x_11); -lean_dec(x_12); -return x_14; -} -else -{ -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; -x_15 = lean_ctor_get(x_8, 1); -lean_inc(x_15); -lean_dec(x_8); -x_16 = lean_ctor_get(x_10, 0); -lean_inc(x_16); -lean_dec(x_10); -x_17 = lean_ctor_get(x_2, 0); -lean_inc(x_17); -x_18 = lean_ctor_get(x_2, 1); -lean_inc(x_18); -x_19 = lean_ctor_get(x_2, 2); -lean_inc(x_19); -lean_dec(x_2); -x_20 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__53(x_19); -x_21 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_21, 0, x_17); -lean_ctor_set(x_21, 1, x_18); -lean_ctor_set(x_21, 2, x_20); -x_22 = lean_array_push(x_16, x_21); -x_23 = lean_box(0); -x_24 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__54___lambda__2(x_5, x_1, x_9, x_22, x_23, x_6, x_15); -lean_dec(x_22); -return x_24; -} -} -else -{ -if (x_4 == 0) -{ -lean_object* x_25; lean_object* x_26; -x_25 = lean_ctor_get(x_8, 1); -lean_inc(x_25); -lean_dec(x_8); -x_26 = lean_apply_3(x_3, x_9, x_2, x_25); -if (lean_obj_tag(x_26) == 0) -{ -lean_dec(x_6); -return x_26; -} -else -{ -lean_object* x_27; lean_object* x_28; lean_object* x_29; -x_27 = lean_ctor_get(x_26, 1); -lean_inc(x_27); -lean_dec(x_26); -x_28 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__54___closed__2; -x_29 = l_Lean_Server_Watchdog_handleCrash(x_1, x_28, x_6, x_27); -lean_dec(x_6); -return x_29; -} -} -else -{ -lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; -x_30 = lean_ctor_get(x_8, 1); -lean_inc(x_30); -lean_dec(x_8); -x_31 = l_Lean_mkOptionalNode___closed__2; -lean_inc(x_2); -x_32 = lean_array_push(x_31, x_2); -x_33 = lean_apply_3(x_3, x_9, x_2, x_30); -if (lean_obj_tag(x_33) == 0) -{ -lean_dec(x_32); -lean_dec(x_6); -return x_33; -} -else -{ -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_34 = lean_ctor_get(x_33, 1); -lean_inc(x_34); -lean_dec(x_33); -x_35 = lean_array_get_size(x_32); -x_36 = lean_usize_of_nat(x_35); -lean_dec(x_35); -x_37 = 0; -x_38 = x_32; -x_39 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__56(x_36, x_37, x_38); -x_40 = x_39; -x_41 = l_Lean_Server_Watchdog_handleCrash(x_1, x_40, x_6, x_34); -lean_dec(x_6); -return x_41; -} -} -} -} -else -{ -uint8_t x_42; -lean_dec(x_6); -lean_dec(x_3); -lean_dec(x_2); -x_42 = !lean_is_exclusive(x_8); -if (x_42 == 0) -{ -return x_8; -} -else -{ -lean_object* x_43; lean_object* x_44; lean_object* x_45; -x_43 = lean_ctor_get(x_8, 0); -x_44 = lean_ctor_get(x_8, 1); -lean_inc(x_44); -lean_inc(x_43); -lean_dec(x_8); -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_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__57(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__12(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; @@ -16798,602 +10841,7 @@ return x_12; } } } -lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__60(lean_object* x_1) { -_start: -{ -lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; -x_2 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonHoverParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_509_(x_1); -x_3 = lean_ctor_get(x_2, 0); -lean_inc(x_3); -lean_dec(x_2); -x_4 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_4, 0, x_3); -x_5 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_5, 0, x_4); -return x_5; -} -} -lean_object* l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_handleRequest___spec__59(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; -x_4 = lean_ctor_get(x_2, 0); -lean_inc(x_4); -x_5 = lean_ctor_get(x_2, 1); -lean_inc(x_5); -x_6 = lean_ctor_get(x_2, 2); -lean_inc(x_6); -lean_dec(x_2); -x_7 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__60(x_6); -x_8 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_8, 0, x_4); -lean_ctor_set(x_8, 1, x_5); -lean_ctor_set(x_8, 2, x_7); -x_9 = l_IO_FS_Stream_writeLspMessage(x_1, x_8, x_3); -lean_dec(x_8); -return x_9; -} -} -lean_object* l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__58(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; lean_object* x_5; -lean_inc(x_1); -x_4 = l_Lean_Server_Watchdog_FileWorker_stdin(x_1); -lean_inc(x_2); -x_5 = l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_handleRequest___spec__59(x_4, x_2, x_3); -if (lean_obj_tag(x_5) == 0) -{ -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; uint8_t x_18; -x_6 = lean_ctor_get(x_5, 1); -lean_inc(x_6); -lean_dec(x_5); -x_7 = lean_ctor_get(x_1, 4); -lean_inc(x_7); -lean_dec(x_1); -x_8 = lean_st_ref_take(x_7, x_6); -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_2, 0); -lean_inc(x_11); -x_12 = lean_ctor_get(x_2, 1); -lean_inc(x_12); -x_13 = lean_ctor_get(x_2, 2); -lean_inc(x_13); -lean_dec(x_2); -x_14 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__60(x_13); -lean_inc(x_11); -x_15 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_15, 0, x_11); -lean_ctor_set(x_15, 1, x_12); -lean_ctor_set(x_15, 2, x_14); -x_16 = l_Std_RBNode_insert___at_Lean_Server_Watchdog_FileWorker_writeRequest___spec__1(x_9, x_11, x_15); -x_17 = lean_st_ref_set(x_7, x_16, x_10); -lean_dec(x_7); -x_18 = !lean_is_exclusive(x_17); -if (x_18 == 0) -{ -return x_17; -} -else -{ -lean_object* x_19; lean_object* x_20; lean_object* x_21; -x_19 = lean_ctor_get(x_17, 0); -x_20 = lean_ctor_get(x_17, 1); -lean_inc(x_20); -lean_inc(x_19); -lean_dec(x_17); -x_21 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_21, 0, x_19); -lean_ctor_set(x_21, 1, x_20); -return x_21; -} -} -else -{ -uint8_t x_22; -lean_dec(x_2); -lean_dec(x_1); -x_22 = !lean_is_exclusive(x_5); -if (x_22 == 0) -{ -return x_5; -} -else -{ -lean_object* x_23; lean_object* x_24; lean_object* x_25; -x_23 = lean_ctor_get(x_5, 0); -x_24 = lean_ctor_get(x_5, 1); -lean_inc(x_24); -lean_inc(x_23); -lean_dec(x_5); -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_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__62(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -uint8_t x_8; -x_8 = x_4 < x_3; -if (x_8 == 0) -{ -lean_object* x_9; -lean_dec(x_1); -x_9 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_9, 0, x_5); -lean_ctor_set(x_9, 1, x_7); -return x_9; -} -else -{ -lean_object* x_10; lean_object* x_11; -x_10 = lean_array_uget(x_2, x_4); -lean_inc(x_1); -x_11 = l_Lean_Server_Watchdog_FileWorker_writeMessage(x_1, x_10, x_7); -if (lean_obj_tag(x_11) == 0) -{ -lean_object* x_12; size_t x_13; size_t x_14; -lean_dec(x_10); -x_12 = lean_ctor_get(x_11, 1); -lean_inc(x_12); -lean_dec(x_11); -x_13 = 1; -x_14 = x_4 + x_13; -x_4 = x_14; -x_7 = x_12; -goto _start; -} -else -{ -lean_object* x_16; lean_object* x_17; size_t x_18; size_t x_19; -x_16 = lean_ctor_get(x_11, 1); -lean_inc(x_16); -lean_dec(x_11); -x_17 = lean_array_push(x_5, x_10); -x_18 = 1; -x_19 = x_4 + x_18; -x_4 = x_19; -x_5 = x_17; -x_7 = x_16; -goto _start; -} -} -} -} -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__63(size_t x_1, size_t x_2, lean_object* x_3) { -_start: -{ -uint8_t x_4; -x_4 = x_2 < x_1; -if (x_4 == 0) -{ -lean_object* x_5; -x_5 = x_3; -return x_5; -} -else -{ -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; size_t x_15; size_t x_16; lean_object* x_17; lean_object* x_18; -x_6 = lean_array_uget(x_3, x_2); -x_7 = lean_unsigned_to_nat(0u); -x_8 = lean_array_uset(x_3, x_2, x_7); -x_9 = x_6; -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_13 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__60(x_12); -x_14 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_14, 0, x_10); -lean_ctor_set(x_14, 1, x_11); -lean_ctor_set(x_14, 2, x_13); -x_15 = 1; -x_16 = x_2 + x_15; -x_17 = x_14; -x_18 = lean_array_uset(x_8, x_2, x_17); -x_2 = x_16; -x_3 = x_18; -goto _start; -} -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__61___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; lean_object* x_9; lean_object* x_10; lean_object* x_11; -x_7 = l_Lean_Server_Watchdog_eraseFileWorker(x_1, x_5, x_6); -x_8 = lean_ctor_get(x_7, 1); -lean_inc(x_8); -lean_dec(x_7); -x_9 = lean_ctor_get(x_2, 0); -lean_inc(x_9); -lean_dec(x_2); -x_10 = lean_ctor_get(x_9, 0); -lean_inc(x_10); -lean_dec(x_9); -lean_inc(x_5); -x_11 = l_Lean_Server_Watchdog_startFileWorker(x_10, x_5, x_8); -if (lean_obj_tag(x_11) == 0) -{ -lean_object* x_12; lean_object* x_13; -x_12 = lean_ctor_get(x_11, 1); -lean_inc(x_12); -lean_dec(x_11); -x_13 = l_Lean_Server_Watchdog_findFileWorker(x_1, x_5, x_12); -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; lean_object* x_20; uint8_t x_21; -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_3); -x_17 = lean_usize_of_nat(x_16); -lean_dec(x_16); -x_18 = 0; -x_19 = l_Array_empty___closed__1; -x_20 = l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__62(x_14, x_3, x_17, x_18, x_19, x_5, x_15); -x_21 = !lean_is_exclusive(x_20); -if (x_21 == 0) -{ -lean_object* x_22; lean_object* x_23; uint8_t x_24; -x_22 = lean_ctor_get(x_20, 0); -x_23 = lean_ctor_get(x_20, 1); -x_24 = l_Array_isEmpty___rarg(x_22); -if (x_24 == 0) -{ -uint8_t x_25; -x_25 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__1; -if (x_25 == 0) -{ -lean_object* x_26; -lean_dec(x_22); -lean_dec(x_5); -x_26 = lean_box(0); -lean_ctor_set(x_20, 0, x_26); -return x_20; -} -else -{ -lean_object* x_27; -lean_free_object(x_20); -x_27 = l_Lean_Server_Watchdog_handleCrash(x_1, x_22, x_5, x_23); -lean_dec(x_5); -return x_27; -} -} -else -{ -uint8_t x_28; -x_28 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__2; -if (x_28 == 0) -{ -lean_object* x_29; -lean_dec(x_22); -lean_dec(x_5); -x_29 = lean_box(0); -lean_ctor_set(x_20, 0, x_29); -return x_20; -} -else -{ -lean_object* x_30; -lean_free_object(x_20); -x_30 = l_Lean_Server_Watchdog_handleCrash(x_1, x_22, x_5, x_23); -lean_dec(x_5); -return x_30; -} -} -} -else -{ -lean_object* x_31; lean_object* x_32; uint8_t x_33; -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_20); -x_33 = l_Array_isEmpty___rarg(x_31); -if (x_33 == 0) -{ -uint8_t x_34; -x_34 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__1; -if (x_34 == 0) -{ -lean_object* x_35; lean_object* x_36; -lean_dec(x_31); -lean_dec(x_5); -x_35 = lean_box(0); -x_36 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_36, 0, x_35); -lean_ctor_set(x_36, 1, x_32); -return x_36; -} -else -{ -lean_object* x_37; -x_37 = l_Lean_Server_Watchdog_handleCrash(x_1, x_31, x_5, x_32); -lean_dec(x_5); -return x_37; -} -} -else -{ -uint8_t x_38; -x_38 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__2; -if (x_38 == 0) -{ -lean_object* x_39; lean_object* x_40; -lean_dec(x_31); -lean_dec(x_5); -x_39 = lean_box(0); -x_40 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_40, 0, x_39); -lean_ctor_set(x_40, 1, x_32); -return x_40; -} -else -{ -lean_object* x_41; -x_41 = l_Lean_Server_Watchdog_handleCrash(x_1, x_31, x_5, x_32); -lean_dec(x_5); -return x_41; -} -} -} -} -else -{ -uint8_t x_42; -lean_dec(x_5); -x_42 = !lean_is_exclusive(x_13); -if (x_42 == 0) -{ -return x_13; -} -else -{ -lean_object* x_43; lean_object* x_44; lean_object* x_45; -x_43 = lean_ctor_get(x_13, 0); -x_44 = lean_ctor_get(x_13, 1); -lean_inc(x_44); -lean_inc(x_43); -lean_dec(x_13); -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; -} -} -} -else -{ -uint8_t x_46; -lean_dec(x_5); -x_46 = !lean_is_exclusive(x_11); -if (x_46 == 0) -{ -return x_11; -} -else -{ -lean_object* x_47; lean_object* x_48; lean_object* x_49; -x_47 = lean_ctor_get(x_11, 0); -x_48 = lean_ctor_get(x_11, 1); -lean_inc(x_48); -lean_inc(x_47); -lean_dec(x_11); -x_49 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_49, 0, x_47); -lean_ctor_set(x_49, 1, x_48); -return x_49; -} -} -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__61___lambda__2(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -if (x_1 == 0) -{ -lean_object* x_8; lean_object* x_9; -lean_dec(x_6); -lean_dec(x_3); -x_8 = lean_box(0); -x_9 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_9, 0, x_8); -lean_ctor_set(x_9, 1, x_7); -return x_9; -} -else -{ -lean_object* x_10; lean_object* x_11; -x_10 = lean_box(0); -x_11 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__61___lambda__1(x_2, x_3, x_4, x_10, x_6, x_7); -return x_11; -} -} -} -static lean_object* _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__61___closed__1() { -_start: -{ -size_t x_1; size_t x_2; lean_object* x_3; lean_object* x_4; -x_1 = 0; -x_2 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__2; -x_3 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__3; -x_4 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__63(x_2, x_1, x_3); -return x_4; -} -} -static lean_object* _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__61___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__61___closed__1; -x_2 = x_1; -return x_2; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__61(lean_object* x_1, lean_object* x_2, lean_object* x_3, uint8_t x_4, uint8_t x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -lean_object* x_8; -x_8 = l_Lean_Server_Watchdog_findFileWorker(x_1, x_6, x_7); -if (lean_obj_tag(x_8) == 0) -{ -lean_object* x_9; lean_object* x_10; -x_9 = lean_ctor_get(x_8, 0); -lean_inc(x_9); -x_10 = lean_ctor_get(x_9, 3); -lean_inc(x_10); -if (lean_obj_tag(x_10) == 0) -{ -lean_dec(x_3); -if (x_4 == 0) -{ -lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; -lean_dec(x_2); -x_11 = lean_ctor_get(x_8, 1); -lean_inc(x_11); -lean_dec(x_8); -x_12 = lean_ctor_get(x_10, 0); -lean_inc(x_12); -lean_dec(x_10); -x_13 = lean_box(0); -x_14 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__61___lambda__2(x_5, x_1, x_9, x_12, x_13, x_6, x_11); -lean_dec(x_12); -return x_14; -} -else -{ -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; -x_15 = lean_ctor_get(x_8, 1); -lean_inc(x_15); -lean_dec(x_8); -x_16 = lean_ctor_get(x_10, 0); -lean_inc(x_16); -lean_dec(x_10); -x_17 = lean_ctor_get(x_2, 0); -lean_inc(x_17); -x_18 = lean_ctor_get(x_2, 1); -lean_inc(x_18); -x_19 = lean_ctor_get(x_2, 2); -lean_inc(x_19); -lean_dec(x_2); -x_20 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__60(x_19); -x_21 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_21, 0, x_17); -lean_ctor_set(x_21, 1, x_18); -lean_ctor_set(x_21, 2, x_20); -x_22 = lean_array_push(x_16, x_21); -x_23 = lean_box(0); -x_24 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__61___lambda__2(x_5, x_1, x_9, x_22, x_23, x_6, x_15); -lean_dec(x_22); -return x_24; -} -} -else -{ -if (x_4 == 0) -{ -lean_object* x_25; lean_object* x_26; -x_25 = lean_ctor_get(x_8, 1); -lean_inc(x_25); -lean_dec(x_8); -x_26 = lean_apply_3(x_3, x_9, x_2, x_25); -if (lean_obj_tag(x_26) == 0) -{ -lean_dec(x_6); -return x_26; -} -else -{ -lean_object* x_27; lean_object* x_28; lean_object* x_29; -x_27 = lean_ctor_get(x_26, 1); -lean_inc(x_27); -lean_dec(x_26); -x_28 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__61___closed__2; -x_29 = l_Lean_Server_Watchdog_handleCrash(x_1, x_28, x_6, x_27); -lean_dec(x_6); -return x_29; -} -} -else -{ -lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; -x_30 = lean_ctor_get(x_8, 1); -lean_inc(x_30); -lean_dec(x_8); -x_31 = l_Lean_mkOptionalNode___closed__2; -lean_inc(x_2); -x_32 = lean_array_push(x_31, x_2); -x_33 = lean_apply_3(x_3, x_9, x_2, x_30); -if (lean_obj_tag(x_33) == 0) -{ -lean_dec(x_32); -lean_dec(x_6); -return x_33; -} -else -{ -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_34 = lean_ctor_get(x_33, 1); -lean_inc(x_34); -lean_dec(x_33); -x_35 = lean_array_get_size(x_32); -x_36 = lean_usize_of_nat(x_35); -lean_dec(x_35); -x_37 = 0; -x_38 = x_32; -x_39 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__63(x_36, x_37, x_38); -x_40 = x_39; -x_41 = l_Lean_Server_Watchdog_handleCrash(x_1, x_40, x_6, x_34); -lean_dec(x_6); -return x_41; -} -} -} -} -else -{ -uint8_t x_42; -lean_dec(x_6); -lean_dec(x_3); -lean_dec(x_2); -x_42 = !lean_is_exclusive(x_8); -if (x_42 == 0) -{ -return x_8; -} -else -{ -lean_object* x_43; lean_object* x_44; lean_object* x_45; -x_43 = lean_ctor_get(x_8, 0); -x_44 = lean_ctor_get(x_8, 1); -lean_inc(x_44); -lean_inc(x_43); -lean_dec(x_8); -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_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__64(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__13(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; @@ -17424,602 +10872,7 @@ return x_12; } } } -lean_object* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__67(lean_object* x_1) { -_start: -{ -lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; -x_2 = l___private_Lean_Data_Lsp_LanguageFeatures_0__Lean_Lsp_toJsonCompletionParams____x40_Lean_Data_Lsp_LanguageFeatures___hyg_347_(x_1); -x_3 = lean_ctor_get(x_2, 0); -lean_inc(x_3); -lean_dec(x_2); -x_4 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_4, 0, x_3); -x_5 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_5, 0, x_4); -return x_5; -} -} -lean_object* l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_handleRequest___spec__66(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; -x_4 = lean_ctor_get(x_2, 0); -lean_inc(x_4); -x_5 = lean_ctor_get(x_2, 1); -lean_inc(x_5); -x_6 = lean_ctor_get(x_2, 2); -lean_inc(x_6); -lean_dec(x_2); -x_7 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__67(x_6); -x_8 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_8, 0, x_4); -lean_ctor_set(x_8, 1, x_5); -lean_ctor_set(x_8, 2, x_7); -x_9 = l_IO_FS_Stream_writeLspMessage(x_1, x_8, x_3); -lean_dec(x_8); -return x_9; -} -} -lean_object* l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__65(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; lean_object* x_5; -lean_inc(x_1); -x_4 = l_Lean_Server_Watchdog_FileWorker_stdin(x_1); -lean_inc(x_2); -x_5 = l_IO_FS_Stream_writeLspRequest___at_Lean_Server_Watchdog_handleRequest___spec__66(x_4, x_2, x_3); -if (lean_obj_tag(x_5) == 0) -{ -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; uint8_t x_18; -x_6 = lean_ctor_get(x_5, 1); -lean_inc(x_6); -lean_dec(x_5); -x_7 = lean_ctor_get(x_1, 4); -lean_inc(x_7); -lean_dec(x_1); -x_8 = lean_st_ref_take(x_7, x_6); -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_2, 0); -lean_inc(x_11); -x_12 = lean_ctor_get(x_2, 1); -lean_inc(x_12); -x_13 = lean_ctor_get(x_2, 2); -lean_inc(x_13); -lean_dec(x_2); -x_14 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__67(x_13); -lean_inc(x_11); -x_15 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_15, 0, x_11); -lean_ctor_set(x_15, 1, x_12); -lean_ctor_set(x_15, 2, x_14); -x_16 = l_Std_RBNode_insert___at_Lean_Server_Watchdog_FileWorker_writeRequest___spec__1(x_9, x_11, x_15); -x_17 = lean_st_ref_set(x_7, x_16, x_10); -lean_dec(x_7); -x_18 = !lean_is_exclusive(x_17); -if (x_18 == 0) -{ -return x_17; -} -else -{ -lean_object* x_19; lean_object* x_20; lean_object* x_21; -x_19 = lean_ctor_get(x_17, 0); -x_20 = lean_ctor_get(x_17, 1); -lean_inc(x_20); -lean_inc(x_19); -lean_dec(x_17); -x_21 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_21, 0, x_19); -lean_ctor_set(x_21, 1, x_20); -return x_21; -} -} -else -{ -uint8_t x_22; -lean_dec(x_2); -lean_dec(x_1); -x_22 = !lean_is_exclusive(x_5); -if (x_22 == 0) -{ -return x_5; -} -else -{ -lean_object* x_23; lean_object* x_24; lean_object* x_25; -x_23 = lean_ctor_get(x_5, 0); -x_24 = lean_ctor_get(x_5, 1); -lean_inc(x_24); -lean_inc(x_23); -lean_dec(x_5); -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_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__69(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -uint8_t x_8; -x_8 = x_4 < x_3; -if (x_8 == 0) -{ -lean_object* x_9; -lean_dec(x_1); -x_9 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_9, 0, x_5); -lean_ctor_set(x_9, 1, x_7); -return x_9; -} -else -{ -lean_object* x_10; lean_object* x_11; -x_10 = lean_array_uget(x_2, x_4); -lean_inc(x_1); -x_11 = l_Lean_Server_Watchdog_FileWorker_writeMessage(x_1, x_10, x_7); -if (lean_obj_tag(x_11) == 0) -{ -lean_object* x_12; size_t x_13; size_t x_14; -lean_dec(x_10); -x_12 = lean_ctor_get(x_11, 1); -lean_inc(x_12); -lean_dec(x_11); -x_13 = 1; -x_14 = x_4 + x_13; -x_4 = x_14; -x_7 = x_12; -goto _start; -} -else -{ -lean_object* x_16; lean_object* x_17; size_t x_18; size_t x_19; -x_16 = lean_ctor_get(x_11, 1); -lean_inc(x_16); -lean_dec(x_11); -x_17 = lean_array_push(x_5, x_10); -x_18 = 1; -x_19 = x_4 + x_18; -x_4 = x_19; -x_5 = x_17; -x_7 = x_16; -goto _start; -} -} -} -} -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__70(size_t x_1, size_t x_2, lean_object* x_3) { -_start: -{ -uint8_t x_4; -x_4 = x_2 < x_1; -if (x_4 == 0) -{ -lean_object* x_5; -x_5 = x_3; -return x_5; -} -else -{ -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; size_t x_15; size_t x_16; lean_object* x_17; lean_object* x_18; -x_6 = lean_array_uget(x_3, x_2); -x_7 = lean_unsigned_to_nat(0u); -x_8 = lean_array_uset(x_3, x_2, x_7); -x_9 = x_6; -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_13 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__67(x_12); -x_14 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_14, 0, x_10); -lean_ctor_set(x_14, 1, x_11); -lean_ctor_set(x_14, 2, x_13); -x_15 = 1; -x_16 = x_2 + x_15; -x_17 = x_14; -x_18 = lean_array_uset(x_8, x_2, x_17); -x_2 = x_16; -x_3 = x_18; -goto _start; -} -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__68___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; lean_object* x_9; lean_object* x_10; lean_object* x_11; -x_7 = l_Lean_Server_Watchdog_eraseFileWorker(x_1, x_5, x_6); -x_8 = lean_ctor_get(x_7, 1); -lean_inc(x_8); -lean_dec(x_7); -x_9 = lean_ctor_get(x_2, 0); -lean_inc(x_9); -lean_dec(x_2); -x_10 = lean_ctor_get(x_9, 0); -lean_inc(x_10); -lean_dec(x_9); -lean_inc(x_5); -x_11 = l_Lean_Server_Watchdog_startFileWorker(x_10, x_5, x_8); -if (lean_obj_tag(x_11) == 0) -{ -lean_object* x_12; lean_object* x_13; -x_12 = lean_ctor_get(x_11, 1); -lean_inc(x_12); -lean_dec(x_11); -x_13 = l_Lean_Server_Watchdog_findFileWorker(x_1, x_5, x_12); -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; lean_object* x_20; uint8_t x_21; -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_3); -x_17 = lean_usize_of_nat(x_16); -lean_dec(x_16); -x_18 = 0; -x_19 = l_Array_empty___closed__1; -x_20 = l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__69(x_14, x_3, x_17, x_18, x_19, x_5, x_15); -x_21 = !lean_is_exclusive(x_20); -if (x_21 == 0) -{ -lean_object* x_22; lean_object* x_23; uint8_t x_24; -x_22 = lean_ctor_get(x_20, 0); -x_23 = lean_ctor_get(x_20, 1); -x_24 = l_Array_isEmpty___rarg(x_22); -if (x_24 == 0) -{ -uint8_t x_25; -x_25 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__1; -if (x_25 == 0) -{ -lean_object* x_26; -lean_dec(x_22); -lean_dec(x_5); -x_26 = lean_box(0); -lean_ctor_set(x_20, 0, x_26); -return x_20; -} -else -{ -lean_object* x_27; -lean_free_object(x_20); -x_27 = l_Lean_Server_Watchdog_handleCrash(x_1, x_22, x_5, x_23); -lean_dec(x_5); -return x_27; -} -} -else -{ -uint8_t x_28; -x_28 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__2; -if (x_28 == 0) -{ -lean_object* x_29; -lean_dec(x_22); -lean_dec(x_5); -x_29 = lean_box(0); -lean_ctor_set(x_20, 0, x_29); -return x_20; -} -else -{ -lean_object* x_30; -lean_free_object(x_20); -x_30 = l_Lean_Server_Watchdog_handleCrash(x_1, x_22, x_5, x_23); -lean_dec(x_5); -return x_30; -} -} -} -else -{ -lean_object* x_31; lean_object* x_32; uint8_t x_33; -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_20); -x_33 = l_Array_isEmpty___rarg(x_31); -if (x_33 == 0) -{ -uint8_t x_34; -x_34 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__1; -if (x_34 == 0) -{ -lean_object* x_35; lean_object* x_36; -lean_dec(x_31); -lean_dec(x_5); -x_35 = lean_box(0); -x_36 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_36, 0, x_35); -lean_ctor_set(x_36, 1, x_32); -return x_36; -} -else -{ -lean_object* x_37; -x_37 = l_Lean_Server_Watchdog_handleCrash(x_1, x_31, x_5, x_32); -lean_dec(x_5); -return x_37; -} -} -else -{ -uint8_t x_38; -x_38 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__2; -if (x_38 == 0) -{ -lean_object* x_39; lean_object* x_40; -lean_dec(x_31); -lean_dec(x_5); -x_39 = lean_box(0); -x_40 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_40, 0, x_39); -lean_ctor_set(x_40, 1, x_32); -return x_40; -} -else -{ -lean_object* x_41; -x_41 = l_Lean_Server_Watchdog_handleCrash(x_1, x_31, x_5, x_32); -lean_dec(x_5); -return x_41; -} -} -} -} -else -{ -uint8_t x_42; -lean_dec(x_5); -x_42 = !lean_is_exclusive(x_13); -if (x_42 == 0) -{ -return x_13; -} -else -{ -lean_object* x_43; lean_object* x_44; lean_object* x_45; -x_43 = lean_ctor_get(x_13, 0); -x_44 = lean_ctor_get(x_13, 1); -lean_inc(x_44); -lean_inc(x_43); -lean_dec(x_13); -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; -} -} -} -else -{ -uint8_t x_46; -lean_dec(x_5); -x_46 = !lean_is_exclusive(x_11); -if (x_46 == 0) -{ -return x_11; -} -else -{ -lean_object* x_47; lean_object* x_48; lean_object* x_49; -x_47 = lean_ctor_get(x_11, 0); -x_48 = lean_ctor_get(x_11, 1); -lean_inc(x_48); -lean_inc(x_47); -lean_dec(x_11); -x_49 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_49, 0, x_47); -lean_ctor_set(x_49, 1, x_48); -return x_49; -} -} -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__68___lambda__2(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -if (x_1 == 0) -{ -lean_object* x_8; lean_object* x_9; -lean_dec(x_6); -lean_dec(x_3); -x_8 = lean_box(0); -x_9 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_9, 0, x_8); -lean_ctor_set(x_9, 1, x_7); -return x_9; -} -else -{ -lean_object* x_10; lean_object* x_11; -x_10 = lean_box(0); -x_11 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__68___lambda__1(x_2, x_3, x_4, x_10, x_6, x_7); -return x_11; -} -} -} -static lean_object* _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__68___closed__1() { -_start: -{ -size_t x_1; size_t x_2; lean_object* x_3; lean_object* x_4; -x_1 = 0; -x_2 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__2; -x_3 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__3; -x_4 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__70(x_2, x_1, x_3); -return x_4; -} -} -static lean_object* _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__68___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__68___closed__1; -x_2 = x_1; -return x_2; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__68(lean_object* x_1, lean_object* x_2, lean_object* x_3, uint8_t x_4, uint8_t x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -lean_object* x_8; -x_8 = l_Lean_Server_Watchdog_findFileWorker(x_1, x_6, x_7); -if (lean_obj_tag(x_8) == 0) -{ -lean_object* x_9; lean_object* x_10; -x_9 = lean_ctor_get(x_8, 0); -lean_inc(x_9); -x_10 = lean_ctor_get(x_9, 3); -lean_inc(x_10); -if (lean_obj_tag(x_10) == 0) -{ -lean_dec(x_3); -if (x_4 == 0) -{ -lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; -lean_dec(x_2); -x_11 = lean_ctor_get(x_8, 1); -lean_inc(x_11); -lean_dec(x_8); -x_12 = lean_ctor_get(x_10, 0); -lean_inc(x_12); -lean_dec(x_10); -x_13 = lean_box(0); -x_14 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__68___lambda__2(x_5, x_1, x_9, x_12, x_13, x_6, x_11); -lean_dec(x_12); -return x_14; -} -else -{ -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; -x_15 = lean_ctor_get(x_8, 1); -lean_inc(x_15); -lean_dec(x_8); -x_16 = lean_ctor_get(x_10, 0); -lean_inc(x_16); -lean_dec(x_10); -x_17 = lean_ctor_get(x_2, 0); -lean_inc(x_17); -x_18 = lean_ctor_get(x_2, 1); -lean_inc(x_18); -x_19 = lean_ctor_get(x_2, 2); -lean_inc(x_19); -lean_dec(x_2); -x_20 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__67(x_19); -x_21 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_21, 0, x_17); -lean_ctor_set(x_21, 1, x_18); -lean_ctor_set(x_21, 2, x_20); -x_22 = lean_array_push(x_16, x_21); -x_23 = lean_box(0); -x_24 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__68___lambda__2(x_5, x_1, x_9, x_22, x_23, x_6, x_15); -lean_dec(x_22); -return x_24; -} -} -else -{ -if (x_4 == 0) -{ -lean_object* x_25; lean_object* x_26; -x_25 = lean_ctor_get(x_8, 1); -lean_inc(x_25); -lean_dec(x_8); -x_26 = lean_apply_3(x_3, x_9, x_2, x_25); -if (lean_obj_tag(x_26) == 0) -{ -lean_dec(x_6); -return x_26; -} -else -{ -lean_object* x_27; lean_object* x_28; lean_object* x_29; -x_27 = lean_ctor_get(x_26, 1); -lean_inc(x_27); -lean_dec(x_26); -x_28 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__68___closed__2; -x_29 = l_Lean_Server_Watchdog_handleCrash(x_1, x_28, x_6, x_27); -lean_dec(x_6); -return x_29; -} -} -else -{ -lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; -x_30 = lean_ctor_get(x_8, 1); -lean_inc(x_30); -lean_dec(x_8); -x_31 = l_Lean_mkOptionalNode___closed__2; -lean_inc(x_2); -x_32 = lean_array_push(x_31, x_2); -x_33 = lean_apply_3(x_3, x_9, x_2, x_30); -if (lean_obj_tag(x_33) == 0) -{ -lean_dec(x_32); -lean_dec(x_6); -return x_33; -} -else -{ -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_34 = lean_ctor_get(x_33, 1); -lean_inc(x_34); -lean_dec(x_33); -x_35 = lean_array_get_size(x_32); -x_36 = lean_usize_of_nat(x_35); -lean_dec(x_35); -x_37 = 0; -x_38 = x_32; -x_39 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__70(x_36, x_37, x_38); -x_40 = x_39; -x_41 = l_Lean_Server_Watchdog_handleCrash(x_1, x_40, x_6, x_34); -lean_dec(x_6); -return x_41; -} -} -} -} -else -{ -uint8_t x_42; -lean_dec(x_6); -lean_dec(x_3); -lean_dec(x_2); -x_42 = !lean_is_exclusive(x_8); -if (x_42 == 0) -{ -return x_8; -} -else -{ -lean_object* x_43; lean_object* x_44; lean_object* x_45; -x_43 = lean_ctor_get(x_8, 0); -x_44 = lean_ctor_get(x_8, 1); -lean_inc(x_44); -lean_inc(x_43); -lean_dec(x_8); -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_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__71(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__14(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; @@ -18050,820 +10903,33 @@ return x_12; } } } -lean_object* l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__72(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Server_Watchdog_handleRequest___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) { _start: { -lean_object* x_4; lean_object* x_5; -lean_inc(x_1); -x_4 = l_Lean_Server_Watchdog_FileWorker_stdin(x_1); -lean_inc(x_2); -x_5 = l_IO_FS_Stream_writeLspRequest___at_Lean_Lsp_Ipc_collectDiagnostics___spec__2(x_4, x_2, x_3); -if (lean_obj_tag(x_5) == 0) -{ -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; uint8_t x_18; -x_6 = lean_ctor_get(x_5, 1); -lean_inc(x_6); -lean_dec(x_5); -x_7 = lean_ctor_get(x_1, 4); -lean_inc(x_7); -lean_dec(x_1); -x_8 = lean_st_ref_take(x_7, x_6); -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_2, 0); -lean_inc(x_11); -x_12 = lean_ctor_get(x_2, 1); -lean_inc(x_12); -x_13 = lean_ctor_get(x_2, 2); -lean_inc(x_13); -lean_dec(x_2); -x_14 = l_Lean_Json_toStructured_x3f___at_Lean_Lsp_Ipc_collectDiagnostics___spec__3(x_13); -lean_inc(x_11); -x_15 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_15, 0, x_11); -lean_ctor_set(x_15, 1, x_12); -lean_ctor_set(x_15, 2, x_14); -x_16 = l_Std_RBNode_insert___at_Lean_Server_Watchdog_FileWorker_writeRequest___spec__1(x_9, x_11, x_15); -x_17 = lean_st_ref_set(x_7, x_16, x_10); -lean_dec(x_7); -x_18 = !lean_is_exclusive(x_17); -if (x_18 == 0) -{ -return x_17; -} -else -{ -lean_object* x_19; lean_object* x_20; lean_object* x_21; -x_19 = lean_ctor_get(x_17, 0); -x_20 = lean_ctor_get(x_17, 1); -lean_inc(x_20); -lean_inc(x_19); -lean_dec(x_17); -x_21 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_21, 0, x_19); -lean_ctor_set(x_21, 1, x_20); -return x_21; -} -} -else -{ -uint8_t x_22; -lean_dec(x_2); -lean_dec(x_1); -x_22 = !lean_is_exclusive(x_5); -if (x_22 == 0) -{ -return x_5; -} -else -{ -lean_object* x_23; lean_object* x_24; lean_object* x_25; -x_23 = lean_ctor_get(x_5, 0); -x_24 = lean_ctor_get(x_5, 1); -lean_inc(x_24); -lean_inc(x_23); -lean_dec(x_5); -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_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__74(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -uint8_t x_8; -x_8 = x_4 < x_3; -if (x_8 == 0) -{ -lean_object* x_9; -lean_dec(x_1); -x_9 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_9, 0, x_5); -lean_ctor_set(x_9, 1, x_7); -return x_9; -} -else -{ -lean_object* x_10; lean_object* x_11; -x_10 = lean_array_uget(x_2, x_4); -lean_inc(x_1); -x_11 = l_Lean_Server_Watchdog_FileWorker_writeMessage(x_1, x_10, x_7); -if (lean_obj_tag(x_11) == 0) -{ -lean_object* x_12; size_t x_13; size_t x_14; -lean_dec(x_10); -x_12 = lean_ctor_get(x_11, 1); -lean_inc(x_12); -lean_dec(x_11); -x_13 = 1; -x_14 = x_4 + x_13; -x_4 = x_14; -x_7 = x_12; -goto _start; -} -else -{ -lean_object* x_16; lean_object* x_17; size_t x_18; size_t x_19; -x_16 = lean_ctor_get(x_11, 1); -lean_inc(x_16); -lean_dec(x_11); -x_17 = lean_array_push(x_5, x_10); -x_18 = 1; -x_19 = x_4 + x_18; -x_4 = x_19; -x_5 = x_17; -x_7 = x_16; -goto _start; -} -} -} -} -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__75(size_t x_1, size_t x_2, lean_object* x_3) { -_start: -{ -uint8_t x_4; -x_4 = x_2 < x_1; -if (x_4 == 0) -{ -lean_object* x_5; -x_5 = x_3; -return x_5; -} -else -{ -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; size_t x_15; size_t x_16; lean_object* x_17; lean_object* x_18; -x_6 = lean_array_uget(x_3, x_2); -x_7 = lean_unsigned_to_nat(0u); -x_8 = lean_array_uset(x_3, x_2, x_7); -x_9 = x_6; +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; uint8_t x_17; uint8_t x_18; lean_object* x_19; +x_8 = lean_ctor_get(x_5, 4); +x_9 = lean_st_ref_take(x_8, x_7); 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_13 = l_Lean_Json_toStructured_x3f___at_Lean_Lsp_Ipc_collectDiagnostics___spec__3(x_12); -x_14 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_14, 0, x_10); -lean_ctor_set(x_14, 1, x_11); -lean_ctor_set(x_14, 2, x_13); -x_15 = 1; -x_16 = x_2 + x_15; -x_17 = x_14; -x_18 = lean_array_uset(x_8, x_2, x_17); -x_2 = x_16; -x_3 = x_18; -goto _start; -} -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__73___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; lean_object* x_9; lean_object* x_10; lean_object* x_11; -x_7 = l_Lean_Server_Watchdog_eraseFileWorker(x_1, x_5, x_6); -x_8 = lean_ctor_get(x_7, 1); -lean_inc(x_8); -lean_dec(x_7); -x_9 = lean_ctor_get(x_2, 0); -lean_inc(x_9); -lean_dec(x_2); -x_10 = lean_ctor_get(x_9, 0); -lean_inc(x_10); -lean_dec(x_9); -lean_inc(x_5); -x_11 = l_Lean_Server_Watchdog_startFileWorker(x_10, x_5, x_8); -if (lean_obj_tag(x_11) == 0) -{ -lean_object* x_12; lean_object* x_13; -x_12 = lean_ctor_get(x_11, 1); -lean_inc(x_12); -lean_dec(x_11); -x_13 = l_Lean_Server_Watchdog_findFileWorker(x_1, x_5, x_12); -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; lean_object* x_20; uint8_t x_21; -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_3); -x_17 = lean_usize_of_nat(x_16); -lean_dec(x_16); -x_18 = 0; -x_19 = l_Array_empty___closed__1; -x_20 = l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__74(x_14, x_3, x_17, x_18, x_19, x_5, x_15); -x_21 = !lean_is_exclusive(x_20); -if (x_21 == 0) -{ -lean_object* x_22; lean_object* x_23; uint8_t x_24; -x_22 = lean_ctor_get(x_20, 0); -x_23 = lean_ctor_get(x_20, 1); -x_24 = l_Array_isEmpty___rarg(x_22); -if (x_24 == 0) -{ -uint8_t x_25; -x_25 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__1; -if (x_25 == 0) -{ -lean_object* x_26; -lean_dec(x_22); -lean_dec(x_5); -x_26 = lean_box(0); -lean_ctor_set(x_20, 0, x_26); -return x_20; -} -else -{ -lean_object* x_27; -lean_free_object(x_20); -x_27 = l_Lean_Server_Watchdog_handleCrash(x_1, x_22, x_5, x_23); -lean_dec(x_5); -return x_27; -} -} -else -{ -uint8_t x_28; -x_28 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__2; -if (x_28 == 0) -{ -lean_object* x_29; -lean_dec(x_22); -lean_dec(x_5); -x_29 = lean_box(0); -lean_ctor_set(x_20, 0, x_29); -return x_20; -} -else -{ -lean_object* x_30; -lean_free_object(x_20); -x_30 = l_Lean_Server_Watchdog_handleCrash(x_1, x_22, x_5, x_23); -lean_dec(x_5); -return x_30; -} -} -} -else -{ -lean_object* x_31; lean_object* x_32; uint8_t x_33; -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_20); -x_33 = l_Array_isEmpty___rarg(x_31); -if (x_33 == 0) -{ -uint8_t x_34; -x_34 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__1; -if (x_34 == 0) -{ -lean_object* x_35; lean_object* x_36; -lean_dec(x_31); -lean_dec(x_5); -x_35 = lean_box(0); -x_36 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_36, 0, x_35); -lean_ctor_set(x_36, 1, x_32); -return x_36; -} -else -{ -lean_object* x_37; -x_37 = l_Lean_Server_Watchdog_handleCrash(x_1, x_31, x_5, x_32); -lean_dec(x_5); -return x_37; -} -} -else -{ -uint8_t x_38; -x_38 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__2; -if (x_38 == 0) -{ -lean_object* x_39; lean_object* x_40; -lean_dec(x_31); -lean_dec(x_5); -x_39 = lean_box(0); -x_40 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_40, 0, x_39); -lean_ctor_set(x_40, 1, x_32); -return x_40; -} -else -{ -lean_object* x_41; -x_41 = l_Lean_Server_Watchdog_handleCrash(x_1, x_31, x_5, x_32); -lean_dec(x_5); -return x_41; -} -} -} -} -else -{ -uint8_t x_42; -lean_dec(x_5); -x_42 = !lean_is_exclusive(x_13); -if (x_42 == 0) -{ -return x_13; -} -else -{ -lean_object* x_43; lean_object* x_44; lean_object* x_45; -x_43 = lean_ctor_get(x_13, 0); -x_44 = lean_ctor_get(x_13, 1); -lean_inc(x_44); -lean_inc(x_43); -lean_dec(x_13); -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; -} -} -} -else -{ -uint8_t x_46; -lean_dec(x_5); -x_46 = !lean_is_exclusive(x_11); -if (x_46 == 0) -{ -return x_11; -} -else -{ -lean_object* x_47; lean_object* x_48; lean_object* x_49; -x_47 = lean_ctor_get(x_11, 0); -x_48 = lean_ctor_get(x_11, 1); -lean_inc(x_48); -lean_inc(x_47); -lean_dec(x_11); -x_49 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_49, 0, x_47); -lean_ctor_set(x_49, 1, x_48); -return x_49; -} -} -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__73___lambda__2(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -if (x_1 == 0) -{ -lean_object* x_8; lean_object* x_9; -lean_dec(x_6); -lean_dec(x_3); -x_8 = lean_box(0); -x_9 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_9, 0, x_8); -lean_ctor_set(x_9, 1, x_7); -return x_9; -} -else -{ -lean_object* x_10; lean_object* x_11; -x_10 = lean_box(0); -x_11 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__73___lambda__1(x_2, x_3, x_4, x_10, x_6, x_7); -return x_11; -} -} -} -static lean_object* _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__73___closed__1() { -_start: -{ -size_t x_1; size_t x_2; lean_object* x_3; lean_object* x_4; -x_1 = 0; -x_2 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__2; -x_3 = l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__3; -x_4 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__75(x_2, x_1, x_3); -return x_4; -} -} -static lean_object* _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__73___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__73___closed__1; -x_2 = x_1; -return x_2; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__73(lean_object* x_1, lean_object* x_2, lean_object* x_3, uint8_t x_4, uint8_t x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -lean_object* x_8; -x_8 = l_Lean_Server_Watchdog_findFileWorker(x_1, x_6, x_7); -if (lean_obj_tag(x_8) == 0) -{ -lean_object* x_9; lean_object* x_10; -x_9 = lean_ctor_get(x_8, 0); -lean_inc(x_9); -x_10 = lean_ctor_get(x_9, 3); -lean_inc(x_10); -if (lean_obj_tag(x_10) == 0) -{ -lean_dec(x_3); -if (x_4 == 0) -{ -lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; -lean_dec(x_2); -x_11 = lean_ctor_get(x_8, 1); -lean_inc(x_11); -lean_dec(x_8); -x_12 = lean_ctor_get(x_10, 0); -lean_inc(x_12); -lean_dec(x_10); -x_13 = lean_box(0); -x_14 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__73___lambda__2(x_5, x_1, x_9, x_12, x_13, x_6, x_11); -lean_dec(x_12); -return x_14; -} -else -{ -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; -x_15 = lean_ctor_get(x_8, 1); -lean_inc(x_15); -lean_dec(x_8); -x_16 = lean_ctor_get(x_10, 0); -lean_inc(x_16); -lean_dec(x_10); -x_17 = lean_ctor_get(x_2, 0); -lean_inc(x_17); -x_18 = lean_ctor_get(x_2, 1); -lean_inc(x_18); -x_19 = lean_ctor_get(x_2, 2); -lean_inc(x_19); -lean_dec(x_2); -x_20 = l_Lean_Json_toStructured_x3f___at_Lean_Lsp_Ipc_collectDiagnostics___spec__3(x_19); -x_21 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_21, 0, x_17); -lean_ctor_set(x_21, 1, x_18); -lean_ctor_set(x_21, 2, x_20); -x_22 = lean_array_push(x_16, x_21); -x_23 = lean_box(0); -x_24 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__73___lambda__2(x_5, x_1, x_9, x_22, x_23, x_6, x_15); -lean_dec(x_22); -return x_24; -} -} -else -{ -if (x_4 == 0) -{ -lean_object* x_25; lean_object* x_26; -x_25 = lean_ctor_get(x_8, 1); -lean_inc(x_25); -lean_dec(x_8); -x_26 = lean_apply_3(x_3, x_9, x_2, x_25); -if (lean_obj_tag(x_26) == 0) -{ -lean_dec(x_6); -return x_26; -} -else -{ -lean_object* x_27; lean_object* x_28; lean_object* x_29; -x_27 = lean_ctor_get(x_26, 1); -lean_inc(x_27); -lean_dec(x_26); -x_28 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__73___closed__2; -x_29 = l_Lean_Server_Watchdog_handleCrash(x_1, x_28, x_6, x_27); -lean_dec(x_6); -return x_29; -} -} -else -{ -lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; -x_30 = lean_ctor_get(x_8, 1); -lean_inc(x_30); -lean_dec(x_8); -x_31 = l_Lean_mkOptionalNode___closed__2; +x_12 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__2(x_1); lean_inc(x_2); -x_32 = lean_array_push(x_31, x_2); -x_33 = lean_apply_3(x_3, x_9, x_2, x_30); -if (lean_obj_tag(x_33) == 0) -{ -lean_dec(x_32); -lean_dec(x_6); -return x_33; -} -else -{ -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_34 = lean_ctor_get(x_33, 1); -lean_inc(x_34); -lean_dec(x_33); -x_35 = lean_array_get_size(x_32); -x_36 = lean_usize_of_nat(x_35); -lean_dec(x_35); -x_37 = 0; -x_38 = x_32; -x_39 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__75(x_36, x_37, x_38); -x_40 = x_39; -x_41 = l_Lean_Server_Watchdog_handleCrash(x_1, x_40, x_6, x_34); -lean_dec(x_6); -return x_41; -} -} -} -} -else -{ -uint8_t x_42; -lean_dec(x_6); -lean_dec(x_3); -lean_dec(x_2); -x_42 = !lean_is_exclusive(x_8); -if (x_42 == 0) -{ -return x_8; -} -else -{ -lean_object* x_43; lean_object* x_44; lean_object* x_45; -x_43 = lean_ctor_get(x_8, 0); -x_44 = lean_ctor_get(x_8, 1); -lean_inc(x_44); -lean_inc(x_43); -lean_dec(x_8); -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; -} -} -} -} -static lean_object* _init_l_Lean_Server_Watchdog_handleRequest___lambda__1___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__2), 3, 0); -return x_1; -} -} -lean_object* l_Lean_Server_Watchdog_handleRequest___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) { -_start: -{ -lean_object* x_8; lean_object* x_9; uint8_t x_10; uint8_t x_11; lean_object* x_12; -x_8 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_8, 0, x_1); -lean_ctor_set(x_8, 1, x_2); -lean_ctor_set(x_8, 2, x_3); -x_9 = l_Lean_Server_Watchdog_handleRequest___lambda__1___closed__1; -x_10 = 1; -x_11 = 0; -x_12 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__5(x_4, x_8, x_9, x_10, x_11, x_6, x_7); -return x_12; -} -} -static lean_object* _init_l_Lean_Server_Watchdog_handleRequest___lambda__2___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__9), 3, 0); -return x_1; -} -} -lean_object* l_Lean_Server_Watchdog_handleRequest___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) { -_start: -{ -lean_object* x_7; lean_object* x_8; uint8_t x_9; uint8_t x_10; lean_object* x_11; -lean_inc(x_3); -x_7 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_7, 0, x_1); -lean_ctor_set(x_7, 1, x_2); -lean_ctor_set(x_7, 2, x_3); -x_8 = l_Lean_Server_Watchdog_handleRequest___lambda__2___closed__1; -x_9 = 1; -x_10 = 0; -x_11 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12(x_3, x_7, x_8, x_9, x_10, x_5, x_6); -lean_dec(x_3); -return x_11; -} -} -static lean_object* _init_l_Lean_Server_Watchdog_handleRequest___lambda__3___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__16), 3, 0); -return x_1; -} -} -lean_object* l_Lean_Server_Watchdog_handleRequest___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) { -_start: -{ -lean_object* x_8; lean_object* x_9; uint8_t x_10; uint8_t x_11; lean_object* x_12; -x_8 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_8, 0, x_1); -lean_ctor_set(x_8, 1, x_2); -lean_ctor_set(x_8, 2, x_3); -x_9 = l_Lean_Server_Watchdog_handleRequest___lambda__3___closed__1; -x_10 = 1; -x_11 = 0; -x_12 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19(x_4, x_8, x_9, x_10, x_11, x_6, x_7); -return x_12; -} -} -static lean_object* _init_l_Lean_Server_Watchdog_handleRequest___lambda__4___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__23), 3, 0); -return x_1; -} -} -lean_object* l_Lean_Server_Watchdog_handleRequest___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) { -_start: -{ -lean_object* x_7; lean_object* x_8; uint8_t x_9; uint8_t x_10; lean_object* x_11; -lean_inc(x_3); -x_7 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_7, 0, x_1); -lean_ctor_set(x_7, 1, x_2); -lean_ctor_set(x_7, 2, x_3); -x_8 = l_Lean_Server_Watchdog_handleRequest___lambda__4___closed__1; -x_9 = 1; -x_10 = 0; -x_11 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26(x_3, x_7, x_8, x_9, x_10, x_5, x_6); -lean_dec(x_3); -return x_11; -} -} -static lean_object* _init_l_Lean_Server_Watchdog_handleRequest___lambda__5___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__30), 3, 0); -return x_1; -} -} -lean_object* l_Lean_Server_Watchdog_handleRequest___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) { -_start: -{ -lean_object* x_8; lean_object* x_9; uint8_t x_10; uint8_t x_11; lean_object* x_12; -x_8 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_8, 0, x_1); -lean_ctor_set(x_8, 1, x_2); -lean_ctor_set(x_8, 2, x_3); -x_9 = l_Lean_Server_Watchdog_handleRequest___lambda__5___closed__1; -x_10 = 1; -x_11 = 0; -x_12 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33(x_4, x_8, x_9, x_10, x_11, x_6, x_7); -return x_12; -} -} -static lean_object* _init_l_Lean_Server_Watchdog_handleRequest___lambda__6___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__37), 3, 0); -return x_1; -} -} -lean_object* l_Lean_Server_Watchdog_handleRequest___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) { -_start: -{ -lean_object* x_8; lean_object* x_9; uint8_t x_10; uint8_t x_11; lean_object* x_12; -x_8 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_8, 0, x_1); -lean_ctor_set(x_8, 1, x_2); -lean_ctor_set(x_8, 2, x_3); -x_9 = l_Lean_Server_Watchdog_handleRequest___lambda__6___closed__1; -x_10 = 1; -x_11 = 0; -x_12 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__40(x_4, x_8, x_9, x_10, x_11, x_6, x_7); -return x_12; -} -} -static lean_object* _init_l_Lean_Server_Watchdog_handleRequest___lambda__7___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__44), 3, 0); -return x_1; -} -} -lean_object* l_Lean_Server_Watchdog_handleRequest___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) { -_start: -{ -lean_object* x_8; lean_object* x_9; uint8_t x_10; uint8_t x_11; lean_object* x_12; -x_8 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_8, 0, x_1); -lean_ctor_set(x_8, 1, x_2); -lean_ctor_set(x_8, 2, x_3); -x_9 = l_Lean_Server_Watchdog_handleRequest___lambda__7___closed__1; -x_10 = 1; -x_11 = 0; -x_12 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__47(x_4, x_8, x_9, x_10, x_11, x_6, x_7); -return x_12; -} -} -static lean_object* _init_l_Lean_Server_Watchdog_handleRequest___lambda__8___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__51), 3, 0); -return x_1; -} -} -lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__8(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -lean_object* x_8; lean_object* x_9; uint8_t x_10; uint8_t x_11; lean_object* x_12; -x_8 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_8, 0, x_1); -lean_ctor_set(x_8, 1, x_2); -lean_ctor_set(x_8, 2, x_3); -x_9 = l_Lean_Server_Watchdog_handleRequest___lambda__8___closed__1; -x_10 = 1; -x_11 = 0; -x_12 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__54(x_4, x_8, x_9, x_10, x_11, x_6, x_7); -return x_12; -} -} -static lean_object* _init_l_Lean_Server_Watchdog_handleRequest___lambda__9___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__58), 3, 0); -return x_1; -} -} -lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__9(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -lean_object* x_8; lean_object* x_9; uint8_t x_10; uint8_t x_11; lean_object* x_12; -x_8 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_8, 0, x_1); -lean_ctor_set(x_8, 1, x_2); -lean_ctor_set(x_8, 2, x_3); -x_9 = l_Lean_Server_Watchdog_handleRequest___lambda__9___closed__1; -x_10 = 1; -x_11 = 0; -x_12 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__61(x_4, x_8, x_9, x_10, x_11, x_6, x_7); -return x_12; -} -} -static lean_object* _init_l_Lean_Server_Watchdog_handleRequest___lambda__10___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__65), 3, 0); -return x_1; -} -} -lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__10(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -lean_object* x_8; lean_object* x_9; uint8_t x_10; uint8_t x_11; lean_object* x_12; -x_8 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_8, 0, x_1); -lean_ctor_set(x_8, 1, x_2); -lean_ctor_set(x_8, 2, x_3); -x_9 = l_Lean_Server_Watchdog_handleRequest___lambda__10___closed__1; -x_10 = 1; -x_11 = 0; -x_12 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__68(x_4, x_8, x_9, x_10, x_11, x_6, x_7); -return x_12; -} -} -static lean_object* _init_l_Lean_Server_Watchdog_handleRequest___lambda__11___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Server_Watchdog_FileWorker_writeRequest___at_Lean_Server_Watchdog_handleRequest___spec__72), 3, 0); -return x_1; -} -} -lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__11(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -lean_object* x_8; lean_object* x_9; uint8_t x_10; uint8_t x_11; lean_object* x_12; -x_8 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_8, 0, x_1); -lean_ctor_set(x_8, 1, x_2); -lean_ctor_set(x_8, 2, x_3); -x_9 = l_Lean_Server_Watchdog_handleRequest___lambda__11___closed__1; -x_10 = 1; -x_11 = 0; -x_12 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__73(x_4, x_8, x_9, x_10, x_11, x_6, x_7); -return x_12; +x_13 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_13, 0, x_2); +lean_ctor_set(x_13, 1, x_3); +lean_ctor_set(x_13, 2, x_12); +lean_inc(x_13); +x_14 = l_Std_RBNode_insert___at_Lean_Server_Watchdog_handleRequest___spec__3(x_10, x_2, x_13); +x_15 = lean_st_ref_set(x_8, x_14, x_11); +x_16 = lean_ctor_get(x_15, 1); +lean_inc(x_16); +lean_dec(x_15); +x_17 = 1; +x_18 = 0; +x_19 = l_Lean_Server_Watchdog_tryWriteMessage(x_4, x_13, x_17, x_18, x_6, x_16); +return x_19; } } static lean_object* _init_l_Lean_Server_Watchdog_handleRequest___closed__1() { @@ -18964,6 +11030,7 @@ return x_36; else { lean_object* x_37; +lean_inc(x_3); x_37 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__1(x_3, x_4, x_5); if (lean_obj_tag(x_37) == 0) { @@ -18975,6 +11042,7 @@ lean_inc(x_39); lean_dec(x_37); x_40 = lean_ctor_get(x_38, 0); lean_inc(x_40); +lean_dec(x_38); x_41 = l_Lean_Server_Watchdog_findFileWorker(x_40, x_4, x_39); if (lean_obj_tag(x_41) == 0) { @@ -18984,15 +11052,16 @@ lean_inc(x_42); x_43 = lean_ctor_get(x_41, 1); lean_inc(x_43); lean_dec(x_41); -x_44 = l_Lean_Server_Watchdog_handleRequest___lambda__1(x_1, x_2, x_38, x_40, x_42, x_4, x_43); +x_44 = l_Lean_Server_Watchdog_handleRequest___lambda__1(x_3, x_1, x_2, x_40, x_42, x_4, x_43); lean_dec(x_42); lean_dec(x_40); +lean_dec(x_3); return x_44; } else { lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; uint8_t x_52; lean_object* x_53; lean_object* x_54; -lean_dec(x_38); +lean_dec(x_3); lean_dec(x_2); x_45 = lean_ctor_get(x_41, 1); lean_inc(x_45); @@ -19068,6 +11137,7 @@ else { uint8_t x_65; lean_dec(x_4); +lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_65 = !lean_is_exclusive(x_37); @@ -19094,7 +11164,8 @@ return x_68; else { lean_object* x_69; -x_69 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__8(x_3, x_4, x_5); +lean_inc(x_3); +x_69 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__5(x_3, x_4, x_5); if (lean_obj_tag(x_69) == 0) { lean_object* x_70; lean_object* x_71; lean_object* x_72; @@ -19112,13 +11183,16 @@ lean_inc(x_73); x_74 = lean_ctor_get(x_72, 1); lean_inc(x_74); lean_dec(x_72); -x_75 = l_Lean_Server_Watchdog_handleRequest___lambda__2(x_1, x_2, x_70, x_73, x_4, x_74); +x_75 = l_Lean_Server_Watchdog_handleRequest___lambda__1(x_3, x_1, x_2, x_70, x_73, x_4, x_74); lean_dec(x_73); +lean_dec(x_70); +lean_dec(x_3); return x_75; } else { lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; uint8_t x_83; lean_object* x_84; lean_object* x_85; +lean_dec(x_3); lean_dec(x_2); x_76 = lean_ctor_get(x_72, 1); lean_inc(x_76); @@ -19194,6 +11268,7 @@ else { uint8_t x_96; lean_dec(x_4); +lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_96 = !lean_is_exclusive(x_69); @@ -19220,7 +11295,8 @@ return x_99; else { lean_object* x_100; -x_100 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__15(x_3, x_4, x_5); +lean_inc(x_3); +x_100 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__6(x_3, x_4, x_5); if (lean_obj_tag(x_100) == 0) { lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; @@ -19231,6 +11307,7 @@ lean_inc(x_102); lean_dec(x_100); x_103 = lean_ctor_get(x_101, 0); lean_inc(x_103); +lean_dec(x_101); x_104 = l_Lean_Server_Watchdog_findFileWorker(x_103, x_4, x_102); if (lean_obj_tag(x_104) == 0) { @@ -19240,15 +11317,16 @@ lean_inc(x_105); x_106 = lean_ctor_get(x_104, 1); lean_inc(x_106); lean_dec(x_104); -x_107 = l_Lean_Server_Watchdog_handleRequest___lambda__3(x_1, x_2, x_101, x_103, x_105, x_4, x_106); +x_107 = l_Lean_Server_Watchdog_handleRequest___lambda__1(x_3, x_1, x_2, x_103, x_105, x_4, x_106); lean_dec(x_105); lean_dec(x_103); +lean_dec(x_3); return x_107; } else { lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; uint8_t x_115; lean_object* x_116; lean_object* x_117; -lean_dec(x_101); +lean_dec(x_3); lean_dec(x_2); x_108 = lean_ctor_get(x_104, 1); lean_inc(x_108); @@ -19324,6 +11402,7 @@ else { uint8_t x_128; lean_dec(x_4); +lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_128 = !lean_is_exclusive(x_100); @@ -19350,7 +11429,8 @@ return x_131; else { lean_object* x_132; -x_132 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__22(x_3, x_4, x_5); +lean_inc(x_3); +x_132 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__7(x_3, x_4, x_5); if (lean_obj_tag(x_132) == 0) { lean_object* x_133; lean_object* x_134; lean_object* x_135; @@ -19368,13 +11448,16 @@ lean_inc(x_136); x_137 = lean_ctor_get(x_135, 1); lean_inc(x_137); lean_dec(x_135); -x_138 = l_Lean_Server_Watchdog_handleRequest___lambda__4(x_1, x_2, x_133, x_136, x_4, x_137); +x_138 = l_Lean_Server_Watchdog_handleRequest___lambda__1(x_3, x_1, x_2, x_133, x_136, x_4, x_137); lean_dec(x_136); +lean_dec(x_133); +lean_dec(x_3); return x_138; } else { lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; lean_object* x_144; lean_object* x_145; uint8_t x_146; lean_object* x_147; lean_object* x_148; +lean_dec(x_3); lean_dec(x_2); x_139 = lean_ctor_get(x_135, 1); lean_inc(x_139); @@ -19450,6 +11533,7 @@ else { uint8_t x_159; lean_dec(x_4); +lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_159 = !lean_is_exclusive(x_132); @@ -19476,7 +11560,8 @@ return x_162; else { lean_object* x_163; -x_163 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__29(x_3, x_4, x_5); +lean_inc(x_3); +x_163 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__8(x_3, x_4, x_5); if (lean_obj_tag(x_163) == 0) { lean_object* x_164; lean_object* x_165; lean_object* x_166; lean_object* x_167; @@ -19487,6 +11572,7 @@ lean_inc(x_165); lean_dec(x_163); x_166 = lean_ctor_get(x_164, 0); lean_inc(x_166); +lean_dec(x_164); x_167 = l_Lean_Server_Watchdog_findFileWorker(x_166, x_4, x_165); if (lean_obj_tag(x_167) == 0) { @@ -19496,15 +11582,16 @@ lean_inc(x_168); x_169 = lean_ctor_get(x_167, 1); lean_inc(x_169); lean_dec(x_167); -x_170 = l_Lean_Server_Watchdog_handleRequest___lambda__5(x_1, x_2, x_164, x_166, x_168, x_4, x_169); +x_170 = l_Lean_Server_Watchdog_handleRequest___lambda__1(x_3, x_1, x_2, x_166, x_168, x_4, x_169); lean_dec(x_168); lean_dec(x_166); +lean_dec(x_3); return x_170; } else { lean_object* x_171; lean_object* x_172; lean_object* x_173; lean_object* x_174; lean_object* x_175; lean_object* x_176; lean_object* x_177; uint8_t x_178; lean_object* x_179; lean_object* x_180; -lean_dec(x_164); +lean_dec(x_3); lean_dec(x_2); x_171 = lean_ctor_get(x_167, 1); lean_inc(x_171); @@ -19580,6 +11667,7 @@ else { uint8_t x_191; lean_dec(x_4); +lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_191 = !lean_is_exclusive(x_163); @@ -19606,7 +11694,8 @@ return x_194; else { lean_object* x_195; -x_195 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__36(x_3, x_4, x_5); +lean_inc(x_3); +x_195 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__9(x_3, x_4, x_5); if (lean_obj_tag(x_195) == 0) { lean_object* x_196; lean_object* x_197; lean_object* x_198; lean_object* x_199; @@ -19617,6 +11706,7 @@ lean_inc(x_197); lean_dec(x_195); x_198 = lean_ctor_get(x_196, 0); lean_inc(x_198); +lean_dec(x_196); x_199 = l_Lean_Server_Watchdog_findFileWorker(x_198, x_4, x_197); if (lean_obj_tag(x_199) == 0) { @@ -19626,15 +11716,16 @@ lean_inc(x_200); x_201 = lean_ctor_get(x_199, 1); lean_inc(x_201); lean_dec(x_199); -x_202 = l_Lean_Server_Watchdog_handleRequest___lambda__6(x_1, x_2, x_196, x_198, x_200, x_4, x_201); +x_202 = l_Lean_Server_Watchdog_handleRequest___lambda__1(x_3, x_1, x_2, x_198, x_200, x_4, x_201); lean_dec(x_200); lean_dec(x_198); +lean_dec(x_3); return x_202; } else { lean_object* x_203; lean_object* x_204; lean_object* x_205; lean_object* x_206; lean_object* x_207; lean_object* x_208; lean_object* x_209; uint8_t x_210; lean_object* x_211; lean_object* x_212; -lean_dec(x_196); +lean_dec(x_3); lean_dec(x_2); x_203 = lean_ctor_get(x_199, 1); lean_inc(x_203); @@ -19710,6 +11801,7 @@ else { uint8_t x_223; lean_dec(x_4); +lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_223 = !lean_is_exclusive(x_195); @@ -19736,7 +11828,8 @@ return x_226; else { lean_object* x_227; -x_227 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__43(x_3, x_4, x_5); +lean_inc(x_3); +x_227 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__10(x_3, x_4, x_5); if (lean_obj_tag(x_227) == 0) { lean_object* x_228; lean_object* x_229; lean_object* x_230; lean_object* x_231; @@ -19747,6 +11840,7 @@ lean_inc(x_229); lean_dec(x_227); x_230 = lean_ctor_get(x_228, 0); lean_inc(x_230); +lean_dec(x_228); x_231 = l_Lean_Server_Watchdog_findFileWorker(x_230, x_4, x_229); if (lean_obj_tag(x_231) == 0) { @@ -19756,15 +11850,16 @@ lean_inc(x_232); x_233 = lean_ctor_get(x_231, 1); lean_inc(x_233); lean_dec(x_231); -x_234 = l_Lean_Server_Watchdog_handleRequest___lambda__7(x_1, x_2, x_228, x_230, x_232, x_4, x_233); +x_234 = l_Lean_Server_Watchdog_handleRequest___lambda__1(x_3, x_1, x_2, x_230, x_232, x_4, x_233); lean_dec(x_232); lean_dec(x_230); +lean_dec(x_3); return x_234; } else { lean_object* x_235; lean_object* x_236; lean_object* x_237; lean_object* x_238; lean_object* x_239; lean_object* x_240; lean_object* x_241; uint8_t x_242; lean_object* x_243; lean_object* x_244; -lean_dec(x_228); +lean_dec(x_3); lean_dec(x_2); x_235 = lean_ctor_get(x_231, 1); lean_inc(x_235); @@ -19840,6 +11935,7 @@ else { uint8_t x_255; lean_dec(x_4); +lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_255 = !lean_is_exclusive(x_227); @@ -19866,7 +11962,8 @@ return x_258; else { lean_object* x_259; -x_259 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__50(x_3, x_4, x_5); +lean_inc(x_3); +x_259 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__11(x_3, x_4, x_5); if (lean_obj_tag(x_259) == 0) { lean_object* x_260; lean_object* x_261; lean_object* x_262; lean_object* x_263; @@ -19877,6 +11974,7 @@ lean_inc(x_261); lean_dec(x_259); x_262 = lean_ctor_get(x_260, 0); lean_inc(x_262); +lean_dec(x_260); x_263 = l_Lean_Server_Watchdog_findFileWorker(x_262, x_4, x_261); if (lean_obj_tag(x_263) == 0) { @@ -19886,15 +11984,16 @@ lean_inc(x_264); x_265 = lean_ctor_get(x_263, 1); lean_inc(x_265); lean_dec(x_263); -x_266 = l_Lean_Server_Watchdog_handleRequest___lambda__8(x_1, x_2, x_260, x_262, x_264, x_4, x_265); +x_266 = l_Lean_Server_Watchdog_handleRequest___lambda__1(x_3, x_1, x_2, x_262, x_264, x_4, x_265); lean_dec(x_264); lean_dec(x_262); +lean_dec(x_3); return x_266; } else { lean_object* x_267; lean_object* x_268; lean_object* x_269; lean_object* x_270; lean_object* x_271; lean_object* x_272; lean_object* x_273; uint8_t x_274; lean_object* x_275; lean_object* x_276; -lean_dec(x_260); +lean_dec(x_3); lean_dec(x_2); x_267 = lean_ctor_get(x_263, 1); lean_inc(x_267); @@ -19970,6 +12069,7 @@ else { uint8_t x_287; lean_dec(x_4); +lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_287 = !lean_is_exclusive(x_259); @@ -19996,7 +12096,8 @@ return x_290; else { lean_object* x_291; -x_291 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__57(x_3, x_4, x_5); +lean_inc(x_3); +x_291 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__12(x_3, x_4, x_5); if (lean_obj_tag(x_291) == 0) { lean_object* x_292; lean_object* x_293; lean_object* x_294; lean_object* x_295; @@ -20007,6 +12108,7 @@ lean_inc(x_293); lean_dec(x_291); x_294 = lean_ctor_get(x_292, 0); lean_inc(x_294); +lean_dec(x_292); x_295 = l_Lean_Server_Watchdog_findFileWorker(x_294, x_4, x_293); if (lean_obj_tag(x_295) == 0) { @@ -20016,15 +12118,16 @@ lean_inc(x_296); x_297 = lean_ctor_get(x_295, 1); lean_inc(x_297); lean_dec(x_295); -x_298 = l_Lean_Server_Watchdog_handleRequest___lambda__9(x_1, x_2, x_292, x_294, x_296, x_4, x_297); +x_298 = l_Lean_Server_Watchdog_handleRequest___lambda__1(x_3, x_1, x_2, x_294, x_296, x_4, x_297); lean_dec(x_296); lean_dec(x_294); +lean_dec(x_3); return x_298; } else { lean_object* x_299; lean_object* x_300; lean_object* x_301; lean_object* x_302; lean_object* x_303; lean_object* x_304; lean_object* x_305; uint8_t x_306; lean_object* x_307; lean_object* x_308; -lean_dec(x_292); +lean_dec(x_3); lean_dec(x_2); x_299 = lean_ctor_get(x_295, 1); lean_inc(x_299); @@ -20100,6 +12203,7 @@ else { uint8_t x_319; lean_dec(x_4); +lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_319 = !lean_is_exclusive(x_291); @@ -20126,7 +12230,8 @@ return x_322; else { lean_object* x_323; -x_323 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__64(x_3, x_4, x_5); +lean_inc(x_3); +x_323 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__13(x_3, x_4, x_5); if (lean_obj_tag(x_323) == 0) { lean_object* x_324; lean_object* x_325; lean_object* x_326; lean_object* x_327; @@ -20137,6 +12242,7 @@ lean_inc(x_325); lean_dec(x_323); x_326 = lean_ctor_get(x_324, 0); lean_inc(x_326); +lean_dec(x_324); x_327 = l_Lean_Server_Watchdog_findFileWorker(x_326, x_4, x_325); if (lean_obj_tag(x_327) == 0) { @@ -20146,15 +12252,16 @@ lean_inc(x_328); x_329 = lean_ctor_get(x_327, 1); lean_inc(x_329); lean_dec(x_327); -x_330 = l_Lean_Server_Watchdog_handleRequest___lambda__10(x_1, x_2, x_324, x_326, x_328, x_4, x_329); +x_330 = l_Lean_Server_Watchdog_handleRequest___lambda__1(x_3, x_1, x_2, x_326, x_328, x_4, x_329); lean_dec(x_328); lean_dec(x_326); +lean_dec(x_3); return x_330; } else { lean_object* x_331; lean_object* x_332; lean_object* x_333; lean_object* x_334; lean_object* x_335; lean_object* x_336; lean_object* x_337; uint8_t x_338; lean_object* x_339; lean_object* x_340; -lean_dec(x_324); +lean_dec(x_3); lean_dec(x_2); x_331 = lean_ctor_get(x_327, 1); lean_inc(x_331); @@ -20230,6 +12337,7 @@ else { uint8_t x_351; lean_dec(x_4); +lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_351 = !lean_is_exclusive(x_323); @@ -20256,7 +12364,8 @@ return x_354; else { lean_object* x_355; -x_355 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__71(x_3, x_4, x_5); +lean_inc(x_3); +x_355 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__14(x_3, x_4, x_5); if (lean_obj_tag(x_355) == 0) { lean_object* x_356; lean_object* x_357; lean_object* x_358; lean_object* x_359; @@ -20267,6 +12376,7 @@ lean_inc(x_357); lean_dec(x_355); x_358 = lean_ctor_get(x_356, 0); lean_inc(x_358); +lean_dec(x_356); x_359 = l_Lean_Server_Watchdog_findFileWorker(x_358, x_4, x_357); if (lean_obj_tag(x_359) == 0) { @@ -20276,15 +12386,16 @@ lean_inc(x_360); x_361 = lean_ctor_get(x_359, 1); lean_inc(x_361); lean_dec(x_359); -x_362 = l_Lean_Server_Watchdog_handleRequest___lambda__11(x_1, x_2, x_356, x_358, x_360, x_4, x_361); +x_362 = l_Lean_Server_Watchdog_handleRequest___lambda__1(x_3, x_1, x_2, x_358, x_360, x_4, x_361); lean_dec(x_360); lean_dec(x_358); +lean_dec(x_3); return x_362; } else { lean_object* x_363; lean_object* x_364; lean_object* x_365; lean_object* x_366; lean_object* x_367; lean_object* x_368; lean_object* x_369; uint8_t x_370; lean_object* x_371; lean_object* x_372; -lean_dec(x_356); +lean_dec(x_3); lean_dec(x_2); x_363 = lean_ctor_get(x_359, 1); lean_inc(x_363); @@ -20360,6 +12471,7 @@ else { uint8_t x_383; lean_dec(x_4); +lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); x_383 = !lean_is_exclusive(x_355); @@ -20393,67 +12505,40 @@ lean_dec(x_2); return x_4; } } -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__6___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* l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__2___boxed(lean_object* x_1) { _start: { -size_t x_8; size_t x_9; lean_object* x_10; -x_8 = lean_unbox_usize(x_3); -lean_dec(x_3); -x_9 = lean_unbox_usize(x_4); -lean_dec(x_4); -x_10 = l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__6(x_1, x_2, x_8, x_9, x_5, x_6, x_7); -lean_dec(x_6); +lean_object* x_2; +x_2 = l_Lean_Json_toStructured_x3f___at_Lean_Server_Watchdog_handleRequest___spec__2(x_1); +lean_dec(x_1); +return x_2; +} +} +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__5___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__5(x_1, x_2, x_3); lean_dec(x_2); -return x_10; +return x_4; } } -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__7___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__6___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { -size_t x_4; size_t x_5; lean_object* x_6; -x_4 = lean_unbox_usize(x_1); -lean_dec(x_1); -x_5 = lean_unbox_usize(x_2); +lean_object* x_4; +x_4 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__6(x_1, x_2, x_3); lean_dec(x_2); -x_6 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__7(x_4, x_5, x_3); -return x_6; +return x_4; } } -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__5___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* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__7___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { -lean_object* x_7; -x_7 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__5___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_1); -return x_7; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__5___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) { -_start: -{ -uint8_t x_8; lean_object* x_9; -x_8 = lean_unbox(x_1); -lean_dec(x_1); -x_9 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__5___lambda__2(x_8, x_2, x_3, x_4, x_5, x_6, x_7); -lean_dec(x_5); -lean_dec(x_4); +lean_object* x_4; +x_4 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__7(x_1, x_2, x_3); lean_dec(x_2); -return x_9; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__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) { -_start: -{ -uint8_t x_8; uint8_t x_9; lean_object* x_10; -x_8 = lean_unbox(x_4); -lean_dec(x_4); -x_9 = lean_unbox(x_5); -lean_dec(x_5); -x_10 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__5(x_1, x_2, x_3, x_8, x_9, x_6, x_7); -lean_dec(x_1); -return x_10; +return x_4; } } lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__8___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { @@ -20465,717 +12550,60 @@ lean_dec(x_2); return x_4; } } -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__13___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -size_t x_8; size_t x_9; lean_object* x_10; -x_8 = lean_unbox_usize(x_3); -lean_dec(x_3); -x_9 = lean_unbox_usize(x_4); -lean_dec(x_4); -x_10 = l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__13(x_1, x_2, x_8, x_9, x_5, x_6, x_7); -lean_dec(x_6); -lean_dec(x_2); -return x_10; -} -} -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__14___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -size_t x_4; size_t x_5; lean_object* x_6; -x_4 = lean_unbox_usize(x_1); -lean_dec(x_1); -x_5 = lean_unbox_usize(x_2); -lean_dec(x_2); -x_6 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__14(x_4, x_5, x_3); -return x_6; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12___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_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_1); -return x_7; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12___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) { -_start: -{ -uint8_t x_8; lean_object* x_9; -x_8 = lean_unbox(x_1); -lean_dec(x_1); -x_9 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12___lambda__2(x_8, x_2, x_3, x_4, x_5, x_6, x_7); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -return x_9; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -uint8_t x_8; uint8_t x_9; lean_object* x_10; -x_8 = lean_unbox(x_4); -lean_dec(x_4); -x_9 = lean_unbox(x_5); -lean_dec(x_5); -x_10 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12(x_1, x_2, x_3, x_8, x_9, x_6, x_7); -lean_dec(x_1); -return x_10; -} -} -lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__15___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__9___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; -x_4 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__15(x_1, x_2, x_3); +x_4 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__9(x_1, x_2, x_3); lean_dec(x_2); return x_4; } } -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__20___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -size_t x_8; size_t x_9; lean_object* x_10; -x_8 = lean_unbox_usize(x_3); -lean_dec(x_3); -x_9 = lean_unbox_usize(x_4); -lean_dec(x_4); -x_10 = l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__20(x_1, x_2, x_8, x_9, x_5, x_6, x_7); -lean_dec(x_6); -lean_dec(x_2); -return x_10; -} -} -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__21___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -size_t x_4; size_t x_5; lean_object* x_6; -x_4 = lean_unbox_usize(x_1); -lean_dec(x_1); -x_5 = lean_unbox_usize(x_2); -lean_dec(x_2); -x_6 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__21(x_4, x_5, x_3); -return x_6; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___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_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_1); -return x_7; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___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) { -_start: -{ -uint8_t x_8; lean_object* x_9; -x_8 = lean_unbox(x_1); -lean_dec(x_1); -x_9 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___lambda__2(x_8, x_2, x_3, x_4, x_5, x_6, x_7); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -return x_9; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -uint8_t x_8; uint8_t x_9; lean_object* x_10; -x_8 = lean_unbox(x_4); -lean_dec(x_4); -x_9 = lean_unbox(x_5); -lean_dec(x_5); -x_10 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19(x_1, x_2, x_3, x_8, x_9, x_6, x_7); -lean_dec(x_1); -return x_10; -} -} -lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__22___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__10___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; -x_4 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__22(x_1, x_2, x_3); +x_4 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__10(x_1, x_2, x_3); lean_dec(x_2); return x_4; } } -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__27___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -size_t x_8; size_t x_9; lean_object* x_10; -x_8 = lean_unbox_usize(x_3); -lean_dec(x_3); -x_9 = lean_unbox_usize(x_4); -lean_dec(x_4); -x_10 = l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__27(x_1, x_2, x_8, x_9, x_5, x_6, x_7); -lean_dec(x_6); -lean_dec(x_2); -return x_10; -} -} -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__28___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -size_t x_4; size_t x_5; lean_object* x_6; -x_4 = lean_unbox_usize(x_1); -lean_dec(x_1); -x_5 = lean_unbox_usize(x_2); -lean_dec(x_2); -x_6 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__28(x_4, x_5, x_3); -return x_6; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___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_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_1); -return x_7; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___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) { -_start: -{ -uint8_t x_8; lean_object* x_9; -x_8 = lean_unbox(x_1); -lean_dec(x_1); -x_9 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___lambda__2(x_8, x_2, x_3, x_4, x_5, x_6, x_7); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -return x_9; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -uint8_t x_8; uint8_t x_9; lean_object* x_10; -x_8 = lean_unbox(x_4); -lean_dec(x_4); -x_9 = lean_unbox(x_5); -lean_dec(x_5); -x_10 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26(x_1, x_2, x_3, x_8, x_9, x_6, x_7); -lean_dec(x_1); -return x_10; -} -} -lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__29___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__11___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; -x_4 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__29(x_1, x_2, x_3); +x_4 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__11(x_1, x_2, x_3); lean_dec(x_2); return x_4; } } -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__34___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -size_t x_8; size_t x_9; lean_object* x_10; -x_8 = lean_unbox_usize(x_3); -lean_dec(x_3); -x_9 = lean_unbox_usize(x_4); -lean_dec(x_4); -x_10 = l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__34(x_1, x_2, x_8, x_9, x_5, x_6, x_7); -lean_dec(x_6); -lean_dec(x_2); -return x_10; -} -} -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__35___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -size_t x_4; size_t x_5; lean_object* x_6; -x_4 = lean_unbox_usize(x_1); -lean_dec(x_1); -x_5 = lean_unbox_usize(x_2); -lean_dec(x_2); -x_6 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__35(x_4, x_5, x_3); -return x_6; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___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_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_1); -return x_7; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___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) { -_start: -{ -uint8_t x_8; lean_object* x_9; -x_8 = lean_unbox(x_1); -lean_dec(x_1); -x_9 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___lambda__2(x_8, x_2, x_3, x_4, x_5, x_6, x_7); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -return x_9; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -uint8_t x_8; uint8_t x_9; lean_object* x_10; -x_8 = lean_unbox(x_4); -lean_dec(x_4); -x_9 = lean_unbox(x_5); -lean_dec(x_5); -x_10 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33(x_1, x_2, x_3, x_8, x_9, x_6, x_7); -lean_dec(x_1); -return x_10; -} -} -lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__36___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__12___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; -x_4 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__36(x_1, x_2, x_3); +x_4 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__12(x_1, x_2, x_3); lean_dec(x_2); return x_4; } } -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__41___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -size_t x_8; size_t x_9; lean_object* x_10; -x_8 = lean_unbox_usize(x_3); -lean_dec(x_3); -x_9 = lean_unbox_usize(x_4); -lean_dec(x_4); -x_10 = l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__41(x_1, x_2, x_8, x_9, x_5, x_6, x_7); -lean_dec(x_6); -lean_dec(x_2); -return x_10; -} -} -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__42___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -size_t x_4; size_t x_5; lean_object* x_6; -x_4 = lean_unbox_usize(x_1); -lean_dec(x_1); -x_5 = lean_unbox_usize(x_2); -lean_dec(x_2); -x_6 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__42(x_4, x_5, x_3); -return x_6; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__40___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_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__40___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_1); -return x_7; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__40___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) { -_start: -{ -uint8_t x_8; lean_object* x_9; -x_8 = lean_unbox(x_1); -lean_dec(x_1); -x_9 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__40___lambda__2(x_8, x_2, x_3, x_4, x_5, x_6, x_7); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -return x_9; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__40___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -uint8_t x_8; uint8_t x_9; lean_object* x_10; -x_8 = lean_unbox(x_4); -lean_dec(x_4); -x_9 = lean_unbox(x_5); -lean_dec(x_5); -x_10 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__40(x_1, x_2, x_3, x_8, x_9, x_6, x_7); -lean_dec(x_1); -return x_10; -} -} -lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__43___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__13___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; -x_4 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__43(x_1, x_2, x_3); +x_4 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__13(x_1, x_2, x_3); lean_dec(x_2); return x_4; } } -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__48___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -size_t x_8; size_t x_9; lean_object* x_10; -x_8 = lean_unbox_usize(x_3); -lean_dec(x_3); -x_9 = lean_unbox_usize(x_4); -lean_dec(x_4); -x_10 = l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__48(x_1, x_2, x_8, x_9, x_5, x_6, x_7); -lean_dec(x_6); -lean_dec(x_2); -return x_10; -} -} -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__49___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -size_t x_4; size_t x_5; lean_object* x_6; -x_4 = lean_unbox_usize(x_1); -lean_dec(x_1); -x_5 = lean_unbox_usize(x_2); -lean_dec(x_2); -x_6 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__49(x_4, x_5, x_3); -return x_6; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__47___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_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__47___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_1); -return x_7; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__47___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) { -_start: -{ -uint8_t x_8; lean_object* x_9; -x_8 = lean_unbox(x_1); -lean_dec(x_1); -x_9 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__47___lambda__2(x_8, x_2, x_3, x_4, x_5, x_6, x_7); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -return x_9; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__47___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -uint8_t x_8; uint8_t x_9; lean_object* x_10; -x_8 = lean_unbox(x_4); -lean_dec(x_4); -x_9 = lean_unbox(x_5); -lean_dec(x_5); -x_10 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__47(x_1, x_2, x_3, x_8, x_9, x_6, x_7); -lean_dec(x_1); -return x_10; -} -} -lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__50___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__14___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; -x_4 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__50(x_1, x_2, x_3); +x_4 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__14(x_1, x_2, x_3); lean_dec(x_2); return x_4; } } -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__55___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -size_t x_8; size_t x_9; lean_object* x_10; -x_8 = lean_unbox_usize(x_3); -lean_dec(x_3); -x_9 = lean_unbox_usize(x_4); -lean_dec(x_4); -x_10 = l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__55(x_1, x_2, x_8, x_9, x_5, x_6, x_7); -lean_dec(x_6); -lean_dec(x_2); -return x_10; -} -} -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__56___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -size_t x_4; size_t x_5; lean_object* x_6; -x_4 = lean_unbox_usize(x_1); -lean_dec(x_1); -x_5 = lean_unbox_usize(x_2); -lean_dec(x_2); -x_6 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__56(x_4, x_5, x_3); -return x_6; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__54___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_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__54___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_1); -return x_7; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__54___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) { -_start: -{ -uint8_t x_8; lean_object* x_9; -x_8 = lean_unbox(x_1); -lean_dec(x_1); -x_9 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__54___lambda__2(x_8, x_2, x_3, x_4, x_5, x_6, x_7); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -return x_9; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__54___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -uint8_t x_8; uint8_t x_9; lean_object* x_10; -x_8 = lean_unbox(x_4); -lean_dec(x_4); -x_9 = lean_unbox(x_5); -lean_dec(x_5); -x_10 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__54(x_1, x_2, x_3, x_8, x_9, x_6, x_7); -lean_dec(x_1); -return x_10; -} -} -lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__57___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__57(x_1, x_2, x_3); -lean_dec(x_2); -return x_4; -} -} -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__62___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -size_t x_8; size_t x_9; lean_object* x_10; -x_8 = lean_unbox_usize(x_3); -lean_dec(x_3); -x_9 = lean_unbox_usize(x_4); -lean_dec(x_4); -x_10 = l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__62(x_1, x_2, x_8, x_9, x_5, x_6, x_7); -lean_dec(x_6); -lean_dec(x_2); -return x_10; -} -} -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__63___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -size_t x_4; size_t x_5; lean_object* x_6; -x_4 = lean_unbox_usize(x_1); -lean_dec(x_1); -x_5 = lean_unbox_usize(x_2); -lean_dec(x_2); -x_6 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__63(x_4, x_5, x_3); -return x_6; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__61___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_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__61___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_1); -return x_7; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__61___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) { -_start: -{ -uint8_t x_8; lean_object* x_9; -x_8 = lean_unbox(x_1); -lean_dec(x_1); -x_9 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__61___lambda__2(x_8, x_2, x_3, x_4, x_5, x_6, x_7); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -return x_9; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__61___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -uint8_t x_8; uint8_t x_9; lean_object* x_10; -x_8 = lean_unbox(x_4); -lean_dec(x_4); -x_9 = lean_unbox(x_5); -lean_dec(x_5); -x_10 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__61(x_1, x_2, x_3, x_8, x_9, x_6, x_7); -lean_dec(x_1); -return x_10; -} -} -lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__64___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__64(x_1, x_2, x_3); -lean_dec(x_2); -return x_4; -} -} -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__69___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -size_t x_8; size_t x_9; lean_object* x_10; -x_8 = lean_unbox_usize(x_3); -lean_dec(x_3); -x_9 = lean_unbox_usize(x_4); -lean_dec(x_4); -x_10 = l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__69(x_1, x_2, x_8, x_9, x_5, x_6, x_7); -lean_dec(x_6); -lean_dec(x_2); -return x_10; -} -} -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__70___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -size_t x_4; size_t x_5; lean_object* x_6; -x_4 = lean_unbox_usize(x_1); -lean_dec(x_1); -x_5 = lean_unbox_usize(x_2); -lean_dec(x_2); -x_6 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__70(x_4, x_5, x_3); -return x_6; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__68___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_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__68___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_1); -return x_7; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__68___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) { -_start: -{ -uint8_t x_8; lean_object* x_9; -x_8 = lean_unbox(x_1); -lean_dec(x_1); -x_9 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__68___lambda__2(x_8, x_2, x_3, x_4, x_5, x_6, x_7); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -return x_9; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__68___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -uint8_t x_8; uint8_t x_9; lean_object* x_10; -x_8 = lean_unbox(x_4); -lean_dec(x_4); -x_9 = lean_unbox(x_5); -lean_dec(x_5); -x_10 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__68(x_1, x_2, x_3, x_8, x_9, x_6, x_7); -lean_dec(x_1); -return x_10; -} -} -lean_object* l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__71___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_handleRequest___spec__71(x_1, x_2, x_3); -lean_dec(x_2); -return x_4; -} -} -lean_object* l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__74___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -size_t x_8; size_t x_9; lean_object* x_10; -x_8 = lean_unbox_usize(x_3); -lean_dec(x_3); -x_9 = lean_unbox_usize(x_4); -lean_dec(x_4); -x_10 = l_Array_forInUnsafe_loop___at_Lean_Server_Watchdog_handleRequest___spec__74(x_1, x_2, x_8, x_9, x_5, x_6, x_7); -lean_dec(x_6); -lean_dec(x_2); -return x_10; -} -} -lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__75___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -size_t x_4; size_t x_5; lean_object* x_6; -x_4 = lean_unbox_usize(x_1); -lean_dec(x_1); -x_5 = lean_unbox_usize(x_2); -lean_dec(x_2); -x_6 = l_Array_mapMUnsafe_map___at_Lean_Server_Watchdog_handleRequest___spec__75(x_4, x_5, x_3); -return x_6; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__73___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_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__73___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_1); -return x_7; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__73___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) { -_start: -{ -uint8_t x_8; lean_object* x_9; -x_8 = lean_unbox(x_1); -lean_dec(x_1); -x_9 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__73___lambda__2(x_8, x_2, x_3, x_4, x_5, x_6, x_7); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -return x_9; -} -} -lean_object* l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__73___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -uint8_t x_8; uint8_t x_9; lean_object* x_10; -x_8 = lean_unbox(x_4); -lean_dec(x_4); -x_9 = lean_unbox(x_5); -lean_dec(x_5); -x_10 = l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__73(x_1, x_2, x_3, x_8, x_9, x_6, x_7); -lean_dec(x_1); -return x_10; -} -} lean_object* l_Lean_Server_Watchdog_handleRequest___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) { _start: { @@ -21183,104 +12611,7 @@ lean_object* x_8; x_8 = l_Lean_Server_Watchdog_handleRequest___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7); lean_dec(x_5); lean_dec(x_4); -return x_8; -} -} -lean_object* l_Lean_Server_Watchdog_handleRequest___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: -{ -lean_object* x_7; -x_7 = l_Lean_Server_Watchdog_handleRequest___lambda__2(x_1, x_2, x_3, x_4, x_5, x_6); -lean_dec(x_4); -return x_7; -} -} -lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__3___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_Server_Watchdog_handleRequest___lambda__3(x_1, x_2, x_3, x_4, x_5, x_6, x_7); -lean_dec(x_5); -lean_dec(x_4); -return x_8; -} -} -lean_object* l_Lean_Server_Watchdog_handleRequest___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) { -_start: -{ -lean_object* x_7; -x_7 = l_Lean_Server_Watchdog_handleRequest___lambda__4(x_1, x_2, x_3, x_4, x_5, x_6); -lean_dec(x_4); -return x_7; -} -} -lean_object* l_Lean_Server_Watchdog_handleRequest___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) { -_start: -{ -lean_object* x_8; -x_8 = l_Lean_Server_Watchdog_handleRequest___lambda__5(x_1, x_2, x_3, x_4, x_5, x_6, x_7); -lean_dec(x_5); -lean_dec(x_4); -return x_8; -} -} -lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__6___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_Server_Watchdog_handleRequest___lambda__6(x_1, x_2, x_3, x_4, x_5, x_6, x_7); -lean_dec(x_5); -lean_dec(x_4); -return x_8; -} -} -lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__7___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_Server_Watchdog_handleRequest___lambda__7(x_1, x_2, x_3, x_4, x_5, x_6, x_7); -lean_dec(x_5); -lean_dec(x_4); -return x_8; -} -} -lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__8___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_Server_Watchdog_handleRequest___lambda__8(x_1, x_2, x_3, x_4, x_5, x_6, x_7); -lean_dec(x_5); -lean_dec(x_4); -return x_8; -} -} -lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__9___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_Server_Watchdog_handleRequest___lambda__9(x_1, x_2, x_3, x_4, x_5, x_6, x_7); -lean_dec(x_5); -lean_dec(x_4); -return x_8; -} -} -lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__10___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_Server_Watchdog_handleRequest___lambda__10(x_1, x_2, x_3, x_4, x_5, x_6, x_7); -lean_dec(x_5); -lean_dec(x_4); -return x_8; -} -} -lean_object* l_Lean_Server_Watchdog_handleRequest___lambda__11___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_Server_Watchdog_handleRequest___lambda__11(x_1, x_2, x_3, x_4, x_5, x_6, x_7); -lean_dec(x_5); -lean_dec(x_4); +lean_dec(x_1); return x_8; } } @@ -21308,7 +12639,7 @@ if (x_9 == 0) { lean_object* x_10; uint8_t x_11; lean_dec(x_3); -x_10 = l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_handleCancelRequest___spec__8___closed__1; +x_10 = l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_handleCancelRequest___spec__3___closed__1; x_11 = lean_string_dec_eq(x_1, x_10); if (x_11 == 0) { @@ -21487,7 +12818,7 @@ x_8 = lean_string_dec_eq(x_1, x_7); if (x_8 == 0) { lean_object* x_9; uint8_t x_10; -x_9 = l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_handleCancelRequest___spec__8___closed__1; +x_9 = l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_handleCancelRequest___spec__3___closed__1; x_10 = lean_string_dec_eq(x_1, x_9); if (x_10 == 0) { @@ -22122,38 +13453,7 @@ x_2 = lean_alloc_closure((void*)(l_Lean_Server_Watchdog_mainLoop_match__1___rarg return x_2; } } -lean_object* l_Lean_Server_Watchdog_mainLoop_match__2___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -if (lean_obj_tag(x_1) == 0) -{ -lean_object* x_4; lean_object* x_5; -lean_dec(x_2); -x_4 = lean_box(0); -x_5 = lean_apply_1(x_3, x_4); -return x_5; -} -else -{ -lean_object* x_6; lean_object* x_7; -lean_dec(x_3); -x_6 = lean_ctor_get(x_1, 0); -lean_inc(x_6); -lean_dec(x_1); -x_7 = lean_apply_1(x_2, x_6); -return x_7; -} -} -} -lean_object* l_Lean_Server_Watchdog_mainLoop_match__2(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_Server_Watchdog_mainLoop_match__2___rarg), 3, 0); -return x_2; -} -} -static lean_object* _init_l_Lean_Server_Watchdog_mainLoop_match__3___rarg___closed__1() { +static lean_object* _init_l_Lean_Server_Watchdog_mainLoop_match__2___rarg___closed__1() { _start: { lean_object* x_1; @@ -22161,7 +13461,7 @@ x_1 = lean_mk_string("shutdown"); return x_1; } } -lean_object* l_Lean_Server_Watchdog_mainLoop_match__3___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +lean_object* l_Lean_Server_Watchdog_mainLoop_match__2___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { switch (lean_obj_tag(x_1)) { @@ -22176,7 +13476,7 @@ x_8 = lean_ctor_get(x_1, 1); lean_inc(x_8); x_9 = lean_ctor_get(x_1, 2); lean_inc(x_9); -x_10 = l_Lean_Server_Watchdog_mainLoop_match__3___rarg___closed__1; +x_10 = l_Lean_Server_Watchdog_mainLoop_match__2___rarg___closed__1; x_11 = lean_string_dec_eq(x_8, x_10); if (x_11 == 0) { @@ -22319,15 +13619,15 @@ return x_33; } } } -lean_object* l_Lean_Server_Watchdog_mainLoop_match__3(lean_object* x_1) { +lean_object* l_Lean_Server_Watchdog_mainLoop_match__2(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_Server_Watchdog_mainLoop_match__3___rarg), 6, 0); +x_2 = lean_alloc_closure((void*)(l_Lean_Server_Watchdog_mainLoop_match__2___rarg), 6, 0); return x_2; } } -lean_object* l_Lean_Server_Watchdog_mainLoop_match__4___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +lean_object* l_Lean_Server_Watchdog_mainLoop_match__3___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { switch (lean_obj_tag(x_1)) { @@ -22378,15 +13678,15 @@ return x_13; } } } -lean_object* l_Lean_Server_Watchdog_mainLoop_match__4(lean_object* x_1) { +lean_object* l_Lean_Server_Watchdog_mainLoop_match__3(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_Server_Watchdog_mainLoop_match__4___rarg), 5, 0); +x_2 = lean_alloc_closure((void*)(l_Lean_Server_Watchdog_mainLoop_match__3___rarg), 5, 0); return x_2; } } -lean_object* l_Lean_Server_Watchdog_mainLoop_match__5___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +lean_object* l_Lean_Server_Watchdog_mainLoop_match__4___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { switch (lean_obj_tag(x_1)) { @@ -22428,11 +13728,11 @@ return x_11; } } } -lean_object* l_Lean_Server_Watchdog_mainLoop_match__5(lean_object* x_1) { +lean_object* l_Lean_Server_Watchdog_mainLoop_match__4(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_Server_Watchdog_mainLoop_match__5___rarg), 4, 0); +x_2 = lean_alloc_closure((void*)(l_Lean_Server_Watchdog_mainLoop_match__4___rarg), 4, 0); return x_2; } } @@ -22674,6 +13974,14 @@ return x_1; static lean_object* _init_l_Lean_Server_Watchdog_mainLoop___closed__5() { _start: { +lean_object* x_1; +x_1 = lean_mk_string("File changed."); +return x_1; +} +} +static lean_object* _init_l_Lean_Server_Watchdog_mainLoop___closed__6() { +_start: +{ lean_object* x_1; lean_object* x_2; x_1 = lean_box(0); x_2 = lean_task_pure(x_1); @@ -22683,30 +13991,30 @@ return x_2; lean_object* l_Lean_Server_Watchdog_mainLoop(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { -lean_object* x_4; lean_object* x_5; lean_object* x_600; lean_object* x_601; lean_object* x_602; lean_object* x_603; lean_object* x_604; lean_object* x_605; lean_object* x_606; lean_object* x_607; lean_object* x_608; -x_600 = lean_ctor_get(x_2, 4); -lean_inc(x_600); -x_601 = lean_st_ref_get(x_600, x_3); -lean_dec(x_600); -x_602 = lean_ctor_get(x_601, 0); -lean_inc(x_602); -x_603 = lean_ctor_get(x_601, 1); -lean_inc(x_603); -lean_dec(x_601); -x_604 = l_Array_empty___closed__1; -x_605 = l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_mainLoop___spec__3(x_602, x_604, x_2, x_603); -x_606 = lean_ctor_get(x_605, 0); -lean_inc(x_606); -x_607 = lean_ctor_get(x_605, 1); -lean_inc(x_607); -lean_dec(x_605); -x_608 = lean_ctor_get(x_606, 0); -lean_inc(x_608); -lean_dec(x_606); -x_4 = x_608; -x_5 = x_607; -goto block_599; -block_599: +lean_object* x_4; lean_object* x_5; lean_object* x_658; lean_object* x_659; lean_object* x_660; lean_object* x_661; lean_object* x_662; lean_object* x_663; lean_object* x_664; lean_object* x_665; lean_object* x_666; +x_658 = lean_ctor_get(x_2, 4); +lean_inc(x_658); +x_659 = lean_st_ref_get(x_658, x_3); +lean_dec(x_658); +x_660 = lean_ctor_get(x_659, 0); +lean_inc(x_660); +x_661 = lean_ctor_get(x_659, 1); +lean_inc(x_661); +lean_dec(x_659); +x_662 = l_Array_empty___closed__1; +x_663 = l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_mainLoop___spec__3(x_660, x_662, x_2, x_661); +x_664 = lean_ctor_get(x_663, 0); +lean_inc(x_664); +x_665 = lean_ctor_get(x_663, 1); +lean_inc(x_665); +lean_dec(x_663); +x_666 = lean_ctor_get(x_664, 0); +lean_inc(x_666); +lean_dec(x_664); +x_4 = x_666; +x_5 = x_665; +goto block_657; +block_657: { lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_inc(x_1); @@ -22899,7 +14207,7 @@ lean_inc(x_54); x_55 = lean_ctor_get(x_51, 2); lean_inc(x_55); lean_dec(x_51); -x_56 = l_Lean_Server_Watchdog_mainLoop_match__3___rarg___closed__1; +x_56 = l_Lean_Server_Watchdog_mainLoop_match__2___rarg___closed__1; x_57 = lean_string_dec_eq(x_54, x_56); if (x_57 == 0) { @@ -23371,7 +14679,7 @@ lean_dec(x_155); x_158 = lean_io_mono_ms_now(x_157); if (lean_obj_tag(x_158) == 0) { -lean_object* x_159; lean_object* x_160; lean_object* x_161; lean_object* x_162; lean_object* x_163; uint8_t x_164; lean_object* x_165; lean_object* x_212; lean_object* x_213; +lean_object* x_159; lean_object* x_160; lean_object* x_161; lean_object* x_162; lean_object* x_163; uint8_t x_164; lean_object* x_165; lean_object* x_223; lean_object* x_224; x_159 = lean_ctor_get(x_158, 0); lean_inc(x_159); x_160 = lean_ctor_get(x_158, 1); @@ -23384,345 +14692,357 @@ lean_dec(x_161); lean_dec(x_159); x_163 = lean_ctor_get(x_156, 5); lean_inc(x_163); -x_212 = lean_st_ref_take(x_163, x_160); -x_213 = lean_ctor_get(x_212, 0); -lean_inc(x_213); -if (lean_obj_tag(x_213) == 0) +x_223 = lean_st_ref_take(x_163, x_160); +x_224 = lean_ctor_get(x_223, 0); +lean_inc(x_224); +if (lean_obj_tag(x_224) == 0) { -lean_object* x_214; lean_object* x_215; lean_object* x_216; lean_object* x_217; lean_object* x_218; uint8_t x_219; +lean_object* x_225; lean_object* x_226; lean_object* x_227; lean_object* x_228; lean_object* x_229; lean_object* x_230; uint8_t x_231; lean_dec(x_153); lean_dec(x_152); -x_214 = lean_ctor_get(x_212, 1); -lean_inc(x_214); -lean_dec(x_212); -x_215 = l_Lean_Server_Watchdog_mainLoop___closed__5; -x_216 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_216, 0, x_162); -lean_ctor_set(x_216, 1, x_150); -lean_ctor_set(x_216, 2, x_215); -lean_ctor_set(x_105, 0, x_216); -x_217 = lean_st_ref_set(x_163, x_105, x_214); -x_218 = lean_ctor_get(x_217, 1); -lean_inc(x_218); -lean_dec(x_217); -x_219 = 1; -x_164 = x_219; -x_165 = x_218; -goto block_211; -} -else -{ -uint8_t x_220; -lean_free_object(x_105); -x_220 = !lean_is_exclusive(x_150); -if (x_220 == 0) -{ -lean_object* x_221; lean_object* x_222; uint8_t x_223; -x_221 = lean_ctor_get(x_150, 1); -lean_dec(x_221); -x_222 = lean_ctor_get(x_150, 0); -lean_dec(x_222); -x_223 = !lean_is_exclusive(x_213); -if (x_223 == 0) -{ -lean_object* x_224; lean_object* x_225; uint8_t x_226; -x_224 = lean_ctor_get(x_213, 0); -x_225 = lean_ctor_get(x_212, 1); +x_225 = lean_ctor_get(x_223, 1); lean_inc(x_225); -lean_dec(x_212); -x_226 = !lean_is_exclusive(x_224); -if (x_226 == 0) -{ -lean_object* x_227; lean_object* x_228; lean_object* x_229; lean_object* x_230; lean_object* x_231; lean_object* x_232; uint8_t x_233; -x_227 = lean_ctor_get(x_224, 1); -x_228 = lean_ctor_get(x_224, 0); -lean_dec(x_228); -x_229 = lean_ctor_get(x_227, 1); -lean_inc(x_229); -lean_dec(x_227); -x_230 = l_Array_append___rarg(x_229, x_153); -lean_dec(x_153); -lean_ctor_set(x_150, 1, x_230); -lean_ctor_set(x_224, 1, x_150); -lean_ctor_set(x_224, 0, x_162); -x_231 = lean_st_ref_set(x_163, x_213, x_225); -x_232 = lean_ctor_get(x_231, 1); -lean_inc(x_232); -lean_dec(x_231); -x_233 = 0; -x_164 = x_233; -x_165 = x_232; -goto block_211; +lean_dec(x_223); +x_226 = l_Lean_Server_Watchdog_mainLoop___closed__6; +x_227 = l_Array_empty___closed__1; +x_228 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_228, 0, x_162); +lean_ctor_set(x_228, 1, x_150); +lean_ctor_set(x_228, 2, x_226); +lean_ctor_set(x_228, 3, x_227); +lean_ctor_set(x_105, 0, x_228); +x_229 = lean_st_ref_set(x_163, x_105, x_225); +x_230 = lean_ctor_get(x_229, 1); +lean_inc(x_230); +lean_dec(x_229); +x_231 = 0; +x_164 = x_231; +x_165 = x_230; +goto block_222; } else { -lean_object* x_234; lean_object* x_235; lean_object* x_236; lean_object* x_237; lean_object* x_238; lean_object* x_239; lean_object* x_240; uint8_t x_241; -x_234 = lean_ctor_get(x_224, 1); -x_235 = lean_ctor_get(x_224, 2); -lean_inc(x_235); -lean_inc(x_234); -lean_dec(x_224); -x_236 = lean_ctor_get(x_234, 1); -lean_inc(x_236); +uint8_t x_232; +lean_free_object(x_105); +x_232 = !lean_is_exclusive(x_150); +if (x_232 == 0) +{ +lean_object* x_233; lean_object* x_234; uint8_t x_235; +x_233 = lean_ctor_get(x_150, 1); +lean_dec(x_233); +x_234 = lean_ctor_get(x_150, 0); lean_dec(x_234); -x_237 = l_Array_append___rarg(x_236, x_153); -lean_dec(x_153); -lean_ctor_set(x_150, 1, x_237); -x_238 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_238, 0, x_162); -lean_ctor_set(x_238, 1, x_150); -lean_ctor_set(x_238, 2, x_235); -lean_ctor_set(x_213, 0, x_238); -x_239 = lean_st_ref_set(x_163, x_213, x_225); -x_240 = lean_ctor_get(x_239, 1); -lean_inc(x_240); -lean_dec(x_239); -x_241 = 0; -x_164 = x_241; -x_165 = x_240; -goto block_211; -} -} -else +x_235 = !lean_is_exclusive(x_224); +if (x_235 == 0) { -lean_object* x_242; lean_object* x_243; lean_object* x_244; lean_object* x_245; lean_object* x_246; lean_object* x_247; lean_object* x_248; lean_object* x_249; lean_object* x_250; lean_object* x_251; lean_object* x_252; uint8_t x_253; -x_242 = lean_ctor_get(x_213, 0); +lean_object* x_236; lean_object* x_237; uint8_t x_238; +x_236 = lean_ctor_get(x_224, 0); +x_237 = lean_ctor_get(x_223, 1); +lean_inc(x_237); +lean_dec(x_223); +x_238 = !lean_is_exclusive(x_236); +if (x_238 == 0) +{ +lean_object* x_239; lean_object* x_240; lean_object* x_241; lean_object* x_242; lean_object* x_243; lean_object* x_244; lean_object* x_245; lean_object* x_246; uint8_t x_247; +x_239 = lean_ctor_get(x_236, 1); +x_240 = lean_ctor_get(x_236, 3); +lean_dec(x_240); +x_241 = lean_ctor_get(x_236, 0); +lean_dec(x_241); +x_242 = lean_ctor_get(x_239, 1); lean_inc(x_242); -lean_dec(x_213); -x_243 = lean_ctor_get(x_212, 1); -lean_inc(x_243); -lean_dec(x_212); -x_244 = lean_ctor_get(x_242, 1); -lean_inc(x_244); -x_245 = lean_ctor_get(x_242, 2); -lean_inc(x_245); -if (lean_is_exclusive(x_242)) { - lean_ctor_release(x_242, 0); - lean_ctor_release(x_242, 1); - lean_ctor_release(x_242, 2); - x_246 = x_242; -} else { - lean_dec_ref(x_242); - x_246 = lean_box(0); -} -x_247 = lean_ctor_get(x_244, 1); -lean_inc(x_247); -lean_dec(x_244); -x_248 = l_Array_append___rarg(x_247, x_153); +lean_dec(x_239); +x_243 = l_Array_append___rarg(x_242, x_153); lean_dec(x_153); -lean_ctor_set(x_150, 1, x_248); -if (lean_is_scalar(x_246)) { - x_249 = lean_alloc_ctor(0, 3, 0); -} else { - x_249 = x_246; +lean_ctor_set(x_150, 1, x_243); +x_244 = l_Array_empty___closed__1; +lean_ctor_set(x_236, 3, x_244); +lean_ctor_set(x_236, 1, x_150); +lean_ctor_set(x_236, 0, x_162); +x_245 = lean_st_ref_set(x_163, x_224, x_237); +x_246 = lean_ctor_get(x_245, 1); +lean_inc(x_246); +lean_dec(x_245); +x_247 = 1; +x_164 = x_247; +x_165 = x_246; +goto block_222; } -lean_ctor_set(x_249, 0, x_162); -lean_ctor_set(x_249, 1, x_150); -lean_ctor_set(x_249, 2, x_245); -x_250 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_250, 0, x_249); -x_251 = lean_st_ref_set(x_163, x_250, x_243); -x_252 = lean_ctor_get(x_251, 1); -lean_inc(x_252); -lean_dec(x_251); -x_253 = 0; -x_164 = x_253; -x_165 = x_252; -goto block_211; +else +{ +lean_object* x_248; lean_object* x_249; lean_object* x_250; lean_object* x_251; lean_object* x_252; lean_object* x_253; lean_object* x_254; lean_object* x_255; uint8_t x_256; +x_248 = lean_ctor_get(x_236, 1); +x_249 = lean_ctor_get(x_236, 2); +lean_inc(x_249); +lean_inc(x_248); +lean_dec(x_236); +x_250 = lean_ctor_get(x_248, 1); +lean_inc(x_250); +lean_dec(x_248); +x_251 = l_Array_append___rarg(x_250, x_153); +lean_dec(x_153); +lean_ctor_set(x_150, 1, x_251); +x_252 = l_Array_empty___closed__1; +x_253 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_253, 0, x_162); +lean_ctor_set(x_253, 1, x_150); +lean_ctor_set(x_253, 2, x_249); +lean_ctor_set(x_253, 3, x_252); +lean_ctor_set(x_224, 0, x_253); +x_254 = lean_st_ref_set(x_163, x_224, x_237); +x_255 = lean_ctor_get(x_254, 1); +lean_inc(x_255); +lean_dec(x_254); +x_256 = 1; +x_164 = x_256; +x_165 = x_255; +goto block_222; } } else { -lean_object* x_254; lean_object* x_255; lean_object* x_256; lean_object* x_257; lean_object* x_258; lean_object* x_259; lean_object* x_260; lean_object* x_261; lean_object* x_262; lean_object* x_263; lean_object* x_264; lean_object* x_265; lean_object* x_266; uint8_t x_267; -lean_dec(x_150); -x_254 = lean_ctor_get(x_213, 0); -lean_inc(x_254); -if (lean_is_exclusive(x_213)) { - lean_ctor_release(x_213, 0); - x_255 = x_213; -} else { - lean_dec_ref(x_213); - x_255 = lean_box(0); -} -x_256 = lean_ctor_get(x_212, 1); -lean_inc(x_256); -lean_dec(x_212); -x_257 = lean_ctor_get(x_254, 1); +lean_object* x_257; lean_object* x_258; lean_object* x_259; lean_object* x_260; lean_object* x_261; lean_object* x_262; lean_object* x_263; lean_object* x_264; lean_object* x_265; lean_object* x_266; lean_object* x_267; lean_object* x_268; uint8_t x_269; +x_257 = lean_ctor_get(x_224, 0); lean_inc(x_257); -x_258 = lean_ctor_get(x_254, 2); +lean_dec(x_224); +x_258 = lean_ctor_get(x_223, 1); lean_inc(x_258); -if (lean_is_exclusive(x_254)) { - lean_ctor_release(x_254, 0); - lean_ctor_release(x_254, 1); - lean_ctor_release(x_254, 2); - x_259 = x_254; -} else { - lean_dec_ref(x_254); - x_259 = lean_box(0); -} -x_260 = lean_ctor_get(x_257, 1); +lean_dec(x_223); +x_259 = lean_ctor_get(x_257, 1); +lean_inc(x_259); +x_260 = lean_ctor_get(x_257, 2); lean_inc(x_260); -lean_dec(x_257); -x_261 = l_Array_append___rarg(x_260, x_153); +if (lean_is_exclusive(x_257)) { + lean_ctor_release(x_257, 0); + lean_ctor_release(x_257, 1); + lean_ctor_release(x_257, 2); + lean_ctor_release(x_257, 3); + x_261 = x_257; +} else { + lean_dec_ref(x_257); + x_261 = lean_box(0); +} +x_262 = lean_ctor_get(x_259, 1); +lean_inc(x_262); +lean_dec(x_259); +x_263 = l_Array_append___rarg(x_262, x_153); lean_dec(x_153); -x_262 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_262, 0, x_152); -lean_ctor_set(x_262, 1, x_261); -if (lean_is_scalar(x_259)) { - x_263 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_150, 1, x_263); +x_264 = l_Array_empty___closed__1; +if (lean_is_scalar(x_261)) { + x_265 = lean_alloc_ctor(0, 4, 0); } else { - x_263 = x_259; + x_265 = x_261; } -lean_ctor_set(x_263, 0, x_162); -lean_ctor_set(x_263, 1, x_262); -lean_ctor_set(x_263, 2, x_258); -if (lean_is_scalar(x_255)) { - x_264 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_265, 0, x_162); +lean_ctor_set(x_265, 1, x_150); +lean_ctor_set(x_265, 2, x_260); +lean_ctor_set(x_265, 3, x_264); +x_266 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_266, 0, x_265); +x_267 = lean_st_ref_set(x_163, x_266, x_258); +x_268 = lean_ctor_get(x_267, 1); +lean_inc(x_268); +lean_dec(x_267); +x_269 = 1; +x_164 = x_269; +x_165 = x_268; +goto block_222; +} +} +else +{ +lean_object* x_270; lean_object* x_271; lean_object* x_272; lean_object* x_273; lean_object* x_274; lean_object* x_275; lean_object* x_276; lean_object* x_277; lean_object* x_278; lean_object* x_279; lean_object* x_280; lean_object* x_281; lean_object* x_282; lean_object* x_283; uint8_t x_284; +lean_dec(x_150); +x_270 = lean_ctor_get(x_224, 0); +lean_inc(x_270); +if (lean_is_exclusive(x_224)) { + lean_ctor_release(x_224, 0); + x_271 = x_224; } else { - x_264 = x_255; + lean_dec_ref(x_224); + x_271 = lean_box(0); } -lean_ctor_set(x_264, 0, x_263); -x_265 = lean_st_ref_set(x_163, x_264, x_256); -x_266 = lean_ctor_get(x_265, 1); -lean_inc(x_266); -lean_dec(x_265); -x_267 = 0; -x_164 = x_267; -x_165 = x_266; -goto block_211; +x_272 = lean_ctor_get(x_223, 1); +lean_inc(x_272); +lean_dec(x_223); +x_273 = lean_ctor_get(x_270, 1); +lean_inc(x_273); +x_274 = lean_ctor_get(x_270, 2); +lean_inc(x_274); +if (lean_is_exclusive(x_270)) { + lean_ctor_release(x_270, 0); + lean_ctor_release(x_270, 1); + lean_ctor_release(x_270, 2); + lean_ctor_release(x_270, 3); + x_275 = x_270; +} else { + lean_dec_ref(x_270); + x_275 = lean_box(0); +} +x_276 = lean_ctor_get(x_273, 1); +lean_inc(x_276); +lean_dec(x_273); +x_277 = l_Array_append___rarg(x_276, x_153); +lean_dec(x_153); +x_278 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_278, 0, x_152); +lean_ctor_set(x_278, 1, x_277); +x_279 = l_Array_empty___closed__1; +if (lean_is_scalar(x_275)) { + x_280 = lean_alloc_ctor(0, 4, 0); +} else { + x_280 = x_275; +} +lean_ctor_set(x_280, 0, x_162); +lean_ctor_set(x_280, 1, x_278); +lean_ctor_set(x_280, 2, x_274); +lean_ctor_set(x_280, 3, x_279); +if (lean_is_scalar(x_271)) { + x_281 = lean_alloc_ctor(1, 1, 0); +} else { + x_281 = x_271; +} +lean_ctor_set(x_281, 0, x_280); +x_282 = lean_st_ref_set(x_163, x_281, x_272); +x_283 = lean_ctor_get(x_282, 1); +lean_inc(x_283); +lean_dec(x_282); +x_284 = 1; +x_164 = x_284; +x_165 = x_283; +goto block_222; } } -block_211: +block_222: { lean_object* x_166; x_166 = l_Lean_Server_Watchdog_mainLoop___closed__4; if (x_164 == 0) { -lean_object* x_167; lean_object* x_168; -lean_dec(x_163); -lean_dec(x_156); -x_167 = lean_box(0); -x_168 = lean_apply_3(x_166, x_167, x_2, x_165); -return x_168; -} -else +lean_object* x_167; +x_167 = l_Lean_Server_Watchdog_FileWorker_runEditsSignalTask(x_156, x_165); +if (lean_obj_tag(x_167) == 0) { -lean_object* x_169; -x_169 = l_Lean_Server_Watchdog_FileWorker_runEditsSignalTask(x_156, x_165); -if (lean_obj_tag(x_169) == 0) -{ -lean_object* x_170; lean_object* x_171; lean_object* x_172; lean_object* x_173; -x_170 = lean_ctor_get(x_169, 0); -lean_inc(x_170); -x_171 = lean_ctor_get(x_169, 1); +lean_object* x_168; lean_object* x_169; lean_object* x_170; lean_object* x_171; +x_168 = lean_ctor_get(x_167, 0); +lean_inc(x_168); +x_169 = lean_ctor_get(x_167, 1); +lean_inc(x_169); +lean_dec(x_167); +x_170 = lean_st_ref_take(x_163, x_169); +x_171 = lean_ctor_get(x_170, 0); lean_inc(x_171); -lean_dec(x_169); -x_172 = lean_st_ref_take(x_163, x_171); -x_173 = lean_ctor_get(x_172, 0); -lean_inc(x_173); -if (lean_obj_tag(x_173) == 0) +if (lean_obj_tag(x_171) == 0) { -lean_object* x_174; lean_object* x_175; lean_object* x_176; lean_object* x_177; lean_object* x_178; lean_object* x_179; +lean_object* x_172; lean_object* x_173; lean_object* x_174; lean_object* x_175; lean_object* x_176; lean_object* x_177; +lean_dec(x_168); +x_172 = lean_ctor_get(x_170, 1); +lean_inc(x_172); lean_dec(x_170); -x_174 = lean_ctor_get(x_172, 1); -lean_inc(x_174); -lean_dec(x_172); -x_175 = lean_box(0); -x_176 = lean_st_ref_set(x_163, x_175, x_174); +x_173 = lean_box(0); +x_174 = lean_st_ref_set(x_163, x_173, x_172); lean_dec(x_163); -x_177 = lean_ctor_get(x_176, 0); -lean_inc(x_177); -x_178 = lean_ctor_get(x_176, 1); -lean_inc(x_178); -lean_dec(x_176); -x_179 = lean_apply_3(x_166, x_177, x_2, x_178); -return x_179; +x_175 = lean_ctor_get(x_174, 0); +lean_inc(x_175); +x_176 = lean_ctor_get(x_174, 1); +lean_inc(x_176); +lean_dec(x_174); +x_177 = lean_apply_3(x_166, x_175, x_2, x_176); +return x_177; } else { -uint8_t x_180; -x_180 = !lean_is_exclusive(x_173); -if (x_180 == 0) +uint8_t x_178; +x_178 = !lean_is_exclusive(x_171); +if (x_178 == 0) { -lean_object* x_181; lean_object* x_182; uint8_t x_183; -x_181 = lean_ctor_get(x_173, 0); -x_182 = lean_ctor_get(x_172, 1); -lean_inc(x_182); -lean_dec(x_172); -x_183 = !lean_is_exclusive(x_181); -if (x_183 == 0) +lean_object* x_179; lean_object* x_180; uint8_t x_181; +x_179 = lean_ctor_get(x_171, 0); +x_180 = lean_ctor_get(x_170, 1); +lean_inc(x_180); +lean_dec(x_170); +x_181 = !lean_is_exclusive(x_179); +if (x_181 == 0) { -lean_object* x_184; lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; -x_184 = lean_ctor_get(x_181, 2); -lean_dec(x_184); -lean_ctor_set(x_181, 2, x_170); -x_185 = lean_st_ref_set(x_163, x_173, x_182); +lean_object* x_182; lean_object* x_183; lean_object* x_184; lean_object* x_185; lean_object* x_186; +x_182 = lean_ctor_get(x_179, 2); +lean_dec(x_182); +lean_ctor_set(x_179, 2, x_168); +x_183 = lean_st_ref_set(x_163, x_171, x_180); lean_dec(x_163); -x_186 = lean_ctor_get(x_185, 0); -lean_inc(x_186); -x_187 = lean_ctor_get(x_185, 1); -lean_inc(x_187); -lean_dec(x_185); -x_188 = lean_apply_3(x_166, x_186, x_2, x_187); -return x_188; +x_184 = lean_ctor_get(x_183, 0); +lean_inc(x_184); +x_185 = lean_ctor_get(x_183, 1); +lean_inc(x_185); +lean_dec(x_183); +x_186 = lean_apply_3(x_166, x_184, x_2, x_185); +return x_186; } else { -lean_object* x_189; lean_object* x_190; lean_object* x_191; lean_object* x_192; lean_object* x_193; lean_object* x_194; lean_object* x_195; -x_189 = lean_ctor_get(x_181, 0); -x_190 = lean_ctor_get(x_181, 1); -lean_inc(x_190); +lean_object* x_187; lean_object* x_188; lean_object* x_189; lean_object* x_190; lean_object* x_191; lean_object* x_192; lean_object* x_193; lean_object* x_194; +x_187 = lean_ctor_get(x_179, 0); +x_188 = lean_ctor_get(x_179, 1); +x_189 = lean_ctor_get(x_179, 3); lean_inc(x_189); -lean_dec(x_181); -x_191 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_191, 0, x_189); -lean_ctor_set(x_191, 1, x_190); -lean_ctor_set(x_191, 2, x_170); -lean_ctor_set(x_173, 0, x_191); -x_192 = lean_st_ref_set(x_163, x_173, x_182); +lean_inc(x_188); +lean_inc(x_187); +lean_dec(x_179); +x_190 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_190, 0, x_187); +lean_ctor_set(x_190, 1, x_188); +lean_ctor_set(x_190, 2, x_168); +lean_ctor_set(x_190, 3, x_189); +lean_ctor_set(x_171, 0, x_190); +x_191 = lean_st_ref_set(x_163, x_171, x_180); lean_dec(x_163); -x_193 = lean_ctor_get(x_192, 0); +x_192 = lean_ctor_get(x_191, 0); +lean_inc(x_192); +x_193 = lean_ctor_get(x_191, 1); lean_inc(x_193); -x_194 = lean_ctor_get(x_192, 1); -lean_inc(x_194); -lean_dec(x_192); -x_195 = lean_apply_3(x_166, x_193, x_2, x_194); -return x_195; +lean_dec(x_191); +x_194 = lean_apply_3(x_166, x_192, x_2, x_193); +return x_194; } } else { -lean_object* x_196; lean_object* x_197; lean_object* x_198; lean_object* x_199; lean_object* x_200; lean_object* x_201; lean_object* x_202; lean_object* x_203; lean_object* x_204; lean_object* x_205; lean_object* x_206; -x_196 = lean_ctor_get(x_173, 0); +lean_object* x_195; lean_object* x_196; lean_object* x_197; lean_object* x_198; lean_object* x_199; lean_object* x_200; lean_object* x_201; lean_object* x_202; lean_object* x_203; lean_object* x_204; lean_object* x_205; lean_object* x_206; +x_195 = lean_ctor_get(x_171, 0); +lean_inc(x_195); +lean_dec(x_171); +x_196 = lean_ctor_get(x_170, 1); lean_inc(x_196); -lean_dec(x_173); -x_197 = lean_ctor_get(x_172, 1); +lean_dec(x_170); +x_197 = lean_ctor_get(x_195, 0); lean_inc(x_197); -lean_dec(x_172); -x_198 = lean_ctor_get(x_196, 0); +x_198 = lean_ctor_get(x_195, 1); lean_inc(x_198); -x_199 = lean_ctor_get(x_196, 1); +x_199 = lean_ctor_get(x_195, 3); lean_inc(x_199); -if (lean_is_exclusive(x_196)) { - lean_ctor_release(x_196, 0); - lean_ctor_release(x_196, 1); - lean_ctor_release(x_196, 2); - x_200 = x_196; +if (lean_is_exclusive(x_195)) { + lean_ctor_release(x_195, 0); + lean_ctor_release(x_195, 1); + lean_ctor_release(x_195, 2); + lean_ctor_release(x_195, 3); + x_200 = x_195; } else { - lean_dec_ref(x_196); + lean_dec_ref(x_195); x_200 = lean_box(0); } if (lean_is_scalar(x_200)) { - x_201 = lean_alloc_ctor(0, 3, 0); + x_201 = lean_alloc_ctor(0, 4, 0); } else { x_201 = x_200; } -lean_ctor_set(x_201, 0, x_198); -lean_ctor_set(x_201, 1, x_199); -lean_ctor_set(x_201, 2, x_170); +lean_ctor_set(x_201, 0, x_197); +lean_ctor_set(x_201, 1, x_198); +lean_ctor_set(x_201, 2, x_168); +lean_ctor_set(x_201, 3, x_199); x_202 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_202, 0, x_201); -x_203 = lean_st_ref_set(x_163, x_202, x_197); +x_203 = lean_st_ref_set(x_163, x_202, x_196); lean_dec(x_163); x_204 = lean_ctor_get(x_203, 0); lean_inc(x_204); @@ -23739,19 +15059,19 @@ else uint8_t x_207; lean_dec(x_163); lean_dec(x_2); -x_207 = !lean_is_exclusive(x_169); +x_207 = !lean_is_exclusive(x_167); if (x_207 == 0) { -return x_169; +return x_167; } else { lean_object* x_208; lean_object* x_209; lean_object* x_210; -x_208 = lean_ctor_get(x_169, 0); -x_209 = lean_ctor_get(x_169, 1); +x_208 = lean_ctor_get(x_167, 0); +x_209 = lean_ctor_get(x_167, 1); lean_inc(x_209); lean_inc(x_208); -lean_dec(x_169); +lean_dec(x_167); x_210 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_210, 0, x_208); lean_ctor_set(x_210, 1, x_209); @@ -23759,927 +15079,968 @@ return x_210; } } } +else +{ +lean_object* x_211; uint8_t x_212; lean_object* x_213; lean_object* x_214; +lean_dec(x_163); +x_211 = lean_ctor_get(x_2, 1); +lean_inc(x_211); +x_212 = 10; +x_213 = l_Lean_Server_Watchdog_mainLoop___closed__5; +x_214 = l_Lean_Server_Watchdog_FileWorker_errorPendingRequests(x_156, x_211, x_212, x_213, x_165); +lean_dec(x_156); +if (lean_obj_tag(x_214) == 0) +{ +lean_object* x_215; lean_object* x_216; lean_object* x_217; +x_215 = lean_ctor_get(x_214, 0); +lean_inc(x_215); +x_216 = lean_ctor_get(x_214, 1); +lean_inc(x_216); +lean_dec(x_214); +x_217 = lean_apply_3(x_166, x_215, x_2, x_216); +return x_217; +} +else +{ +uint8_t x_218; +lean_dec(x_2); +x_218 = !lean_is_exclusive(x_214); +if (x_218 == 0) +{ +return x_214; +} +else +{ +lean_object* x_219; lean_object* x_220; lean_object* x_221; +x_219 = lean_ctor_get(x_214, 0); +x_220 = lean_ctor_get(x_214, 1); +lean_inc(x_220); +lean_inc(x_219); +lean_dec(x_214); +x_221 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_221, 0, x_219); +lean_ctor_set(x_221, 1, x_220); +return x_221; +} +} +} } } else { -uint8_t x_268; +uint8_t x_285; lean_dec(x_156); lean_dec(x_153); lean_dec(x_152); lean_dec(x_150); lean_free_object(x_105); lean_dec(x_2); -x_268 = !lean_is_exclusive(x_158); -if (x_268 == 0) +x_285 = !lean_is_exclusive(x_158); +if (x_285 == 0) { return x_158; } else { -lean_object* x_269; lean_object* x_270; lean_object* x_271; -x_269 = lean_ctor_get(x_158, 0); -x_270 = lean_ctor_get(x_158, 1); -lean_inc(x_270); -lean_inc(x_269); +lean_object* x_286; lean_object* x_287; lean_object* x_288; +x_286 = lean_ctor_get(x_158, 0); +x_287 = lean_ctor_get(x_158, 1); +lean_inc(x_287); +lean_inc(x_286); lean_dec(x_158); -x_271 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_271, 0, x_269); -lean_ctor_set(x_271, 1, x_270); -return x_271; +x_288 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_288, 0, x_286); +lean_ctor_set(x_288, 1, x_287); +return x_288; } } } else { -uint8_t x_272; +uint8_t x_289; lean_dec(x_153); lean_dec(x_152); lean_dec(x_150); lean_free_object(x_105); lean_dec(x_2); -x_272 = !lean_is_exclusive(x_155); -if (x_272 == 0) +x_289 = !lean_is_exclusive(x_155); +if (x_289 == 0) { return x_155; } else { -lean_object* x_273; lean_object* x_274; lean_object* x_275; -x_273 = lean_ctor_get(x_155, 0); -x_274 = lean_ctor_get(x_155, 1); -lean_inc(x_274); -lean_inc(x_273); +lean_object* x_290; lean_object* x_291; lean_object* x_292; +x_290 = lean_ctor_get(x_155, 0); +x_291 = lean_ctor_get(x_155, 1); +lean_inc(x_291); +lean_inc(x_290); lean_dec(x_155); -x_275 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_275, 0, x_273); -lean_ctor_set(x_275, 1, x_274); -return x_275; +x_292 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_292, 0, x_290); +lean_ctor_set(x_292, 1, x_291); +return x_292; } } } else { -uint8_t x_276; +uint8_t x_293; lean_free_object(x_105); lean_dec(x_2); -x_276 = !lean_is_exclusive(x_149); -if (x_276 == 0) +x_293 = !lean_is_exclusive(x_149); +if (x_293 == 0) { return x_149; } else { -lean_object* x_277; lean_object* x_278; lean_object* x_279; -x_277 = lean_ctor_get(x_149, 0); -x_278 = lean_ctor_get(x_149, 1); -lean_inc(x_278); -lean_inc(x_277); -lean_dec(x_149); -x_279 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_279, 0, x_277); -lean_ctor_set(x_279, 1, x_278); -return x_279; -} -} -} -else -{ -lean_object* x_280; lean_object* x_281; lean_object* x_282; -x_280 = lean_ctor_get(x_146, 0); -lean_inc(x_280); -lean_dec(x_146); -x_281 = lean_alloc_ctor(5, 1, 0); -lean_ctor_set(x_281, 0, x_280); -x_282 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_mainLoop___spec__2(x_281, x_2, x_103); -if (lean_obj_tag(x_282) == 0) -{ -lean_object* x_283; lean_object* x_284; lean_object* x_285; lean_object* x_286; lean_object* x_287; lean_object* x_288; -x_283 = lean_ctor_get(x_282, 0); -lean_inc(x_283); -x_284 = lean_ctor_get(x_282, 1); -lean_inc(x_284); -lean_dec(x_282); -x_285 = lean_ctor_get(x_283, 0); -lean_inc(x_285); -x_286 = lean_ctor_get(x_283, 1); -lean_inc(x_286); -x_287 = lean_ctor_get(x_285, 0); -lean_inc(x_287); -x_288 = l_Lean_Server_Watchdog_findFileWorker(x_287, x_2, x_284); -lean_dec(x_287); -if (lean_obj_tag(x_288) == 0) -{ -lean_object* x_289; lean_object* x_290; lean_object* x_291; -x_289 = lean_ctor_get(x_288, 0); -lean_inc(x_289); -x_290 = lean_ctor_get(x_288, 1); -lean_inc(x_290); -lean_dec(x_288); -x_291 = lean_io_mono_ms_now(x_290); -if (lean_obj_tag(x_291) == 0) -{ -lean_object* x_292; lean_object* x_293; lean_object* x_294; lean_object* x_295; lean_object* x_296; uint8_t x_297; lean_object* x_298; lean_object* x_345; lean_object* x_346; -x_292 = lean_ctor_get(x_291, 0); -lean_inc(x_292); -x_293 = lean_ctor_get(x_291, 1); -lean_inc(x_293); -lean_dec(x_291); -x_294 = lean_ctor_get(x_2, 6); +lean_object* x_294; lean_object* x_295; lean_object* x_296; +x_294 = lean_ctor_get(x_149, 0); +x_295 = lean_ctor_get(x_149, 1); +lean_inc(x_295); lean_inc(x_294); -x_295 = lean_nat_add(x_292, x_294); -lean_dec(x_294); -lean_dec(x_292); -x_296 = lean_ctor_get(x_289, 5); -lean_inc(x_296); -x_345 = lean_st_ref_take(x_296, x_293); -x_346 = lean_ctor_get(x_345, 0); -lean_inc(x_346); -if (lean_obj_tag(x_346) == 0) -{ -lean_object* x_347; lean_object* x_348; lean_object* x_349; lean_object* x_350; lean_object* x_351; uint8_t x_352; -lean_dec(x_286); -lean_dec(x_285); -x_347 = lean_ctor_get(x_345, 1); -lean_inc(x_347); -lean_dec(x_345); -x_348 = l_Lean_Server_Watchdog_mainLoop___closed__5; -x_349 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_349, 0, x_295); -lean_ctor_set(x_349, 1, x_283); -lean_ctor_set(x_349, 2, x_348); -lean_ctor_set(x_105, 0, x_349); -x_350 = lean_st_ref_set(x_296, x_105, x_347); -x_351 = lean_ctor_get(x_350, 1); -lean_inc(x_351); -lean_dec(x_350); -x_352 = 1; -x_297 = x_352; -x_298 = x_351; -goto block_344; +lean_dec(x_149); +x_296 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_296, 0, x_294); +lean_ctor_set(x_296, 1, x_295); +return x_296; } -else -{ -uint8_t x_353; -lean_free_object(x_105); -x_353 = !lean_is_exclusive(x_283); -if (x_353 == 0) -{ -lean_object* x_354; lean_object* x_355; uint8_t x_356; -x_354 = lean_ctor_get(x_283, 1); -lean_dec(x_354); -x_355 = lean_ctor_get(x_283, 0); -lean_dec(x_355); -x_356 = !lean_is_exclusive(x_346); -if (x_356 == 0) -{ -lean_object* x_357; lean_object* x_358; uint8_t x_359; -x_357 = lean_ctor_get(x_346, 0); -x_358 = lean_ctor_get(x_345, 1); -lean_inc(x_358); -lean_dec(x_345); -x_359 = !lean_is_exclusive(x_357); -if (x_359 == 0) -{ -lean_object* x_360; lean_object* x_361; lean_object* x_362; lean_object* x_363; lean_object* x_364; lean_object* x_365; uint8_t x_366; -x_360 = lean_ctor_get(x_357, 1); -x_361 = lean_ctor_get(x_357, 0); -lean_dec(x_361); -x_362 = lean_ctor_get(x_360, 1); -lean_inc(x_362); -lean_dec(x_360); -x_363 = l_Array_append___rarg(x_362, x_286); -lean_dec(x_286); -lean_ctor_set(x_283, 1, x_363); -lean_ctor_set(x_357, 1, x_283); -lean_ctor_set(x_357, 0, x_295); -x_364 = lean_st_ref_set(x_296, x_346, x_358); -x_365 = lean_ctor_get(x_364, 1); -lean_inc(x_365); -lean_dec(x_364); -x_366 = 0; -x_297 = x_366; -x_298 = x_365; -goto block_344; -} -else -{ -lean_object* x_367; lean_object* x_368; lean_object* x_369; lean_object* x_370; lean_object* x_371; lean_object* x_372; lean_object* x_373; uint8_t x_374; -x_367 = lean_ctor_get(x_357, 1); -x_368 = lean_ctor_get(x_357, 2); -lean_inc(x_368); -lean_inc(x_367); -lean_dec(x_357); -x_369 = lean_ctor_get(x_367, 1); -lean_inc(x_369); -lean_dec(x_367); -x_370 = l_Array_append___rarg(x_369, x_286); -lean_dec(x_286); -lean_ctor_set(x_283, 1, x_370); -x_371 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_371, 0, x_295); -lean_ctor_set(x_371, 1, x_283); -lean_ctor_set(x_371, 2, x_368); -lean_ctor_set(x_346, 0, x_371); -x_372 = lean_st_ref_set(x_296, x_346, x_358); -x_373 = lean_ctor_get(x_372, 1); -lean_inc(x_373); -lean_dec(x_372); -x_374 = 0; -x_297 = x_374; -x_298 = x_373; -goto block_344; } } else { -lean_object* x_375; lean_object* x_376; lean_object* x_377; lean_object* x_378; lean_object* x_379; lean_object* x_380; lean_object* x_381; lean_object* x_382; lean_object* x_383; lean_object* x_384; lean_object* x_385; uint8_t x_386; -x_375 = lean_ctor_get(x_346, 0); -lean_inc(x_375); -lean_dec(x_346); -x_376 = lean_ctor_get(x_345, 1); -lean_inc(x_376); -lean_dec(x_345); -x_377 = lean_ctor_get(x_375, 1); -lean_inc(x_377); -x_378 = lean_ctor_get(x_375, 2); -lean_inc(x_378); -if (lean_is_exclusive(x_375)) { - lean_ctor_release(x_375, 0); - lean_ctor_release(x_375, 1); - lean_ctor_release(x_375, 2); - x_379 = x_375; -} else { - lean_dec_ref(x_375); - x_379 = lean_box(0); -} -x_380 = lean_ctor_get(x_377, 1); -lean_inc(x_380); -lean_dec(x_377); -x_381 = l_Array_append___rarg(x_380, x_286); -lean_dec(x_286); -lean_ctor_set(x_283, 1, x_381); -if (lean_is_scalar(x_379)) { - x_382 = lean_alloc_ctor(0, 3, 0); -} else { - x_382 = x_379; -} -lean_ctor_set(x_382, 0, x_295); -lean_ctor_set(x_382, 1, x_283); -lean_ctor_set(x_382, 2, x_378); -x_383 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_383, 0, x_382); -x_384 = lean_st_ref_set(x_296, x_383, x_376); -x_385 = lean_ctor_get(x_384, 1); -lean_inc(x_385); -lean_dec(x_384); -x_386 = 0; -x_297 = x_386; -x_298 = x_385; -goto block_344; -} -} -else +lean_object* x_297; lean_object* x_298; lean_object* x_299; +x_297 = lean_ctor_get(x_146, 0); +lean_inc(x_297); +lean_dec(x_146); +x_298 = lean_alloc_ctor(5, 1, 0); +lean_ctor_set(x_298, 0, x_297); +x_299 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_mainLoop___spec__2(x_298, x_2, x_103); +if (lean_obj_tag(x_299) == 0) { -lean_object* x_387; lean_object* x_388; lean_object* x_389; lean_object* x_390; lean_object* x_391; lean_object* x_392; lean_object* x_393; lean_object* x_394; lean_object* x_395; lean_object* x_396; lean_object* x_397; lean_object* x_398; lean_object* x_399; uint8_t x_400; -lean_dec(x_283); -x_387 = lean_ctor_get(x_346, 0); -lean_inc(x_387); -if (lean_is_exclusive(x_346)) { - lean_ctor_release(x_346, 0); - x_388 = x_346; -} else { - lean_dec_ref(x_346); - x_388 = lean_box(0); -} -x_389 = lean_ctor_get(x_345, 1); -lean_inc(x_389); -lean_dec(x_345); -x_390 = lean_ctor_get(x_387, 1); -lean_inc(x_390); -x_391 = lean_ctor_get(x_387, 2); -lean_inc(x_391); -if (lean_is_exclusive(x_387)) { - lean_ctor_release(x_387, 0); - lean_ctor_release(x_387, 1); - lean_ctor_release(x_387, 2); - x_392 = x_387; -} else { - lean_dec_ref(x_387); - x_392 = lean_box(0); -} -x_393 = lean_ctor_get(x_390, 1); -lean_inc(x_393); -lean_dec(x_390); -x_394 = l_Array_append___rarg(x_393, x_286); -lean_dec(x_286); -x_395 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_395, 0, x_285); -lean_ctor_set(x_395, 1, x_394); -if (lean_is_scalar(x_392)) { - x_396 = lean_alloc_ctor(0, 3, 0); -} else { - x_396 = x_392; -} -lean_ctor_set(x_396, 0, x_295); -lean_ctor_set(x_396, 1, x_395); -lean_ctor_set(x_396, 2, x_391); -if (lean_is_scalar(x_388)) { - x_397 = lean_alloc_ctor(1, 1, 0); -} else { - x_397 = x_388; -} -lean_ctor_set(x_397, 0, x_396); -x_398 = lean_st_ref_set(x_296, x_397, x_389); -x_399 = lean_ctor_get(x_398, 1); -lean_inc(x_399); -lean_dec(x_398); -x_400 = 0; -x_297 = x_400; -x_298 = x_399; -goto block_344; -} -} -block_344: -{ -lean_object* x_299; -x_299 = l_Lean_Server_Watchdog_mainLoop___closed__4; -if (x_297 == 0) -{ -lean_object* x_300; lean_object* x_301; -lean_dec(x_296); -lean_dec(x_289); -x_300 = lean_box(0); -x_301 = lean_apply_3(x_299, x_300, x_2, x_298); -return x_301; -} -else -{ -lean_object* x_302; -x_302 = l_Lean_Server_Watchdog_FileWorker_runEditsSignalTask(x_289, x_298); -if (lean_obj_tag(x_302) == 0) -{ -lean_object* x_303; lean_object* x_304; lean_object* x_305; lean_object* x_306; -x_303 = lean_ctor_get(x_302, 0); +lean_object* x_300; lean_object* x_301; lean_object* x_302; lean_object* x_303; lean_object* x_304; lean_object* x_305; +x_300 = lean_ctor_get(x_299, 0); +lean_inc(x_300); +x_301 = lean_ctor_get(x_299, 1); +lean_inc(x_301); +lean_dec(x_299); +x_302 = lean_ctor_get(x_300, 0); +lean_inc(x_302); +x_303 = lean_ctor_get(x_300, 1); lean_inc(x_303); -x_304 = lean_ctor_get(x_302, 1); +x_304 = lean_ctor_get(x_302, 0); lean_inc(x_304); -lean_dec(x_302); -x_305 = lean_st_ref_take(x_296, x_304); +x_305 = l_Lean_Server_Watchdog_findFileWorker(x_304, x_2, x_301); +lean_dec(x_304); +if (lean_obj_tag(x_305) == 0) +{ +lean_object* x_306; lean_object* x_307; lean_object* x_308; x_306 = lean_ctor_get(x_305, 0); lean_inc(x_306); -if (lean_obj_tag(x_306) == 0) -{ -lean_object* x_307; lean_object* x_308; lean_object* x_309; lean_object* x_310; lean_object* x_311; lean_object* x_312; -lean_dec(x_303); x_307 = lean_ctor_get(x_305, 1); lean_inc(x_307); lean_dec(x_305); -x_308 = lean_box(0); -x_309 = lean_st_ref_set(x_296, x_308, x_307); -lean_dec(x_296); -x_310 = lean_ctor_get(x_309, 0); +x_308 = lean_io_mono_ms_now(x_307); +if (lean_obj_tag(x_308) == 0) +{ +lean_object* x_309; lean_object* x_310; lean_object* x_311; lean_object* x_312; lean_object* x_313; uint8_t x_314; lean_object* x_315; lean_object* x_373; lean_object* x_374; +x_309 = lean_ctor_get(x_308, 0); +lean_inc(x_309); +x_310 = lean_ctor_get(x_308, 1); lean_inc(x_310); -x_311 = lean_ctor_get(x_309, 1); +lean_dec(x_308); +x_311 = lean_ctor_get(x_2, 6); lean_inc(x_311); +x_312 = lean_nat_add(x_309, x_311); +lean_dec(x_311); lean_dec(x_309); -x_312 = lean_apply_3(x_299, x_310, x_2, x_311); -return x_312; -} -else +x_313 = lean_ctor_get(x_306, 5); +lean_inc(x_313); +x_373 = lean_st_ref_take(x_313, x_310); +x_374 = lean_ctor_get(x_373, 0); +lean_inc(x_374); +if (lean_obj_tag(x_374) == 0) { -uint8_t x_313; -x_313 = !lean_is_exclusive(x_306); -if (x_313 == 0) -{ -lean_object* x_314; lean_object* x_315; uint8_t x_316; -x_314 = lean_ctor_get(x_306, 0); -x_315 = lean_ctor_get(x_305, 1); -lean_inc(x_315); -lean_dec(x_305); -x_316 = !lean_is_exclusive(x_314); -if (x_316 == 0) -{ -lean_object* x_317; lean_object* x_318; lean_object* x_319; lean_object* x_320; lean_object* x_321; -x_317 = lean_ctor_get(x_314, 2); -lean_dec(x_317); -lean_ctor_set(x_314, 2, x_303); -x_318 = lean_st_ref_set(x_296, x_306, x_315); -lean_dec(x_296); -x_319 = lean_ctor_get(x_318, 0); -lean_inc(x_319); -x_320 = lean_ctor_get(x_318, 1); -lean_inc(x_320); -lean_dec(x_318); -x_321 = lean_apply_3(x_299, x_319, x_2, x_320); -return x_321; -} -else -{ -lean_object* x_322; lean_object* x_323; lean_object* x_324; lean_object* x_325; lean_object* x_326; lean_object* x_327; lean_object* x_328; -x_322 = lean_ctor_get(x_314, 0); -x_323 = lean_ctor_get(x_314, 1); -lean_inc(x_323); -lean_inc(x_322); -lean_dec(x_314); -x_324 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_324, 0, x_322); -lean_ctor_set(x_324, 1, x_323); -lean_ctor_set(x_324, 2, x_303); -lean_ctor_set(x_306, 0, x_324); -x_325 = lean_st_ref_set(x_296, x_306, x_315); -lean_dec(x_296); -x_326 = lean_ctor_get(x_325, 0); -lean_inc(x_326); -x_327 = lean_ctor_get(x_325, 1); -lean_inc(x_327); -lean_dec(x_325); -x_328 = lean_apply_3(x_299, x_326, x_2, x_327); -return x_328; -} -} -else -{ -lean_object* x_329; lean_object* x_330; lean_object* x_331; lean_object* x_332; lean_object* x_333; lean_object* x_334; lean_object* x_335; lean_object* x_336; lean_object* x_337; lean_object* x_338; lean_object* x_339; -x_329 = lean_ctor_get(x_306, 0); -lean_inc(x_329); -lean_dec(x_306); -x_330 = lean_ctor_get(x_305, 1); -lean_inc(x_330); -lean_dec(x_305); -x_331 = lean_ctor_get(x_329, 0); -lean_inc(x_331); -x_332 = lean_ctor_get(x_329, 1); -lean_inc(x_332); -if (lean_is_exclusive(x_329)) { - lean_ctor_release(x_329, 0); - lean_ctor_release(x_329, 1); - lean_ctor_release(x_329, 2); - x_333 = x_329; -} else { - lean_dec_ref(x_329); - x_333 = lean_box(0); -} -if (lean_is_scalar(x_333)) { - x_334 = lean_alloc_ctor(0, 3, 0); -} else { - x_334 = x_333; -} -lean_ctor_set(x_334, 0, x_331); -lean_ctor_set(x_334, 1, x_332); -lean_ctor_set(x_334, 2, x_303); -x_335 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_335, 0, x_334); -x_336 = lean_st_ref_set(x_296, x_335, x_330); -lean_dec(x_296); -x_337 = lean_ctor_get(x_336, 0); -lean_inc(x_337); -x_338 = lean_ctor_get(x_336, 1); -lean_inc(x_338); -lean_dec(x_336); -x_339 = lean_apply_3(x_299, x_337, x_2, x_338); -return x_339; -} -} -} -else -{ -uint8_t x_340; -lean_dec(x_296); -lean_dec(x_2); -x_340 = !lean_is_exclusive(x_302); -if (x_340 == 0) -{ -return x_302; -} -else -{ -lean_object* x_341; lean_object* x_342; lean_object* x_343; -x_341 = lean_ctor_get(x_302, 0); -x_342 = lean_ctor_get(x_302, 1); -lean_inc(x_342); -lean_inc(x_341); +lean_object* x_375; lean_object* x_376; lean_object* x_377; lean_object* x_378; lean_object* x_379; lean_object* x_380; uint8_t x_381; +lean_dec(x_303); lean_dec(x_302); -x_343 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_343, 0, x_341); -lean_ctor_set(x_343, 1, x_342); -return x_343; -} -} -} -} +x_375 = lean_ctor_get(x_373, 1); +lean_inc(x_375); +lean_dec(x_373); +x_376 = l_Lean_Server_Watchdog_mainLoop___closed__6; +x_377 = l_Array_empty___closed__1; +x_378 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_378, 0, x_312); +lean_ctor_set(x_378, 1, x_300); +lean_ctor_set(x_378, 2, x_376); +lean_ctor_set(x_378, 3, x_377); +lean_ctor_set(x_105, 0, x_378); +x_379 = lean_st_ref_set(x_313, x_105, x_375); +x_380 = lean_ctor_get(x_379, 1); +lean_inc(x_380); +lean_dec(x_379); +x_381 = 0; +x_314 = x_381; +x_315 = x_380; +goto block_372; } else { -uint8_t x_401; -lean_dec(x_289); -lean_dec(x_286); -lean_dec(x_285); -lean_dec(x_283); +uint8_t x_382; lean_free_object(x_105); -lean_dec(x_2); -x_401 = !lean_is_exclusive(x_291); -if (x_401 == 0) +x_382 = !lean_is_exclusive(x_300); +if (x_382 == 0) { -return x_291; +lean_object* x_383; lean_object* x_384; uint8_t x_385; +x_383 = lean_ctor_get(x_300, 1); +lean_dec(x_383); +x_384 = lean_ctor_get(x_300, 0); +lean_dec(x_384); +x_385 = !lean_is_exclusive(x_374); +if (x_385 == 0) +{ +lean_object* x_386; lean_object* x_387; uint8_t x_388; +x_386 = lean_ctor_get(x_374, 0); +x_387 = lean_ctor_get(x_373, 1); +lean_inc(x_387); +lean_dec(x_373); +x_388 = !lean_is_exclusive(x_386); +if (x_388 == 0) +{ +lean_object* x_389; lean_object* x_390; lean_object* x_391; lean_object* x_392; lean_object* x_393; lean_object* x_394; lean_object* x_395; lean_object* x_396; uint8_t x_397; +x_389 = lean_ctor_get(x_386, 1); +x_390 = lean_ctor_get(x_386, 3); +lean_dec(x_390); +x_391 = lean_ctor_get(x_386, 0); +lean_dec(x_391); +x_392 = lean_ctor_get(x_389, 1); +lean_inc(x_392); +lean_dec(x_389); +x_393 = l_Array_append___rarg(x_392, x_303); +lean_dec(x_303); +lean_ctor_set(x_300, 1, x_393); +x_394 = l_Array_empty___closed__1; +lean_ctor_set(x_386, 3, x_394); +lean_ctor_set(x_386, 1, x_300); +lean_ctor_set(x_386, 0, x_312); +x_395 = lean_st_ref_set(x_313, x_374, x_387); +x_396 = lean_ctor_get(x_395, 1); +lean_inc(x_396); +lean_dec(x_395); +x_397 = 1; +x_314 = x_397; +x_315 = x_396; +goto block_372; } else { -lean_object* x_402; lean_object* x_403; lean_object* x_404; -x_402 = lean_ctor_get(x_291, 0); -x_403 = lean_ctor_get(x_291, 1); -lean_inc(x_403); -lean_inc(x_402); -lean_dec(x_291); -x_404 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_404, 0, x_402); -lean_ctor_set(x_404, 1, x_403); -return x_404; -} +lean_object* x_398; lean_object* x_399; lean_object* x_400; lean_object* x_401; lean_object* x_402; lean_object* x_403; lean_object* x_404; lean_object* x_405; uint8_t x_406; +x_398 = lean_ctor_get(x_386, 1); +x_399 = lean_ctor_get(x_386, 2); +lean_inc(x_399); +lean_inc(x_398); +lean_dec(x_386); +x_400 = lean_ctor_get(x_398, 1); +lean_inc(x_400); +lean_dec(x_398); +x_401 = l_Array_append___rarg(x_400, x_303); +lean_dec(x_303); +lean_ctor_set(x_300, 1, x_401); +x_402 = l_Array_empty___closed__1; +x_403 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_403, 0, x_312); +lean_ctor_set(x_403, 1, x_300); +lean_ctor_set(x_403, 2, x_399); +lean_ctor_set(x_403, 3, x_402); +lean_ctor_set(x_374, 0, x_403); +x_404 = lean_st_ref_set(x_313, x_374, x_387); +x_405 = lean_ctor_get(x_404, 1); +lean_inc(x_405); +lean_dec(x_404); +x_406 = 1; +x_314 = x_406; +x_315 = x_405; +goto block_372; } } else { -uint8_t x_405; -lean_dec(x_286); -lean_dec(x_285); -lean_dec(x_283); -lean_free_object(x_105); -lean_dec(x_2); -x_405 = !lean_is_exclusive(x_288); -if (x_405 == 0) -{ -return x_288; -} -else -{ -lean_object* x_406; lean_object* x_407; lean_object* x_408; -x_406 = lean_ctor_get(x_288, 0); -x_407 = lean_ctor_get(x_288, 1); +lean_object* x_407; lean_object* x_408; lean_object* x_409; lean_object* x_410; lean_object* x_411; lean_object* x_412; lean_object* x_413; lean_object* x_414; lean_object* x_415; lean_object* x_416; lean_object* x_417; lean_object* x_418; uint8_t x_419; +x_407 = lean_ctor_get(x_374, 0); lean_inc(x_407); -lean_inc(x_406); -lean_dec(x_288); -x_408 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_408, 0, x_406); -lean_ctor_set(x_408, 1, x_407); -return x_408; +lean_dec(x_374); +x_408 = lean_ctor_get(x_373, 1); +lean_inc(x_408); +lean_dec(x_373); +x_409 = lean_ctor_get(x_407, 1); +lean_inc(x_409); +x_410 = lean_ctor_get(x_407, 2); +lean_inc(x_410); +if (lean_is_exclusive(x_407)) { + lean_ctor_release(x_407, 0); + lean_ctor_release(x_407, 1); + lean_ctor_release(x_407, 2); + lean_ctor_release(x_407, 3); + x_411 = x_407; +} else { + lean_dec_ref(x_407); + x_411 = lean_box(0); +} +x_412 = lean_ctor_get(x_409, 1); +lean_inc(x_412); +lean_dec(x_409); +x_413 = l_Array_append___rarg(x_412, x_303); +lean_dec(x_303); +lean_ctor_set(x_300, 1, x_413); +x_414 = l_Array_empty___closed__1; +if (lean_is_scalar(x_411)) { + x_415 = lean_alloc_ctor(0, 4, 0); +} else { + x_415 = x_411; +} +lean_ctor_set(x_415, 0, x_312); +lean_ctor_set(x_415, 1, x_300); +lean_ctor_set(x_415, 2, x_410); +lean_ctor_set(x_415, 3, x_414); +x_416 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_416, 0, x_415); +x_417 = lean_st_ref_set(x_313, x_416, x_408); +x_418 = lean_ctor_get(x_417, 1); +lean_inc(x_418); +lean_dec(x_417); +x_419 = 1; +x_314 = x_419; +x_315 = x_418; +goto block_372; +} +} +else +{ +lean_object* x_420; lean_object* x_421; lean_object* x_422; lean_object* x_423; lean_object* x_424; lean_object* x_425; lean_object* x_426; lean_object* x_427; lean_object* x_428; lean_object* x_429; lean_object* x_430; lean_object* x_431; lean_object* x_432; lean_object* x_433; uint8_t x_434; +lean_dec(x_300); +x_420 = lean_ctor_get(x_374, 0); +lean_inc(x_420); +if (lean_is_exclusive(x_374)) { + lean_ctor_release(x_374, 0); + x_421 = x_374; +} else { + lean_dec_ref(x_374); + x_421 = lean_box(0); +} +x_422 = lean_ctor_get(x_373, 1); +lean_inc(x_422); +lean_dec(x_373); +x_423 = lean_ctor_get(x_420, 1); +lean_inc(x_423); +x_424 = lean_ctor_get(x_420, 2); +lean_inc(x_424); +if (lean_is_exclusive(x_420)) { + lean_ctor_release(x_420, 0); + lean_ctor_release(x_420, 1); + lean_ctor_release(x_420, 2); + lean_ctor_release(x_420, 3); + x_425 = x_420; +} else { + lean_dec_ref(x_420); + x_425 = lean_box(0); +} +x_426 = lean_ctor_get(x_423, 1); +lean_inc(x_426); +lean_dec(x_423); +x_427 = l_Array_append___rarg(x_426, x_303); +lean_dec(x_303); +x_428 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_428, 0, x_302); +lean_ctor_set(x_428, 1, x_427); +x_429 = l_Array_empty___closed__1; +if (lean_is_scalar(x_425)) { + x_430 = lean_alloc_ctor(0, 4, 0); +} else { + x_430 = x_425; +} +lean_ctor_set(x_430, 0, x_312); +lean_ctor_set(x_430, 1, x_428); +lean_ctor_set(x_430, 2, x_424); +lean_ctor_set(x_430, 3, x_429); +if (lean_is_scalar(x_421)) { + x_431 = lean_alloc_ctor(1, 1, 0); +} else { + x_431 = x_421; +} +lean_ctor_set(x_431, 0, x_430); +x_432 = lean_st_ref_set(x_313, x_431, x_422); +x_433 = lean_ctor_get(x_432, 1); +lean_inc(x_433); +lean_dec(x_432); +x_434 = 1; +x_314 = x_434; +x_315 = x_433; +goto block_372; +} +} +block_372: +{ +lean_object* x_316; +x_316 = l_Lean_Server_Watchdog_mainLoop___closed__4; +if (x_314 == 0) +{ +lean_object* x_317; +x_317 = l_Lean_Server_Watchdog_FileWorker_runEditsSignalTask(x_306, x_315); +if (lean_obj_tag(x_317) == 0) +{ +lean_object* x_318; lean_object* x_319; lean_object* x_320; lean_object* x_321; +x_318 = lean_ctor_get(x_317, 0); +lean_inc(x_318); +x_319 = lean_ctor_get(x_317, 1); +lean_inc(x_319); +lean_dec(x_317); +x_320 = lean_st_ref_take(x_313, x_319); +x_321 = lean_ctor_get(x_320, 0); +lean_inc(x_321); +if (lean_obj_tag(x_321) == 0) +{ +lean_object* x_322; lean_object* x_323; lean_object* x_324; lean_object* x_325; lean_object* x_326; lean_object* x_327; +lean_dec(x_318); +x_322 = lean_ctor_get(x_320, 1); +lean_inc(x_322); +lean_dec(x_320); +x_323 = lean_box(0); +x_324 = lean_st_ref_set(x_313, x_323, x_322); +lean_dec(x_313); +x_325 = lean_ctor_get(x_324, 0); +lean_inc(x_325); +x_326 = lean_ctor_get(x_324, 1); +lean_inc(x_326); +lean_dec(x_324); +x_327 = lean_apply_3(x_316, x_325, x_2, x_326); +return x_327; +} +else +{ +uint8_t x_328; +x_328 = !lean_is_exclusive(x_321); +if (x_328 == 0) +{ +lean_object* x_329; lean_object* x_330; uint8_t x_331; +x_329 = lean_ctor_get(x_321, 0); +x_330 = lean_ctor_get(x_320, 1); +lean_inc(x_330); +lean_dec(x_320); +x_331 = !lean_is_exclusive(x_329); +if (x_331 == 0) +{ +lean_object* x_332; lean_object* x_333; lean_object* x_334; lean_object* x_335; lean_object* x_336; +x_332 = lean_ctor_get(x_329, 2); +lean_dec(x_332); +lean_ctor_set(x_329, 2, x_318); +x_333 = lean_st_ref_set(x_313, x_321, x_330); +lean_dec(x_313); +x_334 = lean_ctor_get(x_333, 0); +lean_inc(x_334); +x_335 = lean_ctor_get(x_333, 1); +lean_inc(x_335); +lean_dec(x_333); +x_336 = lean_apply_3(x_316, x_334, x_2, x_335); +return x_336; +} +else +{ +lean_object* x_337; lean_object* x_338; lean_object* x_339; lean_object* x_340; lean_object* x_341; lean_object* x_342; lean_object* x_343; lean_object* x_344; +x_337 = lean_ctor_get(x_329, 0); +x_338 = lean_ctor_get(x_329, 1); +x_339 = lean_ctor_get(x_329, 3); +lean_inc(x_339); +lean_inc(x_338); +lean_inc(x_337); +lean_dec(x_329); +x_340 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_340, 0, x_337); +lean_ctor_set(x_340, 1, x_338); +lean_ctor_set(x_340, 2, x_318); +lean_ctor_set(x_340, 3, x_339); +lean_ctor_set(x_321, 0, x_340); +x_341 = lean_st_ref_set(x_313, x_321, x_330); +lean_dec(x_313); +x_342 = lean_ctor_get(x_341, 0); +lean_inc(x_342); +x_343 = lean_ctor_get(x_341, 1); +lean_inc(x_343); +lean_dec(x_341); +x_344 = lean_apply_3(x_316, x_342, x_2, x_343); +return x_344; +} +} +else +{ +lean_object* x_345; lean_object* x_346; lean_object* x_347; lean_object* x_348; lean_object* x_349; lean_object* x_350; lean_object* x_351; lean_object* x_352; lean_object* x_353; lean_object* x_354; lean_object* x_355; lean_object* x_356; +x_345 = lean_ctor_get(x_321, 0); +lean_inc(x_345); +lean_dec(x_321); +x_346 = lean_ctor_get(x_320, 1); +lean_inc(x_346); +lean_dec(x_320); +x_347 = lean_ctor_get(x_345, 0); +lean_inc(x_347); +x_348 = lean_ctor_get(x_345, 1); +lean_inc(x_348); +x_349 = lean_ctor_get(x_345, 3); +lean_inc(x_349); +if (lean_is_exclusive(x_345)) { + lean_ctor_release(x_345, 0); + lean_ctor_release(x_345, 1); + lean_ctor_release(x_345, 2); + lean_ctor_release(x_345, 3); + x_350 = x_345; +} else { + lean_dec_ref(x_345); + x_350 = lean_box(0); +} +if (lean_is_scalar(x_350)) { + x_351 = lean_alloc_ctor(0, 4, 0); +} else { + x_351 = x_350; +} +lean_ctor_set(x_351, 0, x_347); +lean_ctor_set(x_351, 1, x_348); +lean_ctor_set(x_351, 2, x_318); +lean_ctor_set(x_351, 3, x_349); +x_352 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_352, 0, x_351); +x_353 = lean_st_ref_set(x_313, x_352, x_346); +lean_dec(x_313); +x_354 = lean_ctor_get(x_353, 0); +lean_inc(x_354); +x_355 = lean_ctor_get(x_353, 1); +lean_inc(x_355); +lean_dec(x_353); +x_356 = lean_apply_3(x_316, x_354, x_2, x_355); +return x_356; } } } else { -uint8_t x_409; +uint8_t x_357; +lean_dec(x_313); +lean_dec(x_2); +x_357 = !lean_is_exclusive(x_317); +if (x_357 == 0) +{ +return x_317; +} +else +{ +lean_object* x_358; lean_object* x_359; lean_object* x_360; +x_358 = lean_ctor_get(x_317, 0); +x_359 = lean_ctor_get(x_317, 1); +lean_inc(x_359); +lean_inc(x_358); +lean_dec(x_317); +x_360 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_360, 0, x_358); +lean_ctor_set(x_360, 1, x_359); +return x_360; +} +} +} +else +{ +lean_object* x_361; uint8_t x_362; lean_object* x_363; lean_object* x_364; +lean_dec(x_313); +x_361 = lean_ctor_get(x_2, 1); +lean_inc(x_361); +x_362 = 10; +x_363 = l_Lean_Server_Watchdog_mainLoop___closed__5; +x_364 = l_Lean_Server_Watchdog_FileWorker_errorPendingRequests(x_306, x_361, x_362, x_363, x_315); +lean_dec(x_306); +if (lean_obj_tag(x_364) == 0) +{ +lean_object* x_365; lean_object* x_366; lean_object* x_367; +x_365 = lean_ctor_get(x_364, 0); +lean_inc(x_365); +x_366 = lean_ctor_get(x_364, 1); +lean_inc(x_366); +lean_dec(x_364); +x_367 = lean_apply_3(x_316, x_365, x_2, x_366); +return x_367; +} +else +{ +uint8_t x_368; +lean_dec(x_2); +x_368 = !lean_is_exclusive(x_364); +if (x_368 == 0) +{ +return x_364; +} +else +{ +lean_object* x_369; lean_object* x_370; lean_object* x_371; +x_369 = lean_ctor_get(x_364, 0); +x_370 = lean_ctor_get(x_364, 1); +lean_inc(x_370); +lean_inc(x_369); +lean_dec(x_364); +x_371 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_371, 0, x_369); +lean_ctor_set(x_371, 1, x_370); +return x_371; +} +} +} +} +} +else +{ +uint8_t x_435; +lean_dec(x_306); +lean_dec(x_303); +lean_dec(x_302); +lean_dec(x_300); lean_free_object(x_105); lean_dec(x_2); -x_409 = !lean_is_exclusive(x_282); -if (x_409 == 0) +x_435 = !lean_is_exclusive(x_308); +if (x_435 == 0) { -return x_282; +return x_308; } else { -lean_object* x_410; lean_object* x_411; lean_object* x_412; -x_410 = lean_ctor_get(x_282, 0); -x_411 = lean_ctor_get(x_282, 1); -lean_inc(x_411); -lean_inc(x_410); -lean_dec(x_282); -x_412 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_412, 0, x_410); -lean_ctor_set(x_412, 1, x_411); -return x_412; -} -} -} -} -else -{ -lean_object* x_413; -x_413 = lean_ctor_get(x_105, 0); -lean_inc(x_413); -lean_dec(x_105); -if (lean_obj_tag(x_413) == 0) -{ -lean_object* x_414; lean_object* x_415; lean_object* x_416; -x_414 = lean_ctor_get(x_413, 0); -lean_inc(x_414); -lean_dec(x_413); -x_415 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_415, 0, x_414); -x_416 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_mainLoop___spec__2(x_415, x_2, x_103); -if (lean_obj_tag(x_416) == 0) -{ -lean_object* x_417; lean_object* x_418; lean_object* x_419; lean_object* x_420; lean_object* x_421; lean_object* x_422; -x_417 = lean_ctor_get(x_416, 0); -lean_inc(x_417); -x_418 = lean_ctor_get(x_416, 1); -lean_inc(x_418); -lean_dec(x_416); -x_419 = lean_ctor_get(x_417, 0); -lean_inc(x_419); -x_420 = lean_ctor_get(x_417, 1); -lean_inc(x_420); -x_421 = lean_ctor_get(x_419, 0); -lean_inc(x_421); -x_422 = l_Lean_Server_Watchdog_findFileWorker(x_421, x_2, x_418); -lean_dec(x_421); -if (lean_obj_tag(x_422) == 0) -{ -lean_object* x_423; lean_object* x_424; lean_object* x_425; -x_423 = lean_ctor_get(x_422, 0); -lean_inc(x_423); -x_424 = lean_ctor_get(x_422, 1); -lean_inc(x_424); -lean_dec(x_422); -x_425 = lean_io_mono_ms_now(x_424); -if (lean_obj_tag(x_425) == 0) -{ -lean_object* x_426; lean_object* x_427; lean_object* x_428; lean_object* x_429; lean_object* x_430; uint8_t x_431; lean_object* x_432; lean_object* x_464; lean_object* x_465; -x_426 = lean_ctor_get(x_425, 0); -lean_inc(x_426); -x_427 = lean_ctor_get(x_425, 1); -lean_inc(x_427); -lean_dec(x_425); -x_428 = lean_ctor_get(x_2, 6); -lean_inc(x_428); -x_429 = lean_nat_add(x_426, x_428); -lean_dec(x_428); -lean_dec(x_426); -x_430 = lean_ctor_get(x_423, 5); -lean_inc(x_430); -x_464 = lean_st_ref_take(x_430, x_427); -x_465 = lean_ctor_get(x_464, 0); -lean_inc(x_465); -if (lean_obj_tag(x_465) == 0) -{ -lean_object* x_466; lean_object* x_467; lean_object* x_468; lean_object* x_469; lean_object* x_470; lean_object* x_471; uint8_t x_472; -lean_dec(x_420); -lean_dec(x_419); -x_466 = lean_ctor_get(x_464, 1); -lean_inc(x_466); -lean_dec(x_464); -x_467 = l_Lean_Server_Watchdog_mainLoop___closed__5; -x_468 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_468, 0, x_429); -lean_ctor_set(x_468, 1, x_417); -lean_ctor_set(x_468, 2, x_467); -x_469 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_469, 0, x_468); -x_470 = lean_st_ref_set(x_430, x_469, x_466); -x_471 = lean_ctor_get(x_470, 1); -lean_inc(x_471); -lean_dec(x_470); -x_472 = 1; -x_431 = x_472; -x_432 = x_471; -goto block_463; -} -else -{ -lean_object* x_473; lean_object* x_474; lean_object* x_475; lean_object* x_476; lean_object* x_477; lean_object* x_478; lean_object* x_479; lean_object* x_480; lean_object* x_481; lean_object* x_482; lean_object* x_483; lean_object* x_484; lean_object* x_485; lean_object* x_486; uint8_t x_487; -if (lean_is_exclusive(x_417)) { - lean_ctor_release(x_417, 0); - lean_ctor_release(x_417, 1); - x_473 = x_417; -} else { - lean_dec_ref(x_417); - x_473 = lean_box(0); -} -x_474 = lean_ctor_get(x_465, 0); -lean_inc(x_474); -if (lean_is_exclusive(x_465)) { - lean_ctor_release(x_465, 0); - x_475 = x_465; -} else { - lean_dec_ref(x_465); - x_475 = lean_box(0); -} -x_476 = lean_ctor_get(x_464, 1); -lean_inc(x_476); -lean_dec(x_464); -x_477 = lean_ctor_get(x_474, 1); -lean_inc(x_477); -x_478 = lean_ctor_get(x_474, 2); -lean_inc(x_478); -if (lean_is_exclusive(x_474)) { - lean_ctor_release(x_474, 0); - lean_ctor_release(x_474, 1); - lean_ctor_release(x_474, 2); - x_479 = x_474; -} else { - lean_dec_ref(x_474); - x_479 = lean_box(0); -} -x_480 = lean_ctor_get(x_477, 1); -lean_inc(x_480); -lean_dec(x_477); -x_481 = l_Array_append___rarg(x_480, x_420); -lean_dec(x_420); -if (lean_is_scalar(x_473)) { - x_482 = lean_alloc_ctor(0, 2, 0); -} else { - x_482 = x_473; -} -lean_ctor_set(x_482, 0, x_419); -lean_ctor_set(x_482, 1, x_481); -if (lean_is_scalar(x_479)) { - x_483 = lean_alloc_ctor(0, 3, 0); -} else { - x_483 = x_479; -} -lean_ctor_set(x_483, 0, x_429); -lean_ctor_set(x_483, 1, x_482); -lean_ctor_set(x_483, 2, x_478); -if (lean_is_scalar(x_475)) { - x_484 = lean_alloc_ctor(1, 1, 0); -} else { - x_484 = x_475; -} -lean_ctor_set(x_484, 0, x_483); -x_485 = lean_st_ref_set(x_430, x_484, x_476); -x_486 = lean_ctor_get(x_485, 1); -lean_inc(x_486); -lean_dec(x_485); -x_487 = 0; -x_431 = x_487; -x_432 = x_486; -goto block_463; -} -block_463: -{ -lean_object* x_433; -x_433 = l_Lean_Server_Watchdog_mainLoop___closed__4; -if (x_431 == 0) -{ -lean_object* x_434; lean_object* x_435; -lean_dec(x_430); -lean_dec(x_423); -x_434 = lean_box(0); -x_435 = lean_apply_3(x_433, x_434, x_2, x_432); -return x_435; -} -else -{ -lean_object* x_436; -x_436 = l_Lean_Server_Watchdog_FileWorker_runEditsSignalTask(x_423, x_432); -if (lean_obj_tag(x_436) == 0) -{ -lean_object* x_437; lean_object* x_438; lean_object* x_439; lean_object* x_440; -x_437 = lean_ctor_get(x_436, 0); +lean_object* x_436; lean_object* x_437; lean_object* x_438; +x_436 = lean_ctor_get(x_308, 0); +x_437 = lean_ctor_get(x_308, 1); lean_inc(x_437); -x_438 = lean_ctor_get(x_436, 1); -lean_inc(x_438); -lean_dec(x_436); -x_439 = lean_st_ref_take(x_430, x_438); -x_440 = lean_ctor_get(x_439, 0); -lean_inc(x_440); -if (lean_obj_tag(x_440) == 0) +lean_inc(x_436); +lean_dec(x_308); +x_438 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_438, 0, x_436); +lean_ctor_set(x_438, 1, x_437); +return x_438; +} +} +} +else { -lean_object* x_441; lean_object* x_442; lean_object* x_443; lean_object* x_444; lean_object* x_445; lean_object* x_446; -lean_dec(x_437); -x_441 = lean_ctor_get(x_439, 1); +uint8_t x_439; +lean_dec(x_303); +lean_dec(x_302); +lean_dec(x_300); +lean_free_object(x_105); +lean_dec(x_2); +x_439 = !lean_is_exclusive(x_305); +if (x_439 == 0) +{ +return x_305; +} +else +{ +lean_object* x_440; lean_object* x_441; lean_object* x_442; +x_440 = lean_ctor_get(x_305, 0); +x_441 = lean_ctor_get(x_305, 1); lean_inc(x_441); -lean_dec(x_439); -x_442 = lean_box(0); -x_443 = lean_st_ref_set(x_430, x_442, x_441); -lean_dec(x_430); -x_444 = lean_ctor_get(x_443, 0); -lean_inc(x_444); -x_445 = lean_ctor_get(x_443, 1); +lean_inc(x_440); +lean_dec(x_305); +x_442 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_442, 0, x_440); +lean_ctor_set(x_442, 1, x_441); +return x_442; +} +} +} +else +{ +uint8_t x_443; +lean_free_object(x_105); +lean_dec(x_2); +x_443 = !lean_is_exclusive(x_299); +if (x_443 == 0) +{ +return x_299; +} +else +{ +lean_object* x_444; lean_object* x_445; lean_object* x_446; +x_444 = lean_ctor_get(x_299, 0); +x_445 = lean_ctor_get(x_299, 1); lean_inc(x_445); -lean_dec(x_443); -x_446 = lean_apply_3(x_433, x_444, x_2, x_445); +lean_inc(x_444); +lean_dec(x_299); +x_446 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_446, 0, x_444); +lean_ctor_set(x_446, 1, x_445); return x_446; } +} +} +} else { -lean_object* x_447; lean_object* x_448; lean_object* x_449; lean_object* x_450; lean_object* x_451; lean_object* x_452; lean_object* x_453; lean_object* x_454; lean_object* x_455; lean_object* x_456; lean_object* x_457; lean_object* x_458; -x_447 = lean_ctor_get(x_440, 0); +lean_object* x_447; +x_447 = lean_ctor_get(x_105, 0); lean_inc(x_447); -if (lean_is_exclusive(x_440)) { - lean_ctor_release(x_440, 0); - x_448 = x_440; -} else { - lean_dec_ref(x_440); - x_448 = lean_box(0); -} -x_449 = lean_ctor_get(x_439, 1); -lean_inc(x_449); -lean_dec(x_439); -x_450 = lean_ctor_get(x_447, 0); -lean_inc(x_450); -x_451 = lean_ctor_get(x_447, 1); +lean_dec(x_105); +if (lean_obj_tag(x_447) == 0) +{ +lean_object* x_448; lean_object* x_449; lean_object* x_450; +x_448 = lean_ctor_get(x_447, 0); +lean_inc(x_448); +lean_dec(x_447); +x_449 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_449, 0, x_448); +x_450 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_mainLoop___spec__2(x_449, x_2, x_103); +if (lean_obj_tag(x_450) == 0) +{ +lean_object* x_451; lean_object* x_452; lean_object* x_453; lean_object* x_454; lean_object* x_455; lean_object* x_456; +x_451 = lean_ctor_get(x_450, 0); lean_inc(x_451); -if (lean_is_exclusive(x_447)) { - lean_ctor_release(x_447, 0); - lean_ctor_release(x_447, 1); - lean_ctor_release(x_447, 2); - x_452 = x_447; -} else { - lean_dec_ref(x_447); - x_452 = lean_box(0); -} -if (lean_is_scalar(x_452)) { - x_453 = lean_alloc_ctor(0, 3, 0); -} else { - x_453 = x_452; -} -lean_ctor_set(x_453, 0, x_450); -lean_ctor_set(x_453, 1, x_451); -lean_ctor_set(x_453, 2, x_437); -if (lean_is_scalar(x_448)) { - x_454 = lean_alloc_ctor(1, 1, 0); -} else { - x_454 = x_448; -} -lean_ctor_set(x_454, 0, x_453); -x_455 = lean_st_ref_set(x_430, x_454, x_449); -lean_dec(x_430); -x_456 = lean_ctor_get(x_455, 0); -lean_inc(x_456); -x_457 = lean_ctor_get(x_455, 1); -lean_inc(x_457); +x_452 = lean_ctor_get(x_450, 1); +lean_inc(x_452); +lean_dec(x_450); +x_453 = lean_ctor_get(x_451, 0); +lean_inc(x_453); +x_454 = lean_ctor_get(x_451, 1); +lean_inc(x_454); +x_455 = lean_ctor_get(x_453, 0); +lean_inc(x_455); +x_456 = l_Lean_Server_Watchdog_findFileWorker(x_455, x_2, x_452); lean_dec(x_455); -x_458 = lean_apply_3(x_433, x_456, x_2, x_457); -return x_458; -} -} -else +if (lean_obj_tag(x_456) == 0) { -lean_object* x_459; lean_object* x_460; lean_object* x_461; lean_object* x_462; -lean_dec(x_430); -lean_dec(x_2); -x_459 = lean_ctor_get(x_436, 0); -lean_inc(x_459); -x_460 = lean_ctor_get(x_436, 1); +lean_object* x_457; lean_object* x_458; lean_object* x_459; +x_457 = lean_ctor_get(x_456, 0); +lean_inc(x_457); +x_458 = lean_ctor_get(x_456, 1); +lean_inc(x_458); +lean_dec(x_456); +x_459 = lean_io_mono_ms_now(x_458); +if (lean_obj_tag(x_459) == 0) +{ +lean_object* x_460; lean_object* x_461; lean_object* x_462; lean_object* x_463; lean_object* x_464; uint8_t x_465; lean_object* x_466; lean_object* x_508; lean_object* x_509; +x_460 = lean_ctor_get(x_459, 0); lean_inc(x_460); -if (lean_is_exclusive(x_436)) { - lean_ctor_release(x_436, 0); - lean_ctor_release(x_436, 1); - x_461 = x_436; -} else { - lean_dec_ref(x_436); - x_461 = lean_box(0); -} -if (lean_is_scalar(x_461)) { - x_462 = lean_alloc_ctor(1, 2, 0); -} else { - x_462 = x_461; -} -lean_ctor_set(x_462, 0, x_459); -lean_ctor_set(x_462, 1, x_460); -return x_462; -} -} -} +x_461 = lean_ctor_get(x_459, 1); +lean_inc(x_461); +lean_dec(x_459); +x_462 = lean_ctor_get(x_2, 6); +lean_inc(x_462); +x_463 = lean_nat_add(x_460, x_462); +lean_dec(x_462); +lean_dec(x_460); +x_464 = lean_ctor_get(x_457, 5); +lean_inc(x_464); +x_508 = lean_st_ref_take(x_464, x_461); +x_509 = lean_ctor_get(x_508, 0); +lean_inc(x_509); +if (lean_obj_tag(x_509) == 0) +{ +lean_object* x_510; lean_object* x_511; lean_object* x_512; lean_object* x_513; lean_object* x_514; lean_object* x_515; lean_object* x_516; uint8_t x_517; +lean_dec(x_454); +lean_dec(x_453); +x_510 = lean_ctor_get(x_508, 1); +lean_inc(x_510); +lean_dec(x_508); +x_511 = l_Lean_Server_Watchdog_mainLoop___closed__6; +x_512 = l_Array_empty___closed__1; +x_513 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_513, 0, x_463); +lean_ctor_set(x_513, 1, x_451); +lean_ctor_set(x_513, 2, x_511); +lean_ctor_set(x_513, 3, x_512); +x_514 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_514, 0, x_513); +x_515 = lean_st_ref_set(x_464, x_514, x_510); +x_516 = lean_ctor_get(x_515, 1); +lean_inc(x_516); +lean_dec(x_515); +x_517 = 0; +x_465 = x_517; +x_466 = x_516; +goto block_507; } else { -lean_object* x_488; lean_object* x_489; lean_object* x_490; lean_object* x_491; -lean_dec(x_423); -lean_dec(x_420); -lean_dec(x_419); -lean_dec(x_417); -lean_dec(x_2); -x_488 = lean_ctor_get(x_425, 0); -lean_inc(x_488); -x_489 = lean_ctor_get(x_425, 1); +lean_object* x_518; lean_object* x_519; lean_object* x_520; lean_object* x_521; lean_object* x_522; lean_object* x_523; lean_object* x_524; lean_object* x_525; lean_object* x_526; lean_object* x_527; lean_object* x_528; lean_object* x_529; lean_object* x_530; lean_object* x_531; lean_object* x_532; uint8_t x_533; +if (lean_is_exclusive(x_451)) { + lean_ctor_release(x_451, 0); + lean_ctor_release(x_451, 1); + x_518 = x_451; +} else { + lean_dec_ref(x_451); + x_518 = lean_box(0); +} +x_519 = lean_ctor_get(x_509, 0); +lean_inc(x_519); +if (lean_is_exclusive(x_509)) { + lean_ctor_release(x_509, 0); + x_520 = x_509; +} else { + lean_dec_ref(x_509); + x_520 = lean_box(0); +} +x_521 = lean_ctor_get(x_508, 1); +lean_inc(x_521); +lean_dec(x_508); +x_522 = lean_ctor_get(x_519, 1); +lean_inc(x_522); +x_523 = lean_ctor_get(x_519, 2); +lean_inc(x_523); +if (lean_is_exclusive(x_519)) { + lean_ctor_release(x_519, 0); + lean_ctor_release(x_519, 1); + lean_ctor_release(x_519, 2); + lean_ctor_release(x_519, 3); + x_524 = x_519; +} else { + lean_dec_ref(x_519); + x_524 = lean_box(0); +} +x_525 = lean_ctor_get(x_522, 1); +lean_inc(x_525); +lean_dec(x_522); +x_526 = l_Array_append___rarg(x_525, x_454); +lean_dec(x_454); +if (lean_is_scalar(x_518)) { + x_527 = lean_alloc_ctor(0, 2, 0); +} else { + x_527 = x_518; +} +lean_ctor_set(x_527, 0, x_453); +lean_ctor_set(x_527, 1, x_526); +x_528 = l_Array_empty___closed__1; +if (lean_is_scalar(x_524)) { + x_529 = lean_alloc_ctor(0, 4, 0); +} else { + x_529 = x_524; +} +lean_ctor_set(x_529, 0, x_463); +lean_ctor_set(x_529, 1, x_527); +lean_ctor_set(x_529, 2, x_523); +lean_ctor_set(x_529, 3, x_528); +if (lean_is_scalar(x_520)) { + x_530 = lean_alloc_ctor(1, 1, 0); +} else { + x_530 = x_520; +} +lean_ctor_set(x_530, 0, x_529); +x_531 = lean_st_ref_set(x_464, x_530, x_521); +x_532 = lean_ctor_get(x_531, 1); +lean_inc(x_532); +lean_dec(x_531); +x_533 = 1; +x_465 = x_533; +x_466 = x_532; +goto block_507; +} +block_507: +{ +lean_object* x_467; +x_467 = l_Lean_Server_Watchdog_mainLoop___closed__4; +if (x_465 == 0) +{ +lean_object* x_468; +x_468 = l_Lean_Server_Watchdog_FileWorker_runEditsSignalTask(x_457, x_466); +if (lean_obj_tag(x_468) == 0) +{ +lean_object* x_469; lean_object* x_470; lean_object* x_471; lean_object* x_472; +x_469 = lean_ctor_get(x_468, 0); +lean_inc(x_469); +x_470 = lean_ctor_get(x_468, 1); +lean_inc(x_470); +lean_dec(x_468); +x_471 = lean_st_ref_take(x_464, x_470); +x_472 = lean_ctor_get(x_471, 0); +lean_inc(x_472); +if (lean_obj_tag(x_472) == 0) +{ +lean_object* x_473; lean_object* x_474; lean_object* x_475; lean_object* x_476; lean_object* x_477; lean_object* x_478; +lean_dec(x_469); +x_473 = lean_ctor_get(x_471, 1); +lean_inc(x_473); +lean_dec(x_471); +x_474 = lean_box(0); +x_475 = lean_st_ref_set(x_464, x_474, x_473); +lean_dec(x_464); +x_476 = lean_ctor_get(x_475, 0); +lean_inc(x_476); +x_477 = lean_ctor_get(x_475, 1); +lean_inc(x_477); +lean_dec(x_475); +x_478 = lean_apply_3(x_467, x_476, x_2, x_477); +return x_478; +} +else +{ +lean_object* x_479; lean_object* x_480; lean_object* x_481; lean_object* x_482; lean_object* x_483; lean_object* x_484; lean_object* x_485; lean_object* x_486; lean_object* x_487; lean_object* x_488; lean_object* x_489; lean_object* x_490; lean_object* x_491; +x_479 = lean_ctor_get(x_472, 0); +lean_inc(x_479); +if (lean_is_exclusive(x_472)) { + lean_ctor_release(x_472, 0); + x_480 = x_472; +} else { + lean_dec_ref(x_472); + x_480 = lean_box(0); +} +x_481 = lean_ctor_get(x_471, 1); +lean_inc(x_481); +lean_dec(x_471); +x_482 = lean_ctor_get(x_479, 0); +lean_inc(x_482); +x_483 = lean_ctor_get(x_479, 1); +lean_inc(x_483); +x_484 = lean_ctor_get(x_479, 3); +lean_inc(x_484); +if (lean_is_exclusive(x_479)) { + lean_ctor_release(x_479, 0); + lean_ctor_release(x_479, 1); + lean_ctor_release(x_479, 2); + lean_ctor_release(x_479, 3); + x_485 = x_479; +} else { + lean_dec_ref(x_479); + x_485 = lean_box(0); +} +if (lean_is_scalar(x_485)) { + x_486 = lean_alloc_ctor(0, 4, 0); +} else { + x_486 = x_485; +} +lean_ctor_set(x_486, 0, x_482); +lean_ctor_set(x_486, 1, x_483); +lean_ctor_set(x_486, 2, x_469); +lean_ctor_set(x_486, 3, x_484); +if (lean_is_scalar(x_480)) { + x_487 = lean_alloc_ctor(1, 1, 0); +} else { + x_487 = x_480; +} +lean_ctor_set(x_487, 0, x_486); +x_488 = lean_st_ref_set(x_464, x_487, x_481); +lean_dec(x_464); +x_489 = lean_ctor_get(x_488, 0); lean_inc(x_489); -if (lean_is_exclusive(x_425)) { - lean_ctor_release(x_425, 0); - lean_ctor_release(x_425, 1); - x_490 = x_425; -} else { - lean_dec_ref(x_425); - x_490 = lean_box(0); -} -if (lean_is_scalar(x_490)) { - x_491 = lean_alloc_ctor(1, 2, 0); -} else { - x_491 = x_490; -} -lean_ctor_set(x_491, 0, x_488); -lean_ctor_set(x_491, 1, x_489); +x_490 = lean_ctor_get(x_488, 1); +lean_inc(x_490); +lean_dec(x_488); +x_491 = lean_apply_3(x_467, x_489, x_2, x_490); return x_491; } } else { lean_object* x_492; lean_object* x_493; lean_object* x_494; lean_object* x_495; -lean_dec(x_420); -lean_dec(x_419); -lean_dec(x_417); +lean_dec(x_464); lean_dec(x_2); -x_492 = lean_ctor_get(x_422, 0); +x_492 = lean_ctor_get(x_468, 0); lean_inc(x_492); -x_493 = lean_ctor_get(x_422, 1); +x_493 = lean_ctor_get(x_468, 1); lean_inc(x_493); -if (lean_is_exclusive(x_422)) { - lean_ctor_release(x_422, 0); - lean_ctor_release(x_422, 1); - x_494 = x_422; +if (lean_is_exclusive(x_468)) { + lean_ctor_release(x_468, 0); + lean_ctor_release(x_468, 1); + x_494 = x_468; } else { - lean_dec_ref(x_422); + lean_dec_ref(x_468); x_494 = lean_box(0); } if (lean_is_scalar(x_494)) { @@ -24694,388 +16055,543 @@ return x_495; } else { -lean_object* x_496; lean_object* x_497; lean_object* x_498; lean_object* x_499; -lean_dec(x_2); -x_496 = lean_ctor_get(x_416, 0); +lean_object* x_496; uint8_t x_497; lean_object* x_498; lean_object* x_499; +lean_dec(x_464); +x_496 = lean_ctor_get(x_2, 1); lean_inc(x_496); -x_497 = lean_ctor_get(x_416, 1); -lean_inc(x_497); -if (lean_is_exclusive(x_416)) { - lean_ctor_release(x_416, 0); - lean_ctor_release(x_416, 1); - x_498 = x_416; -} else { - lean_dec_ref(x_416); - x_498 = lean_box(0); -} -if (lean_is_scalar(x_498)) { - x_499 = lean_alloc_ctor(1, 2, 0); -} else { - x_499 = x_498; -} -lean_ctor_set(x_499, 0, x_496); -lean_ctor_set(x_499, 1, x_497); -return x_499; -} -} -else +x_497 = 10; +x_498 = l_Lean_Server_Watchdog_mainLoop___closed__5; +x_499 = l_Lean_Server_Watchdog_FileWorker_errorPendingRequests(x_457, x_496, x_497, x_498, x_466); +lean_dec(x_457); +if (lean_obj_tag(x_499) == 0) { lean_object* x_500; lean_object* x_501; lean_object* x_502; -x_500 = lean_ctor_get(x_413, 0); +x_500 = lean_ctor_get(x_499, 0); lean_inc(x_500); -lean_dec(x_413); -x_501 = lean_alloc_ctor(5, 1, 0); -lean_ctor_set(x_501, 0, x_500); -x_502 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_mainLoop___spec__2(x_501, x_2, x_103); -if (lean_obj_tag(x_502) == 0) +x_501 = lean_ctor_get(x_499, 1); +lean_inc(x_501); +lean_dec(x_499); +x_502 = lean_apply_3(x_467, x_500, x_2, x_501); +return x_502; +} +else { -lean_object* x_503; lean_object* x_504; lean_object* x_505; lean_object* x_506; lean_object* x_507; lean_object* x_508; -x_503 = lean_ctor_get(x_502, 0); +lean_object* x_503; lean_object* x_504; lean_object* x_505; lean_object* x_506; +lean_dec(x_2); +x_503 = lean_ctor_get(x_499, 0); lean_inc(x_503); -x_504 = lean_ctor_get(x_502, 1); +x_504 = lean_ctor_get(x_499, 1); lean_inc(x_504); -lean_dec(x_502); -x_505 = lean_ctor_get(x_503, 0); -lean_inc(x_505); -x_506 = lean_ctor_get(x_503, 1); -lean_inc(x_506); -x_507 = lean_ctor_get(x_505, 0); -lean_inc(x_507); -x_508 = l_Lean_Server_Watchdog_findFileWorker(x_507, x_2, x_504); -lean_dec(x_507); -if (lean_obj_tag(x_508) == 0) -{ -lean_object* x_509; lean_object* x_510; lean_object* x_511; -x_509 = lean_ctor_get(x_508, 0); -lean_inc(x_509); -x_510 = lean_ctor_get(x_508, 1); -lean_inc(x_510); -lean_dec(x_508); -x_511 = lean_io_mono_ms_now(x_510); -if (lean_obj_tag(x_511) == 0) -{ -lean_object* x_512; lean_object* x_513; lean_object* x_514; lean_object* x_515; lean_object* x_516; uint8_t x_517; lean_object* x_518; lean_object* x_550; lean_object* x_551; -x_512 = lean_ctor_get(x_511, 0); -lean_inc(x_512); -x_513 = lean_ctor_get(x_511, 1); -lean_inc(x_513); -lean_dec(x_511); -x_514 = lean_ctor_get(x_2, 6); -lean_inc(x_514); -x_515 = lean_nat_add(x_512, x_514); -lean_dec(x_514); -lean_dec(x_512); -x_516 = lean_ctor_get(x_509, 5); -lean_inc(x_516); -x_550 = lean_st_ref_take(x_516, x_513); -x_551 = lean_ctor_get(x_550, 0); -lean_inc(x_551); -if (lean_obj_tag(x_551) == 0) -{ -lean_object* x_552; lean_object* x_553; lean_object* x_554; lean_object* x_555; lean_object* x_556; lean_object* x_557; uint8_t x_558; -lean_dec(x_506); -lean_dec(x_505); -x_552 = lean_ctor_get(x_550, 1); -lean_inc(x_552); -lean_dec(x_550); -x_553 = l_Lean_Server_Watchdog_mainLoop___closed__5; -x_554 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_554, 0, x_515); -lean_ctor_set(x_554, 1, x_503); -lean_ctor_set(x_554, 2, x_553); -x_555 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_555, 0, x_554); -x_556 = lean_st_ref_set(x_516, x_555, x_552); -x_557 = lean_ctor_get(x_556, 1); -lean_inc(x_557); -lean_dec(x_556); -x_558 = 1; -x_517 = x_558; -x_518 = x_557; -goto block_549; +if (lean_is_exclusive(x_499)) { + lean_ctor_release(x_499, 0); + lean_ctor_release(x_499, 1); + x_505 = x_499; +} else { + lean_dec_ref(x_499); + x_505 = lean_box(0); +} +if (lean_is_scalar(x_505)) { + x_506 = lean_alloc_ctor(1, 2, 0); +} else { + x_506 = x_505; +} +lean_ctor_set(x_506, 0, x_503); +lean_ctor_set(x_506, 1, x_504); +return x_506; +} +} +} } else { -lean_object* x_559; lean_object* x_560; lean_object* x_561; lean_object* x_562; lean_object* x_563; lean_object* x_564; lean_object* x_565; lean_object* x_566; lean_object* x_567; lean_object* x_568; lean_object* x_569; lean_object* x_570; lean_object* x_571; lean_object* x_572; uint8_t x_573; -if (lean_is_exclusive(x_503)) { - lean_ctor_release(x_503, 0); - lean_ctor_release(x_503, 1); - x_559 = x_503; -} else { - lean_dec_ref(x_503); - x_559 = lean_box(0); -} -x_560 = lean_ctor_get(x_551, 0); -lean_inc(x_560); -if (lean_is_exclusive(x_551)) { - lean_ctor_release(x_551, 0); - x_561 = x_551; -} else { - lean_dec_ref(x_551); - x_561 = lean_box(0); -} -x_562 = lean_ctor_get(x_550, 1); -lean_inc(x_562); -lean_dec(x_550); -x_563 = lean_ctor_get(x_560, 1); -lean_inc(x_563); -x_564 = lean_ctor_get(x_560, 2); -lean_inc(x_564); -if (lean_is_exclusive(x_560)) { - lean_ctor_release(x_560, 0); - lean_ctor_release(x_560, 1); - lean_ctor_release(x_560, 2); - x_565 = x_560; -} else { - lean_dec_ref(x_560); - x_565 = lean_box(0); -} -x_566 = lean_ctor_get(x_563, 1); -lean_inc(x_566); -lean_dec(x_563); -x_567 = l_Array_append___rarg(x_566, x_506); -lean_dec(x_506); -if (lean_is_scalar(x_559)) { - x_568 = lean_alloc_ctor(0, 2, 0); -} else { - x_568 = x_559; -} -lean_ctor_set(x_568, 0, x_505); -lean_ctor_set(x_568, 1, x_567); -if (lean_is_scalar(x_565)) { - x_569 = lean_alloc_ctor(0, 3, 0); -} else { - x_569 = x_565; -} -lean_ctor_set(x_569, 0, x_515); -lean_ctor_set(x_569, 1, x_568); -lean_ctor_set(x_569, 2, x_564); -if (lean_is_scalar(x_561)) { - x_570 = lean_alloc_ctor(1, 1, 0); -} else { - x_570 = x_561; -} -lean_ctor_set(x_570, 0, x_569); -x_571 = lean_st_ref_set(x_516, x_570, x_562); -x_572 = lean_ctor_get(x_571, 1); -lean_inc(x_572); -lean_dec(x_571); -x_573 = 0; -x_517 = x_573; -x_518 = x_572; -goto block_549; -} -block_549: -{ -lean_object* x_519; -x_519 = l_Lean_Server_Watchdog_mainLoop___closed__4; -if (x_517 == 0) -{ -lean_object* x_520; lean_object* x_521; -lean_dec(x_516); -lean_dec(x_509); -x_520 = lean_box(0); -x_521 = lean_apply_3(x_519, x_520, x_2, x_518); -return x_521; -} -else -{ -lean_object* x_522; -x_522 = l_Lean_Server_Watchdog_FileWorker_runEditsSignalTask(x_509, x_518); -if (lean_obj_tag(x_522) == 0) -{ -lean_object* x_523; lean_object* x_524; lean_object* x_525; lean_object* x_526; -x_523 = lean_ctor_get(x_522, 0); -lean_inc(x_523); -x_524 = lean_ctor_get(x_522, 1); -lean_inc(x_524); -lean_dec(x_522); -x_525 = lean_st_ref_take(x_516, x_524); -x_526 = lean_ctor_get(x_525, 0); -lean_inc(x_526); -if (lean_obj_tag(x_526) == 0) -{ -lean_object* x_527; lean_object* x_528; lean_object* x_529; lean_object* x_530; lean_object* x_531; lean_object* x_532; -lean_dec(x_523); -x_527 = lean_ctor_get(x_525, 1); -lean_inc(x_527); -lean_dec(x_525); -x_528 = lean_box(0); -x_529 = lean_st_ref_set(x_516, x_528, x_527); -lean_dec(x_516); -x_530 = lean_ctor_get(x_529, 0); -lean_inc(x_530); -x_531 = lean_ctor_get(x_529, 1); -lean_inc(x_531); -lean_dec(x_529); -x_532 = lean_apply_3(x_519, x_530, x_2, x_531); -return x_532; -} -else -{ -lean_object* x_533; lean_object* x_534; lean_object* x_535; lean_object* x_536; lean_object* x_537; lean_object* x_538; lean_object* x_539; lean_object* x_540; lean_object* x_541; lean_object* x_542; lean_object* x_543; lean_object* x_544; -x_533 = lean_ctor_get(x_526, 0); -lean_inc(x_533); -if (lean_is_exclusive(x_526)) { - lean_ctor_release(x_526, 0); - x_534 = x_526; -} else { - lean_dec_ref(x_526); - x_534 = lean_box(0); -} -x_535 = lean_ctor_get(x_525, 1); +lean_object* x_534; lean_object* x_535; lean_object* x_536; lean_object* x_537; +lean_dec(x_457); +lean_dec(x_454); +lean_dec(x_453); +lean_dec(x_451); +lean_dec(x_2); +x_534 = lean_ctor_get(x_459, 0); +lean_inc(x_534); +x_535 = lean_ctor_get(x_459, 1); lean_inc(x_535); -lean_dec(x_525); -x_536 = lean_ctor_get(x_533, 0); -lean_inc(x_536); -x_537 = lean_ctor_get(x_533, 1); -lean_inc(x_537); -if (lean_is_exclusive(x_533)) { - lean_ctor_release(x_533, 0); - lean_ctor_release(x_533, 1); - lean_ctor_release(x_533, 2); - x_538 = x_533; +if (lean_is_exclusive(x_459)) { + lean_ctor_release(x_459, 0); + lean_ctor_release(x_459, 1); + x_536 = x_459; } else { - lean_dec_ref(x_533); - x_538 = lean_box(0); + lean_dec_ref(x_459); + x_536 = lean_box(0); } -if (lean_is_scalar(x_538)) { - x_539 = lean_alloc_ctor(0, 3, 0); +if (lean_is_scalar(x_536)) { + x_537 = lean_alloc_ctor(1, 2, 0); } else { - x_539 = x_538; + x_537 = x_536; } -lean_ctor_set(x_539, 0, x_536); -lean_ctor_set(x_539, 1, x_537); -lean_ctor_set(x_539, 2, x_523); -if (lean_is_scalar(x_534)) { - x_540 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_537, 0, x_534); +lean_ctor_set(x_537, 1, x_535); +return x_537; +} +} +else +{ +lean_object* x_538; lean_object* x_539; lean_object* x_540; lean_object* x_541; +lean_dec(x_454); +lean_dec(x_453); +lean_dec(x_451); +lean_dec(x_2); +x_538 = lean_ctor_get(x_456, 0); +lean_inc(x_538); +x_539 = lean_ctor_get(x_456, 1); +lean_inc(x_539); +if (lean_is_exclusive(x_456)) { + lean_ctor_release(x_456, 0); + lean_ctor_release(x_456, 1); + x_540 = x_456; } else { - x_540 = x_534; + lean_dec_ref(x_456); + x_540 = lean_box(0); } -lean_ctor_set(x_540, 0, x_539); -x_541 = lean_st_ref_set(x_516, x_540, x_535); -lean_dec(x_516); -x_542 = lean_ctor_get(x_541, 0); +if (lean_is_scalar(x_540)) { + x_541 = lean_alloc_ctor(1, 2, 0); +} else { + x_541 = x_540; +} +lean_ctor_set(x_541, 0, x_538); +lean_ctor_set(x_541, 1, x_539); +return x_541; +} +} +else +{ +lean_object* x_542; lean_object* x_543; lean_object* x_544; lean_object* x_545; +lean_dec(x_2); +x_542 = lean_ctor_get(x_450, 0); lean_inc(x_542); -x_543 = lean_ctor_get(x_541, 1); +x_543 = lean_ctor_get(x_450, 1); lean_inc(x_543); -lean_dec(x_541); -x_544 = lean_apply_3(x_519, x_542, x_2, x_543); -return x_544; +if (lean_is_exclusive(x_450)) { + lean_ctor_release(x_450, 0); + lean_ctor_release(x_450, 1); + x_544 = x_450; +} else { + lean_dec_ref(x_450); + x_544 = lean_box(0); +} +if (lean_is_scalar(x_544)) { + x_545 = lean_alloc_ctor(1, 2, 0); +} else { + x_545 = x_544; +} +lean_ctor_set(x_545, 0, x_542); +lean_ctor_set(x_545, 1, x_543); +return x_545; } } else { -lean_object* x_545; lean_object* x_546; lean_object* x_547; lean_object* x_548; -lean_dec(x_516); -lean_dec(x_2); -x_545 = lean_ctor_get(x_522, 0); -lean_inc(x_545); -x_546 = lean_ctor_get(x_522, 1); +lean_object* x_546; lean_object* x_547; lean_object* x_548; +x_546 = lean_ctor_get(x_447, 0); lean_inc(x_546); -if (lean_is_exclusive(x_522)) { - lean_ctor_release(x_522, 0); - lean_ctor_release(x_522, 1); - x_547 = x_522; -} else { - lean_dec_ref(x_522); - x_547 = lean_box(0); -} -if (lean_is_scalar(x_547)) { - x_548 = lean_alloc_ctor(1, 2, 0); -} else { - x_548 = x_547; -} -lean_ctor_set(x_548, 0, x_545); -lean_ctor_set(x_548, 1, x_546); -return x_548; -} -} -} +lean_dec(x_447); +x_547 = lean_alloc_ctor(5, 1, 0); +lean_ctor_set(x_547, 0, x_546); +x_548 = l_Lean_Server_Watchdog_parseParams___at_Lean_Server_Watchdog_mainLoop___spec__2(x_547, x_2, x_103); +if (lean_obj_tag(x_548) == 0) +{ +lean_object* x_549; lean_object* x_550; lean_object* x_551; lean_object* x_552; lean_object* x_553; lean_object* x_554; +x_549 = lean_ctor_get(x_548, 0); +lean_inc(x_549); +x_550 = lean_ctor_get(x_548, 1); +lean_inc(x_550); +lean_dec(x_548); +x_551 = lean_ctor_get(x_549, 0); +lean_inc(x_551); +x_552 = lean_ctor_get(x_549, 1); +lean_inc(x_552); +x_553 = lean_ctor_get(x_551, 0); +lean_inc(x_553); +x_554 = l_Lean_Server_Watchdog_findFileWorker(x_553, x_2, x_550); +lean_dec(x_553); +if (lean_obj_tag(x_554) == 0) +{ +lean_object* x_555; lean_object* x_556; lean_object* x_557; +x_555 = lean_ctor_get(x_554, 0); +lean_inc(x_555); +x_556 = lean_ctor_get(x_554, 1); +lean_inc(x_556); +lean_dec(x_554); +x_557 = lean_io_mono_ms_now(x_556); +if (lean_obj_tag(x_557) == 0) +{ +lean_object* x_558; lean_object* x_559; lean_object* x_560; lean_object* x_561; lean_object* x_562; uint8_t x_563; lean_object* x_564; lean_object* x_606; lean_object* x_607; +x_558 = lean_ctor_get(x_557, 0); +lean_inc(x_558); +x_559 = lean_ctor_get(x_557, 1); +lean_inc(x_559); +lean_dec(x_557); +x_560 = lean_ctor_get(x_2, 6); +lean_inc(x_560); +x_561 = lean_nat_add(x_558, x_560); +lean_dec(x_560); +lean_dec(x_558); +x_562 = lean_ctor_get(x_555, 5); +lean_inc(x_562); +x_606 = lean_st_ref_take(x_562, x_559); +x_607 = lean_ctor_get(x_606, 0); +lean_inc(x_607); +if (lean_obj_tag(x_607) == 0) +{ +lean_object* x_608; lean_object* x_609; lean_object* x_610; lean_object* x_611; lean_object* x_612; lean_object* x_613; lean_object* x_614; uint8_t x_615; +lean_dec(x_552); +lean_dec(x_551); +x_608 = lean_ctor_get(x_606, 1); +lean_inc(x_608); +lean_dec(x_606); +x_609 = l_Lean_Server_Watchdog_mainLoop___closed__6; +x_610 = l_Array_empty___closed__1; +x_611 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_611, 0, x_561); +lean_ctor_set(x_611, 1, x_549); +lean_ctor_set(x_611, 2, x_609); +lean_ctor_set(x_611, 3, x_610); +x_612 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_612, 0, x_611); +x_613 = lean_st_ref_set(x_562, x_612, x_608); +x_614 = lean_ctor_get(x_613, 1); +lean_inc(x_614); +lean_dec(x_613); +x_615 = 0; +x_563 = x_615; +x_564 = x_614; +goto block_605; } else { -lean_object* x_574; lean_object* x_575; lean_object* x_576; lean_object* x_577; -lean_dec(x_509); -lean_dec(x_506); -lean_dec(x_505); -lean_dec(x_503); -lean_dec(x_2); -x_574 = lean_ctor_get(x_511, 0); +lean_object* x_616; lean_object* x_617; lean_object* x_618; lean_object* x_619; lean_object* x_620; lean_object* x_621; lean_object* x_622; lean_object* x_623; lean_object* x_624; lean_object* x_625; lean_object* x_626; lean_object* x_627; lean_object* x_628; lean_object* x_629; lean_object* x_630; uint8_t x_631; +if (lean_is_exclusive(x_549)) { + lean_ctor_release(x_549, 0); + lean_ctor_release(x_549, 1); + x_616 = x_549; +} else { + lean_dec_ref(x_549); + x_616 = lean_box(0); +} +x_617 = lean_ctor_get(x_607, 0); +lean_inc(x_617); +if (lean_is_exclusive(x_607)) { + lean_ctor_release(x_607, 0); + x_618 = x_607; +} else { + lean_dec_ref(x_607); + x_618 = lean_box(0); +} +x_619 = lean_ctor_get(x_606, 1); +lean_inc(x_619); +lean_dec(x_606); +x_620 = lean_ctor_get(x_617, 1); +lean_inc(x_620); +x_621 = lean_ctor_get(x_617, 2); +lean_inc(x_621); +if (lean_is_exclusive(x_617)) { + lean_ctor_release(x_617, 0); + lean_ctor_release(x_617, 1); + lean_ctor_release(x_617, 2); + lean_ctor_release(x_617, 3); + x_622 = x_617; +} else { + lean_dec_ref(x_617); + x_622 = lean_box(0); +} +x_623 = lean_ctor_get(x_620, 1); +lean_inc(x_623); +lean_dec(x_620); +x_624 = l_Array_append___rarg(x_623, x_552); +lean_dec(x_552); +if (lean_is_scalar(x_616)) { + x_625 = lean_alloc_ctor(0, 2, 0); +} else { + x_625 = x_616; +} +lean_ctor_set(x_625, 0, x_551); +lean_ctor_set(x_625, 1, x_624); +x_626 = l_Array_empty___closed__1; +if (lean_is_scalar(x_622)) { + x_627 = lean_alloc_ctor(0, 4, 0); +} else { + x_627 = x_622; +} +lean_ctor_set(x_627, 0, x_561); +lean_ctor_set(x_627, 1, x_625); +lean_ctor_set(x_627, 2, x_621); +lean_ctor_set(x_627, 3, x_626); +if (lean_is_scalar(x_618)) { + x_628 = lean_alloc_ctor(1, 1, 0); +} else { + x_628 = x_618; +} +lean_ctor_set(x_628, 0, x_627); +x_629 = lean_st_ref_set(x_562, x_628, x_619); +x_630 = lean_ctor_get(x_629, 1); +lean_inc(x_630); +lean_dec(x_629); +x_631 = 1; +x_563 = x_631; +x_564 = x_630; +goto block_605; +} +block_605: +{ +lean_object* x_565; +x_565 = l_Lean_Server_Watchdog_mainLoop___closed__4; +if (x_563 == 0) +{ +lean_object* x_566; +x_566 = l_Lean_Server_Watchdog_FileWorker_runEditsSignalTask(x_555, x_564); +if (lean_obj_tag(x_566) == 0) +{ +lean_object* x_567; lean_object* x_568; lean_object* x_569; lean_object* x_570; +x_567 = lean_ctor_get(x_566, 0); +lean_inc(x_567); +x_568 = lean_ctor_get(x_566, 1); +lean_inc(x_568); +lean_dec(x_566); +x_569 = lean_st_ref_take(x_562, x_568); +x_570 = lean_ctor_get(x_569, 0); +lean_inc(x_570); +if (lean_obj_tag(x_570) == 0) +{ +lean_object* x_571; lean_object* x_572; lean_object* x_573; lean_object* x_574; lean_object* x_575; lean_object* x_576; +lean_dec(x_567); +x_571 = lean_ctor_get(x_569, 1); +lean_inc(x_571); +lean_dec(x_569); +x_572 = lean_box(0); +x_573 = lean_st_ref_set(x_562, x_572, x_571); +lean_dec(x_562); +x_574 = lean_ctor_get(x_573, 0); lean_inc(x_574); -x_575 = lean_ctor_get(x_511, 1); +x_575 = lean_ctor_get(x_573, 1); lean_inc(x_575); -if (lean_is_exclusive(x_511)) { - lean_ctor_release(x_511, 0); - lean_ctor_release(x_511, 1); - x_576 = x_511; -} else { - lean_dec_ref(x_511); - x_576 = lean_box(0); -} -if (lean_is_scalar(x_576)) { - x_577 = lean_alloc_ctor(1, 2, 0); -} else { - x_577 = x_576; -} -lean_ctor_set(x_577, 0, x_574); -lean_ctor_set(x_577, 1, x_575); -return x_577; -} +lean_dec(x_573); +x_576 = lean_apply_3(x_565, x_574, x_2, x_575); +return x_576; } else { -lean_object* x_578; lean_object* x_579; lean_object* x_580; lean_object* x_581; -lean_dec(x_506); -lean_dec(x_505); -lean_dec(x_503); -lean_dec(x_2); -x_578 = lean_ctor_get(x_508, 0); -lean_inc(x_578); -x_579 = lean_ctor_get(x_508, 1); +lean_object* x_577; lean_object* x_578; lean_object* x_579; lean_object* x_580; lean_object* x_581; lean_object* x_582; lean_object* x_583; lean_object* x_584; lean_object* x_585; lean_object* x_586; lean_object* x_587; lean_object* x_588; lean_object* x_589; +x_577 = lean_ctor_get(x_570, 0); +lean_inc(x_577); +if (lean_is_exclusive(x_570)) { + lean_ctor_release(x_570, 0); + x_578 = x_570; +} else { + lean_dec_ref(x_570); + x_578 = lean_box(0); +} +x_579 = lean_ctor_get(x_569, 1); lean_inc(x_579); -if (lean_is_exclusive(x_508)) { - lean_ctor_release(x_508, 0); - lean_ctor_release(x_508, 1); - x_580 = x_508; +lean_dec(x_569); +x_580 = lean_ctor_get(x_577, 0); +lean_inc(x_580); +x_581 = lean_ctor_get(x_577, 1); +lean_inc(x_581); +x_582 = lean_ctor_get(x_577, 3); +lean_inc(x_582); +if (lean_is_exclusive(x_577)) { + lean_ctor_release(x_577, 0); + lean_ctor_release(x_577, 1); + lean_ctor_release(x_577, 2); + lean_ctor_release(x_577, 3); + x_583 = x_577; } else { - lean_dec_ref(x_508); - x_580 = lean_box(0); + lean_dec_ref(x_577); + x_583 = lean_box(0); } -if (lean_is_scalar(x_580)) { - x_581 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_583)) { + x_584 = lean_alloc_ctor(0, 4, 0); } else { - x_581 = x_580; + x_584 = x_583; } -lean_ctor_set(x_581, 0, x_578); -lean_ctor_set(x_581, 1, x_579); -return x_581; +lean_ctor_set(x_584, 0, x_580); +lean_ctor_set(x_584, 1, x_581); +lean_ctor_set(x_584, 2, x_567); +lean_ctor_set(x_584, 3, x_582); +if (lean_is_scalar(x_578)) { + x_585 = lean_alloc_ctor(1, 1, 0); +} else { + x_585 = x_578; +} +lean_ctor_set(x_585, 0, x_584); +x_586 = lean_st_ref_set(x_562, x_585, x_579); +lean_dec(x_562); +x_587 = lean_ctor_get(x_586, 0); +lean_inc(x_587); +x_588 = lean_ctor_get(x_586, 1); +lean_inc(x_588); +lean_dec(x_586); +x_589 = lean_apply_3(x_565, x_587, x_2, x_588); +return x_589; } } else { -lean_object* x_582; lean_object* x_583; lean_object* x_584; lean_object* x_585; +lean_object* x_590; lean_object* x_591; lean_object* x_592; lean_object* x_593; +lean_dec(x_562); lean_dec(x_2); -x_582 = lean_ctor_get(x_502, 0); -lean_inc(x_582); -x_583 = lean_ctor_get(x_502, 1); -lean_inc(x_583); -if (lean_is_exclusive(x_502)) { - lean_ctor_release(x_502, 0); - lean_ctor_release(x_502, 1); - x_584 = x_502; +x_590 = lean_ctor_get(x_566, 0); +lean_inc(x_590); +x_591 = lean_ctor_get(x_566, 1); +lean_inc(x_591); +if (lean_is_exclusive(x_566)) { + lean_ctor_release(x_566, 0); + lean_ctor_release(x_566, 1); + x_592 = x_566; } else { - lean_dec_ref(x_502); - x_584 = lean_box(0); + lean_dec_ref(x_566); + x_592 = lean_box(0); } -if (lean_is_scalar(x_584)) { - x_585 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_592)) { + x_593 = lean_alloc_ctor(1, 2, 0); } else { - x_585 = x_584; + x_593 = x_592; } -lean_ctor_set(x_585, 0, x_582); -lean_ctor_set(x_585, 1, x_583); -return x_585; +lean_ctor_set(x_593, 0, x_590); +lean_ctor_set(x_593, 1, x_591); +return x_593; +} +} +else +{ +lean_object* x_594; uint8_t x_595; lean_object* x_596; lean_object* x_597; +lean_dec(x_562); +x_594 = lean_ctor_get(x_2, 1); +lean_inc(x_594); +x_595 = 10; +x_596 = l_Lean_Server_Watchdog_mainLoop___closed__5; +x_597 = l_Lean_Server_Watchdog_FileWorker_errorPendingRequests(x_555, x_594, x_595, x_596, x_564); +lean_dec(x_555); +if (lean_obj_tag(x_597) == 0) +{ +lean_object* x_598; lean_object* x_599; lean_object* x_600; +x_598 = lean_ctor_get(x_597, 0); +lean_inc(x_598); +x_599 = lean_ctor_get(x_597, 1); +lean_inc(x_599); +lean_dec(x_597); +x_600 = lean_apply_3(x_565, x_598, x_2, x_599); +return x_600; +} +else +{ +lean_object* x_601; lean_object* x_602; lean_object* x_603; lean_object* x_604; +lean_dec(x_2); +x_601 = lean_ctor_get(x_597, 0); +lean_inc(x_601); +x_602 = lean_ctor_get(x_597, 1); +lean_inc(x_602); +if (lean_is_exclusive(x_597)) { + lean_ctor_release(x_597, 0); + lean_ctor_release(x_597, 1); + x_603 = x_597; +} else { + lean_dec_ref(x_597); + x_603 = lean_box(0); +} +if (lean_is_scalar(x_603)) { + x_604 = lean_alloc_ctor(1, 2, 0); +} else { + x_604 = x_603; +} +lean_ctor_set(x_604, 0, x_601); +lean_ctor_set(x_604, 1, x_602); +return x_604; +} +} +} +} +else +{ +lean_object* x_632; lean_object* x_633; lean_object* x_634; lean_object* x_635; +lean_dec(x_555); +lean_dec(x_552); +lean_dec(x_551); +lean_dec(x_549); +lean_dec(x_2); +x_632 = lean_ctor_get(x_557, 0); +lean_inc(x_632); +x_633 = lean_ctor_get(x_557, 1); +lean_inc(x_633); +if (lean_is_exclusive(x_557)) { + lean_ctor_release(x_557, 0); + lean_ctor_release(x_557, 1); + x_634 = x_557; +} else { + lean_dec_ref(x_557); + x_634 = lean_box(0); +} +if (lean_is_scalar(x_634)) { + x_635 = lean_alloc_ctor(1, 2, 0); +} else { + x_635 = x_634; +} +lean_ctor_set(x_635, 0, x_632); +lean_ctor_set(x_635, 1, x_633); +return x_635; +} +} +else +{ +lean_object* x_636; lean_object* x_637; lean_object* x_638; lean_object* x_639; +lean_dec(x_552); +lean_dec(x_551); +lean_dec(x_549); +lean_dec(x_2); +x_636 = lean_ctor_get(x_554, 0); +lean_inc(x_636); +x_637 = lean_ctor_get(x_554, 1); +lean_inc(x_637); +if (lean_is_exclusive(x_554)) { + lean_ctor_release(x_554, 0); + lean_ctor_release(x_554, 1); + x_638 = x_554; +} else { + lean_dec_ref(x_554); + x_638 = lean_box(0); +} +if (lean_is_scalar(x_638)) { + x_639 = lean_alloc_ctor(1, 2, 0); +} else { + x_639 = x_638; +} +lean_ctor_set(x_639, 0, x_636); +lean_ctor_set(x_639, 1, x_637); +return x_639; +} +} +else +{ +lean_object* x_640; lean_object* x_641; lean_object* x_642; lean_object* x_643; +lean_dec(x_2); +x_640 = lean_ctor_get(x_548, 0); +lean_inc(x_640); +x_641 = lean_ctor_get(x_548, 1); +lean_inc(x_641); +if (lean_is_exclusive(x_548)) { + lean_ctor_release(x_548, 0); + lean_ctor_release(x_548, 1); + x_642 = x_548; +} else { + lean_dec_ref(x_548); + x_642 = lean_box(0); +} +if (lean_is_scalar(x_642)) { + x_643 = lean_alloc_ctor(1, 2, 0); +} else { + x_643 = x_642; +} +lean_ctor_set(x_643, 0, x_640); +lean_ctor_set(x_643, 1, x_641); +return x_643; } } } @@ -25084,75 +16600,75 @@ return x_585; } default: { -lean_object* x_586; lean_object* x_587; lean_object* x_588; +lean_object* x_644; lean_object* x_645; lean_object* x_646; lean_dec(x_51); lean_dec(x_2); -x_586 = lean_ctor_get(x_8, 1); -lean_inc(x_586); +x_644 = lean_ctor_get(x_8, 1); +lean_inc(x_644); lean_dec(x_8); -x_587 = l_Lean_Server_Watchdog_mainLoop___closed__3; -x_588 = l_IO_throwServerError___rarg(x_587, x_586); -return x_588; +x_645 = l_Lean_Server_Watchdog_mainLoop___closed__3; +x_646 = l_IO_throwServerError___rarg(x_645, x_644); +return x_646; } } } default: { -uint8_t x_589; +uint8_t x_647; lean_dec(x_2); lean_dec(x_1); -x_589 = !lean_is_exclusive(x_8); -if (x_589 == 0) +x_647 = !lean_is_exclusive(x_8); +if (x_647 == 0) { -lean_object* x_590; lean_object* x_591; -x_590 = lean_ctor_get(x_8, 0); -lean_dec(x_590); -x_591 = lean_ctor_get(x_9, 0); -lean_inc(x_591); +lean_object* x_648; lean_object* x_649; +x_648 = lean_ctor_get(x_8, 0); +lean_dec(x_648); +x_649 = lean_ctor_get(x_9, 0); +lean_inc(x_649); lean_dec(x_9); lean_ctor_set_tag(x_8, 1); -lean_ctor_set(x_8, 0, x_591); +lean_ctor_set(x_8, 0, x_649); return x_8; } else { -lean_object* x_592; lean_object* x_593; lean_object* x_594; -x_592 = lean_ctor_get(x_8, 1); -lean_inc(x_592); +lean_object* x_650; lean_object* x_651; lean_object* x_652; +x_650 = lean_ctor_get(x_8, 1); +lean_inc(x_650); lean_dec(x_8); -x_593 = lean_ctor_get(x_9, 0); -lean_inc(x_593); +x_651 = lean_ctor_get(x_9, 0); +lean_inc(x_651); lean_dec(x_9); -x_594 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_594, 0, x_593); -lean_ctor_set(x_594, 1, x_592); -return x_594; +x_652 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_652, 0, x_651); +lean_ctor_set(x_652, 1, x_650); +return x_652; } } } } else { -uint8_t x_595; +uint8_t x_653; lean_dec(x_2); lean_dec(x_1); -x_595 = !lean_is_exclusive(x_8); -if (x_595 == 0) +x_653 = !lean_is_exclusive(x_8); +if (x_653 == 0) { return x_8; } else { -lean_object* x_596; lean_object* x_597; lean_object* x_598; -x_596 = lean_ctor_get(x_8, 0); -x_597 = lean_ctor_get(x_8, 1); -lean_inc(x_597); -lean_inc(x_596); +lean_object* x_654; lean_object* x_655; lean_object* x_656; +x_654 = lean_ctor_get(x_8, 0); +x_655 = lean_ctor_get(x_8, 1); +lean_inc(x_655); +lean_inc(x_654); lean_dec(x_8); -x_598 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_598, 0, x_596); -lean_ctor_set(x_598, 1, x_597); -return x_598; +x_656 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_656, 0, x_654); +lean_ctor_set(x_656, 1, x_655); +return x_656; } } } @@ -28437,35 +19953,18 @@ l_Lean_Server_Watchdog_startFileWorker___closed__5 = _init_l_Lean_Server_Watchdo lean_mark_persistent(l_Lean_Server_Watchdog_startFileWorker___closed__5); l_Lean_Server_Watchdog_terminateFileWorker___closed__1 = _init_l_Lean_Server_Watchdog_terminateFileWorker___closed__1(); lean_mark_persistent(l_Lean_Server_Watchdog_terminateFileWorker___closed__1); -l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__1 = _init_l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__1(); -l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__2 = _init_l_Lean_Server_Watchdog_tryWriteMessage___rarg___lambda__1___closed__2(); -l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__1 = _init_l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__1(); -lean_mark_persistent(l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__1); -l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__2 = _init_l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__2(); -l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__3 = _init_l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__3(); -lean_mark_persistent(l_Lean_Server_Watchdog_tryWriteMessage___rarg___closed__3); -l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleEdits___spec__4___closed__1 = _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleEdits___spec__4___closed__1(); -lean_mark_persistent(l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleEdits___spec__4___closed__1); -l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleEdits___spec__4___closed__2 = _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleEdits___spec__4___closed__2(); -lean_mark_persistent(l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleEdits___spec__4___closed__2); +l_Lean_Server_Watchdog_tryWriteMessage___lambda__1___closed__1 = _init_l_Lean_Server_Watchdog_tryWriteMessage___lambda__1___closed__1(); +l_Lean_Server_Watchdog_tryWriteMessage___lambda__1___closed__2 = _init_l_Lean_Server_Watchdog_tryWriteMessage___lambda__1___closed__2(); l_Lean_Server_Watchdog_handleEdits___lambda__1___closed__1 = _init_l_Lean_Server_Watchdog_handleEdits___lambda__1___closed__1(); lean_mark_persistent(l_Lean_Server_Watchdog_handleEdits___lambda__1___closed__1); -l_Lean_Server_Watchdog_handleEdits___lambda__1___closed__2 = _init_l_Lean_Server_Watchdog_handleEdits___lambda__1___closed__2(); -lean_mark_persistent(l_Lean_Server_Watchdog_handleEdits___lambda__1___closed__2); l_Lean_Server_Watchdog_handleEdits___closed__1 = _init_l_Lean_Server_Watchdog_handleEdits___closed__1(); lean_mark_persistent(l_Lean_Server_Watchdog_handleEdits___closed__1); l_Lean_Server_Watchdog_handleEdits___closed__2 = _init_l_Lean_Server_Watchdog_handleEdits___closed__2(); lean_mark_persistent(l_Lean_Server_Watchdog_handleEdits___closed__2); l_Lean_Server_Watchdog_handleEdits___closed__3 = _init_l_Lean_Server_Watchdog_handleEdits___closed__3(); lean_mark_persistent(l_Lean_Server_Watchdog_handleEdits___closed__3); -l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleCancelRequest___spec__5___closed__1 = _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleCancelRequest___spec__5___closed__1(); -lean_mark_persistent(l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleCancelRequest___spec__5___closed__1); -l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleCancelRequest___spec__5___closed__2 = _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleCancelRequest___spec__5___closed__2(); -lean_mark_persistent(l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleCancelRequest___spec__5___closed__2); -l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_handleCancelRequest___spec__8___closed__1 = _init_l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_handleCancelRequest___spec__8___closed__1(); -lean_mark_persistent(l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_handleCancelRequest___spec__8___closed__1); -l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_handleCancelRequest___spec__8___closed__2 = _init_l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_handleCancelRequest___spec__8___closed__2(); -lean_mark_persistent(l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_handleCancelRequest___spec__8___closed__2); +l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_handleCancelRequest___spec__3___closed__1 = _init_l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_handleCancelRequest___spec__3___closed__1(); +lean_mark_persistent(l_Std_RBNode_forIn_visit___at_Lean_Server_Watchdog_handleCancelRequest___spec__3___closed__1); l_Lean_Server_Watchdog_parseParams___rarg___closed__1 = _init_l_Lean_Server_Watchdog_parseParams___rarg___closed__1(); lean_mark_persistent(l_Lean_Server_Watchdog_parseParams___rarg___closed__1); l_Lean_Server_Watchdog_handleRequest_match__2___rarg___closed__1 = _init_l_Lean_Server_Watchdog_handleRequest_match__2___rarg___closed__1(); @@ -28488,72 +19987,6 @@ l_Lean_Server_Watchdog_handleRequest_match__2___rarg___closed__9 = _init_l_Lean_ lean_mark_persistent(l_Lean_Server_Watchdog_handleRequest_match__2___rarg___closed__9); l_Lean_Server_Watchdog_handleRequest_match__2___rarg___closed__10 = _init_l_Lean_Server_Watchdog_handleRequest_match__2___rarg___closed__10(); lean_mark_persistent(l_Lean_Server_Watchdog_handleRequest_match__2___rarg___closed__10); -l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__5___closed__1 = _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__5___closed__1(); -lean_mark_persistent(l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__5___closed__1); -l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__5___closed__2 = _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__5___closed__2(); -lean_mark_persistent(l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__5___closed__2); -l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12___closed__1 = _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12___closed__1(); -lean_mark_persistent(l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12___closed__1); -l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12___closed__2 = _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12___closed__2(); -lean_mark_persistent(l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__12___closed__2); -l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___closed__1 = _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___closed__1(); -lean_mark_persistent(l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___closed__1); -l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___closed__2 = _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___closed__2(); -lean_mark_persistent(l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__19___closed__2); -l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___closed__1 = _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___closed__1(); -lean_mark_persistent(l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___closed__1); -l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___closed__2 = _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___closed__2(); -lean_mark_persistent(l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__26___closed__2); -l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___closed__1 = _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___closed__1(); -lean_mark_persistent(l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___closed__1); -l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___closed__2 = _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___closed__2(); -lean_mark_persistent(l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__33___closed__2); -l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__40___closed__1 = _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__40___closed__1(); -lean_mark_persistent(l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__40___closed__1); -l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__40___closed__2 = _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__40___closed__2(); -lean_mark_persistent(l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__40___closed__2); -l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__47___closed__1 = _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__47___closed__1(); -lean_mark_persistent(l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__47___closed__1); -l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__47___closed__2 = _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__47___closed__2(); -lean_mark_persistent(l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__47___closed__2); -l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__54___closed__1 = _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__54___closed__1(); -lean_mark_persistent(l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__54___closed__1); -l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__54___closed__2 = _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__54___closed__2(); -lean_mark_persistent(l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__54___closed__2); -l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__61___closed__1 = _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__61___closed__1(); -lean_mark_persistent(l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__61___closed__1); -l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__61___closed__2 = _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__61___closed__2(); -lean_mark_persistent(l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__61___closed__2); -l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__68___closed__1 = _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__68___closed__1(); -lean_mark_persistent(l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__68___closed__1); -l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__68___closed__2 = _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__68___closed__2(); -lean_mark_persistent(l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__68___closed__2); -l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__73___closed__1 = _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__73___closed__1(); -lean_mark_persistent(l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__73___closed__1); -l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__73___closed__2 = _init_l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__73___closed__2(); -lean_mark_persistent(l_Lean_Server_Watchdog_tryWriteMessage___at_Lean_Server_Watchdog_handleRequest___spec__73___closed__2); -l_Lean_Server_Watchdog_handleRequest___lambda__1___closed__1 = _init_l_Lean_Server_Watchdog_handleRequest___lambda__1___closed__1(); -lean_mark_persistent(l_Lean_Server_Watchdog_handleRequest___lambda__1___closed__1); -l_Lean_Server_Watchdog_handleRequest___lambda__2___closed__1 = _init_l_Lean_Server_Watchdog_handleRequest___lambda__2___closed__1(); -lean_mark_persistent(l_Lean_Server_Watchdog_handleRequest___lambda__2___closed__1); -l_Lean_Server_Watchdog_handleRequest___lambda__3___closed__1 = _init_l_Lean_Server_Watchdog_handleRequest___lambda__3___closed__1(); -lean_mark_persistent(l_Lean_Server_Watchdog_handleRequest___lambda__3___closed__1); -l_Lean_Server_Watchdog_handleRequest___lambda__4___closed__1 = _init_l_Lean_Server_Watchdog_handleRequest___lambda__4___closed__1(); -lean_mark_persistent(l_Lean_Server_Watchdog_handleRequest___lambda__4___closed__1); -l_Lean_Server_Watchdog_handleRequest___lambda__5___closed__1 = _init_l_Lean_Server_Watchdog_handleRequest___lambda__5___closed__1(); -lean_mark_persistent(l_Lean_Server_Watchdog_handleRequest___lambda__5___closed__1); -l_Lean_Server_Watchdog_handleRequest___lambda__6___closed__1 = _init_l_Lean_Server_Watchdog_handleRequest___lambda__6___closed__1(); -lean_mark_persistent(l_Lean_Server_Watchdog_handleRequest___lambda__6___closed__1); -l_Lean_Server_Watchdog_handleRequest___lambda__7___closed__1 = _init_l_Lean_Server_Watchdog_handleRequest___lambda__7___closed__1(); -lean_mark_persistent(l_Lean_Server_Watchdog_handleRequest___lambda__7___closed__1); -l_Lean_Server_Watchdog_handleRequest___lambda__8___closed__1 = _init_l_Lean_Server_Watchdog_handleRequest___lambda__8___closed__1(); -lean_mark_persistent(l_Lean_Server_Watchdog_handleRequest___lambda__8___closed__1); -l_Lean_Server_Watchdog_handleRequest___lambda__9___closed__1 = _init_l_Lean_Server_Watchdog_handleRequest___lambda__9___closed__1(); -lean_mark_persistent(l_Lean_Server_Watchdog_handleRequest___lambda__9___closed__1); -l_Lean_Server_Watchdog_handleRequest___lambda__10___closed__1 = _init_l_Lean_Server_Watchdog_handleRequest___lambda__10___closed__1(); -lean_mark_persistent(l_Lean_Server_Watchdog_handleRequest___lambda__10___closed__1); -l_Lean_Server_Watchdog_handleRequest___lambda__11___closed__1 = _init_l_Lean_Server_Watchdog_handleRequest___lambda__11___closed__1(); -lean_mark_persistent(l_Lean_Server_Watchdog_handleRequest___lambda__11___closed__1); l_Lean_Server_Watchdog_handleRequest___closed__1 = _init_l_Lean_Server_Watchdog_handleRequest___closed__1(); lean_mark_persistent(l_Lean_Server_Watchdog_handleRequest___closed__1); l_Lean_Server_Watchdog_handleRequest___closed__2 = _init_l_Lean_Server_Watchdog_handleRequest___closed__2(); @@ -28566,8 +19999,8 @@ l_Lean_Server_Watchdog_runClientTask___closed__1 = _init_l_Lean_Server_Watchdog_ lean_mark_persistent(l_Lean_Server_Watchdog_runClientTask___closed__1); l_Lean_Server_Watchdog_runClientTask___closed__2 = _init_l_Lean_Server_Watchdog_runClientTask___closed__2(); lean_mark_persistent(l_Lean_Server_Watchdog_runClientTask___closed__2); -l_Lean_Server_Watchdog_mainLoop_match__3___rarg___closed__1 = _init_l_Lean_Server_Watchdog_mainLoop_match__3___rarg___closed__1(); -lean_mark_persistent(l_Lean_Server_Watchdog_mainLoop_match__3___rarg___closed__1); +l_Lean_Server_Watchdog_mainLoop_match__2___rarg___closed__1 = _init_l_Lean_Server_Watchdog_mainLoop_match__2___rarg___closed__1(); +lean_mark_persistent(l_Lean_Server_Watchdog_mainLoop_match__2___rarg___closed__1); l_Lean_Server_Watchdog_mainLoop___closed__1 = _init_l_Lean_Server_Watchdog_mainLoop___closed__1(); lean_mark_persistent(l_Lean_Server_Watchdog_mainLoop___closed__1); l_Lean_Server_Watchdog_mainLoop___closed__2 = _init_l_Lean_Server_Watchdog_mainLoop___closed__2(); @@ -28578,6 +20011,8 @@ l_Lean_Server_Watchdog_mainLoop___closed__4 = _init_l_Lean_Server_Watchdog_mainL lean_mark_persistent(l_Lean_Server_Watchdog_mainLoop___closed__4); l_Lean_Server_Watchdog_mainLoop___closed__5 = _init_l_Lean_Server_Watchdog_mainLoop___closed__5(); lean_mark_persistent(l_Lean_Server_Watchdog_mainLoop___closed__5); +l_Lean_Server_Watchdog_mainLoop___closed__6 = _init_l_Lean_Server_Watchdog_mainLoop___closed__6(); +lean_mark_persistent(l_Lean_Server_Watchdog_mainLoop___closed__6); l_Lean_Server_Watchdog_mkLeanServerCapabilities___closed__1 = _init_l_Lean_Server_Watchdog_mkLeanServerCapabilities___closed__1(); lean_mark_persistent(l_Lean_Server_Watchdog_mkLeanServerCapabilities___closed__1); l_Lean_Server_Watchdog_mkLeanServerCapabilities___closed__2 = _init_l_Lean_Server_Watchdog_mkLeanServerCapabilities___closed__2();